This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Question] stripped lib and it's line numbers


Hi,

I have a question.
I believe objdump can't show line numbers for a stripped program.
But 'objdump -l' can do that in some cases ?

For example,
libc-2.23.so I use is stripped but objdump -l show it's filename:line numbers.

  $ file /lib/x86_64-linux-gnu/libc-2.23.so
/lib/x86_64-linux-gnu/libc-2.23.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=369de0e1d833caa693af17f17c83ba937f0a4dad, for GNU/Linux 2.6.32, stripped

$ objdump -dlS /lib/x86_64-linux-gnu/libc-2.23.so --start-address=0x7bf50 --stop-address=0x7c240

/lib/x86_64-linux-gnu/libc-2.23.so:     file format elf64-x86-64


Disassembly of section .text:

000000000007bf50 <_IO_adjust_column@@GLIBC_2.2.5+0x40>:
_IO_flush_all_lockp():
/build/glibc-GKVZIf/glibc-2.23/libio/genops.c:760
   7bf50:	41 57                	push   %r15
   7bf52:	41 56                	push   %r14
   7bf54:	41 89 fe             	mov    %edi,%r14d
   7bf57:	41 55                	push   %r13
   7bf59:	41 54                	push   %r12
   7bf5b:	55                   	push   %rbp
   7bf5c:	53                   	push   %rbx
   7bf5d:	48 83 ec 28          	sub    $0x28,%rsp
/build/glibc-GKVZIf/glibc-2.23/libio/genops.c:766
   7bf61:	85 ff                	test   %edi,%edi

...

No such file /build/glibc-GKVZIf/glibc-2.23/libio/genops.c.
But I found the above line numbers are correct at glibc-2.23 tag
of git://sourceware.org/git/glibc.git

How can objdump show line numbers for libc-2.23.so ?


Thanks,
Taeung


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]