[PATCH v2 1/4] ld: use armelf_phoenix emul for arm-*-phoenix targets

Michał Lach michal.lach@phoenix-rtos.com
Tue Mar 10 19:02:58 GMT 2026


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 <hubert.badocha@phoenix-rtos.com>
Signed-off-by: Michal Lach <michal.lach@phoenix-rtos.com>
---
 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 3e158913b89..f65601e1b2e 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
-- 
2.53.0



More information about the Binutils mailing list