This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Location lists again
- From: Michal Ludvig <mludvig at suse dot cz>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc at sources dot redhat dot com
- Date: Thu, 13 Feb 2003 17:28:51 +0100
- Subject: Location lists again
- Organization: SuSE CR
Hi Daniel,
I propose a small modification to .debug_loc output. Now it's generated
in a form of:
.section .debug_loc,"",@progbits
.LLST0:
.quad .LVL0-.text # Location list begin address (*.LLST0)
.quad .LVL1-.text # Location list end address (*.LLST0)
.value 0x1 # Location expression size
.byte 0x55 # DW_OP_reg5
[...]
So the address range is recorded as offsets from beginning of .text
section in a given .o file. When I link several of .o files together,
these offsets don't get updated to reflect curent position and current
offset in the resulting binary. Would it be possible to change the
output to absolute addresses?
.section .debug_loc,"",@progbits
.LLST0:
.quad .LVL0 # Location list begin address (*.LLST0)
.quad .LVL1 # Location list end address (*.LLST0)
.value 0x1 # Location expression size
.byte 0x55 # DW_OP_reg5
[...]
This way the addresses would be correctly updated on linking.
If I manually change the .s file generated from .c, remove '-.text' and
compile it seems to work perfectly.
Thanks in advance!
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz