diff options
Diffstat (limited to 'ld/scripttempl/armcoff.sc')
-rw-r--r-- | ld/scripttempl/armcoff.sc | 27 |
1 files changed, 26 insertions, 1 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__ = . ;} |