Re: Re: coaxing objdump to give useful offsets

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

 



Hi...

> Let me rephrase.
> 1st column is as you say.
> The 3rd column has <function-name> +< offset to an instruction >

yeah, to be precise: function-name + offset + "/" + size of symbol+ 
module name (from what I read in kernel/kallsyms.c, function 
__print_symbol() )

> Unfortunately, function-name + offset is not as helpfull
> as it could be, cuz objdump prints file-relative addresses,
> not function-relative ones.

BTW, I re-checked my objdump output and try to compare it with yours:
c0100000 <startup_32>:
c0100000:       fc                      cld
c0100001:       b8 68 00 00 00          mov    $0x68,%eax
c0100006:       8e d8                   mov    %eax,%ds
c0100008:       8e c0                   mov    %eax,%es
c010000a:       8e e0                   mov    %eax,%fs
c010000c:       8e e8                   mov    %eax,%gs
c010000e:       bf 00 20 10 00          mov    $0x102000,%edi

As you see, I simply did objdump -d vmlinux and objdump correctly use 
LMA (Logical Memory Address) as the address. But still, I see no 
options to change it to become function-relative in objdump. However, I 
got this when using gdb:
(gdb) disassemble startup_32
Dump of assembler code for function startup_32:
0xc0100000 <startup_32+0>:      cld
0xc0100001 <startup_32+1>:      mov    $0x68,%eax
0xc0100006 <startup_32+6>:      mov    %eax,%ds
0xc0100008 <startup_32+8>:      mov    %eax,%es
0xc010000a <startup_32+10>:     mov    %eax,%fs
0xc010000c <startup_32+12>:     mov    %eax,%gs
0xc010000e <startup_32+14>:     mov    $0x102000,%edi

Is that what you're looking for?

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