[patch] removing gprof sentinels
kwerner
ken@linux.vnet.ibm.com
Thu Feb 12 11:28:00 GMT 2009
Hi,
The attached patch removes the <locore> and <hicore> sentinels from the gprof
code. They were introduced back in 1994 to prevent the sym_lookup function
from returning zero. sym_lookup takes a sorted list of Syms and a VMA and
returns the corresponding symbol or zero if the VMA is out of range. The
current code assumes that there is no code at address zero which isn't true
for the SPU. I searched all occurrences of sym_lookup and added checks where
necessary. No regressions.
Ken
gprof/ChangeLog:
2009-02-12 Ken Werner <ken.werner@de.ibm.com>
* corefile.c (core_create_function_syms): Remove "<locore>" and
"<hicore>" sentinels.
* gprof.c: Likewise.
* cg_print.c (cg_print_function_ordering): Likewise.
* alpha.c (alpha_find_call): Add check for return value of sym_lookup.
* mips.c (mips_find_call): Likewise.
* sparc.c (sparc_find_call): Likewise.
* tahoe.c (tahoe_find_call): Likewise.
* vax.c (vax_find_call): Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sentinels.patch
Type: text/x-patch
Size: 10142 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090212/01817e1e/attachment.bin>
More information about the Binutils
mailing list