Boot image: only use the resolution stub when there is AOT code.

This avoids dirtying the page when the class becomes initialized.

Test: test.py
Bug: 119800099
Change-Id: I5cd7ae56b6637583179dbb766da251977b7ac961
7 files changed