From owner-svn-src-all@freebsd.org Wed Aug 24 17:38:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D2ADBC5E7E; Wed, 24 Aug 2016 17:38:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B246174B; Wed, 24 Aug 2016 17:38:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7OHce42036559; Wed, 24 Aug 2016 17:38:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7OHcekO036555; Wed, 24 Aug 2016 17:38:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201608241738.u7OHcekO036555@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 24 Aug 2016 17:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r304767 - in vendor/lld/dist: ELF docs test/ELF X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2016 17:38:41 -0000 Author: dim Date: Wed Aug 24 17:38:40 2016 New Revision: 304767 URL: https://svnweb.freebsd.org/changeset/base/304767 Log: Vendor import of lld release_39 branch r279477: https://llvm.org/svn/llvm-project/lld/branches/release_39@279477 Modified: vendor/lld/dist/ELF/Target.cpp vendor/lld/dist/docs/ReleaseNotes.rst vendor/lld/dist/test/ELF/tls-i686.s Modified: vendor/lld/dist/ELF/Target.cpp ============================================================================== --- vendor/lld/dist/ELF/Target.cpp Wed Aug 24 17:38:24 2016 (r304766) +++ vendor/lld/dist/ELF/Target.cpp Wed Aug 24 17:38:40 2016 (r304767) @@ -436,6 +436,7 @@ uint64_t X86TargetInfo::getImplicitAdden case R_386_GOTPC: case R_386_PC32: case R_386_PLT32: + case R_386_TLS_LE: return read32le(Buf); } } Modified: vendor/lld/dist/docs/ReleaseNotes.rst ============================================================================== --- vendor/lld/dist/docs/ReleaseNotes.rst Wed Aug 24 17:38:24 2016 (r304766) +++ vendor/lld/dist/docs/ReleaseNotes.rst Wed Aug 24 17:38:40 2016 (r304767) @@ -5,9 +5,6 @@ LLD 3.9 Release Notes .. contents:: :local: -.. warning:: - These are in-progress notes for the upcoming LLVM 3.9 release. - Introduction ============ @@ -16,26 +13,90 @@ Here we describe the status of LLD, incl from the previous release. All LLD releases may be downloaded from the `LLVM releases web site `_. -Non-comprehensive list of changes in this release -================================================= +What's new in ELF Support? +========================== + +LLD 3.9 is a major milestone for us. It is the first release that can +link real-world large userland programs, including LLVM/Clang/LLD +themselves. In fact, for example, it can now be used to produce most +userland programs distributed as part of FreeBSD. + +Many contributors have joined to the project to develop new features, +port it to new architectures and fix issues since the last release. + +Link-Time Optimization +---------------------- + +Initial support for LTO has been added. It is compatible with +`the LLVM gold plugin `_ in terms of +command line flags and input file format so that LLD is usable as a +drop-in replacement for GNU gold. LTO is implemented as a native +feature unlike the GNU gold's plugin mechanism. + +Identical Code Folding +---------------------- + +LLD 3.9 can now merge identical code sections to produce smaller +output files. It is expected to be used with ``-ffunction-sections``. + +Symbol Versioning +----------------- + +LLD 3.9 is able to link against versioned symbols as well as produce +versioned symbols. Both the original Sun's symbol versioning scheme +and the GNU extension are supported. + +New Targets +----------- + +LLD has expanded support for new targets, including ARM/Thumb, the x32 +ABI and MIPS N64 ABI, in addition to the existing support for x86, +x86-64, MIPS, PowerPC and PPC64. + +TLS Relocation Optimizations +---------------------------- + +The ELF ABI specification of the thread-local variable define a few +peephole optimizations linkers can do by rewriting instructions at the +link-time to reduce run-time overhead to access TLS variables. That +feature has been implemented. -ELF Improvements +New Linker Flags ---------------- -* Initial support for LTO. +Many command line options have been added in this release, including: + +- Symbol resolution and output options: ``-Bsymbolic-functions``, + ``-export-dynamic-symbol``, ``-image-base``, ``-pie``, ``-end-lib``, + ``-start-lib``, ``-build-id={md5,sha1,none,0x}``. + +- Symbol versioning option: ``-dynamic-list``. + +- LTO options: ``-lto-O``, ``-lto-aa-pipeline``, ``-lto-jobs``, + ``-lto-newpm-passes``, ``-plugin``, ``-plugin-eq``, ``-plugin-opt``, + ``-plugin-opt-eq``, ``-disable-verify``, ``-mllvm``. + +- Driver optionss: ``-help``, ``-version``, ``-unresolved-symbols``. + +- Debug options: ``-demangle``, ``-reproduce``, ``-save-temps``, + ``-strip-debug``, ``-trace``, ``-trace-symbol``, + ``-warn-execstack``. + +- Exception handling option: ``-eh-frame-hdr``. + +- Identical Code Folding option: ``-icf``. Changes to the MIPS Target -~~~~~~~~~~~~~~~~~~~~~~~~~~ +-------------------------- * Added support for MIPS N64 ABI. * Added support for TLS relocations for both O32 and N64 MIPS ABIs. -COFF Improvements ------------------ - -* Item 1. - -MachO Improvements ------------------- +Building LLVM Toolchain with LLD +-------------------------------- -* Item 1. +A new CMake variable, ``LLVM_ENABLE_LLD``, has been added to use LLD +to build the LLVM toolchain. If the varaible is true, ``-fuse-ld=lld`` +option will be added to linker flags so that ``ld.lld`` is used +instead of default ``ld``. Because ``-fuse-ld=lld`` is a new compiler +driver option, you need Clang 3.8 or newer to use the feature. Modified: vendor/lld/dist/test/ELF/tls-i686.s ============================================================================== --- vendor/lld/dist/test/ELF/tls-i686.s Wed Aug 24 17:38:24 2016 (r304766) +++ vendor/lld/dist/test/ELF/tls-i686.s Wed Aug 24 17:38:40 2016 (r304767) @@ -28,7 +28,7 @@ _start: movl %gs:0, %ecx leal var@ntpoff(%ecx), %eax movl %gs:0, %ecx - leal var1@ntpoff(%ecx), %eax + leal var1@ntpoff+123(%ecx), %eax // DIS: Disassembly of section test: // DIS-NEXT: _start: @@ -41,7 +41,7 @@ _start: // DIS-NEXT: 1201c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx // DIS-NEXT: 12023: 8d 81 f8 ff ff ff leal -8(%ecx), %eax // DIS-NEXT: 12029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx -// DIS-NEXT: 12030: 8d 81 fc ff ff ff leal -4(%ecx), %eax +// DIS-NEXT: 12030: 8d 81 77 00 00 00 leal 119(%ecx), %eax // RELOC: Relocations [ // RELOC-NEXT: ] @@ -57,7 +57,7 @@ _start: // DISSHARED-NEXT: 201c: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx // DISSHARED-NEXT: 2023: 8d 81 00 00 00 00 leal (%ecx), %eax // DISSHARED-NEXT: 2029: 65 8b 0d 00 00 00 00 movl %gs:0, %ecx -// DISSHARED-NEXT: 2030: 8d 81 00 00 00 00 leal (%ecx), %eax +// DISSHARED-NEXT: 2030: 8d 81 7b 00 00 00 leal 123(%ecx), %eax // RELOCSHARED: Relocations [ // RELOCSHARED-NEXT: Section (4) .rel.dyn {