aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2025-09-02 11:26:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2025-09-03 05:49:00 -0700
commitaad80d24d29efc2cb5d80f33f7ee127e918ba34f (patch)
tree0ad5a91a3faee195a71c8b43bddc694825be59fd /libctf
parent5d3a6f777d50bc72669c4fe02734bd48fd578cd8 (diff)
downloadbinutils-aad80d24d29efc2cb5d80f33f7ee127e918ba34f.zip
binutils-aad80d24d29efc2cb5d80f33f7ee127e918ba34f.tar.gz
binutils-aad80d24d29efc2cb5d80f33f7ee127e918ba34f.tar.bz2
x86: Check plt_got_offset for lazy IBT PLT
Lazy IBT PLT entries look like static const bfd_byte elf_i386_lazy_ibt_plt_entry[LAZY_PLT_ENTRY_SIZE] = { 0xf3, 0x0f, 0x1e, 0xfb, /* endbr32 */ 0x68, 0, 0, 0, 0, /* pushl immediate */ 0xe9, 0, 0, 0, 0, /* jmp relative */ 0x66, 0x90 /* xchg %ax,%ax */ }; static const bfd_byte elf_x86_64_lazy_ibt_plt_entry[LAZY_PLT_ENTRY_SIZE] = { 0xf3, 0x0f, 0x1e, 0xfa, /* endbr64 */ 0x68, 0, 0, 0, 0, /* pushq immediate */ 0xe9, 0, 0, 0, 0, /* jmpq relative */ 0x66, 0x90 /* xchg %ax,%ax */ }; They only have unsigned int plt_reloc_offset; /* ... offset into relocation table. */ and don't have unsigned int plt_got_offset; /* ... address of this symbol in .got. */ We should use plt_reloc_offset, not plt_got_offset, to check IBT PLT. PR binutils/33358 * elf32-i386.c (elf_i386_get_synthetic_symtab): Check plt_reloc_offset for lazy IBT PLT. * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Diffstat (limited to 'libctf')
0 files changed, 0 insertions, 0 deletions