[binutils-gdb] ld: Move Solaris/sparcv9 TEXT_START_ADDR to elf64_sparc_sol2.sh

Rainer Orth ro@sourceware.org
Sun Aug 31 10:15:06 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dde82ebef9465e24f970020af7dc7b0a49cfda41

commit dde82ebef9465e24f970020af7dc7b0a49cfda41
Author: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Date:   Sun Aug 31 12:14:36 2025 +0200

    ld: Move Solaris/sparcv9 TEXT_START_ADDR to elf64_sparc_sol2.sh
    
    While looking at the Solaris versions of the program header p_vaddr and
    p_align values of the text and data segments, I noticed that the
    Solaris/sparcv9 version of TEXT_START_ADDR is defined in a shared file.
    Since there's a Solaris/sparcv9 specific file now
    (ld/emulparams/elf64_sparc_sol2.sh), it seems cleaner to move it there.
    
    Tested on {sparcv9,sparc}-sun-solaris2.11 and
    {sparc64,sparc}-unknown-linux-gnu.
    
    2025-07-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
    
            ld:
            * emulparams/elf64_sparc.sh (TEXT_START_ADDR): Move ...
            * emulparams/elf64_sparc_sol2.sh (TEXT_START_ADDR): ... here.

Diff:
---
 ld/ChangeLog                      |  5 +++++
 ld/emulparams/elf64_sparc.sh      | 10 +---------
 ld/emulparams/elf64_sparc_sol2.sh |  1 +
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 175aea6a7a6..cefb1000826 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2025-08-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+	* emulparams/elf64_sparc.sh (TEXT_START_ADDR): Move ...
+	* emulparams/elf64_sparc_sol2.sh (TEXT_START_ADDR): ... here.
+
 2025-08-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
 	* testsuite/ld-shared/shared.exp (shared (non PIC)): Update
diff --git a/ld/emulparams/elf64_sparc.sh b/ld/emulparams/elf64_sparc.sh
index 8ae29ad78c0..afbf2e6a475 100644
--- a/ld/emulparams/elf64_sparc.sh
+++ b/ld/emulparams/elf64_sparc.sh
@@ -12,15 +12,7 @@ GENERATE_SHLIB_SCRIPT=yes
 GENERATE_PIE_SCRIPT=yes
 NOP=0x01000000
 NO_SMALL_DATA=yes
-
-case "$target" in
-  sparc*-solaris*)
-    TEXT_START_ADDR=0x100000000
-    ;;
-  *)
-    TEXT_START_ADDR=0x100000
-    ;;
-esac
+TEXT_START_ADDR=0x100000
 
 # Treat a host that matches the target with the possible exception of "64"
 # and "v7", "v8", "v9" in the name as if it were native.
diff --git a/ld/emulparams/elf64_sparc_sol2.sh b/ld/emulparams/elf64_sparc_sol2.sh
index b32c5be6949..e17f7873e64 100644
--- a/ld/emulparams/elf64_sparc_sol2.sh
+++ b/ld/emulparams/elf64_sparc_sol2.sh
@@ -1,4 +1,5 @@
 source_sh ${srcdir}/emulparams/elf64_sparc.sh
 source_sh ${srcdir}/emulparams/solaris2.sh
+TEXT_START_ADDR=0x100000000
 EXTRA_EM_FILE=solaris2
 OUTPUT_FORMAT="elf64-sparc-sol2"


More information about the Binutils-cvs mailing list