[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/17643] New: [x86-64] missing -z bndplt support
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug gold/17643] New: [x86-64] missing -z bndplt support |
Date: |
Mon, 24 Nov 2014 16:33:43 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=17643
Bug ID: 17643
Summary: [x86-64] missing -z bndplt support
Product: binutils
Version: 2.26 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at google dot com
Reporter: hjl.tools at gmail dot com
CC: ian at airs dot com
For Intel MPX, R_X86_64_*_BND relocations are not enough in case of
indirect calls like:
foo:
movq address@hidden(%rip), %rax
bnd jmp *(%rax)
.globl fp
.section .data.rel,"aw",@progbits
.align 8
.type fp, @object
.size fp, 8
fp:
.quad memcpy
There will be no R_X86_64_*_BND relocation but anyway linker needs to
generate extended PLT entry for memcpy.
A linker option (-z bndplt) is needed to create PLT entry with BND prefix for
all external branches and GCC will pass this option to linker for -mmpx. The
-z bndplt is implemented in bfd ld:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d258b828287a863376af60a1ef7ceafbccc83d93
and the PLT entry example with BND prefix can be found at:
https://github.com/hjl-tools/x86-64-psABI/tree/hjl/mpx/master
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug gold/17643] New: [x86-64] missing -z bndplt support,
hjl.tools at gmail dot com <=