summaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-04-17 19:53:18 +0000
committerRoland McGrath <roland@gnu.org>2012-04-17 19:53:18 +0000
commit61662c2a57c48c6dde39365a94eead7cfe581658 (patch)
tree90000df000ae3fb7c11ea10affd3ae9f8926d0e5 /bfd/elf64-x86-64.c
parent35f0f1350ff266a8190d20e3e28e82f265a52518 (diff)
downloadbinutils-redhat-61662c2a57c48c6dde39365a94eead7cfe581658.tar.gz
* elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
so that 32-byte boundary is a proper instruction boundary.
Diffstat (limited to 'bfd/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 8ca811c8df..3b1c0cc4d0 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -5134,13 +5134,16 @@ static const bfd_byte elf_x86_64_nacl_plt0_entry[NACL_PLT_ENTRY_SIZE] =
0x4d, 0x01, 0xfb, /* add %r15, %r11 */
0x41, 0xff, 0xe3, /* jmpq *%r11 */
- /* 41 bytes of nop to pad out to the standard size. */
+ /* 9-byte nop sequence to pad out to the next 32-byte boundary. */
+ 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopl %cs:0x0(%rax,%rax,1) */
+
+ /* 32 bytes of nop to pad out to the standard size. */
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data32 prefixes */
0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
0x66, 0x66, 0x66, 0x66, 0x66, 0x66, /* excess data32 prefixes */
0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
- 0x66, 0x66, /* excess data32 prefixes */
- 0x2e, 0x0f, 0x1f, 0x84, 0, 0, 0, 0, 0, /* nopw %cs:0x0(%rax,%rax,1) */
+ 0x66, /* excess data32 prefix */
+ 0x90 /* nop */
};
static const bfd_byte elf_x86_64_nacl_plt_entry[NACL_PLT_ENTRY_SIZE] =