ladybird/Tests/LibELF/TestTLS.cpp
Daniel Bertalan c63fe0e1f1 Tests/LibELF: Test loading libraries with dynamic TLS
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.
2023-08-18 16:20:13 +02:00

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();
}