mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
syms.c (asymbol): Added new field "app_data", for data particular to the
application. Some of the linker flags ought to get moved to this field someday. archures.c (bfd_default_scan): Recognize a few more numbers: 80486, 80960, and 960. bfd-in.h, bfd.c, targets.c, coffcode.h, coff-mips.c, other targets: Moved COFF swap table to backend data. hosts/i386linux.h: Include unistd.h. aoutx.h, libaout.h, stab-syms.c: stab names are now in constant storage. trad-core.c: Fixed some `PARAMS' uses that were missing parentheses. aoutx.h, archive.c, archures.c, coffcode.h, ctor.c, reloc.c, syms.c: Doc fixes.
This commit is contained in:
@ -1,3 +1,41 @@
|
|||||||
|
Thu Dec 3 16:54:58 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
|
||||||
|
|
||||||
|
* hosts/i386linux.h: Include unistd.h.
|
||||||
|
|
||||||
|
* aoutx.h (print_symbol): aout_stab_name returns a constant
|
||||||
|
string.
|
||||||
|
* libaout.h (aout_stab_name): Fix prototype.
|
||||||
|
* stab-syms.c (aout_stab_names): Array is now const.
|
||||||
|
(aout_stab_name): Return value is now pointer to const.
|
||||||
|
|
||||||
|
* aoutx.h, archive.c, archures.c, coffcode.h, ctor.c, reloc.c,
|
||||||
|
syms.c: Doc fixes.
|
||||||
|
|
||||||
|
* syms.c (asymbol): Added new field "app_data", for data
|
||||||
|
particular to the application. Some of the linker flags ought to
|
||||||
|
get moved to this field someday.
|
||||||
|
|
||||||
|
* archures.c (bfd_default_scan): Recognize a few more numbers:
|
||||||
|
80486, 80960, and 960.
|
||||||
|
|
||||||
|
* bfd-in.h (COFF_SWAP_TABLE): New is just address of
|
||||||
|
bfd_coff_std_swap_table, cast to PTR.
|
||||||
|
* bfd.c (bfd_coff_swap_*): Deleted macros.
|
||||||
|
* targets.c (struct bfd_target): Deleted COFF-specific swapping
|
||||||
|
routine pointers.
|
||||||
|
* coffcode.h (type bfd_coff_backend_data): New structure type,
|
||||||
|
contains pointers to the COFF-specific swapping routines.
|
||||||
|
(bfd_coff_std_swap_table): New data structure, to be used when
|
||||||
|
NO_COFF_SYMBOLS and NO_COFF_LINENOS are not defined.
|
||||||
|
(bfd_coff_swap_*): New macros.
|
||||||
|
* coff-mips.c (mips_coff_swap_table): New data structure.
|
||||||
|
(ecoff_big_vec): Use it.
|
||||||
|
* All COFF targets: Moved COFF_SWAP_TABLE to target-specific data.
|
||||||
|
* All other targets: Deleted coff-specific vector entries.
|
||||||
|
|
||||||
|
* trad-core.c: Fixed some `PARAMS' uses that were missing
|
||||||
|
parentheses.
|
||||||
|
|
||||||
Sun Nov 29 08:37:13 1992 Fred Fish (fnf@cygnus.com)
|
Sun Nov 29 08:37:13 1992 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
* aoutx.h (some_aout_object_p): Protect arg prototype in
|
* aoutx.h (some_aout_object_p): Protect arg prototype in
|
||||||
|
@ -334,6 +334,6 @@ bfd_target a29kcoff_big_vec =
|
|||||||
},
|
},
|
||||||
|
|
||||||
JUMP_TABLE(coff),
|
JUMP_TABLE(coff),
|
||||||
|
0, 0,
|
||||||
COFF_SWAP_TABLE
|
COFF_SWAP_TABLE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
114
bfd/coffcode.h
114
bfd/coffcode.h
@ -85,7 +85,7 @@ SUBSUBSECTION
|
|||||||
Each flavour of coff supported in BFD has its own header file
|
Each flavour of coff supported in BFD has its own header file
|
||||||
descibing the external layout of the structures. There is also
|
descibing the external layout of the structures. There is also
|
||||||
an internal description of the coff layout (in
|
an internal description of the coff layout (in
|
||||||
@code{internalcoff.h}) file (@code{}). A major function of the
|
@code{internalcoff.h}). A major function of the
|
||||||
coff backend is swapping the bytes and twiddling the bits to
|
coff backend is swapping the bytes and twiddling the bits to
|
||||||
translate the external form of the structures into the normal
|
translate the external form of the structures into the normal
|
||||||
internal form. This is all performed in the
|
internal form. This is all performed in the
|
||||||
@ -452,6 +452,109 @@ Here are all the routines for swapping the structures seen in the
|
|||||||
outside world into the internal forms.
|
outside world into the internal forms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
INTERNAL_DEFINITION
|
||||||
|
bfd_coff_backend_data
|
||||||
|
|
||||||
|
CODE_FRAGMENT
|
||||||
|
|
||||||
|
.typedef struct {
|
||||||
|
Special entry points for gdb to swap in coff symbol table parts
|
||||||
|
|
||||||
|
. void (*_bfd_coff_swap_aux_in) PARAMS ((
|
||||||
|
. bfd *abfd ,
|
||||||
|
. PTR ext,
|
||||||
|
. int type,
|
||||||
|
. int class ,
|
||||||
|
. PTR in));
|
||||||
|
.
|
||||||
|
. void (*_bfd_coff_swap_sym_in) PARAMS ((
|
||||||
|
. bfd *abfd ,
|
||||||
|
. PTR ext,
|
||||||
|
. PTR in));
|
||||||
|
.
|
||||||
|
. void (*_bfd_coff_swap_lineno_in) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR ext,
|
||||||
|
. PTR in));
|
||||||
|
.
|
||||||
|
|
||||||
|
Special entry points for gas to swap coff parts
|
||||||
|
|
||||||
|
. unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. int type,
|
||||||
|
. int class,
|
||||||
|
. PTR ext));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. PTR ext));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. PTR ext));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR src,
|
||||||
|
. PTR dst));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. PTR out));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. PTR out));
|
||||||
|
.
|
||||||
|
. unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
|
||||||
|
. bfd *abfd,
|
||||||
|
. PTR in,
|
||||||
|
. PTR out));
|
||||||
|
.
|
||||||
|
.} bfd_coff_backend_data;
|
||||||
|
.
|
||||||
|
.extern bfd_coff_backend_data bfd_coff_std_swap_table;
|
||||||
|
.
|
||||||
|
.#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_aux_in(a,e,t,c,i) \
|
||||||
|
. ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,i))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_sym_in(a,e,i) \
|
||||||
|
. ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_lineno_in(a,e,i) \
|
||||||
|
. ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_reloc_out(abfd, i, o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_lineno_out(abfd, i, o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_aux_out(abfd, i, t,c,o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_aux_out) (abfd, i,t,c, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_sym_out(abfd, i,o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_filehdr_out(abfd, i,o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
.#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
|
||||||
|
. ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
|
||||||
|
.
|
||||||
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
DEFUN(bfd_swap_reloc_in,(abfd, reloc_src, reloc_dst),
|
DEFUN(bfd_swap_reloc_in,(abfd, reloc_src, reloc_dst),
|
||||||
@ -4222,6 +4325,15 @@ DEFUN(bfd_coff_get_relocated_section_contents,(in_abfd, seclet, data),
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined (NO_COFF_SYMBOLS) && !defined (NO_COFF_LINENOS)
|
||||||
|
bfd_coff_backend_data bfd_coff_std_swap_table = {
|
||||||
|
coff_swap_aux_in, coff_swap_sym_in, coff_swap_lineno_in,
|
||||||
|
coff_swap_aux_out, coff_swap_sym_out,
|
||||||
|
coff_swap_lineno_out, coff_swap_reloc_out,
|
||||||
|
coff_swap_filehdr_out, coff_swap_aouthdr_out,
|
||||||
|
coff_swap_scnhdr_out,
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#define coff_core_file_failing_command _bfd_dummy_core_file_failing_command
|
#define coff_core_file_failing_command _bfd_dummy_core_file_failing_command
|
||||||
#define coff_core_file_failing_signal _bfd_dummy_core_file_failing_signal
|
#define coff_core_file_failing_signal _bfd_dummy_core_file_failing_signal
|
||||||
|
@ -103,7 +103,7 @@ SYNOPSIS
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
This function is called with an a symbol describing the
|
This function is called with an a symbol describing the
|
||||||
function to be called, an string which descibes the xtor type,
|
function to be called, an string which descibes the xtor type,
|
||||||
eg something like "CTOR" or "DTOR" would be fine. And the bfd
|
e.g., something like "CTOR" or "DTOR" would be fine. And the bfd
|
||||||
which owns the function. Its duty is to create a section
|
which owns the function. Its duty is to create a section
|
||||||
called "CTOR" or "DTOR" or whatever if the bfd doesn't already
|
called "CTOR" or "DTOR" or whatever if the bfd doesn't already
|
||||||
have one, and grow a relocation table for the entry points as
|
have one, and grow a relocation table for the entry points as
|
||||||
|
109
bfd/libcoff.h
109
bfd/libcoff.h
@ -29,6 +29,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define obj_relocbase(bfd) (coff_data(bfd)->relocbase)
|
#define obj_relocbase(bfd) (coff_data(bfd)->relocbase)
|
||||||
#define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments)
|
#define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments)
|
||||||
#define obj_convert(bfd) (coff_data(bfd)->conversion_table)
|
#define obj_convert(bfd) (coff_data(bfd)->conversion_table)
|
||||||
|
#define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size)
|
||||||
#if CFILE_STUFF
|
#if CFILE_STUFF
|
||||||
#define obj_symbol_slew(bfd) (coff_data(bfd)->symbol_index_slew)
|
#define obj_symbol_slew(bfd) (coff_data(bfd)->symbol_index_slew)
|
||||||
#else
|
#else
|
||||||
@ -42,6 +43,7 @@ typedef struct coff_tdata
|
|||||||
{
|
{
|
||||||
struct coff_symbol_struct *symbols; /* symtab for input bfd */
|
struct coff_symbol_struct *symbols; /* symtab for input bfd */
|
||||||
unsigned int *conversion_table;
|
unsigned int *conversion_table;
|
||||||
|
int conv_table_size;
|
||||||
file_ptr sym_filepos;
|
file_ptr sym_filepos;
|
||||||
|
|
||||||
long symbol_index_slew; /* used during read to mark whether a
|
long symbol_index_slew; /* used during read to mark whether a
|
||||||
@ -104,13 +106,106 @@ union {
|
|||||||
|
|
||||||
typedef struct coff_symbol_struct
|
typedef struct coff_symbol_struct
|
||||||
{
|
{
|
||||||
/* The actual symbol which the rest of BFD works with */
|
/* The actual symbol which the rest of BFD works with */
|
||||||
asymbol symbol;
|
asymbol symbol;
|
||||||
|
|
||||||
/* A pointer to the hidden information for this symbol */
|
/* A pointer to the hidden information for this symbol */
|
||||||
combined_entry_type *native;
|
combined_entry_type *native;
|
||||||
|
|
||||||
/* A pointer to the linenumber information for this symbol */
|
/* A pointer to the linenumber information for this symbol */
|
||||||
struct lineno_cache_entry *lineno;
|
struct lineno_cache_entry *lineno;
|
||||||
boolean done_lineno;
|
|
||||||
|
/* Have the line numbers been relocated yet ? */
|
||||||
|
boolean done_lineno;
|
||||||
} coff_symbol_type;
|
} coff_symbol_type;
|
||||||
|
typedef struct {
|
||||||
|
void (*_bfd_coff_swap_aux_in) PARAMS ((
|
||||||
|
bfd *abfd ,
|
||||||
|
PTR ext,
|
||||||
|
int type,
|
||||||
|
int class ,
|
||||||
|
PTR in));
|
||||||
|
|
||||||
|
void (*_bfd_coff_swap_sym_in) PARAMS ((
|
||||||
|
bfd *abfd ,
|
||||||
|
PTR ext,
|
||||||
|
PTR in));
|
||||||
|
|
||||||
|
void (*_bfd_coff_swap_lineno_in) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR ext,
|
||||||
|
PTR in));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
int type,
|
||||||
|
int class,
|
||||||
|
PTR ext));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
PTR ext));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
PTR ext));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR src,
|
||||||
|
PTR dst));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
PTR out));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
PTR out));
|
||||||
|
|
||||||
|
unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
|
||||||
|
bfd *abfd,
|
||||||
|
PTR in,
|
||||||
|
PTR out));
|
||||||
|
|
||||||
|
} bfd_coff_backend_data;
|
||||||
|
|
||||||
|
extern bfd_coff_backend_data bfd_coff_std_swap_table;
|
||||||
|
|
||||||
|
#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
|
||||||
|
|
||||||
|
#define bfd_coff_swap_aux_in(a,e,t,c,i) \
|
||||||
|
((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,i))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_sym_in(a,e,i) \
|
||||||
|
((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_lineno_in(a,e,i) \
|
||||||
|
((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_reloc_out(abfd, i, o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_lineno_out(abfd, i, o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_aux_out(abfd, i, t,c,o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_aux_out) (abfd, i,t,c, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_sym_out(abfd, i,o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_filehdr_out(abfd, i,o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
|
||||||
|
|
||||||
|
#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
|
||||||
|
((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user