This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ld and relocatable vs. absolute
- To: chuckmeade at yahoo dot com
- Subject: Re: ld and relocatable vs. absolute
- From: Momchil Velikov <velco at fadata dot bg>
- Date: Mon, 11 Sep 2000 18:55:30 +0200
- CC: Binutils List <binutils at sourceware dot cygnus dot com>
- References: <NEBBIDBEELLFOALBLBEKGEBGCCAA.chuckmeade@yahoo.com>
- Reply-To: momchil_velikov at yahoo dot com
Chuck Meade wrote:
>
> I am using binutils 2.10. I did a source search for "emitrelocations"
> and it is not there. To what flag are you referring below?
>
> Thanks,
> Chuck
>
> > -----Original Message-----
> > From: binutils-owner@sources.redhat.com
> > [mailto:binutils-owner@sources.redhat.com]On Behalf Of Momchil Velikov
> > Sent: Friday, September 08, 2000 6:13 PM
> > To: chuckmeade@yahoo.com
> > Cc: binutils@sourceware.cygnus.com
> > Subject: Re: ld and relocatable vs. absolute
> >
> >
> > >>>>> "Chuck" == Chuck Meade <chuckmeade@yahoo.com> writes:
> >
> > Chuck> Several linkers (including Diab and Green Hills) support the
> > Chuck> creation of a fully-linked executable image that at the same
> > Chuck> time retains relocation information, allowing it to be
> > Chuck> relocated to a dynamically determined memory address at load
> > Chuck> time by an on-target loader.
> >
> > Chuck> Such an image would not have unresolved references, it would
> > Chuck> just be relocatable.
> >
> > Chuck> I would like to be able to accomplish the same with ld for
> > Chuck> PowerPC. Has anyone out there done this? Any tips?
> >
> > It is already there. See
> >
> > 2000-05-18 Momchil Velikov <velco@fadata.bg>
> >
> > * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
> > relocs for an executable, ensure that they are virtual addresses.
> >
> > 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
> > Rick Gorton <gorton@scrugs.lkg.dec.com>
> >
> > * elflink.h: Add emitrelocations support: when enabled, relocation
> > information and relocation sections are put into final output
> > executables. If the emitrelocations flag is set, do the following:
> > (elf_bfd_final_link): Emit relocation sections.
> > (elf_link_input_bfd): Compute relocation section contents.
> > (elf_gc_sections): Don't clean relocation sections.
> >
> > Regards,
> > -velco
> >
It is in the CVS. It didn't make it in 2.10. The ld flag is
--emit-relocs.
Regards,
-velco