PATCH: PR ld/9676: link-failure: could not read symbols: Bad value
H.J. Lu
hjl.tools@gmail.com
Tue Dec 23 01:28:00 GMT 2008
On Sun, Dec 21, 2008 at 4:47 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> A symbol, foo, is defined in a DSO first. And then it was defined
> in a relocatable file. When we merge those 2, set to def_regular
> to 1. But we didn't update def_dynamic. Later we we load it from a
> discarded section, we set its st_shndx to SHN_UNDEF. If it has hidden
> visibility, we think it is undefined and will try to resolve it from
> archive again. This patch will update def_dynamic ref_dynamic and
> dynamic_def fields when setting def_regular to 1. OK to install?
>
> There is a small testcase in
>
> http://sourceware.org/bugzilla/show_bug.cgi?id=9676
>
> But linker test framework doesn't support AR.
>
> Thanks.
>
>
> H.J.
> ----
> 2008-12-21 H.J. Lu <hongjiu.lu@intel.com>
>
> PR ld/9676
> * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
> ref_dynamic and dynamic_def fields when setting def_regular
> to 1.
>
Here is a patch with a testcase. OK to install?
Thanks.
--
H.J.
--
bfd/
2008-12-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9676
* elflink.c (elf_link_add_object_symbols): Update def_dynamic,
ref_dynamic and dynamic_def fields when setting def_regular
to 1.
ld/testsuite/
2008-12-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/9676
* ld-elf/pr9676-1.c: New.
* ld-elf/pr9676-2.c: Likewiswe.
* ld-elf/pr9676-3.c: Likewiswe.
* ld-elf/pr9676-4.c: Likewiswe.
* ld-elf/shared.exp (build_tests): Add tests for libpr9676-1.a,
libpr9676-2.a, libpr9676-3.so, libpr9676-4.so and
libpr9676-4a.so.
* lib/ld-lib.exp (ar_simple_create): New.
(run_ld_link_tests): Support archive.
(run_cc_link_tests): Likewiswe.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: binutils-hidden-1.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20081223/a9705c21/attachment.ksh>
More information about the Binutils
mailing list