Using the kernel thread pointer on aarch64 (tpidr_el1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On AArch64, GCC seems to use tpidr_el0 (user-mode accessible) to access the
thread pointer for loading thread-local variables by default. I can't find
any option to change this to tpidr_el1 (or tpidr_el2/tpidr_el3). This is
necessary for using thread-local variables in kernel code. Clang has the
`-mtp` option for AArch64 (
https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mtp)
that controls this, but it seems GCC does not? Does any such option exist,
and if not is there any chance to add support for it? Thanks for any help.

Zach



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux