Symbol sorting means we can't assume that the last n symbols are
synthetic.
* nm.c (print_symbol): Remove is_synthetic param. Test sym->flags
instead.
(print_size_symbols, print_symbols): Adjust to suit, deleting
now unused synth_count param and fromsynth var.
(display_rel_file): Adjust, localizing synth_count.
+2016-09-19 Alan Modra <amodra@gmail.com>
+
+ * nm.c (print_symbol): Remove is_synthetic param. Test sym->flags
+ instead.
+ (print_size_symbols, print_symbols): Adjust to suit, deleting
+ now unused synth_count param and fromsynth var.
+ (display_rel_file): Adjust, localizing synth_count.
+
2016-09-14 Ed Maste <emaste@freebsd.org>
* readelf.c (process_mips_specific): Fix typo in error message.
2016-09-14 Ed Maste <emaste@freebsd.org>
* readelf.c (process_mips_specific): Fix typo in error message.
print_symbol (bfd * abfd,
asymbol * sym,
bfd_vma ssize,
print_symbol (bfd * abfd,
asymbol * sym,
bfd_vma ssize,
- bfd * archive_bfd,
- bfd_boolean is_synthetic)
{
symbol_info syminfo;
struct extended_symbol_info info;
{
symbol_info syminfo;
struct extended_symbol_info info;
info.sinfo = &syminfo;
info.ssize = ssize;
/* Synthetic symbols do not have a full symbol type set of data available. */
info.sinfo = &syminfo;
info.ssize = ssize;
/* Synthetic symbols do not have a full symbol type set of data available. */
+ if ((sym->flags & BSF_SYNTHETIC) != 0)
{
info.elfinfo = NULL;
info.coffinfo = NULL;
{
info.elfinfo = NULL;
info.coffinfo = NULL;
bfd_boolean is_dynamic,
struct size_sym * symsizes,
long symcount,
bfd_boolean is_dynamic,
struct size_sym * symsizes,
long symcount,
bfd * archive_bfd)
{
asymbol *store;
struct size_sym *from;
struct size_sym *fromend;
bfd * archive_bfd)
{
asymbol *store;
struct size_sym *from;
struct size_sym *fromend;
- struct size_sym *fromsynth;
store = bfd_make_empty_symbol (abfd);
if (store == NULL)
store = bfd_make_empty_symbol (abfd);
if (store == NULL)
from = symsizes;
fromend = from + symcount;
from = symsizes;
fromend = from + symcount;
- fromsynth = symsizes + (symcount - synth_count);
for (; from < fromend; from++)
{
for (; from < fromend; from++)
{
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
- print_symbol (abfd, sym, from->size, archive_bfd, from >= fromsynth);
+ print_symbol (abfd, sym, from->size, archive_bfd);
If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD.
If ARCHIVE_BFD is non-NULL, it is the archive containing ABFD.
- SYMCOUNT is the number of symbols in MINISYMS and SYNTH_COUNT
- is the number of these that are synthetic. Synthetic symbols,
- if any are present, always come at the end of the MINISYMS.
+ SYMCOUNT is the number of symbols in MINISYMS.
SIZE is the size of a symbol in MINISYMS. */
SIZE is the size of a symbol in MINISYMS. */
bfd_boolean is_dynamic,
void * minisyms,
long symcount,
bfd_boolean is_dynamic,
void * minisyms,
long symcount,
unsigned int size,
bfd * archive_bfd)
{
asymbol *store;
bfd_byte *from;
bfd_byte *fromend;
unsigned int size,
bfd * archive_bfd)
{
asymbol *store;
bfd_byte *from;
bfd_byte *fromend;
store = bfd_make_empty_symbol (abfd);
if (store == NULL)
store = bfd_make_empty_symbol (abfd);
if (store == NULL)
from = (bfd_byte *) minisyms;
fromend = from + symcount * size;
from = (bfd_byte *) minisyms;
fromend = from + symcount * size;
- fromsynth = (bfd_byte *) minisyms + ((symcount - synth_count) * size);
for (; from < fromend; from += size)
{
for (; from < fromend; from += size)
{
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
if (sym == NULL)
bfd_fatal (bfd_get_filename (abfd));
- print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd, from >= fromsynth);
+ print_symbol (abfd, sym, (bfd_vma) 0, archive_bfd);
display_rel_file (bfd *abfd, bfd *archive_bfd)
{
long symcount;
display_rel_file (bfd *abfd, bfd *archive_bfd)
{
long symcount;
void *minisyms;
unsigned int size;
struct size_sym *symsizes;
void *minisyms;
unsigned int size;
struct size_sym *symsizes;
asymbol **dyn_syms = NULL;
long static_count = 0;
long dyn_count = 0;
asymbol **dyn_syms = NULL;
long static_count = 0;
long dyn_count = 0;
- print_symbols (abfd, dynamic, minisyms, symcount, synth_count, size, archive_bfd);
+ print_symbols (abfd, dynamic, minisyms, symcount, size, archive_bfd);
- print_size_symbols (abfd, dynamic, symsizes, symcount, synth_count, archive_bfd);
+ print_size_symbols (abfd, dynamic, symsizes, symcount, archive_bfd);
free (minisyms);
free (symsizes);
free (minisyms);
free (symsizes);