OSDN Git Service

* elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
authorAlan Modra <amodra@bigpond.net.au>
Tue, 30 Jul 2002 05:40:20 +0000 (05:40 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Tue, 30 Jul 2002 05:40:20 +0000 (05:40 +0000)
bfd/ChangeLog
bfd/elfxx-ia64.c

index 284f275..7693399 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-30  Alan Modra  <amodra@bigpond.net.au>
+
+       * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
+
 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
 
        * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
index eda0a05..4de90df 100644 (file)
@@ -1187,6 +1187,19 @@ elfNN_ia64_final_write_processing (abfd, linker)
          break;
        }
     }
+
+  if (! elf_flags_init (abfd))
+    {
+      unsigned long flags = 0;
+
+      if (abfd->xvec->byteorder == BFD_ENDIAN_BIG)
+       flags |= EF_IA_64_BE;
+      if (bfd_get_mach (abfd) == bfd_mach_ia64_elf64)
+       flags |= EF_IA_64_ABI64;
+
+      elf_elfheader(abfd)->e_flags = flags;
+      elf_flags_init (abfd) = true;
+    }
 }
 
 /* Hook called by the linker routine which adds symbols from an object