From e6f526809dbca3e772147b7bdedc3ebca8aff30e Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 12 Aug 2002 06:25:47 +0000 Subject: * elf/tst-tlsmod4.c (in_dso): Insert a random library call before use of the TLS macros, otherwise the compiler might not have initialized the PIC register yet when we use the PLT via asm. * elf/tst-tlsmod3.c (in_dso2): Likewise. * elf/tst-tlsmod2.c (in_dso): Likewise. --- elf/tst-tlsmod2.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'elf/tst-tlsmod2.c') diff --git a/elf/tst-tlsmod2.c b/elf/tst-tlsmod2.c index 6aec812..1a4c73b 100644 --- a/elf/tst-tlsmod2.c +++ b/elf/tst-tlsmod2.c @@ -12,9 +12,13 @@ COMMON_INT_DEF(foo); int in_dso (int n, int *caller_foop) { - int *foop = TLS_GD (foo); + int *foop; int result = 0; + puts ("foo"); /* Make sure PLT is used before macros. */ + + foop = TLS_GD (foo); + if (caller_foop != NULL && foop != caller_foop) { printf ("callers address of foo differs: %p vs %p\n", caller_foop, foop); -- cgit v1.1