summaryrefslogtreecommitdiff
path: root/ld/genscripts.sh
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/genscripts.sh
parent1576798ef8ee3053eb00b22fef8af50c41696d51 (diff)
downloadbinutils-gdb-e2a83dd0ecc04d898cce1e17a7b2bf14d0e8fc14.tar.gz
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/genscripts.sh')
-rwxr-xr-xld/genscripts.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index d78ffce3c23..10623ecba5f 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -63,6 +63,7 @@
# sun3.xc [used when the linker is invoked with "-z combreloc"]
# sun3.xsc [used when the linker is invoked with "--shared"]
# sun3.xdc [used when the linker is invoked with "-pie"]
+# sun3.xa [used when the linker is invoked with "--enable-auto-import"]
#
# It also produced the C source file:
#
@@ -386,6 +387,16 @@ if test -n "$GENERATE_PIE_SCRIPT"; then
unset CREATE_PIE
fi
+if test -n "$GENERATE_AUTO_IMPORT_SCRIPT"; then
+ LD_FLAG=auto_import
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_}
+ (
+ echo "/* Script for ld --enable-auto-import: Like the default script except read only data is placed into .data */"
+ . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xa
+fi
+
case " $EMULATION_LIBPATH " in
*" ${EMULATION_NAME} "*) COMPILE_IN=true;;
esac