2023-10-12 00:42:04 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
|
|
|
|
#include "nolibc-test-linkage.h"
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
void *linkage_test_errno_addr(void)
|
|
|
|
{
|
|
|
|
return &errno;
|
|
|
|
}
|
|
|
|
|
2025-03-06 22:52:39 +01:00
|
|
|
int linkage_test_constructor_test_value = 0;
|
2023-10-12 00:42:04 +02:00
|
|
|
|
|
|
|
__attribute__((constructor))
|
|
|
|
static void constructor1(void)
|
|
|
|
{
|
2025-03-06 22:52:39 +01:00
|
|
|
linkage_test_constructor_test_value |= 1 << 0;
|
2023-10-12 00:42:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
__attribute__((constructor))
|
|
|
|
static void constructor2(void)
|
|
|
|
{
|
2025-03-06 22:52:39 +01:00
|
|
|
linkage_test_constructor_test_value |= 1 << 1;
|
2023-10-12 00:42:04 +02:00
|
|
|
}
|