ll load-coverage
Simics Reference Manual  /  3 Commands  /  3.2 Command List  / 

load-binary

Synopsis

load-binary [object] filename [offset] [-v] [-pa] [-l] [-n]
<processor_info>.load-binary filename [offset] [-v] [-pa] [-n]
<memory_space>.load-binary filename [offset] [-v] [-pa] [-n]

Description

Load a binary (executable) file, filename, into the physical or virtual memory space given by object. The supported formats are ELF, Motorola S-Record, PE32 and PE32+. For ELF, all segments with a PT_LOAD program header are loaded.

By default the virtual load address from the file is used. The physical load address can be used instead, for file formats supporting both, by specifying the -pa flag. The load address selected does not affect if the binary is loaded into the virtual or physical address space.

If an offset is supplied, it will be added to the load address taken from the file.

The global load-binary command will use the currently selected processor to find the memory space to load the binary into, unless object is specified. If the -l flag is given, it will load it into the virtual memory space, otherwise it will use the physical memory space. The processor must have a valid virtual to physical translation set up.

When using the namespace command on a processor object, it will load the binary into the virtual memory space of that processor.

When using the namespace command on a memory-space object, it will load the binary directly into that memory space without any virtual to physical translation.

The -v flag turns on verbose mode, printing information about the loaded file.

The -n flags tells the command to not clear .bss areas in the file.

The return value is the address of the execution entry point. This value is typically used in a call to set-pc.

load-binary uses Simics's Search Path and path markers (%simics%, %script%) to find the file to load. Refer to The Command Line Interface chapter of the Simics User's Guide manual for more information on how Simics's Search Path is used to locate files.

Provided By

Simics Core

See Also

load-file, add-directory
ll load-coverage