From: Nick Clifton Date: Thu, 2 Dec 1999 11:49:20 +0000 (+0000) Subject: Add arm-epoc-pe specific linker script X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e68692499c41be8d46ad655b1a566e2e0aea1d4b;p=binutils-gdb.git Add arm-epoc-pe specific linker script --- diff --git a/ld/ChangeLog b/ld/ChangeLog index e5c5ec1f4f0..cc26ce06570 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,13 @@ +1999-12-02 Nick Clifton + + * Makefile.am: Fix arm-epoc-pe dependencies. + * Makefile.in: Regenerate. + + * emulparams/arm_epoc_pe.sh (SCRIPT_NAME): Set to epocpe. + + * scripttempl/epocpe.sc: New file: copy of pe.sc, customised for + EPOC by placing .rdata into .text. + 1999-11-26 Andreas Schwab * configure.in: Put AC_MSG_CHECKING/AC_MSG_RESULT around check for diff --git a/ld/Makefile.am b/ld/Makefile.am index 2ee0ec769f0..1edc12fda12 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -314,7 +314,7 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)" earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \ - $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS} ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)" earmpe.c: $(srcdir)/emulparams/armpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} diff --git a/ld/Makefile.in b/ld/Makefile.in index 3aec7e76789..94536dd9fcd 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -1015,7 +1015,7 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} armnbsd "$(tdir_armnbsd)" earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \ - $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} + $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS} ${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)" earmpe.c: $(srcdir)/emulparams/armpe.sh \ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS} diff --git a/ld/emulparams/arm_epoc_pe.sh b/ld/emulparams/arm_epoc_pe.sh index ca1a309f727..04fa22db879 100644 --- a/ld/emulparams/arm_epoc_pe.sh +++ b/ld/emulparams/arm_epoc_pe.sh @@ -1,5 +1,5 @@ ARCH=arm -SCRIPT_NAME=pe +SCRIPT_NAME=epocpe OUTPUT_FORMAT="epoc-pei-arm-little" LITTLE_OUTPUT_FORMAT="epoc-pei-arm-little" BIG_OUTPUT_FORMAT="epoc-pei-arm-big" diff --git a/ld/scripttempl/epocpe.sc b/ld/scripttempl/epocpe.sc new file mode 100644 index 00000000000..eda6696b59a --- /dev/null +++ b/ld/scripttempl/epocpe.sc @@ -0,0 +1,151 @@ +# Linker script for PE. + +if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then + RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} +fi + +# We can't easily and portably get an unquoted $ in a shell +# substitution, so we do this instead. +# Sorting of the .foo$* sections is required by the definition of +# grouped sections in PE. +# Sorting of the file names in R_IDATA is required by the +# current implementation of dlltool (this could probably be changed to +# use grouped sections instead). +if test "${RELOCATING}"; then + R_TEXT='*(SORT(.text$*))' + R_DATA='*(SORT(.data$*))' + R_RDATA='*(SORT(.rdata$*))' + R_IDATA=' + SORT(*)(.idata$2) + SORT(*)(.idata$3) + /* These zeroes mark the end of the import list. */ + LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); + SORT(*)(.idata$4) + SORT(*)(.idata$5) + SORT(*)(.idata$6) + SORT(*)(.idata$7)' + R_CRT='*(SORT(.CRT$*))' + R_RSRC='*(SORT(.rsrc$*))' +else + R_TEXT= + R_DATA= + R_RDATA= + R_IDATA= + R_CRT= + R_RSRC= +fi + +cat <