diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 10 | ||||
-rw-r--r-- | ld/NEWS | 11 | ||||
-rw-r--r-- | ld/ld.texinfo | 20 | ||||
-rw-r--r-- | ld/ldgram.y | 3 | ||||
-rw-r--r-- | ld/ldlex.l | 2 |
5 files changed, 35 insertions, 11 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index dea26e1..07e9695 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com> + + * ldgram.y (extern_name_list): Do not require symbols to be + separated by commas. + (ifile_p1): Add EXTERN. + * ldlex.l: Accept EXTERN in BOTH and SCRIPT mode as well as MRI + mode. + * ld.texinfo (Options): Mention that EXTERN is equivalent to -u. + (Miscellaneous Commands): Document EXTERN. + Wed Jul 1 19:40:34 1998 Richard Henderson <rth@cygnus.com> * ld.h (args_type): Add gc_sections. @@ -2,14 +2,17 @@ Changes in version 2.10: +* Added garbage collection of unused sections, enabled by --gc-sections. + It does require a bit of backend support; currently implemented are + ppc-elf, mips-elf, and mn10300-elf. Others will ignore the option. + * Added SORT to the linker script language to permit sorting sections by file name or section name. -* The -e option now accepts a number as well as a symbol name. +* Added EXTERN to the linker script language as an equivalent to the -u + command-line option. -* Added garbage collection of unused sections, enabled by --gc-sections. - It does require a bit of backend support; currently implemented are - ppc-elf, mips-elf, and mn10300-elf. Others will ignore the option. +* The -e option now accepts a number as well as a symbol name. Changes in version 2.9: diff --git a/ld/ld.texinfo b/ld/ld.texinfo index b23d7c9..e4731c7 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -626,12 +626,11 @@ options. Multiple @samp{-T} options accumulate. @cindex undefined symbol @item -u @var{symbol} @itemx --undefined=@var{symbol} -Force @var{symbol} to be entered in the output file as an undefined symbol. -Doing this may, for example, trigger linking of additional modules from -standard libraries. @samp{-u} may be repeated with different option -arguments to enter additional undefined symbols. -@c Nice idea, but no such command: This option is equivalent -@c to the @code{EXTERN} linker command. +Force @var{symbol} to be entered in the output file as an undefined +symbol. Doing this may, for example, trigger linking of additional +modules from standard libraries. @samp{-u} may be repeated with +different option arguments to enter additional undefined symbols. This +option is equivalent to the @code{EXTERN} linker script command. @kindex -v @kindex -V @@ -1663,6 +1662,15 @@ command is also used to set the format for the output file. @xref{BFD}. There are a few other linker scripts commands. @table @code +@item EXTERN(@var{symbol} @var{symbol} @dots{}) +@kindex EXTERN +@cindex undefined symbol in linker script +Force @var{symbol} to be entered in the output file as an undefined +symbol. Doing this may, for example, trigger linking of additional +modules from standard libraries. You may list several @var{symbol}s for +each @code{EXTERN}, and you may use @code{EXTERN} multiple times. This +command has the same effect as the @samp{-u} command-line option. + @item FORCE_COMMON_ALLOCATION @kindex FORCE_COMMON_ALLOCATION @cindex common allocation in linker script diff --git a/ld/ldgram.y b/ld/ldgram.y index da8d214..68ff0a2 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -264,6 +264,8 @@ casesymlist: extern_name_list: NAME { ldlang_add_undef ($1); } + | extern_name_list NAME + { ldlang_add_undef ($2); } | extern_name_list ',' NAME { ldlang_add_undef ($3); } ; @@ -325,6 +327,7 @@ ifile_p1: { lang_add_nocrossref ($3); } + | EXTERN '(' extern_name_list ')' ; input_list: @@ -242,6 +242,7 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]* <EXPRESSION,BOTH>"MAX" { RTOKEN(MAX); } <EXPRESSION,BOTH>"MIN" { RTOKEN(MIN); } <BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);} +<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);} <EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);} <EXPRESSION,BOTH,SCRIPT>"sizeof_headers" { RTOKEN(SIZEOF_HEADERS);} <EXPRESSION,BOTH,SCRIPT>"SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);} @@ -304,7 +305,6 @@ V_IDENTIFIER [*?.$_a-zA-Z][*?_a-zA-Z0-9]* <MRI>"NAME" { RTOKEN(NAMEWORD); } <MRI>"FORMAT" { RTOKEN(FORMAT); } <MRI>"CASE" { RTOKEN(CASE); } -<MRI>"EXTERN" { RTOKEN(EXTERN); } <MRI>"START" { RTOKEN(START); } <MRI>"LIST".* { RTOKEN(LIST); /* LIST and ignore to end of line */ } <MRI>"SECT" { RTOKEN(SECT); } |