mirror of
https://review.haiku-os.org/buildtools
synced 2024-11-23 07:18:49 +01:00
binutils: ld: Set ELF interpreter to "/system/runtime_loader"
For x86_64 this includes defining a new linker emulation, "elf_x86_64_haiku" (to match the existing "elf_i386_haiku") and updating gcc accordingly. Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
bfa8159478
commit
0b1666ccbe
@ -789,6 +789,7 @@ ALL_64_EMULATION_SOURCES = \
|
||||
eelf_k1om_fbsd.c \
|
||||
eelf_x86_64.c \
|
||||
eelf_x86_64_fbsd.c \
|
||||
eelf_x86_64_haiku.c \
|
||||
eelf_x86_64_nacl.c \
|
||||
eelf_x86_64_sol2.c \
|
||||
ehppa64linux.c \
|
||||
@ -3376,6 +3377,10 @@ eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_x86_64_haiku.c: $(srcdir)/emulparams/elf_x86_64_haiku.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
|
||||
|
||||
eelf_x86_64_nacl.c: $(srcdir)/emulparams/elf_x86_64_nacl.sh \
|
||||
$(srcdir)/emulparams/elf_x86_64.sh \
|
||||
$(srcdir)/emulparams/elf_nacl.sh \
|
||||
|
@ -338,8 +338,8 @@ i[3-7]86-*-interix*) targ_emul=i386pe_posix;
|
||||
i[3-7]86-*-beospe*) targ_emul=i386beos ;;
|
||||
i[3-7]86-*-beos*) targ_emul=elf_i386_be ;;
|
||||
i[3-7]86-*-haiku*) targ_emul=elf_i386_haiku ;;
|
||||
x86_64-*-haiku*) targ_emul=elf_x86_64
|
||||
targ_extra_emuls=elf_i386_haiku ;;
|
||||
x86_64-*-haiku*) targ_emul=elf_x86_64_haiku
|
||||
targ_extra_emuls="elf_x86_64 elf_i386_haiku" ;;
|
||||
i[3-7]86-*-vxworks*) targ_emul=elf_i386_vxworks ;;
|
||||
i[3-7]86-*-chaos) targ_emul=elf_i386_chaos
|
||||
;;
|
||||
|
@ -22,3 +22,5 @@ TARGET2_TYPE=got-rel
|
||||
|
||||
# ARM does not support .s* sections.
|
||||
NO_SMALL_DATA=yes
|
||||
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
||||
|
@ -1,4 +1,5 @@
|
||||
. ${srcdir}/emulparams/elf32ppc.sh
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
||||
TEXT_START_ADDR=0x200000
|
||||
MAXPAGESIZE=0x1000
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
|
1
binutils/ld/emulparams/elf_haiku.sh
Normal file
1
binutils/ld/emulparams/elf_haiku.sh
Normal file
@ -0,0 +1 @@
|
||||
ELF_INTERPRETER_NAME=\"/system/runtime_loader\"
|
@ -9,3 +9,4 @@ NOP=0x90909090
|
||||
TEMPLATE_NAME=elf32
|
||||
GENERATE_SHLIB_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
||||
|
@ -1,2 +1,3 @@
|
||||
. ${srcdir}/emulparams/elf32lmip.sh
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
||||
|
||||
|
2
binutils/ld/emulparams/elf_x86_64_haiku.sh
Normal file
2
binutils/ld/emulparams/elf_x86_64_haiku.sh
Normal file
@ -0,0 +1,2 @@
|
||||
. ${srcdir}/emulparams/elf_x86_64.sh
|
||||
. ${srcdir}/emulparams/elf_haiku.sh
|
@ -65,7 +65,7 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
"%{" SPEC_64 ":-m elf_x86_64} %{" SPEC_32 ":-m elf_i386_haiku} \
|
||||
"%{" SPEC_64 ":-m elf_x86_64_haiku} %{" SPEC_32 ":-m elf_i386_haiku} \
|
||||
%{shared|r|pie|fno-pic|fno-PIC|fno-pie|fno-PIE:; \
|
||||
:-pie --allow-shlib-undefined --export-dynamic} %{shared:-shared} \
|
||||
%{nostart|shared:-e 0;:-no-undefined}"
|
||||
|
Loading…
Reference in New Issue
Block a user