2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/bfd/config.bfd binutils-2.37.serenity/bfd/config.bfd
|
|
|
|
--- binutils-2.37/bfd/config.bfd 2021-07-08 13:37:19.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/bfd/config.bfd 2021-07-28 18:03:58.972705458 +0200
|
|
|
|
@@ -223,7 +223,24 @@
|
2021-04-27 21:32:13 +03:00
|
|
|
|
2019-12-18 00:42:42 +03:00
|
|
|
case "${targ}" in
|
2019-04-05 04:02:52 +03:00
|
|
|
# START OF targmatch.h
|
|
|
|
+
|
|
|
|
+ i[3-7]86-*-serenity*)
|
|
|
|
+ targ_defvec=i386_elf32_vec
|
|
|
|
+ targ_selvecs=
|
|
|
|
+ ;;
|
2021-04-27 21:32:13 +03:00
|
|
|
#ifdef BFD64
|
2019-04-05 04:02:52 +03:00
|
|
|
+ x86_64-*-serenity*)
|
|
|
|
+ targ_defvec=x86_64_elf64_vec
|
|
|
|
+ targ_selvecs=i386_elf32_vec
|
|
|
|
+ want64=true
|
|
|
|
+ ;;
|
2019-12-18 00:42:42 +03:00
|
|
|
+
|
|
|
|
+ arm-*-serenity*)
|
|
|
|
+ targ_defvec=arm_elf32_le_vec
|
|
|
|
+ targ_selvecs=
|
|
|
|
+ targ64_selvecs=
|
|
|
|
+ ;;
|
|
|
|
+
|
2019-04-05 04:02:52 +03:00
|
|
|
aarch64-*-darwin*)
|
|
|
|
targ_defvec=aarch64_mach_o_vec
|
2019-12-18 00:42:42 +03:00
|
|
|
targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/config.sub binutils-2.37.serenity/config.sub
|
|
|
|
--- binutils-2.37/config.sub 2021-07-08 13:37:19.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/config.sub 2021-07-28 18:03:58.972705458 +0200
|
|
|
|
@@ -1700,6 +1700,7 @@
|
2021-04-11 07:22:15 +03:00
|
|
|
# The portable systems comes first.
|
2019-04-05 04:02:52 +03:00
|
|
|
# Each alternative MUST end in a * to match a version number.
|
2021-04-11 07:22:15 +03:00
|
|
|
gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
|
|
|
|
+ | serenity* \
|
|
|
|
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
|
2019-04-05 04:02:52 +03:00
|
|
|
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
|
2021-04-11 07:22:15 +03:00
|
|
|
| sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/gas/configure.tgt binutils-2.37.serenity/gas/configure.tgt
|
|
|
|
--- binutils-2.37/gas/configure.tgt 2021-07-08 13:37:19.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/gas/configure.tgt 2021-07-28 18:03:58.972705458 +0200
|
2021-04-27 21:32:13 +03:00
|
|
|
@@ -123,6 +123,8 @@
|
2019-04-05 04:02:52 +03:00
|
|
|
generic_target=${cpu_type}-$vendor-$os
|
|
|
|
# Note: This table is alpha-sorted, please try to keep it that way.
|
|
|
|
case ${generic_target} in
|
|
|
|
+ i386-*-serenity*) fmt=elf;;
|
2019-12-18 00:42:42 +03:00
|
|
|
+ arm-*-serenity*) fmt=elf;;
|
2019-04-05 04:02:52 +03:00
|
|
|
aarch64*-*-elf*) fmt=elf;;
|
|
|
|
aarch64*-*-fuchsia*) fmt=elf;;
|
2021-07-28 19:05:46 +03:00
|
|
|
aarch64*-*-genode*) fmt=elf;;
|
|
|
|
diff -Naur binutils-2.37/ld/configure.tgt binutils-2.37.serenity/ld/configure.tgt
|
|
|
|
--- binutils-2.37/ld/configure.tgt 2021-07-08 13:37:20.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/ld/configure.tgt 2021-07-28 18:03:58.972705458 +0200
|
2021-04-27 21:32:13 +03:00
|
|
|
@@ -43,6 +43,19 @@
|
2021-04-11 07:22:15 +03:00
|
|
|
# Please try to keep this table more or less in alphabetic order - it
|
|
|
|
# makes it much easier to lookup a specific archictecture.
|
2019-04-05 04:02:52 +03:00
|
|
|
case "${targ}" in
|
|
|
|
+i[3-7]86-*-serenity*)
|
|
|
|
+ targ_emul=elf_i386_serenity
|
|
|
|
+ targ_extra_emuls=elf_i386
|
|
|
|
+ targ64_extra_emuls="elf_x86_64_serenity elf_x86_64"
|
|
|
|
+ ;;
|
|
|
|
+x86_64-*-serenity*)
|
|
|
|
+ targ_emul=elf_x86_64_serenity
|
|
|
|
+ targ_extra_emuls="elf_i386_serenity elf_x86_64 elf_i386"
|
2019-12-18 00:42:42 +03:00
|
|
|
+ ;;
|
|
|
|
+arm-*-serenity*)
|
|
|
|
+ targ_emul=armelf_serenity
|
|
|
|
+ targ_extra_emuls="armelf_serenity armelf"
|
2019-04-05 04:02:52 +03:00
|
|
|
+ ;;
|
|
|
|
aarch64_be-*-elf) targ_emul=aarch64elfb
|
2021-04-11 07:22:15 +03:00
|
|
|
targ_extra_emuls="aarch64elf aarch64elf32 aarch64elf32b armelfb armelf"
|
|
|
|
;;
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/ld/emulparams/armelf_serenity.sh binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh
|
|
|
|
--- binutils-2.37/ld/emulparams/armelf_serenity.sh 1970-01-01 01:00:00.000000000 +0100
|
|
|
|
+++ binutils-2.37.serenity/ld/emulparams/armelf_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
2019-12-18 00:42:42 +03:00
|
|
|
@@ -0,0 +1,7 @@
|
|
|
|
+. ${srcdir}/emulparams/armelf.sh
|
|
|
|
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
|
|
|
|
+TEXT_START_ADDR=0x00008000
|
|
|
|
+TARGET2_TYPE=got-rel
|
|
|
|
+
|
|
|
|
+unset STACK_ADDR
|
|
|
|
+unset EMBEDDED
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/ld/emulparams/elf_i386_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh
|
|
|
|
--- binutils-2.37/ld/emulparams/elf_i386_serenity.sh 1970-01-01 01:00:00.000000000 +0100
|
|
|
|
+++ binutils-2.37.serenity/ld/emulparams/elf_i386_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
2019-04-05 04:02:52 +03:00
|
|
|
@@ -0,0 +1,3 @@
|
|
|
|
+. ${srcdir}/emulparams/elf_i386.sh
|
|
|
|
+GENERATE_SHLIB_SCRIPT=yes
|
|
|
|
+GENERATE_PIE_SCRIPT=yes
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/ld/emulparams/elf_x86_64_serenity.sh binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh
|
|
|
|
--- binutils-2.37/ld/emulparams/elf_x86_64_serenity.sh 1970-01-01 01:00:00.000000000 +0100
|
|
|
|
+++ binutils-2.37.serenity/ld/emulparams/elf_x86_64_serenity.sh 2021-07-28 18:03:58.972705458 +0200
|
2019-04-05 04:02:52 +03:00
|
|
|
@@ -0,0 +1 @@
|
|
|
|
+. ${srcdir}/emulparams/elf_x86_64.sh
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/ld/Makefile.am binutils-2.37.serenity/ld/Makefile.am
|
|
|
|
--- binutils-2.37/ld/Makefile.am 2021-07-08 13:37:20.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/ld/Makefile.am 2021-07-28 18:03:58.972705458 +0200
|
2021-04-27 21:32:13 +03:00
|
|
|
@@ -174,6 +174,7 @@
|
|
|
|
earmelf_nbsd.c \
|
|
|
|
earmelf_phoenix.c \
|
|
|
|
earmelf_vxworks.c \
|
|
|
|
+ earmelf_serenity.c \
|
|
|
|
earmelfb.c \
|
|
|
|
earmelfb_fbsd.c \
|
|
|
|
earmelfb_fuchsia.c \
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/ld/Makefile.in binutils-2.37.serenity/ld/Makefile.in
|
|
|
|
--- binutils-2.37/ld/Makefile.in 2021-07-18 18:38:34.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/ld/Makefile.in 2021-07-28 18:03:58.972705458 +0200
|
|
|
|
@@ -664,6 +664,7 @@
|
2021-04-27 21:32:13 +03:00
|
|
|
earmelf_nbsd.c \
|
|
|
|
earmelf_phoenix.c \
|
|
|
|
earmelf_vxworks.c \
|
|
|
|
+ earmelf_serenity.c \
|
|
|
|
earmelfb.c \
|
|
|
|
earmelfb_fbsd.c \
|
|
|
|
earmelfb_fuchsia.c \
|
2021-07-28 19:05:46 +03:00
|
|
|
@@ -774,6 +775,7 @@
|
2021-04-27 21:32:13 +03:00
|
|
|
eelf_i386_vxworks.c \
|
|
|
|
eelf_iamcu.c \
|
|
|
|
eelf_s390.c \
|
|
|
|
+ eelf_i386_serenity.c \
|
|
|
|
eh8300elf.c \
|
|
|
|
eh8300elf_linux.c \
|
|
|
|
eh8300helf.c \
|
|
|
|
@@ -945,6 +947,7 @@
|
|
|
|
eelf_x86_64_cloudabi.c \
|
|
|
|
eelf_x86_64_fbsd.c \
|
|
|
|
eelf_x86_64_sol2.c \
|
|
|
|
+ eelf_x86_64_serenity.c \
|
|
|
|
ehppa64linux.c \
|
|
|
|
ei386pep.c \
|
|
|
|
emmo.c
|
2021-07-28 19:05:46 +03:00
|
|
|
diff -Naur binutils-2.37/libiberty/rust-demangle.c binutils-2.37.serenity/libiberty/rust-demangle.c
|
|
|
|
--- binutils-2.37/libiberty/rust-demangle.c 2021-07-15 16:19:46.000000000 +0200
|
|
|
|
+++ binutils-2.37.serenity/libiberty/rust-demangle.c 2021-07-28 18:14:23.231031885 +0200
|
|
|
|
@@ -75,10 +75,10 @@
|
|
|
|
int version;
|
|
|
|
|
|
|
|
/* Recursion depth. */
|
|
|
|
- uint recursion;
|
|
|
|
+ unsigned int recursion;
|
|
|
|
/* Maximum number of times demangle_path may be called recursively. */
|
|
|
|
#define RUST_MAX_RECURSION_COUNT 1024
|
|
|
|
-#define RUST_NO_RECURSION_LIMIT ((uint) -1)
|
|
|
|
+#define RUST_NO_RECURSION_LIMIT ((unsigned int) -1)
|
|
|
|
|
|
|
|
uint64_t bound_lifetime_depth;
|
|
|
|
};
|