Revert^2 "Load boot image at a random address."

This reverts commit f3d077373536c54824e4449759dff2f18369eab3.

Fixed Heap constructor to reserve extra space for GSS.

Change-Id: I6a65be35f4aa183304db5491da4a4810d8e3b266
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --relocate --no-relocate
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Test: testrunner.py --target --optimizing --relocate --no-relocate
Test: art/test/testrunner/run_build_test_target.py -j48 art-gtest-gss-gc-tlab
Bug: 77856493
diff --git a/runtime/mirror/executable.h b/runtime/mirror/executable.h
index bf66d79..14c9d4c 100644
--- a/runtime/mirror/executable.h
+++ b/runtime/mirror/executable.h
@@ -18,7 +18,7 @@
 #define ART_RUNTIME_MIRROR_EXECUTABLE_H_
 
 #include "accessible_object.h"
-#include "object.h"
+#include "object-inl.h"
 #include "read_barrier_option.h"
 
 namespace art {
@@ -36,10 +36,19 @@
   bool CreateFromArtMethod(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_)
       REQUIRES(!Roles::uninterruptible_);
 
-  ArtMethod* GetArtMethod() REQUIRES_SHARED(Locks::mutator_lock_);
-  // Only used by the image writer.
-  template <bool kTransactionActive = false>
-  void SetArtMethod(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_);
+  template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
+  ArtMethod* GetArtMethod() REQUIRES_SHARED(Locks::mutator_lock_) {
+    return reinterpret_cast64<ArtMethod*>(GetField64<kVerifyFlags>(ArtMethodOffset()));
+  }
+
+  template <bool kTransactionActive = false,
+            bool kCheckTransaction = true,
+            VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
+  void SetArtMethod(ArtMethod* method) REQUIRES_SHARED(Locks::mutator_lock_) {
+    SetField64<kTransactionActive, kCheckTransaction, kVerifyFlags>(
+        ArtMethodOffset(), reinterpret_cast64<uint64_t>(method));
+  }
+
   mirror::Class* GetDeclaringClass() REQUIRES_SHARED(Locks::mutator_lock_);
 
   static MemberOffset ArtMethodOffset() {