Am Samstag, den 04.07.2009, 03:03 -0400 schrieb Mike Frysinger:
> On Saturday 04 July 2009 01:53:29 Mike Frysinger wrote:
> > On Friday 03 July 2009 20:20:23 Erwin Authried wrote:
> > > Am Freitag, den 03.07.2009, 14:28 -0400 schrieb Mike Frysinger:
> > > > On Friday 03 July 2009 05:20:13 Erwin Authried wrote:
> > > > > I have always installed elf2flt in a slightly different way. Instead
> > > > > of replacing ld, I install the ld-elf2flt shellscript as "real-ld".
> > > > > collect2 will look for real-ld before it falls back to ld. I agree
> > > > > that integrating the elf2flt functionality into binutils would be a
> > > > > good idea.
> > > >
> > > > that's interesting.  has collect2 always functioned this way ?
> > >
> > > it worked already this way with gcc-2.95.
> >
> > good enough for me :).  i'll put together a sep patch to avoid the ugliness
> > of screwing with the real linker once i test it out with Blackfin
> > toolchains.
> 
> after getting it to work, i realized this isnt actually desirable.  it
> prevents direct invocation of `ld` and still getting elf2flt behavior.  you'd
> have to change code to call `real-ld` instead.  while most people execute gcc
> directly to link things, not everyone does, so this is pretty much a deal
> breaker.
> 
> at any rate, here's the simple patch:
> --- ld-elf2flt.in     (revision 3480)
> +++ ld-elf2flt.in     (working copy)
> @@ -12,13 +12,13 @@
>  # This is Free Software, under the GNU Public Licence v2 or greater.
>  #
>  
> -LINKER="$0.real"            # the original renamed-linker
> -ELF2FLT="`expr $0 : '\(.*\)ld'`elf2flt"
> -NM="`expr $0 : '\(.*\)ld'`nm"
> -TOOLDIR="`dirname $0`"      # let gcc find the tools for us
> -OBJCOPY="`expr $0 : '\(.*\)ld'`objcopy"
> +TOOLDIR="${0%/*}"                 # let gcc find the tools for us
> +LINKER="${TOOLDIR}/ld"            # the original renamed-linker
> +ELF2FLT="${TOOLDIR}/elf2flt"
> +NM="${TOOLDIR}/nm"
> +OBJCOPY="${TOOLDIR}/objcopy"
> +OBJDUMP="${TOOLDIR}/objdump"
>  [ -f "$OBJCOPY" ] || OBJCOPY="$TOOLDIR/../../bin/@target_al...@-objcopy"
> -OBJDUMP="`expr $OBJCOPY : '\(.*\)objcopy'`objdump"
>  LDSCRIPTPATH="@binutils_ldscript_dir@"       # and the scripts
>  SHARED_ID=""
>  NEWLDSCRIPT=""
> -mike

you are right, if you call ld directly, -elf2flt can't be used. I don't
think that this is really a problem, because you'll hardly link a BFLT
application with ld directly. I haven't ever seen that since I got one
of the first uCsimms. If you still want to do that, you can use
"gcc -nostdlib -Wl,-elf2flt .." as well.

-Erwin

-- 
Dipl.-Ing. Erwin Authried
Softwareentwicklung und Systemdesign

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to