diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-01-21 05:33:48 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-01-21 05:33:48 -0800 |
commit | 22ef172a21663abb477d72284b4d59c8eabcbb82 (patch) | |
tree | 9f629e3bc3316aa35877260d66617b3392423cc0 /bfd/elflink.c | |
parent | 48ded086b6d25529dd336d74b73788d3cf87cfda (diff) | |
download | gdb-22ef172a21663abb477d72284b4d59c8eabcbb82.zip gdb-22ef172a21663abb477d72284b4d59c8eabcbb82.tar.gz gdb-22ef172a21663abb477d72284b4d59c8eabcbb82.tar.bz2 |
Don't check shared/export_dynamic/ref_dynamic for type mismatch
There is nothing linker can do when a type mismatched default definition
are made dynamic by info->shared, info->export_dynamic or h->ref_dynamic.
But we do want to avoid exporting it when building PIE. Let's remove
those checks.
bfd/
PR ld/2404
* elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
info->export_dynamic, nor !h->ref_dynamic for type mismatch when
adding the default version.
ld/testsuite/
PR ld/2404
* ld-elf/shared.exp: Add a PIE test for PR ld/2404.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index 7dcafd6..8ba0888 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1090,9 +1090,6 @@ _bfd_elf_merge_symbol (bfd *abfd, the type of existing regular definition mismatch. We only do it if the existing regular definition won't be dynamic. */ if (pold_alignment == NULL - && !info->shared - && !info->export_dynamic - && !h->ref_dynamic && newdyn && newdef && !olddyn |