[lld] 3ff3c69 - [lld][ELF] Fix error message
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 08:32:00 PDT 2020
Author: James Henderson
Date: 2020-03-26T15:30:24Z
New Revision: 3ff3c6986b1aea1ca0630bf844f8567780eaec90
URL: https://github.com/llvm/llvm-project/commit/3ff3c6986b1aea1ca0630bf844f8567780eaec90
DIFF: https://github.com/llvm/llvm-project/commit/3ff3c6986b1aea1ca0630bf844f8567780eaec90.diff
LOG: [lld][ELF] Fix error message
The error previously talked about a "section header" but was actually
referring to a program header.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D76846
Added:
Modified:
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/phdrs.s
Removed:
################################################################################
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index ef767700ccd9..f52dc701541f 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -1223,7 +1223,7 @@ std::vector<size_t> LinkerScript::getPhdrIndices(OutputSection *cmd) {
if (Optional<size_t> idx = getPhdrIndex(phdrsCommands, s))
ret.push_back(*idx);
else if (s != "NONE")
- error(cmd->location + ": section header '" + s +
+ error(cmd->location + ": program header '" + s +
"' is not listed in PHDRS");
}
return ret;
diff --git a/lld/test/ELF/linkerscript/phdrs.s b/lld/test/ELF/linkerscript/phdrs.s
index 8774bc04d497..2e9fcf23bf71 100644
--- a/lld/test/ELF/linkerscript/phdrs.s
+++ b/lld/test/ELF/linkerscript/phdrs.s
@@ -128,7 +128,7 @@
# DEFHDR-NEXT: PF_X (0x1)
# DEFHDR-NEXT: ]
-# BADHDR: {{.*}}.script:1: section header 'bar' is not listed in PHDRS
+# BADHDR: {{.*}}.script:1: program header 'bar' is not listed in PHDRS
# RUN: echo "PHDRS { text PT_LOAD FOOHDR; }" > %t1.script
# RUN: not ld.lld -o /dev/null --script %t1.script %t 2>&1 | FileCheck --check-prefix=FOOHDR %s
More information about the llvm-commits
mailing list