[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [microblaze-uclinux] Building microblaze toolchain
The bad relocation was 0xb800 in case that means anything special...
--Scott
> -----Original Message-----
> From: owner-microblaze-uclinux@itee.uq.edu.au
> [mailto:owner-microblaze-uclinux@itee.uq.edu.au] On Behalf Of
> Scott Thibault
> Sent: Wednesday, October 27, 2004 7:44 AM
> To: microblaze-uclinux@itee.uq.edu.au
> Subject: RE: [microblaze-uclinux] Building microblaze toolchain
>
>
> > > In my continued quest to build microblaze uClinux executables on
> > > Windows, I'm trying to build the tool chain with MinGW. I
> > tried using
> > > the EDK 6.3 cross-compiler, but I get a bad magic error
> > when trying to
> > > load them under uClinux. I'm guessing here that there are some
> > > version differences between the uClinux and the EDK toolchain.
> >
> > Nothing so serious - to build uClinux executables you have to use a
> > special little tool called elf2flt - it converts elf
> binaries into so
> > called "flat binaries" with relocation information.
> >
> > Here's what to do - in your edk6.3 toolchain, rename mb-ld to
> > mb-ld.real, and copy the mb-ld file from a linux toolchain. It's
> > actually a script, so it should run just fine under some
> sort of *n*x
> > emulation.
> >
> > This script is a wrapper that runs elft2flt if necessary, and passes
> > files on to the real linker (mb-ld.real).
>
> I initially tried using -W,l-elf2flt with the EDK, and it
> outputs a warning like: ld-elf2flt cannot find entry point:
> assuming 00000000. So, it seemed like the EDK supported
> -elf2flt. Of course, as I said, uClinux couldn't load the
> binary reporting a bad magic error.
>
> >
> > Then grab the elf2flt sources from cvs.uclinux.org -
> > configure and build
> > it, put it in your toolchain bin directory renamed as mb-elf2flt
> >
> > The configuration is a little tricky, you have to point it
> at various
> > BFD and libiberty headers and libs that are produced when you
> > build the
> > binutils. ./configure --help will tell you the options you
> > need to provide.
>
> I did that. That is why I was trying to build binutils, to
> get the libs it was looking for.
>
> > > In any case, the Web site references a build_toolchain
> script file,
> > > but I can't find it anywhere. Where do I get this file?
> >
> > You'll need to specify target=microblaze...
> >
>
> But what do I put after microblaze? Maybe
> microblaze-mingw32? According to the help it needs to match
> that used to build binutils. I suppose maybe I can try to
> use the EDK libraries and search the binaries to see if they
> contain the target name somewhere.
>
> --Scott
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au Project Home Page :
http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/