From 39a6e282d1dd53210a534968361aa57b627d7413 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 2 Dec 1994 22:25:50 +0000 Subject: [PATCH] * ld.h (args_type): Add new field embedded_relocs. * 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 | 1 + ld/ld.1 | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ld/emultempl/m88kbcs.em b/ld/emultempl/m88kbcs.em index 81969232d6..1d1f05ab6f 100644 --- a/ld/emultempl/m88kbcs.em +++ b/ld/emultempl/m88kbcs.em @@ -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 102c8a2ec4..c22971045d 100644 --- 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 @@ -426,6 +427,16 @@ program, rather than the default entry point. for a 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