Skip to content

Commit b0b2172

Browse files
committed
move plt.S to dj64dev
1 parent 7938125 commit b0b2172

File tree

2 files changed

+3
-56
lines changed

2 files changed

+3
-56
lines changed

src/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ LINK_OPT = $(shell pkg-config --libs dj64) -shared -Wl,-Bsymbolic \
2525
-Wl,-rpath=/usr/local/i386-pc-dj64/lib64 \
2626
-Wl,-rpath=/usr/i386-pc-dj64/lib64
2727
DOSLDFLAGS = --whole-archive $(shell pkg-config --static --libs dj64static)
28+
CPPFLAGS = -I. $(shell pkg-config --cflags dj64)
2829
SRCS = command.c cmdbuf.c ms.c env.c psp.c umb.c ae0x.c compl.c \
2930
version.c thunks_a.c thunks_c.c
3031
OBJS = $(SRCS:.c=.o)
@@ -89,7 +90,7 @@ plt.o: plt.asm
8990
$(HOST_AS) -o $@
9091

9192
plt.asm: $(srcdir)/plt.S plt.inc $(SRC)/glob_asm.h
92-
$(CPP) -I . -P $< >$@ || ($(RM) $@ ; false)
93+
$(CPP) $(CPPFLAGS) -P $< >$@ || ($(RM) $@ ; false)
9394

9495
thunks_c.o: thunk_calls.h
9596

src/plt.S

+1-55
Original file line numberDiff line numberDiff line change
@@ -1,55 +1 @@
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

Comments
 (0)