diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2024-06-01 03:39:03 -0700 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2024-06-04 16:40:42 +0200 |
commit | 138274e92a01be8a98392489b1a2f497ab11c201 (patch) | |
tree | f0be841a1e915e86d4215326a13654f8034632a4 /libc/sysdeps/linux/xtensa/crti.S | |
parent | 8bb33a2e1f2baec2078581d77e181f1ead5f51aa (diff) |
xtensa: add FDPIC support
This change implements Xtensa FDPIC ABI as specified in the first
version of the following document:
https://github.com/jcmvbkbc/xtensa-abi/blob/master/fdpic-xtensa.txt
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/xtensa/crti.S')
-rw-r--r-- | libc/sysdeps/linux/xtensa/crti.S | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/xtensa/crti.S b/libc/sysdeps/linux/xtensa/crti.S index 43e66e308..2923ff09d 100644 --- a/libc/sysdeps/linux/xtensa/crti.S +++ b/libc/sysdeps/linux/xtensa/crti.S @@ -11,6 +11,10 @@ _init: #elif defined(__XTENSA_CALL0_ABI__) addi sp, sp, -16 s32i a0, sp, 0 +#ifdef __FDPIC__ + s32i a12, sp, 4 + mov a12, a11 +#endif #else #error Unsupported Xtensa ABI #endif @@ -26,6 +30,10 @@ _fini: #elif defined(__XTENSA_CALL0_ABI__) addi sp, sp, -16 s32i a0, sp, 0 +#ifdef __FDPIC__ + s32i a12, sp, 4 + mov a12, a11 +#endif #else #error Unsupported Xtensa ABI #endif |