From de2b67f8d41e08caa56bf6540277f6561edb647f Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 19 Apr 2015 22:05:29 -0400 Subject: add optional global visibility override this is implemented via the build system and does not affect source files. the idea is to use protected or hidden visibility to prevent the compiler from pessimizing function calls within a shared (or position-independent static) libc in the form of overhead setting up for a call through the PLT. the ld-time symbol binding via the -Bsymbolic-functions option already optimized out the PLT itself, but not the code in the caller needed to support a call through the PLT. on some archs this overhead can be substantial; on others it's trivial. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d943988d..15a30f83 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,8 @@ NOSSP_SRCS = $(wildcard crt/*.c) \ src/ldso/dlstart.c src/ldso/dynlink.c $(NOSSP_SRCS:%.c=%.o) $(NOSSP_SRCS:%.c=%.lo): CFLAGS += $(CFLAGS_NOSSP) +$(CRT_LIBS): CFLAGS += -DCRT + # This incantation ensures that changes to any subarch asm files will # force the corresponding object file to be rebuilt, even if the implicit # rule below goes indirectly through a .sub file. -- cgit 1.4.1