Re: Re: coaxing objdump to give useful offsets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jim...

> thanks!  precision++ :-)
Ouch, that's not atomic :))

> One salient difference - Im running on an object file, which explains
> the relative addys

Ok, I get it now. IIUC, this is because the symbols has not been 
relocated yet, thus the symbols still use the file offset...

> yes, thats generically helpful, but Im missing at least one thing
> (the module)
>
> (gdb) disassemble nsc_gpio_sysfs_bits_init
> No symbol "nsc_gpio_sysfs_bits_init" in current context.
>
> I guess I could solve this particular situation by building with 'y'
> rather than 'm'.

You can do that. Another (more difficult) way is by using :
add-symbol-file your-kernel-module-filename.ko <offset>

where "offset" is a value you can get from the related /proc entry 
spesificly that maintains kernel module's section mapping. I forgot 
what the name is, so please check it by yourself. What you will need is 
the start of code section. For 2.4.x, this is trickier...


> I'll also admit that : objdump -d --prefix-address X.o
> is somehow more comprehensible now, though still horribly cluttered
> vs default.
> guess I'll have to accept it, or hack it :-(

Ahh yes, I forgot that option. It is quite helpful too... Also, don't 
forget to use --adjust-vma if you think somehow symbol isn't correctly 
resolved into the address

Good luck...

regards,

Mulyadi


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux