This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Another redboot compile issue


I mispoke, libextras.a has the redboot_*.o files in it.
But do not get linked in, unless the files are specified on the link
line.

in the hal/common/.../hal.cdl there is a compile line that attempts to
compile everything in libextras.a into extras.o.  However, my extras.o is
ending up empty.

Something like:
$(CC) $(CFLAGS) -nostdlib -Wl,-r -Wl,--whole-archive -o $@ $<

Then extras.o is in my target.ld file.

Thanks again for the help!

-john


On Fri, 24 Oct 2003, Gary Thomas wrote:

> Please copy responses to the mailing list so that all may benefit.
> Private email support is only available under contract.
>
> On Fri, 2003-10-24 at 12:48, John Newlin wrote:
> > Hi Gary,
> >
> > Thanks for the reply.
> >
> > The object files are all in libtarget.a (redboot_mfill.o for example).
> > However they are not being included in the final .elf file unless I
> > explicitly add the redboot_mfill.o to the link line.
> >
>
> Look at the RedBoot CDL - it puts those files into libextras.a.  The
> linking process won't work unless this happens, as you are seeing.
>
> > It might just be a bug in the binutils that I have, the architecture
> > vendor has ports of some rather old tools. (in this case ld is 2.11.2)
> >
> > I may have a bug in my target.ld file as well, but I'm not sure
> > what it could be.
> >
> > Thanks for your help,
> >
> > -john
> >
> >
> >
> > On Fri, 24 Oct 2003, Gary Thomas wrote:
> >
> > > On Fri, 2003-10-24 at 12:18, John Newlin wrote:
> > > > I see that Redboot is using a linker list to add commands to be linked
> > > > into the system.
> > > >
> > >
> > > That's not really true.
> > >
> > > > The problem I am having is that when the .o files for redboot are added to
> > > > libtarget.a, that list is not fully populated.  If I put the redboot_*.o
> > > > files directly on the link line, everything is great
> > > >
> > > > Any suggestions?  Should I just change the final link line to do this, or
> > > > is there a different preferred mechanism?
> > >
> > > If you want to add new commands, make sure that they are put into
> > > libextras.a, otherwise they won't end up in the final image.  Changing
> > > the way RedBoot is built/linked should not be necessary at all.
> > >
> > > --
> > > Gary Thomas <gary@mlbassoc.com>
> > > MLB Associates
> > >
> --
> Gary Thomas <gary@mlbassoc.com>
> MLB Associates
>

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]