[1/4] gprofng/testsuite: adjust linking of synprog

Message ID 507f0d3f-c34e-9895-21bf-37525bf0a6fb@suse.com
State Accepted
Headers
Series gprofng: small testsuite adjustments |

Checks

Context Check Description
snail/binutils-gdb-check success Github commit url

Commit Message

Jan Beulich Dec. 16, 2022, 8:28 a.m. UTC
  In order for so_syn.so and so_syx.so to be able to access the main
program's "testtime" variable, that variable needs exposing in the
dynamic symbol table. Since this is a test program only, do it the brute
force way and simply expose all global symbols.
  

Patch

--- a/gprofng/testsuite/gprofng.display/synprog/Makefile
+++ b/gprofng/testsuite/gprofng.display/synprog/Makefile
@@ -50,7 +50,7 @@  HDRS= \
 
 $(TARGET): $(SRCS) $(HDRS) so_syx.so so_syn.so
 	@echo " ---- Build: $@ -----"
-	$(CC) $(CFLAGS) -o $@ $(SRCS) -ldl -lc -lrt
+	$(CC) $(CFLAGS) -Wl,-E -o $@ $(SRCS) -ldl -lc -lrt
 
 so_syx.so: $(srcdir)/so_syx.c
 	@echo " ---- Build: $@ -----"