+2008-02-15 Alan Modra <amodra@bigpond.net.au>
+
+ * 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 <amodra@bigpond.net.au>
* ldmain.h (output_bfd): Delete.
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. */
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;
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",
#include "libbfd.h"
#include "elf32-ppc.h"
-extern const bfd_target bfd_elf32_powerpc_vec;
-extern const bfd_target bfd_elf32_powerpcle_vec;
-extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
-
-static inline int
-is_ppc_elf32_vec(const bfd_target * vec)
-{
- return (vec == &bfd_elf32_powerpc_vec
- || vec == &bfd_elf32_powerpc_vxworks_vec
- || vec == &bfd_elf32_powerpcle_vec);
-}
+#define is_ppc_elf(bfd) \
+ (bfd_get_flavour (bfd) == bfd_target_elf_flavour \
+ && elf_object_id (bfd) == PPC32_ELF_TDATA)
/* Whether to run tls optimization. */
static int notlsopt = 0;
static void
ppc_after_open (void)
{
- if (is_ppc_elf32_vec (link_info.output_bfd->xvec))
+ if (is_ppc_elf (link_info.output_bfd))
{
int new_plt;
int keep_new;
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)
{
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 = '.';