diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp index af74b108e04ee..f85c04df4f6c9 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp @@ -687,7 +687,7 @@ bool Linux::IsAArch64OutlineAtomicsDefault(const ArgList &Args) const { } bool Linux::IsMathErrnoDefault() const { - if (getTriple().isAndroid()) + if (getTriple().isAndroid() || getTriple().isMusl()) return false; return Generic_ELF::IsMathErrnoDefault(); } diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 6426791284090..2e2293c6d58bd 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -3102,7 +3102,8 @@ void UnwrappedLineParser::parseRecord(bool ParseAsExpr) { } if (FormatTok->is(tok::l_square)) { FormatToken *Previous = FormatTok->Previous; - if (!Previous || Previous->isNot(tok::r_paren)) { + if (!Previous || + !(Previous->is(tok::r_paren) || Previous->isTypeOrIdentifier())) { // Don't try parsing a lambda if we had a closing parenthesis before, // it was probably a pointer to an array: int (*)[]. if (!tryToParseLambda()) diff --git a/clang/test/Driver/fast-math.c b/clang/test/Driver/fast-math.c index a66e9d0eca177..36ea8ecb52985 100644 --- a/clang/test/Driver/fast-math.c +++ b/clang/test/Driver/fast-math.c @@ -119,6 +119,8 @@ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target x86_64-linux-android -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s +// RUN: %clang -### -target x86_64-linux-musl -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target amdgcn-amd-amdhsa -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target amdgcn-amd-amdpal -c %s 2>&1 \ diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 005e2d6a7b559..136a25fa89468 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -23638,6 +23638,7 @@ TEST_F(FormatTest, ShortTemplatedArgumentLists) { verifyFormat("struct Y<[] { return 0; }> {};", Style); verifyFormat("struct Z : X {};", Style); + verifyFormat("template struct Foo {};", Style); } TEST_F(FormatTest, RemoveBraces) { diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp index 82048f0eae2e3..32b8f47ed6338 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp @@ -217,7 +217,7 @@ namespace __sanitizer { unsigned struct_sockaddr_sz = sizeof(struct sockaddr); unsigned ucontext_t_sz(void *ctx) { -# if SANITIZER_LINUX && SANITIZER_X64 +# if SANITIZER_GLIBC && SANITIZER_X64 // See kernel arch/x86/kernel/fpu/signal.c for details. const auto *fpregs = static_cast(ctx)->uc_mcontext.fpregs; // The member names differ across header versions, but the actual layout diff --git a/compiler-rt/test/msan/Linux/signal_mcontext.cpp b/compiler-rt/test/msan/Linux/signal_mcontext.cpp index 932b4b8c09775..b49451fbb730b 100644 --- a/compiler-rt/test/msan/Linux/signal_mcontext.cpp +++ b/compiler-rt/test/msan/Linux/signal_mcontext.cpp @@ -10,7 +10,7 @@ void handler(int sig, siginfo_t *info, void *uctx) { __msan_check_mem_is_initialized(uctx, sizeof(ucontext_t)); -#if defined(__x86_64__) +#if defined(__GLIBC__) && defined(__x86_64__) auto *mctx = &static_cast(uctx)->uc_mcontext; if (auto *fpregs = mctx->fpregs) { // The member names differ across header versions, but the actual layout diff --git a/compiler-rt/test/msan/Linux/signal_mcontext2.cpp b/compiler-rt/test/msan/Linux/signal_mcontext2.cpp index 6bb6740c6fa7c..f65f909c87ef1 100644 --- a/compiler-rt/test/msan/Linux/signal_mcontext2.cpp +++ b/compiler-rt/test/msan/Linux/signal_mcontext2.cpp @@ -1,6 +1,7 @@ // RUN: %clangxx_msan -fsanitize-memory-track-origins=2 -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s -// REQUIRES: x86_64-target-arch +// musl does not define FP_XSTATE_MAGIC1. +// REQUIRES: x86_64-target-arch && glibc-2.27 #include #include diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 77df59e4cd755..183b3df621b42 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -133,7 +133,7 @@ option(LIBCXX_ENABLE_INCOMPLETE_FEATURES "Whether to enable support for incomplete library features. Incomplete features are new library features under development. These features don't guarantee ABI stability nor the quality of completed library features. Vendors - shipping the library may want to disable this option." ON) + shipping the library may want to disable this option." OFF) set(LIBCXX_TEST_CONFIG "legacy.cfg.in" CACHE STRING "The path to the Lit testing configuration to use when running the tests. If a relative path is provided, it is assumed to be relative to '/libcxx/test/configs'.") diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt index 8c8c9e4f186e0..95e28618b55e3 100644 --- a/libcxx/benchmarks/CMakeLists.txt +++ b/libcxx/benchmarks/CMakeLists.txt @@ -166,6 +166,11 @@ endfunction() # Register Benchmark tests #============================================================================== file(GLOB BENCHMARK_TESTS "*.bench.cpp") + +if (NOT LIBCXX_ENABLE_INCOMPLETE_FEATURES) + list(FILTER BENCHMARK_TESTS EXCLUDE REGEX "(format_to_n|format_to|format|formatted_size|formatter_float|std_format_spec_string_unicode).bench.cpp") +endif() + foreach(test_path ${BENCHMARK_TESTS}) get_filename_component(test_file "${test_path}" NAME) string(REPLACE ".bench.cpp" "" test_name "${test_file}") diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst index 8d645426138a2..a33c6621d448d 100644 --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -43,8 +43,9 @@ New Features functions are known to be inefficient, both in memory usage and performance. The implementation isn't API- or ABI-stable and therefore considered experimental. (Some not-yet-implemented papers require an API-break.) - Vendors can still disable this header by turning the CMake option - `LIBCXX_ENABLE_INCOMPLETE_FEATURES` off. + As a result, it is disabled by default, however vendors can enable the + header by using ``-DLIBCXX_ENABLE_INCOMPLETE_FEATURES=ON`` when + configuring their build. - There's a new CMake option ``LIBCXX_ENABLE_UNICODE`` to disable Unicode support in the ```` header. This only affects the estimation of the diff --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h index 67c6c57bd81e4..07a92d7834755 100644 --- a/libcxx/include/__ranges/access.h +++ b/libcxx/include/__ranges/access.h @@ -59,10 +59,17 @@ namespace __begin { struct __fn { template - requires is_array_v> - [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp& __t) const noexcept + [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept + requires (sizeof(_Tp) != 0) // Disallow incomplete element types. { - return __t; + return __t + 0; + } + + template + [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept + requires (sizeof(_Tp) != 0) // Disallow incomplete element types. + { + return __t + 0; } template @@ -127,7 +134,7 @@ namespace __end { public: template [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept - requires (sizeof(*__t) != 0) // Disallow incomplete element types. + requires (sizeof(_Tp) != 0) // Disallow incomplete element types. { return __t + _Np; } diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap index 84abf01bf5d75..749c17f8bc08f 100644 --- a/libcxx/include/module.modulemap +++ b/libcxx/include/module.modulemap @@ -2,7 +2,8 @@ // since __config may be included from C headers which may create an // include cycle. module std_config [system] [extern_c] { - header "__config" + textual header "__config" + textual header "__config_site" } module std [system] { diff --git a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist index 6f5f50e997664..cb315f91f659a 100644 --- a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist +++ b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist @@ -1039,9 +1039,6 @@ {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD0Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD1Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev', 'type': 'FUNC'} @@ -1991,7 +1988,6 @@ {'is_defined': True, 'name': '__ZTINSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTINSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} @@ -2186,7 +2182,6 @@ {'is_defined': True, 'name': '__ZTSNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTSNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} @@ -2366,7 +2361,6 @@ {'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTVNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist index 5ad475d43feb9..1c3af8ca31a06 100644 --- a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist +++ b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist @@ -1039,9 +1039,6 @@ {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD0Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD1Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__112format_errorD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112future_errorD0Ev', 'type': 'FUNC'} @@ -2000,7 +1997,6 @@ {'is_defined': True, 'name': '__ZTINSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTINSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTINSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} @@ -2210,7 +2206,6 @@ {'is_defined': True, 'name': '__ZTSNSt3__112codecvt_baseE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTSNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTSNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} @@ -2396,7 +2391,6 @@ {'is_defined': True, 'name': '__ZTVNSt3__112bad_weak_ptrE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIcEE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112ctype_bynameIwEE', 'size': 0, 'type': 'OBJECT'} -{'is_defined': True, 'name': '__ZTVNSt3__112format_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112future_errorE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112strstreambufE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZTVNSt3__112system_errorE', 'size': 0, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist index e658d3321ce8e..77dfde59a0794 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist @@ -730,9 +730,6 @@ {'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112ctype_bynameIwED2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__112format_errorD0Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__112format_errorD1Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__112format_errorD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112future_errorC1ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112future_errorC2ENS_10error_codeE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112future_errorD0Ev', 'type': 'FUNC'} @@ -1667,7 +1664,6 @@ {'is_defined': True, 'name': '_ZTINSt3__112codecvt_baseE', 'size': 16, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIcEE', 'size': 24, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTINSt3__112ctype_bynameIwEE', 'size': 24, 'type': 'OBJECT'} -{'is_defined': True, 'name': '_ZTINSt3__112format_errorE', 'size': 24, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTINSt3__112future_errorE', 'size': 24, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTINSt3__112strstreambufE', 'size': 24, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTINSt3__112system_errorE', 'size': 24, 'type': 'OBJECT'} @@ -1797,7 +1793,6 @@ {'is_defined': True, 'name': '_ZTSNSt3__112codecvt_baseE', 'size': 23, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIcEE', 'size': 26, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTSNSt3__112ctype_bynameIwEE', 'size': 26, 'type': 'OBJECT'} -{'is_defined': True, 'name': '_ZTSNSt3__112format_errorE', 'size': 23, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTSNSt3__112future_errorE', 'size': 23, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTSNSt3__112strstreambufE', 'size': 23, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTSNSt3__112system_errorE', 'size': 23, 'type': 'OBJECT'} @@ -1931,7 +1926,6 @@ {'is_defined': True, 'name': '_ZTVNSt3__112bad_weak_ptrE', 'size': 40, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIcEE', 'size': 104, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTVNSt3__112ctype_bynameIwEE', 'size': 136, 'type': 'OBJECT'} -{'is_defined': True, 'name': '_ZTVNSt3__112format_errorE', 'size': 40, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTVNSt3__112future_errorE', 'size': 40, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTVNSt3__112strstreambufE', 'size': 128, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZTVNSt3__112system_errorE', 'size': 40, 'type': 'OBJECT'} diff --git a/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp b/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp deleted file mode 100644 index cc27789c04f3d..0000000000000 --- a/libcxx/test/libcxx/ranges/range.access/begin.incomplete_type.sh.cpp +++ /dev/null @@ -1,75 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 -// -//===----------------------------------------------------------------------===// - -// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.tu1.o -DTU1 -// RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.tu2.o -DTU2 -// RUN: %{cxx} %t.tu1.o %t.tu2.o %{flags} %{link_flags} -o %t.exe -// RUN: %{exec} %t.exe - -// UNSUPPORTED: c++03, c++11, c++14, c++17 -// UNSUPPORTED: libcpp-no-concepts -// UNSUPPORTED: libcpp-has-no-incomplete-ranges - -// Test the libc++-specific behavior that we handle the IFNDR case for ranges::begin -// by returning the beginning of the array-of-incomplete-type. -// Use two translation units so that `Incomplete` really is never completed -// at any point within TU2, but the array `bounded` is still given a definition -// (in TU1) to avoid an "undefined reference" error from the linker. -// All of the actually interesting stuff takes place within TU2. - -#include -#include - -#include "test_macros.h" - -#if defined(TU1) - -struct Incomplete {}; -Incomplete bounded[10]; -Incomplete unbounded[10]; - -#else // defined(TU1) - -struct Incomplete; - -constexpr bool test() -{ - { - extern Incomplete bounded[10]; - assert(std::ranges::begin(bounded) == bounded); - assert(std::ranges::cbegin(bounded) == bounded); - assert(std::ranges::begin(std::as_const(bounded)) == bounded); - assert(std::ranges::cbegin(std::as_const(bounded)) == bounded); - ASSERT_SAME_TYPE(decltype(std::ranges::begin(bounded)), Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(bounded)), const Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::begin(std::as_const(bounded))), const Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(std::as_const(bounded))), const Incomplete*); - } - { - extern Incomplete unbounded[]; - assert(std::ranges::begin(unbounded) == unbounded); - assert(std::ranges::cbegin(unbounded) == unbounded); - assert(std::ranges::begin(std::as_const(unbounded)) == unbounded); - assert(std::ranges::cbegin(std::as_const(unbounded)) == unbounded); - ASSERT_SAME_TYPE(decltype(std::ranges::begin(unbounded)), Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(unbounded)), const Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::begin(std::as_const(unbounded))), const Incomplete*); - ASSERT_SAME_TYPE(decltype(std::ranges::cbegin(std::as_const(unbounded))), const Incomplete*); - } - - return true; -} - -int main(int, char**) -{ - test(); - static_assert(test()); - return 0; -} - -#endif // defined(TU1) diff --git a/libcxx/test/std/ranges/range.access/begin.pass.cpp b/libcxx/test/std/ranges/range.access/begin.pass.cpp index 07b1a3b89a7f1..7014681ccabf9 100644 --- a/libcxx/test/std/ranges/range.access/begin.pass.cpp +++ b/libcxx/test/std/ranges/range.access/begin.pass.cpp @@ -31,9 +31,26 @@ static_assert( std::is_invocable_v); struct Incomplete; static_assert(!std::is_invocable_v); -static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); static_assert(!std::is_invocable_v); -static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); + +static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); +static_assert(!std::is_invocable_v); + +// This case is IFNDR; we handle it SFINAE-friendly. +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); + +// This case is IFNDR; we handle it SFINAE-friendly. +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); +LIBCPP_STATIC_ASSERT(!std::is_invocable_v); struct BeginMember { int x; diff --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py index 5855240a4b24c..63c771689fe81 100644 --- a/libcxxabi/test/libcxxabi/test/config.py +++ b/libcxxabi/test/libcxxabi/test/config.py @@ -70,7 +70,7 @@ def configure_compile_flags_header_includes(self): cxx_target_headers = os.path.join(path, triple, cxx, version) if os.path.isdir(cxx_target_headers): self.cxx.compile_flags += ['-I' + cxx_target_headers] - self.cxx.compile_flags += ['-I' + cxx_headers] + self.cxx.compile_flags += ['-isystem' + cxx_headers] self.cxx.compile_flags += ['-I' + os.path.join(self.libcxx_src_root, 'src')] libcxxabi_headers = self.get_lit_conf( diff --git a/lld/ELF/Arch/AArch64.cpp b/lld/ELF/Arch/AArch64.cpp index 5789bc935b638..9e857d5906845 100644 --- a/lld/ELF/Arch/AArch64.cpp +++ b/lld/ELF/Arch/AArch64.cpp @@ -197,6 +197,8 @@ int64_t AArch64::getImplicitAddend(const uint8_t *buf, RelType type) const { switch (type) { case R_AARCH64_TLSDESC: return read64(buf + 8); + case R_AARCH64_NONE: + return 0; default: internalLinkerError(getErrorLocation(buf), "cannot read addend for relocation " + toString(type)); diff --git a/lld/ELF/Arch/PPC.cpp b/lld/ELF/Arch/PPC.cpp index 97e4d66331381..315ac7df608d0 100644 --- a/lld/ELF/Arch/PPC.cpp +++ b/lld/ELF/Arch/PPC.cpp @@ -30,6 +30,7 @@ class PPC final : public TargetInfo { RelExpr getRelExpr(RelType type, const Symbol &s, const uint8_t *loc) const override; RelType getDynRel(RelType type) const override; + int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override; void writeGotHeader(uint8_t *buf) const override; void writePltHeader(uint8_t *buf) const override { llvm_unreachable("should call writePPC32GlinkSection() instead"); @@ -275,6 +276,17 @@ RelType PPC::getDynRel(RelType type) const { return R_PPC_NONE; } +int64_t PPC::getImplicitAddend(const uint8_t *buf, RelType type) const { + switch (type) { + case R_PPC_NONE: + return 0; + default: + internalLinkerError(getErrorLocation(buf), + "cannot read addend for relocation " + toString(type)); + return 0; + } +} + static std::pair fromDTPREL(RelType type, uint64_t val) { uint64_t dtpBiasedVal = val - 0x8000; switch (type) { diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index d9e4fc97ea0be..c083484f42804 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -363,6 +363,7 @@ class PPC64 final : public TargetInfo { RelExpr getRelExpr(RelType type, const Symbol &s, const uint8_t *loc) const override; RelType getDynRel(RelType type) const override; + int64_t getImplicitAddend(const uint8_t *buf, RelType type) const override; void writePltHeader(uint8_t *buf) const override; void writePlt(uint8_t *buf, const Symbol &sym, uint64_t pltEntryAddr) const override; @@ -1059,6 +1060,17 @@ RelType PPC64::getDynRel(RelType type) const { return R_PPC64_NONE; } +int64_t PPC64::getImplicitAddend(const uint8_t *buf, RelType type) const { + switch (type) { + case R_PPC64_NONE: + return 0; + default: + internalLinkerError(getErrorLocation(buf), + "cannot read addend for relocation " + toString(type)); + return 0; + } +} + void PPC64::writeGotHeader(uint8_t *buf) const { write64(buf, getPPC64TocBase()); } diff --git a/lld/test/ELF/relocation-none-aarch64.s b/lld/test/ELF/relocation-none-aarch64.s deleted file mode 100644 index 7783c127cf867..0000000000000 --- a/lld/test/ELF/relocation-none-aarch64.s +++ /dev/null @@ -1,26 +0,0 @@ -# REQUIRES: aarch64 - -# RUN: llvm-mc -filetype=obj -triple=aarch64-linux-musl %s -o %t.o -# RUN: ld.lld --gc-sections %t.o -o %t -# RUN: llvm-readelf -S -r %t | FileCheck %s - -# Test that we discard R_AARCH64_NONE, but respect the references it creates -# among sections. - -# CHECK: .data -# CHECK: There are no relocations in this file. - -# RUN: ld.lld -r %t.o -o %t -# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s - -# RELOC: Section ({{.*}}) .rela.text { -# RELOC-NEXT: 0x0 R_AARCH64_NONE .data 0x0 -# RELOC-NEXT: } - -.globl _start -_start: - ret - .reloc 0, R_AARCH64_NONE, .data - -.data - .long 0 diff --git a/lld/test/ELF/relocation-none-arm.s b/lld/test/ELF/relocation-none-arm.s deleted file mode 100644 index a3ebc3189b34e..0000000000000 --- a/lld/test/ELF/relocation-none-arm.s +++ /dev/null @@ -1,26 +0,0 @@ -# REQUIRES: arm - -# RUN: llvm-mc -filetype=obj -triple=armv7-linux-musl %s -o %t.o -# RUN: ld.lld --gc-sections %t.o -o %t -# RUN: llvm-readelf -S -r %t | FileCheck %s - -# Test that we discard R_ARM_NONE, but respect the references it creates among -# sections. - -# CHECK: .data -# CHECK: There are no relocations in this file. - -# RUN: ld.lld -r %t.o -o %t -# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s - -# RELOC: Section ({{.*}}) .rel.text { -# RELOC-NEXT: 0x0 R_ARM_NONE .data -# RELOC-NEXT: } - -.globl _start -_start: - nop - .reloc 0, R_ARM_NONE, .data - -.data - .long 0 diff --git a/lld/test/ELF/relocation-none-i386.s b/lld/test/ELF/relocation-none-i386.s deleted file mode 100644 index 54913b37ed8b5..0000000000000 --- a/lld/test/ELF/relocation-none-i386.s +++ /dev/null @@ -1,26 +0,0 @@ -# REQUIRES: x86 - -# RUN: llvm-mc -filetype=obj -triple=i386-linux-musl %s -o %t.o -# RUN: ld.lld --gc-sections %t.o -o %t -# RUN: llvm-readelf -S -r %t | FileCheck %s - -# Test that we discard R_386_NONE, but respect the -# references it creates among sections. - -# CHECK: .data -# CHECK: There are no relocations in this file. - -# RUN: ld.lld -r %t.o -o %t -# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s - -# RELOC: Section ({{.*}}) .rel.text { -# RELOC-NEXT: 0x0 R_386_NONE .data -# RELOC-NEXT: } - -.globl _start -_start: - ret - .reloc 0, R_386_NONE, .data - -.data - .long 0 diff --git a/lld/test/ELF/relocation-none-x86-64.s b/lld/test/ELF/relocation-none-x86-64.s deleted file mode 100644 index be6b07c3f5022..0000000000000 --- a/lld/test/ELF/relocation-none-x86-64.s +++ /dev/null @@ -1,26 +0,0 @@ -# REQUIRES: x86 - -# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-musl %s -o %t.o -# RUN: ld.lld --gc-sections %t.o -o %t -# RUN: llvm-readelf -S -r %t | FileCheck %s - -# Test that we discard R_X86_64_NONE, but respect the -# references it creates among sections. - -# CHECK: .data -# CHECK: There are no relocations in this file. - -# RUN: ld.lld -r %t.o -o %t -# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s - -# RELOC: Section ({{.*}}) .rela.text { -# RELOC-NEXT: 0x0 R_X86_64_NONE .data 0x0 -# RELOC-NEXT: } - -.globl _start -_start: - ret - .reloc 0, R_X86_64_NONE, .data - -.data - .long 0 diff --git a/lld/test/ELF/relocation-none.test b/lld/test/ELF/relocation-none.test new file mode 100644 index 0000000000000..4e808cc67c0d1 --- /dev/null +++ b/lld/test/ELF/relocation-none.test @@ -0,0 +1,92 @@ +# RUN: yaml2obj -DMACHINE=AARCH64 %s -o %t.o +# RUN: ld.lld --gc-sections %t.o -o %t +# RUN: llvm-readelf -S -r %t | FileCheck %s + +## Test that we discard R_*_NONE, but respect the references it creates +## among sections. + +# CHECK: .data +# CHECK: There are no relocations in this file. + +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DBITS=32 -DMACHINE=ARM %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DBITS=32 -DMACHINE=PPC %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DMACHINE=PPC64 %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DMACHINE=RISCV %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DBITS=32 -DMACHINE=386 %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +# RUN: yaml2obj -DMACHINE=X86_64 %s -o %t.o +# RUN: ld.lld -r %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck --check-prefix=RELOC %s + +## Both REL and RELA are supported. .rel.llvm.call-graph-profile uses REL even +## if the prevailing format is RELA. +# RELOC: Section ({{.*}}) .rela.text { +# RELOC-NEXT: 0x0 R_{{.*}}_NONE .data 0x0 +# RELOC-NEXT: } +# RELOC: Section ({{.*}}) .rel.nonalloc1 { +# RELOC-NEXT: 0x0 R_{{.*}}_NONE .data +# RELOC-NEXT: } +# RELOC: Section ({{.*}}) .rela.nonalloc2 { +# RELOC-NEXT: 0x0 R_{{.*}}_NONE .data 0x0 +# RELOC-NEXT: } + +--- !ELF +FileHeader: + Class: ELFCLASS[[BITS=64]] + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_[[MACHINE]] +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + - Name: .data + Type: SHT_PROGBITS + Flags: [ SHF_WRITE, SHF_ALLOC ] + - Name: .nonalloc1 + Type: SHT_PROGBITS + - Name: .nonalloc2 + Type: SHT_PROGBITS + - Name: .rela.text + Type: SHT_RELA + Info: .text + Relocations: + - Symbol: .data + Type: R_[[MACHINE]]_NONE + - Name: .rel.nonalloc1 + Type: SHT_REL + Info: .nonalloc1 + Relocations: + - Symbol: .data + Type: R_[[MACHINE]]_NONE + - Name: .rela.nonalloc2 + Type: SHT_RELA + Info: .nonalloc2 + Relocations: + - Symbol: .data + Type: R_[[MACHINE]]_NONE +Symbols: + - Name: .data + Type: STT_SECTION + Section: .data + - Name: _start + Section: .text + Binding: STB_GLOBAL +... diff --git a/llvm/lib/Debuginfod/HTTPClient.cpp b/llvm/lib/Debuginfod/HTTPClient.cpp index 65f457933b92d..cba342c9b3439 100644 --- a/llvm/lib/Debuginfod/HTTPClient.cpp +++ b/llvm/lib/Debuginfod/HTTPClient.cpp @@ -156,7 +156,8 @@ HTTPClient::HTTPClient() { "Must call HTTPClient::initialize() at the beginning of main()."); if (Curl) return; - assert((Curl = curl_easy_init()) && "Curl could not be initialized."); + Curl = curl_easy_init(); + assert(Curl && "Curl could not be initialized"); // Set the callback hooks. curl_easy_setopt(Curl, CURLOPT_WRITEFUNCTION, curlWriteFunction); curl_easy_setopt(Curl, CURLOPT_HEADERFUNCTION, curlHeaderFunction); diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp index d597148b98ab4..3d4cd4088e9fc 100644 --- a/llvm/lib/ObjectYAML/ELFYAML.cpp +++ b/llvm/lib/ObjectYAML/ELFYAML.cpp @@ -839,6 +839,9 @@ void ScalarEnumerationTraits::enumeration( case ELF::EM_CSKY: #include "llvm/BinaryFormat/ELFRelocs/CSKY.def" break; + case ELF::EM_PPC: +#include "llvm/BinaryFormat/ELFRelocs/PowerPC.def" + break; case ELF::EM_PPC64: #include "llvm/BinaryFormat/ELFRelocs/PowerPC64.def" break; diff --git a/llvm/test/tools/llvm-debuginfod-find/debuginfod.test b/llvm/test/tools/llvm-debuginfod-find/debuginfod.test index e38913b78351b..d1c9c693c0e4a 100644 --- a/llvm/test/tools/llvm-debuginfod-find/debuginfod.test +++ b/llvm/test/tools/llvm-debuginfod-find/debuginfod.test @@ -2,13 +2,13 @@ # RUN: rm -rf %t # RUN: mkdir %t # # Query the python server for artifacts -# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \ +# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \ # RUN: --tool-cmd 'llvm-debuginfod-find --dump --executable abcdef' | \ # RUN: FileCheck %s --check-prefix=EXECUTABLE -# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \ +# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \ # RUN: --tool-cmd 'llvm-debuginfod-find --dump --source=/directory/file.c abcdef' | \ # RUN: FileCheck %s --check-prefix=SOURCE -# RUN: DEBUGINFOD_CACHE_PATH=%t python %s --server-path %S/Inputs \ +# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-path %S/Inputs \ # RUN: --tool-cmd 'llvm-debuginfod-find --dump --debuginfo abcdef' | \ # RUN: FileCheck %s --check-prefix=DEBUGINFO diff --git a/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test b/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test new file mode 100644 index 0000000000000..594d2da6c387a --- /dev/null +++ b/llvm/test/tools/llvm-readobj/ELF/reloc-types-ppc.test @@ -0,0 +1,163 @@ +## Test that llvm-readobj shows proper relocation type +## names and values for ppc target. + +# RUN: yaml2obj %s -o %t-ppc.o +# RUN: llvm-readobj -r --expand-relocs %t-ppc.o | FileCheck %s + +# CHECK: Type: R_PPC_NONE (0) +# CHECK: Type: R_PPC_ADDR32 (1) +# CHECK: Type: R_PPC_ADDR24 (2) +# CHECK: Type: R_PPC_ADDR16 (3) +# CHECK: Type: R_PPC_ADDR16_LO (4) +# CHECK: Type: R_PPC_ADDR16_HI (5) +# CHECK: Type: R_PPC_ADDR16_HA (6) +# CHECK: Type: R_PPC_ADDR14 (7) +# CHECK: Type: R_PPC_ADDR14_BRTAKEN (8) +# CHECK: Type: R_PPC_ADDR14_BRNTAKEN (9) +# CHECK: Type: R_PPC_REL24 (10) +# CHECK: Type: R_PPC_REL14 (11) +# CHECK: Type: R_PPC_REL14_BRTAKEN (12) +# CHECK: Type: R_PPC_REL14_BRNTAKEN (13) +# CHECK: Type: R_PPC_GOT16 (14) +# CHECK: Type: R_PPC_GOT16_LO (15) +# CHECK: Type: R_PPC_GOT16_HI (16) +# CHECK: Type: R_PPC_GOT16_HA (17) +# CHECK: Type: R_PPC_PLTREL24 (18) +# CHECK: Type: R_PPC_COPY (19) +# CHECK: Type: R_PPC_GLOB_DAT (20) +# CHECK: Type: R_PPC_JMP_SLOT (21) +# CHECK: Type: R_PPC_RELATIVE (22) +# CHECK: Type: R_PPC_LOCAL24PC (23) +# CHECK: Type: R_PPC_UADDR32 (24) +# CHECK: Type: R_PPC_UADDR16 (25) +# CHECK: Type: R_PPC_REL32 (26) +# CHECK: Type: R_PPC_PLT32 (27) +# CHECK: Type: R_PPC_PLTREL32 (28) +# CHECK: Type: R_PPC_PLT16_LO (29) +# CHECK: Type: R_PPC_PLT16_HI (30) +# CHECK: Type: R_PPC_PLT16_HA (31) +# CHECK: Type: R_PPC_SDAREL16 (32) +# CHECK: Type: R_PPC_SECTOFF (33) +# CHECK: Type: R_PPC_SECTOFF_LO (34) +# CHECK: Type: R_PPC_SECTOFF_HI (35) +# CHECK: Type: R_PPC_SECTOFF_HA (36) +# CHECK: Type: R_PPC_ADDR30 (37) +# CHECK: Type: R_PPC_TLS (67) +# CHECK: Type: R_PPC_DTPMOD32 (68) +# CHECK: Type: R_PPC_TPREL16 (69) +# CHECK: Type: R_PPC_TPREL16_LO (70) +# CHECK: Type: R_PPC_TPREL16_HI (71) +# CHECK: Type: R_PPC_TPREL16_HA (72) +# CHECK: Type: R_PPC_TPREL32 (73) +# CHECK: Type: R_PPC_DTPREL16 (74) +# CHECK: Type: R_PPC_DTPREL16_LO (75) +# CHECK: Type: R_PPC_DTPREL16_HI (76) +# CHECK: Type: R_PPC_DTPREL16_HA (77) +# CHECK: Type: R_PPC_DTPREL32 (78) +# CHECK: Type: R_PPC_GOT_TLSGD16 (79) +# CHECK: Type: R_PPC_GOT_TLSGD16_LO (80) +# CHECK: Type: R_PPC_GOT_TLSGD16_HI (81) +# CHECK: Type: R_PPC_GOT_TLSGD16_HA (82) +# CHECK: Type: R_PPC_GOT_TLSLD16 (83) +# CHECK: Type: R_PPC_GOT_TLSLD16_LO (84) +# CHECK: Type: R_PPC_GOT_TLSLD16_HI (85) +# CHECK: Type: R_PPC_GOT_TLSLD16_HA (86) +# CHECK: Type: R_PPC_GOT_TPREL16 (87) +# CHECK: Type: R_PPC_GOT_TPREL16_LO (88) +# CHECK: Type: R_PPC_GOT_TPREL16_HI (89) +# CHECK: Type: R_PPC_GOT_TPREL16_HA (90) +# CHECK: Type: R_PPC_GOT_DTPREL16 (91) +# CHECK: Type: R_PPC_GOT_DTPREL16_LO (92) +# CHECK: Type: R_PPC_GOT_DTPREL16_HI (93) +# CHECK: Type: R_PPC_GOT_DTPREL16_HA (94) +# CHECK: Type: R_PPC_TLSGD (95) +# CHECK: Type: R_PPC_TLSLD (96) +# CHECK: Type: R_PPC_IRELATIVE (248) +# CHECK: Type: R_PPC_REL16 (249) +# CHECK: Type: R_PPC_REL16_LO (250) +# CHECK: Type: R_PPC_REL16_HI (251) +# CHECK: Type: R_PPC_REL16_HA (252) + +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2MSB + Type: ET_REL + Machine: EM_PPC +Sections: + - Name: .rela.text + Type: SHT_RELA + Relocations: + - Type: R_PPC_NONE + - Type: R_PPC_ADDR32 + - Type: R_PPC_ADDR24 + - Type: R_PPC_ADDR16 + - Type: R_PPC_ADDR16_LO + - Type: R_PPC_ADDR16_HI + - Type: R_PPC_ADDR16_HA + - Type: R_PPC_ADDR14 + - Type: R_PPC_ADDR14_BRTAKEN + - Type: R_PPC_ADDR14_BRNTAKEN + - Type: R_PPC_REL24 + - Type: R_PPC_REL14 + - Type: R_PPC_REL14_BRTAKEN + - Type: R_PPC_REL14_BRNTAKEN + - Type: R_PPC_GOT16 + - Type: R_PPC_GOT16_LO + - Type: R_PPC_GOT16_HI + - Type: R_PPC_GOT16_HA + - Type: R_PPC_PLTREL24 + - Type: R_PPC_COPY + - Type: R_PPC_GLOB_DAT + - Type: R_PPC_JMP_SLOT + - Type: R_PPC_RELATIVE + - Type: R_PPC_LOCAL24PC + - Type: R_PPC_UADDR32 + - Type: R_PPC_UADDR16 + - Type: R_PPC_REL32 + - Type: R_PPC_PLT32 + - Type: R_PPC_PLTREL32 + - Type: R_PPC_PLT16_LO + - Type: R_PPC_PLT16_HI + - Type: R_PPC_PLT16_HA + - Type: R_PPC_SDAREL16 + - Type: R_PPC_SECTOFF + - Type: R_PPC_SECTOFF_LO + - Type: R_PPC_SECTOFF_HI + - Type: R_PPC_SECTOFF_HA + - Type: R_PPC_ADDR30 + - Type: R_PPC_TLS + - Type: R_PPC_DTPMOD32 + - Type: R_PPC_TPREL16 + - Type: R_PPC_TPREL16_LO + - Type: R_PPC_TPREL16_HI + - Type: R_PPC_TPREL16_HA + - Type: R_PPC_TPREL32 + - Type: R_PPC_DTPREL16 + - Type: R_PPC_DTPREL16_LO + - Type: R_PPC_DTPREL16_HI + - Type: R_PPC_DTPREL16_HA + - Type: R_PPC_DTPREL32 + - Type: R_PPC_GOT_TLSGD16 + - Type: R_PPC_GOT_TLSGD16_LO + - Type: R_PPC_GOT_TLSGD16_HI + - Type: R_PPC_GOT_TLSGD16_HA + - Type: R_PPC_GOT_TLSLD16 + - Type: R_PPC_GOT_TLSLD16_LO + - Type: R_PPC_GOT_TLSLD16_HI + - Type: R_PPC_GOT_TLSLD16_HA + - Type: R_PPC_GOT_TPREL16 + - Type: R_PPC_GOT_TPREL16_LO + - Type: R_PPC_GOT_TPREL16_HI + - Type: R_PPC_GOT_TPREL16_HA + - Type: R_PPC_GOT_DTPREL16 + - Type: R_PPC_GOT_DTPREL16_LO + - Type: R_PPC_GOT_DTPREL16_HI + - Type: R_PPC_GOT_DTPREL16_HA + - Type: R_PPC_TLSGD + - Type: R_PPC_TLSLD + - Type: R_PPC_IRELATIVE + - Type: R_PPC_REL16 + - Type: R_PPC_REL16_LO + - Type: R_PPC_REL16_HI + - Type: R_PPC_REL16_HA