aboutsummaryrefslogtreecommitdiff
path: root/bfd/syms.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-09-11 04:25:57 +0000
committerFred Fish <fnf@specifix.com>1996-09-11 04:25:57 +0000
commitea3f058549165525b269ea65e4a0dd7d8ea598c4 (patch)
tree85103cfe0e96ee7554a26ca2f25931fb2317f7fe /bfd/syms.c
parent475c826bb46ed6221b3104951f4dc64976096e4c (diff)
downloadgdb-ea3f058549165525b269ea65e4a0dd7d8ea598c4.zip
gdb-ea3f058549165525b269ea65e4a0dd7d8ea598c4.tar.gz
gdb-ea3f058549165525b269ea65e4a0dd7d8ea598c4.tar.bz2
* syms.c (coff_section_type): Make arg const.
* irix-core.c (irix_core_core_file_p): Remove extraneous extra arg to make_bfd_asection(). * elf-bfd.h (bfd_section_from_phdr): Add prototype. * elfcode.h (bfd_section_from_phdr): Remove prototype. (_bfd_elf_stringtab_init): Remove prototype. * netbsd-core.c (swap_abort): Add prototype. * aix386-core.c (swap_abort): Ditto & make static * hpux-core.c (swap_abort): Ditto & make static. * irix-core.c (swap_abort): Ditto & make static. * ptrace-core.c (swap_abort): Ditto & make static. * trad-core.c (swap_abort): Ditto & make static. * coffswap.h (coff_swap_reloc_in): Ditto. (coff_swap_reloc_out): Ditto. (coff_swap_filehdr_in): Ditto. (coff_swap_filehdr_out): Ditto. (coff_swap_sym_in): Ditto. (coff_swap_sym_out): Ditto. (coff_swap_aux_in): Ditto. (coff_swap_aux_out): Ditto. (coff_swap_lineno_in): Ditto. (coff_swap_lineno_out): Ditto. (coff_swap_aouthdr_in): Ditto. (coff_swap_aouthdr_out): Ditto. (coff_swap_scnhdr_in): Ditto. (coff_swap_scnhdr_out): Ditto. * ihex.c (ihex_sizeof_headers): Ditto. * tekhex.c (getsym): Ditto. (find_chunk): Ditto & make static. (insert_byte): Ditto. (first_phase): Ditto. (pass_over): Ditto. (tekhex_get_symtab): Ditto & make static. (tekhex_get_symtab_upper_bound): Ditto & make static. (tekhex_mkobject): Ditto. (tekhex_object_p): Ditto. (move_section_contents): Ditto. (tekhex_get_section_contents): Ditto. (tekhex_set_arch_mach): Ditto & make static. (tekhex_set_section_contents): Ditto. (writevalue): Ditto. (writesym): Ditto. (out): Ditto. (tekhex_write_object_contents): Ditto. (tekhex_sizeof_headers): Ditto. (tekhex_make_empty_symbol): Ditto. (tekhex_get_symbol_info): Ditto. (tekhex_print_symbol): Ditto. * irix-core.c (make_bfd_asection): Ditto. (irix_core_core_file_p): Ditto. (irix_core_core_file_failing_command): Ditto. (irix_core_core_file_failing_signal): Ditto. (irix_core_core_file_matches_executable_p): Ditto. (irix_core_make_empty_symbol): Ditto. * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto. * srec.c (srec_new_symbol): Ditto. (srec_get_section_contents): Ditto. (srec_set_arch_mach): Ditto. (srec_set_section_contents): Ditto. (internal_srec_write_object_contents): Ditto. (srec_write_object_contents): Ditto. (symbolsrec_write_object_contents): Ditto. (srec_sizeof_headers): Ditto. (srec_make_empty_symbol): Ditto. (srec_get_symtab_upper_bound): Ditto. (srec_get_symtab): Ditto. (srec_print_symbol): Ditto and make static. * elf.c (elf_read): Ditto (assign_section_numbers): Ditto. (elf_fake_sections): Ditto. (sym_is_global): Ditto. (elf_map_symbols): Ditto. (get_program_header_size): Ditto. * coffgen.c (make_a_section_from_file): Ditto. (coff_real_object_p): Ditto. (fixup_symbol_value): Ditto. (build_debug_section): Ditto. (copy_name): Ditto. * syms.c (coff_section_type): Ditto.
Diffstat (limited to 'bfd/syms.c')
-rw-r--r--bfd/syms.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/bfd/syms.c b/bfd/syms.c
index da825cb..9959f0b 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -307,6 +307,8 @@ CODE_FRAGMENT
#include "bfdlink.h"
#include "aout/stab_gnu.h"
+static char coff_section_type PARAMS ((const char *));
+
/*
DOCDD
INODE
@@ -483,13 +485,16 @@ static CONST struct section_to_type stt[] =
{
{"*DEBUG*", 'N'},
{".bss", 'b'},
+ {"zerovars", 'b'}, /* MRI .bss */
{".data", 'd'},
+ {"vars", 'd'}, /* MRI .data */
{".rdata", 'r'}, /* Read only data. */
{".rodata", 'r'}, /* Read only data. */
{".sbss", 's'}, /* Small BSS (uninitialized data). */
{".scommon", 'c'}, /* Small common. */
{".sdata", 'g'}, /* Small initialized data. */
{".text", 't'},
+ {"code", 't'}, /* MRI .text */
{0, 0}
};
@@ -501,7 +506,7 @@ static CONST struct section_to_type stt[] =
static char
coff_section_type (s)
- char *s;
+ const char *s;
{
CONST struct section_to_type *t;
@@ -768,7 +773,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
/* No stabs debugging information. Set *pinfo so that we
can return quickly in the info != NULL case above. */
- *pinfo = info;
+ *pinfo = (PTR) info;
return true;
}
@@ -841,7 +846,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (reloc_vector != NULL)
free (reloc_vector);
- *pinfo = info;
+ *pinfo = (PTR) info;
}
/* We are passed a section relative offset. The offsets in the
@@ -930,7 +935,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
break;
}
- name = str + bfd_get_32 (abfd, stab + STRDXOFF);
+ name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
/* An empty string indicates the end of the compilation
unit. */
@@ -963,7 +968,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
stab += STABSIZE;
directory_name = current_file_name;
- current_file_name = str + bfd_get_32 (abfd, stab + STRDXOFF);
+ current_file_name = ((char *) str
+ + bfd_get_32 (abfd, stab + STRDXOFF));
}
main_file_name = current_file_name;
@@ -972,7 +978,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_SOL:
/* The name of an include file. */
- current_file_name = str + bfd_get_32 (abfd, stab + STRDXOFF);
+ current_file_name = ((char *) str
+ + bfd_get_32 (abfd, stab + STRDXOFF));
break;
case N_SLINE:
@@ -992,7 +999,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
case N_FUN:
/* A function name. */
val = bfd_get_32 (abfd, stab + VALOFF);
- name = str + bfd_get_32 (abfd, stab + STRDXOFF);
+ name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF);
/* An empty string here indicates the end of a function, and
the value is relative to fnaddr. */