[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/152] New: dwarf2 + special link technique causes "DW_FORM_
From: |
bartoldeman at users dot sourceforge dot net |
Subject: |
[Bug binutils/152] New: dwarf2 + special link technique causes "DW_FORM_strp pointing outside of .debug_str section" in GDB |
Date: |
8 May 2004 19:35:03 -0000 |
This is a followup to the problem reported at
http://sources.redhat.com/ml/bug-binutils/2003-q1/msg00184.html
now narrowed down to a minimal test case.
As it turned out the special somewhat obscure link technique used for embedding
the BIOS inside DOSEMU didn't play well with DWARF-2. As soon as you use STABS
debugging it's all fine. A workaround is to simply don't add debug info for
these objects, and DWARF for all others.
Here's the testcase
makefile: (please tabify)
CFLAGS = -g -O
main: main.o bios.o
ld $^ -o $@
bios.o: bios.S
as --gdwarf2 bios.S -o tmp.o
ld -Ttext 0 -e 0 tmp.o -o bios.o
main.c:
void _start(void) {}
bios.S:
mov 0, %eax
make this and run gdb with it. It will complain. main won't run of course, but
that's just to keep the testcase as small as possible.
The idea of -Ttext 0 -e 0 is to fix all internal relocations in bios.S to 0
but external relocations depend on its position within the final executable.
The "-r" option cannot do this as far as I could see.
--
Summary: dwarf2 + special link technique causes "DW_FORM_strp
pointing outside of .debug_str section" in GDB
Product: binutils
Version: 2.15
Status: NEW
Severity: normal
Priority: P2
Component: binutils
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: bartoldeman at users dot sourceforge dot net
CC: bug-binutils at gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://sources.redhat.com/bugzilla/show_bug.cgi?id=152
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug binutils/152] New: dwarf2 + special link technique causes "DW_FORM_strp pointing outside of .debug_str section" in GDB,
bartoldeman at users dot sourceforge dot net <=