From 023e60ced0c850aa32ac4a948877d25592d44401 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 7 Nov 2024 12:39:19 +0800 Subject: [PATCH] ld: Move note sections after .rodata section Move note sections after .rodata section so that note sections are placed in the same PT_LOAD segment together with .rodata section, instead of a separate PT_LOAD segment. PR ld/32341 * scripttempl/misc-sections.sc: Move note sections to ... * scripttempl/elf.sc: Here, after .rodata section. * testsuite/ld-elf/pr32341.d: New file. * testsuite/ld-elf/pr32341.s: Likewise. Co-Authored-By: Nick Clifton Signed-off-by: H.J. Lu --- ld/scripttempl/elf.sc | 11 +++++++++++ ld/scripttempl/misc-sections.sc | 11 ----------- ld/testsuite/ld-elf/pr32341.d | 15 +++++++++++++++ ld/testsuite/ld-elf/pr32341.s | 26 ++++++++++++++++++++++++++ 4 files changed, 52 insertions(+), 11 deletions(-) create mode 100644 ld/testsuite/ld-elf/pr32341.d create mode 100644 ld/testsuite/ld-elf/pr32341.s diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index 6ef93dcc906..84b433256a6 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -668,6 +668,17 @@ cat <