diff options
author | Alan Modra <amodra@gmail.com> | 2023-07-07 13:33:56 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-07-12 09:31:40 +0930 |
commit | 9596ca8194b0b829f7392f5da773026b7aa293fd (patch) | |
tree | 7dd2e40233d051a65fdd7ba2ac3075b80f1f169c /ld/scripttempl | |
parent | 1052fb3ecb1ae46bcf22634c48739c12e585196a (diff) | |
download | gdb-9596ca8194b0b829f7392f5da773026b7aa293fd.zip gdb-9596ca8194b0b829f7392f5da773026b7aa293fd.tar.gz gdb-9596ca8194b0b829f7392f5da773026b7aa293fd.tar.bz2 |
Re: Align linkerscript symbols according to ABI
Align dot before symbols defined outside of output sections. Before _end
is already aligned.
* scripttempl/elf.sc (def_symbol): Tidy excess space.
(_edata): Align before emitting symbol when SYMBOL_ABI_ALIGNMENT.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 9e95e6b..bfd8b5e 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -171,7 +171,7 @@ fi def_symbol() { if [ -z "${SYMBOL_ABI_ALIGNMENT}" ]; then - echo "${USER_LABEL_PREFIX}$1 = . " + echo "${USER_LABEL_PREFIX}$1 = ." else echo "${USER_LABEL_PREFIX}$1 = ALIGN(${SYMBOL_ABI_ALIGNMENT})" fi @@ -688,6 +688,7 @@ cat <<EOF ${SDATA_GOT+${OTHER_GOT_SECTIONS}} ${DATA_SDATA-${SDATA}} ${DATA_SDATA-${OTHER_SDATA_SECTIONS}} + ${RELOCATING+${SYMBOL_ABI_ALIGNMENT+. = ALIGN(${SYMBOL_ABI_ALIGNMENT});}} ${RELOCATING+${DATA_END_SYMBOLS-${CREATE_SHLIB+PROVIDE (}$(def_symbol "_edata")${CREATE_SHLIB+)}; PROVIDE ($(def_symbol "edata"));}} ${PERSISTENT} ${RELOCATING+. = .;} |