Add output_type to bfd_link_info
[deliverable/binutils-gdb.git] / ld / emultempl / nds32elf.em
index 8a2be29769ddbcaf81ab87f94c15111d3d0db507..e74652aa53ed60e91351e93c5237df8a14f54713 100644 (file)
@@ -70,7 +70,7 @@ nds32_elf_create_output_section_statements (void)
 static void
 nds32_elf_after_parse (void)
 {
-  if (link_info.relocatable)
+  if (bfd_link_relocatable (&link_info))
     DISABLE_RELAXATION;
 
   if (!RELAXATION_ENABLED)
@@ -88,7 +88,7 @@ nds32_elf_after_parse (void)
   else
     update_ex9_table = 0;
 
-  if (link_info.shared)
+  if (bfd_link_pic (&link_info))
     {
       target_optimize = target_optimize & (!NDS32_RELAX_JUMP_IFC_ON);
       target_optimize = target_optimize & (!NDS32_RELAX_EX9_ON);
@@ -157,14 +157,14 @@ nds32_elf_after_open (void)
   /* Check object files if the target is dynamic linked executable
      or shared object.  */
   if (elf_hash_table (&link_info)->dynamic_sections_created
-      || link_info.shared || link_info.pie)
+      || bfd_link_pic (&link_info))
     {
       for (abfd = link_info.input_bfds; abfd != NULL; abfd = abfd->link.next)
        {
          if (!(elf_elfheader (abfd)->e_flags & E_NDS32_HAS_PIC))
            {
              /* Non-PIC object file is used.  */
-             if (link_info.shared || link_info.pie)
+             if (bfd_link_pic (&link_info))
                {
                  /* For PIE or shared object, all input must be PIC.  */
                  einfo (_("%B: must use -fpic to compile this file "
This page took 0.025652 seconds and 4 git commands to generate.