diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-01-21 06:29:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-01-21 06:29:21 +0000 |
commit | 0ee75d02e516e8ee40f45733855771936ed30490 (patch) | |
tree | ba4c096f9693c37e70dd9de71f69222a16c09ce9 /bfd/syms.c | |
parent | 5e6cd559cfa7fd45d9f128903d1f42344bcfd03d (diff) | |
download | gdb-0ee75d02e516e8ee40f45733855771936ed30490.zip gdb-0ee75d02e516e8ee40f45733855771936ed30490.tar.gz gdb-0ee75d02e516e8ee40f45733855771936ed30490.tar.bz2 |
* syms.c (BSF_DYNAMIC): New symbol flag.
(bfd_print_symbol_vandf): Print it.
* bfd-in2.h: Rebuilt.
* libaout.h (struct aout_backend_data): New read_dynamic_symbols
and read_dynamic_relocs fields.
(struct aoutdata): New dynamic_info field.
(obj_aout_dynamic_info): New accessor macro.
* sunos.c (struct sunos_dynamic_info): New structure.
(sunos_read_dynamic_info, MY(read_dynamic_symbols),
MY(read_dynamic_relocs)): New functions to read dynamic symbols
and relocs.
* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
dynamically linked, set SEC_RELOC for both the .text and .data
sections.
(translate_from_native_sym_flags): Don't set BSF_LOCAL for an
undefined symbol.
(translate_symbol_table): New function, split out of
slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
(NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
(NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
(NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
return value.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
out dynamic symbols or relocs against reloc symbols, since they
are already in the .text section and we wouldn't know where to
write them anyhow.
(sunos4_aout_backend): Initialize read_dynamic_symbols and
read_dynamic_relocs fields.
* aout-target.h (MY(backend_data)): Initialize
read_dynamic_symbols and read_dynamic_relocs fields.
Diffstat (limited to 'bfd/syms.c')
-rw-r--r-- | bfd/syms.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -249,6 +249,9 @@ CODE_FRAGMENT . for ELF STT_FILE symbols. *} .#define BSF_FILE 0x4000 . +. {* Symbol is from dynamic linking information. *} +.#define BSF_DYNAMIC 0x8000 +. . flagword flags; . . {* A pointer to the section to which this symbol is @@ -352,10 +355,11 @@ DESCRIPTION stream @var{file}. */ void -DEFUN(bfd_print_symbol_vandf,(file, symbol), -FILE *file AND +DEFUN(bfd_print_symbol_vandf,(arg, symbol), +PTR arg AND asymbol *symbol) { + FILE *file = (FILE *) arg; flagword type = symbol->flags; if (symbol->section != (asection *)NULL) { @@ -365,6 +369,9 @@ asymbol *symbol) { fprintf_vma(file, symbol->value); } + + /* This presumes that a symbol can not be both BSF_DEBUGGING and + BSF_DYNAMIC. */ fprintf(file," %c%c%c%c%c%c%c", (type & BSF_LOCAL) ? 'l':' ', (type & BSF_GLOBAL) ? 'g' : ' ', @@ -372,8 +379,8 @@ asymbol *symbol) (type & BSF_CONSTRUCTOR) ? 'C' : ' ', (type & BSF_WARNING) ? 'W' : ' ', (type & BSF_INDIRECT) ? 'I' : ' ', - (type & BSF_DEBUGGING) ? 'd' :' '); - + (type & BSF_DEBUGGING) ? 'd' + : (type & BSF_DYNAMIC) ? 'D' : ' '); } |