This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Commited patch for elf*-sparc.c (was binutils: "unexpected reloc type 0x17" on sparc)
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: Commited patch for elf*-sparc.c (was binutils: "unexpected reloc type 0x17" on sparc)
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 11 Jul 2001 18:04:23 -0400
- Cc: davem at redhat dot com, hjl at lucon dot org, kloczek at rudy dot mif dot pg dot gda dot pl, libc-alpha at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com
- References: <20010628151740.A16519@redhat.com> <15163.44509.408432.791384@pizda.ninka.net> <si7kxw1bca.fsf@daffy.airs.com> <15163.45804.596214.835449@pizda.ninka.net> <20010629071648.D1195@sunsite.ms.mff.cuni.cz> <20010629150510.F18986@bubble.local> <20010629122618.B737@sunsite.ms.mff.cuni.cz> <si7kxvxlvr.fsf@daffy.airs.com> <20010711222024.I899@sunsite.ms.mff.cuni.cz> <20010711134349.B11676@redhat.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 11, 2001 at 01:43:49PM -0700, Richard Henderson wrote:
> On Wed, Jul 11, 2001 at 10:20:24PM +0200, Jakub Jelinek wrote:
> > I added an flags & SEC_ALLOC check instead (which means e.g. that we no
> > longer output useless .rela.stab on sparc when nobody uses it)
>
> For dwarf2 sections, gdb _should_ use the reloc sections.
What for?
Apparently neither i386 nor IA-64 use .rela.debug_info etc. reloc sections
nor does gdb AFAIK use them.
> It's got no other way to get at the information in question.
It took me less than a day to write dwarf2 relocator for the prelink
program.
The relocation rules are there fairly easy and the format is very clear on
what should and what should not be relocated (in .debug_info DW_FORM_addr
format attributes and DW_OP_addr arguments , in .debug_line DW_LNE_set_address,
in .debug_aranges always the first of the address/len pair, in .debug_loc
DW_OP_addr arguments should be relocated).
Jakub