diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-12-07 15:39:49 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-12-07 15:40:02 -0800 |
commit | fbcc8bafeb413a111cd3caab39b3ab57d5b8ce93 (patch) | |
tree | 4437adb9b4b852c95fdf3f3b1a841bf3d7ea6a96 /ld | |
parent | d9c859da9fff9de47a33f52d75a6fef2495b3fc1 (diff) | |
download | gdb-fbcc8bafeb413a111cd3caab39b3ab57d5b8ce93.zip gdb-fbcc8bafeb413a111cd3caab39b3ab57d5b8ce93.tar.gz gdb-fbcc8bafeb413a111cd3caab39b3ab57d5b8ce93.tar.bz2 |
Override the previous definition from IR object
Mark the previous definition from IR object as undefined so that the
generic linker will override it.
bfd/
PR ld/23958
* elflink.c (_bfd_elf_add_default_symbol): Override the previous
definition from IR object.
ld/
PR ld/23958
* testsuite/ld-plugin/lto.exp: Run PR ld/23958 test.
* testsuite/ld-plugin/pr23958.c: New file.
* testsuite/ld-plugin/pr23958.t: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 7 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/pr23958.c | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/pr23958.t | 4 |
4 files changed, 23 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index c8c48c5..75c9c7d 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,12 @@ 2018-12-07 H.J. Lu <hongjiu.lu@intel.com> + PR ld/23958 + * testsuite/ld-plugin/lto.exp: Run PR ld/23958 test. + * testsuite/ld-plugin/pr23958.c: New file. + * testsuite/ld-plugin/pr23958.t: Likewise. + +2018-12-07 H.J. Lu <hongjiu.lu@intel.com> + * NEWS: Updated for property change report. * ld.texi: Document property change report. * ldmain.c (main): Set link_info.has_map_file to TRUE when diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 008bde7..b56bd63 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -225,6 +225,12 @@ set lto_link_tests [list \ {pr23818a.c pr23818b.c} \ {{"readelf" {-s --wide} "pr23818.d"}} \ "libpr23818.so"] \ + [list "Build libpr23958.so" \ + "-shared -flto -Wl,-version-script,pr23958.t" \ + "-g -flto $lto_fat" \ + {pr23958.c} \ + "" \ + "libpr23958.so"] \ ] if { [at_least_gcc_version 4 7] } { diff --git a/ld/testsuite/ld-plugin/pr23958.c b/ld/testsuite/ld-plugin/pr23958.c new file mode 100644 index 0000000..656dc31 --- /dev/null +++ b/ld/testsuite/ld-plugin/pr23958.c @@ -0,0 +1,6 @@ +void +dwarf_bytesize (void) +{ +} + +asm (".symver dwarf_bytesize,dwarf_bytesize@@@ELFUTILS_0.143"); diff --git a/ld/testsuite/ld-plugin/pr23958.t b/ld/testsuite/ld-plugin/pr23958.t new file mode 100644 index 0000000..d3af1ae --- /dev/null +++ b/ld/testsuite/ld-plugin/pr23958.t @@ -0,0 +1,4 @@ +ELFUTILS_0.143 { +global: + dwarf_bytesize; +}; |