8ded2ddc8b
When pointer equality needed, we can't replace PLT relocations with GOT relocations for -z now. This patch checks if pointer equality is needed before converting PLT relocations to GOT relocations. bfd/ PR binutils/18458 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_i386_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got section for now binding only if pointer equality isn't needed. (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now binding only if pointer equality isn't needed. ld/testsuite/ PR binutils/18458 * ld-elf/shared.exp (build_tests): Build libpr18458a.so and libpr18458b.so. (run_tests): Run pr18458 test. * ld-elf/pr18458a.c: New file. * ld-elf/pr18458b.c: Likewise. * ld-elf/pr18458c.c: Likewise.
7 lines
47 B
C
7 lines
47 B
C
extern void a (void);
|
|
void
|
|
b (void)
|
|
{
|
|
a();
|
|
}
|