This is sources Bugzilla
Bugzilla Version 2.17.5
Bugzilla Bug 615
  readelf gives warnings when dumping .debug_loc generated by gcc 4.0 Last modified: 2005-01-04 11:21
     Query page      Enter new bug
Bug#: 615   Hardware:   Reporter: H.J. Lu <hjl.tools@gmail.com>
Host: Target: Build:
Product:     Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: RESOLVED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: H.J. Lu <hjl.tools@gmail.com>   Target Milestone:  
Summary:
Keywords:

Attachment Description Type Created Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 615 depends on: 616 Show dependency tree
Show dependency graph
Bug 615 blocks:

Additional Comments:


Leave as RESOLVED FIXED
Reopen bug
Mark bug as VERIFIED

View Bug Activity   |   Format For Printing


Description:   Last confirmed: 0000-00-00 00:00 Opened: 2004-12-22 18:22
[hjl@gnu-10 gcc]$ ./xgcc -B./ -g -O  -c foo.c
[hjl@gnu-10 gcc]$
/export/build/gnu/binutils-debug/build-i686-linux/binutils/readelf -w foo.o >
/dev/null
readelf: Warning: .debug_loc section has more comp units than .debug_info section
readelf: Warning: assuming that the pointer size is 4, from the last comp unit
in .debug_info

I don't think readelf should dump .debug_loc section directly. It should
use DW_AT_location in .debug_info to dump .debug_loc. One way to do it is to
get a list of DW_AT_location in .debug_info first.

------- Additional Comment #1 From H.J. Lu 2004-12-28 18:57 -------
I will give it a try, on top of Nick's patch for bug 616.

------- Additional Comment #2 From H.J. Lu 2004-12-30 03:30 -------
A patch is posted at

http://sources.redhat.com/ml/binutils/2004-12/msg00338.html

------- Additional Comment #3 From Nick Clifton 2005-01-04 11:21 -------
Hi H.J.

  This patch is fine - I have applied it with a few comments added and the
functions slightly rearranged in order to avoid the necessity of a prototype for
process_debug_info().

Cheers
  Nick

     Query page      Enter new bug
Actions: New | Query | bug # | Reports | Requests   New Account | Log In