Shared library in Genode must be position-independent?
Vincent Stone
shihang7422166 at ...9...
Mon Feb 29 11:54:06 CET 2016
Thanks for answering my question. Yeah. These assembly file containing text relocation will cause the MMU exception, which leave me 2 choices:
1. rewrite the assembly code to be position independent.
2. add load-time relocations for code in Genode dynamic loader for arm.
And based on my test, the performance of the latest OpenSSL (1.0.2f) is way more better than 1.0.1i(Genode currently using) due to more optimized assembly code.
26 MB/s vs 16 MB/s. But if we disable the assembly code. The performance is almost identical(7~8 MB/s).
> On Feb 29, 2016, at 6:28 PM, Josef Söntgen <josef.soentgen at ...1...> wrote:
>
> Hello Vincent,
>
> * Vincent Stone <shihang7422166 at ...9...> [2016-02-29 10:36:29 +0800]:
>> Why does Genode disable this assembly code option? ( I can only find a
>> 1-sentence explaination on Genode release notes 12.08
>> <http://genode.org/documentation/release-notes/12.08>
>>
>> Because libcrypto provides certain optimized assembler functions, which
>>> unfortunately are not expressed with position-independent code, we removed
>>> this assembler code and build libcrypto with -DOPENSSL_NO_ASM
>
> Only specific assembler implementations for x86 were enabled when we
> did the initial libcrypto port. When the port was updated to a newer
> version the generated asm files did contain text relocations, which did
> not work when compiling with -fpic, IIRC. Since potential performance
> gains from using the asm implementation were not important I decided
> to remove the files and to use the generic C implementation instead.
> We never tested or used the asm implementations on other platforms,
> e.g. ARM.
>
>
>> I guess the loader of Genode can not handle load-time relocation for shared
>> library so all shared library must be position independent. Am I right?
>
> The dynamic loader does support load-time relocations for data but code
> relocations, e.g. function calls, are not supported [1].
>
> [1] see repos/base/src/lib/ldso/spec/*/relocation.h
>
>
> Regards,
> Josef
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
More information about the users
mailing list