7.0.0-rc3 Release

This commit is contained in:
Tom Stellard 2018-09-11 23:21:15 +00:00
parent 4a0d79cafb
commit a46aea7edf
5 changed files with 7 additions and 138 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/lld-6.0.1.src.tar.xz
/lld-7.0.0rc1.src.tar.xz
/lld-7.0.0rc2.src.tar.xz
/lld-7.0.0rc3.src.tar.xz

View File

@ -1,38 +0,0 @@
From 5cfcd9ff4c1438e3865b9af03d5ff5abd5f1a7f6 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 31 Aug 2018 09:58:52 -0700
Subject: [PATCH] MachO: Fix out-of-bounds memory access in getString16
This fixes the following tests when gcc is compiled with gcc8:
lld :: mach-o/do-not-emit-unwind-fde-arm64.yaml
lld :: mach-o/eh-frame-relocs-arm64.yaml
---
lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h b/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
index 407bd9b..f0340a9 100644
--- a/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
+++ b/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
@@ -185,12 +185,11 @@ packRelocation(const Relocation &r, bool swap, bool isBigEndian) {
return result;
}
-inline StringRef getString16(const char s[16]) {
- StringRef x = s;
- if ( x.size() > 16 )
- return x.substr(0, 16);
- else
- return x;
+static StringRef getString16(const char s[16]) {
+ // The StringRef(const char *) constructor passes the const char * to
+ // strlen(), so we can't use this constructor here, because if there is no
+ // null terminator in s, then strlen() will read past the end of the array.
+ return StringRef(s, strnlen(s, 16));
}
inline void setString16(StringRef str, char s[16]) {
--
1.8.3.1

View File

@ -1,95 +0,0 @@
From 3b6223b0573aff553fc4424ca9d96c22f20ffd0a Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 31 Aug 2018 10:04:13 -0700
Subject: [PATCH] lld: Add missing REQUIRES to tests
---
test/COFF/guardcf-align.s | 2 ++
test/ELF/icf13.s | 2 ++
test/ELF/icf15.s | 2 ++
test/ELF/icf16.s | 2 ++
test/ELF/icf17.s | 2 ++
test/ELF/lto/libcall-archive.ll | 2 ++
6 files changed, 12 insertions(+)
diff --git a/test/COFF/guardcf-align.s b/test/COFF/guardcf-align.s
index a0caabc..c7aea52 100644
--- a/test/COFF/guardcf-align.s
+++ b/test/COFF/guardcf-align.s
@@ -5,6 +5,8 @@
# RUN: %t.obj %T/guardcf-align-foobar.obj
# RUN: llvm-readobj -coff-load-config %T/guardcf-align.exe | FileCheck %s
+# REQUIRES: x86_64
+
# Check that the gfids table contains at least one entry that ends in 0
# and no entries that end in something other than 0.
# CHECK: GuardFidTable [
diff --git a/test/ELF/icf13.s b/test/ELF/icf13.s
index 2fe707f..7db915c 100644
--- a/test/ELF/icf13.s
+++ b/test/ELF/icf13.s
@@ -1,6 +1,8 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: ld.lld -shared -z notext %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# REQUIRES: x86_64
+
## Check that ICF does not merge sections which relocations point to symbols
## that are not of the regular defined kind.
diff --git a/test/ELF/icf15.s b/test/ELF/icf15.s
index 57c1735..9b125fa 100644
--- a/test/ELF/icf15.s
+++ b/test/ELF/icf15.s
@@ -1,6 +1,8 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: ld.lld %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# REQUIRES: x86_64
+
## Check that ICF does not merge sections which relocations have equal addends,
## but different target values.
diff --git a/test/ELF/icf16.s b/test/ELF/icf16.s
index e7650af..f054c74 100644
--- a/test/ELF/icf16.s
+++ b/test/ELF/icf16.s
@@ -1,6 +1,8 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: ld.lld -shared -z notext %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# REQUIRES: x86_64
+
## ICF is able to merge sections which relocations referring regular input sections
## or mergeable sections. .eh_frame is represented with a different kind of section,
## here we check that ICF code is able to handle and will not merge sections which
diff --git a/test/ELF/icf17.s b/test/ELF/icf17.s
index 5d28aeb..697bd75 100644
--- a/test/ELF/icf17.s
+++ b/test/ELF/icf17.s
@@ -1,6 +1,8 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: ld.lld %t1 -o /dev/null --icf=all --print-icf-sections 2>&1 | FileCheck -allow-empty %s
+# REQUIRES: x86_64
+
# CHECK-NOT: selected
.section .text
diff --git a/test/ELF/lto/libcall-archive.ll b/test/ELF/lto/libcall-archive.ll
index 731e259..920b3ed 100644
--- a/test/ELF/lto/libcall-archive.ll
+++ b/test/ELF/lto/libcall-archive.ll
@@ -5,6 +5,8 @@
; RUN: ld.lld -o %t %t.o %t.a
; RUN: llvm-nm %t | FileCheck %s
+; REQUIRES: x86_64
+
; CHECK: T _start
; CHECK: T memcpy
--
1.8.3.1

View File

@ -1,10 +1,10 @@
%global rc_ver 2
%global rc_ver 3
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
Name: lld
Version: 7.0.0
Release: 0.3.rc%{rc_ver}%{?dist}
Release: 0.4.rc%{rc_ver}%{?dist}
Summary: The LLVM Linker
License: NCSA
@ -13,8 +13,6 @@ Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}
Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
Patch1: 0001-lld-Prefer-using-the-newest-installed-python-version.patch
Patch2: 0001-lld-Add-missing-REQUIRES-to-tests.patch
Patch3: 0001-MachO-Fix-out-of-bounds-memory-access-in-getString16.patch
BuildRequires: gcc
BuildRequires: gcc-c++
@ -99,6 +97,9 @@ make -C %{_target_platform} %{?_smp_mflags} check-lld
%{_libdir}/liblld*.so.*
%changelog
* Tue Sep 11 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
- 7.0.0-rc3 Release
* Fri Aug 31 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc2
- 7.0.0-rc2 Release

View File

@ -1 +1 @@
SHA512 (lld-7.0.0rc2.src.tar.xz) = 401ef1a55bddf21ffe2f90bc24e2592526311e3627c4602b75605379c5975504d2ee8a1de78fc006c31df1b3c444be47f33175dce81848e8d73a86cab7c706c1
SHA512 (lld-7.0.0rc3.src.tar.xz) = 0e4dcf8879e6bf0023e6f81106079207ee74df19fa96a4a78d0a1af011b21ad5adee5ab36b32f29faa63e8130d0feb2976d7d35e54577d930829d61188b9bf6f