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: Linking un-referenced function


Tuesday 23 May 2006 06:23 samaye, John Carter alekhiit:
> Use
> ? ?`--gc-sections'
> option on linker and...
> `-ffunction-sections'
> `-fdata-sections'

Thanks. I had been searching for this for quite some time. I just added the 
options:

 -fdata-sections -ffunction-sections -Wl,--gc-sections

to my gcc command and it worked! (The "-Wl," part [including the comma] is 
used to denote that the option is for the linker but it is passed via the 
compiler.)

-- 

Tux #395953 resides at http://samvit.org
playing with KDE 3.51 on SUSE Linux 10.1
$ date [] CCE +2006-05-23 W21-2 UTC+0530

Attachment: pgp00000.pgp
Description: PGP signature


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