summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/binutils/nm.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/binutils/binutils/nm.c')
-rw-r--r--contrib/binutils/binutils/nm.c347
1 files changed, 144 insertions, 203 deletions
diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c
index b9689b1..bac7d38 100644
--- a/contrib/binutils/binutils/nm.c
+++ b/contrib/binutils/binutils/nm.c
@@ -1,6 +1,6 @@
/* nm.c -- Describe symbol table of a rel file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002
+ 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -37,7 +37,7 @@
struct size_sym
{
- const PTR minisym;
+ const void *minisym;
bfd_vma size;
};
@@ -68,66 +68,69 @@ struct extended_symbol_info
#define SYM_SIZE(sym) \
(sym->elfinfo ? sym->elfinfo->internal_elf_sym.st_size: sym->ssize)
-static void usage PARAMS ((FILE *, int));
-static void set_print_radix PARAMS ((char *));
-static void set_output_format PARAMS ((char *));
-static void display_archive PARAMS ((bfd *));
-static boolean display_file PARAMS ((char *));
-static void display_rel_file PARAMS ((bfd *, bfd *));
-static long filter_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int));
-static long sort_symbols_by_size PARAMS ((bfd *, boolean, PTR, long, unsigned int, struct size_sym **));
-static void print_symbols PARAMS ((bfd *, boolean, PTR, long, unsigned int, bfd *));
-static void print_size_symbols PARAMS ((bfd *, boolean, struct size_sym *, long, bfd *));
-static void print_symname PARAMS ((const char *, const char *, bfd *));
-static void print_symbol PARAMS ((bfd *, asymbol *, bfd_vma ssize, bfd *));
-static void print_symdef_entry PARAMS ((bfd *));
+static void usage (FILE *, int);
+static void set_print_radix (char *);
+static void set_output_format (char *);
+static void display_archive (bfd *);
+static bfd_boolean display_file (char *);
+static void display_rel_file (bfd *, bfd *);
+static long filter_symbols (bfd *, bfd_boolean, void *, long, unsigned int);
+static long sort_symbols_by_size
+ (bfd *, bfd_boolean, void *, long, unsigned int, struct size_sym **);
+static void print_symbols
+ (bfd *, bfd_boolean, void *, long, unsigned int, bfd *);
+static void print_size_symbols
+ (bfd *, bfd_boolean, struct size_sym *, long, bfd *);
+static void print_symname (const char *, const char *, bfd *);
+static void print_symbol (bfd *, asymbol *, bfd_vma ssize, bfd *);
+static void print_symdef_entry (bfd *);
/* The sorting functions. */
-static int numeric_forward PARAMS ((const PTR, const PTR));
-static int numeric_reverse PARAMS ((const PTR, const PTR));
-static int non_numeric_forward PARAMS ((const PTR, const PTR));
-static int non_numeric_reverse PARAMS ((const PTR, const PTR));
-static int size_forward1 PARAMS ((const PTR, const PTR));
-static int size_forward2 PARAMS ((const PTR, const PTR));
+static int numeric_forward (const void *, const void *);
+static int numeric_reverse (const void *, const void *);
+static int non_numeric_forward (const void *, const void *);
+static int non_numeric_reverse (const void *, const void *);
+static int size_forward1 (const void *, const void *);
+static int size_forward2 (const void *, const void *);
/* The output formatting functions. */
-static void print_object_filename_bsd PARAMS ((char *));
-static void print_object_filename_sysv PARAMS ((char *));
-static void print_object_filename_posix PARAMS ((char *));
-static void print_archive_filename_bsd PARAMS ((char *));
-static void print_archive_filename_sysv PARAMS ((char *));
-static void print_archive_filename_posix PARAMS ((char *));
-static void print_archive_member_bsd PARAMS ((char *, const char *));
-static void print_archive_member_sysv PARAMS ((char *, const char *));
-static void print_archive_member_posix PARAMS ((char *, const char *));
-static void print_symbol_filename_bsd PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_sysv PARAMS ((bfd *, bfd *));
-static void print_symbol_filename_posix PARAMS ((bfd *, bfd *));
-static void print_value PARAMS ((bfd *, bfd_vma));
-static void print_symbol_info_bsd PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_sysv PARAMS ((struct extended_symbol_info *, bfd *));
-static void print_symbol_info_posix PARAMS ((struct extended_symbol_info *, bfd *));
-static void get_relocs PARAMS ((bfd *, asection *, PTR));
-static const char * get_symbol_type PARAMS ((unsigned int));
+static void print_object_filename_bsd (char *);
+static void print_object_filename_sysv (char *);
+static void print_object_filename_posix (char *);
+static void print_archive_filename_bsd (char *);
+static void print_archive_filename_sysv (char *);
+static void print_archive_filename_posix (char *);
+static void print_archive_member_bsd (char *, const char *);
+static void print_archive_member_sysv (char *, const char *);
+static void print_archive_member_posix (char *, const char *);
+static void print_symbol_filename_bsd (bfd *, bfd *);
+static void print_symbol_filename_sysv (bfd *, bfd *);
+static void print_symbol_filename_posix (bfd *, bfd *);
+static void print_value (bfd *, bfd_vma);
+static void print_symbol_info_bsd (struct extended_symbol_info *, bfd *);
+static void print_symbol_info_sysv (struct extended_symbol_info *, bfd *);
+static void print_symbol_info_posix (struct extended_symbol_info *, bfd *);
+static void get_relocs (bfd *, asection *, void *);
+static const char * get_symbol_type (unsigned int);
/* Support for different output formats. */
struct output_fns
{
/* Print the name of an object file given on the command line. */
- void (*print_object_filename) PARAMS ((char *));
+ void (*print_object_filename) (char *);
/* Print the name of an archive file given on the command line. */
- void (*print_archive_filename) PARAMS ((char *));
+ void (*print_archive_filename) (char *);
/* Print the name of an archive member file. */
- void (*print_archive_member) PARAMS ((char *, const char *));
+ void (*print_archive_member) (char *, const char *);
/* Print the name of the file (and archive, if there is one)
containing a symbol. */
- void (*print_symbol_filename) PARAMS ((bfd *, bfd *));
+ void (*print_symbol_filename) (bfd *, bfd *);
/* Print a line of information about a symbol. */
- void (*print_symbol_info) PARAMS ((struct extended_symbol_info *, bfd *));
+ void (*print_symbol_info) (struct extended_symbol_info *, bfd *);
};
static struct output_fns formats[] =
@@ -239,9 +242,7 @@ static struct option long_options[] =
/* Some error-reporting functions. */
static void
-usage (stream, status)
- FILE *stream;
- int status;
+usage (FILE *stream, int status)
{
fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
fprintf (stream, _(" List symbols in [file(s)] (a.out by default).\n"));
@@ -251,7 +252,8 @@ usage (stream, status)
-B Same as --format=bsd\n\
-C, --demangle[=STYLE] Decode low-level symbol names into user-level names\n\
The STYLE, if specified, can be `auto' (the default),\n\
- `gnu', 'lucid', 'arm', 'hp', 'edg' or 'gnu-new-abi'\n\
+ `gnu', `lucid', `arm', `hp', `edg', `gnu-v3', `java'\n\
+ or `gnat'\n\
--no-demangle Do not demangle low-level symbol names\n\
-D, --dynamic Display dynamic symbols instead of normal symbols\n\
--defined-only Display only defined symbols\n\
@@ -285,8 +287,7 @@ usage (stream, status)
/* Set the radix for the symbol value and size according to RADIX. */
static void
-set_print_radix (radix)
- char *radix;
+set_print_radix (char *radix)
{
switch (*radix)
{
@@ -316,8 +317,7 @@ set_print_radix (radix)
}
static void
-set_output_format (f)
- char *f;
+set_output_format (char *f)
{
int i;
@@ -341,12 +341,10 @@ set_output_format (f)
format = &formats[i];
}
-int main PARAMS ((int, char **));
+int main (int, char **);
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int retval;
@@ -446,7 +444,7 @@ main (argc, argv)
break;
case 'X':
/* Ignored for (partial) AIX compatibility. On AIX, the
- argument has values 32, 64, or 32_64, and specfies that
+ argument has values 32, 64, or 32_64, and specifies that
only 32-bit, only 64-bit, or both kinds of objects should
be examined. The default is 32. So plain AIX nm on a
library archive with both kinds of objects will ignore
@@ -471,6 +469,13 @@ main (argc, argv)
if (show_version)
print_version ("nm");
+ if (sort_by_size && undefined_only)
+ {
+ non_fatal (_("Using the --size-sort and --undefined-only options together"));
+ non_fatal (_("will produce no output, since undefined symbols have no size."));
+ return 0;
+ }
+
/* OK, all options now parsed. If no filename specified, do a.out. */
if (optind == argc)
return !display_file ("a.out");
@@ -504,8 +509,7 @@ main (argc, argv)
}
static const char *
-get_symbol_type (type)
- unsigned int type;
+get_symbol_type (unsigned int type)
{
static char buff [32];
@@ -530,8 +534,7 @@ get_symbol_type (type)
}
static void
-display_archive (file)
- bfd *file;
+display_archive (bfd *file)
{
bfd *arfile = NULL;
bfd *last_arfile = NULL;
@@ -592,19 +595,21 @@ display_archive (file)
}
}
-static boolean
-display_file (filename)
- char *filename;
+static bfd_boolean
+display_file (char *filename)
{
- boolean retval = true;
+ bfd_boolean retval = TRUE;
bfd *file;
char **matching;
+ if (get_file_size (filename) < 1)
+ return FALSE;
+
file = bfd_openr (filename, target);
if (file == NULL)
{
bfd_nonfatal (filename);
- return false;
+ return FALSE;
}
if (bfd_check_format (file, bfd_archive))
@@ -628,10 +633,10 @@ display_file (filename)
list_matching_formats (matching);
free (matching);
}
- retval = false;
+ retval = FALSE;
}
- if (bfd_close (file) == false)
+ if (!bfd_close (file))
bfd_fatal (filename);
lineno_cache_bfd = NULL;
@@ -643,7 +648,7 @@ display_file (filename)
/* These globals are used to pass information into the sorting
routines. */
static bfd *sort_bfd;
-static boolean sort_dynamic;
+static bfd_boolean sort_dynamic;
static asymbol *sort_x;
static asymbol *sort_y;
@@ -655,9 +660,7 @@ static asymbol *sort_y;
specially -- i.e., their sizes are used as their "values". */
static int
-numeric_forward (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+numeric_forward (const void *P_x, const void *P_y)
{
asymbol *x, *y;
asection *xs, *ys;
@@ -684,17 +687,13 @@ numeric_forward (P_x, P_y)
}
static int
-numeric_reverse (x, y)
- const PTR x;
- const PTR y;
+numeric_reverse (const void *x, const void *y)
{
return - numeric_forward (x, y);
}
static int
-non_numeric_forward (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+non_numeric_forward (const void *P_x, const void *P_y)
{
asymbol *x, *y;
const char *xn, *yn;
@@ -727,14 +726,12 @@ non_numeric_forward (P_x, P_y)
}
static int
-non_numeric_reverse (x, y)
- const PTR x;
- const PTR y;
+non_numeric_reverse (const void *x, const void *y)
{
return - non_numeric_forward (x, y);
}
-static int (*(sorters[2][2])) PARAMS ((const PTR, const PTR)) =
+static int (*(sorters[2][2])) (const void *, const void *) =
{
{ non_numeric_forward, non_numeric_reverse },
{ numeric_forward, numeric_reverse }
@@ -752,9 +749,7 @@ static int (*(sorters[2][2])) PARAMS ((const PTR, const PTR)) =
value. */
static int
-size_forward1 (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+size_forward1 (const void *P_x, const void *P_y)
{
asymbol *x, *y;
asection *xs, *ys;
@@ -824,9 +819,7 @@ size_forward1 (P_x, P_y)
an array of size_sym structures into size order. */
static int
-size_forward2 (P_x, P_y)
- const PTR P_x;
- const PTR P_y;
+size_forward2 (const void *P_x, const void *P_y)
{
const struct size_sym *x = (const struct size_sym *) P_x;
const struct size_sym *y = (const struct size_sym *) P_y;
@@ -845,13 +838,9 @@ size_forward2 (P_x, P_y)
size. */
static long
-sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
- bfd *abfd;
- boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
- struct size_sym **symsizesp;
+sort_symbols_by_size (bfd *abfd, bfd_boolean dynamic, void *minisyms,
+ long symcount, unsigned int size,
+ struct size_sym **symsizesp)
{
struct size_sym *symsizes;
bfd_byte *from, *fromend;
@@ -876,7 +865,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
if (from < fromend)
{
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const PTR) from,
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from,
store_sym);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -893,7 +882,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
{
next = bfd_minisymbol_to_symbol (abfd,
dynamic,
- (const PTR) (from + size),
+ (const void *) (from + size),
store_next);
if (next == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -920,7 +909,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
if (sz != 0)
{
- symsizes->minisym = (const PTR) from;
+ symsizes->minisym = (const void *) from;
symsizes->size = sz;
++symsizes;
}
@@ -935,7 +924,7 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
symcount = symsizes - *symsizesp;
/* We must now sort again by size. */
- qsort ((PTR) *symsizesp, symcount, sizeof (struct size_sym), size_forward2);
+ qsort ((void *) *symsizesp, symcount, sizeof (struct size_sym), size_forward2);
return symcount;
}
@@ -943,12 +932,10 @@ sort_symbols_by_size (abfd, dynamic, minisyms, symcount, size, symsizesp)
/* If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD. */
static void
-display_rel_file (abfd, archive_bfd)
- bfd *abfd;
- bfd *archive_bfd;
+display_rel_file (bfd *abfd, bfd *archive_bfd)
{
long symcount;
- PTR minisyms;
+ void *minisyms;
unsigned int size;
struct size_sym *symsizes;
@@ -1008,12 +995,8 @@ display_rel_file (abfd, archive_bfd)
Return the number of symbols to be printed. */
static long
-filter_symbols (abfd, dynamic, minisyms, symcount, size)
- bfd *abfd;
- boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
+filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
+ long symcount, unsigned int size)
{
bfd_byte *from, *fromend, *to;
asymbol *store;
@@ -1033,7 +1016,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size)
PROGRESS (1);
- sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const PTR) from, store);
+ sym = bfd_minisymbol_to_symbol (abfd, dynamic, (const void *) from, store);
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
@@ -1079,10 +1062,7 @@ filter_symbols (abfd, dynamic, minisyms, symcount, size)
demangling it if requested. */
static void
-print_symname (format, name, abfd)
- const char *format;
- const char *name;
- bfd *abfd;
+print_symname (const char *format, const char *name, bfd *abfd)
{
if (do_demangle && *name)
{
@@ -1100,13 +1080,8 @@ print_symname (format, name, abfd)
containing ABFD. */
static void
-print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
- bfd *abfd;
- boolean dynamic;
- PTR minisyms;
- long symcount;
- unsigned int size;
- bfd *archive_bfd;
+print_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms, long symcount,
+ unsigned int size, bfd *archive_bfd)
{
asymbol *store;
bfd_byte *from, *fromend;
@@ -1132,12 +1107,9 @@ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd)
/* Print the symbols when sorting by size. */
static void
-print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd)
- bfd *abfd;
- boolean dynamic;
- struct size_sym *symsizes;
- long symcount;
- bfd *archive_bfd;
+print_size_symbols (bfd *abfd, bfd_boolean dynamic,
+ struct size_sym *symsizes, long symcount,
+ bfd *archive_bfd)
{
asymbol *store;
struct size_sym *from, *fromend;
@@ -1170,35 +1142,23 @@ print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd)
/* Print a single symbol. */
static void
-print_symbol (abfd, sym, ssize, archive_bfd)
- bfd *abfd;
- asymbol *sym;
- bfd_vma ssize;
- bfd *archive_bfd;
+print_symbol (bfd *abfd, asymbol *sym, bfd_vma ssize, bfd *archive_bfd)
{
+ symbol_info syminfo;
+ struct extended_symbol_info info;
+
PROGRESS (1);
(*format->print_symbol_filename) (archive_bfd, abfd);
- if (undefined_only)
- {
- if (bfd_is_und_section (bfd_get_section (sym)))
- print_symname ("%s", bfd_asymbol_name (sym), abfd);
- }
+ bfd_get_symbol_info (abfd, sym, &syminfo);
+ info.sinfo = &syminfo;
+ info.ssize = ssize;
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ info.elfinfo = (elf_symbol_type *) sym;
else
- {
- symbol_info syminfo;
- struct extended_symbol_info info;
-
- bfd_get_symbol_info (abfd, sym, &syminfo);
- info.sinfo = &syminfo;
- info.ssize = ssize;
- if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
- info.elfinfo = (elf_symbol_type *) sym;
- else
- info.elfinfo = NULL;
- (*format->print_symbol_info) (&info, abfd);
- }
+ info.elfinfo = NULL;
+ (*format->print_symbol_info) (&info, abfd);
if (line_numbers)
{
@@ -1267,7 +1227,7 @@ print_symbol (abfd, sym, ssize, archive_bfd)
info.relocs = relocs;
info.relcount = relcount;
info.syms = syms;
- bfd_map_over_sections (abfd, get_relocs, (PTR) &info);
+ bfd_map_over_sections (abfd, get_relocs, (void *) &info);
lineno_cache_rel_bfd = abfd;
}
@@ -1324,16 +1284,14 @@ print_symbol (abfd, sym, ssize, archive_bfd)
/* Print the name of an object file given on the command line. */
static void
-print_object_filename_bsd (filename)
- char *filename;
+print_object_filename_bsd (char *filename)
{
if (filename_per_file && !filename_per_symbol)
printf ("\n%s:\n", filename);
}
static void
-print_object_filename_sysv (filename)
- char *filename;
+print_object_filename_sysv (char *filename)
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s:\n\n"), filename);
@@ -1348,8 +1306,7 @@ Name Value Class Type Size
}
static void
-print_object_filename_posix (filename)
- char *filename;
+print_object_filename_posix (char *filename)
{
if (filename_per_file && !filename_per_symbol)
printf ("%s:\n", filename);
@@ -1358,40 +1315,34 @@ print_object_filename_posix (filename)
/* Print the name of an archive file given on the command line. */
static void
-print_archive_filename_bsd (filename)
- char *filename;
+print_archive_filename_bsd (char *filename)
{
if (filename_per_file)
printf ("\n%s:\n", filename);
}
static void
-print_archive_filename_sysv (filename)
- char *filename ATTRIBUTE_UNUSED;
+print_archive_filename_sysv (char *filename ATTRIBUTE_UNUSED)
{
}
static void
-print_archive_filename_posix (filename)
- char *filename ATTRIBUTE_UNUSED;
+print_archive_filename_posix (char *filename ATTRIBUTE_UNUSED)
{
}
/* Print the name of an archive member file. */
static void
-print_archive_member_bsd (archive, filename)
- char *archive ATTRIBUTE_UNUSED;
- const char *filename;
+print_archive_member_bsd (char *archive ATTRIBUTE_UNUSED,
+ const char *filename)
{
if (!filename_per_symbol)
printf ("\n%s:\n", filename);
}
static void
-print_archive_member_sysv (archive, filename)
- char *archive;
- const char *filename;
+print_archive_member_sysv (char *archive, const char *filename)
{
if (undefined_only)
printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
@@ -1406,9 +1357,7 @@ Name Value Class Type Size
}
static void
-print_archive_member_posix (archive, filename)
- char *archive;
- const char *filename;
+print_archive_member_posix (char *archive, const char *filename)
{
if (!filename_per_symbol)
printf ("%s[%s]:\n", archive, filename);
@@ -1418,8 +1367,7 @@ print_archive_member_posix (archive, filename)
containing a symbol. */
static void
-print_symbol_filename_bsd (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_bsd (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1430,8 +1378,7 @@ print_symbol_filename_bsd (archive_bfd, abfd)
}
static void
-print_symbol_filename_sysv (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_sysv (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1442,8 +1389,7 @@ print_symbol_filename_sysv (archive_bfd, abfd)
}
static void
-print_symbol_filename_posix (archive_bfd, abfd)
- bfd *archive_bfd, *abfd;
+print_symbol_filename_posix (bfd *archive_bfd, bfd *abfd)
{
if (filename_per_symbol)
{
@@ -1458,9 +1404,7 @@ print_symbol_filename_posix (archive_bfd, abfd)
/* Print a symbol value. */
static void
-print_value (abfd, val)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_vma val;
+print_value (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma val)
{
#if ! defined (BFD64) || BFD_HOST_64BIT_LONG
printf (value_format, val);
@@ -1490,9 +1434,7 @@ print_value (abfd, val)
/* Print a line of information about a symbol. */
static void
-print_symbol_info_bsd (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_bsd (struct extended_symbol_info *info, bfd *abfd)
{
if (bfd_is_undefined_symclass (SYM_TYPE (info)))
{
@@ -1502,11 +1444,18 @@ print_symbol_info_bsd (info, abfd)
}
else
{
- print_value (abfd, SYM_VALUE (info));
+ /* Normally we print the value of the symbol. If we are printing the
+ size or sorting by size then we print its size, except for the
+ (weird) special case where both flags are defined, in which case we
+ print both values. This conforms to documented behaviour. */
+ if (sort_by_size && !print_size)
+ print_value (abfd, SYM_SIZE (info));
+ else
+ print_value (abfd, SYM_VALUE (info));
if (print_size && SYM_SIZE (info))
{
- printf(" ");
+ printf (" ");
print_value (abfd, SYM_SIZE (info));
}
}
@@ -1526,9 +1475,7 @@ print_symbol_info_bsd (info, abfd)
}
static void
-print_symbol_info_sysv (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_sysv (struct extended_symbol_info *info, bfd *abfd)
{
print_symname ("%-20s|", SYM_NAME (info), abfd);
@@ -1547,9 +1494,9 @@ print_symbol_info_sysv (info, abfd)
if (SYM_TYPE (info) == '-')
{
/* A stab. */
- printf ("%18s| ", SYM_STAB_NAME (info)); /* (C) Type */
- printf (desc_format, SYM_STAB_DESC (info)); /* Size */
- printf ("| |"); /* Line, Section */
+ printf ("%18s| ", SYM_STAB_NAME (info)); /* (C) Type. */
+ printf (desc_format, SYM_STAB_DESC (info)); /* Size. */
+ printf ("| |"); /* Line, Section. */
}
else
{
@@ -1578,9 +1525,7 @@ print_symbol_info_sysv (info, abfd)
}
static void
-print_symbol_info_posix (info, abfd)
- struct extended_symbol_info *info;
- bfd *abfd;
+print_symbol_info_posix (struct extended_symbol_info *info, bfd *abfd)
{
print_symname ("%s ", SYM_NAME (info), abfd);
printf ("%c ", SYM_TYPE (info));
@@ -1597,12 +1542,11 @@ print_symbol_info_posix (info, abfd)
}
static void
-print_symdef_entry (abfd)
- bfd *abfd;
+print_symdef_entry (bfd *abfd)
{
symindex idx = BFD_NO_MORE_SYMBOLS;
carsym *thesym;
- boolean everprinted = false;
+ bfd_boolean everprinted = FALSE;
for (idx = bfd_get_next_mapent (abfd, idx, &thesym);
idx != BFD_NO_MORE_SYMBOLS;
@@ -1612,7 +1556,7 @@ print_symdef_entry (abfd)
if (!everprinted)
{
printf (_("\nArchive index:\n"));
- everprinted = true;
+ everprinted = TRUE;
}
elt = bfd_get_elt_at_index (abfd, idx);
if (elt == NULL)
@@ -1629,10 +1573,7 @@ print_symdef_entry (abfd)
It is called via bfd_map_over_sections. */
static void
-get_relocs (abfd, sec, dataarg)
- bfd *abfd;
- asection *sec;
- PTR dataarg;
+get_relocs (bfd *abfd, asection *sec, void *dataarg)
{
struct get_relocs_info *data = (struct get_relocs_info *) dataarg;
OpenPOWER on IntegriCloud