Files
ports/lang/ruby40
Piotr Kubaj 3bb0a93351 lang/ruby*: fix runtime on powerpc64*
The hand-written `coroutine_transfer` in `coroutine/ppc64le/Context.S`
lacks the ELFv2 ABI global entry prologue. When the function is reached
via the PLT (lazy resolution path), r2 (TOC pointer) is left pointing
at whatever the resolver had loaded — typically the dynamic linker's
own TOC — instead of libruby's TOC.

The wrong r2 propagates through the fiber switch into `fiber_entry`,
which jumps into `fiber_restore_thread` → `rb_current_ec_set`. The
first PLT thunk inside the new fiber (`__plt___tls_get_addr` for the
`ruby_current_ec` thread-local) computes its GOT entry as
`r2 + offset` and segfaults dereferencing the bogus address.

Fixes build of textproc/rubygem-nokogiri and devel/rubygem-glib2.
2026-05-18 21:38:23 +02:00
..
2026-05-13 19:40:41 +08:00
2026-05-18 21:38:23 +02:00
2026-05-13 19:40:41 +08:00