Hello, I am encountering a strange issue with binutils. For context, I am trying to build gcc 14.2.1_p20250301 for:
--host=aarch64-unknown-linux-android --target=aarch64-unknown-linux-gnu As part of the build, a target libgcc_s.so is built. For aarch64, a file called libgcc/config/aarch64/__arm_za_disable.S is included for this so, and built with as. However, when this file is built, the following message is emitted by as: __arm_za_disable.s: Assembler messages: __arm_za_disable.s: Warning: end of file in comment; newline inserted And the resulting .o file does not have any of the symbols defined in the .s file. The original file seems to be using the C preprocessor to include some stuff. Here's the generated output that gets fed into as: === # 0 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/__arm_za_disable.S" # 1 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/build/aarch64-unknown-linux-gnu/libgcc//" # 0 "<built-in>" # 0 "<command-line>" # 1 "/data/user/0/com.termux/files/home/gentoo/tmp/usr/aarch64-unknown-linux-gnu/sys-include/stdc-predef.h" 1 3 4 # 0 "<command-line>" 2 # 1 "./__arm_za_disable.vis" 1 # 0 "<command-line>" 2 # 1 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/__arm_za_disable.S" ;asdf # 26 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/__arm_za_disable.S" # 1 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/aarch64-asm.h" 1 # 25 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/aarch64-asm.h" # 1 "./auto-target.h" 1 # 26 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/aarch64-asm.h" 2 # 87 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/aarch64-asm.h" .section .note.GNU-stack, "", %progbits .previous # 27 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/__arm_za_disable.S" 2 # 35 "/data/user/0/com.termux/files/home/gentoo/tmp/var/tmp/portage/sys-devel/gcc-14.2.1_p20250301/work/gcc-14-20250301/libgcc/config/aarch64/__arm_za_disable.S" .hidden __aarch64_have_sme .hidden __libgcc_arm_tpidr2_save .variant_pcs __arm_za_disable .global __arm_za_disable; .type __arm_za_disable, %function; .balign 16; __arm_za_disable: .cfi_startproc; adrp x14, __aarch64_have_sme ldrb w14, [x14, :lo12:__aarch64_have_sme] cbz w14, .Lend .inst 0xd53bd0ae cbz x14, .Lend stp x29, x30, [sp, -16]! .cfi_adjust_cfa_offset 16 .cfi_rel_offset x29, 0 .cfi_rel_offset x30, 8 mov x29, sp bl __libgcc_arm_tpidr2_save .inst 0xd51bd0bf .inst 0xd503447f ldp x29, x30, [sp], 16 .cfi_adjust_cfa_offset -16 .cfi_restore x29 .cfi_restore x30 .Lend: ret .cfi_endproc; .size __arm_za_disable, .-__arm_za_disable .global __libgcc_arm_za_disable .hidden __libgcc_arm_za_disable .set __libgcc_arm_za_disable, __arm_za_disable === If I make it so that the first line of this file is NOT a # character, then the file gets successfully produced, and I can see the __arm_za_disable and __libgcc_arm_za_disable symbols as expected in readelf output. What could be the cause of this issue? binutils info: GNU assembler (Gentoo 2.43 p3) 2.43.1 This assembler was configured for a target of `aarch64-unknown-linux-gnu'. Kind regards, sin-ack