[Mona] as移植チャレンジ

↓を参考に、as, ld を移植しようかと。monacapiを使うと結構進む。
http://www.rbt.his.fukui-u.ac.jp/~naniwa/comp/OS/c_devel.html

↓惜しい!!(気がする

ld -o as.new -n --image-base=0xA0000000 -e _user_start ../monalib/crt_exe.o tc-i
386.o obj-coff.o atof-ieee.o app.o as.o atof-generic.o bignum-copy.o cond.o expr
.o flonum-konst.o flonum-copy.o flonum-mult.o frags.o hash.o input-file.o input-
scrub.o literal.o messages.o output-file.o read.o subsegs.o symbols.o write.o li
sting.o ecoff.o stabs.o sb.o macro.o -L../bfd -lbfd  ../libiberty/libiberty.a  .
./monalib/libmonac.a
../monalib/crt_exe.o(.text+0x76):crt_exe.c: undefined reference to `monamain'
tc-i386.o(.text+0x350):tc-i386.c: undefined reference to `_imp___ctype_'
tc-i386.o(.text+0x232a):tc-i386.c: undefined reference to `_imp___ctype_'
tc-i386.o(.text+0x23fa):tc-i386.c: undefined reference to `_imp___ctype_'
tc-i386.o(.text+0x2454):tc-i386.c: undefined reference to `sscanf'
tc-i386.o(.text+0x24e5):tc-i386.c: undefined reference to `_imp___ctype_'
tc-i386.o(.text+0x2c5b):tc-i386.c: undefined reference to `_imp___ctype_'
obj-coff.o(.text+0x1205):obj-coff.c: undefined reference to `__getreent'
obj-coff.o(.text+0x3462):obj-coff.c: undefined reference to `_alloca'
obj-coff.o(.text+0x34fb):obj-coff.c: undefined reference to `_alloca'
as.o(.text+0x1f):as.c: undefined reference to `__getreent'
as.o(.text+0x4a):as.c: undefined reference to `__getreent'
as.o(.text+0x44a):as.c: undefined reference to `__getreent'
as.o(.text+0x4bd):as.c: undefined reference to `__getreent'
as.o(.text+0x4df):as.c: undefined reference to `__getreent'
as.o(.text+0x501):as.c: more undefined references to `__getreent' follow
as.o(.text+0x5a0):as.c: undefined reference to `strtol'