]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: Properly check invalid relocation against protected symbol
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Jul 2022 18:44:32 +0000 (11:44 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Jul 2022 16:01:35 +0000 (09:01 -0700)
commit17f1c83d5ba7a1d3898265face9027ea02c3fb8c
tree6bb8e4a06a79af28c9323dfda5eefe13ab8f78dc
parent477d69e15caef3c955401779115f5e49d794f2f6
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.

(cherry picked from commit bd0736124c20950ac353f01e5029b7cb5d8a7010)

ld: Pass -nostdlib to compiler with -r

Pass -nostdlib to compiler with -r to avoid unnecessary .o file and
libraries.

PR ld/29377
* testsuite/ld-elf/linux-x86.exp: Pass -nostdlib with -r.

(cherry picked from commit 76e4fa70e79ee959c0e11eaacd4cf863291b1ddb)
bfd/elf32-i386.c
bfd/elf64-x86-64.c
ld/testsuite/ld-elf/linux-x86.exp
ld/testsuite/ld-elf/pr29377a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr29377b.c [new file with mode: 0644]