* m16.igen (break): Call SignalException not sim_engine_halt.
[deliverable/binutils-gdb.git] / bfd / elf64-alpha.c
index a21d1b9f32c03568cd213a756c63030b7b4f4f0f..84f3075e4c82a265f03a13f2c8a975e1b31c9b8e 100644 (file)
@@ -125,6 +125,10 @@ static boolean elf64_alpha_finish_dynamic_sections
   PARAMS((bfd *, struct bfd_link_info *));
 static boolean elf64_alpha_final_link
   PARAMS((bfd *, struct bfd_link_info *));
+static boolean elf64_alpha_merge_ind_symbols
+  PARAMS((struct alpha_elf_link_hash_entry *, PTR));
+static Elf_Internal_Rela * elf64_alpha_find_reloc_at_ofs
+  PARAMS ((Elf_Internal_Rela *, Elf_Internal_Rela *, bfd_vma, int));
 
 \f
 struct alpha_elf_link_hash_entry
@@ -2577,9 +2581,10 @@ elf64_alpha_check_relocs (abfd, info, sec, relocs)
              else
                rent->count++;
            }
-         else if (info->shared)
+         else if (info->shared && (sec->flags & SEC_ALLOC))
            {
-             /* If this is a shared library, we need a RELATIVE reloc.  */
+             /* If this is a shared library, and the section is to be
+                loaded into memory, we need a RELATIVE reloc.  */
              sreloc->_raw_size += sizeof (Elf64_External_Rela);
            }
          break;
@@ -3470,13 +3475,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
            }
          else if (h->root.root.type == bfd_link_hash_undefweak)
            relocation = 0;
-         else if (info->shared && !info->symbolic && !info->no_undefined)
+         else if (info->shared && !info->symbolic
+                  && !info->no_undefined
+                  && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
            relocation = 0;
          else
            {
              if (!((*info->callbacks->undefined_symbol)
                    (info, h->root.root.root.string, input_bfd,
-                    input_section, rel->r_offset)))
+                    input_section, rel->r_offset,
+                    (!info->shared || info->no_undefined
+                     || ELF_ST_VISIBILITY (h->root.other)))))
                return false;
              relocation = 0;
            }
@@ -3618,7 +3627,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
                outrel.r_addend = addend;
                addend = 0, relocation = 0;
              }
-           else if (info->shared)
+           else if (info->shared && (input_section->flags & SEC_ALLOC))
              {
                outrel.r_info = ELF64_R_INFO(0, R_ALPHA_RELATIVE);
                outrel.r_addend = 0;
@@ -4634,6 +4643,36 @@ elf64_alpha_ecoff_debug_swap =
   elf64_alpha_read_ecoff_info
 };
 \f
+/* Use a non-standard hash bucket size of 8.  */
+
+const struct elf_size_info alpha_elf_size_info =
+{
+  sizeof (Elf64_External_Ehdr),
+  sizeof (Elf64_External_Phdr),
+  sizeof (Elf64_External_Shdr),
+  sizeof (Elf64_External_Rel),
+  sizeof (Elf64_External_Rela),
+  sizeof (Elf64_External_Sym),
+  sizeof (Elf64_External_Dyn),
+  sizeof (Elf_External_Note),
+  8,
+  1,
+  64, 8,
+  ELFCLASS64, EV_CURRENT,
+  bfd_elf64_write_out_phdrs,
+  bfd_elf64_write_shdrs_and_ehdr,
+  bfd_elf64_write_relocs,
+  bfd_elf64_swap_symbol_out,
+  bfd_elf64_slurp_reloc_table,
+  bfd_elf64_slurp_symbol_table,
+  bfd_elf64_swap_dyn_in,
+  bfd_elf64_swap_dyn_out,
+  NULL,
+  NULL,
+  NULL,
+  NULL
+};
+
 #define TARGET_LITTLE_SYM      bfd_elf64_alpha_vec
 #define TARGET_LITTLE_NAME     "elf64-alpha"
 #define ELF_ARCH               bfd_arch_alpha
@@ -4689,6 +4728,9 @@ elf64_alpha_ecoff_debug_swap =
 #define elf_backend_ecoff_debug_swap \
   &elf64_alpha_ecoff_debug_swap
 
+#define elf_backend_size_info \
+  alpha_elf_size_info
+
 /*
  * A few constants that determine how the .plt section is set up.
  */
This page took 0.025556 seconds and 4 git commands to generate.