aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl/elfxtensa.sc
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl/elfxtensa.sc')
-rw-r--r--ld/scripttempl/elfxtensa.sc26
1 files changed, 13 insertions, 13 deletions
diff --git a/ld/scripttempl/elfxtensa.sc b/ld/scripttempl/elfxtensa.sc
index 7350d2d..63448e1 100644
--- a/ld/scripttempl/elfxtensa.sc
+++ b/ld/scripttempl/elfxtensa.sc
@@ -136,7 +136,7 @@ fi
test -n "${DATA_PLT-${BSS_PLT-text}}" && TEXT_PLT=yes
if test -z "$GOT"; then
if test -z "$SEPARATE_GOTPLT"; then
- GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
+ GOT=".got ${RELOCATING-0} : {${RELOCATING+ *(.got.plt)} *(.got) }"
else
GOT=".got ${RELOCATING-0} : { *(.got) }"
GOTPLT=".got.plt ${RELOCATING-0} : { *(.got.plt) }"
@@ -410,7 +410,7 @@ cat <<EOF
${TINY_READONLY_SECTION}
.text ${RELOCATING-0} :
{
- *(.got.plt* .plt*)
+ ${RELOCATING+*(.got.plt* .plt*)}
${RELOCATING+${INIT_START}}
${RELOCATING+KEEP (*(.init.literal))}
@@ -442,7 +442,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 { *(.gcc_except_table .gcc_except_table.*) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.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. */
@@ -452,7 +452,7 @@ cat <<EOF
/* Exception handling */
.eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
- .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table${RELOCATING+ .gcc_except_table.*}) }
/* Thread Local Storage sections */
.tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
@@ -506,15 +506,15 @@ cat <<EOF
${BSS_PLT+${PLT}}
.bss ${RELOCATING-0} :
{
- *(.dynbss)
- *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
- *(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.
- FIXME: Why do we need it? When there is no .bss section, we don't
- pad the .data section. */
- ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
+ ${RELOCATING+*(.dynbss)}
+ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
+ ${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.
+ FIXME: Why do we need it? When there is no .bss section, we do not
+ pad the .data section. */
+ . = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}
${OTHER_BSS_SECTIONS}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}