diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-03-08 20:41:41 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-03-08 20:45:52 -0800 |
commit | 9c1d7a087682074d585253ad38719ec2363eb2b7 (patch) | |
tree | 782d27928686e190c232f3fe9457a5e30d574c80 /ld/testsuite/ld-elf | |
parent | 7ff6eb49a2b79a2ad95c814ad990316545bf3692 (diff) | |
download | gdb-9c1d7a087682074d585253ad38719ec2363eb2b7.zip gdb-9c1d7a087682074d585253ad38719ec2363eb2b7.tar.gz gdb-9c1d7a087682074d585253ad38719ec2363eb2b7.tar.bz2 |
Don't create dynamic sections when relocatable
Since dynamic sections aren't applicable to relocatable file, don't
create dynamic sections for -E/--dynamic-list when relocatable.
bfd/
PR ld/19789
* elflink.c (elf_link_add_object_symbols): Create dynamic sections
for -E/--dynamic-list only when not relocatable.
ld/
PR ld/19789
* testsuite/ld-elf/pr19789.d: New file.
* testsuite/ld-elf/pr19789.s: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf')
-rw-r--r-- | ld/testsuite/ld-elf/pr19789.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr19789.s | 9 |
2 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/pr19789.d b/ld/testsuite/ld-elf/pr19789.d new file mode 100644 index 0000000..e7cc6c5 --- /dev/null +++ b/ld/testsuite/ld-elf/pr19789.d @@ -0,0 +1,10 @@ +#ld: -r -E +#readelf: -s --wide +#target: *-*-linux* *-*-gnu* *-*-solaris* + +Symbol table '\.symtab' contains [0-9]+ entries: +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@@VERS.2 +#... + +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+ +foo@VERS.1 +#pass diff --git a/ld/testsuite/ld-elf/pr19789.s b/ld/testsuite/ld-elf/pr19789.s new file mode 100644 index 0000000..31be1b0 --- /dev/null +++ b/ld/testsuite/ld-elf/pr19789.s @@ -0,0 +1,9 @@ + .text + .globl __foo + .type __foo, %function +__foo: + .byte 0 + .globl __foo1 + .set __foo1, __foo + .symver __foo,foo@@VERS.2 + .symver __foo1,foo@VERS.1 |