* RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
@ 2008-08-01 7:40 Kai Tietz
2008-08-27 16:22 ` NightStrike
0 siblings, 1 reply; 8+ messages in thread
From: Kai Tietz @ 2008-08-01 7:40 UTC (permalink / raw)
To: gcc-patches
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-01 7:40 RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE Kai Tietz
@ 2008-08-27 16:22 ` NightStrike
2008-08-27 16:47 ` NightStrike
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: NightStrike @ 2008-08-27 16:22 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> 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.
I haven't seen a response on this yet. Have I missed it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
@ 2008-08-27 16:47 ` NightStrike
2008-08-27 18:12 ` NightStrike
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2008-08-27 16:47 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> 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.
I haven't seen a response on this yet. Have I missed it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
2008-08-27 16:47 ` NightStrike
@ 2008-08-27 18:12 ` NightStrike
2008-08-27 20:03 ` NightStrike
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2008-08-27 18:12 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> 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.
I haven't seen a response on this yet. Have I missed it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
2008-08-27 16:47 ` NightStrike
2008-08-27 18:12 ` NightStrike
@ 2008-08-27 20:03 ` NightStrike
2008-08-27 20:05 ` Jakub Jelinek
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2008-08-27 20:03 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> 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.
I haven't seen a response on this yet. Have I missed it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
` (2 preceding siblings ...)
2008-08-27 20:03 ` NightStrike
@ 2008-08-27 20:05 ` Jakub Jelinek
2008-08-27 22:26 ` NightStrike
2008-08-28 19:54 ` Joseph S. Myers
5 siblings, 0 replies; 8+ messages in thread
From: Jakub Jelinek @ 2008-08-27 20:05 UTC (permalink / raw)
To: NightStrike; +Cc: Kai Tietz, gcc-patches
On Tue, Aug 26, 2008 at 01:51:19PM -0400, NightStrike wrote:
> On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> > 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.
>
> I haven't seen a response on this yet. Have I missed it?
All the world isn't W64, and just because one 64-bit target isn't able to
use it doesn't mean we want to punish all 64-bit targets by enlarging the
debug info. So, please do it for W64 only if you have to.
Jakub
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
` (3 preceding siblings ...)
2008-08-27 20:05 ` Jakub Jelinek
@ 2008-08-27 22:26 ` NightStrike
2008-08-28 19:54 ` Joseph S. Myers
5 siblings, 0 replies; 8+ messages in thread
From: NightStrike @ 2008-08-27 22:26 UTC (permalink / raw)
To: Kai Tietz; +Cc: gcc-patches
On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> 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.
I haven't seen a response on this yet. Have I missed it?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE
2008-08-27 16:22 ` NightStrike
` (4 preceding siblings ...)
2008-08-27 22:26 ` NightStrike
@ 2008-08-28 19:54 ` Joseph S. Myers
5 siblings, 0 replies; 8+ messages in thread
From: Joseph S. Myers @ 2008-08-28 19:54 UTC (permalink / raw)
To: NightStrike; +Cc: Kai Tietz, gcc-patches
On Tue, 26 Aug 2008, NightStrike wrote:
> On 8/1/08, Kai Tietz <Kai.Tietz@onevision.com> wrote:
> > 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.
>
> I haven't seen a response on this yet. Have I missed it?
Such a patch is obviously wrong; TARGET_64BIT is a target-specific macro
used in some particular targets and cannot be used in generic code. In
general 64-bit offsets are only needed if a single object has more than
4GB of debug info. So such a patch is a pessimization for almost all
normal code. Please see the text from the DWARF standard I quoted when
stopping MIPS64 GNU/Linux from using 64-bit offsets
<http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00142.html>.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-08-27 20:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-01 7:40 RFC: Change of dw2 DWARF_OFFSET_SIZE on 64-bit to POINTER_SIZE Kai Tietz
2008-08-27 16:22 ` NightStrike
2008-08-27 16:47 ` NightStrike
2008-08-27 18:12 ` NightStrike
2008-08-27 20:03 ` NightStrike
2008-08-27 20:05 ` Jakub Jelinek
2008-08-27 22:26 ` NightStrike
2008-08-28 19:54 ` Joseph S. Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).