Skip to contentSkip to conversation

.reginfo and .mdebug section

DISCUSSION Long Li 3 participants 3 messages Dec 17, 2002 MIPS

lore
Share & tools
lore

Long Li

author
#0 lore raw

Hi,

I have some problems after building a linux-mips cross compiler on Red Hat7.1.

1. I tried to compile some c code targetting mips4k, which is 32-bit ISA. However, the map file tells me that the compiled code are 64-bit, since the address are 64-bit.

2. When I compiled the c code, I found in the mapfile that there are some sections called .reginfo and .mdebug. What are those sections? I would like to get rid of them. However, they still exists even if I deleted the '-g' option for gcc. Is there a way I can avoid the .reginfo and .mdebug sections?

Thanks a lot!

Long

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

#1 lore raw
Quoted 11 lines · Long Li

1. I tried to compile some c code targetting mips4k, which is 32-bit ISA. However, the map file tells me that the compiled code are 64-bit, since the address are 64-bit.

2. When I compiled the c code, I found in the mapfile that there are some sections called .reginfo and .mdebug. What are those sections? I would like to get rid of them. However, they still exists even if I deleted the '-g' option for gcc. Is there a way I can avoid the .reginfo and .mdebug sections?

.reginfo is MIPS ABI mandated brain damage described the register usage of a given object or shared object. I know of nothing that actually is using these sections. It's always just 24 bytes so not really worth alot of fuzz though. With some binutils versions you can remove this section with objcopy --remove-section=.reginfo. Some binutils version however will just create a new .reginfo section during objcopy so with those this won't work.

.mdebug is the MIPS ABI mdebug stuff, debug information. You should be able to get rid of those with -g, at least my tools here don't create it by default.

Ralf

#2 lore raw
In reply to Long Li
Quoted 9 lines · Long Li

Hi,

I have some problems after building a linux-mips cross compiler on Red Hat7.1.

1. I tried to compile some c code targetting mips4k, which is 32-bit ISA. However, the map file tells me that the compiled code are 64-bit, since the address are 64-bit.

Mine is 32bit.

Quoted 7 lines

2. When I compiled the c code, I found in the mapfile that there are some sections called .reginfo and .mdebug. What are those sections? I would like to get rid of them. However, they still exists even if I deleted the '-g' option for gcc. Is there a way I can avoid the .reginfo and .mdebug sections?

Your toolchain is very old. The newer ones no longer use .mdebug.

H.J.