Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 22 Apr 2018 22:51:46 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: musl riscv port

On Mon, Apr 23, 2018 at 09:40:08AM +1200, Michael Clark wrote:
> BTW - I owe you an update on the riscv musl port. I’ll post one
> soon.... I’ve been busy on the QEMU RISC-V port, whose ‘virt’ board
> has recently been used by Fedora and Debian distro porters for
> riscv64 arch support (glibc based distros). Stefan O’Rear got MTTCG
> working on qemu/target/riscv so we can run SMP Linux in QEMU with
> reasonable performance. Debian for example now has QEMU RISC-V
> builders for the riscv64 arch.
> 
> - https://github.com/riscv/riscv-qemu/wiki
> 
> It will be nice to get the riscv musl support upstream. The major
> issue at present is ELF thread local storage (pthreads are working
> but GCC’s __thread is not). The RISC-V TLS model is not documented
> so it requires some reverse engineering of the riscv support in
> GCC/binutils/glibc. I haven’t been able to isolate the issue and
> could benefit from some help by someone more knowledgable in that
> area (ELF TLS and architecture specific TLS models).

If you have specific questions here I can probably help you find
answers quickly. It probably suffices just to compile and link a
trivial test program using a single TLS variable, and see what offset
from the thread pointer the compiler accesses it at. That should tell
you if TLS is above or below the thread pointer, and if there's any
offset that needs to be applied, what it is.

Once it's all working, the big thing that might take some additional
effort to get it merged is making sure contributions have been
documented. I know a bunch of different people worked on this on and
off and I want to make sure they all get credited properly.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.