This commit is contained in:
serge-sans-paille 2019-02-13 15:57:08 +00:00
parent a6ae39192e
commit 9ade9818c1
5 changed files with 29 additions and 15 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/lld-7.0.0rc3.src.tar.xz /lld-7.0.0rc3.src.tar.xz
/lld-7.0.0.src.tar.xz /lld-7.0.0.src.tar.xz
/lld-7.0.1.src.tar.xz /lld-7.0.1.src.tar.xz
/lld-8.0.0rc1.src.tar.xz

View File

View File

@ -1,7 +1,7 @@
diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/InputFiles.cpp diff -ru --new-file lld-8.0.0rc1.src.orig/ELF/InputFiles.cpp lld-8.0.0rc1.src/ELF/InputFiles.cpp
--- lld-7.0.1.src.orig/ELF/InputFiles.cpp 2019-01-25 10:12:56.412850573 +0000 --- lld-8.0.0rc1.src.orig/ELF/InputFiles.cpp 2019-02-12 08:09:21.746416886 +0000
+++ lld-7.0.1.src/ELF/InputFiles.cpp 2019-01-25 10:14:50.557726268 +0000 +++ lld-8.0.0rc1.src/ELF/InputFiles.cpp 2019-02-13 10:41:49.565275043 +0000
@@ -324,17 +324,6 @@ @@ -320,17 +320,6 @@
return Signature; return Signature;
} }
@ -19,13 +19,17 @@ diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/In
template <class ELFT> bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) { template <class ELFT> bool ObjFile<ELFT>::shouldMerge(const Elf_Shdr &Sec) {
// On a regular link we don't merge sections if -O0 (default is -O1). This // On a regular link we don't merge sections if -O0 (default is -O1). This
// sometimes makes the linker significantly faster, although the output will // sometimes makes the linker significantly faster, although the output will
@@ -439,22 +428,33 @@ @@ -440,18 +429,24 @@
case SHT_GROUP: { case SHT_GROUP: {
// De-duplicate section groups by their signatures. // De-duplicate section groups by their signatures.
StringRef Signature = getShtGroupSignature(ObjSections, Sec); StringRef Signature = getShtGroupSignature(ObjSections, Sec);
- bool IsNew = ComdatGroups.insert(CachedHashStringRef(Signature)).second; - bool IsNew = ComdatGroups.insert(CachedHashStringRef(Signature)).second;
this->Sections[I] = &InputSection::Discarded; this->Sections[I] = &InputSection::Discarded;
- // We only support GRP_COMDAT type of group. Get the all entries of the
- // section here to let getShtGroupEntries to check the type early for us.
- ArrayRef<Elf_Word> Entries = getShtGroupEntries(Sec);
-
- // If it is a new section group, we want to keep group members. - // If it is a new section group, we want to keep group members.
- // Group leader sections, which contain indices of group members, are - // Group leader sections, which contain indices of group members, are
- // discarded because they are useless beyond this point. The only - // discarded because they are useless beyond this point. The only
@ -50,19 +54,18 @@ diff -r -u --new-file lld-7.0.1.src.orig/ELF/InputFiles.cpp lld-7.0.1.src/ELF/In
if (IsNew) { if (IsNew) {
if (Config->Relocatable) if (Config->Relocatable)
this->Sections[I] = createInputSection(Sec); this->Sections[I] = createInputSection(Sec);
continue; @@ -459,7 +454,7 @@
} }
+
// Otherwise, discard group members. // Otherwise, discard group members.
- for (uint32_t SecIndex : getShtGroupEntries(Sec)) { - for (uint32_t SecIndex : Entries) {
+ for (uint32_t SecIndex : Entries.slice(1)) { + for (uint32_t SecIndex : Entries.slice(1)) {
if (SecIndex >= Size) if (SecIndex >= Size)
fatal(toString(this) + fatal(toString(this) +
": invalid section index in group: " + Twine(SecIndex)); ": invalid section index in group: " + Twine(SecIndex));
diff -r -u --new-file lld-7.0.1.src.orig/test/ELF/sht-group-empty.test lld-7.0.1.src/test/ELF/sht-group-empty.test diff -ru --new-file lld-8.0.0rc1.src.orig/test/ELF/sht-group-empty.test lld-8.0.0rc1.src/test/ELF/sht-group-empty.test
--- lld-7.0.1.src.orig/test/ELF/sht-group-empty.test 1970-01-01 00:00:00.000000000 +0000 --- lld-8.0.0rc1.src.orig/test/ELF/sht-group-empty.test 1970-01-01 00:00:00.000000000 +0000
+++ lld-7.0.1.src/test/ELF/sht-group-empty.test 2019-01-25 10:13:19.312026250 +0000 +++ lld-8.0.0rc1.src/test/ELF/sht-group-empty.test 2019-02-13 10:40:11.958253274 +0000
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
+# RUN: yaml2obj %s -o %t.o +# RUN: yaml2obj %s -o %t.o
+# RUN: ld.lld %t.o %t.o -o %t -r +# RUN: ld.lld %t.o %t.o -o %t -r

View File

@ -1,9 +1,9 @@
#%%global rc_ver 3 %global rc_ver 1
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src %global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
Name: lld Name: lld
Version: 7.0.1 Version: 8.0.0
Release: 3%{?rc_ver:.rc%{rc_ver}}%{?dist}.1 Release: 1%{?rc_ver:.rc%{rc_ver}}%{?dist}
Summary: The LLVM Linker Summary: The LLVM Linker
License: NCSA License: NCSA
@ -58,6 +58,7 @@ cd %{_target_platform}
-DLLVM_INCLUDE_TESTS=ON \ -DLLVM_INCLUDE_TESTS=ON \
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \ -DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DLLVM_TABLEGEN_EXE=%{_libdir}/llvm/llvm-tblgen\
-DLLVM_LIT_ARGS="-sv \ -DLLVM_LIT_ARGS="-sv \
-DFileCheck=%{_libdir}/llvm/FileCheck \ -DFileCheck=%{_libdir}/llvm/FileCheck \
-Dcount=%{_libdir}/llvm/count \ -Dcount=%{_libdir}/llvm/count \
@ -79,6 +80,12 @@ cd %{_target_platform}
chrpath --delete %{buildroot}%{_bindir}/* chrpath --delete %{buildroot}%{_bindir}/*
chrpath --delete %{buildroot}%{_libdir}/*.so* chrpath --delete %{buildroot}%{_libdir}/*.so*
for target in ld.lld ld64.lld wasm-ld
do
ln -s lld %{buildroot}%{_bindir}/${target}
done
%check %check
make -C %{_target_platform} %{?_smp_mflags} check-lld make -C %{_target_platform} %{?_smp_mflags} check-lld
@ -98,6 +105,9 @@ make -C %{_target_platform} %{?_smp_mflags} check-lld
%{_libdir}/liblld*.so.* %{_libdir}/liblld*.so.*
%changelog %changelog
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-1.rc1
- 8.0.0 Release candidate 1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-3.1 * Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (lld-7.0.1.src.tar.xz) = e5d3ed280d8ac6014cd6bbe080b11e2c4ebbae81dc14b637e779ec027d818dbae91c6f0de9e94bcecd6bdaa37f12c35141b5d81f0a15251d27932aa9bebd4047 SHA512 (lld-8.0.0rc1.src.tar.xz) = d766fc989132a34b0d975da02897fee40e9a4cb0027333c2bf5fde5311e78bccc813185d2afb32203f639003e34a9c042f546d3e9a5f709faa995dd5f4b54700