Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(506)

Unified Diff: binutils/bfd/elf64-x86-64.c

Issue 3505001: [binutils] fix x86-64 PLT entries (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: final rebase for commit Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/bfd/elf64-x86-64.c
diff --git a/binutils/bfd/elf64-x86-64.c b/binutils/bfd/elf64-x86-64.c
index a82b4afe507b325ce4b1527ffafeb7556fa58830..5f57be07d0ff34eed240693e46997aade4be6369 100644
--- a/binutils/bfd/elf64-x86-64.c
+++ b/binutils/bfd/elf64-x86-64.c
@@ -394,9 +394,10 @@ static const bfd_byte elf64_x86_64_plt0_entry[PLT_ENTRY_SIZE] =
0x4c, 0x8b, 0x1d, 16, 0, 0, 0,/* movq GOT+16(%rip), %r11 */
#define elf_x86_64_plt0_entry_offset2 9
#define elf_x86_64_plt0_entry_instsize2 7
- 0x4d, 0x8b, 0x1b, /* mov (%r11), %r11 */
- 0x49, 0x83, 0xe3, 0xe0, /* andq NACLMASK, %r11 */
- 0x41, 0xff, 0xe3, /* jmp *%r11 */
+ 0x45, 0x89, 0xdb, /* mov %r11d, %r11d */
+ 0x41, 0x83, 0xe3, 0xe0, /* and NACLMASK,%r11d */
+ 0x4d, 0x01, 0xfb, /* add %r15, %r11 */
+ 0x41, 0xff, 0xe3, /* jmpq *%r11 */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
@@ -406,8 +407,7 @@ static const bfd_byte elf64_x86_64_plt0_entry[PLT_ENTRY_SIZE] =
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
- 0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
- 0x90 /* fill with nop instructions. */
+ 0x90, 0x90 /* fill with nop instructions. */
};
#else
static const bfd_byte elf64_x86_64_plt0_entry[PLT_ENTRY_SIZE] =
@@ -431,13 +431,13 @@ static const bfd_byte elf64_x86_64_plt_entry[PLT_ENTRY_SIZE] =
#define elf_x86_64_plt_entry_offset1 3
#define elf_x86_64_plt_entry_instsize1 7
0, 0, 0, 0, /* replaced with offset to this symbol in .got. */
- 0x4d, 0x8b, 0x1b, /* mov (%r11), %r11 */
- 0x49, 0x83, 0xe3, 0xe0, /* andq NACLMASK, %r11 */
- 0x41, 0xff, 0xe3, /* jmp *%r11 */
+ 0x45, 0x89, 0xdb, /* mov %r11d, %r11d */
+ 0x41, 0x83, 0xe3, 0xe0, /* and NACLMASK,%r11d */
+ 0x4d, 0x01, 0xfb, /* add %r15, %r11 */
+ 0x41, 0xff, 0xe3, /* jmpq *%r11 */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
0x90, 0x90, 0x90, 0x90, /* fill with nop instructions. */
- 0x90, 0x90, 0x90, /* fill with nop instructions. */
#define elf_x86_64_plt_entry_offset2 32
0x68, /* pushq immediate */
#define elf_x86_64_plt_entry_offset3 33
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698