forked from OSchip/llvm-project
Change the error format to report corrupted .eh_frame.
llvm-svn: 299289
This commit is contained in:
parent
49d70d0529
commit
3a965f7e68
|
@ -44,8 +44,8 @@ public:
|
|||
|
||||
private:
|
||||
template <class P> void failOn(const P *Loc, const Twine &Msg) {
|
||||
fatal(IS->getLocation<ELFT>((const uint8_t *)Loc - IS->Data.data()) + ": " +
|
||||
Msg);
|
||||
fatal("corrupted .eh_frame: " + Msg + "\n>>> defined in " +
|
||||
IS->getObjMsg<ELFT>((const uint8_t *)Loc - IS->Data.data()));
|
||||
}
|
||||
|
||||
uint8_t readByte();
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
||||
// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
|
||||
|
||||
.section .eh_frame
|
||||
.byte 0
|
||||
.section .eh_frame
|
||||
.byte 0
|
||||
|
||||
// CHECK: {{.*}}:(.eh_frame+0x0): CIE/FDE too small
|
||||
// CHECK: error: corrupted .eh_frame: CIE/FDE too small
|
||||
// CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x0)
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
||||
// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
|
||||
|
||||
.section .eh_frame
|
||||
.long 42
|
||||
.section .eh_frame
|
||||
.long 42
|
||||
|
||||
// CHECK: {{.*}}:(.eh_frame+0x0): CIE/FDE ends past the end of the section
|
||||
// CHECK: error: corrupted .eh_frame: CIE/FDE ends past the end of the section
|
||||
// CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x0)
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
||||
// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
|
||||
|
||||
.section .eh_frame
|
||||
.long 0xFFFFFFFC
|
||||
.section .eh_frame
|
||||
.long 0xFFFFFFFC
|
||||
|
||||
// CHECK: error: corrupted .eh_frame: CIE/FDE ends past the end of the section
|
||||
// CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x0)
|
||||
|
||||
// CHECK: {{.*}}:(.eh_frame+0x0): CIE/FDE ends past the end of the section
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
||||
// RUN: not ld.lld %t -o %t2 2>&1 | FileCheck %s
|
||||
|
||||
.section .eh_frame
|
||||
.long 0xFFFFFFFF
|
||||
.byte 0
|
||||
.section .eh_frame
|
||||
.long 0xFFFFFFFF
|
||||
.byte 0
|
||||
|
||||
// CHECK: {{.*}}:(.eh_frame+0x0): CIE/FDE too large
|
||||
// CHECK: error: corrupted .eh_frame: CIE/FDE too large
|
||||
// CHECK-NEXT: >>> defined in {{.*}}:(.eh_frame+0x0)
|
||||
|
|
Loading…
Reference in New Issue