From: Alan Modra Date: Fri, 15 Feb 2008 09:03:02 +0000 (+0000) Subject: * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5503fea1b9e6164095b2afa6d52c734cad217b3c;p=binutils-gdb.git * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id. * emultempl/hppaelf.em (hppaelf_create_output_section_statements): Likewise. * emultempl/ppc64elf.em (ppc_create_output_section_statements): Likewise. * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all uses with.. (is_ppc_elf): ..this new macro. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index ec63420c023..f8d3bf85844 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2008-02-15 Alan Modra + + * emultempl/alphaelf.em (alpha_after_open): Use elf_object_id. + * emultempl/hppaelf.em (hppaelf_create_output_section_statements): + Likewise. + * emultempl/ppc64elf.em (ppc_create_output_section_statements): + Likewise. + * emultempl/ppc32elf.em (is_ppc_elf32_vec): Delete. Replace all + uses with.. + (is_ppc_elf): ..this new macro. + 2008-02-15 Alan Modra * ldmain.h (output_bfd): Delete. diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em index 81bb377d730..d6766ba51ff 100644 --- a/ld/emultempl/alphaelf.em +++ b/ld/emultempl/alphaelf.em @@ -32,8 +32,6 @@ static bfd_boolean limit_32bit; static bfd_boolean disable_relaxation; extern bfd_boolean elf64_alpha_use_secureplt; -extern const bfd_target bfd_elf64_alpha_vec; -extern const bfd_target bfd_elf64_alpha_freebsd_vec; /* Set the start address as in the Tru64 ld. */ @@ -42,8 +40,8 @@ extern const bfd_target bfd_elf64_alpha_freebsd_vec; static void alpha_after_open (void) { - if (link_info.output_bfd->xvec == &bfd_elf64_alpha_vec - || link_info.output_bfd->xvec == &bfd_elf64_alpha_freebsd_vec) + if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour + && elf_object_id (link_info.output_bfd) == ALPHA_ELF_TDATA) { unsigned int num_plt; lang_output_section_statement_type *os; diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index f5808b3385c..182ab5307bb 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -67,13 +67,8 @@ hppaelf_after_parse (void) static void hppaelf_create_output_section_statements (void) { - extern const bfd_target bfd_elf32_hppa_linux_vec; - extern const bfd_target bfd_elf32_hppa_nbsd_vec; - extern const bfd_target bfd_elf32_hppa_vec; - - if (link_info.output_bfd->xvec != &bfd_elf32_hppa_linux_vec - && link_info.output_bfd->xvec != &bfd_elf32_hppa_nbsd_vec - && link_info.output_bfd->xvec != &bfd_elf32_hppa_vec) + if (!(bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour + && elf_object_id (link_info.output_bfd) == HPPA_ELF_TDATA)) return; stub_file = lang_add_input_file ("linker stubs", diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em index 79266a1b5cc..1a93ed44927 100644 --- a/ld/emultempl/ppc32elf.em +++ b/ld/emultempl/ppc32elf.em @@ -27,17 +27,9 @@ fragment <xvec)) + if (is_ppc_elf (link_info.output_bfd)) { int new_plt; int keep_new; @@ -109,7 +101,7 @@ ppc_after_open (void) static void ppc_before_allocation (void) { - if (is_ppc_elf32_vec (link_info.output_bfd->xvec)) + if (is_ppc_elf (link_info.output_bfd)) { if (ppc_elf_tls_setup (link_info.output_bfd, &link_info) && !notlsopt) { diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index f6af69595db..51623b18a43 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -72,11 +72,8 @@ static int non_overlapping_opd = 0; static void ppc_create_output_section_statements (void) { - extern const bfd_target bfd_elf64_powerpc_vec; - extern const bfd_target bfd_elf64_powerpcle_vec; - - if (link_info.output_bfd->xvec != &bfd_elf64_powerpc_vec - && link_info.output_bfd->xvec != &bfd_elf64_powerpcle_vec) + if (!(bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour + && elf_object_id (link_info.output_bfd) == PPC64_ELF_TDATA)) return; link_info.wrap_char = '.';