diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-11-12 15:46:55 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-11-17 08:57:56 -0800 |
commit | c33205431ae179ed500f2840759a7624af1a23d4 (patch) | |
tree | 3a0a8253cc51e3a32c1cde36e5cabf70daa00930 /include | |
parent | b13704181fe2e5d89f95342d9a173df8b9a1a34c (diff) | |
download | gdb-c33205431ae179ed500f2840759a7624af1a23d4.zip gdb-c33205431ae179ed500f2840759a7624af1a23d4.tar.gz gdb-c33205431ae179ed500f2840759a7624af1a23d4.tar.bz2 |
Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND
bfd/
* elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND
and R_X86_64_PLT32_BND.
(R_X86_64_standard): Replace R_X86_64_RELATIVE64 with
R_X86_64_PLT32_BND.
(IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND.
(x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and
BFD_RELOC_X86_64_PLT32_BND.
(elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and
R_X86_64_PLT32_BND.
(elf_x86_64_gc_sweep_hook): Likewise.
(elf_x86_64_relocate_section): Likewise.
* reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND
and BFD_RELOC_X86_64_PLT32_BND.
* bfd-in2.h: Regenerated.
* libbfd.h: Likewise.
gas/
* config/tc-i386.c (reloc): Add an argument, bnd_prefix, to
indicate if instruction has the BND prefix. Return
BFD_RELOC_X86_64_PC32_BND instead of BFD_RELOC_32_PCREL if
bnd_prefix isn't zero.
(output_branch): Pass BFD_RELOC_X86_64_PC32_BND to frag_var
if needed.
(output_jump): Update reloc call.
(output_interseg_jump): Likewise.
(output_disp): Likewise.
(output_imm): Likewise.
(x86_cons_fix_new): Likewise.
(lex_got): Add an argument, bnd_prefix, to indicate if
instruction has the BND prefix. Use BFD_RELOC_X86_64_PLT32_BND
if needed.
(x86_cons): Update lex_got call.
(i386_immediate): Likewise.
(i386_displacement): Likewise.
(md_apply_fix): Handle BFD_RELOC_X86_64_PC32_BND and
BFD_RELOC_X86_64_PLT32_BND.
(tc_gen_reloc): Likewise.
* config/tc-i386-intel.c (i386_operator): Update lex_got call.
gas/testsuite/
* gas/i386/i386.exp: Run x86-64-mpx-branch-1 and
x86-64-mpx-branch-2 on 64-bit ELF targets.
* gas/i386/x86-64-mpx-branch-1.d: New file.
* gas/i386/x86-64-mpx-branch-1.s: Likewise.
* gas/i386/x86-64-mpx-branch-2.d: Likewise.
* gas/i386/x86-64-mpx-branch-2.s: Likewise.
include/elf/
* x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND.
ld/testsuite/
* ld-x86-64/mpx.exp: New file.
* ld-x86-64/mpx1.out: Likewise.
* ld-x86-64/mpx1a.c: Likewise.
* ld-x86-64/mpx1a.rd: Likewise.
* ld-x86-64/mpx1b.c: Likewise.
* ld-x86-64/mpx1c.c: Likewise.
* ld-x86-64/mpx1c.rd: Likewise.
Diffstat (limited to 'include')
-rw-r--r-- | include/elf/ChangeLog | 4 | ||||
-rw-r--r-- | include/elf/x86-64.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index dc22619..1dcb9f9 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2013-11-17 H.J. Lu <hongjiu.lu@intel.com> + + * x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND. + 2013-11-13 Yufeng Zhang <yufeng.zhang@arm.com> * aarch64.h: Define R_AARCH64_TLS_DTPMOD64, diff --git a/include/elf/x86-64.h b/include/elf/x86-64.h index 0ce92cd..ec59dbd 100644 --- a/include/elf/x86-64.h +++ b/include/elf/x86-64.h @@ -74,6 +74,10 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type) RELOC_NUMBER (R_X86_64_TLSDESC, 36) /* 2x64-bit TLS descriptor. */ RELOC_NUMBER (R_X86_64_IRELATIVE, 37) /* Adjust indirectly by program base */ RELOC_NUMBER (R_X86_64_RELATIVE64, 38) /* 64bit adjust by program base */ + RELOC_NUMBER (R_X86_64_PC32_BND, 39) /* PC relative 32 bit + signed with BND prefix */ + RELOC_NUMBER (R_X86_64_PLT32_BND, 40) /* 32 bit PLT address with + BND prefix */ RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */ RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */ END_RELOC_NUMBERS (R_X86_64_max) |