Skip to content

Commit 6ec35a9

Browse files
committed
Fix the error messages as suggested.
1 parent a9e1149 commit 6ec35a9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lld/MachO/InputFiles.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,15 +809,15 @@ void ObjFile::parseSymbols(ArrayRef<typename LP::section> sectionHeaders,
809809

810810
if ((sym.n_type & N_TYPE) == N_SECT) {
811811
if (sym.n_sect == 0) {
812-
fatal("Section symbol " + StringRef(strtab + sym.n_strx) + " in " +
812+
fatal("section symbol " + StringRef(strtab + sym.n_strx) + " in " +
813813
toString(this) + " has an invalid section index [0]");
814814
}
815815
if (sym.n_sect > sections.size()) {
816-
fatal("Section symbol " + StringRef(strtab + sym.n_strx) + " in " +
816+
fatal("section symbol " + StringRef(strtab + sym.n_strx) + " in " +
817817
toString(this) + " has an invalid section index [" +
818818
Twine(static_cast<unsigned>(sym.n_sect)) +
819819
"] greater than the total number of sections [" +
820-
Twine(sections.size()) + "].");
820+
Twine(sections.size()) + "]");
821821
}
822822
Subsections &subsections = sections[sym.n_sect - 1]->subsections;
823823
// parseSections() may have chosen not to parse this section.

lld/test/MachO/handle-invalid-section-reference-too-big.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# RUN: yaml2obj %s -o %t
2323
# RUN: not %lld -platform_version macos 10.14 11.0 -arch arm64 %t 2>&1 | FileCheck %s --check-prefix=FATAL
2424

25-
# FATAL: error: Section symbol ltmp0 in {{.*}} has an invalid section index [10] greater than the total number of sections [2].
25+
# FATAL: error: section symbol ltmp0 in {{.*}} has an invalid section index [10] greater than the total number of sections [2]
2626

2727
--- !mach-o
2828
FileHeader:

lld/test/MachO/handle-invalid-section-reference-zero.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# RUN: yaml2obj %s -o %t
2323
# RUN: not %lld -platform_version macos 10.14 11.0 -arch arm64 %t 2>&1 | FileCheck %s --check-prefix=FATAL
2424

25-
# FATAL: error: Section symbol ltmp0 in {{.*}} has an invalid section index [0]
25+
# FATAL: error: section symbol ltmp0 in {{.*}} has an invalid section index [0]
2626

2727
--- !mach-o
2828
FileHeader:

0 commit comments

Comments
 (0)