mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-08 04:50:08 +03:00
c63fe0e1f1
The setup is a bit peculiar: both the definition and the use site of these TLS variables have to be in a shared library, otherwise the linker might relax the global-dynamic access mode to something that doesn't require a `__tls_get_addr` call.
17 lines
415 B
C++
17 lines
415 B
C++
/*
|
|
* Copyright (c) 2023, Daniel Bertalan <dani@danielbertalan.dev>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibTest/TestCase.h>
|
|
|
|
// When linking an executable, TLS relaxations might be relaxed to different
|
|
// access modes than intended. Hence, the actual logic has been moved to a
|
|
// shared library, and this executable just calls it.
|
|
extern void run_test();
|
|
TEST_CASE(basic)
|
|
{
|
|
run_test();
|
|
}
|