Produce an error for an invalid use of .symver.
llvm-svn: 117462
This commit is contained in:
parent
ba1c6cd62f
commit
26496e6835
|
@ -468,6 +468,11 @@ void ELFObjectWriterImpl::ExecutePostLayoutBinding(MCAssembler &Asm) {
|
|||
if (!Symbol.isUndefined() && !Rest.startswith("@@@"))
|
||||
continue;
|
||||
|
||||
// FIXME: produce a better error message.
|
||||
if (Symbol.isUndefined() && Rest.startswith("@@") &&
|
||||
!Rest.startswith("@@@"))
|
||||
report_fatal_error("A @@ version cannot be undefined");
|
||||
|
||||
std::pair<const MCSymbol *, const MCSymbol *> t(&Symbol, &Alias);
|
||||
Renames.insert(t);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
// RUN: not llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t 2> %t.out
|
||||
// RUN: FileCheck --input-file=%t.out %s
|
||||
|
||||
// CHECK: A @@ version cannot be undefined
|
||||
|
||||
.symver undefined, foo@@bar
|
||||
.long undefined
|
Loading…
Reference in New Issue