#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
+#include "ecoff-bfd.h"
#include "elf/alpha.h"
if (hdr->sh_type == SHT_ALPHA_DEBUG)
{
- if (! bfd_set_section_flags (abfd, newsect,
- (bfd_get_section_flags (abfd, newsect)
- | SEC_DEBUGGING)))
+ if (!bfd_set_section_flags (newsect,
+ bfd_section_flags (newsect) | SEC_DEBUGGING))
return FALSE;
}
{
register const char *name;
- name = bfd_get_section_name (abfd, sec);
+ name = bfd_section_name (sec);
if (strcmp (name, ".mdebug") == 0)
{
| SEC_LINKER_CREATED);
s = bfd_make_section_anyway_with_flags (abfd, ".got", flags);
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, 3))
+ || !bfd_set_section_alignment (s, 3))
return FALSE;
alpha_elf_tdata (abfd)->got = s;
| (elf64_alpha_use_secureplt ? SEC_READONLY : 0));
s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags);
elf_hash_table (info)->splt = s;
- if (s == NULL || ! bfd_set_section_alignment (abfd, s, 4))
+ if (s == NULL || ! bfd_set_section_alignment (s, 4))
return FALSE;
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
| SEC_LINKER_CREATED | SEC_READONLY);
s = bfd_make_section_anyway_with_flags (abfd, ".rela.plt", flags);
elf_hash_table (info)->srelplt = s;
- if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
+ if (s == NULL || ! bfd_set_section_alignment (s, 3))
return FALSE;
if (elf64_alpha_use_secureplt)
flags = SEC_ALLOC | SEC_LINKER_CREATED;
s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags);
elf_hash_table (info)->sgotplt = s;
- if (s == NULL || ! bfd_set_section_alignment (abfd, s, 3))
+ if (s == NULL || ! bfd_set_section_alignment (s, 3))
return FALSE;
}
s = bfd_make_section_anyway_with_flags (abfd, ".rela.got", flags);
elf_hash_table (info)->srelgot = s;
if (s == NULL
- || !bfd_set_section_alignment (abfd, s, 3))
+ || !bfd_set_section_alignment (s, 3))
return FALSE;
/* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the
if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset,
filename_ptr, functionname_ptr,
line_ptr, discriminator_ptr,
- dwarf_debug_sections, 0,
- &elf_tdata (abfd)->dwarf2_find_line_info))
+ dwarf_debug_sections,
+ &elf_tdata (abfd)->dwarf2_find_line_info)
+ == 1)
return TRUE;
msec = bfd_get_section_by_name (abfd, ".mdebug");
h->esym.asym.sc = scUndefined;
else
{
- name = bfd_section_name (output_section->owner, output_section);
+ name = bfd_section_name (output_section);
if (strcmp (name, ".text") == 0)
h->esym.asym.sc = scText;
/* It's OK to base decisions on the section name, because none
of the dynobj section names depend upon the input files. */
- name = bfd_get_section_name (dynobj, s);
+ name = bfd_section_name (s);
if (CONST_STRNEQ (name, ".rela"))
{
if (name == NULL)
name = _("<unknown>");
else if (name[0] == 0)
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
_bfd_error_handler
/* xgettext:c-format */
if (name == NULL)
return FALSE;
if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
+ name = bfd_section_name (sec);
}
(*info->callbacks->reloc_overflow)
(info, (h ? &h->root.root : NULL), name, howto->name,
"FreeBSD" label in the ELF header. So we put this label on all
executables and (for simplicity) also all other object files. */
-static void
-elf64_alpha_fbsd_post_process_headers (bfd * abfd,
- struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
+static bfd_boolean
+elf64_alpha_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info)
{
Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
+ if (!_bfd_elf_init_file_header (abfd, info))
+ return FALSE;
+
i_ehdrp = elf_elfheader (abfd);
/* Put an ABI label supported by FreeBSD >= 4.1. */
/* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
#endif
+ return TRUE;
}
-#undef elf_backend_post_process_headers
-#define elf_backend_post_process_headers \
- elf64_alpha_fbsd_post_process_headers
+#undef elf_backend_init_file_header
+#define elf_backend_init_file_header \
+ elf64_alpha_fbsd_init_file_header
#undef elf64_bed
#define elf64_bed elf64_alpha_fbsd_bed