[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'
気になる本
- 作者: 前川武弘
- 出版社/メーカー: ディーアート
- 発売日: 2004/04/01
- メディア: 単行本
- クリック: 6回
- この商品を含むブログ (19件) を見る
ちょっと興味あり。Linuxよりも Windows NTの方が優れたOSかも知れないと思い始めているので。
作者が日本人なのもこの手の本では非常に珍しいのではないだろうか。
[読書] 村上龍:希望の国のエクソダス
- 作者: 村上龍
- 出版社/メーカー: 文藝春秋
- 発売日: 2002/05/10
- メディア: 文庫
- 購入: 5人 クリック: 229回
- この商品を含むブログ (192件) を見る
一気に読んでしまった。社会に対する漠然とした不安・不透明感をえぐられた感じ。
エクスタシーとは全然異なる作風に驚かされた。
IT、経済、政治等の異なる分野に対しての取材・事前調査を行い、更に自分できちんと考えることができる人というだけですごいのではなかろうか。
[Mona] binutils移植
最初からきちんとやってみる事に。今回は手順を残した。
- binutils以下で configure
- cygwin の /usr/include -> /usr/include.bakにリネーム(無用なヘッダをincludeさせたくない)
- make all-gas all-ldを試みる
- libbertyディレクトリで文句を言われるので
- どうも dummy.oのターゲットそのものが不要っぽいのでコメントアウト
- dummy.cの#include "functions.def"をコメントアウト
- libberty/Makefile
- monacapi/sysを追加。(Monaからぱくる)
- choose-temp.c:27:67: sys/file.h: No such file or directory
- choose-temp.c に #define NO_SYS_FILE_H /* by higepon */
- fdmatch.c:53:22: sys/stat.h: No such file or directory
- include
をコメントアウト - fdmatchは使用しなそうな関数なので return (1);して終了
- include
- fnmatch.c:45:19: errno.h: No such file or directory
- includeをコメントアウト
- floatformat.c:21:44: math.h: No such file or directory
- includeをコメントアウト
途中経過のブツ。
Mona-binutils-try.zip(11.5MB)