From 3fdbfe8d128643f27417fc04e8aa06aad64bf110 Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Mon, 30 Sep 1991 19:47:49 +0000 Subject: [PATCH] * bucomm.c (fatal): Conditionally compile fatal() depending on MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS. * objdump.c (dump_headers): Trivial output format change. * objdump.c (display_info): Loop over integers, not enums, to appease old compilers. --- binutils/ChangeLog | 27 ++++++++++++++++++++++++++ binutils/objdump.c | 47 ++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 binutils/ChangeLog diff --git a/binutils/ChangeLog b/binutils/ChangeLog new file mode 100644 index 0000000000..09ebb4d275 --- /dev/null +++ b/binutils/ChangeLog @@ -0,0 +1,27 @@ +Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com) + + * bucomm.c (fatal): Conditionally compile fatal() depending on + MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS. + * objdump.c (dump_headers): Trivial output format change. + * objdump.c (display_info): Loop over integers, not enums, + to appease old compilers. + +Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com) + + *objdump.c *nm.c *copy.c :hanged some types to work with 64 bit object files + +Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com) + from bother + * objdump.c (print_address): Make disasembled output more + consistent with gdb and as: Add 0x when printing hex. + Don't print extra leading zeros. + Attempt to not print "filename.o". + * objdump.c: Add some enum-to-int casts to accomodate old compilers. + + +Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com) + + * copy.c: Change =& constructs to = &, since they confuse older + C compilers. + + diff --git a/binutils/objdump.c b/binutils/objdump.c index 0c44d6be05..f3214314c4 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -108,9 +108,13 @@ bfd *abfd; (unsigned) section->size); printf(" vma "); printf_vma(section->vma); -printf(" align 2**%2u\n ", +printf(" align 2**%u\n ", section->alignment_power); PF(SEC_ALLOC,"ALLOC"); + PF(SEC_CONSTRUCTOR,"CONSTRUCTOR"); + PF(SEC_CONSTRUCTOR_TEXT,"CONSTRUCTOR TEXT"); + PF(SEC_CONSTRUCTOR_DATA,"CONSTRUCTOR DATA"); + PF(SEC_CONSTRUCTOR_BSS,"CONSTRUCTOR BSS"); PF(SEC_LOAD,"LOAD"); PF(SEC_RELOC,"RELOC"); PF(SEC_BALIGN,"BALIGN"); @@ -205,7 +209,7 @@ FILE *stream; } else { /* Totally awesome! the exact right symbol */ - char *match_name = syms[thisplace]->name; + CONST char *match_name = syms[thisplace]->name; int sym_len = strlen(match_name); /* Avoid "filename.o" as a match */ if (sym_len > 2 @@ -255,6 +259,7 @@ bfd *abfd; bfd_size_type i; int (*print)() ; int print_insn_m68k(); + int print_insn_a29k(); int print_insn_i960(); int print_insn_sparc(); enum bfd_architecture a; @@ -298,13 +303,15 @@ bfd *abfd; a = bfd_get_architecture(abfd); } switch (a) { - case bfd_arch_sparc: print = print_insn_sparc; break; case bfd_arch_m68k: print = print_insn_m68k; break; + case bfd_arch_a29k: + print = print_insn_a29k; + break; case bfd_arch_i960: print = print_insn_i960; break; @@ -626,13 +633,11 @@ bfd *abfd; static void DEFUN_VOID(display_info) { - unsigned int i; + unsigned int i, j; extern bfd_target *target_vector[]; - enum bfd_architecture j; - i = 0; printf("BFD header file version %s\n", BFD_VERSION); - while (target_vector[i] != (bfd_target *)NULL) + for (i = 0; target_vector[i] != (bfd_target *)NULL; i++) { bfd_target *p = target_vector[i]; bfd *abfd = bfd_openw("##dummy",p->name); @@ -640,17 +645,14 @@ DEFUN_VOID(display_info) p->header_byteorder_big_p ? "big endian" : "little endian", p->byteorder_big_p ? "big endian" : "little endian" ); { - enum bfd_architecture j; - for (j = (int)bfd_arch_obscure +1; j <(int) bfd_arch_last; j++) + for (j = (int)bfd_arch_obscure +1; j < (int)bfd_arch_last; j++) { - if (bfd_set_arch_mach(abfd, j, 0)) - { - printf(" %s\n", bfd_printable_arch_mach(j,0)); - } + if (bfd_set_arch_mach(abfd, (enum bfd_architecture)j, 0)) + printf(" %s\n", + bfd_printable_arch_mach((enum bfd_architecture)j,0)); } } - i++; } /* Again as a table */ printf("%12s"," "); @@ -658,14 +660,14 @@ DEFUN_VOID(display_info) printf("%s ",target_vector[i]->name); } printf("\n"); - for (j = (int)bfd_arch_obscure +1; (int)j <(int) bfd_arch_last; j++) { - printf("%11s ", bfd_printable_arch_mach(j,0)); + for (j = (int)bfd_arch_obscure +1; j <(int) bfd_arch_last; j++) { + printf("%11s ", bfd_printable_arch_mach((enum bfd_architecture)j,0)); for (i = 0; target_vector[i]; i++) { { bfd_target *p = target_vector[i]; bfd *abfd = bfd_openw("##dummy",p->name); int l = strlen(p->name); - int ok = bfd_set_arch_mach(abfd, j, 0); + int ok = bfd_set_arch_mach(abfd, (enum bfd_architecture)j, 0); if (ok) { printf("%s ", p->name); } @@ -697,7 +699,7 @@ main (argc, argv) program_name = *argv; - while ((c = getopt_long (argc, argv, "Aib:m:dlfahrtxsj:", long_options, &ind)) + while ((c = getopt_long (argc, argv, "ib:m:dlfahrtxsj:", long_options, &ind)) != EOF) { seenflag = true; switch (c) { @@ -726,15 +728,6 @@ main (argc, argv) dump_ar_hdrs = 1; dump_section_headers = 1; break; - case 'A': - disassemble = true; - dump_ar_hdrs = 1; - dump_file_header = true; - dump_reloc_info = 1; - dump_section_headers = 1; - dump_symtab = 1; - break; - case 0 : break; /* we've been given a long option */ case 't': dump_symtab = 1; break; case 'd': disassemble = true ; break;