Fix date in ChangeLog entry
[deliverable/binutils-gdb.git] / bfd / elf32-ppc.c
index e20e804ce7e27bf5363ba3fddb02bc384fbb060b..04c2d6ad60b4122eb1727e932cfcda035feeac68 100644 (file)
@@ -3636,9 +3636,10 @@ ppc_elf_add_symbol_hook (bfd *abfd,
       *valp = sym->st_size;
     }
 
-  if ((abfd->flags & DYNAMIC) == 0
-      && (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
-         || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE))
+  if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
+       || ELF_ST_BIND (sym->st_info) == STB_GNU_UNIQUE)
+      && (abfd->flags & DYNAMIC) == 0
+      && bfd_get_flavour (info->output_bfd) == bfd_target_elf_flavour)
     elf_tdata (info->output_bfd)->has_gnu_symbols = TRUE;
 
   return TRUE;
@@ -5512,9 +5513,12 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
        {
          /* Taking a function's address in a read/write section
             doesn't require us to define the function symbol in the
-            executable on a global entry stub.  A dynamic reloc can
+            executable on a plt call stub.  A dynamic reloc can
             be used instead.  */
          if (h->pointer_equality_needed
+             && h->type != STT_GNU_IFUNC
+             && !htab->is_vxworks
+             && !ppc_elf_hash_entry (h)->has_sda_refs
              && !readonly_dynrelocs (h))
            {
              h->pointer_equality_needed = 0;
@@ -7162,7 +7166,7 @@ ppc_elf_relax_section (bfd *abfd,
       bfd_vma pagesize = (bfd_vma) 1 << htab->params->pagesize_p2;
 
       addr = isec->output_section->vma + isec->output_offset;
-      end_addr = addr + trampoff - 1;
+      end_addr = addr + trampoff;
       addr &= -pagesize;
       crossings = ((end_addr & -pagesize) - addr) >> htab->params->pagesize_p2;
       if (crossings != 0)
This page took 0.025578 seconds and 4 git commands to generate.