This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Location lists again


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


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