2021-12-08 00:21:45 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
#
|
|
|
|
# Regenerate kernel_loader bindgen bindings.
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
|
|
|
|
source tools/impl/bindgen-common.sh
|
|
|
|
|
|
|
|
bindgen_generate \
|
2022-07-13 01:21:38 +00:00
|
|
|
--allowlist-type='Elf32_Ehdr' \
|
|
|
|
--allowlist-type='Elf32_Phdr' \
|
2021-12-08 00:21:45 +00:00
|
|
|
--allowlist-type='Elf64_Ehdr' \
|
|
|
|
--allowlist-type='Elf64_Phdr' \
|
|
|
|
--allowlist-var='.+' \
|
|
|
|
"${BINDGEN_LINUX_X86_HEADERS}/include/linux/elf.h" \
|
|
|
|
-- \
|
|
|
|
-isystem "${BINDGEN_LINUX_X86_HEADERS}/include" \
|
|
|
|
| replace_linux_int_types \
|
|
|
|
> kernel_loader/src/elf.rs
|