aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-12-04 03:03:27 +0000
committerAlan Modra <amodra@gmail.com>2003-12-04 03:03:27 +0000
commit66becf3266af273709dff2d4750ae9a1810ce6bd (patch)
treea3cfffb12e4a8018acae0c4d0cf74e20bcfe6f50 /bfd
parentb80901c73fc8231882b800f904b23b3bc32431bb (diff)
downloadgdb-66becf3266af273709dff2d4750ae9a1810ce6bd.zip
gdb-66becf3266af273709dff2d4750ae9a1810ce6bd.tar.gz
gdb-66becf3266af273709dff2d4750ae9a1810ce6bd.tar.bz2
* elf32-i386.c (elf_i386_object_p): Delete.
(elf_backend_object_p): Don't define. * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here. * elf32-sh.c (sh_elf_object_p): Likewise. * elf32-sparc.c (elf32_sparc_object_p): Likewise. * elf64-alpha.c (elf64_alpha_object_p): Likewise. * elf64-s390.c (elf_s390_object_p): Likewise. * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog11
-rw-r--r--bfd/elf32-i386.c15
-rw-r--r--bfd/elf32-s390.c8
-rw-r--r--bfd/elf32-sh.c14
-rw-r--r--bfd/elf32-sparc.c9
-rw-r--r--bfd/elf64-alpha.c9
-rw-r--r--bfd/elf64-s390.c8
-rw-r--r--bfd/elf64-x86-64.c8
8 files changed, 12 insertions, 70 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8f59bc8..95097af 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,14 @@
+2003-12-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_object_p): Delete.
+ (elf_backend_object_p): Don't define.
+ * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
+ * elf32-sh.c (sh_elf_object_p): Likewise.
+ * elf32-sparc.c (elf32_sparc_object_p): Likewise.
+ * elf64-alpha.c (elf64_alpha_object_p): Likewise.
+ * elf64-s390.c (elf_s390_object_p): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
+
2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
* archures.c (bfd_mach_m32r2): Add new machine type.
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 8adaa0f..876efc6 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -546,20 +546,6 @@ elf_i386_mkobject (bfd *abfd)
return TRUE;
}
-static bfd_boolean
-elf_i386_object_p (bfd *abfd)
-{
- /* Allocate our special target data. */
- struct elf_i386_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct elf_i386_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
- return TRUE;
-}
-
/* i386 ELF linker hash table. */
struct elf_i386_link_hash_table
@@ -3253,7 +3239,6 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
#define elf_info_to_howto_rel elf_i386_info_to_howto_rel
#define bfd_elf32_mkobject elf_i386_mkobject
-#define elf_backend_object_p elf_i386_object_p
#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name
#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index b47ba22..07ba23c 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -685,14 +685,6 @@ static bfd_boolean
elf_s390_object_p (abfd)
bfd *abfd;
{
- /* Allocate our special target data. */
- struct elf_s390_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
/* Set the right machine number for an s390 elf32 file. */
return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_31);
}
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index cf1e51f..c8a091d 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -6960,19 +6960,7 @@ sh_elf_merge_private_data (bfd *ibfd, bfd *obfd)
static bfd_boolean
sh_elf_object_p (bfd *abfd)
{
- struct sh_elf_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct sh_elf_obj_tdata);
-
- if (!sh_elf_set_mach_from_flags (abfd))
- return FALSE;
-
- /* Allocate our special target data. */
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
- return TRUE;
+ return sh_elf_set_mach_from_flags (abfd);
}
/* Finish up dynamic symbol handling. We set the contents of various
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index ea3a9b1..f77f22c 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -3340,15 +3340,6 @@ static bfd_boolean
elf32_sparc_object_p (abfd)
bfd *abfd;
{
- /* Allocate our special target data. */
- struct elf32_sparc_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct elf32_sparc_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
-
if (elf_elfheader (abfd)->e_machine == EM_SPARC32PLUS)
{
if (elf_elfheader (abfd)->e_flags & EF_SPARC_SUN_US3)
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 1e2d246..6025277 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -393,15 +393,6 @@ static bfd_boolean
elf64_alpha_object_p (abfd)
bfd *abfd;
{
- /* Allocate our special target data. */
- struct alpha_elf_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
-
/* Set the right machine number for an Alpha ELF file. */
return bfd_default_set_arch_mach (abfd, bfd_arch_alpha, 0);
}
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index e14a0fc..2260248 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -638,14 +638,6 @@ static bfd_boolean
elf_s390_object_p (abfd)
bfd *abfd;
{
- /* Allocate our special target data. */
- struct elf_s390_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
/* Set the right machine number for an s390 elf32 file. */
return bfd_default_set_arch_mach (abfd, bfd_arch_s390, bfd_mach_s390_64);
}
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 5778f16..a688620 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -579,14 +579,6 @@ elf64_x86_64_mkobject (bfd *abfd)
static bfd_boolean
elf64_x86_64_elf_object_p (bfd *abfd)
{
- /* Allocate our special target data. */
- struct elf64_x86_64_obj_tdata *new_tdata;
- bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
- new_tdata = bfd_zalloc (abfd, amt);
- if (new_tdata == NULL)
- return FALSE;
- new_tdata->root = *abfd->tdata.elf_obj_data;
- abfd->tdata.any = new_tdata;
/* Set the right machine number for an x86-64 elf64 file. */
bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64);
return TRUE;