0001-Revert-PR25882-.gnu.attributes-are-not-checked-for-s.patch (1837B)
1 From bbf05b742fde518fb97c789b043fe0d3aaf549f0 Mon Sep 17 00:00:00 2001 2 From: Ariadne Conill <ariadne@dereferenced.org> 3 Date: Tue, 21 Sep 2021 14:53:13 +0000 4 Subject: [PATCH] Revert "PR25882, .gnu.attributes are not checked for shared 5 libraries" 6 7 This revert is needed to avoid wrongly tagging objects with the incompatible 8 IBM long double ABI, which is not supported by musl and will result in 9 linking errors if used. 10 11 This reverts commit a8acd6eeb6dc2cc5460ece90f90ebe36b56b20ba. 12 --- 13 bfd/elf32-tic6x.c | 3 --- 14 ld/ldlang.c | 10 ++++------ 15 2 files changed, 4 insertions(+), 9 deletions(-) 16 17 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c 18 index 5754f3cb860..3ad1d612749 100644 19 --- a/bfd/elf32-tic6x.c 20 +++ b/bfd/elf32-tic6x.c 21 @@ -3735,9 +3735,6 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) 22 23 case Tag_ABI_PIC: 24 case Tag_ABI_PID: 25 - /* Don't transfer these tags from dynamic objects. */ 26 - if ((ibfd->flags & DYNAMIC) != 0) 27 - continue; 28 if (out_attr[i].i > in_attr[i].i) 29 out_attr[i].i = in_attr[i].i; 30 break; 31 diff --git a/ld/ldlang.c b/ld/ldlang.c 32 index 37b64c89ee1..f13beaef9d9 100644 33 --- a/ld/ldlang.c 34 +++ b/ld/ldlang.c 35 @@ -7071,13 +7071,11 @@ lang_check (void) 36 bfd_printable_name (input_bfd), input_bfd, 37 bfd_printable_name (link_info.output_bfd)); 38 } 39 - 40 - /* If the input bfd has no contents, it shouldn't set the 41 - private data of the output bfd. */ 42 - else if (!file->flags.just_syms 43 - && ((input_bfd->flags & DYNAMIC) != 0 44 - || bfd_count_sections (input_bfd) != 0)) 45 + else if (bfd_count_sections (input_bfd)) 46 { 47 + /* If the input bfd has no contents, it shouldn't set the 48 + private data of the output bfd. */ 49 + 50 bfd_error_handler_type pfn = NULL; 51 52 /* If we aren't supposed to warn about mismatched input 53 -- 54 2.33.0 55