diff options
author | Nick Clifton <nickc@redhat.com> | 2007-10-01 09:54:58 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-10-01 09:54:58 +0000 |
commit | e2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14 (patch) | |
tree | f9a5437e0dcbb4976b774eb17e2224e60a3c2a57 /ld/emultempl | |
parent | 1576798ef8ee3053eb00b22fef8af50c41696d51 (diff) | |
download | gdb-e2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14.zip gdb-e2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14.tar.gz gdb-e2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14.tar.bz2 |
PR linker/4844
* genscript.sh: Add support for generating a .xa script for use with the --auto-import option.
* ld.texinfo: Document the new behaviour of the --auto-import option.
* ldint.texinfo: Document new script generation.
* emulparams/i386pe.sh (GENERATE_AUTO_IMPORT): Define.
* emulparams/i386pe_posix.sh (GENERATE_AUTO_IMPORT): Define.
* emulparams/i386pep.sh (GENERATE_AUTO_IMPORT): Define.
* emultemp/pe.em (..._get_script): Support the use of the auto import script.
* scripttempl/pe.sc: Put the .rdata input sections into the .data output section when creating an auto import script.
* scripttempl/pep.sc: Likewise.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/pe.em | 4 | ||||
-rw-r--r-- | ld/emultempl/pep.em | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index e7bcacf..43ce8e9 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1891,6 +1891,10 @@ echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +if test -n "$GENERATE_AUTO_IMPORT_SCRIPT" ; then +echo ' ; else if (link_info.pei386_auto_import == 1) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xa >> e${EMULATION_NAME}.c +fi echo ' ; else return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c echo '; }' >> e${EMULATION_NAME}.c diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em index a78435b..9e27e15 100644 --- a/ld/emultempl/pep.em +++ b/ld/emultempl/pep.em @@ -1659,6 +1659,10 @@ echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c +if test -n "$GENERATE_AUTO_IMPORT_SCRIPT" ; then +echo ' ; else if (link_info.pei386_auto_import == 1) return' >> e${EMULATION_NAME}.c +sed $sc ldscripts/${EMULATION_NAME}.xa >> e${EMULATION_NAME}.c +fi echo ' ; else return' >> e${EMULATION_NAME}.c sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c echo '; }' >> e${EMULATION_NAME}.c |