Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Geoff Keating <geoffk@redhat.com>
Cc: howarth@nitro.med.uc.edu, binutils@sources.redhat.com,
	gdb@sources.redhat.com
Subject: Re: binutils patch
Date: Mon, 08 Oct 2001 01:22:00 -0000	[thread overview]
Message-ID: <20011008102442.B632@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <200110080821.BAA09479@geoffk.org>

On Mon, Oct 08, 2001 at 01:21:49AM -0700, Geoff Keating wrote:
> > Date: Sun, 7 Oct 2001 09:00:19 -0400 (EDT)
> > From: Jack Howarth <howarth@nitro.med.uc.edu>
> 
> > This is similar to my sparc32 patch from July.
> > Basically, I don't think we should output .rela.* sections for debugging
> > sections in shared libraries (of course, unless --emit-relocs), gdb doesn't
> > use it anyway and most other ELF backends don't emit them.
> 
> I believe this is a known problem with GDB which will be corrected
> eventually.  With stabs, it's not clear what the correct behaviour is,
> but with DWARF (which will be the default in GCC 3.1) it's clearly
> correct to generate and use the relocs.

I'd say exactly the opposite for DWARF-2 - the standard makes it clear which
data needs to be adjusted and which must not and the debugger, which must
analyze the debug sections while reading them anyway, can do the relocations
even without using a .rel{,a} section.
The rules e.g. prelink uses for relocating DWARF-2 are:
DW_FORM_addr data are to be adjusted
DW_FORM_block{,1,2,4} data need adjustment (with attribute types
	DW_AT_frame_base, DW_AT_location, DW_AT_data_member_location,
	DW_AT_vtable_elem_location), particularly DW_OP_addr data in
	those location lists
in .debug_line section DW_LNE_set_address data needs to be adjusted
in .debug_aranges, unless both fields are 0, the first field needs to be
	adjusted
in .debug_loc section, DW_OP_addr data needs to be adjusted

Most of the ELF backends don't output the reloc sections for debugging
sections at all, so gdb must use these rules anyway when reading the debug
sections.

	Jakub


      reply	other threads:[~2001-10-08  1:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200110071300.JAA15309@nitro.msbb.uc.edu>
2001-10-08  1:03 ` Geoff Keating
2001-10-08  1:22   ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011008102442.B632@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=geoffk@redhat.com \
    --cc=howarth@nitro.med.uc.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox