3 * stabs.c: Include "demangle.h". Added several new static
4 functions not listed below to demangle argument types; they are
5 all called via stab_demangle_argtypes.
6 (finish_stab): If the kind of an undefined tag is
7 DEBUG_KIND_ILLEGAL, use DEBUG_KIND_STRUCT instead. Warn if there
8 are any pending variable.
9 (parse_stab): Don't close the function when the block depth goes
10 to zero. Pass value to debug_end_function.
11 (parse_stab_string): In case 'T', pass the name to
13 (parse_stab_type): In case 'x', use stab_find_tagged_type. In
14 case '#', handle functions with variable numbers of arguments.
15 (parse_stab_struct_type): Add tagname parameter. Change all
17 (parse_stab_members): Add tagname and typenums parameters. Change
18 all callers. If the type of a method is a stub, call
19 parse_stab_argtypes to demangle the argument types and get the
20 physical name of the function.
21 (parse_stab_argtypes): New static function.
22 (stab_record_variable): For a DEBUG_GLOBAL or DEBUG_STATIC
23 variable, call debug_record_variable immediately.
24 (stab_find_tagged_type): New static function.
26 * debug.h (enum debug_type_kind): Add DEBUG_KIND_ILLEGAL.
27 (struct debug_write_fns): Add field ellipsis_type. Add id
28 parameter to start_struct_type, start_class_type, and tag_type.
29 (debug_make_ellipsis_type): Declare.
30 (debug_find_named_type): Declare.
31 (debug_get_type_kind): Declare.
32 (debug_get_return_type): Declare.
33 (debug_get_parameter_types): Declare.
34 (debug_get_fields): Declare.
35 (debug_get_field_type): Declare.
36 * debug.c (struct debug_handle): Add fields class_id and base_id.
37 (struct debug_class_type): Add field id.
38 (struct debug_method_variant): Rename argtypes to physname.
40 (debug_ellipsis_type): New static variable.
41 (ELLIPSIS_P): New macro.
42 (debug_make_ellipsis_type): New function.
43 (debug_make_method_variant): Rename argtypes to physname.
44 (debug_make_static_method_variant): Likewise.
45 (debug_name_type): Always put types in the global namespace.
46 (debug_find_named_type): New function.
47 (debug_find_tagged_type): Treat DEBUG_KIND_ILLEGAL specially,
48 rather than DEBUG_KIND_VOID.
49 (debug_get_real_type): New static function.
50 (debug_get_type_kind): New function.
51 (debug_get_return_type): New function.
52 (debug_get_parameter_types): New function.
53 (debug_get_fields): New function.
54 (debug_get_field_type): New function.
55 (debug_write): Initialize base_id.
56 (debug_write_type): Pass new id argument to tag_type. Handle
57 DEBUG_KIND_ILLEGAL. Use id for DEBUG_KIND_STRUCT and
58 DEBUG_KIND_UNION. Handle ellipsis for method arguments.
59 (debug_write_class_type): Don't dereference kclass if it is NULL.
61 * prdbg.c (pr_fns): Add pr_ellipsis_type.
62 (pr_ellipsis_type): New static function.
63 (pr_pointer_type): If this is a pointer to an array, parenthesize
65 (pr_start_struct_type): Add id parameter.
66 (pr_start_class_type): Likewise.
67 (pr_tag_type): Likewise.
68 (pr_fix_visibility): Add the visibility to the top of the stack,
69 not the second element on the stack.
70 (pr_struct_field): Pop the stack before calling pr_fix_visibility.
71 (pr_class_static_member): Likewise.
72 (pr_class_start_method): Don't push a type, just set the method
73 name in the type on the top of the stack.
74 (pr_class_end_method): Don't pop the stack.
75 (pr_class_method_variant): Rename argtypes parameter to physname.
76 Append const and volatile rather than prepending them. Add a
77 space after the physname.
78 (pr_class_static_method_variant): Likewise.
79 * ieee.c (ieee_fns): Add ieee_ellipsis_type.
80 (ieee_define_named_type): Use DEBUG_KIND_ILLEGAL rather than
82 (write_ieee_debugging_info): Likewise.
83 (ieee_typdef): Likewise.
84 (ieee_ellipsis_type): New static function.
85 (ieee_start_struct_type): Add id parameter.
86 (ieee_start_class_type): Likewise.
87 (ieee_tag_type): Likewise.
88 (ieee_class_method_variant): Rename name to physname.
89 (ieee_class_static_method_variant): Likewise.
91 * Makefile.in (DEBUG_OBJS): Remove prdbg.o.
92 ($(OBJDUMP_PROG)): Depend upon, and link against, prdbg.o.
96 * dlltool.c (make_tail): Changed the order of the sections to avoid
101 * srconv.c (wr_du): Set du.stackfrmt to 0.
102 (wr_un, wr_sc): Emit all sections, even those with 0 size.
106 * srconv.c (wr_hd): Space size within segment was being
107 stored in segment identifier field.
111 * mpw-config.in (BUILD_NLMCONV, BUILD_SRCONV, SYSINFO_PROG,
112 BUILD_DLLTOOL): Put definitions for these into makefile when
113 configuring, instead of always clearing in mpw-make.sed.
114 * mpw-make.sed: Edit out any host_alias or target_alias settings,
115 fix pathname to BFD internal include files, remove dependency
120 * objdump.c (dump_section_header): Add new section flags
121 SEC_{EXCLUDE,SORT_ENTRIES}.
125 * objcopy.c (filter_symbols): NULL terminate the output symbols.
126 (copy_object): Allocate space for a possible extra NULL pointer.
128 * debug.c (debug_make_undefined_tagged_type): Make sure we are
129 given a kind of type we can handle.
130 (debug_write_type): Handle undefined enums and structs.
131 (debug_write_class_type): Handle undefined classes.
132 * prdbg.c (pr_enum_type): Handle an undefined enum.
133 * ieee.c (ieee_enum_type): Likewise.
137 * Makefile.in: Updated dependencies.
138 (ALLOCA, MALLOC): Remove variables.
139 (ADDL_LIBS): Remove $(MALLOC) from definition.
140 * alloca.c, gmalloc.c: Remove.
144 * ieee.c: Add global function write_ieee_debugging_info and a
145 bunch of static functions and structs used to write out IEEE
146 debugging information.
147 * budbg.h (write_ieee_debugging_info): Declare.
149 * ieee.c (struct ieee_type): Add pslot field.
150 (enum builtin_types): Define.
151 (ieee_builtin_type): For a pointer, return a pointer to the named
152 type. Use enum values rather than numbers.
153 (ieee_alloc_type): New static function.
154 (ieee_read_type_index): Use ieee_alloc_type.
155 (parse_ieee_bb): Likewise.
156 (parse_ieee_ty): Likewise. Use ieee_builtin_type for array range,
157 rather than making a new integer type. Store the new type in the
158 slot, if there is one.
159 (parse_ieee_atn): Treat ATN10 as defining a register variable.
160 (ieee_regno_to_genreg): Rename from ieee_regno_to_gen. Change all
162 (ieee_genreg_to_regno): New static function.
164 * stabs.c (parse_stab_type): Add new typename parameter. Change
166 (parse_stab_range_type): Add new typename parameter. Change all
169 * debug.h (struct debug_write_fns): Add tag parameter to
170 enum_type, start_struct_type, and start_class_type.
171 * debug.c (debug_write_type): Pass any tag name to
172 start_struct_type, debug_write_class_type, and enum_type. If
173 DEBUG_KIND_TAGGED, pass the name in the recursive call.
174 (debug_write_class_type): Accept a new tag parameter, and pass it
176 * prdbg.c (pop_type): Don't remove '+' character.
177 (pr_enum_type): Accept and use tag parameter.
178 (pr_start_struct_type): Likewise.
179 (pr_start_class_type): Likewise.
180 (pr_class_baseclass): Adjust algorithm used to find where to put
182 (pr_tag): Don't bother to insert the tag name.
184 * objcopy.c: Include budbg.h.
185 (convert_debugging): New static variable.
186 (OPTION_DEBUGGING): Define.
187 (copy_options): Add "debugging".
188 (copy_usage): Mention --debugging.
189 (is_strip_section): Skip debugging sections if convert_debugging.
190 (setup_section, copy_section): Likewise.
191 (filter_symbols): Skip debugging symbols if convert_debugging.
192 (copy_object): If convert_debugging, read and write debugging
194 (write_debugging_info): New static function.
195 (copy_main): Handle --debugging.
196 * Makefile.in (DEBUG_OBJS): New variable.
197 ($(OBJCOPY_PROG)): Depend upon and link against $(DEBUG_OBJS).
198 ($(STRIP_PROG)): Likewise.
199 (OBJDUMP_OBJS): Remove variable.
200 ($(OBJDUMP_PROG)): Use objdump.o $(DEBUG_OBJS) rather than
202 * binutils.texi, objcopy.1: Document --debugging.
206 * ieee.c: New file with code to read IEEE debugging information.
207 * budbg.h (parse_ieee): Declare.
208 * rddbg.c (read_debugging_info): Handle IEEE flavour files.
209 (read_ieee_debugging_info): New static function.
210 * Makefile.in: Rebuild dependencies.
211 (CFILES): Add ieee.c.
212 (OBJDUMP_OBJS): Add ieee.o.
214 * bucomm.h (xrealloc): Change type of first parameter from char *
219 * Makefile.in: Add targets to automatically rebuild dependencies.
220 Remove targets which just listed dependencies of .o files.
222 (HFILES, GENERATED_HFILES): New variables.
223 (CFILES, GENERATED_CFILES): New variables.
224 (underscore.c): Don't do anything, just depend upon stamp-under.
225 (stamp-under): New target; do what underscore.c used to do.
226 (nlmconv.o): Depend upon sym.h and ecoff.h.
227 (.dep, .dep1, dep.sed, dep, dep-in): New targets.
228 (stage1, stage2, stage3, against, comparison): Remove.
229 (de-stage1, de-stage2, de-stage3): Remove.
230 (clean, distclean): Remove stamp-under and dep.sed.
231 * dep-in.sed: New file.
233 Implement generic debugging support. Implement a stabs reader and
235 * budbg.h, debug.c, debug.h, prdbg.c, rddbg.c, stabs.c: New files.
236 * objdump.c: Include "debug.h" and "budbg.h".
237 (dump_debugging): New global variable.
238 (usage): Mention --debugging.
239 (long_options): Add "debugging".
240 (display_bfd): Handle --debugging.
241 * Makefile.in (OBJDUMP_OBJS): New variable.
242 ($(OBJDUMP_PROG)): Use $(OBJDUMP_OBJS).
243 * binutils.texi, objdump.1: Document --debugging.
247 * nm.c ( long_options): Add "--defined-only" option.
248 (usage): Update for new "--defined-only" option.
249 (filter_symbols): Handle "--defined-only".
253 * arparse.y: Include "bucomm.h", not <sysdep.h>.
254 * nlmheader.y: Don't include "sysdep.h".
258 * nm.c (print_symdef_entry): Check return value of
259 bfd_get_elt_at_index.
263 * configure.in (DLLTOOL_DEFS): Build dlltool for PowerPC if target
264 is powerpc*-*-win* in addition to powerpc*-*-*pe*.
268 * objdump.c (endian_string): New static function.
269 (display_target_list): Use it.
270 * nlmconv.c (main): Use new bfd_big_endian macro.
274 * dlltool.c (fill_ordinals): Start from 1 if no other instructions
279 * Makefile.in (clean): Remove $(DEMANGLER_PROG).1. From Ronald
284 * mac-binutils.r: Fix copyright and version strings.
286 * Makefile.in (version): Remove, no longer used.
290 * mpw-make.sed (install, install-only): Edit in Mac-specific
295 * dlltool.c (ppc_jtab): The binary glue for PowerPC dll linkage,
296 including the return instruction.
297 sinfo: added a preferred alignment field.
298 (secdata): section data for the PowerPC version.
299 (make_one_lib_file): More symbols, More sections (pdata, rdata)
300 (make_tail): Use idata$6 instead of idata$7 for ppc. Also added a
301 NULL idata$3 descriptor (temporary).
305 * dlltool.c (fill_ordinals): Don't reference d_export_vec if
306 there are no exported functions.
310 * configure: Regenerate with autoconf 2.7.
314 * dlltool.c (fill_ordinals): Start assigning ordinals at 1.
316 * Makefile.in (EXPECT): Use $$r, not $${rootme}.
317 (check): Set r, not rootme.
321 * configure.in: Use BFD_NEED_DECLARATION.
322 * acconfig.h: Put NEED_DECLARATION_FPRINTF in @TOP@ section.
323 * configure, config.in: Rebuild with autoconf 2.6.
327 * Makefile.in (CC_FOR_TARGET): Use @host@ and @target@, not
328 $(host_canonical) and $(target_canonical).
332 Version 2.6 released.
333 * Makefile.in (VERSION): Update to 2.6.
337 * Makefile.in (CC_FOR_TARGET): Define.
338 (check): Pass CC and CFLAGS to runtest.
340 * nm.c (display_rel_file): Don't require a DYNAMIC object when
341 dumping the dynamic symbol table.
343 * objdump.c (compare_symbols): Sort global symbols before local
344 symbols before debugging symbols.
345 (objdump_print_address): Don't futz around looking for a global
346 symbol with the same value.
350 * dlltool.c: Use FOPEN_* macros rather than "r" or "w".
352 * dlltool.c (fill_ordinals): Correct memset call.
356 * mpw-make.sed (DEMANGLER_PROG): Edit out attempts to do anything
361 * objcopy.c (setup_section): Copy the section lma independently of
366 * arsup.c (ar_open): Cast malloc return value.
370 * configure.in, configure (DLLTOOL_DEFS): Added ppc target.
371 * dlltool.c (MPPC): Added basic PPC definitions.
375 * configure.in: Don't treat rs6000-*-lynx* specially.
376 * configure: Rebuild.
377 * config/rslynx: Remove.
378 * Makefile.in: Remove @target_makefile_fragment@.
382 * bucomm.h: Include <sys/types.h>.
383 * ar.c: Don't include <sys/types.h> or <stdio.h>.
384 * bucomm.c, dlltool.c, nlmconv.c, objcopy.c, objdump.c: Likewise.
388 * objdump.c: Include <sys/types.h>.
390 Permit user to override DEMANGLER_PROG from command line. From
392 * Makefile.in ($(DEMANGLER_PROG)): Depend upon
394 (install): Don't depend upon $(DEMANGLER_PROG).1. Only install
395 $(DEMANGLER_PROG).1 if $(DEMANGLER_PROG) is not empty.
399 * Makefile.in (syslex.o): add -I$(srcdir) if compiling in a
404 * objdump.c (objdump_print_value): New static function.
405 (objdump_print_address): Use it. If we need the right section for
406 the symbol, and we can't find it, print an offset from the section
407 rather than using a symbol from some other section.
411 * dlltool.c (no_idata4, no_idata5): New.
412 (arm_jtab): Use correct encoding of jump instruction.
413 (usage, main, make_head, make_tail): Act on no_idata4, no_idata5.
417 * mpw-make.sed: Edit paths to generated y.tab.[ch] files.
421 * binutils.texi: Change --with-targets to --enable-targets.
425 * Makefile.in: Remove extraneous tab on otherwise empty line,
426 which confuses many non-GNU versions of "make".
430 * dlltool.c (i386_jtab, arm_jtab): New
431 (gen_lib_file): Rewritten to use bfd.
435 * Makefile.in (install): Don't give error message if dlltool
440 * deflex.l: Allow quoting of IDs.
441 * defparse.y (%union): string deleted.
442 (command): DESCRIPTION takes ID.
443 * dlltool.c (gen_def_file): Quote outgoing name if
444 necessary. Preserve NONAME.
445 (gen_lib_file): Run ranlib.
446 (workout_prefix): Deleted.
447 (main, usage, long_options): Add --as, --ranlib, --ar options.
451 * dlltool.c (mtable): HOW_ALIGN_LONG, new.
453 (d_low_ord, d_high_ord, d_named_funcs): New.
454 (gen_exp_file): Create noname entries correctly.
455 (gen_lib_file): Dump exports alphabetically.
456 (process_duplicates): Count nonamed functions.
457 (fill_ordinals): Keep track of highest ord too.
458 (mangle_defs): Create alphabetically ordered list of names.
462 * Makefile.in (TOOL_PROGS): Include DLLTOOL_PROG.
466 * dlltool.c (add_underscore): New.
467 (xlate): Use new name.
468 (main, usage): Update.
472 * sysinfo.y: Eliminate unused terminals "[" and "]" and unused
473 nonterminal "name". One s/r conflict remains.
477 * nm.c (print_symname): Don't try to demangle an empty
479 * objdump.c (slurp_symtab): Reset symcount if there are
481 (slurp_dynamic_symtab): Likewise, for dynsymcount.
482 (disassemble_data): Fix memory leak: free sorted_syms when done.
483 (display_bfd): Likewise, for syms and dynsyms.
484 (dump_relocs): Don't print header before possibly generating an
486 (dump_dynamic_relocs): Likewise.
488 * ar.1, nm.1, objdump.1, size.1, strings.1, strip.1: Fix typos and
493 * ar.c (do_quick_append): Comment out.
494 (replace_members): Add quick argument.
495 (main): Don't call do_quick_append.
496 (open_inarch): Don't call quick_append to create an empty archive.
497 Instead call bfd_openw/bfd_set_format/bfd_close.
501 * bucomm.c: Always include time.h.
505 * objdump.c (compare_symbols): Sort gnu_compiled and gcc2_compiled
506 symbols after other symbols with the same value. Likewise for
507 symbols which look like file names.
508 (objdump_print_address): Always chose the first reasonable symbol
513 * arsup.c (ar_save): Use rename, not unlink/link/unlink.
517 * strings.c (main): Exit with zero status if no files are given
518 and standard input is read.
522 * mpw-config.in: Calculate underscore and put into makefile
523 fragment, generate config.h.
524 * mpw-make.sed: New file, sed commands to edit Unix makefile
526 * mpw-make.in: Remove.
527 * mac-binutils.r: New file, Mac resources.
531 * dlltool.c: (gen_exp_file): Always emit a .reloc section if
535 (gen_lib_file): Use imp_name_lab.
536 (main): Initialize imp_name_lab.
540 * configure.in: Call AC_HEADER_SYS_WAIT.
541 * configure: Rebuild.
542 * config.in: Rebuild.
543 * dlltool.c: Include "libiberty.h" and "bucomm.h". Don't include
544 <stdio.h>, <stdlib.h>, or <string.h>. Don't include <wait.h>.
545 Include <sys/types.h>. Use HAVE_SYS_WAIT_H to control whether to
546 include <sys/wait.h> or define the wait macros by hand. Don't
548 (gen_lib_file): Don't assume that sprintf returns the number of
549 characters; use strlen instead.
553 * objdump.c (disassemble_data): Don't use the old BFD based
554 disassembler interface. Make info a const pointer.
558 * objdump.c (start_address): New variable.
559 (stop_address): New variable.
560 (usage): Mention --start-address and --stop-address.
561 (OPTION_START_ADDRESS, OPTION_STOP_ADDRESS): Define.
562 (long_options): Add "start-address" and "stop-address".
563 (disassemble_data): Handle start_address and stop_address.
564 (dump_data, dump_reloc_set): Likewise.
565 (main): Don't set seenflag for -l. Handle OPTION_START_ADDRESS
566 and OPTION_STOP_ADDRESS.
567 * objcopy.c (parse_vma): Move to bucomm.c.
568 * bucomm.c (parse_vma): New function, moved in from objcopy.c.
569 * bucomm.h (parse_vma): Declare.
570 * binutils.texi, objdump.1: Document new objdump options.
574 * Makefile.in (maintainer-clean): New target.
576 * ar.c (replace_members): Don't call write_archive if nothing
579 * objdump.c (disassemble_data): Add casts to avoid gcc warnings.
583 * config.in: Rename from config.h.in.
584 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
585 Check for config.h:config.in when creating stamp-h.
586 * configure: Rebuild.
587 * Makefile.in (stamp-h): Depend upon config.in rather than
588 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
589 calling config.status.
591 * Makefile.in (distclean): Remove config.h, stamp-h, and
594 * nm.c (value_format): Initialize based on BFD64 and
596 (print_radix): New static variable.
597 (set_print_radix): Set print_radix. Adjust changes to
599 (print_value): New static function, to print 64 bit octal and
600 decimal values correctly.
601 (print_symbol_info_bsd): Check BFD64, not BFD_HOST_64_BIT. Use
603 (print_symbol_info_sysv): Use print_value.
604 (print_symbol_info_posix): Likewise.
608 * Makefile.in (*.o): Remove incorrect dependencies on
609 $(BFDDIR)/hosts/std-host.h.
611 * Makefile.in (INSTALL_DATA): Add -m 644.
612 (INSTALL_XFORM1): Likewise.
613 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@ rather than $(CC).
614 (mostlyclean): Remove config.log.
615 (distclean): Remove config.cache.
617 * configure.in: Call BFD_CC_FOR_BUILD and BFD_BINARY_FOPEN.
618 * configure: Rebuild.
622 * configure.in: Rewrite to use autoconf.
623 * aclocal.m4: New file.
624 * configure: New file, built by autoconf.
625 * acconfig.h: New file.
626 * config.h.in: New file, built by autoheader.
627 * Makefile.in: Various changes for new configure script. Also:
628 (PROGS): Remove $(SYSINFO_PROG).
629 (ALL_CFLAGS): Remove $(TDEFINES).
630 (version.o): Use $(ALL_CFLAGS).
631 (cplus-dem.o, dlltool.o, nlmconv.o): Likewise.
632 (sysdump.o): Depend upon bucomm.h and config.h.
633 (srconv.o, arsup.o, strings.o): Depend upon config.h.
634 (filemode.o): Don't depend upon ../bfd/sysdep.h.
635 (bucomm.o): Depend upon config.h, not ../bfd/sysdep.h.
636 (size.o, objdump.o, nm.o, ar.o, objcopy.o): Likewise.
637 (nlmheader.o, nlmconv.o): Likewise.
638 (distclean): Don't remove sysdep.h.
639 * bucomm.h: Include "ansidecl.h", <stdio.h>, and "config.h".
640 Include "fopen-same.h" or "fopen-bin.h", based on
641 USE_BINARY_FOPEN. Include <errno.h>, and declare errno if it is
642 not a macro. Include <unistd.h>, <string.h>, <strings.h>,
643 <stdlib.h>, and <fcntl.h> if they are present. Declare strchr,
644 strrchr, and strstr if no string header file exists. Include
645 <sys/file.h> if it exists and <fcntl.h> does not. Define
646 O_RDONLY and O_RDWR if necessary.
647 * ar.c: Don't include "sysdep.h". Do include <sys/types.h> and
648 <sys/stat.h>. Use HAVE_GOOD_UTIME_H rather than POSIX_UTIME. Use
649 HAVE_UTIMES rather than !USE_UTIME. Don't include <errno.h>, and
651 * arsup.c: Don't include <sysdep.h>.
652 * bucomm.c: Don't include "sysdep.h". Include <stdio.h>,
653 <sys/types.h>, and <sys/stat.h>. Include <time.h> if it defines
654 time_t. Define time_t if necessary.
655 * coffdump.c: Don't include "sysdep.h".
656 * coffgrok.c, filemode.c, nlmconv.c, size.c: Likewise.
657 * srconv.c, strings.c: Likewise.
658 * nm.c: Don't include "sysdep.h". Don't try to define HAVE_SBRK.
659 * objcopy.c: Don't include "sysdep.h". Include <sys/types.h> and
661 (simple_copy): Use creat rather than assuming that O_CREAT is
663 * objdump.c: Don't include "sysdep.h". Use
664 NEED_DECLARATION_PRINTF rather than !FPRINTF_ALREADY_DECLARED.
665 * sysdump.c: Include "bfd.h" and "bucomm.h". Don't include
666 "sysdep.h" or <stdlib.h>.
667 (dump_symbol_info): Rename from symbol_info. Change all callers.
671 * configure.in (host_makefile_frag): Don't set. Substitute for
672 @CC@, @CFLAGS@, @HDEFINES@ and @LDFLAGS@ in Makefile.
673 * Makefile.in (AR_FLAGS): Set to rc rather than qv.
674 (CC): Define as @CC@.
675 (CFLAGS): Set to @CFLAGS@.
676 (LDFLAGS): Define as @LDFLAGS@.
677 (ALL_CFLAGS): Use @HDEFINES@ rather than $(HDEFINES).
679 * configure.in: Don't bother to call config.bfd for each target.
680 Just call it for the default target, and use the shell variable to
681 decide whether underscores are used.
685 * configure.in: match i[3-6]86-*-win32, not just i386-*-win32.
689 * dlltool.c (add_indirect): New.
691 (gen_exp_file): Timestamp should be 0. Insert prefix when
692 needed. New code for indirection.
693 (gen_lib_file): Timestamp should be 0. Insert prefix
695 (usage): Document --add-indirect.
696 (main): Cope with new option.
698 * objdump.c (dump_private_headers): New.
699 (usage): Document new option.
700 (long_option): Add private-headers.
701 (dump_bfd_private_header): New.
702 (main): Cope with new option.
706 * dlltool.c (run): Add missing 3rd arg to waitpid.
710 * Makefile.in (TOOL_PROGS): Include dlltool if needed.
714 * dlltool.c (rva): Deleted.
715 (rvaafter, rva_before): Use new assembler pseudo.
716 (flush_page, gen_exp_file, gen_lib_file): Use new way of RVAing.
717 (gen_exp_file): Don't generate .edata if no need.
718 (gen_lib_file): Don't make timestamp.
719 Put _iname in idata$7.
720 (workout_prefix): Fix memory initialization bug.
721 (usage): Tidy up, delete many single char options.
722 (main): rva option is gone.
726 * dlltool.c (options): image-base is a synonym for rva.
727 (gen_lib_file): Put dll name into ibase$7.
731 Modified to generate archives and objects rather than .s files.
732 * dlltool.c (run) New function.
733 (gen_exp_file, gen_lib_file): Use run.
734 (workout_prefix): New.
735 (usage): Document new options.
736 (main): Parse new options.
740 * dlltool.c (gen_exp_file): Fix RVA handling.
741 (rva_s, rva_n): Delete.
745 * nm.c (main): Ignore -e.
749 * Makefile.in (config.texi): New target. Write out a setting for
750 texinfo variable VERSION.
751 (binutils.dvi, binutils.info): Depend on it.
752 * binutils.texi: Include it, and reference @value{VERSION} instead
753 of explicitly specifying 2.2(!).
757 * coffgrok.c (do_type): Handle array dimensions the same way gdb
762 * dlltool.c (mtable): New fields.
763 (ASM_RVA_BEFORE, ASM_RVA_AFTER): New.
764 (flush_page): Use new macros.
768 * objcopy.c (mark_symbols_used_in_relocations): Handle sections
770 * coffgrok.c (do_sections_p1): Likewise.
774 * strings.c (print_strings): For compatibility with existing
775 strings programs, print strings which are not terminated with a
776 null byte or a newline.
777 * binutils.texi, strings.1: Update documentation accordingly.
779 * ar.c (replace_members): For compatibility with existing ar
780 programs, permit users to add the same file multiple times.
784 * strings.c (DATA_FLAGS): Remove SEC_DATA.
785 (main): If no file names are given, scan standard input.
786 * binutils.texi, strings.1: strings now scans non-data sections by
791 * srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
792 (writeINT): When size == -2, use 2 bytes for the h8300 and 4 bytes
795 * sysdump.c (fillup): Return size - 1, the last byte is a checksum
796 and shouldn't be counted.
797 * sysroff.info (hd): Changed segment identifier from a byte to a 1
798 bit field. The sysroff 2.0-01 specification seems to be in error
799 here. Reduce width of following "spare" field from 4 to 3 bits.
800 (rl): Changed order and width of first 4 bitfields to correspond
801 to sysroff specification.
802 (dln_head, dln_inside, dln_tail): Removed.
806 * nm.c (sort_symbols_by_size): Enclose expression being casted
807 in parens so result is casted, not just first operand. Can't
808 do pointer arithmetic on void* pointers.
812 * sysdump.c (dh): Changed format of output to be 16 hex digits
813 followed by 16 ascii characters, similar to Emacs' hexl-mode,
814 to make it easier to read.
819 * srconv.c (wr_tr): Write out handcrafted tr block.
820 (walk_tree_symbol): Use evallen and evalue instead of
821 vallen & value because of corresponding changes in
824 * sysdump.c (sysroff_swap_tr_in, sysroff_print_tr_out): New
827 * sysroff.info (tr): the tr block is a special case --- a block
828 without contents --- which can't be handled by generated code.
829 (den, dpp): only first byte is present for DENend, DPPend.
830 (dsy): describe a conditional portion of block, rename some fields.
831 (dps): describe a conditional portion of block.
834 * sysinfo.y (yyerror): write error message to standard error.
838 * Makefile.in (DISTSTUFF): Add arparse.h and sysinfo.h.
839 (mostlyclean): Remove y.output.
840 (clean): Remove sysroff, sysroff.c, sysroff.h, and sysinfo.
842 * nlmconv.c (powerpc_mangle_relocs): Cast memset arg to size_t.
843 * objcopy.c (copy_object): Likewise.
845 * nm.c (HAVE_SBRK): Define execpt on amigados and WINDOWS_NT.
846 (struct size_sym): Define.
847 (show_stats): New static variable.
848 (long_options): Add undocumented option "stats".
849 (main): Print memory stats if requested.
850 (sort_bfd, sort_dynamic, sort_x, sort_y): New static variables.
851 (numeric_forward): Use minisymbols rather than asymbols.
852 (non_numeric_forward): Likewise.
853 (size_forward1): Rename from size_forward. Use minisymbols.
854 (size_forward2): New static function.
855 (sort_symbols_by_size): Take new arguments dynamic, size, and
856 symsizep. Use minisymbols. Don't store the size back in the
857 symbol; store in a newly allocate struct size_sym array.
858 (display_rel_file): Read minisymbols rather than asymbols. Set
859 sort_* variables. Call print_size_symbols if sorting by size.
860 (filter_symbols): Take new arguments dynamic and size. Use
862 (print_symbols): Likewise. Call print_symbol for actual printing.
863 (print_size_symbols): New static function.
864 (print_symbol): New static function.
868 * objdump.c (dump_section_stabs): Only print each stabs section
870 (compare_relocs): Make it clear to gcc that this always returns a
875 * objcopy.c (simple_copy): Preserve errno on failure.
876 (smart_rename): Print error mesage if simple_copy fails.
880 * sysdump.c: re-indented file.
881 (module): read blocks sequentially instead of trying to parse
882 them, as that would require changing the parser recognize the
883 difference between a DPSstart and DPSend block.
884 (getone): Add break's between switch blocks as appropriate.
885 (object_body_list): parse blocks according to sysroff spec.
889 * sysroff.info: re-indented file, prior formatting was confusing
890 because it was indentation did not reflect nesting of conditional
891 records. Change "space size within segment" record in hd record
894 * sysinfo.y (cond_it_field): Use xcalloc instead of calloc.
896 * srconv.c (wr_cs): Reformatted cs header array, tag each byte
897 with a comment describing the field.
898 (wr_unit_info): Use SEEK_SET macro instead of constant 0.
899 (main): Use FOPEN_WB macro instead of literal "wb".
900 * sysroff.info: Remove fdl (dfl) field from cs block. Compare
901 ptr->type with ED_TYPE_CONST instead of constant 2 in ed block.
905 * nm.c (size_forward): Check yf against yn, not xn.
907 * objcopy.c (copy_archive): Record all output BFD's, and close
908 them before unlinking them and removing the temporary directory,
909 to avoid NFS problems.
911 * ar.c (replace_members): In verbose messages, use 'r' when
912 replacing a member, and 'a' when adding one.
914 * ar.c (ar_truncate): New static variable.
915 (normalize): Change return type to const char *. Add abfd
916 argument. Change all callers. If ar_truncate, chop the filename
917 to abfd->ar_max_namelen.
918 (main): For the 'f' modifier, set ar_truncate to true. Don't
919 change quick_append to replace if ar_truncate is true.
920 (do_quick_append): If ar_truncate, set BFD_TRADITIONAL_FORMAT.
921 (write_archive): Likewise.
922 * binutils.texi, ar.1: Document 'f' modifier.
924 * objcopy.c (enum strip_action): Define strip_unneeded.
925 (OPTION_STRIP_UNNEEDED): Define.
926 (strip_options): Add "strip-unneeded".
927 (copy_options): Likewise.
928 (copy_usage): Mention --strip-unneeded.
929 (strip_usage): Likewise.
930 (is_strip_section): Strip debugging sections if strip_unneeded.
931 (filter_symbols): If strip_unneeded, only keep BSF_KEEP symbols.
932 (copy_object): If strip_all, discard symbols without checking
934 (copy_object): Call filter_symbols if strip_unneeded.
935 (setup_section): Strip debugging sections if strip_unneeded.
936 (copy_section): Likewise.
937 (strip_main): Handle OPTION_STRIP_UNNEEDED.
938 (copy_main): Likewise.
939 * binutils.texi, objcopy.1, strip.1: Document --strip-unneeded.
943 * configure.in (i386-*-win32): New configuration.
944 * dlltool.c (killat, xlate, usage, long_options, main):
945 Understand and cope with -k option.
949 * ar.c: (extract_file): Change "#if POSIX_UTIME" to
950 "#ifdef POSIX_UTIME" to match other tests of POSIX_UTIME
951 and avoid lossage when POSIX_UTIME is not defined at all.
955 * ar.c: (print_contents.c, extract_file, do_quick_append):
956 Malloc buffers rather than allocate on stack (so it works
958 * deflex.l: Names can have an @ in them.
959 * dlltool.c: Loads of stuff. Can now generate .imp files which
964 * mpw-make.in (demangle.c.o): Remove.
965 (arparse.h): Depend on arparse.c instead of arparse.y.
969 * Makefile.in (DISTSTUFF): Don't include info here.
970 (diststuff): Include it here.
971 (realclean): Remove *.info.
973 * objdump.c (compare_relocs): If relocation entries have the same
974 address, keep them in file order.
978 * dlltool.c: Change names of generated files. .*.s-> -*.s
980 * objdump.c (dump_section_stabs): Check for names
981 which are supersets of selected names.
985 * dlltool.c (mtable, ARM jump): Must redirect via pc offsetable ptr.
989 * deflex.l, defparse.y, dlltool.c: New files.
990 * Makefile.in, configure.in: Support for them.
994 * sysdump.c: Include sysdep.h
995 (main): Open input with FOPEN_RB.
999 * objdump.c (wide_output): New flag variable.
1000 (usage): Print new -w, --wide options.
1001 (long_options): Add --wide support.
1002 (dump_section_header): If --wide, don't print a newline between
1003 the section's first line and the flags.
1004 (objdump_print_address): Use unsigned comparisons for the binary
1006 (disassemble_data): If --wide, don't put a \n between the
1007 disassembly output and relocation information.
1008 (main): Support -w option being the same as --wide.
1014 * objcopy.c (smart_rename): make it smarter, clean up
1019 * Makefile.in: Delete lines with lots of #### because four or more
1020 indicate a point for makefile fragment substitution.
1024 * configure.in: Don't build nlmconv on PowerPC eabi any more, it
1029 * Makefile.in (EXPECT): Define.
1030 (RUNTEST): Use one in source tree if present.
1031 (check): Set `rootme' for $(EXPECT).
1035 * srconv.c (main): Add support for -n option which disables
1036 prescan of common symbols.
1037 (wr_ob): If reading past the end of a section, fill with zeros.
1041 * objdump.c (dump_section_header): Display load address after
1042 virtual memory (run-time) address.
1046 * Makefile.in (cplus-dem.o): Pass -DVERSION='"$(VERSION)"' to the
1048 (DEMANGLER_PROG): No longer uses version.o.
1052 Merge in support for Mac MPW as a host.
1053 (Old change descriptions retained for informational value.)
1055 * mpw-config.in (TDEFINES): Define as empty in makefile frag.
1057 * mpw-config.in: Create mk.tmp, define ARCHDEFS in it.
1059 * mpw-config.in: New file, MPW configure fragment for binutils.
1060 * mpw-make.in (install-only): New target.
1061 (install): Also depend on install-only.
1063 * mpw-make.in (cplusfilt): Renamed from c++filt.
1064 (INCLUDES): Add more paths.
1066 * mpw-make.in: New file, MPW makefile fragment for binutils.
1067 (Normally automatically generated from Makefile.in.)
1071 * ar.c (write_archive): Call make_tempname to get output file
1072 name, rather than using a fixed name based on the input file.
1074 * objcopy.c (make_tempname): Copy from here...
1075 * bucomm.c (make_tempname): ...to here, and make global.
1076 * bucomm.h (make_tempname): Declare.
1080 * strings.c: Include "bfd.h" before other headers. Include
1082 * bucomm.c (print_arelt_descr): Cast st_uid and st_gid to long,
1083 and print them with %ld.
1087 * objcopy.c (strip_options): Add --keep-symbol.
1088 (copy_options): Likewise.
1089 (copy_usage): Mention --keep-symbol and -K.
1090 (strip_usage): Likewise.
1091 (keep_symbols): New static variable.
1092 (is_strip_symbol): Adjust the return value according to
1094 (strip_main): Handle -K. For -N, check that -K was not given.
1095 (copy_main): Likewise.
1096 * binutils.texi, objcopy.1, strip.1: Document -K.
1100 * objcopy.c (copy_archive): Check result of mkdir.
1101 (copy_main): Cast an xmalloc result.
1103 * objdump.c (usage): Break long format string into shorter ones.
1107 * bucomm.c (list_supported_targets): New function.
1108 * bucomm.h (list_supported_targets): Declare.
1109 * ar.c (usage): Call list_supported_targets.
1110 * nm.c (usage): Likewise.
1111 * objcopy.c (copy_usage, strip_usage): Likewise.
1112 * objdump.c (usage): Likewise.
1113 * size.c (usage): Likewise.
1114 * strings.c (usage): Likewise.
1118 * bucomm.c (print_arelt_descr): Cast st_size to long before
1119 passing it to fprintf.
1123 * objcopy.c (struct section_list): Add fields remove, set_flags,
1124 and flags. Change adjust from boolean to enum.
1125 (remove_sections): Remove static variable.
1126 (sections_removed): New static variable.
1127 (copy_options): Add --set-section-flags.
1128 (copy_usage): Mention --set-section-flags.
1129 (parse_flags): New static function.
1130 (find_section_list): New static function.
1131 (is_strip_symbol): Change return type from int to boolean.
1132 (is_strip_section): New static function.
1133 (filter_symbols): Call is_strip_section.
1134 (copy_object): When adding sections, check for specified flags or
1135 VMA. Call filter_symbols if any sections are being removed.
1136 (setup_section): Use find_section_list function rather than
1137 looking through remove_sections and adjust_sections. Handle
1138 --set-section-flags.
1139 (copy_section): Use find_section_list rather than looking through
1141 (strip_main): Use find_section_list instead of adding items to
1143 (copy_main): Use find_section_list instead of adding items to
1144 sections_removed and adjust_sections. Handle --set-section-flags.
1145 * binutils.texi, objcopy.1: Document --set-section-flags.
1149 * objdump.c (with_source_code): New global variable.
1150 (usage): Mention -S/--source.
1151 (long_options): Add --source.
1152 (prev_functionname, prev_line): New static variables.
1153 (struct print_file_list): Define.
1154 (print_files): New static variable.
1155 (skip_to_line, show_line): New static functions.
1156 (disassemble_data): Call show_line to handle -l and -S.
1158 * binutils.texi, objdump.1: Document -S/--source.
1162 * objcopy.c (copy_usage): Rename parameter to avoid shadowing.
1163 (strip_usage): Likewise.
1165 * objcopy.c (struct section_add): Define.
1166 (add_sections): New static variable.
1167 (copy_options): Accept --add-section.
1168 (copy_usage): Mention --add-section.
1169 (copy_object): Add sections from the add_sections list.
1170 (copy_main): Handle --add-section.
1171 * binutils.texi, objcopy.1: Document --add-section.
1175 * objdump.c (disassemble_data): Pass section offset, not absolute
1176 address, to bfd_find_nearest_line.
1178 * nlmconv.c (powerpc_mangle_relocs): Don't use const with
1183 * objdump.c (compare_symbols): Use bfd_asymbol_value (VAR) rather
1185 (objdump_print_address): Likewise.
1186 (disassemble_data): Don't change the symbol values. It can
1187 confuse bfd_canonicalize_reloc.
1191 * configure.in: Add support for powerpc-*-ebai.
1193 Wed Jan 18 10:02:12 1995 Steve Chamberlain <sac@splat>
1195 * coffdump.c: Include sysdep.h.
1196 (dump_coff_type): Handle coff_secdef_type.
1197 * coffgrok.c : Include sysdep.h.
1198 * srconv.c: Include libiberty.h
1199 (absolute_p, dty_start, dty_end, dump_tree_structure): Remove.
1203 * coffdump.c (dump_coff_scope): Cast pointer to unsigned long for
1205 * coffgrok.c: Include bucomm.h. Don't declare xmalloc.
1206 (push_scope): Declare type of parameter link.
1207 * size.c: Include libiberty.h.
1208 * srconv.c: Include bucomm.h.
1209 (find_base): Declare at top of file.
1210 (wr_hd): Add default case to architecture switch.
1211 (wr_dps_start): Declare type of parameter nest.
1212 (wr_du): Comment out variables used only in commented out blocks.
1213 (wr_dus): Remove unused variable i.
1214 (wr_sc): Remove unused variables myinfo, low, and high.
1215 * strings.c: Include libiberty.h.
1216 * sysdump.c: Include <ctype.h>.
1220 * ar.c (main): Ignore 'f' modifier used on HP/UX 9.
1224 * ar.c, nm.c, objcopy.c, objdump.c: Include progress.h.
1225 * ar.c, nm.c, objcopy.c, objdump.c (main): Add START_PROGRESS
1227 * ar.c (map_over_members, open_inarch): Call PROGRESS.
1228 * nm.c (main, display_archive, filter_symbols, print_symbols):
1231 * objcopy.c (copy_usage): Break up long usage string.
1235 * objcopy.c (copy_object): Don't bother setting status after
1236 nonfatal() "call", because it won't return.
1240 * nlmconv.c (powerpc_mangle_relocs): Don't switch a reloc to use
1241 the section symbol if the symbol is undefined.
1245 * objcopy.c (add_strip_symbol): Cast return value of xmalloc.
1249 * ar.c (replace_members): Pass current->filename to normalize when
1250 checking for duplicates, because the filename of a newly added
1251 file will not have been normalized yet.
1255 * ar.c (main): Don't call do_quick_append if any of the archive
1256 names are longer than 14 characters.
1258 * objcopy.c (main): Fix is_strip test. From
1263 * objcopy.c (add_strip_symbol): New function, adds a name to an
1264 explicit list of symbols to strip.
1265 (is_strip_symbol): New function, reports whether the name argument
1266 is in the explicit list.
1267 (filter_symbols): Check against is_strip_symbol above all.
1268 (strip_main): Recognize -N option. If used, don't default to
1270 (copy_main): Recognize -N option.
1271 (strip_usage): Document -N and --strip-symbol options.
1272 (copy_usage): Ditto.
1273 * objcopy.1, strip.1, binutils.texi: Document -N and
1274 --strip-symbol options.
1278 * objdump.c (display_target_list, display_info_table): Pass an
1279 array to tmparg, rather than NULL, since some systems can't handle
1282 * objcopy.c (copy_archive): Keep a list of the names of the
1283 temporary files we created. Close each input BFD after we open
1288 * Makefile.in (VERSION): Bump to 2.5.3.
1292 * Makefile.in (install-info): Install info files from whatever
1293 directory they were found in.
1295 Patch from DJ Delorie:
1296 * configure.bat: do c++filt -> cxxfilt right
1298 * sysinfo.y: Include system header files early, so any potential
1299 declaration of abort() occurs before its use.
1301 * strings.c (strings_file): Try opening the file in binary mode
1306 * ar.c (main): Treat ar qs like ar rs.
1310 * objcopy.c (gap_fill): Explicitly initialize, for clarity.
1311 (pad_to_set, pad_to): New static variables.
1312 (copy_options): Accept --pad-to.
1313 (copy_usage): Mention --pad-to.
1314 (copy_object): Support --pad-to.
1315 (compare_section_vma): Sort non loadable sections to the front.
1316 Sort sections with the same VMA by size.
1317 (copy_main): Handle --pad-to.
1318 * binutils.texi, objcopy.1: Document --pad-to.
1322 * objcopy.c (gap_fill_set, gap_fill): New static variables.
1323 (copy_options): Accept --gap-fill.
1324 (copy_usage): Mention --gap-fill.
1325 (copy_object): Support --gap-fill.
1326 (get_sections, compare_section_vma): New static functions.
1327 (copy_main): Handle --gap-fill.
1328 * binutils.texi, objcopy.1: Document --gap-fill.
1332 * Makefile.in (check): Add a dummy else clause to the if
1335 * objcopy.c (copy_object): Revert yesterday's change.
1336 * binutils.texi, objcopy.1: Remove special mention of --set-start
1337 and `binary' output format.
1341 * objcopy.c (copy_object): If the output file format is `binary',
1342 and the start address was not set using --set-start, default the
1343 start address to zero. This hack is because the `binary' output
1344 file format uses the start address to set the virtual address of
1345 the first byte in the file.
1346 * binutils.texi, objcopy.1: Add some notes on generating S-records
1349 * nm.c (print_symdef_entry): Call print_symname to print the
1350 symbol name, so that --demangle works.
1352 * Makefile.in (mostlyclean): Remove tmpdir.
1354 * objcopy.c (struct section_list): Add fields used, adjust, val.
1355 (adjust_start, set_start_set, set_start): New static variables.
1356 (adjust_section_vma, adjust_sections): New static variables.
1357 (copy_options): Add --adjust-start, --adjust-vma,
1358 --adjust-section-vma, --adjust-warnings, --no-adjust-warnings,
1360 (parse_vma): New static function.
1361 (copy_usage): Mention new options.
1362 (copy_object): Handle --set-start and --adjust-start.
1363 (setup_section): Correct type of last argument to PTR. Set used
1364 field if section is removed. Handle --adjust-vma and
1365 --adjust-section-vma.
1366 (copy_section): Correct type of last argument to PTR.
1367 (mark_symbols_used_in_relocations): Likewise.
1368 (strip_main): Clear used field when handling -R.
1369 (copy_main): Handle new options.
1370 * binutils.texi (objcopy): Document new options.
1371 * objcopy.1: Document new options.
1375 * configure.in (configdirs): Remove definition--testsuite is no
1377 * Makefile.in (testsuite): Remove target.
1378 (site.exp): New target.
1380 (clean, distclean): Don't recur into testsuite directory.
1384 * Makefile.in (VERSION): Updated to 2.5.
1385 * Version 2.5 released.
1389 * Makefile.in (sysdump.o): Depends upon sysroff.c.
1393 * nlmconv.c (link_inputs): Pass -Ur flag to ld so that the
1394 ctor/dtor tables needed by C++ programs are built.
1398 * Makefile.in (srconv.o): Add dependence on sysroff.c.
1402 * configure.in: Use ${config_shell} when running config.bfd.
1404 * Makefile.in (sysroff.h): Split target away from sysroff.c.
1405 (srconv.o, sysdump.o): New targets.
1406 (srconv, sysdump): Don't depend upon sysroff.c.
1410 * Makefile.in (arparse.c): Don't ignore errors from mv.
1411 (sysinfo.c): Likewise. Also, depend upon arparse.c, to prevent a
1412 parallel make from trying to build both arparse.c and sysinfo.c
1414 (nlmheader.c): Similar change.
1415 (arparse.h): Separate target from arparse.c, so that a parallel
1416 make does not try to build both at once. Depend upon arparse.c.
1417 (sysinfo.h): Similar change.
1419 * objdump.c (disassemble_data): Pass the reloc buffer to free, not
1420 the pointer used to loop over the relocs.
1424 * objdump.c (disassemble_data): Cast result of xmalloc.
1428 * objdump.c (sorted_syms, sorted_symcount): New global variables.
1429 (objdump_print_address): Use sorted_syms and sorted_symcount
1430 instead of syms and symcount.
1431 (disassemble_data): Don't bother to get the relocs before looping
1432 over the sections. Before filtering and sorting the symbol table,
1433 copy it into sorted_syms.
1437 * objdump.c (struct objdump_disasm_info): Add field require_sec.
1438 (objdump_print_address): If aux->require_sec, require that the
1439 symbol be in aux->sec even if HAS_RELOC is not set. If we can't
1440 find a smaller symbol in the right section, look for a larger one.
1441 (disassemble_data): Set aux.require_sec around the
1442 objdump_print_address call for the instruction address.
1446 * ar.c: Call xexit rather than exit.
1447 (output_filename, output_file, output_bfd): New static variables.
1448 (remove_output): New static function.
1449 (main): Call xatexit (remove_output). Call xexit rather than
1451 (extract_file): Set output_filename and output_file while output
1453 (write_archive): Likewise, but use output_bfd, not output_file.
1454 * arsup.c: Include libiberty.h. Call xexit rather than exit.
1455 * bucomm.c: Likewise.
1457 * objdump.c (disassemble_all): New global variable.
1458 (usage): Document --disassemble-all.
1459 (long_options): Add disassemble-all as a synonym for -D.
1460 (compare_symbols): Make pointers const.
1461 (compare_relocs): New static function.
1462 (disassemble_data): Rename disassemble to disassemble_fn to avoid
1463 shadowing. If dump_reloc_info, print relocs along with
1464 disassembly. Skip sections which are not SEC_CODE unless
1465 disassemble_all or only is set.
1466 (display_bfd): Don't call dump_relocs if disassemble is set.
1467 (main): Accept and handle -D.
1468 * binutils.texi: Document -D/--disassemble-all.
1469 * objdump.1: Likewise.
1473 * objdump.c (disassemble_data): Initialize prevline to 0. Make
1474 prev_function non const. Copy functionname into an malloc buffer
1475 when setting prev_function, instead of assuming that the string
1478 * nm.c: Include libiberty.h.
1479 (sort_by_size): New static variable.
1480 (long_options): Add --size-sort.
1481 (usage): Mention --size-sort.
1482 (numeric_forward): Make static. Change from void * to PTR.
1483 (numeric_reverse): Likewise.
1484 (non_numeric_forward, non_numeric_reverse): Likewise.
1485 (sorters): Change declaration from void * to PTR.
1486 (size_forward, sort_symbol_by_size): New static functions.
1487 (display_rel_file): Handle sort_by_size.
1488 (filter_symbols): If sort_by_size, discard absolute and undefined
1490 * binutils.texi (nm): Document --size-sort.
1491 * nm.1: Document --size-sort.
1495 * objcopy.c (copy_main): Initialize input_filename and
1496 output_filename to NULL.
1500 * Makefile.in (version.o): Depend upon Makefile, so that version.o
1501 gets rebuilt when make variable VERSION is changed.
1503 * objdump.c (dump_section_header): Print the SEC_NEVER_LOAD flag.
1507 * configure.in: Change i[34]86 to i[345]86.
1511 * ar.c (ranlib_touch): Don't update the archive map if there isn't
1516 * ar.c: Include libiberty.h.
1517 (inarch): Remove variable.
1518 (map_over_members): Make static. Add arch argument, and use it
1519 instead of inarch. Change all callers.
1520 (main): Treat --version as -v. Accept -t argument. Accept any
1521 number of archive arguments. Catch and use open_inarch return
1522 value, rather than using inarch.
1523 (open_inarch): Return newly opened BFD, rather than using inarch.
1524 (do_quick_append): Make archive_filename const.
1525 (write_archive): Add iarch argument, and use it instead of inarch.
1527 (delete_members, move_members, replace_members): Likewise.
1528 (ranlib_only): Don't exit on success. Catch and use open_inarch
1530 (ranlib_touch): New function.
1531 * arsup.h (map_over_members): Don't declare.
1532 (ar_end, ar_extract): Declare.
1533 (open_inarch): Change return value in declaration to bfd *.
1534 * arsup.c (map_over_list): Make static. Always pass two arguments
1535 to function. Add arch argument, and use it instead of inarch.
1537 (ar_directory_doer): Make static. Add ignored second argument.
1539 (ar_directory): Use open_inarch return value rather than inarch.
1540 (ar_addlib_doer): Make static.
1541 (ar_addlib): Use open_inarch return value rather than inarch.
1542 (ar_extract): Remove unused local variable abfd.
1546 Add support for removing named sections to objcopy and strip.
1547 * objcopy.c (struct section_list): Define.
1548 (remove_sections): New static variable.
1549 (strip_options, copy_options): Add remove-section.
1550 (copy_usage, strip_usage): Mention -R and --remove-section.
1551 (setup_section): If section is in remove_sections list, ignore it.
1552 (copy_section): Likewise.
1553 (strip_main, copy_main): Handle -R.
1554 * binutils.texi, objcopy.1, strip.1: Document new options.
1558 * nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value,
1559 so as not to conflict with the symvalue typedef in bfd.h.
1563 * nlmheader.y: Per current NetWare docs, accept a revision number
1564 of 0 and treat a revision number greater than 26 as 0.
1568 * objdump.c (objdump_print_address): Correct handling of end of
1569 symbols when looking for next symbol with a different value.
1573 * nm.c (numeric_forward): Treat undefined symbols as "less than"
1574 defined symbols with zero values. If numeric values are equal, or
1575 both symbols are undefined, sort alphabetically. Don't assume
1576 that the difference of two bfd_vma values will truncate to "int"
1577 and still have the same sign.
1578 (numeric_reverse): Call numeric_forward and negate the result.
1579 (print_symbol_info_bsd): For undefined symbols, print leading
1580 spaces equivalent to the width of a printed bfd_vma, rather than
1581 assuming that 8 will look right.
1585 * coffgrok.c (doit): Zero all fields of new structure.
1586 * srconv.c (sysroff_swap_*_out): Remove redundant trailing arg.
1587 * sysinfo.y: Generate sysroff_swap_*_out without requiring extra
1592 * nlmheader.y: Make "stack" and "stacksize" synonyms in the lexer
1593 rather than the parser.
1597 * config/mh-alphaosf, config/mh-apollo68v, config/mh-delta88:
1602 * objdump.c (slurp_dynamic_symtab): Try to get the dynamic symbols
1603 even if the bfd is not marked DYNAMIC. ELF executables are not
1604 marked DYNAMIC, but do have dynamic symbols.
1608 * coffgrok.c (do_where): Make data with no type 'int'.
1609 (do_define): Keep info on source file of a symbol.
1610 * coffgrok.h (coff_symbol): New field.
1611 * srconv.c (PROGRAM_VERSION): Now 1.3
1612 (wr_rl): Use external ref number for symbol.
1613 (wr_dus): Only keep one source file per debug unit.
1614 (wr_dln): Always emit line numbers for first source file,
1615 (wr_globals): Emit globals in the du of their owning source file.
1619 * nlmheader.y: Null terminate var_hdr->threadName.
1623 * Makefile.in (syslex.o, sysinfo.o): Permit C source files to be
1624 in $(srcdir), as they will be for FSF releases.
1628 * nlmconv.c (setup_sections): Preserve existing section flags when
1629 copying in flags from a new section.
1633 * objcopy.c: Include libiberty.h.
1634 (copy_file): If output_target is NULL, set it to the target of the
1639 * nlmconv.c (link_inputs): Fixed memory allocation bug.
1643 * configure.in: Change --with-targets to --enable-targets.
1647 * Makefile.in (sysinfo): Does not depend upon $(ADDL_LIBS).
1649 * nlmconv.c (powerpc_build_stubs): Don't generate the PowerPC
1650 NetWare custom header; no longer needed.
1651 (powerpc_mangle_relocs): Convert relocs against the uninitialized
1652 data section into relocs against the data section.
1654 * configure.in: Set nlmconv_defs to -DNLMCONV_cputype for all the
1655 netware targets. Write it into Makefile as NLMCONV_DEFS.
1656 * Makefile.in (nlmconv.o): Pass $(NLMCONV_DEFS) to $(CC).
1657 * nlmconv.c: Only compile code for specific CPU types if
1658 NLMCONV_cputype is defined.
1660 * nlmconv.c (main): Change uses of bfd_abs_section, etc., to use
1661 bfd_abs_section_ptr or bfd_is_abs_section, etc.
1662 (i386_mangle_relocs, alpha_mangle_relocs): Likewise.
1663 (powerpc_build_stubs): Likewise.
1664 * nm.c (filter_symbols, print_symbols): Likewise.
1665 * objcopy.c (filter_symbols): Likewise.
1666 (mark_symbols_used_in_relocations): Likewise.
1667 * objdump.c (remove_useless_symbols, dump_relocs): Likewise.
1668 * size.c (sysv_internal_printer): Likewise.
1672 * Makefile.in (MANPAGES): Remove $(DEMANGLER_PROG).
1673 (install): Install it explicitly, from build dir, not srcdir.
1677 * objdump.c: Don't include elf/internal.h.
1678 (bfd_elf_find_section): Don't declare.
1679 (read_section_stabs): No special handling for ELF. Always read
1684 * configure.in: Set UNDERSCORE in Makefile based on result of
1685 invoking config.bfd with a second argument of ``_''.
1686 * Makefile.in (underscore.c): Depend upon Makefile. Don't try to
1687 run $(CC) and $(NM), just use $(UNDERSCORE). Create via temporary
1689 (demangle.o): Remove target.
1690 ($(NM_PROG)): Don't depend upon demangle.o, and don't link against
1691 demangle.o. It's in libiberty anyhow.
1692 (cplus-dem.o): Don't depend upon demangle.o.
1693 * binutils.texi: Mention -n and --no-strip-underscores arguments
1698 * nm.c (long_options): Add --no-demangle to turn off --demangle,
1699 and --no-cplus for Linux compatibility.
1700 (usage): Mention --no-demangle.
1701 * binutils.texi: Document --no-demangle.
1705 * nm.c: HOST_64_BIT was renamed to BFD_HOST_64_BIT.
1707 * objcopy.c (copy_archive): Make the temporary directory in the
1708 same directory as the output BFD, since we may not have write
1709 permission on the current directory. Set the permissions of the
1710 new directory to 0700, not 0777.
1714 * configure.in: if this is an rs6000 (and we're not building for
1715 any other bfd targets) then build only nm (collect needs it on
1718 * Makefile.in: define TOOL_PROGS which the list of programes to
1719 install in $tooldir -- replaces a hard-coded list.
1723 * objdump.c (display_target_list): Remove unused local ok.
1727 * config/mh-alphaosf (CFLAGS): Don't specify both -g and -O;
1728 they're not compatible under native cc. Use -O1 instead.
1730 * Makefile.in (VERSION): Updated to cygnus-2.4.1.
1732 Changes from binutils-2.4 net release:
1734 * Makefile.in (MANPAGES): Use $(DEMANGLER_PROG).
1735 ($(DEMANGLER_PROG).1): Build from cxxfilt.man, using sed.
1736 * cxxfilt.man: Renamed from c++filt.1, replaced "c++filt" with
1737 magic token to be replaced by sed.
1741 * configure.bat: update for latest makefile.in
1745 * bucomm.c: Check ANSI_PROTOTYPES rather than __STDC__.
1749 * objcopy.c (copy_section): Set section size correctly if using
1754 * Makefile.in: Add rule for sysinfo.h
1758 * Makefile.in (SRCONV_PROG): Define.
1759 (PROGS): Use $(SRCONV_PROG) too.
1763 * Makefile.in (DISTSTUFF): Add sysinfo.c, syslex.c, in case
1764 someone configures with `targets=all'.
1765 (distclean): Remove y.*.
1766 (syslex.o): Depend on sysinfo.h.
1767 (sysinfo.c): Rename y.tab.h to sysinfo.h.
1768 (install-info): Don't try to install into $(infodir)/$(srcdir).
1769 * syslex.l: Include sysinfo.h, not y.tab.h.
1773 * syslex.l (yywrap): Define as function if not defined as a macro.
1775 * Makefile.in (objdump.o): Deleted special rule.
1776 * configure.in: Don't bother building ARCHDEFS variable for
1778 * objdump.c (ARCH_*): Deleted handling.
1779 (disassemble_data): Call `disassembler' from opcodes library.
1783 * Makefile.in (install): Correct handling of $(tooldir) and
1784 $(bindir) being on different devices.
1788 * sysdump.c (h8300, sh): Add declarations.
1792 * Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD.
1793 * coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c,
1794 sysroff.info: Major changes.
1798 * objdump.c (print_section_stabs): Indicate the stab header symbol
1799 more clearly, print numbers of unrecognized stab n_type values.
1803 * nlmconv.c (copy_sections): Copy arelent pointers, not arelents.
1807 * Makefile.in (distclean): Remove $(PROGS) and underscore.c.
1811 * nlmconv.c (setup_sections): Remove special handling of .reginfo
1813 (copy_sections): Likewise.
1814 (alpha_mangle_relocs): Use bfd_ecoff_get_gp_value rather than the
1815 special ECOFF .reginfo section.
1817 * objcopy.c (copy_object): Call bfd_copy_private_bfd_data after
1818 copying everything else, to let it fiddle with the file in its
1821 * objdump.c: Include libiberty.h.
1822 (display_target_list): If a format fails, just go on to the next
1823 one. Check return value of bfd_set_format.
1824 (display_info_table): Likewise. Don't increment loop variable in
1825 for loop test, since that skips the first element.
1826 (display_target_tables): Rewrite loop for clarity. Ensure that it
1827 always prints at least one element.
1829 * nlmconv.c (main): Use CyGnUsEx rather than CyGnUsSeCs for
1830 sections header. Rename from cygnus_sections to cygnus_ext.
1834 * objdump.c (_DUMMY_NAME_): Don't define.
1835 (display_target_list): Use tmpnam to get a file name rather than
1836 using _DUMMY_NAME_. Unlink it when done.
1837 (display_info_table): Likewise.
1839 * nlmconv.c (secsec): New static variable.
1840 (main): Create .nlmsections section in output BFD. Store
1841 information about it in sections header.
1842 (setup_sections): Allocate space in sections header.
1843 (copy_sections): Copy zero sized sections. Put information about
1844 each section in the sections header.
1848 * nlmconv.c (powerpc_build_stubs): Take new outbfd argument.
1849 Change caller. Create custom header for new PowerPC NetWare
1852 * Makefile.in (nlmheader.o, nlmconv.o): Update dependencies.
1853 * nlmconv.c: Include bfd.h and libiberty.h with "", not <>.
1854 * nlmheader.y: Include bfd.h with "", not <>.
1858 * objdump.c: Do an ifdef on __GO32__, not unix.
1862 Added -D (--dynamic) option to nm and -T (--dynamic-syms) and -R
1863 (--dynamic-reloc) arguments to objdump.
1864 * nm.c (dynamic): New static variable.
1865 (long_options): Added "dynamic".
1866 (usage): Mention -D and --dynamic.
1867 (main): Add D to getopt string. Handle -D by setting dynamic.
1868 (display_rel_file): If dynamic is non-zero, read dynamic symbols
1869 rather than normal symbols.
1870 * nm.1: Updated for -D (--dynamic) option.
1871 * objdump.c (dump_dynamic_symtab): New global variable.
1872 (dump_dynamic_reloc_info): New global variable.
1873 (dynsyms, dynsymcount): New global variables.
1874 (usage): Mention -R, -T, --dynamic-syms and --dynamic-reloc.
1875 (long_options): Added "dynamic-reloc" and "dynamic-syms".
1876 (slurp_symtab): If no symbols, return rather than exit.
1877 (slurp_dynamic_symtab): New function.
1878 (display_bfd): Handle dump_dynamic_symtab and
1879 dump_dynamic_reloc_info.
1880 (dump_symbols): Take new dynamic argument, indicating whether to
1881 display dynamic symbols.
1882 (dump_relocs): Move most printing into dump_reloc_set.
1883 (dump_dynamic_relocs): New function.
1884 (dump_reloc_set): New function, extracted from dump_relocs.
1885 (main): Add R and T to getopt string. Handle -T by setting
1886 dump_dynamic_symtab and -R by setting dump_dynamic_reloc_info.
1887 * objdump.1: Updated for -R (--dynamic-reloc) and -T
1888 (--dynamic-syms) options.
1889 * binutils.texi: Updated for new nm and objdump options.
1893 Update for recent BFD changes to symbol and reloc reading. Rename
1894 all uses of get_symtab_upper_bound to bfd_get_symtab_upper_bound.
1896 * coffgrok.c (symcount): Change to long.
1897 (do_sections_p1): Check for error return from
1898 bfd_get_reloc_upper_bound. Change relcount to long, and check for
1899 error from bfd_canonicalize_reloc.
1900 (coff_grok): Change storage to long. Check for error from
1901 bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
1902 * nlmconv.c (main): Change symcount, newsymalloc, newsymcount, and
1903 i to long. Check for error from bfd_get_symtab_upper_bound and
1904 bfd_canonicalize_symtab.
1905 (copy_sections): Change reloc_size and reloc_count to long. Check
1906 for error from bfd_get_reloc_upper_bound and
1907 bfd_canonicalize_reloc.
1908 (mangle_relocs, i386_mangle_relocs, alpha_mangle_relocs): Change
1909 reloc_count_ptr argument to long *. Make corresponding changes to
1910 variables loaded from *reloc_count_ptr.
1911 * nm.c (display_rel_file): Change storage and symcount to long.
1912 Check for errors from bfd_get_symtab_upper_bound and
1913 bfd_canonicalize_symtab.
1914 * objcopy.c (filter_symbols): Change symcount, src_count and
1916 (copy_object): Change symcount to long. Pass another argument to
1917 fprintf. Check for errors from bfd_get_symtab_upper_bound and
1918 bfd_canonicalize_symtab.
1919 (copy_section): Change relcount to long. Check for errors from
1920 bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
1921 (mark_symbols_used_in_relocations): Change relcount and i to long.
1922 Check for errors form bfd_get_reloc_upper_bound and
1923 bfd_canonicalize_reloc.
1924 * objdump.c (storage): Remove global variable.
1925 (symcount): Changed to long.
1926 (slurp_symtab): New local variable storage. Check for errors from
1927 bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
1928 (remove_useless_symbols): Change return value and count to long.
1929 (objdump_print_address): Change min, max, thisplace and i to long.
1930 (disassemble_data): Change i to long.
1931 (dump_symbols): Change count to long.
1932 (dump_relocs): Change relcount to long. Check for errors from
1933 bfd_ret_reloc_upper_bound and bfd_canonicalize_reloc.
1934 (display_info_table): Add casts when passing LONGEST_ARCH for
1939 * nm.c (display_archive): Close each archive element after it has
1941 * objdump.c (display_file): Likewise.
1945 * configure.in: Change error message to refer to bfd/config.bfd
1946 rather than bfd/configure.in.
1950 * More fixes for object formats which allow multiple sections
1952 * objcopy.c (setup_section): Make a new output section even if
1953 one already exists with the given name.
1954 (copy_section): Use isection->output_section rather than trying
1955 to look the output section up by its (possibly non-unique) name.
1957 * Makefile.in (install-info): Look for binutils.info in the
1958 current directory, then in $(srcdir). Don't use $<.
1962 * objdump.c (objdump_print_address): Make static. Declare with
1963 prototype. Change vardiff from int to bfd_signed_vma. Correct
1964 binary search termination condition. When looking for same
1965 section symbol in relocatable file, handle final symbol correctly.
1969 * Makefile.in: Avoid bug in hpux sed.
1971 * objcopy.c: Changes to keep it from stripping symbols used
1972 in output relocations.
1973 (mark_symbols_used_in_relocations): New function. Mark symbols
1974 used in output relocations with BSF_KEEP.
1975 (filter_symbols): Do not strip symbols marked with BSF_KEEP.
1976 (copy_object): Reorder actions. First setup sections, then
1977 build the output symbol table, then copy the section contents.
1981 * ar.c (write_archive): Allocate space for the null byte. From
1986 * Makefile.in: Built nm.new and strip.new to avoid problems with
1987 collect when . is in PATH.
1988 (STRIP_PROG): Change from strip to strip.new.
1989 (NM_PROG): Change from nm to nm.new.
1990 (install): Remove the .new when installing.
1994 * nlmconv.c (powerpc_build_stubs): Set BSF_DYNAMIC flag for each
1995 symbol for which we build a stub.
1996 (powerpc_mangle_relocs): Only reset TOC pointer for a call to a
1997 symbol with BSF_DYNAMIC flag set.
2001 * objcopy.c (filter_symbols): Use bfd_is_local_label to determine
2002 if a symbol represents a compiler-generated local label.
2003 (copy_object): Give the BFD backends a chance to copy any private
2004 bfd data from the input BFD to the output BFD.
2005 (setup_section): Give the BFD backends a chance to copy any private
2006 section data from the input section to the output section.
2010 * objcopy.c (mangle_section): Delete unused function.
2011 (setup_section): Set osection here instead of calling
2012 mangle section to do it.
2016 * ar.c (write_archive): Close inarch before unlinking it.
2020 * nlmconv.c (main): For PowerPC, call powerpc_build_stubs and
2021 powerpc_resolve_stubs. Use __GOT0, not __toc_start. Handle it if
2022 the start and end symbols are not in the text section.
2023 (struct powerpc_stub): New struct definition.
2024 (powerpc_stubs, powerpc_stub_insns): New static variables.
2025 (powerpc_initial_got_size): New static variable.
2026 (powerpc_build_stubs): New function.
2027 (powerpc_resolve_stubs): New function.
2028 (powerpc_mangle_relocs): Clear extraneous data in .got section.
2029 Rearrange reloc handling to handle ELF relocs that are not
2030 partial_inplace. Resolve PC relative relocs.
2034 * ar.c (move_members): Fix it so that the abi positional modifiers
2035 don't delete all archive members following the insert point.
2039 * coffgrok.[ch]: New files, understand coff objects.
2040 * coffdump.c: Uses coffgrok to dump out the debug info of a coff
2042 * sysroff.info: Description of a SYSROFF object file.
2043 * sysinfo.y, syslex.l: Parse info file, generate a reader, writer,
2044 header files and a printer.
2045 * srconv.c: Uses coffgrok.c and sysroff.info to convert a coff
2046 file to a SYSROFF file.
2050 * ar.c (do_quick_append): Pad with a genuine character 10,
2051 rather than whatever '\n' might happen to be.
2055 * nlmconv.c (main): Ignore debugging symbols when looking for
2056 special symbols by name.
2060 * nlmconv.c: Include libiberty.h.
2062 Support for PowerPC NetWare.
2063 * nlmconv.c (main): For PowerPC NetWare, automatically define the
2064 special symbols __toc_start.
2065 (select_output_format): Handle bfd_arch_powerpc.
2066 (mangle_relocs): Likewise.
2067 (powerpc_mangle_relocs): New function.
2071 * ar.c, bucomm.c, nlmconv.c, nm.c, objcopy.c, objdump.c,
2072 size.c: Use bfd_get_error and bfd_set_error and new error names.
2076 * objcopy.c (strip_main, copy_main): Add missing 'break' in switch.
2080 * objdump.c (disassemble_data): Handle bfd_arch_powerpc.
2084 * strings.c objdump.c nlmconv.c objcopy.c nm.c ar.c size.c (main):
2085 Call xmalloc_set_program_name.
2089 * objcopy.c (filter_bytes): Make MEMHUNK a char *, not PTR, so we
2090 can do arithmetic on it.
2094 * objdump.c (dump_section_stabs, read_section_stabs,
2095 print_section_stabs): Functions broken out of dump_stabs_1.
2096 Free the stabs and strings when done with them.
2100 * nlmconv.c (main): Use bfd_get_flavour instead of struct member.
2101 * ar.c (print_contents, extract_file), size.c
2102 (print_berkeley_format, print_sysv_format): Use bfd_get_filename and
2103 bfd_my_archive instead of dereferencing the structs directly.
2105 * ar.c: Use bfd_fatal and bfd_nonfatal instead of bfd_perror and exit.
2106 Indent. Remove DEFUNs.
2108 * nlmconv.c (main), objcopy.c (copy_file): Print matching formats
2110 * nm.c (display_file, display_archive), size.c (display_bfd):
2112 Print matching formats if there is an ambiguous match. Use
2113 bfd_nonfatal instead of hardcoded error message if nothing matches.
2115 * arsup.c, ar.c, objdump.c: Use bfd_get_filename instead of
2118 * nm.c (display_archive): New function, from code in display_file.
2119 (display_rel_file): Renamed from do_one_rel_file.
2122 (display_archive): New function from code in display_file.
2123 (display_file): Check bfd_close error return.
2125 * strings.c (strings_object_file): Check bfd_check_format
2128 * strings.c, objdump.c, size.c: Use bfd_nonfatal instead of bfd_perror.
2130 * bucomm.c: Delete references to exit_handler. It wasn't set
2131 anywhere, and now that we're using the libiberty xmalloc, it
2132 wouldn't always get called before exiting.
2133 (list_matching_formats): Function moved from objdump.c.
2134 * bucomm.h: Declare it.
2136 * objdump.c (disassemble_data): Move some variable decls closer to
2137 their use. Add some comments. Replace a nested block with a
2142 * objdump.c (display_target_list, display_info_table): Check that
2143 the bfd of the dummy output file is not null.
2147 * objcopy.c (filter_bytes): New function.
2148 (copy_section): Call it.
2149 (copy_options, copy_usage, copy_main): Add --byte option to
2150 activate it. Appropriate the -b option (which was an undocumented
2151 synonym for -F) for it, also. Add --interleave, -i option for
2153 (setup_section, copy_section, mangle_section): Renamed with no `s'
2155 * objcopy.1, binutils.texi: Document the new options.
2157 * objdump.c (display_target_tables, display_target_list):
2158 New functions broken out of display_info.
2159 Eliminate some magic constants. Use more meaningful variable names.
2160 (dump_bfd_header): New function broken out of display_bfd.
2161 (dump_section_header): New function broken out of dump_headers.
2162 (remove_useless_symbols): Don't shadow global variable name with
2164 (objdump_print_address): Fix backward test.
2168 * bucomm.c (print_arelt_descr): Change decl of `when' to time_t.
2169 * objdump.h: Removed.
2173 * objdump.c (display_file): Remove call to list_matching_formats.
2174 It would never be called.
2175 (list_matching_formats): Take an arg giving the list of matching
2177 (display_bfd): Pass the arg, and get it filled in by calling
2178 bfd_check_format_matches instead of bfd_check_format.
2179 (display_info, display_info_table): target_vector was renamed to
2182 * binutils.texi (objdump): Note some limitations of -h section
2187 * Makefile.in (MALLOC): Set to emptiness by default.
2188 (ALL_CFLAGS): Add and use.
2189 (arparse.h): Make it depend on arparse.y.
2190 * ar.c (libbfd.h): Don't require to be in ../bfd.
2191 * objdump.c (comp): Rename to compare_symbols.
2195 * objdump.c (list_matching_formats): If the file format is ambiguous,
2196 print the matching names so the user can choose one.
2197 (display_bfd): Call it.
2198 (display_file): Call it.
2202 * objdump.c (disassemble_data): Support bfd_arch_rs6000.
2206 * objdump.c (stab_name): Allocate dynamically.
2207 (stab_print): Use pointers to strings instead of char arrays.
2208 (dump_stabs): Change alloc and init of arrays appropriately.
2209 (dump_stabs_1): Always decide whether to print stab_name or
2210 the stab's type number, if unnamed.
2214 * objcopy.c (strip_main, copy_main): Don't clobber the input file
2217 * nlmconv.c (main): Warn about an attempt to use a shared library
2218 with uninitialized data.
2220 * nlmconv.c (setup_sections): Make sure that we align the
2221 output_offset of each input section appropriately.
2225 * objdump.c (dump_relocs): Don't crash if section name is NULL.
2229 * filemode.c (filemodestring): Commented out; not used.
2230 (mode_string): Use POSIX definitions.
2231 (ftypelet): Likewise.
2232 (rwx): Removed; no longer used.
2233 * bucomm.c: Include bucomm.h.
2234 (bfd_nonfatal, bfd_fatal): Argument is const.
2235 (fatal): Make __STDC__ version.
2236 * bucomm.h (mode_string): Declare.
2237 * Makefile.in (bucomm.o): Depend upon bucomm.h
2241 * bucomm.c (xmalloc, xrealloc): Deleted.
2242 * bucomm.h (xmalloc, xrealloc): Fix prototypes, to correspond to
2243 libiberty version of functions.
2247 * binutils.texi: Add a chapter summarizing the ways to select
2248 aspects of the target for each program.
2250 * objdump.c (long_options, usage): Add long equivalents for all
2251 remaining short options that lacked them.
2252 * binutils.texi objdump.1: Document them.
2254 * size.c (usage): Tweak usage message.
2255 * size.1: Add missing `=' in examples.
2257 * binutils.texi strip.1 objcopy.1 nlmconv.1 objcopy.c nlmconv.c:
2258 Use "--target=bfdname" as the option to select the BFD target,
2259 like nm and size already do.
2260 Reserve "--format=format" for textual output selection options, but
2261 for now keep old option names as obsolete for backward compatibility.
2263 * strings.c (main, strings_object_file, usage): Add --target option.
2264 * binutils.texi strings.1: Document it.
2268 * ar.c (main): Add \n in error message.
2273 * ar.c (main): Put parens around assignment used as truth value.
2274 * objcopy.c (strip_main): Remove unused variables. Return 0.
2275 (copy_main): Remove unused variables. Return 0.
2276 * objdump.c (display_bfd): Declare return value as void.
2277 (stab_print): Use "" instead of 0 to initialize array.
2278 (dump_stabs_1): Print vma using printf_vma.
2279 (display_info): Put parens around assignment used as truth value.
2280 * strings.c (print_strings): Cast printf arguments.
2282 * objcopy.c (copy_main): Use copy_options, not strip_options.
2284 * nlmheader.y (command): Warn about illegal date values.
2288 * bucomm.c bucomm.h: Run through indent. De-ansidecl-ify.
2289 (bfd_nonfatal): New function.
2290 (bfd_fatal): Call it.
2292 * objcopy.c (smart_rename): Do a copy if the dest file has
2293 multiple hard links. Remove source file on successful copy.
2294 Try to preserve mode and owner on successful rename.
2296 * objcopy.c: Run through indent. Clean up a bit.
2297 Make global variables static.
2298 Make {input,output}_{target,filename}, show_version local
2299 to various functions.
2300 New global variable `status' for exit status.
2301 (strip_main, copy_main): New functions with code from main.
2302 (nonfatal): New macro. Use it globally instead of bfd_perror and
2305 (copy_object): Call mangle_sections with bfd_map_over_sections.
2306 (mangle_sections): Adjust for new calling convention.
2310 * nlmheader.y (command): Accept MAP and FULLMAP without arguments.
2311 * nlmconv.c (main): Change error message for MAP and FULLMAP.
2315 * nlmconv.c (main): Warn about imported symbols that are not in
2316 the IMPORT list even if the IMPORT keyword is not used.
2318 * nlmconv.c (debug, unlink_on_exit): New static variables.
2319 (long_options): Add "debug" and "linker".
2320 (main): Handle -d and -l arguments. Make command line input and
2321 output files optional. Parse the command file before opening the
2322 BFD's, which requires storing more information in local variables.
2323 If INPUT names multiple files, link them together. Use OUTPUT for
2324 the output file name if not named on command line.
2325 (show_usage): Changed for new options.
2326 (link_inputs): New function to automatically invoke linker to
2327 handle multiple INPUT files.
2328 (choose_temp_base_try, choose_temp_base, pexecute): New functions,
2329 mostly copied from gcc/gcc.c.
2330 * nlmconv.h (input_files, output_file): Declare.
2331 * nlmheader.y (input_files, output_file): Define.
2332 (command): Support INPUT with a string_list argument. Support
2334 (string_list): Renamed from module_list.
2335 * Makefile.in (nlmconv.o): Define LD_NAME based on
2336 program_transform_name.
2340 * nlmheader.y (nlmheader_identify): New function. Use it to print
2341 the program name just once, instead of with every error message.
2345 * nlmconv.c (long_options): Changed --header-info to --header-file
2346 to match documentation and usage message.
2350 * objdump.c (dump_relocs): Avoid dereferencing a NULL sym_ptr_ptr
2355 * nlmconv.c (main): Change various types from bfd_size_type to
2356 size_t, since they have to be arguments to fread and fwrite.
2357 Change set from char * to unsigned char *.
2358 (select_output_format): Make mach argument unsigned. Handle
2360 (setup_sections): Don't copy the .reginfo section of an ECOFF
2361 file. Call bfd_set_reloc to initialize the relocation fields.
2362 (copy_sections): Don't copy the .reginfo section of an ECOFF file.
2363 Combine all relocs for a section.
2364 (mangle_relocs): Change type of relocs to permit specific
2365 functions to change it. Call alpha_mangle_relocs for alpha,
2366 default_mangle_relocs for other architectures.
2367 (default_mangle_relocs): New function. Adjust the address of all
2368 relocs by the output_offset.
2369 (i386_mangle_relocs): Change type of relocs argument. Cast length
2370 argument to memmove to size_t.
2371 (alpha_mangle_relocs): New function.
2375 * nlmconv.c (select_output_format): Use nlm32-sparc for
2380 * nlmconv.1: added man page
2381 * objcopy.1: fixed format errors
2385 * Makefile.in: Use CFLAGS as well as LDFLAGS when linking.
2389 * strings.1: Fix typo.
2393 * Makefile.in (DISTSTUFF): Build "info".
2394 (VERSION): Updated to cygnus-2.3.1; 2.3 has gone out.
2398 * objdump.c (dump_stabs): Handle stabs-in-som as implemented
2399 by the new BFD SOM assembler.
2403 * ar.1 c++filt.1 nm.1 objcopy.1 objdump.1 ranlib.1 size.1
2404 strings.1 strip.1: Replace \(em in NAME section with \- so
2405 makewhatis can grok it.
2409 * nlmconv.c (i386_mangle_relocs): Adjust reloc address by
2410 section output_offset.
2414 * binutils.texi: added nlmconv chapter
2418 * Makefile.in: Change RUNTESTFLAGS to RUNTEST_FLAGS
2422 * Makefile.in (distclean): Don't get rid of dvi or info files.
2426 * objcopy.c (S_ISLNK): Define as 0 if there's no S_IFLNK.
2430 * binutils.texi: Move objcopy docs into alphabetical order.
2432 * objdump.c: Use xmalloc instead of malloc.
2436 * objdump.c (info): Rename to formats_info.
2437 (dump_stabs_1): Better comments and formatting.
2441 * ar.c (main): Always create the archive when quick appending,
2442 even if no input files have been given.
2446 * nlmconv.c (main): Set sharedDebugRecordOffset and
2447 sharedDebugRecordCount fields in extended header.
2449 * nlmconv.c (main): Force moduleName field to upper case.
2453 * objcopy.c (main): Give a usage message if there are too many
2458 * Makefile.in (install-info): Rewrite to take advantage of VPATH,
2459 so FSF distributions (with info files in $(srcdir)) install
2461 (DISTSTUFF): Build nlmheader.c too.
2465 * ar.c (program_name): Don't define here.
2466 * objdump.c: Include "bucomm.h".
2467 (xmalloc): Don't declare here.
2468 (program_name): Don't define here.
2469 (program_version): Fixed type in declaration.
2470 * size.c: Include "bucomm.h".
2471 (program_name): Don't declare here.
2475 * objdump.c (fprintf): hide declaration in FPRINTF_ALREADY_DECLARED
2479 * nlmconv.c (i386_mangle_relocs): Resolve and remove PC relative
2480 relocs against defined symbols in the same section.
2484 * Makefile.in (binutils.dvi): use TEXIDIR to find texinfo.tex
2488 * objcopy.c (simple_copy, smart_rename): New functions.
2493 * Makefile.in (clean, distclean): Recurse into testsuite.
2497 * objcopy.c (setup_sections, copy_sections): If stripping, don't
2498 copy SEC_DEBUGGING sections.
2499 * objdump.c (dump_headers): Print SEC_DEBUGGING flag.
2501 * objdump.c (usage): Mention --stabs.
2503 * objcopy.c (copy_object): Copy all applicable file flags.
2504 (copy_file): Don't copy EXEC_P specially here.
2508 * nlmconv.c (main): Adjust data section size to correspond to bss
2509 alignment adjustment. Clear BSF_SECTION_SYM if symbol is moved to
2510 a different section. Use time_t for time variable.
2511 (setup_sections): Only put sections with contents in output NLM.
2512 (i386_mangle_relocs): No symbols are common at this point. Add
2513 casts to avoid warnings.
2517 * objdump.c: Made the --stabs option work for stabs-in-coff.
2518 (ELF_STAB_DISPLAY): Removed.
2519 (dump_elf_stabs): Renamed to dump_stabs, changed to run for
2520 any object file format.
2521 (dump_elf_stabs_1): Renamed to dump_stabs_1, added calls to
2522 generic BFD routines for non-ELF case, changed format of message
2523 for no-section-found case.
2524 (display_bfd): Always call dump_stabs if requested.
2525 (dump_data): Call bfd_section_size to get section size.
2529 * Makefile.in (install): Don't put strings in tooldir/bin.
2533 * nlmconv.c (total_bss_size): Removed.
2534 (main): Set the bss vma to always follow the data section. Move
2535 symbols into new sections, and adjust values by output_offset.
2536 (setup_sections): Don't copy all sections, but instead point all
2537 text sections to .text, all data sections to .data, and all bss
2539 (copy_sections): Adjust accordingly.
2543 Only build nlmconv if configured for a NetWare target.
2544 * configure.in: If we have some *-*-netware* target, or are using
2545 all targets, set BUILD_NLMCONV to $(NLMCONV_PROG) in Makefile.
2546 * Makefile.in (PROGS): Use $(BUILD_NLMCONV) rather than
2551 * objdump.c (ARCH_all): Define ARCH_hppa too.
2552 (dump_headers): Don't test for SEC_BALIGN if it's not defined by
2557 * nlmconv.c (main): Force creation of .bss section. Set up the
2558 sections before looking at the symbols. Move all common symbols
2559 into .bss section. Automatically define _edata and _end. Only
2560 export symbols in the export list, with multiple prefixes if
2561 necessary. Warn if no version. Always create extended header.
2562 Set date automatically if not already set.
2563 (setup_sections): Count size of bss sections.
2564 (mangle_relocs, i386_mangle_relocs): Accept section argument, and
2565 take reloc_count as a changeable pointer; changed callers.
2566 (i386_mangle_relocs): Remove PC relative relocs within a section,
2567 as they require no adjustment.
2568 * nlmheader.y: Fixed memory allocation throughout: token STRING is
2569 now allocated on the heap, and freed if not needed. Null
2570 terminated copyright message. Accept version with only two
2572 (symbol_list_opt): New nonterminal, either symbol_list or empty.
2573 (symbol_list): Use left recursion to avoid overflowing parser
2575 (yylex): Rearranged beginning of line check. Accept quoted
2576 strings using single quotes. End generic argument at comment
2577 character or parentheses.
2578 (string_list_append): Fixed.
2579 (string_list_append1): New function.
2581 * bucomm.h: The first argument to xrealloc is PTR, not char *.
2582 * bucomm.c (xrealloc): Use PTR rather than char *.
2583 * Makefile.in (objdump.o): Depend upon config.status to notice
2584 --with-targets changes.
2585 (nlmconv.o): Depend upon bucomm.h.
2589 * configure.in: Don't pass cpu to config.bfd.
2593 * Makefile.in ($(NM_PROG)): Depend on demangle.o.
2594 (demangle.o): New target.
2595 (cplus-dem.o): Depend on it, to force compilation order when doing
2598 * nm.c (print_symbol_info_{bsd,sysv,posix}): Take a bfd arg.
2599 (struct output_fns print_symbol_info): Ditto.
2600 (long_options, usage, main): Add -C --demangle option.
2601 (print_symname): New function, demangling if requested.
2602 (print_symbols, print_symbol_info_{bsd,sysv,posix}): Use it.
2606 * Makefile.in: Put CFLAGS last in compilation rules and omit from
2607 linking rules. Use ARCHDEFS to compile objdump.c.
2608 Update dependencies.
2609 * configure.in: Construct ARCHDEFS based on the BFD target makefile
2611 * objdump.c: Conditionalize calls to the print_insn_ARCH functions
2612 according to ARCHDEFS.
2616 * ar.c: Removed obsolete and non-functional GNU960 code.
2620 * size.c (berkeley_sum): New function.
2621 (bsssize, datasize, textsize): New global variables.
2622 (bss_section_name, data_section_name, text_section_name): Removed.
2623 (print_berkeley_format): Map berkeley_sum over all the sections,
2624 rather than only reporting sizes of specifically named sections.
2625 * Makefile.in ($(OBJDUMP_PROG)): Removed dependency on size.o.
2629 * nlmconv.c, nlmconv.h, nlmheader.y: New files for program to
2630 convert object files into NetWare Loadable Modules.
2631 * Makefile.in (NLMCONV_PROG): New macro, define to be nlmconv.
2632 (PROGS): Add NLMCONV_PROG.
2633 (nlmheader.c, nlmheader.o, nlmconv.o, $(NLMCONV_PROG)): New
2638 * Makefile.in: define MAKEOVERRIDES to an empty string
2642 * objcopy.c (copy_file): Make failures to process a file nonfatal.
2646 * nm.c: Add -B option, like --format=bsd.
2650 * objcopy.c (copy_file): If the file is neither an object nor an
2651 archive, give an error rather than returning success.
2655 * objdump.c (objdump_print_address): Prefer non-local symbols over
2656 local ones, and especially discriminate against debugging symbols.
2657 Also, for relocateable files, try to find a symbol in the current
2658 section, instead of picking one from some random section with a
2659 convenient value (read, section offset).
2660 (disassemble_data): Cast argument to malloc to size_t first.
2661 (dump_data): Likewise.
2662 (dump_relocs): If a single section name is specified, show relocs
2663 only for that section. Otherwise, silently omit sections without
2664 relocs. Format table nicely even if values are printed using 16
2665 digits instead of 8.
2669 * nm.c: Changes for final version of POSIX.2.
2670 (print_symbol_filename_{bsd,sysv,posix}): New functions.
2671 (formats): Add an element for a pointer to them.
2672 (print_symbols): Call it.
2673 (print_object_filename_posix, print_archive_member_posix): Produce
2674 output according to new POSIX.2 spec.
2676 * strings.c (print_strings): Handle STREAM being NULL.
2677 (strings_a_section): Pass a NULL.
2678 (main): Don't open /dev/null.
2682 * objdump.c (disassemble_data): Handle the m88k.
2683 (display_bfd): Use bfd_errmsg, rather than just claiming that the
2684 bfd is not an object file.
2688 * Makefile.in (TAGS): make work again by naming directories
2689 explicitly rather than depending on undefined macros.
2690 (INSTALL_XFORM): correct bad install target.
2694 * strings.c: Doc fixes.
2698 * Makefile.in: Note dependencies on bucomm.h.
2699 (cplus-dem.o): Link c++filt with version.o.
2701 * strings.c: Include bucomm.h and add prototypes to other decls.
2704 * bucomm.h: Declare xrealloc.
2706 * nm.c, objcopy.c, objdump.c, size.c, strings.c (main, usage): Add
2707 --help option. Put "GNU" in the version message.
2708 (usage): Take stream and exit status as args.
2709 (main): Pass new args to usage.
2713 * strings.c, strings.1: New files.
2714 * binutils.texi: Document strings.
2715 * Makefile.in: Add rules for it.
2719 * objdump.c: Use size-independent bfd elf section names.
2723 * objdump.c (objdump_print_address): Handle wide offsets by
2724 calling sprintf_vma.
2728 * objdump.c (syms2): Removed unused variable.
2729 * objdump.c (remove_useless_symbols): New function.
2730 * objdump.c (comp): Simplify.
2731 * objdump.c (dis-assemble_data): Make simpler and more
2732 efficient how we filter out useless symbols: Just filter
2733 BEFORE the sort (using remove_useless_symbols).
2734 * objdump.c (objdump_print_address): Simplify.
2735 Change output syntax to match gdb.
2739 * Makefile.in: canonicalize install.sh; for use within
2740 this directory (and subdirs)
2742 Mon Jun 14 12:13:22 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
2744 * Makefile.in (install, install-info): remove parentdir support,
2745 use INSTALL_XFORM; define INSTALL_XFORM
2749 * objcopy.c (copy_object): Fix bad size passed to xmalloc().
2753 * Makefile.in (INCLUDES): Add -I../bfd for sysdep.h and bfd.h.
2754 * configure.in: No longer need to configure to get sysdep.h.
2755 * objcopy.c (copy_object): Fix symbol table handling.
2759 * objcopy.c (filter_symbols): Cannot filter the symbols
2760 in place, because that confuses the relocs, so take separate
2761 parameter for output array.
2762 * objcopy.c (sympp): Make two variables: isympp and osympp.
2763 * objcopy.c (copy_object): Allocate separate array (osympp)
2764 for filtered symbols.
2766 Fri Jun 4 10:51:44 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2768 * Makefile.in: change recursion test to presence of a configured
2773 * Makefile.in (underscore.c): Hack the backquoted command so it
2774 doesn't cause Solaris make to bomb.
2778 * Makefile.in: added c++filt and objcopy to MANPAGES variable
2779 * .Sanitize: keep c++filt.1 and objcopy.1
2781 Thu Jun 3 00:32:52 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2783 * Makefile.in: rename LOADLIBES to EXTRALIBS
2787 * c++filt.1, objcopy.1: new man pages
2791 * Makefile.in (install): Also install ar and ranlib in
2792 $(tooldir)/bin; needed for building libgcc.a.
2793 * objdump.c (objdump_print_address): Fix the check
2794 "coincidental" label matches by dis-allowing undefined
2799 * biutils.texi: revised c++filt chapter
2803 * Makefile.in (FLAGS_TO_PASS): Pass down CC and CFLAGS.
2807 * objdump.c (slurp_symtab): Print warning for bad symbol table.
2808 (bfd_elf32_find_section, Elf32_Internal_Shdr): Updated
2809 declarations and uses.
2811 * Makefile.in (DISTSTUFF): Don't build binutils.mm.
2815 * nm.c: Add -f/--format, -P/--portability, -t/--radix options.
2816 Make global variables static.
2817 (main): Make -v like -n, not -V, and make -A like -o, for POSIX.2.
2818 (set_print_radix, set_output_format,
2819 print_{object_filename,archive_filename,archive_member,symbol_info}
2820 {bsd,sysv,posix}): New functions.
2821 (display_file, print_symbols): Call them.
2823 * ar.c: Improve error messages.
2825 * nm.c (main): Handle long options that just set a flag.
2827 * nm.c (main), ar.c (do_show_version), objcopy.c (main), size.c
2828 (main): Exit after printing the version number, per the GNU coding
2833 * README, Makefile.in: Minor updates for 2.2.
2837 * Makefile.in (underscore.c): Automatically generate
2838 (using nm) a file with the variable prepends_underscore.
2839 * Makefile.in (c++filt): Link underscore.o with cplus-dem.o
2840 so that initial underscores get removed iff appropriate.
2841 * binutils.texi: Preliminary documentation for c++filt.
2842 * Makefile.in, binutils.texi: Set to version 2.2.
2844 * NEWS: Mention copy->objcopy renaming and new c++filt program.
2848 * Makefile.in (cplus-dem.o, $(DEMANGLER_PROG)): Build the
2849 demangler via cplus-dem.o, rather than directly from the .c file.
2851 * objcopy.c: Renamed from copy.c, updated comments accordingly.
2852 * Makefile.in, binutils.texi: Renamed copy to objcopy.
2853 * is-strip.c, maybe-strip.c, not-strip.c: Updated comments for
2854 rename of copy to objcopy.
2858 * binutils.texi (strip, -v option): Fix typo.
2862 * Makefile.in (RUNTEST): Define.
2863 (FLAGS_TO_PASS): Pass down RUNTEST.
2867 * Makefile.in (DEMANGLER_PROG): Name it c++filt.
2868 (PROG): Also build and install COPY_PROG.
2872 * Makefile.in: Change definition of $(tooldir) to match FSF.
2876 * size.c (usage): Add missing options.
2877 (main): Clean up option parser.
2879 * objdump.c (usage): Add missing options.
2880 (display_file): Print program name before calling
2883 * nm.c (usage): Add missing options.
2884 (main): Clean up option parser.
2885 (display_file): Print program name before calling
2888 * copy.c (copy_usage, strip_usage): Add missing options.
2890 * ar.c (usage): New function.
2892 (open_inarch, do_quick_append): Print program name before calling
2897 * nm.c (main): Accept and ignore -A and -B for MIPS compatibility.
2901 * Makefile.in: Added FLAGS_TO_PASS so tests get run on freshly
2902 built binaries if they exist. (otherwise the path)
2906 * Makefile.in: Changed check target to use DejaGnu.
2910 * Makefile.in: Remove am29k-pinsn.c, i960-pinsn.c.
2911 objdump.c: a29k and i960 are `disassemble' not `print'.
2913 * objdump.c: Rename print_address to objdump_print_address
2914 and change parameters.
2915 (disassemble_data): Use objdump_print_address.
2919 * objdump.c (disassemble_data): print_insn_sparc is now a
2920 `disassemble' not a `print'.
2921 Makefile.in: Remove sparc-pinsn.c (now in libopcodes.a).
2923 * objdump.c (disassemble_data): Use new read_memory_func stuff.
2927 * objdump.c (fprintf): Declaration of variadic function had better
2928 be a prototype for ANSI C systems.
2930 Mon Mar 22 23:19:46 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
2932 * Makefile.in: rename test-install to install-check
2936 * objdump.c (disassemble_data): Add H8500.
2940 * objdump.c (usage): Mention long options.
2944 * nm.c: Modify behavior of -o flag for archives to match
2945 BSD4.4 and Sunos 4: Prefix archive name before each line.
2947 * m68k-pinsn.c: Removed. Subsumed by ../opcodes/m68k-dis.c.
2948 * i386-pinsn.c: Removed. Subsumed by ../opcodes/i386-dis.c.
2949 * Makefile.in: Adjust accordingly.
2950 * objdump.c: Support new-style disassemblers (ones that use
2951 the interface of ../include/dis-asm.h).
2955 * Makefile.in: When making tar file, remove texinfo/*,
2956 except for texinfo/texinfo.tex.
2957 * ardup.c: Add extern declaration of strdup.
2958 * Makefile.in (testsuite): Add 'else true' since otherwise
2959 Ultrix /bin/sh complains.
2963 * Makefile.in: Set VERSION to 2.1.
2964 * README, NEWS: Updates.
2965 * nm.c: Add -v as a synonym for -V.
2969 * configure.in: added testsuite to configdirs.
2970 * Makefile.in: added support for building testsuite.
2974 * objdump.c (disassemble_data): Print function names when
2975 given by bfd_find_nearest_line. If not - still print
2980 * binutils/testsuite: made modifications to testcases, etc., to allow
2981 them to work properly given the reorganization of deja-gnu and the
2982 relocation of the testcases from deja-gnu to a "tool" subdirectory.
2986 * objdump.c (dump_data): Free up section contents each time
2991 * binutils/testsuite: Initial creation of binutils/testsuite.
2992 Migrated dejagnu testcases and support files for testing nm to
2993 binutils/testsuite from deja-gnu. These files were moved "as is"
2994 with no modifications. This migration is part of a major overhaul
2995 of dejagnu. The modifications to these testcases, etc., which
2996 will allow them to work with the new version of dejagnu will be
2997 made in a future update.
3001 * Makefile.in (LIBIBERTY_SRC_DIR, LIBIBERTY_BIN_DIR): New macros.
3002 * Makefile.in (LIBIBERTY): Use LIBIBERTY_BIN_DIR.
3003 * Makefile.in (DEMANGLER_PROG): New program to build. Add macro
3005 * Makefile.in (PROGS): Add DEMANGLER_PROG.
3009 * copy.c, nm.c, objdump.c, size.c: Use new bfd_is_com_section
3010 macro rather than checking for equality to bfd_com_section.
3014 * objdump.c (disassemble_data): Fix code to find first useless
3019 * objdump.c (disassemble_data): Use mips_print_insn for MIPS.
3020 Don't core dump if bfd_find_nearest_line returns false.
3024 * objdump.c (disassemble_data): know how to disassemble z8000s
3029 * arsup.h (interactive), bucomm.h (program_name): Prefix
3030 with 'extern', to avoid warnings from some compilers.
3034 * arparse.y: fix unnecessary shift/reduce
3038 * Makefile.in: Make check depend on all.
3039 * Makefile.in (distclean): Remove sysdep.h.
3040 * size.c: Use %u format where appropriate.
3041 * objdump.c: Standardize: L_SET -> SEEK_SET.
3042 * objdump.c: Use new macro bfd_asymbol_bfd.
3043 * configure.in: Allow std-host as the default ${mys_host}.
3045 Thu Dec 17 19:38:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3047 * Makefile.in: added dvi target, define and use TEXI2DVI
3051 * Makefile.in (dist): Fix permissions before release.
3052 * size.c: Use bfd_size_type (and long) where appropriate.
3053 * ar.c: Make writing a map the default, to be compatible
3054 with SYSV and Posix.2. Remove some bogus kludges that
3055 handled __.SYMDEF directly.
3058 Mon Nov 9 13:36:53 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3060 * Makefile.in: flex no longer needs the -S flag
3062 Sat Nov 7 15:06:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3064 * ar.c (extract_file): utime needs a pointer to a utimbuf
3066 * Makefile.in: handle -I includes better, adding $(BASEDIR)/bfd to
3067 the list (since some of the bfd/hosts/*.h files include other
3068 files from that directory)
3072 * i960-pinsn.c (MEM_MAX, MEM_SIZ): Set upper bound properly.
3076 Clean up some old BFD ansification macros.
3078 * arsup.h, bucomm.h, objdump.h: Remove EXFUN from binutils.
3079 It still remains as a local macro in gmalloc.c, which is derived
3080 from some other copy of GNU Malloc somewhere (FIXME).
3082 * ar.c, objdump.c, size.c: Replace EXFUN with PROTO. Make static
3084 * arsup.h: Declare extract_files.
3088 * ar.c (extract_file): instead of checking USG: if POSIX_UTIME,
3089 use utime and utimbuf structure, otherwise if USE_UTIME use utime
3090 and array of two longs, otherwise use utimes.
3094 * binutils.tex: Document yesterday's changes to strip and copy.
3098 * copy.c: Re-do command-line parsing to use getopt_long().
3099 Add long option names. Re-think option letters to be more
3101 * copy.c: New function filter_symbols() for stripping only
3102 debug-symbols and/or local symbols. Use these to support
3103 the previously-missing options of the old FSF strip.
3107 * configure.in (host): Use ${srcdir}/../bfd/configure.host rather
3108 than repeating a copy of it here.
3112 * copy.c (main): Even if is_strip, accept -d argument indicating
3113 alternate output format. Needed by gdb for Nindy.
3115 * m68k-pinsn.c (print_insn_arg): Handle new "`" operand type.
3119 * binutils.texi: added documentation for "copy"
3121 Tue Oct 6 14:22:56 1992 Per Bothner (bothner at PersSony)
3123 * Makefile.in (*clean rules): Some cleaning up.
3124 * Makefile.in (dist): Make diststuff in gprof for a dist.
3126 * ar.c (do_show_version): New function.
3127 * ar.c (main): Fix so "ar -V" works.
3129 Thu Oct 1 22:44:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3131 * configure.in: now uses the cpu-vendor-os triple instead of
3136 * i960-pinsn.c: Change bzero to memset.
3137 * sparc-pinsn.c: Change index to strchr.
3141 * m68k-pinsn (print_insn_arg, fetch_arg): added support for
3142 operands to memory management instructions, from WRS.
3146 * Makefile.in (install): if $(tooldir) exists, install nm and
3147 strip in $(tooldir)/bin.
3151 * Makefile.in: Let's call it version 2.0.
3155 * Makefile.in: Bump to version 0.98.
3156 * TODO, README: Minor updates.
3158 * Makefile.in: Added mostlyclean, distclean rules,
3159 and cleaned up clean, realclean.
3163 * Makefile.in: map program names through program_transform_name
3168 * Makefile.in: Bump to versions 1.97.90.
3169 * cplus-dem.c: Removed. Was nowhere used - and if some
3170 programs are changed to to demangling should now use the
3171 versions in libiberty.
3175 * configure.in: add we32k
3179 * ar.c (map_over_members): if the element of the archive has a
3180 null name, fill it in.
3182 * nm.c (do_one_rel_file): only warn if a bfd's flags say there
3183 will be symbols and there aren't any.
3187 * m68k-pinsn.c: handle new operand type 'r', introduced for cas2.
3191 * nm.c objdump.c: Added support for a +version (-V)
3192 to print the version number.
3194 * ar.c, copy.c: Added support for a -V option to print
3199 * config/mh-apollo68v: removed -g from CC definition.
3201 * Makefile.in: always create installation directories.
3205 * m68k-pinsn.c: Minor fix in style of output (don't use
3206 range to indicate floating point control registers).
3210 * ar.c (main): Don't *always* set the verbose flag!
3214 * copy.c: When is_strip (because it is invoked as the strip
3215 program), follow traditional argv processing:
3216 'strip file1 file2' now strips file1 and file2, rather
3217 than stripping file1 (as input), leaving output in file2.
3221 * objdump.c (display_info, display_info_table): Call
3222 bfd_set_format() on dummy bfd before using it (twice).
3223 * ar.c: Make sure archive is created on command 'r'
3224 even when no elements are inserted. (Clean up and
3225 simplify some non-working related code.)
3229 * configure.in: hppa support doesn't assume hp OS (from sef).
3231 Sat Jul 18 14:35:22 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
3233 * configure.in: recognize hppa hosts (bsd & hpux), error messages
3234 to stderr, not stdout
3238 * ar.1, binutils.texi, i960-pinsn.c, nm.1, objdump.1, ranlib.1,
3239 size.1, sparc-pinsn.c, strip.1: removed rcsid's.
3243 * Makefile.dos: removed rcsid.
3247 * objdump.c (display_bfd): print state of BFD_IS_RELAXABLE too
3251 * Makefile.in: Add program_suffix (parallel to program_prefix)
3253 Thu Jun 25 04:52:45 1992 John Gilmore (gnu at cygnus.com)
3255 * nm.c (sorters): Lint. Remove excess whitespace.
3259 * nm.c (valueof macro): Add missing parentheses.
3260 (Their lack screwed up numeric_forward().)
3262 Sun Jun 14 10:33:27 1992 John Gilmore (gnu at cygnus.com)
3264 * objdump.c (dump_elf_stabs): Also dump .stab.index and
3265 .stab.excl sections.
3266 (dump_elf_stabs_1): Split out main body of old dump_elf_stabs.
3267 * objdump.1, binutils.texi: Document new sections dumped.
3269 Fri Jun 12 22:23:35 1992 John Gilmore (gnu at cygnus.com)
3271 * size.c, objdump.c, bucomm.c: Lint.
3273 Thu Jun 11 01:19:06 1992 John Gilmore (gnu at cygnus.com)
3275 * objdump.c (dump_elf_stabs): New feature: --stabs prints out a
3276 .stab section from an ELF file. Installed under #ifdef
3277 ELF_STAB_DISPLAY so it can be easily disabled, since it requires
3278 bfd-internals header files and such.
3279 * objdump.1, binutils.texi: Update for --stabs. Also fix
3280 objdump's doc to use -- rather than + for long options.
3281 (FIXME: Not yet fixed everywhere in binutils.texinfo.)
3285 * objdump.c(display_info), patches from
3291 * objdump.c: Add another enum->int cast, for the sake of
3292 old compilers (such as PCC).
3296 * arlex.l: Don't include <sysdep.h> (unneeded conflicts).
3297 Add declaration of strdup().
3301 * Makefile.in: Use srcdir instead of VPATH in ldgram/ldlex
3302 rules, since these are used when building a distribution.
3303 * Makefile.in (arlex.c): Don't re-direct output, since that
3304 leaves a bogus output files if it fails.
3306 * arlex.l: Make work with lex, for what it's worth.
3307 * Makefile.in: Better lex support.
3308 * Makefile.in (dist): Generate flex and bison outputs
3313 * Makefile.in: get BISON definition right.
3317 * sanity.sh: default TMPDIR to ".".
3321 * binutils.texi: add doc for ar command language.
3325 * arparse.y: make END call ar_end
3326 * arsup.c (ar_end): added, deletes temp file if archive session
3332 * Makefile.in: use bison & flex from ../ if they exist. Also,
3335 * sanity.sh: remove temporary directory when finished.
3339 * Makefile.in: Bump to version 1.97.
3340 * ar.c: Declare errno for machines that need it.
3344 * objdump.c (display_info): Handle error cases without coredump.
3345 Close the dummy temporary file we open in the loop.
3346 * Makefile.in (arsup.o): Add kludge to build with Sun Make.
3350 * Makefile.in: added test-install target.
3352 * sanity.sh: new file.
3354 * Makefile.in: use sanity test on make check.
3358 * Makefile.in: rework CFLAGS so that they can be passed on the
3359 command line to make. Remove MINUS_G. Default CFLAGS to -g.
3363 * arsup.c, arsup.h, arparse.y, arlex.l: support for archive
3368 * Makefile.in: added check target.
3372 * Makefile.in: added clean-info target.
3376 * Makefile.in: remove $(COPY_PROG) from PROGS. It shouldn't be
3377 installed. added tooldir and program_prefix.
3381 * Makefile.in, configure.in: removed traces of namesubdir,
3382 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
3383 copyrights to '92, changed some from Cygnus to FSF.
3385 Sun Feb 16 12:53:02 1992 Per Bothner (bothner at cygnus.com)
3387 * Makefile.in: Bump version to 1.96, and remove -beta
3388 suffix from distribution name.
3389 * m68k-pinsn.c: New macro COERCE_SIGNED_CHAR to extract
3390 the signed value of a character (even if chars are unsigned).
3391 * sparc-pinsn.c: Add new operand types.
3393 Thu Feb 6 12:14:19 1992 Steve Chamberlain (sac at rtl.cygnus.com)
3395 * objdump.c (disassemble_data): don't print a section's contents
3396 if it's not loadable (eg bss)
3398 Tue Jan 28 11:11:06 1992 Steve Chamberlain (sac at rtl.cygnus.com)
3400 * m68k-pinsn.c (print_insn_arg): fixed so that -ve branch
3401 displacements don't get printed as large +ve ones.
3403 Fri Jan 24 14:47:53 1992 Steve Chamberlain (sac at rtl.cygnus.com)
3405 * copy.c, nm.c, objdump.c, size.c : changed to use the
3409 Mon Dec 30 18:34:41 1991 Per Bothner (bothner at cygnus.com)
3411 * bucomm.c (print_arelt_descr): Tweek the output format
3412 so that 'ar tv' output follows Posix 1003.2/D11.
3413 Output is now also identical to Sun's (except __.SYMDEF).
3415 Mon Dec 30 06:09:53 1991 John Gilmore (gnu at cygnus.com)
3417 * Makefile.in: Make `make' output more readable.
3419 Wed Dec 18 15:04:45 1991 Per Bothner (bothner at cygnus.com)
3421 * Makefile.in: Bump to version 1.94.
3423 Wed Dec 11 16:48:09 1991 Steve Chamberlain (sac at cygnus.com)
3425 * ar.c: added "b" to fopens for dos
3426 * configdj.bat, makefile.dos new files from DJ
3428 Tue Dec 10 04:07:26 1991 K. Richard Pixley (rich at rtl.cygnus.com)
3430 * Makefile.in: infodir belongs in datadir.
3432 Sat Dec 7 17:09:37 1991 Steve Chamberlain (sac at rtl.cygnus.com)
3434 * bucomm.h: created to hold prototypes of bucomm.c
3435 * objdump.h: created to hold prototyes of objdump.c
3436 * am29k-pinsn.c: include objdump.h
3437 * ar.c: include bucomm.h, get ar.h from the right place and
3439 * bucomm.c: defunize bfd_fatal
3440 * copy.c: include bucomm.h, lint.
3441 * i960-pinsn.h: include bucomm.h
3442 * m68k-pinsn.h: lint
3443 * nm.c: include bucomm.h, lint
3445 * sparc-pinsn.c: include objdump.h
3449 Fri Dec 6 23:02:14 1991 K. Richard Pixley (rich at rtl.cygnus.com)
3451 * Makefile.in: added standards.text support. install using
3452 INSTALL_PROGRAM and INSTALL_DATA.
3454 * configure.in: configure now does all of it's work from objdir so
3455 make file existence tests against ${srcdir}.
3457 Thu Dec 5 22:46:22 1991 K. Richard Pixley (rich at rtl.cygnus.com)
3459 * Makefile.in: idestdir and ddestdir go away. Added copyrights
3460 and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
3461 and mandir now keyed off datadir by default.
3463 Wed Dec 4 22:42:03 1991 Per Bothner (bothner at cygnus.com)
3465 * Makefile.in: Bump to version 1.93.
3466 * Makefile.in: Add make-strip.o:maybe-strip.c dependency
3467 for make versions that provide half-baked VPATH-support (e.g. Sun's).
3468 * size.c: Improvements suggested by
3470 - Don't emit (Berkeley) headers if no files were found.
3471 - Return a non-zero return code on failure.
3473 Sat Nov 30 21:34:19 1991 Steve Chamberlain (sac at rtl.cygnus.com)
3475 Changes due to include file renaming:
3476 * am29k-pinsn.c: a29k-opcode.h -> opcode/a29k.h
3477 * sparc-pinsn.c: sparc-opcode.h -> opcode/sparc.h
3478 * m68k-pinsn.c: m68k-opcode.h -> opcode/m68k.h
3479 * nm.c: stab.gnu.h -> aout/stab_gnu.h
3481 Tue Nov 19 19:20:43 1991 Per Bothner (bothner at cygnus.com)
3483 * README: Mention MINIMIZE flag for bfd's make.
3485 Mon Nov 18 12:05:37 1991 Per Bothner (bothner at cygnus.com)
3487 * README: Various improvements.
3489 Sun Nov 17 23:40:59 1991 Per Bothner (bothner at cygnus.com)
3491 * Makefile.in: Bump to version 1.92.
3492 * version.c, Makefile.in: Get version string from Makefile.
3493 * copy.c, is-strip.c, not-strip.c, maybe-strip.c, Makefile.in:
3494 Make the same change that we earlier did for ar/ranlib:
3495 Generate two different binaries for strip and copy and use
3496 a global variable with different values to distinguish
3497 ostrip from copy. (-1 means to use argv[0] to decide,
3498 so you can get the old behavior, but it is no longer the default).
3499 * copy.c (copy_file): Set EXEC_P of output bfd if input is so.
3500 * copy.c (main): If is_strip==-1, compare last 5 chars
3501 of argv[0], not the whole path.
3502 * copy.c (main): Return 0, not 1.
3503 * copy.c (setup_sections): Fix due to change in bfd_make_section
3504 now failing if asked for a duplicate section.
3505 * strip.c, ostrip.c: Removed obsolete files.
3506 * ar.c, not-ranlib.c, maybe-ranlib.c:
3507 Change encoding of is_ranlib variable to be consistent
3508 with is_strip for strip.copy (i.e -1 to means use argv[0]).
3510 Thu Nov 14 20:11:02 1991 Per Bothner (bothner at cygnus.com)
3512 * version.c (program_version): Update to version 1.92.
3514 Tue Nov 12 16:17:53 1991 Per Bothner (bothner at cygnus.com)
3516 * ar.c (get_pos_bfd): Previous fix was missing a "break".
3518 Thu Nov 7 08:55:56 1991 Steve Chamberlain (sac at cygnus.com)
3520 * am29k-pinsn.c: Fixed bug in mtacc, dmac and fmac instruction
3521 encodings. (Thaks to David Wood)
3523 Sun Nov 3 14:50:23 1991 Per Bothner (bothner at cygnus.com)
3525 * Makefile.in ($(DIST_NAME).tar.Z), TODO: Various fixes.
3526 * ar.c (get_pos_bfd): Fix to handling of before/after
3527 positioning options.
3528 * bucomm.c (fatal): MISSING_VFPRINTF is no longer an issue,
3529 since libiberty contains vfprintf etc if otherwise missing.
3530 * m68k-pinsn.c (print_insn_arg): Support BB/BW/BL
3531 type operands, as used by branch instructions.
3532 * nm.c: Delegate printing of symbols to BFD,
3533 by using bfd_print_symbol to do the formatting.
3535 Mon Oct 28 11:20:47 1991 Steve Chamberlain (steve at cygnus.com)
3537 * ar.c (write_archive.c): added unlink before rename since some
3538 systems can't rename onto an existant file.
3540 Mon Oct 21 09:47:23 1991 Steve Chamberlain (steve at rtl.cygnus.com)
3542 * nm.c: now doesn't crash if a symbol with no section and no
3545 Thu Oct 17 15:25:50 1991 Per Bothner (bothner at cygnus.com)
3547 * Makefile.in, version.c: Bump to version 1.91.
3549 Wed Oct 16 11:45:36 1991 Per Bothner (bothner at cygnus.com)
3551 * Makefile.in, ar.c, bucomm.c, copy.c, cplus-dem.c, filemode.c,
3552 i960-pinsn.c, m68k-pinsn.c, nm.c, objdump.c, size.c, sparc-pinsn.c,
3553 * strip.c: Add or update Copyright notice.
3554 * TODO: Add note on 'nm -a'.
3555 * version.c: Update version number to 1.90.
3556 * Makefile.in: Fix making of documentation for dist.
3558 Tue Oct 15 00:17:17 1991 Per Bothner (bothner at cygnus.com)
3561 * Makefile.in: New kludgy rules for making a tarfile.
3562 * Makefile.in: Fix bindir path.
3564 Mon Oct 14 17:34:29 1991 Roland H. Pesch (pesch at cygnus.com)
3566 * Makefile.in: add targets binutils.mm, binutils.me
3568 Fri Oct 11 22:44:21 1991 John Gilmore (gnu at cygnus.com)
3570 * Makefile.in: Avoid Sun Make VPATH bugs by adding dependencies.
3572 Fri Oct 11 12:51:33 1991 Roland H. Pesch (pesch at cygnus.com)
3574 * Makefile.in: add target "binutils.ms"
3576 * binutils.texinfo: minor restructuring for texi2roff comfort.
3578 Fri Oct 11 04:12:28 1991 John Gilmore (gnu at cygnus.com)
3580 Restructure configuration scheme for bfd, binutils, ld.
3582 * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
3583 * configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
3584 Change some config names to match other dirs.
3585 * *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
3587 * Makefile.in: Use -I. to get sysdep.h.
3589 Wed Oct 9 22:42:56 1991 Per Bothner (bothner at cygnus.com)
3591 * nm.c (print_symbols): Handle NULL name field of symbol.
3592 * Makefile.in: Removed spurious comment.
3594 Tue Oct 8 16:55:03 1991 Roland H. Pesch (pesch at cygnus.com)
3596 * binutils.texinfo: minor typos, phrasing, formatting fixes.
3598 Tue Oct 8 15:13:20 1991 Per Bothner (bothner at cygnus.com)
3600 * configure.in: Get host file from ../bfd/config, not config.
3601 * config/*: Remove config directory and its files.
3603 Tue Oct 8 13:58:59 1991 Roland H. Pesch (pesch at cygnus.com)
3605 * Makefile.in: new targets binutils.dvi, binutils.info
3607 * binutils.texinfo: remove most remaining FIXME's, delete
3608 references to __.SYMDEF by name
3611 Tue Oct 8 10:23:44 1991 Steve Chamberlain (steve at cygnus.com)
3613 * objdump.c (print_address) Print addresses nicely.
3615 Mon Oct 7 11:31:05 1991 Per Bothner (bothner at cygnus.com)
3617 * ar.c, Makefile.in, new files {is,not,maybe}-ranlib.c:
3618 Make two different binaries for ar and ranlib, instead of
3619 distinguishing them at run time using argv[0].
3620 (Old behavior is still available if you "make ar_with_ranlib",
3621 but it is not the default.)
3622 * ranlib.sh (new): An alternative one-line
3623 shell implementation of ranlib.
3625 Fri Oct 4 21:49:44 1991 John Gilmore (gnu at cygnus.com)
3627 * objdump.c: Cope with renames of a few BFD types & enums.
3629 Fri Oct 4 19:08:09 1991 Roland H. Pesch (pesch at cygnus.com)
3631 * binutils.texinfo: add new file (rudimentary docn)
3633 Mon Sep 30 12:30:39 1991 Per Bothner (bothner at cygnus.com)
3635 * config/hmake-news: Add new file (for Sony NEWSOS3).
3636 * bucomm.c (fatal): Conditionally compile fatal() depending on
3637 MISSING_VFPRINTF, and don't confuse the issue with NO_VARARGS.
3638 * objdump.c (dump_headers): Trivial output format change.
3639 * objdump.c (display_info): Loop over integers, not enums,
3640 to appease old compilers.
3642 Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com)
3644 *objdump.c *nm.c *copy.c :hanged some types to work with 64 bit object files
3646 Thu May 16 16:06:55 1991 Steve Chamberlain (steve at cygint.cygnus.com)
3648 * objdump.c (print_address): Make disasembled output more
3649 consistent with gdb and as: Add 0x when printing hex.
3650 Don't print extra leading zeros.
3651 Attempt to not print "filename.o".
3652 * objdump.c: Add some enum-to-int casts to accomodate old compilers.
3655 Fri May 3 22:21:44 1991 John Gilmore (gnu at cygint.cygnus.com)
3657 * copy.c: Change =& constructs to = &, since they confuse older
3665 version-control: never