mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-29 21:04:22 +08:00
* hppa.c (hppa_object_setup): Get rid of all knowledge of stabs
debug info. Setup info about linker symbols only, and use standard bfd fields to hold the info. * (hppa_object_p): Remove unneeded decls. * (hppa_new_section_hook): Get rid of most of this. * libhppa.h (struct hppadata): Remove ten pounds of useless ugly fat. Remove all knowledge of stabs, remove redundant knowledge of linker symbols. * Remove macros for accessing fields which are now gone.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
Sat Jan 9 19:48:14 1993 Stu Grossman (grossman at cygnus.com)
|
||||||
|
|
||||||
|
* hppa.c (hppa_object_setup): Get rid of all knowledge of stabs
|
||||||
|
debug info. Setup info about linker symbols only, and use
|
||||||
|
standard bfd fields to hold the info.
|
||||||
|
* (hppa_object_p): Remove unneeded decls.
|
||||||
|
* (hppa_new_section_hook): Get rid of most of this.
|
||||||
|
* libhppa.h (struct hppadata): Remove ten pounds of useless ugly
|
||||||
|
fat. Remove all knowledge of stabs, remove redundant knowledge of
|
||||||
|
linker symbols.
|
||||||
|
* Remove macros for accessing fields which are now gone.
|
||||||
|
|
||||||
Fri Jan 8 15:20:00 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
Fri Jan 8 15:20:00 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||||
|
|
||||||
* coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on
|
* coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn on
|
||||||
|
83
bfd/hppa.c
83
bfd/hppa.c
@ -52,10 +52,7 @@ hppa_object_setup (abfd, file_hdrp, aux_hdrp)
|
|||||||
struct container *rawptr;
|
struct container *rawptr;
|
||||||
struct header *f;
|
struct header *f;
|
||||||
struct hppa_data_struct *rawptr1;
|
struct hppa_data_struct *rawptr1;
|
||||||
asection *dbx, *dbx_strings;
|
asection *text, *data, *bss;
|
||||||
|
|
||||||
dbx = bfd_get_section_by_name (abfd, "$GDB_SYMBOLS$");
|
|
||||||
dbx_strings = bfd_get_section_by_name (abfd, "$GDB_STRINGS$");
|
|
||||||
|
|
||||||
rawptr = (struct container *) bfd_zalloc (abfd, sizeof (struct container));
|
rawptr = (struct container *) bfd_zalloc (abfd, sizeof (struct container));
|
||||||
if (rawptr == NULL) {
|
if (rawptr == NULL) {
|
||||||
@ -84,60 +81,44 @@ hppa_object_setup (abfd, file_hdrp, aux_hdrp)
|
|||||||
|
|
||||||
bfd_get_start_address (abfd) = aux_hdrp->exec_entry;
|
bfd_get_start_address (abfd) = aux_hdrp->exec_entry;
|
||||||
|
|
||||||
obj_hp_symbol_entry_size (abfd) = sizeof(struct symbol_dictionary_record);
|
|
||||||
obj_dbx_symbol_entry_size (abfd) = 12;
|
|
||||||
|
|
||||||
obj_pa_symbols (abfd) = (hppa_symbol_type *)NULL;
|
obj_pa_symbols (abfd) = (hppa_symbol_type *)NULL;
|
||||||
obj_hp_sym_count (abfd) = file_hdrp->symbol_total;
|
bfd_get_symcount (abfd) = file_hdrp->symbol_total;
|
||||||
obj_dbx_sym_count (abfd) = bfd_section_size (abfd, dbx) /
|
|
||||||
obj_dbx_symbol_entry_size (abfd);
|
|
||||||
bfd_get_symcount (abfd) = obj_hp_sym_count (abfd) + obj_dbx_sym_count (abfd);
|
|
||||||
|
|
||||||
bfd_default_set_arch_mach(abfd, bfd_arch_hppa, 0);
|
bfd_default_set_arch_mach(abfd, bfd_arch_hppa, 0);
|
||||||
|
|
||||||
/* create the sections. This is raunchy, but bfd_close wants to reclaim
|
/* create the sections. This is raunchy, but bfd_close wants to reclaim
|
||||||
them */
|
them */
|
||||||
obj_textsec (abfd) = (asection *)NULL;
|
|
||||||
obj_datasec (abfd) = (asection *)NULL;
|
|
||||||
obj_bsssec (abfd) = (asection *)NULL;
|
|
||||||
(void)bfd_make_section(abfd, ".text");
|
|
||||||
(void)bfd_make_section(abfd, ".data");
|
|
||||||
(void)bfd_make_section(abfd, ".bss");
|
|
||||||
|
|
||||||
#if 0
|
text = bfd_make_section(abfd, ".text");
|
||||||
abfd->sections = obj_textsec (abfd);
|
data = bfd_make_section(abfd, ".data");
|
||||||
obj_textsec (abfd)->next = obj_datasec (abfd);
|
bss = bfd_make_section(abfd, ".bss");
|
||||||
obj_datasec (abfd)->next = obj_bsssec (abfd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
obj_datasec (abfd)->_raw_size = aux_hdrp->exec_dsize;
|
text->_raw_size = aux_hdrp->exec_tsize;
|
||||||
obj_bsssec (abfd)->_raw_size = aux_hdrp->exec_bsize;
|
data->_raw_size = aux_hdrp->exec_dsize;
|
||||||
obj_textsec (abfd)->_raw_size = aux_hdrp->exec_tsize;
|
bss->_raw_size = aux_hdrp->exec_bsize;
|
||||||
|
|
||||||
obj_textsec (abfd)->flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS);
|
text->flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS);
|
||||||
obj_datasec (abfd)->flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS);
|
data->flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS);
|
||||||
obj_bsssec (abfd)->flags = SEC_ALLOC;
|
bss->flags = SEC_ALLOC;
|
||||||
|
|
||||||
/* The virtual memory addresses of the sections */
|
/* The virtual memory addresses of the sections */
|
||||||
obj_datasec (abfd)->vma = aux_hdrp->exec_dmem;
|
text->vma = aux_hdrp->exec_tmem;
|
||||||
obj_bsssec (abfd)->vma = aux_hdrp->exec_bfill;
|
data->vma = aux_hdrp->exec_dmem;
|
||||||
obj_textsec (abfd)->vma = aux_hdrp->exec_tmem;
|
bss->vma = aux_hdrp->exec_bfill;
|
||||||
|
|
||||||
/* The file offsets of the sections */
|
/* The file offsets of the sections */
|
||||||
obj_textsec (abfd)->filepos = aux_hdrp->exec_tfile;
|
text->filepos = aux_hdrp->exec_tfile;
|
||||||
obj_datasec (abfd)->filepos = aux_hdrp->exec_dfile;
|
data->filepos = aux_hdrp->exec_dfile;
|
||||||
|
|
||||||
/* The file offsets of the relocation info */
|
/* The file offsets of the relocation info */
|
||||||
obj_textsec (abfd)->rel_filepos = 0;
|
text->rel_filepos = 0;
|
||||||
obj_datasec (abfd)->rel_filepos = 0;
|
data->rel_filepos = 0;
|
||||||
|
|
||||||
/* The file offsets of the string table and symbol table. */
|
/* The file offsets of the string table and symbol table. */
|
||||||
obj_hp_sym_filepos (abfd) = file_hdrp->symbol_location;
|
obj_sym_filepos (abfd) = file_hdrp->symbol_location;
|
||||||
obj_hp_str_filepos (abfd) = file_hdrp->symbol_strings_location;
|
bfd_get_symcount (abfd) = file_hdrp->symbol_total;
|
||||||
obj_dbx_sym_filepos (abfd) = dbx->filepos;
|
obj_str_filepos (abfd) = file_hdrp->symbol_strings_location;
|
||||||
obj_dbx_str_filepos (abfd) = dbx_strings->filepos;
|
obj_stringtab_size (abfd) = file_hdrp->symbol_strings_size;
|
||||||
obj_hp_stringtab_size (abfd) = file_hdrp->symbol_strings_size;
|
|
||||||
obj_dbx_stringtab_size (abfd) = bfd_section_size (abfd, dbx_strings);
|
|
||||||
|
|
||||||
return abfd->xvec;
|
return abfd->xvec;
|
||||||
}
|
}
|
||||||
@ -297,8 +278,6 @@ hppa_object_p (abfd)
|
|||||||
{
|
{
|
||||||
struct header file_hdr;
|
struct header file_hdr;
|
||||||
struct som_exec_auxhdr aux_hdr;
|
struct som_exec_auxhdr aux_hdr;
|
||||||
struct subspace_dictionary_record dbx_subspace;
|
|
||||||
struct subspace_dictionary_record dbx_strings_subspace;
|
|
||||||
|
|
||||||
if (bfd_read ((PTR) &file_hdr, 1, FILE_HDR_SIZE, abfd) != FILE_HDR_SIZE)
|
if (bfd_read ((PTR) &file_hdr, 1, FILE_HDR_SIZE, abfd) != FILE_HDR_SIZE)
|
||||||
return 0;
|
return 0;
|
||||||
@ -433,26 +412,8 @@ hppa_new_section_hook (abfd, newsect)
|
|||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
asection *newsect;
|
asection *newsect;
|
||||||
{
|
{
|
||||||
/* align to double at least */
|
|
||||||
newsect->alignment_power = 3;
|
newsect->alignment_power = 3;
|
||||||
|
|
||||||
if (bfd_get_format (abfd) == bfd_object) {
|
|
||||||
if (obj_textsec(abfd) == NULL && !strcmp(newsect->name, ".text")) {
|
|
||||||
obj_textsec(abfd)= newsect;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj_datasec(abfd) == NULL && !strcmp(newsect->name, ".data")) {
|
|
||||||
obj_datasec(abfd) = newsect;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj_bsssec(abfd) == NULL && !strcmp(newsect->name, ".bss")) {
|
|
||||||
obj_bsssec(abfd) = newsect;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* We allow more than three sections internally */
|
/* We allow more than three sections internally */
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user