--- a/hotspot/agent/src/os/linux/Makefile +++ b/hotspot/agent/src/os/linux/Makefile @@ -78,7 +78,7 @@ endif LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE) $(LIBSA): $(ARCH) $(OBJS) mapfile - $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS) + $(GCC) -shared -Wl,-Bsymbolic-functions $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS) test.o: test.c $(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c --- a/hotspot/make/linux/makefiles/gcc.make +++ b/hotspot/make/linux/makefiles/gcc.make @@ -288,6 +288,7 @@ endif # Enable linker optimization LFLAGS += -Xlinker -O1 +LFLAGS += -Wl,-Bsymbolic-functions ifeq ($(USE_CLANG),) # If this is a --hash-style=gnu system, use --hash-style=both