ヾノ*>ㅅ<)ノシ帳

ノンジャンルのふりーだむなブログです。

S2Eの差分ビルドがうまくいかなかった

備忘録です。S2Eを一回フルビルド後に、1つのファイルを変更して make -f ../s2e/Makefile しても変更が関知されなかったことがありました。 本家のドキュメントには

Updating S2E You can use the same Makefile to recompile S2E either when changing it yourself or when pulling new versions through git. Note that the Makefile will not automatically reconfigure the packages; for deep changes you might need to either start from scratch by issuing make clean or to force the reconfiguration of specific modules by deleting the corresponding files from the stamps subdirectory.

from https://github.com/dslab-epfl/s2e/blob/master/docs/BuildingS2E.rst

と、修正が多いときはmake cleanしてフルビルドしないといけないケースはあるようです。 それは面倒いのでオブジェクトファイルを消去する方法で対処してみました。

s2e-buildでs2eのビルドをしたので、s2eに関するオブジェクトファイルは s2e-build/qemu-release/arm-s2e-softmmu/s2e に生成されます。変更したソースコードに対応するオブジェクトファイルを消去して make -f ../s2e/Makefile して差分ビルド成功です。

そのあとは一々オブジェクトファイルを消去しなくても差分ビルドしてくれるようになったのでよくわからんです。
# Makefileがs2eのコードの変更を監視してないように見えるんですがこれは…