mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: musl riscv port
Date: Sun, 22 Apr 2018 22:51:46 -0400	[thread overview]
Message-ID: <20180423025146.GZ3094@brightrain.aerifal.cx> (raw)
In-Reply-To: <0EC2E771-368F-454E-B08D-7D6A5321F598@mac.com>

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


      parent reply	other threads:[~2018-04-23  2:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 20:09 What's wrong with musl's malloc Rich Felker
2018-04-21  5:28 ` Rich Felker
2018-04-21  5:52   ` Rich Felker
2018-04-22 19:34 ` Markus Wichmann
2018-04-23  2:00   ` Rich Felker
2018-04-23 19:02     ` Markus Wichmann
2018-04-23 19:47       ` Rich Felker
2018-04-23  6:50   ` A. Wilcox
2018-04-23 16:43     ` Rich Felker
2018-04-22 21:40 ` Michael Clark
2018-04-23  2:09   ` Rich Felker
2018-04-23  2:51   ` Rich Felker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180423025146.GZ3094@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).