objdump.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* objdump.h
  2. Copyright (C) 2011-2015 Free Software Foundation, Inc.
  3. This file is part of GNU Binutils.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3, or (at your option)
  7. any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. struct objdump_private_option
  17. {
  18. /* Option name. */
  19. const char *name;
  20. /* TRUE if the option is selected. Automatically set and cleared by
  21. objdump. */
  22. unsigned int selected;
  23. };
  24. struct objdump_private_desc
  25. {
  26. /* Help displayed for --help. */
  27. void (*help)(FILE *stream);
  28. /* Return TRUE if these options can be applied to ABFD. */
  29. int (*filter)(bfd *abfd);
  30. /* Do the actual work: display whatever is requested according to the
  31. options whose SELECTED field is set. */
  32. void (*dump)(bfd *abfd);
  33. /* List of options. Terminated by a NULL name. */
  34. struct objdump_private_option *options;
  35. };
  36. /* ELF32_AVR specific target. */
  37. extern const struct objdump_private_desc objdump_private_desc_elf32_avr;
  38. /* XCOFF specific target. */
  39. extern const struct objdump_private_desc objdump_private_desc_xcoff;
  40. /* Mach-O specific target. */
  41. extern const struct objdump_private_desc objdump_private_desc_mach_o;