mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
Fix testsuite/ld-elf/pr21964-5.c
Mark my_var as used. Otherwise it fails at -O2. * testsuite/ld-elf/pr21964-5.c (my_var): Mark as used.
This commit is contained in:
parent
07e5f5cf88
commit
f000c2b940
@ -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/.
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user