From 4e53152f8faf67e5af38e7b8e755113ea1719124 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 7 Jan 2000 19:06:46 +0000 Subject: [PATCH] Remind users about -Wl, --- ld/ChangeLog | 6 ++++++ ld/ld.texinfo | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index a9e3d8c..465db1b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2000-01-07 Nick Clifton + + * ld.texinfo (Options): Remind users to preceed linker command + line switches with -Wl, if it is being invoked by a comnpiler + driver program. + Wed Jan 5 08:02:12 2000 Catherine Moore * ld.h (wildcard_spec): Change exclude_name to exclude_name_list. diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 382dd7e..9b822bd 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -228,6 +228,20 @@ requires them. For example, @samp{--oformat srec} and @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} -- 2.7.4