]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
aarch64: setup_gnu_properties only creates the notes section when none exists
authorMatthieu Longo <matthieu.longo@arm.com>
Thu, 20 Feb 2025 16:14:03 +0000 (16:14 +0000)
committerMatthieu Longo <matthieu.longo@arm.com>
Tue, 4 Mar 2025 11:02:03 +0000 (11:02 +0000)
commit2cf9acb79ffdd1d445eaa492c24825a0bc273536
treed627be13bf9deab685375bb66a01db639b516a40
parentc5f3649c8887ea30f3472e266ef88fe1b7522a84
aarch64: setup_gnu_properties only creates the notes section when none exists

The creation of .note.gnu.property section should not be based on the
presence of GNU properties, but rather on whether this section exits
or not.
However, there is one exception to this: PR23900 [1]. Old linkers were
treating .note.gnu.property as a generic note section, so old objects
might contain properties inside .note instead of .note.gnu.property. In
this case, the section won't be detected but the properties are still
parsed. So the absence of the .note.gnu.property section is necessary
but not enough to create the section. The condition of the creation of
the section has also to include the absence of GNU properties.

[1] PR23900: https://sourceware.org/bugzilla/show_bug.cgi?id=23900
bfd/elfxx-aarch64.c