* [binutils-gdb] Re: Align linkerscript symbols according to ABI
@ 2023-07-12 1:36 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-07-12 1:36 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9596ca8194b0b829f7392f5da773026b7aa293fd
commit 9596ca8194b0b829f7392f5da773026b7aa293fd
Author: Alan Modra <amodra@gmail.com>
Date: Fri Jul 7 13:33:56 2023 +0930
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.
Diff:
---
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 <<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+. = .;}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-12 1:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-12 1:36 [binutils-gdb] Re: Align linkerscript symbols according to ABI Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).