mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-05 09:29:39 +00:00
Fixed bug where instruction to be relocated was fetched from an incorrect location
This commit is contained in:
parent
2380d63260
commit
7bfd457bbc
@ -28,7 +28,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: elfloader-avr.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $
|
* @(#)$Id: elfloader-avr.c,v 1.2 2006/09/01 07:10:01 adamdunkels Exp $
|
||||||
*/
|
*/
|
||||||
#include "elfloader-arch.h"
|
#include "elfloader-arch.h"
|
||||||
|
|
||||||
@ -127,9 +127,9 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset,
|
|||||||
unsigned int type;
|
unsigned int type;
|
||||||
unsigned char instr[4];
|
unsigned char instr[4];
|
||||||
|
|
||||||
cfs_seek(fd, sectionoffset);
|
cfs_seek(fd, sectionoffset + rela->r_offset);
|
||||||
cfs_read(fd, instr, 4);
|
cfs_read(fd, instr, 4);
|
||||||
cfs_seek(fd, sectionoffset);
|
cfs_seek(fd, sectionoffset + rela->r_offset);
|
||||||
|
|
||||||
addr += rela->r_addend;
|
addr += rela->r_addend;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user