diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:14 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:14 -0800 |
commit | 05806d7af62e07c6225b2e7103a1b115ecf6c9ad (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /tools/soslim/common.c | |
parent | 094268cf8cb37b9d904c8a1e3559cdd46d73cf66 (diff) | |
download | build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.gz build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.bz2 build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.zip |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tools/soslim/common.c')
-rw-r--r-- | tools/soslim/common.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/soslim/common.c b/tools/soslim/common.c deleted file mode 100644 index b90cf4199..000000000 --- a/tools/soslim/common.c +++ /dev/null @@ -1,35 +0,0 @@ -#include <stdlib.h> -#include <common.h> -#include <debug.h> - -void map_over_sections(Elf *elf, - section_match_fn_t match, - void *user_data) -{ - Elf_Scn* section = NULL; - while ((section = elf_nextscn(elf, section)) != NULL) { - if (match(elf, section, user_data)) - return; - } -} - -void map_over_segments(Elf *elf, - segment_match_fn_t match, - void *user_data) -{ - Elf32_Ehdr *ehdr; - Elf32_Phdr *phdr; - int index; - - ehdr = elf32_getehdr(elf); - phdr = elf32_getphdr(elf); - - INFO("Scanning over %d program segments...\n", - ehdr->e_phnum); - - for (index = ehdr->e_phnum; index; index--) { - if (match(elf, phdr++, user_data)) - return; - } -} - |