diff options
author | Alan Modra <amodra@gmail.com> | 2017-08-24 09:26:37 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-08-24 16:43:39 +0930 |
commit | 647d4de92e061a3a2be83740d7f1bf63e5669630 (patch) | |
tree | fc2892bec943cce85c21cced8453762af419a969 /ld/ChangeLog-9899 | |
parent | f8d31560e1f64ea35a4e6b67c2834c5f89ffef20 (diff) | |
download | gdb-647d4de92e061a3a2be83740d7f1bf63e5669630.zip gdb-647d4de92e061a3a2be83740d7f1bf63e5669630.tar.gz gdb-647d4de92e061a3a2be83740d7f1bf63e5669630.tar.bz2 |
Test undefined symbols in shared libraries
git commit 46434633f9 said
Make undefined symbols in allocate_dynrelocs dynamic
..if they have dynamic relocs. An undefined symbol in a PIC object
that finds no definition ought to become dynamic in order to support
--allow-shlib-undefined, but there is nothing in the generic ELF
linker code to do this if the reference isn't via the GOT or PLT. (An
initialized function pointer is an example.) So it falls to backend
code to ensure the symbol is made dynamic.
The above isn't true. Undefined symbols are indeed made dynamic for
shared libraries. Undefined symbols are not automatically made
dynamic in executables, and it was the PIE case that triggered an
internal consistency assertion on powerpc64. I guess I could have
jumped the other way when fixing PR21988, and not created a dynamic
reloc. Either way, it doesn't matter a great deal. We're going to
get an error on strong undefined symbols in an executable anyway, and
broken binaries if you try to use --unresolved-symbols=ignore-all to
disable the error.
* testsuite/ld-undefined/fundef.s: New test.
* testsuite/ld-undefined/undefined.exp: Test that undefined
symbols in shared libraries are made dynamic.
Diffstat (limited to 'ld/ChangeLog-9899')
0 files changed, 0 insertions, 0 deletions