This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: dead function elimination


Hi Jimmy,

If i understand things correctly, there is a restriction on '--gc-sections' that it doesn't work if the link is dynamic. What if my scenario is like this:

libsomething.a - some static library built with -ffunction-sections & -fdata-sections

src.o - my source code also built with -ffucntion-sections

final step:

ld -o exec --gc-sections src.o -lsomething

In the above step, ld simply says

'/usr/bin/ld: Warning: gc-sections option ignored'

Hmm, interesting. I had thought that this would work. I will have to look into it when I get from vacation. Are you using the most up to date version of the linker sources ?


Cheers
  Nick



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