forked from Imagelibrary/binutils-gdb
* aoutx.h (translate_from_native_sym_flags): Removed statep
argument. Just let an indirect symbol point to the next symbol without forcing the next symbol to be undefined. Changed all callers. * hp300hpux.c (slurp_symbol_table): Changed call to translate_from_native_sym_flags. * targets.c: Added hp300hpux_vec. * Makefile.in (hp300hpux.o): Added dependencies.
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
Wed Jul 7 10:56:21 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||
|
||||
* aoutx.h (translate_from_native_sym_flags): Removed statep
|
||||
argument. Just let an indirect symbol point to the next symbol
|
||||
without forcing the next symbol to be undefined. Changed all
|
||||
callers.
|
||||
* hp300hpux.c (slurp_symbol_table): Changed call to
|
||||
translate_from_native_sym_flags.
|
||||
* targets.c: Added hp300hpux_vec.
|
||||
* Makefile.in (hp300hpux.o): Added dependencies.
|
||||
|
||||
Tue Jul 6 13:24:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||
|
||||
* reloc.c (enum bfd_reloc_code_real): Put simple power-of-two
|
||||
|
||||
@@ -378,6 +378,10 @@ aout32.o : aout32.c aoutx.h $(BFD_H) $(INCDIR)/ansidecl.h \
|
||||
sunos.o : sunos.c aoutf1.h $(BFD_H) $(INCDIR)/obstack.h \
|
||||
libaout.h libbfd.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
|
||||
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
|
||||
hp300hpux.o : hp300hpux.c aoutx.h $(BFD_H) $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/obstack.h libaout.h libbfd.h $(INCDIR)/aout/aout64.h \
|
||||
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
|
||||
$(INCDIR)/aout/hp300hpux.h aout-target.h
|
||||
demo64.o : demo64.c
|
||||
|
||||
srec.o : srec.c $(BFD_H) $(INCDIR)/obstack.h libbfd.h
|
||||
|
||||
39
bfd/aoutx.h
39
bfd/aoutx.h
@@ -361,6 +361,14 @@ DEFUN(NAME(aout,some_aout_object_p),(abfd, execp, callback_to_real_object_p),
|
||||
|
||||
oldrawptr = abfd->tdata.aout_data;
|
||||
abfd->tdata.aout_data = rawptr;
|
||||
|
||||
/* Copy the contents of the old tdata struct.
|
||||
In particular, we want the subformat, since for hpux it was set in
|
||||
hp300hpux.c:swap_exec_header_in and will be used in
|
||||
hp300hpux.c:callback. */
|
||||
if (oldrawptr != NULL)
|
||||
*abfd->tdata.aout_data = *oldrawptr;
|
||||
|
||||
abfd->tdata.aout_data->a.hdr = &rawptr->e;
|
||||
*(abfd->tdata.aout_data->a.hdr) = *execp; /* Copy in the internal_exec struct */
|
||||
execp = abfd->tdata.aout_data->a.hdr;
|
||||
@@ -943,22 +951,11 @@ boolean
|
||||
bfd_size_type text_size;
|
||||
|
||||
if (abfd->output_has_begun == false)
|
||||
{ /* set by bfd.c handler */
|
||||
switch (abfd->direction)
|
||||
{
|
||||
case read_direction:
|
||||
case no_direction:
|
||||
bfd_error = invalid_operation;
|
||||
return false;
|
||||
|
||||
case write_direction:
|
||||
if (NAME(aout,adjust_sizes_and_vmas) (abfd,
|
||||
&text_size,
|
||||
&text_end) == false)
|
||||
return false;
|
||||
case both_direction:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* regardless, once we know what we're doing, we might as well get going */
|
||||
@@ -1017,22 +1014,12 @@ boolean
|
||||
stabilised these should be inlined into their (single) caller */
|
||||
|
||||
static void
|
||||
DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd, statep),
|
||||
DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd),
|
||||
struct external_nlist *sym_pointer AND
|
||||
aout_symbol_type * cache_ptr AND
|
||||
bfd * abfd AND
|
||||
int *statep)
|
||||
bfd * abfd)
|
||||
{
|
||||
cache_ptr->symbol.section = 0;
|
||||
if (*statep)
|
||||
{
|
||||
/* This is an indirect symbol */
|
||||
cache_ptr->symbol.flags = BSF_DEBUGGING;
|
||||
cache_ptr->symbol.section = &bfd_und_section;
|
||||
*statep = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (cache_ptr->type & N_TYPE)
|
||||
{
|
||||
case N_SETA:
|
||||
@@ -1144,7 +1131,6 @@ DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd, statep),
|
||||
|
||||
cache_ptr->symbol.value = (bfd_vma) ((cache_ptr + 1));
|
||||
cache_ptr->symbol.section = &bfd_ind_section;
|
||||
*statep = 1;
|
||||
}
|
||||
|
||||
else if (sym_is_debugger_info (cache_ptr))
|
||||
@@ -1230,7 +1216,6 @@ DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd, statep),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cache_ptr->symbol.section == 0)
|
||||
abort ();
|
||||
}
|
||||
@@ -1392,7 +1377,6 @@ DEFUN(NAME(aout,slurp_symbol_table),(abfd),
|
||||
/* OK, now walk the new symtable, cacheing symbol properties */
|
||||
{
|
||||
register struct external_nlist *sym_pointer;
|
||||
int state = 0;
|
||||
register struct external_nlist *sym_end = syms + bfd_get_symcount (abfd);
|
||||
register aout_symbol_type *cache_ptr = cached;
|
||||
|
||||
@@ -1414,8 +1398,7 @@ DEFUN(NAME(aout,slurp_symbol_table),(abfd),
|
||||
cache_ptr->other = bfd_h_get_8(abfd, sym_pointer->e_other);
|
||||
cache_ptr->type = bfd_h_get_8(abfd, sym_pointer->e_type);
|
||||
cache_ptr->symbol.udata = 0;
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr,
|
||||
abfd, &state);
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr, abfd);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -451,7 +451,6 @@ DEFUN(MY(slurp_symbol_table),(abfd),
|
||||
aout_symbol_type *cached;
|
||||
unsigned num_syms = 0;
|
||||
unsigned num_secondary = 0;
|
||||
int xxx = 0; /* for translate_from_native_sym_flags */
|
||||
|
||||
/* If there's no work to be done, don't do any */
|
||||
if (obj_aout_symbols (abfd) != (aout_symbol_type *)NULL) return true;
|
||||
@@ -516,8 +515,7 @@ DEFUN(MY(slurp_symbol_table),(abfd),
|
||||
|
||||
cache_save = *cache_ptr;
|
||||
convert_sym_type(sym_pointer, cache_ptr, abfd);
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr, abfd,
|
||||
&xxx);
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr, abfd);
|
||||
|
||||
/********************************************************/
|
||||
/* for hpux, the 'lenght' value indicates the length of */
|
||||
@@ -562,8 +560,8 @@ DEFUN(MY(slurp_symbol_table),(abfd),
|
||||
strings += length+10;
|
||||
cache_ptr2->type &= ~HP_SECONDARY_SYMBOL; /* clear secondary */
|
||||
convert_sym_type(sym_pointer, cache_ptr2, abfd);
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr2, abfd,
|
||||
&xxx);
|
||||
translate_from_native_sym_flags (sym_pointer, cache_ptr2,
|
||||
abfd);
|
||||
}
|
||||
|
||||
/* skip over the embedded symbol. */
|
||||
@@ -590,7 +588,6 @@ DEFUN(MY(swap_std_reloc_in), (abfd, bytes, cache_ptr, symbols),
|
||||
int r_extern = 0;
|
||||
unsigned int r_length;
|
||||
int r_pcrel = 0;
|
||||
int r_baserel = 0, r_jmptable = 0, r_relative = 0;
|
||||
struct aoutdata *su = &(abfd->tdata.aout_data->a);
|
||||
|
||||
cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
|
||||
@@ -638,6 +635,7 @@ DEFUN(MY(swap_std_reloc_in), (abfd, bytes, cache_ptr, symbols),
|
||||
break;
|
||||
default:
|
||||
printf("illegal relocation length: %x\n",bytes->r_length[0] );
|
||||
r_length = 0;
|
||||
}
|
||||
|
||||
cache_ptr->howto = howto_table_std + r_length + 4 * r_pcrel;
|
||||
|
||||
@@ -364,6 +364,10 @@ extern bfd_target bfd_elf32_i860_vec;
|
||||
extern bfd_target bfd_elf32_m88k_vec;
|
||||
extern bfd_target bfd_elf32_bigmips_vec;
|
||||
extern bfd_target bfd_elf32_littlemips_vec;
|
||||
extern bfd_target bfd_elf32_big_generic_vec;
|
||||
extern bfd_target bfd_elf32_little_generic_vec;
|
||||
extern bfd_target bfd_elf64_big_generic_vec;
|
||||
extern bfd_target bfd_elf64_little_generic_vec;
|
||||
extern bfd_target ieee_vec;
|
||||
extern bfd_target oasys_vec;
|
||||
extern bfd_target m88kbcs_vec;
|
||||
@@ -381,6 +385,7 @@ extern bfd_target h8500coff_vec;
|
||||
extern bfd_target z8kcoff_vec;
|
||||
extern bfd_target we32kcoff_vec;
|
||||
extern bfd_target shcoff_vec;
|
||||
extern bfd_target hp300hpux_vec;
|
||||
|
||||
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
|
||||
extern bfd_target hppa_vec;
|
||||
@@ -437,6 +442,12 @@ bfd_target *target_vector[] = {
|
||||
&bfd_elf32_m88k_vec,
|
||||
&bfd_elf32_littlemips_vec,
|
||||
&bfd_elf32_bigmips_vec,
|
||||
&bfd_elf32_little_generic_vec,
|
||||
&bfd_elf32_big_generic_vec,
|
||||
#ifdef BFD64
|
||||
&bfd_elf64_little_generic_vec,
|
||||
&bfd_elf64_big_generic_vec,
|
||||
#endif
|
||||
&a_out_adobe_vec,
|
||||
&b_out_vec_little_host,
|
||||
&b_out_vec_big_host,
|
||||
@@ -446,6 +457,7 @@ bfd_target *target_vector[] = {
|
||||
#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD)
|
||||
&hppa_vec,
|
||||
#endif
|
||||
&hp300hpux_vec,
|
||||
&we32kcoff_vec,
|
||||
|
||||
#ifdef TRAD_CORE
|
||||
|
||||
Reference in New Issue
Block a user