diff options
author | Roland McGrath <roland@gnu.org> | 2012-04-17 19:53:19 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2012-04-17 19:53:19 +0000 |
commit | ea2d813e519466eb6f73b7545b5628aa0b0a8b52 (patch) | |
tree | 81d6ef9e00e8543ffa0b2a07d5cf86dc4b32b1a7 | |
parent | f3525b7005f35963fd600d819b85d34cffb5dbca (diff) | |
download | gdb-ea2d813e519466eb6f73b7545b5628aa0b0a8b52.zip gdb-ea2d813e519466eb6f73b7545b5628aa0b0a8b52.tar.gz gdb-ea2d813e519466eb6f73b7545b5628aa0b0a8b52.tar.bz2 |
* elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
so that 32-byte boundary is a proper instruction boundary.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 7871002..e9ac993 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2012-04-17 Roland McGrath <mcgrathr@google.com> + + * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding + so that 32-byte boundary is a proper instruction boundary. + 2012-04-17 Tristan Gingold <gingold@adacore.com> * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 8ca811c..3b1c0cc 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] = |