Next: Sparclet Execution, Previous: Sparclet Connection, Up: Sparclet [Contents][Index]

#### 21.3.8.3 Sparclet Download

Once connected to the Sparclet target, you can use the GDB `load` command to download the file from the host to the target. The file name and load offset should be given as arguments to the `load` command. Since the file format is aout, the program must be loaded to the starting address. You can use `objdump` to find out what this value is. The load offset is an offset which is added to the VMA (virtual memory address) of each of the file’s sections. For instance, if the program `prog` was linked to text address 0x1201000, with data at 0x12010160 and bss at 0x12010170, in GDB, type:

    (gdbslet) load prog 0x12010000
    Loading section .text, size 0xdb0 vma 0x12010000

If the code is loaded at a different address then what the program was linked to, you may need to use the `section` and `add-symbol-file` commands to tell GDB where to map the symbol table.