From 8b13d2f5f100d088746a1f8dd94f8ab82acc9b5b Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 6 Aug 2013 15:46:09 +0200 Subject: 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 --- utils/imxtools/sbtools/elftosb1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/imxtools/sbtools/elftosb1.c') 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 @@ * ****************************************************************************/ +#define _POSIX_C_SOURCE 200809L /* for strdup */ #include #include #include @@ -405,7 +406,6 @@ static int load_elf(struct sb1_file_t *sb, const char *filename, int act) fclose(fd); if(!loaded) bug("error loading elf file '%s'\n", filename); - elf_translate_addresses(&elf); elf_sort_by_address(&elf); struct elf_section_t *esec = elf.first_section; -- cgit v1.2.3