aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / native / argus / tests / check_argus1_symbols.sh
| 1 | #!/usr/bin/env bash |
| 2 | # SPDX-License-Identifier: Apache-2.0 |
| 3 | # Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | set -euo pipefail |
| 18 | |
| 19 | if [[ $# -ne 3 ]]; then |
| 20 | echo "usage: $0 argus_event.o argus_ring.o aienos_capability.o" >&2 |
| 21 | exit 2 |
| 22 | fi |
| 23 | |
| 24 | bad=() |
| 25 | for object in "$@"; do |
| 26 | [[ -f "$object" ]] || { echo "missing object: $object" >&2; exit 2; } |
| 27 | while IFS= read -r symbol; do |
| 28 | symbol="${symbol#_}" |
| 29 | if [[ "$symbol" =~ ^(argus_detect_|argus_contain_|aienos_contain_|argus_aegis_bridge_) ]]; then |
| 30 | bad+=("$object -> $symbol") |
| 31 | fi |
| 32 | done < <(nm -u "$object" | awk 'NF {print $NF}') |
| 33 | done |
| 34 | |
| 35 | if ((${#bad[@]})); then |
| 36 | printf 'GATE ARGUS1_AUTHORITY_DIRECTION FAIL %s\n' "${bad[@]}" >&2 |
| 37 | exit 1 |
| 38 | fi |
| 39 | |
| 40 | printf 'GATE ARGUS1_AUTHORITY_DIRECTION PASS event/ring/authority have no upward detection, containment, or bridge references\n' |