mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
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 <nickc@redhat.com> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
34 lines
1.0 KiB
Scala
34 lines
1.0 KiB
Scala
# Copyright (C) 2014-2024 Free Software Foundation, Inc.
|
|
#
|
|
# Copying and distribution of this file, with or without modification,
|
|
# are permitted in any medium without royalty provided the copyright
|
|
# notice and this notice are preserved.
|
|
|
|
# This script fragment gathers together some of the more miscellaneous
|
|
# sections that might appear in a linker's input. It can be invoked
|
|
# with a single parameter which is the memory region into which loadable
|
|
# sections should be placed. If the parameter is missing, no memory
|
|
# section placement is used.
|
|
|
|
if test "x$2" = "x" ;
|
|
then
|
|
REGION=""
|
|
else
|
|
REGION="> $2"
|
|
fi
|
|
|
|
cat <<EOF
|
|
/* Stabs debugging sections. */
|
|
.stab 0 : { *(.stab) }
|
|
.stabstr 0 : { *(.stabstr) }
|
|
.stab.excl 0 : { *(.stab.excl) }
|
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
.stab.index 0 : { *(.stab.index) }
|
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
|
|
.comment 0 (INFO) : { *(.comment); LINKER_VERSION; }
|
|
|
|
.gnu.build.attributes : { *(.gnu.build.attributes${RELOCATING+ .gnu.build.attributes.*}) }
|
|
|
|
EOF
|