diff options
Diffstat (limited to 'ld/scripttempl/armbpabi.sc')
-rw-r--r-- | ld/scripttempl/armbpabi.sc | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/ld/scripttempl/armbpabi.sc b/ld/scripttempl/armbpabi.sc index a12cd3d..8eed447 100644 --- a/ld/scripttempl/armbpabi.sc +++ b/ld/scripttempl/armbpabi.sc @@ -42,9 +42,9 @@ if test -z "${NO_SMALL_DATA}"; then { ${RELOCATING+PROVIDE (__sbss_start = .);} ${RELOCATING+PROVIDE (___sbss_start = .);} - *(.dynsbss) + ${RELOCATING+*(.dynsbss)} *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*}) - *(.scommon) + ${RELOCATING+*(.scommon)} ${RELOCATING+PROVIDE (__sbss_end = .);} ${RELOCATING+PROVIDE (___sbss_end = .);} }" @@ -154,17 +154,16 @@ cat <<EOF OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}") OUTPUT_ARCH(${OUTPUT_ARCH}) -${RELOCATING+ENTRY(${ENTRY})} - -${RELOCATING+${LIB_SEARCH_DIRS}} -${RELOCATING+/* Do we need any of these for elf? - __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */} -${RELOCATING+${EXECUTABLE_SYMBOLS}} -${RELOCATING+${INPUT_FILES}} -${RELOCATING- /* For some reason, the Solaris linker makes bad executables - if gld -r is used and the intermediate file has sections starting - at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld - bug. But for now assigning the zero vmas works. */} +EOF + +test -n "${RELOCATING}" && cat <<EOF +ENTRY(${ENTRY}) + +${LIB_SEARCH_DIRS} +/* Do we need any of these for elf? + __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */ +${EXECUTABLE_SYMBOLS} +${INPUT_FILES} /* ARM's proprietary toolchain generate these symbols to match the start and end of particular sections of the image. SymbianOS uses these @@ -187,6 +186,9 @@ VERSION }; } +EOF + +cat <<EOF SECTIONS { /* Read-only sections, merged into text segment: */ @@ -254,7 +256,7 @@ cat <<EOF ${OTHER_READONLY_SECTIONS} .eh_frame_hdr : { *(.eh_frame_hdr) } .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table${RELOCATING+ .gcc_except_table.*})) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ @@ -264,7 +266,7 @@ cat <<EOF /* Exception handling */ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) } + .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table${RELOCATING+ .gcc_except_table.*})) } /* Thread Local Storage sections */ .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } @@ -303,13 +305,13 @@ cat <<EOF ${BSS_PLT+${PLT}} .bss ${RELOCATING-0} : { - *(.dynbss) + ${RELOCATING+*(.dynbss)} *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*}) - *(COMMON) + ${RELOCATING+*(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ - ${RELOCATING+. = ALIGN(${ALIGNMENT});} + . = ALIGN(${ALIGNMENT});} } ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+. = ALIGN(${ALIGNMENT});} |