From 9596ca8194b0b829f7392f5da773026b7aa293fd Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 7 Jul 2023 13:33:56 +0930 Subject: [PATCH] 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. --- ld/scripttempl/elf.sc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 9e95e6b4162..bfd8b5ed4b3 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 <