diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-09-19 00:53:30 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-09-19 00:53:30 +0000 |
commit | 37a9e49a286b6c0b9e34387921b90c0ffa731516 (patch) | |
tree | 065d205cdcf4f3fd4e8b37d51a479eebde2e6a7f /ld/testsuite/ld-elf/comm-data.exp | |
parent | 91b96a45e3265661c6f686ae9050100b8df2794f (diff) | |
download | gdb-37a9e49a286b6c0b9e34387921b90c0ffa731516.zip gdb-37a9e49a286b6c0b9e34387921b90c0ffa731516.tar.gz gdb-37a9e49a286b6c0b9e34387921b90c0ffa731516.tar.bz2 |
Properly handle common symbol and weak function
bfd/
PR ld/14591
* elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
if the old symbol is weak.
* elf32-sh-symbian.c (sh_symbian_relocate_section): Update
_bfd_elf_merge_symbol call.
* elflink.c (_bfd_elf_merge_symbol): Add an argument to return
if the old symbol is weak.
(_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
call.
(elf_link_add_object_symbols): Don't update symbol type from a
weak definition. Update symbol type from a common symbol when
overriding a weak symbol.
ld/testsuite/
PR ld/14591
* ld-elf/comm-data.exp (run_ld_link_tests): Add comm-data3a and
comm-data3b tests.
* ld-ifunc/ifunc.exp (run_ld_link_exec_tests): New.
* ld-elf/comm-data3.sd: New file.
* ld-elf/comm-data3a.s: Likewise.
* ld-elf/comm-data3b.s: Likewise.
* ld-ifunc/ifunc-17a-i386.d: Likewise.
* ld-ifunc/ifunc-17a-x86-64.d: Likewise.
* ld-ifunc/ifunc-17a.s: Likewise.
* ld-ifunc/ifunc-17b-i386.d: Likewise.
* ld-ifunc/ifunc-17b-x86-64.d: Likewise.
* ld-ifunc/ifunc-17b.s: Likewise.
* ld-ifunc/ifunc-common-1.out: Likewise.
* ld-ifunc/ifunc-common-1a.c: Likewise.
* ld-ifunc/ifunc-common-1b.c: Likewise.
Diffstat (limited to 'ld/testsuite/ld-elf/comm-data.exp')
-rw-r--r-- | ld/testsuite/ld-elf/comm-data.exp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/comm-data.exp b/ld/testsuite/ld-elf/comm-data.exp index 2258afb..1c75f55 100644 --- a/ld/testsuite/ld-elf/comm-data.exp +++ b/ld/testsuite/ld-elf/comm-data.exp @@ -75,4 +75,24 @@ run_ld_link_tests [list \ } \ "comm-data" \ ] \ + [list \ + "$testname 3a" \ + "-static" \ + "" \ + { comm-data3a.s comm-data3b.s } \ + { \ + { readelf -s comm-data3.sd } \ + } \ + "comm-data3a" \ + ] \ + [list \ + "$testname 3b" \ + "-static" \ + "" \ + { comm-data3b.s comm-data3a.s } \ + { \ + { readelf -s comm-data3.sd } \ + } \ + "comm-data3b" \ + ] \ ] |