aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-07-20 14:29:21 +0930
committerAlan Modra <amodra@gmail.com>2015-07-20 14:29:21 +0930
commite474ab13ec653d5d78489467f90669689191b31a (patch)
tree11f6d9ff1db33f7fe7e6c7e5ebd9cd78e0bb4727 /ld/scripttempl
parent5e63e4525526ddf01fcbde7d7517560c492a0884 (diff)
downloadgdb-e474ab13ec653d5d78489467f90669689191b31a.zip
gdb-e474ab13ec653d5d78489467f90669689191b31a.tar.gz
gdb-e474ab13ec653d5d78489467f90669689191b31a.tar.bz2
ALIGN change affects standard scripts
a2c59f28 changed the way the unary ALIGN behaved inside output sections, resulting in cris-elf testsuite regressions. This patch pads out .bss in the same manner as it was prior to the ALIGN change. * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot. * ldexp.c (is_align_conditional): Handle binary ALIGN. (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to dot inside output sections. Handle absolute expressions.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index c6dfe5d..5a15a68 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -240,7 +240,7 @@ test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
.ldata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
{
*(.ldata${RELOCATING+ .ldata.* .gnu.linkonce.l.*})
- ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
+ ${RELOCATING+. = ALIGN (ABSOLUTE (.), . != 0 ? ${ALIGNMENT} : 1);}
}"
if test "${ENABLE_INITFINI_ARRAY}" = "yes"; then
SORT_INIT_ARRAY="KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))"
@@ -628,7 +628,7 @@ cat <<EOF
.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+. = ALIGN (ABSOLUTE (.), . != 0 ? ${ALIGNMENT} : 1);}
}
${OTHER_BSS_SECTIONS}
${LARGE_BSS_AFTER_BSS+${LARGE_BSS}}