diff options
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/pe.sc | 15 | ||||
-rw-r--r-- | ld/scripttempl/pep.sc | 15 |
2 files changed, 22 insertions, 8 deletions
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc index c9eb16f..8561446 100644 --- a/ld/scripttempl/pe.sc +++ b/ld/scripttempl/pe.sc @@ -13,8 +13,16 @@ fi # use grouped sections instead). if test "${RELOCATING}"; then R_TEXT='*(SORT(.text$*))' - R_DATA='*(SORT(.data$*))' - R_RDATA='*(SORT(.rdata$*))' + if test "x$LD_FLAG" = "xauto_import" ; then + R_DATA='*(SORT(.data$*)) + *(.rdata) + *(SORT(.rdata$*))' + R_RDATA='' + else + R_DATA='*(SORT(.data$*))' + R_RDATA='*(.rdata) + *(SORT(.rdata$*))' + fi R_IDATA=' SORT(*)(.idata$2) SORT(*)(.idata$3) @@ -37,7 +45,7 @@ if test "${RELOCATING}"; then else R_TEXT= R_DATA= - R_RDATA= + R_RDATA='*(.rdata)' R_IDATA= R_CRT= R_RSRC= @@ -93,7 +101,6 @@ SECTIONS .rdata ${RELOCATING+BLOCK(__section_alignment__)} : { - *(.rdata) ${R_RDATA} ${RELOCATING+ *(.eh_frame)} ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;} diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc index b7f0c1b..e571bd3 100644 --- a/ld/scripttempl/pep.sc +++ b/ld/scripttempl/pep.sc @@ -13,8 +13,16 @@ fi # use grouped sections instead). if test "${RELOCATING}"; then R_TEXT='*(SORT(.text$*))' - R_DATA='*(SORT(.data$*))' - R_RDATA='*(SORT(.rdata$*))' + if test "x$LD_FLAG" = "xauto_import" ; then + R_DATA='*(SORT(.data$*)) + *(.rdata) + *(SORT(.rdata$*))' + R_RDATA='' + else + R_DATA='*(SORT(.data$*))' + R_RDATA='*(.rdata) + *(SORT(.rdata$*))' + fi R_IDATA=' SORT(*)(.idata$2) SORT(*)(.idata$3) @@ -37,7 +45,7 @@ if test "${RELOCATING}"; then else R_TEXT= R_DATA= - R_RDATA= + R_RDATA='*(.rdata)' R_IDATA= R_CRT= R_RSRC= @@ -93,7 +101,6 @@ SECTIONS .rdata ${RELOCATING+BLOCK(__section_alignment__)} : { - *(.rdata) ${R_RDATA} ${RELOCATING+ *(.eh_frame)} ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;} |