mirror of
https://git.yoctoproject.org/poky
synced 2026-07-06 11:13:41 +02:00
Added support for SFrame stack tracing with ELF binaries on x86 and AArch64 architectures. Support for various new RISC-V extensions Support for most Armv9.6 extensions. Detailed release notes are here [1] [1] https://lists.gnu.org/archive/html/info-gnu/2025-07/msg00009.html (From OE-Core rev: a03cc7e39ea182d4818bc6a2b0fe7d355e5c44b3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
76 lines
2.6 KiB
Diff
76 lines
2.6 KiB
Diff
From 61cfb723b5fba70c823a9b486a9e4f30b28a8f53 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Mon, 2 Mar 2015 01:58:54 +0000
|
|
Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
|
|
|
|
This patch will modify the ELF linker scripts so that the crosssdk
|
|
linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
|
|
will be relocated, at SDK install time, the interpreter path can be easily
|
|
changed by the relocating script.
|
|
|
|
generate larger .interp section for gold linker as well
|
|
|
|
Upstream-Status: Inappropriate [SDK specific]
|
|
|
|
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
gold/layout.cc | 2 +-
|
|
ld/genscripts.sh | 3 +++
|
|
ld/scripttempl/elf.sc | 4 ++--
|
|
3 files changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/gold/layout.cc b/gold/layout.cc
|
|
index f690c67618e..9ded8368482 100644
|
|
--- a/gold/layout.cc
|
|
+++ b/gold/layout.cc
|
|
@@ -5102,7 +5102,7 @@ Layout::create_interp(const Target* target)
|
|
gold_assert(interp != NULL);
|
|
}
|
|
|
|
- size_t len = strlen(interp) + 1;
|
|
+ size_t len = 4096;
|
|
|
|
Output_section_data* odata = new Output_data_const(interp, len, 1);
|
|
|
|
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
|
|
index 77a1fb465ad..5b51c23e141 100755
|
|
--- a/ld/genscripts.sh
|
|
+++ b/ld/genscripts.sh
|
|
@@ -315,6 +315,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
|
|
LD_FLAG=r
|
|
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
|
|
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
|
+PARTIAL_LINKING=" "
|
|
( echo "/* Script for -r */"
|
|
source_sh ${CUSTOMIZER_SCRIPT}
|
|
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
|
@@ -323,10 +324,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
|
LD_FLAG=u
|
|
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
|
|
CONSTRUCTING=" "
|
|
+PARTIAL_LINKING=" "
|
|
( echo "/* Script for -Ur */"
|
|
source_sh ${CUSTOMIZER_SCRIPT}
|
|
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
|
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
|
|
+unset PARTIAL_LINKING
|
|
|
|
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
|
|
RELOCATING=" "
|
|
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
|
|
index be8d19fcf11..26ecd6dff80 100644
|
|
--- a/ld/scripttempl/elf.sc
|
|
+++ b/ld/scripttempl/elf.sc
|
|
@@ -197,8 +197,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
|
|
fi
|
|
fi
|
|
|
|
-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
|
|
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
|
|
+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then
|
|
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
|
|
fi
|
|
|
|
if test -z "$PLT"; then
|