mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
nova: PIC compatible syscall_5
Addressing must be PC-relative, so adapt the approach from the other nova_x86_32 syscall bindings (description by @ssumpf): Use call to push the current IP on the stack and add the distance of label 0 and label 1 in order to determine the return address, which NOVA requires in edx. The bug only showed up with "-O0" in libc.lib.so in form of a unwanted text relocation. Fixes #1721
This commit is contained in:
parent
7fff1770e0
commit
985c01116b
@ -166,9 +166,12 @@ namespace Nova {
|
|||||||
asm volatile (" push %%ebx;"
|
asm volatile (" push %%ebx;"
|
||||||
|
|
||||||
" mov %%ecx, %%ebx;"
|
" mov %%ecx, %%ebx;"
|
||||||
" movl %%esp, %%ecx;"
|
" mov %%esp, %%ecx;"
|
||||||
" movl $1f, %%edx;"
|
|
||||||
|
|
||||||
|
" call 0f;"
|
||||||
|
"0:"
|
||||||
|
" addl $(1f-0b), (%%esp);"
|
||||||
|
" mov (%%esp), %%edx;"
|
||||||
"sysenter;"
|
"sysenter;"
|
||||||
"1:"
|
"1:"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user