when the first boot classfile core.jar is loaded, the file will be added to argv for the next loading classfile.
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\analysis\DexPrepare.c
for (cpe = gDvm.bootClassPath; cpe->ptr != NULL; cpe++) {
argv[curArg++] = cpe->fileName;
}
then the loaded classfiles will be extracted in:
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\dexopt\OptMain.c
static int fromDex(int argc, char* const argv[])
{
if (--argc == 0) {
bootClassPath = strdup("");
} else {
...
cp = bootClassPath = (char*) malloc(bcpLen +1);
...
if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode, flags) != 0) {
LOGE("VM init failed\n");
goto bail;
}
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\Init.c
int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
DexClassVerifyMode verifyMode, int dexoptFlags)
{
free(gDvm.bootClassPathStr);
gDvm.bootClassPathStr = strdup(bootClassPath);
if (!dvmClassStartup())
goto fail;
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\oo\Class.c
bool dvmClassStartup(void)
{
gDvm.loadedClasses =
dvmHashTableCreate(256, (HashFreeFunc) dvmFreeClassInnards);
processClassPath(gDvm.bootClassPathStr, true);
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\analysis\DexPrepare.c
for (cpe = gDvm.bootClassPath; cpe->ptr != NULL; cpe++) {
argv[curArg++] = cpe->fileName;
}
then the loaded classfiles will be extracted in:
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\dexopt\OptMain.c
static int fromDex(int argc, char* const argv[])
{
if (--argc == 0) {
bootClassPath = strdup("");
} else {
...
cp = bootClassPath = (char*) malloc(bcpLen +1);
...
if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode, flags) != 0) {
LOGE("VM init failed\n");
goto bail;
}
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\Init.c
int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
DexClassVerifyMode verifyMode, int dexoptFlags)
{
free(gDvm.bootClassPathStr);
gDvm.bootClassPathStr = strdup(bootClassPath);
if (!dvmClassStartup())
goto fail;
d:\linux\linuxkernel\WORKING_DIRECTORY\android-omap-20111108-gingerbread\dalvik\vm\oo\Class.c
bool dvmClassStartup(void)
{
gDvm.loadedClasses =
dvmHashTableCreate(256, (HashFreeFunc) dvmFreeClassInnards);
processClassPath(gDvm.bootClassPathStr, true);