[binutils-gdb] ld: use armelf_phoenix emul for arm-*-phoenix targets

Jan Beulich via Binutils-cvs <[email protected]>
Newsgroups gmane.comp.gnu.binutils.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3038dd43ffd7b13c73ee0a35b0f30701a038d9bb

commit 3038dd43ffd7b13c73ee0a35b0f30701a038d9bb
Author: Michał Lach <[email protected]>
Date:   Fri Mar 20 14:24:27 2026 +0100

    ld: use armelf_phoenix emul for arm-*-phoenix targets
    
    armelf_phoenix emulation includes redundant definitions which were
    previously in defined armelf.
    
    Additionally, armelf_phoenix was unused before this commit in upstream
    binutils, and we've been using it for some time already downstream.
    
    Co-authored-by: Hubert Badocha <[email protected]>
    Signed-off-by: Michal Lach <[email protected]>

Diff:
---
 ld/configure.tgt                |  4 +++-
 ld/emulparams/armelf_phoenix.sh | 23 +++--------------------
 2 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/ld/configure.tgt b/ld/configure.tgt
index 808581566a7..8201599073b 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -195,7 +195,9 @@ arm-*-netbsd*)	targ_emul=armelf_nbsd;
 			;;
 arm-*-nto*)		targ_emul=armnto
 			;;
-arm-*-phoenix*)		targ_emul=armelf
+arm-*-phoenix*)		targ_emul=armelf_phoenix
+			targ_extra_emuls="armelf"
+			targ_extra_libpath=$targ_extra_emuls
 			;;
 armeb-*-elf | armeb-*-eabi*)
 			targ_emul=armelfb
diff --git a/ld/emulparams/armelf_phoenix.sh b/ld/emulparams/armelf_phoenix.sh
index 63c35a8290b..0957c745490 100644
--- a/ld/emulparams/armelf_phoenix.sh
+++ b/ld/emulparams/armelf_phoenix.sh
@@ -1,24 +1,7 @@
-ARCH=arm
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+source_sh ${srcdir}/emulparams/armelf.sh
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-TEMPLATE_NAME=elf
-EXTRA_EM_FILE=armelf
-GENERATE_SHLIB_SCRIPT=yes
-GENERATE_PIE_SCRIPT=yes
-
-DATA_START_SYMBOLS='PROVIDE (__data_start = .);';
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)'
-OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};"
-OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};"
-OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};"
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
-
 TEXT_START_ADDR=0x00001000
 TARGET2_TYPE=got-rel
 
-# ARM does not support .s* sections.
-NO_SMALL_DATA=yes
+unset STACK_ADDR
+unset EMBEDDED
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.