diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-03-26 21:07:07 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-03-26 21:07:07 -0400 |
| commit | a32b5929ccf8cbf79396d8924097a1a911985dac (patch) | |
| tree | c45c7413d1fb6eab9ba102f3a0b7d48df1738164 /std/special/panic.zig | |
| parent | 8aeea72654b2efbd068abe207b42170c4d27ee03 (diff) | |
| download | zig-a32b5929ccf8cbf79396d8924097a1a911985dac.tar.gz zig-a32b5929ccf8cbf79396d8924097a1a911985dac.zip | |
add stack protector safety when linking libc
* introduce zigrt file. it contains only weak symbols so that
multiple instances can be merged. it contains __zig_panic
so that multiple .o files can call the same panic function.
* remove `@setFnVisible` builtin and add @setGlobalLinkage builtin
which is more powerful
* add `@panic` builtin function.
* fix collision of symbols with extern prototypes and internal
function names
* add stack protector safety when linking against libc. To add
the safety mechanism without libc requires implementing
Thread Local Storage. See #276
Diffstat (limited to 'std/special/panic.zig')
| -rw-r--r-- | std/special/panic.zig | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/std/special/panic.zig b/std/special/panic.zig deleted file mode 100644 index 9b58a4d9c8..0000000000 --- a/std/special/panic.zig +++ /dev/null @@ -1,12 +0,0 @@ -// This file is included if and only if the user's main source file does not -// include a public panic function. -// If this file wants to import other files *by name*, support for that would -// have to be added in the compiler. - -pub coldcc fn panic(message: []const u8) -> noreturn { - if (@compileVar("os") == Os.freestanding) { - while (true) {} - } else { - @import("std").debug.panic(message); - } -} |
