question about symbols and function locations

Tim Bird tim.bird at am.sony.com
Tue Aug 16 04:24:55 EST 2005


Hi all,

Sorry if this is a remedial question.  I'm porting some
kernel tracing software to ppc64, and I'm confused about the
information I'm getting for function locations.

In System.map I see most functions have two addresses -
a weak (text) address and a data address:
c00000000000d0a0 W .calibrate_delay
c0000000005c8e80 D calibrate_delay

The latter looks like some kind of jumb table?, with the
real function text located in the lower addresses?

Can someone shed some light on what's going on here?

Thanks in advance,
 -- Tim

Some background:
I generate my trace data by using gcc's -finstrument-functions
option when I compile the kernel and by logging data from
my own __cyg_profile_func_enter/exit functions.  However,
I get somewhat jumbled information.  The __cyg_profile*
functions receive the function address and call site
for the called function.  On ppc64 the function address matches
the data address for the call, but the call site is in the
range of the weak symbols.

I can work around this in my program which resolves the
symbols for the trace log, but I wanted to understand what
was going on.

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
=============================




More information about the Linuxppc64-dev mailing list