.got increase in -gc-sections for MIPS

Thiemo Seufer ths@networkno.de
Thu Nov 30 16:42:00 GMT 2006

David Daney wrote:
> Hiroki Kaminaga wrote:
> >Hi,
> >
> >While trying -ffunction-sections -fdata-sections -Wl,-gc-sections
> >combination to omit unreferenced func/data, I observed an increase in
> >.got section, while other sections such as .text and .data did decrease.
> >
> >I'm using binutils-2.16, glibc-2.3.6, gcc-3.4.4 combination.
> >
> Try with binutils 2.17 or a current cvs snapshot.  If memory serves me, 
> we fixed several aspects of --gc-sections *after* the release of 2.16.

Current HEAD incrases for Hiroki's testcase by four GOT entries when using
--gc-sections. It's not surprising it doesn't shrink, given that we don't
do reference counting for GOT entries, but I don't see ATM where the
increase comes from.


More information about the Binutils mailing list