blob: 8dde83c34f31fd646d93e340b09ccc14ae1c885e [file] [log] [blame]
Florian Mayere65e1932024-02-15 22:20:54 +00001/*
2 * Copyright (C) 2024 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 <stdint.h>
18#include <stdio.h>
19#include <stdlib.h>
20
21#include "../mte_utils.h"
22#include "CHECK.h"
23
24#if defined(__BIONIC__) && defined(__aarch64__)
25
26extern "C" int main(int, char**) {
27 int ret = is_stack_mte_on() ? 0 : 1;
28 printf("RAN\n");
29 return ret;
30}
31
32#else
33
34extern "C" int main(int, char**) {
35 printf("RAN\n");
36 return 1;
37}
38#endif