* 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.
This commit is contained in:
Ian Lance Taylor 1994-12-02 22:25:50 +00:00
parent 4461196e69
commit 39a6e282d1
2 changed files with 12 additions and 0 deletions

View 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,

11
ld/ld.1
View File

@ -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