diff options
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr21964-5.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index ba42294..2db90b5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,7 @@ +2018-01-31 H.J. Lu <hongjiu.lu@intel.com> + + * testsuite/ld-elf/pr21964-5.c (my_var): Mark as used. + 2018-01-31 Maciej W. Rozycki <macro@mips.com> * testsuite/ld-elf/shared.exp: Fix a typo s/scrip/script/. diff --git a/ld/testsuite/ld-elf/pr21964-5.c b/ld/testsuite/ld-elf/pr21964-5.c index 56ed5a9..bc77422 100644 --- a/ld/testsuite/ld-elf/pr21964-5.c +++ b/ld/testsuite/ld-elf/pr21964-5.c @@ -9,7 +9,7 @@ extern int __start___verbose[]; extern int __stop___verbose[]; int bar (void) { - static int my_var __attribute__((section("__verbose"))) = 6; + static int my_var __attribute__((section("__verbose"), used)) = 6; int *ptr; ptr = (int*) dlsym(RTLD_DEFAULT, "__start___verbose"); if (!ptr || *ptr != 6) |