Bug 714824 - bug when linking kernel - debug info for setup_arch not found
Summary: bug when linking kernel - debug info for setup_arch not found
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: binutils
Version: 6.1
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Andreas Schwab
QA Contact: qe-baseos-tools
Depends On:
TreeView+ depends on / blocked
Reported: 2011-06-20 21:48 UTC by Michael Hebenstreit
Modified: 2011-12-06 17:00 UTC (History)
6 users (show)

Fixed In Version: binutils-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-12-06 17:00:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1523 normal SHIPPED_LIVE binutils bug fix and enhancement update 2011-12-06 00:50:07 UTC

Description Michael Hebenstreit 2011-06-20 21:48:09 UTC
Description of problem: after compiling a kernel from scratch some debug information is missing. 

Version-Release number of selected component (if applicable):

How reproducible: reproduced with kernel sources for RH6.1 linux-2.6.32-131.0.15.el6.x86_64, and vanilla linux- and linux-; it worked with RH5.4

Steps to Reproduce:
1. take a kernel source
2. set "compile with debug infos", compile,
3. start gdb, try "l setup_arch"

Actual results:

[mhebenst@et19 linux-]$ gdb vmlinux
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-48.el6)
Reading symbols from /panfs/panfs2/home2/mhebenst/development/linux-
(gdb) l setup_arch
No line number known for setup_arch.

Expected results:

[mhebenst@eln1 linux-]$ gdb vmlinux
GNU gdb Fedora (6.8-37.el5)
This GDB was configured as "x86_64-redhat-linux-gnu"...
(gdb) l setup_arch
716      *
717      * Note: On x86_64, fixmaps are ready for use even before this is called.
718      */
720     void __init setup_arch(char **cmdline_p)
721     {
722     #ifdef CONFIG_X86_32
723             memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
724             visws_early_detect();
725     #else
(gdb) quit

Additional info: as mentioned compiling on RH5.4 does not show this problem; the gdb version is also not the issue - after compiling on RH5.4 both 6.8 and 7.2 versions of gdb see the function correctly

Comment 5 Jakub Jelinek 2011-06-21 14:42:18 UTC
Reassigning temporarily to gdb for analysis, this might be a gdb bug but also a gcc bug, though nothing obvious has been spotted in the generated debug info yet.

Comment 6 Jan Kratochvil 2011-06-24 23:59:11 UTC
ld.bfd needs a backport:
gc-sections and DWARF ranges

9924d284f0f52226a71d52f414640626feb78c24 is the first bad (=good) commit
commit 9924d284f0f52226a71d52f414640626feb78c24
Author: Daniel Jacobowitz <dan@debian.org>
Date:   Mon Oct 25 15:54:13 2010 +0000

setup_arch which errorneously does not belong into its CU's DW_AT_ranges.

 <0><13b961>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <13b967>   DW_AT_name        : arch/x86/kernel/setup.c
    <13b96b>   DW_AT_comp_dir    : /usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64
    <13b97f>   DW_AT_ranges      : 0x5700

 <1><148a2e>: Abbrev Number: 92 (DW_TAG_subprogram)
    <148a30>   DW_AT_name        : setup_arch
    <148a38>   DW_AT_low_pc      : 0xffffffff81ba5ed6
    <148a40>   DW_AT_high_pc     : 0xffffffff81ba69bc

    Offset   Begin    End
    00005700 ffffffff8100d6fc ffffffff8100d74e
    00005700 ffffffff81ba5dc9 ffffffff81ba5e01
    00005700 ffffffff81ba5e01 ffffffff81ba5e49
    00005700 <End of list>

    00005700 ffffffff8100d6fc ffffffff8100d74e
    00005700 ffffffff819a5dc9 ffffffff819a5e01
    00005700 ffffffff819a5e01 ffffffff819a5e49
    00005700 0000000000000001 0000000000000001 (start == end)
    00005700 ffffffff819a5e49 ffffffff819a5e9f
    00005700 ffffffff819a5e9f ffffffff819a5ed6
    00005700 ffffffff819a5ed6 ffffffff819a69bc
    00005700 <End of list>

Comment 11 errata-xmlrpc 2011-12-06 17:00:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.