aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/ppc32elf.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-15 09:03:02 +0000
committerAlan Modra <amodra@gmail.com>2008-02-15 09:03:02 +0000
commit5503fea1b9e6164095b2afa6d52c734cad217b3c (patch)
tree2892a09e3ef387bd865d09f5fafbe3966f4ecde7 /ld/emultempl/ppc32elf.em
parent0c8d6e5c6d36827b284c46ae256ace8ed4e3daf8 (diff)
downloadgdb-5503fea1b9e6164095b2afa6d52c734cad217b3c.zip
gdb-5503fea1b9e6164095b2afa6d52c734cad217b3c.tar.gz
gdb-5503fea1b9e6164095b2afa6d52c734cad217b3c.tar.bz2
* 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.
Diffstat (limited to 'ld/emultempl/ppc32elf.em')
-rw-r--r--ld/emultempl/ppc32elf.em18
1 files changed, 5 insertions, 13 deletions
diff --git a/ld/emultempl/ppc32elf.em b/ld/emultempl/ppc32elf.em
index 79266a1..1a93ed4 100644
--- a/ld/emultempl/ppc32elf.em
+++ b/ld/emultempl/ppc32elf.em
@@ -27,17 +27,9 @@ fragment <<EOF
#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;
@@ -52,7 +44,7 @@ static int old_got = 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;
@@ -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)
{