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: LD: function-level linking


According to the manual at:

http://sourceware.org/binutils/docs-2.16/ld/Options.html#Options

[quote]
For options whose names are multiple letters, either one dash or two
can precede the option name; ...
[/quote]

By the way, I tested both (one and two dashes), ld complained both anway.


2006/7/10, Thiemo Seufer <ths@networkno.de>:
Tzu-Chien Chiu wrote:
> I got a warning from ld: "gc-sections option ignored."
>
> The compilation command:
> [quote]
> or32-elf-gcc -o a.o -c -ffunction-sections -fdata-sections a.c
> [/quote]
>
> The link command is:
> [quote]
> or32-elf-gcc -o program a.o b.o c.o -lfoo -Wl,-gc-sections, -Wl,-static
> [/quote]

You missed the second dash in front of --gc-sections.


Thiemo




--
Tzu-Chien Chiu - SMedia Technology Corp.
URL: http://www.csie.nctu.edu.tw/~jwchiu/


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