From 62668e3e6b3c07d4145a7de3ebb9d5fdd728d75e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 22 Mar 2018 15:32:47 -0400 Subject: [PATCH 01/27] update to llvm 7.0.0 --- README.md | 10 +++++----- ci/appveyor/appveyor.yml | 2 +- ci/appveyor/build_script.bat | 4 ++-- ci/travis_linux_before_install | 2 +- ci/travis_linux_install | 2 +- ci/travis_linux_script | 4 ++-- ci/travis_osx_install | 4 ++-- ci/travis_osx_script | 2 +- cmake/Findclang.cmake | 8 ++++---- cmake/Findllvm.cmake | 6 +++--- src/target.cpp | 15 +++++++-------- src/target.hpp | 3 ++- src/zig_llvm.h | 6 +++--- 13 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index acc7e891e7..0893017bb7 100644 --- a/README.md +++ b/README.md @@ -125,14 +125,14 @@ libc. Create demo games using Zig. * cmake >= 2.8.5 * gcc >= 5.0.0 or clang >= 3.6.0 - * LLVM, Clang, LLD development libraries == 6.x, compiled with the same gcc or clang version above + * LLVM, Clang, LLD development libraries == 7.x, compiled with the same gcc or clang version above - These depend on zlib and libxml2. ##### Windows * cmake >= 2.8.5 * Microsoft Visual Studio 2015 - * LLVM, Clang, LLD development libraries == 6.x, compiled with the same MSVC version above + * LLVM, Clang, LLD development libraries == 7.x, compiled with the same MSVC version above #### Instructions @@ -156,11 +156,11 @@ make install `ZIG_LIBC_LIB_DIR` and `ZIG_LIBC_STATIC_LIB_DIR` are unused. ``` -brew install cmake llvm@6 -brew outdated llvm@6 || brew upgrade llvm@6 +brew install cmake llvm@7 +brew outdated llvm@7 || brew upgrade llvm@7 mkdir build cd build -cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@6/ -DCMAKE_INSTALL_PREFIX=$(pwd) +cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@7/ -DCMAKE_INSTALL_PREFIX=$(pwd) make install ./zig build --build-file ../build.zig test ``` diff --git a/ci/appveyor/appveyor.yml b/ci/appveyor/appveyor.yml index 2122153494..b63bde2769 100644 --- a/ci/appveyor/appveyor.yml +++ b/ci/appveyor/appveyor.yml @@ -6,5 +6,5 @@ build_script: after_build: - '%APPVEYOR_BUILD_FOLDER%\ci\appveyor\after_build.bat' cache: - - 'llvm+clang-5.0.1-win64-msvc-release.tar.xz' - 'llvm+clang-6.0.0-win64-msvc-release.tar.xz' + - 'llvm+clang-7.0.0-win64-msvc-release.tar.xz' diff --git a/ci/appveyor/build_script.bat b/ci/appveyor/build_script.bat index 5ae47df5ec..2d4b325a6b 100644 --- a/ci/appveyor/build_script.bat +++ b/ci/appveyor/build_script.bat @@ -7,13 +7,13 @@ SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%" SET "MSYSTEM=MINGW64" SET "APPVEYOR_CACHE_ENTRY_ZIP_ARGS=-m0=Copy" -bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-6.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/ziglang.org/deps/llvm%%2bclang-6.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-6.0.0-win64-msvc-release.tar.xz" || exit /b +bash -lc "cd ${APPVEYOR_BUILD_FOLDER} && if [ -s ""llvm+clang-7.0.0-win64-msvc-release.tar.xz"" ]; then echo 'skipping LLVM download'; else wget 'https://s3.amazonaws.com/ziglang.org/deps/llvm%%2bclang-7.0.0-win64-msvc-release.tar.xz'; fi && tar xf llvm+clang-7.0.0-win64-msvc-release.tar.xz" || exit /b SET "PATH=%PREVPATH%" SET "MSYSTEM=%PREVMSYSTEM%" SET "ZIGBUILDDIR=%APPVEYOR_BUILD_FOLDER%\build-msvc-release" -SET "ZIGPREFIXPATH=%APPVEYOR_BUILD_FOLDER%\llvm+clang-6.0.0-win64-msvc-release" +SET "ZIGPREFIXPATH=%APPVEYOR_BUILD_FOLDER%\llvm+clang-7.0.0-win64-msvc-release" call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 diff --git a/ci/travis_linux_before_install b/ci/travis_linux_before_install index f93dc69f2d..28eccd6141 100755 --- a/ci/travis_linux_before_install +++ b/ci/travis_linux_before_install @@ -2,7 +2,7 @@ set -x -sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main" >> /etc/apt/sources.list' +sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-7.0 main" >> /etc/apt/sources.list' wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update -q diff --git a/ci/travis_linux_install b/ci/travis_linux_install index 02d0d6d2e8..98f8d5aabc 100755 --- a/ci/travis_linux_install +++ b/ci/travis_linux_install @@ -4,4 +4,4 @@ set -x sudo apt-get remove -y llvm-* sudo rm -rf /usr/local/* -sudo apt-get install -y clang-6.0 libclang-6.0 libclang-6.0-dev llvm-6.0 llvm-6.0-dev liblld-6.0 liblld-6.0-dev cmake wine1.6-amd64 +sudo apt-get install -y clang-7.0 libclang-7.0 libclang-7.0-dev llvm-7.0 llvm-7.0-dev liblld-7.0 liblld-7.0-dev cmake wine1.6-amd64 diff --git a/ci/travis_linux_script b/ci/travis_linux_script index d6b9eb9230..698cd996f0 100755 --- a/ci/travis_linux_script +++ b/ci/travis_linux_script @@ -3,8 +3,8 @@ set -x set -e -export CC=clang-6.0 -export CXX=clang++-6.0 +export CC=clang-7.0 +export CXX=clang++-7.0 echo $PATH mkdir build cd build diff --git a/ci/travis_osx_install b/ci/travis_osx_install index 6974147109..2ad5e485c3 100755 --- a/ci/travis_osx_install +++ b/ci/travis_osx_install @@ -2,6 +2,6 @@ set -x -brew install llvm@6 -brew outdated llvm@6 || brew upgrade llvm@6 +brew install llvm@7 +brew outdated llvm@7 || brew upgrade llvm@7 diff --git a/ci/travis_osx_script b/ci/travis_osx_script index 56cf45cd5f..2616f42a7c 100755 --- a/ci/travis_osx_script +++ b/ci/travis_osx_script @@ -5,7 +5,7 @@ set -e mkdir build cd build -cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@6/ -DCMAKE_INSTALL_PREFIX=$(pwd) +cmake .. -DCMAKE_PREFIX_PATH=/usr/local/opt/llvm@7/ -DCMAKE_INSTALL_PREFIX=$(pwd) make VERBOSE=1 make install diff --git a/cmake/Findclang.cmake b/cmake/Findclang.cmake index b42abd10a3..c2845da62f 100644 --- a/cmake/Findclang.cmake +++ b/cmake/Findclang.cmake @@ -27,8 +27,8 @@ if(MSVC) else() find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h PATHS - /usr/lib/llvm/6/include - /usr/lib/llvm-6.0/include + /usr/lib/llvm/7/include + /usr/lib/llvm-7.0/include /mingw64/include) macro(FIND_AND_ADD_CLANG_LIB _libname_) @@ -36,8 +36,8 @@ else() find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_} PATHS ${CLANG_LIBDIRS} - /usr/lib/llvm/6/lib - /usr/lib/llvm-6.0/lib + /usr/lib/llvm/7/lib + /usr/lib/llvm-7.0/lib /mingw64/lib /c/msys64/mingw64/lib c:\\msys64\\mingw64\\lib) diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake index 296e0a91f7..1e09ad673a 100644 --- a/cmake/Findllvm.cmake +++ b/cmake/Findllvm.cmake @@ -8,12 +8,12 @@ # LLVM_LIBDIRS find_program(LLVM_CONFIG_EXE - NAMES llvm-config-6.0 llvm-config + NAMES llvm-config-7.0 llvm-config PATHS "/mingw64/bin" "/c/msys64/mingw64/bin" "c:/msys64/mingw64/bin" - "C:/Libraries/llvm-6.0.0/bin") + "C:/Libraries/llvm-7.0.0/bin") if(NOT(CMAKE_BUILD_TYPE STREQUAL "Debug")) execute_process( @@ -62,7 +62,7 @@ execute_process( set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS}) if(NOT LLVM_LIBRARIES) - find_library(LLVM_LIBRARIES NAMES LLVM LLVM-6.0 LLVM-6) + find_library(LLVM_LIBRARIES NAMES LLVM LLVM-7.0 LLVM-7) endif() link_directories("${CMAKE_PREFIX_PATH}/lib") diff --git a/src/target.cpp b/src/target.cpp index 8e7c5ce578..6b1260e139 100644 --- a/src/target.cpp +++ b/src/target.cpp @@ -148,7 +148,6 @@ static const Os os_list[] = { OsRTEMS, OsNaCl, // Native Client OsCNK, // BG/P Compute-Node Kernel - OsBitrig, OsAIX, OsCUDA, // NVIDIA CUDA OsNVCL, // NVIDIA OpenCL @@ -159,6 +158,7 @@ static const Os os_list[] = { OsWatchOS, // Apple watchOS OsMesa3D, OsContiki, + OsAMDPAL, OsZen, }; @@ -181,7 +181,6 @@ static const ZigLLVM_EnvironmentType environ_list[] = { ZigLLVM_MSVC, ZigLLVM_Itanium, ZigLLVM_Cygnus, - ZigLLVM_AMDOpenCL, ZigLLVM_CoreCLR, ZigLLVM_OpenCL, ZigLLVM_Simulator, @@ -280,8 +279,6 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) { return ZigLLVM_NaCl; case OsCNK: return ZigLLVM_CNK; - case OsBitrig: - return ZigLLVM_Bitrig; case OsAIX: return ZigLLVM_AIX; case OsCUDA: @@ -302,6 +299,8 @@ static ZigLLVM_OSType get_llvm_os_type(Os os_type) { return ZigLLVM_Mesa3D; case OsContiki: return ZigLLVM_Contiki; + case OsAMDPAL: + return ZigLLVM_AMDPAL; } zig_unreachable(); } @@ -349,8 +348,6 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { return OsNaCl; case ZigLLVM_CNK: return OsCNK; - case ZigLLVM_Bitrig: - return OsBitrig; case ZigLLVM_AIX: return OsAIX; case ZigLLVM_CUDA: @@ -371,6 +368,8 @@ static Os get_zig_os_type(ZigLLVM_OSType os_type) { return OsMesa3D; case ZigLLVM_Contiki: return OsContiki; + case ZigLLVM_AMDPAL: + return OsAMDPAL; } zig_unreachable(); } @@ -400,7 +399,6 @@ const char *get_target_os_name(Os os_type) { case OsRTEMS: case OsNaCl: // Native Client case OsCNK: // BG/P Compute-Node Kernel - case OsBitrig: case OsAIX: case OsCUDA: // NVIDIA CUDA case OsNVCL: // NVIDIA OpenCL @@ -411,6 +409,7 @@ const char *get_target_os_name(Os os_type) { case OsWatchOS: // Apple watchOS case OsMesa3D: case OsContiki: + case OsAMDPAL: return ZigLLVMGetOSTypeName(get_llvm_os_type(os_type)); } zig_unreachable(); @@ -749,7 +748,6 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { case OsRTEMS: case OsNaCl: case OsCNK: - case OsBitrig: case OsAIX: case OsCUDA: case OsNVCL: @@ -761,6 +759,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) { case OsMesa3D: case OsFuchsia: case OsContiki: + case OsAMDPAL: zig_panic("TODO c type size in bits for this target"); } zig_unreachable(); diff --git a/src/target.hpp b/src/target.hpp index 614b0627d5..e60bd19422 100644 --- a/src/target.hpp +++ b/src/target.hpp @@ -17,6 +17,7 @@ struct ArchType { ZigLLVM_SubArchType sub_arch; }; +// Synchronize with target.cpp::os_list enum Os { OsFreestanding, OsAnanas, @@ -38,7 +39,6 @@ enum Os { OsRTEMS, OsNaCl, // Native Client OsCNK, // BG/P Compute-Node Kernel - OsBitrig, OsAIX, OsCUDA, // NVIDIA CUDA OsNVCL, // NVIDIA OpenCL @@ -49,6 +49,7 @@ enum Os { OsWatchOS, // Apple watchOS OsMesa3D, OsContiki, + OsAMDPAL, OsZen, }; diff --git a/src/zig_llvm.h b/src/zig_llvm.h index d6809000ce..3aea44d8c7 100644 --- a/src/zig_llvm.h +++ b/src/zig_llvm.h @@ -333,7 +333,6 @@ enum ZigLLVM_OSType { ZigLLVM_RTEMS, ZigLLVM_NaCl, // Native Client ZigLLVM_CNK, // BG/P Compute-Node Kernel - ZigLLVM_Bitrig, ZigLLVM_AIX, ZigLLVM_CUDA, // NVIDIA CUDA ZigLLVM_NVCL, // NVIDIA OpenCL @@ -344,10 +343,12 @@ enum ZigLLVM_OSType { ZigLLVM_WatchOS, // Apple watchOS ZigLLVM_Mesa3D, ZigLLVM_Contiki, + ZigLLVM_AMDPAL, // AMD PAL Runtime - ZigLLVM_LastOSType = ZigLLVM_Contiki + ZigLLVM_LastOSType = ZigLLVM_AMDPAL }; +// Synchronize with target.cpp::environ_list enum ZigLLVM_EnvironmentType { ZigLLVM_UnknownEnvironment, @@ -368,7 +369,6 @@ enum ZigLLVM_EnvironmentType { ZigLLVM_MSVC, ZigLLVM_Itanium, ZigLLVM_Cygnus, - ZigLLVM_AMDOpenCL, ZigLLVM_CoreCLR, ZigLLVM_OpenCL, ZigLLVM_Simulator, From fe38d8142f713c1089cdc02f787184c48b8350b6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 22 Mar 2018 20:22:15 -0400 Subject: [PATCH 02/27] create multiple llvm.memcpy and llvm.memset with different align params --- src/all_types.hpp | 11 +++++-- src/analyze.cpp | 9 ++++++ src/codegen.cpp | 81 ++++++++++++++++++++++++++++------------------- 3 files changed, 67 insertions(+), 34 deletions(-) diff --git a/src/all_types.hpp b/src/all_types.hpp index 6afa7ccf20..f1d91deddb 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -1415,6 +1415,8 @@ enum ZigLLVMFnId { ZigLLVMFnIdOverflowArithmetic, ZigLLVMFnIdFloor, ZigLLVMFnIdCeil, + ZigLLVMFnIdMemcpy, + ZigLLVMFnIdMemset, }; enum AddSubMul { @@ -1441,6 +1443,13 @@ struct ZigLLVMFnKey { uint32_t bit_count; bool is_signed; } overflow_arithmetic; + struct { + uint32_t dest_align; + uint32_t src_align; + } memcpy; + struct { + uint32_t dest_align; + } memset; } data; }; @@ -1629,8 +1638,6 @@ struct CodeGen { ImportTableEntry *root_import; ImportTableEntry *bootstrap_import; ImportTableEntry *test_runner_import; - LLVMValueRef memcpy_fn_val; - LLVMValueRef memset_fn_val; LLVMValueRef trap_fn_val; LLVMValueRef return_address_fn_val; LLVMValueRef frame_address_fn_val; diff --git a/src/analyze.cpp b/src/analyze.cpp index 395df229cd..eaace123ef 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -5681,6 +5681,10 @@ uint32_t zig_llvm_fn_key_hash(ZigLLVMFnKey x) { return ((uint32_t)(x.data.overflow_arithmetic.bit_count) * 87135777) + ((uint32_t)(x.data.overflow_arithmetic.add_sub_mul) * 31640542) + ((uint32_t)(x.data.overflow_arithmetic.is_signed) ? 1062315172 : 314955820); + case ZigLLVMFnIdMemcpy: + return x.data.memcpy.dest_align * 2325524557 + x.data.memcpy.src_align * 519976394; + case ZigLLVMFnIdMemset: + return x.data.memset.dest_align * 388171592; } zig_unreachable(); } @@ -5700,6 +5704,11 @@ bool zig_llvm_fn_key_eql(ZigLLVMFnKey a, ZigLLVMFnKey b) { return (a.data.overflow_arithmetic.bit_count == b.data.overflow_arithmetic.bit_count) && (a.data.overflow_arithmetic.add_sub_mul == b.data.overflow_arithmetic.add_sub_mul) && (a.data.overflow_arithmetic.is_signed == b.data.overflow_arithmetic.is_signed); + case ZigLLVMFnIdMemcpy: + return (a.data.memcpy.dest_align == b.data.memcpy.dest_align) && + (a.data.memcpy.src_align == b.data.memcpy.src_align); + case ZigLLVMFnIdMemset: + return (a.data.memset.dest_align == b.data.memset.dest_align); } zig_unreachable(); } diff --git a/src/codegen.cpp b/src/codegen.cpp index a44091bdbf..9467ce41bf 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -324,8 +324,12 @@ static void addLLVMFnAttrInt(LLVMValueRef fn_val, const char *attr_name, uint64_ return addLLVMAttrInt(fn_val, -1, attr_name, attr_val); } -static void addLLVMArgAttr(LLVMValueRef arg_val, unsigned param_index, const char *attr_name) { - return addLLVMAttr(arg_val, param_index + 1, attr_name); +static void addLLVMArgAttr(LLVMValueRef fn_val, unsigned param_index, const char *attr_name) { + return addLLVMAttr(fn_val, param_index + 1, attr_name); +} + +static void addLLVMArgAttrInt(LLVMValueRef fn_val, unsigned param_index, const char *attr_name, uint64_t attr_val) { + return addLLVMAttrInt(fn_val, param_index + 1, attr_name, attr_val); } static void addLLVMCallsiteAttr(LLVMValueRef call_instr, unsigned param_index, const char *attr_name) { @@ -912,23 +916,31 @@ static void gen_safety_crash(CodeGen *g, PanicMsgId msg_id) { gen_panic(g, get_panic_msg_ptr_val(g, msg_id), nullptr); } -static LLVMValueRef get_memcpy_fn_val(CodeGen *g) { - if (g->memcpy_fn_val) - return g->memcpy_fn_val; +static LLVMValueRef get_memcpy_fn_val(CodeGen *g, uint32_t dest_align, uint32_t src_align) { + ZigLLVMFnKey key = {}; + key.id = ZigLLVMFnIdMemcpy; + key.data.memcpy.dest_align = dest_align; + key.data.memcpy.src_align = src_align; + + auto existing_entry = g->llvm_fn_table.maybe_get(key); + if (existing_entry) + return existing_entry->value; LLVMTypeRef param_types[] = { LLVMPointerType(LLVMInt8Type(), 0), LLVMPointerType(LLVMInt8Type(), 0), LLVMIntType(g->pointer_size_bytes * 8), - LLVMInt32Type(), LLVMInt1Type(), }; - LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 5, false); + LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 4, false); Buf *name = buf_sprintf("llvm.memcpy.p0i8.p0i8.i%d", g->pointer_size_bytes * 8); - g->memcpy_fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); - assert(LLVMGetIntrinsicID(g->memcpy_fn_val)); + LLVMValueRef fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); + addLLVMArgAttrInt(fn_val, 0, "align", dest_align); + addLLVMArgAttrInt(fn_val, 1, "align", src_align); + assert(LLVMGetIntrinsicID(fn_val)); - return g->memcpy_fn_val; + g->llvm_fn_table.put(key, fn_val); + return fn_val; } static LLVMValueRef get_coro_destroy_fn_val(CodeGen *g) { @@ -1293,15 +1305,15 @@ static LLVMValueRef get_safety_crash_err_fn(CodeGen *g) { LLVMValueRef len_field_ptr = LLVMBuildStructGEP(g->builder, err_name_val, slice_len_index, ""); LLVMValueRef err_name_len = gen_load_untyped(g, len_field_ptr, 0, false, ""); + LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, u8_align_bytes, u8_align_bytes); LLVMValueRef params[] = { offset_buf_ptr, // dest pointer err_name_ptr, // source pointer err_name_len, // size bytes - LLVMConstInt(LLVMInt32Type(), u8_align_bytes, false), // align bytes LLVMConstNull(LLVMInt1Type()), // is volatile }; - LLVMBuildCall(g->builder, get_memcpy_fn_val(g), params, 5, ""); + LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); LLVMValueRef const_prefix_len = LLVMConstInt(LLVMTypeOf(err_name_len), strlen(unwrap_err_msg_text), false); LLVMValueRef full_buf_len = LLVMBuildNUWAdd(g->builder, const_prefix_len, err_name_len, ""); @@ -1535,15 +1547,16 @@ static LLVMValueRef gen_assign_raw(CodeGen *g, LLVMValueRef ptr, TypeTableEntry LLVMValueRef volatile_bit = ptr_type->data.pointer.is_volatile ? LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); + LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, align_bytes, align_bytes); + LLVMValueRef params[] = { dest_ptr, // dest pointer src_ptr, // source pointer LLVMConstInt(usize->type_ref, size_bytes, false), - LLVMConstInt(LLVMInt32Type(), align_bytes, false), volatile_bit, }; - LLVMBuildCall(g->builder, get_memcpy_fn_val(g), params, 5, ""); + LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); return nullptr; } @@ -2483,23 +2496,29 @@ static LLVMValueRef ir_render_bool_not(CodeGen *g, IrExecutable *executable, IrI return LLVMBuildICmp(g->builder, LLVMIntEQ, value, zero, ""); } -static LLVMValueRef get_memset_fn_val(CodeGen *g) { - if (g->memset_fn_val) - return g->memset_fn_val; +static LLVMValueRef get_memset_fn_val(CodeGen *g, uint32_t dest_align) { + ZigLLVMFnKey key = {}; + key.id = ZigLLVMFnIdMemset; + key.data.memset.dest_align = dest_align; + + auto existing_entry = g->llvm_fn_table.maybe_get(key); + if (existing_entry) + return existing_entry->value; LLVMTypeRef param_types[] = { LLVMPointerType(LLVMInt8Type(), 0), LLVMInt8Type(), LLVMIntType(g->pointer_size_bytes * 8), - LLVMInt32Type(), LLVMInt1Type(), }; - LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 5, false); + LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 4, false); Buf *name = buf_sprintf("llvm.memset.p0i8.i%d", g->pointer_size_bytes * 8); - g->memset_fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); - assert(LLVMGetIntrinsicID(g->memset_fn_val)); + LLVMValueRef fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); + addLLVMArgAttrInt(fn_val, 0, "align", dest_align); + assert(LLVMGetIntrinsicID(fn_val)); - return g->memset_fn_val; + g->llvm_fn_table.put(key, fn_val); + return fn_val; } static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, @@ -2535,21 +2554,21 @@ static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, assert(var->align_bytes > 0); + LLVMValueRef memset_fn_val = get_memset_fn_val(g, var->align_bytes); + // memset uninitialized memory to 0xa LLVMTypeRef ptr_u8 = LLVMPointerType(LLVMInt8Type(), 0); LLVMValueRef fill_char = LLVMConstInt(LLVMInt8Type(), 0xaa, false); LLVMValueRef dest_ptr = LLVMBuildBitCast(g->builder, var->value_ref, ptr_u8, ""); LLVMValueRef byte_count = LLVMConstInt(usize->type_ref, size_bytes, false); - LLVMValueRef align_in_bytes = LLVMConstInt(LLVMInt32Type(), var->align_bytes, false); LLVMValueRef params[] = { dest_ptr, fill_char, byte_count, - align_in_bytes, LLVMConstNull(LLVMInt1Type()), // is volatile }; - LLVMBuildCall(g->builder, get_memset_fn_val(g), params, 5, ""); + LLVMBuildCall(g->builder, memset_fn_val, params, 4, ""); } } @@ -3399,17 +3418,16 @@ static LLVMValueRef ir_render_memset(CodeGen *g, IrExecutable *executable, IrIns LLVMValueRef is_volatile = ptr_type->data.pointer.is_volatile ? LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); - LLVMValueRef align_val = LLVMConstInt(LLVMInt32Type(), ptr_type->data.pointer.alignment, false); + LLVMValueRef memset_fn_val = get_memset_fn_val(g, ptr_type->data.pointer.alignment); LLVMValueRef params[] = { dest_ptr_casted, char_val, len_val, - align_val, is_volatile, }; - LLVMBuildCall(g->builder, get_memset_fn_val(g), params, 5, ""); + LLVMBuildCall(g->builder, memset_fn_val, params, 4, ""); return nullptr; } @@ -3432,18 +3450,17 @@ static LLVMValueRef ir_render_memcpy(CodeGen *g, IrExecutable *executable, IrIns LLVMValueRef is_volatile = (dest_ptr_type->data.pointer.is_volatile || src_ptr_type->data.pointer.is_volatile) ? LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); - uint32_t min_align_bytes = min(src_ptr_type->data.pointer.alignment, dest_ptr_type->data.pointer.alignment); - LLVMValueRef align_val = LLVMConstInt(LLVMInt32Type(), min_align_bytes, false); + LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, dest_ptr_type->data.pointer.alignment, + src_ptr_type->data.pointer.alignment); LLVMValueRef params[] = { dest_ptr_casted, src_ptr_casted, len_val, - align_val, is_volatile, }; - LLVMBuildCall(g->builder, get_memcpy_fn_val(g), params, 5, ""); + LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); return nullptr; } From c541ac240c3ad17dda964f9de085a5e8f5472c7a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 22 Mar 2018 20:59:26 -0400 Subject: [PATCH 03/27] use the llvm API for creating memcpy and memset instructions --- src/all_types.hpp | 9 ---- src/analyze.cpp | 9 ---- src/codegen.cpp | 124 ++++------------------------------------------ src/zig_llvm.cpp | 14 ++++++ src/zig_llvm.h | 6 +++ 5 files changed, 31 insertions(+), 131 deletions(-) diff --git a/src/all_types.hpp b/src/all_types.hpp index f1d91deddb..1c0c3a0e95 100644 --- a/src/all_types.hpp +++ b/src/all_types.hpp @@ -1415,8 +1415,6 @@ enum ZigLLVMFnId { ZigLLVMFnIdOverflowArithmetic, ZigLLVMFnIdFloor, ZigLLVMFnIdCeil, - ZigLLVMFnIdMemcpy, - ZigLLVMFnIdMemset, }; enum AddSubMul { @@ -1443,13 +1441,6 @@ struct ZigLLVMFnKey { uint32_t bit_count; bool is_signed; } overflow_arithmetic; - struct { - uint32_t dest_align; - uint32_t src_align; - } memcpy; - struct { - uint32_t dest_align; - } memset; } data; }; diff --git a/src/analyze.cpp b/src/analyze.cpp index eaace123ef..395df229cd 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -5681,10 +5681,6 @@ uint32_t zig_llvm_fn_key_hash(ZigLLVMFnKey x) { return ((uint32_t)(x.data.overflow_arithmetic.bit_count) * 87135777) + ((uint32_t)(x.data.overflow_arithmetic.add_sub_mul) * 31640542) + ((uint32_t)(x.data.overflow_arithmetic.is_signed) ? 1062315172 : 314955820); - case ZigLLVMFnIdMemcpy: - return x.data.memcpy.dest_align * 2325524557 + x.data.memcpy.src_align * 519976394; - case ZigLLVMFnIdMemset: - return x.data.memset.dest_align * 388171592; } zig_unreachable(); } @@ -5704,11 +5700,6 @@ bool zig_llvm_fn_key_eql(ZigLLVMFnKey a, ZigLLVMFnKey b) { return (a.data.overflow_arithmetic.bit_count == b.data.overflow_arithmetic.bit_count) && (a.data.overflow_arithmetic.add_sub_mul == b.data.overflow_arithmetic.add_sub_mul) && (a.data.overflow_arithmetic.is_signed == b.data.overflow_arithmetic.is_signed); - case ZigLLVMFnIdMemcpy: - return (a.data.memcpy.dest_align == b.data.memcpy.dest_align) && - (a.data.memcpy.src_align == b.data.memcpy.src_align); - case ZigLLVMFnIdMemset: - return (a.data.memset.dest_align == b.data.memset.dest_align); } zig_unreachable(); } diff --git a/src/codegen.cpp b/src/codegen.cpp index 9467ce41bf..37f15f43a7 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -328,9 +328,9 @@ static void addLLVMArgAttr(LLVMValueRef fn_val, unsigned param_index, const char return addLLVMAttr(fn_val, param_index + 1, attr_name); } -static void addLLVMArgAttrInt(LLVMValueRef fn_val, unsigned param_index, const char *attr_name, uint64_t attr_val) { - return addLLVMAttrInt(fn_val, param_index + 1, attr_name, attr_val); -} +//static void addLLVMArgAttrInt(LLVMValueRef fn_val, unsigned param_index, const char *attr_name, uint64_t attr_val) { +// return addLLVMAttrInt(fn_val, param_index + 1, attr_name, attr_val); +//} static void addLLVMCallsiteAttr(LLVMValueRef call_instr, unsigned param_index, const char *attr_name) { unsigned kind_id = LLVMGetEnumAttributeKindForName(attr_name, strlen(attr_name)); @@ -916,33 +916,6 @@ static void gen_safety_crash(CodeGen *g, PanicMsgId msg_id) { gen_panic(g, get_panic_msg_ptr_val(g, msg_id), nullptr); } -static LLVMValueRef get_memcpy_fn_val(CodeGen *g, uint32_t dest_align, uint32_t src_align) { - ZigLLVMFnKey key = {}; - key.id = ZigLLVMFnIdMemcpy; - key.data.memcpy.dest_align = dest_align; - key.data.memcpy.src_align = src_align; - - auto existing_entry = g->llvm_fn_table.maybe_get(key); - if (existing_entry) - return existing_entry->value; - - LLVMTypeRef param_types[] = { - LLVMPointerType(LLVMInt8Type(), 0), - LLVMPointerType(LLVMInt8Type(), 0), - LLVMIntType(g->pointer_size_bytes * 8), - LLVMInt1Type(), - }; - LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 4, false); - Buf *name = buf_sprintf("llvm.memcpy.p0i8.p0i8.i%d", g->pointer_size_bytes * 8); - LLVMValueRef fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); - addLLVMArgAttrInt(fn_val, 0, "align", dest_align); - addLLVMArgAttrInt(fn_val, 1, "align", src_align); - assert(LLVMGetIntrinsicID(fn_val)); - - g->llvm_fn_table.put(key, fn_val); - return fn_val; -} - static LLVMValueRef get_coro_destroy_fn_val(CodeGen *g) { if (g->coro_destroy_fn_val) return g->coro_destroy_fn_val; @@ -1305,15 +1278,7 @@ static LLVMValueRef get_safety_crash_err_fn(CodeGen *g) { LLVMValueRef len_field_ptr = LLVMBuildStructGEP(g->builder, err_name_val, slice_len_index, ""); LLVMValueRef err_name_len = gen_load_untyped(g, len_field_ptr, 0, false, ""); - LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, u8_align_bytes, u8_align_bytes); - LLVMValueRef params[] = { - offset_buf_ptr, // dest pointer - err_name_ptr, // source pointer - err_name_len, // size bytes - LLVMConstNull(LLVMInt1Type()), // is volatile - }; - - LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); + ZigLLVMBuildMemCpy(g->builder, offset_buf_ptr, u8_align_bytes, err_name_ptr, u8_align_bytes, err_name_len, false); LLVMValueRef const_prefix_len = LLVMConstInt(LLVMTypeOf(err_name_len), strlen(unwrap_err_msg_text), false); LLVMValueRef full_buf_len = LLVMBuildNUWAdd(g->builder, const_prefix_len, err_name_len, ""); @@ -1544,19 +1509,8 @@ static LLVMValueRef gen_assign_raw(CodeGen *g, LLVMValueRef ptr, TypeTableEntry assert(size_bytes > 0); assert(align_bytes > 0); - LLVMValueRef volatile_bit = ptr_type->data.pointer.is_volatile ? - LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); - - LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, align_bytes, align_bytes); - - LLVMValueRef params[] = { - dest_ptr, // dest pointer - src_ptr, // source pointer - LLVMConstInt(usize->type_ref, size_bytes, false), - volatile_bit, - }; - - LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); + ZigLLVMBuildMemCpy(g->builder, dest_ptr, align_bytes, src_ptr, align_bytes, LLVMConstInt(usize->type_ref, size_bytes, false), + ptr_type->data.pointer.is_volatile); return nullptr; } @@ -2496,31 +2450,6 @@ static LLVMValueRef ir_render_bool_not(CodeGen *g, IrExecutable *executable, IrI return LLVMBuildICmp(g->builder, LLVMIntEQ, value, zero, ""); } -static LLVMValueRef get_memset_fn_val(CodeGen *g, uint32_t dest_align) { - ZigLLVMFnKey key = {}; - key.id = ZigLLVMFnIdMemset; - key.data.memset.dest_align = dest_align; - - auto existing_entry = g->llvm_fn_table.maybe_get(key); - if (existing_entry) - return existing_entry->value; - - LLVMTypeRef param_types[] = { - LLVMPointerType(LLVMInt8Type(), 0), - LLVMInt8Type(), - LLVMIntType(g->pointer_size_bytes * 8), - LLVMInt1Type(), - }; - LLVMTypeRef fn_type = LLVMFunctionType(LLVMVoidType(), param_types, 4, false); - Buf *name = buf_sprintf("llvm.memset.p0i8.i%d", g->pointer_size_bytes * 8); - LLVMValueRef fn_val = LLVMAddFunction(g->module, buf_ptr(name), fn_type); - addLLVMArgAttrInt(fn_val, 0, "align", dest_align); - assert(LLVMGetIntrinsicID(fn_val)); - - g->llvm_fn_table.put(key, fn_val); - return fn_val; -} - static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, IrInstructionDeclVar *decl_var_instruction) { @@ -2554,21 +2483,12 @@ static LLVMValueRef ir_render_decl_var(CodeGen *g, IrExecutable *executable, assert(var->align_bytes > 0); - LLVMValueRef memset_fn_val = get_memset_fn_val(g, var->align_bytes); - // memset uninitialized memory to 0xa LLVMTypeRef ptr_u8 = LLVMPointerType(LLVMInt8Type(), 0); LLVMValueRef fill_char = LLVMConstInt(LLVMInt8Type(), 0xaa, false); LLVMValueRef dest_ptr = LLVMBuildBitCast(g->builder, var->value_ref, ptr_u8, ""); LLVMValueRef byte_count = LLVMConstInt(usize->type_ref, size_bytes, false); - LLVMValueRef params[] = { - dest_ptr, - fill_char, - byte_count, - LLVMConstNull(LLVMInt1Type()), // is volatile - }; - - LLVMBuildCall(g->builder, memset_fn_val, params, 4, ""); + ZigLLVMBuildMemSet(g->builder, dest_ptr, fill_char, byte_count, var->align_bytes, false); } } @@ -3415,19 +3335,7 @@ static LLVMValueRef ir_render_memset(CodeGen *g, IrExecutable *executable, IrIns TypeTableEntry *ptr_type = instruction->dest_ptr->value.type; assert(ptr_type->id == TypeTableEntryIdPointer); - LLVMValueRef is_volatile = ptr_type->data.pointer.is_volatile ? - LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); - - LLVMValueRef memset_fn_val = get_memset_fn_val(g, ptr_type->data.pointer.alignment); - - LLVMValueRef params[] = { - dest_ptr_casted, - char_val, - len_val, - is_volatile, - }; - - LLVMBuildCall(g->builder, memset_fn_val, params, 4, ""); + ZigLLVMBuildMemSet(g->builder, dest_ptr_casted, char_val, len_val, ptr_type->data.pointer.alignment, ptr_type->data.pointer.is_volatile); return nullptr; } @@ -3447,20 +3355,10 @@ static LLVMValueRef ir_render_memcpy(CodeGen *g, IrExecutable *executable, IrIns assert(dest_ptr_type->id == TypeTableEntryIdPointer); assert(src_ptr_type->id == TypeTableEntryIdPointer); - LLVMValueRef is_volatile = (dest_ptr_type->data.pointer.is_volatile || src_ptr_type->data.pointer.is_volatile) ? - LLVMConstAllOnes(LLVMInt1Type()) : LLVMConstNull(LLVMInt1Type()); + bool is_volatile = (dest_ptr_type->data.pointer.is_volatile || src_ptr_type->data.pointer.is_volatile); - LLVMValueRef memcpy_fn_val = get_memcpy_fn_val(g, dest_ptr_type->data.pointer.alignment, - src_ptr_type->data.pointer.alignment); - - LLVMValueRef params[] = { - dest_ptr_casted, - src_ptr_casted, - len_val, - is_volatile, - }; - - LLVMBuildCall(g->builder, memcpy_fn_val, params, 4, ""); + ZigLLVMBuildMemCpy(g->builder, dest_ptr_casted, dest_ptr_type->data.pointer.alignment, + src_ptr_casted, src_ptr_type->data.pointer.alignment, len_val, is_volatile); return nullptr; } diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index b4eef13cc1..3eb550dcc4 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -207,6 +207,20 @@ LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *A return wrap(unwrap(B)->Insert(call_inst)); } +LLVMValueRef ZigLLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, + LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size, bool isVolatile) +{ + CallInst *call_inst = unwrap(B)->CreateMemCpy(unwrap(Dst), DstAlign, unwrap(Src), SrcAlign, unwrap(Size), isVolatile); + return wrap(call_inst); +} + +LLVMValueRef ZigLLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Val, LLVMValueRef Size, + unsigned Align, bool isVolatile) +{ + CallInst *call_inst = unwrap(B)->CreateMemSet(unwrap(Ptr), unwrap(Val), unwrap(Size), Align, isVolatile); + return wrap(call_inst); +} + void ZigLLVMFnSetSubprogram(LLVMValueRef fn, ZigLLVMDISubprogram *subprogram) { assert( isa(unwrap(fn)) ); Function *unwrapped_function = reinterpret_cast(unwrap(fn)); diff --git a/src/zig_llvm.h b/src/zig_llvm.h index 3aea44d8c7..af92850fc4 100644 --- a/src/zig_llvm.h +++ b/src/zig_llvm.h @@ -64,6 +64,12 @@ enum ZigLLVM_FnInline { ZIG_EXTERN_C LLVMValueRef ZigLLVMBuildCall(LLVMBuilderRef B, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, unsigned CC, enum ZigLLVM_FnInline fn_inline, const char *Name); +ZIG_EXTERN_C LLVMValueRef ZigLLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, + LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size, bool isVolatile); + +ZIG_EXTERN_C LLVMValueRef ZigLLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Val, LLVMValueRef Size, + unsigned Align, bool isVolatile); + ZIG_EXTERN_C LLVMValueRef ZigLLVMBuildCmpXchg(LLVMBuilderRef builder, LLVMValueRef ptr, LLVMValueRef cmp, LLVMValueRef new_val, LLVMAtomicOrdering success_ordering, LLVMAtomicOrdering failure_ordering); From 5800faa31859afb83d556a67747251e20c3e4b48 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 4 Apr 2018 18:27:52 -0400 Subject: [PATCH 04/27] update to latest llvm API --- src/target.cpp | 2 +- src/zig_llvm.cpp | 1 + src/zig_llvm.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target.cpp b/src/target.cpp index a8a58013ff..5dcf98c3a2 100644 --- a/src/target.cpp +++ b/src/target.cpp @@ -162,6 +162,7 @@ static const Os os_list[] = { OsZen, }; +// Coordinate with zig_llvm.h static const ZigLLVM_EnvironmentType environ_list[] = { ZigLLVM_UnknownEnvironment, @@ -182,7 +183,6 @@ static const ZigLLVM_EnvironmentType environ_list[] = { ZigLLVM_Itanium, ZigLLVM_Cygnus, ZigLLVM_CoreCLR, - ZigLLVM_OpenCL, ZigLLVM_Simulator, }; diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 3eb550dcc4..ba915bf064 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include diff --git a/src/zig_llvm.h b/src/zig_llvm.h index af92850fc4..a63524281a 100644 --- a/src/zig_llvm.h +++ b/src/zig_llvm.h @@ -376,7 +376,6 @@ enum ZigLLVM_EnvironmentType { ZigLLVM_Itanium, ZigLLVM_Cygnus, ZigLLVM_CoreCLR, - ZigLLVM_OpenCL, ZigLLVM_Simulator, ZigLLVM_LastEnvironmentType = ZigLLVM_Simulator From 588116cacc77535137262832f1b2aa464e7a1131 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 4 Apr 2018 18:29:31 -0400 Subject: [PATCH 05/27] travis: update docker image tag for llvm7 --- ci/travis_linux_script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/travis_linux_script b/ci/travis_linux_script index 93b27f74c1..8c090b237c 100755 --- a/ci/travis_linux_script +++ b/ci/travis_linux_script @@ -14,7 +14,7 @@ make -j2 install if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then mkdir $TRAVIS_BUILD_DIR/artifacts - docker run -it --mount type=bind,source="$TRAVIS_BUILD_DIR/artifacts",target=/z ziglang/static-base:llvm6-1 -j2 $TRAVIS_COMMIT + docker run -it --mount type=bind,source="$TRAVIS_BUILD_DIR/artifacts",target=/z ziglang/static-base:llvm7-1 -j2 $TRAVIS_COMMIT echo "access_key = $AWS_ACCESS_KEY_ID" >> ~/.s3cfg echo "secret_key = $AWS_SECRET_ACCESS_KEY" >> ~/.s3cfg s3cmd put -P $TRAVIS_BUILD_DIR/artifacts/* s3://ziglang.org/builds/ From 4d0b660f4bcde2544f3096225ec28f7940162c30 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 26 Apr 2018 11:43:18 -0400 Subject: [PATCH 06/27] translate-c: add missing decl type from LLVM 7 --- src/translate_c.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 965a8963bd..31bc9d975f 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -2245,6 +2245,9 @@ static int trans_local_declaration(Context *c, TransScope *scope, const DeclStmt case Decl::TranslationUnit: emit_warning(c, stmt->getLocStart(), "TODO handle decl kind TranslationUnit"); return ErrorUnexpected; + case Decl::Concept: + emit_warning(c, stmt->getLocStart(), "TODO handle decl kind Concept"); + return ErrorUnexpected; } zig_unreachable(); } From 6309121f70ff88cf64267f2bf1d9e452090ca277 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 2 May 2018 09:46:29 -0400 Subject: [PATCH 07/27] translate-c: update to llvm7 --- src/translate_c.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 31bc9d975f..216674e576 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -731,6 +731,7 @@ static AstNode *trans_type(Context *c, const Type *ty, const SourceLocation &sou case BuiltinType::Char_U: case BuiltinType::UChar: case BuiltinType::Char_S: + case BuiltinType::Char8: return trans_create_node_symbol_str(c, "u8"); case BuiltinType::SChar: return trans_create_node_symbol_str(c, "i8"); @@ -2245,9 +2246,6 @@ static int trans_local_declaration(Context *c, TransScope *scope, const DeclStmt case Decl::TranslationUnit: emit_warning(c, stmt->getLocStart(), "TODO handle decl kind TranslationUnit"); return ErrorUnexpected; - case Decl::Concept: - emit_warning(c, stmt->getLocStart(), "TODO handle decl kind Concept"); - return ErrorUnexpected; } zig_unreachable(); } @@ -2336,6 +2334,7 @@ static AstNode *trans_bool_expr(Context *c, ResultUsed result_used, TransScope * case BuiltinType::Float128: case BuiltinType::LongDouble: case BuiltinType::WChar_U: + case BuiltinType::Char8: case BuiltinType::Char16: case BuiltinType::Char32: case BuiltinType::WChar_S: From 8efb3f5e197edf2debebf0557c74fef2541cc117 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 26 May 2018 12:18:13 -0400 Subject: [PATCH 08/27] update to latest LLVM API --- src/translate_c.cpp | 3 +-- src/zig_llvm.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index bfd683d9ee..ce0eda5d50 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -4658,7 +4658,6 @@ int parse_h_file(ImportTableEntry *import, ZigList *errors, const ch std::shared_ptr pch_container_ops = std::make_shared(); - bool skip_function_bodies = false; bool only_local_decls = true; bool capture_diagnostics = true; bool user_files_are_volatile = true; @@ -4671,7 +4670,7 @@ int parse_h_file(ImportTableEntry *import, ZigList *errors, const ch &clang_argv.at(0), &clang_argv.last(), pch_container_ops, diags, resources_path, only_local_decls, capture_diagnostics, None, true, 0, TU_Complete, - false, false, allow_pch_with_compiler_errors, skip_function_bodies, + false, false, allow_pch_with_compiler_errors, SkipFunctionBodiesScope::None, single_file_parse, user_files_are_volatile, for_serialization, None, &err_unit, nullptr)); diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 22fd409859..8cd3e6fb78 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -162,7 +162,7 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM abort(); } - if (target_machine->addPassesToEmitFile(MPM, dest, ft)) { + if (target_machine->addPassesToEmitFile(MPM, dest, nullptr, ft)) { *error_message = strdup("TargetMachine can't emit a file of this type"); return true; } From 7fa97b752e167de6df9a8a76999456d2c199b345 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 26 May 2018 14:57:53 -0400 Subject: [PATCH 09/27] add strict float mode to some math functions fixes a test failure for acosh32 --- std/math/acosh.zig | 4 ++++ std/math/isnan.zig | 4 ++-- std/math/log1p.zig | 5 +++++ std/special/builtin.zig | 2 ++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/std/math/acosh.zig b/std/math/acosh.zig index 9be323e1f6..705b762e3c 100644 --- a/std/math/acosh.zig +++ b/std/math/acosh.zig @@ -19,6 +19,8 @@ pub fn acosh(x: var) @typeOf(x) { // acosh(x) = log(x + sqrt(x * x - 1)) fn acosh32(x: f32) f32 { + @setFloatMode(this, builtin.FloatMode.Strict); + const u = @bitCast(u32, x); const i = u & 0x7FFFFFFF; @@ -37,6 +39,8 @@ fn acosh32(x: f32) f32 { } fn acosh64(x: f64) f64 { + @setFloatMode(this, builtin.FloatMode.Strict); + const u = @bitCast(u64, x); const e = (u >> 52) & 0x7FF; diff --git a/std/math/isnan.zig b/std/math/isnan.zig index 67971e3d0c..ca36df5106 100644 --- a/std/math/isnan.zig +++ b/std/math/isnan.zig @@ -19,8 +19,8 @@ pub fn isNan(x: var) bool { } } -// Note: A signalling nan is identical to a standard right now by may have a different bit -// representation in the future when required. +/// Note: A signalling nan is identical to a standard nan right now but may have a different bit +/// representation in the future when required. pub fn isSignalNan(x: var) bool { return isNan(x); } diff --git a/std/math/log1p.zig b/std/math/log1p.zig index 4616a2f2ba..0a43e121ab 100644 --- a/std/math/log1p.zig +++ b/std/math/log1p.zig @@ -6,6 +6,7 @@ // - log1p(x) = nan if x < -1 // - log1p(nan) = nan +const builtin = @import("builtin"); const std = @import("../index.zig"); const math = std.math; const assert = std.debug.assert; @@ -20,6 +21,8 @@ pub fn log1p(x: var) @typeOf(x) { } fn log1p_32(x: f32) f32 { + @setFloatMode(this, builtin.FloatMode.Strict); + const ln2_hi = 6.9313812256e-01; const ln2_lo = 9.0580006145e-06; const Lg1: f32 = 0xaaaaaa.0p-24; @@ -96,6 +99,8 @@ fn log1p_32(x: f32) f32 { } fn log1p_64(x: f64) f64 { + @setFloatMode(this, builtin.FloatMode.Strict); + const ln2_hi: f64 = 6.93147180369123816490e-01; const ln2_lo: f64 = 1.90821492927058770002e-10; const Lg1: f64 = 6.666666666666735130e-01; diff --git a/std/special/builtin.zig b/std/special/builtin.zig index a5126bc4f3..e49ba54089 100644 --- a/std/special/builtin.zig +++ b/std/special/builtin.zig @@ -201,6 +201,8 @@ fn isNan(comptime T: type, bits: T) bool { // behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are // potentially some edge cases remaining that are not handled in the same way. export fn sqrt(x: f64) f64 { + @setFloatMode(this, builtin.FloatMode.Strict); + const tiny: f64 = 1.0e-300; const sign: u32 = 0x80000000; const u = @bitCast(u64, x); From ef7f69d14a017c6c2065e4a376bb8e1f05ace04b Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 5 Jun 2018 15:02:48 -0400 Subject: [PATCH 10/27] update to latest libclang --- src/translate_c.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index aea9b57958..6d641d2680 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -795,6 +795,12 @@ static AstNode *trans_type(Context *c, const Type *ty, const SourceLocation &sou case BuiltinType::UnknownAny: case BuiltinType::BuiltinFn: case BuiltinType::ARCUnbridgedCast: + case BuiltinType::ShortAccum: + case BuiltinType::Accum: + case BuiltinType::LongAccum: + case BuiltinType::UShortAccum: + case BuiltinType::UAccum: + case BuiltinType::ULongAccum: case BuiltinType::OCLImage1dRO: case BuiltinType::OCLImage1dArrayRO: @@ -2409,6 +2415,12 @@ static AstNode *trans_bool_expr(Context *c, ResultUsed result_used, TransScope * case BuiltinType::OCLClkEvent: case BuiltinType::OCLQueue: case BuiltinType::OCLReserveID: + case BuiltinType::ShortAccum: + case BuiltinType::Accum: + case BuiltinType::LongAccum: + case BuiltinType::UShortAccum: + case BuiltinType::UAccum: + case BuiltinType::ULongAccum: return res; } break; From 84a700f97240eb2d4c65554d9be43bae9fa6d4ae Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 14 Jun 2018 18:28:42 -0400 Subject: [PATCH 11/27] llvm7: find external liblldWasm and update for newest lld macho API --- cmake/Findlld.cmake | 1 + src/zig_llvm.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/Findlld.cmake b/cmake/Findlld.cmake index d3c9011205..1c4e9163a3 100644 --- a/cmake/Findlld.cmake +++ b/cmake/Findlld.cmake @@ -33,6 +33,7 @@ else() FIND_AND_ADD_LLD_LIB(lldELF) FIND_AND_ADD_LLD_LIB(lldCOFF) FIND_AND_ADD_LLD_LIB(lldMachO) + FIND_AND_ADD_LLD_LIB(lldWasm) FIND_AND_ADD_LLD_LIB(lldReaderWriter) FIND_AND_ADD_LLD_LIB(lldCore) FIND_AND_ADD_LLD_LIB(lldYAML) diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index b990ae2310..95d7d65d99 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -850,7 +850,7 @@ bool ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char **args, size_t arg_ return lld::elf::link(array_ref_args, false, diag); case ZigLLVM_MachO: - return lld::mach_o::link(array_ref_args, diag); + return lld::mach_o::link(array_ref_args, false, diag); case ZigLLVM_Wasm: return lld::wasm::link(array_ref_args, false, diag); From dd627372660209cc5a8ab294d5811b97cd1f56f5 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 19 Jun 2018 03:43:40 -0400 Subject: [PATCH 12/27] translate-c: add new libclang c types --- src/translate_c.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 482b5e3878..55333112c9 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -872,6 +872,24 @@ static AstNode *trans_type(Context *c, const Type *ty, const SourceLocation &sou case BuiltinType::OCLClkEvent: case BuiltinType::OCLQueue: case BuiltinType::OCLReserveID: + case BuiltinType::ShortFract: + case BuiltinType::Fract: + case BuiltinType::LongFract: + case BuiltinType::UShortFract: + case BuiltinType::UFract: + case BuiltinType::ULongFract: + case BuiltinType::SatShortAccum: + case BuiltinType::SatAccum: + case BuiltinType::SatLongAccum: + case BuiltinType::SatUShortAccum: + case BuiltinType::SatUAccum: + case BuiltinType::SatULongAccum: + case BuiltinType::SatShortFract: + case BuiltinType::SatFract: + case BuiltinType::SatLongFract: + case BuiltinType::SatUShortFract: + case BuiltinType::SatUFract: + case BuiltinType::SatULongFract: emit_warning(c, source_loc, "unsupported builtin type"); return nullptr; } @@ -2452,6 +2470,24 @@ static AstNode *trans_bool_expr(Context *c, ResultUsed result_used, TransScope * case BuiltinType::UShortAccum: case BuiltinType::UAccum: case BuiltinType::ULongAccum: + case BuiltinType::ShortFract: + case BuiltinType::Fract: + case BuiltinType::LongFract: + case BuiltinType::UShortFract: + case BuiltinType::UFract: + case BuiltinType::ULongFract: + case BuiltinType::SatShortAccum: + case BuiltinType::SatAccum: + case BuiltinType::SatLongAccum: + case BuiltinType::SatUShortAccum: + case BuiltinType::SatUAccum: + case BuiltinType::SatULongAccum: + case BuiltinType::SatShortFract: + case BuiltinType::SatFract: + case BuiltinType::SatLongFract: + case BuiltinType::SatUShortFract: + case BuiltinType::SatUFract: + case BuiltinType::SatULongFract: return res; } break; From 9665cfe027c70a84cb6351ea6ecb833a728736aa Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 3 Jul 2018 03:48:47 -0400 Subject: [PATCH 13/27] update for latest llvm --- src/translate_c.cpp | 3 +++ src/zig_llvm.cpp | 2 ++ src/zig_llvm.h | 1 + 3 files changed, 6 insertions(+) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 55333112c9..92ee306e90 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -3619,6 +3619,9 @@ static int trans_stmt_extra(Context *c, TransScope *scope, const Stmt *stmt, case Stmt::SEHTryStmtClass: emit_warning(c, stmt->getLocStart(), "TODO handle C SEHTryStmtClass"); return ErrorUnexpected; + case Stmt::FixedPointLiteralClass: + emit_warning(c, stmt->getLocStart(), "TODO handle C FixedPointLiteralClass"); + return ErrorUnexpected; } zig_unreachable(); } diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 95d7d65d99..f53e097577 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -707,6 +707,8 @@ const char *ZigLLVMGetSubArchTypeName(ZigLLVM_SubArchType sub_arch) { switch (sub_arch) { case ZigLLVM_NoSubArch: return "(none)"; + case ZigLLVM_ARMSubArch_v8_4a: + return "v8_4a"; case ZigLLVM_ARMSubArch_v8_3a: return "v8_3a"; case ZigLLVM_ARMSubArch_v8_2a: diff --git a/src/zig_llvm.h b/src/zig_llvm.h index e26a081761..19e8095c3f 100644 --- a/src/zig_llvm.h +++ b/src/zig_llvm.h @@ -268,6 +268,7 @@ enum ZigLLVM_ArchType { enum ZigLLVM_SubArchType { ZigLLVM_NoSubArch, + ZigLLVM_ARMSubArch_v8_4a, ZigLLVM_ARMSubArch_v8_3a, ZigLLVM_ARMSubArch_v8_2a, ZigLLVM_ARMSubArch_v8_1a, From da3acacc14331a6be33445c3bfd204e2cccabddd Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 11 Jul 2018 00:46:48 -0400 Subject: [PATCH 14/27] update vendor list for newest llvm version --- src/zig_llvm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zig_llvm.h b/src/zig_llvm.h index 19e8095c3f..5e404183b7 100644 --- a/src/zig_llvm.h +++ b/src/zig_llvm.h @@ -313,8 +313,9 @@ enum ZigLLVM_VendorType { ZigLLVM_AMD, ZigLLVM_Mesa, ZigLLVM_SUSE, + ZigLLVM_OpenEmbedded, - ZigLLVM_LastVendorType = ZigLLVM_SUSE + ZigLLVM_LastVendorType = ZigLLVM_OpenEmbedded }; enum ZigLLVM_OSType { From 2255f275a0397ac44a5e8bc907643082fe304336 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 15 Jul 2018 00:03:33 -0400 Subject: [PATCH 15/27] update for latest clang API --- src/translate_c.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/translate_c.cpp b/src/translate_c.cpp index 92ee306e90..aad1aeb365 100644 --- a/src/translate_c.cpp +++ b/src/translate_c.cpp @@ -1134,6 +1134,7 @@ static AstNode *trans_type(Context *c, const Type *ty, const SourceLocation &sou case Type::ObjCTypeParam: case Type::DeducedTemplateSpecialization: case Type::DependentAddressSpace: + case Type::DependentVector: emit_warning(c, source_loc, "unsupported type: '%s'", ty->getTypeClassName()); return nullptr; } @@ -2573,6 +2574,7 @@ static AstNode *trans_bool_expr(Context *c, ResultUsed result_used, TransScope * case Type::ObjCTypeParam: case Type::DeducedTemplateSpecialization: case Type::DependentAddressSpace: + case Type::DependentVector: return res; } zig_unreachable(); From cfb29f18e476a3d814664a0944699927ce5bf190 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 4 Aug 2018 17:47:16 -0400 Subject: [PATCH 16/27] update embedded LLD to 7.0.0rc1 --- deps/lld-prebuilt/COFF/Options.inc | 54 +- deps/lld-prebuilt/DarwinLdOptions.inc | 5 + deps/lld-prebuilt/ELF/Options.inc | 460 ++-- deps/lld-prebuilt/MinGW/Options.inc | 12 + deps/lld-prebuilt/lld/Common/Version.inc | 6 +- deps/lld-prebuilt/wasm/Options.inc | 59 +- deps/lld/COFF/CMakeLists.txt | 1 - deps/lld/COFF/Chunks.cpp | 175 +- deps/lld/COFF/Chunks.h | 92 +- deps/lld/COFF/Config.h | 30 +- deps/lld/COFF/DLL.cpp | 2 +- deps/lld/COFF/DLL.h | 5 + deps/lld/COFF/Driver.cpp | 430 +++- deps/lld/COFF/Driver.h | 21 +- deps/lld/COFF/DriverUtils.cpp | 144 +- deps/lld/COFF/ICF.cpp | 96 +- deps/lld/COFF/{Strings.h => ICF.h} | 21 +- deps/lld/COFF/InputFiles.cpp | 92 +- deps/lld/COFF/InputFiles.h | 51 +- deps/lld/COFF/LTO.cpp | 72 +- deps/lld/COFF/LTO.h | 2 +- deps/lld/COFF/MapFile.cpp | 12 +- deps/lld/COFF/MarkLive.cpp | 7 +- deps/lld/COFF/MarkLive.h | 24 + deps/lld/COFF/MinGW.cpp | 2 +- deps/lld/COFF/Options.td | 30 +- deps/lld/COFF/PDB.cpp | 516 ++++- deps/lld/COFF/PDB.h | 4 + deps/lld/COFF/Strings.cpp | 35 - deps/lld/COFF/SymbolTable.cpp | 96 +- deps/lld/COFF/SymbolTable.h | 6 +- deps/lld/COFF/Symbols.cpp | 8 +- deps/lld/COFF/Symbols.h | 11 +- deps/lld/COFF/Writer.cpp | 829 +++++--- deps/lld/COFF/Writer.h | 16 +- deps/lld/Common/Args.cpp | 18 +- deps/lld/Common/CMakeLists.txt | 1 + deps/lld/Common/ErrorHandler.cpp | 27 +- deps/lld/Common/Strings.cpp | 77 + deps/lld/Common/TargetOptionsCommandFlags.cpp | 8 +- deps/lld/Common/Timer.cpp | 80 + deps/lld/ELF/AArch64ErrataFix.cpp | 14 +- deps/lld/ELF/AArch64ErrataFix.h | 1 - deps/lld/ELF/Arch/AArch64.cpp | 57 +- deps/lld/ELF/Arch/AMDGPU.cpp | 2 + deps/lld/ELF/Arch/ARM.cpp | 41 +- deps/lld/ELF/Arch/Hexagon.cpp | 103 + deps/lld/ELF/Arch/Mips.cpp | 175 +- deps/lld/ELF/Arch/MipsArchTree.cpp | 37 +- deps/lld/ELF/Arch/PPC.cpp | 7 +- deps/lld/ELF/Arch/PPC64.cpp | 423 +++- deps/lld/ELF/Arch/SPARCV9.cpp | 12 +- deps/lld/ELF/Arch/X86.cpp | 64 +- deps/lld/ELF/Arch/X86_64.cpp | 110 +- deps/lld/ELF/CMakeLists.txt | 4 +- deps/lld/ELF/CallGraphSort.cpp | 249 +++ deps/lld/ELF/CallGraphSort.h | 23 + deps/lld/ELF/Config.h | 59 +- deps/lld/ELF/Driver.cpp | 617 +++++- deps/lld/ELF/Driver.h | 6 +- deps/lld/ELF/DriverUtils.cpp | 55 +- deps/lld/ELF/EhFrame.cpp | 8 +- deps/lld/ELF/Filesystem.cpp | 2 +- deps/lld/ELF/GdbIndex.cpp | 2 +- deps/lld/ELF/GdbIndex.h | 1 - deps/lld/ELF/ICF.cpp | 125 +- deps/lld/ELF/ICF.h | 4 +- deps/lld/ELF/InputFiles.cpp | 670 +++--- deps/lld/ELF/InputFiles.h | 83 +- deps/lld/ELF/InputSection.cpp | 482 +++-- deps/lld/ELF/InputSection.h | 65 +- deps/lld/ELF/LTO.cpp | 218 +- deps/lld/ELF/LTO.h | 6 +- deps/lld/ELF/LinkerScript.cpp | 373 ++-- deps/lld/ELF/LinkerScript.h | 53 +- deps/lld/ELF/MapFile.cpp | 213 +- deps/lld/ELF/MapFile.h | 1 + deps/lld/ELF/MarkLive.cpp | 47 +- deps/lld/ELF/MarkLive.h | 21 + deps/lld/ELF/Options.td | 524 +++-- deps/lld/ELF/OutputSections.cpp | 81 +- deps/lld/ELF/OutputSections.h | 14 +- deps/lld/ELF/Relocations.cpp | 826 ++++---- deps/lld/ELF/Relocations.h | 21 +- deps/lld/ELF/ScriptLexer.cpp | 10 +- deps/lld/ELF/ScriptParser.cpp | 291 ++- deps/lld/ELF/Strings.cpp | 62 - deps/lld/ELF/Strings.h | 75 - deps/lld/ELF/SymbolTable.cpp | 295 +-- deps/lld/ELF/SymbolTable.h | 11 +- deps/lld/ELF/Symbols.cpp | 95 +- deps/lld/ELF/Symbols.h | 159 +- deps/lld/ELF/SyntheticSections.cpp | 1571 +++++++++----- deps/lld/ELF/SyntheticSections.h | 348 ++- deps/lld/ELF/Target.cpp | 28 +- deps/lld/ELF/Target.h | 113 +- deps/lld/ELF/Thunks.cpp | 390 ++-- deps/lld/ELF/Thunks.h | 20 +- deps/lld/ELF/Writer.cpp | 737 +++++-- deps/lld/ELF/Writer.h | 8 +- deps/lld/LICENSE.TXT | 2 +- deps/lld/MinGW/Driver.cpp | 15 +- deps/lld/MinGW/Options.td | 9 + deps/lld/cmake/modules/AddLLD.cmake | 2 +- deps/lld/docs/ReleaseNotes.rst | 86 +- deps/lld/docs/WebAssembly.rst | 2 +- deps/lld/docs/conf.py | 4 +- deps/lld/docs/index.rst | 2 +- deps/lld/docs/ld.lld.1 | 559 +++++ deps/lld/docs/windows_support.rst | 12 +- deps/lld/include/lld/Common/Driver.h | 2 +- deps/lld/include/lld/Common/ErrorHandler.h | 70 +- deps/lld/include/lld/Common/Strings.h | 26 + .../lld/Common/TargetOptionsCommandFlags.h | 1 + deps/lld/include/lld/Common/Timer.h | 59 + deps/lld/include/lld/Common/Version.h | 2 +- deps/lld/include/lld/Core/DefinedAtom.h | 44 +- deps/lld/include/lld/Core/File.h | 24 +- deps/lld/include/lld/Core/Instrumentation.h | 14 +- deps/lld/include/lld/Core/LinkingContext.h | 9 +- deps/lld/include/lld/Core/PassManager.h | 4 +- deps/lld/include/lld/Core/Reader.h | 6 +- deps/lld/include/lld/Core/Resolver.h | 6 +- deps/lld/include/lld/Core/Simple.h | 2 +- deps/lld/include/lld/Core/SymbolTable.h | 22 +- deps/lld/include/lld/Core/TODO.txt | 3 - deps/lld/include/lld/Core/Writer.h | 6 +- .../lld/ReaderWriter/MachOLinkingContext.h | 28 +- deps/lld/lib/Core/LinkingContext.cpp | 4 +- deps/lld/lib/Driver/CMakeLists.txt | 1 + deps/lld/lib/Driver/DarwinLdDriver.cpp | 312 ++- deps/lld/lib/Driver/DarwinLdOptions.td | 8 + deps/lld/lib/ReaderWriter/FileArchive.cpp | 6 +- .../ReaderWriter/MachO/ArchHandler_x86_64.cpp | 5 +- .../lld/lib/ReaderWriter/MachO/CMakeLists.txt | 1 + .../ReaderWriter/MachO/CompactUnwindPass.cpp | 43 +- .../lld/lib/ReaderWriter/MachO/LayoutPass.cpp | 31 +- .../MachO/MachOLinkingContext.cpp | 14 +- .../MachO/MachONormalizedFileToAtoms.cpp | 6 +- deps/lld/test/CMakeLists.txt | 12 +- deps/lld/test/COFF/Inputs/far-arm64-abs.s | 6 + deps/lld/test/COFF/Inputs/generic.yaml | 282 +++ .../Inputs/globals-dia-func-collision3.obj | Bin 0 -> 5392 bytes .../Inputs/globals-dia-vfunc-collision.obj | Bin 0 -> 8794 bytes .../Inputs/globals-dia-vfunc-collision2.obj | Bin 0 -> 3660 bytes .../COFF/Inputs/globals-dia-vfunc-simple.obj | Bin 0 -> 4575 bytes .../COFF/Inputs/guardcf-align-foobar.yaml | 51 + .../lld/test/COFF/Inputs/loadconfig-cfg-x64.s | 11 + deps/lld/test/COFF/Inputs/natvis-1.natvis | 1 + deps/lld/test/COFF/Inputs/natvis-2.natvis | 1 + deps/lld/test/COFF/Inputs/natvis-3.natvis | 1 + deps/lld/test/COFF/Inputs/order.yaml | 76 + deps/lld/test/COFF/Inputs/otherFunc.s | 7 + .../test/COFF/Inputs/pdb-file-statics-a.yaml | 1866 +++++++++++++++++ .../test/COFF/Inputs/pdb-file-statics-b.yaml | 1552 ++++++++++++++ deps/lld/test/COFF/Inputs/pdb-globals.yaml | 10 - deps/lld/test/COFF/Inputs/pdb-hashes-1.yaml | 224 +- .../COFF/Inputs/pdb-hashes-2-missing.yaml | 104 +- deps/lld/test/COFF/Inputs/pdb-hashes-2.yaml | 146 +- deps/lld/test/COFF/Inputs/pdb-scopes-a.yaml | 8 +- deps/lld/test/COFF/Inputs/pdb-scopes-b.yaml | 6 +- .../COFF/Inputs/pdb-type-server-simple-a.yaml | 2 +- .../COFF/Inputs/pdb-type-server-simple-b.yaml | 2 +- .../COFF/Inputs/pdb_lines_1_relative.yaml | 401 ++++ .../COFF/Inputs/pdb_lines_2_relative.yaml | 190 ++ deps/lld/test/COFF/arm64-branch-range.test | 16 + deps/lld/test/COFF/arm64-relocs-imports.test | 113 +- deps/lld/test/COFF/armnt-movt32t.test | 2 +- deps/lld/test/COFF/associative-comdat.s | 10 +- deps/lld/test/COFF/baserel.test | 16 +- deps/lld/test/COFF/combined-resources.test | 218 +- deps/lld/test/COFF/common-alignment.test | 20 +- deps/lld/test/COFF/common.test | 26 +- deps/lld/test/COFF/crt-chars.test | 32 + deps/lld/test/COFF/ctors_dtors_priority.s | 8 +- deps/lld/test/COFF/debug-reloc.s | 58 + deps/lld/test/COFF/def-export-stdcall.s | 39 +- deps/lld/test/COFF/default-alignment.test | 21 + deps/lld/test/COFF/delayimports-armnt.yaml | 34 +- deps/lld/test/COFF/delayimports.test | 18 +- deps/lld/test/COFF/delayimports32.test | 60 +- deps/lld/test/COFF/dll.test | 3 +- deps/lld/test/COFF/dllexport-mingw.s | 2 +- deps/lld/test/COFF/dllexport.s | 58 + deps/lld/test/COFF/driver.test | 11 + deps/lld/test/COFF/duplicate.test | 1 + deps/lld/test/COFF/entry-inference3.test | 35 + deps/lld/test/COFF/error-limit.test | 14 +- deps/lld/test/COFF/export-all.s | 2 +- deps/lld/test/COFF/export-armnt.yaml | 8 +- deps/lld/test/COFF/export.test | 4 + deps/lld/test/COFF/export32.test | 10 + deps/lld/test/COFF/filename-casing.s | 6 +- deps/lld/test/COFF/fixed.test | 24 + deps/lld/test/COFF/force.test | 6 +- deps/lld/test/COFF/gfids-corrupt.s | 84 + deps/lld/test/COFF/gfids-fallback.s | 97 + deps/lld/test/COFF/gfids-gc.s | 131 ++ deps/lld/test/COFF/gfids-icf.s | 88 + deps/lld/test/COFF/guard-longjmp.s | 104 + deps/lld/test/COFF/guardcf-align.s | 45 + deps/lld/test/COFF/guardcf-lto.ll | 40 + deps/lld/test/COFF/hello32.test | 28 +- deps/lld/test/COFF/icf-different-align.test | 13 +- deps/lld/test/COFF/icf-executable.s | 1 + deps/lld/test/COFF/icf-pdata.s | 98 + deps/lld/test/COFF/icf-simple.test | 5 + deps/lld/test/COFF/icf-vtables.s | 28 + deps/lld/test/COFF/icf-xdata.s | 23 +- deps/lld/test/COFF/implib-name.test | 1 + deps/lld/test/COFF/imports.test | 8 +- deps/lld/test/COFF/incremental.test | 100 + .../lld/test/COFF/invalid-section-number.test | 34 + deps/lld/test/COFF/largeaddressaware.test | 2 +- deps/lld/test/COFF/loadcfg.ll | 3 +- deps/lld/test/COFF/loadcfg.test | 2 +- deps/lld/test/COFF/loadcfg32.test | 2 +- deps/lld/test/COFF/lto-chkstk.ll | 1 + deps/lld/test/COFF/lto-comdat.ll | 16 +- deps/lld/test/COFF/lto-icf.ll | 27 + deps/lld/test/COFF/lto-lazy-reference.ll | 1 + deps/lld/test/COFF/lto-linker-opts.ll | 1 + deps/lld/test/COFF/lto-new-symbol.ll | 1 + deps/lld/test/COFF/lto-opt-level.ll | 1 + deps/lld/test/COFF/lto-parallel.ll | 5 +- deps/lld/test/COFF/lto-reloc-model.ll | 1 + deps/lld/test/COFF/lto.ll | 5 +- deps/lld/test/COFF/manifestinput-error.test | 2 +- deps/lld/test/COFF/manifestinput.test | 4 +- deps/lld/test/COFF/merge.test | 26 + deps/lld/test/COFF/nodefaultlib.test | 3 +- deps/lld/test/COFF/opt.test | 24 +- deps/lld/test/COFF/options.test | 14 + deps/lld/test/COFF/order-i386.test | 69 + deps/lld/test/COFF/order.test | 134 +- deps/lld/test/COFF/output-chars.test | 109 + deps/lld/test/COFF/pdata-arm64.yaml | 2 +- deps/lld/test/COFF/pdb-comdat.test | 10 +- deps/lld/test/COFF/pdb-diff.test | 215 -- deps/lld/test/COFF/pdb-exe-path-dots.test | 10 + deps/lld/test/COFF/pdb-file-static.test | 51 + deps/lld/test/COFF/pdb-global-gc.yaml | 1 + deps/lld/test/COFF/pdb-global-hashes.test | 2 +- .../COFF/pdb-globals-dia-func-collision3.test | 81 + .../COFF/pdb-globals-dia-vfunc-collision.test | 42 + .../pdb-globals-dia-vfunc-collision2.test | 25 + .../COFF/pdb-globals-dia-vfunc-simple.test | 26 + deps/lld/test/COFF/pdb-globals.test | 12 +- deps/lld/test/COFF/pdb-heapsite.yaml | 2 +- deps/lld/test/COFF/pdb-lib.s | 6 +- deps/lld/test/COFF/pdb-linker-module.test | 5 +- deps/lld/test/COFF/pdb-natvis.test | 26 + deps/lld/test/COFF/pdb-procid-remapping.test | 4 +- deps/lld/test/COFF/pdb-publics-import.test | 9 +- .../test/COFF/pdb-relative-source-lines.test | 45 + deps/lld/test/COFF/pdb-same-name.test | 4 +- deps/lld/test/COFF/pdb-scopes.test | 14 +- deps/lld/test/COFF/pdb-source-lines.test | 26 +- deps/lld/test/COFF/pdb-symbol-types.yaml | 4 +- deps/lld/test/COFF/pdb-thunk.yaml | 12 +- .../lld/test/COFF/pdb-type-server-simple.test | 6 +- deps/lld/test/COFF/pdb.test | 164 +- deps/lld/test/COFF/pending-comdat.s | 21 + deps/lld/test/COFF/reloc-arm.test | 16 +- deps/lld/test/COFF/reloc-discarded-dwarf.s | 1 + deps/lld/test/COFF/reloc-discarded-early.s | 1 + deps/lld/test/COFF/reloc-discarded-early2.s | 1 + deps/lld/test/COFF/reloc-discarded.s | 1 + deps/lld/test/COFF/reloc-x64.test | 1 + deps/lld/test/COFF/reloc-x86.test | 1 + deps/lld/test/COFF/resource.test | 14 +- deps/lld/test/COFF/rsds.test | 16 +- deps/lld/test/COFF/safeseh-md.s | 1 + deps/lld/test/COFF/safeseh-notable.s | 44 + deps/lld/test/COFF/safeseh.s | 19 +- deps/lld/test/COFF/secidx-absolute.s | 15 +- deps/lld/test/COFF/secrel-absolute.s | 1 + deps/lld/test/COFF/secrel-common.s | 31 +- deps/lld/test/COFF/section-order.test | 15 + deps/lld/test/COFF/section-size.s | 2 +- deps/lld/test/COFF/section.test | 4 + deps/lld/test/COFF/sort-debug.test | 15 +- deps/lld/test/COFF/string-tail-merge.s | 106 + deps/lld/test/COFF/symtab-gc.s | 27 + deps/lld/test/COFF/symtab.test | 18 +- deps/lld/test/COFF/thunk-replace.s | 15 + deps/lld/test/COFF/timestamp.test | 18 + deps/lld/test/COFF/undefined-symbol-cv.s | 62 + deps/lld/test/COFF/undefined-symbol.s | 30 + deps/lld/test/COFF/unwind.test | 42 +- deps/lld/test/COFF/weak-external.test | 2 + deps/lld/test/COFF/weak-external2.test | 1 + deps/lld/test/COFF/weak-external3.test | 2 + deps/lld/test/COFF/wholearchive.s | 10 +- deps/lld/test/ELF/Inputs/amdgpu-kernel-2.o | Bin 408 -> 0 bytes .../ELF/Inputs/arm-long-thunk-converge.lds | 4 + deps/lld/test/ELF/Inputs/arm-vfp-arg-base.s | 16 + deps/lld/test/ELF/Inputs/arm-vfp-arg-compat.s | 16 + .../test/ELF/Inputs/arm-vfp-arg-toolchain.s | 15 + deps/lld/test/ELF/Inputs/arm-vfp-arg-vfp.s | 15 + .../test/ELF/Inputs/comdat-discarded-reloc.s | 6 + deps/lld/test/ELF/Inputs/conflict-debug.s | 21 + deps/lld/test/ELF/Inputs/copy-rel-version.s | 11 + .../Inputs/copy-relocation-zero-abs-addr.s | 7 + .../Inputs/copy-relocation-zero-nonabs-addr.s | 7 + .../copy-relocation-zero-nonabs-addr.script | 3 + .../test/ELF/Inputs/eh-frame-pcrel-overflow.s | 25 + deps/lld/test/ELF/Inputs/exclude-libs.ll | 3 + deps/lld/test/ELF/Inputs/exclude-libs.s | 2 + deps/lld/test/ELF/Inputs/far-long-arm-abs.s | 13 + deps/lld/test/ELF/Inputs/gdb-index.s | 8 +- deps/lld/test/ELF/Inputs/hexagon.s | 6 + deps/lld/test/ELF/Inputs/hidden-shared-err.s | 2 + deps/lld/test/ELF/Inputs/hidden-shared-err2.s | 1 + deps/lld/test/ELF/Inputs/i386-pic-plt.s | 4 + deps/lld/test/ELF/Inputs/icf-absolute2.s | 3 + deps/lld/test/ELF/Inputs/icf-safe.s | 9 + deps/lld/test/ELF/Inputs/map-file2.s | 2 + deps/lld/test/ELF/Inputs/mips-64-got-load.s | 8 + deps/lld/test/ELF/Inputs/mips-mgot-1.s | 10 + deps/lld/test/ELF/Inputs/mips-mgot-2.s | 17 + .../test/ELF/Inputs/mips-micro-gp0-non-zero.o | Bin 0 -> 1344 bytes deps/lld/test/ELF/Inputs/mips-n32-rels.o | Bin 1092 -> 0 bytes .../test/ELF/Inputs/mips-n64-gp0-non-zero.o | Bin 0 -> 1128 bytes deps/lld/test/ELF/Inputs/multiple-cu.s | 24 + .../test/ELF/Inputs/ppc64-func-global-entry.s | 35 + .../test/ELF/Inputs/ppc64-func-local-entry.s | 16 + deps/lld/test/ELF/Inputs/ppc64-func.s | 14 + deps/lld/test/ELF/Inputs/ppc64-tls.s | 20 + deps/lld/test/ELF/Inputs/print-icf.s | 9 + .../test/ELF/Inputs/protected-data-access.s | 7 + .../ELF/Inputs/protected-function-access.s | 5 + deps/lld/test/ELF/Inputs/shared-ppc64.s | 21 +- .../Inputs/symbol-ordering-file-warnings1.s | 19 + .../Inputs/symbol-ordering-file-warnings2.s | 6 + deps/lld/test/ELF/Inputs/undef-bad-debug.s | 134 ++ deps/lld/test/ELF/Inputs/undef-debug.s | 21 + deps/lld/test/ELF/Inputs/undef-shared2.s | 2 + deps/lld/test/ELF/Inputs/versiondef.s | 9 + .../test/ELF/Inputs/weak-and-strong-undef.s | 1 - .../test/ELF/Inputs/x86-64-split-stack-main.s | 16 + .../Inputs/{ztext-text-notext.s => ztext.s} | 0 deps/lld/test/ELF/aarch64-call26-thunk.s | 2 +- deps/lld/test/ELF/aarch64-condb-reloc.s | 2 +- deps/lld/test/ELF/aarch64-copy.s | 4 +- .../ELF/aarch64-cortex-a53-843419-address.s | 3 +- .../test/ELF/aarch64-cortex-a53-843419-cli.s | 2 +- .../ELF/aarch64-cortex-a53-843419-nopatch.s | 2 +- .../ELF/aarch64-cortex-a53-843419-recognize.s | 205 +- .../ELF/aarch64-cortex-a53-843419-thunk.s | 3 +- deps/lld/test/ELF/aarch64-data-relocs.s | 2 +- deps/lld/test/ELF/aarch64-fpic-abs16.s | 4 +- .../test/ELF/aarch64-fpic-add_abs_lo12_nc.s | 4 +- .../lld/test/ELF/aarch64-fpic-adr_prel_lo21.s | 4 +- .../test/ELF/aarch64-fpic-adr_prel_pg_hi21.s | 4 +- .../ELF/aarch64-fpic-ldst32_abs_lo12_nc.s | 4 +- .../ELF/aarch64-fpic-ldst64_abs_lo12_nc.s | 4 +- .../test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s | 4 +- deps/lld/test/ELF/aarch64-fpic-prel16.s | 4 +- deps/lld/test/ELF/aarch64-fpic-prel32.s | 4 +- deps/lld/test/ELF/aarch64-fpic-prel64.s | 4 +- deps/lld/test/ELF/aarch64-gnu-ifunc-nosym.s | 2 +- deps/lld/test/ELF/aarch64-gnu-ifunc-plt.s | 2 +- deps/lld/test/ELF/aarch64-gnu-ifunc.s | 2 +- deps/lld/test/ELF/aarch64-hi21-error.s | 4 +- deps/lld/test/ELF/aarch64-jump26-thunk.s | 2 +- .../test/ELF/aarch64-ldprel-lo19-invalid.s | 2 +- deps/lld/test/ELF/aarch64-lo12-alignment.s | 2 +- deps/lld/test/ELF/aarch64-lo21-error.s | 4 +- deps/lld/test/ELF/aarch64-load-alignment.s | 2 +- deps/lld/test/ELF/aarch64-relocs.s | 2 +- deps/lld/test/ELF/aarch64-thunk-pi.s | 58 +- deps/lld/test/ELF/aarch64-thunk-script.s | 2 +- .../test/ELF/aarch64-thunk-section-location.s | 2 +- deps/lld/test/ELF/aarch64-tls-gdle.s | 2 +- deps/lld/test/ELF/aarch64-tls-ie.s | 2 +- deps/lld/test/ELF/aarch64-tls-iele.s | 2 +- deps/lld/test/ELF/aarch64-tls-le.s | 2 +- deps/lld/test/ELF/aarch64-tlsld-ldst.s | 85 + deps/lld/test/ELF/aarch64-tstbr14-reloc.s | 2 +- deps/lld/test/ELF/aarch64-undefined-weak.s | 2 +- deps/lld/test/ELF/abs-conflict.s | 2 +- deps/lld/test/ELF/allow-multiple-definition.s | 9 +- deps/lld/test/ELF/amdgpu-elf-flags-err.s | 9 +- deps/lld/test/ELF/amdgpu-elf-flags.s | 7 +- deps/lld/test/ELF/amdgpu-globals.s | 3 +- deps/lld/test/ELF/amdgpu-kernels.s | 3 +- deps/lld/test/ELF/amdgpu-relocs.s | 15 +- deps/lld/test/ELF/archive.s | 25 +- deps/lld/test/ELF/arm-attributes.s | 2 +- deps/lld/test/ELF/arm-bl-v6.s | 4 +- deps/lld/test/ELF/arm-blx-v4t.s | 4 +- deps/lld/test/ELF/arm-blx.s | 2 +- deps/lld/test/ELF/arm-branch-rangethunk.s | 53 +- .../ELF/arm-branch-undef-weak-plt-thunk.s | 2 +- deps/lld/test/ELF/arm-branch.s | 2 +- deps/lld/test/ELF/arm-copy.s | 6 +- deps/lld/test/ELF/arm-data-prel.s | 2 +- deps/lld/test/ELF/arm-data-relocs.s | 2 +- deps/lld/test/ELF/arm-eabi-version.s | 3 +- deps/lld/test/ELF/arm-execute-only.s | 40 + deps/lld/test/ELF/arm-exidx-canunwind.s | 2 +- deps/lld/test/ELF/arm-exidx-dedup.s | 2 +- deps/lld/test/ELF/arm-exidx-discard.s | 14 + deps/lld/test/ELF/arm-exidx-gc.s | 2 +- deps/lld/test/ELF/arm-exidx-order.s | 38 +- deps/lld/test/ELF/arm-exidx-output.s | 2 +- deps/lld/test/ELF/arm-exidx-relocatable.s | 2 +- .../ELF/arm-exidx-sentinel-norelocatable.s | 2 +- deps/lld/test/ELF/arm-exidx-sentinel-orphan.s | 4 +- deps/lld/test/ELF/arm-exidx-shared.s | 8 +- deps/lld/test/ELF/arm-gnu-ifunc-nosym.s | 2 +- deps/lld/test/ELF/arm-gnu-ifunc-plt.s | 2 +- deps/lld/test/ELF/arm-gnu-ifunc.s | 2 +- deps/lld/test/ELF/arm-gotoff.s | 2 +- deps/lld/test/ELF/arm-long-thunk-converge.s | 29 + deps/lld/test/ELF/arm-mov-relocs.s | 2 +- deps/lld/test/ELF/arm-pie-relative.s | 2 +- deps/lld/test/ELF/arm-plt-reloc.s | 10 +- deps/lld/test/ELF/arm-sbrel32.s | 2 +- deps/lld/test/ELF/arm-static-defines.s | 2 +- deps/lld/test/ELF/arm-symbol-ordering-file.s | 32 + deps/lld/test/ELF/arm-tag-vfp-args-errs.s | 29 + deps/lld/test/ELF/arm-tag-vfp-args-illegal.s | 21 + deps/lld/test/ELF/arm-tag-vfp-args.s | 72 + deps/lld/test/ELF/arm-target1.s | 2 +- deps/lld/test/ELF/arm-target2.s | 14 +- deps/lld/test/ELF/arm-thumb-blx.s | 2 +- .../test/ELF/arm-thumb-branch-rangethunk.s | 2 +- deps/lld/test/ELF/arm-thumb-branch.s | 2 +- .../lld/test/ELF/arm-thumb-condbranch-thunk.s | 24 +- .../lld/test/ELF/arm-thumb-interwork-shared.s | 2 +- .../ELF/arm-thumb-interwork-thunk-range.s | 2 +- deps/lld/test/ELF/arm-thumb-interwork-thunk.s | 20 +- .../test/ELF/arm-thumb-mix-range-thunk-os.s | 22 +- .../test/ELF/arm-thumb-narrow-branch-check.s | 2 +- .../test/ELF/arm-thumb-no-undefined-thunk.s | 2 +- .../test/ELF/arm-thumb-plt-range-thunk-os.s | 110 +- deps/lld/test/ELF/arm-thumb-plt-reloc.s | 2 +- deps/lld/test/ELF/arm-thumb-range-thunk-os.s | 62 +- .../lld/test/ELF/arm-thumb-thunk-empty-pass.s | 14 +- deps/lld/test/ELF/arm-thumb-thunk-symbols.s | 2 +- deps/lld/test/ELF/arm-thumb-undefined-weak.s | 2 +- deps/lld/test/ELF/arm-thunk-largesection.s | 22 +- .../test/ELF/arm-thunk-linkerscript-dotexpr.s | 2 +- .../test/ELF/arm-thunk-linkerscript-large.s | 4 +- .../test/ELF/arm-thunk-linkerscript-sort.s | 4 +- deps/lld/test/ELF/arm-thunk-linkerscript.s | 2 +- deps/lld/test/ELF/arm-thunk-multipass.s | 20 +- deps/lld/test/ELF/arm-thunk-nosuitable.s | 33 + .../test/ELF/arm-thunk-section-too-large.s | 21 + deps/lld/test/ELF/arm-thunk-toolargesection.s | 4 +- deps/lld/test/ELF/arm-tls-gd-nonpreemptible.s | 2 +- deps/lld/test/ELF/arm-tls-gd32.s | 2 +- deps/lld/test/ELF/arm-tls-ie32.s | 2 +- deps/lld/test/ELF/arm-tls-ldm32.s | 2 +- deps/lld/test/ELF/arm-tls-le32.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-gd-ie.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-gd-le.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-ie-le.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-ld-le.s | 2 +- deps/lld/test/ELF/arm-undefined-weak.s | 2 +- deps/lld/test/ELF/arm-use-r-output.s | 2 +- deps/lld/test/ELF/as-needed-weak.s | 22 + deps/lld/test/ELF/as-needed.s | 2 +- deps/lld/test/ELF/auxiliary.s | 2 + deps/lld/test/ELF/basic-aarch64.s | 2 +- deps/lld/test/ELF/basic-freebsd.s | 2 +- deps/lld/test/ELF/basic-mips.s | 5 +- deps/lld/test/ELF/basic-ppc.s | 12 +- deps/lld/test/ELF/basic-ppc64.s | 323 +++ deps/lld/test/ELF/basic-sparcv9.s | 2 +- deps/lld/test/ELF/basic32.s | 2 +- deps/lld/test/ELF/basic64be.s | 291 +-- deps/lld/test/ELF/bss.s | 2 +- deps/lld/test/ELF/bsymbolic-undef.s | 1 + deps/lld/test/ELF/bsymbolic.s | 1 + deps/lld/test/ELF/build-id.s | 2 + deps/lld/test/ELF/cgprofile-bad-clusters.s | 70 + deps/lld/test/ELF/cgprofile-err.s | 13 + deps/lld/test/ELF/cgprofile-icf.s | 53 + deps/lld/test/ELF/cgprofile-txt.s | 185 ++ deps/lld/test/ELF/cgprofile-warn.s | 36 + deps/lld/test/ELF/color-diagnostics.test | 3 + deps/lld/test/ELF/combrelocs.s | 3 + deps/lld/test/ELF/comdat-discarded-reloc.s | 17 + deps/lld/test/ELF/comdat-linkonce.s | 1 + deps/lld/test/ELF/comdat.s | 10 +- deps/lld/test/ELF/common.s | 2 +- deps/lld/test/ELF/compatible-section-types.s | 1 + deps/lld/test/ELF/compressed-debug-conflict.s | 33 +- .../lld/test/ELF/compressed-debug-input-err.s | 11 + .../ELF/conflict-debug-variable-file-index.s | 103 + deps/lld/test/ELF/conflict-debug-variable.s | 36 +- deps/lld/test/ELF/conflict-debug-variable2.s | 3 +- .../test/ELF/conflict-variable-linkage-name.s | 176 ++ deps/lld/test/ELF/conflict.s | 2 +- deps/lld/test/ELF/copy-errors.s | 15 +- deps/lld/test/ELF/copy-in-shared.s | 4 +- deps/lld/test/ELF/copy-rel-corrupted.s | 5 +- deps/lld/test/ELF/copy-rel-pie-error.s | 7 +- deps/lld/test/ELF/copy-rel-pie.s | 7 +- deps/lld/test/ELF/copy-rel-version.s | 15 + .../test/ELF/copy-relocation-zero-abs-addr.s | 44 + .../ELF/copy-relocation-zero-nonabs-addr.s | 29 + .../test/ELF/corrupted-version-reference.s | 4 +- deps/lld/test/ELF/cref.s | 33 + deps/lld/test/ELF/ctors_dtors_priority.s | 2 +- deps/lld/test/ELF/defined-tls_get_addr.s | 3 +- deps/lld/test/ELF/defsym-reserved-syms.s | 30 + deps/lld/test/ELF/discard-locals.s | 2 +- deps/lld/test/ELF/discard-merge-locals.s | 2 +- deps/lld/test/ELF/discard-none.s | 2 +- deps/lld/test/ELF/dont-export-hidden.s | 1 + deps/lld/test/ELF/driver.test | 30 +- deps/lld/test/ELF/dt_flags.s | 15 +- deps/lld/test/ELF/duplicated-synthetic-sym.s | 22 +- deps/lld/test/ELF/dynamic-got-rela.s | 57 +- deps/lld/test/ELF/dynamic-got.s | 27 +- deps/lld/test/ELF/dynamic-linker.s | 24 + deps/lld/test/ELF/dynamic-list-archive.s | 17 + deps/lld/test/ELF/dynamic-list-extern.s | 12 +- deps/lld/test/ELF/dynamic-no-rosegment.s | 4 +- deps/lld/test/ELF/dynamic-reloc-in-ro.s | 4 +- deps/lld/test/ELF/dynamic-reloc-index.s | 1 + deps/lld/test/ELF/dynamic-reloc-weak.s | 2 +- deps/lld/test/ELF/dynamic-reloc.s | 2 +- deps/lld/test/ELF/dynstr-no-rosegment.s | 2 +- deps/lld/test/ELF/edata-etext.s | 8 +- deps/lld/test/ELF/eh-frame-dyn-rel.s | 4 +- deps/lld/test/ELF/eh-frame-hdr-abs-fde.s | 3 +- deps/lld/test/ELF/eh-frame-hdr-augmentation.s | 2 + deps/lld/test/ELF/eh-frame-hdr-icf-fde.s | 4 +- deps/lld/test/ELF/eh-frame-hdr.s | 7 +- deps/lld/test/ELF/eh-frame-marker.s | 1 + deps/lld/test/ELF/eh-frame-merge.s | 3 +- deps/lld/test/ELF/eh-frame-multilpe-cie.s | 3 +- .../test/ELF/eh-frame-negative-pcrel-sdata2.s | 85 + .../test/ELF/eh-frame-negative-pcrel-sdata4.s | 85 + .../test/ELF/eh-frame-negative-pcrel-sdata8.s | 85 + .../test/ELF/eh-frame-padding-no-rosegment.s | 8 +- deps/lld/test/ELF/eh-frame-pcrel-overflow.s | 33 + deps/lld/test/ELF/eh-frame-rel.s | 2 +- deps/lld/test/ELF/eh-frame-value-format1.s | 35 + deps/lld/test/ELF/eh-frame-value-format2.s | 35 + deps/lld/test/ELF/eh-frame-value-format3.s | 28 + deps/lld/test/ELF/eh-frame-value-format4.s | 28 + deps/lld/test/ELF/eh-frame-value-format5.s | 35 + deps/lld/test/ELF/eh-frame-value-format6.s | 35 + deps/lld/test/ELF/eh-frame-value-format7.s | 75 + deps/lld/test/ELF/eh-frame-value-format8.s | 74 + deps/lld/test/ELF/eh-frame-value-format9.s | 28 + deps/lld/test/ELF/ehframe-relocation.s | 2 +- deps/lld/test/ELF/elf-header.s | 18 + deps/lld/test/ELF/emit-relocs-eh-frame.s | 16 + deps/lld/test/ELF/emit-relocs-gc.s | 4 +- deps/lld/test/ELF/emit-relocs-icf.s | 33 + deps/lld/test/ELF/emit-relocs-shared.s | 4 +- deps/lld/test/ELF/emit-relocs.s | 2 +- deps/lld/test/ELF/empty-archive.s | 3 +- deps/lld/test/ELF/empty-ver2.s | 20 + deps/lld/test/ELF/emulation.s | 48 +- deps/lld/test/ELF/end-preserve.s | 2 +- deps/lld/test/ELF/end-update.s | 2 +- deps/lld/test/ELF/end.s | 2 +- deps/lld/test/ELF/entry.s | 1 + deps/lld/test/ELF/exclude-libs.s | 13 +- ...executable-undefined-protected-ignoreall.s | 2 +- deps/lld/test/ELF/execute-only-mixed-data.s | 26 + deps/lld/test/ELF/execute-only.s | 10 + deps/lld/test/ELF/export-dynamic-symbol.s | 18 + deps/lld/test/ELF/fatal-warnings.s | 4 +- deps/lld/test/ELF/file-sym.s | 12 - deps/lld/test/ELF/fill-trap-ppc.s | 31 + deps/lld/test/ELF/filter.s | 3 +- deps/lld/test/ELF/format-binary-non-ascii.s | 6 +- deps/lld/test/ELF/gc-absolute.s | 2 +- deps/lld/test/ELF/gc-debuginfo-tls.s | 1 + deps/lld/test/ELF/gc-merge-local-sym.s | 3 +- deps/lld/test/ELF/gc-sections-local-sym.s | 2 +- deps/lld/test/ELF/gc-sections-merge-addend.s | 1 + .../ELF/gc-sections-merge-implicit-addend.s | 1 + deps/lld/test/ELF/gc-sections-merge.s | 1 + .../test/ELF/gc-sections-metadata-startstop.s | 2 +- .../lld/test/ELF/gc-sections-no-undef-error.s | 19 + deps/lld/test/ELF/gc-sections-print.s | 4 +- deps/lld/test/ELF/gc-sections-protected.s | 1 + deps/lld/test/ELF/gc-sections-shared.s | 80 +- deps/lld/test/ELF/gdb-index-dup-types.s | 60 - deps/lld/test/ELF/gdb-index-noranges.s | 2 +- deps/lld/test/ELF/gdb-index-tls.s | 2 +- deps/lld/test/ELF/gdb-index.s | 56 +- .../global-offset-table-position-aarch64.s | 6 +- .../ELF/global-offset-table-position-arm.s | 2 +- .../ELF/global-offset-table-position-i386.s | 9 +- .../ELF/global-offset-table-position-mips.s | 3 +- .../test/ELF/global-offset-table-position.s | 9 +- deps/lld/test/ELF/global_offset_table.s | 3 +- .../lld/test/ELF/global_offset_table_shared.s | 5 +- deps/lld/test/ELF/gnu-hash-table.s | 24 +- deps/lld/test/ELF/gnu-ifunc-dynsym.s | 6 +- deps/lld/test/ELF/gnu-ifunc-i386.s | 2 +- deps/lld/test/ELF/gnu-ifunc-nosym-i386.s | 2 +- deps/lld/test/ELF/gnu-ifunc-nosym.s | 2 +- deps/lld/test/ELF/gnu-ifunc-plt-i386.s | 10 +- deps/lld/test/ELF/gnu-ifunc-plt.s | 2 +- deps/lld/test/ELF/gnu-ifunc-relative.s | 2 +- deps/lld/test/ELF/gnu-ifunc.s | 2 +- deps/lld/test/ELF/gnu-unique.s | 2 + deps/lld/test/ELF/gnustack.s | 5 + deps/lld/test/ELF/got-aarch64.s | 2 +- deps/lld/test/ELF/got-i386.s | 2 +- deps/lld/test/ELF/got-plt-header.s | 1 + deps/lld/test/ELF/got.s | 2 +- deps/lld/test/ELF/got32-i386-pie-rw.s | 4 +- deps/lld/test/ELF/got32-i386.s | 2 +- deps/lld/test/ELF/got32x-i386.s | 10 +- deps/lld/test/ELF/gotpcrelx.s | 1 + deps/lld/test/ELF/help.s | 4 +- deps/lld/test/ELF/hexagon.s | 31 + deps/lld/test/ELF/hidden-shared-err.s | 19 + deps/lld/test/ELF/i386-debug-noabs.test | 2 +- deps/lld/test/ELF/i386-got-and-copy.s | 1 + deps/lld/test/ELF/i386-got-value.s | 1 + deps/lld/test/ELF/i386-gotpc.s | 14 +- deps/lld/test/ELF/i386-merge.s | 7 +- deps/lld/test/ELF/i386-pic-plt.s | 12 + .../lld/test/ELF/i386-reloc-16-large-addend.s | 12 + deps/lld/test/ELF/i386-reloc-16.s | 7 +- deps/lld/test/ELF/i386-reloc-8-large-addend.s | 12 + deps/lld/test/ELF/i386-reloc-8.s | 7 +- deps/lld/test/ELF/i386-reloc-range.s | 2 +- .../ELF/i386-retpoline-nopic-linkerscript.s | 67 + .../ELF/i386-retpoline-pic-linkerscript.s | 64 + deps/lld/test/ELF/i386-tls-got.s | 2 +- deps/lld/test/ELF/i386-tls-ie-shared.s | 1 + deps/lld/test/ELF/icf-absolute.s | 6 +- deps/lld/test/ELF/icf-absolute2.s | 21 + deps/lld/test/ELF/icf-c-identifier.s | 9 + deps/lld/test/ELF/icf-comdat.s | 6 +- .../test/ELF/icf-different-output-sections.s | 9 + deps/lld/test/ELF/icf-i386.s | 8 +- deps/lld/test/ELF/icf-keep-unique.s | 43 + deps/lld/test/ELF/icf-link-order.s | 18 + deps/lld/test/ELF/icf-many-sections.s | 62 + deps/lld/test/ELF/icf-merge-sec.s | 6 +- deps/lld/test/ELF/icf-merge.s | 12 +- deps/lld/test/ELF/icf-merge2.s | 23 + deps/lld/test/ELF/icf-merged-sections.s | 37 + deps/lld/test/ELF/icf-non-mergeable.s | 6 +- deps/lld/test/ELF/icf-none.s | 4 +- deps/lld/test/ELF/icf-relro.s | 13 + deps/lld/test/ELF/icf-safe.s | 182 ++ deps/lld/test/ELF/icf1.s | 6 +- deps/lld/test/ELF/icf10.test | 40 + deps/lld/test/ELF/icf11.test | 52 + deps/lld/test/ELF/icf12.s | 20 + deps/lld/test/ELF/icf13.s | 20 + deps/lld/test/ELF/icf14.s | 26 + deps/lld/test/ELF/icf15.s | 23 + deps/lld/test/ELF/icf16.s | 23 + deps/lld/test/ELF/icf17.s | 15 + deps/lld/test/ELF/icf2.s | 6 +- deps/lld/test/ELF/icf3.s | 6 +- deps/lld/test/ELF/icf4.s | 6 +- deps/lld/test/ELF/icf5.s | 6 +- deps/lld/test/ELF/icf6.s | 6 +- deps/lld/test/ELF/icf7.s | 6 +- deps/lld/test/ELF/icf9.s | 13 +- deps/lld/test/ELF/ignore-plugin.test | 2 + deps/lld/test/ELF/incompatible-ar-first.s | 4 +- .../lld/test/ELF/incompatible-section-flags.s | 3 +- .../test/ELF/incompatible-section-types2.s | 3 +- deps/lld/test/ELF/incompatible.s | 4 +- deps/lld/test/ELF/init_fini_priority.s | 2 +- deps/lld/test/ELF/invalid-cie-length.s | 2 +- deps/lld/test/ELF/invalid-cie-length2.s | 2 +- deps/lld/test/ELF/invalid-cie-length3.s | 2 +- deps/lld/test/ELF/invalid-cie-length4.s | 2 +- deps/lld/test/ELF/invalid-cie-length5.s | 2 +- deps/lld/test/ELF/invalid-cie-reference.s | 2 +- deps/lld/test/ELF/invalid-eh-frame.s | 17 + deps/lld/test/ELF/invalid-eh-frame2.s | 22 + deps/lld/test/ELF/invalid-eh-frame3.s | 21 + deps/lld/test/ELF/invalid-eh-frame4.s | 28 + deps/lld/test/ELF/invalid-eh-frame5.s | 28 + deps/lld/test/ELF/invalid-eh-frame6.s | 31 + deps/lld/test/ELF/invalid-eh-frame7.s | 30 + deps/lld/test/ELF/invalid-eh-frame8.s | 30 + deps/lld/test/ELF/invalid-eh-frame9.s | 15 + deps/lld/test/ELF/invalid-fde-rel.s | 2 +- deps/lld/test/ELF/invalid-relocations.test | 2 +- .../ELF/invalid-undef-section-symbol.test | 2 +- deps/lld/test/ELF/invalid-z.s | 9 - .../test/ELF/invalid/Inputs/cie-version2.elf | Bin 1128 -> 0 bytes .../lld/test/ELF/invalid/Inputs/too-short.elf | Bin 44 -> 0 bytes .../test/ELF/invalid/dynamic-section-size.s | 2 +- .../test/ELF/invalid/eh-frame-hdr-no-out.s | 21 +- deps/lld/test/ELF/invalid/executable.s | 9 + deps/lld/test/ELF/invalid/invalid-e_shnum.s | 2 +- deps/lld/test/ELF/invalid/invalid-elf.test | 1 + .../lld/test/ELF/invalid/merge-invalid-size.s | 4 +- .../invalid/mips-invalid-options-descriptor.s | 2 +- .../ELF/invalid/reloc-section-reordered.test | 30 + .../lld/test/ELF/invalid/section-alignment2.s | 2 +- deps/lld/test/ELF/invalid/sht-group.s | 2 +- deps/lld/test/ELF/invalid/symbol-index.s | 2 +- deps/lld/test/ELF/invalid/symbol-name.s | 2 +- deps/lld/test/ELF/invalid/tls-symbol.s | 2 +- deps/lld/test/ELF/invalid/too-short.s | 5 - deps/lld/test/ELF/just-symbols-cref.s | 20 + deps/lld/test/ELF/just-symbols.s | 20 + deps/lld/test/ELF/libsearch.s | 2 +- deps/lld/test/ELF/linkerscript/Inputs/addr.s | 12 + deps/lld/test/ELF/linkerscript/Inputs/align.s | 13 + .../test/ELF/linkerscript/Inputs/alignof.s | 15 + deps/lld/test/ELF/linkerscript/Inputs/at2.s | 14 + deps/lld/test/ELF/linkerscript/Inputs/at3.s | 8 + .../ELF/linkerscript/Inputs/data-commands.s | 35 + .../linkerscript/Inputs/data-segment-relro.s | 11 + .../lld/test/ELF/linkerscript/Inputs/define.s | 8 + .../Inputs/eh-frame-reloc-out-of-range.s | 11 + .../ELF/linkerscript/Inputs/extend-pt-load.s | 3 + deps/lld/test/ELF/linkerscript/Inputs/fill.s | 11 + .../Inputs/implicit-program-header.script | 12 - .../ELF/linkerscript/Inputs/insert-after.s | 11 + .../linkerscript/Inputs/insert-after.script | 4 + .../test/ELF/linkerscript/Inputs/map-file2.s | 19 + .../ELF/linkerscript/Inputs/provide-shared2.s | 3 + .../Inputs/sections-va-overflow.s | 6 + .../linkerscript/Inputs/synthetic-symbols.s | 16 + .../{absolute-expr.s => absolute-expr.test} | 28 +- .../{addr-zero.s => addr-zero.test} | 11 +- deps/lld/test/ELF/linkerscript/addr.s | 32 - deps/lld/test/ELF/linkerscript/addr.test | 20 + .../ELF/linkerscript/address-expr-symbols.s | 15 + deps/lld/test/ELF/linkerscript/align-empty.s | 18 - .../test/ELF/linkerscript/align-empty.test | 22 + deps/lld/test/ELF/linkerscript/align-r.test | 21 + .../ELF/linkerscript/align-section-offset.s | 11 - .../linkerscript/align-section-offset.test | 12 + .../lld/test/ELF/linkerscript/align-section.s | 6 - .../test/ELF/linkerscript/align-section.test | 7 + deps/lld/test/ELF/linkerscript/align.s | 125 -- deps/lld/test/ELF/linkerscript/align1.test | 44 + deps/lld/test/ELF/linkerscript/align2.test | 20 + deps/lld/test/ELF/linkerscript/align3.test | 18 + deps/lld/test/ELF/linkerscript/align4.test | 25 + deps/lld/test/ELF/linkerscript/align5.test | 23 + deps/lld/test/ELF/linkerscript/alignof.s | 41 - deps/lld/test/ELF/linkerscript/alignof.test | 24 + .../test/ELF/linkerscript/arm-exidx-order.s | 19 - .../ELF/linkerscript/arm-exidx-order.test | 19 + .../test/ELF/linkerscript/arm-exidx-phdrs.s | 16 - .../ELF/linkerscript/arm-exidx-phdrs.test | 13 + deps/lld/test/ELF/linkerscript/arm-lscript.s | 9 - .../test/ELF/linkerscript/arm-lscript.test | 11 + deps/lld/test/ELF/linkerscript/assert.s | 9 +- deps/lld/test/ELF/linkerscript/at2.s | 81 - deps/lld/test/ELF/linkerscript/at2.test | 58 + deps/lld/test/ELF/linkerscript/at3.s | 38 - deps/lld/test/ELF/linkerscript/at3.test | 31 + deps/lld/test/ELF/linkerscript/at4.s | 36 + deps/lld/test/ELF/linkerscript/at5.test | 14 + .../linkerscript/broken-memory-declaration.s | 13 + deps/lld/test/ELF/linkerscript/bss-fill.s | 7 - deps/lld/test/ELF/linkerscript/bss-fill.test | 13 + ...common-filespec.s => common-filespec.test} | 19 +- .../{constructor.s => constructor.test} | 14 +- .../linkerscript/copy-rel-symbol-value-err.s | 2 +- .../test/ELF/linkerscript/data-commands-gc.s | 2 +- .../lld/test/ELF/linkerscript/data-commands.s | 117 -- .../test/ELF/linkerscript/data-commands1.test | 45 + .../test/ELF/linkerscript/data-commands2.test | 40 + ...egment-relro.s => data-segment-relro.test} | 54 +- deps/lld/test/ELF/linkerscript/define.s | 25 - deps/lld/test/ELF/linkerscript/define.test | 15 + deps/lld/test/ELF/linkerscript/defsym.s | 19 + deps/lld/test/ELF/linkerscript/diag1.test | 15 + deps/lld/test/ELF/linkerscript/diag2.test | 13 + deps/lld/test/ELF/linkerscript/diag3.test | 13 + deps/lld/test/ELF/linkerscript/diag4.test | 14 + deps/lld/test/ELF/linkerscript/diag5.test | 14 + deps/lld/test/ELF/linkerscript/diag6.test | 7 + deps/lld/test/ELF/linkerscript/diagnostic.s | 106 - .../test/ELF/linkerscript/discard-gnu-hash.s | 23 + .../test/ELF/linkerscript/discard-interp.s | 12 - .../test/ELF/linkerscript/discard-interp.test | 14 + .../test/ELF/linkerscript/discard-print-gc.s | 4 +- .../ELF/linkerscript/discard-section-err.s | 10 + .../test/ELF/linkerscript/dot-is-not-abs.s | 4 +- deps/lld/test/ELF/linkerscript/double-bss.s | 21 - .../lld/test/ELF/linkerscript/double-bss.test | 14 + deps/lld/test/ELF/linkerscript/edata-etext.s | 2 +- .../ELF/linkerscript/eh-frame-emit-relocs.s | 13 + deps/lld/test/ELF/linkerscript/eh-frame-hdr.s | 7 +- .../eh-frame-reloc-out-of-range.s | 27 - .../eh-frame-reloc-out-of-range.test | 13 + deps/lld/test/ELF/linkerscript/eh-frame.s | 4 +- .../linkerscript/emit-reloc-section-names.s | 3 +- deps/lld/test/ELF/linkerscript/emit-reloc.s | 4 +- .../ELF/linkerscript/empty-link-order.test | 21 + deps/lld/test/ELF/linkerscript/empty-load.s | 2 +- .../ELF/linkerscript/empty-section-size.test | 17 + .../linkerscript/empty-sections-expressions.s | 18 + .../empty-synthetic-removed-flags.s | 36 + deps/lld/test/ELF/linkerscript/empty-tls.s | 14 - deps/lld/test/ELF/linkerscript/empty-tls.test | 17 + deps/lld/test/ELF/linkerscript/exidx-crash.s | 7 - .../test/ELF/linkerscript/exidx-crash.test | 10 + .../test/ELF/linkerscript/expr-invalid-sec.s | 6 - .../ELF/linkerscript/expr-invalid-sec.test | 9 + .../lld/test/ELF/linkerscript/expr-sections.s | 22 - .../test/ELF/linkerscript/expr-sections.test | 23 + .../test/ELF/linkerscript/extend-pt-load.s | 68 - .../ELF/linkerscript/extend-pt-load1.test | 23 + .../ELF/linkerscript/extend-pt-load2.test | 24 + .../ELF/linkerscript/extend-pt-load3.test | 24 + .../lld/test/ELF/linkerscript/filename-spec.s | 70 +- deps/lld/test/ELF/linkerscript/fill.s | 31 - deps/lld/test/ELF/linkerscript/fill.test | 20 + .../{header-addr.s => header-addr.test} | 18 +- deps/lld/test/ELF/linkerscript/header-phdr.s | 13 - .../test/ELF/linkerscript/header-phdr.test | 15 + deps/lld/test/ELF/linkerscript/header-phdr2.s | 11 + .../ELF/linkerscript/huge-temporary-file.s | 2 +- .../i386-sections-max-va-overflow.s | 13 + deps/lld/test/ELF/linkerscript/image-base.s | 36 +- .../linkerscript/implicit-program-header.s | 13 - .../linkerscript/implicit-program-header.test | 22 + .../test/ELF/linkerscript/info-section-type.s | 33 + .../test/ELF/linkerscript/insert-after.test | 29 + .../test/ELF/linkerscript/insert-before.test | 29 + .../test/ELF/linkerscript/insert-broken.test | 6 + .../{lazy-symbols.s => lazy-symbols.test} | 7 +- .../linker-script-in-search-path.s | 10 +- deps/lld/test/ELF/linkerscript/linkerscript.s | 12 +- .../test/ELF/linkerscript/lma-overflow.test | 16 + .../ELF/linkerscript/locationcountererr.s | 11 - .../ELF/linkerscript/locationcountererr.test | 11 + .../ELF/linkerscript/locationcountererr2.s | 6 +- deps/lld/test/ELF/linkerscript/map-file.test | 60 + deps/lld/test/ELF/linkerscript/map-file2.test | 44 + .../{memory-at.s => memory-at.test} | 31 +- .../linkerscript/memory-data-commands.test | 22 + .../ELF/linkerscript/memory-loc-counter.test | 37 + .../linkerscript/memory-region-alignment.test | 58 + deps/lld/test/ELF/linkerscript/memory.s | 6 +- deps/lld/test/ELF/linkerscript/memory2.s | 2 +- deps/lld/test/ELF/linkerscript/memory4.test | 19 + deps/lld/test/ELF/linkerscript/memory5.test | 19 + .../ELF/linkerscript/merge-sections-syms.s | 4 +- .../test/ELF/linkerscript/merge-sections.s | 3 +- deps/lld/test/ELF/linkerscript/no-pt-load.s | 5 - .../lld/test/ELF/linkerscript/no-pt-load.test | 11 + deps/lld/test/ELF/linkerscript/no-space.s | 10 +- deps/lld/test/ELF/linkerscript/noload.s | 29 +- deps/lld/test/ELF/linkerscript/non-absolute.s | 6 +- .../lld/test/ELF/linkerscript/non-absolute2.s | 12 - .../test/ELF/linkerscript/non-absolute2.test | 17 + .../test/ELF/linkerscript/non-alloc-segment.s | 2 +- deps/lld/test/ELF/linkerscript/non-alloc.s | 8 +- deps/lld/test/ELF/linkerscript/numbers.s | 23 +- .../test/ELF/linkerscript/openbsd-bootdata.s | 7 - .../ELF/linkerscript/openbsd-bootdata.test | 9 + .../test/ELF/linkerscript/openbsd-randomize.s | 1 + ...enbsd-wxneeded.s => openbsd-wxneeded.test} | 8 +- .../{operators.s => operators.test} | 105 +- .../test/ELF/linkerscript/orphan-first-cmd.s | 20 - .../ELF/linkerscript/orphan-first-cmd.test | 20 + deps/lld/test/ELF/linkerscript/orphan-phdrs.s | 3 +- .../lld/test/ELF/linkerscript/orphan-report.s | 1 + deps/lld/test/ELF/linkerscript/orphan.s | 2 +- deps/lld/test/ELF/linkerscript/out-of-order.s | 30 +- .../test/ELF/linkerscript/output-too-large.s | 2 +- deps/lld/test/ELF/linkerscript/outputarch.s | 4 - .../lld/test/ELF/linkerscript/outputarch.test | 5 + .../ELF/linkerscript/overlapping-sections.s | 113 + .../test/ELF/linkerscript/overlay-reject.test | 13 + .../ELF/linkerscript/overlay-reject2.test | 17 + deps/lld/test/ELF/linkerscript/overlay.test | 30 + .../test/ELF/linkerscript/page-size-align.s | 22 - .../ELF/linkerscript/page-size-align.test | 21 + .../ELF/linkerscript/parse-section-in-addr.s | 10 - .../linkerscript/parse-section-in-addr.test | 10 + .../ELF/linkerscript/provide-empty-section.s | 30 + .../test/ELF/linkerscript/provide-shared2.s | 13 + deps/lld/test/ELF/linkerscript/pt-interp.test | 21 + .../test/ELF/linkerscript/pt_gnu_eh_frame.s | 2 +- deps/lld/test/ELF/linkerscript/region-alias.s | 4 +- .../{rosegment.s => rosegment.test} | 8 +- .../test/ELF/linkerscript/section-metadata.s | 8 +- .../test/ELF/linkerscript/section-metadata2.s | 37 + .../lld/test/ELF/linkerscript/sections-keep.s | 36 +- .../linkerscript/sections-max-va-overflow.s | 13 + .../lld/test/ELF/linkerscript/sections-sort.s | 10 +- .../linkerscript/sections-va-overflow.test | 22 + deps/lld/test/ELF/linkerscript/sections.s | 8 +- deps/lld/test/ELF/linkerscript/segment-none.s | 4 +- .../lld/test/ELF/linkerscript/segment-start.s | 2 +- .../test/ELF/linkerscript/sort-constructors.s | 5 - .../ELF/linkerscript/sort-constructors.test | 8 + .../test/ELF/linkerscript/sort-non-script.s | 10 +- deps/lld/test/ELF/linkerscript/start-end.s | 16 - deps/lld/test/ELF/linkerscript/start-end.test | 12 + deps/lld/test/ELF/linkerscript/subalign.s | 2 +- .../test/ELF/linkerscript/symbol-assignexpr.s | 2 +- .../test/ELF/linkerscript/symbol-memoryexpr.s | 2 +- ...ol-only-flags.s => symbol-only-flags.test} | 17 +- deps/lld/test/ELF/linkerscript/symbol-only.s | 21 - .../test/ELF/linkerscript/symbol-only.test | 21 + .../ELF/linkerscript/symbol-ordering-file.s | 10 + .../ELF/linkerscript/symbol-ordering-file2.s | 16 + .../test/ELF/linkerscript/symbols-non-alloc.s | 19 - .../ELF/linkerscript/symbols-non-alloc.test | 18 + .../test/ELF/linkerscript/symbols-synthetic.s | 98 - .../linkerscript/synthetic-relsec-layout.s | 16 + .../ELF/linkerscript/synthetic-symbols1.test | 56 + .../ELF/linkerscript/synthetic-symbols2.test | 13 + .../ELF/linkerscript/synthetic-symbols3.test | 11 + .../ELF/linkerscript/synthetic-symbols4.test | 14 + .../test/ELF/linkerscript/unused-synthetic.s | 6 +- .../ELF/linkerscript/unused-synthetic2.test | 12 + deps/lld/test/ELF/linkerscript/va.s | 8 +- .../test/ELF/linkerscript/version-script.s | 57 + deps/lld/test/ELF/llvm33-rela-outside-group.s | 2 +- deps/lld/test/ELF/local-dynamic.s | 2 +- deps/lld/test/ELF/local-got-pie.s | 1 + deps/lld/test/ELF/local-got-shared.s | 1 + deps/lld/test/ELF/local-got.s | 1 + deps/lld/test/ELF/local-symbols-order.s | 37 + deps/lld/test/ELF/local.s | 2 +- deps/lld/test/ELF/lto-plugin-ignore.s | 9 +- deps/lld/test/ELF/lto/Inputs/absolute.s | 2 + deps/lld/test/ELF/lto/Inputs/archive-3.ll | 1 + deps/lld/test/ELF/lto/Inputs/asmundef.ll | 4 + deps/lld/test/ELF/lto/Inputs/common3.ll | 1 + deps/lld/test/ELF/lto/Inputs/i386-empty.ll | 2 + deps/lld/test/ELF/lto/Inputs/lazy-internal.ll | 6 + .../test/ELF/lto/Inputs/libcall-archive.ll | 6 + .../test/ELF/lto/Inputs/sample-profile.prof | 1 + deps/lld/test/ELF/lto/Inputs/thinlto_empty.ll | 2 + .../test/ELF/lto/Inputs/weakodr-visibility.ll | 6 + deps/lld/test/ELF/lto/abs-resol.ll | 17 + deps/lld/test/ELF/lto/archive-2.ll | 4 +- deps/lld/test/ELF/lto/archive-3.ll | 4 +- deps/lld/test/ELF/lto/archive-no-index.ll | 4 +- deps/lld/test/ELF/lto/archive.ll | 4 +- deps/lld/test/ELF/lto/asmundef.ll | 5 +- deps/lld/test/ELF/lto/available-externally.ll | 2 +- deps/lld/test/ELF/lto/bitcode-nodatalayout.ll | 2 +- deps/lld/test/ELF/lto/cache.ll | 2 +- deps/lld/test/ELF/lto/codemodel.ll | 4 +- .../test/ELF/lto/combined-lto-object-name.ll | 2 +- deps/lld/test/ELF/lto/comdat.ll | 2 +- deps/lld/test/ELF/lto/comdat2.ll | 4 +- deps/lld/test/ELF/lto/common2.ll | 2 +- deps/lld/test/ELF/lto/common3.ll | 2 +- deps/lld/test/ELF/lto/cpu-string.ll | 25 + deps/lld/test/ELF/lto/ctors.ll | 2 +- deps/lld/test/ELF/lto/data-ordering-lto.s | 13 +- deps/lld/test/ELF/lto/debugger-tune.ll | 35 + deps/lld/test/ELF/lto/defsym.ll | 10 +- deps/lld/test/ELF/lto/discard-value-names.ll | 2 +- deps/lld/test/ELF/lto/drop-debug-info.ll | 4 +- deps/lld/test/ELF/lto/drop-linkage.ll | 6 +- deps/lld/test/ELF/lto/duplicated.ll | 2 +- deps/lld/test/ELF/lto/dynamic-list.ll | 2 +- deps/lld/test/ELF/lto/dynsym.ll | 6 +- deps/lld/test/ELF/lto/inline-asm.ll | 2 +- deps/lld/test/ELF/lto/internalize-basic.ll | 4 +- .../lld/test/ELF/lto/internalize-exportdyn.ll | 10 +- deps/lld/test/ELF/lto/internalize-llvmused.ll | 2 +- deps/lld/test/ELF/lto/internalize-undef.ll | 2 +- .../ELF/lto/internalize-version-script.ll | 2 +- deps/lld/test/ELF/lto/irmover-error.ll | 2 +- deps/lld/test/ELF/lto/keep-undefined.ll | 2 +- deps/lld/test/ELF/lto/lazy-internal.ll | 19 + deps/lld/test/ELF/lto/libcall-archive.ll | 20 + deps/lld/test/ELF/lto/linkage.ll | 2 +- .../ELF/lto/linker-script-symbols-assign.ll | 15 +- .../test/ELF/lto/linker-script-symbols-ipo.ll | 8 +- .../lld/test/ELF/lto/linker-script-symbols.ll | 2 +- deps/lld/test/ELF/lto/lto-start.ll | 2 +- deps/lld/test/ELF/lto/ltopasses-basic.ll | 2 +- deps/lld/test/ELF/lto/ltopasses-custom.ll | 4 +- deps/lld/test/ELF/lto/metadata.ll | 2 +- deps/lld/test/ELF/lto/mix-platforms2.ll | 9 + deps/lld/test/ELF/lto/module-asm.ll | 2 +- deps/lld/test/ELF/lto/new-pass-manager.ll | 14 + deps/lld/test/ELF/lto/opt-level.ll | 22 +- deps/lld/test/ELF/lto/parallel-internalize.ll | 20 +- deps/lld/test/ELF/lto/parallel.ll | 2 +- deps/lld/test/ELF/lto/relax-relocs.ll | 2 +- deps/lld/test/ELF/lto/relocatable.ll | 9 + deps/lld/test/ELF/lto/sample-profile.ll | 25 + deps/lld/test/ELF/lto/save-temps.ll | 2 +- deps/lld/test/ELF/lto/setting-dso-local.ll | 15 + deps/lld/test/ELF/lto/start-lib.ll | 6 +- deps/lld/test/ELF/lto/symbol-ordering-lto.s | 11 +- .../test/ELF/lto/thinlto-cant-write-index.ll | 23 + .../lld/test/ELF/lto/thinlto-debug-fission.ll | 21 + deps/lld/test/ELF/lto/thinlto-emit-imports.ll | 55 + deps/lld/test/ELF/lto/thinlto-index-file.ll | 24 + deps/lld/test/ELF/lto/thinlto-index-only.ll | 89 + deps/lld/test/ELF/lto/thinlto-no-index.ll | 24 + deps/lld/test/ELF/lto/thinlto-obj-path.ll | 23 + .../ELF/lto/thinlto-object-suffix-replace.ll | 50 + .../test/ELF/lto/thinlto-prefix-replace.ll | 23 + deps/lld/test/ELF/lto/thinlto.ll | 33 +- deps/lld/test/ELF/lto/timepasses.ll | 7 +- deps/lld/test/ELF/lto/tls-mixed.ll | 2 +- deps/lld/test/ELF/lto/tls-preserve.ll | 2 +- deps/lld/test/ELF/lto/type-merge.ll | 2 +- deps/lld/test/ELF/lto/type-merge2.ll | 2 +- deps/lld/test/ELF/lto/undef-weak.ll | 5 +- deps/lld/test/ELF/lto/undef.ll | 2 +- deps/lld/test/ELF/lto/undefined-puts.ll | 2 +- deps/lld/test/ELF/lto/unnamed-addr-comdat.ll | 2 +- deps/lld/test/ELF/lto/unnamed-addr-drop.ll | 2 +- deps/lld/test/ELF/lto/unnamed-addr-lib.ll | 2 +- deps/lld/test/ELF/lto/unnamed-addr.ll | 2 +- deps/lld/test/ELF/lto/verify-invalid.ll | 6 +- deps/lld/test/ELF/lto/version-script.ll | 2 +- deps/lld/test/ELF/lto/version-script2.ll | 15 + deps/lld/test/ELF/lto/visibility.ll | 5 +- deps/lld/test/ELF/lto/weak.ll | 2 +- deps/lld/test/ELF/lto/weakodr-visibility.ll | 40 + deps/lld/test/ELF/lto/wrap-1.ll | 4 +- deps/lld/test/ELF/map-file-i686.s | 21 + deps/lld/test/ELF/map-file.s | 120 +- deps/lld/test/ELF/map-gc-sections.s | 3 +- deps/lld/test/ELF/merge-gc-piece.s | 38 + deps/lld/test/ELF/merge-gc-piece2.s | 27 + deps/lld/test/ELF/merge-reloc-O0.s | 48 + deps/lld/test/ELF/merge-shared-str.s | 4 +- deps/lld/test/ELF/merge-shared.s | 4 +- deps/lld/test/ELF/merge-string-empty.s | 4 +- deps/lld/test/ELF/merge-string-error.s | 2 +- deps/lld/test/ELF/merge-string-no-null.s | 2 +- deps/lld/test/ELF/merge-string.s | 22 +- deps/lld/test/ELF/merge-sym.s | 4 +- deps/lld/test/ELF/merge-to-non-alloc.s | 33 + deps/lld/test/ELF/mips-26-mask.s | 3 +- deps/lld/test/ELF/mips-26-n32-n64.s | 13 +- deps/lld/test/ELF/mips-26.s | 3 +- deps/lld/test/ELF/mips-32.s | 3 +- deps/lld/test/ELF/mips-64-disp.s | 3 +- deps/lld/test/ELF/mips-64-got-overflow.s | 80 + deps/lld/test/ELF/mips-64-got.s | 3 +- deps/lld/test/ELF/mips-64-gprel-so.s | 3 +- deps/lld/test/ELF/mips-64-rels.s | 3 +- deps/lld/test/ELF/mips-64.s | 14 +- deps/lld/test/ELF/mips-abs-got.s | 36 + deps/lld/test/ELF/mips-align-err.s | 2 +- deps/lld/test/ELF/mips-call-hilo.s | 3 +- deps/lld/test/ELF/mips-call16.s | 3 +- deps/lld/test/ELF/mips-dynamic.s | 49 +- deps/lld/test/ELF/mips-dynsym-sort.s | 3 +- deps/lld/test/ELF/mips-elf-abi.s | 22 + deps/lld/test/ELF/mips-elf-flags-err.s | 33 +- deps/lld/test/ELF/mips-elf-flags-err.test | 89 + deps/lld/test/ELF/mips-elf-flags.s | 3 +- deps/lld/test/ELF/mips-fp-flags-err.test | 162 ++ deps/lld/test/ELF/mips-gnu-hash.s | 7 +- deps/lld/test/ELF/mips-got-and-copy.s | 8 +- deps/lld/test/ELF/mips-got-extsym.s | 3 +- deps/lld/test/ELF/mips-got-hilo.s | 3 +- deps/lld/test/ELF/mips-got-page-script.s | 3 +- deps/lld/test/ELF/mips-got-page.s | 3 +- deps/lld/test/ELF/mips-got-redundant.s | 3 +- deps/lld/test/ELF/mips-got-relocs.s | 3 +- deps/lld/test/ELF/mips-got-script.s | 13 +- deps/lld/test/ELF/mips-got-string.s | 5 +- deps/lld/test/ELF/mips-got-weak.s | 158 +- deps/lld/test/ELF/mips-got16-relocatable.s | 3 +- deps/lld/test/ELF/mips-got16.s | 3 +- deps/lld/test/ELF/mips-gp-disp-ver.s | 3 +- deps/lld/test/ELF/mips-gp-disp.s | 3 +- deps/lld/test/ELF/mips-gp-ext.s | 41 +- deps/lld/test/ELF/mips-gp-local.s | 3 +- deps/lld/test/ELF/mips-gp-lowest.s | 11 +- deps/lld/test/ELF/mips-gprel-sec.s | 3 +- deps/lld/test/ELF/mips-gprel32-relocs-gp0.s | 12 +- deps/lld/test/ELF/mips-gprel32-relocs.s | 3 +- deps/lld/test/ELF/mips-higher-highest.s | 3 +- deps/lld/test/ELF/mips-hilo-gp-disp.s | 3 +- deps/lld/test/ELF/mips-hilo-hi-only.s | 3 +- deps/lld/test/ELF/mips-hilo.s | 3 +- deps/lld/test/ELF/mips-lo16-not-relative.s | 3 +- deps/lld/test/ELF/mips-merge-abiflags.s | 2 +- deps/lld/test/ELF/mips-mgot.s | 117 ++ deps/lld/test/ELF/mips-micro-got.s | 3 +- deps/lld/test/ELF/mips-micro-got64.s | 48 - deps/lld/test/ELF/mips-micro-jal.s | 3 +- deps/lld/test/ELF/mips-micro-plt.s | 37 +- deps/lld/test/ELF/mips-micro-relocs.s | 3 +- deps/lld/test/ELF/mips-micro-thunks.s | 79 +- deps/lld/test/ELF/mips-micror6-relocs.s | 38 + deps/lld/test/ELF/mips-n32-emul.s | 5 +- deps/lld/test/ELF/mips-n32-rels.s | 46 +- deps/lld/test/ELF/mips-non-zero-gp0.s | 54 + deps/lld/test/ELF/mips-nonalloc.s | 3 +- deps/lld/test/ELF/mips-options.s | 3 +- .../ELF/mips-out-of-bounds-call16-reloc.s | 4 +- deps/lld/test/ELF/mips-pc-relocs.s | 3 +- deps/lld/test/ELF/mips-plt-copy.s | 11 +- deps/lld/test/ELF/mips-plt-n32.s | 43 + deps/lld/test/ELF/mips-plt-r6.s | 14 +- deps/lld/test/ELF/mips-reginfo.s | 3 +- deps/lld/test/ELF/mips-relocatable.s | 3 +- deps/lld/test/ELF/mips-sto-pic-flag.s | 3 +- deps/lld/test/ELF/mips-sto-plt.s | 11 +- .../test/ELF/mips-tls-64-pic-local-variable.s | 49 + deps/lld/test/ELF/mips-tls-64.s | 79 +- deps/lld/test/ELF/mips-tls-hilo.s | 3 +- deps/lld/test/ELF/mips-tls-static-64.s | 3 +- deps/lld/test/ELF/mips-tls-static.s | 7 +- deps/lld/test/ELF/mips-tls.s | 73 +- deps/lld/test/ELF/mips-xgot-order.s | 3 +- deps/lld/test/ELF/mips64-eh-abs-reloc.s | 6 +- deps/lld/test/ELF/multiple-cu.s | 38 + deps/lld/test/ELF/new-dtags.test | 6 +- deps/lld/test/ELF/no-augmentation.s | 5 +- deps/lld/test/ELF/no-dynamic-linker.s | 12 - deps/lld/test/ELF/no-inhibit-exec.s | 2 +- .../no-line-parser-errors-if-empty-section.s | 21 + .../ELF/no-line-parser-errors-if-no-section.s | 19 + deps/lld/test/ELF/no-obj.s | 2 +- deps/lld/test/ELF/no-symtab.s | 2 +- deps/lld/test/ELF/no-undefined.s | 4 +- deps/lld/test/ELF/non-abs-reloc.s | 18 +- deps/lld/test/ELF/non-alloc-link-order-gc.s | 34 + deps/lld/test/ELF/note-contiguous.s | 36 +- .../ELF/{note-loadaddr.c => note-loadaddr.s} | 0 deps/lld/test/ELF/note-noalloc.s | 38 + deps/lld/test/ELF/note-noalloc2.s | 11 + deps/lld/test/ELF/oformat-binary.s | 4 +- deps/lld/test/ELF/output-section.s | 2 +- deps/lld/test/ELF/pack-dyn-relocs.s | 339 ++- deps/lld/test/ELF/pack-dyn-relocs2.s | 85 + deps/lld/test/ELF/pie.s | 4 +- deps/lld/test/ELF/plt-aarch64.s | 3 +- deps/lld/test/ELF/plt-i686.s | 2 +- deps/lld/test/ELF/plt.s | 3 +- deps/lld/test/ELF/ppc-rela.s | 11 + deps/lld/test/ELF/ppc-relocs.s | 2 +- deps/lld/test/ELF/ppc64-abi-version.s | 11 + deps/lld/test/ELF/ppc64-addr16-error.s | 9 +- deps/lld/test/ELF/ppc64-dtprel.s | 204 ++ deps/lld/test/ELF/ppc64-dynamic-relocations.s | 50 + deps/lld/test/ELF/ppc64-error-toc-restore.s | 20 + deps/lld/test/ELF/ppc64-error-toc-tail-call.s | 20 + deps/lld/test/ELF/ppc64-func-entry-points.s | 80 + deps/lld/test/ELF/ppc64-gd-to-ie.s | 104 + deps/lld/test/ELF/ppc64-general-dynamic-tls.s | 112 + deps/lld/test/ELF/ppc64-got-indirect.s | 115 + deps/lld/test/ELF/ppc64-ifunc.s | 87 + deps/lld/test/ELF/ppc64-initial-exec-tls.s | 102 + deps/lld/test/ELF/ppc64-local-dynamic.s | 128 ++ deps/lld/test/ELF/ppc64-local-exec-tls.s | 163 ++ deps/lld/test/ELF/ppc64-plt-stub.s | 42 + deps/lld/test/ELF/ppc64-rel-calls.s | 34 +- deps/lld/test/ELF/ppc64-rel-so-local-calls.s | 87 + deps/lld/test/ELF/ppc64-relocs.s | 103 +- deps/lld/test/ELF/ppc64-shared-rel-toc.s | 27 - deps/lld/test/ELF/ppc64-tls-gd-le.s | 83 + deps/lld/test/ELF/ppc64-tls-ld-le.s | 84 + deps/lld/test/ELF/ppc64-toc-rel.s | 90 + deps/lld/test/ELF/ppc64-toc-restore.s | 106 +- .../test/ELF/ppc64-weak-undef-call-shared.s | 9 +- deps/lld/test/ELF/ppc64-weak-undef-call.s | 19 +- deps/lld/test/ELF/ppc64_entry_point.s | 50 + deps/lld/test/ELF/pr34660.s | 2 +- deps/lld/test/ELF/pr34872.s | 3 +- deps/lld/test/ELF/pr36475.s | 30 + deps/lld/test/ELF/pr37735.s | 12 + deps/lld/test/ELF/pre_init_fini_array.s | 2 +- .../test/ELF/pre_init_fini_array_missing.s | 39 +- deps/lld/test/ELF/print-icf.s | 48 + deps/lld/test/ELF/program-header-layout.s | 2 +- deps/lld/test/ELF/protected-data-access.s | 27 + deps/lld/test/ELF/protected-function-access.s | 27 + deps/lld/test/ELF/push-state.s | 36 + .../lld/test/ELF/rel-addend-with-rela-input.s | 43 + .../test/ELF/relative-dynamic-reloc-ppc64.s | 6 +- deps/lld/test/ELF/relocatable-build-id.s | 12 + .../test/ELF/relocatable-comdat-multiple.s | 4 + deps/lld/test/ELF/relocatable-comdat.s | 2 + deps/lld/test/ELF/relocatable-comdat2.s | 4 + deps/lld/test/ELF/relocatable-eh-frame.s | 2 +- deps/lld/test/ELF/relocatable-many-sections.s | 109 + deps/lld/test/ELF/relocatable-symbols.s | 36 +- deps/lld/test/ELF/relocation-absolute.s | 2 +- deps/lld/test/ELF/relocation-common.s | 2 +- deps/lld/test/ELF/relocation-dtrace.test | 2 +- deps/lld/test/ELF/relocation-i686.s | 2 +- deps/lld/test/ELF/relocation-local.s | 2 +- deps/lld/test/ELF/relocation-nocopy.s | 2 +- deps/lld/test/ELF/relocation-non-alloc.s | 58 +- .../lld/test/ELF/relocation-none-aarch64.test | 2 +- deps/lld/test/ELF/relocation-none-i686.test | 2 +- deps/lld/test/ELF/relocation-past-merge-end.s | 2 +- .../test/ELF/relocation-relative-absolute.s | 2 +- deps/lld/test/ELF/relocation-shared.s | 6 +- deps/lld/test/ELF/relocation-size-err.s | 4 +- deps/lld/test/ELF/relocation-size-shared.s | 1 + deps/lld/test/ELF/relocation-size.s | 1 + deps/lld/test/ELF/relocation-undefined-weak.s | 2 +- deps/lld/test/ELF/relocation.s | 11 +- deps/lld/test/ELF/relro-non-contiguous.s | 2 +- deps/lld/test/ELF/relro-omagic.s | 5 +- deps/lld/test/ELF/relro-script.s | 2 +- deps/lld/test/ELF/relro.s | 10 +- deps/lld/test/ELF/reproduce-backslash.s | 6 +- deps/lld/test/ELF/reproduce-error.s | 2 +- deps/lld/test/ELF/reproduce.s | 2 +- deps/lld/test/ELF/resolution-end.s | 2 +- deps/lld/test/ELF/resolution-shared.s | 2 +- deps/lld/test/ELF/resolution.s | 2 +- deps/lld/test/ELF/rodynamic.s | 1 + deps/lld/test/ELF/section-align-0.test | 2 +- deps/lld/test/ELF/section-layout.s | 7 +- deps/lld/test/ELF/section-metadata-err.s | 6 +- deps/lld/test/ELF/section-metadata-err2.s | 17 + deps/lld/test/ELF/section-metadata-err3.s | 17 + deps/lld/test/ELF/section-name.s | 2 +- deps/lld/test/ELF/section-symbol.s | 1 + deps/lld/test/ELF/section-symbols.test | 2 +- deps/lld/test/ELF/sectionstart-noallochdr.s | 2 +- deps/lld/test/ELF/sectionstart.s | 8 +- deps/lld/test/ELF/shared-lazy.s | 1 + .../test/ELF/{shared-be.s => shared-ppc64.s} | 9 +- deps/lld/test/ELF/shared.s | 9 +- deps/lld/test/ELF/shlib-undefined-archive.s | 19 + deps/lld/test/ELF/shlib-undefined-local.s | 19 + deps/lld/test/ELF/sht-group-gold-r.test | 1 + deps/lld/test/ELF/silent-ignore.test | 1 - deps/lld/test/ELF/soname.s | 1 + deps/lld/test/ELF/soname2.s | 1 + deps/lld/test/ELF/sort-norosegment.s | 10 +- deps/lld/test/ELF/splitstacks.s | 11 - deps/lld/test/ELF/start-lib.s | 9 + deps/lld/test/ELF/startstop-shared.s | 22 +- deps/lld/test/ELF/startstop.s | 15 +- .../lld/test/ELF/static-with-export-dynamic.s | 2 +- deps/lld/test/ELF/string-gc.s | 1 + deps/lld/test/ELF/string-table.s | 2 +- deps/lld/test/ELF/symbol-ordering-file-icf.s | 32 + .../test/ELF/symbol-ordering-file-warnings.s | 165 ++ deps/lld/test/ELF/symbol-ordering-file.s | 16 + deps/lld/test/ELF/symbol-override.s | 1 + deps/lld/test/ELF/symbols.s | 2 +- deps/lld/test/ELF/symver-archive.s | 2 +- deps/lld/test/ELF/sysroot.s | 2 +- deps/lld/test/ELF/text-section-prefix.s | 39 + deps/lld/test/ELF/tls-archive.s | 2 +- deps/lld/test/ELF/tls-error.s | 2 +- deps/lld/test/ELF/tls-got.s | 9 +- deps/lld/test/ELF/tls-in-archive.s | 2 +- deps/lld/test/ELF/tls-mismatch.s | 2 +- deps/lld/test/ELF/tls-opt-gdie.s | 1 + deps/lld/test/ELF/tls-opt-gdiele-i686.s | 1 + deps/lld/test/ELF/tls-opt-i686.s | 5 +- deps/lld/test/ELF/tls-opt-iele-i686-nopic.s | 1 + deps/lld/test/ELF/tls-opt-local.s | 1 + deps/lld/test/ELF/tls-opt-no-plt.s | 1 + deps/lld/test/ELF/tls-opt.s | 1 + deps/lld/test/ELF/tls-static.s | 2 +- deps/lld/test/ELF/trace-symbols.s | 8 +- deps/lld/test/ELF/typed-undef.s | 2 +- deps/lld/test/ELF/undef-broken-debug.test | 23 +- deps/lld/test/ELF/undef-shared.s | 3 +- deps/lld/test/ELF/undef-shared2.s | 11 + deps/lld/test/ELF/undef-start.s | 6 +- deps/lld/test/ELF/undef-version-script.s | 1 + deps/lld/test/ELF/undef.s | 18 +- deps/lld/test/ELF/undefined-opt.s | 2 +- deps/lld/test/ELF/unresolved-symbols.s | 10 +- deps/lld/test/ELF/user_def_init_array_start.s | 3 +- deps/lld/test/ELF/verdef-defaultver.s | 6 +- deps/lld/test/ELF/verneed-local.s | 2 +- deps/lld/test/ELF/verneed.s | 124 +- deps/lld/test/ELF/version-exclude-libs.s | 30 + .../ELF/version-script-complex-wildcards.s | 2 +- .../ELF/version-script-extern-undefined.s | 19 + deps/lld/test/ELF/version-script-extern.s | 2 +- deps/lld/test/ELF/version-script-extern2.s | 22 + deps/lld/test/ELF/version-script-glob.s | 2 +- .../test/ELF/version-script-in-search-path.s | 10 + deps/lld/test/ELF/version-script-missing.s | 2 +- deps/lld/test/ELF/version-script-no-warn.s | 2 +- deps/lld/test/ELF/version-script-no-warn2.s | 3 +- deps/lld/test/ELF/version-script-noundef.s | 2 + deps/lld/test/ELF/version-script-symver.s | 2 +- deps/lld/test/ELF/version-script.s | 9 +- deps/lld/test/ELF/version-symbol-error.s | 2 +- deps/lld/test/ELF/version-undef-sym.s | 2 +- deps/lld/test/ELF/visibility.s | 2 +- deps/lld/test/ELF/warn-backrefs.s | 48 + deps/lld/test/ELF/warn-common.s | 4 +- .../test/ELF/warn-unresolved-symbols-hidden.s | 2 +- deps/lld/test/ELF/warn-unresolved-symbols.s | 14 +- deps/lld/test/ELF/weak-and-strong-undef.s | 2 +- deps/lld/test/ELF/weak-shared-gc.s | 21 + deps/lld/test/ELF/weak-undef-lazy.s | 2 +- deps/lld/test/ELF/weak-undef-lib.s | 19 + deps/lld/test/ELF/whole-archive-name.s | 15 + deps/lld/test/ELF/wrap.s | 2 + deps/lld/test/ELF/writable-merge.s | 2 +- deps/lld/test/ELF/writable-sec-plt-reloc.s | 2 +- deps/lld/test/ELF/x86-64-dyn-rel-error.s | 6 +- deps/lld/test/ELF/x86-64-dyn-rel-error2.s | 4 +- deps/lld/test/ELF/x86-64-dyn-rel-error3.s | 16 + deps/lld/test/ELF/x86-64-plt-high-addr.s | 24 + deps/lld/test/ELF/x86-64-reloc-16.s | 4 +- deps/lld/test/ELF/x86-64-reloc-32-fpic.s | 4 +- deps/lld/test/ELF/x86-64-reloc-8.s | 4 +- .../test/ELF/x86-64-reloc-debug-overflow.s | 9 + .../test/ELF/x86-64-reloc-error-reporting.s | 19 + deps/lld/test/ELF/x86-64-reloc-error.s | 4 +- deps/lld/test/ELF/x86-64-reloc-error2.s | 14 + deps/lld/test/ELF/x86-64-reloc-gotoff64.s | 32 + deps/lld/test/ELF/x86-64-reloc-gotpc64.s | 14 + deps/lld/test/ELF/x86-64-reloc-pc32-fpic.s | 7 +- .../test/ELF/x86-64-reloc-range-debug-loc.s | 36 + deps/lld/test/ELF/x86-64-reloc-range.s | 3 +- deps/lld/test/ELF/x86-64-reloc-tpoff32-fpic.s | 4 +- .../test/ELF/x86-64-retpoline-linkerscript.s | 67 + .../ELF/x86-64-retpoline-znow-linkerscript.s | 54 + .../x86-64-split-stack-prologue-adjust-fail.s | 31 + ...86-64-split-stack-prologue-adjust-silent.s | 32 + ...6-64-split-stack-prologue-adjust-success.s | 124 ++ deps/lld/test/ELF/x86-64-tls-ld-local.s | 29 + deps/lld/test/ELF/zdefs.s | 1 + .../ELF/znotext-plt-relocations-protected.s | 4 +- deps/lld/test/ELF/znotext-weak-undef.s | 2 +- .../test/ELF/{ztext-text-notext.s => ztext.s} | 37 +- deps/lld/test/MinGW/driver.test | 21 + .../test/darwin/cmdline-lto_library.objtxt | 11 + deps/lld/test/darwin/cmdline-objc_gc.objtxt | 2 +- .../darwin/cmdline-objc_gc_compaction.objtxt | 2 +- .../test/darwin/cmdline-objc_gc_only.objtxt | 2 +- deps/lld/test/darwin/native-and-mach-o.objtxt | 2 +- deps/lld/test/lit.cfg.py | 12 +- deps/lld/test/lit.site.cfg.py.in | 3 + .../test/mach-o/Inputs/swift-version-1.yaml | 2 +- .../test/mach-o/Inputs/wrong-arch-error.yaml | 2 +- deps/lld/test/mach-o/PIE.yaml | 6 +- deps/lld/test/mach-o/align_text.yaml | 4 +- .../test/mach-o/arm-interworking-movw.yaml | 4 +- deps/lld/test/mach-o/arm-interworking.yaml | 4 +- deps/lld/test/mach-o/arm-shims.yaml | 2 +- .../mach-o/arm-subsections-via-symbols.yaml | 2 +- .../mach-o/arm64-reloc-negDelta32-fixup.yaml | 4 +- .../arm64-relocs-errors-delta64-offset.yaml | 2 +- deps/lld/test/mach-o/arm64-section-order.yaml | 4 +- deps/lld/test/mach-o/bind-opcodes.yaml | 2 +- deps/lld/test/mach-o/cstring-sections.yaml | 2 +- .../mach-o/data-in-code-load-command.yaml | 16 +- deps/lld/test/mach-o/data-only-dylib.yaml | 2 +- deps/lld/test/mach-o/dead-strip-globals.yaml | 8 +- deps/lld/test/mach-o/debug-syms.yaml | 2 +- deps/lld/test/mach-o/demangle.yaml | 4 +- deps/lld/test/mach-o/dependency_info.yaml | 4 +- .../mach-o/do-not-emit-unwind-fde-arm64.yaml | 4 +- deps/lld/test/mach-o/dso_handle.yaml | 8 +- deps/lld/test/mach-o/dylib-install-names.yaml | 8 +- .../test/mach-o/eh-frame-relocs-arm64.yaml | 4 +- .../mach-o/error-simulator-vs-macosx.yaml | 4 +- deps/lld/test/mach-o/exe-offsets.yaml | 2 +- deps/lld/test/mach-o/exe-segment-overlap.yaml | 2 +- deps/lld/test/mach-o/executable-exports.yaml | 2 +- deps/lld/test/mach-o/export-trie-order.yaml | 2 +- .../mach-o/exported_symbols_list-dylib.yaml | 8 +- .../mach-o/exported_symbols_list-obj.yaml | 6 +- .../mach-o/exported_symbols_list-undef.yaml | 2 +- deps/lld/test/mach-o/fat-archive.yaml | 2 +- deps/lld/test/mach-o/filelist.yaml | 4 +- .../mach-o/flat_namespace_undef_error.yaml | 2 +- .../mach-o/flat_namespace_undef_suppress.yaml | 2 +- deps/lld/test/mach-o/force_load-dylib.yaml | 4 +- deps/lld/test/mach-o/force_load-x86_64.yaml | 4 +- .../lld/test/mach-o/framework-user-paths.yaml | 2 +- .../mach-o/function-starts-load-command.yaml | 10 +- .../test/mach-o/gcc_except_tab-got-arm64.yaml | 2 +- deps/lld/test/mach-o/got-order.yaml | 2 +- deps/lld/test/mach-o/hello-world-arm64.yaml | 2 +- deps/lld/test/mach-o/hello-world-armv6.yaml | 2 +- deps/lld/test/mach-o/hello-world-armv7.yaml | 2 +- deps/lld/test/mach-o/hello-world-x86.yaml | 2 +- deps/lld/test/mach-o/hello-world-x86_64.yaml | 4 +- deps/lld/test/mach-o/image-base.yaml | 8 +- deps/lld/test/mach-o/infer-arch.yaml | 4 +- deps/lld/test/mach-o/interposing-section.yaml | 4 +- .../lld/test/mach-o/keep_private_externs.yaml | 4 +- deps/lld/test/mach-o/lazy-bind-x86_64.yaml | 2 +- deps/lld/test/mach-o/lc_segment_filesize.yaml | 2 +- deps/lld/test/mach-o/lib-search-paths.yaml | 2 +- deps/lld/test/mach-o/library-order.yaml | 2 +- deps/lld/test/mach-o/library-rescan.yaml | 2 +- .../libresolve-bizarre-root-override.yaml | 2 +- .../libresolve-multiple-syslibroots.yaml | 2 +- .../mach-o/libresolve-one-syslibroot.yaml | 2 +- deps/lld/test/mach-o/libresolve-simple.yaml | 2 +- .../test/mach-o/libresolve-user-paths.yaml | 2 +- deps/lld/test/mach-o/libresolve-z.yaml | 2 +- .../test/mach-o/mach_header-cpusubtype.yaml | 6 +- deps/lld/test/mach-o/mh_bundle_header.yaml | 4 +- deps/lld/test/mach-o/mh_dylib_header.yaml | 2 +- .../test/mach-o/objc-category-list-atom.yaml | 4 +- .../objc-image-info-host-vs-simulator.yaml | 2 +- .../mach-o/objc-image-info-invalid-size.yaml | 2 +- .../objc-image-info-invalid-version.yaml | 2 +- ...c-image-info-mismatched-swift-version.yaml | 2 +- .../mach-o/objc-image-info-pass-output.yaml | 2 +- .../objc-image-info-simulator-vs-host.yaml | 2 +- .../objc-image-info-unsupported-gc.yaml | 2 +- deps/lld/test/mach-o/objc_export_list.yaml | 2 +- deps/lld/test/mach-o/order_file-basic.yaml | 2 +- deps/lld/test/mach-o/parse-aliases.yaml | 2 +- deps/lld/test/mach-o/parse-arm-relocs.yaml | 4 +- deps/lld/test/mach-o/parse-cfstring32.yaml | 2 +- deps/lld/test/mach-o/parse-cfstring64.yaml | 2 +- .../test/mach-o/parse-compact-unwind32.yaml | 2 +- .../test/mach-o/parse-compact-unwind64.yaml | 2 +- .../test/mach-o/parse-data-in-code-armv7.yaml | 6 +- .../test/mach-o/parse-data-in-code-x86.yaml | 4 +- .../test/mach-o/parse-data-relocs-arm64.yaml | 4 +- .../test/mach-o/parse-data-relocs-x86_64.yaml | 4 +- deps/lld/test/mach-o/parse-data.yaml | 2 +- .../mach-o/parse-eh-frame-relocs-x86_64.yaml | 2 +- .../test/mach-o/parse-eh-frame-x86-anon.yaml | 2 +- .../mach-o/parse-eh-frame-x86-labeled.yaml | 2 +- deps/lld/test/mach-o/parse-eh-frame.yaml | 2 +- deps/lld/test/mach-o/parse-function.yaml | 4 +- .../lld/test/mach-o/parse-initializers32.yaml | 2 +- .../lld/test/mach-o/parse-initializers64.yaml | 2 +- .../lld/test/mach-o/parse-literals-error.yaml | 2 +- deps/lld/test/mach-o/parse-literals.yaml | 2 +- .../test/mach-o/parse-non-lazy-pointers.yaml | 2 +- deps/lld/test/mach-o/parse-relocs-x86.yaml | 4 +- .../test/mach-o/parse-section-no-symbol.yaml | 2 +- .../lld/test/mach-o/parse-tentative-defs.yaml | 2 +- .../test/mach-o/parse-text-relocs-arm64.yaml | 4 +- .../test/mach-o/parse-text-relocs-x86_64.yaml | 4 +- .../test/mach-o/parse-tlv-relocs-x86-64.yaml | 4 +- .../mach-o/re-exported-dylib-ordinal.yaml | 2 +- deps/lld/test/mach-o/rpath.yaml | 2 +- deps/lld/test/mach-o/run-tlv-pass-x86-64.yaml | 4 +- deps/lld/test/mach-o/sdk-version-error.yaml | 2 +- deps/lld/test/mach-o/sectalign.yaml | 2 +- deps/lld/test/mach-o/sectattrs.yaml | 2 +- deps/lld/test/mach-o/sectcreate.yaml | 2 +- .../lld/test/mach-o/seg-protection-arm64.yaml | 2 +- .../test/mach-o/seg-protection-x86_64.yaml | 2 +- deps/lld/test/mach-o/source-version.yaml | 4 +- deps/lld/test/mach-o/stack-size.yaml | 8 +- deps/lld/test/mach-o/string-table.yaml | 2 +- .../subsections-via-symbols-default.yaml | 2 +- ...olevel_namespace_undef_dynamic_lookup.yaml | 2 +- ...evel_namespace_undef_warning_suppress.yaml | 4 +- .../test/mach-o/unwind-info-simple-arm64.yaml | 2 +- .../mach-o/unwind-info-simple-x86_64.yaml | 2 +- .../mach-o/upward-dylib-load-command.yaml | 4 +- deps/lld/test/mach-o/upward-dylib-paths.yaml | 2 +- deps/lld/test/mach-o/usage.yaml | 2 +- deps/lld/test/mach-o/use-dylib.yaml | 2 +- deps/lld/test/mach-o/use-simple-dylib.yaml | 2 +- .../version-min-load-command-object.yaml | 6 +- .../test/mach-o/version-min-load-command.yaml | 14 +- .../lld/test/mach-o/write-final-sections.yaml | 2 +- deps/lld/test/mach-o/wrong-arch-error.yaml | 2 +- deps/lld/test/wasm/Inputs/archive1.ll | 2 + deps/lld/test/wasm/Inputs/archive2.ll | 7 + deps/lld/test/wasm/Inputs/archive3.ll | 11 + deps/lld/test/wasm/Inputs/call-indirect.ll | 13 +- deps/lld/test/wasm/Inputs/comdat1.ll | 13 + deps/lld/test/wasm/Inputs/comdat2.ll | 13 + deps/lld/test/wasm/Inputs/custom.ll | 6 + deps/lld/test/wasm/Inputs/debuginfo1.ll | 68 + deps/lld/test/wasm/Inputs/debuginfo2.ll | 70 + deps/lld/test/wasm/Inputs/global-ctor-dtor.ll | 14 +- deps/lld/test/wasm/Inputs/globals.yaml | 54 + deps/lld/test/wasm/Inputs/hello.ll | 2 + deps/lld/test/wasm/Inputs/hidden.ll | 2 + .../lld/test/wasm/Inputs/locals-duplicate1.ll | 51 + .../lld/test/wasm/Inputs/locals-duplicate2.ll | 51 + deps/lld/test/wasm/Inputs/many-funcs.ll | 2 + deps/lld/test/wasm/Inputs/ret32.ll | 6 +- deps/lld/test/wasm/Inputs/ret64.ll | 4 +- deps/lld/test/wasm/Inputs/start.ll | 6 + deps/lld/test/wasm/Inputs/strong-symbol.ll | 6 + .../test/wasm/Inputs/undefined-globals.yaml | 52 + deps/lld/test/wasm/Inputs/weak-alias.ll | 2 + deps/lld/test/wasm/Inputs/weak-symbol1.ll | 2 + deps/lld/test/wasm/Inputs/weak-symbol2.ll | 2 + deps/lld/test/wasm/alias.ll | 88 + deps/lld/test/wasm/archive.ll | 58 +- deps/lld/test/wasm/call-indirect.ll | 119 +- deps/lld/test/wasm/comdats.ll | 99 + deps/lld/test/wasm/compress-relocs.ll | 22 + deps/lld/test/wasm/conflict.test | 4 +- deps/lld/test/wasm/custom-sections.ll | 22 + deps/lld/test/wasm/cxx-mangling.ll | 66 + deps/lld/test/wasm/data-layout.ll | 153 +- deps/lld/test/wasm/data-segment-merging.ll | 48 + deps/lld/test/wasm/debuginfo.test | 85 + deps/lld/test/wasm/demangle.ll | 17 + deps/lld/test/wasm/driver.ll | 22 + deps/lld/test/wasm/entry-signature.ll | 10 + deps/lld/test/wasm/entry.ll | 59 +- deps/lld/test/wasm/export-all.ll | 48 + deps/lld/test/wasm/export-table.test | 19 + deps/lld/test/wasm/export.ll | 37 + deps/lld/test/wasm/fatal-warnings.ll | 17 + deps/lld/test/wasm/function-imports-first.ll | 28 +- deps/lld/test/wasm/function-imports.ll | 25 +- deps/lld/test/wasm/function-index.test | 6 +- deps/lld/test/wasm/gc-imports.ll | 93 + deps/lld/test/wasm/gc-sections.ll | 153 ++ deps/lld/test/wasm/import-memory.test | 28 +- deps/lld/test/wasm/import-table.test | 18 + deps/lld/test/wasm/init-fini.ll | 317 ++- deps/lld/test/wasm/invalid-stack-size.test | 9 +- deps/lld/test/wasm/load-undefined.ll | 38 - deps/lld/test/wasm/load-undefined.test | 40 + deps/lld/test/wasm/local-symbols.ll | 71 +- deps/lld/test/wasm/locals-duplicate.test | 568 +++++ deps/lld/test/wasm/lto/Inputs/archive.ll | 6 + deps/lld/test/wasm/lto/Inputs/cache.ll | 10 + deps/lld/test/wasm/lto/Inputs/save-temps.ll | 6 + deps/lld/test/wasm/lto/Inputs/thinlto.ll | 7 + deps/lld/test/wasm/lto/Inputs/used.ll | 8 + deps/lld/test/wasm/lto/archive.ll | 25 + deps/lld/test/wasm/lto/atomics.ll | 14 + deps/lld/test/wasm/lto/cache.ll | 38 + deps/lld/test/wasm/lto/diagnostics.ll | 22 + deps/lld/test/wasm/lto/export.ll | 38 + deps/lld/test/wasm/lto/incompatible.ll | 8 + deps/lld/test/wasm/lto/internalize-basic.ll | 20 + deps/lld/test/wasm/lto/lto-start.ll | 18 + deps/lld/test/wasm/lto/opt-level.ll | 30 + deps/lld/test/wasm/lto/parallel.ll | 24 + deps/lld/test/wasm/lto/save-temps.ll | 19 + deps/lld/test/wasm/lto/thinlto.ll | 34 + deps/lld/test/wasm/lto/undef.ll | 20 + deps/lld/test/wasm/lto/used.ll | 45 + deps/lld/test/wasm/lto/verify-invalid.ll | 16 + deps/lld/test/wasm/lto/weak.ll | 16 + deps/lld/test/wasm/many-functions.ll | 1323 +++++++++--- deps/lld/test/wasm/reloc-addend.ll | 19 + deps/lld/test/wasm/relocatable.ll | 241 ++- deps/lld/test/wasm/responsefile.test | 10 + deps/lld/test/wasm/signature-mismatch-weak.ll | 18 + deps/lld/test/wasm/signature-mismatch.ll | 16 +- deps/lld/test/wasm/stack-first.test | 42 + deps/lld/test/wasm/stack-pointer.ll | 50 +- deps/lld/test/wasm/strip-debug.test | 4 +- deps/lld/test/wasm/symbol-type-mismatch.ll | 12 +- deps/lld/test/wasm/undefined-entry.test | 11 +- deps/lld/test/wasm/undefined-weak-call.ll | 120 ++ deps/lld/test/wasm/undefined.ll | 18 +- deps/lld/test/wasm/version.ll | 6 +- deps/lld/test/wasm/visibility-hidden.ll | 26 +- deps/lld/test/wasm/weak-alias-overide.ll | 108 +- deps/lld/test/wasm/weak-alias.ll | 273 ++- deps/lld/test/wasm/weak-symbols.ll | 88 +- .../{weak-external.ll => weak-undefined.ll} | 75 +- deps/lld/test/wasm/whole-archive.test | 34 + deps/lld/tools/lld/lld.cpp | 49 +- .../DriverTests/DarwinLdDriverTest.cpp | 9 +- .../MachONormalizedFileBinaryReaderTests.cpp | 15 +- deps/lld/wasm/CMakeLists.txt | 16 +- deps/lld/wasm/Config.h | 24 +- deps/lld/wasm/Driver.cpp | 374 +++- deps/lld/wasm/InputChunks.cpp | 295 +++ deps/lld/wasm/InputChunks.h | 236 +++ deps/lld/wasm/InputFiles.cpp | 472 +++-- deps/lld/wasm/InputFiles.h | 97 +- deps/lld/wasm/InputGlobal.h | 59 + deps/lld/wasm/InputSegment.cpp | 25 - deps/lld/wasm/InputSegment.h | 76 - deps/lld/wasm/LTO.cpp | 155 ++ deps/lld/wasm/LTO.h | 57 + deps/lld/wasm/MarkLive.cpp | 118 ++ deps/lld/wasm/MarkLive.h | 21 + deps/lld/wasm/Options.td | 133 +- deps/lld/wasm/OutputSections.cpp | 287 +-- deps/lld/wasm/OutputSections.h | 50 +- deps/lld/wasm/OutputSegment.h | 26 +- deps/lld/wasm/SymbolTable.cpp | 410 ++-- deps/lld/wasm/SymbolTable.h | 43 +- deps/lld/wasm/Symbols.cpp | 242 ++- deps/lld/wasm/Symbols.h | 347 ++- deps/lld/wasm/Writer.cpp | 982 ++++++--- deps/lld/wasm/WriterUtils.cpp | 113 +- deps/lld/wasm/WriterUtils.h | 46 +- 1598 files changed, 41056 insertions(+), 12097 deletions(-) rename deps/lld/COFF/{Strings.h => ICF.h} (51%) create mode 100644 deps/lld/COFF/MarkLive.h delete mode 100644 deps/lld/COFF/Strings.cpp create mode 100644 deps/lld/Common/Timer.cpp create mode 100644 deps/lld/ELF/Arch/Hexagon.cpp create mode 100644 deps/lld/ELF/CallGraphSort.cpp create mode 100644 deps/lld/ELF/CallGraphSort.h create mode 100644 deps/lld/ELF/MarkLive.h delete mode 100644 deps/lld/ELF/Strings.cpp delete mode 100644 deps/lld/ELF/Strings.h create mode 100644 deps/lld/docs/ld.lld.1 create mode 100644 deps/lld/include/lld/Common/Timer.h create mode 100644 deps/lld/test/COFF/Inputs/far-arm64-abs.s create mode 100644 deps/lld/test/COFF/Inputs/generic.yaml create mode 100644 deps/lld/test/COFF/Inputs/globals-dia-func-collision3.obj create mode 100644 deps/lld/test/COFF/Inputs/globals-dia-vfunc-collision.obj create mode 100644 deps/lld/test/COFF/Inputs/globals-dia-vfunc-collision2.obj create mode 100644 deps/lld/test/COFF/Inputs/globals-dia-vfunc-simple.obj create mode 100644 deps/lld/test/COFF/Inputs/guardcf-align-foobar.yaml create mode 100644 deps/lld/test/COFF/Inputs/loadconfig-cfg-x64.s create mode 100644 deps/lld/test/COFF/Inputs/natvis-1.natvis create mode 100644 deps/lld/test/COFF/Inputs/natvis-2.natvis create mode 100644 deps/lld/test/COFF/Inputs/natvis-3.natvis create mode 100644 deps/lld/test/COFF/Inputs/order.yaml create mode 100644 deps/lld/test/COFF/Inputs/otherFunc.s create mode 100644 deps/lld/test/COFF/Inputs/pdb-file-statics-a.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb-file-statics-b.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb_lines_1_relative.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb_lines_2_relative.yaml create mode 100644 deps/lld/test/COFF/arm64-branch-range.test create mode 100644 deps/lld/test/COFF/crt-chars.test create mode 100644 deps/lld/test/COFF/debug-reloc.s create mode 100644 deps/lld/test/COFF/default-alignment.test create mode 100644 deps/lld/test/COFF/dllexport.s create mode 100644 deps/lld/test/COFF/entry-inference3.test create mode 100644 deps/lld/test/COFF/fixed.test create mode 100644 deps/lld/test/COFF/gfids-corrupt.s create mode 100644 deps/lld/test/COFF/gfids-fallback.s create mode 100644 deps/lld/test/COFF/gfids-gc.s create mode 100644 deps/lld/test/COFF/gfids-icf.s create mode 100644 deps/lld/test/COFF/guard-longjmp.s create mode 100644 deps/lld/test/COFF/guardcf-align.s create mode 100644 deps/lld/test/COFF/guardcf-lto.ll create mode 100644 deps/lld/test/COFF/icf-pdata.s create mode 100644 deps/lld/test/COFF/icf-vtables.s create mode 100644 deps/lld/test/COFF/incremental.test create mode 100644 deps/lld/test/COFF/invalid-section-number.test create mode 100644 deps/lld/test/COFF/lto-icf.ll create mode 100644 deps/lld/test/COFF/order-i386.test create mode 100644 deps/lld/test/COFF/output-chars.test delete mode 100644 deps/lld/test/COFF/pdb-diff.test create mode 100644 deps/lld/test/COFF/pdb-exe-path-dots.test create mode 100644 deps/lld/test/COFF/pdb-file-static.test create mode 100644 deps/lld/test/COFF/pdb-globals-dia-func-collision3.test create mode 100644 deps/lld/test/COFF/pdb-globals-dia-vfunc-collision.test create mode 100644 deps/lld/test/COFF/pdb-globals-dia-vfunc-collision2.test create mode 100644 deps/lld/test/COFF/pdb-globals-dia-vfunc-simple.test create mode 100644 deps/lld/test/COFF/pdb-natvis.test create mode 100644 deps/lld/test/COFF/pdb-relative-source-lines.test create mode 100644 deps/lld/test/COFF/pending-comdat.s create mode 100644 deps/lld/test/COFF/safeseh-notable.s create mode 100644 deps/lld/test/COFF/section-order.test create mode 100644 deps/lld/test/COFF/string-tail-merge.s create mode 100644 deps/lld/test/COFF/symtab-gc.s create mode 100644 deps/lld/test/COFF/thunk-replace.s create mode 100644 deps/lld/test/COFF/timestamp.test create mode 100644 deps/lld/test/COFF/undefined-symbol-cv.s create mode 100644 deps/lld/test/COFF/undefined-symbol.s delete mode 100644 deps/lld/test/ELF/Inputs/amdgpu-kernel-2.o create mode 100644 deps/lld/test/ELF/Inputs/arm-long-thunk-converge.lds create mode 100644 deps/lld/test/ELF/Inputs/arm-vfp-arg-base.s create mode 100644 deps/lld/test/ELF/Inputs/arm-vfp-arg-compat.s create mode 100644 deps/lld/test/ELF/Inputs/arm-vfp-arg-toolchain.s create mode 100644 deps/lld/test/ELF/Inputs/arm-vfp-arg-vfp.s create mode 100644 deps/lld/test/ELF/Inputs/comdat-discarded-reloc.s create mode 100644 deps/lld/test/ELF/Inputs/copy-rel-version.s create mode 100644 deps/lld/test/ELF/Inputs/copy-relocation-zero-abs-addr.s create mode 100644 deps/lld/test/ELF/Inputs/copy-relocation-zero-nonabs-addr.s create mode 100644 deps/lld/test/ELF/Inputs/copy-relocation-zero-nonabs-addr.script create mode 100644 deps/lld/test/ELF/Inputs/eh-frame-pcrel-overflow.s create mode 100644 deps/lld/test/ELF/Inputs/exclude-libs.ll create mode 100644 deps/lld/test/ELF/Inputs/far-long-arm-abs.s create mode 100644 deps/lld/test/ELF/Inputs/hexagon.s create mode 100644 deps/lld/test/ELF/Inputs/hidden-shared-err.s create mode 100644 deps/lld/test/ELF/Inputs/hidden-shared-err2.s create mode 100644 deps/lld/test/ELF/Inputs/i386-pic-plt.s create mode 100644 deps/lld/test/ELF/Inputs/icf-absolute2.s create mode 100644 deps/lld/test/ELF/Inputs/icf-safe.s create mode 100644 deps/lld/test/ELF/Inputs/mips-64-got-load.s create mode 100644 deps/lld/test/ELF/Inputs/mips-mgot-1.s create mode 100644 deps/lld/test/ELF/Inputs/mips-mgot-2.s create mode 100644 deps/lld/test/ELF/Inputs/mips-micro-gp0-non-zero.o delete mode 100644 deps/lld/test/ELF/Inputs/mips-n32-rels.o create mode 100644 deps/lld/test/ELF/Inputs/mips-n64-gp0-non-zero.o create mode 100644 deps/lld/test/ELF/Inputs/multiple-cu.s create mode 100644 deps/lld/test/ELF/Inputs/ppc64-func-global-entry.s create mode 100644 deps/lld/test/ELF/Inputs/ppc64-func-local-entry.s create mode 100644 deps/lld/test/ELF/Inputs/ppc64-func.s create mode 100644 deps/lld/test/ELF/Inputs/ppc64-tls.s create mode 100644 deps/lld/test/ELF/Inputs/print-icf.s create mode 100644 deps/lld/test/ELF/Inputs/protected-data-access.s create mode 100644 deps/lld/test/ELF/Inputs/protected-function-access.s create mode 100644 deps/lld/test/ELF/Inputs/symbol-ordering-file-warnings1.s create mode 100644 deps/lld/test/ELF/Inputs/symbol-ordering-file-warnings2.s create mode 100644 deps/lld/test/ELF/Inputs/undef-bad-debug.s create mode 100644 deps/lld/test/ELF/Inputs/undef-shared2.s create mode 100644 deps/lld/test/ELF/Inputs/versiondef.s delete mode 100644 deps/lld/test/ELF/Inputs/weak-and-strong-undef.s create mode 100644 deps/lld/test/ELF/Inputs/x86-64-split-stack-main.s rename deps/lld/test/ELF/Inputs/{ztext-text-notext.s => ztext.s} (100%) create mode 100644 deps/lld/test/ELF/aarch64-tlsld-ldst.s create mode 100644 deps/lld/test/ELF/arm-execute-only.s create mode 100644 deps/lld/test/ELF/arm-exidx-discard.s create mode 100644 deps/lld/test/ELF/arm-long-thunk-converge.s create mode 100644 deps/lld/test/ELF/arm-symbol-ordering-file.s create mode 100644 deps/lld/test/ELF/arm-tag-vfp-args-errs.s create mode 100644 deps/lld/test/ELF/arm-tag-vfp-args-illegal.s create mode 100644 deps/lld/test/ELF/arm-tag-vfp-args.s create mode 100644 deps/lld/test/ELF/arm-thunk-nosuitable.s create mode 100644 deps/lld/test/ELF/arm-thunk-section-too-large.s create mode 100644 deps/lld/test/ELF/as-needed-weak.s create mode 100644 deps/lld/test/ELF/basic-ppc64.s create mode 100644 deps/lld/test/ELF/cgprofile-bad-clusters.s create mode 100644 deps/lld/test/ELF/cgprofile-err.s create mode 100644 deps/lld/test/ELF/cgprofile-icf.s create mode 100644 deps/lld/test/ELF/cgprofile-txt.s create mode 100644 deps/lld/test/ELF/cgprofile-warn.s create mode 100644 deps/lld/test/ELF/comdat-discarded-reloc.s create mode 100644 deps/lld/test/ELF/compressed-debug-input-err.s create mode 100644 deps/lld/test/ELF/conflict-debug-variable-file-index.s create mode 100644 deps/lld/test/ELF/conflict-variable-linkage-name.s create mode 100644 deps/lld/test/ELF/copy-rel-version.s create mode 100644 deps/lld/test/ELF/copy-relocation-zero-abs-addr.s create mode 100644 deps/lld/test/ELF/copy-relocation-zero-nonabs-addr.s create mode 100644 deps/lld/test/ELF/cref.s create mode 100644 deps/lld/test/ELF/defsym-reserved-syms.s create mode 100644 deps/lld/test/ELF/dynamic-linker.s create mode 100644 deps/lld/test/ELF/dynamic-list-archive.s create mode 100644 deps/lld/test/ELF/eh-frame-negative-pcrel-sdata2.s create mode 100644 deps/lld/test/ELF/eh-frame-negative-pcrel-sdata4.s create mode 100644 deps/lld/test/ELF/eh-frame-negative-pcrel-sdata8.s create mode 100644 deps/lld/test/ELF/eh-frame-pcrel-overflow.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format1.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format2.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format3.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format4.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format5.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format6.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format7.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format8.s create mode 100644 deps/lld/test/ELF/eh-frame-value-format9.s create mode 100644 deps/lld/test/ELF/elf-header.s create mode 100644 deps/lld/test/ELF/emit-relocs-eh-frame.s create mode 100644 deps/lld/test/ELF/emit-relocs-icf.s create mode 100644 deps/lld/test/ELF/empty-ver2.s create mode 100644 deps/lld/test/ELF/execute-only-mixed-data.s create mode 100644 deps/lld/test/ELF/execute-only.s create mode 100644 deps/lld/test/ELF/export-dynamic-symbol.s delete mode 100644 deps/lld/test/ELF/file-sym.s create mode 100644 deps/lld/test/ELF/fill-trap-ppc.s create mode 100644 deps/lld/test/ELF/gc-sections-no-undef-error.s delete mode 100644 deps/lld/test/ELF/gdb-index-dup-types.s create mode 100644 deps/lld/test/ELF/hexagon.s create mode 100644 deps/lld/test/ELF/hidden-shared-err.s create mode 100644 deps/lld/test/ELF/i386-pic-plt.s create mode 100644 deps/lld/test/ELF/i386-reloc-16-large-addend.s create mode 100644 deps/lld/test/ELF/i386-reloc-8-large-addend.s create mode 100644 deps/lld/test/ELF/i386-retpoline-nopic-linkerscript.s create mode 100644 deps/lld/test/ELF/i386-retpoline-pic-linkerscript.s create mode 100644 deps/lld/test/ELF/icf-absolute2.s create mode 100644 deps/lld/test/ELF/icf-c-identifier.s create mode 100644 deps/lld/test/ELF/icf-different-output-sections.s create mode 100644 deps/lld/test/ELF/icf-keep-unique.s create mode 100644 deps/lld/test/ELF/icf-link-order.s create mode 100644 deps/lld/test/ELF/icf-many-sections.s create mode 100644 deps/lld/test/ELF/icf-merge2.s create mode 100644 deps/lld/test/ELF/icf-merged-sections.s create mode 100644 deps/lld/test/ELF/icf-relro.s create mode 100644 deps/lld/test/ELF/icf-safe.s create mode 100644 deps/lld/test/ELF/icf10.test create mode 100644 deps/lld/test/ELF/icf11.test create mode 100644 deps/lld/test/ELF/icf12.s create mode 100644 deps/lld/test/ELF/icf13.s create mode 100644 deps/lld/test/ELF/icf14.s create mode 100644 deps/lld/test/ELF/icf15.s create mode 100644 deps/lld/test/ELF/icf16.s create mode 100644 deps/lld/test/ELF/icf17.s create mode 100644 deps/lld/test/ELF/ignore-plugin.test create mode 100644 deps/lld/test/ELF/invalid-eh-frame.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame2.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame3.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame4.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame5.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame6.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame7.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame8.s create mode 100644 deps/lld/test/ELF/invalid-eh-frame9.s delete mode 100644 deps/lld/test/ELF/invalid-z.s delete mode 100644 deps/lld/test/ELF/invalid/Inputs/cie-version2.elf delete mode 100644 deps/lld/test/ELF/invalid/Inputs/too-short.elf create mode 100644 deps/lld/test/ELF/invalid/executable.s create mode 100644 deps/lld/test/ELF/invalid/reloc-section-reordered.test delete mode 100644 deps/lld/test/ELF/invalid/too-short.s create mode 100644 deps/lld/test/ELF/just-symbols-cref.s create mode 100644 deps/lld/test/ELF/just-symbols.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/addr.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/align.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/alignof.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/at2.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/at3.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/data-commands.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/data-segment-relro.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/define.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/eh-frame-reloc-out-of-range.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/extend-pt-load.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/fill.s delete mode 100644 deps/lld/test/ELF/linkerscript/Inputs/implicit-program-header.script create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/insert-after.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/insert-after.script create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/map-file2.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/provide-shared2.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/sections-va-overflow.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/synthetic-symbols.s rename deps/lld/test/ELF/linkerscript/{absolute-expr.s => absolute-expr.test} (74%) rename deps/lld/test/ELF/linkerscript/{addr-zero.s => addr-zero.test} (62%) delete mode 100644 deps/lld/test/ELF/linkerscript/addr.s create mode 100644 deps/lld/test/ELF/linkerscript/addr.test create mode 100644 deps/lld/test/ELF/linkerscript/address-expr-symbols.s delete mode 100644 deps/lld/test/ELF/linkerscript/align-empty.s create mode 100644 deps/lld/test/ELF/linkerscript/align-empty.test create mode 100644 deps/lld/test/ELF/linkerscript/align-r.test delete mode 100644 deps/lld/test/ELF/linkerscript/align-section-offset.s create mode 100644 deps/lld/test/ELF/linkerscript/align-section-offset.test delete mode 100644 deps/lld/test/ELF/linkerscript/align-section.s create mode 100644 deps/lld/test/ELF/linkerscript/align-section.test delete mode 100644 deps/lld/test/ELF/linkerscript/align.s create mode 100644 deps/lld/test/ELF/linkerscript/align1.test create mode 100644 deps/lld/test/ELF/linkerscript/align2.test create mode 100644 deps/lld/test/ELF/linkerscript/align3.test create mode 100644 deps/lld/test/ELF/linkerscript/align4.test create mode 100644 deps/lld/test/ELF/linkerscript/align5.test delete mode 100644 deps/lld/test/ELF/linkerscript/alignof.s create mode 100644 deps/lld/test/ELF/linkerscript/alignof.test delete mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-order.s create mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-order.test delete mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-phdrs.s create mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-phdrs.test delete mode 100644 deps/lld/test/ELF/linkerscript/arm-lscript.s create mode 100644 deps/lld/test/ELF/linkerscript/arm-lscript.test delete mode 100644 deps/lld/test/ELF/linkerscript/at2.s create mode 100644 deps/lld/test/ELF/linkerscript/at2.test delete mode 100644 deps/lld/test/ELF/linkerscript/at3.s create mode 100644 deps/lld/test/ELF/linkerscript/at3.test create mode 100644 deps/lld/test/ELF/linkerscript/at4.s create mode 100644 deps/lld/test/ELF/linkerscript/at5.test create mode 100644 deps/lld/test/ELF/linkerscript/broken-memory-declaration.s delete mode 100644 deps/lld/test/ELF/linkerscript/bss-fill.s create mode 100644 deps/lld/test/ELF/linkerscript/bss-fill.test rename deps/lld/test/ELF/linkerscript/{common-filespec.s => common-filespec.test} (88%) rename deps/lld/test/ELF/linkerscript/{constructor.s => constructor.test} (50%) delete mode 100644 deps/lld/test/ELF/linkerscript/data-commands.s create mode 100644 deps/lld/test/ELF/linkerscript/data-commands1.test create mode 100644 deps/lld/test/ELF/linkerscript/data-commands2.test rename deps/lld/test/ELF/linkerscript/{data-segment-relro.s => data-segment-relro.test} (63%) delete mode 100644 deps/lld/test/ELF/linkerscript/define.s create mode 100644 deps/lld/test/ELF/linkerscript/define.test create mode 100644 deps/lld/test/ELF/linkerscript/defsym.s create mode 100644 deps/lld/test/ELF/linkerscript/diag1.test create mode 100644 deps/lld/test/ELF/linkerscript/diag2.test create mode 100644 deps/lld/test/ELF/linkerscript/diag3.test create mode 100644 deps/lld/test/ELF/linkerscript/diag4.test create mode 100644 deps/lld/test/ELF/linkerscript/diag5.test create mode 100644 deps/lld/test/ELF/linkerscript/diag6.test delete mode 100644 deps/lld/test/ELF/linkerscript/diagnostic.s create mode 100644 deps/lld/test/ELF/linkerscript/discard-gnu-hash.s delete mode 100644 deps/lld/test/ELF/linkerscript/discard-interp.s create mode 100644 deps/lld/test/ELF/linkerscript/discard-interp.test delete mode 100644 deps/lld/test/ELF/linkerscript/double-bss.s create mode 100644 deps/lld/test/ELF/linkerscript/double-bss.test create mode 100644 deps/lld/test/ELF/linkerscript/eh-frame-emit-relocs.s delete mode 100644 deps/lld/test/ELF/linkerscript/eh-frame-reloc-out-of-range.s create mode 100644 deps/lld/test/ELF/linkerscript/eh-frame-reloc-out-of-range.test create mode 100644 deps/lld/test/ELF/linkerscript/empty-link-order.test create mode 100644 deps/lld/test/ELF/linkerscript/empty-section-size.test create mode 100644 deps/lld/test/ELF/linkerscript/empty-sections-expressions.s create mode 100644 deps/lld/test/ELF/linkerscript/empty-synthetic-removed-flags.s delete mode 100644 deps/lld/test/ELF/linkerscript/empty-tls.s create mode 100644 deps/lld/test/ELF/linkerscript/empty-tls.test delete mode 100644 deps/lld/test/ELF/linkerscript/exidx-crash.s create mode 100644 deps/lld/test/ELF/linkerscript/exidx-crash.test delete mode 100644 deps/lld/test/ELF/linkerscript/expr-invalid-sec.s create mode 100644 deps/lld/test/ELF/linkerscript/expr-invalid-sec.test delete mode 100644 deps/lld/test/ELF/linkerscript/expr-sections.s create mode 100644 deps/lld/test/ELF/linkerscript/expr-sections.test delete mode 100644 deps/lld/test/ELF/linkerscript/extend-pt-load.s create mode 100644 deps/lld/test/ELF/linkerscript/extend-pt-load1.test create mode 100644 deps/lld/test/ELF/linkerscript/extend-pt-load2.test create mode 100644 deps/lld/test/ELF/linkerscript/extend-pt-load3.test delete mode 100644 deps/lld/test/ELF/linkerscript/fill.s create mode 100644 deps/lld/test/ELF/linkerscript/fill.test rename deps/lld/test/ELF/linkerscript/{header-addr.s => header-addr.test} (73%) delete mode 100644 deps/lld/test/ELF/linkerscript/header-phdr.s create mode 100644 deps/lld/test/ELF/linkerscript/header-phdr.test create mode 100644 deps/lld/test/ELF/linkerscript/header-phdr2.s create mode 100644 deps/lld/test/ELF/linkerscript/i386-sections-max-va-overflow.s delete mode 100644 deps/lld/test/ELF/linkerscript/implicit-program-header.s create mode 100644 deps/lld/test/ELF/linkerscript/implicit-program-header.test create mode 100644 deps/lld/test/ELF/linkerscript/info-section-type.s create mode 100644 deps/lld/test/ELF/linkerscript/insert-after.test create mode 100644 deps/lld/test/ELF/linkerscript/insert-before.test create mode 100644 deps/lld/test/ELF/linkerscript/insert-broken.test rename deps/lld/test/ELF/linkerscript/{lazy-symbols.s => lazy-symbols.test} (68%) create mode 100644 deps/lld/test/ELF/linkerscript/lma-overflow.test delete mode 100644 deps/lld/test/ELF/linkerscript/locationcountererr.s create mode 100644 deps/lld/test/ELF/linkerscript/locationcountererr.test create mode 100644 deps/lld/test/ELF/linkerscript/map-file.test create mode 100644 deps/lld/test/ELF/linkerscript/map-file2.test rename deps/lld/test/ELF/linkerscript/{memory-at.s => memory-at.test} (59%) create mode 100644 deps/lld/test/ELF/linkerscript/memory-data-commands.test create mode 100644 deps/lld/test/ELF/linkerscript/memory-loc-counter.test create mode 100644 deps/lld/test/ELF/linkerscript/memory-region-alignment.test create mode 100644 deps/lld/test/ELF/linkerscript/memory4.test create mode 100644 deps/lld/test/ELF/linkerscript/memory5.test delete mode 100644 deps/lld/test/ELF/linkerscript/no-pt-load.s create mode 100644 deps/lld/test/ELF/linkerscript/no-pt-load.test delete mode 100644 deps/lld/test/ELF/linkerscript/non-absolute2.s create mode 100644 deps/lld/test/ELF/linkerscript/non-absolute2.test delete mode 100644 deps/lld/test/ELF/linkerscript/openbsd-bootdata.s create mode 100644 deps/lld/test/ELF/linkerscript/openbsd-bootdata.test rename deps/lld/test/ELF/linkerscript/{openbsd-wxneeded.s => openbsd-wxneeded.test} (65%) rename deps/lld/test/ELF/linkerscript/{operators.s => operators.test} (54%) delete mode 100644 deps/lld/test/ELF/linkerscript/orphan-first-cmd.s create mode 100644 deps/lld/test/ELF/linkerscript/orphan-first-cmd.test delete mode 100644 deps/lld/test/ELF/linkerscript/outputarch.s create mode 100644 deps/lld/test/ELF/linkerscript/outputarch.test create mode 100644 deps/lld/test/ELF/linkerscript/overlapping-sections.s create mode 100644 deps/lld/test/ELF/linkerscript/overlay-reject.test create mode 100644 deps/lld/test/ELF/linkerscript/overlay-reject2.test create mode 100644 deps/lld/test/ELF/linkerscript/overlay.test delete mode 100644 deps/lld/test/ELF/linkerscript/page-size-align.s create mode 100644 deps/lld/test/ELF/linkerscript/page-size-align.test delete mode 100644 deps/lld/test/ELF/linkerscript/parse-section-in-addr.s create mode 100644 deps/lld/test/ELF/linkerscript/parse-section-in-addr.test create mode 100644 deps/lld/test/ELF/linkerscript/provide-empty-section.s create mode 100644 deps/lld/test/ELF/linkerscript/provide-shared2.s create mode 100644 deps/lld/test/ELF/linkerscript/pt-interp.test rename deps/lld/test/ELF/linkerscript/{rosegment.s => rosegment.test} (71%) create mode 100644 deps/lld/test/ELF/linkerscript/section-metadata2.s create mode 100644 deps/lld/test/ELF/linkerscript/sections-max-va-overflow.s create mode 100644 deps/lld/test/ELF/linkerscript/sections-va-overflow.test delete mode 100644 deps/lld/test/ELF/linkerscript/sort-constructors.s create mode 100644 deps/lld/test/ELF/linkerscript/sort-constructors.test delete mode 100644 deps/lld/test/ELF/linkerscript/start-end.s create mode 100644 deps/lld/test/ELF/linkerscript/start-end.test rename deps/lld/test/ELF/linkerscript/{symbol-only-flags.s => symbol-only-flags.test} (50%) delete mode 100644 deps/lld/test/ELF/linkerscript/symbol-only.s create mode 100644 deps/lld/test/ELF/linkerscript/symbol-only.test create mode 100644 deps/lld/test/ELF/linkerscript/symbol-ordering-file2.s delete mode 100644 deps/lld/test/ELF/linkerscript/symbols-non-alloc.s create mode 100644 deps/lld/test/ELF/linkerscript/symbols-non-alloc.test delete mode 100644 deps/lld/test/ELF/linkerscript/symbols-synthetic.s create mode 100644 deps/lld/test/ELF/linkerscript/synthetic-relsec-layout.s create mode 100644 deps/lld/test/ELF/linkerscript/synthetic-symbols1.test create mode 100644 deps/lld/test/ELF/linkerscript/synthetic-symbols2.test create mode 100644 deps/lld/test/ELF/linkerscript/synthetic-symbols3.test create mode 100644 deps/lld/test/ELF/linkerscript/synthetic-symbols4.test create mode 100644 deps/lld/test/ELF/linkerscript/unused-synthetic2.test create mode 100644 deps/lld/test/ELF/linkerscript/version-script.s create mode 100644 deps/lld/test/ELF/local-symbols-order.s create mode 100644 deps/lld/test/ELF/lto/Inputs/absolute.s create mode 100644 deps/lld/test/ELF/lto/Inputs/asmundef.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/i386-empty.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/lazy-internal.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/libcall-archive.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/sample-profile.prof create mode 100644 deps/lld/test/ELF/lto/Inputs/thinlto_empty.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/weakodr-visibility.ll create mode 100644 deps/lld/test/ELF/lto/abs-resol.ll create mode 100644 deps/lld/test/ELF/lto/cpu-string.ll create mode 100644 deps/lld/test/ELF/lto/debugger-tune.ll create mode 100644 deps/lld/test/ELF/lto/lazy-internal.ll create mode 100644 deps/lld/test/ELF/lto/libcall-archive.ll create mode 100644 deps/lld/test/ELF/lto/mix-platforms2.ll create mode 100644 deps/lld/test/ELF/lto/new-pass-manager.ll create mode 100644 deps/lld/test/ELF/lto/sample-profile.ll create mode 100644 deps/lld/test/ELF/lto/setting-dso-local.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-cant-write-index.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-debug-fission.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-emit-imports.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-index-file.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-index-only.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-no-index.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-obj-path.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-object-suffix-replace.ll create mode 100644 deps/lld/test/ELF/lto/thinlto-prefix-replace.ll create mode 100644 deps/lld/test/ELF/lto/version-script2.ll create mode 100644 deps/lld/test/ELF/lto/weakodr-visibility.ll create mode 100644 deps/lld/test/ELF/map-file-i686.s create mode 100644 deps/lld/test/ELF/merge-gc-piece.s create mode 100644 deps/lld/test/ELF/merge-gc-piece2.s create mode 100644 deps/lld/test/ELF/merge-reloc-O0.s create mode 100644 deps/lld/test/ELF/merge-to-non-alloc.s create mode 100644 deps/lld/test/ELF/mips-64-got-overflow.s create mode 100644 deps/lld/test/ELF/mips-abs-got.s create mode 100644 deps/lld/test/ELF/mips-elf-abi.s create mode 100644 deps/lld/test/ELF/mips-elf-flags-err.test create mode 100644 deps/lld/test/ELF/mips-fp-flags-err.test create mode 100644 deps/lld/test/ELF/mips-mgot.s delete mode 100644 deps/lld/test/ELF/mips-micro-got64.s create mode 100644 deps/lld/test/ELF/mips-micror6-relocs.s create mode 100644 deps/lld/test/ELF/mips-non-zero-gp0.s create mode 100644 deps/lld/test/ELF/mips-plt-n32.s create mode 100644 deps/lld/test/ELF/mips-tls-64-pic-local-variable.s create mode 100644 deps/lld/test/ELF/multiple-cu.s delete mode 100644 deps/lld/test/ELF/no-dynamic-linker.s create mode 100644 deps/lld/test/ELF/no-line-parser-errors-if-empty-section.s create mode 100644 deps/lld/test/ELF/no-line-parser-errors-if-no-section.s create mode 100644 deps/lld/test/ELF/non-alloc-link-order-gc.s rename deps/lld/test/ELF/{note-loadaddr.c => note-loadaddr.s} (100%) create mode 100644 deps/lld/test/ELF/note-noalloc.s create mode 100644 deps/lld/test/ELF/note-noalloc2.s create mode 100644 deps/lld/test/ELF/pack-dyn-relocs2.s create mode 100644 deps/lld/test/ELF/ppc-rela.s create mode 100644 deps/lld/test/ELF/ppc64-abi-version.s create mode 100644 deps/lld/test/ELF/ppc64-dtprel.s create mode 100644 deps/lld/test/ELF/ppc64-dynamic-relocations.s create mode 100644 deps/lld/test/ELF/ppc64-error-toc-restore.s create mode 100644 deps/lld/test/ELF/ppc64-error-toc-tail-call.s create mode 100644 deps/lld/test/ELF/ppc64-func-entry-points.s create mode 100644 deps/lld/test/ELF/ppc64-gd-to-ie.s create mode 100644 deps/lld/test/ELF/ppc64-general-dynamic-tls.s create mode 100644 deps/lld/test/ELF/ppc64-got-indirect.s create mode 100644 deps/lld/test/ELF/ppc64-ifunc.s create mode 100644 deps/lld/test/ELF/ppc64-initial-exec-tls.s create mode 100644 deps/lld/test/ELF/ppc64-local-dynamic.s create mode 100644 deps/lld/test/ELF/ppc64-local-exec-tls.s create mode 100644 deps/lld/test/ELF/ppc64-plt-stub.s create mode 100644 deps/lld/test/ELF/ppc64-rel-so-local-calls.s delete mode 100644 deps/lld/test/ELF/ppc64-shared-rel-toc.s create mode 100644 deps/lld/test/ELF/ppc64-tls-gd-le.s create mode 100644 deps/lld/test/ELF/ppc64-tls-ld-le.s create mode 100644 deps/lld/test/ELF/ppc64-toc-rel.s create mode 100644 deps/lld/test/ELF/ppc64_entry_point.s create mode 100644 deps/lld/test/ELF/pr36475.s create mode 100644 deps/lld/test/ELF/pr37735.s create mode 100644 deps/lld/test/ELF/print-icf.s create mode 100644 deps/lld/test/ELF/protected-data-access.s create mode 100644 deps/lld/test/ELF/protected-function-access.s create mode 100644 deps/lld/test/ELF/push-state.s create mode 100644 deps/lld/test/ELF/rel-addend-with-rela-input.s create mode 100644 deps/lld/test/ELF/relocatable-build-id.s create mode 100644 deps/lld/test/ELF/relocatable-many-sections.s create mode 100644 deps/lld/test/ELF/section-metadata-err2.s create mode 100644 deps/lld/test/ELF/section-metadata-err3.s rename deps/lld/test/ELF/{shared-be.s => shared-ppc64.s} (78%) create mode 100644 deps/lld/test/ELF/shlib-undefined-archive.s create mode 100644 deps/lld/test/ELF/shlib-undefined-local.s delete mode 100644 deps/lld/test/ELF/splitstacks.s create mode 100644 deps/lld/test/ELF/symbol-ordering-file-icf.s create mode 100644 deps/lld/test/ELF/symbol-ordering-file-warnings.s create mode 100644 deps/lld/test/ELF/text-section-prefix.s create mode 100644 deps/lld/test/ELF/undef-shared2.s create mode 100644 deps/lld/test/ELF/version-exclude-libs.s create mode 100644 deps/lld/test/ELF/version-script-extern-undefined.s create mode 100644 deps/lld/test/ELF/version-script-extern2.s create mode 100644 deps/lld/test/ELF/version-script-in-search-path.s create mode 100644 deps/lld/test/ELF/warn-backrefs.s create mode 100644 deps/lld/test/ELF/weak-shared-gc.s create mode 100644 deps/lld/test/ELF/weak-undef-lib.s create mode 100644 deps/lld/test/ELF/whole-archive-name.s create mode 100644 deps/lld/test/ELF/x86-64-dyn-rel-error3.s create mode 100644 deps/lld/test/ELF/x86-64-plt-high-addr.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-debug-overflow.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-error-reporting.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-error2.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-gotoff64.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-gotpc64.s create mode 100644 deps/lld/test/ELF/x86-64-reloc-range-debug-loc.s create mode 100644 deps/lld/test/ELF/x86-64-retpoline-linkerscript.s create mode 100644 deps/lld/test/ELF/x86-64-retpoline-znow-linkerscript.s create mode 100644 deps/lld/test/ELF/x86-64-split-stack-prologue-adjust-fail.s create mode 100644 deps/lld/test/ELF/x86-64-split-stack-prologue-adjust-silent.s create mode 100644 deps/lld/test/ELF/x86-64-split-stack-prologue-adjust-success.s create mode 100644 deps/lld/test/ELF/x86-64-tls-ld-local.s rename deps/lld/test/ELF/{ztext-text-notext.s => ztext.s} (50%) create mode 100644 deps/lld/test/darwin/cmdline-lto_library.objtxt create mode 100644 deps/lld/test/wasm/Inputs/archive3.ll create mode 100644 deps/lld/test/wasm/Inputs/comdat1.ll create mode 100644 deps/lld/test/wasm/Inputs/comdat2.ll create mode 100644 deps/lld/test/wasm/Inputs/custom.ll create mode 100644 deps/lld/test/wasm/Inputs/debuginfo1.ll create mode 100644 deps/lld/test/wasm/Inputs/debuginfo2.ll create mode 100644 deps/lld/test/wasm/Inputs/globals.yaml create mode 100644 deps/lld/test/wasm/Inputs/locals-duplicate1.ll create mode 100644 deps/lld/test/wasm/Inputs/locals-duplicate2.ll create mode 100644 deps/lld/test/wasm/Inputs/start.ll create mode 100644 deps/lld/test/wasm/Inputs/strong-symbol.ll create mode 100644 deps/lld/test/wasm/Inputs/undefined-globals.yaml create mode 100644 deps/lld/test/wasm/alias.ll create mode 100644 deps/lld/test/wasm/comdats.ll create mode 100644 deps/lld/test/wasm/compress-relocs.ll create mode 100644 deps/lld/test/wasm/custom-sections.ll create mode 100644 deps/lld/test/wasm/cxx-mangling.ll create mode 100644 deps/lld/test/wasm/data-segment-merging.ll create mode 100644 deps/lld/test/wasm/debuginfo.test create mode 100644 deps/lld/test/wasm/demangle.ll create mode 100644 deps/lld/test/wasm/driver.ll create mode 100644 deps/lld/test/wasm/entry-signature.ll create mode 100644 deps/lld/test/wasm/export-all.ll create mode 100644 deps/lld/test/wasm/export-table.test create mode 100644 deps/lld/test/wasm/export.ll create mode 100644 deps/lld/test/wasm/fatal-warnings.ll create mode 100644 deps/lld/test/wasm/gc-imports.ll create mode 100644 deps/lld/test/wasm/gc-sections.ll create mode 100644 deps/lld/test/wasm/import-table.test delete mode 100644 deps/lld/test/wasm/load-undefined.ll create mode 100644 deps/lld/test/wasm/load-undefined.test create mode 100644 deps/lld/test/wasm/locals-duplicate.test create mode 100644 deps/lld/test/wasm/lto/Inputs/archive.ll create mode 100644 deps/lld/test/wasm/lto/Inputs/cache.ll create mode 100644 deps/lld/test/wasm/lto/Inputs/save-temps.ll create mode 100644 deps/lld/test/wasm/lto/Inputs/thinlto.ll create mode 100644 deps/lld/test/wasm/lto/Inputs/used.ll create mode 100644 deps/lld/test/wasm/lto/archive.ll create mode 100644 deps/lld/test/wasm/lto/atomics.ll create mode 100644 deps/lld/test/wasm/lto/cache.ll create mode 100644 deps/lld/test/wasm/lto/diagnostics.ll create mode 100644 deps/lld/test/wasm/lto/export.ll create mode 100644 deps/lld/test/wasm/lto/incompatible.ll create mode 100644 deps/lld/test/wasm/lto/internalize-basic.ll create mode 100644 deps/lld/test/wasm/lto/lto-start.ll create mode 100644 deps/lld/test/wasm/lto/opt-level.ll create mode 100644 deps/lld/test/wasm/lto/parallel.ll create mode 100644 deps/lld/test/wasm/lto/save-temps.ll create mode 100644 deps/lld/test/wasm/lto/thinlto.ll create mode 100644 deps/lld/test/wasm/lto/undef.ll create mode 100644 deps/lld/test/wasm/lto/used.ll create mode 100644 deps/lld/test/wasm/lto/verify-invalid.ll create mode 100644 deps/lld/test/wasm/lto/weak.ll create mode 100644 deps/lld/test/wasm/reloc-addend.ll create mode 100644 deps/lld/test/wasm/responsefile.test create mode 100644 deps/lld/test/wasm/signature-mismatch-weak.ll create mode 100644 deps/lld/test/wasm/stack-first.test create mode 100644 deps/lld/test/wasm/undefined-weak-call.ll rename deps/lld/test/wasm/{weak-external.ll => weak-undefined.ll} (52%) create mode 100644 deps/lld/test/wasm/whole-archive.test create mode 100644 deps/lld/wasm/InputChunks.cpp create mode 100644 deps/lld/wasm/InputChunks.h create mode 100644 deps/lld/wasm/InputGlobal.h delete mode 100644 deps/lld/wasm/InputSegment.cpp delete mode 100644 deps/lld/wasm/InputSegment.h create mode 100644 deps/lld/wasm/LTO.cpp create mode 100644 deps/lld/wasm/LTO.h create mode 100644 deps/lld/wasm/MarkLive.cpp create mode 100644 deps/lld/wasm/MarkLive.h diff --git a/deps/lld-prebuilt/COFF/Options.inc b/deps/lld-prebuilt/COFF/Options.inc index b5414ffa0b..702a93a0cf 100644 --- a/deps/lld-prebuilt/COFF/Options.inc +++ b/deps/lld-prebuilt/COFF/Options.inc @@ -12,8 +12,8 @@ #ifdef PREFIX #define COMMA , PREFIX(prefix_0, {nullptr}) -PREFIX(prefix_3, {"--" COMMA nullptr}) -PREFIX(prefix_2, {"/" COMMA "-" COMMA nullptr}) +PREFIX(prefix_2, {"--" COMMA nullptr}) +PREFIX(prefix_3, {"/" COMMA "-" COMMA nullptr}) PREFIX(prefix_1, {"/" COMMA "-" COMMA "-?" COMMA nullptr}) PREFIX(prefix_4, {"/?" COMMA "-?" COMMA nullptr}) #undef COMMA @@ -49,13 +49,21 @@ OPTION(prefix_1, "appcontainer", appcontainer, Flag, INVALID, INVALID, nullptr, "Image can only be run in an app container", nullptr, nullptr) OPTION(prefix_1, "base:", base, Joined, INVALID, INVALID, nullptr, 0, 0, "Base address of the program", nullptr, nullptr) +OPTION(prefix_1, "Brepro", repro, Flag, INVALID, INVALID, nullptr, 0, 0, + "Use a hash of the executable as the PE header timestamp", nullptr, nullptr) +OPTION(prefix_2, "color-diagnostics=", color_diagnostics_eq, Joined, INVALID, INVALID, nullptr, 0, 0, + "Use colors in diagnostics; one of 'always', 'never', 'auto'", nullptr, nullptr) +OPTION(prefix_2, "color-diagnostics", color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, + "Use colors in diagnostics", nullptr, nullptr) OPTION(prefix_1, "debug:dwarf", debug_dwarf, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "debug:full", debug_full, Flag, INVALID, debug, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "debug:ghash", debug_ghash, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "debug:symtab", debug_symtab, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "debugtype:", debugtype, Joined, INVALID, INVALID, nullptr, 0, 0, "Debug Info Options", nullptr, nullptr) OPTION(prefix_1, "debug", debug, Flag, INVALID, INVALID, nullptr, 0, 0, "Embed a symbol table in the image", nullptr, nullptr) -OPTION(prefix_2, "def:", deffile, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_3, "def:", deffile, Joined, INVALID, INVALID, nullptr, 0, 0, "Use module-definition file", nullptr, nullptr) OPTION(prefix_1, "defaultlib:", defaultlib, Joined, INVALID, INVALID, nullptr, 0, 0, "Add the library to the list of input files", nullptr, nullptr) @@ -91,6 +99,8 @@ OPTION(prefix_1, "force:unresolved", force_unresolved, Flag, INVALID, INVALID, n OPTION(prefix_1, "force", force, Flag, INVALID, INVALID, nullptr, 0, 0, "Allow undefined symbols when creating executables", nullptr, nullptr) OPTION(prefix_1, "functionpadmin", functionpadmin, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "guard:", guard, Joined, INVALID, INVALID, nullptr, 0, 0, + "Control flow guard", nullptr, nullptr) OPTION(prefix_1, "guardsym:", guardsym, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "heap:", heap, Joined, INVALID, INVALID, nullptr, 0, 0, "Size of the heap", nullptr, nullptr) @@ -105,23 +115,32 @@ OPTION(prefix_1, "ignore:", ignore, Joined, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "ignoreidl", ignoreidl, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "implib:", implib, Joined, INVALID, INVALID, nullptr, 0, 0, "Import library name", nullptr, nullptr) -OPTION(prefix_2, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_3, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0, "Force symbol to be added to symbol table as undefined one", nullptr, nullptr) -OPTION(prefix_1, "incremental:no", no_incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "incremental", incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "incremental:no", incremental_no, Flag, INVALID, INVALID, nullptr, 0, 0, + "Overwrite import library even if contents are unchanged", nullptr, nullptr) +OPTION(prefix_1, "incremental", incremental, Flag, INVALID, INVALID, nullptr, 0, 0, + "Keep original import library if contents are unchanged", nullptr, nullptr) +OPTION(prefix_1, "integritycheck:no", integritycheck_no, Flag, INVALID, INVALID, nullptr, 0, 0, + "No effect (default)", nullptr, nullptr) +OPTION(prefix_1, "integritycheck", integritycheck, Flag, INVALID, INVALID, nullptr, 0, 0, + "Set FORCE_INTEGRITY bit in PE header", nullptr, nullptr) +OPTION(prefix_1, "kill-at", kill_at, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "largeaddressaware:no", largeaddressaware_no, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable large addresses (default on 32-bit)", nullptr, nullptr) OPTION(prefix_1, "largeaddressaware", largeaddressaware, Flag, INVALID, INVALID, nullptr, 0, 0, "Enable large addresses (default on 64-bit)", nullptr, nullptr) OPTION(prefix_1, "libpath:", libpath, Joined, INVALID, INVALID, nullptr, 0, 0, "Additional library search path", nullptr, nullptr) +OPTION(prefix_1, "lib", lib, Flag, INVALID, INVALID, nullptr, 0, 0, + "Act like lib.exe; must be first argument if present", nullptr, nullptr) OPTION(prefix_1, "linkrepro:", linkrepro, Joined, INVALID, INVALID, nullptr, 0, 0, "Dump linker invocation and input files for debugging", nullptr, nullptr) OPTION(prefix_1, "lldltocache:", lldltocache, Joined, INVALID, INVALID, nullptr, 0, 0, "Path to ThinLTO cached object file directory", nullptr, nullptr) OPTION(prefix_1, "lldltocachepolicy:", lldltocachepolicy, Joined, INVALID, INVALID, nullptr, 0, 0, "Pruning policy for the ThinLTO cache", nullptr, nullptr) -OPTION(prefix_2, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "lldmap", lldmap, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "lldmingw", lldmingw, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "lldsavetemps", lldsavetemps, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -145,7 +164,10 @@ OPTION(prefix_1, "merge:", merge, Joined, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "mllvm:", mllvm, Joined, INVALID, INVALID, nullptr, 0, 0, "Options to pass to LLVM", nullptr, nullptr) OPTION(prefix_1, "msvclto", msvclto, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "natvis:", natvis, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "natvis:", natvis, Joined, INVALID, INVALID, nullptr, 0, 0, + "Path to natvis file to embed in the PDB", nullptr, nullptr) +OPTION(prefix_1, "no-color-diagnostics", no_color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not use colors in diagnostics", nullptr, nullptr) OPTION(prefix_1, "nodefaultlib:", nodefaultlib, Joined, INVALID, INVALID, nullptr, 0, 0, "Remove a default library", nullptr, nullptr) OPTION(prefix_1, "nodefaultlib", nodefaultlib_all, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -157,14 +179,19 @@ OPTION(prefix_1, "nxcompat", nxcompat, Flag, INVALID, INVALID, nullptr, 0, 0, "Enable data execution prevention (default)", nullptr, nullptr) OPTION(prefix_1, "opt:", opt, Joined, INVALID, INVALID, nullptr, 0, 0, "Control optimizations", nullptr, nullptr) +OPTION(prefix_1, "order:", order, Joined, INVALID, INVALID, nullptr, 0, 0, + "Put functions in order", nullptr, nullptr) OPTION(prefix_1, "out:", out, Joined, INVALID, INVALID, nullptr, 0, 0, "Path to file to write output", nullptr, nullptr) -OPTION(prefix_2, "output-def:", output_def, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "output-def:", output_def, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "pdb:", pdb, Joined, INVALID, INVALID, nullptr, 0, 0, "PDB file path", nullptr, nullptr) -OPTION(prefix_1, "pdbaltpath:", pdbaltpath, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "pdbaltpath:", pdbaltpath, Joined, INVALID, INVALID, nullptr, 0, 0, + "PDB file path to embed in the image", nullptr, nullptr) +OPTION(prefix_1, "pdbsourcepath:", pdb_source_path, Joined, INVALID, INVALID, nullptr, 0, 0, + "Base path used to make relative source file path absolute in PDB", nullptr, nullptr) OPTION(prefix_1, "profile", profile, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_3, "rsp-quoting=", rsp_quoting, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "rsp-quoting=", rsp_quoting, Joined, INVALID, INVALID, nullptr, 0, 0, "Quoting style for response files, 'windows' (default) or 'posix'", nullptr, nullptr) OPTION(prefix_1, "safeseh:no", safeseh_no, Flag, INVALID, INVALID, nullptr, 0, 0, "Don't produce an image with Safe Exception Handler", nullptr, nullptr) @@ -181,6 +208,9 @@ OPTION(prefix_1, "subsystem:", subsystem, Joined, INVALID, INVALID, nullptr, 0, OPTION(prefix_1, "swaprun:cd", swaprun_cd, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "swaprun:net", swaprun_net, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "throwingnew", throwingnew, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "timestamp:", timestamp, Joined, INVALID, INVALID, nullptr, 0, 0, + "Specify the PE header timestamp", nullptr, nullptr) +OPTION(prefix_1, "time", show_timing, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "tlbid:", tlbid, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "tlbout:", tlbout, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "tsaware:no", tsaware_no, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -191,7 +221,7 @@ OPTION(prefix_1, "verbose:", verbose_all, Joined, INVALID, INVALID, nullptr, 0, OPTION(prefix_1, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "version:", version, Joined, INVALID, INVALID, nullptr, 0, 0, "Specify a version number in the PE header", nullptr, nullptr) -OPTION(prefix_3, "version", dash_dash_version, Flag, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "version", dash_dash_version, Flag, INVALID, INVALID, nullptr, 0, 0, "Print version information", nullptr, nullptr) OPTION(prefix_1, "wholearchive:", wholearchive_file, Joined, INVALID, INVALID, nullptr, 0, 0, "Include all object files from this archive", nullptr, nullptr) diff --git a/deps/lld-prebuilt/DarwinLdOptions.inc b/deps/lld-prebuilt/DarwinLdOptions.inc index dc4f3dec54..e0e2175fc1 100644 --- a/deps/lld-prebuilt/DarwinLdOptions.inc +++ b/deps/lld-prebuilt/DarwinLdOptions.inc @@ -13,6 +13,7 @@ #define COMMA , PREFIX(prefix_0, {nullptr}) PREFIX(prefix_1, {"-" COMMA nullptr}) +PREFIX(prefix_2, {"-" COMMA "--" COMMA nullptr}) #undef COMMA #endif // PREFIX @@ -67,6 +68,8 @@ OPTION(prefix_1, "dylib", dylib, Flag, grp_kind, INVALID, nullptr, 0, 0, "Create dynamic library", nullptr, nullptr) OPTION(prefix_1, "dynamic", dynamic, Flag, grp_kind, INVALID, nullptr, 0, 0, "Create dynamic executable (default)", nullptr, nullptr) +OPTION(prefix_2, "error-limit", error_limit, Separate, INVALID, INVALID, nullptr, 0, 0, + "Maximum number of errors to emit before stopping (0 = no limit)", "", nullptr) OPTION(prefix_1, "execute", execute, Flag, grp_kind, INVALID, nullptr, 0, 0, "Create main executable (default)", nullptr, nullptr) OPTION(prefix_1, "export_dynamic", export_dynamic, Flag, grp_main, INVALID, nullptr, 0, 0, @@ -99,6 +102,8 @@ OPTION(prefix_1, "ios_version_min", ios_version_min, Separate, grp_opts, INVALID OPTION(prefix_1, "iphoneos_version_min", iphoneos_version_min, Separate, INVALID, ios_version_min, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "keep_private_externs", keep_private_externs, Flag, grp_opts, INVALID, nullptr, 0, 0, "Private extern (hidden) symbols should not be transformed into local symbols", nullptr, nullptr) +OPTION(prefix_1, "lto_library", lto_library, Separate, INVALID, INVALID, nullptr, 0, 0, + "Ignored for compatibility with other linkers", "", nullptr) OPTION(prefix_1, "L", L, JoinedOrSeparate, grp_libs, INVALID, nullptr, 0, 0, "Add directory to library search path", "", nullptr) OPTION(prefix_1, "l", l, Joined, INVALID, INVALID, nullptr, 0, 0, diff --git a/deps/lld-prebuilt/ELF/Options.inc b/deps/lld-prebuilt/ELF/Options.inc index 640f1bdcc6..621eaaec1f 100644 --- a/deps/lld-prebuilt/ELF/Options.inc +++ b/deps/lld-prebuilt/ELF/Options.inc @@ -13,6 +13,7 @@ #define COMMA , PREFIX(prefix_0, {nullptr}) PREFIX(prefix_1, {"-" COMMA nullptr}) +PREFIX(prefix_4, {"-" COMMA "--" COMMA nullptr}) PREFIX(prefix_3, {"--" COMMA nullptr}) PREFIX(prefix_2, {"--" COMMA "-" COMMA nullptr}) #undef COMMA @@ -28,18 +29,24 @@ PREFIX(prefix_2, {"--" COMMA "-" COMMA nullptr}) OPTION(prefix_0, "", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_0, "", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "(", start_group_paren, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, ")", end_group_paren, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "(", anonymous_30, Flag, INVALID, start_group, nullptr, 0, 0, + "Alias for --start-group", nullptr, nullptr) +OPTION(prefix_1, ")", anonymous_12, Flag, INVALID, end_group, nullptr, 0, 0, + "Alias for --end-group", nullptr, nullptr) OPTION(prefix_2, "allow-multiple-definition", allow_multiple_definition, Flag, INVALID, INVALID, nullptr, 0, 0, "Allow multiple definitions", nullptr, nullptr) -OPTION(prefix_2, "allow-shlib-undefined", allow_shlib_undefined, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "allow-shlib-undefined", anonymous_47, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "apply-dynamic-relocs", apply_dynamic_relocs, Flag, INVALID, INVALID, nullptr, 0, 0, + "Apply link-time values for dynamic relocations", nullptr, nullptr) OPTION(prefix_2, "as-needed", as_needed, Flag, INVALID, INVALID, nullptr, 0, 0, "Only set DT_NEEDED for shared libraries if used", nullptr, nullptr) -OPTION(prefix_2, "auxiliary", auxiliary, Separate, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "auxiliary=", auxiliary_eq, Joined, INVALID, auxiliary, nullptr, 0, 0, "Set DT_AUXILIARY field to the specified name", nullptr, nullptr) +OPTION(prefix_2, "auxiliary", auxiliary, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "Bdynamic", Bdynamic, Flag, INVALID, INVALID, nullptr, 0, 0, - "Link against shared libraries", nullptr, nullptr) -OPTION(prefix_2, "Bshareable", alias_shared_Bshareable, Flag, INVALID, shared, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Link against shared libraries (default)", nullptr, nullptr) +OPTION(prefix_2, "Bshareable", anonymous_28, Flag, INVALID, shared, nullptr, 0, 0, + "Alias for --shared", nullptr, nullptr) OPTION(prefix_2, "Bstatic", Bstatic, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not link against shared libraries", nullptr, nullptr) OPTION(prefix_2, "Bsymbolic-functions", Bsymbolic_functions, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -47,31 +54,38 @@ OPTION(prefix_2, "Bsymbolic-functions", Bsymbolic_functions, Flag, INVALID, INVA OPTION(prefix_2, "Bsymbolic", Bsymbolic, Flag, INVALID, INVALID, nullptr, 0, 0, "Bind defined symbols locally", nullptr, nullptr) OPTION(prefix_2, "build-id=", build_id_eq, Joined, INVALID, INVALID, nullptr, 0, 0, - "Generate build ID note", nullptr, nullptr) + "Generate build ID note", "[fast,md5,sha,uuid,0x]", nullptr) OPTION(prefix_2, "build-id", build_id, Flag, INVALID, INVALID, nullptr, 0, 0, - "Generate build ID note", nullptr, nullptr) -OPTION(prefix_2, "b", alias_format_b, Separate, INVALID, format, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "call_shared", alias_Bdynamic_call_shared, Flag, INVALID, Bdynamic, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Alias for --build-id=fast", nullptr, nullptr) +OPTION(prefix_1, "b", anonymous_16, Separate, INVALID, format, nullptr, 0, 0, + "Alias for --format", nullptr, nullptr) +OPTION(prefix_2, "call-graph-ordering-file=", call_graph_ordering_file_eq, Joined, INVALID, call_graph_ordering_file, nullptr, 0, 0, + "Layout sections to optimize the given callgraph", nullptr, nullptr) +OPTION(prefix_2, "call-graph-ordering-file", call_graph_ordering_file, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "call_shared", anonymous_1, Flag, INVALID, Bdynamic, nullptr, 0, 0, + "Alias for --Bdynamic", nullptr, nullptr) +OPTION(prefix_2, "check-sections", check_sections, Flag, INVALID, INVALID, nullptr, 0, 0, + "Check section addresses for overlaps (default)", nullptr, nullptr) OPTION(prefix_2, "chroot", chroot, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "color-diagnostics=", color_diagnostics_eq, Joined, INVALID, INVALID, nullptr, 0, 0, - "Use colors in diagnostics", nullptr, nullptr) + "Use colors in diagnostics", "[auto,always,never]", nullptr) OPTION(prefix_2, "color-diagnostics", color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, - "Use colors in diagnostics", nullptr, nullptr) + "Alias for --color-diagnostics=always", nullptr, nullptr) OPTION(prefix_2, "compress-debug-sections=", compress_debug_sections_eq, Joined, INVALID, compress_debug_sections, nullptr, 0, 0, - "Compress DWARF debug sections", nullptr, nullptr) -OPTION(prefix_2, "compress-debug-sections", compress_debug_sections, Separate, INVALID, INVALID, nullptr, 0, 0, - "Compress DWARF debug sections", nullptr, nullptr) -OPTION(prefix_2, "cref", cref, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "dc", alias_define_common_dc, Flag, INVALID, define_common, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Compress DWARF debug sections", "[none,zlib]", nullptr) +OPTION(prefix_2, "compress-debug-sections", compress_debug_sections, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[none,zlib]", nullptr) +OPTION(prefix_2, "cref", cref, Flag, INVALID, INVALID, nullptr, 0, 0, + "Output cross reference table", nullptr, nullptr) +OPTION(prefix_2, "dc", anonymous_7, Flag, INVALID, define_common, nullptr, 0, 0, + "Alias for --define-common", nullptr, nullptr) OPTION(prefix_2, "define-common", define_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Assign space to common symbols", nullptr, nullptr) OPTION(prefix_2, "defsym=", defsym_eq, Joined, INVALID, defsym, nullptr, 0, 0, - "Define a symbol alias", nullptr, nullptr) -OPTION(prefix_2, "defsym", defsym, Separate, INVALID, INVALID, nullptr, 0, 0, - "Define a symbol alias", nullptr, nullptr) + "Define a symbol alias", "=", nullptr) +OPTION(prefix_2, "defsym", defsym, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "=", nullptr) OPTION(prefix_2, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0, - "Demangle symbol names", nullptr, nullptr) -OPTION(prefix_2, "detect-odr-violations", detect_odr_violations, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Demangle symbol names (default)", nullptr, nullptr) +OPTION(prefix_2, "detect-odr-violations", anonymous_48, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "disable-new-dtags", disable_new_dtags, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable new dynamic tags", nullptr, nullptr) OPTION(prefix_2, "disable-verify", disable_verify, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -81,133 +95,164 @@ OPTION(prefix_2, "discard-locals", discard_locals, Flag, INVALID, INVALID, nullp "Delete temporary local symbols", nullptr, nullptr) OPTION(prefix_2, "discard-none", discard_none, Flag, INVALID, INVALID, nullptr, 0, 0, "Keep all symbols in the symbol table", nullptr, nullptr) -OPTION(prefix_2, "dn", alias_Bstatic_dn, Flag, INVALID, Bstatic, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "dp", alias_define_common_dp, Flag, INVALID, define_common, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "dynamic-linker", dynamic_linker, Separate, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "dn", anonymous_3, Flag, INVALID, Bstatic, nullptr, 0, 0, + "Alias for --Bstatic", nullptr, nullptr) +OPTION(prefix_2, "dp", anonymous_8, Flag, INVALID, define_common, nullptr, 0, 0, + "Alias for --define-common", nullptr, nullptr) +OPTION(prefix_2, "dynamic-linker=", dynamic_linker_eq, Joined, INVALID, dynamic_linker, nullptr, 0, 0, "Which dynamic linker to use", nullptr, nullptr) +OPTION(prefix_2, "dynamic-linker", dynamic_linker, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "dynamic-list=", dynamic_list_eq, Joined, INVALID, dynamic_list, nullptr, 0, 0, "Read a list of dynamic symbols", nullptr, nullptr) -OPTION(prefix_2, "dynamic-list", dynamic_list, Separate, INVALID, INVALID, nullptr, 0, 0, - "Read a list of dynamic symbols", nullptr, nullptr) -OPTION(prefix_2, "dy", alias_Bdynamic_dy, Flag, INVALID, Bdynamic, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "d", alias_define_common_d, Flag, INVALID, define_common, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "EB", EB, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "dynamic-list", dynamic_list, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "dy", anonymous_2, Flag, INVALID, Bdynamic, nullptr, 0, 0, + "Alias for --Bdynamic", nullptr, nullptr) +OPTION(prefix_1, "d", anonymous_6, Flag, INVALID, define_common, nullptr, 0, 0, + "Alias for --define-common", nullptr, nullptr) +OPTION(prefix_2, "EB", anonymous_65, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "eh-frame-hdr", eh_frame_hdr, Flag, INVALID, INVALID, nullptr, 0, 0, "Request creation of .eh_frame_hdr section and PT_GNU_EH_FRAME segment header", nullptr, nullptr) -OPTION(prefix_2, "EL", EL, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "EL", anonymous_66, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "emit-relocs", emit_relocs, Flag, INVALID, INVALID, nullptr, 0, 0, "Generate relocations in output", nullptr, nullptr) OPTION(prefix_2, "enable-new-dtags", enable_new_dtags, Flag, INVALID, INVALID, nullptr, 0, 0, - "Enable new dynamic tags", nullptr, nullptr) -OPTION(prefix_2, "end-group", end_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Enable new dynamic tags (default)", nullptr, nullptr) +OPTION(prefix_2, "end-group", end_group, Flag, INVALID, INVALID, nullptr, 0, 0, + "Ignored for compatibility with GNU unless you pass --warn-backrefs", nullptr, nullptr) OPTION(prefix_2, "end-lib", end_lib, Flag, INVALID, INVALID, nullptr, 0, 0, "End a grouping of objects that should be treated as if they were together in an archive", nullptr, nullptr) OPTION(prefix_2, "entry=", entry_eq, Joined, INVALID, entry, nullptr, 0, 0, "Name of entry point symbol", "", nullptr) -OPTION(prefix_2, "entry", entry, Separate, INVALID, INVALID, nullptr, 0, 0, - "Name of entry point symbol", "", nullptr) +OPTION(prefix_2, "entry", entry, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) OPTION(prefix_2, "error-limit=", error_limit_eq, Joined, INVALID, error_limit, nullptr, 0, 0, "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr) -OPTION(prefix_2, "error-limit", error_limit, Separate, INVALID, INVALID, nullptr, 0, 0, - "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr) +OPTION(prefix_2, "error-limit", error_limit, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "error-unresolved-symbols", error_unresolved_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, "Report unresolved symbols as errors", nullptr, nullptr) OPTION(prefix_2, "exclude-libs=", exclude_libs_eq, Joined, INVALID, exclude_libs, nullptr, 0, 0, "Exclude static libraries from automatic export", nullptr, nullptr) -OPTION(prefix_2, "exclude-libs", exclude_libs, Separate, INVALID, INVALID, nullptr, 0, 0, - "Exclude static libraries from automatic export", nullptr, nullptr) +OPTION(prefix_2, "exclude-libs", exclude_libs, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "execute-only", execute_only, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not mark executable sections readable", nullptr, nullptr) OPTION(prefix_2, "export-dynamic-symbol=", export_dynamic_symbol_eq, Joined, INVALID, export_dynamic_symbol, nullptr, 0, 0, "Put a symbol in the dynamic symbol table", nullptr, nullptr) -OPTION(prefix_2, "export-dynamic-symbol", export_dynamic_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, - "Put a symbol in the dynamic symbol table", nullptr, nullptr) +OPTION(prefix_2, "export-dynamic-symbol", export_dynamic_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "export-dynamic", export_dynamic, Flag, INVALID, INVALID, nullptr, 0, 0, "Put symbols in the dynamic symbol table", nullptr, nullptr) -OPTION(prefix_1, "E", alias_export_dynamic_E, Flag, INVALID, export_dynamic, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "e", alias_entry_e, JoinedOrSeparate, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "E", anonymous_14, Flag, INVALID, export_dynamic, nullptr, 0, 0, + "Alias for --export-dynamic", nullptr, nullptr) +OPTION(prefix_1, "e", anonymous_13, JoinedOrSeparate, INVALID, entry, nullptr, 0, 0, + "Alias for --entry", nullptr, nullptr) OPTION(prefix_2, "fatal-warnings", fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0, "Treat warnings as errors", nullptr, nullptr) OPTION(prefix_2, "filter=", filter_eq, Joined, INVALID, filter, nullptr, 0, 0, "Set DT_FILTER field to the specified name", nullptr, nullptr) -OPTION(prefix_2, "filter", filter, Separate, INVALID, INVALID, nullptr, 0, 0, - "Set DT_FILTER field to the specified name", nullptr, nullptr) +OPTION(prefix_2, "filter", filter, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "fini=", fini_eq, Joined, INVALID, fini, nullptr, 0, 0, "Specify a finalizer function", "", nullptr) -OPTION(prefix_2, "fini", fini, Separate, INVALID, INVALID, nullptr, 0, 0, - "Specify a finalizer function", "", nullptr) +OPTION(prefix_2, "fini", fini, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) OPTION(prefix_2, "fix-cortex-a53-843419", fix_cortex_a53_843419, Flag, INVALID, INVALID, nullptr, 0, 0, "Apply fixes for AArch64 Cortex-A53 erratum 843419", nullptr, nullptr) OPTION(prefix_2, "format=", format_eq, Joined, INVALID, format, nullptr, 0, 0, - "Change the input format of the inputs following this option", "", nullptr) -OPTION(prefix_2, "format", format, Separate, INVALID, INVALID, nullptr, 0, 0, - "Change the input format of the inputs following this option", "", nullptr) -OPTION(prefix_2, "full-shutdown", full_shutdown, Flag, INVALID, INVALID, nullptr, 0, 0, - "Perform a full shutdown instead of calling _exit", nullptr, nullptr) -OPTION(prefix_1, "F", alias_filter, Separate, INVALID, filter, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "f", alias_auxiliary, Separate, INVALID, auxiliary, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Change the input format of the inputs following this option", "[default,elf,binary]", nullptr) +OPTION(prefix_2, "format", format, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[default,elf,binary]", nullptr) +OPTION(prefix_1, "F", anonymous_15, Separate, INVALID, filter, nullptr, 0, 0, + "Alias for --filter", nullptr, nullptr) +OPTION(prefix_1, "f", anonymous_0, Separate, INVALID, auxiliary, nullptr, 0, 0, + "Alias for --auxiliary", nullptr, nullptr) OPTION(prefix_2, "gc-sections", gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, "Enable garbage collection of unused sections", nullptr, nullptr) OPTION(prefix_2, "gdb-index", gdb_index, Flag, INVALID, INVALID, nullptr, 0, 0, "Generate .gdb_index section", nullptr, nullptr) -OPTION(prefix_1, "G", G, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "g", g, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "gnu-unique", gnu_unique, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable STB_GNU_UNIQUE symbol binding (default)", nullptr, nullptr) +OPTION(prefix_1, "G", anonymous_67, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "g", anonymous_49, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "hash-style=", hash_style_eq, Joined, INVALID, hash_style, nullptr, 0, 0, "Specify hash style (sysv, gnu or both)", nullptr, nullptr) -OPTION(prefix_2, "hash-style", hash_style, Separate, INVALID, INVALID, nullptr, 0, 0, - "Specify hash style (sysv, gnu or both)", nullptr, nullptr) +OPTION(prefix_2, "hash-style", hash_style, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0, "Print option help", nullptr, nullptr) -OPTION(prefix_1, "h", alias_soname_h, JoinedOrSeparate, INVALID, soname, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "icf-data", icf_data, Flag, INVALID, INVALID, nullptr, 0, 0, - "Enable ICF to also fold identical read only data", nullptr, nullptr) +OPTION(prefix_1, "h", anonymous_29, JoinedOrSeparate, INVALID, soname, nullptr, 0, 0, + "Alias for --soname", nullptr, nullptr) OPTION(prefix_2, "icf=all", icf_all, Flag, INVALID, INVALID, nullptr, 0, 0, "Enable identical code folding", nullptr, nullptr) OPTION(prefix_2, "icf=none", icf_none, Flag, INVALID, INVALID, nullptr, 0, 0, - "Disable identical code folding", nullptr, nullptr) + "Disable identical code folding (default)", nullptr, nullptr) +OPTION(prefix_2, "icf=safe", icf_safe, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable safe identical code folding", nullptr, nullptr) +OPTION(prefix_2, "ignore-data-address-equality", ignore_data_address_equality, Flag, INVALID, INVALID, nullptr, 0, 0, + "lld can break the address equality of data", nullptr, nullptr) +OPTION(prefix_2, "ignore-function-address-equality", ignore_function_address_equality, Flag, INVALID, INVALID, nullptr, 0, 0, + "lld can break the address equality of functions", nullptr, nullptr) OPTION(prefix_2, "image-base=", image_base_eq, Joined, INVALID, image_base, nullptr, 0, 0, "Set the base address", nullptr, nullptr) -OPTION(prefix_2, "image-base", image_base, Separate, INVALID, INVALID, nullptr, 0, 0, - "Set the base address", nullptr, nullptr) +OPTION(prefix_2, "image-base", image_base, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "init=", init_eq, Joined, INVALID, init, nullptr, 0, 0, "Specify an initializer function", "", nullptr) -OPTION(prefix_2, "init", init, Separate, INVALID, INVALID, nullptr, 0, 0, - "Specify an initializer function", "", nullptr) +OPTION(prefix_2, "init", init, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) +OPTION(prefix_2, "just-symbols=", just_symbols_eq, Joined, INVALID, just_symbols, nullptr, 0, 0, + "Just link symbols", nullptr, nullptr) +OPTION(prefix_2, "just-symbols", just_symbols, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "keep-unique=", keep_unique_eq, Joined, INVALID, keep_unique, nullptr, 0, 0, + "Do not fold this symbol during ICF", nullptr, nullptr) +OPTION(prefix_2, "keep-unique", keep_unique, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "library-path=", library_path_eq, Joined, INVALID, library_path, nullptr, 0, 0, "Add a directory to the library search path", "", nullptr) -OPTION(prefix_2, "library-path", library_path, Separate, INVALID, INVALID, nullptr, 0, 0, - "Add a directory to the library search path", "", nullptr) +OPTION(prefix_2, "library-path", library_path, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) OPTION(prefix_2, "library=", library_eq, Joined, INVALID, library, nullptr, 0, 0, "Root name of library to use", "", nullptr) -OPTION(prefix_2, "library", library, Separate, INVALID, INVALID, nullptr, 0, 0, - "Root name of library to use", "", nullptr) -OPTION(prefix_2, "long-plt", long_plt, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "library", library, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) +OPTION(prefix_2, "long-plt", anonymous_50, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "lto-aa-pipeline=", lto_aa_pipeline, Joined, INVALID, INVALID, nullptr, 0, 0, "AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes", nullptr, nullptr) +OPTION(prefix_2, "lto-debug-pass-manager", lto_debug_pass_manager, Flag, INVALID, INVALID, nullptr, 0, 0, + "Debug new pass manager", nullptr, nullptr) +OPTION(prefix_2, "lto-new-pass-manager", lto_new_pass_manager, Flag, INVALID, INVALID, nullptr, 0, 0, + "Use new pass manager", nullptr, nullptr) OPTION(prefix_2, "lto-newpm-passes=", lto_newpm_passes, Joined, INVALID, INVALID, nullptr, 0, 0, "Passes to run during LTO", nullptr, nullptr) OPTION(prefix_2, "lto-O", lto_O, Joined, INVALID, INVALID, nullptr, 0, 0, "Optimization level for LTO", "", nullptr) OPTION(prefix_2, "lto-partitions=", lto_partitions, Joined, INVALID, INVALID, nullptr, 0, 0, "Number of LTO codegen partitions", nullptr, nullptr) -OPTION(prefix_1, "L", alias_library_path, JoinedOrSeparate, INVALID, library_path, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "l", alias_library, JoinedOrSeparate, INVALID, library, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "lto-sample-profile=", lto_sample_profile, Joined, INVALID, INVALID, nullptr, 0, 0, + "Sample profile file path", nullptr, nullptr) +OPTION(prefix_1, "L", anonymous_18, JoinedOrSeparate, INVALID, library_path, nullptr, 0, 0, + "Alias for --library-path", nullptr, nullptr) +OPTION(prefix_1, "l", anonymous_17, JoinedOrSeparate, INVALID, library, nullptr, 0, 0, + "Alias for --library", nullptr, nullptr) OPTION(prefix_2, "Map=", Map_eq, Joined, INVALID, Map, nullptr, 0, 0, "Print a link map to the specified file", nullptr, nullptr) -OPTION(prefix_2, "Map", Map, Separate, INVALID, INVALID, nullptr, 0, 0, - "Print a link map to the specified file", nullptr, nullptr) +OPTION(prefix_2, "Map", Map, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "merge-exidx-entries", merge_exidx_entries, Flag, INVALID, INVALID, nullptr, 0, 0, - "Enable merging .ARM.exidx entries", nullptr, nullptr) + "Enable merging .ARM.exidx entries (default)", nullptr, nullptr) +OPTION(prefix_2, "mips-got-size=", mips_got_size_eq, Joined, INVALID, mips_got_size, nullptr, HelpHidden, 0, + "Max size of a single MIPS GOT. 0x10000 by default.", nullptr, nullptr) +OPTION(prefix_2, "mips-got-size", mips_got_size, Separate, INVALID, INVALID, nullptr, HelpHidden, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "mllvm=", mllvm_eq, Joined, INVALID, mllvm, nullptr, 0, 0, + "Additional arguments to forward to LLVM's option processing", nullptr, nullptr) OPTION(prefix_2, "mllvm", mllvm, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "M", alias_print_map_M, Flag, INVALID, print_map, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "M", anonymous_24, Flag, INVALID, print_map, nullptr, 0, 0, + "Alias for --print-map", nullptr, nullptr) OPTION(prefix_1, "m", m, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Set target emulation", nullptr, nullptr) -OPTION(prefix_2, "no-add-needed", no_add_needed, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "no-allow-shlib-undefined", no_allow_shlib_undefined, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-add-needed", anonymous_51, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-allow-multiple-definition", no_allow_multiple_definition, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not allow multiple definitions (default)", nullptr, nullptr) +OPTION(prefix_2, "no-allow-shlib-undefined", anonymous_52, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-apply-dynamic-relocs", no_apply_dynamic_relocs, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not apply link-time values for dynamic relocations (default)", nullptr, nullptr) OPTION(prefix_2, "no-as-needed", no_as_needed, Flag, INVALID, INVALID, nullptr, 0, 0, - "Always DT_NEEDED for shared libraries", nullptr, nullptr) + "Always set DT_NEEDED for shared libraries (default)", nullptr, nullptr) +OPTION(prefix_2, "no-check-sections", no_check_sections, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not check section addresses for overlaps", nullptr, nullptr) OPTION(prefix_2, "no-color-diagnostics", no_color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not use colors in diagnostics", nullptr, nullptr) -OPTION(prefix_2, "no-copy-dt-needed-entries", no_copy_dt_needed_entries, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "no-ctors-in-init-array", no_ctors_in_init_array, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-copy-dt-needed-entries", anonymous_53, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-cref", no_cref, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not output cross reference table", nullptr, nullptr) +OPTION(prefix_2, "no-ctors-in-init-array", anonymous_54, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "no-define-common", no_define_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not assign space to common symbols", nullptr, nullptr) OPTION(prefix_2, "no-demangle", no_demangle, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -216,22 +261,32 @@ OPTION(prefix_2, "no-dynamic-linker", no_dynamic_linker, Flag, INVALID, INVALID, "Inhibit output of .interp section", nullptr, nullptr) OPTION(prefix_2, "no-eh-frame-hdr", no_eh_frame_hdr, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not create .eh_frame_hdr section", nullptr, nullptr) -OPTION(prefix_2, "no-export-dynamic", no_export_dynamic, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "no-fatal-warnings", no_fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-execute-only", no_execute_only, Flag, INVALID, INVALID, nullptr, 0, 0, + "Mark executable sections readable (default)", nullptr, nullptr) +OPTION(prefix_2, "no-export-dynamic", no_export_dynamic, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not put symbols in the dynamic symbol table (default)", nullptr, nullptr) +OPTION(prefix_2, "no-fatal-warnings", no_fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not treat warnings as errors (default)", nullptr, nullptr) OPTION(prefix_2, "no-gc-sections", no_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, - "Disable garbage collection of unused sections", nullptr, nullptr) + "Disable garbage collection of unused sections (default)", nullptr, nullptr) OPTION(prefix_2, "no-gdb-index", no_gdb_index, Flag, INVALID, INVALID, nullptr, 0, 0, - "Do not generate .gdb_index section", nullptr, nullptr) + "Do not generate .gdb_index section (default)", nullptr, nullptr) OPTION(prefix_2, "no-gnu-unique", no_gnu_unique, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable STB_GNU_UNIQUE symbol binding", nullptr, nullptr) -OPTION(prefix_2, "no-keep-memory", no_keep_memory, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-keep-memory", anonymous_55, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "no-merge-exidx-entries", no_merge_exidx_entries, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable merging .ARM.exidx entries", nullptr, nullptr) -OPTION(prefix_2, "no-mmap-output-file", no_mmap_output_file, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_3, "no-omagic", no_omagic, Flag, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "no-mmap-output-file", anonymous_56, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-omagic", no_omagic, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not set the text data sections to be writable", "", nullptr) +OPTION(prefix_2, "no-pic-executable", anonymous_19, Flag, INVALID, no_pie, nullptr, 0, 0, + "Alias for --no-pie", nullptr, nullptr) +OPTION(prefix_2, "no-pie", no_pie, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not create a position independent executable (default)", nullptr, nullptr) OPTION(prefix_2, "no-print-gc-sections", no_print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, - "Do not list removed unused sections", nullptr, nullptr) + "Do not list removed unused sections (default)", nullptr, nullptr) +OPTION(prefix_2, "no-print-icf-sections", no_print_icf_sections, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not list identical folded sections (default)", nullptr, nullptr) OPTION(prefix_2, "no-rosegment", no_rosegment, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not put read-only non-executable sections in their own segment", nullptr, nullptr) OPTION(prefix_2, "no-threads", no_threads, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -240,18 +295,25 @@ OPTION(prefix_2, "no-undefined-version", no_undefined_version, Flag, INVALID, IN "Report version scripts that refer undefined symbols", nullptr, nullptr) OPTION(prefix_2, "no-undefined", no_undefined, Flag, INVALID, INVALID, nullptr, 0, 0, "Report unresolved symbols even if the linker is creating a shared library", nullptr, nullptr) -OPTION(prefix_2, "no-warn-common", no_warn_common, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "no-warn-mismatch", no_warn_mismatch, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-use-android-relr-tags", no_use_android_relr_tags, Flag, INVALID, INVALID, nullptr, 0, 0, + "Use SHT_RELR / DT_RELR* tags (default)", nullptr, nullptr) +OPTION(prefix_2, "no-warn-backrefs", no_warn_backrefs, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not warn about backward symbol references to fetch archive members (default)", nullptr, nullptr) +OPTION(prefix_2, "no-warn-common", no_warn_common, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not warn about duplicate common symbols (default)", nullptr, nullptr) +OPTION(prefix_2, "no-warn-mismatch", anonymous_57, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-warn-symbol-ordering", no_warn_symbol_ordering, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not warn about problems with the symbol ordering file", nullptr, nullptr) OPTION(prefix_2, "no-whole-archive", no_whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0, - "Restores the default behavior of loading archive members", nullptr, nullptr) + "Do not force load of all members in a static library (default)", nullptr, nullptr) OPTION(prefix_2, "noinhibit-exec", noinhibit_exec, Flag, INVALID, INVALID, nullptr, 0, 0, "Retain the executable output file whenever it is still usable", nullptr, nullptr) -OPTION(prefix_2, "non_shared", alias_Bstatic_non_shared, Flag, INVALID, Bstatic, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "nopie", nopie, Flag, INVALID, INVALID, nullptr, 0, 0, - "Do not create a position independent executable", nullptr, nullptr) +OPTION(prefix_2, "non_shared", anonymous_4, Flag, INVALID, Bstatic, nullptr, 0, 0, + "Alias for --Bstatic", nullptr, nullptr) OPTION(prefix_2, "nostdlib", nostdlib, Flag, INVALID, INVALID, nullptr, 0, 0, "Only search directories specified on the command line", nullptr, nullptr) -OPTION(prefix_1, "N", alias_omagic, Flag, INVALID, omagic, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "N", anonymous_20, Flag, INVALID, omagic, nullptr, 0, 0, + "Alias for --omagic", nullptr, nullptr) OPTION(prefix_3, "oformat", oformat, Separate, INVALID, INVALID, nullptr, 0, 0, "Specify the binary format for the output object file", "", nullptr) OPTION(prefix_3, "omagic", omagic, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -259,165 +321,213 @@ OPTION(prefix_3, "omagic", omagic, Flag, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_3, "opt-remarks-filename", opt_remarks_filename, Separate, INVALID, INVALID, nullptr, 0, 0, "YAML output file for optimization remarks", nullptr, nullptr) OPTION(prefix_3, "opt-remarks-with-hotness", opt_remarks_with_hotness, Flag, INVALID, INVALID, nullptr, 0, 0, - "Include hotness informations in the optimization remarks file", nullptr, nullptr) + "Include hotness information in the optimization remarks file", nullptr, nullptr) OPTION(prefix_2, "orphan-handling=", orphan_handling_eq, Joined, INVALID, orphan_handling, nullptr, 0, 0, "Control how orphan sections are handled when linker script used", nullptr, nullptr) -OPTION(prefix_2, "orphan-handling", orphan_handling, Separate, INVALID, INVALID, nullptr, 0, 0, - "Control how orphan sections are handled when linker script used", nullptr, nullptr) -OPTION(prefix_3, "output=", alias_o_output, Joined, INVALID, o, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_3, "output", alias_o_output2, Separate, INVALID, o, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "orphan-handling", orphan_handling, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "output=", anonymous_21, Joined, INVALID, o, nullptr, 0, 0, + "Alias for -o", nullptr, nullptr) +OPTION(prefix_3, "output", anonymous_22, Separate, INVALID, o, nullptr, 0, 0, + "Alias for -o", nullptr, nullptr) OPTION(prefix_1, "O", O, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Optimize output file size", nullptr, nullptr) OPTION(prefix_1, "o", o, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Path to file to write output", "", nullptr) -OPTION(prefix_2, "pack-dyn-relocs=", pack_dyn_relocs_eq, Joined, INVALID, INVALID, nullptr, 0, 0, - "Pack dynamic relocations in the given format (none or android)", "", nullptr) -OPTION(prefix_2, "pic-executable", alias_pie_pic_executable, Flag, INVALID, pie, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "pack-dyn-relocs=", pack_dyn_relocs_eq, Joined, INVALID, pack_dyn_relocs, nullptr, 0, 0, + "Pack dynamic relocations in the given format", "[none,android,relr,android+relr]", nullptr) +OPTION(prefix_2, "pack-dyn-relocs", pack_dyn_relocs, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[none,android,relr,android+relr]", nullptr) +OPTION(prefix_2, "pic-executable", anonymous_23, Flag, INVALID, pie, nullptr, 0, 0, + "Alias for --pie", nullptr, nullptr) OPTION(prefix_2, "pie", pie, Flag, INVALID, INVALID, nullptr, 0, 0, "Create a position independent executable", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=-fresolution=", plugin_opt_fresolution_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=-pass-through=", plugin_opt_pass_through_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=/", plugin_opt_slash, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=debug-pass-manager", anonymous_40, Flag, INVALID, lto_debug_pass_manager, nullptr, 0, 0, + "Alias for -lto-debug-pass-manager", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=disable-verify", anonymous_41, Flag, INVALID, disable_verify, nullptr, 0, 0, + "Alias for -disable-verify", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=dwo_dir=", plugin_opt_dwo_dir_eq, Joined, INVALID, INVALID, nullptr, 0, 0, + "Directory to store .dwo files when LTO and debug fission are used", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=jobs=", anonymous_42, Joined, INVALID, thinlto_jobs, nullptr, 0, 0, + "Alias for -thinlto-jobs", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=lto-partitions=", anonymous_43, Joined, INVALID, lto_partitions, nullptr, 0, 0, + "Alias for -lto-partitions", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=mcpu=", plugin_opt_mcpu_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=new-pass-manager", anonymous_44, Flag, INVALID, lto_new_pass_manager, nullptr, 0, 0, + "Alias for -lto-new-pass-manager", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=obj-path=", plugin_opt_obj_path_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=O", anonymous_39, Joined, INVALID, lto_O, nullptr, 0, 0, + "Alias for -lto-O", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=sample-profile=", anonymous_45, Joined, INVALID, lto_sample_profile, nullptr, 0, 0, + "Alias for -lto-sample-profile", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=save-temps", anonymous_46, Flag, INVALID, save_temps, nullptr, 0, 0, + "Alias for -save-temps", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto-emit-imports-files", plugin_opt_thinlto_emit_imports_files, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto-index-only=", plugin_opt_thinlto_index_only_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto-index-only", plugin_opt_thinlto_index_only, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto-object-suffix-replace=", plugin_opt_thinlto_object_suffix_replace_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto-prefix-replace=", plugin_opt_thinlto_prefix_replace_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=thinlto", plugin_opt_thinlto, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "plugin-opt=", plugin_opt_eq, Joined, INVALID, plugin_opt, nullptr, 0, 0, "specifies LTO options for compatibility with GNU linkers", nullptr, nullptr) -OPTION(prefix_2, "plugin-opt", plugin_opt, Separate, INVALID, INVALID, nullptr, 0, 0, - "specifies LTO options for compatibility with GNU linkers", nullptr, nullptr) -OPTION(prefix_2, "plugin=", plugin_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt", plugin_opt, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin=", plugin_eq, Joined, INVALID, plugin, nullptr, 0, 0, + "Ignored for compatibility with GNU linkers", nullptr, nullptr) OPTION(prefix_2, "plugin", plugin, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "pop-state", pop_state, Flag, INVALID, INVALID, nullptr, 0, 0, + "Undo the effect of -push-state", nullptr, nullptr) OPTION(prefix_2, "print-gc-sections", print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, "List removed unused sections", nullptr, nullptr) +OPTION(prefix_2, "print-icf-sections", print_icf_sections, Flag, INVALID, INVALID, nullptr, 0, 0, + "List identical folded sections", nullptr, nullptr) OPTION(prefix_2, "print-map", print_map, Flag, INVALID, INVALID, nullptr, 0, 0, "Print a link map to the standard output", nullptr, nullptr) -OPTION(prefix_2, "Qy", Qy, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "q", alias_emit_relocs, Flag, INVALID, emit_relocs, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "push-state", push_state, Flag, INVALID, INVALID, nullptr, 0, 0, + "Save the current state of -as-needed, -static and -whole-archive", nullptr, nullptr) +OPTION(prefix_2, "Qy", anonymous_68, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "q", anonymous_11, Flag, INVALID, emit_relocs, nullptr, 0, 0, + "Alias for --emit-relocs", nullptr, nullptr) OPTION(prefix_2, "relocatable", relocatable, Flag, INVALID, INVALID, nullptr, 0, 0, "Create relocatable object file", nullptr, nullptr) OPTION(prefix_2, "reproduce=", reproduce_eq, Joined, INVALID, reproduce, nullptr, 0, 0, "Dump linker invocation and input files for debugging", nullptr, nullptr) -OPTION(prefix_2, "reproduce", reproduce, Separate, INVALID, INVALID, nullptr, 0, 0, - "Dump linker invocation and input files for debugging", nullptr, nullptr) +OPTION(prefix_2, "reproduce", reproduce, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "retain-symbols-file=", retain_symbols_file_eq, Joined, INVALID, retain_symbols_file, nullptr, 0, 0, "Retain only the symbols listed in the file", "", nullptr) -OPTION(prefix_2, "retain-symbols-file", retain_symbols_file, Separate, INVALID, INVALID, nullptr, 0, 0, - "Retain only the symbols listed in the file", "", nullptr) -OPTION(prefix_2, "rpath-link=", rpath_link_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "rpath-link", rpath_link, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "retain-symbols-file", retain_symbols_file, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) +OPTION(prefix_2, "rpath-link=", anonymous_59, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "rpath-link", anonymous_58, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "rpath=", rpath_eq, Joined, INVALID, rpath, nullptr, 0, 0, "Add a DT_RUNPATH to the output", nullptr, nullptr) -OPTION(prefix_2, "rpath", rpath, Separate, INVALID, INVALID, nullptr, 0, 0, - "Add a DT_RUNPATH to the output", nullptr, nullptr) +OPTION(prefix_2, "rpath", rpath, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "rsp-quoting=", rsp_quoting_eq, Joined, INVALID, rsp_quoting, nullptr, 0, 0, - "Quoting style for response files. Values supported: windows|posix", nullptr, nullptr) -OPTION(prefix_2, "rsp-quoting", rsp_quoting, Separate, INVALID, INVALID, nullptr, 0, 0, - "Quoting style for response files. Values supported: windows|posix", nullptr, nullptr) -OPTION(prefix_1, "R", alias_rpath_R, JoinedOrSeparate, INVALID, rpath, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "r", alias_relocatable_r, Flag, INVALID, relocatable, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Quoting style for response files", "[posix,windows]", nullptr) +OPTION(prefix_2, "rsp-quoting", rsp_quoting, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "[posix,windows]", nullptr) +OPTION(prefix_1, "R", anonymous_26, JoinedOrSeparate, INVALID, rpath, nullptr, 0, 0, + "Alias for --rpath", nullptr, nullptr) +OPTION(prefix_1, "r", anonymous_25, Flag, INVALID, relocatable, nullptr, 0, 0, + "Alias for --relocatable", nullptr, nullptr) OPTION(prefix_2, "save-temps", save_temps, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "script=", script_eq, Joined, INVALID, script, nullptr, 0, 0, "Read linker script", nullptr, nullptr) -OPTION(prefix_2, "script", script, Separate, INVALID, INVALID, nullptr, 0, 0, - "Read linker script", nullptr, nullptr) -OPTION(prefix_2, "section-start", section_start, Separate, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "script", script, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "section-start=", section_start_eq, Joined, INVALID, section_start, nullptr, 0, 0, "Set address of section", "
", nullptr) +OPTION(prefix_2, "section-start", section_start, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "
", nullptr) OPTION(prefix_2, "shared", shared, Flag, INVALID, INVALID, nullptr, 0, 0, "Build a shared object", nullptr, nullptr) OPTION(prefix_2, "soname=", soname_eq, Joined, INVALID, soname, nullptr, 0, 0, "Set DT_SONAME", nullptr, nullptr) -OPTION(prefix_2, "soname", soname, Separate, INVALID, INVALID, nullptr, 0, 0, - "Set DT_SONAME", nullptr, nullptr) -OPTION(prefix_2, "sort-common", sort_common, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "soname", soname, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "sort-common", anonymous_60, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "sort-section=", sort_section_eq, Joined, INVALID, sort_section, nullptr, 0, 0, "Specifies sections sorting rule when linkerscript is used", nullptr, nullptr) -OPTION(prefix_2, "sort-section", sort_section, Separate, INVALID, INVALID, nullptr, 0, 0, - "Specifies sections sorting rule when linkerscript is used", nullptr, nullptr) -OPTION(prefix_2, "start-group", start_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "sort-section", sort_section, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "start-group", start_group, Flag, INVALID, INVALID, nullptr, 0, 0, + "Ignored for compatibility with GNU unless you pass --warn-backrefs", nullptr, nullptr) OPTION(prefix_2, "start-lib", start_lib, Flag, INVALID, INVALID, nullptr, 0, 0, "Start a grouping of objects that should be treated as if they were together in an archive", nullptr, nullptr) -OPTION(prefix_2, "static", alias_Bstatic_static, Flag, INVALID, Bstatic, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "stats", stats, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "static", anonymous_5, Flag, INVALID, Bstatic, nullptr, 0, 0, + "Alias for --Bstatic", nullptr, nullptr) +OPTION(prefix_2, "stats", anonymous_61, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "strip-all", strip_all, Flag, INVALID, INVALID, nullptr, 0, 0, "Strip all symbols", nullptr, nullptr) OPTION(prefix_2, "strip-debug", strip_debug, Flag, INVALID, INVALID, nullptr, 0, 0, "Strip debugging information", nullptr, nullptr) -OPTION(prefix_2, "symbol-ordering-file", symbol_ordering_file, Separate, INVALID, INVALID, nullptr, 0, 0, - "Layout sections in the order specified by symbol file", nullptr, nullptr) +OPTION(prefix_2, "symbol-ordering-file=", symbol_ordering_file_eq, Joined, INVALID, symbol_ordering_file, nullptr, 0, 0, + "Layout sections to place symbols in the order specified by symbol ordering file", nullptr, nullptr) +OPTION(prefix_2, "symbol-ordering-file", symbol_ordering_file, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "sysroot=", sysroot_eq, Joined, INVALID, sysroot, nullptr, 0, 0, "Set the system root", nullptr, nullptr) -OPTION(prefix_2, "sysroot", sysroot, Separate, INVALID, INVALID, nullptr, 0, 0, - "Set the system root", nullptr, nullptr) -OPTION(prefix_1, "S", alias_strip_debug_S, Flag, INVALID, strip_debug, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "s", alias_strip_all, Flag, INVALID, strip_all, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "sysroot", sysroot, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "S", anonymous_32, Flag, INVALID, strip_debug, nullptr, 0, 0, + "Alias for --strip-debug", nullptr, nullptr) +OPTION(prefix_1, "s", anonymous_31, Flag, INVALID, strip_all, nullptr, 0, 0, + "Alias for --strip-all", nullptr, nullptr) OPTION(prefix_2, "target1-abs", target1_abs, Flag, INVALID, INVALID, nullptr, 0, 0, - "Interpret R_ARM_TARGET1 as R_ARM_ABS32", nullptr, nullptr) + "Interpret R_ARM_TARGET1 as R_ARM_ABS32 (default)", nullptr, nullptr) OPTION(prefix_2, "target1-rel", target1_rel, Flag, INVALID, INVALID, nullptr, 0, 0, "Interpret R_ARM_TARGET1 as R_ARM_REL32", nullptr, nullptr) OPTION(prefix_2, "target2=", target2_eq, Joined, INVALID, target2, nullptr, 0, 0, "Interpret R_ARM_TARGET2 as , where is one of rel, abs, or got-rel", "", nullptr) -OPTION(prefix_2, "target2", target2, Separate, INVALID, INVALID, nullptr, 0, 0, - "Interpret R_ARM_TARGET2 as , where is one of rel, abs, or got-rel", "", nullptr) +OPTION(prefix_2, "target2", target2, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) OPTION(prefix_2, "Tbss=", Tbss_eq, Joined, INVALID, Tbss, nullptr, 0, 0, "Same as --section-start with .bss as the sectionname", nullptr, nullptr) -OPTION(prefix_2, "Tbss", Tbss, Separate, INVALID, INVALID, nullptr, 0, 0, - "Same as --section-start with .bss as the sectionname", nullptr, nullptr) +OPTION(prefix_2, "Tbss", Tbss, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "Tdata=", Tdata_eq, Joined, INVALID, Tdata, nullptr, 0, 0, "Same as --section-start with .data as the sectionname", nullptr, nullptr) -OPTION(prefix_2, "Tdata", Tdata, Separate, INVALID, INVALID, nullptr, 0, 0, - "Same as --section-start with .data as the sectionname", nullptr, nullptr) +OPTION(prefix_2, "Tdata", Tdata, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "thinlto-cache-dir=", thinlto_cache_dir, Joined, INVALID, INVALID, nullptr, 0, 0, "Path to ThinLTO cached object file directory", nullptr, nullptr) -OPTION(prefix_2, "thinlto-cache-policy", thinlto_cache_policy, Separate, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "thinlto-cache-policy=", thinlto_cache_policy_eq, Joined, INVALID, thinlto_cache_policy, nullptr, 0, 0, "Pruning policy for the ThinLTO cache", nullptr, nullptr) +OPTION(prefix_2, "thinlto-cache-policy", thinlto_cache_policy, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "thinlto-jobs=", thinlto_jobs, Joined, INVALID, INVALID, nullptr, 0, 0, "Number of ThinLTO jobs", nullptr, nullptr) OPTION(prefix_2, "threads", threads, Flag, INVALID, INVALID, nullptr, 0, 0, - "Run the linker multi-threaded", nullptr, nullptr) + "Run the linker multi-threaded (default)", nullptr, nullptr) OPTION(prefix_2, "trace-symbol=", trace_symbol_eq, Joined, INVALID, trace_symbol, nullptr, 0, 0, "Trace references to symbols", nullptr, nullptr) -OPTION(prefix_2, "trace-symbol", trace_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, - "Trace references to symbols", nullptr, nullptr) +OPTION(prefix_2, "trace-symbol", trace_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "trace", trace, Flag, INVALID, INVALID, nullptr, 0, 0, "Print the names of the input files", nullptr, nullptr) -OPTION(prefix_2, "Ttext-segment=", alias_Ttext_segment_eq, Joined, INVALID, Ttext, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "Ttext-segment", alias_Ttext_segment, Separate, INVALID, Ttext, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_4, "Ttext-segment=", anonymous_36, Joined, INVALID, Ttext, nullptr, 0, 0, + "Alias for --Ttext", nullptr, nullptr) +OPTION(prefix_4, "Ttext-segment", anonymous_35, Separate, INVALID, Ttext, nullptr, 0, 0, + "Alias for --Ttext", nullptr, nullptr) OPTION(prefix_2, "Ttext=", Ttext_eq, Joined, INVALID, Ttext, nullptr, 0, 0, "Same as --section-start with .text as the sectionname", nullptr, nullptr) -OPTION(prefix_2, "Ttext", Ttext, Separate, INVALID, INVALID, nullptr, 0, 0, - "Same as --section-start with .text as the sectionname", nullptr, nullptr) -OPTION(prefix_1, "T", alias_script_T, JoinedOrSeparate, INVALID, script, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "t", alias_trace, Flag, INVALID, trace, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "Ttext", Ttext, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "T", anonymous_27, JoinedOrSeparate, INVALID, script, nullptr, 0, 0, + "Alias for --script", nullptr, nullptr) +OPTION(prefix_1, "t", anonymous_33, Flag, INVALID, trace, nullptr, 0, 0, + "Alias for --trace", nullptr, nullptr) +OPTION(prefix_2, "undefined-version", undefined_version, Flag, INVALID, INVALID, nullptr, 0, 0, + "Allow unused version in version script (default)", nullptr, nullptr) OPTION(prefix_2, "undefined=", undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0, - "Force undefined symbol during linking", nullptr, nullptr) -OPTION(prefix_2, "undefined", undefined, Separate, INVALID, INVALID, nullptr, 0, 0, - "Force undefined symbol during linking", nullptr, nullptr) + "Force undefined symbol during linking", "", nullptr) +OPTION(prefix_2, "undefined", undefined, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "", nullptr) OPTION(prefix_2, "unresolved-symbols=", unresolved_symbols_eq, Joined, INVALID, unresolved_symbols, nullptr, 0, 0, "Determine how to handle unresolved symbols", nullptr, nullptr) -OPTION(prefix_2, "unresolved-symbols", unresolved_symbols, Separate, INVALID, INVALID, nullptr, 0, 0, - "Determine how to handle unresolved symbols", nullptr, nullptr) -OPTION(prefix_1, "u", alias_undefined_u, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "unresolved-symbols", unresolved_symbols, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "use-android-relr-tags", use_android_relr_tags, Flag, INVALID, INVALID, nullptr, 0, 0, + "Use SHT_ANDROID_RELR / DT_ANDROID_RELR* tags instead of SHT_RELR / DT_RELR*", nullptr, nullptr) +OPTION(prefix_1, "u", anonymous_37, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0, + "Alias for --undefined", nullptr, nullptr) OPTION(prefix_2, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0, "Verbose mode", nullptr, nullptr) OPTION(prefix_2, "version-script=", version_script_eq, Joined, INVALID, version_script, nullptr, 0, 0, "Read a version script", nullptr, nullptr) -OPTION(prefix_2, "version-script", version_script, Separate, INVALID, INVALID, nullptr, 0, 0, - "Read a version script", nullptr, nullptr) +OPTION(prefix_2, "version-script", version_script, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "version", version, Flag, INVALID, INVALID, nullptr, 0, 0, "Display the version number and exit", nullptr, nullptr) -OPTION(prefix_1, "V", alias_version_V, Flag, INVALID, version, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "V", anonymous_38, Flag, INVALID, version, nullptr, 0, 0, + "Alias for --version", nullptr, nullptr) OPTION(prefix_1, "v", v, Flag, INVALID, INVALID, nullptr, 0, 0, "Display the version number", nullptr, nullptr) +OPTION(prefix_2, "warn-backrefs", warn_backrefs, Flag, INVALID, INVALID, nullptr, 0, 0, + "Warn about backward symbol references to fetch archive members", nullptr, nullptr) OPTION(prefix_2, "warn-common", warn_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Warn about duplicate common symbols", nullptr, nullptr) -OPTION(prefix_2, "warn-execstack", warn_execstack, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "warn-once", warn_once, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "warn-shared-textrel", warn_shared_textrel, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "warn-execstack", anonymous_62, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "warn-once", anonymous_63, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "warn-shared-textrel", anonymous_64, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "warn-symbol-ordering", warn_symbol_ordering, Flag, INVALID, INVALID, nullptr, 0, 0, + "Warn about problems with the symbol ordering file (default)", nullptr, nullptr) OPTION(prefix_2, "warn-unresolved-symbols", warn_unresolved_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, "Report unresolved symbols as warnings", nullptr, nullptr) OPTION(prefix_2, "whole-archive", whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0, "Force load of all members in a static library", nullptr, nullptr) OPTION(prefix_2, "wrap=", wrap_eq, Joined, INVALID, wrap, nullptr, 0, 0, - "Use wrapper functions for symbol", "", nullptr) -OPTION(prefix_2, "wrap", wrap, Separate, INVALID, INVALID, nullptr, 0, 0, - "Use wrapper functions for symbol", "", nullptr) -OPTION(prefix_1, "X", alias_discard_locals_X, Flag, INVALID, discard_locals, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "x", alias_discard_all_x, Flag, INVALID, discard_all, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "y", alias_trace_symbol_y, JoinedOrSeparate, INVALID, trace_symbol, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Use wrapper functions for symbol", "=", nullptr) +OPTION(prefix_2, "wrap", wrap, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, "=", nullptr) +OPTION(prefix_1, "X", anonymous_10, Flag, INVALID, discard_locals, nullptr, 0, 0, + "Alias for --discard-locals", nullptr, nullptr) +OPTION(prefix_1, "x", anonymous_9, Flag, INVALID, discard_all, nullptr, 0, 0, + "Alias for --discard-all", nullptr, nullptr) +OPTION(prefix_1, "y", anonymous_34, JoinedOrSeparate, INVALID, trace_symbol, nullptr, 0, 0, + "Alias for --trace-symbol", nullptr, nullptr) OPTION(prefix_1, "z", z, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Linker option extensions", "