forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge internal development externally
- Loading branch information
Showing
229 changed files
with
8,265 additions
and
2,430 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// REQUIRES: system-linux | ||
|
||
/* | ||
* Check that llvm-bolt uses reserved space in a binary for allocating | ||
* new sections. | ||
*/ | ||
|
||
// RUN: %clang %s -o %t.exe -Wl,-q | ||
// RUN: llvm-bolt %t.exe -o %t.bolt.exe 2>&1 | FileCheck %s | ||
// RUN: %t.bolt.exe | ||
|
||
// CHECK: BOLT-INFO: using reserved space | ||
|
||
/* | ||
* Check that llvm-bolt detects a condition when the reserved space is | ||
* not enough for allocating new sections. | ||
*/ | ||
|
||
// RUN: %clang %s -o %t.exe -Wl,--no-eh-frame-hdr -Wl,-q -DTINY | ||
// RUN: not llvm-bolt %t.exe -o %t.bolt.exe 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix=CHECK-TINY | ||
|
||
// CHECK-TINY: BOLT-ERROR: reserved space (1 byte) is smaller than required | ||
|
||
#ifdef TINY | ||
#define RSIZE "1" | ||
#else | ||
#define RSIZE "8192 * 1024" | ||
#endif | ||
|
||
asm(".pushsection .text \n\ | ||
.globl __bolt_reserved_start \n\ | ||
.type __bolt_reserved_start, @object \n\ | ||
__bolt_reserved_start: \n\ | ||
.space " RSIZE " \n\ | ||
.globl __bolt_reserved_end \n\ | ||
__bolt_reserved_end: \n\ | ||
.popsection"); | ||
|
||
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.