Remove the out of tree patch that is trying to address a PIE issue. This
patch causes RISC-V applications to seg fault when running
_dl_relocate_object.

This fixes: https://github.com/riscv/meta-riscv/issues/236

Signed-off-by: Alistair Francis <[email protected]>
---
 .../binutils/binutils-2.35.inc                |  1 -
 ...SCV_NONE-reloc-in-the-extra-unused-r.patch | 42 -------------------
 2 files changed, 43 deletions(-)
 delete mode 100644 
meta/recipes-devtools/binutils/binutils/0017-Do-not-emit-R_RISCV_NONE-reloc-in-the-extra-unused-r.patch

diff --git a/meta/recipes-devtools/binutils/binutils-2.35.inc 
b/meta/recipes-devtools/binutils/binutils-2.35.inc
index 9aa5e7efe3..5ae9ec4226 100644
--- a/meta/recipes-devtools/binutils/binutils-2.35.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.35.inc
@@ -41,6 +41,5 @@ SRC_URI = "\
      file://0014-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
      file://0015-sync-with-OE-libtool-changes.patch \
      file://0016-Check-for-clang-before-checking-gcc-version.patch \
-     file://0017-Do-not-emit-R_RISCV_NONE-reloc-in-the-extra-unused-r.patch \
 "
 S  = "${WORKDIR}/git"
diff --git 
a/meta/recipes-devtools/binutils/binutils/0017-Do-not-emit-R_RISCV_NONE-reloc-in-the-extra-unused-r.patch
 
b/meta/recipes-devtools/binutils/binutils/0017-Do-not-emit-R_RISCV_NONE-reloc-in-the-extra-unused-r.patch
deleted file mode 100644
index 99bb38eb67..0000000000
--- 
a/meta/recipes-devtools/binutils/binutils/0017-Do-not-emit-R_RISCV_NONE-reloc-in-the-extra-unused-r.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 5b61c40c34c3db699de723c3128ba704501ccdac Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Mon, 20 Apr 2020 14:23:57 -0700
-Subject: [PATCH 17/17] Do not emit R_RISCV_NONE reloc in the extra unused
- reloc space.
-
-Redundant R_RISCV_DTPMOD* R_RISCV_DTPREL* results from Global Dynamic -> Local 
Exec relaxation
-which generates
-
-Patch from https://sourceware.org/bugzilla/show_bug.cgi?id=24673
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <[email protected]>
----
- bfd/elfnn-riscv.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c
-index a5fa415309a..1e582052aa9 100644
---- a/bfd/elfnn-riscv.c
-+++ b/bfd/elfnn-riscv.c
-@@ -2090,13 +2090,14 @@ riscv_elf_relocate_section (bfd *output_bfd,
-                 pic = bfd_link_pic (info);
- 
-                 if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h)
--                    && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h)))
-+                    && (bfd_link_dll (info)
-+                        || !SYMBOL_REFERENCES_LOCAL (info, h)))
-                   indx = h->dynindx;
-               }
- 
-             /* The GOT entries have not been initialized yet.  Do it
-                now, and emit any relocations.  */
--            if ((bfd_link_pic (info) || indx != 0)
-+            if ((bfd_link_dll (info) || indx != 0)
-                 && (h == NULL
-                     || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-                     || h->root.type != bfd_link_hash_undefweak))
--- 
-2.28.0
-
-- 
2.27.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141373): 
https://lists.openembedded.org/g/openembedded-core/message/141373
Mute This Topic: https://lists.openembedded.org/mt/76127630/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to