Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: src/untrusted/nosys/warning.h

Issue 22923022: Make libnosys function stubs part of libnacl (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Move all stub source files into stubs folder Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/untrusted/nosys/nosys.gyp ('K') | « src/untrusted/nosys/waitpid.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_ */
OLDNEW
« src/untrusted/nosys/nosys.gyp ('K') | « src/untrusted/nosys/waitpid.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698