* ld.h (args_type): Add new field embedded_relocs.
authorIan Lance Taylor <ian@airs.com>
Fri, 2 Dec 1994 22:25:50 +0000 (22:25 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 2 Dec 1994 22:25:50 +0000 (22:25 +0000)
* ldemul.h (ldemul_after_open, after_open_default): Declare.
(ld_emulation_xfer_struct): Add new field after_open.
* ldemul.c (ldemul_after_open): New function.
(after_open_default): New function.
* ldlang.c (lang_process): Call ldemul_after_open.
* lexsup.c (parse_args): Handle --embedded-relocs.
* emultempl/elf32.em (ld_${EMULATION_NAME}_emulation): Initialize
new after_open field to after_open_default.
* emultempl/generic.em, emultempl/gld960.em: Likewise.
* emultempl/gld960c.em, emultempl/hppaelf.em: Likewise.
* emultempl/linux.em, emultempl/m88kbcs.em: Likewise.
* emultempl/sunos.em, emultempl/vanilla.em: Likewise.
* ld.texinfo, ld.1: Mention -embedded-relocs.

ld/emultempl/m88kbcs.em
ld/ld.1

index 8196923..1d1f05a 100644 (file)
@@ -108,6 +108,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
   syslib_default,
   hll_default,
   after_parse_default,
+  after_open_default,
   after_allocation_default,
   set_output_arch_default,
   ldemul_default_target,
diff --git a/ld/ld.1 b/ld/ld.1
index 102c8a2..c229710 100644 (file)
--- a/ld/ld.1
+++ b/ld/ld.1
@@ -42,6 +42,7 @@ ld \- the GNU linker
 .RB "[\|" "\-e\ "\c
 .I entry\c
 \&\|] 
+.RB "[\|" \-embedded\-relocs "\|]"
 .RB "[\|" \-F "\|]" 
 .RB "[\|" "\-F\ "\c
 .I format\c
@@ -427,6 +428,16 @@ discussion of defaults and other ways of specifying the
 entry point.
 
 .TP
+.B \-embedded\-relocs
+This option is only meaningful when linking MIPS embedded PIC code,
+generated by the
+.B \-membedded\-pic
+option to the GNU compiler and assembler.  It causes the linker to
+create a table which may be used at runtime to relocate any data which
+was statically initialized to pointer values.  See the code in
+testsuite/ld-empic for details.
+
+.TP
 .B \-F
 .TP
 .BI "-F" "format"\c