aboutsummaryrefslogtreecommitdiff
path: root/gdb/sol2-tdep.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2023-06-08 12:12:48 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-12-28 08:47:17 -0800
commit4a54cb06585f568031dfd291d0fe45979ad75e98 (patch)
tree2469a2d8eb9ce968fd9ef5039d25679bae946e3b /gdb/sol2-tdep.c
parent3d5a60de52556f6a53d71d7e607c6696450ae3e4 (diff)
downloadgdb-4a54cb06585f568031dfd291d0fe45979ad75e98.zip
gdb-4a54cb06585f568031dfd291d0fe45979ad75e98.tar.gz
gdb-4a54cb06585f568031dfd291d0fe45979ad75e98.tar.bz2
gold: Handle R_X86_64_CODE_4_GOTPCRELX
Handle R_X86_64_CODE_4_GOTPCRELX and convert mov name@GOTPCREL(%rip), %r31 to lea name@GOTPCREL(%rip), %r31 if the instruction is encoded with the REX2 prefix when possible. elfcpp/ * x86_64.h (R_X86_64_CODE_4_GOTPCRELX): New. gold/ * x86_64.cc (Target_x86_64::can_convert_mov_to_lea): Handle R_X86_64_CODE_4_GOTPCRELX. (Target_x86_64::Scan::get_reference_flags): Likewise. (Target_x86_64::Scan::local): Likewise. (Target_x86_64::Scan::possible_function_pointer_reloc): Likewise. (Target_x86_64::Scan::global): Likewise. (Target_x86_64::Relocate::relocate): Likewise. * testsuite/x86_64_mov_to_lea1.s: Add a test for R_X86_64_CODE_4_GOTPCRELX. * testsuite/x86_64_mov_to_lea2.s: Likewise. * testsuite/x86_64_mov_to_lea3.s: Likewise. * testsuite/x86_64_mov_to_lea4.s: Likewise. * testsuite/x86_64_mov_to_lea5.s: Likewise. * testsuite/x86_64_mov_to_lea.sh: Updated.
Diffstat (limited to 'gdb/sol2-tdep.c')
0 files changed, 0 insertions, 0 deletions