clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"
authorguenther <guenther@openbsd.org>
Wed, 29 Nov 2017 05:13:57 +0000 (05:13 +0000)
committerguenther <guenther@openbsd.org>
Wed, 29 Nov 2017 05:13:57 +0000 (05:13 +0000)
commitea6088e7d368d53c49ebfdf4520275cec2f78f5b
treea7a8d82d7543c1ee5938393be3730e485b342723
parentc45f4c08dc79129988149030069c6574d0ac0655
clang doesn't propagate attributes like "asm labels" and "visibility(hidden)"
to builtins like mem{set,cpy,move} and __stack_smash_handler.  So, when
building with clang, instead mark those as protected visibility to get rid
of the PLT relocations.  We can't take the address of them then, but that's
ok: it's a build-time error not a run-time error.

ok kettenis@
31 files changed:
lib/libc/arch/amd64/DEFS.h
lib/libc/arch/amd64/string/memmove.S
lib/libc/arch/amd64/string/memset.S
lib/libc/arch/arm/DEFS.h
lib/libc/arch/arm/string/memcpy.S
lib/libc/arch/arm/string/memmove.S
lib/libc/arch/arm/string/memset.S
lib/libc/arch/i386/DEFS.h
lib/libc/arch/i386/SYS.h
lib/libc/arch/i386/gen/flt_rounds.S
lib/libc/arch/i386/stdlib/abs.S
lib/libc/arch/i386/stdlib/div.S
lib/libc/arch/i386/stdlib/labs.S
lib/libc/arch/i386/stdlib/ldiv.S
lib/libc/arch/i386/string/bcmp.S
lib/libc/arch/i386/string/bzero.S
lib/libc/arch/i386/string/ffs.S
lib/libc/arch/i386/string/memchr.S
lib/libc/arch/i386/string/memcmp.S
lib/libc/arch/i386/string/memmove.S
lib/libc/arch/i386/string/memset.S
lib/libc/arch/i386/string/strchr.S
lib/libc/arch/i386/string/strcmp.S
lib/libc/arch/i386/string/strncmp.S
lib/libc/arch/i386/string/strrchr.S
lib/libc/hidden/string.h
lib/libc/include/namespace.h
lib/libc/string/memcpy.c
lib/libc/string/memmove.c
lib/libc/string/memset.c
lib/libc/sys/stack_protector.c