1 /* objdump.c -- dump information about an object file.
2 Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Diddler.
6 BFD is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 BFD is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with BFD; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 * Until there is other documentation, refer to the manual page dump(1) in
22 * the system 5 program's reference manual
31 #define ELF_STAB_DISPLAY /* This code works, but uses internal
32 bfd and elf stuff. Flip this define
33 off if you need to just use generic
36 #ifdef ELF_STAB_DISPLAY
37 /* Internal headers for the ELF .stab-dump code - sorry. */
38 #define BYTES_IN_WORD 32
39 #include "aout/aout64.h"
40 #include "elf/internal.h"
41 extern Elf_Internal_Shdr
*bfd_elf_find_section();
42 #endif /* ELF_STAB_DISPLAY */
46 char *default_target
= NULL
; /* default at runtime */
48 extern *program_version
;
49 char *program_name
= NULL
;
51 int show_version
= 0; /* show the version number */
52 int dump_section_contents
; /* -s */
53 int dump_section_headers
; /* -h */
54 boolean dump_file_header
; /* -f */
55 int dump_symtab
; /* -t */
56 int dump_reloc_info
; /* -r */
57 int dump_ar_hdrs
; /* -a */
58 int with_line_numbers
; /* -l */
59 int dump_stab_section_info
; /* -stabs */
60 boolean disassemble
; /* -d */
61 boolean info
; /* -i */
64 char *machine
= (char *) NULL
;
70 unsigned int symcount
= 0;
72 /* Forward declarations. */
75 display_file
PARAMS ((char *filename
, char *target
));
78 dump_data
PARAMS ((bfd
*abfd
));
81 dump_relocs
PARAMS ((bfd
*abfd
));
84 dump_symbols
PARAMS ((bfd
*abfd
));
90 "usage: %s [-ahifdrtxsl] [-m machine] [-j section_name] obj ...\n",
95 static struct option long_options
[]=
97 {"syms", no_argument
, &dump_symtab
, 1},
98 {"reloc", no_argument
, &dump_reloc_info
, 1},
99 {"header", no_argument
, &dump_section_headers
, 1},
100 {"version", no_argument
, &show_version
, 1},
101 #ifdef ELF_STAB_DISPLAY
102 {"stabs", no_argument
, &dump_stab_section_info
, 1},
104 {0, no_argument
, 0, 0}};
113 for (section
= abfd
->sections
;
114 section
!= (asection
*) NULL
;
115 section
= section
->next
)
120 if (section->flags & x) { printf("%s%s",comma,y); comma = ", "; }
123 printf ("SECTION %d [%s]\t: size %08x",
126 (unsigned) bfd_get_section_size_before_reloc (section
));
128 printf_vma (section
->vma
);
129 printf (" align 2**%u\n ",
130 section
->alignment_power
);
131 PF (SEC_ALLOC
, "ALLOC");
132 PF (SEC_CONSTRUCTOR
, "CONSTRUCTOR");
133 PF (SEC_CONSTRUCTOR_TEXT
, "CONSTRUCTOR TEXT");
134 PF (SEC_CONSTRUCTOR_DATA
, "CONSTRUCTOR DATA");
135 PF (SEC_CONSTRUCTOR_BSS
, "CONSTRUCTOR BSS");
136 PF (SEC_LOAD
, "LOAD");
137 PF (SEC_RELOC
, "RELOC");
138 PF (SEC_BALIGN
, "BALIGN");
139 PF (SEC_READONLY
, "READONLY");
140 PF (SEC_CODE
, "CODE");
141 PF (SEC_DATA
, "DATA");
149 DEFUN (slurp_symtab
, (abfd
),
152 asymbol
**sy
= (asymbol
**) NULL
;
154 if (!(bfd_get_file_flags (abfd
) & HAS_SYMS
))
156 (void) printf ("No symbols in \"%s\".\n", bfd_get_filename (abfd
));
160 storage
= get_symtab_upper_bound (abfd
);
163 sy
= (asymbol
**) malloc (storage
);
166 fprintf (stderr
, "%s: out of memory.\n", program_name
);
170 symcount
= bfd_canonicalize_symtab (abfd
, sy
);
174 /* Sort symbols into value order */
180 asymbol
*a
= *(asymbol
**)ap
;
181 asymbol
*b
= *(asymbol
**)bp
;
185 if (a
->name
== (char *) NULL
|| (a
->flags
& (BSF_DEBUGGING
)))
188 a_bfd
= bfd_asymbol_bfd(a
);
189 if (b
->name
== (char *) NULL
|| (b
->flags
& (BSF_DEBUGGING
)))
192 b_bfd
= bfd_asymbol_bfd(b
);
194 diff
= a_bfd
- b_bfd
;
199 diff
= a
->value
- b
->value
;
204 return a
->section
- b
->section
;
207 /* Print the supplied address symbolically if possible */
209 print_address (vma
, stream
)
213 /* Perform a binary search looking for the closest symbol to
214 the required value */
216 unsigned int min
= 0;
217 unsigned int max
= symcount
;
219 unsigned int thisplace
= 1;
220 unsigned int oldthisplace
;
226 fprintf_vma (stream
, vma
);
232 oldthisplace
= thisplace
;
233 thisplace
= (max
+ min
) / 2;
234 if (thisplace
== oldthisplace
)
236 vardiff
= syms
[thisplace
]->value
- vma
;
239 /* Check that the value isn't merely a coincidence.
240 (if not checked, we might print some undefined symbol
241 for the address 0 rather than "main", for example. */
242 || !(syms
[thisplace
]->flags
& (BSF_GLOBAL
|BSF_LOCAL
)))
255 /* Totally awesome! the exact right symbol */
256 CONST
char *match_name
= syms
[thisplace
]->name
;
257 int sym_len
= strlen (match_name
);
259 /* Avoid "filename.o" as a match */
261 && match_name
[sym_len
- 2] == '.'
262 && match_name
[sym_len
- 1] == 'o'
263 && thisplace
+ 1 < symcount
264 && syms
[thisplace
+ 1]->value
== vma
)
265 match_name
= syms
[thisplace
+ 1]->name
;
266 /* Totally awesome! the exact right symbol */
267 fprintf_vma (stream
, vma
);
268 fprintf (stream
, " (%s+)0000", syms
[thisplace
]->name
);
272 /* We've run out of places to look, print the symbol before this one
273 see if this or the symbol before describes this location the best */
277 if (syms
[thisplace
- 1]->value
- vma
>
278 syms
[thisplace
]->value
- vma
)
280 /* Previous symbol is in correct section and is closer */
285 fprintf_vma (stream
, vma
);
286 if (syms
[thisplace
]->value
> vma
)
288 fprintf (stream
, " (%s-)", syms
[thisplace
]->name
);
289 fprintf (stream
, "%04x", syms
[thisplace
]->value
- vma
);
293 fprintf (stream
, " (%s+)", syms
[thisplace
]->name
);
294 fprintf (stream
, "%04x", vma
- syms
[thisplace
]->value
);
300 disassemble_data (abfd
)
303 bfd_byte
*data
= NULL
;
304 bfd_arch_info_type
*info
;
305 bfd_size_type datasize
= 0;
307 unsigned int (*print
) ()= 0;
308 unsigned int print_insn_m68k ();
309 unsigned int print_insn_a29k ();
310 unsigned int print_insn_z8001 ();
311 unsigned int print_insn_z8002 ();
312 unsigned int print_insn_i960 ();
313 unsigned int print_insn_sparc ();
314 unsigned int print_insn_i386 ();
315 unsigned int print_insn_h8300 ();
316 unsigned int print_insn_mips ();
317 enum bfd_architecture a
;
321 /* Replace symbol section relative values with abs values */
322 boolean done_dot
= false;
324 for (i
= 0; i
< symcount
; i
++)
326 syms
[i
]->value
+= syms
[i
]->section
->vma
;
329 /* We keep a copy of the symbols in the original order */
330 syms2
= slurp_symtab (abfd
);
332 /* Sort the symbols into section and symbol order */
333 (void) qsort (syms
, symcount
, sizeof (asymbol
*), comp
);
335 /* Find the first useless symbol */
339 for (i
= 0; i
< symcount
; i
++)
341 if (syms
[i
]->name
== (char *) NULL
342 || (syms
[i
]->flags
& BSF_DEBUGGING
) != 0)
351 if (machine
!= (char *) NULL
)
353 info
= bfd_scan_arch (machine
);
356 fprintf (stderr
, "%s: Can't use supplied machine %s\n",
361 abfd
->arch_info
= info
;
364 /* See if we can disassemble using bfd */
366 if (abfd
->arch_info
->disassemble
)
368 print
= abfd
->arch_info
->disassemble
;
372 a
= bfd_get_arch (abfd
);
376 print
= print_insn_sparc
;
379 if (bfd_get_mach(abfd
) == bfd_mach_z8001
)
380 print
= print_insn_z8001
;
382 print
= print_insn_z8002
;
385 print
= print_insn_i386
;
388 print
= print_insn_m68k
;
391 print
= print_insn_a29k
;
394 print
= print_insn_i960
;
397 /* MIPS is handled specially, because we need to pass an
398 additional endianness argument. */
401 fprintf (stderr
, "%s: Can't disassemble for architecture %s\n",
403 bfd_printable_arch_mach (bfd_get_arch (abfd
), 0));
409 for (section
= abfd
->sections
;
410 section
!= (asection
*) NULL
;
411 section
= section
->next
)
414 if ((section
->flags
& SEC_LOAD
)
415 && (only
== (char *) NULL
|| strcmp (only
, section
->name
) == 0))
417 printf ("Disassembly of section %s:\n", section
->name
);
419 if (bfd_get_section_size_before_reloc (section
) == 0)
422 data
= (bfd_byte
*) malloc (bfd_get_section_size_before_reloc (section
));
424 if (data
== (bfd_byte
*) NULL
)
426 fprintf (stderr
, "%s: memory exhausted.\n", program_name
);
429 datasize
= bfd_get_section_size_before_reloc (section
);
431 bfd_get_section_contents (abfd
, section
, data
, 0, bfd_get_section_size_before_reloc (section
));
434 while (i
< bfd_get_section_size_before_reloc (section
))
436 if (data
[i
] == 0 && data
[i
+ 1] == 0 && data
[i
+ 2] == 0 &&
439 if (done_dot
== false)
449 if (with_line_numbers
)
452 CONST
char *filename
;
453 CONST
char *functionname
;
456 if (bfd_find_nearest_line (abfd
,
468 printf ("%s:%u\n", filename
, line
);
472 print_address (section
->vma
+ i
, stdout
);
475 if (a
!= bfd_arch_mips
)
476 i
+= print (section
->vma
+ i
,
481 /* The endianness of the MIPS can vary. */
482 i
+= print_insn_mips (section
->vma
+ i
,
485 (int) abfd
->xvec
->byteorder_big_p
);
495 #ifdef ELF_STAB_DISPLAY
497 /* Define a table of stab values and print-strings. We wish the initializer
498 could be a direct-mapped table, but instead we build one the first
501 #define STAB_STRING_LENGTH 6
503 char stab_name
[256][STAB_STRING_LENGTH
];
507 char string
[STAB_STRING_LENGTH
];
510 struct stab_print stab_print
[] = {
511 #define __define_stab(NAME, CODE, STRING) {CODE, STRING},
512 #include "aout/stab.def"
517 void dump_elf_stabs_1 ();
519 /* This is a kludge for dumping the stabs section from an ELF file that
520 uses Sun stabs encoding. It has to use some hooks into BFD because
521 string table sections are not normally visible to BFD callers. */
524 dump_elf_stabs (abfd
)
529 /* Initialize stab name array if first time. */
530 if (stab_name
[0][0] == 0)
532 /* Fill in numeric values for all possible strings. */
533 for (i
= 0; i
< 256; i
++)
535 sprintf (stab_name
[i
], "%d", i
);
537 for (i
= 0; stab_print
[i
].string
[0]; i
++)
538 strcpy (stab_name
[stab_print
[i
].value
], stab_print
[i
].string
);
541 if (0 != strncmp ("elf", abfd
->xvec
->name
, 3))
543 fprintf (stderr
, "%s: %s is not in ELF format.\n", program_name
,
548 dump_elf_stabs_1 (abfd
, ".stab", ".stabstr");
549 dump_elf_stabs_1 (abfd
, ".stab.excl", ".stab.exclstr");
550 dump_elf_stabs_1 (abfd
, ".stab.index", ".stab.indexstr");
554 dump_elf_stabs_1 (abfd
, name1
, name2
)
556 char *name1
; /* Section name of .stab */
557 char *name2
; /* Section name of its string section */
559 Elf_Internal_Shdr
*stab_hdr
, *stabstr_hdr
;
561 struct internal_nlist
*stabs
, *stabs_end
;
563 unsigned file_string_table_offset
, next_file_string_table_offset
;
565 stab_hdr
= bfd_elf_find_section (abfd
, name1
);
568 printf ("Contents of %s section: none.\n\n", name1
);
572 stabstr_hdr
= bfd_elf_find_section (abfd
, name2
);
573 if (0 == stabstr_hdr
)
575 fprintf (stderr
, "%s: %s has no %s section.\n", program_name
,
576 abfd
->filename
, name2
);
580 stabs
= (struct internal_nlist
*) xmalloc (stab_hdr
->sh_size
);
581 strtab
= (char *) xmalloc (stabstr_hdr
->sh_size
);
582 stabs_end
= (struct internal_nlist
*) (stab_hdr
->sh_size
+ (char *)stabs
);
584 if (bfd_seek (abfd
, stab_hdr
->sh_offset
, SEEK_SET
) < 0 ||
585 stab_hdr
->sh_size
!= bfd_read ((PTR
)stabs
, stab_hdr
->sh_size
, 1, abfd
))
587 fprintf (stderr
, "%s: reading %s section of %s failed.\n",
593 if (bfd_seek (abfd
, stabstr_hdr
->sh_offset
, SEEK_SET
) < 0 ||
594 stabstr_hdr
->sh_size
!= bfd_read ((PTR
)strtab
, stabstr_hdr
->sh_size
,
597 fprintf (stderr
, "%s: reading %s section of %s failed.\n",
603 #define SWAP_SYMBOL(symp, abfd) \
605 (symp)->n_strx = bfd_h_get_32(abfd, \
606 (unsigned char *)&(symp)->n_strx); \
607 (symp)->n_desc = bfd_h_get_16 (abfd, \
608 (unsigned char *)&(symp)->n_desc); \
609 (symp)->n_value = bfd_h_get_32 (abfd, \
610 (unsigned char *)&(symp)->n_value); \
613 printf ("Contents of %s section:\n\n", name1
);
614 printf ("Symnum n_type n_othr n_desc n_value n_strx String\n");
616 file_string_table_offset
= 0;
617 next_file_string_table_offset
= 0;
619 /* Loop through all symbols and print them.
621 We start the index at -1 because there is a dummy symbol on
622 the front of Sun's stabs-in-elf sections. */
624 for (i
= -1; stabs
< stabs_end
; stabs
++, i
++)
626 SWAP_SYMBOL (stabs
, abfd
);
627 printf ("\n%-6d %-6s %-6d %-6d %08x %-6d", i
,
628 stab_name
[stabs
->n_type
],
629 stabs
->n_other
, stabs
->n_desc
, stabs
->n_value
,
632 /* Symbols with type == 0 (N_UNDF) specify the length of the
633 string table associated with this file. We use that info
634 to know how to relocate the *next* file's string table indices. */
636 if (stabs
->n_type
== N_UNDF
)
638 file_string_table_offset
= next_file_string_table_offset
;
639 next_file_string_table_offset
+= stabs
->n_value
;
642 /* Now, using the possibly updated string table offset, print the
643 string (if any) associated with this symbol. */
645 if ((stabs
->n_strx
+ file_string_table_offset
) < stabstr_hdr
->sh_size
)
646 printf (" %s", &strtab
[stabs
->n_strx
+ file_string_table_offset
]);
652 #endif /* ELF_STAB_DISPLAY */
658 if (!bfd_check_format (abfd
, bfd_object
))
660 fprintf (stderr
, "%s: %s not an object file\n", program_name
,
664 printf ("\n%s: file format %s\n", abfd
->filename
, abfd
->xvec
->name
);
666 print_arelt_descr (stdout
, abfd
, true);
668 if (dump_file_header
)
672 printf ("architecture: %s, ",
673 bfd_printable_arch_mach (bfd_get_arch (abfd
),
674 bfd_get_mach (abfd
)));
675 printf ("flags 0x%08x:\n", abfd
->flags
);
677 #define PF(x, y) if (abfd->flags & x) {printf("%s%s", comma, y); comma=", ";}
678 PF (HAS_RELOC
, "HAS_RELOC");
679 PF (EXEC_P
, "EXEC_P");
680 PF (HAS_LINENO
, "HAS_LINENO");
681 PF (HAS_DEBUG
, "HAS_DEBUG");
682 PF (HAS_SYMS
, "HAS_SYMS");
683 PF (HAS_LOCALS
, "HAS_LOCALS");
684 PF (DYNAMIC
, "DYNAMIC");
685 PF (WP_TEXT
, "WP_TEXT");
686 PF (D_PAGED
, "D_PAGED");
687 PF (BFD_IS_RELAXABLE
, "BFD_IS_RELAXABLE");
688 printf ("\nstart address 0x");
689 printf_vma (abfd
->start_address
);
693 if (dump_section_headers
)
695 if (dump_symtab
|| dump_reloc_info
|| disassemble
)
697 syms
= slurp_symtab (abfd
);
701 #ifdef ELF_STAB_DISPLAY
702 if (dump_stab_section_info
)
703 dump_elf_stabs (abfd
);
707 if (dump_section_contents
)
710 disassemble_data (abfd
);
714 display_file (filename
, target
)
718 bfd
*file
, *arfile
= (bfd
*) NULL
;
720 file
= bfd_openr (filename
, target
);
723 bfd_perror (filename
);
727 if (bfd_check_format (file
, bfd_archive
) == true)
729 printf ("In archive %s:\n", bfd_get_filename (file
));
732 bfd_error
= no_error
;
734 arfile
= bfd_openr_next_archived_file (file
, arfile
);
737 if (bfd_error
!= no_more_archived_files
)
738 bfd_perror (bfd_get_filename (file
));
742 display_bfd (arfile
);
743 /* Don't close the archive elements; we need them for next_archive */
752 /* Actually display the various requested regions */
760 bfd_size_type datasize
= 0;
763 for (section
= abfd
->sections
; section
!= NULL
; section
=
768 if (only
== (char *) NULL
||
769 strcmp (only
, section
->name
) == 0)
771 if (section
->flags
& SEC_HAS_CONTENTS
)
773 printf ("Contents of section %s:\n", section
->name
);
775 if (bfd_get_section_size_before_reloc (section
) == 0)
777 data
= (bfd_byte
*) malloc (bfd_get_section_size_before_reloc (section
));
778 if (data
== (bfd_byte
*) NULL
)
780 fprintf (stderr
, "%s: memory exhausted.\n", program_name
);
783 datasize
= bfd_get_section_size_before_reloc (section
);
786 bfd_get_section_contents (abfd
, section
, (PTR
) data
, 0, bfd_get_section_size_before_reloc (section
));
788 for (i
= 0; i
< bfd_get_section_size_before_reloc (section
); i
+= onaline
)
792 printf (" %04lx ", (unsigned long int) (i
+ section
->vma
));
793 for (j
= i
; j
< i
+ onaline
; j
++)
795 if (j
< bfd_get_section_size_before_reloc (section
))
796 printf ("%02x", (unsigned) (data
[j
]));
804 for (j
= i
; j
< i
+ onaline
; j
++)
806 if (j
>= bfd_get_section_size_before_reloc (section
))
809 printf ("%c", isprint (data
[j
]) ? data
[j
] : '.');
819 /* Should perhaps share code and display with nm? */
826 asymbol
**current
= syms
;
828 printf ("SYMBOL TABLE:\n");
830 for (count
= 0; count
< symcount
; count
++)
835 bfd
*cur_bfd
= bfd_asymbol_bfd(*current
);
838 bfd_print_symbol (cur_bfd
,
840 *current
, bfd_print_symbol_all
);
856 unsigned int relcount
;
859 for (a
= abfd
->sections
; a
!= (asection
*) NULL
; a
= a
->next
)
861 if (a
== &bfd_abs_section
)
863 if (a
== &bfd_und_section
)
865 if (bfd_is_com_section (a
))
868 printf ("RELOCATION RECORDS FOR [%s]:", a
->name
);
870 if (bfd_get_reloc_upper_bound (abfd
, a
) == 0)
872 printf (" (none)\n\n");
878 relpp
= (arelent
**) xmalloc (bfd_get_reloc_upper_bound (abfd
, a
));
879 relcount
= bfd_canonicalize_reloc (abfd
, a
, relpp
, syms
);
882 printf (" (none)\n\n");
887 printf ("OFFSET TYPE VALUE \n");
889 for (p
= relpp
; relcount
&& *p
!= (arelent
*) NULL
; p
++,
893 CONST
char *sym_name
;
895 /* CONST char *section_name = q->section == (asection *)NULL ? "*abs" :*/
896 /* q->section->name;*/
897 CONST
char *section_name
= (*(q
->sym_ptr_ptr
))->section
->name
;
899 if (q
->sym_ptr_ptr
&& *q
->sym_ptr_ptr
)
901 sym_name
= (*(q
->sym_ptr_ptr
))->name
;
909 printf_vma (q
->address
);
916 printf_vma (q
->address
);
917 printf (" %-8s [%s]",
924 printf_vma (q
->addend
);
937 #define _DUMMY_NAME_ "/dev/null"
939 #define _DUMMY_NAME_ "##dummy"
942 DEFUN (display_info_table
, (first
, last
),
943 int first AND
int last
)
946 extern bfd_target
*target_vector
[];
948 printf ("\n%12s", " ");
949 for (i
= first
; i
++ < last
&& target_vector
[i
];)
950 printf ("%s ", target_vector
[i
]->name
);
953 for (j
= (int) bfd_arch_obscure
+ 1; (int) j
< (int) bfd_arch_last
; j
++)
954 if (strcmp (bfd_printable_arch_mach (j
, 0), "UNKNOWN!") != 0)
956 printf ("%11s ", bfd_printable_arch_mach (j
, 0));
957 for (i
= first
; i
++ < last
&& target_vector
[i
];)
959 bfd_target
*p
= target_vector
[i
];
960 bfd
*abfd
= bfd_openw (_DUMMY_NAME_
, p
->name
);
961 int l
= strlen (p
->name
);
963 bfd_set_format (abfd
, bfd_object
);
964 ok
= bfd_set_arch_mach (abfd
, j
, 0);
967 printf ("%s ", p
->name
);
971 printf ("%c", ok
? '*' : '-');
980 DEFUN_VOID (display_info
)
983 unsigned int i
, j
, columns
;
984 extern bfd_target
*target_vector
[];
985 extern char *getenv ();
987 printf ("BFD header file version %s\n", BFD_VERSION
);
988 for (i
= 0; target_vector
[i
]; i
++)
990 bfd_target
*p
= target_vector
[i
];
991 bfd
*abfd
= bfd_openw (_DUMMY_NAME_
, p
->name
);
992 bfd_set_format (abfd
, bfd_object
);
993 printf ("%s\n (header %s, data %s)\n", p
->name
,
994 p
->header_byteorder_big_p
? "big endian" : "little endian",
995 p
->byteorder_big_p
? "big endian" : "little endian");
996 for (j
= (int) bfd_arch_obscure
+ 1; j
< (int) bfd_arch_last
; j
++)
997 if (bfd_set_arch_mach (abfd
, (enum bfd_architecture
) j
, 0))
999 bfd_printable_arch_mach ((enum bfd_architecture
) j
, 0));
1002 if (colum
= getenv ("COLUMNS"))
1003 columns
= atoi (colum
);
1006 for (i
= 0; target_vector
[i
];)
1010 for (j
= 12; target_vector
[i
] && j
< columns
; i
++)
1011 j
+= strlen (target_vector
[i
]->name
) + 1;
1015 display_info_table (old
, i
);
1019 /** main and like trivia */
1027 extern char *optarg
;
1028 char *target
= default_target
;
1029 boolean seenflag
= false;
1033 program_name
= *argv
;
1035 while ((c
= getopt_long (argc
, argv
, "ib:m:Vdlfahrtxsj:", long_options
, &ind
))
1048 with_line_numbers
= 1;
1054 dump_file_header
= true;
1061 dump_reloc_info
= 1;
1062 dump_file_header
= true;
1064 dump_section_headers
= 1;
1067 break; /* we've been given a long option */
1075 dump_section_contents
= 1;
1078 dump_reloc_info
= 1;
1084 dump_section_headers
= 1;
1095 printf ("%s version %s\n", program_name
, program_version
);
1097 if (seenflag
== false)
1107 display_file ("a.out", target
);
1109 for (; optind
< argc
;)
1110 display_file (argv
[optind
++], target
);