aboutsummaryrefslogtreecommitdiff
path: root/bfd/xcofflink.c
diff options
context:
space:
mode:
authorNicholas Duffek <nsd@redhat.com>2000-06-16 20:35:08 +0000
committerNicholas Duffek <nsd@redhat.com>2000-06-16 20:35:08 +0000
commit9bd09e220fef247580c9736ab0d680c875c11f93 (patch)
tree91e8e7dbc2b2c7270e442eb367669bfac5f242c2 /bfd/xcofflink.c
parent59d9f04945ee7db09afc0ca31ac4b5ba37f5ea49 (diff)
downloadgdb-9bd09e220fef247580c9736ab0d680c875c11f93.zip
gdb-9bd09e220fef247580c9736ab0d680c875c11f93.tar.gz
gdb-9bd09e220fef247580c9736ab0d680c875c11f93.tar.bz2
* bfd-in.h (bfd_family_coff): Define.
* bfd-in2.h: Regenerate. * coffgen.c (coff_count_linenumbers, coff_symbol_from, coff_find_nearest_line): Check COFFness using bfd_family_coff() instead of bfd_target_coff_flavour. * cofflink.c (_bfd_coff_final_link): Likewise. * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to exclude XCOFF files. * reloc.c (bfd_perform_relocation, bfd_install_relocation): Likewise. * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour. * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour. * xcofflink.c (XCOFF_XVECP): Delete. (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol, bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc, bfd_xcoff_record_link_assignment, bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with check for bfd_target_xcoff_flavour.
Diffstat (limited to 'bfd/xcofflink.c')
-rw-r--r--bfd/xcofflink.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c
index 17517b0..2d03fa4 100644
--- a/bfd/xcofflink.c
+++ b/bfd/xcofflink.c
@@ -29,15 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define STRING_SIZE_SIZE (4)
-/* In order to support linking different object file formats into an
- XCOFF format, we need to be able to determine whether a particular
- bfd_target is an XCOFF vector. FIXME: We need to rethink this
- whole approach. */
-#define XCOFF_XVECP(xv) \
- (strcmp ((xv)->name, "aixcoff-rs6000") == 0 \
- || strcmp ((xv)->name, "aixcoff64-rs6000") == 0 \
- || strcmp ((xv)->name, "xcoff-powermac") == 0)
-
/* Get the XCOFF hash table entries for a BFD. */
#define obj_xcoff_sym_hashes(bfd) \
((struct xcoff_link_hash_entry **) obj_coff_sym_hashes (bfd))
@@ -2916,7 +2907,7 @@ bfd_xcoff_link_record_set (output_bfd, info, harg, size)
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
struct xcoff_link_size_list *n;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
/* This will hardly ever be called. I don't want to burn four bytes
@@ -2952,7 +2943,7 @@ bfd_xcoff_import_symbol (output_bfd, info, harg, val, imppath, impfile,
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
/* A symbol name which starts with a period is the code for a
@@ -3066,7 +3057,7 @@ bfd_xcoff_export_symbol (output_bfd, info, harg, syscall)
{
struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h->flags |= XCOFF_EXPORT;
@@ -3131,7 +3122,7 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
{
struct xcoff_link_hash_entry *h;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h = ((struct xcoff_link_hash_entry *)
@@ -3165,7 +3156,7 @@ bfd_xcoff_record_link_assignment (output_bfd, info, name)
{
struct xcoff_link_hash_entry *h;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
return true;
h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, true,
@@ -3250,7 +3241,7 @@ bfd_xcoff_size_dynamic_sections (output_bfd, info, libpath, entry,
struct bfd_strtab_hash *debug_strtab;
bfd_byte *debug_contents = NULL;
- if (! XCOFF_XVECP (output_bfd->xvec))
+ if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
{
for (i = 0; i < 6; i++)
special_sections[i] = NULL;