added parameter to relocate method
+ renamed write_text() to write_rom() + added parameter to write_rom()
This commit is contained in:
parent
ea0e2c0f7d
commit
060225a97a
5 changed files with 23 additions and 14 deletions
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: elfloader-msp430.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
||||
* @(#)$Id: elfloader-msp430.c,v 1.2 2006/12/18 14:54:04 fros4943 Exp $
|
||||
*/
|
||||
#include "elfloader-arch.h"
|
||||
|
||||
|
@ -54,7 +54,7 @@ elfloader_arch_allocate_rom(int size)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
#define READSIZE 32
|
||||
void
|
||||
elfloader_arch_write_text(int fd, unsigned int size, char *mem)
|
||||
elfloader_arch_write_rom(int fd, unsigned short textoff, unsigned int size, char *mem)
|
||||
{
|
||||
int i;
|
||||
unsigned int ptr;
|
||||
|
@ -64,6 +64,7 @@ elfloader_arch_write_text(int fd, unsigned int size, char *mem)
|
|||
|
||||
flashptr = (unsigned short *)mem;
|
||||
|
||||
cfs_seek(fd, textoff);
|
||||
for(ptr = 0; ptr < size; ptr += READSIZE) {
|
||||
|
||||
/* Read data from file into RAM. */
|
||||
|
@ -90,6 +91,7 @@ elfloader_arch_write_text(int fd, unsigned int size, char *mem)
|
|||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
elfloader_arch_relocate(int fd, unsigned int sectionoffset,
|
||||
char *sectionaddr,
|
||||
struct elf32_rela *rela, char *addr)
|
||||
{
|
||||
addr += rela->r_addend;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue