Hi Adrian, On 24.08.2016 01:35, Adrian Danis wrote: > The position independent syscall code looks good. If you could perform a > similar change to how OKL4 conditionally handles PIC then this would > definitely be fine to go in.
ok. I adjusted the bindings depending on __pic__, which is set when -fpic or -fPIC is used. Please have a look and give advices what should be adjusted. Thanks, Alex. [0] https://github.com/alex-ab/genode/blob/sel4_syscall/sel4.patch > > Adrian > > On Tue 23-Aug-2016 7:35 PM, Alexander Boettcher wrote: >> Hello, >> >> we have now mainly all running with shared libraries on Genode/seL4, so >> that we had to adjust the syscall bindings to be position independent >> [0]. Now is the time to try to get in a form that it may get upstream. >> >> According to this post: >> >> On 29.10.2014 02:33, Adrian Danis wrote: >>> Position independent code is a bit of a trickier issue. Presently we >>> have no desire to use PIC, so copping a performance hit (incredibly >>> small it may be) is undesirable. I think the best option here would be >>> to make support of PIC at user level a build configuration option, and >>> then make the stubs conditionally build in the additional ebx >>> save/restore code. I do not know if attempting such conditional building >>> will end up turning the assembly into an unreadable mess, but it would >>> resolve the performance argument at least. >>> The 'correct' way to do this with fitting into the current seL4 build >>> system setup would be to add a configuration option to >>> tools/common/Kconfig, use that variable to do the conditional >>> compilation in syscalls.h and have tools/common/common.mk generate the >>> -fPIC / -fno-PIC flags. >>> If you can come up with a nice way of conditionally building both PIC >>> and non-PIC versions of what is in syscalls.h then we would certainly >>> accept it. >> you would prefer to have, depending on some define, the syscall binding >> adjusted. >> >> In OKL4 there were already such define magic, see beginning of [1] e.g. >> There, depending on "__pic__", different L4_SAVE_REG/L4_RESTORE_REG >> defines are prepared and later on used by the assembler parts. Is this >> the way to go ? Thanks for any suggestions. >> >> Cheers, >> >> Alexander Boettcher. >> >> [0] >> https://github.com/genodelabs/genode/blob/master/repos/base-sel4/patches/syscall.patch >> >> [1] >> https://github.com/genodelabs/genode/blob/master/repos/base-okl4/patches/syscall_pic.patch >> >> >> _______________________________________________ >> Devel mailing list >> [email protected] >> https://sel4.systems/lists/listinfo/devel > > _______________________________________________ Devel mailing list [email protected] https://sel4.systems/lists/listinfo/devel
