Skip to content

Commit

Permalink
!toolchain/ld: change arm emul
Browse files Browse the repository at this point in the history
Previously we defined armelf_phoenix emulation that wasn't used. This
patch fixes the configuration to use it.
Additionally support in armelf_phoenix emulation for shared libs is
added.

JIRA: RTOS-911
  • Loading branch information
badochov committed Oct 2, 2024
1 parent 9270dc4 commit 2dc9570
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions toolchain/binutils-2.34-03-arm-phoenix-emul-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/ld/configure.tgt b/ld/configure.tgt
index f937f78b876..989b3753eb3 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -198,7 +198,10 @@ 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..ceb1edc42e6 100644
--- a/ld/emulparams/armelf_phoenix.sh
+++ b/ld/emulparams/armelf_phoenix.sh
@@ -1,24 +1,8 @@
-ARCH=arm
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-littlearm"
-BIG_OUTPUT_FORMAT="elf32-bigarm"
-LITTLE_OUTPUT_FORMAT="elf32-littlearm"
+source_sh ${srcdir}/emulparams/armelf.sh
MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
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

0 comments on commit 2dc9570

Please sign in to comment.