removing unused functions during final link

Andrew Haley aph@redhat.com
Wed Sep 3 15:13:00 GMT 2014


On 09/03/2014 04:09 PM, Melvin Blades wrote:
> The resulting executable contains the texts strings and function names
> from both functions in show.c and neither function of show2.c  My
> usage of -fdata-section -ffunction-section and -gc-sections prevents
> the  functions in show2.c from being linked in , but not the unused
> functions in show.c

Something must be referring to them; they must be reachable.
That or there's a bug.
There's no way for anyone to know without seeing code.

Andrew.



More information about the Gcc-help mailing list