History

tccelf.c

bellard committed 24 years ago

Commit 2eddd131 parent cdf51a71 file · +26 −5Browse files

Unified · Split

Makefile+26−5
@@ -12,7 +12,7 @@ CFLAGS+=-m386 -malign-functions=0 · 11 unmodified lines
12CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"12CFLAGS+=-DCONFIG_TCC_PREFIX=\"$(prefix)\"
13DISAS=objdump -d13DISAS=objdump -d
14INSTALL=install14INSTALL=install
15VERSION=0.9.815VERSION=0.9.10
16 16
17# run local version of tcc with local libraries and includes17# run local version of tcc with local libraries and includes
18TCC=./tcc -B. -I.18TCC=./tcc -B. -I.
@@ -46,6 +46,26 @@ test3: tcc tcc.c tcctest.c test.ref · 27 unmodified lines
46 $(TCC) tcc.c -B. -I. tcc.c -B. -I. tcctest.c > test.out346 $(TCC) tcc.c -B. -I. tcc.c -B. -I. tcctest.c > test.out3
47 @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi47 @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi
48 48
49# binary output test
50test4: tcc test.ref
51# dynamic output
52 $(TCC) -o tcctest1 tcctest.c
53 ./tcctest1 > test1.out
54 @if diff -u test.ref test1.out ; then echo "Dynamic Auto Test OK"; fi
55# static output
56 $(TCC) -static -o tcctest2 tcctest.c
57 ./tcctest2 > test2.out
58 @if diff -u test.ref test2.out ; then echo "Static Auto Test OK"; fi
59# object + link output
60 $(TCC) -c -o tcctest3.o tcctest.c
61 $(TCC) -o tcctest3 tcctest3.o
62 ./tcctest3 > test3.out
63 @if diff -u test.ref test3.out ; then echo "Object Auto Test OK"; fi
64# dynamic output + bound check
65 $(TCC) -b -o tcctest4 tcctest.c
66 ./tcctest4 > test4.out
67 @if diff -u test.ref test4.out ; then echo "BCheck Auto Test OK"; fi
68
49# memory and bound check auto test69# memory and bound check auto test
50BOUNDS_OK = 1 4 8 1070BOUNDS_OK = 1 4 8 10
51BOUNDS_FAIL= 2 5 7 9 11 12 1371BOUNDS_FAIL= 2 5 7 9 11 12 13
@@ -82,7 +102,7 @@ ex3: ex3.c · 30 unmodified lines
82 102
83# Native Tiny C Compiler103# Native Tiny C Compiler
84 104
85tcc_g: tcc.c i386-gen.c bcheck.c tcctok.h libtcc.h Makefile105tcc_g: tcc.c i386-gen.c tccelf.c tcctok.h libtcc.h Makefile
86 gcc $(CFLAGS) -o $@ $< $(LIBS)106 gcc $(CFLAGS) -o $@ $< $(LIBS)
87 107
88tcc: tcc_g108tcc: tcc_g
@@ -97,7 +117,7 @@ bcheck.o: bcheck.c · 8 unmodified lines
97 117
98install: tcc libtcc1.o bcheck.o118install: tcc libtcc1.o bcheck.o
99 $(INSTALL) -m755 tcc $(prefix)/bin119 $(INSTALL) -m755 tcc $(prefix)/bin
100 $(INSTALL) tcc.1 $(prefix)/man/man1120 $(INSTALL) tcc.1 $(prefix)/share/man/man1
101 mkdir -p $(prefix)/lib/tcc121 mkdir -p $(prefix)/lib/tcc
102 mkdir -p $(prefix)/lib/tcc/include122 mkdir -p $(prefix)/lib/tcc/include
103 $(INSTALL) -m644 libtcc1.o bcheck.o $(prefix)/lib/tcc123 $(INSTALL) -m644 libtcc1.o bcheck.o $(prefix)/lib/tcc
@@ -107,7 +127,8 @@ install: tcc libtcc1.o bcheck.o · 3 unmodified lines
107clean:127clean:
108 rm -f *~ *.o tcc tcc1 tcct tcc_g tcctest.ref *.bin *.i ex2 \128 rm -f *~ *.o tcc tcc1 tcct tcc_g tcctest.ref *.bin *.i ex2 \
109 core gmon.out test.out test.ref a.out tcc_p \129 core gmon.out test.out test.ref a.out tcc_p \
110 *.exe iltcc iltcc_g130 *.exe iltcc iltcc_g tcc-doc.html \
131 tcctest[1234] test[1234].out
111 132
112# IL TCC133# IL TCC
113 134
@@ -168,7 +189,7 @@ tar: · 54 unmodified lines
168 $(FILE)/README $(FILE)/TODO $(FILE)/COPYING \189 $(FILE)/README $(FILE)/TODO $(FILE)/COPYING \
169 $(FILE)/Changelog $(FILE)/tcc-doc.texi $(FILE)/tcc-doc.html \190 $(FILE)/Changelog $(FILE)/tcc-doc.texi $(FILE)/tcc-doc.html \
170 $(FILE)/tcc.1 \191 $(FILE)/tcc.1 \
171 $(FILE)/tcc.c $(FILE)/i386-gen.c $(FILE)/tcctok.h \192 $(FILE)/tcc.c $(FILE)/i386-gen.c $(FILE)/tccelf.c $(FILE)/tcctok.h \
172 $(FILE)/bcheck.c $(FILE)/libtcc1.c \193 $(FILE)/bcheck.c $(FILE)/libtcc1.c \
173 $(FILE)/il-opcodes.h $(FILE)/il-gen.c \194 $(FILE)/il-opcodes.h $(FILE)/il-gen.c \
174 $(FILE)/elf.h $(FILE)/stab.h $(FILE)/stab.def \195 $(FILE)/elf.h $(FILE)/stab.h $(FILE)/stab.def \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t