bfd_make_debug_symbol; they were already in the target structure.
* Adjusted all uses of JUMP_TABLE.
* coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed
from coff_make_debug_symbol.
* libcoff.h: Updated accordingly.
+Tue Feb 23 12:17:16 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * bfd-in.h (JUMP_TABLE): Added bfd_reloc_type_lookup and
+ bfd_make_debug_symbol; they were already in the target structure.
+ * Adjusted all uses of JUMP_TABLE.
+ * coffgen.c, libcoff-in.h (coff_bfd_make_debug_symbol): Renamed
+ from coff_make_debug_symbol.
+ * libcoff.h: Updated accordingly.
+
Mon Feb 22 18:40:06 1993 Per Bothner (bothner@rtl.cygnus.com)
* libcoff.h (obj_raw_syment_coun): New macro.
/* BFD back-end for Intel 960 b.out binaries.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
}
/* Add the value contained in the relocation */
- value += (short)((reloc->addend) & 0xffff);
+ value += reloc->addend;
return value;
}
dst_address+=4;
break;
case ABS32:
- bfd_put_32(in_abfd, get_value(reloc, seclet), data+dst_address);
+ bfd_put_32(in_abfd,
+ (bfd_get_32 (in_abfd, data+src_address)
+ + get_value(reloc, seclet)),
+ data+dst_address);
src_address+=4;
dst_address+=4;
break;
{
bfd_error_vector.undefined_symbol(reloc, seclet);
}
- word = (word & ~BAL_MASK) |
- (((word & BAL_MASK) +
- symbol->section->output_offset +
- symbol->section->output_section->vma+
- symbol->value + reloc->addend - dst_address -
- ( input_section->output_section->vma + input_section->output_offset))
- & BAL_MASK);
+ word = ((word & ~BAL_MASK)
+ | (((word & BAL_MASK)
+ /* value of symbol */
+ + symbol->value
+ /* how far it's moving in this relocation */
+ + (symbol->section->output_offset
+ + symbol->section->output_section->vma)
+ - (input_section->output_section->vma
+ + input_section->output_offset)
+ /* addend, of course */
+ + reloc->addend)
+ & BAL_MASK));
bfd_put_32(in_abfd,word, data+dst_address);
dst_address+=4;
{
bfd_error_vector.undefined_symbol(reloc, seclet);
}
- word = (word & ~PCREL13_MASK) |
- (((word & PCREL13_MASK) +
- symbol->section->output_offset +
- symbol->section->output_section->vma+
- symbol->value + reloc->addend - dst_address -
- ( input_section->output_section->vma + input_section->output_offset))
- & PCREL13_MASK);
+ word = ((word & ~PCREL13_MASK)
+ | (((word & PCREL13_MASK)
+ + (symbol->section->output_offset
+ + symbol->section->output_section->vma)
+ + symbol->value
+ + reloc->addend
+ - (input_section->output_section->vma
+ + input_section->output_offset))
+ & PCREL13_MASK));
bfd_put_32(in_abfd,word, data+dst_address);
dst_address+=4;
#define aout_32_bfd_get_relocated_section_contents b_out_get_relocated_section_contents
#define aout_32_bfd_relax_section b_out_relax_section
#define aout_32_bfd_seclet_link bfd_generic_seclet_link
+#define aout_32_bfd_reloc_type_lookup b_out_reloc_type_lookup
+#define aout_32_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
bfd_target b_out_vec_big_host =
{
_bfd_write_archive_contents, bfd_false},
JUMP_TABLE(aout_32),
- b_out_reloc_type_lookup,
+ (PTR) 0,
};
{bfd_false, b_out_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
JUMP_TABLE(aout_32),
- b_out_reloc_type_lookup,
+ (PTR) 0
};
},
JUMP_TABLE(coff),
- 0, 0,
COFF_SWAP_TABLE
};
switch (abfd->arch_info->arch)
{
case bfd_arch_sparc:
- BFD_ASSERT (ELF_R_TYPE(dst->r_info) < R_SPARC_max);
+ BFD_ASSERT (ELF_R_TYPE(dst->r_info) < (unsigned char) R_SPARC_max);
cache_ptr->howto = &elf_sparc_howto_table[ELF_R_TYPE(dst->r_info)];
break;
bfd_generic_get_relocated_section_contents
#define elf_bfd_relax_section bfd_generic_relax_section
#define elf_bfd_seclet_link bfd_generic_seclet_link
+#define elf_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define elf_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
bfd_target elf_big_vec =
{
"elf" */
JUMP_TABLE(elf),
- /* reloc_type_lookup: How applications can find out about amiga relocation
- types (see documentation on reloc types). */
- NULL,
-
- /* _bfd_make_debug_symbol: Back-door to allow format aware applications to
- create debug symbols while using BFD for everything else. */
- NULL,
-
/* backend_data: */
NULL
};
"elf" */
JUMP_TABLE(elf),
- /* reloc_type_lookup: How applications can find out about amiga relocation
- types (see documentation on reloc types). */
- NULL,
-
- /* _bfd_make_debug_symbol: Back-door to allow format aware applications to
- create debug symbols while using BFD for everything else. */
- NULL,
-
/* backend_data: */
NULL
};
bfd_generic_get_relocated_section_contents
#define hppa_bfd_relax_section bfd_generic_relax_section
#define hppa_bfd_seclet_link bfd_generic_seclet_link
+#define hppa_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define hppa_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
bfd_target hppa_vec =
{
bfd_false,
},
#undef hppa
- JUMP_TABLE(hppa)
+ JUMP_TABLE(hppa),
+ (PTR) 0
};
#endif /* HOST_HPPAHPUX */
/* BFD back-end for ieee-695 objects.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
- if (symbol->section == &bfd_com_section
+ if (bfd_is_com_section (symbol->section)
|| symbol->section == &bfd_und_section)
{
/* Def of a common symbol */
ieee_symbol_type *symp;
static bfd dummy_bfd;
static asymbol empty_symbol =
- { &dummy_bfd," ieee empty",(symvalue)0,BSF_DEBUGGING , &bfd_abs_section};
+ /* the_bfd, name, value, attr, section */
+ { &dummy_bfd, " ieee empty", (symvalue)0, BSF_DEBUGGING, &bfd_abs_section};
if (abfd->symcount)
{
break;
}
}
- memcpy(section->name, read_id(&(ieee->h)),8);
+ memcpy((char*)section->name, read_id(&(ieee->h)),8);
/* Truncate sections to 8 chars */
if (strlen(section->name) > 8)
{
- section->name[8] = 0;
+ char *copy = bfd_alloc(abfd, 9);
+ memcpy(copy, section->name, 8);
+ copy[8] = 0;
+ section->name = copy;
}
- { bfd_vma parent, brother, context;
+
+ {
+ bfd_vma parent, brother, context;
parse_int(&(ieee->h), &parent);
parse_int(&(ieee->h), &brother);
parse_int(&(ieee->h), &context);
p->value = reference_index;
reference_index++;
}
- else if(p->section == &bfd_com_section) {
+ else if (bfd_is_com_section (p->section)) {
/* This is a weak reference */
ieee_write_byte(abfd, ieee_external_reference_enum);
ieee_write_int(abfd, reference_index);
#define ieee_set_arch_mach bfd_default_set_arch_mach
#define ieee_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define ieee_bfd_relax_section bfd_generic_relax_section
+#define ieee_bfd_seclet_link bfd_generic_seclet_link
+#define ieee_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define ieee_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
+
/*SUPPRESS 460 */
bfd_target ieee_vec =
{
_bfd_write_archive_contents,
bfd_false,
},
- JUMP_TABLE(ieee)
+ JUMP_TABLE(ieee),
+ (PTR) 0
};
/* BFD back-end for oasys objects.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support, <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
#define oasys_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define oasys_bfd_relax_section bfd_generic_relax_section
#define oasys_bfd_seclet_link bfd_generic_seclet_link
+#define oasys_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define oasys_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
/*SUPPRESS 460 */
bfd_target oasys_vec =
_bfd_write_archive_contents,
bfd_false,
},
- JUMP_TABLE(oasys)
+ JUMP_TABLE(oasys),
+ (PTR) 0
};
#define sco_bfd_relax_section bfd_generic_relax_section
#define sco_bfd_seclet_link \
((boolean (*) PARAMS ((bfd *, PTR, boolean))) bfd_false)
+#define sco_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define sco_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
/* If somebody calls any byte-swapping routines, shoot them. */
void
bfd_false, bfd_false},
JUMP_TABLE(sco),
+ (PTR) 0
};