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.
This commit is contained in:
Nick Clifton
2007-10-01 09:54:58 +00:00
parent 1576798ef8
commit e2a83dd0ec
11 changed files with 80 additions and 14 deletions

View File

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