| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Copyright 2008 The Native Client Authors. All rights reserved. | |
| 3 * Use of this source code is governed by a BSD-style license that can | |
| 4 * be found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 /* | |
| 8 * NaCl libnosys stub_warning macro. Note: can only be used with GCC & ELF. | |
| 9 */ | |
| 10 | |
| 11 #ifndef NATIVE_CLIENT_SRC_UNTRUSTED_NOSYS_WARNING_H_ | |
| 12 #define NATIVE_CLIENT_SRC_UNTRUSTED_NOSYS_WARNING_H_ | |
| 13 | |
| 14 /* We want the .gnu.warning.SYMBOL section to be unallocated. | |
| 15 Tacking on "\n\t#" to the section name makes gcc put it's bogus | |
| 16 section attributes on what looks like a comment to the assembler. */ | |
| 17 /* This hack does not work with PNaCl, and section attributes are not | |
| 18 allowed on globals in the bitcode ABI, so we just define it away. | |
| 19 */ | |
| 20 | |
| 21 #ifndef __pnacl__ | |
| 22 #define link_warning(symbol, msg) \ | |
| 23 static const char __evoke_link_warning_##symbol[] \ | |
| 24 __attribute__((__used__, section (".gnu.warning." #symbol "\n\t#"))) = msg | |
| 25 /* A canned warning for sysdeps/stub functions. | |
| 26 The GNU linker prepends a "warning: " string. */ | |
| 27 #define stub_warning(name) \ | |
| 28 link_warning(name, \ | |
| 29 "the `" #name "\' function is not implemented and will always fail") | |
| 30 #else | |
| 31 #define link_warning(symbol, msg) | |
| 32 #define stub_warning(symbol) | |
| 33 #endif | |
| 34 | |
| 35 #endif /* NATIVE_CLIENT_SRC_UNTRUSTED_NOSYS_WARNING_H_ */ | |
| OLD | NEW |