[prev in list] [next in list] [prev in thread] [next in thread]
List: binutils-bugs
Subject: [Bug gold/17643] New: [x86-64] missing -z bndplt support
From: "hjl.tools at gmail dot com" <sourceware-bugzilla () sourceware ! org>
Date: 2014-11-24 16:33:43
Message-ID: bug-17643-70 () http ! sourceware ! org/bugzilla/
[Download RAW message or body]
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 fp@GOTPCREL(%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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic