* objdump.c (compare_symbols): Sort symbols whose names start with
`.' after other symbols. If no other decision can be made, sort symbols by name.
This commit is contained in:
parent
ed21219c4e
commit
17aa82848e
2 changed files with 25 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Apr 23 12:56:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* objdump.c (compare_symbols): Sort symbols whose names start with
|
||||||
|
`.' after other symbols. If no other decision can be made, sort
|
||||||
|
symbols by name.
|
||||||
|
|
||||||
Thu Apr 18 16:02:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
Thu Apr 18 16:02:11 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
* dep-in.sed: Substitute $(BFDDIR) for @BFDDIR@.
|
* dep-in.sed: Substitute $(BFDDIR) for @BFDDIR@.
|
||||||
|
|
|
@ -432,8 +432,8 @@ compare_symbols (ap, bp)
|
||||||
if (! af && bf)
|
if (! af && bf)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Finally, try to sort global symbols before local symbols before
|
/* Try to sort global symbols before local symbols before debugging
|
||||||
debugging symbols. */
|
symbols. */
|
||||||
|
|
||||||
aflags = a->flags;
|
aflags = a->flags;
|
||||||
bflags = b->flags;
|
bflags = b->flags;
|
||||||
|
@ -452,8 +452,24 @@ compare_symbols (ap, bp)
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if ((aflags & BSF_GLOBAL) != (bflags & BSF_GLOBAL))
|
||||||
|
{
|
||||||
|
if ((aflags & BSF_GLOBAL) != 0)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
/* Symbols that start with '.' might be section names, so sort them
|
||||||
|
after symbols that don't start with '.'. */
|
||||||
|
if (an[0] == '.' && bn[0] != '.')
|
||||||
|
return 1;
|
||||||
|
if (an[0] != '.' && bn[0] == '.')
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
/* Finally, if we can't distinguish them in any other way, try to
|
||||||
|
get consistent results by sorting the symbols by name. */
|
||||||
|
return strcmp (an, bn);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sort relocs into address order. */
|
/* Sort relocs into address order. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue