diff options
author | Josh Poimboeuf <jpoimboe@kernel.org> | 2024-11-01 15:36:03 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2024-11-01 15:36:03 -0700 |
commit | 938fb512184d90d24b86c42ef53ef33c943cbe8b (patch) | |
tree | cf2b1db30675083d0b893d70c8261f93d66d9200 /gdb/rust-lang.h | |
parent | 1785837a25709721358dab9ee16bbfee74f5f4d1 (diff) | |
download | gdb-938fb512184d90d24b86c42ef53ef33c943cbe8b.zip gdb-938fb512184d90d24b86c42ef53ef33c943cbe8b.tar.gz gdb-938fb512184d90d24b86c42ef53ef33c943cbe8b.tar.bz2 |
ld: fix wrong SFrame info for lazy IBT PLT
Fix PR/32296 sframe: wrong SFrame info for pltN and .plt.sec for -z ibtplt
The x86 psABI defines a 2-PLT scheme for IBT which uses .plt and
.plt.sec entries. It was observed that SFrame information for .plt.sec
section was incorrect. The erroneous assumption was that SFrame stack
trace information for .plt.sec with lazy binding is the same as SFrame
stack trace information for .plt with lazy binding. This is corrected
now by initializing a new SFrame PLT helper object
elf_x86_64_sframe_ibt_plt for lazy PLT with IBT.
Add a testcase where linking with -z ibtplt generates .plt.sec entries and
ensure correct SFrame information for it.
Committed by Indu Bhagat.
ChangeLog:
PR/32296
* bfd/elf64-x86-64.c (elf_x86_64_sframe_ibt_pltn_fre2): New
definition elf_x86_64_sframe_ibt_plt. Use it in
elf_x86_64_sframe_plt.
(elf_x86_64_link_setup_gnu_properties): Lazy IBT PLT entries are
different from lazy PLT.
* bfd/elfxx-x86.c (_bfd_x86_elf_create_sframe_plt): Adjust for
SFrame for IBT PLT.
* ld/testsuite/ld-x86-64/x86-64.exp: Add new test.
* ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d: New test.
Diffstat (limited to 'gdb/rust-lang.h')
0 files changed, 0 insertions, 0 deletions