• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2022 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5#
6# Regenerate kernel_loader bindgen bindings.
7
8set -euo pipefail
9cd "$(dirname "${BASH_SOURCE[0]}")/.."
10
11source tools/impl/bindgen-common.sh
12
13bindgen_generate \
14    --allowlist-type='Elf64_Ehdr' \
15    --allowlist-type='Elf64_Phdr' \
16    --allowlist-var='.+' \
17    "${BINDGEN_LINUX_X86_HEADERS}/include/linux/elf.h" \
18    -- \
19    -isystem "${BINDGEN_LINUX_X86_HEADERS}/include" \
20    | replace_linux_int_types \
21    > kernel_loader/src/elf.rs
22