blob: f22eb29674b70f6f8dcb15ac7f08ecbd25ccab2e [file] [log] [blame]
// Copyright 2023 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <lib/ld/abi.h>
#include <lib/ld/module.h>
#include <lib/ld/tls.h>
#include <stdint.h>
[[gnu::used, gnu::retain]] alignas(64) thread_local int tls_data = 1;
extern "C" int64_t TestStart() {
const auto modules = ld::AbiLoadedModules(ld::abi::_ld_abi);
const auto& exec_module = *modules.begin();
if (exec_module.tls_modid != 1) {
return 1;
}
return 17;
}