On Monday 01 February 2010 16:08:20 Sébastien Bourdeauducq wrote: > Does anyone have experience with developing uClinux/FDPIC loaders? > > The loader we use in Milkymist [1] (a 100% open source system-on-chip, i.e. > ALL Verilog HDL design files are under a free license) is merely crap, > requiring the use of -Wl,-q to generate a special relocation section and > then special options to strip in order to leave that relocation section in > the final binary. The kernel loader then reads this section and relocates > the binary itself (instead of having it done by the libc as it's supposed > to be with normal FDPIC targets).
i wonder why you didnt just go with FLAT/shared FLAT to start with ... i'm assuming this is a nommu system (i.e. no virtual memory), else FDPIC is kind of silly. doing standard ELF makes more sense when you have virtual memory. > This makes compiling software difficult, it's slow, and it's a kludge. It > also seems to cause problems with C++. Such a hack will probably never be > accepted in the vanilla Linux kernel and in uClibc. i can tell you right now it wont be ;) > It would be nice if someone with experience with uClibc and FDPIC loaders > on nommu targets could give us some help about this. It's probably easy > and quick to make if you know in detail how FDPIC loaders work, but I > don't. latest uClibc already supports FDPIC. simply look at the blackfin or frv ports in there for examples (they only support FDPIC). but before you can ponder porting uClibc, you need to: - agree on an ABI for handling the GOT/PLT - binutils support to process new PLT syntax and generate the FDPIC relocs - gcc support to handler the new PLT register and use new PLT syntax - uClibc port to handle the runtime - gdb port to handle the new mapping behavior - kernel/ptrace port to handle the new register/ptrace requirements you might want to read the Blackfin FDPIC document (which also links to the FR-V FDPIC document): https://docs.blackfin.uclinux.org/doku.php?id=toolchain:application_binary_interface#fdpic_run_time g'luck ... this port isnt going to be quick :P -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ 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