From e68692499c41be8d46ad655b1a566e2e0aea1d4b Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 2 Dec 1999 11:49:20 +0000 Subject: Add arm-epoc-pe specific linker script --- ld/ChangeLog | 10 +++ ld/Makefile.am | 2 +- ld/Makefile.in | 2 +- ld/emulparams/arm_epoc_pe.sh | 2 +- ld/scripttempl/epocpe.sc | 151 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 164 insertions(+), 3 deletions(-) create mode 100644 ld/scripttempl/epocpe.sc (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index e5c5ec1..cc26ce0 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 2ee0ec7..1edc12f 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 3aec7e7..94536dd 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 ca1a309..04fa22d 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 0000000..eda6696 --- /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 <