]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcc: aarch64: Do not use .previous after build attributes
authorMuhammad Kamran <muhammad.kamran@arm.com>
Thu, 30 Jul 2026 17:34:19 +0000 (18:34 +0100)
committerArtemiy Volkov <artemiy.volkov@arm.com>
Fri, 31 Jul 2026 09:17:26 +0000 (09:17 +0000)
.aeabi_subsection selects the current AArch64 build-attribute
subsection, not the current ELF section.  The following .previous
therefore does not return from the build-attribute subsection.  In
aarch64-asm.h it instead switches back to .note.GNU-stack, which was the
previous ELF section after emitting the non-executable stack note.

Remove the .previous from the build-attribute marking path.  Keep it in
the GNU_PROPERTY path, where it matches the explicit switch to
.note.gnu.property.

libgcc/ChangeLog:

* config/aarch64/aarch64-asm.h (FEATURE_1_AND_MARK): Do not emit
.previous after AArch64 build attributes.

libgcc/config/aarch64/aarch64-asm.h

index 5b5feefc342a375db810e28a461b1afadde0769a..b9416652174eaef04fa889a33bd264531b7af8fd 100644 (file)
     .aeabi_attribute Tag_Feature_GCS, 1;                               \
     .else;                                                             \
     .aeabi_attribute Tag_Feature_GCS, 0;                               \
-    .endif;                                                            \
-    .previous
+    .endif;
 #else
 /* Add a NT_GNU_PROPERTY_TYPE_0 note.  */
 # define FEATURE_1_AND_MARK(value) GNU_PROPERTY (FEATURE_1_AND, value)