https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112562

            Bug ID: 112562
           Summary: [14 regression] asan_interceptors_memintrinsics.cpp
                    doesn't assemble with Solaris/x86 as
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at 
gcc dot gnu.org
  Target Milestone: ---
              Host: i386-pc-solaris2.11
            Target: i386-pc-solaris2.11
             Build: i386-pc-solaris2.11

The recent libsanitizer import broke bootstrap with the Solaris/x86 as:

Assembler: asan_interceptors_memintrinsics.cpp
        "/var/tmp//ccY0YNed.s", line 9 : Illegal register: "%function"
        "/var/tmp//ccY0YNed.s", line 9 : Syntax error
        Near line: ".type  __interceptor_trampoline_memset, %function"
        "/var/tmp//ccY0YNed.s", line 20 : Illegal register: "%function"
        "/var/tmp//ccY0YNed.s", line 20 : Syntax error
        Near line: ".type  __interceptor_trampoline_memmove, %function"
        "/var/tmp//ccY0YNed.s", line 31 : Illegal register: "%function"
        "/var/tmp//ccY0YNed.s", line 31 : Syntax error
        Near line: ".type  __interceptor_trampoline_memcpy, %function"

Unlike gas, as doesn't understand %function.  gcc (and clang) always emit
@function instead.

This is from libsanitizer/interception/interception.h (DECLARE_WRAPPER) and
libsanitizer/sanitizer_common/sanitizer_asm.h (ASM_TYPE_FUNCTION) which
apparently should be kept in sync.

When I look at gcc/config, the only targets that don't use the elfos.h default
of '@' for TYPE_OPERAND_FMT are aarch64-elf, arm-elf, and sparc-svr4.

I wonder how best to handle this: given that clang doesn't care about the
native assemblers, it might be necessary to keep a patch gcc-local.

Reply via email to