PR23123, PowerPC32 ifunc regression
[external/binutils.git] / bfd / elf32-ppc.c
index 8629380..1200de8 100644 (file)
@@ -5899,9 +5899,9 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
              && !readonly_dynrelocs (h))
            {
              h->pointer_equality_needed = 0;
-             /* If we haven't seen a branch reloc then we don't need
-                a plt entry.  */
-             if (!h->needs_plt)
+             /* If we haven't seen a branch reloc and the symbol
+                isn't an ifunc then we don't need a plt entry.  */
+             if (!h->needs_plt && h->type != STT_GNU_IFUNC)
                h->plt.plist = NULL;
            }
          else if (!bfd_link_pic (info))
@@ -11390,8 +11390,8 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
 #define ELF_TARGET_ID          PPC32_ELF_DATA
 #define ELF_MACHINE_CODE       EM_PPC
 #define ELF_MAXPAGESIZE                0x10000
-#define ELF_COMMONPAGESIZE     0x10000
-#define ELF_MINPAGESIZE                0x1000
+#define ELF_COMMONPAGESIZE     0x1000
+#define ELF_RELROPAGESIZE      ELF_MAXPAGESIZE
 #define elf_info_to_howto      ppc_elf_info_to_howto
 
 #ifdef  EM_CYGNUS_POWERPC