aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/pe.sc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-10-01 09:54:58 +0000
committerNick Clifton <nickc@redhat.com>2007-10-01 09:54:58 +0000
commite2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14 (patch)
treef9a5437e0dcbb4976b774eb17e2224e60a3c2a57 /ld/scripttempl/pe.sc
parent1576798ef8ee3053eb00b22fef8af50c41696d51 (diff)
downloadgdb-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/scripttempl/pe.sc')
-rw-r--r--ld/scripttempl/pe.sc15
1 files changed, 11 insertions, 4 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index c9eb16f..8561446 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -13,8 +13,16 @@ fi
# use grouped sections instead).
if test "${RELOCATING}"; then
R_TEXT='*(SORT(.text$*))'
- R_DATA='*(SORT(.data$*))'
- R_RDATA='*(SORT(.rdata$*))'
+ if test "x$LD_FLAG" = "xauto_import" ; then
+ R_DATA='*(SORT(.data$*))
+ *(.rdata)
+ *(SORT(.rdata$*))'
+ R_RDATA=''
+ else
+ R_DATA='*(SORT(.data$*))'
+ R_RDATA='*(.rdata)
+ *(SORT(.rdata$*))'
+ fi
R_IDATA='
SORT(*)(.idata$2)
SORT(*)(.idata$3)
@@ -37,7 +45,7 @@ if test "${RELOCATING}"; then
else
R_TEXT=
R_DATA=
- R_RDATA=
+ R_RDATA='*(.rdata)'
R_IDATA=
R_CRT=
R_RSRC=
@@ -93,7 +101,6 @@ SECTIONS
.rdata ${RELOCATING+BLOCK(__section_alignment__)} :
{
- *(.rdata)
${R_RDATA}
${RELOCATING+ *(.eh_frame)}
${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}