Don't pass in oat file name to NativeLocationInImage
We already have the oat file name stored in the relocation, using
the one passed in for the image info can cause a mismatch.
I suspect this fixes a bug repated to copied methods where there
was a oat file name mismatch. When we assign the native object
relocation for the methods of a class, we use the dex cache from
that class.
However, we use method's declaring class in NativeLocationVisitor
by using ArtMethod::GetDexCache. This could result in using the
wrong ImageInfo if the declaring class is in another image.
Change-Id: I753207f7b773fac182f84ba57c640c09f9ce911f
diff --git a/compiler/image_writer.h b/compiler/image_writer.h
index 9371d9f..b227c44 100644
--- a/compiler/image_writer.h
+++ b/compiler/image_writer.h
@@ -428,7 +428,7 @@
// Location of where the object will be when the image is loaded at runtime.
template <typename T>
- T* NativeLocationInImage(T* obj, const char* oat_filename) SHARED_REQUIRES(Locks::mutator_lock_);
+ T* NativeLocationInImage(T* obj) SHARED_REQUIRES(Locks::mutator_lock_);
// Location of where the temporary copy of the object currently is.
template <typename T>