Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] get_location_info()

Hi Peter,

In case of a fully linked, symbols like functions or global variables are at fixed location.
For instance, do nm vmlinux : You'll see a list of symbols and their absolute location.

Now do a nm <kernel_module> : You'll see a list of symbols but the @ will be very low. When you do nm, you can not know where the module will be loaded.
So these symbols are "relative" to where the .text section (if the symbols belong to .text section). The debugger knows where the module will be loaded and get_location will be able to compute the "final" @ (relative location + where the .text section has been loaded)

If you do a readelf -wi, you can see some rule like AT_location : Either a relative location from a register or an address.

Hope it helps a bit.

Xavier.

On 09/09/2014 01:08 PM, Stefan.Falk@xxxxxxxxxxxx wrote:
Hi folks!
 
Does anybody know some things about the whole get_location_info() part?
 
In symbols.c I see that it is being differentiated between an absolute location and a relative location. I’m not quite sure about what symbols fall into “relative location”.
 
I’m also not quite sure about the SFT_CMD_* macros and what exactly a location info “command” is.
 
Thank you for any information!
 
Best regards
 


_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


Back to the top