Skip to content

Commit 07fb52d

Browse files
committed
Comment on why we create headers
1 parent 0f498b7 commit 07fb52d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/nr_from_src.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def load_headers(names: Iterable[Tuple[str, str]], arch: str, extra: str = ''):
3333
with tempfile.NamedTemporaryFile(mode='w+', suffix='.h') as f:
3434
with tempfile.TemporaryDirectory() as temp_include_dir:
3535
os.mkdir('{}/asm'.format(temp_include_dir))
36+
# Create empty asm/unistd-eabi.h and asm/unistd-common.h because
37+
# the ARM asm/unistd.h header needs them.
3638
with open('{}/asm/unistd-eabi.h'.format(temp_include_dir), 'w'):
3739
pass
3840
with open('{}/asm/unistd-common.h'.format(temp_include_dir), 'w'):
@@ -73,7 +75,6 @@ def main():
7375
print("didn't find anywhere near enough syscalls; hack must have failed")
7476
subprocess.check_call(['git', '--no-pager', 'grep', r'\<__\([A-Z]\+_\)\?NR_'], cwd=linux_path)
7577
sys.exit(1)
76-
ARM_NAMES = ["breakpoint", "cacheflush", "usr26", "usr32", "set_tls"]
7778
numbers = {
7879
'linux-aarch64': dict(load_headers(names, 'arm64')),
7980
'linux-armeabi': dict(list(load_table('arch/arm/tools/syscall.tbl', {'common', 'eabi'})) + list(load_headers(names, 'arm', '#define __ARM_EABI__'))),

0 commit comments

Comments
 (0)