Hi, when compiling this 2-liner: $ cat > test.c static int x; static int y __attribute__((alias("x"))); $ clang-8 -c -o test.o test.c $ objdump -t test.o test.o: file format elf64-x86-64 SYMBOL TABLE: 0000000000000000 l df *ABS* 0000000000000000 test.c 0000000000000000 l O .bss 0000000000000004 x 0000000000000000 g O .bss 0000000000000004 y The "y" symbol ends up global (g) instead of the expected static (l). ELF visibility attributes don't seem to work either. Behaviour is the same on * clang version 8.0.0 (tags/RELEASE_800/final) * clang version 7.0.1-8 (tags/RELEASE_701/final) Cheers, David
Still reproduces with trunk, and also for function aliases.
arm32 Linux kernel builds on the -next tree started failing due to this: https://github.com/ClangBuiltLinux/linux/issues/631
https://reviews.llvm.org/D66492
https://reviews.llvm.org/rL369705