aboutsummaryrefslogtreecommitdiff
path: root/bfd/ieee.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-10-08 16:02:09 +0000
committerSteve Chamberlain <sac@cygnus>1992-10-08 16:02:09 +0000
commit294eaca479e9ced9a87b958c37feb2c570aa1595 (patch)
treebb7a6bb0ac1df535df9c7fe230c1a0bc81b85ab3 /bfd/ieee.c
parent0da7012441eaccf157dc44c8cc110fbf2d3f8376 (diff)
downloadgdb-294eaca479e9ced9a87b958c37feb2c570aa1595.zip
gdb-294eaca479e9ced9a87b958c37feb2c570aa1595.tar.gz
gdb-294eaca479e9ced9a87b958c37feb2c570aa1595.tar.bz2
Some of these are guesses, if you know different, just yell.
Thu Oct 8 08:52:48 1992 Steve Chamberlain (sac@thepub.cygnus.com) Now a bfd knows whether underscores are normally prepended to symbols in its file format. Helps with error messages. * aout-adobe.c, aout-target.h, bout.c, coff-a29k.c, coff-h8300.c, coff-z8k.c: targets set so they have leading underscore * coff-i386.c, coff-i960.c, coff-m68k.c, coff-mips.c, coff-m88k.c, coff-rs6000.c, coff-we32k.c, elf.c, ieee.c, srec.c: targets set without leading underscore flag * targets.c: add symbol leading char to xvec description * bfd-in.h (bfd_get_symbol_leading_char): new macro.
Diffstat (limited to 'bfd/ieee.c')
-rw-r--r--bfd/ieee.c66
1 files changed, 32 insertions, 34 deletions
diff --git a/bfd/ieee.c b/bfd/ieee.c
index b4ee623..09d268b 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -767,52 +767,50 @@ DEFUN(ieee_get_symtab,(abfd, location),
ieee_symbol_type *symp;
static bfd dummy_bfd;
static asymbol empty_symbol =
- { &dummy_bfd," ieee empty",(symvalue)0,BSF_DEBUGGING , &bfd_abs_section};
+ { &dummy_bfd," ieee empty",(symvalue)0,BSF_DEBUGGING , &bfd_abs_section};
-if (abfd->symcount) {
+ if (abfd->symcount)
+{
+ ieee_data_type *ieee = IEEE_DATA(abfd);
+ dummy_bfd.xvec= &ieee_vec;
+ ieee_slurp_symbol_table(abfd);
+ if (ieee->symbol_table_full == false) {
+ /* Arrgh - there are gaps in the table, run through and fill them */
+ /* up with pointers to a null place */
+ unsigned int i;
+ for (i= 0; i < abfd->symcount; i++) {
+ location[i] = &empty_symbol;
+ }
+ }
+ ieee->external_symbol_base_offset= - ieee->external_symbol_min_index;
+ for (symp = IEEE_DATA(abfd)->external_symbols;
+ symp != (ieee_symbol_type *)NULL;
+ symp = symp->next) {
+ /* Place into table at correct index locations */
+ location[symp->index + ieee->external_symbol_base_offset] = &symp->symbol;
- ieee_data_type *ieee = IEEE_DATA(abfd);
- dummy_bfd.xvec= &ieee_vec;
- ieee_slurp_symbol_table(abfd);
-
- if (ieee->symbol_table_full == false) {
- /* Arrgh - there are gaps in the table, run through and fill them */
- /* up with pointers to a null place */
- unsigned int i;
- for (i= 0; i < abfd->symcount; i++) {
- location[i] = &empty_symbol;
}
- }
-
- ieee->external_symbol_base_offset= - ieee->external_symbol_min_index;
- for (symp = IEEE_DATA(abfd)->external_symbols;
- symp != (ieee_symbol_type *)NULL;
- symp = symp->next) {
- /* Place into table at correct index locations */
- location[symp->index + ieee->external_symbol_base_offset] = &symp->symbol;
+ /* The external refs are indexed in a bit */
+ ieee->external_reference_base_offset =
+ - ieee->external_reference_min_index +ieee->external_symbol_count ;
- }
+ for (symp = IEEE_DATA(abfd)->external_reference;
+ symp != (ieee_symbol_type *)NULL;
+ symp = symp->next) {
+ location[symp->index + ieee->external_reference_base_offset] =
+ &symp->symbol;
- /* The external refs are indexed in a bit */
- ieee->external_reference_base_offset =
- - ieee->external_reference_min_index +ieee->external_symbol_count ;
-
- for (symp = IEEE_DATA(abfd)->external_reference;
- symp != (ieee_symbol_type *)NULL;
- symp = symp->next) {
- location[symp->index + ieee->external_reference_base_offset] =
- &symp->symbol;
+ }
- }
+ }
location[abfd->symcount] = (asymbol *)NULL;
-}
return abfd->symcount;
}
static asection *
@@ -1064,7 +1062,7 @@ uint8e_type buffer[512];
else loop = false;
}
- ieee->elements = obstack_finish(&ob);
+ ieee->elements = (ieee_ar_obstack_type *)obstack_finish(&ob);
/* Now scan the area again, and replace BB offsets with file */
/* offsets */
@@ -1180,7 +1178,6 @@ DEFUN(ieee_object_p,(abfd),
}
abfd->flags = HAS_SYMS;
-
/* By now we know that this is a real IEEE file, we're going to read
the whole thing into memory so that we can run up and down it
quickly. We can work out how big the file is from the trailer
@@ -2972,6 +2969,7 @@ bfd_target ieee_vec =
HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
( SEC_CODE|SEC_DATA|SEC_ROM|SEC_HAS_CONTENTS
|SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* leading underscore */
' ', /* ar_pad_char */
16, /* ar_max_namelen */
1, /* minimum alignment */