Skip to content

Commit 8da5b7c

Browse files
committed
Update BIOS function alias definition
Change the way the bios function aliases are generated, so that the ngdevkit symbol appears first when debugging or using objdump. This keeps conistency between the source and the compiled object.
1 parent 2dcd916 commit 8da5b7c

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

runtime/libngdevkit/bios-calls.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* BIOS function stubs for linker allocation
3-
* Copyright (c) 2025 Damien Ciabrini
3+
* Copyright (c) 2025-2026 Damien Ciabrini
44
* This file is part of ngdevkit
55
*
66
* ngdevkit is free software: you can redistribute it and/or modify
@@ -26,14 +26,13 @@ __asm__ (".section .text.bios\n" \
2626
".type " #name ", @function\n" \
2727
#name": .skip 6")
2828

29-
#define API_FUNC_ALIAS(name,alias) \
30-
__asm__ (".section .text.bios\n" \
31-
".global " #name "\n" \
32-
".type " #name ", @function\n" \
33-
".global " #alias "\n" \
34-
".type " #alias ", @function\n" \
35-
#alias":\n" \
36-
#name": .skip 6")
29+
#define API_FUNC_ALIAS(api_name, bios_alias) \
30+
__asm__ (".section .text.bios\n" \
31+
".global " #api_name "\n" \
32+
".type " #api_name ", @function\n" \
33+
#api_name":\n" \
34+
#bios_alias":\n" \
35+
" .skip 6")
3736

3837
API_FUNC(BIOS_INIT_HARDWARE);
3938

0 commit comments

Comments
 (0)