-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16559 from kcbanner/improve_compiler_rt_stack_trace
Unwinding follow up: Don't strip compiler_rt symbols, enable unwind tables on supported platforms
- Loading branch information
Showing
9 changed files
with
81 additions
and
24 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const std = @import("std"); | ||
|
||
pub fn build(b: *std.Build) void { | ||
const test_step = b.step("test", "Test it"); | ||
b.default_step = test_step; | ||
|
||
const target = b.standardTargetOptions(.{}); | ||
const optimize = b.standardOptimizeOption(.{}); | ||
|
||
if (target.getObjectFormat() != .elf) return; | ||
|
||
const exe = b.addExecutable(.{ | ||
.name = "main", | ||
.optimize = optimize, | ||
.target = target, | ||
}); | ||
exe.addCSourceFile("main.c", &.{}); | ||
exe.link_gc_sections = false; | ||
exe.bundle_compiler_rt = true; | ||
|
||
// Verify compiler_rt hasn't pulled in any debug handlers | ||
const check_exe = exe.checkObject(); | ||
check_exe.checkInSymtab(); | ||
check_exe.checkNotPresent("debug.readElfDebugInfo"); | ||
test_step.dependOn(&check_exe.step); | ||
} |
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,11 @@ | ||
#include <stddef.h> | ||
|
||
void* __memset(void* dest, char c, size_t n, size_t dest_n); | ||
|
||
char foo[128]; | ||
|
||
int main() { | ||
__memset(&foo[0], 0xff, 128, 128); | ||
return foo[64]; | ||
} | ||
|