diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2010-09-22 08:03:42 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2010-09-22 08:03:42 +0000 |
commit | d48749734084702ffe2a535ece1d52f9aa6ac168 (patch) | |
tree | 2ea43369c4bb6ce6e18889adeb102c77ffdad5a0 /ld/scripttempl | |
parent | cb2f80e68a7419ff24651d89699459e6973539d5 (diff) | |
download | gdb-d48749734084702ffe2a535ece1d52f9aa6ac168.zip gdb-d48749734084702ffe2a535ece1d52f9aa6ac168.tar.gz gdb-d48749734084702ffe2a535ece1d52f9aa6ac168.tar.bz2 |
2010-09-22 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Add
idata to orphan set.
* emultempl/pep.em: Likewise.
* scripttempl/armcoff.sc: Separate idata
and add __IAT_start__ and __IAT_end__ labels.
* scripttempl/pe.sc: Likewise.
* scripttempl/pep.sc: Likewise.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/armcoff.sc | 27 | ||||
-rw-r--r-- | ld/scripttempl/pe.sc | 17 | ||||
-rw-r--r-- | ld/scripttempl/pep.sc | 17 |
3 files changed, 50 insertions, 11 deletions
diff --git a/ld/scripttempl/armcoff.sc b/ld/scripttempl/armcoff.sc index ebc019a..cefd6eb 100644 --- a/ld/scripttempl/armcoff.sc +++ b/ld/scripttempl/armcoff.sc @@ -17,7 +17,22 @@ DTOR='.dtor : { *(SORT(.dtors.*)) *(.dtor) }' - +if test "${RELOCATING}"; then + R_IDATA234=' + 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)' + R_IDATA5='SORT(*)(.idata$5)' + R_IDATA67=' + SORT(*)(.idata$6) + SORT(*)(.idata$7)' +else + R_IDATA234= + R_IDATA5= + R_IDATA67= +fi cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}") ${LIB_SEARCH_DIRS} @@ -60,6 +75,16 @@ SECTIONS } ${CONSTRUCTING+${RELOCATING-$CTOR}} ${CONSTRUCTING+${RELOCATING-$DTOR}} + .idata ${RELOCATING+BLOCK(__section_alignment__)} : + { + /* This cannot currently be handled with grouped sections. + See pep.em:sort_sections. */ + ${R_IDATA234} + ${RELOCATING+__IAT_start__ = .;} + ${R_IDATA5} + ${RELOCATING+__IAT_end__ = .;} + ${R_IDATA67} + } .bss ${RELOCATING+ ALIGN(0x8)} : { ${RELOCATING+ __bss_start__ = . ;} diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index f3cbe25..e178fce 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -23,13 +23,14 @@ if test "${RELOCATING}"; then R_RDATA='*(.rdata) *(SORT(.rdata$*))' fi - R_IDATA=' + R_IDATA234=' 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$4)' + R_IDATA5='SORT(*)(.idata$5)' + R_IDATA67=' SORT(*)(.idata$6) SORT(*)(.idata$7)' R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */' @@ -46,7 +47,9 @@ else R_TEXT= R_DATA= R_RDATA='*(.rdata)' - R_IDATA= + R_IDATA234= + R_IDATA5= + R_IDATA67= R_CRT= R_RSRC= fi @@ -147,7 +150,11 @@ SECTIONS { /* This cannot currently be handled with grouped sections. See pe.em:sort_sections. */ - ${R_IDATA} + ${R_IDATA234} + ${RELOCATING+__IAT_start__ = .;} + ${R_IDATA5} + ${RELOCATING+__IAT_end__ = .;} + ${R_IDATA67} } .CRT ${RELOCATING+BLOCK(__section_alignment__)} : { diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index 75abc9f..3682766 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -23,13 +23,14 @@ if test "${RELOCATING}"; then R_RDATA='*(.rdata) *(SORT(.rdata$*))' fi - R_IDATA=' + R_IDATA234=' 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$4)' + R_IDATA5='SORT(*)(.idata$5)' + R_IDATA67=' SORT(*)(.idata$6) SORT(*)(.idata$7)' R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */' @@ -46,7 +47,9 @@ else R_TEXT= R_DATA= R_RDATA='*(.rdata)' - R_IDATA= + R_IDATA234= + R_IDATA5= + R_IDATA67= R_CRT= R_RSRC= fi @@ -153,7 +156,11 @@ SECTIONS { /* This cannot currently be handled with grouped sections. See pep.em:sort_sections. */ - ${R_IDATA} + ${R_IDATA234} + ${RELOCATING+__IAT_start__ = .;} + ${R_IDATA5} + ${RELOCATING+__IAT_end__ = .;} + ${R_IDATA67} } .CRT ${RELOCATING+BLOCK(__section_alignment__)} : { |