From: Ken Raeburn Date: Thu, 29 Sep 1994 20:36:24 +0000 (+0000) Subject: * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol in elfcode.h. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64e21e0fd7957a9a60915a5ed7e68aca4a60ab36;p=binutils-gdb.git * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol in elfcode.h. (case bfd_print_symbol_all): Print symbol's size field, except for common symbols; print their alignment. * elfcode.h (elf_print_symbol): Deleted. * libelf.h (bfd_elf_print_symbol): Declare. (bfd_elf{32,64}_print_symbol): Replace declarations with macros. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d0c2a45f1a0..e2d95ad1007 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,12 @@ Thu Sep 29 15:21:44 1994 Ken Raeburn + * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol + in elfcode.h. (case bfd_print_symbol_all): Print symbol's size + field, except for common symbols; print their alignment. + * elfcode.h (elf_print_symbol): Deleted. + * libelf.h (bfd_elf_print_symbol): Declare. + (bfd_elf{32,64}_print_symbol): Replace declarations with macros. + * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL in one column. Use the column freed up to show BSF_FUNCTION and BSF_FILE. diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 847d8e46662..88fe902c6fd 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -103,7 +103,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ NAME(bfd_elf,canonicalize_dynamic_symtab) #define elf_make_empty_symbol NAME(bfd_elf,make_empty_symbol) #define elf_get_symbol_info NAME(bfd_elf,get_symbol_info) -#define elf_print_symbol NAME(bfd_elf,print_symbol) #define elf_get_lineno NAME(bfd_elf,get_lineno) #define elf_set_arch_mach NAME(bfd_elf,set_arch_mach) #define elf_find_nearest_line NAME(bfd_elf,find_nearest_line) @@ -2064,13 +2063,9 @@ assign_file_positions_except_relocs (abfd, dosyms) if (first == NULL) first = hdr; - if ((abfd->flags & D_PAGED) != 0) - { - /* The section VMA must equal the file position modulo - the page size. This is required by the program - header. */ - off += (hdr->sh_addr - off) % maxpagesize; - } + /* The section VMA must equal the file position modulo the + page size. This is required by the program header. */ + off += (hdr->sh_addr - off) % maxpagesize; off = assign_file_position_for_section (hdr, off, false); } @@ -3162,38 +3157,6 @@ elf_get_symbol_info (ignore_abfd, symbol, ret) bfd_symbol_info (symbol, ret); } -void -elf_print_symbol (ignore_abfd, filep, symbol, how) - bfd *ignore_abfd; - PTR filep; - asymbol *symbol; - bfd_print_symbol_type how; -{ - FILE *file = (FILE *) filep; - switch (how) - { - case bfd_print_symbol_name: - fprintf (file, "%s", symbol->name); - break; - case bfd_print_symbol_more: - fprintf (file, "elf "); - fprintf_vma (file, symbol->value); - fprintf (file, " %lx", (long) symbol->flags); - break; - case bfd_print_symbol_all: - { - CONST char *section_name; - section_name = symbol->section ? symbol->section->name : "(*none*)"; - bfd_print_symbol_vandf ((PTR) file, symbol); - fprintf (file, " %s\t%s", - section_name, - symbol->name); - } - break; - } - -} - alent * elf_get_lineno (ignore_abfd, symbol) bfd *ignore_abfd; diff --git a/bfd/libelf.h b/bfd/libelf.h index eeac23b9ee7..6edc9a3ddc3 100644 --- a/bfd/libelf.h +++ b/bfd/libelf.h @@ -512,6 +512,11 @@ struct elf_obj_tdata extern char * elf_string_from_elf_section PARAMS ((bfd *, unsigned, unsigned)); extern char * elf_get_str_section PARAMS ((bfd *, unsigned)); +extern void bfd_elf_print_symbol PARAMS ((bfd *, PTR, asymbol *, + bfd_print_symbol_type)); + +#define bfd_elf32_print_symbol bfd_elf_print_symbol +#define bfd_elf64_print_symbol bfd_elf_print_symbol #define bfd_elf32_mkobject bfd_elf_mkobject #define bfd_elf64_mkobject bfd_elf_mkobject #define elf_mkobject bfd_elf_mkobject @@ -560,8 +565,6 @@ extern long bfd_elf32_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr)); extern long bfd_elf32_canonicalize_reloc PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); extern asymbol *bfd_elf32_make_empty_symbol PARAMS ((bfd *)); -extern void bfd_elf32_print_symbol PARAMS ((bfd *, PTR, asymbol *, - bfd_print_symbol_type)); extern void bfd_elf32_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); extern alent *bfd_elf32_get_lineno PARAMS ((bfd *, asymbol *)); @@ -625,8 +628,6 @@ extern long bfd_elf64_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr)); extern long bfd_elf64_canonicalize_reloc PARAMS ((bfd *, sec_ptr, arelent **, asymbol **)); extern asymbol *bfd_elf64_make_empty_symbol PARAMS ((bfd *)); -extern void bfd_elf64_print_symbol PARAMS ((bfd *, PTR, asymbol *, - bfd_print_symbol_type)); extern void bfd_elf64_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *)); extern alent *bfd_elf64_get_lineno PARAMS ((bfd *, asymbol *));