This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Object files increadibly big for MIPS target.
Gavin Romig-Koch wrote:
> Pal-Kristian Engstad writes:
> > So the question is: How do you configure gcc and binutils not to
> > generate this huge .mdebug section?
>
> If it *really* isn't needed anymore, you can strip it out with
> objcopy (part of binutils).
Or, since you're probably invoking a linker script to deal with the
embedded system's memory map and layout anyway just set that section to
be /*DISCARD*/ed from the image you care about.
I do this on my embedded MIPS code routinely. .mdebug is no more
offensive to me than the rest of the sections I toss out of the
image. :-)