Skip to content

Commit 3c08523

Browse files
committed
Address review feedback:
- Require aarch64 - Fix typo - Remove blank lines in test - Include reason for illegality in comment Misc: - Remove backticks around file and section names
1 parent c6fc309 commit 3c08523

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lld/ELF/Driver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2993,7 +2993,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) {
29932993

29942994
// ELF dependent libraries may have introduced new input files after LTO has
29952995
// completed. This is an error if the files haven't already been parsed, since
2996-
// it's no longer legal to change the symbol table by parsing them.
2996+
// changing the symbol table could break the semantic assumptions of LTO.
29972997
auto newInputFiles = ArrayRef(ctx.driver.files).slice(numInputFilesBeforeLTO);
29982998
if (!newInputFiles.empty()) {
29992999
DenseSet<StringRef> oldFilenames;

lld/test/ELF/deplibs-lto.s

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: x86
1+
# REQUIRES: aarch64
22

33
# RUN: rm -rf %t && split-file %s %t && cd %t
44
# RUN: llvm-mc -filetype=obj -triple=aarch64 -o deplibs.o deplibs.s
@@ -7,15 +7,13 @@
77
# RUN: llvm-ar rc libdeplibs.a deplibs.o
88
# RUN: llvm-ar rc libfoo.a foo.o
99

10-
## LTO emits a libcall (`__aarch64_ldadd4_relax`) that is resolved using a
11-
## library (libdeplibc.a) that contains a `.deplibs` section pointing to a file
12-
## not yet added to the link.
13-
10+
## LTO emits a libcall (__aarch64_ldadd4_relax) that is resolved using a
11+
## library (libdeplibs.a) that contains a .deplibs section pointing to a file
12+
## (libfoo.a) not yet added to the link.
1413
# RUN: not ld.lld lto.o -u a -L. -ldeplibs 2>&1 | FileCheck %s
1514
# CHECK: error: input file 'foo.o' added after LTO
1615

1716
## Including the file before LTO prevents the issue.
18-
1917
# RUN: ld.lld lto.o -u a -L. -ldeplibs -lfoo
2018

2119
#--- foo.s

0 commit comments

Comments
 (0)