summaryrefslogtreecommitdiff
path: root/utils/imxtools/sbtools/elftosb1.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2013-08-06 15:46:09 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2013-08-06 21:24:38 +0200
commit8b13d2f5f100d088746a1f8dd94f8ab82acc9b5b (patch)
treea9308e2e5ff87a637b467cc95b839a616c178785 /utils/imxtools/sbtools/elftosb1.c
parent48ccea96f25318b951607f192d1bfbe76b12eadf (diff)
downloadrockbox-8b13d2f5f100d088746a1f8dd94f8ab82acc9b5b.tar.gz
rockbox-8b13d2f5f100d088746a1f8dd94f8ab82acc9b5b.zip
elf: fix handling of virtual/physical addresses
Remove the hackish elf_translate_addresses which should not have existed in the first place, on write always compute the physical address of a section using elf_translate_virtual_address which makes it possible to specify any virtual to physical mapping and fail nicely if there is none. Change-Id: I4f436945e90280a6fd9430de6c642dbeb8e23d40
Diffstat (limited to 'utils/imxtools/sbtools/elftosb1.c')
-rw-r--r--utils/imxtools/sbtools/elftosb1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/imxtools/sbtools/elftosb1.c b/utils/imxtools/sbtools/elftosb1.c
index 79b7621844..43f9b1e9be 100644
--- a/utils/imxtools/sbtools/elftosb1.c
+++ b/utils/imxtools/sbtools/elftosb1.c
@@ -19,6 +19,7 @@
19 * 19 *
20 ****************************************************************************/ 20 ****************************************************************************/
21 21
22#define _POSIX_C_SOURCE 200809L /* for strdup */
22#include <stdio.h> 23#include <stdio.h>
23#include <errno.h> 24#include <errno.h>
24#include <stdlib.h> 25#include <stdlib.h>
@@ -405,7 +406,6 @@ static int load_elf(struct sb1_file_t *sb, const char *filename, int act)
405 fclose(fd); 406 fclose(fd);
406 if(!loaded) 407 if(!loaded)
407 bug("error loading elf file '%s'\n", filename); 408 bug("error loading elf file '%s'\n", filename);
408 elf_translate_addresses(&elf);
409 elf_sort_by_address(&elf); 409 elf_sort_by_address(&elf);
410 410
411 struct elf_section_t *esec = elf.first_section; 411 struct elf_section_t *esec = elf.first_section;