* 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.
This commit is contained in:
parent
59d9f04945
commit
9bd09e220f
10 changed files with 41 additions and 29 deletions
|
@ -1,3 +1,24 @@
|
||||||
|
2000-06-16 Nicholas Duffek <nsd@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2000-06-16 Nicholas Duffek <nsd@redhat.com>
|
2000-06-16 Nicholas Duffek <nsd@redhat.com>
|
||||||
|
|
||||||
* rs6000-core.c: Support 64-bit core files, support pre-4.3 core
|
* rs6000-core.c: Support 64-bit core files, support pre-4.3 core
|
||||||
|
|
|
@ -489,6 +489,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
|
||||||
#define bfd_get_format(abfd) ((abfd)->format)
|
#define bfd_get_format(abfd) ((abfd)->format)
|
||||||
#define bfd_get_target(abfd) ((abfd)->xvec->name)
|
#define bfd_get_target(abfd) ((abfd)->xvec->name)
|
||||||
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
|
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
|
||||||
|
#define bfd_family_coff(abfd) \
|
||||||
|
(bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
|
||||||
|
bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
|
||||||
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
|
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
|
||||||
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
|
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
|
||||||
#define bfd_header_big_endian(abfd) \
|
#define bfd_header_big_endian(abfd) \
|
||||||
|
|
|
@ -489,6 +489,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
|
||||||
#define bfd_get_format(abfd) ((abfd)->format)
|
#define bfd_get_format(abfd) ((abfd)->format)
|
||||||
#define bfd_get_target(abfd) ((abfd)->xvec->name)
|
#define bfd_get_target(abfd) ((abfd)->xvec->name)
|
||||||
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
|
#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
|
||||||
|
#define bfd_family_coff(abfd) \
|
||||||
|
(bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
|
||||||
|
bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
|
||||||
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
|
#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
|
||||||
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
|
#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
|
||||||
#define bfd_header_big_endian(abfd) \
|
#define bfd_header_big_endian(abfd) \
|
||||||
|
@ -3057,6 +3060,7 @@ enum bfd_flavour {
|
||||||
bfd_target_aout_flavour,
|
bfd_target_aout_flavour,
|
||||||
bfd_target_coff_flavour,
|
bfd_target_coff_flavour,
|
||||||
bfd_target_ecoff_flavour,
|
bfd_target_ecoff_flavour,
|
||||||
|
bfd_target_xcoff_flavour,
|
||||||
bfd_target_elf_flavour,
|
bfd_target_elf_flavour,
|
||||||
bfd_target_ieee_flavour,
|
bfd_target_ieee_flavour,
|
||||||
bfd_target_nlm_flavour,
|
bfd_target_nlm_flavour,
|
||||||
|
|
|
@ -525,7 +525,7 @@ coff_count_linenumbers (abfd)
|
||||||
{
|
{
|
||||||
asymbol *q_maybe = *p;
|
asymbol *q_maybe = *p;
|
||||||
|
|
||||||
if (bfd_asymbol_flavour (q_maybe) == bfd_target_coff_flavour)
|
if (bfd_family_coff (bfd_asymbol_bfd (q_maybe)))
|
||||||
{
|
{
|
||||||
coff_symbol_type *q = coffsymbol (q_maybe);
|
coff_symbol_type *q = coffsymbol (q_maybe);
|
||||||
|
|
||||||
|
@ -564,7 +564,7 @@ coff_symbol_from (ignore_abfd, symbol)
|
||||||
bfd *ignore_abfd ATTRIBUTE_UNUSED;
|
bfd *ignore_abfd ATTRIBUTE_UNUSED;
|
||||||
asymbol *symbol;
|
asymbol *symbol;
|
||||||
{
|
{
|
||||||
if (bfd_asymbol_flavour (symbol) != bfd_target_coff_flavour)
|
if (!bfd_family_coff (bfd_asymbol_bfd (symbol)))
|
||||||
return (coff_symbol_type *) NULL;
|
return (coff_symbol_type *) NULL;
|
||||||
|
|
||||||
if (bfd_asymbol_bfd (symbol)->tdata.coff_obj_data == (coff_data_type *) NULL)
|
if (bfd_asymbol_bfd (symbol)->tdata.coff_obj_data == (coff_data_type *) NULL)
|
||||||
|
@ -2200,7 +2200,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
|
||||||
*line_ptr = 0;
|
*line_ptr = 0;
|
||||||
|
|
||||||
/* Don't try and find line numbers in a non coff file */
|
/* Don't try and find line numbers in a non coff file */
|
||||||
if (abfd->xvec->flavour != bfd_target_coff_flavour)
|
if (!bfd_family_coff (abfd))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (cof == NULL)
|
if (cof == NULL)
|
||||||
|
|
|
@ -894,8 +894,7 @@ _bfd_coff_final_link (abfd, info)
|
||||||
for (p = o->link_order_head; p != NULL; p = p->next)
|
for (p = o->link_order_head; p != NULL; p = p->next)
|
||||||
{
|
{
|
||||||
if (p->type == bfd_indirect_link_order
|
if (p->type == bfd_indirect_link_order
|
||||||
&& (bfd_get_flavour (p->u.indirect.section->owner)
|
&& bfd_family_coff (p->u.indirect.section->owner))
|
||||||
== bfd_target_coff_flavour))
|
|
||||||
{
|
{
|
||||||
sub = p->u.indirect.section->owner;
|
sub = p->u.indirect.section->owner;
|
||||||
if (! bfd_coff_link_output_has_begun (sub, & finfo))
|
if (! bfd_coff_link_output_has_begun (sub, & finfo))
|
||||||
|
|
|
@ -290,8 +290,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
|
||||||
reloc_entry->address += input_section->output_offset;
|
reloc_entry->address += input_section->output_offset;
|
||||||
|
|
||||||
/* WTF?? */
|
/* WTF?? */
|
||||||
if (abfd->xvec->flavour == bfd_target_coff_flavour
|
if (abfd->xvec->flavour == bfd_target_coff_flavour)
|
||||||
&& strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0)
|
|
||||||
{
|
{
|
||||||
#if 1
|
#if 1
|
||||||
/* For m68k-coff, the addend was being subtracted twice during
|
/* For m68k-coff, the addend was being subtracted twice during
|
||||||
|
|
|
@ -728,9 +728,6 @@ bfd_perform_relocation (abfd, reloc_entry, data, input_section, output_bfd,
|
||||||
|
|
||||||
/* WTF?? */
|
/* WTF?? */
|
||||||
if (abfd->xvec->flavour == bfd_target_coff_flavour
|
if (abfd->xvec->flavour == bfd_target_coff_flavour
|
||||||
&& strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "aixcoff64-rs6000") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "xcoff-powermac") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
|
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
|
||||||
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
|
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
|
||||||
{
|
{
|
||||||
|
@ -1125,9 +1122,6 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
|
||||||
|
|
||||||
/* WTF?? */
|
/* WTF?? */
|
||||||
if (abfd->xvec->flavour == bfd_target_coff_flavour
|
if (abfd->xvec->flavour == bfd_target_coff_flavour
|
||||||
&& strcmp (abfd->xvec->name, "aixcoff-rs6000") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "aixcoff64-rs6000") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "xcoff-powermac") != 0
|
|
||||||
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
|
&& strcmp (abfd->xvec->name, "coff-Intel-little") != 0
|
||||||
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
|
&& strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,6 +141,7 @@ DESCRIPTION
|
||||||
. bfd_target_aout_flavour,
|
. bfd_target_aout_flavour,
|
||||||
. bfd_target_coff_flavour,
|
. bfd_target_coff_flavour,
|
||||||
. bfd_target_ecoff_flavour,
|
. bfd_target_ecoff_flavour,
|
||||||
|
. bfd_target_xcoff_flavour,
|
||||||
. bfd_target_elf_flavour,
|
. bfd_target_elf_flavour,
|
||||||
. bfd_target_ieee_flavour,
|
. bfd_target_ieee_flavour,
|
||||||
. bfd_target_nlm_flavour,
|
. bfd_target_nlm_flavour,
|
||||||
|
|
|
@ -151,7 +151,7 @@ extern unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int,
|
||||||
const bfd_target TARGET_SYM =
|
const bfd_target TARGET_SYM =
|
||||||
{
|
{
|
||||||
TARGET_NAME,
|
TARGET_NAME,
|
||||||
bfd_target_coff_flavour,
|
bfd_target_xcoff_flavour,
|
||||||
BFD_ENDIAN_BIG, /* data byte order is big */
|
BFD_ENDIAN_BIG, /* data byte order is big */
|
||||||
BFD_ENDIAN_BIG, /* header byte order is big */
|
BFD_ENDIAN_BIG, /* header byte order is big */
|
||||||
|
|
||||||
|
|
|
@ -29,15 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#define STRING_SIZE_SIZE (4)
|
#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. */
|
/* Get the XCOFF hash table entries for a BFD. */
|
||||||
#define obj_xcoff_sym_hashes(bfd) \
|
#define obj_xcoff_sym_hashes(bfd) \
|
||||||
((struct xcoff_link_hash_entry **) obj_coff_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_hash_entry *h = (struct xcoff_link_hash_entry *) harg;
|
||||||
struct xcoff_link_size_list *n;
|
struct xcoff_link_size_list *n;
|
||||||
|
|
||||||
if (! XCOFF_XVECP (output_bfd->xvec))
|
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* This will hardly ever be called. I don't want to burn four bytes
|
/* 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;
|
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;
|
return true;
|
||||||
|
|
||||||
/* A symbol name which starts with a period is the code for a
|
/* 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;
|
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;
|
return true;
|
||||||
|
|
||||||
h->flags |= XCOFF_EXPORT;
|
h->flags |= XCOFF_EXPORT;
|
||||||
|
@ -3131,7 +3122,7 @@ bfd_xcoff_link_count_reloc (output_bfd, info, name)
|
||||||
{
|
{
|
||||||
struct xcoff_link_hash_entry *h;
|
struct xcoff_link_hash_entry *h;
|
||||||
|
|
||||||
if (! XCOFF_XVECP (output_bfd->xvec))
|
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
h = ((struct xcoff_link_hash_entry *)
|
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;
|
struct xcoff_link_hash_entry *h;
|
||||||
|
|
||||||
if (! XCOFF_XVECP (output_bfd->xvec))
|
if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, 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;
|
struct bfd_strtab_hash *debug_strtab;
|
||||||
bfd_byte *debug_contents = NULL;
|
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++)
|
for (i = 0; i < 6; i++)
|
||||||
special_sections[i] = NULL;
|
special_sections[i] = NULL;
|
||||||
|
|
Loading…
Reference in a new issue