* gdb.threads/print-threads.exp: Use gdb_breakpoint.
[deliverable/binutils-gdb.git] / bfd / elf64-x86-64.c
index c72a99477930b85c5453667ad2dad5dd65aa87c5..6ca622a0d23d26df5c30b92ade0c28639a0277b8 100644 (file)
@@ -350,7 +350,7 @@ static const bfd_byte elf64_x86_64_plt0_entry[PLT_ENTRY_SIZE] =
 {
   0xff, 0x35, 8, 0, 0, 0,      /* pushq GOT+8(%rip)  */
   0xff, 0x25, 16, 0, 0, 0,     /* jmpq *GOT+16(%rip) */
-  0x90, 0x90, 0x90, 0x90       /* pad out to 16 bytes with nops.  */
+  0x0f, 0x1f, 0x40, 0x00       /* nopl 0(%rax)       */
 };
 
 /* Subsequent entries in a procedure linkage table look like this.  */
@@ -2617,8 +2617,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                  val = bfd_get_8 (input_bfd, contents + roff + 1);
                  BFD_ASSERT (val == 0x10);
 
-                 /* Now modify the instruction as appropriate.  */
-                 bfd_put_8 (output_bfd, 0x90, contents + roff);
+                 /* Now modify the instruction as appropriate.  Use
+                    xchg %ax,%ax instead of 2 nops.  */
+                 bfd_put_8 (output_bfd, 0x66, contents + roff);
                  bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
                  continue;
                }
@@ -2910,8 +2911,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
              val = bfd_get_8 (input_bfd, contents + roff + 1);
              BFD_ASSERT (val == 0x10);
 
-             /* Now modify the instruction as appropriate.  */
-             bfd_put_8 (output_bfd, 0x90, contents + roff);
+             /* Now modify the instruction as appropriate.  Use
+                xchg %ax,%ax instead of 2 nops.  */
+             bfd_put_8 (output_bfd, 0x66, contents + roff);
              bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
 
              continue;
@@ -3618,6 +3620,19 @@ elf64_x86_64_additional_program_headers (bfd *abfd,
   return count;
 }
 
+/* Return TRUE if symbol should be hashed in the `.gnu.hash' section.  */
+
+static bfd_boolean
+elf64_x86_64_hash_symbol (struct elf_link_hash_entry *h)
+{
+  if (h->plt.offset != (bfd_vma) -1
+      && !h->def_regular
+      && !h->pointer_equality_needed)
+    return FALSE;
+
+  return _bfd_elf_hash_symbol (h);
+}
+
 static const struct bfd_elf_special_section 
   elf64_x86_64_special_sections[]=
 {
@@ -3691,5 +3706,7 @@ static const struct bfd_elf_special_section
   elf64_x86_64_special_sections
 #define elf_backend_additional_program_headers \
   elf64_x86_64_additional_program_headers
+#define elf_backend_hash_symbol \
+  elf64_x86_64_hash_symbol
 
 #include "elf64-target.h"
This page took 0.028492 seconds and 4 git commands to generate.