This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 1 Aug 2008 09:39:41 +0200
- Subject: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
Hello,
The default value of DWARF_OFFSET_SIZE of 4 is for w64 a problem, because
on w64 there are only 64-bit imaged based relocations present and the
offset is build of this offset is computed by a secrel offset.
Additionally there is no way for this target to set VA to zero as done for
elf. I prepared a patch for binutils to change this behaviour. As we
discussed is the additional memory consume for 64-bit less, so I want to
query if there is general agreement in changing this value in general for
64-bit targets?
These should affect DW_AT_stmt_list and the arange to use 8 byte offset
for 64-bit targets.
The change would be in dwarf2out.c and looks like:
....
/* The size in bytes of a DWARF field indicating an offset or length
relative to a debug info section, specified to be 4 bytes in the
DWARF-2 specification. The SGI/MIPS ABI defines it to be the same
as PTR_SIZE. */
#ifndef DWARF_OFFSET_SIZE
-#define DWARF_OFFSET_SIZE 4
+#define DWARF_OFFSET_SIZE (TARGET_64BIT ? 8 : 4)
#endif...
As I discussed with binutils, they would be happy to change this, if gcc
would change its behaviour, too.
Regards,
Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.