1 /*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <stdio.h>
18 #include <stdlib.h>
19
20 #include "log.h"
21 #include "sigchain.h"
22
23 #define ATTRIBUTE_UNUSED __attribute__((__unused__))
24
25 // We cannot annotate the declarations, as they are not no-return in the non-fake version.
26 #pragma GCC diagnostic push
27 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
28 #pragma GCC diagnostic ignored "-Wmissing-noreturn"
29
30 namespace art {
31
EnsureFrontOfChain(int signal ATTRIBUTE_UNUSED)32 extern "C" void EnsureFrontOfChain(int signal ATTRIBUTE_UNUSED) {
33 log("EnsureFrontOfChain is not exported by the main executable.");
34 abort();
35 }
36
AddSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,SigchainAction * sa ATTRIBUTE_UNUSED)37 extern "C" void AddSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,
38 SigchainAction* sa ATTRIBUTE_UNUSED) {
39 log("SetSpecialSignalHandlerFn is not exported by the main executable.");
40 abort();
41 }
42
RemoveSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,bool (* fn)(int,siginfo_t *,void *)ATTRIBUTE_UNUSED)43 extern "C" void RemoveSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,
44 bool (*fn)(int, siginfo_t*, void*) ATTRIBUTE_UNUSED) {
45 log("SetSpecialSignalHandlerFn is not exported by the main executable.");
46 abort();
47 }
48
SkipAddSignalHandler(bool value ATTRIBUTE_UNUSED)49 extern "C" void SkipAddSignalHandler(bool value ATTRIBUTE_UNUSED) {
50 log("SkipAddSignalHandler is not exported by the main executable.");
51 abort();
52 }
53
54 #pragma GCC diagnostic pop
55
56 } // namespace art
57