[PATCH] D76846: [lld][ELF] Fix error message
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 26 07:33:41 PDT 2020
jhenderson created this revision.
jhenderson added reviewers: ruiu, grimar, MaskRay, peter.smith.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
The error previously talked about a "section header" but was actually referring to a program header.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76846
Files:
lld/ELF/LinkerScript.cpp
lld/test/ELF/linkerscript/phdrs.s
Index: lld/test/ELF/linkerscript/phdrs.s
===================================================================
--- lld/test/ELF/linkerscript/phdrs.s
+++ 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
Index: lld/ELF/LinkerScript.cpp
===================================================================
--- lld/ELF/LinkerScript.cpp
+++ lld/ELF/LinkerScript.cpp
@@ -1223,7 +1223,7 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76846.252836.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/c99e2bd3/attachment-0001.bin>
More information about the llvm-commits
mailing list