diff options
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/pr9679-1.c | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr9679-2.c | 13 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr9679.rd | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 3 |
4 files changed, 26 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr9679-1.c b/ld/testsuite/ld-elf/pr9679-1.c new file mode 100644 index 0000000..cf7abbb --- /dev/null +++ b/ld/testsuite/ld-elf/pr9679-1.c @@ -0,0 +1,5 @@ +int +foo (void) +{ + return 1; +} diff --git a/ld/testsuite/ld-elf/pr9679-2.c b/ld/testsuite/ld-elf/pr9679-2.c new file mode 100644 index 0000000..e125a6b --- /dev/null +++ b/ld/testsuite/ld-elf/pr9679-2.c @@ -0,0 +1,13 @@ +extern int foo (void) __attribute__((weak,__visibility__ ("hidden"))); + +int +foo (void) +{ + return 1; +} + +int +bar (void) +{ + return foo (); +} diff --git a/ld/testsuite/ld-elf/pr9679.rd b/ld/testsuite/ld-elf/pr9679.rd new file mode 100644 index 0000000..0585b1c --- /dev/null +++ b/ld/testsuite/ld-elf/pr9679.rd @@ -0,0 +1,5 @@ +Symbol table '\.dynsym' contains [0-9]+ entries: + +Num: +Value +Size Type +Bind +Vis +Ndx Name +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +LOCAL +HIDDEN +[0-9]+ +foo +#... diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index ff8bc8f..4f45bdd 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -145,6 +145,9 @@ set build_tests { "-shared tmpdir/pr9676-4.o -Ltmpdir -lpr9676-3 -Wl,--start-group -lpr9676-1 -lpr9676-2 -Wl,--end-group" "-fPIC" {dummy.c} {{readelf {-s} pr9676.rd}} "libpr9676-4a.so"} + {"Build libpr9679.so" + "-shared" "-fPIC -O0" + {pr9679-1.c pr9679-2.c} {{readelf {-s} pr9679.rd}} "libpr9679.so"} } set run_tests { |