55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001
|
|
From: Ariadne Conill <ariadne@dereferenced.org>
|
|
Date: Tue, 21 Sep 2021 14:53:13 +0000
|
|
Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared
|
|
libraries"
|
|
|
|
This revert is needed to avoid wrongly tagging objects with the incompatible
|
|
IBM long double ABI, which is not supported by musl and will result in
|
|
linking errors if used.
|
|
|
|
This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba.
|
|
---
|
|
bfd/elf32-tic6x.c | 3 ---
|
|
ld/ldlang.c | 10 ++++------
|
|
2 files changed, 4 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c
|
|
index 5754f3cb860..3ad1d612749 100644
|
|
--- a/bfd/elf32-tic6x.c
|
|
+++ b/bfd/elf32-tic6x.c
|
|
@@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info)
|
|
|
|
case Tag_ABI_PIC:
|
|
case Tag_ABI_PID:
|
|
- /* Don't transfer these tags from dynamic objects. */
|
|
- if ((ibfd->flags & DYNAMIC) != 0)
|
|
- continue;
|
|
if (out_attr[i].i > in_attr[i].i)
|
|
out_attr[i].i = in_attr[i].i;
|
|
break;
|
|
diff --git a/ld/ldlang.c b/ld/ldlang.c
|
|
index 37b64c89ee1..f13beaef9d9 100644
|
|
--- a/ld/ldlang.c
|
|
+++ b/ld/ldlang.c
|
|
@@ -7071,13 +7071,11 @@ lang_check (void)
|
|
bfd_printable_name (input_bfd), input_bfd,
|
|
bfd_printable_name (link_info.output_bfd));
|
|
}
|
|
-
|
|
- /* If the input bfd has no contents, it shouldn't set the
|
|
- private data of the output bfd. */
|
|
- else if (!file->flags.just_syms
|
|
- && ((input_bfd->flags & DYNAMIC) != 0
|
|
- || bfd_count_sections (input_bfd) != 0))
|
|
+ else if (bfd_count_sections (input_bfd))
|
|
{
|
|
+ /* If the input bfd has no contents, it shouldn't set the
|
|
+ private data of the output bfd. */
|
|
+
|
|
bfd_error_handler_type pfn = NULL;
|
|
|
|
/* If we aren't supposed to warn about mismatched input
|
|
--
|
|
2.33.0
|