What is needed to support uclinux shared libraries on MMU-lessARM?
John Lee
chunqiang77@163.com
Thu Jun 10 06:52:00 GMT 2004
Bernardo Innocenti, Thanks!
But I am puzzled about what to do next. Can you interpret
it in more detail? For example, can you tell me which source
files in GCC,ld,elf2flt & kernel to be modified to support
shared library on MMU-less ARM?
>For the GCC bits, you may look into the m68k backend.
>See what's done with the -mid-shared-library option.
>
>It's basically PIC code plus an inefficient way to
>call functions through a fancy variant of the
>GOT/PLT trick.
I haved searched for "TARGET_ID_SHARE_LIBRARY"(-mid-shared-library
option flag) in gcc for m68k, and find that the major modification is
to change the function prologue code to load the GOT pointer with
correct value. but I am puzzled about the following question:
1. If I am right,the changed code will produce the following
instruction sequence to load the correct GOT pointer in the function
prologue:
move (a5 - id*4),a5
Where a5 is the GOT pointer register and the id is the fixed
identification number of the current compile unit.
How does "move (a5 - id*4),a5" work? In other words, What is the
initialization of a5? How the initialization of a5 to be loaded?
2. The function epilogue code is not changed to restore the
GOT pointer accordingly,why?
>Most of the magic is in the linker, or better, in a
>shell script disguised as the linker that invokes
>the elf2flt tool.
If I just modify a shell script disguised as the linker that
invokes the elf2flt only,which shell script file?
If I must modify the source files of the linker, which source files?
Is the aim of the modification in the source files of the linker
to create correct GOT in binary file to support shared library?
>Does the MMU-less ARM use the flat executable format
>or real ELF?
The MMU-ess ARM use the flat executable format.
>The most authoritative people on the subject are
>the SnapGear people who did all this for the ColdFire.
>Try searching the uClinux mailing-list archives and
>you'll find all the questions I made several months ago.
>These were answered in detail by Paul Dale and David
>McCullough, the two SnapGear engineers who developed
>shared libraries support for the ColdFire.
I have searched the uClinux mailing-list archives with
keyword "shared lib", but I can not find the questions
you made several months ago and the answer.
Can you mail them to me?
Thanks and Regards
John Lee
More information about the Gcc
mailing list