aarch64: Avoid .previous after build attributes
Corrected assembly directive usage in libgcc for aarch64 to prevent incorrect section switching after build attributes.
On aarch64, the .aeabi_subsection directive was incorrectly used, causing the subsequent .previous directive to switch to the wrong ELF section. This commit removes .previous from the build-attribute marking path, ensuring it only applies where intended in the GNU_PROPERTY path, thus fixing a potential assembly issue.
In Details
The assembly code in libgcc for aarch64 incorrectly used .previous after .aeabi_subsection. .aeabi_subsection selects a build-attribute subsection, not an ELF section. Thus, .previous would revert to the section active before the subsection, which in this case was .note.GNU-stack. This commit removes .previous from the build-attribute path, maintaining its use only in the GNU_PROPERTY path where it correctly follows a switch to .note.gnu.property.
- aarch64
- The 64-bit ARM architecture.
- libgcc
- The GCC runtime library, providing essential functions for compiled code that are not part of the standard language libraries.
- .previous
- An assembler directive used to restore the previous section, typically to exit a special section like a subsection.
- build attributes
- Metadata embedded in object files that describes characteristics of the build, such as ABI compliance or stack properties.
- ELF section
- A segment within an Executable and Linkable Format (ELF) file that contains code, data, or metadata.