Skip to content

Commit

Permalink
options/lsb: deal with static binaries on m68k calling __tls_get_addr()
Browse files Browse the repository at this point in the history
  • Loading branch information
netbsduser committed Oct 14, 2024
1 parent 8d23680 commit 860f911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions options/lsb/generic/tls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#include <mlibc/thread.hpp>
#include <mlibc/rtld-abi.hpp>

#if defined(__riscv) && defined(MLIBC_STATIC_BUILD)
// On RISC-V, linker optimisation is not guaranteed and so we may still get
// calls to this function in statically linked binaries.
#if (defined(__riscv) || defined(__m68k__)) && defined(MLIBC_STATIC_BUILD)
// On RISC-V and m68k, linker optimisation is not guaranteed and so we may
// still get calls to this function in statically linked binaries.
// TODO: This will break dlopen calls from statically linked programs.
extern "C" void *__tls_get_addr(struct __abi_tls_entry *entry) {
Tcb *tcbPtr = mlibc::get_current_tcb();
Expand Down

0 comments on commit 860f911

Please sign in to comment.