//===- ELFTest.cpp - Tests for ELF.cpp ------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/Object/ELF.h" #include "llvm/Testing/Support/Error.h" #include "gtest/gtest.h" usingnamespacellvm; usingnamespacellvm::object; usingnamespacellvm::ELF; TEST(ELFTest, getELFRelocationTypeNameForVE) { … } TEST(ELFTest, getELFRelocationTypeNameForLoongArch) { … } TEST(ELFTest, getELFRelativeRelocationType) { … } // This is a test for the DataRegion helper struct, defined in ELF.h header. TEST(ELFTest, DataRegionTest) { … } // Test the sysV and the gnu hash functions, particularly with UTF-8 unicode. // Use names long enough for the hash's recycling of the high bits to kick in. // Explicitly encode the UTF-8 to avoid encoding transliterations. TEST(ELFTest, Hash) { … }