binutils-gdb/ld/testsuite/ld-elf/pr29377b.c
H.J. Lu bd0736124c x86: Properly check invalid relocation against protected symbol
Only check invalid relocation against protected symbol defined in shared
object.

bfd/

	PR ld/29377
	* elf32-i386.c (elf_i386_scan_relocs): Only check invalid
	relocation against protected symbol defined in shared object.
	* elf64-x86-64.c (elf_x86_64_scan_relocs): Likewise.

ld/

	PR ld/29377
	* testsuite/ld-elf/linux-x86.exp: Run PR ld/29377 tests.
	* testsuite/ld-elf/pr29377a.c: New file.
	* testsuite/ld-elf/pr29377b.c: Likewise.
2022-07-18 18:15:39 -07:00

11 lines
91 B
C

extern void foo (void);
void (*foo_p) (void);
int
main ()
{
foo_p = foo;
return 0;
}