summaryrefslogtreecommitdiffstats
path: root/tools/lsd/main.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:14 -0800
commit05806d7af62e07c6225b2e7103a1b115ecf6c9ad (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /tools/lsd/main.c
parent094268cf8cb37b9d904c8a1e3559cdd46d73cf66 (diff)
downloadbuild-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.zip
build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.gz
build-05806d7af62e07c6225b2e7103a1b115ecf6c9ad.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tools/lsd/main.c')
-rw-r--r--tools/lsd/main.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/tools/lsd/main.c b/tools/lsd/main.c
deleted file mode 100644
index f29157a..0000000
--- a/tools/lsd/main.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* TODO:
- 1. check the ARM EABI version--this works for versions 1 and 2.
- 2. use a more-intelligent approach to finding the symbol table, symbol-string
- table, and the .dynamic section.
- 3. fix the determination of the host and ELF-file endianness
- 4. write the help screen
-*/
-
-#include <stdio.h>
-#include <common.h>
-#include <debug.h>
-#include <libelf.h>
-#include <elf.h>
-#include <gelf.h>
-#include <cmdline.h>
-#include <string.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <lsd.h>
-
-/* Flag set by --verbose. This variable is global as it is accessed by the
- macro INFO() in multiple compilation unites. */
-int verbose_flag = 0;
-/* Flag set by --quiet. This variable is global as it is accessed by the
- macro PRINT() in multiple compilation unites. */
-int quiet_flag = 0;
-
-int main(int argc, char **argv)
-{
- char **lookup_dirs = NULL;
- int num_lookup_dirs;
- int print_info;
- int list_needed_libs;
-
- /* Do not issue INFO() statements before you call get_options() to set
- the verbose flag as necessary.
- */
-
- int first = get_options(argc, argv,
- &list_needed_libs,
- &print_info,
- &lookup_dirs,
- &num_lookup_dirs,
- &verbose_flag);
-
- if (first == argc) {
- print_help();
- FAILIF(1, "You must specify at least one input ELF file!\n");
- }
-
- /* Check to see whether the ELF library is current. */
- FAILIF (elf_version(EV_CURRENT) == EV_NONE, "libelf is out of date!\n");
-
- /* List symbol dependencies... */
- lsd(&argv[first], argc - first,
- list_needed_libs, print_info,
- lookup_dirs, num_lookup_dirs);
-
- FREE(lookup_dirs);
-
- return 0;
-}
-