Bug 4030 - objdump ignores .gnu_debuglink
Summary: objdump ignores .gnu_debuglink
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.17
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-12 19:53 UTC by Chuck Ebbert
Modified: 2008-01-17 05:52 UTC (History)
2 users (show)

See Also:
Host: i386-redhat-linux
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chuck Ebbert 2007-02-12 19:53:17 UTC
objdump does not use the .gnu_debuglink information to
find debug information for a stripped executable. This
means objdump -l does not produce line numbers when
disassembling even though the information is available.

$ gcc -g -o forkfork forkfork.c
$ objcopy --only-keep-debug forkfork forkfork.dbg
$ strip forkfork
$ objcopy --add-gnu-debuglink=forkfork.dbg forkfork
$ objdump -h forkfork

forkfork:     file format elf32-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
<SNIP>
 24 .gnu_debuglink 00000014  00000000  00000000  000006f0  2**0
                  CONTENTS, READONLY
$ objdump -l forkfork
[no line numbers in disassembled main()]
$ objdump --version
GNU objdump 2.17.50.0.6-2.fc6 20061020
Comment 1 H.J. Lu 2007-08-01 14:12:15 UTC
Does this patch

http://sourceware.org/ml/binutils-cvs/2007-06/msg00080.html

fix this problem?
Comment 2 Alan Modra 2008-01-17 05:52:56 UTC
Fixed