Hello,

On Freitag, 20. Juli 2007, Wolfgang Mües wrote:
> I digged somewhat deeper into the problem and found:

... the solution.

I think C++ programs with BLFT and XIP have never worked on ARM.

The Blackfin team have a working solution, and I have adapted it for 
ARM:

All changes are in the elf2flt package:

in elf2flt.c, you have to disable the GOT address adjust if use_resolved 
is used:

> #ifndef TARGET_bfin
>                       /* Adjust the address to account for the GOT table 
> which wasn't
>                        * present in the relative file link.
>                        */
>                       if (!use_resolved && pic_with_got)
>                         q->address += got_size;
> #endif
>
>                       /* A pointer to what's being relocated, used often
>                          below.  */
>                       r_mem = sectionp + q->address;

in ld-elf2flt.in, use the -a flag to call elf2flt:

>               if [ "@got_check@" = "no" ]
>               then
>                $LINKER $EMUL $SDIRS -T $LDSCRIPT -q -o "$OFILE.gdb" $ARG1     
>    
>     ||exit $? else
>                $LINKER $EMUL -r -d -o "$OFILE.elf2flt" $ARG1                  
>    
>     ||exit $? $LINKER $EMUL $SDIRS -T $LDSCRIPT -q -o "$OFILE.gdb"
> "$OFILE.elf2flt"  ||exit $? rm -f "$OFILE.elf2flt"
>               fi
>               if grep _GLOBAL_OFFSET_TABLE_ "$OFILE.gdb" > /dev/null
>               then
>                       $ELF2FLT $FLTFLAGS -a -o "$OFILE" -p "$OFILE.gdb" 
> "$OFILE.gdb" 
> ||exit $? else
>                       $ELF2FLT $FLTFLAGS -o "$OFILE" -r "$OFILE.gdb"          
>         ||exit $?
>               fi

This works for me. Comments are wellcome.

regards

Wolfgang
-- 
Das Leben kann nur rückwärts verstanden,
muß aber vorwärts gelebt werden.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to