This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS -gc-sections broken?


Hi Hiroki,

$ mips-unknown-linux-dev-gcc -ffunction-sections -fdata-sections -Wl,-gc-sections -o test foo.c main.c
$ mips-unknown-linux-dev-readelf -s test | grep gbl_common
     4: 00000000  7200 OBJECT  GLOBAL DEFAULT  ABS gbl_common

and does not belong to any section... gbl_common symbol should be
removed, or at least have its entry in .bss section.
Any hints, comments are appreciated!

I tried this and it worked for me. As in the executable did not contain any reference to the gbl_common symbol. Possible differences between my build and yours are:


  * I was using the current mainline binutils sources.
  * I was using the current mainline gcc sources.
  * I configured the toolchain for a mipsisa32-elf target.

So. My suggestion would be to first try using the latest binutils sources and if that does not fix anything, check the output from gcc to make sure that func_not_used really is being placed into its own section.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]