|
1 |
| -/* |
2 |
| - * comcom64 - 64bit command.com |
3 |
| - * Copyright (C) 2023-2024 @stsp |
4 |
| - * |
5 |
| - * This program is free software: you can redistribute it and/or modify |
6 |
| - * it under the terms of the GNU General Public License as published by |
7 |
| - * the Free Software Foundation, either version 3 of the License, or |
8 |
| - * (at your option) any later version. |
9 |
| - * |
10 |
| - * This program is distributed in the hope that it will be useful, |
11 |
| - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
| - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
| - * GNU General Public License for more details. |
14 |
| - * |
15 |
| - * You should have received a copy of the GNU General Public License |
16 |
| - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 |
| - */ |
18 |
| - |
19 |
| -.text |
20 |
| - |
21 |
| -.macro asmcfunc_n nm,num |
22 |
| - .global _\nm |
23 |
| - _\nm: |
24 |
| - push %ebp |
25 |
| - mov %esp, %ebp |
26 |
| - pushal |
27 |
| - mov $\num, %ecx |
28 |
| - mov %esp, %edx |
29 |
| - call dj64_plt_call |
30 |
| - popal |
31 |
| - pop %ebp |
32 |
| - ret |
33 |
| -.endm |
34 |
| - |
35 |
| -#include "plt.inc" |
36 |
| - |
37 |
| -.macro asmsym nm |
38 |
| - .long _\nm |
39 |
| -.endm |
40 |
| - |
41 |
| -#define __ASM(t, n) asmsym n |
42 |
| -#define __ASM_FAR(t, n) asmsym n |
43 |
| -#define __ASM_NEAR(t, n) asmsym n |
44 |
| -#define __ASM_ARR(t, n, l) asmsym n |
45 |
| -#define __ASM_ARRI(t, n) asmsym n |
46 |
| -#define __ASM_ARRI_F(t, n) asmsym n |
47 |
| -#define __ASM_FUNC(n) asmsym n |
48 |
| -#define SEMIC |
49 |
| -__asm_symtab_start: |
50 |
| -#include <glob_asm.h> |
51 |
| -__asm_symtab_end: |
52 |
| - |
53 |
| -#ifdef __ELF__ |
54 |
| -.section .note.GNU-stack,"",%progbits |
55 |
| -#endif |
| 1 | +#include <dj64/plt.S.inc> |
0 commit comments