forked from Imagelibrary/binutils-gdb
Thu Aug 31 16:30:22 1995 steve chamberlain <sac@slash.cygnus.com>
* dlltool.c (add_indirect): New. (asm_prefix): New (gen_exp_file): Timestamp should be 0. Insert prefix when needed. New code for indirection. (gen_lib_file): Timestamp should be 0. Insert prefix when needed. (usage): Document --add-indirect. (main): Cope with new option. * objdump.c (dump_private_headers): New. (usage): Document new option. (long_option): Add private-headers. (dump_bfd_private_header): New. (main): Cope with new option.
This commit is contained in:
@@ -1,3 +1,20 @@
|
|||||||
|
Thu Aug 31 16:30:22 1995 steve chamberlain <sac@slash.cygnus.com>
|
||||||
|
|
||||||
|
* dlltool.c (add_indirect): New.
|
||||||
|
(asm_prefix): New
|
||||||
|
(gen_exp_file): Timestamp should be 0. Insert prefix when
|
||||||
|
needed. New code for indirection.
|
||||||
|
(gen_lib_file): Timestamp should be 0. Insert prefix
|
||||||
|
when needed.
|
||||||
|
(usage): Document --add-indirect.
|
||||||
|
(main): Cope with new option.
|
||||||
|
|
||||||
|
* objdump.c (dump_private_headers): New.
|
||||||
|
(usage): Document new option.
|
||||||
|
(long_option): Add private-headers.
|
||||||
|
(dump_bfd_private_header): New.
|
||||||
|
(main): Cope with new option.
|
||||||
|
|
||||||
Thu Aug 31 04:09:16 1995 Doug Evans <dje@canuck.cygnus.com>
|
Thu Aug 31 04:09:16 1995 Doug Evans <dje@canuck.cygnus.com>
|
||||||
|
|
||||||
* dlltool.c (run): Add missing 3rd arg to waitpid.
|
* dlltool.c (run): Add missing 3rd arg to waitpid.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ GNU General Public License for more details.
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include "bfd.h"
|
#include "bfd.h"
|
||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
@@ -48,6 +48,7 @@ int dump_dynamic_symtab; /* -T */
|
|||||||
int dump_reloc_info; /* -r */
|
int dump_reloc_info; /* -r */
|
||||||
int dump_dynamic_reloc_info; /* -R */
|
int dump_dynamic_reloc_info; /* -R */
|
||||||
int dump_ar_hdrs; /* -a */
|
int dump_ar_hdrs; /* -a */
|
||||||
|
int dump_private_headers; /* -p */
|
||||||
int with_line_numbers; /* -l */
|
int with_line_numbers; /* -l */
|
||||||
boolean with_source_code; /* -S */
|
boolean with_source_code; /* -S */
|
||||||
int dump_stab_section_info; /* --stabs */
|
int dump_stab_section_info; /* --stabs */
|
||||||
@@ -120,7 +121,7 @@ usage (stream, status)
|
|||||||
int status;
|
int status;
|
||||||
{
|
{
|
||||||
fprintf (stream, "\
|
fprintf (stream, "\
|
||||||
Usage: %s [-ahifdDrRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
|
Usage: %s [-ahifdDprRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
|
||||||
[--archive-headers] [--target=bfdname] [--disassemble]\n\
|
[--archive-headers] [--target=bfdname] [--disassemble]\n\
|
||||||
[--disassemble-all] [--file-headers] [--section-headers] [--headers]\n\
|
[--disassemble-all] [--file-headers] [--section-headers] [--headers]\n\
|
||||||
[--info] [--section=section-name] [--line-numbers] [--source]\n",
|
[--info] [--section=section-name] [--line-numbers] [--source]\n",
|
||||||
@@ -128,7 +129,7 @@ Usage: %s [-ahifdDrRtTxsSlw] [-b bfdname] [-m machine] [-j section-name]\n\
|
|||||||
fprintf (stream, "\
|
fprintf (stream, "\
|
||||||
[--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\
|
[--architecture=machine] [--reloc] [--full-contents] [--stabs]\n\
|
||||||
[--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
|
[--syms] [--all-headers] [--dynamic-syms] [--dynamic-reloc]\n\
|
||||||
[--wide] [--version] [--help] objfile...\n\
|
[--wide] [--version] [--help] [--private-headers] objfile...\n\
|
||||||
at least one option besides -l (--line-numbers) must be given\n");
|
at least one option besides -l (--line-numbers) must be given\n");
|
||||||
list_supported_targets (program_name, stream);
|
list_supported_targets (program_name, stream);
|
||||||
exit (status);
|
exit (status);
|
||||||
@@ -137,6 +138,7 @@ at least one option besides -l (--line-numbers) must be given\n");
|
|||||||
static struct option long_options[]=
|
static struct option long_options[]=
|
||||||
{
|
{
|
||||||
{"all-headers", no_argument, NULL, 'x'},
|
{"all-headers", no_argument, NULL, 'x'},
|
||||||
|
{"private-headers", no_argument, NULL, 'p'},
|
||||||
{"architecture", required_argument, NULL, 'm'},
|
{"architecture", required_argument, NULL, 'm'},
|
||||||
{"archive-headers", no_argument, NULL, 'a'},
|
{"archive-headers", no_argument, NULL, 'a'},
|
||||||
{"disassemble", no_argument, NULL, 'd'},
|
{"disassemble", no_argument, NULL, 'd'},
|
||||||
@@ -340,8 +342,14 @@ compare_relocs (ap, bp)
|
|||||||
else if (a->address < b->address)
|
else if (a->address < b->address)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return compare_symbols ((const PTR) a->sym_ptr_ptr,
|
/* So that associated relocations tied to the same address show up
|
||||||
(const PTR) b->sym_ptr_ptr);
|
in the correct order, we don't do any further sorting. */
|
||||||
|
if (a > b)
|
||||||
|
return 1;
|
||||||
|
else if (a < b)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print VMA symbolically to INFO if possible. */
|
/* Print VMA symbolically to INFO if possible. */
|
||||||
@@ -1109,24 +1117,22 @@ dump_section_stabs (abfd, stabsect_name, strsect_name)
|
|||||||
char *strsect_name;
|
char *strsect_name;
|
||||||
{
|
{
|
||||||
asection *s;
|
asection *s;
|
||||||
if (read_section_stabs (abfd, stabsect_name, strsect_name))
|
|
||||||
{
|
|
||||||
print_section_stabs (abfd, stabsect_name, strsect_name);
|
|
||||||
free (stabs);
|
|
||||||
free (strtab);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Check for names which are supersets of the selected name */
|
/* Check for section names for which stabsect_name is a prefix, to
|
||||||
|
handle .stab0, etc. */
|
||||||
for (s = abfd->sections;
|
for (s = abfd->sections;
|
||||||
s;
|
s != NULL;
|
||||||
s = s->next)
|
s = s->next)
|
||||||
{
|
{
|
||||||
if (strncmp (stabsect_name, s->name, strlen (stabsect_name)) == 0)
|
if (strncmp (stabsect_name, s->name, strlen (stabsect_name)) == 0
|
||||||
|
&& strncmp (strsect_name, s->name, strlen (strsect_name)) != 0)
|
||||||
{
|
{
|
||||||
read_section_stabs (abfd, s->name, strsect_name);
|
if (read_section_stabs (abfd, s->name, strsect_name))
|
||||||
print_section_stabs (abfd, s->name, strsect_name);
|
{
|
||||||
free (stabs);
|
print_section_stabs (abfd, s->name, strsect_name);
|
||||||
free (strtab);
|
free (stabs);
|
||||||
|
free (strtab);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1156,7 +1162,13 @@ dump_bfd_header (abfd)
|
|||||||
printf ("\nstart address 0x");
|
printf ("\nstart address 0x");
|
||||||
printf_vma (abfd->start_address);
|
printf_vma (abfd->start_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dump_bfd_private_header (abfd)
|
||||||
|
bfd *abfd;
|
||||||
|
{
|
||||||
|
bfd_print_private_bfd_data (abfd, stdout);
|
||||||
|
}
|
||||||
static void
|
static void
|
||||||
display_bfd (abfd)
|
display_bfd (abfd)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
@@ -1180,6 +1192,8 @@ display_bfd (abfd)
|
|||||||
print_arelt_descr (stdout, abfd, true);
|
print_arelt_descr (stdout, abfd, true);
|
||||||
if (dump_file_header)
|
if (dump_file_header)
|
||||||
dump_bfd_header (abfd);
|
dump_bfd_header (abfd);
|
||||||
|
if (dump_private_headers)
|
||||||
|
dump_bfd_private_header (abfd);
|
||||||
putchar ('\n');
|
putchar ('\n');
|
||||||
if (dump_section_headers)
|
if (dump_section_headers)
|
||||||
dump_headers (abfd);
|
dump_headers (abfd);
|
||||||
@@ -1705,7 +1719,7 @@ main (argc, argv)
|
|||||||
|
|
||||||
bfd_init ();
|
bfd_init ();
|
||||||
|
|
||||||
while ((c = getopt_long (argc, argv, "ib:m:VdDlfahrRtTxsSj:w", long_options,
|
while ((c = getopt_long (argc, argv, "pib:m:VdDlfahrRtTxsSj:w", long_options,
|
||||||
(int *) 0))
|
(int *) 0))
|
||||||
!= EOF)
|
!= EOF)
|
||||||
{
|
{
|
||||||
@@ -1732,7 +1746,11 @@ main (argc, argv)
|
|||||||
case 'i':
|
case 'i':
|
||||||
formats_info = true;
|
formats_info = true;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
dump_private_headers = 1;
|
||||||
|
break;
|
||||||
case 'x':
|
case 'x':
|
||||||
|
dump_private_headers = 1;
|
||||||
dump_symtab = 1;
|
dump_symtab = 1;
|
||||||
dump_reloc_info = 1;
|
dump_reloc_info = 1;
|
||||||
dump_file_header = true;
|
dump_file_header = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user