Revert^2 "Add AddToDexClassloader JVMTI extension functions"
This reverts commit 799e536da9733ab638946f56e1ceb62d62cd3c81.
It seems that on some of our test devices the kernel does not have an
implementation for memfd_create. To work around this I added a basic
wrapper that will simulate memfd_create using temp files. This should
be sufficient for testing. All actual devices are expected to support
the memfd_create syscall natively.
Reason for revert: Implemented fallback for memfd_create
Bug: 132699522
Bug: 132914283
Test: ./test.py --host
Change-Id: I63b36464df24193fff27624c1e2350d65545ad1d
diff --git a/libartbase/base/memfd.h b/libartbase/base/memfd.h
index 91db0b2..329e3ee 100644
--- a/libartbase/base/memfd.h
+++ b/libartbase/base/memfd.h
@@ -23,6 +23,10 @@
// check for safety on older kernels (b/116769556)..
int memfd_create(const char* name, unsigned int flags);
+// Call memfd(2) if available on platform and return result. Try to give us an unlinked FD in some
+// other way if memfd fails or isn't supported.
+int memfd_create_compat(const char* name, unsigned int flags);
+
} // namespace art
#endif // ART_LIBARTBASE_BASE_MEMFD_H_