mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
Eliminate "int8_type", "int16_type", "int32_type", and their
variants from the BFD universe. Leave the 64-bit types for now, since they are in flux. * aoutx.h, hp300hpux.c: Eliminate needless (int32_type) casts. * libaout.h (GET_SWORD): Convert (int32_type) to (int). * ieee.c: Convert uint8e_type => unsigned char. * oasys.c: Extensive changes to eliminate obsolete types. These depend on changes in ../include/oasys.h as well.
This commit is contained in:
@ -1,3 +1,16 @@
|
|||||||
|
Fri Jun 18 03:12:12 1993 John Gilmore (gnu@cygnus.com)
|
||||||
|
|
||||||
|
Eliminate "int8_type", "int16_type", "int32_type", and their
|
||||||
|
variants from the BFD universe. Leave the 64-bit types for now,
|
||||||
|
since they are in flux.
|
||||||
|
|
||||||
|
* aoutx.h, hp300hpux.c: Eliminate needless (int32_type) casts.
|
||||||
|
* libaout.h (GET_SWORD): Convert (int32_type) to (int).
|
||||||
|
* ieee.c: Convert uint8e_type => unsigned char.
|
||||||
|
* oasys.c: Extensive changes to eliminate obsolete types.
|
||||||
|
These depend on changes in ../include/oasys.h as well.
|
||||||
|
* hosts/*.h: Remove declarations of all these types.
|
||||||
|
|
||||||
Mon Jun 14 14:02:41 1993 Jim Kingdon (kingdon@cygnus.com)
|
Mon Jun 14 14:02:41 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||||
|
|
||||||
* hosts/delta88.h: #if 0 out some declarations which conflict with
|
* hosts/delta88.h: #if 0 out some declarations which conflict with
|
||||||
|
83
bfd/aoutx.h
83
bfd/aoutx.h
@ -262,6 +262,7 @@ SYNOPSIS
|
|||||||
struct internal_exec *execp);
|
struct internal_exec *execp);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef NAME_swap_exec_header_in
|
||||||
void
|
void
|
||||||
DEFUN(NAME(aout,swap_exec_header_in),(abfd, raw_bytes, execp),
|
DEFUN(NAME(aout,swap_exec_header_in),(abfd, raw_bytes, execp),
|
||||||
bfd *abfd AND
|
bfd *abfd AND
|
||||||
@ -285,6 +286,8 @@ DEFUN(NAME(aout,swap_exec_header_in),(abfd, raw_bytes, execp),
|
|||||||
execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
|
execp->a_trsize = GET_WORD (abfd, bytes->e_trsize);
|
||||||
execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
|
execp->a_drsize = GET_WORD (abfd, bytes->e_drsize);
|
||||||
}
|
}
|
||||||
|
#define NAME_swap_exec_header_in NAME(aout,swap_exec_header_in)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
FUNCTION
|
FUNCTION
|
||||||
@ -1052,15 +1055,19 @@ DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd, statep),
|
|||||||
{
|
{
|
||||||
case N_SETA:
|
case N_SETA:
|
||||||
into_section = &bfd_abs_section;
|
into_section = &bfd_abs_section;
|
||||||
|
cache_ptr->type = N_ABS;
|
||||||
break;
|
break;
|
||||||
case N_SETT:
|
case N_SETT:
|
||||||
into_section = (asection *) obj_textsec (abfd);
|
into_section = (asection *) obj_textsec (abfd);
|
||||||
|
cache_ptr->type = N_TEXT;
|
||||||
break;
|
break;
|
||||||
case N_SETD:
|
case N_SETD:
|
||||||
into_section = (asection *) obj_datasec (abfd);
|
into_section = (asection *) obj_datasec (abfd);
|
||||||
|
cache_ptr->type = N_DATA;
|
||||||
break;
|
break;
|
||||||
case N_SETB:
|
case N_SETB:
|
||||||
into_section = (asection *) obj_bsssec (abfd);
|
into_section = (asection *) obj_bsssec (abfd);
|
||||||
|
cache_ptr->type = N_BSS;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort ();
|
abort ();
|
||||||
@ -1091,8 +1098,11 @@ DEFUN (translate_from_native_sym_flags, (sym_pointer, cache_ptr, abfd, statep),
|
|||||||
reloc->relent.address = section->_raw_size;
|
reloc->relent.address = section->_raw_size;
|
||||||
section->_raw_size += sizeof (int *);
|
section->_raw_size += sizeof (int *);
|
||||||
|
|
||||||
reloc->relent.howto = howto_table_ext + CTOR_TABLE_RELOC_IDX;
|
reloc->relent.howto
|
||||||
cache_ptr->symbol.flags |= BSF_DEBUGGING | BSF_CONSTRUCTOR;
|
= (obj_reloc_entry_size(abfd) == RELOC_EXT_SIZE
|
||||||
|
? howto_table_ext : howto_table_std)
|
||||||
|
+ CTOR_TABLE_RELOC_IDX;
|
||||||
|
cache_ptr->symbol.flags |= BSF_CONSTRUCTOR;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1275,7 +1285,18 @@ DEFUN(translate_to_native_sym_flags,(sym_pointer, cache_ptr, abfd),
|
|||||||
sym_pointer->e_type[0] |= N_EXT;
|
sym_pointer->e_type[0] |= N_EXT;
|
||||||
}
|
}
|
||||||
if (cache_ptr->flags & BSF_DEBUGGING) {
|
if (cache_ptr->flags & BSF_DEBUGGING) {
|
||||||
sym_pointer->e_type [0]= ((aout_symbol_type *)cache_ptr)->type;
|
sym_pointer->e_type[0] = ((aout_symbol_type *)cache_ptr)->type;
|
||||||
|
}
|
||||||
|
if (cache_ptr->flags & BSF_CONSTRUCTOR) {
|
||||||
|
int type = ((aout_symbol_type *)cache_ptr)->type;
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case N_ABS: type = N_SETA; break;
|
||||||
|
case N_TEXT: type = N_SETT; break;
|
||||||
|
case N_DATA: type = N_SETD; break;
|
||||||
|
case N_BSS: type = N_SETB; break;
|
||||||
|
}
|
||||||
|
sym_pointer->e_type[0] = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
PUT_WORD(abfd, value, sym_pointer->e_value);
|
PUT_WORD(abfd, value, sym_pointer->e_value);
|
||||||
@ -2105,7 +2126,7 @@ DEFUN(NAME(aout,swap_std_reloc_in), (abfd, bytes, cache_ptr, symbols),
|
|||||||
int r_baserel, r_jmptable, r_relative;
|
int r_baserel, r_jmptable, r_relative;
|
||||||
struct aoutdata *su = &(abfd->tdata.aout_data->a);
|
struct aoutdata *su = &(abfd->tdata.aout_data->a);
|
||||||
|
|
||||||
cache_ptr->address = (int32_type)(bfd_h_get_32 (abfd, bytes->r_address));
|
cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
|
||||||
|
|
||||||
/* now the fun stuff */
|
/* now the fun stuff */
|
||||||
if (abfd->xvec->header_byteorder_big_p != false) {
|
if (abfd->xvec->header_byteorder_big_p != false) {
|
||||||
@ -2354,6 +2375,31 @@ DEFUN(NAME(aout,get_lineno),(ignore_abfd, ignore_symbol),
|
|||||||
return (alent *)NULL;
|
return (alent *)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
DEFUN(NAME(aout,get_symbol_info),(ignore_abfd, symbol, ret),
|
||||||
|
bfd *ignore_abfd AND
|
||||||
|
asymbol *symbol AND
|
||||||
|
symbol_info *ret)
|
||||||
|
{
|
||||||
|
bfd_symbol_info (symbol, ret);
|
||||||
|
|
||||||
|
if (ret->type == '?')
|
||||||
|
{
|
||||||
|
int type_code = aout_symbol(symbol)->type & 0xff;
|
||||||
|
CONST char *stab_name = aout_stab_name(type_code);
|
||||||
|
static char buf[10];
|
||||||
|
|
||||||
|
if (stab_name == NULL)
|
||||||
|
{
|
||||||
|
sprintf(buf, "(%d)", type_code);
|
||||||
|
stab_name = buf;
|
||||||
|
}
|
||||||
|
ret->type = '-';
|
||||||
|
ret->stab_other = (unsigned)(aout_symbol(symbol)->other & 0xff);
|
||||||
|
ret->stab_desc = (unsigned)(aout_symbol(symbol)->desc & 0xffff);
|
||||||
|
ret->stab_name = stab_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
DEFUN(NAME(aout,print_symbol),(ignore_abfd, afile, symbol, how),
|
DEFUN(NAME(aout,print_symbol),(ignore_abfd, afile, symbol, how),
|
||||||
@ -2390,35 +2436,6 @@ DEFUN(NAME(aout,print_symbol),(ignore_abfd, afile, symbol, how),
|
|||||||
fprintf(file," %s", symbol->name);
|
fprintf(file," %s", symbol->name);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case bfd_print_symbol_nm:
|
|
||||||
{
|
|
||||||
int section_code = bfd_decode_symclass (symbol);
|
|
||||||
|
|
||||||
if (section_code == 'U')
|
|
||||||
fprintf(file, " ");
|
|
||||||
else
|
|
||||||
fprintf_vma(file, symbol->value+symbol->section->vma);
|
|
||||||
if (section_code == '?')
|
|
||||||
{
|
|
||||||
int type_code = aout_symbol(symbol)->type & 0xff;
|
|
||||||
CONST char *stab_name = aout_stab_name(type_code);
|
|
||||||
char buf[10];
|
|
||||||
if (stab_name == NULL)
|
|
||||||
{
|
|
||||||
sprintf(buf, "(%d)", type_code);
|
|
||||||
stab_name = buf;
|
|
||||||
}
|
|
||||||
fprintf(file," - %02x %04x %5s",
|
|
||||||
(unsigned)(aout_symbol(symbol)->other & 0xff),
|
|
||||||
(unsigned)(aout_symbol(symbol)->desc & 0xffff),
|
|
||||||
stab_name);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fprintf(file," %c", section_code);
|
|
||||||
if (symbol->name)
|
|
||||||
fprintf(file," %s", symbol->name);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,10 +82,25 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
null
|
null
|
||||||
string2
|
string2
|
||||||
null
|
null
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* @@ Is this really so different from normal a.out that it needs to include
|
||||||
|
aoutx.h? We should go through this file sometime and see what can be made
|
||||||
|
more dependent on aout32.o and what might need to be broken off and accessed
|
||||||
|
through the backend_data field. Or, maybe we really do need such a
|
||||||
|
completely separate implementation. I don't have time to investigate this
|
||||||
|
much further right now. [raeburn:19930428.2124EST] */
|
||||||
|
/* @@ Also, note that there wind up being two versions of some routines, with
|
||||||
|
different names, only one of which actually gets used. For example:
|
||||||
|
slurp_symbol_table
|
||||||
|
swap_std_reloc_in
|
||||||
|
slurp_reloc_table
|
||||||
|
get_symtab
|
||||||
|
get_symtab_upper_bound
|
||||||
|
canonicalize_reloc
|
||||||
|
mkobject
|
||||||
|
This should also be fixed. */
|
||||||
|
|
||||||
#define ARCH 32
|
#define ARCH 32
|
||||||
#define TARGETNAME "a.out-hp300hpux"
|
#define TARGETNAME "a.out-hp300hpux"
|
||||||
#define MY(OP) CAT(hp300hpux_,OP)
|
#define MY(OP) CAT(hp300hpux_,OP)
|
||||||
@ -116,15 +131,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define MY_canonicalize_reloc MY(canonicalize_reloc)
|
#define MY_canonicalize_reloc MY(canonicalize_reloc)
|
||||||
#define MY_write_object_contents MY(write_object_contents)
|
#define MY_write_object_contents MY(write_object_contents)
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define MY_write_syms aout_32_write_syms
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define hp300hpux_write_syms aout_32_write_syms
|
#define hp300hpux_write_syms aout_32_write_syms
|
||||||
|
|
||||||
#define MY_callback MY(callback)
|
#define MY_callback MY(callback)
|
||||||
|
|
||||||
#define NAME_swap_exec_header_in NAME(aout,swap_exec_header_in)
|
#define NAME_swap_exec_header_in NAME(hp300hpux_32_,swap_exec_header_in)
|
||||||
|
|
||||||
#define HP_SYMTYPE_UNDEFINED 0x00
|
#define HP_SYMTYPE_UNDEFINED 0x00
|
||||||
#define HP_SYMTYPE_ABSOLUTE 0x01
|
#define HP_SYMTYPE_ABSOLUTE 0x01
|
||||||
@ -155,14 +166,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define HP_RLENGTH_LONG 0x02
|
#define HP_RLENGTH_LONG 0x02
|
||||||
#define HP_RLENGTH_ALIGN 0x03
|
#define HP_RLENGTH_ALIGN 0x03
|
||||||
|
|
||||||
#define aout hp300hpux
|
#define NAME(x,y) CAT3(hp300hpux,_32_,y)
|
||||||
#include "aoutx.h"
|
#include "aoutx.h"
|
||||||
|
|
||||||
/* since the hpux symbol table has nlist elements interspersed with strings */
|
/* Since the hpux symbol table has nlist elements interspersed with
|
||||||
/* and we need to insert som strings for secondary symbols, we give ourselves */
|
strings and we need to insert som strings for secondary symbols, we
|
||||||
/* a little extra padding up front to account for this. Note that for each */
|
give ourselves a little extra padding up front to account for
|
||||||
/* non-secondary symbol we process, we gain 9 bytes of space for the discarded*/
|
this. Note that for each non-secondary symbol we process, we gain
|
||||||
/* nlist element (one byte used for null). SYM_EXTRA_BYTES is the extra space*/
|
9 bytes of space for the discarded nlist element (one byte used for
|
||||||
|
null). SYM_EXTRA_BYTES is the extra space. */
|
||||||
#define SYM_EXTRA_BYTES 1024
|
#define SYM_EXTRA_BYTES 1024
|
||||||
|
|
||||||
/* Set parameters about this a.out file that are machine-dependent.
|
/* Set parameters about this a.out file that are machine-dependent.
|
||||||
@ -581,7 +593,7 @@ DEFUN(MY(swap_std_reloc_in), (abfd, bytes, cache_ptr, symbols),
|
|||||||
int r_baserel = 0, r_jmptable = 0, r_relative = 0;
|
int r_baserel = 0, r_jmptable = 0, r_relative = 0;
|
||||||
struct aoutdata *su = &(abfd->tdata.aout_data->a);
|
struct aoutdata *su = &(abfd->tdata.aout_data->a);
|
||||||
|
|
||||||
cache_ptr->address = (int32_type)(bfd_h_get_32 (abfd, bytes->r_address));
|
cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
|
||||||
r_index = bfd_h_get_16(abfd, bytes->r_index);
|
r_index = bfd_h_get_16(abfd, bytes->r_index);
|
||||||
|
|
||||||
switch (bytes->r_type[0])
|
switch (bytes->r_type[0])
|
||||||
|
Reference in New Issue
Block a user