36 static char datamemory[ELFLOADER_DATAMEMORY_SIZE];
37 static const char textmemory[ELFLOADER_TEXTMEMORY_SIZE] = {0};
42 return (
void *)datamemory;
48 return (
void *)textmemory;
54 printf(
"elfloader_arch_write_rom: size %d, offset %i, mem %p\n", size, textoff, mem);
60 struct elf32_rela *rela,
char *addr)
62 printf(
"elfloader_arch_relocate: sectionoffset 0x%04x, sectionaddr %p, r_offset 0x%04x, r_info 0x%04x, r_addend 0x%04x, addr %p\n",
63 sectionoffset, sectionaddr,
64 (
unsigned int)rela->r_offset, (
unsigned int)rela->r_info,
65 (
unsigned int)rela->r_addend, addr);
void elfloader_arch_relocate(int fd, unsigned int sectionoffset, char *sectionaddr, struct elf32_rela *rela, char *addr)
Perform a relocation.
Header file for the architecture specific parts of the Contiki ELF loader.
void * elfloader_arch_allocate_ram(int size)
Allocate RAM for a new module.
void * elfloader_arch_allocate_rom(int size)
Allocate program memory for a new module.
void elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char *mem)
Write to read-only memory (for example the text segment).