This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: .reloc pseudo
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sourceware dot org
- Date: Mon, 26 Mar 2007 10:10:06 -0400
- Subject: Re: .reloc pseudo
- References: <20070217230453.GG15561@bubble.grove.modra.org> <20070220230105.GC5121@bubble.grove.modra.org> <20070222055256.GA29005@bubble.grove.modra.org> <20070326111734.GB31960@bubble.grove.modra.org>
On Mon, Mar 26, 2007 at 08:47:34PM +0930, Alan Modra wrote:
> On Thu, Feb 22, 2007 at 04:22:56PM +1030, Alan Modra wrote:
> > BTW, the reason I'm looking at this code is that I intend to add
> > a low level means of emitting relocations in gas. Something like
> >
> > .reloc offset, reloc_name, symbol+addend
> >
> > eg.
> > .reloc __speelf__+50, R_PPC_ADDR32, stdout
> >
> > The particular use I have in mind is in embedspu, where it will be
> > useful to to apply relocations to a block of code inserted by .incbin,
> > but I guess this might be a generally useful feature so I'll make it
> > available on all targets.
>
> gas/
> * doc/as.texinfo (Reloc): Document.
> * read.c (potable): Add "reloc".
> (s_reloc): New function.
> * write.c (reloc_list): New global var.
> (resolve_reloc_expr_symbols): New function.
> (write_object_file): Call it.
> (write_relocs): Process reloc_list.
> * write.h (struct reloc_list): New.
> (reloc_list): Declare.
Do I really see an exciting new feature with neither NEWS nor tests?
:-)
--
Daniel Jacobowitz
CodeSourcery