From 86bfb22d4c32f65d3f12918f3833d1b976756d4a Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 12 Sep 2019 16:08:30 -0400 Subject: [PATCH] Override module when .replace is found --- native/jni/core/bootstages.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/native/jni/core/bootstages.cpp b/native/jni/core/bootstages.cpp index 5b5d08610..b31d81408 100644 --- a/native/jni/core/bootstages.cpp +++ b/native/jni/core/bootstages.cpp @@ -146,9 +146,11 @@ void node_entry::create_module_tree(const char *module) { if (is_root()) { // Root nodes should not be replaced rm_rf(buf); - return; + } else if (status < IS_MODULE) { + // Upgrade current node to current module + this->module = module; + status = IS_MODULE; } - status = IS_MODULE; return; }