Fix resolving symbol names on ARM.
On ARM, binutils are adding '$a' symbols in the symbol table for every function (in addition to normal symbol). When gprof(1) looks up symbol name, it often reads '$a' instead of proper function name, because it find it first. With this fix, when read symbol name begins with '$' and previous symbol has the same address, it will use previous symbol name (which is proper function name). Obtained from: Semihalf
This commit is contained in:
parent
d3d6976650
commit
255f31647e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=235975
@ -66,6 +66,12 @@ nllookup( address )
|
|||||||
printf( "[nllookup] %d (%d) probes\n" , probes , nname-1 );
|
printf( "[nllookup] %d (%d) probes\n" , probes , nname-1 );
|
||||||
}
|
}
|
||||||
# endif /* DEBUG */
|
# endif /* DEBUG */
|
||||||
|
#if defined(__arm__)
|
||||||
|
if (nl[middle].name[0] == '$' &&
|
||||||
|
nl[middle-1].value == nl[middle].value)
|
||||||
|
middle--;
|
||||||
|
#endif
|
||||||
|
|
||||||
return &nl[ middle ];
|
return &nl[ middle ];
|
||||||
}
|
}
|
||||||
if ( nl[ middle ].value > address ) {
|
if ( nl[ middle ].value > address ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user