From: Nick Clifton <nickc@cygnus.com>
To: binutils@sourceware.cygnus.com
Subject: Linker documentation patch
Date: Sat, 01 Apr 2000 00:00:00 -0000 [thread overview]
Message-ID: <200001071907.LAA09059@elmo.cygnus.com> (raw)
Message-ID: <20000401000000.ieSkG58o573-YQjloGxCSmFElaGV1EO4ACKszvEayPQ@z> (raw)
Hi Guys,
A couple of people have been caught out by gcc silently dropping
linker command line switches which are not preceeded by -Wl, One
day I may actually get around to fixing gcc so that it generates an
appropriate warning message, but in the meantime I have applied this
patch to the linker documentation:
Cheers
Nick
2000-01-07 Nick Clifton <nickc@cygnus.com>
* ld.texinfo (Options): Remind users to preceed linker command
line switches with -Wl, if it is being invoked by a comnpiler
driver program.
Index: ld.texinfo
===================================================================
RCS file: /cvs/binutils/binutils/ld/ld.texinfo,v
retrieving revision 1.8
diff -p -r1.8 ld.texinfo
*** ld.texinfo 2000/01/05 14:12:23 1.8
--- ld.texinfo 2000/01/07 19:02:13
*************** requires them. For example, @samp{--ofo
*** 228,233 ****
--- 228,247 ----
@samp{--oformat=srec} are equivalent. Unique abbreviations of the names
of multiple-letter options are accepted.
+ Note - if the linker is being invoked indirectly, via a compiler driver
+ (eg @samp{gcc}) then all the linker command line options should be
+ prefixed by @samp{-Wl,} like this:
+
+ @smallexample
+ gcc -Wl,--startgroup foo.o bar.o -Wl,--endgroup
+ @end smallexample
+
+ This is important, because otherwise the compiler driver program may
+ silently drop the linker options, resulting in a bad link.
+
+ Here is a table of the generic command line switches accepted by the GNU
+ linker:
+
@table @code
@kindex -a@var{keyword}
@item -a@var{keyword}
next reply other threads:[~2000-04-01 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-07 11:07 Nick Clifton [this message]
2000-01-07 11:26 ` Ian Lance Taylor
2000-04-01 0:00 ` Nick Clifton
-- strict thread matches above, loose matches on Subject: below --
2000-01-07 11:44 Nick Clifton
2000-04-01 0:00 ` Nick Clifton
2000-01-07 11:31 Nick Clifton
1999-07-01 0:00 Nick Clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200001071907.LAA09059@elmo.cygnus.com \
--to=nickc@cygnus.com \
--cc=binutils@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).