diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-01-29 14:30:41 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-01-29 14:30:41 -0800 |
commit | 50a53d3ffecd6610fbfd40017224055ea252dea9 (patch) | |
tree | ad77bb725757ac3d24448959c7f59ea1bd5efb08 /ld | |
parent | 401e27fd717fcbc2efe00e332bdaa46846501323 (diff) | |
download | fsf-binutils-gdb-50a53d3ffecd6610fbfd40017224055ea252dea9.zip fsf-binutils-gdb-50a53d3ffecd6610fbfd40017224055ea252dea9.tar.gz fsf-binutils-gdb-50a53d3ffecd6610fbfd40017224055ea252dea9.tar.bz2 |
Add rdynamic-1 test
It is added for
commit 409ff343a402799563f71f938138b29f8baf7a1c
Author: Alan Modra <amodra@gmail.com>
Date: Tue Nov 8 13:49:11 2011 +0000
* elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
executables when export_dynamic.
* ld-elf/rdynamic-1.c: New file.
* ld-elf/rdynamic-1.rd: Likewise.
* ld-elf/shared.exp (build_tests): Add rdynamic-1.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/rdynamic-1.c | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/rdynamic-1.rd | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 3 |
4 files changed, 25 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index d3a9f29..3cd1930 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-01-29 H.J. Lu <hongjiu.lu@intel.com> + + * ld-elf/rdynamic-1.c: New file. + * ld-elf/rdynamic-1.rd: Likewise. + + * ld-elf/shared.exp (build_tests): Add rdynamic-1. + 2014-01-28 Nick Clifton <nickc@redhat.com> PR binutils/16317 diff --git a/ld/testsuite/ld-elf/rdynamic-1.c b/ld/testsuite/ld-elf/rdynamic-1.c new file mode 100644 index 0000000..7c9d1ab --- /dev/null +++ b/ld/testsuite/ld-elf/rdynamic-1.c @@ -0,0 +1,10 @@ +void +rdynamic () +{ +} + +int +main () +{ + return 0; +} diff --git a/ld/testsuite/ld-elf/rdynamic-1.rd b/ld/testsuite/ld-elf/rdynamic-1.rd new file mode 100644 index 0000000..dbf3602 --- /dev/null +++ b/ld/testsuite/ld-elf/rdynamic-1.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 +GLOBAL +DEFAULT +[0-9]+ +_?rdynamic +#... diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index bbfd464..981ce71 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -224,6 +224,9 @@ set build_tests { {"Build libpr2404b.a" "" "" {pr2404b.c} {} "libpr2404b.a"} + {"Build rdynamic-1" + "-rdynamic -Wl,--gc-sections" "-ffunction-sections" + {rdynamic-1.c} {{readelf {-s} rdynamic-1.rd}} "rdynamic-1"} } run_cc_link_tests $build_tests |