Don't include libbfd.h outside of bfd, part 1
[external/binutils.git] / ld / emultempl / ppc32elf.em
index a0255cd..95df30d 100644 (file)
@@ -24,7 +24,6 @@
 #
 fragment <<EOF
 
-#include "libbfd.h"
 #include "elf32-ppc.h"
 #include "ldlex.h"
 #include "ldlang.h"
@@ -39,9 +38,7 @@ static int notlsopt = 0;
 /* Choose the correct place for .got.  */
 static int old_got = 0;
 
-static bfd_vma pagesize = 0;
-
-static struct ppc_elf_params params = { PLT_UNSET, -1, 0, 0, 0, 0, 0 };
+static struct ppc_elf_params params = { PLT_UNSET, -1, 0, 0, 0, 0, 0, 0 };
 
 static void
 ppc_after_open_output (void)
@@ -49,9 +46,8 @@ ppc_after_open_output (void)
   if (params.emit_stub_syms < 0)
     params.emit_stub_syms = (link_info.emitrelocations
                             || bfd_link_pic (&link_info));
-  if (pagesize == 0)
-    pagesize = config.commonpagesize;
-  params.pagesize_p2 = bfd_log2 (pagesize);
+  if (params.pagesize == 0)
+    params.pagesize = config.commonpagesize;
   ppc_elf_link_params (&link_info, &params);
 }
 
@@ -331,10 +327,10 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
       if (optarg != NULL)
        {
          char *end;
-         pagesize = strtoul (optarg, &end, 0);
+         params.pagesize = strtoul (optarg, &end, 0);
          if (*end
-             || (pagesize < 4096 && pagesize != 0)
-             || pagesize != (pagesize & -pagesize))
+             || (params.pagesize < 4096 && params.pagesize != 0)
+             || params.pagesize != (params.pagesize & -params.pagesize))
            einfo (_("%P%F: invalid pagesize `%s'\''\n"), optarg);
        }
       break;