bfd/
[deliverable/binutils-gdb.git] / bfd / elf64-alpha.c
index 76d0661a11657055261af2a583636279f8eede74..1f7e546d335d89fc25f6daa9d2ca62840b6f4a23 100644 (file)
@@ -321,11 +321,14 @@ struct alpha_elf_obj_tdata
 static bfd_boolean
 elf64_alpha_mkobject (bfd *abfd)
 {
-  bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
-  abfd->tdata.any = bfd_zalloc (abfd, amt);
   if (abfd->tdata.any == NULL)
-    return FALSE;
-  return TRUE;
+    {
+      bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
+      abfd->tdata.any = bfd_zalloc (abfd, amt);
+      if (abfd->tdata.any == NULL)
+       return FALSE;
+    }
+  return bfd_elf_mkobject (abfd);
 }
 
 static bfd_boolean
@@ -1898,7 +1901,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
              if (rel_sec_name == NULL)
                return FALSE;
 
-             BFD_ASSERT (strncmp (rel_sec_name, ".rela", 5) == 0
+             BFD_ASSERT (CONST_STRNEQ (rel_sec_name, ".rela")
                          && strcmp (bfd_get_section_name (abfd, sec),
                                     rel_sec_name+5) == 0);
            }
@@ -2758,7 +2761,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
         of the dynobj section names depend upon the input files.  */
       name = bfd_get_section_name (dynobj, s);
 
-      if (strncmp (name, ".rela", 5) == 0)
+      if (CONST_STRNEQ (name, ".rela"))
        {
          if (s->size != 0)
            {
@@ -2770,7 +2773,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
              s->reloc_count = 0;
            }
        }
-      else if (strncmp (name, ".got", 4) != 0
+      else if (! CONST_STRNEQ (name, ".got")
               && strcmp (name, ".plt") != 0
               && strcmp (name, ".dynbss") != 0)
        {
@@ -5145,9 +5148,9 @@ elf64_alpha_reloc_type_class (const Elf_Internal_Rela *rela)
 \f
 static const struct bfd_elf_special_section elf64_alpha_special_sections[] =
 {
-  { ".sbss",  5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
-  { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
-  { NULL,     0,  0, 0,            0 }
+  { STRING_COMMA_LEN (".sbss"),  -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+  { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+  { NULL,                     0,  0, 0,            0 }
 };
 
 /* ECOFF swapping routines.  These are used when dealing with the
@@ -5231,6 +5234,7 @@ static const struct elf_size_info alpha_elf_size_info =
 #define ELF_ARCH               bfd_arch_alpha
 #define ELF_MACHINE_CODE       EM_ALPHA
 #define ELF_MAXPAGESIZE        0x10000
+#define ELF_COMMONPAGESIZE     0x2000
 
 #define bfd_elf64_bfd_link_hash_table_create \
   elf64_alpha_bfd_link_hash_table_create
@@ -5271,6 +5275,8 @@ static const struct elf_size_info alpha_elf_size_info =
   elf64_alpha_always_size_sections
 #define elf_backend_size_dynamic_sections \
   elf64_alpha_size_dynamic_sections
+#define elf_backend_omit_section_dynsym \
+  ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
 #define elf_backend_relocate_section \
   elf64_alpha_relocate_section
 #define elf_backend_finish_dynamic_symbol \
This page took 0.025773 seconds and 4 git commands to generate.