crosstool-ng/packages/binutils/2.38/0001-check_ldrunpath_length.patch
Hans-Christian Noren Egtvedt ba680a3e5b packages/binutils: add binutils-2.38
Binutils version 2.38 has been released
https://www.phoronix.com/scan.php?page=news_item&px=GNU-Binutils-2.38
https://sourceware.org/pipermail/binutils/2022-February/119721.html

Patches 0000 to 0008 from binutils-2.37 applied clean, so forward ported
them.

The following patches are now applied from upstream, hence dropped:
0010-change-uint-to-unsigned.patch
0011-bfd-close-the-file-descriptor-if-there-is-no-archive-fd.patch
0012-pr28391-strip-objcopy-preserve-dates-a-cannot-set-time.patch
0013-ld-pru-fix-resource_table-output-section-alignment.patch
0014-pr28422-build_id-use-after-free.patch
0015-pr28459-readelf-issues-bogus-warning.patch
0016-pr28417-std-string-no-longer-allows-accepting-nullptr_t.patch
0017-pr28540-segmentation-fault-on-NULL-byte_get.patch
0018-gold-place-note-gnu-property-section-before-other-note-sections.patch
0019-waddress-warning-in-ldelf.c.patch

Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
2022-02-13 20:47:12 +13:00

25 lines
664 B
Diff

---
ld/ldelf.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -1277,6 +1277,8 @@
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
+ if (path && *path == '\0')
+ path = NULL;
if (path
&& ldelf_search_needed (path, &n, force,
is_linux, elfsize))
@@ -1636,6 +1638,8 @@
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");
+ if (rpath && *rpath == '\0')
+ rpath = NULL;
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)