/* memory.c -- Memory accessor functions for the AArch64 simulator
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2021 Free Software Foundation, Inc.
Contributed by Red Hat.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "bfd.h"
-#include "libbfd.h"
#include "libiberty.h"
-#include "elf/internal.h"
-#include "elf/common.h"
#include "memory.h"
#include "simulator.h"
uint64_t
aarch64_get_heap_start (sim_cpu *cpu)
{
- uint64_t heap = aarch64_get_sym_value ("end");
+ uint64_t heap = trace_sym_value (CPU_STATE (cpu), "end");
if (heap == 0)
- heap = aarch64_get_sym_value ("_end");
+ heap = trace_sym_value (CPU_STATE (cpu), "_end");
if (heap == 0)
{
heap = STACK_TOP - 0x100000;