Allocate the first .plt entry space only if needed
[deliverable/binutils-gdb.git] / bfd / elf64-x86-64.c
index 34e0f835cddccd1300954365af83ccea4c963e4f..e9b560184c74e921db752e6ce93268d2ec5393c6 100644 (file)
@@ -2558,15 +2558,14 @@ elf_x86_64_allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
          asection *bnd_s = htab->plt_bnd;
          asection *got_s = htab->plt_got;
 
-         /* If this is the first .plt entry, make room for the special
-            first entry.  */
-         if (s->size == 0)
-           s->size = plt_entry_size;
-
          if (use_plt_got)
            eh->plt_got.offset = got_s->size;
          else
            {
+             /* If this is the first .plt entry, make room for the
+                special first entry.  */
+             if (s->size == 0)
+               s->size = plt_entry_size;
              h->plt.offset = s->size;
              if (bnd_s)
                eh->plt_bnd.offset = bnd_s->size;
This page took 0.023506 seconds and 4 git commands to generate.