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 // We cannot annotate the declarations, as they are not no-return in the non-fake version.
24 #pragma GCC diagnostic push
25 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
26 #pragma GCC diagnostic ignored "-Wmissing-noreturn"
27
28 namespace art {
29
EnsureFrontOfChain(int signal)30 extern "C" void EnsureFrontOfChain([[maybe_unused]] int signal) {
31 LogError("EnsureFrontOfChain is not exported by the main executable.");
32 abort();
33 }
34
AddSpecialSignalHandlerFn(int signal,SigchainAction * sa)35 extern "C" void AddSpecialSignalHandlerFn([[maybe_unused]] int signal,
36 [[maybe_unused]] SigchainAction* sa) {
37 LogError("SetSpecialSignalHandlerFn is not exported by the main executable.");
38 abort();
39 }
40
RemoveSpecialSignalHandlerFn(int signal,bool (* fn)(int,siginfo_t *,void *))41 extern "C" void RemoveSpecialSignalHandlerFn([[maybe_unused]] int signal,
42 [[maybe_unused]] bool (*fn)(int, siginfo_t*, void*)) {
43 LogError("SetSpecialSignalHandlerFn is not exported by the main executable.");
44 abort();
45 }
46
SkipAddSignalHandler(bool value)47 extern "C" void SkipAddSignalHandler([[maybe_unused]] bool value) {
48 LogError("SkipAddSignalHandler is not exported by the main executable.");
49 abort();
50 }
51
52 #pragma GCC diagnostic pop
53
54 } // namespace art
55