platform_bionic/tests/libs/elf_tls_test_library.cpp
Elliott Hughes 45a93c13bf Reject .so files using ELF TLS.
Bug: http://b/74361956
Test: ran tests

(cherry picked from commit 9724e93c19)

Change-Id: I287c926951c337aacd2246940a1e6474e4c661e1
2018-03-26 11:09:40 -07:00

19 lines
709 B
C++

/*
* Copyright (C) 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
thread_local int elf_tls_variable;
extern "C" int* get() { return &elf_tls_variable; }