diff --git a/CMakeLists.txt b/CMakeLists.txt index 1efa7f0..b8765ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -301,6 +301,7 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi patch -d -p3 -t -N < ${PROJECT_SOURCE_DIR}/patches/binutils/0001-vita.patch && patch -d -p1 -t -N < ${PROJECT_SOURCE_DIR}/patches/binutils/0002-fix-broken-reloc.patch && patch -d -p3 -t -N < ${PROJECT_SOURCE_DIR}/patches/binutils/0003-fix-elf-vaddr.patch + && patch -d -p3 -t -N < ${PROJECT_SOURCE_DIR}/patches/binutils/0004-fix-interworking-veneers.patch CONFIGURE_COMMAND ${compiler_flags} ${wrapper_command} /configure --build=${build_native} --host=${toolchain_host} diff --git a/patches/binutils/0002-fix-broken-reloc.patch b/patches/binutils/0002-fix-broken-reloc.patch index e62e71e..07ad9c3 100644 --- a/patches/binutils/0002-fix-broken-reloc.patch +++ b/patches/binutils/0002-fix-broken-reloc.patch @@ -4,7 +4,7 @@ diff -urN binutils-2.31.1.orig/bfd/elf32-arm.c binutils-2.31.1/bfd/elf32-arm.c @@ -13517,6 +13517,7 @@ else unwind_type = 2; - + + elide = 0; if (elide && !bfd_link_relocatable (info)) { diff --git a/patches/binutils/0004-fix-interworking-veneers.patch b/patches/binutils/0004-fix-interworking-veneers.patch new file mode 100644 index 0000000..de2cde6 --- /dev/null +++ b/patches/binutils/0004-fix-interworking-veneers.patch @@ -0,0 +1,13 @@ +diff --git a/ld/emultempl/armelf.em b/ld/emultempl/armelf.em +index a9ac12d6..627c9086 100644 +--- a/src/binutils/ld/emultempl/armelf.em ++++ b/src/binutils/ld/emultempl/armelf.em +@@ -41,7 +41,7 @@ static struct elf32_arm_params params = + BFD_ARM_STM32L4XX_FIX_NONE, /* stm32l4xx_fix */ + 0, /* no_enum_size_warning */ + 0, /* no_wchar_size_warning */ +- 0, /* pic_veneer */ ++ 1, /* pic_veneer */ + -1, /* fix_cortex_a8 */ + 1, /* fix_arm1176 */ + -1, /* merge_exidx_entries */