3 * objdump.c (remove_useless_symbols): Discard section symbols.
7 * readelf.c (read_leb128): Support 64bit host.
12 * readelf.c (debug_info): Add 'cu_offset' field.
13 (get+pointer_size_of_comp_unit): Rename to
14 'get_pointer_size_and_offset_of_comp_unit'. Add code to return
15 the offset of the comp_unit if requested.
16 (get_debug_info): Record comp_unit offsets as well.
17 (display_debug_lines): Call get_pointer_size_of_comp_unit.
18 (decode_location_expression): Add an extra parameter - the offset
19 of the current comp-unit. Use this when decoding the DW_OP_call2
20 and DW_OP_call4 operators.
21 (display_debug_loc): Call get_pointer_size_of_comp_unit, pass the
22 comp_unit offset on the decode_location_expression.
23 (read_and_display_attr_value): Pass the comp_unit offset on the
24 decode_location_expression.
25 (display_debug_frames): Pass 0 as the comp_unit offset to
26 decode_location_expression.
30 * readelf.c (last_pointer_size, warned_about_missing_comp_units):
31 New variables associated with obtaining the pointer size for a
33 (get_pointer_size_of_comp_unit): Add an extra parameter - the name
34 of the section requesting the pointer size. Use this name in
35 error messages. If there are not enough comp_units available
36 produce a warning message, but return the last known pointer size
37 so that section dumping can continue.
38 (get_debug_info): Reset the new variables.
39 (display_debug_lines): Add extra parameter to invocation of
40 get_pointer_size_of_comp_unit and remove error message when it
42 (display_debug_loc): Likewise.
46 * doc/binutils.texi: Document --strip-unneeded-symbol and
47 --strip-unneeded-symbols.
48 * objcopy.c (strip_unneeded_list): New.
49 (enum command_line_switch): Add OPTION_STRIP_UNNEEDED_SYMBOL
50 and OPTION_STRIP_UNNEEDED_SYMBOLS.
51 (copy_options): Add --strip-unneeded-symbol and
52 --strip-unneeded-symbols.
53 (copy_usage): Likewise.
54 (filter_symbols): Suppress copying of symbol if in strip_unneeded_list
55 and the symbol is not needed.
56 (copy_main): Handle OPTION_STRIP_UNNEEDED_SYMBOL and
57 OPTION_STRIP_UNNEEDED_SYMBOLS.
61 * readelf.c (get_machine_flags): Handle E_MIPS_MACH_9000.
65 * arlex.l: Fix formatting.
69 * doc/Makefile.am (config.texi): Emit a @set UPDATED command to
70 config.texi whose value is the current month and year.
71 * doc/Makefile.in: Rebuild.
72 * doc/binutils.texi: Set the document subtitle to be the value of
73 the Texinfo UPDATED variable (obtained from config.texi).
78 * doc/binutils.texi (def file format): New node.
79 (dlltool): Use the tool name as the @chapter name, like all the
80 other binutils. Use @file{.def} throughout for consistency.
84 * dlltool.c: Comment fix.
88 * doc/binutils.texi: Update copyright years.
92 * MAINTAINERS: Remove mention of config.if.
96 * Makefile.am: Change LOCALEDIR to $(datadir)/share.
97 * Makefile.in: Regenerate.
102 * stabs.c (stab_demangle_template): Call stab_demangle_count
103 rather than stab_demangle_get_count to get the length of a pointer
108 * defparse.y: Remove unnecessary commas from token list.
112 * doc/binutils.texi (nm): Update description of weak symbols.
116 * readelf.c (do_debug_ranges): New variable.
117 (usage): Document new switch: -wR or --debug-dump=Ranges.
118 (parse_args): Handle new switch. Replace switch statement for the
119 long options with a more compact table structure.
120 (process_section_headers): Allow the dumping of .debug_ranges
121 sections if so requested.
122 (debug_displays): Likewise.
123 (load_debug_range): New function: Grabs the contents of a
124 .debug_ranges section.
125 (free_debug_range): New function: Releases the grabbed
126 .debug_ranges section.
127 (decode_64bit_range): New function: Displays a 64-bit range in a
128 .debug_ranges section.
129 (decode_range): New function: Displays a 32-bit range in a
130 .debug_ranges section.
131 (read_and_display_attr_value): Record the value of DW_AT_low_pc
132 attributes. Use decode_ranges() to display a DW_AT_ranges
134 (display_debug_info): Use load_debug_range() and
136 (display_64bit_debug_ranges): New function. Displays the contents
137 of a 64-bit format .debug_ranges section.
138 (display_debug_ranges): New function: Displays the contents of a
139 32-bit .debug_ranges section.
141 (main): Move cmdline_dump_sects and num_cmdline_dump_sects into the
143 (process_object): Initialise the dump_sects array from the
144 cmdline_dump_sects array before processing each object file.
146 (streq, strneq): New macros. Use them to replace occurrences of
147 strcmp() and strncmp().
149 (debug_information): New structure array to replace
150 debug_line_pointer_sizes array.
151 (num_debug_info_entries): New variable to replace
152 num_debug_line_pointers.
153 (get_pointer_size_of_comp_unit): New function: Returns the pointer
154 size of a given compilation unit.
155 (get_debug_info): New function to replace
156 get_debug_line_pointer_sizes.
157 (display_debug_lines): Use the new functions.
158 (display_debug_loc): Likewise.
160 (disassemble_section): Change return type to int.
161 (display_debug_lines): Move local variables to their
163 (display_debug_section): Likewise. Also record the return value
164 of functions called and pass this back to the parent. Also only
165 warn about undumped sections when the user explicitly requested
168 (debug_apply_rela_addends): Allow relocations against STT_OBJECT
171 * NEWS: Mention the support for decoding .debug_ranges sections.
172 * doc/binutils.texi: Document the new command line switch to
177 * readelf.c (ia64_unw_aux_info, ia64_unw_table_entry): Rename from
178 unw_aux_info and unw_table_entry.
179 (find_symbol_for_address): Pass symtab and strtab info explicitly.
180 (dump_ia64_unwind): Rename unw_{aux_info,table_entry} with ia64_
182 (slurp_ia64_unwind_table): Likewise.
183 (ia64_process_unwind): Rename from old process_unwind.
184 (hppa_unw_aux_info): New.
185 (dump_hppa_unwind): New.
186 (slurp_hppa_unwind_table): New.
187 (hppa_process_unwind): New.
188 (process_unwind): Factor out common unwinding checks; dispatch to
189 unwind handler based on machine type.
193 * readelf.c (display_debug_lines): Fix typo in error message.
197 * readelf.c (get_note_type): Handle notes not in core files.
198 (process_note_sections): New function.
199 (process_corefile_contents): Rename to ...
200 (process_notes): ... this.
201 (process_object): Call process_notes, not
202 process_corefile_contents.
203 * doc/binutils.texi: Update readelf -n documentation.
207 * ar.c (extract_file): Set atime to mtime for ar xo.
211 * stabs.c (stab_demangle_v3_arglist): New static function, broken
212 out of stab_demangle_v3_argtypes.
213 (stab_demangle_v3_argtypes): Call it.
214 (stab_demangle_v3_arg): Handle DEMANGLE_COMPONENT_FUNCTION_TYPE.
215 If we find an unrecognized component, print out its number.
219 * readelf.c (slurp_ia64_unwind_table): Support relocations against
220 non-section symbols by adding in the symbol value.
225 * readelf.c (dynamic_strings_length): New global variable.
226 (VALID_DYNAMIC_NAME, GET_DYNAMIC_NAME): New macros for accessing
227 strings in the dynamic string table.
228 (process_section_headers): Initialise dynamic_strings_length.
229 (process_dynamic_section): Likewise.
230 (process_object): Reset dynamic_string_length when the buffer is freed.
231 (dynamic_sections_mips_val): Use the new macros.
232 (process_dynamic_section): Likewise.
233 (process_version_sections): Likewise.
234 (process_symbol_table): Likewise.
235 (process_syminfo): Likewise.
236 (process_mips_specific): Likewise.
237 (dump_relocations): Add a new parameter 'strtablen' and use this
238 to verify that string offset in a given reloc is valid. Print a
239 suitable error message otherwise.
240 (process_relocs): Pass the new argument to dump_relocations.
244 * dlltool.c: Include <assert.h>.
245 (PREFIX_ALIAS_BASE): Define.
246 (struct export): Add member import_name;
247 (def_exports): Set import_name.
248 (make_one_lib_file): Remove prefix alias code, use import_name
250 (gen_lib_file): Create and delete aliases.
254 * readelf.c (process_section_groups): Free symtab after use.
259 * strings.c (usage): Place radix values for -t option into the
262 * objcopy.c (add_redefine_syms_file): Change error messages to use
263 <filename>:<linenumber>: format for easier parsing by automatic
266 * srconv.c (show_usage): Fix spelling typo.
268 * windres.c (format_from_filename): Suggest the use of -J instead
269 of -I if the file type cannot be determined.
273 * strings.c: Include <sys/stat.h>.
277 * budemang.c (demangle): Fix thinko.
279 * budemang.c (demangle): Handle "@plt" suffix.
283 * nm.c (usage): Fix description of --special-syms switch.
287 * strings.c (statbuf): New typedef.
289 (strings_object_file): Avoid using get_file_size, instead do the
290 checks here, using file_stat.
291 * configure.in (HAVE_STAT64): New test.
292 * configure: Rebuilt.
293 * config.in: Rebuilt.
297 * readelf.c (decode_ARM_machine_flags): Support EABI version 4.
301 * objdump.c (dump_symbols): Fix thinko last change. Improve error
306 * nm.c: Add a new switch --special-syms which, if enabled, will
307 include the ARM Mapping symbols in nm's output.
308 (usage): Mention the switch.
309 (filter_symbols): Handle the switch.
310 * objdump.c: Add a similar switch.
311 (usage): Mention the switch.
312 (dump_symbols): Handle the switch.
313 * doc/binutils.texi: Document the new switches.
314 * NEWS: Mention the new switches.
318 * readelf.c (get_x86_64_section_type_name): New function.
319 (get_section_type_name): Use it.
323 * dlltool.c (make_one_lib_file): Revert 2004-09-02 and 2004-09-04
325 * doc/binutils.texi (dlltool): Revert 2004-09-06 patch.
329 * readelf.c (get_machine_flags): Don't fall through into m68k cpu
334 * readelf.c (get_arm_section_type_name): New function.
335 (get_section_type_name): Use it.
339 * nm.c: Reorder functions to eliminate most of the static function
344 * readelf.c (process_program_headers): Don't include .tbss in non-TLS
349 * Makefile.am: Run "make dep-am".
350 * Makefile.in: Regenerate.
351 * config.in: Regenerate.
352 * configure: Regenerate.
353 * doc/Makefile.in: Regenerate.
354 * po/binutils.pot: Regenerate.
358 * readelf.c (decode_location_expression): Sign extend value for
359 DW_OP_const1s, DW_OP_const2s, DW_OP_const4s, DW_OP_bra, DW_OP_skip.
364 * ar.c (replace_members): Do not use get_file_size as
365 ar_emul_append correctly handles missing files.
369 * configure: Regenerated with autconfig 2.13.
373 * doc/binutils.texi (dlltool): Update --add-underscore, --kill-at
378 * doc/binutils.texi (objdump): Document that the -x switch includes
379 the effect of the -p switch.
383 * dlltool.c (make_one_lib_file): Test if internal_name was
384 specified by user before using it.
389 * dlltool.c (make_one_lib_file): For IDATA6 take the name from
390 exp->internal_name if it is present.
394 * MAINTAINERS: Add self as co-maintainer of FR-V.
395 * readelf.c (get_machine_flags): Print FR-V cpu types.
399 * nm.c (show_synthetic): New var.
400 (long_options): Add "synthetic".
402 (display_rel_file): Handle show_synthetic.
406 * objdump.c (dump_bfd): Pass both symbol tables to
407 bfd_get_synthetic_symtab.
411 * objdump.c (dump_bfd): For relocatable objects, pass syms instead
412 of dynsyms to bfd_get_synthetic_symtab.
416 * readelf.c (debug_apply_rela_addends): New function, extracted from..
417 (display_debug_info): ..here.
418 (display_debug_frames): Call debug_apply_rela_addends. Don't do
419 DW_EH_PE_pcrel adjustment for ET_REL.
423 * readelf.c (dump_relocations): Fix typo when calculating
428 * dllwrap.c (deduce_name): Fix typos introduced when program_name
429 was renamed to prog_name.
433 * readelf.c (get_machine_flags <EM_SH>): Handle EF_SH2A and
439 * readelf.c (get_machine_flags <EM_SH)): Handle EF_SH4_NOFPU and
442 * readelf.c (get_machine_flags <EM_SH>): Print SH ISA name.
446 * objcopy.c (filter_symbols): Use bfd_coff_get_comdat_section
448 * objdump.c (dump_section_header): Likewise.
452 * nlmconv.c (main): Pass map_file argument to link_inputs.
453 (link_inputs): Use map_file argument if it is defined.
457 * dllwrap.c: Replace 'program_name' with 'prog_name' to avoid
458 conflicts with exported global defined in bucomm.h.
459 (deduce_name): Rename parameter 'program_name' to 'name' to avoid
460 shadowing the global defined in bucomm.h.
464 * dlltool.c (ext_prefix_alias): New global variable.
465 (make_one_lib_file): Add aliases with prefixes for external
466 and import definitions.
467 (usage): Document -p option.
468 (long_options): Add --ext-prefix-alias option.
470 * doc/binutils.texi: Document new switch.
471 * NEWS: Mention new switch.
475 * binutils/dlltool.c (asm_prefix): Add parameter: name.
476 No underscore for symbols beginning with ?.
477 (ASM_PREFIX): Add parameter: NAME.
478 (gen_exp_file): Use new parameter.
479 (make_label): Likewise.
480 (make_imp_label): Likewise.
481 (make_one_lib_file): Likewise.
485 * MAINTAINERS: Added myself to the list.
486 * readelf.c: Include "elf/crx.h".
487 (guess_is_rela): Handle EM_CRX.
488 (get_machine_name): Likewise.
489 (dump_relocations): Likewise.
493 * doc/binutils.texi (nm): Clarify weak symbol description.
497 * readelf.c (get_segment_type): Display "GNU_STACK", not just
498 "STACK", when a PT_GNU_STACK segment is encountered.
502 * objcopy.c (copy_section): Don't set _cooked_size.
506 * readelf.c (Elf32_Word): Delete.
507 (get_32bit_dynamic_section): Handle SGI ELF dynamic segment.
508 (get_64bit_dynamic_section): Likewise.
510 * readelf.c (get_32bit_dynamic_section): Stop at first DT_NULL entry.
511 (get_64bit_dynamic_section): Likewise.
513 * readelf.c (dynamic_nent): New variable.
514 (get_32bit_dynamic_section): Set it.
515 (get_64bit_dynamic_section): Here too.
516 (process_dynamic_section): Use it instead of dynamic_size.
517 (process_syminfo): Likewise.
519 * readelf.c (get_32bit_dynamic_section): Correct number of entries
520 translated from external to internal form.
521 (get_64bit_dynamic_section): Likewise.
525 * readelf.c (process_program_headers): When locating the dynamic
526 section use the section table if it is present.
527 (dynamic_segment): Renamed to dynamic_section.
528 Replace references to dynamic segment with references to dynamic
529 section, except where appropriate.
530 (dynamic_segment_mips_val): Rename to dynamic_section_mips_val.
531 (dynamic_segment_parisc_val): Rename to dynamic_section_parisc_val.
532 (dynamic_segment_ia64_val): Rename to dynamic_section_ia64_val.
533 (get_32bit_dynamic_segment): Rename to get_32bit_dynamic_section.
534 Remove tag counting code as it is no longer needed.
535 (get_64bit_dynamic_segment): Rename to get_64bit_dynamic_section.
536 Remove tag counting code as it is no longer needed.
537 (process_dynamic_segment): Rename to process_dynamic_section.
541 * objcopy.c (copy_section): Use bfd_get_section_size instead of
542 _raw_size or bfd_get_section_size_before_reloc. Don't set reloc_done.
543 (compare_section_lma): Likewise.
544 * addr2line.c (find_address_in_section): Likewise.
545 * coffgrok.c (do_sections_p1): Likewise.
546 * dlltool.c (scan_drectve_symbols): Likewise.
547 * nlmconv.c (main): Likewise.
548 (copy_sections): Likewise.
549 (powerpc_mangle_relocs): Likewise.
550 * objdump.c (disassemble_section): Likewise.
551 * prdbg.c (find_address_in_section): Likewise.
552 * size.c (berkeley_sum): Likewise.
553 * srconv.c (wr_ob): Likewise.
554 * strings.c (strings_a_section): Likewise.
558 * readelf.c (decode_ARM_machine_flags): Add EF_ARM_VFP_FLOAT.
562 * objcopy.c (setup_bfd_headers): New function.
563 (copy_object): Call setup_bfd_headers.
567 * readelf.c (display_debug_frames): Handle dwarf3 format CIE
572 * po/fr.po: Updated French translation.
576 * readelf.c (get_segment_type): Handle PT_GNU_RELRO.
580 * readelf.c (section_groups): New.
582 (section_headers_groups): New.
583 (process_section_groups): Populate group_count, section_groups
584 and section_headers_groups.
585 (process_unwind): Support section group.
586 (process_object): Always call process_section_groups. Free
587 section_groups and section_headers_groups.
591 * readelf.c (process_section_headers): Use %3lu on sh_info.
595 * ranlib.sh: Quote $1 argument in case it contains spaces.
599 * objcopy.c (copy_usage, strip_usage): Fix spelling.
603 * readelf.c (do_section_groups): New.
604 (options): Add --section-groups/-g.
605 (usage): Mention --section-groups/-g.
606 (parse_args): Support --section-groups/-g.
607 (get_group_flags): New.
608 (process_section_groups): New.
609 (process_object): Call process_section_groups.
613 * objdump.c (disassemble_section): Don't disassemble sections
614 without SEC_HAS_CONTENTS.
618 * objdump.c (synthsyms, synthcount): New variables.
619 (disassemble_data): Use dynsyms for stripped binaries or libraries.
620 Add synthetized symbols.
621 (dump_bfd): For disassemble, initialize dynsyms always and
622 also synthsyms. Free synthsyms and clear {sym,dynsym,synth}count
627 * strings.c (print_strings): Cast file_off to unsigned long in
633 * arsup.c (ar_save): Use smart_rename.
637 * readelf.c (display_debug_pubnames): Align offset and data
639 (read_and_display_attr_value): Add missing break;
640 (debug_displays): Enable the display of the .debug_pubtypes
645 * mpw-config.in, mpw-make.sed, mac-binutils.r: Remove MPW
646 support files, no longer used.
650 * readelf.c (decode_ARM_machine_flags): Add EABI v3.
654 * readelf.c (display_debug_frames): Don't crash for mismatched
655 DW_CFA_restore_state.
659 * Makefile.am: Run "make dep-am".
660 * Makefile.in: Regenerate.
661 * aclocal.m4: Regenerate.
662 * config.in: Regenerate.
663 * configure: Regenerate.
664 * po/binutils.pot: Regenerate.
668 * objdump.c (struct SFILE): Replace current pointer with pos
669 offset, rename size to alloc.
670 (objdump_sprintf): Avoid unnecessary copies in the common case
671 (disassemble_bytes): Keep sfile live throughout the
672 function. Adjust usage appropriately.
676 * MAINTAINERS: Update my mail address.
680 * deflex.l: Handle "PRIVATE" string.
681 * defparse.y (%token): Add PRIVATE.
682 (%type): Add opt_PRIVATE.
683 (expline): Pass opt_PRIVATE to def_exports.
684 (opt_PRIVATE): Handle PRIVATE token.
685 * dlltool.h (def_exports): Add 7th param for private flag to
687 * dlltool.c: Add PRIVATE to comment on EXPORTS syntax.
688 (struct export): Add 'private' field.
689 (def_exports): Set 'private' field of struct exports.
690 (scan_drectve_symbols): Adjust calls to def_exports.
691 (scan_filtered_symbols): Likewise.
692 (dump_def_info): Print 'private' field.
693 (gen_def_file): Likewise.
694 (gen_lib_file): Skip generation of lib object if private.
695 Delete tmp object files in same order as they were generated.
696 Don't delete non-existent private object files.
700 * ar.c (main): Support POSIX-compatible argument parsing.
704 * readelf.c (process_mips_specific): Print conflictsno as an
709 * dlltool.c (gen_exp_file): Always output names for forwarded symbols.
713 * objcopy.c (copy_section): Avoid warnings.
717 * ar.c (remove_output): Use bfd_cache_close.
718 * arsup.c (ar_end): Ditto.
722 * readelf.c (get_note_type): Match NT_AUXV.
726 * version.c (print_version): Update copyright year to 2004.
730 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
732 * aclocal.m4: Regenerate.
733 * configure: Regenerate.
737 * objcopy.c: Include elf-bfd.h.
738 (is_strip_section): Don't strip debugging sections if
740 (setup_section): If STRIP_NONDEBUG make SEC_ALLOC sections
741 ~(SEC_LOAD | SEC_HAS_CONTENTS) and on ELF targets also SHT_NOBITS.
743 * objcopy.c (copy_section): Free relpp if relcount == 0.
747 * stabs.c (parse_stab_argtypes): Handle g++ ABI version 3 names.
748 (stab_demangle_argtypes): Likewise.
749 (stab_demangle_v3_argtypes): New static function.
750 (stab_demangle_v3_arg): New static function.
754 * objcopy.c (copy_object): Make the function boolean, returning
756 (copy_archive): Handle the return value from copy_object.
757 (copy_file): Likewise.
761 * readelf.c (find_section): New function. Locates a named
763 (get_debug_line_pointer_sizes): New function: Initialises the
764 debug_line_pointer_sizes array.
765 (display_debug_lines): Call get_debug_line_pointer_sizes.
766 (display_debug_loc): Likewise.
767 (load_debug_loc): Use find_section.
768 (load_debug_str): Likewise.
769 (display_debug_info): Likewise.
770 (prescan_debug_info): Delete.
771 (debug_displays): Remove prescan field.
772 (process_section_contents): Do not perform prescans.
776 * objcopy.c (filter_bytes): Delete. Move code to..
777 (copy_section): ..here. Simplify size adjustment. Divide
778 section lma by interleave.
782 * po/ru.po: New file: Russian translation.
783 * configure.in (ALL_LINGUAS): Add ru
784 * configure: Regenerate.
786 For older changes see ChangeLog-0203
788 Copyright (C) 2004 Free Software Foundation, Inc.
790 Copying and distribution of this file, with or without modification,
791 are permitted in any medium without royalty provided the copyright
792 notice and this notice are preserved.
798 version-control: never