diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1223,7 +1223,7 @@ if (Optional 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 --- 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