* PATCH bfd: Fix linker warning for recently introduced arm attributes
@ 2021-09-27 14:40 Andrea Corallo
2021-09-30 16:27 ` Nick Clifton
2021-10-05 2:49 ` Simon Marchi
0 siblings, 2 replies; 7+ messages in thread
From: Andrea Corallo @ 2021-09-27 14:40 UTC (permalink / raw)
To: binutils; +Cc: richard.earnshaw, marcus.shawcroft, nd
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
Hi all,
this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
does not emit the "unknown EABI object attribute" warning.
Regtested clean, okay for trunk?
Best Regards
Andrea
[-- Attachment #2: 0001-PATCH-bfd-Fix-linker-warning-for-recently-introduced.patch --]
[-- Type: text/plain, Size: 998 bytes --]
From 39c0c12b13fdeb07695def0af19e8ed760bd882b Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Mon, 27 Sep 2021 16:04:31 +0200
Subject: [PATCH] PATCH bfd: Fix linker warning for recently introduced arm
attributes
2021-09-27 Andrea Corallo <andrea.corallo@arm.com>
* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Update value to cover
'Tag_BTI_use' and 'Tag_PACRET_use'.
---
bfd/elf-bfd.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c247d52c615..c7dedf522da 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1814,7 +1814,7 @@ struct bfd_elf_section_data
#define LEAST_KNOWN_OBJ_ATTRIBUTE 2
/* The maximum number of known object attributes for any target. */
-#define NUM_KNOWN_OBJ_ATTRIBUTES 71
+#define NUM_KNOWN_OBJ_ATTRIBUTES 77
/* The value of an object attribute. The type indicates whether the attribute
holds and integer, a string, or both. It can also indicate that there can
--
2.20.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-09-27 14:40 PATCH bfd: Fix linker warning for recently introduced arm attributes Andrea Corallo
@ 2021-09-30 16:27 ` Nick Clifton
2021-10-01 8:17 ` Andrea Corallo
2021-10-05 2:49 ` Simon Marchi
1 sibling, 1 reply; 7+ messages in thread
From: Nick Clifton @ 2021-09-30 16:27 UTC (permalink / raw)
To: Andrea Corallo, binutils; +Cc: richard.earnshaw, nd, marcus.shawcroft
Hi Andrea,
> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
> does not emit the "unknown EABI object attribute" warning.
>
> Regtested clean, okay for trunk?
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-09-30 16:27 ` Nick Clifton
@ 2021-10-01 8:17 ` Andrea Corallo
0 siblings, 0 replies; 7+ messages in thread
From: Andrea Corallo @ 2021-10-01 8:17 UTC (permalink / raw)
To: Nick Clifton; +Cc: binutils, richard.earnshaw, nd, marcus.shawcroft
Nick Clifton <nickc@redhat.com> writes:
> Hi Andrea,
>
>> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
>> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
>> does not emit the "unknown EABI object attribute" warning.
>> Regtested clean, okay for trunk?
>
> Approved - please apply.
>
> Cheers
> Nick
Hi Nick,
thanks for reviewing, in as 242fe37867c.
Regards
Andrea
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-09-27 14:40 PATCH bfd: Fix linker warning for recently introduced arm attributes Andrea Corallo
2021-09-30 16:27 ` Nick Clifton
@ 2021-10-05 2:49 ` Simon Marchi
2021-10-06 0:03 ` Alan Modra
1 sibling, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2021-10-05 2:49 UTC (permalink / raw)
To: Andrea Corallo, binutils; +Cc: richard.earnshaw, marcus.shawcroft, nd
On 2021-09-27 10:40, Andrea Corallo wrote:> Hi all,
>
> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
> does not emit the "unknown EABI object attribute" warning.
>
> Regtested clean, okay for trunk?
>
> Best Regards
>
> Andrea
>
Hi Andrea,
I get some GDB failures starting with this commit. To run:
gdb/ $ make check TESTS="gdb.cp/ambiguous.exp"
And in gdb.log:
49 (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous^M
50 BFD: BFD (GNU Binutils) 2.37.50.20210924 assertion fail /home/simark/src/binutils-gdb/bfd/elf.c:240^M
51 BFD: /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous: warning: multiple dynamic symbol tables detected - ignoring the table in section 6^M
52 ^M
53 ^M
54 Fatal signal: Segmentation fault^M
Just loading the file in GDB is enough to reproduce:
$ ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.cp/ambiguous/ambiguous
crashes here:
#16 0x55695f64f856 in handle_sigsegv /home/simark/src/binutils-gdb/gdb/event-top.c:971
#17 0x7fd2187fe86f (/usr/lib/libpthread.so.0+0x1386f)
#18 0x556960b22a45 in bfd_section_from_shdr /home/simark/src/binutils-gdb/bfd/elf.c:2308
#19 0x556960b07f92 in bfd_elf64_object_p /home/simark/src/binutils-gdb/bfd/elfcode.h:834
#20 0x556960aa5eec in bfd_check_format_matches /home/simark/src/binutils-gdb/bfd/format.c:343
#21 0x55695f65703b in exec_file_attach(char const*, int) /home/simark/src/binutils-gdb/gdb/exec.c:471
#22 0x55695fa8aa48 in catch_command_errors /home/simark/src/binutils-gdb/gdb/main.c:523
#23 0x55695fa8db42 in captured_main_1 /home/simark/src/binutils-gdb/gdb/main.c:1233
#24 0x55695fa8edbe in captured_main /home/simark/src/binutils-gdb/gdb/main.c:1343
#25 0x55695fa8ee53 in gdb_main(captured_main_args*) /home/simark/src/binutils-gdb/gdb/main.c:1368
#26 0x55695ecd5ad8 in main /home/simark/src/binutils-gdb/gdb/gdb.c:32
#27 0x7fd217f11b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
#28 0x55695ecd58ad in _start (/home/simark/build/binutils-gdb/gdb/gdb+0x12ec8ad)
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-10-05 2:49 ` Simon Marchi
@ 2021-10-06 0:03 ` Alan Modra
2021-10-06 2:14 ` Simon Marchi
0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2021-10-06 0:03 UTC (permalink / raw)
To: Simon Marchi
Cc: Andrea Corallo, binutils, richard.earnshaw, nd, marcus.shawcroft
On Mon, Oct 04, 2021 at 10:49:58PM -0400, Simon Marchi via Binutils wrote:
> On 2021-09-27 10:40, Andrea Corallo wrote:> Hi all,
> >
> > this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
> > that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
> > does not emit the "unknown EABI object attribute" warning.
> >
> > Regtested clean, okay for trunk?
> >
> > Best Regards
> >
> > Andrea
> >
> Hi Andrea,
>
> I get some GDB failures starting with this commit. To run:
>
> gdb/ $ make check TESTS="gdb.cp/ambiguous.exp"
>
> And in gdb.log:
>
> 49 (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous^M
> 50 BFD: BFD (GNU Binutils) 2.37.50.20210924 assertion fail /home/simark/src/binutils-gdb/bfd/elf.c:240^M
Dependency problem? I can't see that assert being hit unless you have
stale bfd object files.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-10-06 0:03 ` Alan Modra
@ 2021-10-06 2:14 ` Simon Marchi
2021-10-06 8:24 ` Andrea Corallo
0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2021-10-06 2:14 UTC (permalink / raw)
To: Alan Modra
Cc: Andrea Corallo, binutils, richard.earnshaw, nd, marcus.shawcroft
On 2021-10-05 20:03, Alan Modra wrote:
> On Mon, Oct 04, 2021 at 10:49:58PM -0400, Simon Marchi via Binutils wrote:
>> On 2021-09-27 10:40, Andrea Corallo wrote:> Hi all,
>>>
>>> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
>>> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
>>> does not emit the "unknown EABI object attribute" warning.
>>>
>>> Regtested clean, okay for trunk?
>>>
>>> Best Regards
>>>
>>> Andrea
>>>
>> Hi Andrea,
>>
>> I get some GDB failures starting with this commit. To run:
>>
>> gdb/ $ make check TESTS="gdb.cp/ambiguous.exp"
>>
>> And in gdb.log:
>>
>> 49 (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous^M
>> 50 BFD: BFD (GNU Binutils) 2.37.50.20210924 assertion fail /home/simark/src/binutils-gdb/bfd/elf.c:240^M
>
> Dependency problem? I can't see that assert being hit unless you have
> stale bfd object files.
I tried rebuilding from scratch a few times and kept seeing it. I
flushed my ccache cache and now I don't see it, so perhaps it was a
ccache issue (if so, that's quite rare).
So, sorry for the noise.
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: PATCH bfd: Fix linker warning for recently introduced arm attributes
2021-10-06 2:14 ` Simon Marchi
@ 2021-10-06 8:24 ` Andrea Corallo
0 siblings, 0 replies; 7+ messages in thread
From: Andrea Corallo @ 2021-10-06 8:24 UTC (permalink / raw)
To: Simon Marchi; +Cc: Alan Modra, binutils, richard.earnshaw, nd, marcus.shawcroft
Simon Marchi <simon.marchi@polymtl.ca> writes:
> On 2021-10-05 20:03, Alan Modra wrote:
>> On Mon, Oct 04, 2021 at 10:49:58PM -0400, Simon Marchi via Binutils wrote:
>>> On 2021-09-27 10:40, Andrea Corallo wrote:> Hi all,
>>>>
>>>> this simple patch updates the value of 'NUM_KNOWN_OBJ_ATTRIBUTES' so
>>>> that when linking objects with 'Tag_BTI_use' or 'Tag_PACRET_use' set ld
>>>> does not emit the "unknown EABI object attribute" warning.
>>>>
>>>> Regtested clean, okay for trunk?
>>>>
>>>> Best Regards
>>>>
>>>> Andrea
>>>>
>>> Hi Andrea,
>>>
>>> I get some GDB failures starting with this commit. To run:
>>>
>>> gdb/ $ make check TESTS="gdb.cp/ambiguous.exp"
>>>
>>> And in gdb.log:
>>>
>>> 49 (gdb) file /home/simark/build/binutils-gdb/gdb/testsuite/outputs/gdb.cp/ambiguous/ambiguous^M
>>> 50 BFD: BFD (GNU Binutils) 2.37.50.20210924 assertion fail /home/simark/src/binutils-gdb/bfd/elf.c:240^M
>>
>> Dependency problem? I can't see that assert being hit unless you have
>> stale bfd object files.
>
> I tried rebuilding from scratch a few times and kept seeing it. I
> flushed my ccache cache and now I don't see it, so perhaps it was a
> ccache issue (if so, that's quite rare).
>
> So, sorry for the noise.
Hi Simon,
no issue, I was trying to reproduce it but it's certainly better a false
alarm than a real one :)
Best Regards
Andrea
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-10-06 8:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 14:40 PATCH bfd: Fix linker warning for recently introduced arm attributes Andrea Corallo
2021-09-30 16:27 ` Nick Clifton
2021-10-01 8:17 ` Andrea Corallo
2021-10-05 2:49 ` Simon Marchi
2021-10-06 0:03 ` Alan Modra
2021-10-06 2:14 ` Simon Marchi
2021-10-06 8:24 ` Andrea Corallo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).