forked from Imagelibrary/binutils-gdb
Compare commits
1 Commits
users/palv
...
gdb_7_5-20
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
80190e782f |
40
.gitignore
vendored
40
.gitignore
vendored
@@ -1,40 +0,0 @@
|
||||
*.diff
|
||||
*.patch
|
||||
*.orig
|
||||
*.rej
|
||||
|
||||
*~
|
||||
*.a
|
||||
*.flt
|
||||
*.gdb
|
||||
*.gmo
|
||||
*.info
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.tmp
|
||||
|
||||
.deps
|
||||
.libs
|
||||
|
||||
autom4te.cache
|
||||
config.cache
|
||||
config.h
|
||||
config.intl
|
||||
config.log
|
||||
config.status
|
||||
libtool
|
||||
Makefile
|
||||
stamp-*
|
||||
POTFILES
|
||||
*-POTFILES
|
||||
*/po/Makefile.in
|
||||
|
||||
.gdbinit
|
||||
.gdb_history
|
||||
core
|
||||
|
||||
lost+found
|
||||
|
||||
*.log
|
||||
*.sum
|
||||
58
binutils/.gitignore
vendored
58
binutils/.gitignore
vendored
@@ -1,58 +0,0 @@
|
||||
/addr2line
|
||||
/ar
|
||||
/bin2c
|
||||
/coffdump
|
||||
/cxxfilt
|
||||
/dlltool
|
||||
/dllwrap
|
||||
/elfedit
|
||||
/nlmconv
|
||||
/nm-new
|
||||
/objcopy
|
||||
/objdump
|
||||
/ranlib
|
||||
/readelf
|
||||
/size
|
||||
/srconv
|
||||
/strings
|
||||
/strip-new
|
||||
/sysdump
|
||||
/sysinfo
|
||||
/windmc
|
||||
/windres
|
||||
|
||||
/arlex.c
|
||||
/arparse.c
|
||||
/arparse.h
|
||||
/deflex.c
|
||||
/defparse.c
|
||||
/defparse.h
|
||||
/mcparse.c
|
||||
/mcparse.h
|
||||
/nlmheader.c
|
||||
/nlmheader.h
|
||||
/rcparse.c
|
||||
/rcparse.h
|
||||
/sysinfo.c
|
||||
/sysinfo.h
|
||||
/syslex.c
|
||||
/sysroff.c
|
||||
/sysroff.h
|
||||
|
||||
/doc/addr2line.1
|
||||
/doc/ar.1
|
||||
/doc/c++filt.1
|
||||
/doc/cxxfilt.man
|
||||
/doc/dlltool.1
|
||||
/doc/elfedit.1
|
||||
/doc/nlmconv.1
|
||||
/doc/nm.1
|
||||
/doc/objcopy.1
|
||||
/doc/objdump.1
|
||||
/doc/ranlib.1
|
||||
/doc/readelf.1
|
||||
/doc/size.1
|
||||
/doc/strings.1
|
||||
/doc/strip.1
|
||||
/doc/windmc.1
|
||||
/doc/windres.1
|
||||
@@ -1,40 +0,0 @@
|
||||
Please keep the following tables alphabetical.
|
||||
|
||||
Organization Tag Organization Name
|
||||
---------------- -----------------
|
||||
csl CodeSourcery, LLC
|
||||
|
||||
This table lists branches created by particular organizations. Please
|
||||
include the branch name, and a description of the branch. The branch
|
||||
description should name the owner of the branch (i.e., the person to
|
||||
contact regarding the branch) and a description of the commit policy
|
||||
for the branch (e.g., "no commits without permission of X or Y").
|
||||
|
||||
Organization Branches Description
|
||||
--------------------- -----------
|
||||
binutils-csl-arm-2005q1-branch
|
||||
CodeSourcery toolchain release branches.
|
||||
Please do not commit to these branches without
|
||||
permission from a CodeSourcery developer.
|
||||
|
||||
binutils-csl-gxxpro-3_4-branch
|
||||
binutils-csl-2_17-branch
|
||||
CodeSourcery branded GNU Toolchain release branches.
|
||||
Please do not commit to this branch without
|
||||
permission from a CodeSourcery developer.
|
||||
|
||||
Release Branches
|
||||
----------------
|
||||
binutils-2_10-branch
|
||||
binutils-2_11-branch
|
||||
binutils-2_12-branch
|
||||
binutils-2_13-branch
|
||||
binutils-2_14-branch
|
||||
binutils-2_15-branch
|
||||
binutils-2_16-branch
|
||||
binutils-2_17-branch
|
||||
binutils-2_18-branch
|
||||
binutils-2_19-branch
|
||||
binutils-2_20-branch
|
||||
binutils-2_21-branch
|
||||
binutils-2_22-branch
|
||||
@@ -1,452 +0,0 @@
|
||||
2012-07-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* elfcomm.c (setup_archive): Extract index table and symbol table
|
||||
scanning code into...
|
||||
(process_archive_index_and_symbols): ... this function and add
|
||||
support for 64-bit index tables.
|
||||
* elfcomm.h (struct archive_info): Change type of index_num and
|
||||
index_array to elf_vma.
|
||||
Add 'uses_64bit_indicies' field.
|
||||
* readelf.c (process_archive): Fix support for 64-bit indicies.
|
||||
|
||||
2012-07-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (process_archive): Display member indicies when
|
||||
dumping index.
|
||||
|
||||
2012-07-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf.c: Include gdb-index.h.
|
||||
(display_gdb_index): Handle version 7.
|
||||
|
||||
2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* nm.c (filter_symbols): Simplify global symbol handling.
|
||||
|
||||
2012-06-29 Francois Gouget <fgouget@codeweavers.com>
|
||||
|
||||
PR binutils/14302
|
||||
* bucomm.c (print_arelt_descr): Correctly report the archive size
|
||||
field (for 'ar tv').
|
||||
* ar.c (print_contents): Use correct types for archive element
|
||||
sizes (for 'ar p').
|
||||
(extract_file): Likewise (for 'ar x').
|
||||
|
||||
2012-06-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* readelf.c (is_16bit_abs_reloc): Handle mn10200 reloc.
|
||||
|
||||
2012-06-12 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf-mode.el: Add final comment. Bump version.
|
||||
(dwarf-insert-substructure-button): Use string-to-number.
|
||||
(dwarf-browse): Fix autoload cookie.
|
||||
|
||||
2012-06-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value): Handle
|
||||
DW_FORM_GNU_ref_alt and DW_FORM_GNU_strp_alt.
|
||||
(display_debug_macro): Handle DW_MACRO_GNU_define_indirect_alt,
|
||||
DW_MACRO_GNU_undef_indirect_alt and
|
||||
DW_MACRO_GNU_transparent_include_alt.
|
||||
|
||||
2012-06-01 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* addr2line.c (translate_addresses): Truncate input addresses to
|
||||
arch_size bits. Avoid undefined shift. Print '?' for zero line.
|
||||
|
||||
2012-05-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (process_section_headers): Correct bug in previous
|
||||
delta - display full section type in wide mode.
|
||||
|
||||
2012-05-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (print_symbol): Display multibyte characters in symbol
|
||||
names.
|
||||
(process_section_headers): Use print_symbol.
|
||||
|
||||
2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2012-05-17 Daniel Richard G. <skunk@iskunk.org>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 14072
|
||||
* configure.in: Add check that sysdep.h has been included before
|
||||
any system header files.
|
||||
* configure: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* unwind-ia64.h: Include config.h.
|
||||
|
||||
2012-05-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* dwarf.c (process_debug_info): Display abbrev offset in hex.
|
||||
(display_debug_abbrev): Show offset of abbrev.
|
||||
|
||||
2012-05-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* dwarf.c (display_debug_ranges): Don't report more than one use
|
||||
of the same range set as an overlap.
|
||||
|
||||
2012-05-16 Daniel Richard G. <skunk@iskunk.org>
|
||||
|
||||
PR binutils/13558
|
||||
* Makefile.am (CFILES): Add syslex_wrap.c.
|
||||
(sysinfo): Depend upon syslex_wrap.o.
|
||||
(syslex_wrap.o): New rule.
|
||||
(syslex.o): Delete rule.
|
||||
* syslex_wrap.c: New file.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
|
||||
|
||||
* readelf.c (get_machine_name): Update m68hc12 entry.
|
||||
|
||||
2012-05-13 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* objdump.c (disassemble_bytes): Print addend as signed.
|
||||
(dump_reloc_set): Likewise.
|
||||
|
||||
2012-05-04 Sterling Augustine <saugustine@google.com>
|
||||
Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* doc/binutils.texi: Add --dwarf-check option.
|
||||
* dwarf.c (dwarf_check): New global flag.
|
||||
(fetch_indexed_string): New function.
|
||||
(fetch_indexed_value): New function.
|
||||
(get_FORM_name): Add DW_FORM_GNU_str_index and DW_FORM_GNU_addr_index.
|
||||
(decode_location_expression): Add DW_OP_GNU_addr_index.
|
||||
(read_and_display_attr_value): Add DW_FORM_GNU_str_index,
|
||||
DW_FORM_GNU_addr_index, DW_AT_GNU_addr_base, and DW_AT_GNU_ranges_base.
|
||||
(get_AT_name): Add new attributes for Fission.
|
||||
(process_debug_info): Load new debug sections for Fission.
|
||||
(load_debug_info): Check for .debug_info.dwo section.
|
||||
(display_loc_list, display_loc_list_dwo): New functions.
|
||||
(display_debug_loc): Move logic to above two functions.
|
||||
(display_debug_info): Choose abbrev section based on info section.
|
||||
(display_debug_types): Likewise.
|
||||
(display_trace_info): Likewise.
|
||||
(comp_addr_base): New function.
|
||||
(display_debug_addr): New function.
|
||||
(display_debug_str_offsets): New function.
|
||||
(display_debug_ranges): Allow missing range lists. Suppress
|
||||
diagnostics if dwarf_check not set.
|
||||
(debug_displays): Add column to select abbrev section.
|
||||
* dwarf.h (enum dwarf_section_display_enum): Add new debug sections
|
||||
for Fission.
|
||||
(struct dwarf_section): Add abbrev_sec field.
|
||||
(struct dwarf_section_display): New type.
|
||||
(debug_info): Add addr_base, ranges_base fields.
|
||||
(dwarf_check): New global variable.
|
||||
* objdump.c (usage): Add --dwarf-check option.
|
||||
(enum option_values): Add OPTION_DWARF_CHECK.
|
||||
(long_options): Add --dwarf-check.
|
||||
(main): Likewise.
|
||||
* readelf.c (OPTION_DWARF_CHECK): New macro.
|
||||
(options): Add --dwarf-check.
|
||||
(parse_args): Likewise.
|
||||
(process_section_headers): Use const_strneq instead of
|
||||
streq.
|
||||
|
||||
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/14088
|
||||
* readelf.c (dump_relocations): Always display addend as
|
||||
signed hex number.
|
||||
|
||||
2012-05-11 Daniel Richard G. <skunk@iskunk.org>
|
||||
|
||||
PR binutils/14028
|
||||
* configure.in: Invoke ACX_HEADER_STRING.
|
||||
* configure: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* sysdep.h: If STRINGS_WITH_STRING is defined then include both
|
||||
string.h and strings.h.
|
||||
|
||||
2012-05-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value): Don't look up tag from
|
||||
abbrev for DW_FORM_ref_addr.
|
||||
|
||||
2012-05-08 Sean Keys <skeys@ipdatasys.com>
|
||||
|
||||
* binutils/MAINTAINERS: Added my entry to the maintainers secion.
|
||||
|
||||
2012-05-08 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* doc/binutils.texi (objcopy): Add --strip-dwo, --extract-dwo options.
|
||||
(strip): Add --strip-dwo option.
|
||||
* objcopy.c (enum strip_action): Add STRIP_DWO, STRIP_NONDWO.
|
||||
(enum command_line_switch): Add OPTION_EXTRACT_DWO, OPTION_STRIP_DWO.
|
||||
(strip_options): Add --strip-dwo option.
|
||||
(copy_options): Add --extract-dwo, --strip-dwo options.
|
||||
(copy_usage): Likewise.
|
||||
(strip_usage): Add --strip-dwo option.
|
||||
(is_dwo_section): New function.
|
||||
(is_strip_section_1): Check for DWO sections.
|
||||
(copy_object): Check for --strip-dwo, --extract-dwo options.
|
||||
(copy_relocations_in_section): Discard relocations for DWO sections.
|
||||
Discard entire relocation section when no relocations.
|
||||
(strip_main): Add --strip-dwo option.
|
||||
(copy_main): Add --strip-dwo, --extract-dwo options.
|
||||
|
||||
2012-05-08 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* Makefile.am (check_DEJAGNU): Export LC_ALL=C in place of other
|
||||
LC and LANG environment vars.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2012-05-07 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf.c (get_TAG_name): Use get_DW_TAG_name.
|
||||
(get_FORM_name): Use get_DW_FORM_name.
|
||||
(get_AT_name): Use get_DW_AT_name.
|
||||
|
||||
2012-05-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* Makefile.am (check-DEJAGNU): Clear LC_COLLATE, LC_ALL and LANG.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2012-05-05 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* dlltool.c (make_one_lib_file): Use bfd_und_section_ptr.
|
||||
|
||||
2012-05-03 Sean Keys <skeys@ipdatasys.com>
|
||||
|
||||
* readelf.c: Add support for XGATE.
|
||||
|
||||
2012-05-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/vi.po: Updated Vietnamese translation.
|
||||
* po/it.po: New Italian translation.
|
||||
* configure.in (ALL_LINGUAS): Add it.
|
||||
* configure: Regenerate.
|
||||
|
||||
2012-05-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13121
|
||||
* rescoff.c: Rename 'finfo' to 'flaginfo' to avoid conflicts with
|
||||
AIX system headers.
|
||||
|
||||
2012-04-25 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* doc/binutils.texi: Add -D/--enable-deterministic-archives option
|
||||
to strip and objcopy.
|
||||
* objcopy.c (deterministic): New global variable.
|
||||
(strip_options): Add --enable-deterministic-archives.
|
||||
(copy_options): Likewise.
|
||||
(copy_usage): Likewise.
|
||||
(strip_usage): Likewise.
|
||||
(copy_archive): When stripping all, don't add archive map; set
|
||||
deterministic output when requested.
|
||||
(strip_main): Add -D/--enable-deterministic-archives option.
|
||||
(copy_main): Likewise.
|
||||
|
||||
2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/13947
|
||||
* objcopy.c (copy_object): Call copy_relocations_in_section
|
||||
before copy_section.
|
||||
(skip_section): New.
|
||||
(copy_relocations_in_section): Likewise.
|
||||
(copy_section): Use skip_section. Don't copy relocations here.
|
||||
|
||||
2012-04-11 Ryan Mansfield <rmansfield@qnx.com>
|
||||
|
||||
* objdump.c (dump_bfd): If defaulting to dwarf call
|
||||
dwarf_select_sections_all to enable displays.
|
||||
|
||||
2012-04-06 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* configure.in (AC_CHECK_HEADERS): Add locale.h.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2012-04-05 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* configure.in (AC_CHECK_FUNCS): Add setlocale.
|
||||
(AM_LC_MESSAGES): Add.
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2012-03-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13925
|
||||
* stabs.c (stab_demangle_v3_arglist): Cope with the demangler
|
||||
returning an empty context for a function with no arguments.
|
||||
|
||||
2012-03-28 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf.c (display_gdb_index): Handle index version 6.
|
||||
|
||||
2012-03-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (is_16bit_abs_reloc): Add detection of R_MN10300_16.
|
||||
|
||||
2012-02-29 Jeff Law <law@redhat.com>
|
||||
|
||||
* doc/binutils.texi (c++filt): Fix typos.
|
||||
|
||||
2012-02-24 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
PR binutils/13710
|
||||
* defparse.y (keyword_as_name): Disable LIBRARY
|
||||
keyword.
|
||||
* doc/binutils.texi: Document LIBRARY exception.
|
||||
|
||||
2012-02-21 Kai Tietz<ktietz@redhat.com>
|
||||
|
||||
PR binutils/13682
|
||||
* NEWS: Mention new feature.
|
||||
* dlltool.c (i386_x64_dljtab): New stub-code for x64
|
||||
delayed-load feature.
|
||||
(i386_x64_trampoline): New trampoline-code for x64
|
||||
delayed-load feature.
|
||||
(make_one_lib_file): Add support for x64 delayed-load
|
||||
feature.
|
||||
(make_delay_head): Likewis
|
||||
|
||||
2012-02-20 Namhyung Kim <namhyung.kim@lge.com>
|
||||
|
||||
* objdump.c (slurp_file): Close file if fstat fails.
|
||||
|
||||
2012-02-14 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* dwarf.c (dwarf_vmatoa64): New function.
|
||||
(read_and_display_attr_value): Print 8-byte forms as single hex
|
||||
numbers.
|
||||
(process_debug_info): Print type signatures as single hex numbers.
|
||||
* elfcomm.c (byte_get_64): New function.
|
||||
* elfcomm.h (byte_get_64): New function.
|
||||
|
||||
2012-02-11 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
PR binutils/13657
|
||||
* defparse.y (%union): New type id_const.
|
||||
(opt_name2): New rule.
|
||||
(keyword_as_name): New rule.
|
||||
(opt_name): Adjust rule.
|
||||
(opt_import_name): Likewise.
|
||||
(opt_equal_name): Likewise.
|
||||
|
||||
2012-02-11 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
PR binutils/13297
|
||||
* resrc.c (write_rc_dialog_control): Omit text dump for
|
||||
EDITTEXT, COMBOBOX, LISTBOX, and SCROLLBAR.
|
||||
|
||||
2012-02-09 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* sysdep.h: Include sys/stat.h here.
|
||||
* ar.c: Don't include headers already included by sysdep.h.
|
||||
* bucomm.c: Likewise.
|
||||
* budbg.h: Likewise.
|
||||
* dlltool.h: Likewise.
|
||||
* elfedit.c: Likewise.
|
||||
* nlmconv.c: Likewise.
|
||||
* objcopy.c: Likewise.
|
||||
* objdump.c: Likewise.
|
||||
* objdump.h: Likewise.
|
||||
* readelf.c: Likewise.
|
||||
* rename.c: Likewise.
|
||||
* resrc.c: Likewise.
|
||||
* strings.c: Likewise.
|
||||
* windres.c: Likewise.
|
||||
* od-macho.c: Ensure #include sysdep.h is first.
|
||||
* od-xcoff.c: Likewise.
|
||||
* dllwrap.c: Remove alloca pragma handled by sysdep.h, and
|
||||
remove duplicate headers.
|
||||
* dlltool.c: Likewise and ensure #include sysdep.h is first.
|
||||
|
||||
2012-02-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13493
|
||||
* ar.c (ranlib_main): Process --plugin option.
|
||||
* doc/binutils.texi: Document --plugin support for ranlib.
|
||||
|
||||
2012-02-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13482
|
||||
* readelf.c (process_corefile_note_segment): Fix off-by-one errors
|
||||
verifying the contents of a note.
|
||||
|
||||
2012-01-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13622
|
||||
* readelf.c (process_section_groups): If there are no section
|
||||
headers do not scan for section groups.
|
||||
(process_note_sections): Likewise for note sections.
|
||||
|
||||
2012-01-20 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c (OPT_SEG_SPLIT_INFO): New macro.
|
||||
(options): Add an entry for seg_split_info.
|
||||
(mach_o_help): Document it.
|
||||
(dump_segment_split_info): New function.
|
||||
(dump_load_command): Handle seg_split_info.
|
||||
|
||||
2012-01-19 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* dwarf.c (process_extended_line_op): Add a cast to silent a
|
||||
warning.
|
||||
|
||||
2012-01-19 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* dwarf.c (process_extended_line_op): Reindent define_file output.
|
||||
Detect define_file opcode length mismatch.
|
||||
(display_debug_lines_decoded): Add an entry in file_table for each
|
||||
define_file opcode.
|
||||
Ignore DW_LNE_set_discriminator and DW_LNE_HP_set_sequence.
|
||||
Display extended opcode for unhandle opcode.
|
||||
|
||||
2012-01-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* version.c (print_version): Update copyright message year.
|
||||
|
||||
2012-01-16 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/13593
|
||||
* nm.c (OPTION_SIZE_SORT): Define.
|
||||
(long_options): Don't set no_sort, sort_numerically or
|
||||
sort_by_size directly.
|
||||
(main): Instead set the flags here, making them mutually exclusive.
|
||||
|
||||
2012-01-10 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* objdump.c (display_object_bfd): Renamed from ...
|
||||
(display_bfd): ... this.
|
||||
(display_any_bfd): New function.
|
||||
(display_file): Split. Handle nested archives.
|
||||
|
||||
2012-01-09 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* configure.in: Use AM_ZLIB.
|
||||
* configure: Regenerated.
|
||||
|
||||
2012-01-06 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ru.po: Updated Russian translation.
|
||||
|
||||
2012-01-04 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c (dump_load_command): Handle fvmlib.
|
||||
|
||||
2012-01-04 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c: Update copyright year.
|
||||
(dump_load_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
|
||||
|
||||
For older changes see ChangeLog-2011
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,793 +0,0 @@
|
||||
2004-12-31 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (remove_useless_symbols): Discard section symbols.
|
||||
|
||||
2004-12-27 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (read_leb128): Support 64bit host.
|
||||
|
||||
2004-12-23 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/616
|
||||
* readelf.c (debug_info): Add 'cu_offset' field.
|
||||
(get+pointer_size_of_comp_unit): Rename to
|
||||
'get_pointer_size_and_offset_of_comp_unit'. Add code to return
|
||||
the offset of the comp_unit if requested.
|
||||
(get_debug_info): Record comp_unit offsets as well.
|
||||
(display_debug_lines): Call get_pointer_size_of_comp_unit.
|
||||
(decode_location_expression): Add an extra parameter - the offset
|
||||
of the current comp-unit. Use this when decoding the DW_OP_call2
|
||||
and DW_OP_call4 operators.
|
||||
(display_debug_loc): Call get_pointer_size_of_comp_unit, pass the
|
||||
comp_unit offset on the decode_location_expression.
|
||||
(read_and_display_attr_value): Pass the comp_unit offset on the
|
||||
decode_location_expression.
|
||||
(display_debug_frames): Pass 0 as the comp_unit offset to
|
||||
decode_location_expression.
|
||||
|
||||
2004-12-22 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (last_pointer_size, warned_about_missing_comp_units):
|
||||
New variables associated with obtaining the pointer size for a
|
||||
comp_unit.
|
||||
(get_pointer_size_of_comp_unit): Add an extra parameter - the name
|
||||
of the section requesting the pointer size. Use this name in
|
||||
error messages. If there are not enough comp_units available
|
||||
produce a warning message, but return the last known pointer size
|
||||
so that section dumping can continue.
|
||||
(get_debug_info): Reset the new variables.
|
||||
(display_debug_lines): Add extra parameter to invocation of
|
||||
get_pointer_size_of_comp_unit and remove error message when it
|
||||
returns 0.
|
||||
(display_debug_loc): Likewise.
|
||||
|
||||
2004-12-15 Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
* doc/binutils.texi: Document --strip-unneeded-symbol and
|
||||
--strip-unneeded-symbols.
|
||||
* objcopy.c (strip_unneeded_list): New.
|
||||
(enum command_line_switch): Add OPTION_STRIP_UNNEEDED_SYMBOL
|
||||
and OPTION_STRIP_UNNEEDED_SYMBOLS.
|
||||
(copy_options): Add --strip-unneeded-symbol and
|
||||
--strip-unneeded-symbols.
|
||||
(copy_usage): Likewise.
|
||||
(filter_symbols): Suppress copying of symbol if in strip_unneeded_list
|
||||
and the symbol is not needed.
|
||||
(copy_main): Handle OPTION_STRIP_UNNEEDED_SYMBOL and
|
||||
OPTION_STRIP_UNNEEDED_SYMBOLS.
|
||||
|
||||
2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Handle E_MIPS_MACH_9000.
|
||||
|
||||
2004-12-08 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* arlex.l: Fix formatting.
|
||||
|
||||
2004-12-08 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* doc/Makefile.am (config.texi): Emit a @set UPDATED command to
|
||||
config.texi whose value is the current month and year.
|
||||
* doc/Makefile.in: Rebuild.
|
||||
* doc/binutils.texi: Set the document subtitle to be the value of
|
||||
the Texinfo UPDATED variable (obtained from config.texi).
|
||||
|
||||
2004-12-07 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
PR binutils/249
|
||||
* doc/binutils.texi (def file format): New node.
|
||||
(dlltool): Use the tool name as the @chapter name, like all the
|
||||
other binutils. Use @file{.def} throughout for consistency.
|
||||
|
||||
2004-12-06 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* dlltool.c: Comment fix.
|
||||
|
||||
2004-12-06 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* doc/binutils.texi: Update copyright years.
|
||||
|
||||
2004-12-03 Richard Sandiford <rsandifo@redhat.com>
|
||||
|
||||
* MAINTAINERS: Remove mention of config.if.
|
||||
|
||||
2004-11-30 Tero Niemela <tero_niemela@yahoo.com>
|
||||
|
||||
* Makefile.am: Change LOCALEDIR to $(datadir)/share.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2004-11-10 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
PR binutils/536
|
||||
* stabs.c (stab_demangle_template): Call stab_demangle_count
|
||||
rather than stab_demangle_get_count to get the length of a pointer
|
||||
target.
|
||||
|
||||
2004-11-10 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* defparse.y: Remove unnecessary commas from token list.
|
||||
|
||||
2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* doc/binutils.texi (nm): Update description of weak symbols.
|
||||
|
||||
2004-11-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (do_debug_ranges): New variable.
|
||||
(usage): Document new switch: -wR or --debug-dump=Ranges.
|
||||
(parse_args): Handle new switch. Replace switch statement for the
|
||||
long options with a more compact table structure.
|
||||
(process_section_headers): Allow the dumping of .debug_ranges
|
||||
sections if so requested.
|
||||
(debug_displays): Likewise.
|
||||
(load_debug_range): New function: Grabs the contents of a
|
||||
.debug_ranges section.
|
||||
(free_debug_range): New function: Releases the grabbed
|
||||
.debug_ranges section.
|
||||
(decode_64bit_range): New function: Displays a 64-bit range in a
|
||||
.debug_ranges section.
|
||||
(decode_range): New function: Displays a 32-bit range in a
|
||||
.debug_ranges section.
|
||||
(read_and_display_attr_value): Record the value of DW_AT_low_pc
|
||||
attributes. Use decode_ranges() to display a DW_AT_ranges
|
||||
attribute.
|
||||
(display_debug_info): Use load_debug_range() and
|
||||
free_debug_range().
|
||||
(display_64bit_debug_ranges): New function. Displays the contents
|
||||
of a 64-bit format .debug_ranges section.
|
||||
(display_debug_ranges): New function: Displays the contents of a
|
||||
32-bit .debug_ranges section.
|
||||
|
||||
(main): Move cmdline_dump_sects and num_cmdline_dump_sects into the
|
||||
global scope.
|
||||
(process_object): Initialise the dump_sects array from the
|
||||
cmdline_dump_sects array before processing each object file.
|
||||
|
||||
(streq, strneq): New macros. Use them to replace occurrences of
|
||||
strcmp() and strncmp().
|
||||
|
||||
(debug_information): New structure array to replace
|
||||
debug_line_pointer_sizes array.
|
||||
(num_debug_info_entries): New variable to replace
|
||||
num_debug_line_pointers.
|
||||
(get_pointer_size_of_comp_unit): New function: Returns the pointer
|
||||
size of a given compilation unit.
|
||||
(get_debug_info): New function to replace
|
||||
get_debug_line_pointer_sizes.
|
||||
(display_debug_lines): Use the new functions.
|
||||
(display_debug_loc): Likewise.
|
||||
|
||||
(disassemble_section): Change return type to int.
|
||||
(display_debug_lines): Move local variables to their
|
||||
innermost scope.
|
||||
(display_debug_section): Likewise. Also record the return value
|
||||
of functions called and pass this back to the parent. Also only
|
||||
warn about undumped sections when the user explicitly requested
|
||||
their dumping.
|
||||
|
||||
(debug_apply_rela_addends): Allow relocations against STT_OBJECT
|
||||
types as well.
|
||||
|
||||
* NEWS: Mention the support for decoding .debug_ranges sections.
|
||||
* doc/binutils.texi: Document the new command line switch to
|
||||
readelf.
|
||||
|
||||
2004-11-03 Randolph Chung <tausq@debian.org>
|
||||
|
||||
* readelf.c (ia64_unw_aux_info, ia64_unw_table_entry): Rename from
|
||||
unw_aux_info and unw_table_entry.
|
||||
(find_symbol_for_address): Pass symtab and strtab info explicitly.
|
||||
(dump_ia64_unwind): Rename unw_{aux_info,table_entry} with ia64_
|
||||
prefix.
|
||||
(slurp_ia64_unwind_table): Likewise.
|
||||
(ia64_process_unwind): Rename from old process_unwind.
|
||||
(hppa_unw_aux_info): New.
|
||||
(dump_hppa_unwind): New.
|
||||
(slurp_hppa_unwind_table): New.
|
||||
(hppa_process_unwind): New.
|
||||
(process_unwind): Factor out common unwinding checks; dispatch to
|
||||
unwind handler based on machine type.
|
||||
|
||||
2004-11-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (display_debug_lines): Fix typo in error message.
|
||||
|
||||
2004-10-26 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* readelf.c (get_note_type): Handle notes not in core files.
|
||||
(process_note_sections): New function.
|
||||
(process_corefile_contents): Rename to ...
|
||||
(process_notes): ... this.
|
||||
(process_object): Call process_notes, not
|
||||
process_corefile_contents.
|
||||
* doc/binutils.texi: Update readelf -n documentation.
|
||||
|
||||
2004-10-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* ar.c (extract_file): Set atime to mtime for ar xo.
|
||||
|
||||
2004-10-25 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* stabs.c (stab_demangle_v3_arglist): New static function, broken
|
||||
out of stab_demangle_v3_argtypes.
|
||||
(stab_demangle_v3_argtypes): Call it.
|
||||
(stab_demangle_v3_arg): Handle DEMANGLE_COMPONENT_FUNCTION_TYPE.
|
||||
If we find an unrecognized component, print out its number.
|
||||
|
||||
2004-10-25 David Mosberger <davidm@hpl.hp.com>
|
||||
|
||||
* readelf.c (slurp_ia64_unwind_table): Support relocations against
|
||||
non-section symbols by adding in the symbol value.
|
||||
|
||||
2004-10-25 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 465
|
||||
* readelf.c (dynamic_strings_length): New global variable.
|
||||
(VALID_DYNAMIC_NAME, GET_DYNAMIC_NAME): New macros for accessing
|
||||
strings in the dynamic string table.
|
||||
(process_section_headers): Initialise dynamic_strings_length.
|
||||
(process_dynamic_section): Likewise.
|
||||
(process_object): Reset dynamic_string_length when the buffer is freed.
|
||||
(dynamic_sections_mips_val): Use the new macros.
|
||||
(process_dynamic_section): Likewise.
|
||||
(process_version_sections): Likewise.
|
||||
(process_symbol_table): Likewise.
|
||||
(process_syminfo): Likewise.
|
||||
(process_mips_specific): Likewise.
|
||||
(dump_relocations): Add a new parameter 'strtablen' and use this
|
||||
to verify that string offset in a given reloc is valid. Print a
|
||||
suitable error message otherwise.
|
||||
(process_relocs): Pass the new argument to dump_relocations.
|
||||
|
||||
2004-10-23 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* dlltool.c: Include <assert.h>.
|
||||
(PREFIX_ALIAS_BASE): Define.
|
||||
(struct export): Add member import_name;
|
||||
(def_exports): Set import_name.
|
||||
(make_one_lib_file): Remove prefix alias code, use import_name
|
||||
in .idata$6.
|
||||
(gen_lib_file): Create and delete aliases.
|
||||
|
||||
2004-10-19 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_section_groups): Free symtab after use.
|
||||
|
||||
2004-10-18 Tommy Pettersson <ptp@lysator.liu.se>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* strings.c (usage): Place radix values for -t option into the
|
||||
correct order.
|
||||
|
||||
* objcopy.c (add_redefine_syms_file): Change error messages to use
|
||||
<filename>:<linenumber>: format for easier parsing by automatic
|
||||
tools.
|
||||
|
||||
* srconv.c (show_usage): Fix spelling typo.
|
||||
|
||||
* windres.c (format_from_filename): Suggest the use of -J instead
|
||||
of -I if the file type cannot be determined.
|
||||
|
||||
2004-10-18 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* strings.c: Include <sys/stat.h>.
|
||||
|
||||
2004-10-18 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* budemang.c (demangle): Fix thinko.
|
||||
|
||||
* budemang.c (demangle): Handle "@plt" suffix.
|
||||
|
||||
2004-10-14 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* nm.c (usage): Fix description of --special-syms switch.
|
||||
|
||||
2004-10-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* strings.c (statbuf): New typedef.
|
||||
(file_stat): Define.
|
||||
(strings_object_file): Avoid using get_file_size, instead do the
|
||||
checks here, using file_stat.
|
||||
* configure.in (HAVE_STAT64): New test.
|
||||
* configure: Rebuilt.
|
||||
* config.in: Rebuilt.
|
||||
|
||||
2004-10-12 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (decode_ARM_machine_flags): Support EABI version 4.
|
||||
|
||||
2004-10-11 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (dump_symbols): Fix thinko last change. Improve error
|
||||
messages.
|
||||
|
||||
2004-10-08 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* nm.c: Add a new switch --special-syms which, if enabled, will
|
||||
include the ARM Mapping symbols in nm's output.
|
||||
(usage): Mention the switch.
|
||||
(filter_symbols): Handle the switch.
|
||||
* objdump.c: Add a similar switch.
|
||||
(usage): Mention the switch.
|
||||
(dump_symbols): Handle the switch.
|
||||
* doc/binutils.texi: Document the new switches.
|
||||
* NEWS: Mention the new switches.
|
||||
|
||||
2004-10-08 Daniel Jacobowitz <dan@debian.org>
|
||||
|
||||
* readelf.c (get_x86_64_section_type_name): New function.
|
||||
(get_section_type_name): Use it.
|
||||
|
||||
2004-10-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* dlltool.c (make_one_lib_file): Revert 2004-09-02 and 2004-09-04
|
||||
patches.
|
||||
* doc/binutils.texi (dlltool): Revert 2004-09-06 patch.
|
||||
|
||||
2004-10-07 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Don't fall through into m68k cpu
|
||||
types.
|
||||
|
||||
2004-10-01 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (get_arm_section_type_name): New function.
|
||||
(get_section_type_name): Use it.
|
||||
|
||||
2004-09-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* nm.c: Reorder functions to eliminate most of the static function
|
||||
prototypes.
|
||||
|
||||
2004-09-22 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (process_program_headers): Don't include .tbss in non-TLS
|
||||
segments.
|
||||
|
||||
2004-09-17 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
* po/binutils.pot: Regenerate.
|
||||
|
||||
2004-09-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (decode_location_expression): Sign extend value for
|
||||
DW_OP_const1s, DW_OP_const2s, DW_OP_const4s, DW_OP_bra, DW_OP_skip.
|
||||
|
||||
2004-09-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 363
|
||||
* ar.c (replace_members): Do not use get_file_size as
|
||||
ar_emul_append correctly handles missing files.
|
||||
|
||||
2004-09-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* configure: Regenerated with autconfig 2.13.
|
||||
|
||||
2004-09-06 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* doc/binutils.texi (dlltool): Update --add-underscore, --kill-at
|
||||
documentation.
|
||||
|
||||
2004-09-06 Michael Wardle <mbw@endbracket.net>
|
||||
|
||||
* doc/binutils.texi (objdump): Document that the -x switch includes
|
||||
the effect of the -p switch.
|
||||
|
||||
2004-09-04 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* dlltool.c (make_one_lib_file): Test if internal_name was
|
||||
specified by user before using it.
|
||||
|
||||
2004-09-02 Carlo Wood <carlo@alinoe.com>
|
||||
|
||||
PR binutils/351
|
||||
* dlltool.c (make_one_lib_file): For IDATA6 take the name from
|
||||
exp->internal_name if it is present.
|
||||
|
||||
2004-09-02 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* MAINTAINERS: Add self as co-maintainer of FR-V.
|
||||
* readelf.c (get_machine_flags): Print FR-V cpu types.
|
||||
|
||||
2004-08-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* nm.c (show_synthetic): New var.
|
||||
(long_options): Add "synthetic".
|
||||
(usage): Here too.
|
||||
(display_rel_file): Handle show_synthetic.
|
||||
|
||||
2004-08-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (dump_bfd): Pass both symbol tables to
|
||||
bfd_get_synthetic_symtab.
|
||||
|
||||
2004-08-17 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* objdump.c (dump_bfd): For relocatable objects, pass syms instead
|
||||
of dynsyms to bfd_get_synthetic_symtab.
|
||||
|
||||
2004-08-16 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (debug_apply_rela_addends): New function, extracted from..
|
||||
(display_debug_info): ..here.
|
||||
(display_debug_frames): Call debug_apply_rela_addends. Don't do
|
||||
DW_EH_PE_pcrel adjustment for ET_REL.
|
||||
|
||||
2004-08-06 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* readelf.c (dump_relocations): Fix typo when calculating
|
||||
sec_index.
|
||||
|
||||
2004-08-02 Jakub Bogusz <qboosh@pld-linux.org>
|
||||
|
||||
* dllwrap.c (deduce_name): Fix typos introduced when program_name
|
||||
was renamed to prog_name.
|
||||
|
||||
2004-07-29 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* readelf.c (get_machine_flags <EM_SH>): Handle EF_SH2A and
|
||||
EF_SH2A_NOFPU.
|
||||
|
||||
2004-07-28 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
2003-07-08 Alexandre Oliva <aoliva@redhat.com>
|
||||
* readelf.c (get_machine_flags <EM_SH)): Handle EF_SH4_NOFPU and
|
||||
EF_SH4A_NOFPU.
|
||||
2003-06-12 Alexandre Oliva <aoliva@redhat.com>
|
||||
* readelf.c (get_machine_flags <EM_SH>): Print SH ISA name.
|
||||
|
||||
2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* objcopy.c (filter_symbols): Use bfd_coff_get_comdat_section
|
||||
to access comdat.
|
||||
* objdump.c (dump_section_header): Likewise.
|
||||
|
||||
2004-07-15 Aravinda PR <aravindapr@rediffmail.com>
|
||||
|
||||
* nlmconv.c (main): Pass map_file argument to link_inputs.
|
||||
(link_inputs): Use map_file argument if it is defined.
|
||||
|
||||
2004-07-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dllwrap.c: Replace 'program_name' with 'prog_name' to avoid
|
||||
conflicts with exported global defined in bucomm.h.
|
||||
(deduce_name): Rename parameter 'program_name' to 'name' to avoid
|
||||
shadowing the global defined in bucomm.h.
|
||||
|
||||
2004-07-12 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* dlltool.c (ext_prefix_alias): New global variable.
|
||||
(make_one_lib_file): Add aliases with prefixes for external
|
||||
and import definitions.
|
||||
(usage): Document -p option.
|
||||
(long_options): Add --ext-prefix-alias option.
|
||||
(main): Handle -p.
|
||||
* doc/binutils.texi: Document new switch.
|
||||
* NEWS: Mention new switch.
|
||||
|
||||
2004-07-09 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* binutils/dlltool.c (asm_prefix): Add parameter: name.
|
||||
No underscore for symbols beginning with ?.
|
||||
(ASM_PREFIX): Add parameter: NAME.
|
||||
(gen_exp_file): Use new parameter.
|
||||
(make_label): Likewise.
|
||||
(make_imp_label): Likewise.
|
||||
(make_one_lib_file): Likewise.
|
||||
|
||||
2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
|
||||
|
||||
* MAINTAINERS: Added myself to the list.
|
||||
* readelf.c: Include "elf/crx.h".
|
||||
(guess_is_rela): Handle EM_CRX.
|
||||
(get_machine_name): Likewise.
|
||||
(dump_relocations): Likewise.
|
||||
|
||||
2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
|
||||
|
||||
* doc/binutils.texi (nm): Clarify weak symbol description.
|
||||
|
||||
2004-06-24 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* readelf.c (get_segment_type): Display "GNU_STACK", not just
|
||||
"STACK", when a PT_GNU_STACK segment is encountered.
|
||||
|
||||
2004-06-24 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objcopy.c (copy_section): Don't set _cooked_size.
|
||||
|
||||
2004-06-22 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (Elf32_Word): Delete.
|
||||
(get_32bit_dynamic_section): Handle SGI ELF dynamic segment.
|
||||
(get_64bit_dynamic_section): Likewise.
|
||||
|
||||
* readelf.c (get_32bit_dynamic_section): Stop at first DT_NULL entry.
|
||||
(get_64bit_dynamic_section): Likewise.
|
||||
|
||||
* readelf.c (dynamic_nent): New variable.
|
||||
(get_32bit_dynamic_section): Set it.
|
||||
(get_64bit_dynamic_section): Here too.
|
||||
(process_dynamic_section): Use it instead of dynamic_size.
|
||||
(process_syminfo): Likewise.
|
||||
|
||||
* readelf.c (get_32bit_dynamic_section): Correct number of entries
|
||||
translated from external to internal form.
|
||||
(get_64bit_dynamic_section): Likewise.
|
||||
|
||||
2004-06-18 Jie Zhang <zhangjie@magima.com.cn>
|
||||
|
||||
* readelf.c (process_program_headers): When locating the dynamic
|
||||
section use the section table if it is present.
|
||||
(dynamic_segment): Renamed to dynamic_section.
|
||||
Replace references to dynamic segment with references to dynamic
|
||||
section, except where appropriate.
|
||||
(dynamic_segment_mips_val): Rename to dynamic_section_mips_val.
|
||||
(dynamic_segment_parisc_val): Rename to dynamic_section_parisc_val.
|
||||
(dynamic_segment_ia64_val): Rename to dynamic_section_ia64_val.
|
||||
(get_32bit_dynamic_segment): Rename to get_32bit_dynamic_section.
|
||||
Remove tag counting code as it is no longer needed.
|
||||
(get_64bit_dynamic_segment): Rename to get_64bit_dynamic_section.
|
||||
Remove tag counting code as it is no longer needed.
|
||||
(process_dynamic_segment): Rename to process_dynamic_section.
|
||||
|
||||
2004-06-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objcopy.c (copy_section): Use bfd_get_section_size instead of
|
||||
_raw_size or bfd_get_section_size_before_reloc. Don't set reloc_done.
|
||||
(compare_section_lma): Likewise.
|
||||
* addr2line.c (find_address_in_section): Likewise.
|
||||
* coffgrok.c (do_sections_p1): Likewise.
|
||||
* dlltool.c (scan_drectve_symbols): Likewise.
|
||||
* nlmconv.c (main): Likewise.
|
||||
(copy_sections): Likewise.
|
||||
(powerpc_mangle_relocs): Likewise.
|
||||
* objdump.c (disassemble_section): Likewise.
|
||||
* prdbg.c (find_address_in_section): Likewise.
|
||||
* size.c (berkeley_sum): Likewise.
|
||||
* srconv.c (wr_ob): Likewise.
|
||||
* strings.c (strings_a_section): Likewise.
|
||||
|
||||
2004-05-28 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* readelf.c (decode_ARM_machine_flags): Add EF_ARM_VFP_FLOAT.
|
||||
|
||||
2004-05-17 David Heine <dlheine@tensilica.com>
|
||||
|
||||
* objcopy.c (setup_bfd_headers): New function.
|
||||
(copy_object): Call setup_bfd_headers.
|
||||
|
||||
2004-05-13 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (display_debug_frames): Handle dwarf3 format CIE
|
||||
entries.
|
||||
|
||||
2004-05-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/fr.po: Updated French translation.
|
||||
|
||||
2004-05-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* readelf.c (get_segment_type): Handle PT_GNU_RELRO.
|
||||
|
||||
2004-05-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (section_groups): New.
|
||||
(group_count): New.
|
||||
(section_headers_groups): New.
|
||||
(process_section_groups): Populate group_count, section_groups
|
||||
and section_headers_groups.
|
||||
(process_unwind): Support section group.
|
||||
(process_object): Always call process_section_groups. Free
|
||||
section_groups and section_headers_groups.
|
||||
|
||||
2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_section_headers): Use %3lu on sh_info.
|
||||
|
||||
2004-04-30 Michael Deutschmann <michael@talamasca.ocis.net>
|
||||
|
||||
* ranlib.sh: Quote $1 argument in case it contains spaces.
|
||||
|
||||
2004-04-27 John Paul Wallington <jpw@gnu.org>
|
||||
|
||||
* objcopy.c (copy_usage, strip_usage): Fix spelling.
|
||||
|
||||
2004-04-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (do_section_groups): New.
|
||||
(options): Add --section-groups/-g.
|
||||
(usage): Mention --section-groups/-g.
|
||||
(parse_args): Support --section-groups/-g.
|
||||
(get_group_flags): New.
|
||||
(process_section_groups): New.
|
||||
(process_object): Call process_section_groups.
|
||||
|
||||
2004-04-24 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (disassemble_section): Don't disassemble sections
|
||||
without SEC_HAS_CONTENTS.
|
||||
|
||||
2004-04-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* objdump.c (synthsyms, synthcount): New variables.
|
||||
(disassemble_data): Use dynsyms for stripped binaries or libraries.
|
||||
Add synthetized symbols.
|
||||
(dump_bfd): For disassemble, initialize dynsyms always and
|
||||
also synthsyms. Free synthsyms and clear {sym,dynsym,synth}count
|
||||
before returning.
|
||||
|
||||
2004-04-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* strings.c (print_strings): Cast file_off to unsigned long in
|
||||
printf arg list.
|
||||
|
||||
2004-04-07 Benjamin Monate <benjamin.monate@cea.fr>
|
||||
|
||||
PR 86
|
||||
* arsup.c (ar_save): Use smart_rename.
|
||||
|
||||
2004-04-01 Dean Luick <luick@cray.com>
|
||||
|
||||
* readelf.c (display_debug_pubnames): Align offset and data
|
||||
columns.
|
||||
(read_and_display_attr_value): Add missing break;
|
||||
(debug_displays): Enable the display of the .debug_pubtypes
|
||||
section.
|
||||
|
||||
2004-03-30 Stan Shebs <shebs@apple.com>
|
||||
|
||||
* mpw-config.in, mpw-make.sed, mac-binutils.r: Remove MPW
|
||||
support files, no longer used.
|
||||
|
||||
2004-03-23 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (decode_ARM_machine_flags): Add EABI v3.
|
||||
|
||||
2004-03-21 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* readelf.c (display_debug_frames): Don't crash for mismatched
|
||||
DW_CFA_restore_state.
|
||||
|
||||
2004-03-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* po/binutils.pot: Regenerate.
|
||||
|
||||
2004-03-15 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* objdump.c (struct SFILE): Replace current pointer with pos
|
||||
offset, rename size to alloc.
|
||||
(objdump_sprintf): Avoid unnecessary copies in the common case
|
||||
(disassemble_bytes): Keep sfile live throughout the
|
||||
function. Adjust usage appropriately.
|
||||
|
||||
2004-03-10 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* MAINTAINERS: Update my mail address.
|
||||
|
||||
2004-03-08 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* deflex.l: Handle "PRIVATE" string.
|
||||
* defparse.y (%token): Add PRIVATE.
|
||||
(%type): Add opt_PRIVATE.
|
||||
(expline): Pass opt_PRIVATE to def_exports.
|
||||
(opt_PRIVATE): Handle PRIVATE token.
|
||||
* dlltool.h (def_exports): Add 7th param for private flag to
|
||||
declaration.
|
||||
* dlltool.c: Add PRIVATE to comment on EXPORTS syntax.
|
||||
(struct export): Add 'private' field.
|
||||
(def_exports): Set 'private' field of struct exports.
|
||||
(scan_drectve_symbols): Adjust calls to def_exports.
|
||||
(scan_filtered_symbols): Likewise.
|
||||
(dump_def_info): Print 'private' field.
|
||||
(gen_def_file): Likewise.
|
||||
(gen_lib_file): Skip generation of lib object if private.
|
||||
Delete tmp object files in same order as they were generated.
|
||||
Don't delete non-existent private object files.
|
||||
|
||||
2004-02-27 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* ar.c (main): Support POSIX-compatible argument parsing.
|
||||
|
||||
2004-02-23 Daniel Lucq <daniel@lucq.org>
|
||||
|
||||
* readelf.c (process_mips_specific): Print conflictsno as an
|
||||
unsigned long.
|
||||
|
||||
2004-02-21 Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
|
||||
* dlltool.c (gen_exp_file): Always output names for forwarded symbols.
|
||||
|
||||
2004-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* objcopy.c (copy_section): Avoid warnings.
|
||||
|
||||
2004-02-14 Andrew Cagney <cagney@redhat.com>
|
||||
|
||||
* ar.c (remove_output): Use bfd_cache_close.
|
||||
* arsup.c (ar_end): Ditto.
|
||||
|
||||
2004-01-21 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* readelf.c (get_note_type): Match NT_AUXV.
|
||||
|
||||
2004-01-20 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* version.c (print_version): Update copyright year to 2004.
|
||||
|
||||
2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
|
||||
|
||||
* acinclude.m4: Quote names of macros to be defined by AC_DEFUN
|
||||
throughout.
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2004-01-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* objcopy.c: Include elf-bfd.h.
|
||||
(is_strip_section): Don't strip debugging sections if
|
||||
STRIP_NONDEBUG.
|
||||
(setup_section): If STRIP_NONDEBUG make SEC_ALLOC sections
|
||||
~(SEC_LOAD | SEC_HAS_CONTENTS) and on ELF targets also SHT_NOBITS.
|
||||
|
||||
* objcopy.c (copy_section): Free relpp if relcount == 0.
|
||||
|
||||
2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
|
||||
|
||||
* stabs.c (parse_stab_argtypes): Handle g++ ABI version 3 names.
|
||||
(stab_demangle_argtypes): Likewise.
|
||||
(stab_demangle_v3_argtypes): New static function.
|
||||
(stab_demangle_v3_arg): New static function.
|
||||
|
||||
2004-01-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objcopy.c (copy_object): Make the function boolean, returning
|
||||
FALSE upon failure.
|
||||
(copy_archive): Handle the return value from copy_object.
|
||||
(copy_file): Likewise.
|
||||
|
||||
2004-01-07 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (find_section): New function. Locates a named
|
||||
section.
|
||||
(get_debug_line_pointer_sizes): New function: Initialises the
|
||||
debug_line_pointer_sizes array.
|
||||
(display_debug_lines): Call get_debug_line_pointer_sizes.
|
||||
(display_debug_loc): Likewise.
|
||||
(load_debug_loc): Use find_section.
|
||||
(load_debug_str): Likewise.
|
||||
(display_debug_info): Likewise.
|
||||
(prescan_debug_info): Delete.
|
||||
(debug_displays): Remove prescan field.
|
||||
(process_section_contents): Do not perform prescans.
|
||||
|
||||
2004-01-03 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objcopy.c (filter_bytes): Delete. Move code to..
|
||||
(copy_section): ..here. Simplify size adjustment. Divide
|
||||
section lma by interleave.
|
||||
|
||||
2004-01-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ru.po: New file: Russian translation.
|
||||
* configure.in (ALL_LINGUAS): Add ru
|
||||
* configure: Regenerate.
|
||||
|
||||
For older changes see ChangeLog-0203
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,599 +0,0 @@
|
||||
2006-12-25 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A.
|
||||
|
||||
2006-12-11 J"orn Rennecke <joern.rennecke@arc.com>
|
||||
|
||||
MAINTAINERS (SH): Remove my entry.
|
||||
|
||||
2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* configure.in: Define GENINSRC_NEVER.
|
||||
* doc/Makefile.am (MAINTAINERCLEANFILES): Add info file.
|
||||
(DISTCLEANFILES): Pretend to add info file.
|
||||
* po/Make-in (.po.gmo): Put gmo files in objdir.
|
||||
* configure, Makefile.in, doc/Makefile.in: Regenerated.
|
||||
|
||||
2006-12-07 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
* readelf.c: Update uses of EF_M68K_*.
|
||||
|
||||
2006-10-30 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* objdump.c (disassemble_section): Set info->symtab_pos.
|
||||
(disassemble_data): Set info->symtab and info->symtab_size.
|
||||
|
||||
2006-10-29 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/3384
|
||||
* configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
|
||||
* configure: Regenerated.
|
||||
* config.in: Likewise.
|
||||
|
||||
* readelf.c: Include <limits.h> and <sys/param.h> for PATH_MAX.
|
||||
(program_interpreter): Allocate PATH_MAX bytes instead of 64.
|
||||
(process_program_headers): Don't assume that program interpreter
|
||||
is shorter than 64 characters.
|
||||
|
||||
2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
|
||||
Yukishige Shibata <shibata@rd.scei.sony.co.jp>
|
||||
Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
|
||||
Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
|
||||
Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c: Add SPU support.
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-10-13 Robert Connolly <robert@linuxfromscratch.org>
|
||||
|
||||
PR binutils/2876
|
||||
* configure.in: Check for the mkstemp and mkdtemp functions.
|
||||
* configure: Regenerate.
|
||||
* config.in (HAVE_MKDTEMP): New potential define.
|
||||
(MAKE_MKSTEMP): Likewise.
|
||||
* bucomm.c (make_tempname): Use mkstemp if it is available.
|
||||
(make_tempdir): New function: Create a temporary directory using
|
||||
mkdtemp, if it is available.
|
||||
* bucomm.h (make_tempdir): New prototype.
|
||||
* objcopy.c (copy_archive): Use make_tempdir if it is available.
|
||||
(strip_main): Produce an warning message if a temporary file could
|
||||
not be created.
|
||||
(copy_main): Likewise.
|
||||
* ar.c (write_archive): Likewise.
|
||||
|
||||
2006-10-10 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* dwarf.c (display_debug_loc): Don't dereference loc_offsets when
|
||||
there are no location lists.
|
||||
(display_debug_ranges): Similar for range_lists.
|
||||
|
||||
2006-10-04 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (debug_apply_rela_addends): Don't ignore relocation
|
||||
against symbols without type.
|
||||
|
||||
2006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
|
||||
|
||||
* nlmconv.c (main) : Use LITMEMCPY.
|
||||
* prdbg.c (tg_class_static_member) : Use LITSTRCPY.
|
||||
|
||||
2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/3257
|
||||
* strings.c (main): Handle "-T format".
|
||||
|
||||
2006-09-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* MAINTAINERS: Add Mei Ligang as maintainer of the Score port.
|
||||
|
||||
2006-09-26 Thiemo Seufer <ths@networkno.de>
|
||||
|
||||
* configure.in: Remove broken changequote lines.
|
||||
|
||||
2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
|
||||
|
||||
* configure.in: Add new target x86_64-pc-mingw64.
|
||||
* configure: Regenerate.
|
||||
* dlltool.c: Adjust include for this target.
|
||||
(DLLTOOL_MX86_64): Added macro to handle target specific code.
|
||||
(mname): Added default target static as "i386:x86-64".
|
||||
(MX86): Added macro for target ident.
|
||||
(mtable): Added target specific definitions.
|
||||
(rvaafter): Add handling of MX86.
|
||||
(rvabefore): Add handling of MX86.
|
||||
(asmprefix): Add handling of MX86.
|
||||
|
||||
2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
|
||||
|
||||
* readelf.c: Add support for Score binaries.
|
||||
* Makefile.am: Update readelf's dependencies.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-09-16 Nick Clifton <nickc@redhat.com>
|
||||
Pedro Alves <pedro_alves@portugalmail.pt>
|
||||
|
||||
* ar.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
|
||||
macros defined in bfd.h.
|
||||
* dlltool.c: Likewise.
|
||||
* emul_aix.c: Likewise.
|
||||
* nlmconv.c: Likewise.
|
||||
* objdump.c: Likewise.
|
||||
* prdbg.c: Likewise.
|
||||
* stabs.c: Likewise.
|
||||
* readelf.c (const_strneq): New macro.
|
||||
(process_section_headers, slurp_ia64_unwind_table,
|
||||
slurp_hppa_unwind_table, display_debug_section, process_notes,
|
||||
process_archive): Use the new macro.
|
||||
|
||||
2006-09-14 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/3181
|
||||
* objcopy.c (group_signature): Return proper group signature.
|
||||
|
||||
2006-09-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 3181
|
||||
* objcopy.c (group_signature): New function, split out from..
|
||||
(setup_section): ..here.
|
||||
(is_strip_section): Return true for SHT_GROUP sections that are
|
||||
going to lose their group signature symbol.
|
||||
|
||||
2006-09-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 3181
|
||||
* objcopy.c (copy_object): Load symbols earlier.
|
||||
(setup_section): Mark group signature symbols with BSF_KEEP.
|
||||
|
||||
2006-09-09 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/3110
|
||||
* objcopy.c (copy_archive): Add new parameter:
|
||||
force_output_target. If not true, then perserve the file formats
|
||||
of each copied archive element, otherwise force them to be one
|
||||
specific file format.
|
||||
(copy_file): Compute force_output_target parameter to pass to
|
||||
copy_archive.
|
||||
|
||||
2006-09-05 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/3166
|
||||
* objcopy.c (is_strip_section): Do not treat group sections as
|
||||
debugging sections.
|
||||
* doc/binutils.texi (--only-keep-debug): Document that this switch
|
||||
is only intended for use on fully linked files.
|
||||
|
||||
2006-09-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/3146
|
||||
* readelf.c (dump_relocations): Check for a NULL value in rtype
|
||||
before using it.
|
||||
|
||||
2006-08-21 Pedro Alves <pedro_alves@portugalmail.pt>
|
||||
|
||||
* configure.in: Split arm-pe and arm-wince-pe. Build dlltool
|
||||
with -DDLLTOOL_ARM_WINCE for Windows CE case.
|
||||
* configure: Regenerate.
|
||||
* dlltool.c: Add support for arm-wince.
|
||||
|
||||
2006-08-15 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/3039
|
||||
* wrstabs.c (stab_tag_type): Initialize 'size'.
|
||||
|
||||
2006-08-10 J"orn Rennecke <joern.rennecke@st.com>
|
||||
|
||||
PR binutils/3017
|
||||
* doc/Makefile.am: Use single quotes inside backquotes for
|
||||
date command while generating config.texi.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
|
||||
2006-08-08 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/2768
|
||||
* dwarf.c (display_debug_aranges): When the address size is
|
||||
greater than 4 display addresses and lengths as 16 hex digits,
|
||||
otherwise use 8 hex digits.
|
||||
|
||||
2006-08-06 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/3001
|
||||
* addr2line.c (process_file): Change function from void to
|
||||
returning an int. Return 0 upon success, 1 otherwise.
|
||||
(main): Use return value from process_file as the exit value.
|
||||
* ar.c (ranlib_only): Change function from void to returning an
|
||||
int. Return 0 upon success, 1 otherwise.
|
||||
(ranlib_touch): Likewise.
|
||||
(main): Use return value from ranlib functions as exit value.
|
||||
* objcopy.c (add_specific_symbol): Set status to 1 if get_file_size
|
||||
fails.
|
||||
(copy_file): Likewise.
|
||||
(strip_main): Likewise.
|
||||
(copy_main): Likewise.
|
||||
* objdump.c (display_file): Set exit_status to 1 if get_file_size
|
||||
fails.
|
||||
* size.c (display_file): Set return_code to 1 if get_file_size
|
||||
fails.
|
||||
|
||||
2006-08-02 Thiemo Seufer <ths@mips.com>
|
||||
Nigel Stephens <nigel@mips.com>
|
||||
|
||||
* readelf.c (dump_relocations): Handle MIPS-specific
|
||||
SHN_MIPS_SCOMMON and SHN_MIPS_SUNDEFINED.
|
||||
(get_symbol_index_type): Similarly.
|
||||
|
||||
2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* doc/binutils.texinfo: Fix spelling mistakes.
|
||||
|
||||
2006-07-10 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* readelf.c (get_dynamic_type): Handle DT_GNU_HASH.
|
||||
(get_section_type_name): Handle SHT_GNU_HASH.
|
||||
(dynamic_info_DT_GNU_HASH): New variable.
|
||||
(process_dynamic_section): Handle DT_GNU_HASH.
|
||||
(process_symbol_table): Print also DT_GNU_HASH histogram.
|
||||
|
||||
2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
|
||||
|
||||
PR binutils/2879
|
||||
* doc/binutils.texi (Strings): Document -T shorthand for --target
|
||||
switch.
|
||||
* strings.c: Update comment to include -T option.
|
||||
|
||||
PR binutils/2875
|
||||
* doc/binutils.texi (readelf): Fix spelling typo.
|
||||
|
||||
2006-06-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dwarf.c (display_debug_frames): Catch a corrupt length field
|
||||
generating an end of block address that is beyond the end of the
|
||||
section.
|
||||
When encountering a corrupt CIE pointer do not reset the start
|
||||
pointer as more data still has to be read.
|
||||
Do not warn about user defined call frame instructions.
|
||||
|
||||
2006-06-29 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* readelf.c (process_section_headers): Add H8/300 support.
|
||||
|
||||
2006-06-23 Richard Sandiford <richard@codesourcery.com>
|
||||
|
||||
* objcopy.c (localize_hidden): New variable.
|
||||
(OPTION_LOCALIZE_HIDDEN): New command_line_switch value.
|
||||
(copy_options): Add --localize-hidden.
|
||||
(copy_usage): Mention --localize-hidden.
|
||||
(is_hidden_symbol): New function.
|
||||
(filter_symbols): Handle localize_hidden.
|
||||
(copy_object): Call filter_symbols if localize_hidden.
|
||||
(copy_main): Handle OPTION_LOCALIZE_HIDDEN.
|
||||
* doc/binutils.texi (--localize-hidden): Document new option.
|
||||
|
||||
2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* Makefile.am (ar_DEPENDENCIES, ranlib_DEPENDENCIES)
|
||||
(dlltool_DEPENDENCIES, windres_DEPENDENCIES): Remove @LEXLIB@.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-06-23 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am (*_DEPENDENCIES): Add missing dependencies.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* po/Make-in (pdf, ps): New dummy targets.
|
||||
|
||||
2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* po/Make-in (top_builddir): Define.
|
||||
|
||||
2006-06-05 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* config.in: Regenerate.
|
||||
|
||||
2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
|
||||
|
||||
* doc/Makefile.am (TEXI2DVI): Define.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
|
||||
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* Makefile.am: Replace INTLLIBS with LIBINTL everywhere. Add
|
||||
DEPENDENCIES variables for every program.
|
||||
(INTLLIBS): Remove.
|
||||
(INCLUDES): Use @INCINTL@.
|
||||
* acinclude.m4: Include new gettext macros.
|
||||
* configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
|
||||
Remove local code for po/Makefile.
|
||||
* Makefile.in, configure, doc/Makefile.in: Regenerated.
|
||||
|
||||
2006-05-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/es.po: Updated Spanish translation.
|
||||
|
||||
2006-05-25 J"orn Rennecke <joern.rennecke@st.com>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2006-05-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/fr.po: Updated French translation.
|
||||
|
||||
2006-05-23 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/vi.po: Updated Vietnamese translation.
|
||||
|
||||
2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* po/ru.po: Updated translation.
|
||||
|
||||
2006-05-19 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* doc/Makefile.am (addr2line.1): Depend on $(binutils_TEXINFOS).
|
||||
(ar.1): Likewise.
|
||||
(dlltool.1): Likewise.
|
||||
(nlmconv.1): Likewise.
|
||||
(nm.1): Likewise.
|
||||
(objcopy.1): Likewise.
|
||||
(objdump.1): Likewise.
|
||||
(ranlib.1): Likewise.
|
||||
(readelf.1): Likewise.
|
||||
(size.1): Likewise.
|
||||
(strings.1): Likewise.
|
||||
(strip.1): Likewise.
|
||||
(windres.1): Likewise.
|
||||
(cxxfilt.man): Likewise.
|
||||
* doc/Makefile.in: Regenerated.
|
||||
|
||||
2006-05-17 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* doc/binutils.texi: Use "Binutils Index" for index name.
|
||||
|
||||
2006-05-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dwarf.c (display_debug_frames): Don't return on ZERO
|
||||
terminator.
|
||||
|
||||
2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* doc/Makefile.am (AM_MAKEINFOFLAGS): New.
|
||||
(TEXI2POD): Use AM_MAKEINFOFLAGS.
|
||||
(config.texi): Don't set top_srcdir.
|
||||
* doc/binutils.texi: Don't use top_srcdir.
|
||||
* aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
|
||||
|
||||
2006-04-26 Julian Brown <julian@codesourcery.com>
|
||||
|
||||
* readelf.c (arm_attr_tag_VFP_arch): Add VFPv3.
|
||||
|
||||
2006-04-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-04-19 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-04-18 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 2257
|
||||
* readelf.c (SECTION_NAME): Cope with a missing string table.
|
||||
(process_file_header): Cope with a corrupt e_shstrndx field.
|
||||
(process_section_headers): Correctly handle an e_shstrndx value of
|
||||
SHF_UNDEF.
|
||||
|
||||
2006-04-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objdump.c (objdump_symbol_at_address): Fix typo in comment.
|
||||
|
||||
2006-04-10 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* MAINTAINERS (CGEN Maintainers): Remove myself.
|
||||
|
||||
2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* po/Make-in: Add install-html target.
|
||||
* Makefile.am: Add install-html and install-html-recursive targets.
|
||||
* Makefile.in: Regenerate.
|
||||
* configure.in: AC_SUBST datarootdir, docdir and htmldir.
|
||||
* configure: Regenerate.
|
||||
* doc/Makefile.am: Add install-html and install-html-am targets.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
|
||||
2006-04-05 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* addr2line.c (long_options): Add new option 'section'.
|
||||
(usage): Document new -j/--section option.
|
||||
(find_offset_in_section): New function.
|
||||
(translate_addresses): Add 'section' parameter.
|
||||
If it is non-null, call find_offset_in_section on it.
|
||||
(process_file): Add 'section_name' parameter.
|
||||
If it is non-null, look for the section in the BFD object.
|
||||
Pass the section to translate_addresses.
|
||||
(main): Handle new -j option.
|
||||
Pass the section name to process_file.
|
||||
* doc/binutils.texi (addr2line): Document new -j/--section option.
|
||||
|
||||
2006-03-29 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* resbin.c: Avoid duplicating constants in calls to reswr_alloc.
|
||||
|
||||
2006-03-20 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* BRANCHES: Remove binutils-csl-arm-2006q1-branch. Document
|
||||
binutils-csl-2_17-branch instead.
|
||||
|
||||
2006-03-20 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* BRANCHES: Mention binutils-csl-arm-2006q1-branch.
|
||||
|
||||
2006-03-16 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 2434
|
||||
* ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls.
|
||||
* wrstabs.c (write_stabs_in_sections_debugging_info): Likewise.
|
||||
|
||||
2006-03-13 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* bucomm.c (display_target_list): Make local variable `a' to be of
|
||||
type enum bfd_architecture. Thus no need to cast enums to int.
|
||||
(display_info_table): Likewise.
|
||||
|
||||
2006-03-10 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (decode_ARM_machine_flags): Handle EABIv5.
|
||||
|
||||
2006-03-10 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* dwarf.c (process_extended_line_op): Remove pointer_size param.
|
||||
Use length instead to determine address size.
|
||||
(get_pointer_size_and_offset_of_comp_unit): Delete.
|
||||
(display_debug_lines): Adjust for above.
|
||||
(display_debug_aranges): Don't stop on finding two zeros.
|
||||
(display_debug_frames): For warning, print offset not pointer.
|
||||
|
||||
2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* dlltool.c: Update copyright year.
|
||||
* doc/binutils.texi: Likewise.
|
||||
|
||||
2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* dlltool.c (add_stdcall_underscore): New flag.
|
||||
(xlate): Also add underscore to stdcall symbol if
|
||||
add_stdcall_underscore set.
|
||||
(usage): Document --add-stdcall-underscore option.
|
||||
(OPTION_ADD_STDCALL_UNDERSCORE): New define.
|
||||
(long_options): Use it for --add-stdcall-underscore option.
|
||||
(main): Handle it.
|
||||
* doc/binutils.texi: Document --add-stdcall-underscore option
|
||||
and differentiate from --add-underscore.
|
||||
|
||||
2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Adjust.
|
||||
|
||||
2006-03-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (frame_display_row, display_debug_frames): Handle
|
||||
DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.
|
||||
|
||||
2006-02-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objcopy.c (use_alt_mach_code): Change type to unsigned long.
|
||||
(copy_object): If bfd_alt_mach_code fails emit a more helpful
|
||||
message and if the target architecture is ELF use the alternative
|
||||
as replacement value for the e_machine number.
|
||||
(copy_main): Use strtoul to parse the number provided with the
|
||||
--alt-mach-code switch.
|
||||
* doc/binutils.texi (--alt-mach-code): Document that this switch
|
||||
can now set the absolute e_machine value.
|
||||
|
||||
2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* po/Make-in: Add html target.
|
||||
|
||||
2006-02-17 Nick Hudson <nick.hudson@dsl.pipex.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Add logic for missing EF_SH flags.
|
||||
|
||||
2006-02-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config.in: Rebuilt.
|
||||
|
||||
2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/2258
|
||||
* readelf.c (process_program_headers): Use
|
||||
ELF_IS_SECTION_IN_SEGMENT_MEMORY.
|
||||
|
||||
2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* configure.in (CHECK_DECLS): Add snprintf and vsnprintf.
|
||||
* configure: Regenerate.
|
||||
* objdump.c (fprintf): Remove declaration.
|
||||
* bucomm.h (fprintf): Declare if not already declared.
|
||||
(snprintf): Likewise.
|
||||
(vsnprintf): Likewise.
|
||||
|
||||
2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_program_headers): Match PT_TLS segment
|
||||
only with SHT_TLS sections.
|
||||
|
||||
2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Add logic for EF_M68K flags.
|
||||
|
||||
2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_program_headers): Undo the last change.
|
||||
|
||||
2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_program_headers): Undo the change made on
|
||||
2004-09-22. Match PT_DYNAMIC segment only with SHT_DYNAMIC
|
||||
sections.
|
||||
|
||||
2006-01-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objcopy.c (copy_object): Catch the case where an attempt is made
|
||||
to add a section that already exists and produce a more helpful
|
||||
warning message.
|
||||
|
||||
2006-01-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/vi.po: New Vietnamese translation.
|
||||
* configure.in (ALL_LINGUAS): Add vi.
|
||||
* configure: Regenerate.
|
||||
|
||||
2006-01-18 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
Introduce TLS descriptors for i386 and x86_64.
|
||||
* readelf.c (get_dynamic_type): Handle DT_TLSDESC_GOT and
|
||||
DT_TLSDESC_PLT.
|
||||
|
||||
2006-01-18 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/1391
|
||||
* objcopy.c (copy_object): For PE format targets set the VMA of a
|
||||
newly created gnu_debuglink section to a non-zero, aligned,
|
||||
contiguous value.
|
||||
* Makefile.am (objcopy.c): Add a dependency upon libbfd.h.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2006-01-17 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
PR binutils/1486
|
||||
* configure.in: Don't define DISASSEMBLER_NEEDS_RELOCS.
|
||||
* configure: Regenerate.
|
||||
* objdump.c (struct objdump_disasm_info): Don't check for
|
||||
DISASSEMBLER_NEEDS_RELOCS.
|
||||
(objdump_print_addr): Likewise.
|
||||
(disassemble_bytes): Check disassembler_needs_relocs from
|
||||
disassemble_info at run-time instead of DISASSEMBLER_NEEDS_RELOCS
|
||||
at compile-time.
|
||||
(disassemble_section): Likewise.
|
||||
(disassemble_data): Initialize it.
|
||||
|
||||
2006-01-11 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objcopy.c (copy_object): Fix thinko.
|
||||
|
||||
* objcopy.c (copy_object): Set isympp and osympp to NULL after free.
|
||||
|
||||
2006-01-09 Mike Frysinger <vapier@gentoo.org>:
|
||||
|
||||
* readelf.c (guess_is_rela): Add case for Nios/Nios II.
|
||||
(get_machine_name): Likewise.
|
||||
|
||||
For older changes see ChangeLog-2005
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,874 +0,0 @@
|
||||
2008-12-23 Jon Beniston <jon@beniston.com>
|
||||
|
||||
* MAINTAINERS: Added Jon Beniston as maintainer for LM32 port.
|
||||
* readelf.c: Add support for LM32 machine number.
|
||||
|
||||
2008-12-23 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* rcparse.y (rcdata_data): Allow empty comma elements.
|
||||
|
||||
2008-12-23 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objdump.c (dump_reloc_set): Remove STT_IFUNC support.
|
||||
* readelf.c (dump_relocations): Likewise.
|
||||
(get_symbol_type): Likewise.
|
||||
* doc/binutils.texi: Likewise.
|
||||
|
||||
2008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-12-09 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* srconv.c (wr_hd): Add parens to placate gcc 4.4.
|
||||
|
||||
2008-12-09 Andrew Stubbs <ams@codesourcery.com>
|
||||
|
||||
* readelf.c (arm_attr_tag_CPU_arch): Add "v6-M" and "v6S-M".
|
||||
(arm_attr_tag_WMMX_arch): Add "WMMXv2".
|
||||
(arm_attr_tag_NEON_arch): Rename to ...
|
||||
(arm_attr_tag_Advanced_SIMD_arch): ... official name.
|
||||
(arm_attr_tag_ABI_PCS_config): Rename to ...
|
||||
(arm_attr_tag_PCS_config): ... official name.
|
||||
(arm_attr_tag_ABI_PCS_RO_DATA): Rename to ...
|
||||
(arm_attr_tag_ABI_PCS_RO_data): ... official name.
|
||||
(arm_attr_tag_ABI_FP_denormal): Add "Sign only".
|
||||
(arm_attr_tag_CPU_unaligned_access): New array.
|
||||
(arm_attr_tag_T2EE_use): New array.
|
||||
(arm_attr_tag_Virtualization_use): New array.
|
||||
(arm_attr_tag_MPextension_use): New array.
|
||||
(arm_attr_publ): NEON_arch -> Advanced_SIMD_arch.
|
||||
ABI_PCS_config -> PCS_config.
|
||||
ABI_PCS_RO_DATA -> ABI_PCS_RO_data.
|
||||
Add CPU_unaligned_access, nodefaults, also_compatible_with,
|
||||
T2EE_use, conformance, Virtualization_use and MPextension_use.
|
||||
(display_arm_attribute): Handle Tag_nodefaults and
|
||||
Tag_also_compatible_with.
|
||||
|
||||
2008-12-04 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* doc/binutils.texi (objdump): Update booke documentation.
|
||||
* NEWS: Document user-visible changes to command line options.
|
||||
|
||||
2008-12-04 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objdump.c (dump_reloc_set): Append "()" to symbol names which
|
||||
have the BSF_INDIRECT_FUNCTION type.
|
||||
* readelf.c (print_symbol): Fix handling of negative widths.
|
||||
(dump_relocations): Append "()" to symbol names which have the
|
||||
STT_IFUNC type. Display negative offsets as a positive number with
|
||||
a "-" prefix.
|
||||
(get_symbol_type): Return "IFUNC" for STT_IFUNC symbols.
|
||||
* doc/binutils.texi: Document 'i' symbol type.
|
||||
|
||||
2008-11-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* strings.c (main): New variable `s'. Have string_min parsing
|
||||
call fatal for invalid input strings.
|
||||
|
||||
2008-11-25 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR7044
|
||||
* dlltool.c (run): Use formatting string to avoid compile time
|
||||
warning.
|
||||
(gen_exp_file): Check return value from fread.
|
||||
* windmc.c (main): Check return value from fread.
|
||||
|
||||
2008-11-21 Sterling Augustine <sterling@tensilica.com>
|
||||
|
||||
* MAINTAINERS: Take over from Bob Wilson as Xtensa maintainer.
|
||||
|
||||
2008-11-19 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* doc/fdl.texi: Update to v1.3
|
||||
* doc/binutils.texinfo: Change license to v1.3.
|
||||
|
||||
2008-11-18 Catherine Moore <clm@codesourcery.com>
|
||||
|
||||
* readelf.c (arm_attr_tag_ABI_FP_16bit_format): New.
|
||||
(arm_attr_tag_VFP_HP_extension): New.
|
||||
(arm_attr_public_tag arm_attr_public_tags): Support
|
||||
new attributes.
|
||||
|
||||
2008-11-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* version.c (print_version): Update copyright year.
|
||||
|
||||
2008-11-16 Danny Smith <dannysmith@usesr.sourceforge.net>
|
||||
|
||||
* dlltool.c (identify_search_section): Cast argument, not return
|
||||
value, of xstrdup to 'char*'.
|
||||
|
||||
2008-11-15 Charles Wilson <cygwin@cwilson.fastmail.fm>
|
||||
|
||||
Added --identify option to dlltool.
|
||||
* binutils/dlltool.c: Add new global variables
|
||||
identify_imp_name and identify_dll_name.
|
||||
(identify_dll_for_implib, identify_search_archive,
|
||||
identify_search_member, identify_process_section_p,
|
||||
identify_search_section): New functions.
|
||||
(usage): Added --identify.
|
||||
(long_options): Added --identify.
|
||||
(main): Handle --identify option.
|
||||
* binutils/doc/binutils.texi: Document --identify.
|
||||
|
||||
2008-11-14 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
Remove outdated mach-o specific tests.
|
||||
* objdump.c (load_debug_section): Remove mach-o specific test.
|
||||
(mach_o_uncompressed_dwarf_sections): Removed.
|
||||
(mach_o_compressed_dwarf_sections): Removed.
|
||||
(generic_uncompressed_dwarf_sections): Removed.
|
||||
(generic_compressed_dwarf_sections): Removed.
|
||||
(check_mach_o_dwarf): Removed.
|
||||
(dump_dwarf): Remove call to check_mach_o_dwarf.
|
||||
|
||||
2008-11-14 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* configure.com: Get version from configure.in of bfd.
|
||||
* makefile.vms-in (DEBUG_OBJS): Add dwarf.obj.
|
||||
(CFLAGS): Update flags.
|
||||
|
||||
2008-11-13 Hans-Peter Nilsson <hp@axis.com>
|
||||
Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* nm.c (filter_symbols): Only call memcpy when from != to.
|
||||
|
||||
2008-11-10 Tristan Gingold <gingold@adacore.com>
|
||||
Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (disassemble_bytes): Don't skip leading zeros when
|
||||
end of section calculation overflows.
|
||||
|
||||
2008-11-07 Prafulla Thakare <prafulla.thakare@kpitcummins.com>
|
||||
|
||||
* MAINTAINERS: Take over from Anil Paranjpe as H8300 maintainer.
|
||||
|
||||
2008-10-31 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* po/id.po: New file.
|
||||
* configure.in (ALL_LINGUAS): Add id.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-10-21 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* windmc.c (res_alloc): Remove unnecessary cast.
|
||||
* windres.c (res_alloc, reswr_alloc): Likewise.
|
||||
|
||||
2008-10-20 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c: Tidy up code formatting.
|
||||
|
||||
2008-10-10 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* readelf.c (display_power_gnu_attribute): Decode
|
||||
Tag_GNU_Power_ABI_Struct_Return.
|
||||
|
||||
2008-10-10 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* embedspu.sh: Pass -Wa,-noexecstack to $CC.
|
||||
|
||||
2008-10-09 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* dlltool.c (PAGE_SIZE): Make sure it has bfd_vma type.
|
||||
(PAGE_MASK): Likewise.
|
||||
(sfunc): Change to address size of bfd_vma for base-file.
|
||||
(flush_page): Likewise.
|
||||
(gen_exp_file): Likewise.
|
||||
|
||||
2008-10-07 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* readelf.c (process_section_headers): Do not cut the section names and
|
||||
types if running with --wide.
|
||||
|
||||
2008-10-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf.c (display_debug_frames): Change text for uniformity.
|
||||
(process_debug_info): Likewise.
|
||||
(display_debug_aranges): Likewise. Indent address output.
|
||||
(display_debug_pubnames): Print offset in hex.
|
||||
|
||||
2008-10-02 Andrew Paprocki <andrew@ishiboo.com>
|
||||
|
||||
PR 6934
|
||||
* stabs.c (parse_stab_string): Parse and ignore =Y<name> strings
|
||||
generated by the SUNPro C++ compiler.
|
||||
|
||||
2008-09-30 Andrew Paprocki <andrew@ishiboo.com>
|
||||
|
||||
PR 6922
|
||||
* stabs.c (parse_stab_sun_builtin_type): Parse, but ignore SUN's
|
||||
'b' and 'v' extensions.
|
||||
|
||||
2008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
|
||||
Steve Ellcey <sje@cup.hp.com>
|
||||
|
||||
* configure: Regenerate for new libtool.
|
||||
* aclocal.m4: Ditto.
|
||||
* Makefile.in: Ditto.
|
||||
* doc/Makefile.in: Ditto.
|
||||
|
||||
2008-09-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objcopy.c (setup_section): Set elf_group_id.
|
||||
|
||||
2008-09-24 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* dwarf.c (size_of_encoded_value, get_encoded_value): Move up.
|
||||
(decode_location_expression): Add section parameter. Handle
|
||||
DW_OP_GNU_encoded_addr.
|
||||
(read_and_display_attr_value): Update decode_location_expression call.
|
||||
(display_debug_loc, display_debug_frames): Likewise.
|
||||
|
||||
2008-09-25 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6913
|
||||
* dwarf.c (print_dwarf_vma): Don't call printf without format string.
|
||||
|
||||
2008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Suppress warnings on NONE relocations to discarded sections.
|
||||
* readelf.c (is_none_reloc): New function.
|
||||
(debug_apply_relocations): Ignore is_none_reloc() relocations.
|
||||
|
||||
2008-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
Fix loading large elf64 binaries on 32bit hosts.
|
||||
* configure.in: Call AC_SYS_LARGEFILE.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-09-11 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* po/sv.po: Update.
|
||||
|
||||
2008-09-08 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* BRANCHES: Add 2.18 and 2.19 release branches.
|
||||
|
||||
2008-09-08 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* NEWS: Add a marker for the 2.19 features.
|
||||
|
||||
2008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* readelf.c (load_specific_debug_section): New function, from
|
||||
load_debug_section.
|
||||
(load_debug_section): Use load_specific_debug_section.
|
||||
(display_debug_section): Use load_specific_debug_section. Check for
|
||||
multiple sections with the same name.
|
||||
|
||||
2008-08-28 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* objdump.c (dump_stabs): Add sections for Darwin.
|
||||
|
||||
2008-08-25 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* sysdep.h: Include "binary-io.h".
|
||||
(O_BINARY): Don't define here.
|
||||
* bin2c.c (O_BINARY, O_TEXT, SET_BINARY): Don't define here.
|
||||
* strings.c: Likewise.
|
||||
(main): Remove #ifdef SET_BINARY.
|
||||
* Makefile.am: Run "make dep-am"
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2008-08-24 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* configure.in: Update a number of obsolete autoconf macros.
|
||||
* configure: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
|
||||
2008-08-21 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* readelf.c (is_32bit_pcrel_reloc): Fix hppa entry.
|
||||
(is_64bit_pcrel_reloc): New.
|
||||
(debug_apply_relocations): Use it. Handle hppa pcrel bias.
|
||||
|
||||
2008-08-15 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6526
|
||||
* configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
|
||||
* Makefile.in: Regenerate.
|
||||
* aclocal.m4: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
|
||||
2008-08-09 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6615
|
||||
* rename.c (smart_rename): Punctuate error messages.
|
||||
|
||||
2008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
Daniel Jacobowitz <dan@codesourcery.com>
|
||||
Catherine Moore <clm@codesourcery.com>
|
||||
Mark Shinwell <shinwell@codesourcery.com>
|
||||
|
||||
* readelf.c (get_mips_symbol_other): Handle STO_MIPS_PLT and
|
||||
STO_MIPS_PIC.
|
||||
(slurp_rela_relocs, slurp_rel_relocs): Handle MIPS ELF64 here.
|
||||
(dump_relocations, debug_apply_relocations): Don't handle it here.
|
||||
(get_mips_dynamic_type): Handle DT_MIPS_PLTGOT and DT_MIPS_RWPLT.
|
||||
(print_mips_pltgot_entry): New function.
|
||||
(process_mips_specific): Dump the PLT GOT.
|
||||
|
||||
2008-08-08 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (is_64bit_abs_reloc): Return true for R_MIPS_64.
|
||||
|
||||
2008-08-06 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6774
|
||||
* objcopy.c (copy_object): Don't setup_bfd_headers when extract_symbol.
|
||||
(setup_section): Don't zero vma and lma when extract_symbol.
|
||||
(copy_section): Discard relocations when extract_symbol.
|
||||
* doc/binutils.texi: Update --extract-symbol description.
|
||||
|
||||
2008-08-04 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am (POTFILES.in): Set LC_ALL=C.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2008-08-04 Markus Weiss <weissms@aros.org>
|
||||
|
||||
* readelf.c (get_osabi_name <ELFOSABI_AROS>): Change name.
|
||||
|
||||
2008-08-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dwarf.c (dwarf_regnames_i386): Remove AVX registers.
|
||||
(dwarf_regnames_x86_64): Likewise.
|
||||
|
||||
2008-07-30 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* dlltool.c, dwarf.c, objdump.c, readelf.c, resrc.c, resres.c,
|
||||
windmc.c: Silence gcc warnings.
|
||||
|
||||
2008-07-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (print_vma): Typo fix.
|
||||
|
||||
2008-07-28 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 6769
|
||||
* readelf.c (print_dec_vma, print_hex_vma): Delete.
|
||||
(print_vma): Use BFD_VMA_FMT.
|
||||
* size.c (size_number, rprint_number): Likewise.
|
||||
|
||||
2008-07-26 Michael Eager <eager@eagercon.com>
|
||||
|
||||
* readelf.c (display_power_gnu_attribute): Display
|
||||
single-precision hard float.
|
||||
|
||||
2008-07-21 Luis Machado <luisgpm@br.ibm.com>
|
||||
|
||||
* readelf.c (get_note_type): Handle VSX notes.
|
||||
|
||||
2008-07-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* objdump.c (load_debug_section): Initialize section_is_compressed
|
||||
for gcc 3.4/ia64.
|
||||
* readelf.c (load_debug_section): Likewise.
|
||||
|
||||
2008-07-12 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
Revert
|
||||
2008-07-12 Jie Zhang <jie.zhang@analog.com>
|
||||
* readelf.c (get_machine_flags): Deal with Blackfin specific
|
||||
flags.
|
||||
|
||||
2008-07-12 Jie Zhang <jie.zhang@analog.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Deal with Blackfin specific
|
||||
flags.
|
||||
|
||||
2008-07-09 Craig Silverstein <csilvers@google.com>
|
||||
|
||||
* config.in: Add HAVE_ZLIB_H
|
||||
* configure.in: Add test for libz and zlib.h
|
||||
* configure: Regenerate.
|
||||
* dwarf.c (debug_displays): Add .zdebug_* strings.
|
||||
* dwarf.h (struct dwarf_section): Add fields uncompressed_namd
|
||||
and compressed_name.
|
||||
* objdump.c (load_debug_section): Call
|
||||
bfd_uncompress_section_contents when loading a compressed
|
||||
section.
|
||||
(dump_dwarf_section): Recognize compressed section name.
|
||||
(mach_o_dwarf_sections): Rename as
|
||||
mach_o_uncompressed_dwarf_sections.
|
||||
(mach_o_compressed_dwarf_sections): New variable.
|
||||
(generic_dwarf_section): Rename as
|
||||
generic_uncompressed_dwarf_sections.
|
||||
(generic_compressed_dwarf_sections): New variable.
|
||||
(check_mach_o_dwarf): Save and restore
|
||||
mach_o_compressed_dwarf_sections.
|
||||
* readelf.c: Add #include for config.h and zlib.h
|
||||
(process_section_headers): Recognize compressed section name.
|
||||
(uncompress_section_contents): New function.
|
||||
(load_debug_section): Call uncompress_section_contents when
|
||||
loading a compressed section.
|
||||
(display_debug_section): Recognize compressed section name.
|
||||
|
||||
2008-07-07 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (find_symbol_for_address): Prefer symbols in current
|
||||
section.
|
||||
|
||||
2008-07-07 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* ieee.c (write_ieee_debugging_info): Use bfd_make_section_with_flags.
|
||||
* nlmconv.c (main, powerpc_build_stubs): Likewise.
|
||||
* rescoff.c (write_coff_file): Likewise.
|
||||
* resres.c (write_res_file): Likewise.
|
||||
* windmc.c (windmc_write_bin): Likewise.
|
||||
|
||||
2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||
|
||||
* readelf.c (guess_is_rela): Add EM_CR16_OLD.
|
||||
(dump_relocations): Likewise.
|
||||
(get_machine_name): Likewise.
|
||||
(is_32bit_abs_reloc): Likewise.
|
||||
|
||||
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-06-12 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* readelf.c (guess_is_rela): Add EM_M32C_OLD.
|
||||
(dump_relocations): Likewise.
|
||||
(process_section_headers): Likewise.
|
||||
(is_32bit_abs_reloc): Likewise.
|
||||
(is_16bit_abs_reloc): Likewise.
|
||||
|
||||
2008-06-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/6483
|
||||
* objdump.c (dump_bfd): If the -g option found no STABS or IEEE
|
||||
debug information to display, try dumping DWARF information
|
||||
instead.
|
||||
* rddbg.c (read_debugging_info): Add a parameter to suppress the
|
||||
display of a warning message when no debug information is found.
|
||||
* budbg.h (read_debugging_info): Update prototype.
|
||||
* objcopy.c (copy_object): Continue to allow read_debugging_info
|
||||
to produce warning messages.
|
||||
* doc/binutils.texi (--debugging): Document new behaviour of the
|
||||
-g/--debugging option.
|
||||
|
||||
2008-06-10 Ben Elliston <bje@gnu.org>
|
||||
|
||||
* MAINTAINERS: Remove myself as m68k maintainer.
|
||||
|
||||
2008-05-14 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.in: Regenerate.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
|
||||
2008-05-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* embedspu.sh: Test for presence of ._ea by looking at section
|
||||
table rather than looking at relocs. Correct toe_addr substitution.
|
||||
|
||||
2008-05-08 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* embedspu.sh: Take note of R_SPU_PPU32/64 relocs without a symbol,
|
||||
and if present, put image in ".data.speelf". Put program handle
|
||||
in ".data.spehandle".
|
||||
|
||||
2008-05-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (print_symbol): Add code to display non-printing
|
||||
characters.
|
||||
|
||||
2008-04-30 John Heidemann <johnh@isi.edu>
|
||||
|
||||
* doc/binutils.texi (strings): Add "unicode" to the documentation
|
||||
of strings in order to make explicit that it supports this
|
||||
feature.
|
||||
|
||||
2008-04-30 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c (process_program_headers): Correct section in segment
|
||||
display.
|
||||
|
||||
2008-04-28 M Thomas <mthomas@rhrk.uni-kl.de>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/6449
|
||||
* objdump.c (slurp_file): Open the file in binary mode.
|
||||
* ar.c: Remove conditional definition of O_BINARY.
|
||||
* bin2.c: Likewise.
|
||||
* rename.c: Likewise.
|
||||
* strings.c: Likewise.
|
||||
* sysdep.h: Add conditional definition of O_BINARY.
|
||||
|
||||
2008-04-23 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-04-16 Jean-Yves Lefort <jylefort@brutele.be>
|
||||
|
||||
PR binutils/6034
|
||||
* objcopy.c (stuct symlist): Rename to
|
||||
is_specified_symbol_predicate_data.
|
||||
(strip_specific_list): Rename to strip_specific_htab.
|
||||
(strip_unneeded_list): Rename to strip_unneeded_htab.
|
||||
(keep_specific_list): Rename to keep_specific_htab.
|
||||
(localize_specific_list): Rename to localize_specific_htab.
|
||||
(globalize_specific_list): Rename to globalize_specific_htab.
|
||||
(keepglobal_specific_list): Rename to keepglobal_specific_htab.
|
||||
(weaken_specific_list): Rename to weaken_specific_htab.
|
||||
(eq_string): New function.
|
||||
(create_symbol_htab): New function.
|
||||
(create_symbol_htabs): New function.
|
||||
(add_specific_symbol): Change to use hash tables.
|
||||
(is_specified_symbol_predicate): New function.
|
||||
(is_specified_symbol): Use hash table lookup.
|
||||
(is_strip_section): Update to use new functions and hash tables.
|
||||
(filter_symbols): Likewise.
|
||||
(copy_object): Likewise.
|
||||
(copy_section): Likewise.
|
||||
(strip_main): Likewise.
|
||||
(copy_main): Likewise.
|
||||
(main): Likewise.
|
||||
|
||||
2008-04-14 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* readelf.c (get_gnu_elf_note_type): Recognize NT_GNU_GOLD_VERSION.
|
||||
|
||||
2008-04-11 Torleif Sandnes <torleif.sandnes@gmail.com>
|
||||
|
||||
* dwarf.c (display_debug_lines): Rename to
|
||||
display_debug_lines_raw.
|
||||
(display_debug_lines_decoded): New function. Displays the
|
||||
interpreted contents of a .debug_line section.
|
||||
(display_debug_lines): New function: Selects either a raw dump or
|
||||
a decoded dump (or both) as requested by the user.
|
||||
* dwarf.h (do_debug_lines_decoded): New extern.
|
||||
* readelf.c: Add support for -wL or --debug-dump=decodedline
|
||||
option to display the decoded contents of a .debug_line section.
|
||||
* doc/binutils.texi: Document the new option.
|
||||
* NEWS: Mention the new feature.
|
||||
|
||||
2008-04-08 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* dwarf.c: Remove trailing whitespace throughout file.
|
||||
|
||||
2008-04-04 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/sk.po: Updated Slovak translation.
|
||||
|
||||
2008-04-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dwarf.c (dwarf_regnames_i386): Add AVX registers.
|
||||
(dwarf_regnames_x86_64): Likewise.
|
||||
|
||||
2008-03-27 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
Add support for thin archives.
|
||||
* ar.c (make_thin_archive): New global flag.
|
||||
(map_over_members): Deal with full pathnames in thin archives.
|
||||
(usage, main): Add 'T' option for building thin archives.
|
||||
(replace_members): Pass thin archive flag to ar_emul_append.
|
||||
* arsup.c (ar_open): Initialize new flag.
|
||||
* binemul.c (ar_emul_append): Add new parameter for
|
||||
flattening nested archives.
|
||||
(do_ar_emul_default_append): New function.
|
||||
(ar_emul_default_append): Factored out recursive code.
|
||||
* binutils/binemul.h (ar_emul_default_append): Add new parameter.
|
||||
(struct bin_emulation_xfer_struct): New parameter for ar_append.
|
||||
* dlltool.c (gen_lib_file): Initialize thin archive flag.
|
||||
* emul_aix.c (ar_emul_aix_internal): Add new flatten
|
||||
parameter, currently unimplemented.
|
||||
All callers changed.
|
||||
* objcopy.c (copy_archive): Preserve thin archive flag.
|
||||
* doc/binutils.texi: Update ar documentation.
|
||||
* NEWS: Mention the new feature.
|
||||
|
||||
2008-03-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_mips_specific): Declare addr_size as int.
|
||||
|
||||
2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||
|
||||
* readelf.c (print_mips_got_entry): New function.
|
||||
(process_mips_specific): Print GOT information.
|
||||
|
||||
2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* aclocal.m4: Regenerate.
|
||||
* configure: Likewise.
|
||||
* Makefile.in: Likewise.
|
||||
* doc/Makefile.in: Likewise.
|
||||
|
||||
2008-03-16 Brian Dessent <brian@dessent.net>
|
||||
|
||||
* rcparse.y (resid): Allow control text to span multiple lines.
|
||||
|
||||
2008-03-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* readelf.c: Use %u throughout when printing sh_link or sh_info,
|
||||
%lu when printing sh_addralign.
|
||||
(process_version_sections): Use identical formats when printing
|
||||
all offset and sh_link fields.
|
||||
|
||||
2008-03-13 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* Makefile.am: Run "make dep-am".
|
||||
* Makefile.in: Regenerate.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2008-03-12 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
PR 5900
|
||||
* readelf.c (SECTION_HEADER_INDEX, SECTION_HEADER_NUM): Delete.
|
||||
Remove use throughout file.
|
||||
(SECTION_HEADER): Likewise.
|
||||
(dump_relocations): Don't adjust st_shndx for reserved range.
|
||||
(process_file_header): Mask SHN_XINDEX to values seen in external
|
||||
elf structs. Simplify valid section index tests.
|
||||
(get_32bit_elf_symbols, get_64bit_elf_symbols): Mask SHN_XINDEX.
|
||||
Map reserved st_shndx to internal form.
|
||||
(process_section_groups): Test that group symbol st_shndx is in
|
||||
range, not just non-zero. Delete reserved range check.
|
||||
(get_symbol_index_type): Mask "type" to 16 bits when printing PRC,
|
||||
OS or RSV.
|
||||
|
||||
2008-03-09 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (arm_attr_tag_VFP_arch): Add "VFPv3-D16".
|
||||
|
||||
2008-03-03 James E. Wilson <wilson@tuliptree.org>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2008-03-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dwarf.c (decode_location_expression): Handle
|
||||
DW_OP_PGI_omp_thread_num.
|
||||
|
||||
2008-03-01 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (objdump_print_addr): Initialise "sym".
|
||||
|
||||
2008-02-27 Justin Pryzby <justinpryzby@users.sourceforge.net>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* ar.c (usage): Mention -t command line switch.
|
||||
* doc/binutils.texi (ranlib): Document -t command line switch.
|
||||
|
||||
2008-02-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objdump.c (objdump_print_addr): If displaying file offsets, show
|
||||
the offset even if there are no symbols available.
|
||||
(dump_section): Display nothing if none of the section is going to
|
||||
be dumped. Display the file offset, if requested, of the location
|
||||
from where the dump starts.
|
||||
* doc/binutils.texi (objdump): Mention that dumping via the -s
|
||||
switch is also affected by the -F option.
|
||||
|
||||
2008-02-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
Re-apply this patch which was accidentally deleted:
|
||||
2006-05-16 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* doc/binutils.texi: Use "Binutils Index" for index name.
|
||||
|
||||
2008-02-22 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* objdump.c (display_file_offsets): New variable.
|
||||
(long_options): Add -F/--file-offsets.
|
||||
(objdump_print_addr_with_sym): If displaying file offsets, print
|
||||
the offset of the given address.
|
||||
(disassemble_bytes): If displaying file offsets, tell the user how
|
||||
many zeroes are skipped and the file offset of the point where
|
||||
dumping resumes.
|
||||
(disassemble_section): Only display the name of the section if
|
||||
data is going to be dumped from it.
|
||||
(main): Handle new option. Produce error messages if the start or
|
||||
stop addresses do not make sense.
|
||||
* doc/binutils.texi: Document the new feature.
|
||||
* NEWS: Mention the new feature.
|
||||
|
||||
2008-02-15 Chu Li <chul@cn.fujitsu.com>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/5713
|
||||
* strings.c (integer_arg): Delete function.
|
||||
(string_min): Initialise to 4.
|
||||
(main): Use strtoul to parse integer arguments.
|
||||
Move check for an invalid string length to after all the arguments
|
||||
have been parsed.
|
||||
(usage): Use indentation to indicate that -<n> is a another form
|
||||
of the --bytes= command line option.
|
||||
|
||||
2008-02-12 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dlltool.c (mcore_elf_cache_filename): Add a const qualifier to
|
||||
the argument.
|
||||
(scan_obj_filename): Do not drop the const qualifier when calling
|
||||
mcore_elf_cache_filename.
|
||||
(struct fname_cache): Add const qualifier to filename field.
|
||||
|
||||
2008-02-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/5713
|
||||
* strings.c (main): Set string_min to 4 if it is <= 0.
|
||||
|
||||
2008-02-07 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* objdump.c (main): Don't pass unadorned NULL to concat.
|
||||
|
||||
2008-02-04 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR 5715
|
||||
* configure: Regenerated.
|
||||
|
||||
2008-02-03 Adam Nemet <anemet@caviumnetworks.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Handle Octeon.
|
||||
|
||||
2008-01-30 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* readelf.c (dump_relocations): Decode OpenVMS-specific sections.
|
||||
(get_ia64_dynamic_type): Decode OpenVMS-specific tags.
|
||||
(get_dynamic_type): Handle IA64-specific tags.
|
||||
(get_ia64_section_type_name): Handle OpenVMS-specific sections.
|
||||
(get_section_type_name): Handle OS-specific sections (and
|
||||
particularly IA64 OpenVMS one).
|
||||
(get_elf_section_flags): Makes flags static. Add entries for IA64 and
|
||||
decode them.
|
||||
|
||||
2008-01-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dwarf.c (print_dwarf_vma): New function. Display the value of a
|
||||
dwarf_vma type at a specified precision. Use mingw field type
|
||||
specifier if necessary.
|
||||
(display_debug_loc): Use dwarf_vma type for begin and end values.
|
||||
Use print_dwarf_vma to display their values. Use byte_get_signed
|
||||
in order to correctly detect the -1 escape value.
|
||||
(display_debug_aranges): Likewise.
|
||||
(display_debug_ranges): Likewise.
|
||||
|
||||
2008-01-29 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* dwarf.c (display_debug_loc): Correct test for base address
|
||||
entry when 64-bit host dumping 32-bit object.
|
||||
|
||||
2008-01-29 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* MAINTAINERS: Remove myself as ix86 maintainer. Add for SPU.
|
||||
|
||||
2008-01-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/5529
|
||||
* rclex.c (yylex): Also allow the hypen character.
|
||||
|
||||
2008-01-28 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dwarf.c: Include "elf/common.h".
|
||||
(eh_addr_size): Changed to int.
|
||||
(dwarf_regnames_i386): New.
|
||||
(dwarf_regnames_x86_64): Likewise.
|
||||
(dwarf_regnames): Likewise.
|
||||
(dwarf_regnames_count): Likewise.
|
||||
(init_dwarf_regnames): Likewise.
|
||||
(regname): Likewise.
|
||||
(frame_display_row): Properly support different address size.
|
||||
Call regname to get register name.
|
||||
(display_debug_frames): Call regname to get register name.
|
||||
Display DW_CFA_def_cfa_register as DW_CFA_def_cfa_register
|
||||
instead of DW_CFA_def_cfa_reg.
|
||||
|
||||
* dwarf.h (init_dwarf_regnames): New.
|
||||
|
||||
* objdump.c: Include "elf-bfd.h".
|
||||
(dump_dwarf): Call init_dwarf_regnames on ELF input.
|
||||
|
||||
* readelf.c (guess_is_rela): Change argument to int.
|
||||
(parse_args): Remove the undocumented upper case options for
|
||||
-wX.
|
||||
(process_file_header): Call init_dwarf_regnames.
|
||||
|
||||
2008-01-25 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* readelf.c (process_section_headers): Add m16c handler.
|
||||
(is_16bit_abs_reloc): Recognize R_M32C_16.
|
||||
|
||||
2008-01-25 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* prdbg.c: Correct formatter style use.
|
||||
* readelf.c: Likewise.
|
||||
* strings.c: Likewise.
|
||||
|
||||
2008-01-25 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ru.po: Updated Russian translation.
|
||||
|
||||
2008-01-17 H.J. Lu <hjl.tools@gmail.com>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2008-01-14 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dwarf.c (process_debug_info): Include the CU offset and corrupt
|
||||
version value when reporting unrecognised DWARF version numbers.
|
||||
(load_debug_info): Remember a failed attempt to load and parse the
|
||||
.debug_info section and do not repeat such attempts.
|
||||
(display_debug_lines): Check the return value from load_debug_info
|
||||
and return whilst displaying a warning message if the load failed.
|
||||
(display_debug_loc): Likewise.
|
||||
(display_debug_ranges): Likewise.
|
||||
(DEBUG_INFO_UNAVAILABLE): Value stored in num_debug_info_entries
|
||||
when the .debug_info section could not be loaded/parsed.
|
||||
(process_debug_info): Display the length of the compilation unit
|
||||
in hex, so that it corresponds with the offsets that will follow.
|
||||
Tell the user if the length was 32-bit or 64-bit.
|
||||
If a DIE abbreviation could not be found, tell the user the offset
|
||||
of the DIE.
|
||||
(free_debug_memory): Do not attempt to free any entries in the
|
||||
debug_information array if num_debug_info_entries is set to
|
||||
DEBUG_INFO_UNAVAILABLE.
|
||||
|
||||
2008-01-10 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* readelf.c (is_64bit_abs_reloc): Handle R_S390_64.
|
||||
|
||||
2008-01-09 Jakub Zawadzki <darkjames@darkjames.ath.cx>
|
||||
|
||||
PR binutils/55326
|
||||
* bucomm.c (list_supported_architectures): Free architecture list
|
||||
after use.
|
||||
* windres.c (set_endianess): Likewise.
|
||||
* windmc.c (set_endianess): Likewise.
|
||||
|
||||
2008-01-08 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
PR binutils/5529
|
||||
* binutils/rclex.c: (yylex): Add ':', '_', '\\', and '/' to post
|
||||
characters for name tokens.
|
||||
|
||||
2008-01-04 Greg McGary <greg@mcgary.org>
|
||||
|
||||
* prdbg.c (print_vma): Print as long long, if host supports it.
|
||||
|
||||
2008-01-03 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value): Prefix values that are
|
||||
displayed in hexadecimal with 0x.
|
||||
For the DW_AT_import attribute display the abbreviation number and
|
||||
tag of the imported DIE.
|
||||
(process_debug_info): Warn about lengths that reserved by the
|
||||
DWARF3 specification.
|
||||
Provide more information when corrupted DIEs are detected.
|
||||
Warn if DIE corruption makes the sibling level negative.
|
||||
|
||||
For older changes see ChangeLog-2007
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,930 +0,0 @@
|
||||
2011-12-28 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value): Handle DW_LANG_Go.
|
||||
|
||||
2011-12-20 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* configure.in (--enable-deterministic-archives): Grok new
|
||||
argument. Set DEFAULT_AR_DETERMINISTIC to 1 or 0 accordingly.
|
||||
* configure: Regenerated.
|
||||
* config.in: Regenerated.
|
||||
* ar.c (deterministic): Initialize to -1.
|
||||
(decode_options, ranlib_main): Grok U option.
|
||||
(usage, ranlib_usage): Mention U; say for D and U which is the default.
|
||||
(default_deterministic): New function.
|
||||
(ranlib_main): Call it.
|
||||
(main): Likewise. Make newer_only && deterministic error
|
||||
non-fatal if it was just DEFAULT_AR_DETERMINISTIC and not the D option.
|
||||
* doc/binutils.texi (ar cmdline, ranlib): Document U modifier and
|
||||
--enable-deterministic-archives behavior.
|
||||
|
||||
2011-12-16 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c: Include mach-o/codesign.h
|
||||
(OPT_CODESIGN): Define.
|
||||
(options): Add an entry for codesign.
|
||||
(mach_o_help): Likewise.
|
||||
(dump_header): Fix indentation.
|
||||
(dump_thread): Do not test result of xmalloc.
|
||||
(bfd_mach_o_cs_magic, bfd_mach_o_cs_hash_type): New.
|
||||
(dump_code_signature_superblob): New function.
|
||||
(swap_code_codedirectory_v1_in): Likewise.
|
||||
(hexdump): Likewise.
|
||||
(dump_code_signature_codedirectory): Likewise.
|
||||
(dump_code_signature_blob, dump_code_signature): Likewise.
|
||||
(dump_load_command): Dump code signature.
|
||||
(mach_o_dump): Likewise.
|
||||
|
||||
2011-12-15 Andreas Tobler <andreast@fgznet.ch>
|
||||
|
||||
* readelf.c (get_symbol_type): Add ELFOSABI_FREEBSD to the
|
||||
supported abi's.
|
||||
|
||||
2011-12-13 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-macho.c: New file.
|
||||
* objdump.h (objdump_private_desc_mach_o): Add.
|
||||
* configure.in: Add Mach-O od_vectors.
|
||||
* Makefile.am (CFILES): Add od-macho.c
|
||||
* configure: Regenerate.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2011-12-06 David Daney <david.daney@cavium.com>
|
||||
|
||||
* readelf.c (dynamic_section_mips_val): Factor out trailing '\n'
|
||||
from printed strings and move it to the end of the function.
|
||||
Use BFD_VMA_FMT for printf format specifier for dynamic tag value.
|
||||
Use print_vma() to print dynamic tag values.
|
||||
|
||||
2011-12-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (ia64_process_unwind): Turn into a void funtion.
|
||||
(hppa_process_unwind): Likewise.
|
||||
(arm_process_unwind): Likewise.
|
||||
(process_unwind): Likewise.
|
||||
(arm_get_section_word): Rename to get_unwind_section_word.
|
||||
Add sym_name parameter to return the offset into the string table
|
||||
of the symbol associated with the reloc applied to the word.
|
||||
(decode_tic6x_unwind_regmask): Add NULL argument to invocation of
|
||||
get_unwind_section_word.
|
||||
(dump_arm_unwind): Likewise.
|
||||
(decode_arm_unwind_bytecode): Prepend a comma when *not* the first
|
||||
register in a list.
|
||||
(decode_arm_unwind): If the returned function address is 0 and a
|
||||
valid symname offset is provided use that to compute the name
|
||||
associated with the entry.
|
||||
Add extra checks of the compact model index entry.
|
||||
|
||||
2011-11-29 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* ar.c (ranlib_usage): Describe -D.
|
||||
(ranlib_main): Parse -D.
|
||||
(ranlib_touch): Set BFD_DETERMINISTIC_OUTPUT under -D.
|
||||
* doc/binutils.texi (ranlib): Describe -D, and also --help/-h/-H.
|
||||
|
||||
2011-11-28 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13421
|
||||
* readelf.c (arm_section_get_word): Add descriptive comments.
|
||||
Initliase the rel_type field of the arm_sec structure.
|
||||
(expand_prel31): Rename to arm_expand_prel31.
|
||||
(dump_arm_unwind): Use new name.
|
||||
Print the function name based on the function address entry.
|
||||
|
||||
2011-11-11 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* readelf.c (process_program_headers): Fix typo printing p_memsz
|
||||
field.
|
||||
|
||||
2011-11-01 DJ Delorie <dj@redhat.com>
|
||||
|
||||
* readelf.c: Include elf/rl78.h
|
||||
(guess_is_rela): Handle EM_RL78.
|
||||
(dump_relocations): Likewise.
|
||||
(get_machine_name): Likewise.
|
||||
(is_32bit_abs_reloc): Likewise.
|
||||
* NEWS: Mention addition of RL78 support.
|
||||
* MAINTAINERS: Add myself as RL78 port maintainer.
|
||||
|
||||
2011-10-28 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* dwarf.c (display_debug_frames): If do_debug_frames_interp,
|
||||
DW_CFA_restore goes to DW_CFA_undefined, not DW_CFA_unreferenced.
|
||||
|
||||
2011-10-28 Walter Lee <walt@tilera.com>
|
||||
|
||||
* NEWS: Mention addition of TILEPro and TILE-Gx support.
|
||||
* MAINTAINERS: Add myself as TILEPro and TILE-Gx port maintainer.
|
||||
|
||||
2011-10-27 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
* MAINTAINERS: Add myself as EPIPHANY port maintainer.
|
||||
|
||||
2011-10-25 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* Makefile.am (syslex.@OBJEXT@): Add -I$(srcdir).
|
||||
* Makefile.in: Regen.
|
||||
|
||||
2011-10-25 Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
|
||||
* readelf.c: Include "elf/epiphany.h".
|
||||
(guess_is_rela, dump_relocation): Handle EM_ADAPTEVA_EPIPHANY.
|
||||
(get_machine_name, is_32bit_abs_reloc, is_32bit_pcrel_reloc): Likewise.
|
||||
(is_16bit_abs_reloc, is_none_reloc): Likewise.
|
||||
* po/binutils.pot: Regenerate.
|
||||
|
||||
2011-10-25 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* winduni.h (unicode_from_ascii_len): New prototype.
|
||||
* winduni.c (unicode_from_ascii_len): New function.
|
||||
* windres.h (define_stringtable): Add additional length argument.
|
||||
* windres.c (define_stringtable): Add length argument for string.
|
||||
* rcparse.y (res_unicode_sizedstring): New rule.
|
||||
(res_unicode_sizedstring_concat): Likewise.
|
||||
(string_data): Adjust rule.
|
||||
|
||||
2011-10-24 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value) <DW_AT_import>: Add CU_OFFSET
|
||||
also for DW_FORM_ref_udata.
|
||||
|
||||
2011-10-24 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ja.po: Updated Japanese translation.
|
||||
|
||||
2011-10-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/13278
|
||||
* ar.c (open_inarch): Set the target from the the first object
|
||||
on the list only if it isn't set.
|
||||
|
||||
2011-10-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
Fixes to aid translation:
|
||||
* addr2line.c (translate_address): Add comments describing context
|
||||
of a couple of printf statements.
|
||||
* ar.c (write_archive): Allow translation of error message.
|
||||
* bucomm.c (endian_string): Allow translation of strings.
|
||||
(display_target_list): Allow translation.
|
||||
* coffdump.c (dump_coff_type): Allow translation of output.
|
||||
(dump_coff_where): Likewise.
|
||||
(dump_coff_symbol): Likewise.
|
||||
(dump_coff_scope): Likewise.
|
||||
(dump_coff_sfile): Likewise.
|
||||
(dump_coff_section): Likewise.
|
||||
(coff_dump): Likewise.
|
||||
* dlltool (def_version): Allow translation of output.
|
||||
(run): Likewise.
|
||||
* dllwrap.c (run): Allow translation of output.
|
||||
* dwarf.c (print_dwarf_vma): Allow translation of output.
|
||||
(process_extended_line_op): Remove spurious translation.
|
||||
Add translation for strings that can be translated.
|
||||
(decode_location_exression): Allow translation of output.
|
||||
(read_and_display_attr_value): Allow translation of output.
|
||||
* readelf.c (slurp_rela_relocs): Add translation for error
|
||||
messages when failing to get data.
|
||||
(slurp_rel_relocs): Likewise.
|
||||
(get_32bit_elf_symbols): Likewise.
|
||||
(get_64bit_elf_symbols): Likewise.
|
||||
(dump_ia64_vms_dynamic_relocs): Replace abbreviation with full
|
||||
word.
|
||||
(process_relocs): Remove spurious translation.
|
||||
(decode_tic6x_unwind_bytecode): Likewise.
|
||||
(process_version_section): Improve error messages.
|
||||
(process_mips_specific): Likewise.
|
||||
(print_gnu_note): Remove spurious translation.
|
||||
(print_stapsdt_note): Likewise.
|
||||
(get_ia64_vms_note_type): Likewise.
|
||||
* sysdump.c (getCHARS): Allow translation.
|
||||
(fillup): Allow translation of output.
|
||||
(getone): Likewise.
|
||||
(must): Likewise.
|
||||
(derived_type): Likewise.
|
||||
* doc/binutils.doc (addr2line): Extend description of command line
|
||||
options.
|
||||
* po/binutils.pot: Regenerate.
|
||||
|
||||
2011-10-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/13219
|
||||
* readelf.c (GET_ELF_SYMBOLS): Add sym_count parameter.
|
||||
(get_32bit_elf_symbols): Add num_syms_return argument.
|
||||
Return the number of symbols loaded into the symbol table.
|
||||
(get_64bit_elf_symbols): Likewise.
|
||||
(process_section_headers): Use GET_ELF_SYMBOLS to initialise
|
||||
symbol count.
|
||||
(proces_relocs): Likewise.
|
||||
(ia64_process_unwind): Likewise.
|
||||
(hppa_process_unwind): Likewise.
|
||||
(arm_process_unwind): Likewise.
|
||||
(process_dynamic_section): Likewise.
|
||||
(process_version_sections): Likewise.
|
||||
(process_symbol_table): Likewise.
|
||||
(process_section_groups): Likewise.
|
||||
Add check before indexing into the symbol table.
|
||||
(apply_relocations): Likewise.
|
||||
|
||||
2011-10-11 Chris <player1@onet.eu>
|
||||
|
||||
PR binutils/13051
|
||||
Fix a syntax error bug when compiling rc files with the VERSIONINFO resource
|
||||
containing more than one language block inside a single StringFileInfo block.
|
||||
|
||||
* windint.h (rc_ver_stringtable): New structure definition.
|
||||
(rc_ver_info): Use it.
|
||||
* rcparse.y (verstringtable): New variable.
|
||||
(verstringtables): New type.
|
||||
(verstringtables:): New rule declaration.
|
||||
(verblocks:): Use it.
|
||||
* resrc.c (append_ver_stringtable): New function.
|
||||
(append_ver_stringfileinfo): Update to use stringtables.
|
||||
* windres.h (append_ver_stringfileinfo): Update declaration.
|
||||
(append_ver_stringtable): New declaration.
|
||||
* resrc.c (write_rc_versioninfo): Update to support multiple blocks.
|
||||
* resbin.c (bin_to_res_version): Likewise.
|
||||
(res_to_bin_versioninfo): Likewise.
|
||||
|
||||
2011-10-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/bg.po: Updated Bulgarian translation.
|
||||
* po/es.po: Updated Spansih translation.
|
||||
* po/fi.po: Updated Finnish translation.
|
||||
* po/fr.po: Updated French translation.
|
||||
|
||||
2011-10-05 DJ Delorie <dj@redhat.com>
|
||||
Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (get_machine_dlags): Add support for RX's PID mode.
|
||||
|
||||
2011-10-04 Paul Woegerer <paul_woegerer@mentor.com>
|
||||
Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* dwarf.c (display_debug_lines_decoded): Index directory_table with
|
||||
directory_index from file_table entry.
|
||||
|
||||
2011-09-30 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* binutils/dwarf.h (dwarf_section_display_enum): Add missing enum
|
||||
constant.
|
||||
|
||||
2011-09-28 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-xcoff.c (dump_xcoff32_aout_header): Fix typo.
|
||||
|
||||
2011-09-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-xcoff.c (dump_xcoff32_aout_header): Remove some gettext macros.
|
||||
(dump_xcoff32_sections_header): Likewise.
|
||||
(dump_xcoff32_symbols, dump_xcoff32_relocs): Likewise.
|
||||
(dump_xcoff32_lineno, dump_xcoff32_loader): Likewise.
|
||||
(dump_xcoff32_except): Likewise.
|
||||
(dump_xcoff32_typchk, dump_xcoff32_tbtags): Likewise.
|
||||
|
||||
2011-09-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* readelf.c (print_ia64_vms_note): Fix xgettext warnings.
|
||||
|
||||
2011-09-22 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* NEWS: Add marker for 2.22.
|
||||
|
||||
2011-09-21 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* MAINTAINER: Take over from Jakub Jalinek as SPARC maintainer.
|
||||
|
||||
* readelf.c (display_sparc_hwcaps): New.
|
||||
(display_sparc_gnu_attribute): New.
|
||||
(process_sparc_specific): New.
|
||||
(process_arch_specific): When EM_SPARC, EM_SPARC32PLUS,
|
||||
or EM_SPARCV9 invoke process_sparc_specific.
|
||||
|
||||
2011-09-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/13196
|
||||
* dwarf.c (display_debug_aranges): Check zero address size.
|
||||
|
||||
2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/13180
|
||||
* objcopy.c (is_strip_section_1): New.
|
||||
(is_strip_section): Use it. Remove the group section if all
|
||||
members are removed.
|
||||
|
||||
2011-09-08 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/ja.po: Updated Japanese translation.
|
||||
|
||||
2011-08-26 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/es.po: Updated Spanish translation.
|
||||
|
||||
2011-08-08 Marcus Comstedt <marcus@mc.pp.se>
|
||||
|
||||
PR binutils/12964
|
||||
* Makefile.am (embedspu): Use awk rather than sed.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2011-07-27 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf.c (read_and_display_attr_value): Recognize DW_FORM_data4 and
|
||||
DW_FORM_data8 as location list pointers only for DWARF < 4.
|
||||
|
||||
2011-07-26 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* NEWS: Mention .debug_macro support.
|
||||
* dwarf.c (read_and_display_attr_value): Don't print a tab
|
||||
if attribute is 0.
|
||||
(get_AT_name): Handle DW_AT_GNU_macros.
|
||||
(get_line_filename_and_dirname, display_debug_macro): New
|
||||
functions.
|
||||
(debug_displays): Add an entry for .debug_macro and .zdebug_macro.
|
||||
* readelf.c (process_section_headers): With do_debug_macinfo
|
||||
handle also .debug_macro sections.
|
||||
* dwarf.h (dwarf_section_display_enum): Add macro.
|
||||
|
||||
2011-07-24 Chao-ying Fu <fu@mips.com>
|
||||
Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* readelf.c (get_machine_flags): Handle microMIPS ASE.
|
||||
(get_mips_symbol_other): Likewise.
|
||||
|
||||
2011-07-22 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* dwarf.c (init_dwarf_regnames): Handle EM_K1OM.
|
||||
|
||||
* elfedit.c (elf_machine): Support EM_K1OM.
|
||||
(elf_class): Likewise.
|
||||
|
||||
* readelf.c (guess_is_rela): Handle EM_K1OM.
|
||||
(dump_relocations): Likewise.
|
||||
(get_machine_name): Likewise.
|
||||
(get_section_type_name): Likewise.
|
||||
(get_elf_section_flags): Likewise.
|
||||
(process_section_headers): Likewise.
|
||||
(get_symbol_index_type): Likewise.
|
||||
(is_32bit_abs_reloc): Likewise.
|
||||
(is_32bit_pcrel_reloc): Likewise.
|
||||
(is_64bit_abs_reloc): Likewise.
|
||||
(is_64bit_pcrel_reloc): Likewise.
|
||||
(is_none_reloc): Likewise.
|
||||
|
||||
* doc/binutils.texi: Mention K1OM for elfedit.
|
||||
|
||||
2011-07-11 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
PR 12983
|
||||
* binutils/nm.c (display_file): Decompress debug sections when
|
||||
printing line numbers.
|
||||
|
||||
2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
|
||||
Thomas Schwinge <thomas@schwinge.name>
|
||||
|
||||
PR binutils/12913
|
||||
* elfedit.c (osabis): Use ELFOSABI_GNU name instead of ELFOSABI_LINUX
|
||||
alias and ELFOSABI_HURD. Add GNU alias.
|
||||
* readelf.c (get_osabi_name, get_symbol_binding, get_symbol_type):
|
||||
Likewise.
|
||||
* doc/binutils.texi <elfedit>: Update accordingly.
|
||||
|
||||
2011-07-01 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/12325
|
||||
* doc/binutils.texi (ar cmdline): Document --target, --version and
|
||||
--help command line options.
|
||||
|
||||
2011-06-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/12558
|
||||
* ar.c (main): When asked to move members in an archive that is
|
||||
being created, ignore the move request.
|
||||
|
||||
2011-06-29 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (get_section_type_name): When displaying an unknown
|
||||
section type display the hex value first on the assumption that
|
||||
the full message will probably be truncated into a 15 character
|
||||
field.
|
||||
|
||||
2011-06-22 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (decode_location_expression): For DW_OP_GNU_convert and
|
||||
DW_OP_GNU_reinterpret, if uvalue is 0, don't add cu_offset.
|
||||
Handle DW_OP_GNU_parameter_ref.
|
||||
|
||||
2011-06-16 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* dwarf-mode.el (dwarf-do-insert-substructure): Call
|
||||
expand-file-name.
|
||||
(dwarf-do-refresh): Likewise.
|
||||
|
||||
2011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
|
||||
|
||||
* readelf.c (get_note_type): Handle NT_ARM_VFP.
|
||||
|
||||
2011-06-13 Walter Lee <walt@tilera.com>
|
||||
|
||||
* readelf.c: Include tilepro.h and tilegx.h.
|
||||
(guess_is_rela): Handle EM_TILEGX and EM_TILEPRO.
|
||||
(dump_relocations): Likewise.
|
||||
(get_machine_name): Likewise.
|
||||
(is_32bit_abs_reloc): Likewise.
|
||||
(is_32bit_pcerel_reloc): Likewise.
|
||||
(is_64bit_abs_reloc): Likewise.
|
||||
(is_64bit_pcrel_reloc): Likewise.
|
||||
|
||||
2011-06-09 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-xcoff.c (xcoff32_read_symbols): Allow missing string table
|
||||
length.
|
||||
|
||||
2011-06-08 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/12855
|
||||
* readelf.c (process_version_sections): Handle binaries containing
|
||||
corrupt version information.
|
||||
(process_symbol_table): Stop processing a symbol's version
|
||||
information if it could not be read in.
|
||||
|
||||
(get_data): Add comment describing the function.
|
||||
(process_section_headers): Set dynamic_strings_length to 0 if the
|
||||
dynamic strings could not be read in.
|
||||
(process_dynamic_section): Likewise.
|
||||
(process_section_groups): Stop processing the group information if
|
||||
the data could not be read in.
|
||||
(hppa_processs_unwind): Assert that there is only one string table
|
||||
in the file.
|
||||
(arm_process_unwind): Likewise.
|
||||
(ia64_process_unwind): Likewise.
|
||||
Set the size of the unwind auxillary information to 0 if the data
|
||||
could not be read.
|
||||
(load_specific_debug_section): Handle a failure to read in the
|
||||
section.
|
||||
(process_mips_specific): Stop display of the PLT GOT section if it
|
||||
could not be read in.
|
||||
|
||||
2011-06-08 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* makefile.vms (DEFS): Define OBJDUMP_PRIVATE_VECTORS.
|
||||
|
||||
2011-06-07 Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* dwarf.c: Fix conversion to TU number.
|
||||
|
||||
2011-06-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* resres.c: Fix spelling typo.
|
||||
* windint.h: Likewise.
|
||||
* windmc.c: Likewise.
|
||||
* windres.c: Likewise.
|
||||
* po/POTFILES.in: Regenerate.
|
||||
* po/binutils.pot: Regenerate.
|
||||
|
||||
2011-06-01 Daniel Jacobowitz <drow@false.org>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2011-05-31 Matthias Klose <doko@ubuntu.com>
|
||||
|
||||
* configure.in (BUILD_INSTALL_MISC): Only add embedspu once.
|
||||
* configure: Regenerate.
|
||||
|
||||
2011-05-30 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/12820
|
||||
* Makefile.am (bin_PROGRAMS): Move BUILD_INSTALL_MISC to..
|
||||
(bin_SCRIPTS): ..here.
|
||||
(EXTRA_SCRIPTS): Define.
|
||||
(EXTRA_DIST): Add embedspu.sh.
|
||||
(DISTCLEANFILES): Add embedspu.
|
||||
(embedspu): Depend on Makefile. Replace sed "s" command with "c".
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2011-05-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (loc_offsets): New variable.
|
||||
(loc_offsets_compar): New routine.
|
||||
(display_debug_loc): Handle loc_offsets not being in ascending order
|
||||
and also a single .debug_loc entry being used multiple times.
|
||||
|
||||
2011-05-18 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/12753
|
||||
* nm.c (filter_symbols): Treat unique symbols as global symbols.
|
||||
* doc/binutils.texi (nm): Mention that some lowercase letters
|
||||
actually indicate global symbols.
|
||||
|
||||
2011-05-15 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* od-xcoff.c: New file.
|
||||
* objdump.h: New file.
|
||||
* objdump.c: Include objdump.h
|
||||
(dump_private_options, objdump_private_vectors): New variables.
|
||||
(usage): Mention -P/--private. Display handled options.
|
||||
(long_options): Add -P/--private.
|
||||
(dump_target_specific): New function.
|
||||
(dump_bfd): Handle dump_private_options.
|
||||
(main): Handle -P.
|
||||
* doc/binutils.texi (objdump): Document -P/--private.
|
||||
* configure.in (OBJDUMP_PRIVATE_VECTORS, OBJDUMP_PRIVATE_OFILES):
|
||||
New variables, compute them.
|
||||
(od_vectors): Add vectors for private dumpers. Make them uniq.
|
||||
(OBJDUMP_DEFS): Add OBJDUMP_PRIVATE_VECTORS.
|
||||
* Makefile.am (HFILES): Add objdump.h
|
||||
(CFILES): Add od-xcoff.c
|
||||
(OBJDUMP_PRIVATE_OFILES): New variable.
|
||||
(objdump_DEPENDENCIES): Append OBJDUMP_PRIVATE_OFILES.
|
||||
(objdump_LDADD): Ditto.
|
||||
(EXTRA_objdump_SOURCES): Define.
|
||||
* Makefile.in: Regenerate.
|
||||
* configure: Regenerate.
|
||||
|
||||
2011-05-10 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* dwarf.c (process_extended_line_op): Dump unknown records.
|
||||
|
||||
2011-05-07 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/12632
|
||||
* objcopy.c (copy_archive): Check bfd_openw result in unknown object
|
||||
case. Rewrite without goto.
|
||||
|
||||
2011-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (decode_location_expression): Handle DW_OP_GNU_const_type,
|
||||
DW_OP_GNU_regval_type, DW_OP_GNU_deref_type, DW_OP_GNU_convert
|
||||
and DW_OP_GNU_reinterpret.
|
||||
|
||||
* MAINTAINERS: Add myself as DWARF2 maintainer.
|
||||
|
||||
2011-05-02 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR binutils/12720
|
||||
Revert the following change
|
||||
Michael Snyder <msnyder@vmware.com>
|
||||
* ar.c (move_members): Plug memory leak.
|
||||
(delete_members): Plug memory leak.
|
||||
|
||||
2011-04-28 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* NEWS: Add note about --dwarf-depth, --dwarf-start, and
|
||||
dwarf-mode.el.
|
||||
* objdump.c (suppress_bfd_header): New global.
|
||||
(usage): Update.
|
||||
(OPTION_DWARF_DEPTH, OPTION_DWARF_START): New constants.
|
||||
(options): Add dwarf-depth and dwarf-start entries.
|
||||
(dump_bfd): Use suppress_bfd_header.
|
||||
(main): Handle OPTION_DWARF_START, OPTION_DWARF_DEPTH.
|
||||
* doc/binutils.texi (objcopy): Document --dwarf-depth and
|
||||
--dwarf-start.
|
||||
(readelf): Likewise.
|
||||
* dwarf-mode.el: New file.
|
||||
* dwarf.c (dwarf_cutoff_level, dwarf_start_die): New globals.
|
||||
(read_and_display_attr_value): Also check debug_info_p.
|
||||
(process_debug_info): Handle dwarf_start_die and
|
||||
dwarf_cutoff_level.
|
||||
* dwarf.h (dwarf_cutoff_level, dwarf_start_die): Declare.
|
||||
* readelf.c (usage): Update.
|
||||
(OPTION_DWARF_DEPTH): New macro.
|
||||
(OPTION_DWARF_START): Likewise.
|
||||
(options): Add dwarf-depth and dwarf-start entries.
|
||||
(parse_args): Handle OPTION_DWARF_START and OPTION_DWARF_DEPTH.
|
||||
|
||||
2011-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf.c (display_gdb_index): Support version 5, warn on version 4.
|
||||
|
||||
2011-04-27 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* dwarf.c (process_extended_line_op): Handle
|
||||
DW_LNE_HP_source_file_correlation.
|
||||
|
||||
2011-04-27 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/da.po: Updated Danish translation.
|
||||
|
||||
2011-04-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* readelf.c (print_stapsdt_note): New function.
|
||||
(process_note): Use it.
|
||||
|
||||
2011-04-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* readelf.c (get_stapsdt_note_type): New function.
|
||||
(process_note): Recognize "stapsdt" notes.
|
||||
|
||||
2011-04-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* readelf.c (process_corefile_note_segment): Change header field
|
||||
widths.
|
||||
(process_note): Change field widths.
|
||||
|
||||
2011-04-21 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* readelf.c (print_gnu_note): New function.
|
||||
(process_note): Use it.
|
||||
|
||||
2011-04-21 Jie Zhang <jzhang918@gmail.com>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2011-04-11 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* windres.c (usage): Add new --preprocessor-arg option.
|
||||
(option_values): Add new OPTION_PREPROCESSOR_ARG enumerator.
|
||||
(option long_options): Add preprocessor-arg option.
|
||||
(main): Handle it.
|
||||
* doc/binutils.texi: Add documentation for --preprocessor-arg
|
||||
option.
|
||||
* NEWS: Add line about new --preprocessor-arg option for windres.
|
||||
|
||||
2011-04-08 John Marino <binutils@marino.st>
|
||||
|
||||
* arlex.l: Prevent redefinition of YY_NO_UNPUT.
|
||||
* syslex.l: Likewise.
|
||||
|
||||
2011-04-07 Paul Brook <paul@codesourcery.com>
|
||||
|
||||
* readelf.c (arm_section_get_word): Handle C6000 relocations.
|
||||
(decode_tic6x_unwind_regmask, decode_arm_unwind_bytecode,
|
||||
decode_tic6x_unwind_bytecode, expand_prel31): New functions.
|
||||
(decode_arm_unwind): Split out common code from ARM specific bits.
|
||||
(dump_arm_unwind): Use expand_prel31.
|
||||
(arm_process_unwind): Handle SHT_C6000_UNWIND sections.
|
||||
(process_unwind): Add SHT_C6000_UNWIND.
|
||||
|
||||
2011-04-06 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* configure.in (thumb-*-pe*): Remove.
|
||||
* configure: Regenerate.
|
||||
|
||||
2011-04-05 Sterling Augustine <augustine.sterling@gmail.com>
|
||||
|
||||
* MAINTAINERS: Update my email address.
|
||||
|
||||
2011-04-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/12632
|
||||
* objcopy.c (copy_unknown_object): Make the archive element
|
||||
readable.
|
||||
|
||||
2011-04-03 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* objdump.c (dump_reloc_set): Output R_SPARC_OLO10 relocations
|
||||
accurately, rather than how they are represented internally.
|
||||
|
||||
2011-03-31 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* makefile.vms (readelf.exe): New target.
|
||||
|
||||
2011-03-31 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* makefile.vms (DEBUG_OBJS): Add elfcomm.obj.
|
||||
|
||||
2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
|
||||
|
||||
* readelf.c (get_symbol_index_type): Handle SCOM for TIC6X.
|
||||
(dump_relocations): Likewise.
|
||||
|
||||
2011-03-31 Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
* readelf.c (get_ia64_vms_note_type): New function.
|
||||
(print_ia64_vms_note): Ditto.
|
||||
(process_note): Recognize VMS/ia64 specific notes.
|
||||
Display them.
|
||||
(process_corefile_note_segment): Decode VMS notes.
|
||||
|
||||
2011-03-30 Catherine Moore <clm@codesourcery.com>
|
||||
|
||||
* addr2line.c (translate_addresses): Sign extend the pc
|
||||
if sign_extend_vma is enabled.
|
||||
|
||||
2011-03-30 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
|
||||
|
||||
* readelf.c (process_gnu_liblist): Stop memory leak.
|
||||
|
||||
2011-03-29 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* coffdump.c: Include bfd_stdint.h
|
||||
|
||||
2011-03-28 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
* coffdump.c (coff_dump): Correct spelling error.
|
||||
(show_usage): Replace SYSROFF by COFF.
|
||||
|
||||
2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
* coffdump.c (dump_coff_scope): Use double typecast for pointer P
|
||||
to allow compilation for all targets.
|
||||
|
||||
2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
* dwarf.c (process_debug_info): Use offset_size to determine
|
||||
the bit-size of the computation unit's offset.
|
||||
(decode_location_expression): Use dwarf_vmatoa function to display
|
||||
DW_OP_addr OP.
|
||||
(process_debug_info): Use dwarf_vma type for local variables
|
||||
length and type_offset.
|
||||
|
||||
2011-03-25 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* strings.c (print_strings): Plug memory leak.
|
||||
* ar.c (move_members): Plug memory leak.
|
||||
(delete_members): Plug memory leak.
|
||||
(write_archive): Plug memory leak.
|
||||
* ieee.c (ieee_add_bb11): Plug memory leak.
|
||||
(ieee_function_type): Likewise.
|
||||
(ieee_class_baseclass): Likewise.
|
||||
* prdbg.c (pr_function_type): Close memory leaks.
|
||||
(pr_method_type): Likewise.
|
||||
(tg_class_static_member): Likewise.
|
||||
(tg_class_method_variant): Likewise.
|
||||
(tg_class_static_method_variant): Likewise.
|
||||
* stabs.c (parse_stab_enum_type): Fix memory leaks.
|
||||
(parse_stab_struct_type): Likewise.
|
||||
(parse_stab_struct_fields): Likewise.
|
||||
(parse_stab_one_struct_field): Likewise.
|
||||
(parse_stab_members): Likewise.
|
||||
(stab_demangle_qualified): Likewise.
|
||||
* objdump.c (dump_reloc_set): Free malloced memory.
|
||||
* bucomm.c (make_tempname): Stop memory leak.
|
||||
|
||||
2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
Replace bfd_vma type and analog types by dwarf_vma and analogs.
|
||||
Use dwarf specific print functions to display these type values.
|
||||
* dwarf.h (dwarf_signed_vma): New type;
|
||||
(DWARF2_External_LineInfo): Replace bfd_vma by dwarf_vma.
|
||||
(DWARF2_External_PubNames): Likewise.
|
||||
(DWARF2_External_CompUnit): Likewise.
|
||||
(DWARF2_External_ARange): Likewise.
|
||||
(read_leb128): Change return type to dwarf_vma.
|
||||
* dwarf.c (print_dwarf_vma): Use __MINGW32__ conditional and
|
||||
check byte_size values.
|
||||
(dwarf_vmatoa): Change parameter type to dwarf_vma.
|
||||
(dwarf_svmatoa): New static function.
|
||||
(read_leb128): Change return type to dwarf_vma.
|
||||
(read_sleb128): New static function.
|
||||
(struct State_Machine_Registers): Change address field type to
|
||||
dwarf_vma.
|
||||
(process_extended_line_op): Adapt to type changes.
|
||||
(fetch_indirect_string): Likewise.
|
||||
(idisplay_block): Likewise.
|
||||
(decode_location_expression): Likewise.
|
||||
(read_and_display_attr_value): Likewise.
|
||||
(process_debug_info): Likewise.
|
||||
(display_debug_lines_raw): Likewise.
|
||||
(display_debug_lines_decoded): Likewise.
|
||||
(SLEB macro): Use new read_sleb128 function.
|
||||
|
||||
2011-03-17 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR 12590
|
||||
* ar.c (ranlib_main): Init arg_index properly.
|
||||
(usage): Describe --target.
|
||||
|
||||
2011-03-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* dwarf.c (dw_TAG_name): Handle DW_TAG_GNU_call_site_parameter.
|
||||
(read_and_display_attr_value): Handle DW_AT_GNU_call_site_data_value,
|
||||
DW_AT_GNU_call_site_target and DW_AT_GNU_call_site_target_clobbered.
|
||||
(get_AT_name): Handle DW_AT_GNU_call_site_value,
|
||||
DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
|
||||
DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
|
||||
DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites and
|
||||
DW_AT_GNU_all_source_call_sites.
|
||||
(decode_location_expression) <case DW_OP_GNU_entry_value>: Adjust
|
||||
handling.
|
||||
|
||||
2011-03-16 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
|
||||
* dwarf.c (get_TAG_name): Handle DW_TAG_GNU_call_site.
|
||||
(decode_location_expression): Handle DW_OP_GNU_entry_value.
|
||||
(read_and_display_attr_value): Handle DW_AT_GNU_call_site_value.
|
||||
(get_AT_name): Likewise.
|
||||
|
||||
2011-03-14 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* objcopy.c (set_pe_subsystem): Free subsystem.
|
||||
|
||||
* wrstabs.c (stab_start_struct_type): Close memory leak.
|
||||
|
||||
* readelf.c (process_version_sections): Free symbols.
|
||||
|
||||
* nm.c (display_rel_file): Free symsizes.
|
||||
|
||||
2011-03-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (get_machine_name): Update EM_V850 entry.
|
||||
|
||||
2011-03-03 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* objdump.c (usage): Fix single typo.
|
||||
* po/bg.po, po/binutils.pot, po/da.po, po/es.po, po/fi.po,
|
||||
po/fr.po, po/id.po, po/ja.po, po/ru.po, po/vi.po: Likewise.
|
||||
|
||||
2011-03-01 Akos Pasztory <akos.pasztory@gmail.com>
|
||||
|
||||
PR binutils/12523
|
||||
* readelf.c (process_object): Clear dynamic_info_DT_GNU_HASH.
|
||||
|
||||
2011-02-28 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* debug.c (debug_start_source): Use filename_(n)cmp.
|
||||
* ieee.c (ieee_finish_compilation_unit): Likewise.
|
||||
(ieee_lineno): Likewise.
|
||||
* nlmconv.c (main): Likewise.
|
||||
* objcopy.c (strip_main): Likewise.
|
||||
(copy_main): Likewise.
|
||||
* objdump.c (show_line): Likewise.
|
||||
(dump_reloc_set): Likewise.
|
||||
* srconv.c (main): Likewise.
|
||||
* wrstabs.c (stab_lineno): Likewise.
|
||||
|
||||
2011-02-24 Zachary T Welch <zwelch@codesourcery.com>
|
||||
|
||||
* readelf.c (decode_arm_unwind): Implement decoding of remaining
|
||||
ARM unwind instructions (i.e. VFP/NEON and Intel Wireless MMX).
|
||||
|
||||
2011-02-23 Kai Tietz <kai.tietz@onevision.com>
|
||||
|
||||
* dwarf.c (read_leb128): Use bfd_vma instead of
|
||||
long type.
|
||||
(dwarf_vmatoa): New helper routine.
|
||||
(process_extended_line_op): Use for adr bfd_vma
|
||||
type and print those typed values via BFD_VMA_FMT
|
||||
or via dwarf_vmatoa for localized prints.
|
||||
(fetch_indirect_string): Adjust offset's type.
|
||||
(decode_location_expression): Adjust argument types
|
||||
and uvalue type.
|
||||
(read_and_display_attr_value): Likewise.
|
||||
(read_and_display_attr): Likewise.
|
||||
(decode_location_expression): Adjust printf format.
|
||||
(process_debug_info): Likewise.
|
||||
(display_debug_lines_raw): Likewise.
|
||||
(display_debug_lines_decoded): Likewise.
|
||||
(display_debug_pubnames): Likewise.
|
||||
(display_debug_loc): Likewise.
|
||||
(display_debug_aranges): Likewise.
|
||||
* dwarf.h (DWARF2_External_LineInfo,
|
||||
DWARF2_Internal_LineInfo, DWARF2_External_PubNames,
|
||||
DWARF2_Internal_PubNames, DWARF2_External_CompUnit,
|
||||
DWARF2_Internal_CompUnit, DWARF2_External_ARange,
|
||||
DWARF2_Internal_ARange): Added..
|
||||
(read_leb128): Adjust return type.
|
||||
|
||||
2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* configure: Regenerate.
|
||||
|
||||
2011-02-08 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR binutils/12467
|
||||
* readelf.c (process_program_headers): Issue a warning if there
|
||||
are no program headers but the file header has a non-zero program
|
||||
header offset.
|
||||
(process_section_headers): Issue a warning if there are no section
|
||||
headers but the file header has a non-zero section header offset.
|
||||
(process_section_groups): Reword the no section message so that it
|
||||
can be distinguished from the one issued by process_section_headers.
|
||||
|
||||
2011-01-26 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||
Doug Evans <dje@google.com>
|
||||
|
||||
* dwarf.c (display_gdb_index): Support version 4, warn on version 3.
|
||||
|
||||
2011-01-19 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* readelf.c (process_object): Free dynamic_section after use.
|
||||
|
||||
2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR binutils/12408
|
||||
* readelf.c (process_archive): Free and reset dump_sects
|
||||
after processing each archive member.
|
||||
|
||||
2011-01-11 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* readelf.c (print_symbol): Handle symbol characters as unsigned.
|
||||
Whitespace fixes.
|
||||
|
||||
2011-01-10 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* po/da.po: Updated Danish translation.
|
||||
|
||||
2011-01-06 Vladimir Siminov <sv@sw.ru>
|
||||
|
||||
* bucomm.c (get_file_size): Check for negative sizes and issue a
|
||||
warning message if encountered.
|
||||
|
||||
2011-01-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* version.c (print_version): Update copyright to 2011.
|
||||
|
||||
For older changes see ChangeLog-2010
|
||||
|
||||
Local Variables:
|
||||
mode: change-log
|
||||
left-margin: 8
|
||||
fill-column: 74
|
||||
version-control: never
|
||||
End:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,270 +0,0 @@
|
||||
========= Binutils Maintainers =========
|
||||
|
||||
This is the list of individuals responsible for maintenance and update
|
||||
of the GNU Binary Utilities project. This includes the linker (ld),
|
||||
the assembler (gas), the profiler (gprof), a whole suite of other
|
||||
programs (binutils) and the libraries that they use (bfd and
|
||||
opcodes). This project shares a common set of header files with the
|
||||
GCC and GDB projects (include), so maintainership of those files is
|
||||
shared amoungst the projects.
|
||||
|
||||
The home page for binutils is:
|
||||
|
||||
http://www.gnu.org/software/binutils/binutils.html
|
||||
|
||||
and patches should be sent to:
|
||||
|
||||
binutils@sourceware.org
|
||||
|
||||
with "[Patch]" as part of the subject line. Note - patches to the
|
||||
top level config.guess and config.sub scripts should be sent to:
|
||||
|
||||
config-patches@gnu.org
|
||||
|
||||
and not to the binutils lists. Patches to the other top level
|
||||
configure files (configure, configure.in, config-ml.in) should
|
||||
be sent to the binutils lists, and copied to the gcc and gdb
|
||||
lists as well (gcc-patches@gcc.gnu.org and
|
||||
gdb-patches@sourceware.org).
|
||||
|
||||
--------- Blanket Write Privs ---------
|
||||
|
||||
The following people have permission to check patches into the
|
||||
repository without obtaining approval first:
|
||||
|
||||
Nick Clifton <nickc@redhat.com> (head maintainer)
|
||||
Richard Henderson <rth@redhat.com>
|
||||
Ian Lance Taylor <ian@airs.com>
|
||||
Jeff Law <law@redhat.com>
|
||||
Jim Wilson <wilson@tuliptree.org>
|
||||
DJ Delorie <dj@redhat.com>
|
||||
Alan Modra <amodra@gmail.com>
|
||||
Michael Meissner <gnu@the-meissners.org>
|
||||
Daniel Jacobowitz <drow@false.org>
|
||||
Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
--------- Maintainers ---------
|
||||
|
||||
Maintainers are individuals who are responsible for, and have
|
||||
permission to check in changes in, certain subsets of the code. Note
|
||||
that maintainers still need approval to check in changes outside of
|
||||
the immediate domain that they maintain.
|
||||
|
||||
If there is no maintainer for a given domain then the responsibility
|
||||
falls to the head maintainer (above). If there are several
|
||||
maintainers for a given domain then responsibility falls to the first
|
||||
maintainer. The first maintainer is free to devolve that
|
||||
responsibility among the other maintainers.
|
||||
|
||||
ALPHA Richard Henderson <rth@redhat.com>
|
||||
ARM Nick Clifton <nickc@redhat.com>
|
||||
ARM Richard Earnshaw <rearnsha@arm.com>
|
||||
ARM Paul Brook <paul@codesourcery.com>
|
||||
ARM (Symbian) Mark Mitchell <mark@codesourcery.com>
|
||||
AVR Denis Chertykov <denisc@overta.ru>
|
||||
AVR Marek Michalkiewicz <marekm@amelek.gda.pl>
|
||||
BFIN Jie Zhang <jzhang918@gmail.com>
|
||||
BFIN Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
BFIN Mike Frysinger <michael.frysinger@analog.com>
|
||||
BUILD SYSTEM Daniel Jacobowitz <drow@false.org>
|
||||
CR16 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||
CRIS Hans-Peter Nilsson <hp@axis.com>
|
||||
CRX M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||
DLX Nikolaos Kavvadias <nkavv@physics.auth.gr>
|
||||
DWARF2 Jason Merrill <jason@redhat.com>
|
||||
DWARF2 Jakub Jelinek <jakub@redhat.com>
|
||||
EPIPHANY Joern Rennecke <joern.rennecke@embecosm.com>
|
||||
FR30 Dave Brolley <brolley@redhat.com>
|
||||
FRV Dave Brolley <brolley@redhat.com>
|
||||
FRV Alexandre Oliva <aoliva@redhat.com>
|
||||
H8300 Prafulla Thakare <prafulla.thakare@kpitcummins.com>
|
||||
HPPA Dave Anglin <dave.anglin@nrc.ca>
|
||||
HPPA elf32 Alan Modra <amodra@gmail.com>
|
||||
HPPA elf64 Jeff Law <law@redhat.com> [Basic maintainance only]
|
||||
IA-64 Jim Wilson <wilson@tuliptree.org>
|
||||
IQ2000 Stan Cox <scox@redhat.com>
|
||||
i860 Jason Eckhardt <jle@rice.edu>
|
||||
ix86 H.J. Lu <hjl.tools@gmail.com>
|
||||
ix86 PE Christopher Faylor <me+binutils@cgf.cx>
|
||||
ix86 COFF DJ Delorie <dj@redhat.com>
|
||||
ix86 PE/COFF Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
ix86 INTEL MODE Jan Beulich <jbeulich@novell.com>
|
||||
LM32 Jon Beniston <jon@beniston.com>
|
||||
M32R Doug Evans <dje@sebabeach.org>
|
||||
M68HC11 M68HC12 Stephane Carrez <stcarrez@nerim.fr>
|
||||
M88k Mark Kettenis <kettenis@gnu.org>
|
||||
MACH-O Tristan Gingold <gingold@adacore.com>
|
||||
MAXQ Inderpreet Singh <inderpreetb@noida.hcltech.com>
|
||||
MEP Dave Brolley <brolley@redhat.com>
|
||||
MICROBLAZE Michael Eager <eager@eagercon.com>
|
||||
MIPS Eric Christopher <echristo@apple.com>
|
||||
MMIX Hans-Peter Nilsson <hp@bitrange.com>
|
||||
MN10300 Eric Christopher <echristo@apple.com>
|
||||
MN10300 Alexandre Oliva <aoliva@redhat.com>
|
||||
Moxie Anthony Green <green@moxielogic.com>
|
||||
MSP430 Dmitry Diky <diwil@spec.ru>
|
||||
NetBSD support Matt Thomas <matt@netbsd.org>
|
||||
PPC Geoff Keating <geoffk@geoffk.org>
|
||||
PPC Alan Modra <amodra@gmail.com>
|
||||
PPC vector ext Aldy Hernandez <aldyh@redhat.com>
|
||||
RL78 DJ Delorie <dj@redhat.com>
|
||||
RX DJ Delorie <dj@redhat.com>
|
||||
RX Nick Clifton <nickc@redhat.com>
|
||||
s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
|
||||
SCORE Mei Ligang <ligang@sunnorth.com.cn>
|
||||
SH Alexandre Oliva <aoliva@redhat.com>
|
||||
SH Kaz Kojima <kkojima@rr.iij4u.or.jp>
|
||||
SPARC David S. Miller <davem@davemloft.net>
|
||||
SPU Alan Modra <amodra@gmail.com>
|
||||
TIC4X Svein Seldal <svein@dev.seldal.com>
|
||||
TIC54X Timothy Wall <twall@alum.mit.edu>
|
||||
TIC6X Joseph Myers <joseph@codesourcery.com>
|
||||
TILE-Gx Walter Lee <walt@tilera.com>
|
||||
TILEPro Walter Lee <walt@tilera.com>
|
||||
VAX Matt Thomas <matt@netbsd.org>
|
||||
VAX Jan-Benedict Glaw <jbglaw@lug-owl.de>
|
||||
VMS Tristan Gingold <gingold@adacore.com>
|
||||
x86_64 Jan Hubicka <jh@suse.cz>
|
||||
x86_64 Andreas Jaeger <aj@suse.de>
|
||||
x86_64 H.J. Lu <hjl.tools@gmail.com>
|
||||
XCOFF Richard Sandiford <r.sandiford@uk.ibm.com>
|
||||
XGATE Sean Keys <skeys@ipdatasys.com>
|
||||
Xtensa Sterling Augustine <augustine.sterling@gmail.com>
|
||||
z80 Arnold Metselaar <arnold.metselaar@planet.nl>
|
||||
z8k Christian Groessler <chris@groessler.org>
|
||||
|
||||
|
||||
--------- CGEN Maintainers -------------
|
||||
|
||||
CGEN is a tool for building, amongst other things, assemblers,
|
||||
disassemblers and simulators from a single description of a CPU.
|
||||
It creates files in several of the binutils directories, but it
|
||||
is mentioned here since there is a single group that maintains
|
||||
CGEN and the files that it creates.
|
||||
|
||||
If you have CGEN related problems you can send email to;
|
||||
|
||||
cgen@sourceware.org
|
||||
|
||||
The current CGEN maintainers are:
|
||||
|
||||
Doug Evans, Frank Eigler
|
||||
|
||||
--------- Write After Approval ---------
|
||||
|
||||
Individuals with "write after approval" have the ability to check in
|
||||
changes, but they must get approval for each change from someone in
|
||||
one of the above lists (blanket write or maintainers).
|
||||
|
||||
[It's a huge list, folks. You know who you are. If you have the
|
||||
*ability* to do binutils checkins, you're in this group. Just
|
||||
remember to get approval before checking anything in.]
|
||||
|
||||
------------- Obvious Fixes -------------
|
||||
|
||||
Fixes for obvious mistakes do not need approval, and can be checked in
|
||||
right away, but the patch should still be sent to the binutils list.
|
||||
The definition of obvious is a bit hazy, and if you are not sure, then
|
||||
you should seek approval first. Obvious fixes include fixes for
|
||||
spelling mistakes, blatantly incorrect code (where the correct code is
|
||||
also blatantly obvious), and so on. Obvious fixes should always be
|
||||
small, the larger they are, the more likely it is that they contain
|
||||
some un-obvious side effect or consequence.
|
||||
|
||||
--------- Branch Checkins ---------
|
||||
|
||||
If a patch is approved for check in to the mainline sources, it can
|
||||
also be checked into the current release branch. Normally however
|
||||
only bug fixes should be applied to the branch. New features, new
|
||||
ports, etc, should be restricted to the mainline. (Otherwise the
|
||||
burden of maintaining the branch in sync with the mainline becomes too
|
||||
great). If you are uncertain as to whether a patch is appropriate for
|
||||
the branch, ask the branch maintainer. This is:
|
||||
|
||||
Tristan Gingold <gingold@adacore.com>
|
||||
|
||||
-------- Testsuites ---------------
|
||||
|
||||
In general patches to any of the binutils testsuites should be
|
||||
considered generic and sent to the binutils mailing list for
|
||||
approval. Patches to target specific tests are the responsibility the
|
||||
relevent port maintainer(s), and can be approved/checked in by them.
|
||||
Other testsuite patches need the approval of a blanket-write-priveleges
|
||||
person.
|
||||
|
||||
-------- Configure patches ----------
|
||||
|
||||
Patches to the top level configure files (config.sub & config.guess)
|
||||
are not the domain of the binutils project and they cannot be approved
|
||||
by the binutils group. Instead they should be submitted to the config
|
||||
maintainer at:
|
||||
|
||||
config-patches@gnu.org
|
||||
|
||||
--------- Creating Branches ---------
|
||||
|
||||
Anyone with at least write-after-approval access may create a branch
|
||||
to use for their own development purposes. In keeping with FSF
|
||||
policies, all patches applied to such a branch must come from people
|
||||
with appropriate copyright assignments on file. All legal
|
||||
requirements that would apply to any other contribution apply equally
|
||||
to contributions on a branch.
|
||||
|
||||
Before creating the branch, you should select a name for the branch of
|
||||
the form:
|
||||
|
||||
binutils-<org>-<name>
|
||||
|
||||
where "org" is the initials of your organization, or your own initials
|
||||
if you are acting as an individual. For example, for a branch created
|
||||
by The GNUDist Company, "tgc" would be an appropriate choice for
|
||||
"org". It's up to each organization to select an appropriate choice
|
||||
for "name"; some organizations may use more structure than others, so
|
||||
"name" may contain additional hyphens.
|
||||
|
||||
Suppose that The GNUDist Company was creating a branch to develop a
|
||||
port of Binutils to the FullMonty processor. Then, an appropriate
|
||||
choice of branch name would be:
|
||||
|
||||
binutils-tgc-fm
|
||||
|
||||
A date stamp is not required as part of the name field, but some
|
||||
organizations like to have one. If you do include the date, you
|
||||
should follow these rules:
|
||||
|
||||
1. The date should be the date that the branch was created.
|
||||
|
||||
2. The date should be numerical and in the form YYYYMMDD.
|
||||
|
||||
For example:
|
||||
|
||||
binutils-tgc-fm_20050101
|
||||
|
||||
would be appropriate if the branch was created on January 1st, 2005.
|
||||
|
||||
Having selected the branch name, create the branch as follows:
|
||||
|
||||
1. Check out binutils, so that you have a CVS checkout corresponding
|
||||
to the initial state of your branch.
|
||||
|
||||
2. Create a tag:
|
||||
|
||||
cvs tag binutils-<org>-<name>-branchpoint
|
||||
|
||||
That tag will allow you, and others, to easily determine what's
|
||||
changed on the branch relative to the initial state.
|
||||
|
||||
3. Create the branch:
|
||||
|
||||
cvs rtag -b -r binutils-<org>-<name>-branchpoint \
|
||||
binutils-<org>-<name>-branch
|
||||
|
||||
4. Document the branch:
|
||||
|
||||
Add a description of the branch to binutils/BRANCHES, and check
|
||||
that file in. All branch descriptions should be added to the
|
||||
HEAD revision of the file; it doesn't help to modify
|
||||
binutils/BRANCHES on a branch!
|
||||
|
||||
Please do not commit any patches to a branch you did not create
|
||||
without the explicit permission of the person who created the branch.
|
||||
@@ -1,521 +0,0 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = dejagnu no-dist foreign
|
||||
ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
|
||||
|
||||
SUBDIRS = doc po
|
||||
|
||||
tooldir = $(exec_prefix)/$(target_alias)
|
||||
|
||||
## These aren't set by automake, because they appear in
|
||||
## bfd/acinclude.m4, which is included by binutils/acinclude.m4, and
|
||||
## thus is not seen by automake.
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
|
||||
|
||||
YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
|
||||
YFLAGS = -d
|
||||
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
|
||||
|
||||
# Automake 1.10+ disables lex and yacc output file regeneration if
|
||||
# maintainer mode is disabled. Avoid this.
|
||||
am__skiplex =
|
||||
am__skipyacc =
|
||||
|
||||
WARN_CFLAGS = @WARN_CFLAGS@
|
||||
NO_WERROR = @NO_WERROR@
|
||||
AM_CFLAGS = $(WARN_CFLAGS)
|
||||
LIBICONV = @LIBICONV@
|
||||
|
||||
# these two are almost the same program
|
||||
AR_PROG=ar
|
||||
RANLIB_PROG=ranlib
|
||||
|
||||
# objcopy and strip should be the same program
|
||||
OBJCOPY_PROG=objcopy
|
||||
STRIP_PROG=strip-new
|
||||
|
||||
STRINGS_PROG=strings
|
||||
|
||||
READELF_PROG=readelf
|
||||
|
||||
ELFEDIT_PROG=elfedit
|
||||
|
||||
# These should all be the same program too.
|
||||
SIZE_PROG=size
|
||||
NM_PROG=nm-new
|
||||
OBJDUMP_PROG=objdump
|
||||
|
||||
# This is the demangler, as a standalone program.
|
||||
# Note: This one is used as the installed name too, unlike the above.
|
||||
DEMANGLER_PROG=cxxfilt
|
||||
|
||||
ADDR2LINE_PROG=addr2line
|
||||
|
||||
NLMCONV_PROG=nlmconv
|
||||
DLLTOOL_PROG=dlltool
|
||||
WINDRES_PROG=windres
|
||||
WINDMC_PROG=windmc
|
||||
DLLWRAP_PROG=dllwrap
|
||||
|
||||
SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
|
||||
|
||||
bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ @BUILD_WINDMC@ $(ADDR2LINE_PROG) $(READELF_PROG) $(ELFEDIT_PROG) @BUILD_DLLWRAP@
|
||||
|
||||
bin_SCRIPTS = @BUILD_INSTALL_MISC@
|
||||
EXTRA_SCRIPTS = embedspu
|
||||
|
||||
## We need a special rule to install the programs which are built with
|
||||
## -new, and to rename cxxfilt to c++filt.
|
||||
RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
|
||||
noinst_PROGRAMS = $(RENAMED_PROGS) @BUILD_MISC@
|
||||
|
||||
EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(WINDMC_PROG) $(DLLWRAP_PROG)
|
||||
|
||||
# Stuff that goes in tooldir/ if appropriate.
|
||||
TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy
|
||||
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
|
||||
AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
|
||||
@HDEFINES@ \
|
||||
@INCINTL@ \
|
||||
-DLOCALEDIR="\"$(datadir)/locale\"" \
|
||||
-Dbin_dummy_emulation=$(EMULATION_VECTOR)
|
||||
|
||||
HFILES = \
|
||||
arsup.h binemul.h bucomm.h budbg.h \
|
||||
coffgrok.h debug.h dlltool.h dwarf.h elfcomm.h nlmconv.h \
|
||||
objdump.h sysdep.h unwind-ia64.h windres.h winduni.h windint.h \
|
||||
windmc.h
|
||||
|
||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h mcparse.h
|
||||
BUILT_SOURCES = $(GENERATED_HFILES)
|
||||
|
||||
CFILES = \
|
||||
addr2line.c ar.c arsup.c bin2c.c binemul.c bucomm.c \
|
||||
coffdump.c coffgrok.c cxxfilt.c \
|
||||
dwarf.c debug.c dlltool.c dllwrap.c \
|
||||
elfcomm.c emul_aix.c emul_vanilla.c filemode.c \
|
||||
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
|
||||
nlmconv.c nm.c not-ranlib.c not-strip.c \
|
||||
objcopy.c objdump.c prdbg.c \
|
||||
od-xcoff.c od-macho.c \
|
||||
rclex.c rdcoff.c rddbg.c readelf.c rename.c \
|
||||
resbin.c rescoff.c resrc.c resres.c \
|
||||
size.c srconv.c stabs.c strings.c sysdump.c \
|
||||
syslex_wrap.c unwind-ia64.c elfedit.c version.c \
|
||||
windres.c winduni.c wrstabs.c \
|
||||
windmc.c mclex.c
|
||||
|
||||
GENERATED_CFILES = \
|
||||
arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||
defparse.c deflex.c nlmheader.c rcparse.c mcparse.c
|
||||
|
||||
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
|
||||
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
|
||||
|
||||
# Extra object files for objdump
|
||||
OBJDUMP_PRIVATE_OFILES = @OBJDUMP_PRIVATE_OFILES@
|
||||
|
||||
# Code shared by all the binutils.
|
||||
BULIBS = bucomm.c version.c filemode.c
|
||||
|
||||
# Code shared by the ELF related programs.
|
||||
ELFLIBS = elfcomm.c
|
||||
|
||||
BFDLIB = ../bfd/libbfd.la
|
||||
|
||||
OPCODES = ../opcodes/libopcodes.la
|
||||
|
||||
LIBIBERTY = ../libiberty/libiberty.a
|
||||
|
||||
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
|
||||
po/POTFILES.in: @MAINT@ Makefile
|
||||
for f in $(POTFILES); do echo $$f; done | LC_ALL=C sort > tmp \
|
||||
&& mv tmp $(srcdir)/po/POTFILES.in
|
||||
|
||||
EXPECT = expect
|
||||
RUNTEST = runtest
|
||||
|
||||
CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/../gcc/xgcc ] ; then \
|
||||
if [ -f $$r/../newlib/Makefile ] ; then \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
|
||||
else \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/; \
|
||||
fi; \
|
||||
else \
|
||||
if [ "@host@" = "@target@" ] ; then \
|
||||
echo $(CC); \
|
||||
else \
|
||||
echo gcc | sed '$(transform)'; \
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
check-DEJAGNU: site.exp
|
||||
srcdir=`cd $(srcdir) && pwd`; export srcdir; \
|
||||
r=`pwd`; export r; \
|
||||
LC_ALL=C; export LC_ALL; \
|
||||
EXPECT=$(EXPECT); export EXPECT; \
|
||||
runtest=$(RUNTEST); \
|
||||
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
||||
CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
|
||||
$$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
|
||||
$(RUNTESTFLAGS); \
|
||||
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
||||
fi
|
||||
|
||||
installcheck-local:
|
||||
/bin/sh $(srcdir)/sanity.sh $(bindir)
|
||||
|
||||
# There's no global DEPENDENCIES. So, we must explicitly list everything
|
||||
# which depends on libintl, since we don't know whether LIBINTL_DEP will be
|
||||
# non-empty until configure time. Ugh!
|
||||
size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES) $(OBJDUMP_PRIVATE_OFILES)
|
||||
nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
ranlib_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
cxxfilt_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
objcopy_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
nlmconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
srconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
sysdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
coffdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
dlltool_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
|
||||
readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
|
||||
elfedit_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
|
||||
dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
|
||||
|
||||
LDADD = $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
|
||||
|
||||
size_SOURCES = size.c $(BULIBS)
|
||||
|
||||
objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
|
||||
|
||||
strings_SOURCES = strings.c $(BULIBS)
|
||||
|
||||
readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c $(ELFLIBS)
|
||||
readelf_LDADD = $(LIBINTL) $(LIBIBERTY)
|
||||
|
||||
elfedit_SOURCES = elfedit.c version.c $(ELFLIBS)
|
||||
elfedit_LDADD = $(LIBINTL) $(LIBIBERTY)
|
||||
|
||||
strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
|
||||
|
||||
nm_new_SOURCES = nm.c $(BULIBS)
|
||||
|
||||
objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS) $(ELFLIBS)
|
||||
EXTRA_objdump_SOURCES = od-xcoff.c
|
||||
objdump_LDADD = $(OBJDUMP_PRIVATE_OFILES) $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
|
||||
|
||||
objdump.@OBJEXT@:objdump.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(OBJDUMP_DEFS) $(srcdir)/objdump.c
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='objdump.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c
|
||||
endif
|
||||
|
||||
cxxfilt_SOURCES = cxxfilt.c $(BULIBS)
|
||||
|
||||
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \
|
||||
emul_$(EMULATION).c $(BULIBS)
|
||||
EXTRA_ar_SOURCES = $(CFILES)
|
||||
ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
|
||||
|
||||
ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \
|
||||
binemul.c emul_$(EMULATION).c $(BULIBS)
|
||||
ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
|
||||
|
||||
addr2line_SOURCES = addr2line.c $(BULIBS)
|
||||
|
||||
# The following is commented out for the conversion to automake.
|
||||
# This rule creates a single binary that switches between ar and ranlib
|
||||
# by looking at argv[0]. Use this kludge to save some disk space.
|
||||
# However, you have to install things by hand.
|
||||
# (That is after 'make install', replace the installed ranlib by a link to ar.)
|
||||
# Alternatively, you can install ranlib.sh as ranlib.
|
||||
# ar_with_ranlib: $(ADDL_DEPS) ar.o maybe-ranlib.o
|
||||
# $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(AR_PROG) ar.o maybe-ranlib.o $(ADDL_LIBS) $(EXTRALIBS)
|
||||
# -rm -f $(RANLIB_PROG)
|
||||
# -ln $(AR_PROG) $(RANLIB_PROG)
|
||||
#
|
||||
# objcopy and strip in one binary that uses argv[0] to decide its action.
|
||||
#
|
||||
#objcopy_with_strip: $(ADDL_DEPS) objcopy.o maybe-strip.o
|
||||
# $(HLDENV) $(CC) $(HLDFLAGS) $(CFLAGS) $(LDFLAGS) -o $(OBJCOPY_PROG) objcopy.o maybe-strip.o $(ADDL_LIBS) $(EXTRALIBS)
|
||||
# -rm -f $(STRIP_PROG)
|
||||
# -ln $(OBJCOPY_PROG) $(STRIP_PROG)
|
||||
|
||||
sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -c <$(srcdir)/sysroff.info >sysroff.c
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -i <$(srcdir)/sysroff.info >>sysroff.c
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -g <$(srcdir)/sysroff.info >>sysroff.c
|
||||
|
||||
sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
|
||||
./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
|
||||
|
||||
sysinfo$(EXEEXT_FOR_BUILD): sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
|
||||
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.@OBJEXT@ syslex_wrap.@OBJEXT@
|
||||
|
||||
syslex_wrap.@OBJEXT@: syslex_wrap.c syslex.c sysinfo.h config.h
|
||||
$(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/syslex_wrap.c
|
||||
|
||||
sysinfo.@OBJEXT@: sysinfo.c
|
||||
if [ -r sysinfo.c ]; then \
|
||||
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) sysinfo.c ; \
|
||||
else \
|
||||
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(NO_WERROR) $(srcdir)/sysinfo.c ; \
|
||||
fi
|
||||
|
||||
bin2c$(EXEEXT_FOR_BUILD): bin2c.c
|
||||
$(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c
|
||||
|
||||
embedspu: embedspu.sh Makefile
|
||||
awk '/^program_transform_name=/ {print "program_transform_name=\"$(program_transform_name)\""; next} {print}' < $< > $@
|
||||
chmod a+x $@
|
||||
|
||||
# We need these for parallel make.
|
||||
sysinfo.h: sysinfo.c
|
||||
|
||||
# Disable -Werror, if it has been enabled, since old versions of bison/
|
||||
# yacc will produce working code which contain compile time warnings.
|
||||
arparse.@OBJEXT@: arparse.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='arparse.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f arparse.c || echo $(srcdir)/`arparse.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
arlex.@OBJEXT@: arlex.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='arlex.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f arlex.c || echo $(srcdir)/`arlex.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
sysroff.@OBJEXT@: sysroff.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='sysroff.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f sysroff.c || echo $(srcdir)/`sysroff.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
defparse.@OBJEXT@: defparse.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='defparse.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f defparse.c || echo $(srcdir)/`defparse.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
deflex.@OBJEXT@: deflex.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='deflex.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f deflex.c || echo $(srcdir)/`deflex.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
nlmheader.@OBJEXT@: nlmheader.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='nlmheader.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f nlmheader.c || echo $(srcdir)/`nlmheader.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
rcparse.@OBJEXT@: rcparse.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='rcparse.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f rcparse.c || echo $(srcdir)/`rcparse.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
mcparse.@OBJEXT@: mcparse.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='mcparse.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c `test -f mcparse.c || echo $(srcdir)/`mcparse.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
rclex.@OBJEXT@: rclex.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/rclex.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='rclex.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c $(srcdir)/rclex.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
mclex.@OBJEXT@: mclex.c
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(srcdir)/mclex.c $(NO_WERROR)
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='mclex.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c $(srcdir)/mclex.c $(NO_WERROR)
|
||||
endif
|
||||
|
||||
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
|
||||
srconv.@OBJEXT@: sysroff.c
|
||||
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
|
||||
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
|
||||
|
||||
dlltool.@OBJEXT@:
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='dlltool.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
|
||||
endif
|
||||
|
||||
rescoff.@OBJEXT@:
|
||||
if am__fastdepCC
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='rescoff.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/rescoff.c
|
||||
endif
|
||||
|
||||
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
|
||||
|
||||
sysdump_SOURCES = sysdump.c $(BULIBS)
|
||||
sysdump.@OBJEXT@: sysroff.c
|
||||
|
||||
# coff/sym.h and coff/ecoff.h won't be found by the automatic dependency
|
||||
# scripts, since they are only included conditionally.
|
||||
nlmconv.@OBJEXT@: nlmconv.c
|
||||
if am__fastdepCC
|
||||
ldname=`echo ld | sed '$(transform)'`; \
|
||||
$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ \
|
||||
-DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
|
||||
mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
else
|
||||
if AMDEP
|
||||
source='nlmconv.c' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
endif
|
||||
ldname=`echo ld | sed '$(transform)'`; \
|
||||
$(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
|
||||
endif
|
||||
|
||||
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
||||
|
||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.c \
|
||||
winduni.c resres.c $(BULIBS)
|
||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
|
||||
|
||||
windmc_SOURCES = windmc.c mcparse.y mclex.c \
|
||||
winduni.c $(BULIBS)
|
||||
windmc_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
|
||||
|
||||
dllwrap_SOURCES = dllwrap.c version.c
|
||||
dllwrap_LDADD = $(LIBIBERTY) $(LIBINTL)
|
||||
|
||||
|
||||
EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
||||
syslex.c deflex.c defparse.h defparse.c rcparse.h rcparse.c \
|
||||
mcparse.h mcparse.c embedspu.sh
|
||||
|
||||
diststuff: $(EXTRA_DIST) info
|
||||
all: info
|
||||
|
||||
# We extract version from bfd/configure.in, make sure to rerun configure
|
||||
# when BFD's version changes.
|
||||
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
|
||||
|
||||
DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak embedspu
|
||||
|
||||
MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \
|
||||
binutils.log binutils.sum abcdefgh*
|
||||
mostlyclean-local:
|
||||
-rm -rf tmpdir
|
||||
|
||||
.PHONY: install-exec-local
|
||||
|
||||
install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
|
||||
@list='$(RENAMED_PROGS)'; for p in $$list; do \
|
||||
if test -f $$p$(EXEEXT); then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
$(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
|
||||
for i in $(TOOL_PROGS); do \
|
||||
if [ -f $$i$(EXEEXT) ]; then \
|
||||
j=`echo $$i | sed -e 's/-new//'`; \
|
||||
k=`echo $$j | sed '$(transform)'`; \
|
||||
if [ "$(bindir)/$$k" != "$(tooldir)/bin/$$j" ]; then \
|
||||
rm -f $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
|
||||
ln $(DESTDIR)$(bindir)/$$k$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT) >/dev/null 2>/dev/null \
|
||||
|| $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$i$(EXEEXT) $(DESTDIR)$(tooldir)/bin/$$j$(EXEEXT); \
|
||||
fi; \
|
||||
else true; \
|
||||
fi; \
|
||||
done
|
||||
1441
binutils/Makefile.in
1441
binutils/Makefile.in
File diff suppressed because it is too large
Load Diff
477
binutils/NEWS
477
binutils/NEWS
@@ -1,477 +0,0 @@
|
||||
-*- text -*-
|
||||
|
||||
* Add support for the VLE extension to the PowerPC architecture.
|
||||
|
||||
* Add support for x64 Windows target of the delayed-load-library.
|
||||
|
||||
* Add support for the Renesas RL78 architecture.
|
||||
|
||||
Changes in 2.22:
|
||||
|
||||
* Add support for displaying the contents of .debug.macro sections.
|
||||
|
||||
* Add --preprocessor-arg option to windres to specify additional options
|
||||
passed to preprocessor.
|
||||
|
||||
* Add --dwarf-start and --dwarf-end to readelf and objdump. These are used by
|
||||
the new Emacs mode, see dwarf-mode.el.
|
||||
|
||||
* Add support for the Tilera TILEPro and TILE-Gx architectures.
|
||||
|
||||
changes in 2.21:
|
||||
|
||||
* Add --interleave-width option to objcopy to allowing copying a range of
|
||||
bytes from the input to the output with the --interleave option.
|
||||
|
||||
* Add support for the TMS320C6000 (TI C6X) processor family.
|
||||
|
||||
* Readelf can now display ARM unwind tables (.ARM.exidx / .ARM.extab) using
|
||||
the -u / --unwind option.
|
||||
|
||||
* Add --dyn-syms to readelf to dump dynamic symbol table.
|
||||
|
||||
* A new tool - elfedit - has been added to directly manipulate ELF format
|
||||
binaries.
|
||||
|
||||
* Add to dlltool .def file feature of aliasing PE internal symbol name by
|
||||
'== <ID>' option.
|
||||
|
||||
* Add a new command line option -a / --addresses to addr2line to display the
|
||||
address before function name or source filename.
|
||||
|
||||
* Add a new command line option -p / --pretty-print to addr2line to have
|
||||
a more human readable output.
|
||||
|
||||
* The hppa/som targets can now be compiled on any host.
|
||||
|
||||
Changes in 2.20:
|
||||
|
||||
* Add support for delay importing to dlltool. Use the --output-delaylib <file>
|
||||
switch to create a delay-import library. The resulting app will load the dll
|
||||
as soon as the first function is called. It will link to __delayLoadHelper2()
|
||||
from the static delayimp library, which will import LoadLibraryA and
|
||||
GetProcAddress from kernel32.
|
||||
|
||||
* Add a new command line option, --insn-width=WIDTH, to objdump to specify
|
||||
number of bytes to be displayed on a single line when disassembling
|
||||
instructions.
|
||||
|
||||
* Readelf can now display the relocated contents of a section as a sequence
|
||||
of bytes via the --relocated-dump=<name|number> command line option.
|
||||
|
||||
* The gprof program has been given a new command line option:
|
||||
--external-symbols-table=<filename> which reads in symbols from a specified
|
||||
file.
|
||||
|
||||
* The plugin target has been added to bfd. It can load the same shared objects
|
||||
used by gold and uses them to provide basic support for new file formats.
|
||||
|
||||
* The verilog memory hex dump file format is now supported as an output format
|
||||
for objcopy.
|
||||
|
||||
* Add --file-alignment, --heap, --image-base, --section-alignment,
|
||||
--stack and --subsystem command line options to objcopy, which will
|
||||
set PE optional header.
|
||||
|
||||
* Option --dwarf/-W of objdump is now as flexible as readelf --debug-dump/-w.
|
||||
|
||||
* --as-needed now links in a dynamic library if it satisfies undefined
|
||||
symbols in regular objects, or in other dynamic libraries. In the
|
||||
latter case the library is not linked if it is found in a DT_NEEDED
|
||||
entry of one of the libraries already linked.
|
||||
|
||||
* Added --prefix=PREFIX and --prefix-strip=LEVEL switches to objdump to
|
||||
add absolute paths for -S.
|
||||
|
||||
* Add new option --use-nul-prefixed-import-tables to dlltool to allow fall-
|
||||
back to old import table generation with null element prefix.
|
||||
|
||||
* Added --identify-strict switch to cause --identify <implib> to
|
||||
report an error when the import library is associated with
|
||||
multiple DLLs.
|
||||
|
||||
* Added --identify <implib> option to dlltool, which determines the
|
||||
name of the DLL associated with the specified <implib>.
|
||||
|
||||
* Support for PowerPC booke64 instructions has been removed. The assembler no
|
||||
longer accepts -mbooke32 or -mbooke64 and the disassembler no longer accepts
|
||||
-Mbooke32 or -Mbooke64. Instead, -mbooke and -Mbooke should be used.
|
||||
|
||||
Changes in 2.19:
|
||||
|
||||
* Added -wL switch to dump decoded contents of .debug_line.
|
||||
|
||||
* Added support for "thin" archives which contain pathnames pointing to
|
||||
object files rather than the files themselves and which contain a
|
||||
flattened symbol index for all objects, and archives, which have been
|
||||
added to the archive.
|
||||
|
||||
* Added -F switch to objdump to include file offsets in the disassembly.
|
||||
|
||||
* Added -c switch to readelf to allow string dumps of archive symbol index.
|
||||
|
||||
* Support for SSE5 has been added to the i386 port.
|
||||
|
||||
* Added -p switch to readelf to allow string dumps of sections.
|
||||
|
||||
Changes in 2.18:
|
||||
|
||||
* Resolved 37 coding problems in bfd including static array overruns, null
|
||||
pointer dereferences and use of a malloc buffer after it has been freed, as
|
||||
revealed by static analysis donated by Coverity, Inc. (http://scan.coverity.com).
|
||||
|
||||
* The binutils sources are now released under version 3 of the GNU General
|
||||
Public License.
|
||||
|
||||
* A new tool "windmc" has been added for some targets. This is a message
|
||||
compiler which attempts to be compatible with the MS version.
|
||||
|
||||
* Add codepage support to the windres tool. It now supports many new
|
||||
resource types (e.g. MANIFEST, TOOLBAR, etc). The output generation
|
||||
for binary files is done now via bfd itself. The endianess problems
|
||||
for different hosts are solved. Dumps of .res files can now be
|
||||
re-compiled by windres without lossing resources or compilation errors.
|
||||
Some problems on dialog resource translations are corrected.
|
||||
|
||||
* Add --extract-symbol command line option to objcopy, which will
|
||||
strip everything out of an ordinary object file or executable except
|
||||
for its symbol table. Files containing just symbols can be useful
|
||||
to some OSes.
|
||||
|
||||
Changes in 2.17:
|
||||
|
||||
* Add "-x NAME" to readelf in addition to "-x NUMBER".
|
||||
|
||||
* Add -i and -t switches to cxxfilt. -i disables the display of implementation
|
||||
specific extra demangling information (if any) and -t disables the demangling
|
||||
of types.
|
||||
|
||||
* Add support for the "@<file>" syntax to the command lines of all tools, so
|
||||
that extra switches can be read from <file>.
|
||||
|
||||
* Add "-W/--dwarf" to objdump to display the contents of the DWARF
|
||||
debug sections.
|
||||
|
||||
* Add "-t/--section-details" to readelf to display section details.
|
||||
"-N/--full-section-name" is deprecated.
|
||||
|
||||
* powerpc-linux ld now supports a variant form of PLT and GOT for the security
|
||||
conscious. This form will automatically be chosen when ld detects that all
|
||||
code in regular object files was generated by gcc -msecure-plt. The old PLT
|
||||
and GOT may be forced by a new ld option, --bss-plt.
|
||||
|
||||
* Add "-i/--inlines" to addr2line to print enclosing scope information
|
||||
for inlined function chains, back to first non-inlined function.
|
||||
|
||||
* Add "-N/--full-section-name" to readelf to display full section name.
|
||||
|
||||
* Add "-M entry:<addr>" switch to objdump to specify a function entry address
|
||||
when disassembling VAX binaries.
|
||||
|
||||
* Add "--globalize-symbol <name>" and "--globalize-symbols <filename>" switches
|
||||
to objcopy to convert local symbols into global symbols.
|
||||
|
||||
* gprof now allows input files to have histogram records for
|
||||
several memory ranges, provided those ranges are disjoint.
|
||||
|
||||
Changes in 2.16:
|
||||
|
||||
* Add "-g/--section-groups" to readelf to display section groups.
|
||||
|
||||
* objcopy recognizes two new options --strip-unneeded-symbol and
|
||||
--strip-unneeded-symbols, namely for use together with the wildcard
|
||||
matching the original --strip-symbol/--strip-symbols provided, but
|
||||
retaining any symbols matching but needed by relocations.
|
||||
|
||||
* readelf can now display address ranges from .debug_range sections. This
|
||||
happens automatically when a DW_AT_range attribute is encountered. The
|
||||
command line switch --debug-dump=Ranges (or -wR) can also be used to display
|
||||
the contents of the .debug_range section.
|
||||
|
||||
* nm and objdump now have a switch "--special-syms" to enable the displaying of
|
||||
symbols which the target considers to be special. By default these symbols
|
||||
are no longer displayed. Currently the only special symbols are the Mapping
|
||||
symbols used by the ARM port to mark transitions between text and data and
|
||||
between ARM and THUMB code.
|
||||
|
||||
* dlltool has a switch "--ext-prefix-alias <prefix>" to generate additional
|
||||
import and export symbols with <preifx> prepended to them.
|
||||
|
||||
Changes in 2.15:
|
||||
|
||||
* objcopy for MIPS targets now accepts "-M no-aliases" as an option to the
|
||||
disassembler to print the "raw" mips instruction mnemonic instead of some
|
||||
pseudo instruction name. I.E. print "daddu" or "or" instead of "move",
|
||||
"sll" instead of "nop", etc.
|
||||
|
||||
* objcopy and strip can now take wildcard patterns in symbol names specified on
|
||||
the command line provided that the --wildcard switch is used to enable them.
|
||||
|
||||
* readelf can now parse archives.
|
||||
|
||||
* objdump now accepts --debugging-tags to print the debug information in a
|
||||
format compatible with ctags tool.
|
||||
|
||||
* objcopy and strip now accept --only-keep-debug to create a file containing
|
||||
those sections that would be stripped out by --strip-debug. The idea is that
|
||||
this can be used in conjunction with the --add-gnu-debuglink switch to create
|
||||
a two part program distribution - one a stripped executable and the other the
|
||||
debugging info.
|
||||
|
||||
* objcopy now accepts --add-gnu-debuglink=<file> to insert a .gnu_debuglink
|
||||
section into a (presumably stripped) executable. This allows the debug
|
||||
information for the file to be held in a separate file.
|
||||
|
||||
* BFD marks the sections .comment and .note as 'n' in the BSD/POSIX
|
||||
single-character representation. This can be checked by running nm
|
||||
with the -a switch.
|
||||
|
||||
Changes in 2.14:
|
||||
|
||||
* Added --info switch to objcopy and strip.
|
||||
|
||||
* Support for Vitesse IQ2000 added by Red Hat.
|
||||
|
||||
* Added 'S' encoding to strings to allow the display of 8-bit characters.
|
||||
|
||||
* Added --prefix-symbols=<text>, --prefix-sections=<text> and
|
||||
--prefix-alloc-sections=<text> to objcopy.
|
||||
|
||||
* readelf can handle the extensions to the DWARF2 spec used by the Unified
|
||||
Parallel C compiler.
|
||||
|
||||
* BFD no longer declares a "boolean" type, to avoid clashes with other
|
||||
headers that declare the same. Users of BFD should replace boolean,
|
||||
false and true, with int, 0 and 1, or define their own boolean type.
|
||||
|
||||
* Support for IP2K added by Denis Chertykov.
|
||||
|
||||
Changes in 2.13:
|
||||
|
||||
* Support for the Fujitsu FRV architecture added by Red Hat. Models for FR400
|
||||
and FR500 included.
|
||||
|
||||
Changes in version 2.12:
|
||||
|
||||
* Support for Don Knuth's MMIX, by Hans-Peter Nilsson.
|
||||
|
||||
* size: Add --totals to display summary of sizes (Berkeley format only).
|
||||
|
||||
* readelf: Add --wide option to not break section header or segment listing
|
||||
lines to fit into 80 columns.
|
||||
|
||||
* strings: Add --encoding to display wide character strings. By Markus Kuhn.
|
||||
|
||||
* objcopy: Add --rename-section to change section names.
|
||||
|
||||
* readelf: Support added for DWARF 2.1 extensions. Support added for
|
||||
displaying the contents of .debug.macinfo sections.
|
||||
|
||||
* New command line switches added to objcopy to allow symbols to be kept as
|
||||
global symbols, and also to specify files containing lists of such symbols.
|
||||
by Honda Hiroki.
|
||||
|
||||
* Support for OpenRISC by Johan Rydberg.
|
||||
|
||||
* New command line switch to objcopy --alt-machine-code which creates a binary
|
||||
with an alternate machine code if one is defined in the architecture
|
||||
description. Only supported for ELF targets. By Alexandre Oliva.
|
||||
|
||||
* New command line switch to objcopy -B (or --binary-architecture) which sets
|
||||
the architecture of the output file to the given argument. This option only
|
||||
makes sense, if the input target is binary. Otherwise it is ignored.
|
||||
By Stefan Geuken.
|
||||
|
||||
* Support for PDP-11 by Lars Brinkhoff.
|
||||
|
||||
Changes in binutils 2.11:
|
||||
|
||||
* Add support for ARM v5t and v5te architectures and Intel's XScale ARM
|
||||
extenstions.
|
||||
|
||||
* Add --srec-len and --srec-forceS3 command line switch to objcopy.
|
||||
By Luciano Gemme.
|
||||
|
||||
* Support for the MIPS32, by Anders Norlander.
|
||||
|
||||
* Support for the i860, by Jason Eckhardt.
|
||||
|
||||
* Support for CRIS (Axis Communications ETRAX series).
|
||||
|
||||
Changes in binutils 2.10:
|
||||
|
||||
* Support for 64-bit ELF on HPPA.
|
||||
|
||||
* New command line switch to objdump --file-start-context which shows the
|
||||
entire file contents up to the source line first encountered for a given
|
||||
file.
|
||||
|
||||
* New command line switch to objdump -M (or --disassembler-options) which takes
|
||||
a parameter which can then be interpreted on a per-target basis by the
|
||||
disassembler. Used by ARM targets to select register name sets, ISA, APCS or
|
||||
raw verions.
|
||||
|
||||
* objdump support for -mi386:intel which causes disassembly to be displayed
|
||||
with intel syntax.
|
||||
|
||||
* New program: readelf. This displays the contents of ELF format files,
|
||||
regardless of target machine.
|
||||
|
||||
* objcopy now takes --change-section-lma, --change-section-vma, and
|
||||
--change-section-address options. The old --adjust-section-vma option is
|
||||
equivalent to --change-section-address. The other --adjust-* options are now
|
||||
renamed to --change-*, although --adjust-* continues to work.
|
||||
|
||||
* objcopy has a --redefine-sym option that lets you rename symbols.
|
||||
|
||||
* objcopy now takes a -j/--only-section option to copy only the specified
|
||||
sections.
|
||||
|
||||
* dlltool now supports the IMPORTS command.
|
||||
|
||||
* dlltool now takes --export-all-symbols, --no-export-all-symbols,
|
||||
--exclude-symbols, and --no-default-excludes options.
|
||||
|
||||
Changes in binutils 2.9:
|
||||
|
||||
* Added windres program, which can be used to manipulate resources in WIN32
|
||||
files as used on Windows 95 and Windows NT.
|
||||
|
||||
* The objcopy --gap-fill and --pad-to options operate on the LMA rather than
|
||||
the VMA of the sections.
|
||||
|
||||
* Added S modifier to ar to not build a symbol table.
|
||||
|
||||
Changes in binutils 2.8:
|
||||
|
||||
* The objdump disassembly format has been changed, and hopefully improved. Use
|
||||
the new --prefix-addresses option to get the old format. There are also new
|
||||
--disassemble-zeroes and --no-show-raw-insn options which affect disassembler
|
||||
output.
|
||||
|
||||
* Formats may now be specified as configuration triplets. For example,
|
||||
objdump -b i386-pc-linux. The triplets are not passed through config.sub,
|
||||
so they must be in canonical form.
|
||||
|
||||
* Added new addr2line program. This uses the debugging information to convert
|
||||
an address into a file name and line number within a program.
|
||||
|
||||
* Added --change-leading-char argument to objcopy.
|
||||
|
||||
* Added --weaken argument to objcopy.
|
||||
|
||||
* objdump --dynamic-reloc now works on ELF executables and shared libraries.
|
||||
|
||||
* Added --adjust-vma option to objdump.
|
||||
|
||||
* Added -C/--demangle option to objdump.
|
||||
|
||||
* Added -p/--preserve-dates option to strip and objcopy.
|
||||
|
||||
Changes in binutils 2.7:
|
||||
|
||||
* Added --enable-shared and --enable-commonbfdlib options to configure.
|
||||
|
||||
* Added --debugging argument to objdump and objcopy.
|
||||
|
||||
* Added --defined-only argument to nm.
|
||||
|
||||
* Added --remove-leading-char argument to objcopy.
|
||||
|
||||
* The objdump --line-numbers option is now meaningful with --reloc.
|
||||
|
||||
* Added --line-numbers option to nm.
|
||||
|
||||
* Added --endian/-EB/-EL option to objdump.
|
||||
|
||||
* Added support for Alpha OpenVMS/AXP.
|
||||
|
||||
Changes in binutils 2.6:
|
||||
|
||||
* Added -N/--strip-symbol and -K/--keep-symbol arguments to strip and objcopy.
|
||||
|
||||
* Added several arguments to objcopy to provide some control over how the new
|
||||
file is laid out in memory. Also added binary output format to BFD to permit
|
||||
generating plain binary files.
|
||||
|
||||
* Added --start-address and --stop-address options to objdump.
|
||||
|
||||
* ar and ranlib now work on AIX. The tools are now built by default on AIX.
|
||||
|
||||
Changes in binutils 2.5:
|
||||
|
||||
* Changed objdump -dr to dump the relocs interspersed with the assembly
|
||||
listing, for a more useful listing of relocatable files.
|
||||
|
||||
* Changed objdump -d/--disassemble to only disassemble SEC_CODE sections.
|
||||
Added -D/--disassemble-all option to disassemble all sections.
|
||||
|
||||
* Added --size-sort option to nm.
|
||||
|
||||
* strip and objcopy should now be able to handle dynamically linked ELF
|
||||
executables.
|
||||
|
||||
Changes in binutils 2.4:
|
||||
|
||||
* Support for HP-PA (by Jeff Law), i386 Mach (by David Mackenzie), RS/6000 and
|
||||
PowerPC (except ar and ranlib; by Ian Taylor).
|
||||
|
||||
* Support for Irix 5.
|
||||
|
||||
* Programs `strip' and `objcopy' will not attempt to write dynamically linked
|
||||
ELF output files, since BFD currently can't create them properly.
|
||||
|
||||
Changes in binutils 2.3:
|
||||
|
||||
* A new --stabs argument has been added to objdump to dump stabs sections in
|
||||
ELF and COFF files.
|
||||
|
||||
* A new program, nlmconv, has been added. It can convert object files into
|
||||
Novell NetWare Loadable Modules.
|
||||
|
||||
* The strings program has been added.
|
||||
|
||||
Changes in binutils 2.2:
|
||||
|
||||
* The 'copy' program has been renamed to 'objcopy', for consistency with
|
||||
'objdump', and because 'copy' might more plausibly be used as a synonym for
|
||||
'cp'.
|
||||
|
||||
* The new stand-alone program c++filt is a filter that converts encoded
|
||||
(mangled) C++ assembly-level identifiers to user-level names. (Note: This
|
||||
may get moved to the gcc distribution.)
|
||||
|
||||
* nm -o on an archive now prefixes each line with the archive name, matching
|
||||
the output from BSD nm.
|
||||
|
||||
* ar (and ld) can now read (but not write) BSD4.4-style archives.
|
||||
|
||||
* New support for H8500, Z8000, and the Hitach SH.
|
||||
|
||||
* Dis-assembler interface changed to allow sharing with gdb.
|
||||
|
||||
* There is new Elf code, but it is not yet ready for general use.
|
||||
|
||||
* There is the beginnings of a test suite.
|
||||
|
||||
Changes in binutils 2.1:
|
||||
|
||||
* There is now support for writing ECOFF files, so ld and the other utilities
|
||||
should work on Risc/Ultrix and Irix. Please let us know how well this works.
|
||||
|
||||
* ar now automatically creates a symbol table (a __.SYMDEF member, in the BSD
|
||||
version), if there are any object files in the archive. So running ranlib is
|
||||
now redundant (unless the non-standard q command is used). This is required
|
||||
for Posix.2 conformance.
|
||||
|
||||
* The archive-reading code now reads both BSD-style and SYSV-style archives
|
||||
independently of the selected target format. This is to encourage people to
|
||||
switch to SYSV-format, which has a number of advantages.
|
||||
|
||||
* The strip and copy programs now have options to remove debug-symbols only
|
||||
and/or local symbols only. They now also support long options.
|
||||
|
||||
|
||||
Local variables:
|
||||
fill-column: 79
|
||||
End:
|
||||
284
binutils/README
284
binutils/README
@@ -1,284 +0,0 @@
|
||||
README for BINUTILS
|
||||
|
||||
These are the GNU binutils. These are utilities of use when dealing
|
||||
with binary files, either object files or executables. These tools
|
||||
consist of the linker (ld), the assembler (gas), and the profiler
|
||||
(gprof) each of which have their own sub-directory named after them.
|
||||
There is also a collection of other binary tools, including the
|
||||
disassembler (objdump) in this directory. These tools make use of a
|
||||
pair of libraries (bfd and opcodes) and a common set of header files
|
||||
(include).
|
||||
|
||||
There are README and NEWS files in most of the program sub-directories
|
||||
which give more information about those specific programs.
|
||||
|
||||
|
||||
Unpacking and Installation -- quick overview
|
||||
============================================
|
||||
|
||||
When you unpack the binutils archive file, you will get a directory
|
||||
called something like `binutils-XXX', where XXX is the number of the
|
||||
release. (Probably 2.13 or higher). This directory contains
|
||||
various files and sub-directories. Most of the files in the top
|
||||
directory are for information and for configuration. The actual
|
||||
source code is in sub-directories.
|
||||
|
||||
To build binutils, you can just do:
|
||||
|
||||
cd binutils-XXX
|
||||
./configure [options]
|
||||
make
|
||||
make install # copies the programs files into /usr/local/bin
|
||||
# by default.
|
||||
|
||||
This will configure and build all the libraries as well as the
|
||||
assembler, the binutils, and the linker.
|
||||
|
||||
If you have GNU make, we recommend building in a different directory:
|
||||
|
||||
mkdir objdir
|
||||
cd objdir
|
||||
../binutils-XXX/configure [options]
|
||||
make
|
||||
make install
|
||||
|
||||
This relies on the VPATH feature of GNU make.
|
||||
|
||||
By default, the binutils will be configured to support the system on
|
||||
which they are built. When doing cross development, use the --target
|
||||
configure option to specify a different target, eg:
|
||||
|
||||
./configure --target=foo-elf
|
||||
|
||||
The --enable-targets option adds support for more binary file formats
|
||||
besides the default. List them as the argument to --enable-targets,
|
||||
separated by commas. For example:
|
||||
|
||||
./configure --enable-targets=sun3,rs6000-aix,decstation
|
||||
|
||||
The name 'all' compiles in support for all valid BFD targets:
|
||||
|
||||
./configure --enable-targets=all
|
||||
|
||||
On 32-bit hosts though, this support will be restricted to 32-bit
|
||||
target unless the --enable-64-bit-bfd option is also used:
|
||||
|
||||
./configure --enable-64-bit-bfd --enable-targets=all
|
||||
|
||||
You can also specify the --enable-shared option when you run
|
||||
configure. This will build the BFD and opcodes libraries as shared
|
||||
libraries. You can use arguments with the --enable-shared option to
|
||||
indicate that only certain libraries should be built shared; for
|
||||
example, --enable-shared=bfd. The only potential shared libraries in
|
||||
a binutils release are bfd and opcodes.
|
||||
|
||||
The binutils will be linked against the shared libraries. The build
|
||||
step will attempt to place the correct library in the run-time search
|
||||
path for the binaries. However, in some cases, after you install the
|
||||
binaries, you may have to set an environment variable, normally
|
||||
LD_LIBRARY_PATH, so that the system can find the installed libbfd
|
||||
shared library.
|
||||
|
||||
On hosts that support shared system libraries the binutils will be
|
||||
linked against them. If you have static versions of the system
|
||||
libraries installed as well and you wish to create static binaries
|
||||
instead then use the LDFLAGS environment variable, like this:
|
||||
|
||||
../binutils-XXX/configure LDFLAGS="--static" [more options]
|
||||
|
||||
Note: the two dashes are important. The binutils make use of the
|
||||
libtool script which has a special interpretation of "-static" when it
|
||||
is in the LDFLAGS environment variable.
|
||||
|
||||
To build under openVMS/AXP, see the file makefile.vms in the top level
|
||||
directory.
|
||||
|
||||
|
||||
Native Language Support
|
||||
=======================
|
||||
|
||||
By default Native Language Support will be enabled for binutils. On
|
||||
some systems however this support is not present and can lead to error
|
||||
messages such as "undefined reference to `libintl_gettext'" when
|
||||
building there tools. If that happens the NLS support can be disabled
|
||||
by adding the --disable-nls switch to the configure line like this:
|
||||
|
||||
../binutils-XXX/configure --disable-nls
|
||||
|
||||
|
||||
If you don't have ar
|
||||
====================
|
||||
|
||||
If your system does not already have an 'ar' program, the normal
|
||||
binutils build process will not work. In this case, run configure as
|
||||
usual. Before running make, run this script:
|
||||
|
||||
#!/bin/sh
|
||||
MAKE_PROG="${MAKE-make}"
|
||||
MAKE="${MAKE_PROG} AR=true LINK=true"
|
||||
export MAKE
|
||||
${MAKE} $* all-libiberty
|
||||
${MAKE} $* all-intl
|
||||
${MAKE} $* all-bfd
|
||||
cd binutils
|
||||
MAKE="${MAKE_PROG}"
|
||||
export MAKE
|
||||
${MAKE} $* ar_DEPENDENCIES= ar_LDADD='../bfd/*.o ../libiberty/*.o `if test -f ../intl/gettext.o; then echo '../intl/*.o'; fi`' ar
|
||||
|
||||
This script will build an ar program in binutils/ar. Move binutils/ar
|
||||
into a directory on your PATH. After doing this, you can run make as
|
||||
usual to build the complete binutils distribution. You do not need
|
||||
the ranlib program in order to build the distribution.
|
||||
|
||||
Porting
|
||||
=======
|
||||
|
||||
Binutils-2.13 supports many different architectures, but there
|
||||
are many more not supported, including some that were supported
|
||||
by earlier versions. We are hoping for volunteers to improve this
|
||||
situation.
|
||||
|
||||
The major effort in porting binutils to a new host and/or target
|
||||
architecture involves the BFD library. There is some documentation
|
||||
in ../bfd/doc. The file ../gdb/doc/gdbint.texinfo (distributed
|
||||
with gdb-5.x) may also be of help.
|
||||
|
||||
Reporting bugs
|
||||
==============
|
||||
|
||||
Send bug reports and patches to:
|
||||
|
||||
bug-binutils@gnu.org.
|
||||
|
||||
Please include the following in bug reports:
|
||||
|
||||
- A description of exactly what went wrong, and exactly what should have
|
||||
happened instead.
|
||||
|
||||
- The configuration name(s) given to the "configure" script. The
|
||||
"config.status" file should have this information. This is assuming
|
||||
you built binutils yourself. If you didn't build binutils youself,
|
||||
then we need information regarding your machine and operating system,
|
||||
and it may be more appropriate to report bugs to wherever you obtained
|
||||
binutils.
|
||||
|
||||
- The options given to the tool (gas, objcopy, ld etc.) at run time.
|
||||
|
||||
- The actual input file that caused the problem.
|
||||
|
||||
Always mention the version number you are running; this is printed by
|
||||
running any of the binutils with the --version option. We appreciate
|
||||
reports about bugs, but we do not promise to fix them, particularly so
|
||||
when the bug report is against an old version. If you are able, please
|
||||
consider building the latest tools from CVS to check that your bug has
|
||||
not already been fixed.
|
||||
|
||||
When reporting problems about gas and ld, it's useful to provide a
|
||||
testcase that triggers the problem. In the case of a gas problem, we
|
||||
want input files to gas and command line switches used. The inputs to
|
||||
gas are _NOT_ .c or .i files, but rather .s files. If your original
|
||||
source was a C program, you can generate the .s file and see the command
|
||||
line options by passing -v -save-temps to gcc in addition to all the
|
||||
usual options you use. The reason we don't want C files is that we
|
||||
might not have a C compiler around for the target you use. While it
|
||||
might be possible to build a compiler, that takes considerable time and
|
||||
disk space, and we might not end up with exactly the same compiler you
|
||||
use.
|
||||
|
||||
In the case of a ld problem, the input files are .o, .a and .so files,
|
||||
and possibly a linker script specified with -T. Again, when using gcc
|
||||
to link, you can see these files by adding options to the gcc command
|
||||
line. Use -v -save-temps -Wl,-t, except that on targets that use gcc's
|
||||
collect2, you would add -v -save-temps -Wl,-t,-debug. The -t option
|
||||
tells ld to print all files and libraries used, so that, for example,
|
||||
you can associate -lc on the ld command line with the actual libc used.
|
||||
Note that your simple two line C program to trigger a problem typically
|
||||
expands into several megabytes of objects by the time you include
|
||||
libraries.
|
||||
|
||||
It is antisocial to post megabyte sized attachments to mailing lists, so
|
||||
please put large testcases somewhere on an ftp or web site so that only
|
||||
interested developers need to download them, or offer to email them on
|
||||
request. Better still, try to reduce the testcase, for example, try to
|
||||
develop a ld testcase that doesn't use system libraries. However,
|
||||
please be sure it is a complete testcase and that it really does
|
||||
demonstrate the problem. Also, don't bother paring it down if that will
|
||||
cause large delays in filing the bug report.
|
||||
|
||||
If you expect to be contributing a large number of test cases, it would
|
||||
be helpful if you would look at the test suite included in the release
|
||||
(based on the Deja Gnu testing framework, available from the usual ftp
|
||||
sites) and write test cases to fit into that framework. This is
|
||||
certainly not required.
|
||||
|
||||
VMS
|
||||
===
|
||||
|
||||
This section was written by Klaus K"ampf <kkaempf@rmi.de>. It
|
||||
describes how to build and install the binutils on openVMS (Alpha and
|
||||
Vax). (The BFD library only supports reading Vax object files.)
|
||||
|
||||
Compiling the release:
|
||||
|
||||
To compile the gnu binary utilities and the gnu assembler, you'll
|
||||
need DEC C or GNU C for openVMS/Alpha. You'll need *both* compilers
|
||||
on openVMS/Vax.
|
||||
|
||||
Compiling with either DEC C or GNU C works on openVMS/Alpha only. Some
|
||||
of the opcodes and binutils files trap a bug in the DEC C optimizer,
|
||||
so these files must be compiled with /noopt.
|
||||
|
||||
Compiling on openVMS/Vax is a bit complicated, as the bfd library traps
|
||||
a bug in GNU C and the gnu assembler a bug in (my version of) DEC C.
|
||||
|
||||
I never tried compiling with VAX C.
|
||||
|
||||
|
||||
You further need GNU Make Version 3.76 or later. This is available
|
||||
at ftp.progis.de or any GNU archive site. The makefiles assume that
|
||||
gmake starts gnu make as a foreign command.
|
||||
|
||||
If you're compiling with DEC C or VAX C, you must run
|
||||
|
||||
$ @setup
|
||||
|
||||
before starting gnu-make. This isn't needed with GNU C.
|
||||
|
||||
On the Alpha you can choose the compiler by editing the toplevel
|
||||
makefile.vms. Either select CC=cc (for DEC C) or CC=gcc (for GNU C)
|
||||
|
||||
|
||||
Installing the release
|
||||
|
||||
Provided that your directory setup conforms to the GNU on openVMS
|
||||
standard, you already have a concealed device named 'GNU_ROOT'.
|
||||
In this case, a simple
|
||||
|
||||
$ gmake install
|
||||
|
||||
suffices to copy all programs and libraries to the proper directories.
|
||||
|
||||
Define the programs as foreign commands by adding these lines to your
|
||||
login.com:
|
||||
|
||||
$ gas :== $GNU_ROOT:[bin]as.exe
|
||||
$ size :== $GNU_ROOT:[bin]size.exe
|
||||
$ nm :== $GNU_ROOT:[bin]nm.exe
|
||||
$ objdump :== $GNU_ROOT:[bin]objdump.exe
|
||||
$ strings :== $GNU_ROOT:[bin]strings.exe
|
||||
|
||||
If you have a different directory setup, copy the binary utilities
|
||||
([.binutils]size.exe, [.binutils]nm.exe, [.binutils]objdump.exe,
|
||||
and [.binutils]strings.exe) and the gnu assembler and preprocessor
|
||||
([.gas]as.exe and [.gas]gasp.exe]) to a directory of your choice
|
||||
and define all programs as foreign commands.
|
||||
|
||||
|
||||
If you're satisfied with the compilation, you may want to remove
|
||||
unneeded objects and libraries:
|
||||
|
||||
$ gmake clean
|
||||
|
||||
|
||||
If you have any problems or questions about the binutils on VMS, feel
|
||||
free to mail me at kkaempf@rmi.de.
|
||||
1013
binutils/aclocal.m4
vendored
1013
binutils/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,478 +0,0 @@
|
||||
/* addr2line.c -- convert addresses to line number and function name
|
||||
Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
2007, 2009 Free Software Foundation, Inc.
|
||||
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de
|
||||
|
||||
Usage:
|
||||
addr2line [options] addr addr ...
|
||||
or
|
||||
addr2line [options]
|
||||
|
||||
both forms write results to stdout, the second form reads addresses
|
||||
to be converted from stdin. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "getopt.h"
|
||||
#include "libiberty.h"
|
||||
#include "demangle.h"
|
||||
#include "bucomm.h"
|
||||
#include "elf-bfd.h"
|
||||
|
||||
static bfd_boolean unwind_inlines; /* -i, unwind inlined functions. */
|
||||
static bfd_boolean with_addresses; /* -a, show addresses. */
|
||||
static bfd_boolean with_functions; /* -f, show function names. */
|
||||
static bfd_boolean do_demangle; /* -C, demangle names. */
|
||||
static bfd_boolean pretty_print; /* -p, print on one line. */
|
||||
static bfd_boolean base_names; /* -s, strip directory names. */
|
||||
|
||||
static int naddr; /* Number of addresses to process. */
|
||||
static char **addr; /* Hex addresses to process. */
|
||||
|
||||
static asymbol **syms; /* Symbol table. */
|
||||
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{"addresses", no_argument, NULL, 'a'},
|
||||
{"basenames", no_argument, NULL, 's'},
|
||||
{"demangle", optional_argument, NULL, 'C'},
|
||||
{"exe", required_argument, NULL, 'e'},
|
||||
{"functions", no_argument, NULL, 'f'},
|
||||
{"inlines", no_argument, NULL, 'i'},
|
||||
{"pretty-print", no_argument, NULL, 'p'},
|
||||
{"section", required_argument, NULL, 'j'},
|
||||
{"target", required_argument, NULL, 'b'},
|
||||
{"help", no_argument, NULL, 'H'},
|
||||
{"version", no_argument, NULL, 'V'},
|
||||
{0, no_argument, 0, 0}
|
||||
};
|
||||
|
||||
static void usage (FILE *, int);
|
||||
static void slurp_symtab (bfd *);
|
||||
static void find_address_in_section (bfd *, asection *, void *);
|
||||
static void find_offset_in_section (bfd *, asection *);
|
||||
static void translate_addresses (bfd *, asection *);
|
||||
|
||||
/* Print a usage message to STREAM and exit with STATUS. */
|
||||
|
||||
static void
|
||||
usage (FILE *stream, int status)
|
||||
{
|
||||
fprintf (stream, _("Usage: %s [option(s)] [addr(s)]\n"), program_name);
|
||||
fprintf (stream, _(" Convert addresses into line number/file name pairs.\n"));
|
||||
fprintf (stream, _(" If no addresses are specified on the command line, they will be read from stdin\n"));
|
||||
fprintf (stream, _(" The options are:\n\
|
||||
@<file> Read options from <file>\n\
|
||||
-a --addresses Show addresses\n\
|
||||
-b --target=<bfdname> Set the binary file format\n\
|
||||
-e --exe=<executable> Set the input file name (default is a.out)\n\
|
||||
-i --inlines Unwind inlined functions\n\
|
||||
-j --section=<name> Read section-relative offsets instead of addresses\n\
|
||||
-p --pretty-print Make the output easier to read for humans\n\
|
||||
-s --basenames Strip directory names\n\
|
||||
-f --functions Show function names\n\
|
||||
-C --demangle[=style] Demangle function names\n\
|
||||
-h --help Display this information\n\
|
||||
-v --version Display the program's version\n\
|
||||
\n"));
|
||||
|
||||
list_supported_targets (program_name, stream);
|
||||
if (REPORT_BUGS_TO[0] && status == 0)
|
||||
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Read in the symbol table. */
|
||||
|
||||
static void
|
||||
slurp_symtab (bfd *abfd)
|
||||
{
|
||||
long storage;
|
||||
long symcount;
|
||||
bfd_boolean dynamic = FALSE;
|
||||
|
||||
if ((bfd_get_file_flags (abfd) & HAS_SYMS) == 0)
|
||||
return;
|
||||
|
||||
storage = bfd_get_symtab_upper_bound (abfd);
|
||||
if (storage == 0)
|
||||
{
|
||||
storage = bfd_get_dynamic_symtab_upper_bound (abfd);
|
||||
dynamic = TRUE;
|
||||
}
|
||||
if (storage < 0)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
|
||||
syms = (asymbol **) xmalloc (storage);
|
||||
if (dynamic)
|
||||
symcount = bfd_canonicalize_dynamic_symtab (abfd, syms);
|
||||
else
|
||||
symcount = bfd_canonicalize_symtab (abfd, syms);
|
||||
if (symcount < 0)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
}
|
||||
|
||||
/* These global variables are used to pass information between
|
||||
translate_addresses and find_address_in_section. */
|
||||
|
||||
static bfd_vma pc;
|
||||
static const char *filename;
|
||||
static const char *functionname;
|
||||
static unsigned int line;
|
||||
static bfd_boolean found;
|
||||
|
||||
/* Look for an address in a section. This is called via
|
||||
bfd_map_over_sections. */
|
||||
|
||||
static void
|
||||
find_address_in_section (bfd *abfd, asection *section,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
bfd_vma vma;
|
||||
bfd_size_type size;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
||||
if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
|
||||
return;
|
||||
|
||||
vma = bfd_get_section_vma (abfd, section);
|
||||
if (pc < vma)
|
||||
return;
|
||||
|
||||
size = bfd_get_section_size (section);
|
||||
if (pc >= vma + size)
|
||||
return;
|
||||
|
||||
found = bfd_find_nearest_line (abfd, section, syms, pc - vma,
|
||||
&filename, &functionname, &line);
|
||||
}
|
||||
|
||||
/* Look for an offset in a section. This is directly called. */
|
||||
|
||||
static void
|
||||
find_offset_in_section (bfd *abfd, asection *section)
|
||||
{
|
||||
bfd_size_type size;
|
||||
|
||||
if (found)
|
||||
return;
|
||||
|
||||
if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
|
||||
return;
|
||||
|
||||
size = bfd_get_section_size (section);
|
||||
if (pc >= size)
|
||||
return;
|
||||
|
||||
found = bfd_find_nearest_line (abfd, section, syms, pc,
|
||||
&filename, &functionname, &line);
|
||||
}
|
||||
|
||||
/* Read hexadecimal addresses from stdin, translate into
|
||||
file_name:line_number and optionally function name. */
|
||||
|
||||
static void
|
||||
translate_addresses (bfd *abfd, asection *section)
|
||||
{
|
||||
int read_stdin = (naddr == 0);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
if (read_stdin)
|
||||
{
|
||||
char addr_hex[100];
|
||||
|
||||
if (fgets (addr_hex, sizeof addr_hex, stdin) == NULL)
|
||||
break;
|
||||
pc = bfd_scan_vma (addr_hex, NULL, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (naddr <= 0)
|
||||
break;
|
||||
--naddr;
|
||||
pc = bfd_scan_vma (*addr++, NULL, 16);
|
||||
}
|
||||
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
{
|
||||
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
|
||||
bfd_vma sign = (bfd_vma) 1 << (bed->s->arch_size - 1);
|
||||
|
||||
pc &= (sign << 1) - 1;
|
||||
if (bed->sign_extend_vma)
|
||||
pc = (pc ^ sign) - sign;
|
||||
}
|
||||
|
||||
if (with_addresses)
|
||||
{
|
||||
printf ("0x");
|
||||
bfd_printf_vma (abfd, pc);
|
||||
|
||||
if (pretty_print)
|
||||
printf (": ");
|
||||
else
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
found = FALSE;
|
||||
if (section)
|
||||
find_offset_in_section (abfd, section);
|
||||
else
|
||||
bfd_map_over_sections (abfd, find_address_in_section, NULL);
|
||||
|
||||
if (! found)
|
||||
{
|
||||
if (with_functions)
|
||||
printf ("??\n");
|
||||
printf ("??:0\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
if (with_functions)
|
||||
{
|
||||
const char *name;
|
||||
char *alloc = NULL;
|
||||
|
||||
name = functionname;
|
||||
if (name == NULL || *name == '\0')
|
||||
name = "??";
|
||||
else if (do_demangle)
|
||||
{
|
||||
alloc = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
|
||||
if (alloc != NULL)
|
||||
name = alloc;
|
||||
}
|
||||
|
||||
printf ("%s", name);
|
||||
if (pretty_print)
|
||||
/* Note for translators: This printf is used to join the
|
||||
function name just printed above to the line number/
|
||||
file name pair that is about to be printed below. Eg:
|
||||
|
||||
foo at 123:bar.c */
|
||||
printf (_(" at "));
|
||||
else
|
||||
printf ("\n");
|
||||
|
||||
if (alloc != NULL)
|
||||
free (alloc);
|
||||
}
|
||||
|
||||
if (base_names && filename != NULL)
|
||||
{
|
||||
char *h;
|
||||
|
||||
h = strrchr (filename, '/');
|
||||
if (h != NULL)
|
||||
filename = h + 1;
|
||||
}
|
||||
|
||||
printf ("%s:", filename ? filename : "??");
|
||||
if (line != 0)
|
||||
printf ("%u\n", line);
|
||||
else
|
||||
printf ("?\n");
|
||||
if (!unwind_inlines)
|
||||
found = FALSE;
|
||||
else
|
||||
found = bfd_find_inliner_info (abfd, &filename, &functionname,
|
||||
&line);
|
||||
if (! found)
|
||||
break;
|
||||
if (pretty_print)
|
||||
/* Note for translators: This printf is used to join the
|
||||
line number/file name pair that has just been printed with
|
||||
the line number/file name pair that is going to be printed
|
||||
by the next iteration of the while loop. Eg:
|
||||
|
||||
123:bar.c (inlined by) 456:main.c */
|
||||
printf (_(" (inlined by) "));
|
||||
}
|
||||
}
|
||||
|
||||
/* fflush() is essential for using this command as a server
|
||||
child process that reads addresses from a pipe and responds
|
||||
with line number information, processing one address at a
|
||||
time. */
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
/* Process a file. Returns an exit value for main(). */
|
||||
|
||||
static int
|
||||
process_file (const char *file_name, const char *section_name,
|
||||
const char *target)
|
||||
{
|
||||
bfd *abfd;
|
||||
asection *section;
|
||||
char **matching;
|
||||
|
||||
if (get_file_size (file_name) < 1)
|
||||
return 1;
|
||||
|
||||
abfd = bfd_openr (file_name, target);
|
||||
if (abfd == NULL)
|
||||
bfd_fatal (file_name);
|
||||
|
||||
/* Decompress sections. */
|
||||
abfd->flags |= BFD_DECOMPRESS;
|
||||
|
||||
if (bfd_check_format (abfd, bfd_archive))
|
||||
fatal (_("%s: cannot get addresses from archive"), file_name);
|
||||
|
||||
if (! bfd_check_format_matches (abfd, bfd_object, &matching))
|
||||
{
|
||||
bfd_nonfatal (bfd_get_filename (abfd));
|
||||
if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
|
||||
{
|
||||
list_matching_formats (matching);
|
||||
free (matching);
|
||||
}
|
||||
xexit (1);
|
||||
}
|
||||
|
||||
if (section_name != NULL)
|
||||
{
|
||||
section = bfd_get_section_by_name (abfd, section_name);
|
||||
if (section == NULL)
|
||||
fatal (_("%s: cannot find section %s"), file_name, section_name);
|
||||
}
|
||||
else
|
||||
section = NULL;
|
||||
|
||||
slurp_symtab (abfd);
|
||||
|
||||
translate_addresses (abfd, section);
|
||||
|
||||
if (syms != NULL)
|
||||
{
|
||||
free (syms);
|
||||
syms = NULL;
|
||||
}
|
||||
|
||||
bfd_close (abfd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
const char *file_name;
|
||||
const char *section_name;
|
||||
char *target;
|
||||
int c;
|
||||
|
||||
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
|
||||
setlocale (LC_MESSAGES, "");
|
||||
#endif
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
setlocale (LC_CTYPE, "");
|
||||
#endif
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
program_name = *argv;
|
||||
xmalloc_set_program_name (program_name);
|
||||
|
||||
expandargv (&argc, &argv);
|
||||
|
||||
bfd_init ();
|
||||
set_default_bfd_target ();
|
||||
|
||||
file_name = NULL;
|
||||
section_name = NULL;
|
||||
target = NULL;
|
||||
while ((c = getopt_long (argc, argv, "ab:Ce:sfHhij:pVv", long_options, (int *) 0))
|
||||
!= EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
break; /* We've been given a long option. */
|
||||
case 'a':
|
||||
with_addresses = TRUE;
|
||||
break;
|
||||
case 'b':
|
||||
target = optarg;
|
||||
break;
|
||||
case 'C':
|
||||
do_demangle = TRUE;
|
||||
if (optarg != NULL)
|
||||
{
|
||||
enum demangling_styles style;
|
||||
|
||||
style = cplus_demangle_name_to_style (optarg);
|
||||
if (style == unknown_demangling)
|
||||
fatal (_("unknown demangling style `%s'"),
|
||||
optarg);
|
||||
|
||||
cplus_demangle_set_style (style);
|
||||
}
|
||||
break;
|
||||
case 'e':
|
||||
file_name = optarg;
|
||||
break;
|
||||
case 's':
|
||||
base_names = TRUE;
|
||||
break;
|
||||
case 'f':
|
||||
with_functions = TRUE;
|
||||
break;
|
||||
case 'p':
|
||||
pretty_print = TRUE;
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
print_version ("addr2line");
|
||||
break;
|
||||
case 'h':
|
||||
case 'H':
|
||||
usage (stdout, 0);
|
||||
break;
|
||||
case 'i':
|
||||
unwind_inlines = TRUE;
|
||||
break;
|
||||
case 'j':
|
||||
section_name = optarg;
|
||||
break;
|
||||
default:
|
||||
usage (stderr, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (file_name == NULL)
|
||||
file_name = "a.out";
|
||||
|
||||
addr = argv + optind;
|
||||
naddr = argc - optind;
|
||||
|
||||
return process_file (file_name, section_name, target);
|
||||
}
|
||||
1443
binutils/ar.c
1443
binutils/ar.c
File diff suppressed because it is too large
Load Diff
@@ -1,95 +0,0 @@
|
||||
%option noinput nounput
|
||||
|
||||
%{
|
||||
/* arlex.l - Strange script language lexer */
|
||||
|
||||
/* Copyright 1992, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Contributed by Steve Chamberlain <sac@cygnus.com>. */
|
||||
|
||||
#define DONTDECLARE_MALLOC
|
||||
#include "ansidecl.h"
|
||||
#include "libiberty.h"
|
||||
#include "arparse.h"
|
||||
|
||||
#ifndef YY_NO_UNPUT
|
||||
#define YY_NO_UNPUT
|
||||
#endif
|
||||
|
||||
extern int yylex (void);
|
||||
|
||||
int linenumber;
|
||||
%}
|
||||
|
||||
%a 10000
|
||||
%o 25000
|
||||
|
||||
%%
|
||||
|
||||
"ADDLIB" { return ADDLIB; }
|
||||
"ADDMOD" { return ADDMOD; }
|
||||
"CLEAR" { return CLEAR; }
|
||||
"CREATE" { return CREATE; }
|
||||
"DELETE" { return DELETE; }
|
||||
"DIRECTORY" { return DIRECTORY; }
|
||||
"END" { return END; }
|
||||
"EXTRACT" { return EXTRACT; }
|
||||
"FULLDIR" { return FULLDIR; }
|
||||
"HELP" { return HELP; }
|
||||
"LIST" { return LIST; }
|
||||
"OPEN" { return OPEN; }
|
||||
"REPLACE" { return REPLACE; }
|
||||
"VERBOSE" { return VERBOSE; }
|
||||
"SAVE" { return SAVE; }
|
||||
"addlib" { return ADDLIB; }
|
||||
"addmod" { return ADDMOD; }
|
||||
"clear" { return CLEAR; }
|
||||
"create" { return CREATE; }
|
||||
"delete" { return DELETE; }
|
||||
"directory" { return DIRECTORY; }
|
||||
"end" { return END; }
|
||||
"extract" { return EXTRACT; }
|
||||
"fulldir" { return FULLDIR; }
|
||||
"help" { return HELP; }
|
||||
"list" { return LIST; }
|
||||
"open" { return OPEN; }
|
||||
"replace" { return REPLACE; }
|
||||
"verbose" { return VERBOSE; }
|
||||
"save" { return SAVE; }
|
||||
"+\n" { linenumber ++; }
|
||||
"(" { return '('; }
|
||||
")" { return ')'; }
|
||||
"," { return ','; }
|
||||
[A-Za-z0-9/\\$:.\-\_]+ {
|
||||
yylval.name = xstrdup (yytext);
|
||||
return FILENAME;
|
||||
}
|
||||
"*".* { }
|
||||
";".* { }
|
||||
" " { }
|
||||
"\n" { linenumber ++; return NEWLINE; }
|
||||
|
||||
%%
|
||||
#ifndef yywrap
|
||||
/* Needed for lex, though not flex. */
|
||||
int yywrap(void) { return 1; }
|
||||
#endif
|
||||
@@ -1,204 +0,0 @@
|
||||
%{
|
||||
/* arparse.y - Stange script language parser */
|
||||
|
||||
/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Contributed by Steve Chamberlain
|
||||
sac@cygnus.com
|
||||
|
||||
*/
|
||||
#define DONTDECLARE_MALLOC
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "arsup.h"
|
||||
extern int verbose;
|
||||
extern int yylex (void);
|
||||
static int yyerror (const char *);
|
||||
%}
|
||||
|
||||
%union {
|
||||
char *name;
|
||||
struct list *list ;
|
||||
|
||||
};
|
||||
|
||||
%token NEWLINE
|
||||
%token VERBOSE
|
||||
%token <name> FILENAME
|
||||
%token ADDLIB
|
||||
%token LIST
|
||||
%token ADDMOD
|
||||
%token CLEAR
|
||||
%token CREATE
|
||||
%token DELETE
|
||||
%token DIRECTORY
|
||||
%token END
|
||||
%token EXTRACT
|
||||
%token FULLDIR
|
||||
%token HELP
|
||||
%token QUIT
|
||||
%token REPLACE
|
||||
%token SAVE
|
||||
%token OPEN
|
||||
|
||||
%type <list> modulelist
|
||||
%type <list> modulename
|
||||
%type <name> optional_filename
|
||||
%%
|
||||
|
||||
start:
|
||||
{ prompt(); } session
|
||||
;
|
||||
|
||||
session:
|
||||
session command_line
|
||||
|
|
||||
;
|
||||
|
||||
command_line:
|
||||
command NEWLINE { prompt(); }
|
||||
;
|
||||
|
||||
command:
|
||||
open_command
|
||||
| create_command
|
||||
| verbose_command
|
||||
| directory_command
|
||||
| addlib_command
|
||||
| clear_command
|
||||
| addmod_command
|
||||
| save_command
|
||||
| extract_command
|
||||
| replace_command
|
||||
| delete_command
|
||||
| list_command
|
||||
| END { ar_end(); return 0; }
|
||||
| error
|
||||
| FILENAME { yyerror("foo"); }
|
||||
|
|
||||
;
|
||||
|
||||
|
||||
extract_command:
|
||||
EXTRACT modulename
|
||||
{ ar_extract($2); }
|
||||
;
|
||||
|
||||
replace_command:
|
||||
REPLACE modulename
|
||||
{ ar_replace($2); }
|
||||
;
|
||||
|
||||
clear_command:
|
||||
CLEAR
|
||||
{ ar_clear(); }
|
||||
;
|
||||
|
||||
delete_command:
|
||||
DELETE modulename
|
||||
{ ar_delete($2); }
|
||||
;
|
||||
addmod_command:
|
||||
ADDMOD modulename
|
||||
{ ar_addmod($2); }
|
||||
;
|
||||
|
||||
list_command:
|
||||
LIST
|
||||
{ ar_list(); }
|
||||
;
|
||||
|
||||
save_command:
|
||||
SAVE
|
||||
{ ar_save(); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
open_command:
|
||||
OPEN FILENAME
|
||||
{ ar_open($2,0); }
|
||||
;
|
||||
|
||||
create_command:
|
||||
CREATE FILENAME
|
||||
{ ar_open($2,1); }
|
||||
;
|
||||
|
||||
|
||||
addlib_command:
|
||||
ADDLIB FILENAME modulelist
|
||||
{ ar_addlib($2,$3); }
|
||||
;
|
||||
directory_command:
|
||||
DIRECTORY FILENAME modulelist optional_filename
|
||||
{ ar_directory($2, $3, $4); }
|
||||
;
|
||||
|
||||
|
||||
|
||||
optional_filename:
|
||||
FILENAME
|
||||
{ $$ = $1; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
modulelist:
|
||||
'(' modulename ')'
|
||||
{ $$ = $2; }
|
||||
|
|
||||
{ $$ = 0; }
|
||||
;
|
||||
|
||||
modulename:
|
||||
modulename optcomma FILENAME
|
||||
{ struct list *n = (struct list *) malloc(sizeof(struct list));
|
||||
n->next = $1;
|
||||
n->name = $3;
|
||||
$$ = n;
|
||||
}
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
|
||||
optcomma:
|
||||
','
|
||||
|
|
||||
;
|
||||
|
||||
|
||||
verbose_command:
|
||||
VERBOSE
|
||||
{ verbose = !verbose; }
|
||||
;
|
||||
|
||||
|
||||
%%
|
||||
|
||||
static int
|
||||
yyerror (const char *x ATTRIBUTE_UNUSED)
|
||||
{
|
||||
extern int linenumber;
|
||||
|
||||
printf (_("Syntax error in archive script, line %d\n"), linenumber + 1);
|
||||
return 0;
|
||||
}
|
||||
481
binutils/arsup.c
481
binutils/arsup.c
@@ -1,481 +0,0 @@
|
||||
/* arsup.c - Archive support for MRI compatibility
|
||||
Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
|
||||
2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Contributed by Steve Chamberlain
|
||||
sac@cygnus.com
|
||||
|
||||
This file looks after requests from arparse.y, to provide the MRI
|
||||
style librarian command syntax + 1 word LIST. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "filenames.h"
|
||||
#include "bucomm.h"
|
||||
#include "arsup.h"
|
||||
|
||||
static void map_over_list
|
||||
(bfd *, void (*function) (bfd *, bfd *), struct list *);
|
||||
static void ar_directory_doer (bfd *, bfd *);
|
||||
static void ar_addlib_doer (bfd *, bfd *);
|
||||
|
||||
extern int verbose;
|
||||
|
||||
static bfd *obfd;
|
||||
static char *real_name;
|
||||
static FILE *outfile;
|
||||
|
||||
static void
|
||||
map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
|
||||
{
|
||||
bfd *head;
|
||||
|
||||
if (list == NULL)
|
||||
{
|
||||
bfd *next;
|
||||
|
||||
head = arch->archive_next;
|
||||
while (head != NULL)
|
||||
{
|
||||
next = head->archive_next;
|
||||
function (head, (bfd *) NULL);
|
||||
head = next;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
struct list *ptr;
|
||||
|
||||
/* This may appear to be a baroque way of accomplishing what we
|
||||
want. however we have to iterate over the filenames in order
|
||||
to notice where a filename is requested but does not exist in
|
||||
the archive. Ditto mapping over each file each time -- we
|
||||
want to hack multiple references. */
|
||||
for (ptr = list; ptr; ptr = ptr->next)
|
||||
{
|
||||
bfd_boolean found = FALSE;
|
||||
bfd *prev = arch;
|
||||
|
||||
for (head = arch->archive_next; head; head = head->archive_next)
|
||||
{
|
||||
if (head->filename != NULL
|
||||
&& FILENAME_CMP (ptr->name, head->filename) == 0)
|
||||
{
|
||||
found = TRUE;
|
||||
function (head, prev);
|
||||
}
|
||||
prev = head;
|
||||
}
|
||||
if (! found)
|
||||
fprintf (stderr, _("No entry %s in archive.\n"), ptr->name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
ar_directory_doer (bfd *abfd, bfd *ignore ATTRIBUTE_UNUSED)
|
||||
{
|
||||
print_arelt_descr(outfile, abfd, verbose);
|
||||
}
|
||||
|
||||
void
|
||||
ar_directory (char *ar_name, struct list *list, char *output)
|
||||
{
|
||||
bfd *arch;
|
||||
|
||||
arch = open_inarch (ar_name, (char *) NULL);
|
||||
if (output)
|
||||
{
|
||||
outfile = fopen(output,"w");
|
||||
if (outfile == 0)
|
||||
{
|
||||
outfile = stdout;
|
||||
fprintf (stderr,_("Can't open file %s\n"), output);
|
||||
output = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
outfile = stdout;
|
||||
|
||||
map_over_list (arch, ar_directory_doer, list);
|
||||
|
||||
bfd_close (arch);
|
||||
|
||||
if (output)
|
||||
fclose (outfile);
|
||||
}
|
||||
|
||||
void
|
||||
prompt (void)
|
||||
{
|
||||
extern int interactive;
|
||||
|
||||
if (interactive)
|
||||
{
|
||||
printf ("AR >");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
maybequit (void)
|
||||
{
|
||||
if (! interactive)
|
||||
xexit (9);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ar_open (char *name, int t)
|
||||
{
|
||||
char *tname = (char *) xmalloc (strlen (name) + 10);
|
||||
const char *bname = lbasename (name);
|
||||
real_name = name;
|
||||
|
||||
/* Prepend tmp- to the beginning, to avoid file-name clashes after
|
||||
truncation on filesystems with limited namespaces (DOS). */
|
||||
sprintf (tname, "%.*stmp-%s", (int) (bname - name), name, bname);
|
||||
obfd = bfd_openw (tname, NULL);
|
||||
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr,
|
||||
_("%s: Can't open output archive %s\n"),
|
||||
program_name, tname);
|
||||
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!t)
|
||||
{
|
||||
bfd **ptr;
|
||||
bfd *element;
|
||||
bfd *ibfd;
|
||||
|
||||
ibfd = bfd_openr (name, NULL);
|
||||
|
||||
if (!ibfd)
|
||||
{
|
||||
fprintf (stderr,_("%s: Can't open input archive %s\n"),
|
||||
program_name, name);
|
||||
maybequit ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!bfd_check_format(ibfd, bfd_archive))
|
||||
{
|
||||
fprintf (stderr,
|
||||
_("%s: file %s is not an archive\n"),
|
||||
program_name, name);
|
||||
maybequit ();
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = &(obfd->archive_head);
|
||||
element = bfd_openr_next_archived_file (ibfd, NULL);
|
||||
|
||||
while (element)
|
||||
{
|
||||
*ptr = element;
|
||||
ptr = &element->archive_next;
|
||||
element = bfd_openr_next_archived_file (ibfd, element);
|
||||
}
|
||||
}
|
||||
|
||||
bfd_set_format (obfd, bfd_archive);
|
||||
|
||||
obfd->has_armap = 1;
|
||||
obfd->is_thin_archive = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ar_addlib_doer (bfd *abfd, bfd *prev)
|
||||
{
|
||||
/* Add this module to the output bfd. */
|
||||
if (prev != NULL)
|
||||
prev->archive_next = abfd->archive_next;
|
||||
|
||||
abfd->archive_next = obfd->archive_head;
|
||||
obfd->archive_head = abfd;
|
||||
}
|
||||
|
||||
void
|
||||
ar_addlib (char *name, struct list *list)
|
||||
{
|
||||
if (obfd == NULL)
|
||||
{
|
||||
fprintf (stderr, _("%s: no output archive specified yet\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
bfd *arch;
|
||||
|
||||
arch = open_inarch (name, (char *) NULL);
|
||||
if (arch != NULL)
|
||||
map_over_list (arch, ar_addlib_doer, list);
|
||||
|
||||
/* Don't close the bfd, since it will make the elements disappear. */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ar_addmod (struct list *list)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open output archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
bfd *abfd = bfd_openr (list->name, NULL);
|
||||
|
||||
if (!abfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: can't open file %s\n"),
|
||||
program_name, list->name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
abfd->archive_next = obfd->archive_head;
|
||||
obfd->archive_head = abfd;
|
||||
}
|
||||
list = list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ar_clear (void)
|
||||
{
|
||||
if (obfd)
|
||||
obfd->archive_head = 0;
|
||||
}
|
||||
|
||||
void
|
||||
ar_delete (struct list *list)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open output archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
/* Find this name in the archive. */
|
||||
bfd *member = obfd->archive_head;
|
||||
bfd **prev = &(obfd->archive_head);
|
||||
int found = 0;
|
||||
|
||||
while (member)
|
||||
{
|
||||
if (FILENAME_CMP(member->filename, list->name) == 0)
|
||||
{
|
||||
*prev = member->archive_next;
|
||||
found = 1;
|
||||
}
|
||||
else
|
||||
prev = &(member->archive_next);
|
||||
|
||||
member = member->archive_next;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
fprintf (stderr, _("%s: can't find module file %s\n"),
|
||||
program_name, list->name);
|
||||
maybequit ();
|
||||
}
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ar_save (void)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open output archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
char *ofilename = xstrdup (bfd_get_filename (obfd));
|
||||
|
||||
bfd_close (obfd);
|
||||
|
||||
smart_rename (ofilename, real_name, 0);
|
||||
obfd = 0;
|
||||
free (ofilename);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ar_replace (struct list *list)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open output archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
/* Find this name in the archive. */
|
||||
bfd *member = obfd->archive_head;
|
||||
bfd **prev = &(obfd->archive_head);
|
||||
int found = 0;
|
||||
|
||||
while (member)
|
||||
{
|
||||
if (FILENAME_CMP (member->filename, list->name) == 0)
|
||||
{
|
||||
/* Found the one to replace. */
|
||||
bfd *abfd = bfd_openr (list->name, 0);
|
||||
|
||||
if (!abfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: can't open file %s\n"),
|
||||
program_name, list->name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
*prev = abfd;
|
||||
abfd->archive_next = member->archive_next;
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
prev = &(member->archive_next);
|
||||
}
|
||||
member = member->archive_next;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
bfd *abfd = bfd_openr (list->name, 0);
|
||||
|
||||
fprintf (stderr,_("%s: can't find module file %s\n"),
|
||||
program_name, list->name);
|
||||
if (!abfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: can't open file %s\n"),
|
||||
program_name, list->name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
*prev = abfd;
|
||||
}
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* And I added this one. */
|
||||
void
|
||||
ar_list (void)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open output archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
bfd *abfd;
|
||||
|
||||
outfile = stdout;
|
||||
verbose =1 ;
|
||||
printf (_("Current open archive is %s\n"), bfd_get_filename (obfd));
|
||||
|
||||
for (abfd = obfd->archive_head;
|
||||
abfd != (bfd *)NULL;
|
||||
abfd = abfd->archive_next)
|
||||
ar_directory_doer (abfd, (bfd *) NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ar_end (void)
|
||||
{
|
||||
if (obfd)
|
||||
{
|
||||
bfd_cache_close (obfd);
|
||||
unlink (bfd_get_filename (obfd));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ar_extract (struct list *list)
|
||||
{
|
||||
if (!obfd)
|
||||
{
|
||||
fprintf (stderr, _("%s: no open archive\n"), program_name);
|
||||
maybequit ();
|
||||
}
|
||||
else
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
/* Find this name in the archive. */
|
||||
bfd *member = obfd->archive_head;
|
||||
int found = 0;
|
||||
|
||||
while (member && !found)
|
||||
{
|
||||
if (FILENAME_CMP (member->filename, list->name) == 0)
|
||||
{
|
||||
extract_file (member);
|
||||
found = 1;
|
||||
}
|
||||
|
||||
member = member->archive_next;
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
bfd_openr (list->name, 0);
|
||||
fprintf (stderr, _("%s: can't find module file %s\n"),
|
||||
program_name, list->name);
|
||||
}
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/* arsup.h - archive support header file
|
||||
Copyright 1992, 1993, 1994, 1996, 2001, 2002, 2003, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
struct list {
|
||||
char *name;
|
||||
struct list *next;
|
||||
};
|
||||
|
||||
void maybequit (void);
|
||||
|
||||
void prompt (void);
|
||||
|
||||
void ar_clear (void);
|
||||
|
||||
void ar_replace (struct list *);
|
||||
|
||||
void ar_delete (struct list *);
|
||||
|
||||
void ar_save (void);
|
||||
|
||||
void ar_list (void);
|
||||
|
||||
void ar_open (char *, int);
|
||||
|
||||
void ar_directory (char *, struct list *, char *);
|
||||
|
||||
void ar_addmod (struct list *);
|
||||
|
||||
void ar_addlib (char *, struct list *);
|
||||
|
||||
void ar_end (void);
|
||||
|
||||
void ar_extract (struct list *);
|
||||
|
||||
bfd *open_inarch (const char *archive_filename, const char *);
|
||||
|
||||
extern int yylex (void);
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
/* Functions from ar.c */
|
||||
|
||||
void extract_file (bfd * abfd);
|
||||
|
||||
extern int interactive;
|
||||
@@ -1,66 +0,0 @@
|
||||
/* bin2c.c -- dump binary file in hex format
|
||||
Copyright 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "binary-io.h"
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
int i;
|
||||
|
||||
if (argc != 1)
|
||||
{
|
||||
int ishelp = 0;
|
||||
FILE *stream;
|
||||
|
||||
if (argc == 2 && argv[1][0] == '-')
|
||||
{
|
||||
const char *opt = &argv[1][1];
|
||||
if (*opt == '-')
|
||||
++opt;
|
||||
ishelp = *opt == 'h' || *opt == 'H';
|
||||
}
|
||||
|
||||
stream = ishelp ? stdout : stderr;
|
||||
fprintf (stream, "Usage: %s < input_file > output_file\n", argv[0]);
|
||||
fprintf (stream, "Prints bytes from stdin in hex format.\n");
|
||||
exit (!ishelp);
|
||||
}
|
||||
|
||||
SET_BINARY (fileno (stdin));
|
||||
|
||||
i = 0;
|
||||
while ((c = getc (stdin)) != EOF)
|
||||
{
|
||||
printf ("0x%02x,", c);
|
||||
if (++i == 16)
|
||||
{
|
||||
printf ("\n");
|
||||
i = 0;
|
||||
}
|
||||
}
|
||||
if (i != 0)
|
||||
printf ("\n");
|
||||
|
||||
exit (0);
|
||||
}
|
||||
@@ -1,149 +0,0 @@
|
||||
/* Binutils emulation layer.
|
||||
Copyright 2002, 2003, 2005, 2007, 2008, 2010
|
||||
Free Software Foundation, Inc.
|
||||
Written by Tom Rix, Red Hat Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "binemul.h"
|
||||
|
||||
extern bin_emulation_xfer_type bin_dummy_emulation;
|
||||
|
||||
void
|
||||
ar_emul_usage (FILE *fp)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_usage)
|
||||
bin_dummy_emulation.ar_usage (fp);
|
||||
}
|
||||
|
||||
void
|
||||
ar_emul_default_usage (FILE *fp)
|
||||
{
|
||||
AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp);
|
||||
/* xgettext:c-format */
|
||||
fprintf (fp, _(" No emulation specific options\n"));
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_append (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_append)
|
||||
return bin_dummy_emulation.ar_append (after_bfd, file_name, target,
|
||||
verbose, flatten);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
any_ok (bfd *new_bfd ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
do_ar_emul_append (bfd **after_bfd, bfd *new_bfd,
|
||||
bfd_boolean verbose, bfd_boolean flatten,
|
||||
bfd_boolean (*check) (bfd *))
|
||||
{
|
||||
/* When flattening, add the members of an archive instead of the
|
||||
archive itself. */
|
||||
if (flatten && bfd_check_format (new_bfd, bfd_archive))
|
||||
{
|
||||
bfd *elt;
|
||||
bfd_boolean added = FALSE;
|
||||
|
||||
for (elt = bfd_openr_next_archived_file (new_bfd, NULL);
|
||||
elt;
|
||||
elt = bfd_openr_next_archived_file (new_bfd, elt))
|
||||
{
|
||||
if (do_ar_emul_append (after_bfd, elt, verbose, TRUE, check))
|
||||
{
|
||||
added = TRUE;
|
||||
after_bfd = &((*after_bfd)->archive_next);
|
||||
}
|
||||
}
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
if (!check (new_bfd))
|
||||
return FALSE;
|
||||
|
||||
AR_EMUL_APPEND_PRINT_VERBOSE (verbose, new_bfd->filename);
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_default_append (bfd **after_bfd, char *file_name,
|
||||
const char *target, bfd_boolean verbose,
|
||||
bfd_boolean flatten)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
new_bfd = bfd_openr (file_name, target);
|
||||
AR_EMUL_ELEMENT_CHECK (new_bfd, file_name);
|
||||
return do_ar_emul_append (after_bfd, new_bfd, verbose, flatten, any_ok);
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_replace (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_replace)
|
||||
return bin_dummy_emulation.ar_replace (after_bfd, file_name,
|
||||
target, verbose);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_default_replace (bfd **after_bfd, char *file_name,
|
||||
const char *target, bfd_boolean verbose)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
new_bfd = bfd_openr (file_name, target);
|
||||
AR_EMUL_ELEMENT_CHECK (new_bfd, file_name);
|
||||
|
||||
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, file_name);
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_parse_arg (char *arg)
|
||||
{
|
||||
if (bin_dummy_emulation.ar_parse_arg)
|
||||
return bin_dummy_emulation.ar_parse_arg (arg);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bfd_boolean
|
||||
ar_emul_default_parse_arg (char *arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/* Binutils emulation layer.
|
||||
Copyright 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
Written by Tom Rix, Red Hat Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#ifndef BINEMUL_H
|
||||
#define BINEMUL_H
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
extern void ar_emul_usage (FILE *);
|
||||
extern void ar_emul_default_usage (FILE *);
|
||||
extern bfd_boolean ar_emul_append (bfd **, char *, const char *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
extern bfd_boolean ar_emul_default_append (bfd **, char *, const char *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
extern bfd_boolean do_ar_emul_append (bfd **, bfd *,
|
||||
bfd_boolean, bfd_boolean,
|
||||
bfd_boolean (*)(bfd *));
|
||||
extern bfd_boolean ar_emul_replace (bfd **, char *, const char *,
|
||||
bfd_boolean);
|
||||
extern bfd_boolean ar_emul_default_replace (bfd **, char *,
|
||||
const char *, bfd_boolean);
|
||||
extern bfd_boolean ar_emul_parse_arg (char *);
|
||||
extern bfd_boolean ar_emul_default_parse_arg (char *);
|
||||
|
||||
/* Macros for common output. */
|
||||
|
||||
#define AR_EMUL_USAGE_PRINT_OPTION_HEADER(fp) \
|
||||
/* xgettext:c-format */ \
|
||||
fprintf (fp, _(" emulation options: \n"))
|
||||
|
||||
#define AR_EMUL_ELEMENT_CHECK(abfd, file_name) \
|
||||
do { if ((abfd) == NULL) bfd_fatal (file_name); } while (0)
|
||||
|
||||
#define AR_EMUL_APPEND_PRINT_VERBOSE(verbose, file_name) \
|
||||
do { if (verbose) printf ("a - %s\n", file_name); } while (0)
|
||||
|
||||
#define AR_EMUL_REPLACE_PRINT_VERBOSE(verbose, file_name) \
|
||||
do { if (verbose) printf ("r - %s\n", file_name); } while (0)
|
||||
|
||||
typedef struct bin_emulation_xfer_struct
|
||||
{
|
||||
/* Print out the extra options. */
|
||||
void (* ar_usage) (FILE *fp);
|
||||
bfd_boolean (* ar_append) (bfd **, char *, const char *, bfd_boolean,
|
||||
bfd_boolean);
|
||||
bfd_boolean (* ar_replace) (bfd **, char *, const char *, bfd_boolean);
|
||||
bfd_boolean (* ar_parse_arg) (char *);
|
||||
}
|
||||
bin_emulation_xfer_type;
|
||||
|
||||
#endif
|
||||
@@ -1,626 +0,0 @@
|
||||
/* bucomm.c -- Bin Utils COMmon code.
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
|
||||
2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* We might put this in a library someday so it could be dynamically
|
||||
loaded, but for now it's not necessary. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "filenames.h"
|
||||
#include "libbfd.h"
|
||||
|
||||
#include <time.h> /* ctime, maybe time_t */
|
||||
#include <assert.h>
|
||||
#include "bucomm.h"
|
||||
|
||||
#ifndef HAVE_TIME_T_IN_TIME_H
|
||||
#ifndef HAVE_TIME_T_IN_TYPES_H
|
||||
typedef long time_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static const char * endian_string (enum bfd_endian);
|
||||
static int display_target_list (void);
|
||||
static int display_info_table (int, int);
|
||||
static int display_target_tables (void);
|
||||
|
||||
/* Error reporting. */
|
||||
|
||||
char *program_name;
|
||||
|
||||
void
|
||||
bfd_nonfatal (const char *string)
|
||||
{
|
||||
const char *errmsg;
|
||||
|
||||
errmsg = bfd_errmsg (bfd_get_error ());
|
||||
fflush (stdout);
|
||||
if (string)
|
||||
fprintf (stderr, "%s: %s: %s\n", program_name, string, errmsg);
|
||||
else
|
||||
fprintf (stderr, "%s: %s\n", program_name, errmsg);
|
||||
}
|
||||
|
||||
/* Issue a non fatal error message. FILENAME, or if NULL then BFD,
|
||||
are used to indicate the problematic file. SECTION, if non NULL,
|
||||
is used to provide a section name. If FORMAT is non-null, then it
|
||||
is used to print additional information via vfprintf. Finally the
|
||||
bfd error message is printed. In summary, error messages are of
|
||||
one of the following forms:
|
||||
|
||||
PROGRAM:file: bfd-error-message
|
||||
PROGRAM:file[section]: bfd-error-message
|
||||
PROGRAM:file: printf-message: bfd-error-message
|
||||
PROGRAM:file[section]: printf-message: bfd-error-message. */
|
||||
|
||||
void
|
||||
bfd_nonfatal_message (const char *filename,
|
||||
const bfd *abfd,
|
||||
const asection *section,
|
||||
const char *format, ...)
|
||||
{
|
||||
const char *errmsg;
|
||||
const char *section_name;
|
||||
va_list args;
|
||||
|
||||
errmsg = bfd_errmsg (bfd_get_error ());
|
||||
fflush (stdout);
|
||||
section_name = NULL;
|
||||
va_start (args, format);
|
||||
fprintf (stderr, "%s", program_name);
|
||||
|
||||
if (abfd)
|
||||
{
|
||||
if (!filename)
|
||||
filename = bfd_get_archive_filename (abfd);
|
||||
if (section)
|
||||
section_name = bfd_get_section_name (abfd, section);
|
||||
}
|
||||
if (section_name)
|
||||
fprintf (stderr, ":%s[%s]", filename, section_name);
|
||||
else
|
||||
fprintf (stderr, ":%s", filename);
|
||||
|
||||
if (format)
|
||||
{
|
||||
fprintf (stderr, ": ");
|
||||
vfprintf (stderr, format, args);
|
||||
}
|
||||
fprintf (stderr, ": %s\n", errmsg);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
bfd_fatal (const char *string)
|
||||
{
|
||||
bfd_nonfatal (string);
|
||||
xexit (1);
|
||||
}
|
||||
|
||||
void
|
||||
report (const char * format, va_list args)
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
vfprintf (stderr, format, args);
|
||||
putc ('\n', stderr);
|
||||
}
|
||||
|
||||
void
|
||||
fatal VPARAMS ((const char *format, ...))
|
||||
{
|
||||
VA_OPEN (args, format);
|
||||
VA_FIXEDARG (args, const char *, format);
|
||||
|
||||
report (format, args);
|
||||
VA_CLOSE (args);
|
||||
xexit (1);
|
||||
}
|
||||
|
||||
void
|
||||
non_fatal VPARAMS ((const char *format, ...))
|
||||
{
|
||||
VA_OPEN (args, format);
|
||||
VA_FIXEDARG (args, const char *, format);
|
||||
|
||||
report (format, args);
|
||||
VA_CLOSE (args);
|
||||
}
|
||||
|
||||
/* Set the default BFD target based on the configured target. Doing
|
||||
this permits the binutils to be configured for a particular target,
|
||||
and linked against a shared BFD library which was configured for a
|
||||
different target. */
|
||||
|
||||
void
|
||||
set_default_bfd_target (void)
|
||||
{
|
||||
/* The macro TARGET is defined by Makefile. */
|
||||
const char *target = TARGET;
|
||||
|
||||
if (! bfd_set_default_target (target))
|
||||
fatal (_("can't set BFD default target to `%s': %s"),
|
||||
target, bfd_errmsg (bfd_get_error ()));
|
||||
}
|
||||
|
||||
/* After a FALSE return from bfd_check_format_matches with
|
||||
bfd_get_error () == bfd_error_file_ambiguously_recognized, print
|
||||
the possible matching targets. */
|
||||
|
||||
void
|
||||
list_matching_formats (char **p)
|
||||
{
|
||||
fflush (stdout);
|
||||
fprintf (stderr, _("%s: Matching formats:"), program_name);
|
||||
while (*p)
|
||||
fprintf (stderr, " %s", *p++);
|
||||
fputc ('\n', stderr);
|
||||
}
|
||||
|
||||
/* List the supported targets. */
|
||||
|
||||
void
|
||||
list_supported_targets (const char *name, FILE *f)
|
||||
{
|
||||
int t;
|
||||
const char **targ_names;
|
||||
|
||||
if (name == NULL)
|
||||
fprintf (f, _("Supported targets:"));
|
||||
else
|
||||
fprintf (f, _("%s: supported targets:"), name);
|
||||
|
||||
targ_names = bfd_target_list ();
|
||||
for (t = 0; targ_names[t] != NULL; t++)
|
||||
fprintf (f, " %s", targ_names[t]);
|
||||
fprintf (f, "\n");
|
||||
free (targ_names);
|
||||
}
|
||||
|
||||
/* List the supported architectures. */
|
||||
|
||||
void
|
||||
list_supported_architectures (const char *name, FILE *f)
|
||||
{
|
||||
const char ** arch;
|
||||
const char ** arches;
|
||||
|
||||
if (name == NULL)
|
||||
fprintf (f, _("Supported architectures:"));
|
||||
else
|
||||
fprintf (f, _("%s: supported architectures:"), name);
|
||||
|
||||
for (arch = arches = bfd_arch_list (); *arch; arch++)
|
||||
fprintf (f, " %s", *arch);
|
||||
fprintf (f, "\n");
|
||||
free (arches);
|
||||
}
|
||||
|
||||
/* The length of the longest architecture name + 1. */
|
||||
#define LONGEST_ARCH sizeof ("powerpc:common")
|
||||
|
||||
static const char *
|
||||
endian_string (enum bfd_endian endian)
|
||||
{
|
||||
switch (endian)
|
||||
{
|
||||
case BFD_ENDIAN_BIG: return _("big endian");
|
||||
case BFD_ENDIAN_LITTLE: return _("little endian");
|
||||
default: return _("endianness unknown");
|
||||
}
|
||||
}
|
||||
|
||||
/* List the targets that BFD is configured to support, each followed
|
||||
by its endianness and the architectures it supports. */
|
||||
|
||||
static int
|
||||
display_target_list (void)
|
||||
{
|
||||
char *dummy_name;
|
||||
int t;
|
||||
int ret = 1;
|
||||
|
||||
dummy_name = make_temp_file (NULL);
|
||||
for (t = 0; bfd_target_vector[t]; t++)
|
||||
{
|
||||
const bfd_target *p = bfd_target_vector[t];
|
||||
bfd *abfd = bfd_openw (dummy_name, p->name);
|
||||
int a;
|
||||
|
||||
printf (_("%s\n (header %s, data %s)\n"), p->name,
|
||||
endian_string (p->header_byteorder),
|
||||
endian_string (p->byteorder));
|
||||
|
||||
if (abfd == NULL)
|
||||
{
|
||||
bfd_nonfatal (dummy_name);
|
||||
ret = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! bfd_set_format (abfd, bfd_object))
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_invalid_operation)
|
||||
{
|
||||
bfd_nonfatal (p->name);
|
||||
ret = 0;
|
||||
}
|
||||
bfd_close_all_done (abfd);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
|
||||
if (bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
|
||||
printf (" %s\n",
|
||||
bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
|
||||
bfd_close_all_done (abfd);
|
||||
}
|
||||
unlink (dummy_name);
|
||||
free (dummy_name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Print a table showing which architectures are supported for entries
|
||||
FIRST through LAST-1 of bfd_target_vector (targets across,
|
||||
architectures down). */
|
||||
|
||||
static int
|
||||
display_info_table (int first, int last)
|
||||
{
|
||||
int t;
|
||||
int ret = 1;
|
||||
char *dummy_name;
|
||||
int a;
|
||||
|
||||
/* Print heading of target names. */
|
||||
printf ("\n%*s", (int) LONGEST_ARCH, " ");
|
||||
for (t = first; t < last && bfd_target_vector[t]; t++)
|
||||
printf ("%s ", bfd_target_vector[t]->name);
|
||||
putchar ('\n');
|
||||
|
||||
dummy_name = make_temp_file (NULL);
|
||||
for (a = bfd_arch_obscure + 1; a < bfd_arch_last; a++)
|
||||
if (strcmp (bfd_printable_arch_mach ((enum bfd_architecture) a, 0),
|
||||
"UNKNOWN!") != 0)
|
||||
{
|
||||
printf ("%*s ", (int) LONGEST_ARCH - 1,
|
||||
bfd_printable_arch_mach ((enum bfd_architecture) a, 0));
|
||||
for (t = first; t < last && bfd_target_vector[t]; t++)
|
||||
{
|
||||
const bfd_target *p = bfd_target_vector[t];
|
||||
bfd_boolean ok = TRUE;
|
||||
bfd *abfd = bfd_openw (dummy_name, p->name);
|
||||
|
||||
if (abfd == NULL)
|
||||
{
|
||||
bfd_nonfatal (p->name);
|
||||
ret = 0;
|
||||
ok = FALSE;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
if (! bfd_set_format (abfd, bfd_object))
|
||||
{
|
||||
if (bfd_get_error () != bfd_error_invalid_operation)
|
||||
{
|
||||
bfd_nonfatal (p->name);
|
||||
ret = 0;
|
||||
}
|
||||
ok = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
if (! bfd_set_arch_mach (abfd, (enum bfd_architecture) a, 0))
|
||||
ok = FALSE;
|
||||
}
|
||||
|
||||
if (ok)
|
||||
printf ("%s ", p->name);
|
||||
else
|
||||
{
|
||||
int l = strlen (p->name);
|
||||
while (l--)
|
||||
putchar ('-');
|
||||
putchar (' ');
|
||||
}
|
||||
if (abfd != NULL)
|
||||
bfd_close_all_done (abfd);
|
||||
}
|
||||
putchar ('\n');
|
||||
}
|
||||
unlink (dummy_name);
|
||||
free (dummy_name);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Print tables of all the target-architecture combinations that
|
||||
BFD has been configured to support. */
|
||||
|
||||
static int
|
||||
display_target_tables (void)
|
||||
{
|
||||
int t;
|
||||
int columns;
|
||||
int ret = 1;
|
||||
char *colum;
|
||||
|
||||
columns = 0;
|
||||
colum = getenv ("COLUMNS");
|
||||
if (colum != NULL)
|
||||
columns = atoi (colum);
|
||||
if (columns == 0)
|
||||
columns = 80;
|
||||
|
||||
t = 0;
|
||||
while (bfd_target_vector[t] != NULL)
|
||||
{
|
||||
int oldt = t, wid;
|
||||
|
||||
wid = LONGEST_ARCH + strlen (bfd_target_vector[t]->name) + 1;
|
||||
++t;
|
||||
while (wid < columns && bfd_target_vector[t] != NULL)
|
||||
{
|
||||
int newwid;
|
||||
|
||||
newwid = wid + strlen (bfd_target_vector[t]->name) + 1;
|
||||
if (newwid >= columns)
|
||||
break;
|
||||
wid = newwid;
|
||||
++t;
|
||||
}
|
||||
if (! display_info_table (oldt, t))
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
display_info (void)
|
||||
{
|
||||
printf (_("BFD header file version %s\n"), BFD_VERSION_STRING);
|
||||
if (! display_target_list () || ! display_target_tables ())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Display the archive header for an element as if it were an ls -l listing:
|
||||
|
||||
Mode User\tGroup\tSize\tDate Name */
|
||||
|
||||
void
|
||||
print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
|
||||
{
|
||||
struct stat buf;
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
if (bfd_stat_arch_elt (abfd, &buf) == 0)
|
||||
{
|
||||
char modebuf[11];
|
||||
char timebuf[40];
|
||||
time_t when = buf.st_mtime;
|
||||
const char *ctime_result = (const char *) ctime (&when);
|
||||
bfd_size_type size;
|
||||
|
||||
/* POSIX format: skip weekday and seconds from ctime output. */
|
||||
sprintf (timebuf, "%.12s %.4s", ctime_result + 4, ctime_result + 20);
|
||||
|
||||
mode_string (buf.st_mode, modebuf);
|
||||
modebuf[10] = '\0';
|
||||
size = buf.st_size;
|
||||
/* POSIX 1003.2/D11 says to skip first character (entry type). */
|
||||
fprintf (file, "%s %ld/%ld %6" BFD_VMA_FMT "u %s ", modebuf + 1,
|
||||
(long) buf.st_uid, (long) buf.st_gid,
|
||||
size, timebuf);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf (file, "%s\n", bfd_get_filename (abfd));
|
||||
}
|
||||
|
||||
/* Return a path for a new temporary file in the same directory
|
||||
as file PATH. */
|
||||
|
||||
static char *
|
||||
template_in_dir (const char *path)
|
||||
{
|
||||
#define template "stXXXXXX"
|
||||
const char *slash = strrchr (path, '/');
|
||||
char *tmpname;
|
||||
size_t len;
|
||||
|
||||
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
||||
{
|
||||
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
|
||||
char *bslash = strrchr (path, '\\');
|
||||
|
||||
if (slash == NULL || (bslash != NULL && bslash > slash))
|
||||
slash = bslash;
|
||||
if (slash == NULL && path[0] != '\0' && path[1] == ':')
|
||||
slash = path + 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (slash != (char *) NULL)
|
||||
{
|
||||
len = slash - path;
|
||||
tmpname = (char *) xmalloc (len + sizeof (template) + 2);
|
||||
memcpy (tmpname, path, len);
|
||||
|
||||
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
|
||||
/* If tmpname is "X:", appending a slash will make it a root
|
||||
directory on drive X, which is NOT the same as the current
|
||||
directory on drive X. */
|
||||
if (len == 2 && tmpname[1] == ':')
|
||||
tmpname[len++] = '.';
|
||||
#endif
|
||||
tmpname[len++] = '/';
|
||||
}
|
||||
else
|
||||
{
|
||||
tmpname = (char *) xmalloc (sizeof (template));
|
||||
len = 0;
|
||||
}
|
||||
|
||||
memcpy (tmpname + len, template, sizeof (template));
|
||||
return tmpname;
|
||||
#undef template
|
||||
}
|
||||
|
||||
/* Return the name of a created temporary file in the same directory
|
||||
as FILENAME. */
|
||||
|
||||
char *
|
||||
make_tempname (char *filename)
|
||||
{
|
||||
char *tmpname = template_in_dir (filename);
|
||||
int fd;
|
||||
|
||||
#ifdef HAVE_MKSTEMP
|
||||
fd = mkstemp (tmpname);
|
||||
#else
|
||||
tmpname = mktemp (tmpname);
|
||||
if (tmpname == NULL)
|
||||
return NULL;
|
||||
fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
#endif
|
||||
if (fd == -1)
|
||||
{
|
||||
free (tmpname);
|
||||
return NULL;
|
||||
}
|
||||
close (fd);
|
||||
return tmpname;
|
||||
}
|
||||
|
||||
/* Return the name of a created temporary directory inside the
|
||||
directory containing FILENAME. */
|
||||
|
||||
char *
|
||||
make_tempdir (char *filename)
|
||||
{
|
||||
char *tmpname = template_in_dir (filename);
|
||||
|
||||
#ifdef HAVE_MKDTEMP
|
||||
return mkdtemp (tmpname);
|
||||
#else
|
||||
tmpname = mktemp (tmpname);
|
||||
if (tmpname == NULL)
|
||||
return NULL;
|
||||
#if defined (_WIN32) && !defined (__CYGWIN32__)
|
||||
if (mkdir (tmpname) != 0)
|
||||
return NULL;
|
||||
#else
|
||||
if (mkdir (tmpname, 0700) != 0)
|
||||
return NULL;
|
||||
#endif
|
||||
return tmpname;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Parse a string into a VMA, with a fatal error if it can't be
|
||||
parsed. */
|
||||
|
||||
bfd_vma
|
||||
parse_vma (const char *s, const char *arg)
|
||||
{
|
||||
bfd_vma ret;
|
||||
const char *end;
|
||||
|
||||
ret = bfd_scan_vma (s, &end, 0);
|
||||
|
||||
if (*end != '\0')
|
||||
fatal (_("%s: bad number: %s"), arg, s);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Returns the size of the named file. If the file does not
|
||||
exist, or if it is not a real file, then a suitable non-fatal
|
||||
error message is printed and (off_t) -1 is returned. */
|
||||
|
||||
off_t
|
||||
get_file_size (const char * file_name)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
if (stat (file_name, &statbuf) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
non_fatal (_("'%s': No such file"), file_name);
|
||||
else
|
||||
non_fatal (_("Warning: could not locate '%s'. reason: %s"),
|
||||
file_name, strerror (errno));
|
||||
}
|
||||
else if (! S_ISREG (statbuf.st_mode))
|
||||
non_fatal (_("Warning: '%s' is not an ordinary file"), file_name);
|
||||
else if (statbuf.st_size < 0)
|
||||
non_fatal (_("Warning: '%s' has negative size, probably it is too large"),
|
||||
file_name);
|
||||
else
|
||||
return statbuf.st_size;
|
||||
|
||||
return (off_t) -1;
|
||||
}
|
||||
|
||||
/* Return the filename in a static buffer. */
|
||||
|
||||
const char *
|
||||
bfd_get_archive_filename (const bfd *abfd)
|
||||
{
|
||||
static size_t curr = 0;
|
||||
static char *buf;
|
||||
size_t needed;
|
||||
|
||||
assert (abfd != NULL);
|
||||
|
||||
if (!abfd->my_archive)
|
||||
return bfd_get_filename (abfd);
|
||||
|
||||
needed = (strlen (bfd_get_filename (abfd->my_archive))
|
||||
+ strlen (bfd_get_filename (abfd)) + 3);
|
||||
if (needed > curr)
|
||||
{
|
||||
if (curr)
|
||||
free (buf);
|
||||
curr = needed + (needed >> 1);
|
||||
buf = (char *) bfd_malloc (curr);
|
||||
/* If we can't malloc, fail safe by returning just the file name.
|
||||
This function is only used when building error messages. */
|
||||
if (!buf)
|
||||
{
|
||||
curr = 0;
|
||||
return bfd_get_filename (abfd);
|
||||
}
|
||||
}
|
||||
sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
|
||||
bfd_get_filename (abfd));
|
||||
return buf;
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
/* bucomm.h -- binutils common include file.
|
||||
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _BUCOMM_H
|
||||
#define _BUCOMM_H
|
||||
|
||||
/* Return the filename in a static buffer. */
|
||||
const char *bfd_get_archive_filename (const bfd *);
|
||||
|
||||
void bfd_nonfatal (const char *);
|
||||
|
||||
void bfd_nonfatal_message (const char *, const bfd *, const asection *,
|
||||
const char *, ...);
|
||||
|
||||
void bfd_fatal (const char *) ATTRIBUTE_NORETURN;
|
||||
|
||||
void report (const char *, va_list) ATTRIBUTE_PRINTF(1,0);
|
||||
|
||||
void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
|
||||
|
||||
void non_fatal (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
|
||||
void set_default_bfd_target (void);
|
||||
|
||||
void list_matching_formats (char **);
|
||||
|
||||
void list_supported_targets (const char *, FILE *);
|
||||
|
||||
void list_supported_architectures (const char *, FILE *);
|
||||
|
||||
int display_info (void);
|
||||
|
||||
void print_arelt_descr (FILE *, bfd *, bfd_boolean);
|
||||
|
||||
char *make_tempname (char *);
|
||||
char *make_tempdir (char *);
|
||||
|
||||
bfd_vma parse_vma (const char *, const char *);
|
||||
|
||||
off_t get_file_size (const char *);
|
||||
|
||||
extern char *program_name;
|
||||
|
||||
/* filemode.c */
|
||||
void mode_string (unsigned long, char *);
|
||||
|
||||
/* version.c */
|
||||
extern void print_version (const char *);
|
||||
|
||||
/* rename.c */
|
||||
extern void set_times (const char *, const struct stat *);
|
||||
|
||||
extern int smart_rename (const char *, const char *, int);
|
||||
|
||||
/* libiberty. */
|
||||
void *xmalloc (size_t);
|
||||
|
||||
void *xrealloc (void *, size_t);
|
||||
|
||||
#endif /* _BUCOMM_H */
|
||||
@@ -1,57 +0,0 @@
|
||||
/* budbg.c -- Interfaces to the generic debugging information routines.
|
||||
Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2008, 2012
|
||||
Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#ifndef BUDBG_H
|
||||
#define BUDBG_H
|
||||
|
||||
/* Routine used to read generic debugging information. */
|
||||
|
||||
extern void *read_debugging_info (bfd *, asymbol **, long, bfd_boolean);
|
||||
|
||||
/* Routine used to print generic debugging information. */
|
||||
|
||||
extern bfd_boolean print_debugging_info
|
||||
(FILE *, void *, bfd *, asymbol **, void *, bfd_boolean);
|
||||
|
||||
/* Routines used to read and write stabs information. */
|
||||
|
||||
extern void *start_stab (void *, bfd *, bfd_boolean, asymbol **, long);
|
||||
|
||||
extern bfd_boolean finish_stab (void *, void *);
|
||||
|
||||
extern bfd_boolean parse_stab
|
||||
(void *, void *, int, int, bfd_vma, const char *);
|
||||
|
||||
extern bfd_boolean write_stabs_in_sections_debugging_info
|
||||
(bfd *, void *, bfd_byte **, bfd_size_type *, bfd_byte **, bfd_size_type *);
|
||||
|
||||
/* Routines used to read and write IEEE debugging information. */
|
||||
|
||||
extern bfd_boolean parse_ieee (void *, bfd *, const bfd_byte *, bfd_size_type);
|
||||
|
||||
extern bfd_boolean write_ieee_debugging_info (bfd *, void *);
|
||||
|
||||
/* Routine used to read COFF debugging information. */
|
||||
|
||||
extern bfd_boolean parse_coff (bfd *, asymbol **, long, void *);
|
||||
|
||||
#endif
|
||||
@@ -1,558 +0,0 @@
|
||||
/* Coff file dumper.
|
||||
Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007,
|
||||
2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Written by Steve Chamberlain <sac@cygnus.com>
|
||||
|
||||
This module reads a type tree generated by coffgrok and prints
|
||||
it out so we can test the grokker. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "bfd_stdint.h"
|
||||
#include "libiberty.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
#include "coffgrok.h"
|
||||
#include "getopt.h"
|
||||
|
||||
static int atnl;
|
||||
|
||||
static void tab (int);
|
||||
static void nl (void);
|
||||
static void dump_coff_lines (struct coff_line *);
|
||||
static void dump_coff_type (struct coff_type *);
|
||||
static void dump_coff_where (struct coff_where *);
|
||||
static void dump_coff_visible (struct coff_visible *);
|
||||
static void dump_coff_scope (struct coff_scope *);
|
||||
static void dump_coff_sfile (struct coff_sfile *);
|
||||
static void dump_coff_section (struct coff_section *);
|
||||
static void show_usage (FILE *, int);
|
||||
extern int main (int, char **);
|
||||
|
||||
static void
|
||||
tab (int x)
|
||||
{
|
||||
static int indent;
|
||||
int i;
|
||||
|
||||
if (atnl)
|
||||
{
|
||||
if (x < 0)
|
||||
{
|
||||
printf (")");
|
||||
indent += x;
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ("\n");
|
||||
atnl = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (x == -1)
|
||||
{
|
||||
for (i = 0; i < indent; i++)
|
||||
printf (" ");
|
||||
|
||||
indent += x;
|
||||
printf (")");
|
||||
return;
|
||||
}
|
||||
|
||||
indent += x;
|
||||
|
||||
for (i = 0; i < indent; i++)
|
||||
printf (" ");
|
||||
|
||||
if (x)
|
||||
{
|
||||
printf ("(");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nl (void)
|
||||
{
|
||||
atnl = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_lines (struct coff_line *p)
|
||||
{
|
||||
int i;
|
||||
int online = 0;
|
||||
|
||||
tab (1);
|
||||
printf (_("#lines %d "),p->nlines);
|
||||
|
||||
for (i = 0; i < p->nlines; i++)
|
||||
{
|
||||
printf ("(%d 0x%x)", p->lines[i], p->addresses[i]);
|
||||
|
||||
online++;
|
||||
|
||||
if (online > 6)
|
||||
{
|
||||
nl ();
|
||||
tab (0);
|
||||
online = 0;
|
||||
}
|
||||
}
|
||||
nl ();
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_type (struct coff_type *p)
|
||||
{
|
||||
tab (1);
|
||||
printf (_("size %d "), p->size);
|
||||
|
||||
switch (p->type)
|
||||
{
|
||||
case coff_secdef_type:
|
||||
printf (_("section definition at %x size %x\n"),
|
||||
p->u.asecdef.address,
|
||||
p->u.asecdef.size);
|
||||
nl ();
|
||||
break;
|
||||
case coff_pointer_type:
|
||||
printf (_("pointer to"));
|
||||
nl ();
|
||||
dump_coff_type (p->u.pointer.points_to);
|
||||
break;
|
||||
case coff_array_type:
|
||||
printf (_("array [%d] of"), p->u.array.dim);
|
||||
nl ();
|
||||
dump_coff_type (p->u.array.array_of);
|
||||
break;
|
||||
case coff_function_type:
|
||||
printf (_("function returning"));
|
||||
nl ();
|
||||
dump_coff_type (p->u.function.function_returns);
|
||||
dump_coff_lines (p->u.function.lines);
|
||||
printf (_("arguments"));
|
||||
nl ();
|
||||
dump_coff_scope (p->u.function.parameters);
|
||||
tab (0);
|
||||
printf (_("code"));
|
||||
nl ();
|
||||
dump_coff_scope (p->u.function.code);
|
||||
tab(0);
|
||||
break;
|
||||
case coff_structdef_type:
|
||||
printf (_("structure definition"));
|
||||
nl ();
|
||||
dump_coff_scope (p->u.astructdef.elements);
|
||||
break;
|
||||
case coff_structref_type:
|
||||
if (!p->u.aenumref.ref)
|
||||
printf (_("structure ref to UNKNOWN struct"));
|
||||
else
|
||||
printf (_("structure ref to %s"), p->u.aenumref.ref->name);
|
||||
break;
|
||||
case coff_enumref_type:
|
||||
printf (_("enum ref to %s"), p->u.astructref.ref->name);
|
||||
break;
|
||||
case coff_enumdef_type:
|
||||
printf (_("enum definition"));
|
||||
nl ();
|
||||
dump_coff_scope (p->u.aenumdef.elements);
|
||||
break;
|
||||
case coff_basic_type:
|
||||
switch (p->u.basic)
|
||||
{
|
||||
case T_NULL:
|
||||
printf ("NULL");
|
||||
break;
|
||||
case T_VOID:
|
||||
printf ("VOID");
|
||||
break;
|
||||
case T_CHAR:
|
||||
printf ("CHAR");
|
||||
break;
|
||||
case T_SHORT:
|
||||
printf ("SHORT");
|
||||
break;
|
||||
case T_INT:
|
||||
printf ("INT ");
|
||||
break;
|
||||
case T_LONG:
|
||||
printf ("LONG");
|
||||
break;
|
||||
case T_FLOAT:
|
||||
printf ("FLOAT");
|
||||
break;
|
||||
case T_DOUBLE:
|
||||
printf ("DOUBLE");
|
||||
break;
|
||||
case T_STRUCT:
|
||||
printf ("STRUCT");
|
||||
break;
|
||||
case T_UNION:
|
||||
printf ("UNION");
|
||||
break;
|
||||
case T_ENUM:
|
||||
printf ("ENUM");
|
||||
break;
|
||||
case T_MOE:
|
||||
printf ("MOE ");
|
||||
break;
|
||||
case T_UCHAR:
|
||||
printf ("UCHAR");
|
||||
break;
|
||||
case T_USHORT:
|
||||
printf ("USHORT");
|
||||
break;
|
||||
case T_UINT:
|
||||
printf ("UINT");
|
||||
break;
|
||||
case T_ULONG:
|
||||
printf ("ULONG");
|
||||
break;
|
||||
case T_LNGDBL:
|
||||
printf ("LNGDBL");
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
nl ();
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_where (struct coff_where *p)
|
||||
{
|
||||
tab (1);
|
||||
switch (p->where)
|
||||
{
|
||||
case coff_where_stack:
|
||||
printf (_("Stack offset %x"), p->offset);
|
||||
break;
|
||||
case coff_where_memory:
|
||||
printf (_("Memory section %s+%x"), p->section->name, p->offset);
|
||||
break;
|
||||
case coff_where_register:
|
||||
printf (_("Register %d"), p->offset);
|
||||
break;
|
||||
case coff_where_member_of_struct:
|
||||
printf (_("Struct Member offset %x"), p->offset);
|
||||
break;
|
||||
case coff_where_member_of_enum:
|
||||
printf (_("Enum Member offset %x"), p->offset);
|
||||
break;
|
||||
case coff_where_unknown:
|
||||
printf (_("Undefined symbol"));
|
||||
break;
|
||||
case coff_where_strtag:
|
||||
printf ("STRTAG");
|
||||
case coff_where_entag:
|
||||
printf ("ENTAG");
|
||||
break;
|
||||
case coff_where_typedef:
|
||||
printf ("TYPEDEF");
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
nl ();
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_visible (struct coff_visible *p)
|
||||
{
|
||||
tab (1);
|
||||
switch (p->type)
|
||||
{
|
||||
case coff_vis_ext_def:
|
||||
printf ("coff_vis_ext_def");
|
||||
break;
|
||||
case coff_vis_ext_ref:
|
||||
printf ("coff_vis_ext_ref");
|
||||
break;
|
||||
case coff_vis_int_def:
|
||||
printf ("coff_vis_int_def");
|
||||
break;
|
||||
case coff_vis_common:
|
||||
printf ("coff_vis_common");
|
||||
break;
|
||||
case coff_vis_auto:
|
||||
printf ("coff_vis_auto");
|
||||
break;
|
||||
case coff_vis_autoparam:
|
||||
printf ("coff_vis_autoparam");
|
||||
break;
|
||||
case coff_vis_regparam:
|
||||
printf ("coff_vis_regparam");
|
||||
break;
|
||||
case coff_vis_register:
|
||||
printf ("coff_vis_register");
|
||||
break;
|
||||
case coff_vis_tag:
|
||||
printf ("coff_vis_tag");
|
||||
break;
|
||||
case coff_vis_member_of_struct:
|
||||
printf ("coff_vis_member_of_struct");
|
||||
break;
|
||||
case coff_vis_member_of_enum:
|
||||
printf ("coff_vis_member_of_enum");
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
nl ();
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_symbol (struct coff_symbol *p)
|
||||
{
|
||||
tab (1);
|
||||
printf (_("List of symbols"));
|
||||
nl ();
|
||||
|
||||
while (p)
|
||||
{
|
||||
tab (1);
|
||||
tab (1);
|
||||
printf (_("Symbol %s, tag %d, number %d"), p->name, p->tag, p->number);
|
||||
nl ();
|
||||
tab (-1);
|
||||
tab (1);
|
||||
printf (_("Type"));
|
||||
nl ();
|
||||
dump_coff_type (p->type);
|
||||
tab (-1);
|
||||
tab (1);
|
||||
printf (_("Where"));
|
||||
dump_coff_where (p->where);
|
||||
tab (-1);
|
||||
tab (1);
|
||||
printf (_("Visible"));
|
||||
dump_coff_visible (p->visible);
|
||||
tab (-1);
|
||||
p = p->next;
|
||||
tab (-1);
|
||||
}
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_scope (struct coff_scope *p)
|
||||
{
|
||||
if (p)
|
||||
{
|
||||
tab (1);
|
||||
printf ("%s %" BFD_VMA_FMT "x ",
|
||||
_("List of blocks "), (bfd_vma) (uintptr_t) p);
|
||||
|
||||
if (p->sec)
|
||||
printf( " %s %x..%x", p->sec->name,p->offset, p->offset + p->size -1);
|
||||
|
||||
nl ();
|
||||
tab (0);
|
||||
printf ("*****************");
|
||||
nl ();
|
||||
|
||||
while (p)
|
||||
{
|
||||
tab (0);
|
||||
printf (_("vars %d"), p->nvars);
|
||||
nl ();
|
||||
dump_coff_symbol (p->vars_head);
|
||||
printf (_("blocks"));
|
||||
nl ();
|
||||
dump_coff_scope (p->list_head);
|
||||
nl ();
|
||||
p = p->next;
|
||||
}
|
||||
|
||||
tab (0);
|
||||
printf ("*****************");
|
||||
nl ();
|
||||
tab (-1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_sfile (struct coff_sfile *p)
|
||||
{
|
||||
tab (1);
|
||||
printf (_("List of source files"));
|
||||
nl ();
|
||||
|
||||
while (p)
|
||||
{
|
||||
tab (0);
|
||||
printf (_("Source file %s"), p->name);
|
||||
nl ();
|
||||
dump_coff_scope (p->scope);
|
||||
p = p->next;
|
||||
}
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
dump_coff_section (struct coff_section *ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
tab (1);
|
||||
printf (_("section %s %d %d address %x size %x number %d nrelocs %d"),
|
||||
ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
|
||||
ptr->number, ptr->nrelocs);
|
||||
nl ();
|
||||
|
||||
for (i = 0; i < ptr->nrelocs; i++)
|
||||
{
|
||||
tab (0);
|
||||
printf ("(%x %s %x)",
|
||||
ptr->relocs[i].offset,
|
||||
ptr->relocs[i].symbol->name,
|
||||
ptr->relocs[i].addend);
|
||||
nl ();
|
||||
}
|
||||
|
||||
tab (-1);
|
||||
}
|
||||
|
||||
static void
|
||||
coff_dump (struct coff_ofile *ptr)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf ("Coff dump");
|
||||
nl ();
|
||||
printf (_("#sources %d"), ptr->nsources);
|
||||
nl ();
|
||||
dump_coff_sfile (ptr->source_head);
|
||||
|
||||
for (i = 0; i < ptr->nsections; i++)
|
||||
dump_coff_section (ptr->sections + i);
|
||||
}
|
||||
|
||||
char * program_name;
|
||||
|
||||
static void
|
||||
show_usage (FILE *file, int status)
|
||||
{
|
||||
fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
|
||||
fprintf (file, _(" Print a human readable interpretation of a COFF object file\n"));
|
||||
fprintf (file, _(" The options are:\n\
|
||||
@<file> Read options from <file>\n\
|
||||
-h --help Display this information\n\
|
||||
-v --version Display the program's version\n\
|
||||
\n"));
|
||||
|
||||
if (REPORT_BUGS_TO[0] && status == 0)
|
||||
fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
|
||||
|
||||
exit (status);
|
||||
}
|
||||
|
||||
int
|
||||
main (int ac, char **av)
|
||||
{
|
||||
bfd *abfd;
|
||||
struct coff_ofile *tree;
|
||||
char **matching;
|
||||
char *input_file = NULL;
|
||||
int opt;
|
||||
static struct option long_options[] =
|
||||
{
|
||||
{ "help", no_argument, 0, 'h' },
|
||||
{ "version", no_argument, 0, 'V' },
|
||||
{ NULL, no_argument, 0, 0 }
|
||||
};
|
||||
|
||||
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
|
||||
setlocale (LC_MESSAGES, "");
|
||||
#endif
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
setlocale (LC_CTYPE, "");
|
||||
#endif
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
program_name = av[0];
|
||||
xmalloc_set_program_name (program_name);
|
||||
|
||||
expandargv (&ac, &av);
|
||||
|
||||
while ((opt = getopt_long (ac, av, "HhVv", long_options,
|
||||
(int *) NULL))
|
||||
!= EOF)
|
||||
{
|
||||
switch (opt)
|
||||
{
|
||||
case 'H':
|
||||
case 'h':
|
||||
show_usage (stdout, 0);
|
||||
break;
|
||||
case 'v':
|
||||
case 'V':
|
||||
print_version ("coffdump");
|
||||
exit (0);
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
show_usage (stderr, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < ac)
|
||||
{
|
||||
input_file = av[optind];
|
||||
}
|
||||
|
||||
if (!input_file)
|
||||
fatal (_("no input file specified"));
|
||||
|
||||
abfd = bfd_openr (input_file, 0);
|
||||
|
||||
if (!abfd)
|
||||
bfd_fatal (input_file);
|
||||
|
||||
if (! bfd_check_format_matches (abfd, bfd_object, &matching))
|
||||
{
|
||||
bfd_nonfatal (input_file);
|
||||
|
||||
if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
|
||||
{
|
||||
list_matching_formats (matching);
|
||||
free (matching);
|
||||
}
|
||||
exit (1);
|
||||
}
|
||||
|
||||
tree = coff_grok (abfd);
|
||||
|
||||
coff_dump (tree);
|
||||
printf ("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,744 +0,0 @@
|
||||
/* coffgrok.c
|
||||
Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||
2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Written by Steve Chamberlain (sac@cygnus.com)
|
||||
|
||||
This module reads a coff file and builds a really simple type tree
|
||||
which can be read by other programs. The first application is a
|
||||
coff->sysroff converter. It can be tested with coffdump.c. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
|
||||
#include "coff/internal.h"
|
||||
#include "../bfd/libcoff.h"
|
||||
#include "bucomm.h"
|
||||
#include "coffgrok.h"
|
||||
|
||||
static int lofile = 1;
|
||||
static struct coff_scope *top_scope;
|
||||
static struct coff_scope *file_scope;
|
||||
static struct coff_ofile *ofile;
|
||||
|
||||
static struct coff_symbol *last_function_symbol;
|
||||
static struct coff_type *last_function_type;
|
||||
static struct coff_type *last_struct;
|
||||
static struct coff_type *last_enum;
|
||||
static struct coff_sfile *cur_sfile;
|
||||
|
||||
static struct coff_symbol **tindex;
|
||||
|
||||
|
||||
static asymbol **syms;
|
||||
static long symcount;
|
||||
|
||||
#define N(x) ((x)->_n._n_nptr[1])
|
||||
|
||||
static struct coff_ptr_struct *rawsyms;
|
||||
static int rawcount;
|
||||
static bfd *abfd;
|
||||
|
||||
#define PTR_SIZE 4
|
||||
#define SHORT_SIZE 2
|
||||
#define INT_SIZE 4
|
||||
#define LONG_SIZE 4
|
||||
#define FLOAT_SIZE 4
|
||||
#define DOUBLE_SIZE 8
|
||||
|
||||
#define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms))
|
||||
|
||||
static struct coff_scope *empty_scope (void);
|
||||
static struct coff_symbol *empty_symbol (void);
|
||||
static void push_scope (int);
|
||||
static void pop_scope (void);
|
||||
static void do_sections_p1 (struct coff_ofile *);
|
||||
static void do_sections_p2 (struct coff_ofile *);
|
||||
static struct coff_where *do_where (int);
|
||||
static struct coff_line *do_lines (int, char *);
|
||||
static struct coff_type *do_type (int);
|
||||
static struct coff_visible *do_visible (int);
|
||||
static int do_define (int, struct coff_scope *);
|
||||
static struct coff_ofile *doit (void);
|
||||
|
||||
static struct coff_scope *
|
||||
empty_scope (void)
|
||||
{
|
||||
struct coff_scope *l;
|
||||
l = (struct coff_scope *) (xcalloc (sizeof (struct coff_scope), 1));
|
||||
return l;
|
||||
}
|
||||
|
||||
static struct coff_symbol *
|
||||
empty_symbol (void)
|
||||
{
|
||||
return (struct coff_symbol *) (xcalloc (sizeof (struct coff_symbol), 1));
|
||||
}
|
||||
|
||||
/*int l;*/
|
||||
static void
|
||||
push_scope (int slink)
|
||||
{
|
||||
struct coff_scope *n = empty_scope ();
|
||||
|
||||
if (slink)
|
||||
{
|
||||
if (top_scope)
|
||||
{
|
||||
if (top_scope->list_tail)
|
||||
{
|
||||
top_scope->list_tail->next = n;
|
||||
}
|
||||
else
|
||||
{
|
||||
top_scope->list_head = n;
|
||||
}
|
||||
top_scope->list_tail = n;
|
||||
}
|
||||
}
|
||||
n->parent = top_scope;
|
||||
|
||||
top_scope = n;
|
||||
}
|
||||
|
||||
static void
|
||||
pop_scope (void)
|
||||
{
|
||||
top_scope = top_scope->parent;
|
||||
}
|
||||
|
||||
static void
|
||||
do_sections_p1 (struct coff_ofile *head)
|
||||
{
|
||||
asection *section;
|
||||
int idx;
|
||||
struct coff_section *all = (struct coff_section *) (xcalloc (abfd->section_count + 1,
|
||||
sizeof (struct coff_section)));
|
||||
head->nsections = abfd->section_count + 1;
|
||||
head->sections = all;
|
||||
|
||||
for (idx = 0, section = abfd->sections; section; section = section->next, idx++)
|
||||
{
|
||||
long relsize;
|
||||
int i = section->target_index;
|
||||
arelent **relpp;
|
||||
long relcount;
|
||||
|
||||
relsize = bfd_get_reloc_upper_bound (abfd, section);
|
||||
if (relsize < 0)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
if (relsize == 0)
|
||||
continue;
|
||||
relpp = (arelent **) xmalloc (relsize);
|
||||
relcount = bfd_canonicalize_reloc (abfd, section, relpp, syms);
|
||||
if (relcount < 0)
|
||||
bfd_fatal (bfd_get_filename (abfd));
|
||||
|
||||
head->sections[i].name = (char *) (section->name);
|
||||
head->sections[i].code = section->flags & SEC_CODE;
|
||||
head->sections[i].data = section->flags & SEC_DATA;
|
||||
if (strcmp (section->name, ".bss") == 0)
|
||||
head->sections[i].data = 1;
|
||||
head->sections[i].address = section->lma;
|
||||
head->sections[i].size = bfd_get_section_size (section);
|
||||
head->sections[i].number = idx;
|
||||
head->sections[i].nrelocs = section->reloc_count;
|
||||
head->sections[i].relocs =
|
||||
(struct coff_reloc *) (xcalloc (section->reloc_count,
|
||||
sizeof (struct coff_reloc)));
|
||||
head->sections[i].bfd_section = section;
|
||||
}
|
||||
head->sections[0].name = "ABSOLUTE";
|
||||
head->sections[0].code = 0;
|
||||
head->sections[0].data = 0;
|
||||
head->sections[0].address = 0;
|
||||
head->sections[0].size = 0;
|
||||
head->sections[0].number = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
do_sections_p2 (struct coff_ofile *head)
|
||||
{
|
||||
asection *section;
|
||||
for (section = abfd->sections; section; section = section->next)
|
||||
{
|
||||
unsigned int j;
|
||||
|
||||
for (j = 0; j < section->reloc_count; j++)
|
||||
{
|
||||
int idx;
|
||||
int i = section->target_index;
|
||||
struct coff_reloc *r = head->sections[i].relocs + j;
|
||||
arelent *sr = section->relocation + j;
|
||||
r->offset = sr->address;
|
||||
r->addend = sr->addend;
|
||||
idx = ((coff_symbol_type *) (sr->sym_ptr_ptr[0]))->native - rawsyms;
|
||||
r->symbol = tindex[idx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static struct coff_where *
|
||||
do_where (int i)
|
||||
{
|
||||
struct internal_syment *sym = &rawsyms[i].u.syment;
|
||||
struct coff_where *where =
|
||||
(struct coff_where *) (xmalloc (sizeof (struct coff_where)));
|
||||
where->offset = sym->n_value;
|
||||
|
||||
if (sym->n_scnum == -1)
|
||||
sym->n_scnum = 0;
|
||||
|
||||
switch (sym->n_sclass)
|
||||
{
|
||||
case C_FIELD:
|
||||
where->where = coff_where_member_of_struct;
|
||||
where->offset = sym->n_value / 8;
|
||||
where->bitoffset = sym->n_value % 8;
|
||||
where->bitsize = rawsyms[i + 1].u.auxent.x_sym.x_misc.x_lnsz.x_size;
|
||||
break;
|
||||
case C_MOE:
|
||||
where->where = coff_where_member_of_enum;
|
||||
break;
|
||||
case C_MOS:
|
||||
case C_MOU:
|
||||
where->where = coff_where_member_of_struct;
|
||||
break;
|
||||
case C_AUTO:
|
||||
case C_ARG:
|
||||
where->where = coff_where_stack;
|
||||
break;
|
||||
case C_EXT:
|
||||
case C_STAT:
|
||||
case C_EXTDEF:
|
||||
case C_LABEL:
|
||||
where->where = coff_where_memory;
|
||||
where->section = &ofile->sections[sym->n_scnum];
|
||||
break;
|
||||
case C_REG:
|
||||
case C_REGPARM:
|
||||
where->where = coff_where_register;
|
||||
break;
|
||||
case C_ENTAG:
|
||||
where->where = coff_where_entag;
|
||||
break;
|
||||
case C_STRTAG:
|
||||
case C_UNTAG:
|
||||
where->where = coff_where_strtag;
|
||||
break;
|
||||
case C_TPDEF:
|
||||
where->where = coff_where_typedef;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
break;
|
||||
}
|
||||
return where;
|
||||
}
|
||||
|
||||
static
|
||||
struct coff_line *
|
||||
do_lines (int i, char *name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct coff_line *res = (struct coff_line *) xcalloc (sizeof (struct coff_line), 1);
|
||||
asection *s;
|
||||
unsigned int l;
|
||||
|
||||
/* Find out if this function has any line numbers in the table */
|
||||
for (s = abfd->sections; s; s = s->next)
|
||||
{
|
||||
for (l = 0; l < s->lineno_count; l++)
|
||||
{
|
||||
if (s->lineno[l].line_number == 0)
|
||||
{
|
||||
if (rawsyms + i == ((coff_symbol_type *) (&(s->lineno[l].u.sym[0])))->native)
|
||||
{
|
||||
/* These lines are for this function - so count them and stick them on */
|
||||
int c = 0;
|
||||
/* Find the linenumber of the top of the function, since coff linenumbers
|
||||
are relative to the start of the function. */
|
||||
int start_line = rawsyms[i + 3].u.auxent.x_sym.x_misc.x_lnsz.x_lnno;
|
||||
|
||||
l++;
|
||||
for (c = 0; s->lineno[l + c + 1].line_number; c++)
|
||||
;
|
||||
|
||||
/* Add two extra records, one for the prologue and one for the epilogue */
|
||||
c += 1;
|
||||
res->nlines = c;
|
||||
res->lines = (int *) (xcalloc (sizeof (int), c));
|
||||
res->addresses = (int *) (xcalloc (sizeof (int), c));
|
||||
res->lines[0] = start_line;
|
||||
res->addresses[0] = rawsyms[i].u.syment.n_value - s->vma;
|
||||
for (c = 0; s->lineno[l + c + 1].line_number; c++)
|
||||
{
|
||||
res->lines[c + 1] = s->lineno[l + c].line_number + start_line - 1;
|
||||
res->addresses[c + 1] = s->lineno[l + c].u.offset;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static
|
||||
struct coff_type *
|
||||
do_type (int i)
|
||||
{
|
||||
struct internal_syment *sym = &rawsyms[i].u.syment;
|
||||
union internal_auxent *aux = &rawsyms[i + 1].u.auxent;
|
||||
struct coff_type *res =
|
||||
(struct coff_type *) xmalloc (sizeof (struct coff_type));
|
||||
int type = sym->n_type;
|
||||
int which_dt = 0;
|
||||
int dimind = 0;
|
||||
|
||||
res->type = coff_basic_type;
|
||||
res->u.basic = type & 0xf;
|
||||
|
||||
switch (type & 0xf)
|
||||
{
|
||||
case T_NULL:
|
||||
case T_VOID:
|
||||
if (sym->n_numaux && sym->n_sclass == C_STAT)
|
||||
{
|
||||
/* This is probably a section definition */
|
||||
res->type = coff_secdef_type;
|
||||
res->size = aux->x_scn.x_scnlen;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (type == 0)
|
||||
{
|
||||
/* Don't know what this is, let's make it a simple int */
|
||||
res->size = INT_SIZE;
|
||||
res->u.basic = T_UINT;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Else it could be a function or pointer to void */
|
||||
res->size = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
break;
|
||||
case T_UCHAR:
|
||||
case T_CHAR:
|
||||
res->size = 1;
|
||||
break;
|
||||
case T_USHORT:
|
||||
case T_SHORT:
|
||||
res->size = SHORT_SIZE;
|
||||
break;
|
||||
case T_UINT:
|
||||
case T_INT:
|
||||
res->size = INT_SIZE;
|
||||
break;
|
||||
case T_ULONG:
|
||||
case T_LONG:
|
||||
res->size = LONG_SIZE;
|
||||
break;
|
||||
case T_FLOAT:
|
||||
res->size = FLOAT_SIZE;
|
||||
break;
|
||||
case T_DOUBLE:
|
||||
res->size = DOUBLE_SIZE;
|
||||
break;
|
||||
case T_STRUCT:
|
||||
case T_UNION:
|
||||
if (sym->n_numaux)
|
||||
{
|
||||
if (aux->x_sym.x_tagndx.p)
|
||||
{
|
||||
/* Referring to a struct defined elsewhere */
|
||||
res->type = coff_structref_type;
|
||||
res->u.astructref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)];
|
||||
res->size = res->u.astructref.ref ?
|
||||
res->u.astructref.ref->type->size : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* A definition of a struct */
|
||||
last_struct = res;
|
||||
res->type = coff_structdef_type;
|
||||
res->u.astructdef.elements = empty_scope ();
|
||||
res->u.astructdef.idx = 0;
|
||||
res->u.astructdef.isstruct = (type & 0xf) == T_STRUCT;
|
||||
res->size = aux->x_sym.x_misc.x_lnsz.x_size;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No auxents - it's anonymous */
|
||||
res->type = coff_structref_type;
|
||||
res->u.astructref.ref = 0;
|
||||
res->size = 0;
|
||||
}
|
||||
break;
|
||||
case T_ENUM:
|
||||
if (aux->x_sym.x_tagndx.p)
|
||||
{
|
||||
/* Referring to a enum defined elsewhere */
|
||||
res->type = coff_enumref_type;
|
||||
res->u.aenumref.ref = tindex[INDEXOF (aux->x_sym.x_tagndx.p)];
|
||||
res->size = res->u.aenumref.ref->type->size;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* A definition of an enum */
|
||||
last_enum = res;
|
||||
res->type = coff_enumdef_type;
|
||||
res->u.aenumdef.elements = empty_scope ();
|
||||
res->size = aux->x_sym.x_misc.x_lnsz.x_size;
|
||||
}
|
||||
break;
|
||||
case T_MOE:
|
||||
break;
|
||||
}
|
||||
|
||||
for (which_dt = 5; which_dt >= 0; which_dt--)
|
||||
{
|
||||
switch ((type >> ((which_dt * 2) + 4)) & 0x3)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case DT_ARY:
|
||||
{
|
||||
struct coff_type *ptr = ((struct coff_type *)
|
||||
xmalloc (sizeof (struct coff_type)));
|
||||
int els = (dimind < DIMNUM
|
||||
? aux->x_sym.x_fcnary.x_ary.x_dimen[dimind]
|
||||
: 0);
|
||||
++dimind;
|
||||
ptr->type = coff_array_type;
|
||||
ptr->size = els * res->size;
|
||||
ptr->u.array.dim = els;
|
||||
ptr->u.array.array_of = res;
|
||||
res = ptr;
|
||||
break;
|
||||
}
|
||||
case DT_PTR:
|
||||
{
|
||||
struct coff_type *ptr =
|
||||
(struct coff_type *) xmalloc (sizeof (struct coff_type));
|
||||
ptr->size = PTR_SIZE;
|
||||
ptr->type = coff_pointer_type;
|
||||
ptr->u.pointer.points_to = res;
|
||||
res = ptr;
|
||||
break;
|
||||
}
|
||||
case DT_FCN:
|
||||
{
|
||||
struct coff_type *ptr
|
||||
= (struct coff_type *) xmalloc (sizeof (struct coff_type));
|
||||
ptr->size = 0;
|
||||
ptr->type = coff_function_type;
|
||||
ptr->u.function.function_returns = res;
|
||||
ptr->u.function.parameters = empty_scope ();
|
||||
ptr->u.function.lines = do_lines (i, sym->_n._n_nptr[1]);
|
||||
ptr->u.function.code = 0;
|
||||
last_function_type = ptr;
|
||||
res = ptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
static struct coff_visible *
|
||||
do_visible (int i)
|
||||
{
|
||||
struct internal_syment *sym = &rawsyms[i].u.syment;
|
||||
struct coff_visible *visible =
|
||||
(struct coff_visible *) (xmalloc (sizeof (struct coff_visible)));
|
||||
enum coff_vis_type t;
|
||||
switch (sym->n_sclass)
|
||||
{
|
||||
case C_MOS:
|
||||
case C_MOU:
|
||||
case C_FIELD:
|
||||
t = coff_vis_member_of_struct;
|
||||
break;
|
||||
case C_MOE:
|
||||
t = coff_vis_member_of_enum;
|
||||
break;
|
||||
|
||||
case C_REGPARM:
|
||||
t = coff_vis_regparam;
|
||||
break;
|
||||
|
||||
case C_REG:
|
||||
t = coff_vis_register;
|
||||
break;
|
||||
case C_STRTAG:
|
||||
case C_UNTAG:
|
||||
case C_ENTAG:
|
||||
case C_TPDEF:
|
||||
t = coff_vis_tag;
|
||||
break;
|
||||
case C_AUTOARG:
|
||||
case C_ARG:
|
||||
t = coff_vis_autoparam;
|
||||
break;
|
||||
case C_AUTO:
|
||||
|
||||
|
||||
t = coff_vis_auto;
|
||||
break;
|
||||
case C_LABEL:
|
||||
case C_STAT:
|
||||
t = coff_vis_int_def;
|
||||
break;
|
||||
case C_EXT:
|
||||
if (sym->n_scnum == N_UNDEF)
|
||||
{
|
||||
if (sym->n_value)
|
||||
t = coff_vis_common;
|
||||
else
|
||||
t = coff_vis_ext_ref;
|
||||
}
|
||||
else
|
||||
t = coff_vis_ext_def;
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
break;
|
||||
|
||||
}
|
||||
visible->type = t;
|
||||
return visible;
|
||||
}
|
||||
|
||||
static int
|
||||
do_define (int i, struct coff_scope *b)
|
||||
{
|
||||
static int symbol_index;
|
||||
struct internal_syment *sym = &rawsyms[i].u.syment;
|
||||
|
||||
/* Define a symbol and attach to block b */
|
||||
struct coff_symbol *s = empty_symbol ();
|
||||
|
||||
s->number = ++symbol_index;
|
||||
s->name = sym->_n._n_nptr[1];
|
||||
s->sfile = cur_sfile;
|
||||
/* Glue onto the ofile list */
|
||||
if (lofile >= 0)
|
||||
{
|
||||
if (ofile->symbol_list_tail)
|
||||
ofile->symbol_list_tail->next_in_ofile_list = s;
|
||||
else
|
||||
ofile->symbol_list_head = s;
|
||||
ofile->symbol_list_tail = s;
|
||||
/* And the block list */
|
||||
}
|
||||
if (b->vars_tail)
|
||||
b->vars_tail->next = s;
|
||||
else
|
||||
b->vars_head = s;
|
||||
|
||||
b->vars_tail = s;
|
||||
b->nvars++;
|
||||
s->type = do_type (i);
|
||||
s->where = do_where (i);
|
||||
s->visible = do_visible (i);
|
||||
|
||||
tindex[i] = s;
|
||||
|
||||
/* We remember the lowest address in each section for each source file */
|
||||
|
||||
if (s->where->where == coff_where_memory
|
||||
&& s->type->type == coff_secdef_type)
|
||||
{
|
||||
struct coff_isection *is = cur_sfile->section + s->where->section->number;
|
||||
|
||||
if (!is->init)
|
||||
{
|
||||
is->low = s->where->offset;
|
||||
is->high = s->where->offset + s->type->size;
|
||||
is->init = 1;
|
||||
is->parent = s->where->section;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (s->type->type == coff_function_type)
|
||||
last_function_symbol = s;
|
||||
|
||||
return i + sym->n_numaux + 1;
|
||||
}
|
||||
|
||||
|
||||
static
|
||||
struct coff_ofile *
|
||||
doit (void)
|
||||
{
|
||||
int i;
|
||||
int infile = 0;
|
||||
struct coff_ofile *head =
|
||||
(struct coff_ofile *) xmalloc (sizeof (struct coff_ofile));
|
||||
ofile = head;
|
||||
head->source_head = 0;
|
||||
head->source_tail = 0;
|
||||
head->nsources = 0;
|
||||
head->symbol_list_tail = 0;
|
||||
head->symbol_list_head = 0;
|
||||
do_sections_p1 (head);
|
||||
push_scope (1);
|
||||
|
||||
for (i = 0; i < rawcount;)
|
||||
{
|
||||
struct internal_syment *sym = &rawsyms[i].u.syment;
|
||||
switch (sym->n_sclass)
|
||||
{
|
||||
case C_FILE:
|
||||
{
|
||||
/* new source file announced */
|
||||
struct coff_sfile *n =
|
||||
(struct coff_sfile *) xmalloc (sizeof (struct coff_sfile));
|
||||
n->section = (struct coff_isection *) xcalloc (sizeof (struct coff_isection), abfd->section_count + 1);
|
||||
cur_sfile = n;
|
||||
n->name = sym->_n._n_nptr[1];
|
||||
n->next = 0;
|
||||
|
||||
if (infile)
|
||||
{
|
||||
pop_scope ();
|
||||
}
|
||||
infile = 1;
|
||||
push_scope (1);
|
||||
file_scope = n->scope = top_scope;
|
||||
|
||||
if (head->source_tail)
|
||||
head->source_tail->next = n;
|
||||
else
|
||||
head->source_head = n;
|
||||
head->source_tail = n;
|
||||
head->nsources++;
|
||||
i += sym->n_numaux + 1;
|
||||
}
|
||||
break;
|
||||
case C_FCN:
|
||||
{
|
||||
char *name = sym->_n._n_nptr[1];
|
||||
if (name[1] == 'b')
|
||||
{
|
||||
/* Function start */
|
||||
push_scope (0);
|
||||
last_function_type->u.function.code = top_scope;
|
||||
top_scope->sec = ofile->sections + sym->n_scnum;
|
||||
top_scope->offset = sym->n_value;
|
||||
}
|
||||
else
|
||||
{
|
||||
top_scope->size = sym->n_value - top_scope->offset + 1;
|
||||
pop_scope ();
|
||||
|
||||
}
|
||||
i += sym->n_numaux + 1;
|
||||
}
|
||||
break;
|
||||
|
||||
case C_BLOCK:
|
||||
{
|
||||
char *name = sym->_n._n_nptr[1];
|
||||
if (name[1] == 'b')
|
||||
{
|
||||
/* Block start */
|
||||
push_scope (1);
|
||||
top_scope->sec = ofile->sections + sym->n_scnum;
|
||||
top_scope->offset = sym->n_value;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
top_scope->size = sym->n_value - top_scope->offset + 1;
|
||||
pop_scope ();
|
||||
}
|
||||
i += sym->n_numaux + 1;
|
||||
}
|
||||
break;
|
||||
case C_REGPARM:
|
||||
case C_ARG:
|
||||
i = do_define (i, last_function_symbol->type->u.function.parameters);
|
||||
break;
|
||||
case C_MOS:
|
||||
case C_MOU:
|
||||
case C_FIELD:
|
||||
i = do_define (i, last_struct->u.astructdef.elements);
|
||||
break;
|
||||
case C_MOE:
|
||||
i = do_define (i, last_enum->u.aenumdef.elements);
|
||||
break;
|
||||
case C_STRTAG:
|
||||
case C_ENTAG:
|
||||
case C_UNTAG:
|
||||
/* Various definition */
|
||||
i = do_define (i, top_scope);
|
||||
break;
|
||||
case C_EXT:
|
||||
case C_LABEL:
|
||||
i = do_define (i, file_scope);
|
||||
break;
|
||||
case C_STAT:
|
||||
case C_TPDEF:
|
||||
case C_AUTO:
|
||||
case C_REG:
|
||||
i = do_define (i, top_scope);
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
case C_EOS:
|
||||
i += sym->n_numaux + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
do_sections_p2 (head);
|
||||
return head;
|
||||
}
|
||||
|
||||
struct coff_ofile *
|
||||
coff_grok (bfd *inabfd)
|
||||
{
|
||||
long storage;
|
||||
struct coff_ofile *p;
|
||||
abfd = inabfd;
|
||||
storage = bfd_get_symtab_upper_bound (abfd);
|
||||
|
||||
if (storage < 0)
|
||||
bfd_fatal (abfd->filename);
|
||||
|
||||
syms = (asymbol **) xmalloc (storage);
|
||||
symcount = bfd_canonicalize_symtab (abfd, syms);
|
||||
if (symcount < 0)
|
||||
bfd_fatal (abfd->filename);
|
||||
rawsyms = obj_raw_syments (abfd);
|
||||
rawcount = obj_raw_syment_count (abfd);;
|
||||
tindex = (struct coff_symbol **) (xcalloc (sizeof (struct coff_symbol *), rawcount));
|
||||
|
||||
p = doit ();
|
||||
return p;
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
/* coffgrok.h
|
||||
Copyright 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#define T_NULL 0
|
||||
#define T_VOID 1 /* function argument (only used by compiler) */
|
||||
#define T_CHAR 2 /* character */
|
||||
#define T_SHORT 3 /* short integer */
|
||||
#define T_INT 4 /* integer */
|
||||
#define T_LONG 5 /* long integer */
|
||||
#define T_FLOAT 6 /* floating point */
|
||||
#define T_DOUBLE 7 /* double word */
|
||||
#define T_STRUCT 8 /* structure */
|
||||
#define T_UNION 9 /* union */
|
||||
#define T_ENUM 10 /* enumeration */
|
||||
#define T_MOE 11 /* member of enumeration*/
|
||||
#define T_UCHAR 12 /* unsigned character */
|
||||
#define T_USHORT 13 /* unsigned short */
|
||||
#define T_UINT 14 /* unsigned integer */
|
||||
#define T_ULONG 15 /* unsigned long */
|
||||
#define T_LNGDBL 16 /* long double */
|
||||
|
||||
|
||||
struct coff_reloc
|
||||
{
|
||||
int offset;
|
||||
struct coff_symbol *symbol;
|
||||
int addend;
|
||||
};
|
||||
|
||||
struct coff_section
|
||||
{
|
||||
char *name;
|
||||
int code;
|
||||
int data;
|
||||
int address;
|
||||
int number; /* 0..n, .text = 0 */
|
||||
int nrelocs;
|
||||
int size;
|
||||
struct coff_reloc *relocs;
|
||||
struct bfd_section *bfd_section;
|
||||
};
|
||||
|
||||
struct coff_ofile
|
||||
{
|
||||
int nsources;
|
||||
struct coff_sfile *source_head;
|
||||
struct coff_sfile *source_tail;
|
||||
int nsections;
|
||||
struct coff_section *sections;
|
||||
struct coff_symbol *symbol_list_head;
|
||||
struct coff_symbol *symbol_list_tail;
|
||||
};
|
||||
|
||||
struct coff_isection {
|
||||
int low;
|
||||
int high;
|
||||
int init;
|
||||
struct coff_section *parent;
|
||||
};
|
||||
|
||||
struct coff_sfile
|
||||
{
|
||||
char *name;
|
||||
struct coff_scope *scope;
|
||||
struct coff_sfile *next;
|
||||
|
||||
/* Vector which maps where in each output section
|
||||
the input file has it's data */
|
||||
struct coff_isection *section;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct coff_type
|
||||
{
|
||||
int size;
|
||||
enum
|
||||
{
|
||||
coff_pointer_type, coff_function_type, coff_array_type, coff_structdef_type, coff_basic_type,
|
||||
coff_structref_type, coff_enumref_type, coff_enumdef_type, coff_secdef_type
|
||||
} type;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
int address;
|
||||
int size;
|
||||
} asecdef;
|
||||
|
||||
struct
|
||||
{
|
||||
int isstruct;
|
||||
struct coff_scope *elements;
|
||||
int idx;
|
||||
}
|
||||
astructdef;
|
||||
struct
|
||||
{
|
||||
struct coff_symbol *ref;
|
||||
} astructref;
|
||||
|
||||
struct
|
||||
{
|
||||
struct coff_scope *elements;
|
||||
int idx;
|
||||
} aenumdef;
|
||||
struct
|
||||
{
|
||||
struct coff_symbol *ref;
|
||||
} aenumref;
|
||||
|
||||
struct
|
||||
{
|
||||
struct coff_type *points_to;
|
||||
} pointer;
|
||||
struct
|
||||
{
|
||||
int dim;
|
||||
struct coff_type *array_of;
|
||||
} array;
|
||||
|
||||
struct
|
||||
{
|
||||
struct coff_type *function_returns;
|
||||
struct coff_scope *parameters;
|
||||
struct coff_scope *code;
|
||||
struct coff_line *lines;
|
||||
} function;
|
||||
int basic; /* One of T_VOID.. T_UINT */
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
struct coff_line
|
||||
{
|
||||
int nlines;
|
||||
int *lines;
|
||||
int *addresses;
|
||||
};
|
||||
|
||||
|
||||
struct coff_scope
|
||||
{
|
||||
struct coff_section *sec; /* What section */
|
||||
int offset; /* where */
|
||||
int size; /* How big */
|
||||
struct coff_scope *parent; /* one up */
|
||||
|
||||
struct coff_scope *next; /*next along */
|
||||
|
||||
int nvars;
|
||||
|
||||
struct coff_symbol *vars_head; /* symbols */
|
||||
struct coff_symbol *vars_tail;
|
||||
|
||||
struct coff_scope *list_head; /* children */
|
||||
struct coff_scope *list_tail;
|
||||
|
||||
};
|
||||
|
||||
|
||||
struct coff_visible
|
||||
{
|
||||
enum coff_vis_type
|
||||
{
|
||||
coff_vis_ext_def,
|
||||
coff_vis_ext_ref,
|
||||
coff_vis_int_def,
|
||||
coff_vis_common,
|
||||
coff_vis_auto,
|
||||
coff_vis_register,
|
||||
coff_vis_tag,
|
||||
coff_vis_member_of_struct,
|
||||
coff_vis_member_of_enum,
|
||||
coff_vis_autoparam,
|
||||
coff_vis_regparam,
|
||||
} type;
|
||||
};
|
||||
|
||||
struct coff_where
|
||||
{
|
||||
enum
|
||||
{
|
||||
coff_where_stack, coff_where_memory, coff_where_register, coff_where_unknown,
|
||||
coff_where_strtag, coff_where_member_of_struct,
|
||||
coff_where_member_of_enum, coff_where_entag, coff_where_typedef
|
||||
|
||||
} where;
|
||||
int offset;
|
||||
int bitoffset;
|
||||
int bitsize;
|
||||
struct coff_section *section;
|
||||
};
|
||||
|
||||
struct coff_symbol
|
||||
{
|
||||
char *name;
|
||||
int tag;
|
||||
struct coff_type *type;
|
||||
struct coff_where *where;
|
||||
struct coff_visible *visible;
|
||||
struct coff_symbol *next;
|
||||
struct coff_symbol *next_in_ofile_list; /* For the ofile list */
|
||||
int number;
|
||||
int er_number;
|
||||
struct coff_sfile *sfile;
|
||||
};
|
||||
|
||||
struct coff_ofile *coff_grok PARAMS ((bfd *));
|
||||
@@ -1,260 +0,0 @@
|
||||
/* config.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Check that config.h is #included before system headers
|
||||
(this works only for glibc, but that should be enough). */
|
||||
#if defined(__GLIBC__)
|
||||
# error config.h must be #included before system headers
|
||||
#endif
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Should ar and ranlib use -D behavior by default? */
|
||||
#undef DEFAULT_AR_DETERMINISTIC
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Suffix used for executables, if any. */
|
||||
#undef EXECUTABLE_SUFFIX
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the declaration of `environ', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_ENVIRON
|
||||
|
||||
/* Define to 1 if you have the declaration of `fprintf', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_FPRINTF
|
||||
|
||||
/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_GETC_UNLOCKED
|
||||
|
||||
/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_GETENV
|
||||
|
||||
/* Is the prototype for getopt in <unistd.h> in the expected format? */
|
||||
#undef HAVE_DECL_GETOPT
|
||||
|
||||
/* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_SBRK
|
||||
|
||||
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_SNPRINTF
|
||||
|
||||
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STPCPY
|
||||
|
||||
/* Define to 1 if you have the declaration of `strstr', and to 0 if you don't.
|
||||
*/
|
||||
#undef HAVE_DECL_STRSTR
|
||||
|
||||
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_VSNPRINTF
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Does the platform use an executable suffix? */
|
||||
#undef HAVE_EXECUTABLE_SUFFIX
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `getc_unlocked' function. */
|
||||
#undef HAVE_GETC_UNLOCKED
|
||||
|
||||
/* Does <utime.h> define struct utimbuf? */
|
||||
#undef HAVE_GOOD_UTIME_H
|
||||
|
||||
/* Define if you have the iconv() function. */
|
||||
#undef HAVE_ICONV
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||
#undef HAVE_LC_MESSAGES
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <locale.h> header file. */
|
||||
#undef HAVE_LOCALE_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mkdtemp' function. */
|
||||
#undef HAVE_MKDTEMP
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#undef HAVE_MKSTEMP
|
||||
|
||||
/* Define to 1 if you have the `sbrk' function. */
|
||||
#undef HAVE_SBRK
|
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */
|
||||
#undef HAVE_SETLOCALE
|
||||
|
||||
/* Define to 1 if you have the `setmode' function. */
|
||||
#undef HAVE_SETMODE
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcoll' function. */
|
||||
#undef HAVE_STRCOLL
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#undef HAVE_SYS_FILE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Is the type time_t defined in <time.h>? */
|
||||
#undef HAVE_TIME_T_IN_TIME_H
|
||||
|
||||
/* Is the type time_t defined in <sys/types.h>? */
|
||||
#undef HAVE_TIME_T_IN_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `utimes' function. */
|
||||
#undef HAVE_UTIMES
|
||||
|
||||
/* Define to 1 if you have the <zlib.h> header file. */
|
||||
#undef HAVE_ZLIB_H
|
||||
|
||||
/* Define as const if the declaration of iconv() needs const. */
|
||||
#undef ICONV_CONST
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at runtime.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <string.h> and <strings.h>. */
|
||||
#undef STRING_WITH_STRINGS
|
||||
|
||||
/* Configured target name. */
|
||||
#undef TARGET
|
||||
|
||||
/* Define to 1 if user symbol names have a leading underscore, 0 if not. */
|
||||
#undef TARGET_PREPENDS_UNDERSCORE
|
||||
|
||||
/* Use b modifier when opening binary files? */
|
||||
#undef USE_BINARY_FOPEN
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# undef _POSIX_PTHREAD_SEMANTICS
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# undef _TANDEM_SOURCE
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# undef __EXTENSIONS__
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#undef YYTEXT_POINTER
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
#undef _MINIX
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
#undef _POSIX_1_SOURCE
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
#undef _POSIX_SOURCE
|
||||
16603
binutils/configure
vendored
16603
binutils/configure
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,109 +0,0 @@
|
||||
$!
|
||||
$! This file configures binutils for use with openVMS/Alpha
|
||||
$! We do not use the configure script, since we do not have /bin/sh
|
||||
$! to execute it.
|
||||
$!
|
||||
$! Written by Klaus K"ampf (kkaempf@rmi.de)
|
||||
$!
|
||||
$ arch=F$GETSYI("ARCH_NAME")
|
||||
$ arch=F$EDIT(arch,"LOWERCASE")
|
||||
$ write sys$output "Configuring binutils for ''arch' target"
|
||||
$!
|
||||
$! Generate config.h
|
||||
$!
|
||||
$ create config.h
|
||||
/* config.h. Generated automatically by configure.com */
|
||||
/* Is the type time_t defined in <time.h>? */
|
||||
#define HAVE_TIME_T_IN_TIME_H 1
|
||||
/* Is the type time_t defined in <sys/types.h>? */
|
||||
#define HAVE_TIME_T_IN_TYPES_H 1
|
||||
/* Does <utime.h> define struct utimbuf? */
|
||||
#define HAVE_GOOD_UTIME_H 1
|
||||
/* Whether fprintf must be declared even if <stdio.h> is included. */
|
||||
#define NEED_DECLARATION_FPRINTF 1
|
||||
/* Do we need to use the b modifier when opening binary files? */
|
||||
/* #undef USE_BINARY_FOPEN */
|
||||
/* Define if you have the utimes function. */
|
||||
#define HAVE_UTIMES 1
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
/* Define if you have the <sys/file.h> header file. */
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
/* Alloca. */
|
||||
#ifdef __DECC
|
||||
#include <builtins.h>
|
||||
#define C_alloca(x) __ALLOCA(x)
|
||||
#endif
|
||||
$!
|
||||
$! Add TARGET.
|
||||
$!
|
||||
$ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
|
||||
$ if arch .eqs. "alpha" then target = "vms-alpha"
|
||||
$ if arch .eqs. "vax" then target = "vms-vax"
|
||||
$!
|
||||
$ open/append tfile config.h
|
||||
$ write tfile "#define TARGET """ + target + """"
|
||||
$ close tfile
|
||||
$ write sys$output "Created `config.h'"
|
||||
$!
|
||||
$ write sys$output "Generate binutils build.com"
|
||||
$!
|
||||
$ create build.com
|
||||
$DECK
|
||||
$ DEFS=""
|
||||
$ OPT="/noopt/debug"
|
||||
$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
|
||||
"/name=(as_is,shortened)" +-
|
||||
"/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
|
||||
$ BFDLIB = ",[-.bfd]libbfd.olb/lib"
|
||||
$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
|
||||
$ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
|
||||
$ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
|
||||
$ BULIBS_FILES = ",bucomm,version,filemode"
|
||||
$ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
|
||||
BULIBS_FILES + DEBUG_FILES
|
||||
$!
|
||||
$ write sys$output "CFLAGS=",CFLAGS
|
||||
$ if p1.nes."LINK"
|
||||
$ then
|
||||
$ NUM = 0
|
||||
$ LOOP:
|
||||
$ F = F$ELEMENT(NUM,",",ALL_FILES)
|
||||
$ IF F.EQS."," THEN GOTO END
|
||||
$ write sys$output "Compiling ", F, ".c"
|
||||
$ cc 'CFLAGS 'F.c
|
||||
$ NUM = NUM + 1
|
||||
$ GOTO LOOP
|
||||
$ END:
|
||||
$ endif
|
||||
$ purge
|
||||
$!
|
||||
$ write sys$output "Building nm.exe"
|
||||
$ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
|
||||
$ link/exe=nm 'NM_OBJS
|
||||
$!
|
||||
$ write sys$output "Building strings.exe"
|
||||
$ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
|
||||
$ link/exe=strings 'STRINGS_OBJS
|
||||
$!
|
||||
$ write sys$output "Building size.exe"
|
||||
$ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
|
||||
$ link/exe=size 'SIZE_OBJS
|
||||
$!
|
||||
$ write sys$output "Building addr2line.exe"
|
||||
$ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
|
||||
$ link/exe=addr2line 'ADDR2LINE_OBJS
|
||||
$!
|
||||
$ write sys$output "Building objdump.exe"
|
||||
$ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
|
||||
BFDLIB + OPCODES + LIBIBERTY
|
||||
$ link/exe=objdump 'OBJDUMP_OBJS
|
||||
$EOD
|
||||
@@ -1,473 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR(ar.c)
|
||||
|
||||
AC_CANONICAL_TARGET
|
||||
AC_ISC_POSIX
|
||||
|
||||
changequote(,)dnl
|
||||
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
|
||||
changequote([,])dnl
|
||||
AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION})
|
||||
|
||||
AC_PROG_CC
|
||||
AC_GNU_SOURCE
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
ACX_LARGEFILE
|
||||
LT_INIT
|
||||
|
||||
AC_ARG_ENABLE(targets,
|
||||
[ --enable-targets alternative target configurations],
|
||||
[case "${enableval}" in
|
||||
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
|
||||
;;
|
||||
no) enable_targets= ;;
|
||||
*) enable_targets=$enableval ;;
|
||||
esac])dnl
|
||||
|
||||
AC_ARG_ENABLE(deterministic-archives,
|
||||
[AS_HELP_STRING([--enable-deterministic-archives],
|
||||
[ar and ranlib default to -D behavior])], [
|
||||
if test "${enableval}" = no; then
|
||||
default_ar_deterministic=0
|
||||
else
|
||||
default_ar_deterministic=1
|
||||
fi], [default_ar_deterministic=0])
|
||||
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_AR_DETERMINISTIC, $default_ar_deterministic,
|
||||
[Should ar and ranlib use -D behavior by default?])
|
||||
|
||||
AM_BINUTILS_WARNINGS
|
||||
|
||||
AC_CONFIG_HEADERS(config.h:config.in)
|
||||
|
||||
AH_VERBATIM([00_CONFIG_H_CHECK],
|
||||
[/* Check that config.h is #included before system headers
|
||||
(this works only for glibc, but that should be enough). */
|
||||
#if defined(__GLIBC__)
|
||||
# error config.h must be #included before system headers
|
||||
#endif])
|
||||
|
||||
if test -z "$target" ; then
|
||||
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
|
||||
fi
|
||||
if test -z "$host" ; then
|
||||
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
|
||||
fi
|
||||
|
||||
AC_PROG_YACC
|
||||
AM_PROG_LEX
|
||||
|
||||
ALL_LINGUAS="bg da es fi fr id it ja ro ru rw sk sv tr uk vi zh_CN zh_TW"
|
||||
ZW_GNU_GETTEXT_SISTER_DIR
|
||||
AM_PO_SUBDIRS
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AM_CONDITIONAL(GENINSRC_NEVER, false)
|
||||
AC_EXEEXT
|
||||
if test -n "$EXEEXT"; then
|
||||
AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1,
|
||||
[Does the platform use an executable suffix?])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(EXECUTABLE_SUFFIX, "${EXEEXT}",
|
||||
[Suffix used for executables, if any.])
|
||||
|
||||
# host-specific stuff:
|
||||
|
||||
HDEFINES=
|
||||
|
||||
. ${srcdir}/../bfd/configure.host
|
||||
|
||||
AC_SUBST(HDEFINES)
|
||||
AR=${AR-ar}
|
||||
AC_SUBST(AR)
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
|
||||
BFD_CC_FOR_BUILD
|
||||
|
||||
DEMANGLER_NAME=c++filt
|
||||
case "${host}" in
|
||||
*-*-go32* | *-*-msdos*)
|
||||
DEMANGLER_NAME=cxxfilt
|
||||
esac
|
||||
AC_SUBST(DEMANGLER_NAME)
|
||||
|
||||
AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h locale.h sys/param.h)
|
||||
AC_HEADER_SYS_WAIT
|
||||
ACX_HEADER_STRING
|
||||
AC_FUNC_ALLOCA
|
||||
AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll setlocale)
|
||||
AC_CHECK_FUNC([mkstemp],
|
||||
AC_DEFINE([HAVE_MKSTEMP], 1,
|
||||
[Define to 1 if you have the `mkstemp' function.]))
|
||||
AC_CHECK_FUNC([mkdtemp],
|
||||
AC_DEFINE([HAVE_MKDTEMP], 1,
|
||||
[Define to 1 if you have the `mkdtemp' function.]))
|
||||
|
||||
# Some systems have frexp only in -lm, not in -lc.
|
||||
AC_SEARCH_LIBS(frexp, m)
|
||||
|
||||
AM_LC_MESSAGES
|
||||
|
||||
AC_MSG_CHECKING(for time_t in time.h)
|
||||
AC_CACHE_VAL(bu_cv_decl_time_t_time_h,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [time_t i;])],
|
||||
bu_cv_decl_time_t_time_h=yes, bu_cv_decl_time_t_time_h=no)])
|
||||
AC_MSG_RESULT($bu_cv_decl_time_t_time_h)
|
||||
if test $bu_cv_decl_time_t_time_h = yes; then
|
||||
AC_DEFINE([HAVE_TIME_T_IN_TIME_H], 1,
|
||||
[Is the type time_t defined in <time.h>?])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for time_t in sys/types.h)
|
||||
AC_CACHE_VAL(bu_cv_decl_time_t_types_h,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>], [time_t i;])],
|
||||
bu_cv_decl_time_t_types_h=yes, bu_cv_decl_time_t_types_h=no)])
|
||||
AC_MSG_RESULT($bu_cv_decl_time_t_types_h)
|
||||
if test $bu_cv_decl_time_t_types_h = yes; then
|
||||
AC_DEFINE([HAVE_TIME_T_IN_TYPES_H], 1,
|
||||
[Is the type time_t defined in <sys/types.h>?])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
|
||||
AC_CACHE_VAL(bu_cv_decl_getopt_unistd_h,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
|
||||
bu_cv_decl_getopt_unistd_h=yes, bu_cv_decl_getopt_unistd_h=no)])
|
||||
AC_MSG_RESULT($bu_cv_decl_getopt_unistd_h)
|
||||
if test $bu_cv_decl_getopt_unistd_h = yes; then
|
||||
AC_DEFINE([HAVE_DECL_GETOPT], 1,
|
||||
[Is the prototype for getopt in <unistd.h> in the expected format?])
|
||||
fi
|
||||
|
||||
# Under Next 3.2 <utime.h> apparently does not define struct utimbuf
|
||||
# by default.
|
||||
AC_MSG_CHECKING([for utime.h])
|
||||
AC_CACHE_VAL(bu_cv_header_utime_h,
|
||||
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
#include <utime.h>],
|
||||
[struct utimbuf s;])],
|
||||
bu_cv_header_utime_h=yes, bu_cv_header_utime_h=no)])
|
||||
AC_MSG_RESULT($bu_cv_header_utime_h)
|
||||
if test $bu_cv_header_utime_h = yes; then
|
||||
AC_DEFINE(HAVE_GOOD_UTIME_H, 1, [Does <utime.h> define struct utimbuf?])
|
||||
fi
|
||||
|
||||
AC_CHECK_DECLS([fprintf, stpcpy, strstr, sbrk, getenv, environ, getc_unlocked,
|
||||
snprintf, vsnprintf])
|
||||
|
||||
# Link in zlib if we can. This allows us to read compressed debug
|
||||
# sections. This is used only by readelf.c (objdump uses bfd for
|
||||
# reading compressed sections).
|
||||
AM_ZLIB
|
||||
|
||||
BFD_BINARY_FOPEN
|
||||
|
||||
# target-specific stuff:
|
||||
|
||||
# Canonicalize the secondary target names.
|
||||
if test -n "$enable_targets"; then
|
||||
for targ in `echo $enable_targets | sed 's/,/ /g'`
|
||||
do
|
||||
result=`$ac_config_sub $targ 2>/dev/null`
|
||||
if test -n "$result"; then
|
||||
canon_targets="$canon_targets $result"
|
||||
else
|
||||
# Allow targets that config.sub doesn't recognize, like "all".
|
||||
canon_targets="$canon_targets $targ"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADER(iconv.h)
|
||||
AM_ICONV
|
||||
|
||||
all_targets=false
|
||||
BUILD_NLMCONV=
|
||||
NLMCONV_DEFS=
|
||||
BUILD_SRCONV=
|
||||
BUILD_DLLTOOL=
|
||||
DLLTOOL_DEFS=
|
||||
DLLTOOL_DEFAULT=
|
||||
BUILD_WINDRES=
|
||||
BUILD_WINDMC=
|
||||
BUILD_DLLWRAP=
|
||||
BUILD_MISC=
|
||||
BUILD_INSTALL_MISC=
|
||||
OBJDUMP_DEFS=
|
||||
OBJDUMP_PRIVATE_VECTORS=
|
||||
OBJDUMP_PRIVATE_OFILES=
|
||||
od_vectors=
|
||||
|
||||
for targ in $target $canon_targets
|
||||
do
|
||||
if test "x$targ" = "xall"; then
|
||||
all_targets=true
|
||||
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
|
||||
BUILD_SRCONV='$(SRCONV_PROG)'
|
||||
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
|
||||
BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
|
||||
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
|
||||
od_vectors="$od_vectors objdump_private_desc_xcoff"
|
||||
else
|
||||
case $targ in
|
||||
changequote(,)dnl
|
||||
i[3-7]86*-*-netware*)
|
||||
changequote([,])dnl
|
||||
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
|
||||
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
|
||||
;;
|
||||
alpha*-*-netware*)
|
||||
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
|
||||
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
|
||||
;;
|
||||
powerpc*-*-netware*)
|
||||
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
|
||||
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
|
||||
;;
|
||||
sparc*-*-netware*)
|
||||
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
|
||||
NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
|
||||
;;
|
||||
esac
|
||||
|
||||
case $targ in
|
||||
*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
|
||||
esac
|
||||
|
||||
case $targ in
|
||||
arm-epoc-pe*)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
arm-wince-pe* | arm-*-wince | arm*-*-cegcc* | arm*-*-mingw32ce*)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
arm-*-pe*)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
x86_64-*-mingw*)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
|
||||
changequote([,])dnl
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
|
||||
;;
|
||||
changequote(,)dnl
|
||||
i[3-7]86-*-interix)
|
||||
changequote([,])dnl
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
|
||||
;;
|
||||
changequote(,)dnl
|
||||
powerpc*-aix5.[01])
|
||||
changequote([,])dnl
|
||||
;;
|
||||
changequote(,)dnl
|
||||
powerpc*-aix[5-9].*)
|
||||
changequote([,])dnl
|
||||
OBJDUMP_DEFS="-DAIX_WEAK_SUPPORT"
|
||||
;;
|
||||
powerpc*-*-pe* | powerpc*-*-cygwin*)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
powerpc*-*-linux* | powerpc*-*-elf* | powerpc*-*-eabi*)
|
||||
case "$BUILD_INSTALL_MISC" in
|
||||
*embedspu*) ;;
|
||||
*) BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu"
|
||||
esac
|
||||
;;
|
||||
sh*-*-pe)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
spu-*-*)
|
||||
BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
|
||||
;;
|
||||
mips*-*-pe)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
mcore-*-pe)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
;;
|
||||
mcore-*-elf)
|
||||
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
|
||||
if test -z "$DLLTOOL_DEFAULT"; then
|
||||
DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF"
|
||||
fi
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
|
||||
;;
|
||||
mep-*)
|
||||
OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Add objdump private vectors.
|
||||
case $targ in
|
||||
powerpc-*-aix*)
|
||||
od_vectors="$od_vectors objdump_private_desc_xcoff"
|
||||
;;
|
||||
*-*-darwin*)
|
||||
od_vectors="$od_vectors objdump_private_desc_mach_o"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
# Uniq objdump private vector, build objdump target ofiles.
|
||||
od_files=
|
||||
f=""
|
||||
for i in $od_vectors ; do
|
||||
case " $f " in
|
||||
*" $i "*) ;;
|
||||
*)
|
||||
f="$f $i"
|
||||
OBJDUMP_PRIVATE_VECTORS="$OBJDUMP_PRIVATE_VECTORS &$i,"
|
||||
case $i in
|
||||
objdump_private_desc_xcoff)
|
||||
od_files="$od_files od-xcoff" ;;
|
||||
objdump_private_desc_mach_o)
|
||||
od_files="$od_files od-macho" ;;
|
||||
*) AC_MSG_ERROR(*** unknown private vector $i) ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Uniq objdump target ofiles
|
||||
f=""
|
||||
for i in $od_files ; do
|
||||
case " $f " in
|
||||
*" $i "*) ;;
|
||||
*)
|
||||
f="$f $i"
|
||||
OBJDUMP_PRIVATE_OFILES="$OBJDUMP_PRIVATE_OFILES $i.$objext"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT"
|
||||
|
||||
if test "${with_windres+set}" = set; then
|
||||
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
|
||||
fi
|
||||
|
||||
if test "${with_windmc+set}" = set; then
|
||||
BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
|
||||
fi
|
||||
|
||||
OBJDUMP_DEFS="${OBJDUMP_DEFS} -DOBJDUMP_PRIVATE_VECTORS=\"${OBJDUMP_PRIVATE_VECTORS}\""
|
||||
|
||||
AC_SUBST(NLMCONV_DEFS)
|
||||
AC_SUBST(BUILD_NLMCONV)
|
||||
AC_SUBST(BUILD_SRCONV)
|
||||
AC_SUBST(BUILD_DLLTOOL)
|
||||
AC_SUBST(DLLTOOL_DEFS)
|
||||
AC_SUBST(BUILD_WINDRES)
|
||||
AC_SUBST(BUILD_WINDMC)
|
||||
AC_SUBST(BUILD_DLLWRAP)
|
||||
AC_SUBST(BUILD_MISC)
|
||||
AC_SUBST(BUILD_INSTALL_MISC)
|
||||
AC_SUBST(OBJDUMP_DEFS)
|
||||
AC_SUBST(OBJDUMP_PRIVATE_OFILES)
|
||||
|
||||
AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
|
||||
|
||||
targ=$target
|
||||
. $srcdir/../bfd/config.bfd
|
||||
if test "x$targ_underscore" = "xyes"; then
|
||||
UNDERSCORE=1
|
||||
else
|
||||
UNDERSCORE=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(TARGET_PREPENDS_UNDERSCORE, $UNDERSCORE,
|
||||
[Define to 1 if user symbol names have a leading underscore, 0 if not.])
|
||||
|
||||
# Emulation
|
||||
targ=$target
|
||||
. ${srcdir}/configure.tgt
|
||||
EMULATION=$targ_emul
|
||||
EMULATION_VECTOR=$targ_emul_vector
|
||||
|
||||
AC_SUBST(EMULATION)
|
||||
AC_SUBST(EMULATION_VECTOR)
|
||||
|
||||
# Required for html and install-html
|
||||
AC_SUBST(datarootdir)
|
||||
AC_SUBST(docdir)
|
||||
AC_SUBST(htmldir)
|
||||
AC_SUBST(pdfdir)
|
||||
|
||||
AC_CONFIG_FILES(Makefile doc/Makefile po/Makefile.in:po/Make-in)
|
||||
AC_OUTPUT
|
||||
@@ -1,26 +0,0 @@
|
||||
# This is the binutils target specific file. This is invoked by the
|
||||
# autoconf generated configure script. Putting it in a separate shell
|
||||
# file lets us skip running autoconf when modifying target specific
|
||||
# information.
|
||||
|
||||
# This file switches on the shell variable ${targ}, and sets the
|
||||
# following shell variables:
|
||||
# targ_emul name of emulation to use
|
||||
# targ_emul_vector name of vector to use
|
||||
|
||||
case "${targ}" in
|
||||
powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*)
|
||||
targ_emul=aix
|
||||
targ_emul_vector=bin_aix_emulation
|
||||
;;
|
||||
|
||||
powerpc-*-aix4.3* | rs6000-*-aix4.3*)
|
||||
targ_emul=aix
|
||||
targ_emul_vector=bin_aix_emulation
|
||||
;;
|
||||
|
||||
*)
|
||||
targ_emul=vanilla
|
||||
targ_emul_vector=bin_vanilla_emulation
|
||||
;;
|
||||
esac
|
||||
@@ -1,289 +0,0 @@
|
||||
/* Demangler for GNU C++ - main program
|
||||
Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
Written by James Clark (jjc@jclark.uucp)
|
||||
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
|
||||
Modified by Satish Pai (pai@apollo.hp.com) for HP demangling
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GCC; see the file COPYING. If not, write to the Free
|
||||
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "demangle.h"
|
||||
#include "getopt.h"
|
||||
#include "safe-ctype.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
|
||||
static int strip_underscore = TARGET_PREPENDS_UNDERSCORE;
|
||||
|
||||
static const struct option long_options[] =
|
||||
{
|
||||
{"strip-underscore", no_argument, NULL, '_'},
|
||||
{"format", required_argument, NULL, 's'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"no-params", no_argument, NULL, 'p'},
|
||||
{"no-strip-underscores", no_argument, NULL, 'n'},
|
||||
{"no-verbose", no_argument, NULL, 'i'},
|
||||
{"types", no_argument, NULL, 't'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{NULL, no_argument, NULL, 0}
|
||||
};
|
||||
|
||||
static void
|
||||
demangle_it (char *mangled_name)
|
||||
{
|
||||
char *result;
|
||||
unsigned int skip_first = 0;
|
||||
|
||||
/* _ and $ are sometimes found at the start of function names
|
||||
in assembler sources in order to distinguish them from other
|
||||
names (eg register names). So skip them here. */
|
||||
if (mangled_name[0] == '.' || mangled_name[0] == '$')
|
||||
++skip_first;
|
||||
if (strip_underscore && mangled_name[skip_first] == '_')
|
||||
++skip_first;
|
||||
|
||||
result = cplus_demangle (mangled_name + skip_first, flags);
|
||||
|
||||
if (result == NULL)
|
||||
printf ("%s", mangled_name);
|
||||
else
|
||||
{
|
||||
if (mangled_name[0] == '.')
|
||||
putchar ('.');
|
||||
printf ("%s", result);
|
||||
free (result);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_demangler_list (FILE *stream)
|
||||
{
|
||||
const struct demangler_engine *demangler;
|
||||
|
||||
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
|
||||
|
||||
for (demangler = libiberty_demanglers + 1;
|
||||
demangler->demangling_style != unknown_demangling;
|
||||
++demangler)
|
||||
fprintf (stream, ",%s", demangler->demangling_style_name);
|
||||
|
||||
fprintf (stream, "}");
|
||||
}
|
||||
|
||||
static void
|
||||
usage (FILE *stream, int status)
|
||||
{
|
||||
fprintf (stream, "\
|
||||
Usage: %s [options] [mangled names]\n", program_name);
|
||||
fprintf (stream, "\
|
||||
Options are:\n\
|
||||
[-_|--strip-underscore] Ignore first leading underscore%s\n",
|
||||
TARGET_PREPENDS_UNDERSCORE ? " (default)" : "");
|
||||
fprintf (stream, "\
|
||||
[-n|--no-strip-underscore] Do not ignore a leading underscore%s\n",
|
||||
TARGET_PREPENDS_UNDERSCORE ? "" : " (default)");
|
||||
fprintf (stream, "\
|
||||
[-p|--no-params] Do not display function arguments\n\
|
||||
[-i|--no-verbose] Do not show implementation details (if any)\n\
|
||||
[-t|--types] Also attempt to demangle type encodings\n\
|
||||
[-s|--format ");
|
||||
print_demangler_list (stream);
|
||||
fprintf (stream, "]\n");
|
||||
|
||||
fprintf (stream, "\
|
||||
[@<file>] Read extra options from <file>\n\
|
||||
[-h|--help] Display this information\n\
|
||||
[-v|--version] Show the version information\n\
|
||||
Demangled names are displayed to stdout.\n\
|
||||
If a name cannot be demangled it is just echoed to stdout.\n\
|
||||
If no names are provided on the command line, stdin is read.\n");
|
||||
if (REPORT_BUGS_TO[0] && status == 0)
|
||||
fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
/* Return the string of non-alnum characters that may occur
|
||||
as a valid symbol component, in the standard assembler symbol
|
||||
syntax. */
|
||||
|
||||
static const char *
|
||||
standard_symbol_characters (void)
|
||||
{
|
||||
return "_$.";
|
||||
}
|
||||
|
||||
/* Return the string of non-alnum characters that may occur
|
||||
as a valid symbol name component in an HP object file.
|
||||
|
||||
Note that, since HP's compiler generates object code straight from
|
||||
C++ source, without going through an assembler, its mangled
|
||||
identifiers can use all sorts of characters that no assembler would
|
||||
tolerate, so the alphabet this function creates is a little odd.
|
||||
Here are some sample mangled identifiers offered by HP:
|
||||
|
||||
typeid*__XT24AddressIndExpClassMember_
|
||||
[Vftptr]key:__dt__32OrdinaryCompareIndExpClassMemberFv
|
||||
__ct__Q2_9Elf64_Dyn18{unnamed.union.#1}Fv
|
||||
|
||||
This still seems really weird to me, since nowhere else in this
|
||||
file is there anything to recognize curly brackets, parens, etc.
|
||||
I've talked with Srikanth <srikanth@cup.hp.com>, and he assures me
|
||||
this is right, but I still strongly suspect that there's a
|
||||
misunderstanding here.
|
||||
|
||||
If we decide it's better for c++filt to use HP's assembler syntax
|
||||
to scrape identifiers out of its input, here's the definition of
|
||||
the symbol name syntax from the HP assembler manual:
|
||||
|
||||
Symbols are composed of uppercase and lowercase letters, decimal
|
||||
digits, dollar symbol, period (.), ampersand (&), pound sign(#) and
|
||||
underscore (_). A symbol can begin with a letter, digit underscore or
|
||||
dollar sign. If a symbol begins with a digit, it must contain a
|
||||
non-digit character.
|
||||
|
||||
So have fun. */
|
||||
static const char *
|
||||
hp_symbol_characters (void)
|
||||
{
|
||||
return "_$.<>#,*&[]:(){}";
|
||||
}
|
||||
|
||||
extern int main (int, char **);
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
const char *valid_symbols;
|
||||
enum demangling_styles style = auto_demangling;
|
||||
|
||||
program_name = argv[0];
|
||||
xmalloc_set_program_name (program_name);
|
||||
|
||||
expandargv (&argc, &argv);
|
||||
|
||||
while ((c = getopt_long (argc, argv, "_hinps:tv", long_options, (int *) 0)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case '?':
|
||||
usage (stderr, 1);
|
||||
break;
|
||||
case 'h':
|
||||
usage (stdout, 0);
|
||||
case 'n':
|
||||
strip_underscore = 0;
|
||||
break;
|
||||
case 'p':
|
||||
flags &= ~ DMGL_PARAMS;
|
||||
break;
|
||||
case 't':
|
||||
flags |= DMGL_TYPES;
|
||||
break;
|
||||
case 'i':
|
||||
flags &= ~ DMGL_VERBOSE;
|
||||
break;
|
||||
case 'v':
|
||||
print_version ("c++filt");
|
||||
return 0;
|
||||
case '_':
|
||||
strip_underscore = 1;
|
||||
break;
|
||||
case 's':
|
||||
style = cplus_demangle_name_to_style (optarg);
|
||||
if (style == unknown_demangling)
|
||||
{
|
||||
fprintf (stderr, "%s: unknown demangling style `%s'\n",
|
||||
program_name, optarg);
|
||||
return 1;
|
||||
}
|
||||
cplus_demangle_set_style (style);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
for ( ; optind < argc; optind++)
|
||||
{
|
||||
demangle_it (argv[optind]);
|
||||
putchar ('\n');
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (current_demangling_style)
|
||||
{
|
||||
case gnu_demangling:
|
||||
case lucid_demangling:
|
||||
case arm_demangling:
|
||||
case java_demangling:
|
||||
case edg_demangling:
|
||||
case gnat_demangling:
|
||||
case gnu_v3_demangling:
|
||||
case auto_demangling:
|
||||
valid_symbols = standard_symbol_characters ();
|
||||
break;
|
||||
case hp_demangling:
|
||||
valid_symbols = hp_symbol_characters ();
|
||||
break;
|
||||
default:
|
||||
/* Folks should explicitly indicate the appropriate alphabet for
|
||||
each demangling. Providing a default would allow the
|
||||
question to go unconsidered. */
|
||||
fatal ("Internal error: no symbol alphabet for current style");
|
||||
}
|
||||
|
||||
for (;;)
|
||||
{
|
||||
static char mbuffer[32767];
|
||||
unsigned i = 0;
|
||||
|
||||
c = getchar ();
|
||||
/* Try to read a mangled name. */
|
||||
while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
|
||||
{
|
||||
if (i >= sizeof (mbuffer) - 1)
|
||||
break;
|
||||
mbuffer[i++] = c;
|
||||
c = getchar ();
|
||||
}
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
mbuffer[i] = 0;
|
||||
demangle_it (mbuffer);
|
||||
}
|
||||
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
/* Echo the whitespace characters so that the output looks
|
||||
like the input, only with the mangled names demangled. */
|
||||
putchar (c);
|
||||
if (c == '\n')
|
||||
fflush (stdout);
|
||||
}
|
||||
|
||||
fflush (stdout);
|
||||
return 0;
|
||||
}
|
||||
3371
binutils/debug.c
3371
binutils/debug.c
File diff suppressed because it is too large
Load Diff
793
binutils/debug.h
793
binutils/debug.h
@@ -1,793 +0,0 @@
|
||||
/* debug.h -- Describe generic debugging information.
|
||||
Copyright 1995, 1996, 2002, 2003, 2005, 2007, 2009
|
||||
Free Software Foundation, Inc.
|
||||
Written by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
|
||||
/* This header file describes a generic debugging information format.
|
||||
We may eventually have readers which convert different formats into
|
||||
this generic format, and writers which write it out. The initial
|
||||
impetus for this was writing a converter from stabs to HP IEEE-695
|
||||
debugging format. */
|
||||
|
||||
/* Different kinds of types. */
|
||||
|
||||
enum debug_type_kind
|
||||
{
|
||||
/* Not used. */
|
||||
DEBUG_KIND_ILLEGAL,
|
||||
/* Indirect via a pointer. */
|
||||
DEBUG_KIND_INDIRECT,
|
||||
/* Void. */
|
||||
DEBUG_KIND_VOID,
|
||||
/* Integer. */
|
||||
DEBUG_KIND_INT,
|
||||
/* Floating point. */
|
||||
DEBUG_KIND_FLOAT,
|
||||
/* Complex. */
|
||||
DEBUG_KIND_COMPLEX,
|
||||
/* Boolean. */
|
||||
DEBUG_KIND_BOOL,
|
||||
/* Struct. */
|
||||
DEBUG_KIND_STRUCT,
|
||||
/* Union. */
|
||||
DEBUG_KIND_UNION,
|
||||
/* Class. */
|
||||
DEBUG_KIND_CLASS,
|
||||
/* Union class (can this really happen?). */
|
||||
DEBUG_KIND_UNION_CLASS,
|
||||
/* Enumeration type. */
|
||||
DEBUG_KIND_ENUM,
|
||||
/* Pointer. */
|
||||
DEBUG_KIND_POINTER,
|
||||
/* Function. */
|
||||
DEBUG_KIND_FUNCTION,
|
||||
/* Reference. */
|
||||
DEBUG_KIND_REFERENCE,
|
||||
/* Range. */
|
||||
DEBUG_KIND_RANGE,
|
||||
/* Array. */
|
||||
DEBUG_KIND_ARRAY,
|
||||
/* Set. */
|
||||
DEBUG_KIND_SET,
|
||||
/* Based pointer. */
|
||||
DEBUG_KIND_OFFSET,
|
||||
/* Method. */
|
||||
DEBUG_KIND_METHOD,
|
||||
/* Const qualified type. */
|
||||
DEBUG_KIND_CONST,
|
||||
/* Volatile qualified type. */
|
||||
DEBUG_KIND_VOLATILE,
|
||||
/* Named type. */
|
||||
DEBUG_KIND_NAMED,
|
||||
/* Tagged type. */
|
||||
DEBUG_KIND_TAGGED
|
||||
};
|
||||
|
||||
/* Different kinds of variables. */
|
||||
|
||||
enum debug_var_kind
|
||||
{
|
||||
/* Not used. */
|
||||
DEBUG_VAR_ILLEGAL,
|
||||
/* A global variable. */
|
||||
DEBUG_GLOBAL,
|
||||
/* A static variable. */
|
||||
DEBUG_STATIC,
|
||||
/* A local static variable. */
|
||||
DEBUG_LOCAL_STATIC,
|
||||
/* A local variable. */
|
||||
DEBUG_LOCAL,
|
||||
/* A register variable. */
|
||||
DEBUG_REGISTER
|
||||
};
|
||||
|
||||
/* Different kinds of function parameters. */
|
||||
|
||||
enum debug_parm_kind
|
||||
{
|
||||
/* Not used. */
|
||||
DEBUG_PARM_ILLEGAL,
|
||||
/* A stack based parameter. */
|
||||
DEBUG_PARM_STACK,
|
||||
/* A register parameter. */
|
||||
DEBUG_PARM_REG,
|
||||
/* A stack based reference parameter. */
|
||||
DEBUG_PARM_REFERENCE,
|
||||
/* A register reference parameter. */
|
||||
DEBUG_PARM_REF_REG
|
||||
};
|
||||
|
||||
/* Different kinds of visibility. */
|
||||
|
||||
enum debug_visibility
|
||||
{
|
||||
/* A public field (e.g., a field in a C struct). */
|
||||
DEBUG_VISIBILITY_PUBLIC,
|
||||
/* A protected field. */
|
||||
DEBUG_VISIBILITY_PROTECTED,
|
||||
/* A private field. */
|
||||
DEBUG_VISIBILITY_PRIVATE,
|
||||
/* A field which should be ignored. */
|
||||
DEBUG_VISIBILITY_IGNORE
|
||||
};
|
||||
|
||||
/* A type. */
|
||||
|
||||
typedef struct debug_type_s *debug_type;
|
||||
|
||||
#define DEBUG_TYPE_NULL ((debug_type) NULL)
|
||||
|
||||
/* A field in a struct or union. */
|
||||
|
||||
typedef struct debug_field_s *debug_field;
|
||||
|
||||
#define DEBUG_FIELD_NULL ((debug_field) NULL)
|
||||
|
||||
/* A base class for an object. */
|
||||
|
||||
typedef struct debug_baseclass_s *debug_baseclass;
|
||||
|
||||
#define DEBUG_BASECLASS_NULL ((debug_baseclass) NULL)
|
||||
|
||||
/* A method of an object. */
|
||||
|
||||
typedef struct debug_method_s *debug_method;
|
||||
|
||||
#define DEBUG_METHOD_NULL ((debug_method) NULL)
|
||||
|
||||
/* The arguments to a method function of an object. These indicate
|
||||
which method to run. */
|
||||
|
||||
typedef struct debug_method_variant_s *debug_method_variant;
|
||||
|
||||
#define DEBUG_METHOD_VARIANT_NULL ((debug_method_variant) NULL)
|
||||
|
||||
/* This structure is passed to debug_write. It holds function
|
||||
pointers that debug_write will call based on the accumulated
|
||||
debugging information. */
|
||||
|
||||
struct debug_write_fns
|
||||
{
|
||||
/* This is called at the start of each new compilation unit with the
|
||||
name of the main file in the new unit. */
|
||||
bfd_boolean (*start_compilation_unit) (void *, const char *);
|
||||
|
||||
/* This is called at the start of each source file within a
|
||||
compilation unit, before outputting any global information for
|
||||
that file. The argument is the name of the file. */
|
||||
bfd_boolean (*start_source) (void *, const char *);
|
||||
|
||||
/* Each writer must keep a stack of types. */
|
||||
|
||||
/* Push an empty type onto the type stack. This type can appear if
|
||||
there is a reference to a type which is never defined. */
|
||||
bfd_boolean (*empty_type) (void *);
|
||||
|
||||
/* Push a void type onto the type stack. */
|
||||
bfd_boolean (*void_type) (void *);
|
||||
|
||||
/* Push an integer type onto the type stack, given the size and
|
||||
whether it is unsigned. */
|
||||
bfd_boolean (*int_type) (void *, unsigned int, bfd_boolean);
|
||||
|
||||
/* Push a floating type onto the type stack, given the size. */
|
||||
bfd_boolean (*float_type) (void *, unsigned int);
|
||||
|
||||
/* Push a complex type onto the type stack, given the size. */
|
||||
bfd_boolean (*complex_type) (void *, unsigned int);
|
||||
|
||||
/* Push a bfd_boolean type onto the type stack, given the size. */
|
||||
bfd_boolean (*bool_type) (void *, unsigned int);
|
||||
|
||||
/* Push an enum type onto the type stack, given the tag, a NULL
|
||||
terminated array of names and the associated values. If there is
|
||||
no tag, the tag argument will be NULL. If this is an undefined
|
||||
enum, the names and values arguments will be NULL. */
|
||||
bfd_boolean (*enum_type)
|
||||
(void *, const char *, const char **, bfd_signed_vma *);
|
||||
|
||||
/* Pop the top type on the type stack, and push a pointer to that
|
||||
type onto the type stack. */
|
||||
bfd_boolean (*pointer_type) (void *);
|
||||
|
||||
/* Push a function type onto the type stack. The second argument
|
||||
indicates the number of argument types that have been pushed onto
|
||||
the stack. If the number of argument types is passed as -1, then
|
||||
the argument types of the function are unknown, and no types have
|
||||
been pushed onto the stack. The third argument is TRUE if the
|
||||
function takes a variable number of arguments. The return type
|
||||
of the function is pushed onto the type stack below the argument
|
||||
types, if any. */
|
||||
bfd_boolean (*function_type) (void *, int, bfd_boolean);
|
||||
|
||||
/* Pop the top type on the type stack, and push a reference to that
|
||||
type onto the type stack. */
|
||||
bfd_boolean (*reference_type) (void *);
|
||||
|
||||
/* Pop the top type on the type stack, and push a range of that type
|
||||
with the given lower and upper bounds onto the type stack. */
|
||||
bfd_boolean (*range_type) (void *, bfd_signed_vma, bfd_signed_vma);
|
||||
|
||||
/* Push an array type onto the type stack. The top type on the type
|
||||
stack is the range, and the next type on the type stack is the
|
||||
element type. These should be popped before the array type is
|
||||
pushed. The arguments are the lower bound, the upper bound, and
|
||||
whether the array is a string. */
|
||||
bfd_boolean (*array_type)
|
||||
(void *, bfd_signed_vma, bfd_signed_vma, bfd_boolean);
|
||||
|
||||
/* Pop the top type on the type stack, and push a set of that type
|
||||
onto the type stack. The argument indicates whether this set is
|
||||
a bitstring. */
|
||||
bfd_boolean (*set_type) (void *, bfd_boolean);
|
||||
|
||||
/* Push an offset type onto the type stack. The top type on the
|
||||
type stack is the target type, and the next type on the type
|
||||
stack is the base type. These should be popped before the offset
|
||||
type is pushed. */
|
||||
bfd_boolean (*offset_type) (void *);
|
||||
|
||||
/* Push a method type onto the type stack. If the second argument
|
||||
is TRUE, the top type on the stack is the class to which the
|
||||
method belongs; otherwise, the class must be determined by the
|
||||
class to which the method is attached. The third argument is the
|
||||
number of argument types; these are pushed onto the type stack in
|
||||
reverse order (the first type popped is the last argument to the
|
||||
method). A value of -1 for the third argument means that no
|
||||
argument information is available. The fourth argument is TRUE
|
||||
if the function takes a variable number of arguments. The next
|
||||
type on the type stack below the domain and the argument types is
|
||||
the return type of the method. All these types must be popped,
|
||||
and then the method type must be pushed. */
|
||||
bfd_boolean (*method_type) (void *, bfd_boolean, int, bfd_boolean);
|
||||
|
||||
/* Pop the top type off the type stack, and push a const qualified
|
||||
version of that type onto the type stack. */
|
||||
bfd_boolean (*const_type) (void *);
|
||||
|
||||
/* Pop the top type off the type stack, and push a volatile
|
||||
qualified version of that type onto the type stack. */
|
||||
bfd_boolean (*volatile_type) (void *);
|
||||
|
||||
/* Start building a struct. This is followed by calls to the
|
||||
struct_field function, and finished by a call to the
|
||||
end_struct_type function. The second argument is the tag; this
|
||||
will be NULL if there isn't one. If the second argument is NULL,
|
||||
the third argument is a constant identifying this struct for use
|
||||
with tag_type. The fourth argument is TRUE for a struct, FALSE
|
||||
for a union. The fifth argument is the size. If this is an
|
||||
undefined struct or union, the size will be 0 and struct_field
|
||||
will not be called before end_struct_type is called. */
|
||||
bfd_boolean (*start_struct_type)
|
||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int);
|
||||
|
||||
/* Add a field to the struct type currently being built. The type
|
||||
of the field should be popped off the type stack. The arguments
|
||||
are the name, the bit position, the bit size (may be zero if the
|
||||
field is not packed), and the visibility. */
|
||||
bfd_boolean (*struct_field)
|
||||
(void *, const char *, bfd_vma, bfd_vma, enum debug_visibility);
|
||||
|
||||
/* Finish building a struct, and push it onto the type stack. */
|
||||
bfd_boolean (*end_struct_type) (void *);
|
||||
|
||||
/* Start building a class. This is followed by calls to several
|
||||
functions: struct_field, class_static_member, class_baseclass,
|
||||
class_start_method, class_method_variant,
|
||||
class_static_method_variant, and class_end_method. The class is
|
||||
finished by a call to end_class_type. The first five arguments
|
||||
are the same as for start_struct_type. The sixth argument is
|
||||
TRUE if there is a virtual function table; if there is, the
|
||||
seventh argument is TRUE if the virtual function table can be
|
||||
found in the type itself, and is FALSE if the type of the object
|
||||
holding the virtual function table should be popped from the type
|
||||
stack. */
|
||||
bfd_boolean (*start_class_type)
|
||||
(void *, const char *, unsigned int, bfd_boolean, unsigned int,
|
||||
bfd_boolean, bfd_boolean);
|
||||
|
||||
/* Add a static member to the class currently being built. The
|
||||
arguments are the field name, the physical name, and the
|
||||
visibility. The type must be popped off the type stack. */
|
||||
bfd_boolean (*class_static_member)
|
||||
(void *, const char *, const char *, enum debug_visibility);
|
||||
|
||||
/* Add a baseclass to the class currently being built. The type of
|
||||
the baseclass must be popped off the type stack. The arguments
|
||||
are the bit position, whether the class is virtual, and the
|
||||
visibility. */
|
||||
bfd_boolean (*class_baseclass)
|
||||
(void *, bfd_vma, bfd_boolean, enum debug_visibility);
|
||||
|
||||
/* Start adding a method to the class currently being built. This
|
||||
is followed by calls to class_method_variant and
|
||||
class_static_method_variant to describe different variants of the
|
||||
method which take different arguments. The method is finished
|
||||
with a call to class_end_method. The argument is the method
|
||||
name. */
|
||||
bfd_boolean (*class_start_method) (void *, const char *);
|
||||
|
||||
/* Describe a variant to the class method currently being built.
|
||||
The type of the variant must be popped off the type stack. The
|
||||
second argument is the physical name of the function. The
|
||||
following arguments are the visibility, whether the variant is
|
||||
const, whether the variant is volatile, the offset in the virtual
|
||||
function table, and whether the context is on the type stack
|
||||
(below the variant type). */
|
||||
bfd_boolean (*class_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean, bfd_vma, bfd_boolean);
|
||||
|
||||
/* Describe a static variant to the class method currently being
|
||||
built. The arguments are the same as for class_method_variant,
|
||||
except that the last two arguments are omitted. The type of the
|
||||
variant must be popped off the type stack. */
|
||||
bfd_boolean (*class_static_method_variant)
|
||||
(void *, const char *, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean);
|
||||
|
||||
/* Finish describing a class method. */
|
||||
bfd_boolean (*class_end_method) (void *);
|
||||
|
||||
/* Finish describing a class, and push it onto the type stack. */
|
||||
bfd_boolean (*end_class_type) (void *);
|
||||
|
||||
/* Push a type on the stack which was given a name by an earlier
|
||||
call to typdef. */
|
||||
bfd_boolean (*typedef_type) (void *, const char *);
|
||||
|
||||
/* Push a tagged type on the stack which was defined earlier. If
|
||||
the second argument is not NULL, the type was defined by a call
|
||||
to tag. If the second argument is NULL, the type was defined by
|
||||
a call to start_struct_type or start_class_type with a tag of
|
||||
NULL and the number of the third argument. Either way, the
|
||||
fourth argument is the tag kind. Note that this may be called
|
||||
for a struct (class) being defined, in between the call to
|
||||
start_struct_type (start_class_type) and the call to
|
||||
end_struct_type (end_class_type). */
|
||||
bfd_boolean (*tag_type)
|
||||
(void *, const char *, unsigned int, enum debug_type_kind);
|
||||
|
||||
/* Pop the type stack, and typedef it to the given name. */
|
||||
bfd_boolean (*typdef) (void *, const char *);
|
||||
|
||||
/* Pop the type stack, and declare it as a tagged struct or union or
|
||||
enum or whatever. The tag passed down here is redundant, since
|
||||
was also passed when enum_type, start_struct_type, or
|
||||
start_class_type was called. */
|
||||
bfd_boolean (*tag) (void *, const char *);
|
||||
|
||||
/* This is called to record a named integer constant. */
|
||||
bfd_boolean (*int_constant) (void *, const char *, bfd_vma);
|
||||
|
||||
/* This is called to record a named floating point constant. */
|
||||
bfd_boolean (*float_constant) (void *, const char *, double);
|
||||
|
||||
/* This is called to record a typed integer constant. The type is
|
||||
popped off the type stack. */
|
||||
bfd_boolean (*typed_constant) (void *, const char *, bfd_vma);
|
||||
|
||||
/* This is called to record a variable. The type is popped off the
|
||||
type stack. */
|
||||
bfd_boolean (*variable)
|
||||
(void *, const char *, enum debug_var_kind, bfd_vma);
|
||||
|
||||
/* Start writing out a function. The return type must be popped off
|
||||
the stack. The bfd_boolean is TRUE if the function is global. This
|
||||
is followed by calls to function_parameter, followed by block
|
||||
information. */
|
||||
bfd_boolean (*start_function) (void *, const char *, bfd_boolean);
|
||||
|
||||
/* Record a function parameter for the current function. The type
|
||||
must be popped off the stack. */
|
||||
bfd_boolean (*function_parameter)
|
||||
(void *, const char *, enum debug_parm_kind, bfd_vma);
|
||||
|
||||
/* Start writing out a block. There is at least one top level block
|
||||
per function. Blocks may be nested. The argument is the
|
||||
starting address of the block. */
|
||||
bfd_boolean (*start_block) (void *, bfd_vma);
|
||||
|
||||
/* Finish writing out a block. The argument is the ending address
|
||||
of the block. */
|
||||
bfd_boolean (*end_block) (void *, bfd_vma);
|
||||
|
||||
/* Finish writing out a function. */
|
||||
bfd_boolean (*end_function) (void *);
|
||||
|
||||
/* Record line number information for the current compilation unit. */
|
||||
bfd_boolean (*lineno) (void *, const char *, unsigned long, bfd_vma);
|
||||
};
|
||||
|
||||
/* Exported functions. */
|
||||
|
||||
/* The first argument to most of these functions is a handle. This
|
||||
handle is returned by the debug_init function. The purpose of the
|
||||
handle is to permit the debugging routines to not use static
|
||||
variables, and hence to be reentrant. This would be useful for a
|
||||
program which wanted to handle two executables simultaneously. */
|
||||
|
||||
/* Return a debugging handle. */
|
||||
|
||||
extern void *debug_init (void);
|
||||
|
||||
/* Set the source filename. This implicitly starts a new compilation
|
||||
unit. */
|
||||
|
||||
extern bfd_boolean debug_set_filename (void *, const char *);
|
||||
|
||||
/* Change source files to the given file name. This is used for
|
||||
include files in a single compilation unit. */
|
||||
|
||||
extern bfd_boolean debug_start_source (void *, const char *);
|
||||
|
||||
/* Record a function definition. This implicitly starts a function
|
||||
block. The debug_type argument is the type of the return value.
|
||||
The bfd_boolean indicates whether the function is globally visible.
|
||||
The bfd_vma is the address of the start of the function. Currently
|
||||
the parameter types are specified by calls to
|
||||
debug_record_parameter. */
|
||||
|
||||
extern bfd_boolean debug_record_function
|
||||
(void *, const char *, debug_type, bfd_boolean, bfd_vma);
|
||||
|
||||
/* Record a parameter for the current function. */
|
||||
|
||||
extern bfd_boolean debug_record_parameter
|
||||
(void *, const char *, debug_type, enum debug_parm_kind, bfd_vma);
|
||||
|
||||
/* End a function definition. The argument is the address where the
|
||||
function ends. */
|
||||
|
||||
extern bfd_boolean debug_end_function (void *, bfd_vma);
|
||||
|
||||
/* Start a block in a function. All local information will be
|
||||
recorded in this block, until the matching call to debug_end_block.
|
||||
debug_start_block and debug_end_block may be nested. The argument
|
||||
is the address at which this block starts. */
|
||||
|
||||
extern bfd_boolean debug_start_block (void *, bfd_vma);
|
||||
|
||||
/* Finish a block in a function. This matches the call to
|
||||
debug_start_block. The argument is the address at which this block
|
||||
ends. */
|
||||
|
||||
extern bfd_boolean debug_end_block (void *, bfd_vma);
|
||||
|
||||
/* Associate a line number in the current source file with a given
|
||||
address. */
|
||||
|
||||
extern bfd_boolean debug_record_line (void *, unsigned long, bfd_vma);
|
||||
|
||||
/* Start a named common block. This is a block of variables that may
|
||||
move in memory. */
|
||||
|
||||
extern bfd_boolean debug_start_common_block (void *, const char *);
|
||||
|
||||
/* End a named common block. */
|
||||
|
||||
extern bfd_boolean debug_end_common_block (void *, const char *);
|
||||
|
||||
/* Record a named integer constant. */
|
||||
|
||||
extern bfd_boolean debug_record_int_const (void *, const char *, bfd_vma);
|
||||
|
||||
/* Record a named floating point constant. */
|
||||
|
||||
extern bfd_boolean debug_record_float_const (void *, const char *, double);
|
||||
|
||||
/* Record a typed constant with an integral value. */
|
||||
|
||||
extern bfd_boolean debug_record_typed_const
|
||||
(void *, const char *, debug_type, bfd_vma);
|
||||
|
||||
/* Record a label. */
|
||||
|
||||
extern bfd_boolean debug_record_label
|
||||
(void *, const char *, debug_type, bfd_vma);
|
||||
|
||||
/* Record a variable. */
|
||||
|
||||
extern bfd_boolean debug_record_variable
|
||||
(void *, const char *, debug_type, enum debug_var_kind, bfd_vma);
|
||||
|
||||
/* Make an indirect type. The first argument is a pointer to the
|
||||
location where the real type will be placed. The second argument
|
||||
is the type tag, if there is one; this may be NULL; the only
|
||||
purpose of this argument is so that debug_get_type_name can return
|
||||
something useful. This function may be used when a type is
|
||||
referenced before it is defined. */
|
||||
|
||||
extern debug_type debug_make_indirect_type
|
||||
(void *, debug_type *, const char *);
|
||||
|
||||
/* Make a void type. */
|
||||
|
||||
extern debug_type debug_make_void_type (void *);
|
||||
|
||||
/* Make an integer type of a given size. The bfd_boolean argument is TRUE
|
||||
if the integer is unsigned. */
|
||||
|
||||
extern debug_type debug_make_int_type (void *, unsigned int, bfd_boolean);
|
||||
|
||||
/* Make a floating point type of a given size. FIXME: On some
|
||||
platforms, like an Alpha, you probably need to be able to specify
|
||||
the format. */
|
||||
|
||||
extern debug_type debug_make_float_type (void *, unsigned int);
|
||||
|
||||
/* Make a boolean type of a given size. */
|
||||
|
||||
extern debug_type debug_make_bool_type (void *, unsigned int);
|
||||
|
||||
/* Make a complex type of a given size. */
|
||||
|
||||
extern debug_type debug_make_complex_type (void *, unsigned int);
|
||||
|
||||
/* Make a structure type. The second argument is TRUE for a struct,
|
||||
FALSE for a union. The third argument is the size of the struct.
|
||||
The fourth argument is a NULL terminated array of fields. */
|
||||
|
||||
extern debug_type debug_make_struct_type
|
||||
(void *, bfd_boolean, bfd_vma, debug_field *);
|
||||
|
||||
/* Make an object type. The first three arguments after the handle
|
||||
are the same as for debug_make_struct_type. The next arguments are
|
||||
a NULL terminated array of base classes, a NULL terminated array of
|
||||
methods, the type of the object holding the virtual function table
|
||||
if it is not this object, and a bfd_boolean which is TRUE if this
|
||||
object has its own virtual function table. */
|
||||
|
||||
extern debug_type debug_make_object_type
|
||||
(void *, bfd_boolean, bfd_vma, debug_field *, debug_baseclass *,
|
||||
debug_method *, debug_type, bfd_boolean);
|
||||
|
||||
/* Make an enumeration type. The arguments are a null terminated
|
||||
array of strings, and an array of corresponding values. */
|
||||
|
||||
extern debug_type debug_make_enum_type
|
||||
(void *, const char **, bfd_signed_vma *);
|
||||
|
||||
/* Make a pointer to a given type. */
|
||||
|
||||
extern debug_type debug_make_pointer_type (void *, debug_type);
|
||||
|
||||
/* Make a function type. The second argument is the return type. The
|
||||
third argument is a NULL terminated array of argument types. The
|
||||
fourth argument is TRUE if the function takes a variable number of
|
||||
arguments. If the third argument is NULL, then the argument types
|
||||
are unknown. */
|
||||
|
||||
extern debug_type debug_make_function_type
|
||||
(void *, debug_type, debug_type *, bfd_boolean);
|
||||
|
||||
/* Make a reference to a given type. */
|
||||
|
||||
extern debug_type debug_make_reference_type (void *, debug_type);
|
||||
|
||||
/* Make a range of a given type from a lower to an upper bound. */
|
||||
|
||||
extern debug_type debug_make_range_type
|
||||
(void *, debug_type, bfd_signed_vma, bfd_signed_vma);
|
||||
|
||||
/* Make an array type. The second argument is the type of an element
|
||||
of the array. The third argument is the type of a range of the
|
||||
array. The fourth and fifth argument are the lower and upper
|
||||
bounds, respectively (if the bounds are not known, lower should be
|
||||
0 and upper should be -1). The sixth argument is TRUE if this
|
||||
array is actually a string, as in C. */
|
||||
|
||||
extern debug_type debug_make_array_type
|
||||
(void *, debug_type, debug_type, bfd_signed_vma, bfd_signed_vma,
|
||||
bfd_boolean);
|
||||
|
||||
/* Make a set of a given type. For example, a Pascal set type. The
|
||||
bfd_boolean argument is TRUE if this set is actually a bitstring, as in
|
||||
CHILL. */
|
||||
|
||||
extern debug_type debug_make_set_type (void *, debug_type, bfd_boolean);
|
||||
|
||||
/* Make a type for a pointer which is relative to an object. The
|
||||
second argument is the type of the object to which the pointer is
|
||||
relative. The third argument is the type that the pointer points
|
||||
to. */
|
||||
|
||||
extern debug_type debug_make_offset_type (void *, debug_type, debug_type);
|
||||
|
||||
/* Make a type for a method function. The second argument is the
|
||||
return type. The third argument is the domain. The fourth
|
||||
argument is a NULL terminated array of argument types. The fifth
|
||||
argument is TRUE if the function takes a variable number of
|
||||
arguments, in which case the array of argument types indicates the
|
||||
types of the first arguments. The domain and the argument array
|
||||
may be NULL, in which case this is a stub method and that
|
||||
information is not available. Stabs debugging uses this, and gets
|
||||
the argument types from the mangled name. */
|
||||
|
||||
extern debug_type debug_make_method_type
|
||||
(void *, debug_type, debug_type, debug_type *, bfd_boolean);
|
||||
|
||||
/* Make a const qualified version of a given type. */
|
||||
|
||||
extern debug_type debug_make_const_type (void *, debug_type);
|
||||
|
||||
/* Make a volatile qualified version of a given type. */
|
||||
|
||||
extern debug_type debug_make_volatile_type (void *, debug_type);
|
||||
|
||||
/* Make an undefined tagged type. For example, a struct which has
|
||||
been mentioned, but not defined. */
|
||||
|
||||
extern debug_type debug_make_undefined_tagged_type
|
||||
(void *, const char *, enum debug_type_kind);
|
||||
|
||||
/* Make a base class for an object. The second argument is the base
|
||||
class type. The third argument is the bit position of this base
|
||||
class in the object. The fourth argument is whether this is a
|
||||
virtual class. The fifth argument is the visibility of the base
|
||||
class. */
|
||||
|
||||
extern debug_baseclass debug_make_baseclass
|
||||
(void *, debug_type, bfd_vma, bfd_boolean, enum debug_visibility);
|
||||
|
||||
/* Make a field for a struct. The second argument is the name. The
|
||||
third argument is the type of the field. The fourth argument is
|
||||
the bit position of the field. The fifth argument is the size of
|
||||
the field (it may be zero). The sixth argument is the visibility
|
||||
of the field. */
|
||||
|
||||
extern debug_field debug_make_field
|
||||
(void *, const char *, debug_type, bfd_vma, bfd_vma, enum debug_visibility);
|
||||
|
||||
/* Make a static member of an object. The second argument is the
|
||||
name. The third argument is the type of the member. The fourth
|
||||
argument is the physical name of the member (i.e., the name as a
|
||||
global variable). The fifth argument is the visibility of the
|
||||
member. */
|
||||
|
||||
extern debug_field debug_make_static_member
|
||||
(void *, const char *, debug_type, const char *, enum debug_visibility);
|
||||
|
||||
/* Make a method. The second argument is the name, and the third
|
||||
argument is a NULL terminated array of method variants. Each
|
||||
method variant is a method with this name but with different
|
||||
argument types. */
|
||||
|
||||
extern debug_method debug_make_method
|
||||
(void *, const char *, debug_method_variant *);
|
||||
|
||||
/* Make a method variant. The second argument is the physical name of
|
||||
the function. The third argument is the type of the function,
|
||||
probably constructed by debug_make_method_type. The fourth
|
||||
argument is the visibility. The fifth argument is whether this is
|
||||
a const function. The sixth argument is whether this is a volatile
|
||||
function. The seventh argument is the index in the virtual
|
||||
function table, if any. The eighth argument is the virtual
|
||||
function context. */
|
||||
|
||||
extern debug_method_variant debug_make_method_variant
|
||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean, bfd_vma, debug_type);
|
||||
|
||||
/* Make a static method argument. The arguments are the same as for
|
||||
debug_make_method_variant, except that the last two are omitted
|
||||
since a static method can not also be virtual. */
|
||||
|
||||
extern debug_method_variant debug_make_static_method_variant
|
||||
(void *, const char *, debug_type, enum debug_visibility, bfd_boolean,
|
||||
bfd_boolean);
|
||||
|
||||
/* Name a type. This returns a new type with an attached name. */
|
||||
|
||||
extern debug_type debug_name_type (void *, const char *, debug_type);
|
||||
|
||||
/* Give a tag to a type, such as a struct or union. This returns a
|
||||
new type with an attached tag. */
|
||||
|
||||
extern debug_type debug_tag_type (void *, const char *, debug_type);
|
||||
|
||||
/* Record the size of a given type. */
|
||||
|
||||
extern bfd_boolean debug_record_type_size (void *, debug_type, unsigned int);
|
||||
|
||||
/* Find a named type. */
|
||||
|
||||
extern debug_type debug_find_named_type (void *, const char *);
|
||||
|
||||
/* Find a tagged type. */
|
||||
|
||||
extern debug_type debug_find_tagged_type
|
||||
(void *, const char *, enum debug_type_kind);
|
||||
|
||||
/* Get the kind of a type. */
|
||||
|
||||
extern enum debug_type_kind debug_get_type_kind (void *, debug_type);
|
||||
|
||||
/* Get the name of a type. */
|
||||
|
||||
extern const char *debug_get_type_name (void *, debug_type);
|
||||
|
||||
/* Get the size of a type. */
|
||||
|
||||
extern bfd_vma debug_get_type_size (void *, debug_type);
|
||||
|
||||
/* Get the return type of a function or method type. */
|
||||
|
||||
extern debug_type debug_get_return_type (void *, debug_type);
|
||||
|
||||
/* Get the NULL terminated array of parameter types for a function or
|
||||
method type (actually, parameter types are not currently stored for
|
||||
function types). This may be used to determine whether a method
|
||||
type is a stub method or not. The last argument points to a
|
||||
bfd_boolean which is set to TRUE if the function takes a variable
|
||||
number of arguments. */
|
||||
|
||||
extern const debug_type *debug_get_parameter_types
|
||||
(void *, debug_type, bfd_boolean *);
|
||||
|
||||
/* Get the target type of a pointer or reference or const or volatile
|
||||
type. */
|
||||
|
||||
extern debug_type debug_get_target_type (void *, debug_type);
|
||||
|
||||
/* Get the NULL terminated array of fields for a struct, union, or
|
||||
class. */
|
||||
|
||||
extern const debug_field *debug_get_fields (void *, debug_type);
|
||||
|
||||
/* Get the type of a field. */
|
||||
|
||||
extern debug_type debug_get_field_type (void *, debug_field);
|
||||
|
||||
/* Get the name of a field. */
|
||||
|
||||
extern const char *debug_get_field_name (void *, debug_field);
|
||||
|
||||
/* Get the bit position of a field within the containing structure.
|
||||
If the field is a static member, this will return (bfd_vma) -1. */
|
||||
|
||||
extern bfd_vma debug_get_field_bitpos (void *, debug_field);
|
||||
|
||||
/* Get the bit size of a field. If the field is a static member, this
|
||||
will return (bfd_vma) -1. */
|
||||
|
||||
extern bfd_vma debug_get_field_bitsize (void *, debug_field);
|
||||
|
||||
/* Get the visibility of a field. */
|
||||
|
||||
extern enum debug_visibility debug_get_field_visibility (void *, debug_field);
|
||||
|
||||
/* Get the physical name of a field, if it is a static member. If the
|
||||
field is not a static member, this will return NULL. */
|
||||
|
||||
extern const char *debug_get_field_physname (void *, debug_field);
|
||||
|
||||
/* Write out the recorded debugging information. This takes a set of
|
||||
function pointers which are called to do the actual writing. The
|
||||
first void * is the debugging handle. The second void * is a handle
|
||||
which is passed to the functions. */
|
||||
|
||||
extern bfd_boolean debug_write
|
||||
(void *, const struct debug_write_fns *, void *);
|
||||
|
||||
#endif /* DEBUG_H */
|
||||
@@ -1,98 +0,0 @@
|
||||
%{/* deflex.l - Lexer for .def files */
|
||||
|
||||
/* Copyright 1995, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Contributed by Steve Chamberlain: sac@cygnus.com */
|
||||
|
||||
#define DONTDECLARE_MALLOC
|
||||
#include "libiberty.h"
|
||||
#include "defparse.h"
|
||||
#include "dlltool.h"
|
||||
|
||||
#define YY_NO_UNPUT
|
||||
|
||||
int linenumber;
|
||||
|
||||
%}
|
||||
%%
|
||||
"NAME" { return NAME;}
|
||||
"LIBRARY" { return LIBRARY;}
|
||||
"DESCRIPTION" { return DESCRIPTION;}
|
||||
"STACKSIZE" { return STACKSIZE;}
|
||||
"HEAPSIZE" { return HEAPSIZE;}
|
||||
"CODE" { return CODE;}
|
||||
"DATA" { return DATA;}
|
||||
"SECTIONS" { return SECTIONS;}
|
||||
"EXPORTS" { return EXPORTS;}
|
||||
"IMPORTS" { return IMPORTS;}
|
||||
"VERSION" { return VERSIONK;}
|
||||
"BASE" { return BASE;}
|
||||
"CONSTANT" { return CONSTANT; }
|
||||
"NONAME" { return NONAME; }
|
||||
"PRIVATE" { return PRIVATE; }
|
||||
"READ" { return READ;}
|
||||
"WRITE" { return WRITE;}
|
||||
"EXECUTE" { return EXECUTE;}
|
||||
"SHARED" { return SHARED;}
|
||||
"NONSHARED" { return NONSHARED;}
|
||||
"SINGLE" { return SINGLE;}
|
||||
"MULTIPLE" { return MULTIPLE;}
|
||||
"INITINSTANCE" { return INITINSTANCE;}
|
||||
"INITGLOBAL" { return INITGLOBAL;}
|
||||
"TERMINSTANCE" { return TERMINSTANCE;}
|
||||
"TERMGLOBAL" { return TERMGLOBAL;}
|
||||
|
||||
[0-9][x0-9A-Fa-f]* { yylval.number = strtol (yytext,0,0);
|
||||
return NUMBER; }
|
||||
|
||||
(@)?[A-Za-z$:\-\_?][A-Za-z0-9/$:\<\>\-\_@?]* {
|
||||
yylval.id = xstrdup (yytext);
|
||||
return ID;
|
||||
}
|
||||
|
||||
"\""[^\"]*"\"" {
|
||||
yylval.id = xstrdup (yytext+1);
|
||||
yylval.id[yyleng-2] = 0;
|
||||
return ID;
|
||||
}
|
||||
|
||||
"\'"[^\']*"\'" {
|
||||
yylval.id = xstrdup (yytext+1);
|
||||
yylval.id[yyleng-2] = 0;
|
||||
return ID;
|
||||
}
|
||||
"*".* { }
|
||||
";".* { }
|
||||
" " { }
|
||||
"\t" { }
|
||||
"\r" { }
|
||||
"\n" { linenumber ++ ;}
|
||||
"==" { return EQUAL;}
|
||||
"=" { return '=';}
|
||||
"." { return '.';}
|
||||
"@" { return '@';}
|
||||
"," { return ',';}
|
||||
%%
|
||||
#ifndef yywrap
|
||||
/* Needed for lex, though not flex. */
|
||||
int yywrap(void) { return 1; }
|
||||
#endif
|
||||
@@ -1,245 +0,0 @@
|
||||
%{ /* defparse.y - parser for .def files */
|
||||
|
||||
/* Copyright 1995, 1997, 1998, 1999, 2001, 2004, 2005, 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "libiberty.h"
|
||||
#include "dlltool.h"
|
||||
%}
|
||||
|
||||
%union {
|
||||
char *id;
|
||||
const char *id_const;
|
||||
int number;
|
||||
};
|
||||
|
||||
%token NAME LIBRARY DESCRIPTION STACKSIZE HEAPSIZE CODE DATA
|
||||
%token SECTIONS EXPORTS IMPORTS VERSIONK BASE CONSTANT
|
||||
%token READ WRITE EXECUTE SHARED NONSHARED NONAME PRIVATE
|
||||
%token SINGLE MULTIPLE INITINSTANCE INITGLOBAL TERMINSTANCE TERMGLOBAL
|
||||
%token EQUAL
|
||||
%token <id> ID
|
||||
%token <number> NUMBER
|
||||
%type <number> opt_base opt_ordinal opt_NONAME opt_CONSTANT opt_DATA opt_PRIVATE
|
||||
%type <number> attr attr_list opt_number
|
||||
%type <id> opt_name opt_name2 opt_equal_name opt_import_name
|
||||
%type <id_const> keyword_as_name
|
||||
|
||||
%%
|
||||
|
||||
start: start command
|
||||
| command
|
||||
;
|
||||
|
||||
command:
|
||||
NAME opt_name opt_base { def_name ($2, $3); }
|
||||
| LIBRARY opt_name opt_base option_list { def_library ($2, $3); }
|
||||
| EXPORTS explist
|
||||
| DESCRIPTION ID { def_description ($2);}
|
||||
| STACKSIZE NUMBER opt_number { def_stacksize ($2, $3);}
|
||||
| HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}
|
||||
| CODE attr_list { def_code ($2);}
|
||||
| DATA attr_list { def_data ($2);}
|
||||
| SECTIONS seclist
|
||||
| IMPORTS implist
|
||||
| VERSIONK NUMBER { def_version ($2,0);}
|
||||
| VERSIONK NUMBER '.' NUMBER { def_version ($2,$4);}
|
||||
;
|
||||
|
||||
|
||||
explist:
|
||||
/* EMPTY */
|
||||
| explist expline
|
||||
;
|
||||
|
||||
expline:
|
||||
ID opt_equal_name opt_ordinal opt_NONAME opt_CONSTANT opt_DATA opt_PRIVATE
|
||||
opt_import_name
|
||||
{ def_exports ($1, $2, $3, $4, $5, $6, $7, $8);}
|
||||
;
|
||||
implist:
|
||||
implist impline
|
||||
| impline
|
||||
;
|
||||
|
||||
impline:
|
||||
ID '=' ID '.' ID '.' ID opt_import_name
|
||||
{ def_import ($1,$3,$5,$7, 0, $8); }
|
||||
| ID '=' ID '.' ID '.' NUMBER opt_import_name
|
||||
{ def_import ($1,$3,$5, 0,$7, $8); }
|
||||
| ID '=' ID '.' ID opt_import_name
|
||||
{ def_import ($1,$3, 0,$5, 0, $6); }
|
||||
| ID '=' ID '.' NUMBER opt_import_name
|
||||
{ def_import ($1,$3, 0, 0,$5, $6); }
|
||||
| ID '.' ID '.' ID opt_import_name
|
||||
{ def_import ( 0,$1,$3,$5, 0, $6); }
|
||||
| ID '.' ID '.' NUMBER opt_import_name
|
||||
{ def_import ( 0,$1,$3, 0,$5, $6); }
|
||||
| ID '.' ID opt_import_name
|
||||
{ def_import ( 0,$1, 0,$3, 0, $4); }
|
||||
| ID '.' NUMBER opt_import_name
|
||||
{ def_import ( 0,$1, 0, 0,$3, $4); }
|
||||
;
|
||||
|
||||
seclist:
|
||||
seclist secline
|
||||
| secline
|
||||
;
|
||||
|
||||
secline:
|
||||
ID attr_list { def_section ($1,$2);}
|
||||
;
|
||||
|
||||
attr_list:
|
||||
attr_list opt_comma attr
|
||||
| attr
|
||||
;
|
||||
|
||||
opt_comma:
|
||||
','
|
||||
|
|
||||
;
|
||||
opt_number: ',' NUMBER { $$=$2;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
attr:
|
||||
READ { $$ = 1; }
|
||||
| WRITE { $$ = 2; }
|
||||
| EXECUTE { $$ = 4; }
|
||||
| SHARED { $$ = 8; }
|
||||
| NONSHARED { $$ = 0; }
|
||||
| SINGLE { $$ = 0; }
|
||||
| MULTIPLE { $$ = 0; }
|
||||
;
|
||||
|
||||
opt_CONSTANT:
|
||||
CONSTANT {$$=1;}
|
||||
| {$$=0;}
|
||||
;
|
||||
|
||||
opt_NONAME:
|
||||
NONAME {$$=1;}
|
||||
| {$$=0;}
|
||||
;
|
||||
|
||||
opt_DATA:
|
||||
DATA { $$ = 1; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
opt_PRIVATE:
|
||||
PRIVATE { $$ = 1; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
keyword_as_name: NAME { $$ = "NAME"; }
|
||||
/* Disabled LIBRARY keyword for a quirk in libtool. It places LIBRARY
|
||||
command after EXPORTS list, which is illegal by specification.
|
||||
See PR binutils/13710
|
||||
| LIBRARY { $$ = "LIBRARY"; } */
|
||||
| DESCRIPTION { $$ = "DESCRIPTION"; }
|
||||
| STACKSIZE { $$ = "STACKSIZE"; }
|
||||
| HEAPSIZE { $$ = "HEAPSIZE"; }
|
||||
| CODE { $$ = "CODE"; }
|
||||
| DATA { $$ = "DATA"; }
|
||||
| SECTIONS { $$ = "SECTIONS"; }
|
||||
| EXPORTS { $$ = "EXPORTS"; }
|
||||
| IMPORTS { $$ = "IMPORTS"; }
|
||||
| VERSIONK { $$ = "VERSION"; }
|
||||
| BASE { $$ = "BASE"; }
|
||||
| CONSTANT { $$ = "CONSTANT"; }
|
||||
| NONAME { $$ = "NONAME"; }
|
||||
| PRIVATE { $$ = "PRIVATE"; }
|
||||
| READ { $$ = "READ"; }
|
||||
| WRITE { $$ = "WRITE"; }
|
||||
| EXECUTE { $$ = "EXECUTE"; }
|
||||
| SHARED { $$ = "SHARED"; }
|
||||
| NONSHARED { $$ = "NONSHARED"; }
|
||||
| SINGLE { $$ = "SINGLE"; }
|
||||
| MULTIPLE { $$ = "MULTIPLE"; }
|
||||
| INITINSTANCE { $$ = "INITINSTANCE"; }
|
||||
| INITGLOBAL { $$ = "INITGLOBAL"; }
|
||||
| TERMINSTANCE { $$ = "TERMINSTANCE"; }
|
||||
| TERMGLOBAL { $$ = "TERMGLOBAL"; }
|
||||
;
|
||||
|
||||
opt_name2: ID { $$ = $1; }
|
||||
| '.' keyword_as_name
|
||||
{
|
||||
char *name = xmalloc (strlen ($2) + 2);
|
||||
sprintf (name, ".%s", $2);
|
||||
$$ = name;
|
||||
}
|
||||
| '.' opt_name2
|
||||
{
|
||||
char *name = xmalloc (strlen ($2) + 2);
|
||||
sprintf (name, ".%s", $2);
|
||||
$$ = name;
|
||||
}
|
||||
| keyword_as_name '.' opt_name2
|
||||
{
|
||||
char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
|
||||
sprintf (name, "%s.%s", $1, $3);
|
||||
$$ = name;
|
||||
}
|
||||
| ID '.' opt_name2
|
||||
{
|
||||
char *name = xmalloc (strlen ($1) + 1 + strlen ($3) + 1);
|
||||
sprintf (name, "%s.%s", $1, $3);
|
||||
$$ = name;
|
||||
}
|
||||
;
|
||||
opt_name: opt_name2 { $$ =$1; }
|
||||
| { $$=""; }
|
||||
;
|
||||
|
||||
opt_ordinal:
|
||||
'@' NUMBER { $$=$2;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
opt_import_name:
|
||||
EQUAL opt_name2 { $$ = $2; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
opt_equal_name:
|
||||
'=' opt_name2 { $$ = $2; }
|
||||
| { $$ = 0; }
|
||||
;
|
||||
|
||||
opt_base: BASE '=' NUMBER { $$= $3;}
|
||||
| { $$=-1;}
|
||||
;
|
||||
|
||||
option_list:
|
||||
/* empty */
|
||||
| option_list opt_comma option
|
||||
;
|
||||
|
||||
option:
|
||||
INITINSTANCE
|
||||
| INITGLOBAL
|
||||
| TERMINSTANCE
|
||||
| TERMGLOBAL
|
||||
;
|
||||
@@ -1,20 +0,0 @@
|
||||
:loop
|
||||
/\\$/N
|
||||
s/\\\n */ /g
|
||||
t loop
|
||||
|
||||
s! \./! !g
|
||||
s!@INCDIR@!$(INCDIR)!g
|
||||
s!@TOPDIR@/include!$(INCDIR)!g
|
||||
s!@BFDDIR@!$(BFDDIR)!g
|
||||
s!@TOPDIR@/bfd!$(BFDDIR)!g
|
||||
s!@SRCDIR@/!!g
|
||||
s!@OBJDIR@/!!g
|
||||
s! \.\./intl/libintl\.h!!g
|
||||
|
||||
s/ *$//
|
||||
s/ */ /g
|
||||
s/^ */A/
|
||||
s/ / \\\
|
||||
B/g
|
||||
$s/$/ \\/
|
||||
4544
binutils/dlltool.c
4544
binutils/dlltool.c
File diff suppressed because it is too large
Load Diff
@@ -1,40 +0,0 @@
|
||||
/* dlltool.h -- header file for dlltool
|
||||
Copyright 1997, 1998, 2003, 2004, 2005, 2007, 2009, 2012
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
extern void def_code (int);
|
||||
extern void def_data (int);
|
||||
extern void def_description (const char *);
|
||||
extern void def_exports (const char *, const char *, int, int, int, int, int, const char *);
|
||||
extern void def_heapsize (int, int);
|
||||
extern void def_import
|
||||
(const char *, const char *, const char *, const char *, int, const char *);
|
||||
extern void def_library (const char *, int);
|
||||
extern void def_name (const char *, int);
|
||||
extern void def_section (const char *, int);
|
||||
extern void def_stacksize (int, int);
|
||||
extern void def_version (int, int);
|
||||
extern int yyparse (void);
|
||||
extern int yyerror (const char *);
|
||||
extern int yylex (void);
|
||||
|
||||
extern int yydebug;
|
||||
extern FILE *yyin;
|
||||
extern int linenumber;
|
||||
1252
binutils/dllwrap.c
1252
binutils/dllwrap.c
File diff suppressed because it is too large
Load Diff
@@ -1,184 +0,0 @@
|
||||
## Process this file with automake to generate Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
# What version of the manual you want; "all" includes everything
|
||||
CONFIG=all
|
||||
|
||||
# Options to extract the man page from as.texinfo
|
||||
MANCONF = -Dman
|
||||
|
||||
TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
|
||||
|
||||
POD2MAN = pod2man --center="GNU Development Tools" \
|
||||
--release="binutils-$(VERSION)" --section=1
|
||||
|
||||
# List of man pages generated from binutils.texi
|
||||
man_MANS = \
|
||||
addr2line.1 \
|
||||
ar.1 \
|
||||
dlltool.1 \
|
||||
nlmconv.1 \
|
||||
nm.1 \
|
||||
objcopy.1 \
|
||||
objdump.1 \
|
||||
ranlib.1 \
|
||||
readelf.1 \
|
||||
size.1 \
|
||||
strings.1 \
|
||||
strip.1 \
|
||||
elfedit.1 \
|
||||
windres.1 \
|
||||
windmc.1 \
|
||||
$(DEMANGLER_NAME).1
|
||||
|
||||
info_TEXINFOS = binutils.texi
|
||||
binutils_TEXI = $(srcdir)/binutils.texi
|
||||
|
||||
AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
||||
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
|
||||
TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
||||
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
|
||||
|
||||
# Man page generation from texinfo
|
||||
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
|
||||
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f addr2line.pod
|
||||
|
||||
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
|
||||
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f ar.pod
|
||||
|
||||
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
|
||||
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f dlltool.pod
|
||||
|
||||
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
|
||||
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f nlmconv.pod
|
||||
|
||||
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
|
||||
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f nm.pod
|
||||
|
||||
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
|
||||
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f objcopy.pod
|
||||
|
||||
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
|
||||
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f objdump.pod
|
||||
|
||||
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
|
||||
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f ranlib.pod
|
||||
|
||||
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
|
||||
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f readelf.pod
|
||||
|
||||
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
|
||||
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f size.pod
|
||||
|
||||
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
|
||||
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f strings.pod
|
||||
|
||||
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
|
||||
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f strip.pod
|
||||
|
||||
elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
|
||||
-($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f elfedit.pod
|
||||
|
||||
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
|
||||
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f windres.pod
|
||||
|
||||
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
|
||||
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f windmc.pod
|
||||
|
||||
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
|
||||
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f $(DEMANGLER_NAME).pod
|
||||
|
||||
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
|
||||
|
||||
$(DEMANGLER_NAME).1: cxxfilt.man Makefile
|
||||
if test -f cxxfilt.man; then \
|
||||
man=cxxfilt.man; \
|
||||
else \
|
||||
man=$(srcdir)/cxxfilt.man; \
|
||||
fi; \
|
||||
sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
|
||||
-e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
|
||||
> $(DEMANGLER_NAME).1
|
||||
|
||||
# We want install to imply install-info as per GNU standards, despite the
|
||||
# cygnus option.
|
||||
install-data-local: install-info
|
||||
|
||||
MAINTAINERCLEANFILES = binutils.info
|
||||
|
||||
# Automake 1.9 will only build info files in the objdir if they are
|
||||
# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
|
||||
# though, so we use a bogus condition.
|
||||
if GENINSRC_NEVER
|
||||
DISTCLEANFILES = binutils.info
|
||||
endif
|
||||
|
||||
# Maintenance
|
||||
|
||||
# We need it for the taz target in ../../Makefile.in.
|
||||
info-local: $(MANS)
|
||||
@@ -1,870 +0,0 @@
|
||||
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
subdir = doc
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
|
||||
$(top_srcdir)/../config/zlib.m4 \
|
||||
$(top_srcdir)/../bfd/warning.m4 \
|
||||
$(top_srcdir)/../config/depstand.m4 \
|
||||
$(top_srcdir)/../config/gettext-sister.m4 \
|
||||
$(top_srcdir)/../config/iconv.m4 \
|
||||
$(top_srcdir)/../config/largefile.m4 \
|
||||
$(top_srcdir)/../config/lcmessage.m4 \
|
||||
$(top_srcdir)/../config/lead-dot.m4 \
|
||||
$(top_srcdir)/../config/lib-ld.m4 \
|
||||
$(top_srcdir)/../config/lib-link.m4 \
|
||||
$(top_srcdir)/../config/lib-prefix.m4 \
|
||||
$(top_srcdir)/../config/nls.m4 \
|
||||
$(top_srcdir)/../config/override.m4 \
|
||||
$(top_srcdir)/../config/plugins.m4 \
|
||||
$(top_srcdir)/../config/po.m4 \
|
||||
$(top_srcdir)/../config/progtest.m4 \
|
||||
$(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
|
||||
$(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
|
||||
$(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
SOURCES =
|
||||
INFO_DEPS = binutils.info
|
||||
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
|
||||
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
|
||||
DVIS = binutils.dvi
|
||||
PDFS = binutils.pdf
|
||||
PSS = binutils.ps
|
||||
HTMLS = binutils.html
|
||||
TEXINFOS = binutils.texi
|
||||
TEXI2PDF = $(TEXI2DVI) --pdf --batch
|
||||
MAKEINFOHTML = $(MAKEINFO) --html
|
||||
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
|
||||
DVIPS = dvips
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_DLLTOOL = @BUILD_DLLTOOL@
|
||||
BUILD_DLLWRAP = @BUILD_DLLWRAP@
|
||||
BUILD_INSTALL_MISC = @BUILD_INSTALL_MISC@
|
||||
BUILD_MISC = @BUILD_MISC@
|
||||
BUILD_NLMCONV = @BUILD_NLMCONV@
|
||||
BUILD_SRCONV = @BUILD_SRCONV@
|
||||
BUILD_WINDMC = @BUILD_WINDMC@
|
||||
BUILD_WINDRES = @BUILD_WINDRES@
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DATADIRNAME = @DATADIRNAME@
|
||||
DEFS = @DEFS@
|
||||
DEMANGLER_NAME = @DEMANGLER_NAME@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL_DEFS = @DLLTOOL_DEFS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EMULATION = @EMULATION@
|
||||
EMULATION_VECTOR = @EMULATION_VECTOR@
|
||||
EXEEXT = @EXEEXT@
|
||||
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
|
||||
FGREP = @FGREP@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = @GMSGFMT@
|
||||
GREP = @GREP@
|
||||
HDEFINES = @HDEFINES@
|
||||
INCINTL = @INCINTL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LEX = @LEX@
|
||||
LEXLIB = @LEXLIB@
|
||||
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||
LIBICONV = @LIBICONV@
|
||||
LIBINTL = @LIBINTL@
|
||||
LIBINTL_DEP = @LIBINTL_DEP@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBICONV = @LTLIBICONV@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
MSGMERGE = @MSGMERGE@
|
||||
NLMCONV_DEFS = @NLMCONV_DEFS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NO_WERROR = @NO_WERROR@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJDUMP_DEFS = @OBJDUMP_DEFS@
|
||||
OBJDUMP_PRIVATE_OFILES = @OBJDUMP_PRIVATE_OFILES@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
POSUB = @POSUB@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_NLS = @USE_NLS@
|
||||
VERSION = @VERSION@
|
||||
WARN_CFLAGS = @WARN_CFLAGS@
|
||||
XGETTEXT = @XGETTEXT@
|
||||
YACC = @YACC@
|
||||
YFLAGS = @YFLAGS@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = cygnus
|
||||
|
||||
# What version of the manual you want; "all" includes everything
|
||||
CONFIG = all
|
||||
|
||||
# Options to extract the man page from as.texinfo
|
||||
MANCONF = -Dman
|
||||
TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
|
||||
POD2MAN = pod2man --center="GNU Development Tools" \
|
||||
--release="binutils-$(VERSION)" --section=1
|
||||
|
||||
|
||||
# List of man pages generated from binutils.texi
|
||||
man_MANS = \
|
||||
addr2line.1 \
|
||||
ar.1 \
|
||||
dlltool.1 \
|
||||
nlmconv.1 \
|
||||
nm.1 \
|
||||
objcopy.1 \
|
||||
objdump.1 \
|
||||
ranlib.1 \
|
||||
readelf.1 \
|
||||
size.1 \
|
||||
strings.1 \
|
||||
strip.1 \
|
||||
elfedit.1 \
|
||||
windres.1 \
|
||||
windmc.1 \
|
||||
$(DEMANGLER_NAME).1
|
||||
|
||||
info_TEXINFOS = binutils.texi
|
||||
binutils_TEXI = $(srcdir)/binutils.texi
|
||||
AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
||||
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
|
||||
|
||||
TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
|
||||
-I "$(top_srcdir)/../bfd/doc" -I ../../bfd/doc
|
||||
|
||||
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
|
||||
MAINTAINERCLEANFILES = binutils.info
|
||||
|
||||
# Automake 1.9 will only build info files in the objdir if they are
|
||||
# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
|
||||
# though, so we use a bogus condition.
|
||||
@GENINSRC_NEVER_TRUE@DISTCLEANFILES = binutils.info
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .dvi .ps
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign doc/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
binutils.info: binutils.texi
|
||||
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
|
||||
rm -rf $$backupdir && mkdir $$backupdir && \
|
||||
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
|
||||
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
|
||||
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
|
||||
done; \
|
||||
else :; fi && \
|
||||
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi; \
|
||||
then \
|
||||
rc=0; \
|
||||
else \
|
||||
rc=$$?; \
|
||||
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
|
||||
fi; \
|
||||
rm -rf $$backupdir; exit $$rc
|
||||
|
||||
binutils.dvi: binutils.texi
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2DVI) -o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi
|
||||
|
||||
binutils.pdf: binutils.texi
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
|
||||
$(TEXI2PDF) -o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi
|
||||
|
||||
binutils.html: binutils.texi
|
||||
rm -rf $(@:.html=.htp)
|
||||
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
|
||||
-o $(@:.html=.htp) `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi; \
|
||||
then \
|
||||
rm -rf $@; \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
|
||||
else \
|
||||
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
|
||||
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
|
||||
exit 1; \
|
||||
fi
|
||||
.dvi.ps:
|
||||
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
|
||||
$(DVIPS) -o $@ $<
|
||||
|
||||
uninstall-dvi-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-html-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-info-am:
|
||||
@$(PRE_UNINSTALL)
|
||||
@if test -d '$(DESTDIR)$(infodir)' && \
|
||||
(install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
|
||||
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
|
||||
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
|
||||
done; \
|
||||
else :; fi
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(INFO_DEPS)'; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
|
||||
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
|
||||
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
|
||||
else :; fi); \
|
||||
done
|
||||
|
||||
uninstall-pdf-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-ps-am:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(psdir)/$$f"; \
|
||||
done
|
||||
|
||||
dist-info: $(INFO_DEPS)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; \
|
||||
for base in $$list; do \
|
||||
case $$base in \
|
||||
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$base; then d=.; else d=$(srcdir); fi; \
|
||||
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
|
||||
if test -f $$file; then \
|
||||
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
|
||||
test -f "$(distdir)/$$relfile" || \
|
||||
cp -p $$file "$(distdir)/$$relfile"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
done
|
||||
|
||||
mostlyclean-aminfo:
|
||||
-rm -rf binutils.aux binutils.cp binutils.cps binutils.fn binutils.fns \
|
||||
binutils.ky binutils.log binutils.pg binutils.pgs \
|
||||
binutils.tmp binutils.toc binutils.tp binutils.tps \
|
||||
binutils.vr binutils.vrs
|
||||
|
||||
clean-aminfo:
|
||||
-test -z "binutils.dvi binutils.pdf binutils.ps binutils.html" \
|
||||
|| rm -rf binutils.dvi binutils.pdf binutils.ps binutils.html
|
||||
|
||||
maintainer-clean-aminfo:
|
||||
@list='$(INFO_DEPS)'; for i in $$list; do \
|
||||
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
|
||||
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
|
||||
done
|
||||
|
||||
clean-info: mostlyclean-aminfo clean-aminfo
|
||||
install-man1: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
check-am:
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am: $(DVIS)
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am: $(HTMLS)
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am: $(INFO_DEPS) info-local
|
||||
|
||||
install-data-am: install-data-local install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am: $(DVIS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
|
||||
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
|
||||
done
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am: $(HTMLS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
|
||||
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
$(am__strip_dir) \
|
||||
if test -d "$$d$$p"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
|
||||
echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
|
||||
$(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
|
||||
else \
|
||||
list2="$$list2 $$d$$p"; \
|
||||
fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
|
||||
done; }
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am: $(INFO_DEPS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
esac; \
|
||||
if test -f $$file; then d=.; else d=$(srcdir); fi; \
|
||||
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
|
||||
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
|
||||
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
|
||||
if test -f $$ifile; then \
|
||||
echo "$$ifile"; \
|
||||
else : ; fi; \
|
||||
done; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
|
||||
@$(POST_INSTALL)
|
||||
@if (install-info --version && \
|
||||
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
|
||||
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
|
||||
for file in $$list; do \
|
||||
relfile=`echo "$$file" | sed 's|^.*/||'`; \
|
||||
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
|
||||
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
|
||||
done; \
|
||||
else : ; fi
|
||||
install-man: install-man1
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am: $(PDFS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
|
||||
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am: $(PSS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
|
||||
@list='$(PSS)'; test -n "$(psdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-aminfo \
|
||||
maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am: $(PDFS)
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am: $(PSS)
|
||||
|
||||
uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
|
||||
uninstall-man uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
uninstall-man: uninstall-man1
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-aminfo clean-generic \
|
||||
clean-info clean-libtool dist-info distclean distclean-generic \
|
||||
distclean-libtool dvi dvi-am html html-am info info-am \
|
||||
info-local install install-am install-data install-data-am \
|
||||
install-data-local install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-man1 install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-aminfo maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-dvi-am \
|
||||
uninstall-html-am uninstall-info-am uninstall-man \
|
||||
uninstall-man1 uninstall-pdf-am uninstall-ps-am
|
||||
|
||||
|
||||
# Man page generation from texinfo
|
||||
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Daddr2line < $(binutils_TEXI) > addr2line.pod
|
||||
-($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f addr2line.pod
|
||||
|
||||
ar.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dar < $(binutils_TEXI) > ar.pod
|
||||
-($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f ar.pod
|
||||
|
||||
dlltool.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Ddlltool < $(binutils_TEXI) > dlltool.pod
|
||||
-($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f dlltool.pod
|
||||
|
||||
nlmconv.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnlmconv < $(binutils_TEXI) > nlmconv.pod
|
||||
-($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f nlmconv.pod
|
||||
|
||||
nm.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dnm < $(binutils_TEXI) > nm.pod
|
||||
-($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f nm.pod
|
||||
|
||||
objcopy.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjcopy < $(binutils_TEXI) > objcopy.pod
|
||||
-($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f objcopy.pod
|
||||
|
||||
objdump.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dobjdump < $(binutils_TEXI) > objdump.pod
|
||||
-($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f objdump.pod
|
||||
|
||||
ranlib.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dranlib < $(binutils_TEXI) > ranlib.pod
|
||||
-($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f ranlib.pod
|
||||
|
||||
readelf.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dreadelf < $(binutils_TEXI) > readelf.pod
|
||||
-($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f readelf.pod
|
||||
|
||||
size.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dsize < $(binutils_TEXI) > size.pod
|
||||
-($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f size.pod
|
||||
|
||||
strings.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrings < $(binutils_TEXI) > strings.pod
|
||||
-($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f strings.pod
|
||||
|
||||
strip.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dstrip < $(binutils_TEXI) > strip.pod
|
||||
-($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f strip.pod
|
||||
|
||||
elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod
|
||||
-($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f elfedit.pod
|
||||
|
||||
windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod
|
||||
-($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f windres.pod
|
||||
|
||||
windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
|
||||
-($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f windmc.pod
|
||||
|
||||
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
|
||||
touch $@
|
||||
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
|
||||
-($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
|
||||
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
|
||||
rm -f $(DEMANGLER_NAME).pod
|
||||
|
||||
$(DEMANGLER_NAME).1: cxxfilt.man Makefile
|
||||
if test -f cxxfilt.man; then \
|
||||
man=cxxfilt.man; \
|
||||
else \
|
||||
man=$(srcdir)/cxxfilt.man; \
|
||||
fi; \
|
||||
sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
|
||||
-e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
|
||||
> $(DEMANGLER_NAME).1
|
||||
|
||||
# We want install to imply install-info as per GNU standards, despite the
|
||||
# cygnus option.
|
||||
install-data-local: install-info
|
||||
|
||||
# Maintenance
|
||||
|
||||
# We need it for the taz target in ../../Makefile.in.
|
||||
info-local: $(MANS)
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,506 +0,0 @@
|
||||
@c The GNU Free Documentation License.
|
||||
@center Version 1.3, 3 November 2008
|
||||
|
||||
@c This file is intended to be included within another document,
|
||||
@c hence no sectioning command or @node.
|
||||
|
||||
@display
|
||||
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
||||
@uref{http://fsf.org/}
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
@end display
|
||||
|
||||
@enumerate 0
|
||||
@item
|
||||
PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document @dfn{free} in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of ``copyleft'', which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
@item
|
||||
APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The ``Document'', below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as ``you''. You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A ``Modified Version'' of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A ``Secondary Section'' is a named appendix or a front-matter section
|
||||
of the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall
|
||||
subject (or to related matters) and contains nothing that could fall
|
||||
directly within that overall subject. (Thus, if the Document is in
|
||||
part a textbook of mathematics, a Secondary Section may not explain
|
||||
any mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The ``Cover Texts'' are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A ``Transparent'' copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
@sc{ascii} without markup, Texinfo input format, La@TeX{} input
|
||||
format, @acronym{SGML} or @acronym{XML} using a publicly available
|
||||
@acronym{DTD}, and standard-conforming simple @acronym{HTML},
|
||||
PostScript or @acronym{PDF} designed for human modification. Examples
|
||||
of transparent image formats include @acronym{PNG}, @acronym{XCF} and
|
||||
@acronym{JPG}. Opaque formats include proprietary formats that can be
|
||||
read and edited only by proprietary word processors, @acronym{SGML} or
|
||||
@acronym{XML} for which the @acronym{DTD} and/or processing tools are
|
||||
not generally available, and the machine-generated @acronym{HTML},
|
||||
PostScript or @acronym{PDF} produced by some word processors for
|
||||
output purposes only.
|
||||
|
||||
The ``Title Page'' means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, ``Title Page'' means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
The ``publisher'' means any person or entity that distributes copies
|
||||
of the Document to the public.
|
||||
|
||||
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as ``Acknowledgements'',
|
||||
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section ``Entitled XYZ'' according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
@item
|
||||
VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
@item
|
||||
COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
@item
|
||||
MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
@enumerate A
|
||||
@item
|
||||
Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
|
||||
@item
|
||||
List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
|
||||
@item
|
||||
State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
|
||||
@item
|
||||
Preserve all the copyright notices of the Document.
|
||||
|
||||
@item
|
||||
Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
|
||||
@item
|
||||
Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
|
||||
@item
|
||||
Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
|
||||
@item
|
||||
Include an unaltered copy of this License.
|
||||
|
||||
@item
|
||||
Preserve the section Entitled ``History'', Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled ``History'' in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
|
||||
@item
|
||||
Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the ``History'' section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
|
||||
@item
|
||||
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
||||
the Title of the section, and preserve in the section all the
|
||||
substance and tone of each of the contributor acknowledgements and/or
|
||||
dedications given therein.
|
||||
|
||||
@item
|
||||
Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
|
||||
@item
|
||||
Delete any section Entitled ``Endorsements''. Such a section
|
||||
may not be included in the Modified Version.
|
||||
|
||||
@item
|
||||
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
||||
to conflict in title with any Invariant Section.
|
||||
|
||||
@item
|
||||
Preserve any Warranty Disclaimers.
|
||||
@end enumerate
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled ``Endorsements'', provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties---for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
@item
|
||||
COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled ``History''
|
||||
in the various original documents, forming one section Entitled
|
||||
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
||||
and any sections Entitled ``Dedications''. You must delete all
|
||||
sections Entitled ``Endorsements.''
|
||||
|
||||
@item
|
||||
COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
@item
|
||||
AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an ``aggregate'' if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
@item
|
||||
TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled ``Acknowledgements'',
|
||||
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
@item
|
||||
TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense, or distribute it is void, and
|
||||
will automatically terminate your rights under this License.
|
||||
|
||||
However, if you cease all violation of this License, then your license
|
||||
from a particular copyright holder is reinstated (a) provisionally,
|
||||
unless and until the copyright holder explicitly and finally
|
||||
terminates your license, and (b) permanently, if the copyright holder
|
||||
fails to notify you of the violation by some reasonable means prior to
|
||||
60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, receipt of a copy of some or all of the same material does
|
||||
not give you any rights to use it.
|
||||
|
||||
@item
|
||||
FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
@uref{http://www.gnu.org/copyleft/}.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License ``or any later version'' applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation. If the Document
|
||||
specifies that a proxy can decide which future versions of this
|
||||
License can be used, that proxy's public statement of acceptance of a
|
||||
version permanently authorizes you to choose that version for the
|
||||
Document.
|
||||
|
||||
@item
|
||||
RELICENSING
|
||||
|
||||
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
||||
World Wide Web server that publishes copyrightable works and also
|
||||
provides prominent facilities for anybody to edit those works. A
|
||||
public wiki that anybody can edit is an example of such a server. A
|
||||
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
||||
site means any set of copyrightable works thus published on the MMC
|
||||
site.
|
||||
|
||||
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
||||
license published by Creative Commons Corporation, a not-for-profit
|
||||
corporation with a principal place of business in San Francisco,
|
||||
California, as well as future copyleft versions of that license
|
||||
published by that same organization.
|
||||
|
||||
``Incorporate'' means to publish or republish a Document, in whole or
|
||||
in part, as part of another Document.
|
||||
|
||||
An MMC is ``eligible for relicensing'' if it is licensed under this
|
||||
License, and if all works that were first published under this License
|
||||
somewhere other than this MMC, and subsequently incorporated in whole
|
||||
or in part into the MMC, (1) had no cover texts or invariant sections,
|
||||
and (2) were thus incorporated prior to November 1, 2008.
|
||||
|
||||
The operator of an MMC Site may republish an MMC contained in the site
|
||||
under CC-BY-SA on the same site at any time before August 1, 2009,
|
||||
provided the MMC is eligible for relicensing.
|
||||
|
||||
@end enumerate
|
||||
|
||||
@page
|
||||
@heading ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
Copyright (C) @var{year} @var{your name}.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
||||
Texts. A copy of the license is included in the section entitled ``GNU
|
||||
Free Documentation License''.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the ``with@dots{}Texts.'' line with this:
|
||||
|
||||
@smallexample
|
||||
@group
|
||||
with the Invariant Sections being @var{list their titles}, with
|
||||
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
||||
being @var{list}.
|
||||
@end group
|
||||
@end smallexample
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
|
||||
@c Local Variables:
|
||||
@c ispell-local-pdict: "ispell-dict"
|
||||
@c End:
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
;;; dwarf-mode.el --- Browser for DWARF information.
|
||||
|
||||
;; Version: 1.1
|
||||
|
||||
;; This file is not part of GNU Emacs, but is distributed under the
|
||||
;; same terms:
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defvar dwarf-objdump-program "objdump")
|
||||
|
||||
(defconst dwarf-font-lock-keywords
|
||||
'(
|
||||
;; Name and linkage name.
|
||||
("DW_AT_[a-z_]*name\\s *: .*:\\(.*\\)\\s *$"
|
||||
(1 font-lock-function-name-face))
|
||||
|
||||
("Compilation Unit @ offset 0x[0-9a-f]+"
|
||||
(0 font-lock-string-face))
|
||||
))
|
||||
|
||||
(defvar dwarf-file nil
|
||||
"Buffer-local variable holding the file name passed to objdump.")
|
||||
|
||||
;; Expand a "..." to show all the child DIES. NEW-DEPTH controls how
|
||||
;; deep to display the new dies; `nil' means display all of them.
|
||||
(defun dwarf-do-insert-substructure (new-depth die)
|
||||
(let ((inhibit-read-only t))
|
||||
(beginning-of-line)
|
||||
(delete-region (point) (progn
|
||||
(end-of-line)
|
||||
(forward-char)
|
||||
(point)))
|
||||
(save-excursion
|
||||
(apply #'call-process dwarf-objdump-program nil (current-buffer) nil
|
||||
"-Wi" (concat "--dwarf-start=0x" die)
|
||||
(expand-file-name dwarf-file)
|
||||
(if new-depth (list (concat "--dwarf-depth="
|
||||
(int-to-string new-depth))))))
|
||||
(set-buffer-modified-p nil)))
|
||||
|
||||
(defun dwarf-insert-substructure-button (die)
|
||||
(beginning-of-line)
|
||||
(unless (looking-at "^ <\\([0-9]+\\)>")
|
||||
(error "Unrecognized line."))
|
||||
(let ((new-depth (1+ (string-to-number (match-string 1)))))
|
||||
(dwarf-do-insert-substructure new-depth die)))
|
||||
|
||||
(defun dwarf-insert-substructure (arg)
|
||||
"Expand a `...' to show children of the current DIE.
|
||||
By default, expands just one level of children.
|
||||
A prefix argument means expand all children."
|
||||
(interactive "P")
|
||||
(beginning-of-line)
|
||||
(unless (looking-at "^ <\\([0-9]+\\)><\\([0-9a-f]+\\)>")
|
||||
(error "Unrecognized line."))
|
||||
(let ((die (match-string 2)))
|
||||
(if arg
|
||||
(dwarf-do-insert-substructure nil die)
|
||||
(dwarf-insert-substructure-button die))))
|
||||
|
||||
;; Called when a button is pressed.
|
||||
;; Either follows a DIE reference, or expands a "...".
|
||||
(defun dwarf-die-button-action (button)
|
||||
(let* ((die (button-get button 'die))
|
||||
;; Note that the first number can only be decimal.
|
||||
(die-rx (concat "^\\s *\\(<[0-9]+>\\)?<"
|
||||
die ">[^<]"))
|
||||
(old (point))
|
||||
(is-ref (button-get button 'die-ref)))
|
||||
(if is-ref
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(if (re-search-forward die-rx nil 'move)
|
||||
(push-mark old)
|
||||
(goto-char old)
|
||||
(error "Could not find DIE <0x%s>" die)))
|
||||
(dwarf-insert-substructure-button die))))
|
||||
|
||||
;; Button definition.
|
||||
(define-button-type 'dwarf-die-button
|
||||
'follow-link t
|
||||
'action #'dwarf-die-button-action)
|
||||
|
||||
;; Helper regexp to match a DIE reference.
|
||||
(defconst dwarf-die-reference ": \\(<0x\\([0-9a-f]+\\)>\\)\\s *$")
|
||||
|
||||
;; Helper regexp to match a `...' indicating that there are hidden
|
||||
;; children.
|
||||
(defconst dwarf-die-more "^ <[0-9]+><\\([0-9a-z]+\\)>: \\([.][.][.]\\)")
|
||||
|
||||
;; jit-lock callback function to fontify a region. This applies the
|
||||
;; buttons, since AFAICT there is no good way to apply buttons via
|
||||
;; font-lock.
|
||||
(defun dwarf-fontify-region (start end)
|
||||
(save-excursion
|
||||
(let ((beg-line (progn (goto-char start) (line-beginning-position)))
|
||||
(end-line (progn (goto-char end) (line-end-position))))
|
||||
(goto-char beg-line)
|
||||
(while (re-search-forward dwarf-die-reference end-line 'move)
|
||||
(let ((b-start (match-beginning 1))
|
||||
(b-end (match-end 1))
|
||||
(hex (match-string-no-properties 2)))
|
||||
(make-text-button b-start b-end :type 'dwarf-die-button
|
||||
'die hex 'die-ref t)))
|
||||
;; This is a bogus approach. Why can't we make buttons from the
|
||||
;; font-lock defaults?
|
||||
(goto-char beg-line)
|
||||
(while (re-search-forward dwarf-die-more end-line 'move)
|
||||
(let ((hex (match-string-no-properties 1))
|
||||
(b-start (match-beginning 2))
|
||||
(b-end (match-end 2)))
|
||||
(make-text-button b-start b-end :type 'dwarf-die-button
|
||||
'die hex 'die-ref nil))))))
|
||||
|
||||
;; Run objdump and insert the contents into the buffer. The arguments
|
||||
;; are the way they are because this is also called as a
|
||||
;; revert-buffer-function.
|
||||
(defun dwarf-do-refresh (&rest ignore)
|
||||
(let ((inhibit-read-only t))
|
||||
(erase-buffer)
|
||||
(save-excursion
|
||||
(call-process dwarf-objdump-program
|
||||
nil (current-buffer) nil
|
||||
"-Wi" "--dwarf-depth=1"
|
||||
(expand-file-name dwarf-file)))
|
||||
(set-buffer-modified-p nil)))
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode dwarf-mode special-mode "DWARF"
|
||||
"Major mode for browsing DWARF output.
|
||||
|
||||
\\{dwarf-mode-map}"
|
||||
|
||||
(set (make-local-variable 'font-lock-defaults) '(dwarf-font-lock-keywords))
|
||||
;; FIXME: we could be smarter and check the file time.
|
||||
(set (make-local-variable 'revert-buffer-function) #'dwarf-do-refresh)
|
||||
(jit-lock-register #'dwarf-fontify-region))
|
||||
|
||||
(define-key dwarf-mode-map [(control ?m)] #'dwarf-insert-substructure)
|
||||
|
||||
;;;###autoload
|
||||
(defun dwarf-browse (file)
|
||||
"Invoke `objdump' and put output into a `dwarf-mode' buffer.
|
||||
This is the main interface to `dwarf-mode'."
|
||||
(interactive "fFile name: ")
|
||||
(let* ((base-name (file-name-nondirectory file))
|
||||
(buffer (generate-new-buffer (concat "*DWARF for " base-name "*"))))
|
||||
(pop-to-buffer buffer)
|
||||
(dwarf-mode)
|
||||
(set (make-local-variable 'dwarf-file) file)
|
||||
(dwarf-do-refresh)))
|
||||
|
||||
(provide 'dwarf-mode)
|
||||
|
||||
;;; dwarf-mode.el ends here
|
||||
6122
binutils/dwarf.c
6122
binutils/dwarf.c
File diff suppressed because it is too large
Load Diff
245
binutils/dwarf.h
245
binutils/dwarf.h
@@ -1,245 +0,0 @@
|
||||
/* dwarf.h - DWARF support header file
|
||||
Copyright 2005, 2007, 2008, 2009, 2010, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
typedef unsigned HOST_WIDEST_INT dwarf_vma;
|
||||
typedef HOST_WIDEST_INT dwarf_signed_vma;
|
||||
typedef unsigned HOST_WIDEST_INT dwarf_size_type;
|
||||
|
||||
/* Structure found in the .debug_line section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char li_length [4];
|
||||
unsigned char li_version [2];
|
||||
unsigned char li_prologue_length [4];
|
||||
unsigned char li_min_insn_length [1];
|
||||
unsigned char li_default_is_stmt [1];
|
||||
unsigned char li_line_base [1];
|
||||
unsigned char li_line_range [1];
|
||||
unsigned char li_opcode_base [1];
|
||||
}
|
||||
DWARF2_External_LineInfo;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dwarf_vma li_length;
|
||||
unsigned short li_version;
|
||||
unsigned int li_prologue_length;
|
||||
unsigned char li_min_insn_length;
|
||||
unsigned char li_max_ops_per_insn;
|
||||
unsigned char li_default_is_stmt;
|
||||
int li_line_base;
|
||||
unsigned char li_line_range;
|
||||
unsigned char li_opcode_base;
|
||||
}
|
||||
DWARF2_Internal_LineInfo;
|
||||
|
||||
/* Structure found in .debug_pubnames section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char pn_length [4];
|
||||
unsigned char pn_version [2];
|
||||
unsigned char pn_offset [4];
|
||||
unsigned char pn_size [4];
|
||||
}
|
||||
DWARF2_External_PubNames;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dwarf_vma pn_length;
|
||||
unsigned short pn_version;
|
||||
dwarf_vma pn_offset;
|
||||
dwarf_vma pn_size;
|
||||
}
|
||||
DWARF2_Internal_PubNames;
|
||||
|
||||
/* Structure found in .debug_info section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned char cu_length [4];
|
||||
unsigned char cu_version [2];
|
||||
unsigned char cu_abbrev_offset [4];
|
||||
unsigned char cu_pointer_size [1];
|
||||
}
|
||||
DWARF2_External_CompUnit;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dwarf_vma cu_length;
|
||||
unsigned short cu_version;
|
||||
dwarf_vma cu_abbrev_offset;
|
||||
unsigned char cu_pointer_size;
|
||||
}
|
||||
DWARF2_Internal_CompUnit;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned char ar_length [4];
|
||||
unsigned char ar_version [2];
|
||||
unsigned char ar_info_offset [4];
|
||||
unsigned char ar_pointer_size [1];
|
||||
unsigned char ar_segment_size [1];
|
||||
}
|
||||
DWARF2_External_ARange;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
dwarf_vma ar_length;
|
||||
unsigned short ar_version;
|
||||
dwarf_vma ar_info_offset;
|
||||
unsigned char ar_pointer_size;
|
||||
unsigned char ar_segment_size;
|
||||
}
|
||||
DWARF2_Internal_ARange;
|
||||
|
||||
enum dwarf_section_display_enum
|
||||
{
|
||||
abbrev = 0,
|
||||
aranges,
|
||||
frame,
|
||||
info,
|
||||
line,
|
||||
pubnames,
|
||||
eh_frame,
|
||||
macinfo,
|
||||
macro,
|
||||
str,
|
||||
loc,
|
||||
pubtypes,
|
||||
ranges,
|
||||
static_func,
|
||||
static_vars,
|
||||
types,
|
||||
weaknames,
|
||||
gdb_index,
|
||||
trace_info,
|
||||
trace_abbrev,
|
||||
trace_aranges,
|
||||
info_dwo,
|
||||
abbrev_dwo,
|
||||
types_dwo,
|
||||
line_dwo,
|
||||
loc_dwo,
|
||||
macro_dwo,
|
||||
macinfo_dwo,
|
||||
str_dwo,
|
||||
str_index,
|
||||
str_index_dwo,
|
||||
debug_addr,
|
||||
max
|
||||
};
|
||||
|
||||
struct dwarf_section
|
||||
{
|
||||
/* A debug section has a different name when it's stored compressed
|
||||
or not. COMPRESSED_NAME and UNCOMPRESSED_NAME are the two
|
||||
possibilities. NAME is set to whichever one is used for this
|
||||
input file, as determined by load_debug_section(). */
|
||||
const char *uncompressed_name;
|
||||
const char *compressed_name;
|
||||
const char *name;
|
||||
unsigned char *start;
|
||||
dwarf_vma address;
|
||||
dwarf_size_type size;
|
||||
enum dwarf_section_display_enum abbrev_sec;
|
||||
};
|
||||
|
||||
/* A structure containing the name of a debug section
|
||||
and a pointer to a function that can decode it. */
|
||||
struct dwarf_section_display
|
||||
{
|
||||
struct dwarf_section section;
|
||||
int (*display) (struct dwarf_section *, void *);
|
||||
int *enabled;
|
||||
unsigned int relocate : 1;
|
||||
};
|
||||
|
||||
extern struct dwarf_section_display debug_displays [];
|
||||
|
||||
/* This structure records the information that
|
||||
we extract from the.debug_info section. */
|
||||
typedef struct
|
||||
{
|
||||
unsigned int pointer_size;
|
||||
unsigned int offset_size;
|
||||
int dwarf_version;
|
||||
dwarf_vma cu_offset;
|
||||
dwarf_vma base_address;
|
||||
/* This field is filled in when reading the attribute DW_AT_GNU_addr_base and
|
||||
is used with the form DW_AT_GNU_FORM_addr_index. */
|
||||
dwarf_vma addr_base;
|
||||
/* This field is filled in when reading the attribute DW_AT_GNU_ranges_base and
|
||||
is used when calculating ranges. */
|
||||
dwarf_vma ranges_base;
|
||||
/* This is an array of offsets to the location list table. */
|
||||
dwarf_vma * loc_offsets;
|
||||
int * have_frame_base;
|
||||
unsigned int num_loc_offsets;
|
||||
unsigned int max_loc_offsets;
|
||||
/* List of .debug_ranges offsets seen in this .debug_info. */
|
||||
dwarf_vma * range_lists;
|
||||
unsigned int num_range_lists;
|
||||
unsigned int max_range_lists;
|
||||
}
|
||||
debug_info;
|
||||
|
||||
extern int eh_addr_size;
|
||||
|
||||
extern int do_debug_info;
|
||||
extern int do_debug_abbrevs;
|
||||
extern int do_debug_lines;
|
||||
extern int do_debug_pubnames;
|
||||
extern int do_debug_pubtypes;
|
||||
extern int do_debug_aranges;
|
||||
extern int do_debug_ranges;
|
||||
extern int do_debug_frames;
|
||||
extern int do_debug_frames_interp;
|
||||
extern int do_debug_macinfo;
|
||||
extern int do_debug_str;
|
||||
extern int do_debug_loc;
|
||||
extern int do_gdb_index;
|
||||
extern int do_trace_info;
|
||||
extern int do_trace_abbrevs;
|
||||
extern int do_trace_aranges;
|
||||
extern int do_wide;
|
||||
|
||||
extern int dwarf_cutoff_level;
|
||||
extern unsigned long dwarf_start_die;
|
||||
|
||||
extern int dwarf_check;
|
||||
|
||||
extern void init_dwarf_regnames (unsigned int);
|
||||
extern void init_dwarf_regnames_i386 (void);
|
||||
extern void init_dwarf_regnames_x86_64 (void);
|
||||
|
||||
extern int load_debug_section (enum dwarf_section_display_enum, void *);
|
||||
extern void free_debug_section (enum dwarf_section_display_enum);
|
||||
|
||||
extern void free_debug_memory (void);
|
||||
|
||||
extern void dwarf_select_sections_by_names (const char *);
|
||||
extern void dwarf_select_sections_by_letters (const char *);
|
||||
extern void dwarf_select_sections_all (void);
|
||||
|
||||
void * cmalloc (size_t, size_t);
|
||||
void * xcmalloc (size_t, size_t);
|
||||
void * xcrealloc (void *, size_t, size_t);
|
||||
|
||||
dwarf_vma read_leb128 (unsigned char *, unsigned int *, int);
|
||||
@@ -1,710 +0,0 @@
|
||||
/* elfcomm.c -- common code for ELF format file.
|
||||
Copyright 2010
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Originally developed by Eric Youngdale <eric@andante.jic.com>
|
||||
Modifications by Nick Clifton <nickc@redhat.com>
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "libiberty.h"
|
||||
#include "filenames.h"
|
||||
#include "bfd.h"
|
||||
#include "aout/ar.h"
|
||||
#include "bucomm.h"
|
||||
#include "elfcomm.h"
|
||||
#include <assert.h>
|
||||
|
||||
void
|
||||
error (const char *message, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, message);
|
||||
fprintf (stderr, _("%s: Error: "), program_name);
|
||||
vfprintf (stderr, message, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
warn (const char *message, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start (args, message);
|
||||
fprintf (stderr, _("%s: Warning: "), program_name);
|
||||
vfprintf (stderr, message, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void (*byte_put) (unsigned char *, elf_vma, int);
|
||||
|
||||
void
|
||||
byte_put_little_endian (unsigned char * field, elf_vma value, int size)
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 8:
|
||||
field[7] = (((value >> 24) >> 24) >> 8) & 0xff;
|
||||
field[6] = ((value >> 24) >> 24) & 0xff;
|
||||
field[5] = ((value >> 24) >> 16) & 0xff;
|
||||
field[4] = ((value >> 24) >> 8) & 0xff;
|
||||
/* Fall through. */
|
||||
case 4:
|
||||
field[3] = (value >> 24) & 0xff;
|
||||
/* Fall through. */
|
||||
case 3:
|
||||
field[2] = (value >> 16) & 0xff;
|
||||
/* Fall through. */
|
||||
case 2:
|
||||
field[1] = (value >> 8) & 0xff;
|
||||
/* Fall through. */
|
||||
case 1:
|
||||
field[0] = value & 0xff;
|
||||
break;
|
||||
|
||||
default:
|
||||
error (_("Unhandled data length: %d\n"), size);
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
byte_put_big_endian (unsigned char * field, elf_vma value, int size)
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 8:
|
||||
field[7] = value & 0xff;
|
||||
field[6] = (value >> 8) & 0xff;
|
||||
field[5] = (value >> 16) & 0xff;
|
||||
field[4] = (value >> 24) & 0xff;
|
||||
value >>= 16;
|
||||
value >>= 16;
|
||||
/* Fall through. */
|
||||
case 4:
|
||||
field[3] = value & 0xff;
|
||||
value >>= 8;
|
||||
/* Fall through. */
|
||||
case 3:
|
||||
field[2] = value & 0xff;
|
||||
value >>= 8;
|
||||
/* Fall through. */
|
||||
case 2:
|
||||
field[1] = value & 0xff;
|
||||
value >>= 8;
|
||||
/* Fall through. */
|
||||
case 1:
|
||||
field[0] = value & 0xff;
|
||||
break;
|
||||
|
||||
default:
|
||||
error (_("Unhandled data length: %d\n"), size);
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
elf_vma (*byte_get) (unsigned char *, int);
|
||||
|
||||
elf_vma
|
||||
byte_get_little_endian (unsigned char *field, int size)
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
return *field;
|
||||
|
||||
case 2:
|
||||
return ((unsigned int) (field[0]))
|
||||
| (((unsigned int) (field[1])) << 8);
|
||||
|
||||
case 3:
|
||||
return ((unsigned long) (field[0]))
|
||||
| (((unsigned long) (field[1])) << 8)
|
||||
| (((unsigned long) (field[2])) << 16);
|
||||
|
||||
case 4:
|
||||
return ((unsigned long) (field[0]))
|
||||
| (((unsigned long) (field[1])) << 8)
|
||||
| (((unsigned long) (field[2])) << 16)
|
||||
| (((unsigned long) (field[3])) << 24);
|
||||
|
||||
case 8:
|
||||
if (sizeof (elf_vma) == 8)
|
||||
return ((elf_vma) (field[0]))
|
||||
| (((elf_vma) (field[1])) << 8)
|
||||
| (((elf_vma) (field[2])) << 16)
|
||||
| (((elf_vma) (field[3])) << 24)
|
||||
| (((elf_vma) (field[4])) << 32)
|
||||
| (((elf_vma) (field[5])) << 40)
|
||||
| (((elf_vma) (field[6])) << 48)
|
||||
| (((elf_vma) (field[7])) << 56);
|
||||
else if (sizeof (elf_vma) == 4)
|
||||
/* We want to extract data from an 8 byte wide field and
|
||||
place it into a 4 byte wide field. Since this is a little
|
||||
endian source we can just use the 4 byte extraction code. */
|
||||
return ((unsigned long) (field[0]))
|
||||
| (((unsigned long) (field[1])) << 8)
|
||||
| (((unsigned long) (field[2])) << 16)
|
||||
| (((unsigned long) (field[3])) << 24);
|
||||
|
||||
default:
|
||||
error (_("Unhandled data length: %d\n"), size);
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
elf_vma
|
||||
byte_get_big_endian (unsigned char *field, int size)
|
||||
{
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
return *field;
|
||||
|
||||
case 2:
|
||||
return ((unsigned int) (field[1])) | (((int) (field[0])) << 8);
|
||||
|
||||
case 3:
|
||||
return ((unsigned long) (field[2]))
|
||||
| (((unsigned long) (field[1])) << 8)
|
||||
| (((unsigned long) (field[0])) << 16);
|
||||
|
||||
case 4:
|
||||
return ((unsigned long) (field[3]))
|
||||
| (((unsigned long) (field[2])) << 8)
|
||||
| (((unsigned long) (field[1])) << 16)
|
||||
| (((unsigned long) (field[0])) << 24);
|
||||
|
||||
case 8:
|
||||
if (sizeof (elf_vma) == 8)
|
||||
return ((elf_vma) (field[7]))
|
||||
| (((elf_vma) (field[6])) << 8)
|
||||
| (((elf_vma) (field[5])) << 16)
|
||||
| (((elf_vma) (field[4])) << 24)
|
||||
| (((elf_vma) (field[3])) << 32)
|
||||
| (((elf_vma) (field[2])) << 40)
|
||||
| (((elf_vma) (field[1])) << 48)
|
||||
| (((elf_vma) (field[0])) << 56);
|
||||
else if (sizeof (elf_vma) == 4)
|
||||
{
|
||||
/* Although we are extracing data from an 8 byte wide field,
|
||||
we are returning only 4 bytes of data. */
|
||||
field += 4;
|
||||
return ((unsigned long) (field[3]))
|
||||
| (((unsigned long) (field[2])) << 8)
|
||||
| (((unsigned long) (field[1])) << 16)
|
||||
| (((unsigned long) (field[0])) << 24);
|
||||
}
|
||||
|
||||
default:
|
||||
error (_("Unhandled data length: %d\n"), size);
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
elf_vma
|
||||
byte_get_signed (unsigned char *field, int size)
|
||||
{
|
||||
elf_vma x = byte_get (field, size);
|
||||
|
||||
switch (size)
|
||||
{
|
||||
case 1:
|
||||
return (x ^ 0x80) - 0x80;
|
||||
case 2:
|
||||
return (x ^ 0x8000) - 0x8000;
|
||||
case 4:
|
||||
return (x ^ 0x80000000) - 0x80000000;
|
||||
case 8:
|
||||
return x;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the high-order 32-bits and the low-order 32-bits
|
||||
of an 8-byte value separately. */
|
||||
|
||||
void
|
||||
byte_get_64 (unsigned char *field, elf_vma *high, elf_vma *low)
|
||||
{
|
||||
if (byte_get == byte_get_big_endian)
|
||||
{
|
||||
*high = byte_get_big_endian (field, 4);
|
||||
*low = byte_get_big_endian (field + 4, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
*high = byte_get_little_endian (field + 4, 4);
|
||||
*low = byte_get_little_endian (field, 4);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Return the path name for a proxy entry in a thin archive, adjusted
|
||||
relative to the path name of the thin archive itself if necessary.
|
||||
Always returns a pointer to malloc'ed memory. */
|
||||
|
||||
char *
|
||||
adjust_relative_path (const char *file_name, const char *name,
|
||||
int name_len)
|
||||
{
|
||||
char * member_file_name;
|
||||
const char * base_name = lbasename (file_name);
|
||||
|
||||
/* This is a proxy entry for a thin archive member.
|
||||
If the extended name table contains an absolute path
|
||||
name, or if the archive is in the current directory,
|
||||
use the path name as given. Otherwise, we need to
|
||||
find the member relative to the directory where the
|
||||
archive is located. */
|
||||
if (IS_ABSOLUTE_PATH (name) || base_name == file_name)
|
||||
{
|
||||
member_file_name = (char *) malloc (name_len + 1);
|
||||
if (member_file_name == NULL)
|
||||
{
|
||||
error (_("Out of memory\n"));
|
||||
return NULL;
|
||||
}
|
||||
memcpy (member_file_name, name, name_len);
|
||||
member_file_name[name_len] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Concatenate the path components of the archive file name
|
||||
to the relative path name from the extended name table. */
|
||||
size_t prefix_len = base_name - file_name;
|
||||
member_file_name = (char *) malloc (prefix_len + name_len + 1);
|
||||
if (member_file_name == NULL)
|
||||
{
|
||||
error (_("Out of memory\n"));
|
||||
return NULL;
|
||||
}
|
||||
memcpy (member_file_name, file_name, prefix_len);
|
||||
memcpy (member_file_name + prefix_len, name, name_len);
|
||||
member_file_name[prefix_len + name_len] = '\0';
|
||||
}
|
||||
return member_file_name;
|
||||
}
|
||||
|
||||
/* Processes the archive index table and symbol table in ARCH.
|
||||
Entries in the index table are SIZEOF_AR_INDEX bytes long.
|
||||
Fills in ARCH->next_arhdr_offset and ARCH->arhdr.
|
||||
If READ_SYMBOLS is true then fills in ARCH->index_num, ARCH->index_array,
|
||||
ARCH->sym_size and ARCH->sym_table.
|
||||
It is the caller's responsibility to free ARCH->index_array and
|
||||
ARCH->sym_table.
|
||||
Returns TRUE upon success, FALSE otherwise.
|
||||
If failure occurs an error message is printed. */
|
||||
|
||||
static bfd_boolean
|
||||
process_archive_index_and_symbols (struct archive_info * arch,
|
||||
unsigned int sizeof_ar_index,
|
||||
bfd_boolean read_symbols)
|
||||
{
|
||||
size_t got;
|
||||
unsigned long size;
|
||||
|
||||
size = strtoul (arch->arhdr.ar_size, NULL, 10);
|
||||
size = size + (size & 1);
|
||||
|
||||
arch->next_arhdr_offset += sizeof arch->arhdr + size;
|
||||
|
||||
if (! read_symbols)
|
||||
{
|
||||
if (fseek (arch->file, size, SEEK_CUR) != 0)
|
||||
{
|
||||
error (_("%s: failed to skip archive symbol table\n"),
|
||||
arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned long i;
|
||||
/* A buffer used to hold numbers read in from an archive index.
|
||||
These are always SIZEOF_AR_INDEX bytes long and stored in
|
||||
big-endian format. */
|
||||
unsigned char integer_buffer[sizeof arch->index_num];
|
||||
unsigned char * index_buffer;
|
||||
|
||||
assert (sizeof_ar_index <= sizeof integer_buffer);
|
||||
|
||||
/* Check the size of the archive index. */
|
||||
if (size < sizeof_ar_index)
|
||||
{
|
||||
error (_("%s: the archive index is empty\n"), arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Read the number of entries in the archive index. */
|
||||
got = fread (integer_buffer, 1, sizeof_ar_index, arch->file);
|
||||
if (got != sizeof_ar_index)
|
||||
{
|
||||
error (_("%s: failed to read archive index\n"), arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
arch->index_num = byte_get_big_endian (integer_buffer, sizeof_ar_index);
|
||||
size -= sizeof_ar_index;
|
||||
|
||||
if (size < arch->index_num * sizeof_ar_index)
|
||||
{
|
||||
error (_("%s: the archive index is supposed to have %ld entries of %d bytes, but the size is only %ld\n"),
|
||||
arch->file_name, (long) arch->index_num, sizeof_ar_index, size);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Read in the archive index. */
|
||||
index_buffer = (unsigned char *)
|
||||
malloc (arch->index_num * sizeof_ar_index);
|
||||
if (index_buffer == NULL)
|
||||
{
|
||||
error (_("Out of memory whilst trying to read archive symbol index\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
got = fread (index_buffer, sizeof_ar_index, arch->index_num, arch->file);
|
||||
if (got != arch->index_num)
|
||||
{
|
||||
free (index_buffer);
|
||||
error (_("%s: failed to read archive index\n"), arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
size -= arch->index_num * sizeof_ar_index;
|
||||
|
||||
/* Convert the index numbers into the host's numeric format. */
|
||||
arch->index_array = (elf_vma *)
|
||||
malloc (arch->index_num * sizeof (* arch->index_array));
|
||||
if (arch->index_array == NULL)
|
||||
{
|
||||
free (index_buffer);
|
||||
error (_("Out of memory whilst trying to convert the archive symbol index\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < arch->index_num; i++)
|
||||
arch->index_array[i] =
|
||||
byte_get_big_endian ((unsigned char *) (index_buffer + (i * sizeof_ar_index)),
|
||||
sizeof_ar_index);
|
||||
free (index_buffer);
|
||||
|
||||
/* The remaining space in the header is taken up by the symbol table. */
|
||||
if (size < 1)
|
||||
{
|
||||
error (_("%s: the archive has an index but no symbols\n"),
|
||||
arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
arch->sym_table = (char *) malloc (size);
|
||||
if (arch->sym_table == NULL)
|
||||
{
|
||||
error (_("Out of memory whilst trying to read archive index symbol table\n"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
arch->sym_size = size;
|
||||
got = fread (arch->sym_table, 1, size, arch->file);
|
||||
if (got != size)
|
||||
{
|
||||
error (_("%s: failed to read archive index symbol table\n"),
|
||||
arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read the next archive header. */
|
||||
got = fread (&arch->arhdr, 1, sizeof arch->arhdr, arch->file);
|
||||
if (got != sizeof arch->arhdr && got != 0)
|
||||
{
|
||||
error (_("%s: failed to read archive header following archive index\n"),
|
||||
arch->file_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Read the symbol table and long-name table from an archive. */
|
||||
|
||||
int
|
||||
setup_archive (struct archive_info *arch, const char *file_name,
|
||||
FILE *file, bfd_boolean is_thin_archive,
|
||||
bfd_boolean read_symbols)
|
||||
{
|
||||
size_t got;
|
||||
|
||||
arch->file_name = strdup (file_name);
|
||||
arch->file = file;
|
||||
arch->index_num = 0;
|
||||
arch->index_array = NULL;
|
||||
arch->sym_table = NULL;
|
||||
arch->sym_size = 0;
|
||||
arch->longnames = NULL;
|
||||
arch->longnames_size = 0;
|
||||
arch->nested_member_origin = 0;
|
||||
arch->is_thin_archive = is_thin_archive;
|
||||
arch->uses_64bit_indicies = FALSE;
|
||||
arch->next_arhdr_offset = SARMAG;
|
||||
|
||||
/* Read the first archive member header. */
|
||||
if (fseek (file, SARMAG, SEEK_SET) != 0)
|
||||
{
|
||||
error (_("%s: failed to seek to first archive header\n"), file_name);
|
||||
return 1;
|
||||
}
|
||||
got = fread (&arch->arhdr, 1, sizeof arch->arhdr, file);
|
||||
if (got != sizeof arch->arhdr)
|
||||
{
|
||||
if (got == 0)
|
||||
return 0;
|
||||
|
||||
error (_("%s: failed to read archive header\n"), file_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* See if this is the archive symbol table. */
|
||||
if (const_strneq (arch->arhdr.ar_name, "/ "))
|
||||
{
|
||||
if (! process_archive_index_and_symbols (arch, 4, read_symbols))
|
||||
return 1;
|
||||
}
|
||||
else if (const_strneq (arch->arhdr.ar_name, "/SYM64/ "))
|
||||
{
|
||||
arch->uses_64bit_indicies = TRUE;
|
||||
if (! process_archive_index_and_symbols (arch, 8, read_symbols))
|
||||
return 1;
|
||||
}
|
||||
else if (read_symbols)
|
||||
printf (_("%s has no archive index\n"), file_name);
|
||||
|
||||
if (const_strneq (arch->arhdr.ar_name, "// "))
|
||||
{
|
||||
/* This is the archive string table holding long member names. */
|
||||
arch->longnames_size = strtoul (arch->arhdr.ar_size, NULL, 10);
|
||||
arch->next_arhdr_offset += sizeof arch->arhdr + arch->longnames_size;
|
||||
|
||||
arch->longnames = (char *) malloc (arch->longnames_size);
|
||||
if (arch->longnames == NULL)
|
||||
{
|
||||
error (_("Out of memory reading long symbol names in archive\n"));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fread (arch->longnames, arch->longnames_size, 1, file) != 1)
|
||||
{
|
||||
free (arch->longnames);
|
||||
arch->longnames = NULL;
|
||||
error (_("%s: failed to read long symbol name string table\n"),
|
||||
file_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((arch->longnames_size & 1) != 0)
|
||||
getc (file);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Open and setup a nested archive, if not already open. */
|
||||
|
||||
int
|
||||
setup_nested_archive (struct archive_info *nested_arch,
|
||||
const char *member_file_name)
|
||||
{
|
||||
FILE * member_file;
|
||||
|
||||
/* Have we already setup this archive? */
|
||||
if (nested_arch->file_name != NULL
|
||||
&& streq (nested_arch->file_name, member_file_name))
|
||||
return 0;
|
||||
|
||||
/* Close previous file and discard cached information. */
|
||||
if (nested_arch->file != NULL)
|
||||
fclose (nested_arch->file);
|
||||
release_archive (nested_arch);
|
||||
|
||||
member_file = fopen (member_file_name, "rb");
|
||||
if (member_file == NULL)
|
||||
return 1;
|
||||
return setup_archive (nested_arch, member_file_name, member_file,
|
||||
FALSE, FALSE);
|
||||
}
|
||||
|
||||
/* Release the memory used for the archive information. */
|
||||
|
||||
void
|
||||
release_archive (struct archive_info * arch)
|
||||
{
|
||||
if (arch->file_name != NULL)
|
||||
free (arch->file_name);
|
||||
if (arch->index_array != NULL)
|
||||
free (arch->index_array);
|
||||
if (arch->sym_table != NULL)
|
||||
free (arch->sym_table);
|
||||
if (arch->longnames != NULL)
|
||||
free (arch->longnames);
|
||||
}
|
||||
|
||||
/* Get the name of an archive member from the current archive header.
|
||||
For simple names, this will modify the ar_name field of the current
|
||||
archive header. For long names, it will return a pointer to the
|
||||
longnames table. For nested archives, it will open the nested archive
|
||||
and get the name recursively. NESTED_ARCH is a single-entry cache so
|
||||
we don't keep rereading the same information from a nested archive. */
|
||||
|
||||
char *
|
||||
get_archive_member_name (struct archive_info *arch,
|
||||
struct archive_info *nested_arch)
|
||||
{
|
||||
unsigned long j, k;
|
||||
|
||||
if (arch->arhdr.ar_name[0] == '/')
|
||||
{
|
||||
/* We have a long name. */
|
||||
char *endp;
|
||||
char *member_file_name;
|
||||
char *member_name;
|
||||
|
||||
arch->nested_member_origin = 0;
|
||||
k = j = strtoul (arch->arhdr.ar_name + 1, &endp, 10);
|
||||
if (arch->is_thin_archive && endp != NULL && * endp == ':')
|
||||
arch->nested_member_origin = strtoul (endp + 1, NULL, 10);
|
||||
|
||||
while ((j < arch->longnames_size)
|
||||
&& (arch->longnames[j] != '\n')
|
||||
&& (arch->longnames[j] != '\0'))
|
||||
j++;
|
||||
if (arch->longnames[j-1] == '/')
|
||||
j--;
|
||||
arch->longnames[j] = '\0';
|
||||
|
||||
if (!arch->is_thin_archive || arch->nested_member_origin == 0)
|
||||
return arch->longnames + k;
|
||||
|
||||
/* This is a proxy for a member of a nested archive.
|
||||
Find the name of the member in that archive. */
|
||||
member_file_name = adjust_relative_path (arch->file_name,
|
||||
arch->longnames + k, j - k);
|
||||
if (member_file_name != NULL
|
||||
&& setup_nested_archive (nested_arch, member_file_name) == 0)
|
||||
{
|
||||
member_name = get_archive_member_name_at (nested_arch,
|
||||
arch->nested_member_origin,
|
||||
NULL);
|
||||
if (member_name != NULL)
|
||||
{
|
||||
free (member_file_name);
|
||||
return member_name;
|
||||
}
|
||||
}
|
||||
free (member_file_name);
|
||||
|
||||
/* Last resort: just return the name of the nested archive. */
|
||||
return arch->longnames + k;
|
||||
}
|
||||
|
||||
/* We have a normal (short) name. */
|
||||
for (j = 0; j < sizeof (arch->arhdr.ar_name); j++)
|
||||
if (arch->arhdr.ar_name[j] == '/')
|
||||
{
|
||||
arch->arhdr.ar_name[j] = '\0';
|
||||
return arch->arhdr.ar_name;
|
||||
}
|
||||
|
||||
/* The full ar_name field is used. Don't rely on ar_date starting
|
||||
with a zero byte. */
|
||||
{
|
||||
char *name = xmalloc (sizeof (arch->arhdr.ar_name) + 1);
|
||||
memcpy (name, arch->arhdr.ar_name, sizeof (arch->arhdr.ar_name));
|
||||
name[sizeof (arch->arhdr.ar_name)] = '\0';
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the name of an archive member at a given OFFSET within an archive
|
||||
ARCH. */
|
||||
|
||||
char *
|
||||
get_archive_member_name_at (struct archive_info *arch,
|
||||
unsigned long offset,
|
||||
struct archive_info *nested_arch)
|
||||
{
|
||||
size_t got;
|
||||
|
||||
if (fseek (arch->file, offset, SEEK_SET) != 0)
|
||||
{
|
||||
error (_("%s: failed to seek to next file name\n"), arch->file_name);
|
||||
return NULL;
|
||||
}
|
||||
got = fread (&arch->arhdr, 1, sizeof arch->arhdr, arch->file);
|
||||
if (got != sizeof arch->arhdr)
|
||||
{
|
||||
error (_("%s: failed to read archive header\n"), arch->file_name);
|
||||
return NULL;
|
||||
}
|
||||
if (memcmp (arch->arhdr.ar_fmag, ARFMAG, 2) != 0)
|
||||
{
|
||||
error (_("%s: did not find a valid archive header\n"),
|
||||
arch->file_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return get_archive_member_name (arch, nested_arch);
|
||||
}
|
||||
|
||||
/* Construct a string showing the name of the archive member, qualified
|
||||
with the name of the containing archive file. For thin archives, we
|
||||
use square brackets to denote the indirection. For nested archives,
|
||||
we show the qualified name of the external member inside the square
|
||||
brackets (e.g., "thin.a[normal.a(foo.o)]"). */
|
||||
|
||||
char *
|
||||
make_qualified_name (struct archive_info * arch,
|
||||
struct archive_info * nested_arch,
|
||||
const char *member_name)
|
||||
{
|
||||
size_t len;
|
||||
char * name;
|
||||
|
||||
len = strlen (arch->file_name) + strlen (member_name) + 3;
|
||||
if (arch->is_thin_archive && arch->nested_member_origin != 0)
|
||||
len += strlen (nested_arch->file_name) + 2;
|
||||
|
||||
name = (char *) malloc (len);
|
||||
if (name == NULL)
|
||||
{
|
||||
error (_("Out of memory\n"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (arch->is_thin_archive && arch->nested_member_origin != 0)
|
||||
snprintf (name, len, "%s[%s(%s)]", arch->file_name,
|
||||
nested_arch->file_name, member_name);
|
||||
else if (arch->is_thin_archive)
|
||||
snprintf (name, len, "%s[%s]", arch->file_name, member_name);
|
||||
else
|
||||
snprintf (name, len, "%s(%s)", arch->file_name, member_name);
|
||||
|
||||
return name;
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/* elfcomm.h -- include file of common code for ELF format file.
|
||||
Copyright 2010
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Originally developed by Eric Youngdale <eric@andante.jic.com>
|
||||
Modifications by Nick Clifton <nickc@redhat.com>
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#ifndef _ELFCOMM_H
|
||||
#define _ELFCOMM_H
|
||||
|
||||
#include "aout/ar.h"
|
||||
|
||||
void error (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
|
||||
|
||||
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
|
||||
/* We can't use any bfd types here since readelf may define BFD64 and
|
||||
objdump may not. */
|
||||
#define HOST_WIDEST_INT long long
|
||||
#else
|
||||
#define HOST_WIDEST_INT long
|
||||
#endif
|
||||
typedef unsigned HOST_WIDEST_INT elf_vma;
|
||||
|
||||
extern void (*byte_put) (unsigned char *, elf_vma, int);
|
||||
extern void byte_put_little_endian (unsigned char *, elf_vma, int);
|
||||
extern void byte_put_big_endian (unsigned char *, elf_vma, int);
|
||||
|
||||
extern elf_vma (*byte_get) (unsigned char *, int);
|
||||
extern elf_vma byte_get_signed (unsigned char *, int);
|
||||
extern elf_vma byte_get_little_endian (unsigned char *, int);
|
||||
extern elf_vma byte_get_big_endian (unsigned char *, int);
|
||||
extern void byte_get_64 (unsigned char *, elf_vma *, elf_vma *);
|
||||
|
||||
#define BYTE_PUT(field, val) byte_put (field, val, sizeof (field))
|
||||
#define BYTE_GET(field) byte_get (field, sizeof (field))
|
||||
#define BYTE_GET_SIGNED(field) byte_get_signed (field, sizeof (field))
|
||||
|
||||
/* This is just a bit of syntatic sugar. */
|
||||
#define streq(a,b) (strcmp ((a), (b)) == 0)
|
||||
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
|
||||
#define const_strneq(a,b) (strncmp ((a), (b), sizeof (b) - 1) == 0)
|
||||
|
||||
/* Structure to hold information about an archive file. */
|
||||
|
||||
struct archive_info
|
||||
{
|
||||
char * file_name; /* Archive file name. */
|
||||
FILE * file; /* Open file descriptor. */
|
||||
elf_vma index_num; /* Number of symbols in table. */
|
||||
elf_vma * index_array; /* The array of member offsets. */
|
||||
char * sym_table; /* The symbol table. */
|
||||
unsigned long sym_size; /* Size of the symbol table. */
|
||||
char * longnames; /* The long file names table. */
|
||||
unsigned long longnames_size; /* Size of the long file names table. */
|
||||
unsigned long nested_member_origin; /* Origin in the nested archive of the current member. */
|
||||
unsigned long next_arhdr_offset; /* Offset of the next archive header. */
|
||||
bfd_boolean is_thin_archive; /* TRUE if this is a thin archive. */
|
||||
bfd_boolean uses_64bit_indicies; /* TRUE if the index table uses 64bit entries. */
|
||||
struct ar_hdr arhdr; /* Current archive header. */
|
||||
};
|
||||
|
||||
/* Return the path name for a proxy entry in a thin archive. */
|
||||
extern char *adjust_relative_path (const char *, const char *, int);
|
||||
|
||||
/* Read the symbol table and long-name table from an archive. */
|
||||
extern int setup_archive (struct archive_info *, const char *, FILE *,
|
||||
bfd_boolean, bfd_boolean);
|
||||
|
||||
/* Open and setup a nested archive, if not already open. */
|
||||
extern int setup_nested_archive (struct archive_info *, const char *);
|
||||
|
||||
/* Release the memory used for the archive information. */
|
||||
extern void release_archive (struct archive_info *);
|
||||
|
||||
/* Get the name of an archive member from the current archive header. */
|
||||
|
||||
extern char *get_archive_member_name (struct archive_info *,
|
||||
struct archive_info *);
|
||||
|
||||
/* Get the name of an archive member at a given offset within an
|
||||
archive. */
|
||||
|
||||
extern char *get_archive_member_name_at (struct archive_info *,
|
||||
unsigned long,
|
||||
struct archive_info *);
|
||||
|
||||
/* Construct a string showing the name of the archive member, qualified
|
||||
with the name of the containing archive file. */
|
||||
|
||||
extern char *make_qualified_name (struct archive_info *,
|
||||
struct archive_info *,
|
||||
const char *);
|
||||
|
||||
#endif /* _ELFCOMM_H */
|
||||
@@ -1,738 +0,0 @@
|
||||
/* elfedit.c -- Update the ELF header of an ELF format file
|
||||
Copyright 2010, 2011, 2012
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include <assert.h>
|
||||
|
||||
#if __GNUC__ >= 2
|
||||
/* Define BFD64 here, even if our default architecture is 32 bit ELF
|
||||
as this will allow us to read in and parse 64bit and 32bit ELF files.
|
||||
Only do this if we believe that the compiler can support a 64 bit
|
||||
data type. For now we only rely on GCC being able to do this. */
|
||||
#define BFD64
|
||||
#endif
|
||||
|
||||
#include "bfd.h"
|
||||
#include "elfcomm.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
#include "elf/common.h"
|
||||
#include "elf/external.h"
|
||||
#include "elf/internal.h"
|
||||
|
||||
#include "getopt.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
#include "filenames.h"
|
||||
|
||||
char * program_name = "elfedit";
|
||||
static long archive_file_offset;
|
||||
static unsigned long archive_file_size;
|
||||
static Elf_Internal_Ehdr elf_header;
|
||||
static Elf32_External_Ehdr ehdr32;
|
||||
static Elf64_External_Ehdr ehdr64;
|
||||
static int input_elf_machine = -1;
|
||||
static int output_elf_machine = -1;
|
||||
static int input_elf_type = -1;
|
||||
static int output_elf_type = -1;
|
||||
static int input_elf_osabi = -1;
|
||||
static int output_elf_osabi = -1;
|
||||
static int input_elf_class = -1;
|
||||
|
||||
static int
|
||||
update_elf_header (const char *file_name, FILE *file)
|
||||
{
|
||||
int class, machine, type, status, osabi;
|
||||
|
||||
if (elf_header.e_ident[EI_MAG0] != ELFMAG0
|
||||
|| elf_header.e_ident[EI_MAG1] != ELFMAG1
|
||||
|| elf_header.e_ident[EI_MAG2] != ELFMAG2
|
||||
|| elf_header.e_ident[EI_MAG3] != ELFMAG3)
|
||||
{
|
||||
error
|
||||
(_("%s: Not an ELF file - wrong magic bytes at the start\n"),
|
||||
file_name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (elf_header.e_ident[EI_VERSION] != EV_CURRENT)
|
||||
{
|
||||
error
|
||||
(_("%s: Unsupported EI_VERSION: %d is not %d\n"),
|
||||
file_name, elf_header.e_ident[EI_VERSION],
|
||||
EV_CURRENT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return if e_machine is the same as output_elf_machine. */
|
||||
if (output_elf_machine == elf_header.e_machine)
|
||||
return 1;
|
||||
|
||||
class = elf_header.e_ident[EI_CLASS];
|
||||
|
||||
/* Skip if class doesn't match. */
|
||||
if (input_elf_class != -1 && class != input_elf_class)
|
||||
{
|
||||
error
|
||||
(_("%s: Unmatched EI_CLASS: %d is not %d\n"),
|
||||
file_name, class, input_elf_class);
|
||||
return 0;
|
||||
}
|
||||
|
||||
machine = elf_header.e_machine;
|
||||
|
||||
/* Skip if e_machine doesn't match. */
|
||||
if (input_elf_machine != -1 && machine != input_elf_machine)
|
||||
{
|
||||
error
|
||||
(_("%s: Unmatched e_machine: %d is not %d\n"),
|
||||
file_name, machine, input_elf_machine);
|
||||
return 0;
|
||||
}
|
||||
|
||||
type = elf_header.e_type;
|
||||
|
||||
/* Skip if e_type doesn't match. */
|
||||
if (input_elf_type != -1 && type != input_elf_type)
|
||||
{
|
||||
error
|
||||
(_("%s: Unmatched e_type: %d is not %d\n"),
|
||||
file_name, type, input_elf_type);
|
||||
return 0;
|
||||
}
|
||||
|
||||
osabi = elf_header.e_ident[EI_OSABI];
|
||||
|
||||
/* Skip if OSABI doesn't match. */
|
||||
if (input_elf_osabi != -1 && osabi != input_elf_osabi)
|
||||
{
|
||||
error
|
||||
(_("%s: Unmatched EI_OSABI: %d is not %d\n"),
|
||||
file_name, osabi, input_elf_osabi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Update e_machine, e_type and EI_OSABI. */
|
||||
switch (class)
|
||||
{
|
||||
default:
|
||||
/* We should never get here. */
|
||||
abort ();
|
||||
break;
|
||||
case ELFCLASS32:
|
||||
if (output_elf_machine != -1)
|
||||
BYTE_PUT (ehdr32.e_machine, output_elf_machine);
|
||||
if (output_elf_type != -1)
|
||||
BYTE_PUT (ehdr32.e_type, output_elf_type);
|
||||
if (output_elf_osabi != -1)
|
||||
ehdr32.e_ident[EI_OSABI] = output_elf_osabi;
|
||||
status = fwrite (&ehdr32, sizeof (ehdr32), 1, file) == 1;
|
||||
break;
|
||||
case ELFCLASS64:
|
||||
if (output_elf_machine != -1)
|
||||
BYTE_PUT (ehdr64.e_machine, output_elf_machine);
|
||||
if (output_elf_type != -1)
|
||||
BYTE_PUT (ehdr64.e_type, output_elf_type);
|
||||
if (output_elf_osabi != -1)
|
||||
ehdr64.e_ident[EI_OSABI] = output_elf_osabi;
|
||||
status = fwrite (&ehdr64, sizeof (ehdr64), 1, file) == 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (status != 1)
|
||||
error (_("%s: Failed to update ELF header: %s\n"),
|
||||
file_name, strerror (errno));
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static int
|
||||
get_file_header (FILE * file)
|
||||
{
|
||||
/* Read in the identity array. */
|
||||
if (fread (elf_header.e_ident, EI_NIDENT, 1, file) != 1)
|
||||
return 0;
|
||||
|
||||
/* Determine how to read the rest of the header. */
|
||||
switch (elf_header.e_ident[EI_DATA])
|
||||
{
|
||||
default: /* fall through */
|
||||
case ELFDATANONE: /* fall through */
|
||||
case ELFDATA2LSB:
|
||||
byte_get = byte_get_little_endian;
|
||||
byte_put = byte_put_little_endian;
|
||||
break;
|
||||
case ELFDATA2MSB:
|
||||
byte_get = byte_get_big_endian;
|
||||
byte_put = byte_put_big_endian;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Read in the rest of the header. For now we only support 32 bit
|
||||
and 64 bit ELF files. */
|
||||
switch (elf_header.e_ident[EI_CLASS])
|
||||
{
|
||||
default:
|
||||
error (_("Unsupported EI_CLASS: %d\n"),
|
||||
elf_header.e_ident[EI_CLASS]);
|
||||
return 0;
|
||||
|
||||
case ELFCLASS32:
|
||||
if (fread (ehdr32.e_type, sizeof (ehdr32) - EI_NIDENT,
|
||||
1, file) != 1)
|
||||
return 0;
|
||||
|
||||
elf_header.e_type = BYTE_GET (ehdr32.e_type);
|
||||
elf_header.e_machine = BYTE_GET (ehdr32.e_machine);
|
||||
elf_header.e_version = BYTE_GET (ehdr32.e_version);
|
||||
elf_header.e_entry = BYTE_GET (ehdr32.e_entry);
|
||||
elf_header.e_phoff = BYTE_GET (ehdr32.e_phoff);
|
||||
elf_header.e_shoff = BYTE_GET (ehdr32.e_shoff);
|
||||
elf_header.e_flags = BYTE_GET (ehdr32.e_flags);
|
||||
elf_header.e_ehsize = BYTE_GET (ehdr32.e_ehsize);
|
||||
elf_header.e_phentsize = BYTE_GET (ehdr32.e_phentsize);
|
||||
elf_header.e_phnum = BYTE_GET (ehdr32.e_phnum);
|
||||
elf_header.e_shentsize = BYTE_GET (ehdr32.e_shentsize);
|
||||
elf_header.e_shnum = BYTE_GET (ehdr32.e_shnum);
|
||||
elf_header.e_shstrndx = BYTE_GET (ehdr32.e_shstrndx);
|
||||
|
||||
memcpy (&ehdr32, &elf_header, EI_NIDENT);
|
||||
break;
|
||||
|
||||
case ELFCLASS64:
|
||||
/* If we have been compiled with sizeof (bfd_vma) == 4, then
|
||||
we will not be able to cope with the 64bit data found in
|
||||
64 ELF files. Detect this now and abort before we start
|
||||
overwriting things. */
|
||||
if (sizeof (bfd_vma) < 8)
|
||||
{
|
||||
error (_("This executable has been built without support for a\n\
|
||||
64 bit data type and so it cannot process 64 bit ELF files.\n"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fread (ehdr64.e_type, sizeof (ehdr64) - EI_NIDENT,
|
||||
1, file) != 1)
|
||||
return 0;
|
||||
|
||||
elf_header.e_type = BYTE_GET (ehdr64.e_type);
|
||||
elf_header.e_machine = BYTE_GET (ehdr64.e_machine);
|
||||
elf_header.e_version = BYTE_GET (ehdr64.e_version);
|
||||
elf_header.e_entry = BYTE_GET (ehdr64.e_entry);
|
||||
elf_header.e_phoff = BYTE_GET (ehdr64.e_phoff);
|
||||
elf_header.e_shoff = BYTE_GET (ehdr64.e_shoff);
|
||||
elf_header.e_flags = BYTE_GET (ehdr64.e_flags);
|
||||
elf_header.e_ehsize = BYTE_GET (ehdr64.e_ehsize);
|
||||
elf_header.e_phentsize = BYTE_GET (ehdr64.e_phentsize);
|
||||
elf_header.e_phnum = BYTE_GET (ehdr64.e_phnum);
|
||||
elf_header.e_shentsize = BYTE_GET (ehdr64.e_shentsize);
|
||||
elf_header.e_shnum = BYTE_GET (ehdr64.e_shnum);
|
||||
elf_header.e_shstrndx = BYTE_GET (ehdr64.e_shstrndx);
|
||||
|
||||
memcpy (&ehdr64, &elf_header, EI_NIDENT);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Process one ELF object file according to the command line options.
|
||||
This file may actually be stored in an archive. The file is
|
||||
positioned at the start of the ELF object. */
|
||||
|
||||
static int
|
||||
process_object (const char *file_name, FILE *file)
|
||||
{
|
||||
/* Rememeber where we are. */
|
||||
long offset = ftell (file);
|
||||
|
||||
if (! get_file_header (file))
|
||||
{
|
||||
error (_("%s: Failed to read ELF header\n"), file_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Go to the position of the ELF header. */
|
||||
if (fseek (file, offset, SEEK_SET) != 0)
|
||||
{
|
||||
error (_("%s: Failed to seek to ELF header\n"), file_name);
|
||||
}
|
||||
|
||||
if (! update_elf_header (file_name, file))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Process an ELF archive.
|
||||
On entry the file is positioned just after the ARMAG string. */
|
||||
|
||||
static int
|
||||
process_archive (const char * file_name, FILE * file,
|
||||
bfd_boolean is_thin_archive)
|
||||
{
|
||||
struct archive_info arch;
|
||||
struct archive_info nested_arch;
|
||||
size_t got;
|
||||
int ret;
|
||||
|
||||
/* The ARCH structure is used to hold information about this archive. */
|
||||
arch.file_name = NULL;
|
||||
arch.file = NULL;
|
||||
arch.index_array = NULL;
|
||||
arch.sym_table = NULL;
|
||||
arch.longnames = NULL;
|
||||
|
||||
/* The NESTED_ARCH structure is used as a single-item cache of information
|
||||
about a nested archive (when members of a thin archive reside within
|
||||
another regular archive file). */
|
||||
nested_arch.file_name = NULL;
|
||||
nested_arch.file = NULL;
|
||||
nested_arch.index_array = NULL;
|
||||
nested_arch.sym_table = NULL;
|
||||
nested_arch.longnames = NULL;
|
||||
|
||||
if (setup_archive (&arch, file_name, file, is_thin_archive, FALSE) != 0)
|
||||
{
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
char * name;
|
||||
size_t namelen;
|
||||
char * qualified_name;
|
||||
|
||||
/* Read the next archive header. */
|
||||
if (fseek (file, arch.next_arhdr_offset, SEEK_SET) != 0)
|
||||
{
|
||||
error (_("%s: failed to seek to next archive header\n"),
|
||||
file_name);
|
||||
return 1;
|
||||
}
|
||||
got = fread (&arch.arhdr, 1, sizeof arch.arhdr, file);
|
||||
if (got != sizeof arch.arhdr)
|
||||
{
|
||||
if (got == 0)
|
||||
break;
|
||||
error (_("%s: failed to read archive header\n"),
|
||||
file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
if (memcmp (arch.arhdr.ar_fmag, ARFMAG, 2) != 0)
|
||||
{
|
||||
error (_("%s: did not find a valid archive header\n"),
|
||||
arch.file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
arch.next_arhdr_offset += sizeof arch.arhdr;
|
||||
|
||||
archive_file_size = strtoul (arch.arhdr.ar_size, NULL, 10);
|
||||
if (archive_file_size & 01)
|
||||
++archive_file_size;
|
||||
|
||||
name = get_archive_member_name (&arch, &nested_arch);
|
||||
if (name == NULL)
|
||||
{
|
||||
error (_("%s: bad archive file name\n"), file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
namelen = strlen (name);
|
||||
|
||||
qualified_name = make_qualified_name (&arch, &nested_arch, name);
|
||||
if (qualified_name == NULL)
|
||||
{
|
||||
error (_("%s: bad archive file name\n"), file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (is_thin_archive && arch.nested_member_origin == 0)
|
||||
{
|
||||
/* This is a proxy for an external member of a thin archive. */
|
||||
FILE *member_file;
|
||||
char *member_file_name = adjust_relative_path (file_name,
|
||||
name, namelen);
|
||||
if (member_file_name == NULL)
|
||||
{
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
member_file = fopen (member_file_name, "r+b");
|
||||
if (member_file == NULL)
|
||||
{
|
||||
error (_("Input file '%s' is not readable\n"),
|
||||
member_file_name);
|
||||
free (member_file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
archive_file_offset = arch.nested_member_origin;
|
||||
|
||||
ret |= process_object (qualified_name, member_file);
|
||||
|
||||
fclose (member_file);
|
||||
free (member_file_name);
|
||||
}
|
||||
else if (is_thin_archive)
|
||||
{
|
||||
/* This is a proxy for a member of a nested archive. */
|
||||
archive_file_offset = arch.nested_member_origin + sizeof arch.arhdr;
|
||||
|
||||
/* The nested archive file will have been opened and setup by
|
||||
get_archive_member_name. */
|
||||
if (fseek (nested_arch.file, archive_file_offset,
|
||||
SEEK_SET) != 0)
|
||||
{
|
||||
error (_("%s: failed to seek to archive member\n"),
|
||||
nested_arch.file_name);
|
||||
ret = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
ret |= process_object (qualified_name, nested_arch.file);
|
||||
}
|
||||
else
|
||||
{
|
||||
archive_file_offset = arch.next_arhdr_offset;
|
||||
arch.next_arhdr_offset += archive_file_size;
|
||||
|
||||
ret |= process_object (qualified_name, file);
|
||||
}
|
||||
|
||||
free (qualified_name);
|
||||
}
|
||||
|
||||
out:
|
||||
if (nested_arch.file != NULL)
|
||||
fclose (nested_arch.file);
|
||||
release_archive (&nested_arch);
|
||||
release_archive (&arch);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
check_file (const char *file_name, struct stat *statbuf_p)
|
||||
{
|
||||
struct stat statbuf;
|
||||
|
||||
if (statbuf_p == NULL)
|
||||
statbuf_p = &statbuf;
|
||||
|
||||
if (stat (file_name, statbuf_p) < 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
error (_("'%s': No such file\n"), file_name);
|
||||
else
|
||||
error (_("Could not locate '%s'. System error message: %s\n"),
|
||||
file_name, strerror (errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (! S_ISREG (statbuf_p->st_mode))
|
||||
{
|
||||
error (_("'%s' is not an ordinary file\n"), file_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
process_file (const char *file_name)
|
||||
{
|
||||
FILE * file;
|
||||
char armag[SARMAG];
|
||||
int ret;
|
||||
|
||||
if (check_file (file_name, NULL))
|
||||
return 1;
|
||||
|
||||
file = fopen (file_name, "r+b");
|
||||
if (file == NULL)
|
||||
{
|
||||
error (_("Input file '%s' is not readable\n"), file_name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fread (armag, SARMAG, 1, file) != 1)
|
||||
{
|
||||
error (_("%s: Failed to read file's magic number\n"),
|
||||
file_name);
|
||||
fclose (file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (memcmp (armag, ARMAG, SARMAG) == 0)
|
||||
ret = process_archive (file_name, file, FALSE);
|
||||
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
|
||||
ret = process_archive (file_name, file, TRUE);
|
||||
else
|
||||
{
|
||||
rewind (file);
|
||||
archive_file_size = archive_file_offset = 0;
|
||||
ret = process_object (file_name, file);
|
||||
}
|
||||
|
||||
fclose (file);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct
|
||||
{
|
||||
int osabi;
|
||||
const char *name;
|
||||
}
|
||||
osabis[] =
|
||||
{
|
||||
{ ELFOSABI_NONE, "none" },
|
||||
{ ELFOSABI_HPUX, "HPUX" },
|
||||
{ ELFOSABI_NETBSD, "NetBSD" },
|
||||
{ ELFOSABI_GNU, "GNU" },
|
||||
{ ELFOSABI_GNU, "Linux" },
|
||||
{ ELFOSABI_SOLARIS, "Solaris" },
|
||||
{ ELFOSABI_AIX, "AIX" },
|
||||
{ ELFOSABI_IRIX, "Irix" },
|
||||
{ ELFOSABI_FREEBSD, "FreeBSD" },
|
||||
{ ELFOSABI_TRU64, "TRU64" },
|
||||
{ ELFOSABI_MODESTO, "Modesto" },
|
||||
{ ELFOSABI_OPENBSD, "OpenBSD" },
|
||||
{ ELFOSABI_OPENVMS, "OpenVMS" },
|
||||
{ ELFOSABI_NSK, "NSK" },
|
||||
{ ELFOSABI_AROS, "AROS" },
|
||||
{ ELFOSABI_FENIXOS, "FenixOS" }
|
||||
};
|
||||
|
||||
/* Return ELFOSABI_XXX for an OSABI string, OSABI. */
|
||||
|
||||
static int
|
||||
elf_osabi (const char *osabi)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (osabis); i++)
|
||||
if (strcasecmp (osabi, osabis[i].name) == 0)
|
||||
return osabis[i].osabi;
|
||||
|
||||
error (_("Unknown OSABI: %s\n"), osabi);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Return EM_XXX for a machine string, MACH. */
|
||||
|
||||
static int
|
||||
elf_machine (const char *mach)
|
||||
{
|
||||
if (strcasecmp (mach, "l1om") == 0)
|
||||
return EM_L1OM;
|
||||
if (strcasecmp (mach, "k1om") == 0)
|
||||
return EM_K1OM;
|
||||
if (strcasecmp (mach, "x86_64") == 0)
|
||||
return EM_X86_64;
|
||||
if (strcasecmp (mach, "x86-64") == 0)
|
||||
return EM_X86_64;
|
||||
if (strcasecmp (mach, "none") == 0)
|
||||
return EM_NONE;
|
||||
|
||||
error (_("Unknown machine type: %s\n"), mach);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Return ELF class for a machine type, MACH. */
|
||||
|
||||
static int
|
||||
elf_class (int mach)
|
||||
{
|
||||
switch (mach)
|
||||
{
|
||||
case EM_L1OM:
|
||||
case EM_K1OM:
|
||||
case EM_X86_64:
|
||||
return ELFCLASS64;
|
||||
case EM_NONE:
|
||||
return ELFCLASSNONE;
|
||||
default:
|
||||
error (_("Unknown machine type: %d\n"), mach);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return ET_XXX for a type string, TYPE. */
|
||||
|
||||
static int
|
||||
elf_type (const char *type)
|
||||
{
|
||||
if (strcasecmp (type, "rel") == 0)
|
||||
return ET_REL;
|
||||
if (strcasecmp (type, "exec") == 0)
|
||||
return ET_EXEC;
|
||||
if (strcasecmp (type, "dyn") == 0)
|
||||
return ET_DYN;
|
||||
if (strcasecmp (type, "none") == 0)
|
||||
return ET_NONE;
|
||||
|
||||
error (_("Unknown type: %s\n"), type);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
enum command_line_switch
|
||||
{
|
||||
OPTION_INPUT_MACH = 150,
|
||||
OPTION_OUTPUT_MACH,
|
||||
OPTION_INPUT_TYPE,
|
||||
OPTION_OUTPUT_TYPE,
|
||||
OPTION_INPUT_OSABI,
|
||||
OPTION_OUTPUT_OSABI
|
||||
};
|
||||
|
||||
static struct option options[] =
|
||||
{
|
||||
{"input-mach", required_argument, 0, OPTION_INPUT_MACH},
|
||||
{"output-mach", required_argument, 0, OPTION_OUTPUT_MACH},
|
||||
{"input-type", required_argument, 0, OPTION_INPUT_TYPE},
|
||||
{"output-type", required_argument, 0, OPTION_OUTPUT_TYPE},
|
||||
{"input-osabi", required_argument, 0, OPTION_INPUT_OSABI},
|
||||
{"output-osabi", required_argument, 0, OPTION_OUTPUT_OSABI},
|
||||
{"version", no_argument, 0, 'v'},
|
||||
{"help", no_argument, 0, 'h'},
|
||||
{0, no_argument, 0, 0}
|
||||
};
|
||||
|
||||
static void
|
||||
usage (FILE *stream, int exit_status)
|
||||
{
|
||||
fprintf (stream, _("Usage: %s <option(s)> elffile(s)\n"),
|
||||
program_name);
|
||||
fprintf (stream, _(" Update the ELF header of ELF files\n"));
|
||||
fprintf (stream, _(" The options are:\n"));
|
||||
fprintf (stream, _("\
|
||||
--input-mach <machine> Set input machine type to <machine>\n\
|
||||
--output-mach <machine> Set output machine type to <machine>\n\
|
||||
--input-type <type> Set input file type to <type>\n\
|
||||
--output-type <type> Set output file type to <type>\n\
|
||||
--input-osabi <osabi> Set input OSABI to <osabi>\n\
|
||||
--output-osabi <osabi> Set output OSABI to <osabi>\n\
|
||||
-h --help Display this information\n\
|
||||
-v --version Display the version number of %s\n\
|
||||
"),
|
||||
program_name);
|
||||
if (REPORT_BUGS_TO[0] && exit_status == 0)
|
||||
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
|
||||
exit (exit_status);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char ** argv)
|
||||
{
|
||||
int c, status;
|
||||
|
||||
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
|
||||
setlocale (LC_MESSAGES, "");
|
||||
#endif
|
||||
#if defined (HAVE_SETLOCALE)
|
||||
setlocale (LC_CTYPE, "");
|
||||
#endif
|
||||
bindtextdomain (PACKAGE, LOCALEDIR);
|
||||
textdomain (PACKAGE);
|
||||
|
||||
expandargv (&argc, &argv);
|
||||
|
||||
while ((c = getopt_long (argc, argv, "hv",
|
||||
options, (int *) 0)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case OPTION_INPUT_MACH:
|
||||
input_elf_machine = elf_machine (optarg);
|
||||
if (input_elf_machine < 0)
|
||||
return 1;
|
||||
input_elf_class = elf_class (input_elf_machine);
|
||||
if (input_elf_class < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case OPTION_OUTPUT_MACH:
|
||||
output_elf_machine = elf_machine (optarg);
|
||||
if (output_elf_machine < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case OPTION_INPUT_TYPE:
|
||||
input_elf_type = elf_type (optarg);
|
||||
if (input_elf_type < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case OPTION_OUTPUT_TYPE:
|
||||
output_elf_type = elf_type (optarg);
|
||||
if (output_elf_type < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case OPTION_INPUT_OSABI:
|
||||
input_elf_osabi = elf_osabi (optarg);
|
||||
if (input_elf_osabi < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case OPTION_OUTPUT_OSABI:
|
||||
output_elf_osabi = elf_osabi (optarg);
|
||||
if (output_elf_osabi < 0)
|
||||
return 1;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage (stdout, 0);
|
||||
|
||||
case 'v':
|
||||
print_version (program_name);
|
||||
break;
|
||||
|
||||
default:
|
||||
usage (stderr, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind == argc
|
||||
|| (output_elf_machine == -1
|
||||
&& output_elf_type == -1
|
||||
&& output_elf_osabi == -1))
|
||||
usage (stderr, 1);
|
||||
|
||||
status = 0;
|
||||
while (optind < argc)
|
||||
status |= process_file (argv[optind++]);
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -1,260 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Embed an SPU ELF executable into a PowerPC object file.
|
||||
#
|
||||
# Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of GNU Binutils.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
# 02110-1301, USA.
|
||||
|
||||
usage ()
|
||||
{
|
||||
echo "Usage: embedspu [flags] symbol_name input_filename output_filename"
|
||||
echo
|
||||
echo " input_filename: SPU ELF executable to be embedded"
|
||||
echo " output_filename: Resulting PowerPC object file"
|
||||
echo " symbol_name: Name of program handle struct to be defined"
|
||||
echo " flags: GCC flags defining PowerPC object file format"
|
||||
echo " (e.g. -m32 or -m64)"
|
||||
exit 1
|
||||
}
|
||||
|
||||
program_transform_name=
|
||||
mydir=`dirname "$0"`
|
||||
|
||||
find_prog ()
|
||||
{
|
||||
prog=`echo $1 | sed "$program_transform_name"`
|
||||
prog="$mydir/$prog"
|
||||
test -x "$prog" && return 0
|
||||
prog="$mydir/$1"
|
||||
test -x "$prog" && return 0
|
||||
prog=`echo $1 | sed "$program_transform_name"`
|
||||
which $prog > /dev/null 2> /dev/null && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
SYMBOL=
|
||||
INFILE=
|
||||
OUTFILE=
|
||||
FLAGS=
|
||||
|
||||
parse_args ()
|
||||
{
|
||||
while test -n "$1"; do
|
||||
case "$1" in
|
||||
-*) FLAGS="${FLAGS} $1" ;;
|
||||
*) if test -z "$SYMBOL"; then
|
||||
SYMBOL="$1"
|
||||
elif test -z "$INFILE"; then
|
||||
INFILE="$1"
|
||||
elif test -z "$OUTFILE"; then
|
||||
OUTFILE="$1"
|
||||
else
|
||||
echo "Too many arguments!"
|
||||
usage
|
||||
fi ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if test -z "$OUTFILE"; then
|
||||
usage
|
||||
fi
|
||||
if test ! -r "$INFILE"; then
|
||||
echo "${INFILE}: File not found"
|
||||
usage
|
||||
fi
|
||||
}
|
||||
|
||||
main ()
|
||||
{
|
||||
parse_args "$@"
|
||||
|
||||
# Find a powerpc gcc. Support running from a combined tree build.
|
||||
if test -x "$mydir/../gcc/xgcc"; then
|
||||
CC="$mydir/../gcc/xgcc -B$mydir/../gcc/"
|
||||
else
|
||||
find_prog gcc
|
||||
if test $? -ne 0; then
|
||||
echo "Cannot find $prog"
|
||||
exit 1
|
||||
fi
|
||||
CC="$prog"
|
||||
fi
|
||||
|
||||
# Find readelf. Any old readelf should do.
|
||||
find_prog readelf
|
||||
if test $? -ne 0; then
|
||||
if which readelf > /dev/null 2> /dev/null; then
|
||||
prog=readelf
|
||||
else
|
||||
echo "Cannot find $prog"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
READELF="$prog"
|
||||
|
||||
# Sanity check the input file
|
||||
if ! ${READELF} -h ${INFILE} | grep 'Class:.*ELF32' >/dev/null 2>/dev/null \
|
||||
|| ! ${READELF} -h ${INFILE} | grep 'Type:.*EXEC' >/dev/null 2>/dev/null \
|
||||
|| ! ${READELF} -h ${INFILE} | egrep 'Machine:.*(SPU|17)' >/dev/null 2>/dev/null
|
||||
then
|
||||
echo "${INFILE}: Does not appear to be an SPU executable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
toe=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *\([0-9]*\)\] *\.toe *[PROGN]*BITS *\([0-9a-f]*\).*,\1 \2,p'`
|
||||
toe_addr=`echo $toe | sed -n -e 's,.* ,,p'`
|
||||
toe=`echo $toe | sed -n -e 's, .*,,p'`
|
||||
has_ea=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *\([0-9]*\)\] *\._ea *PROGBITS.*,\1,p'`
|
||||
# For loaded sections, pick off section number, address, and file offset
|
||||
sections=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *\([0-9]*\)\] *[^ ]* *PROGBITS *\([0-9a-f]*\) *\([0-9a-f]*\).*,\1 \2 \3,p'`
|
||||
sections=`echo ${sections}`
|
||||
# For relocation sections, pick off file offset and info (points to
|
||||
# section where relocs apply)
|
||||
relas=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *[0-9]*\] *[^ ]* *RELA *[0-9a-f]* *0*\([0-9a-f][0-9a-f]*\).* \([0-9a-f][0-9a-f]*\) *[0-9a-f][0-9a-f]*$,\1 \2,p'`
|
||||
relas=`echo ${relas}`
|
||||
|
||||
# Build embedded SPU image.
|
||||
# 1. The whole SPU ELF file is written to .rodata.speelf
|
||||
# 2. Symbols starting with the string "_EAR_" in the SPU ELF image are
|
||||
# special. They allow an SPU program to access corresponding symbols
|
||||
# (ie. minus the _EAR_ prefix), in the PowerPC program. _EAR_ without
|
||||
# a suffix is used to refer to the addrress of the SPU image in
|
||||
# PowerPC address space. _EAR_* symbols must all be defined in .toe
|
||||
# at 16 byte intervals, or they must be defined in other non-bss
|
||||
# sections.
|
||||
# Find all _EAR_ symbols in .toe using readelf, sort by address, and
|
||||
# write the address of the corresponding PowerPC symbol in a table
|
||||
# built in .data.spetoe. For _EAR_ symbols not in .toe, create
|
||||
# .reloc commands to relocate their location directly.
|
||||
# 3. Look for R_SPU_PPU32 and R_SPU_PPU64 relocations in the SPU ELF image
|
||||
# and create .reloc commands for them.
|
||||
# 4. Write a struct spe_program_handle to .data.
|
||||
# 5. Write a table of _SPUEAR_ symbols.
|
||||
${CC} ${FLAGS} -x assembler-with-cpp -nostartfiles -nostdlib \
|
||||
-Wa,-mbig -Wa,-noexecstack -Wl,-r -Wl,-x -o ${OUTFILE} - <<EOF
|
||||
.section .data.spetoe,"aw",@progbits
|
||||
.p2align 7
|
||||
__spetoe__:
|
||||
`${READELF} -s -W ${INFILE} | grep ' _EAR_' | sort -k 2 | awk \
|
||||
'BEGIN { \
|
||||
addr = strtonum ("0x" "'${toe_addr:-0}'"); \
|
||||
split ("'"${sections}"'", s, " "); \
|
||||
for (i = 1; i in s; i += 3) { \
|
||||
sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \
|
||||
} \
|
||||
} \
|
||||
$7 == "'${toe}'" && strtonum ("0x" $2) != addr { \
|
||||
print "#error Symbol " $8 " not in 16 byte element toe array!"; \
|
||||
} \
|
||||
$7 == "'${toe}'" { \
|
||||
addr = addr + 16; \
|
||||
} \
|
||||
$7 == "'${toe}'" { \
|
||||
print "#ifdef _LP64"; \
|
||||
print " .quad " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0"; \
|
||||
print "#else"; \
|
||||
print " .int 0, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0, 0"; \
|
||||
print "#endif"; \
|
||||
} \
|
||||
$7 != "'${toe}'" && $7 in sec_off { \
|
||||
print "#ifdef _LP64"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] ", R_PPC64_ADDR64, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \
|
||||
print "#else"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] + 4 ", R_PPC_ADDR32, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \
|
||||
print "#endif"; \
|
||||
if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
|
||||
} \
|
||||
$7 != "'${toe}'" && ! $7 in sec_off { \
|
||||
print "#error Section not found for " $8; \
|
||||
} \
|
||||
'`
|
||||
`test -z "${relas}" || ${READELF} -r -W ${INFILE} | awk \
|
||||
'BEGIN { \
|
||||
split ("'"${sections}"'", s, " "); \
|
||||
for (i = 1; i in s; i += 3) { \
|
||||
sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \
|
||||
} \
|
||||
split ("'"${relas}"'", s, " "); \
|
||||
for (i = 1; i in s; i += 2) { \
|
||||
rela[s[i]] = strtonum (s[i+1]); \
|
||||
} \
|
||||
} \
|
||||
/^Relocation section/ { \
|
||||
sec = substr($6, 3); \
|
||||
} \
|
||||
$3 ~ /R_SPU_PPU/ { \
|
||||
print "#ifdef _LP64"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" substr($3, 10) ", " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \
|
||||
print "#else"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + (substr($3, 10) == "64" ? 4 : 0)", R_PPC_ADDR32, " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \
|
||||
print "#endif"; \
|
||||
if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
|
||||
} \
|
||||
$3 ~ /unrecognized:/ { \
|
||||
print "#ifdef _LP64"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" ($4 == "f" ? "64" : "32") ", " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \
|
||||
print "#else"; \
|
||||
print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + ($4 == "f" ? 4 : 0)", R_PPC_ADDR32, " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \
|
||||
print "#endif"; \
|
||||
if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
|
||||
} \
|
||||
'`
|
||||
#if ${has_ea:-0}
|
||||
.section .data.speelf,"aw",@progbits
|
||||
#elif defined (HAS_RELOCS) && (defined (__PIC__) || defined (__PIE__))
|
||||
.section .data.rel.ro.speelf,"a",@progbits
|
||||
#else
|
||||
.section .rodata.speelf,"a",@progbits
|
||||
#endif
|
||||
.p2align 7
|
||||
__speelf__:
|
||||
.incbin "${INFILE}"
|
||||
|
||||
.section .data.spehandle,"aw",@progbits
|
||||
.globl ${SYMBOL}
|
||||
.type ${SYMBOL}, @object
|
||||
# fill in a struct spe_program_handle
|
||||
#ifdef _LP64
|
||||
.p2align 3
|
||||
${SYMBOL}:
|
||||
.int 24
|
||||
.int 0
|
||||
.quad __speelf__
|
||||
.quad __spetoe__
|
||||
#else
|
||||
.p2align 2
|
||||
${SYMBOL}:
|
||||
.int 12
|
||||
.int __speelf__
|
||||
.int __spetoe__
|
||||
#endif
|
||||
.size ${SYMBOL}, . - ${SYMBOL}
|
||||
|
||||
`${READELF} -s -W ${INFILE} | grep ' _SPUEAR_' | sort -k 2 | awk \
|
||||
'{ \
|
||||
print " .globl '${SYMBOL}'_" substr($8, 9); \
|
||||
print " .type '${SYMBOL}'_" substr($8, 9) ", @object"; \
|
||||
print " .size '${SYMBOL}'_" substr($8, 9) ", 4"; \
|
||||
print "'${SYMBOL}'_" substr($8, 9) ":"; \
|
||||
print " .int 0x" $2; \
|
||||
} \
|
||||
'`
|
||||
EOF
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -1,141 +0,0 @@
|
||||
/* Binutils emulation layer.
|
||||
Copyright 2002, 2003, 2005, 2006, 2007, 2008, 2010
|
||||
Free Software Foundation, Inc.
|
||||
Written by Tom Rix, Red Hat Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "binemul.h"
|
||||
#include "bfdlink.h"
|
||||
#include "coff/internal.h"
|
||||
#include "coff/xcoff.h"
|
||||
#include "libcoff.h"
|
||||
#include "libxcoff.h"
|
||||
|
||||
/* Default to <bigaf>. */
|
||||
/* FIXME: write only variable. */
|
||||
static bfd_boolean big_archive = TRUE;
|
||||
|
||||
/* Whether to include 32 bit objects. */
|
||||
static bfd_boolean X32 = TRUE;
|
||||
|
||||
/* Whether to include 64 bit objects. */
|
||||
static bfd_boolean X64 = FALSE;
|
||||
|
||||
static void
|
||||
ar_emul_aix_usage (FILE *fp)
|
||||
{
|
||||
AR_EMUL_USAGE_PRINT_OPTION_HEADER (fp);
|
||||
/* xgettext:c-format */
|
||||
fprintf (fp, _(" [-g] - 32 bit small archive\n"));
|
||||
fprintf (fp, _(" [-X32] - ignores 64 bit objects\n"));
|
||||
fprintf (fp, _(" [-X64] - ignores 32 bit objects\n"));
|
||||
fprintf (fp, _(" [-X32_64] - accepts 32 and 64 bit objects\n"));
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
check_aix (bfd *try_bfd)
|
||||
{
|
||||
extern const bfd_target rs6000coff_vec;
|
||||
extern const bfd_target rs6000coff64_vec;
|
||||
extern const bfd_target aix5coff64_vec;
|
||||
|
||||
if (bfd_check_format (try_bfd, bfd_object))
|
||||
{
|
||||
if (!X32 && try_bfd->xvec == &rs6000coff_vec)
|
||||
return FALSE;
|
||||
|
||||
if (!X64 && (try_bfd->xvec == &rs6000coff64_vec
|
||||
|| try_bfd->xvec == &aix5coff64_vec))
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
ar_emul_aix_append (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose, bfd_boolean flatten)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
new_bfd = bfd_openr (file_name, target);
|
||||
AR_EMUL_ELEMENT_CHECK (new_bfd, file_name);
|
||||
|
||||
return do_ar_emul_append (after_bfd, new_bfd, verbose, flatten, check_aix);
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
ar_emul_aix_replace (bfd **after_bfd, char *file_name, const char *target,
|
||||
bfd_boolean verbose)
|
||||
{
|
||||
bfd *new_bfd;
|
||||
|
||||
new_bfd = bfd_openr (file_name, target);
|
||||
AR_EMUL_ELEMENT_CHECK (new_bfd, file_name);
|
||||
|
||||
if (!check_aix (new_bfd))
|
||||
return FALSE;
|
||||
|
||||
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, file_name);
|
||||
|
||||
new_bfd->archive_next = *after_bfd;
|
||||
*after_bfd = new_bfd;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static bfd_boolean
|
||||
ar_emul_aix_parse_arg (char *arg)
|
||||
{
|
||||
if (CONST_STRNEQ (arg, "-X32_64"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = TRUE;
|
||||
X64 = TRUE;
|
||||
}
|
||||
else if (CONST_STRNEQ (arg, "-X32"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = TRUE;
|
||||
X64 = FALSE;
|
||||
}
|
||||
else if (CONST_STRNEQ (arg, "-X64"))
|
||||
{
|
||||
big_archive = TRUE;
|
||||
X32 = FALSE;
|
||||
X64 = TRUE;
|
||||
}
|
||||
else if (CONST_STRNEQ (arg, "-g"))
|
||||
{
|
||||
big_archive = FALSE;
|
||||
X32 = TRUE;
|
||||
X64 = FALSE;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
struct bin_emulation_xfer_struct bin_aix_emulation =
|
||||
{
|
||||
ar_emul_aix_usage,
|
||||
ar_emul_aix_append,
|
||||
ar_emul_aix_replace,
|
||||
ar_emul_aix_parse_arg,
|
||||
};
|
||||
@@ -1,30 +0,0 @@
|
||||
/* Binutils emulation layer.
|
||||
Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
|
||||
Written by Tom Rix, Red Hat Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
#include "binemul.h"
|
||||
|
||||
struct bin_emulation_xfer_struct bin_vanilla_emulation =
|
||||
{
|
||||
ar_emul_default_usage,
|
||||
ar_emul_default_append,
|
||||
ar_emul_default_replace,
|
||||
ar_emul_default_parse_arg,
|
||||
};
|
||||
@@ -1,249 +0,0 @@
|
||||
/* filemode.c -- make a string describing file modes
|
||||
Copyright 1985, 1990, 1991, 1994, 1995, 1997, 1999, 2002, 2003, 2005,
|
||||
2007 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
|
||||
static char ftypelet (unsigned long);
|
||||
static void setst (unsigned long, char *);
|
||||
|
||||
/* filemodestring - fill in string STR with an ls-style ASCII
|
||||
representation of the st_mode field of file stats block STATP.
|
||||
10 characters are stored in STR; no terminating null is added.
|
||||
The characters stored in STR are:
|
||||
|
||||
0 File type. 'd' for directory, 'c' for character
|
||||
special, 'b' for block special, 'm' for multiplex,
|
||||
'l' for symbolic link, 's' for socket, 'p' for fifo,
|
||||
'-' for any other file type
|
||||
|
||||
1 'r' if the owner may read, '-' otherwise.
|
||||
|
||||
2 'w' if the owner may write, '-' otherwise.
|
||||
|
||||
3 'x' if the owner may execute, 's' if the file is
|
||||
set-user-id, '-' otherwise.
|
||||
'S' if the file is set-user-id, but the execute
|
||||
bit isn't set.
|
||||
|
||||
4 'r' if group members may read, '-' otherwise.
|
||||
|
||||
5 'w' if group members may write, '-' otherwise.
|
||||
|
||||
6 'x' if group members may execute, 's' if the file is
|
||||
set-group-id, '-' otherwise.
|
||||
'S' if it is set-group-id but not executable.
|
||||
|
||||
7 'r' if any user may read, '-' otherwise.
|
||||
|
||||
8 'w' if any user may write, '-' otherwise.
|
||||
|
||||
9 'x' if any user may execute, 't' if the file is "sticky"
|
||||
(will be retained in swap space after execution), '-'
|
||||
otherwise.
|
||||
'T' if the file is sticky but not executable. */
|
||||
|
||||
/* Get definitions for the file permission bits. */
|
||||
|
||||
#ifndef S_IRWXU
|
||||
#define S_IRWXU 0700
|
||||
#endif
|
||||
#ifndef S_IRUSR
|
||||
#define S_IRUSR 0400
|
||||
#endif
|
||||
#ifndef S_IWUSR
|
||||
#define S_IWUSR 0200
|
||||
#endif
|
||||
#ifndef S_IXUSR
|
||||
#define S_IXUSR 0100
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXG
|
||||
#define S_IRWXG 0070
|
||||
#endif
|
||||
#ifndef S_IRGRP
|
||||
#define S_IRGRP 0040
|
||||
#endif
|
||||
#ifndef S_IWGRP
|
||||
#define S_IWGRP 0020
|
||||
#endif
|
||||
#ifndef S_IXGRP
|
||||
#define S_IXGRP 0010
|
||||
#endif
|
||||
|
||||
#ifndef S_IRWXO
|
||||
#define S_IRWXO 0007
|
||||
#endif
|
||||
#ifndef S_IROTH
|
||||
#define S_IROTH 0004
|
||||
#endif
|
||||
#ifndef S_IWOTH
|
||||
#define S_IWOTH 0002
|
||||
#endif
|
||||
#ifndef S_IXOTH
|
||||
#define S_IXOTH 0001
|
||||
#endif
|
||||
|
||||
/* Like filemodestring, but only the relevant part of the `struct stat'
|
||||
is given as an argument. */
|
||||
|
||||
void
|
||||
mode_string (unsigned long mode, char *str)
|
||||
{
|
||||
str[0] = ftypelet ((unsigned long) mode);
|
||||
str[1] = (mode & S_IRUSR) != 0 ? 'r' : '-';
|
||||
str[2] = (mode & S_IWUSR) != 0 ? 'w' : '-';
|
||||
str[3] = (mode & S_IXUSR) != 0 ? 'x' : '-';
|
||||
str[4] = (mode & S_IRGRP) != 0 ? 'r' : '-';
|
||||
str[5] = (mode & S_IWGRP) != 0 ? 'w' : '-';
|
||||
str[6] = (mode & S_IXGRP) != 0 ? 'x' : '-';
|
||||
str[7] = (mode & S_IROTH) != 0 ? 'r' : '-';
|
||||
str[8] = (mode & S_IWOTH) != 0 ? 'w' : '-';
|
||||
str[9] = (mode & S_IXOTH) != 0 ? 'x' : '-';
|
||||
setst ((unsigned long) mode, str);
|
||||
}
|
||||
|
||||
/* Return a character indicating the type of file described by
|
||||
file mode BITS:
|
||||
'd' for directories
|
||||
'b' for block special files
|
||||
'c' for character special files
|
||||
'm' for multiplexer files
|
||||
'l' for symbolic links
|
||||
's' for sockets
|
||||
'p' for fifos
|
||||
'-' for any other file type. */
|
||||
|
||||
#ifndef S_ISDIR
|
||||
#ifdef S_IFDIR
|
||||
#define S_ISDIR(i) (((i) & S_IFMT) == S_IFDIR)
|
||||
#else /* ! defined (S_IFDIR) */
|
||||
#define S_ISDIR(i) (((i) & 0170000) == 040000)
|
||||
#endif /* ! defined (S_IFDIR) */
|
||||
#endif /* ! defined (S_ISDIR) */
|
||||
|
||||
#ifndef S_ISBLK
|
||||
#ifdef S_IFBLK
|
||||
#define S_ISBLK(i) (((i) & S_IFMT) == S_IFBLK)
|
||||
#else /* ! defined (S_IFBLK) */
|
||||
#define S_ISBLK(i) 0
|
||||
#endif /* ! defined (S_IFBLK) */
|
||||
#endif /* ! defined (S_ISBLK) */
|
||||
|
||||
#ifndef S_ISCHR
|
||||
#ifdef S_IFCHR
|
||||
#define S_ISCHR(i) (((i) & S_IFMT) == S_IFCHR)
|
||||
#else /* ! defined (S_IFCHR) */
|
||||
#define S_ISCHR(i) 0
|
||||
#endif /* ! defined (S_IFCHR) */
|
||||
#endif /* ! defined (S_ISCHR) */
|
||||
|
||||
#ifndef S_ISFIFO
|
||||
#ifdef S_IFIFO
|
||||
#define S_ISFIFO(i) (((i) & S_IFMT) == S_IFIFO)
|
||||
#else /* ! defined (S_IFIFO) */
|
||||
#define S_ISFIFO(i) 0
|
||||
#endif /* ! defined (S_IFIFO) */
|
||||
#endif /* ! defined (S_ISFIFO) */
|
||||
|
||||
#ifndef S_ISSOCK
|
||||
#ifdef S_IFSOCK
|
||||
#define S_ISSOCK(i) (((i) & S_IFMT) == S_IFSOCK)
|
||||
#else /* ! defined (S_IFSOCK) */
|
||||
#define S_ISSOCK(i) 0
|
||||
#endif /* ! defined (S_IFSOCK) */
|
||||
#endif /* ! defined (S_ISSOCK) */
|
||||
|
||||
#ifndef S_ISLNK
|
||||
#ifdef S_IFLNK
|
||||
#define S_ISLNK(i) (((i) & S_IFMT) == S_IFLNK)
|
||||
#else /* ! defined (S_IFLNK) */
|
||||
#define S_ISLNK(i) 0
|
||||
#endif /* ! defined (S_IFLNK) */
|
||||
#endif /* ! defined (S_ISLNK) */
|
||||
|
||||
static char
|
||||
ftypelet (unsigned long bits)
|
||||
{
|
||||
if (S_ISDIR (bits))
|
||||
return 'd';
|
||||
if (S_ISLNK (bits))
|
||||
return 'l';
|
||||
if (S_ISBLK (bits))
|
||||
return 'b';
|
||||
if (S_ISCHR (bits))
|
||||
return 'c';
|
||||
if (S_ISSOCK (bits))
|
||||
return 's';
|
||||
if (S_ISFIFO (bits))
|
||||
return 'p';
|
||||
|
||||
#ifdef S_IFMT
|
||||
#ifdef S_IFMPC
|
||||
if ((bits & S_IFMT) == S_IFMPC
|
||||
|| (bits & S_IFMT) == S_IFMPB)
|
||||
return 'm';
|
||||
#endif
|
||||
#ifdef S_IFNWK
|
||||
if ((bits & S_IFMT) == S_IFNWK)
|
||||
return 'n';
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return '-';
|
||||
}
|
||||
|
||||
/* Set the 's' and 't' flags in file attributes string CHARS,
|
||||
according to the file mode BITS. */
|
||||
|
||||
static void
|
||||
setst (unsigned long bits ATTRIBUTE_UNUSED, char *chars ATTRIBUTE_UNUSED)
|
||||
{
|
||||
#ifdef S_ISUID
|
||||
if (bits & S_ISUID)
|
||||
{
|
||||
if (chars[3] != 'x')
|
||||
/* Set-uid, but not executable by owner. */
|
||||
chars[3] = 'S';
|
||||
else
|
||||
chars[3] = 's';
|
||||
}
|
||||
#endif
|
||||
#ifdef S_ISGID
|
||||
if (bits & S_ISGID)
|
||||
{
|
||||
if (chars[6] != 'x')
|
||||
/* Set-gid, but not executable by group. */
|
||||
chars[6] = 'S';
|
||||
else
|
||||
chars[6] = 's';
|
||||
}
|
||||
#endif
|
||||
#ifdef S_ISVTX
|
||||
if (bits & S_ISVTX)
|
||||
{
|
||||
if (chars[9] != 'x')
|
||||
/* Sticky, but not executable by others. */
|
||||
chars[9] = 'T';
|
||||
else
|
||||
chars[9] = 't';
|
||||
}
|
||||
#endif
|
||||
}
|
||||
7411
binutils/ieee.c
7411
binutils/ieee.c
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with ar.o to flag that this program is 'ranlib' (not 'ar'). */
|
||||
|
||||
int is_ranlib = 1;
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with objcopy.o to flag that this program is 'strip' (not
|
||||
'objcopy'). */
|
||||
|
||||
int is_strip = 1;
|
||||
@@ -1,75 +0,0 @@
|
||||
#
|
||||
# Makefile for binutils under openVMS (Alpha and Itanium)
|
||||
#
|
||||
# For use with gnu-make for vms
|
||||
#
|
||||
# Created by Klaus Kaempf, kkaempf@rmi.de
|
||||
#
|
||||
#
|
||||
|
||||
DEFS=/define=("OBJDUMP_PRIVATE_VECTORS=")
|
||||
OPT=/noopt/debug
|
||||
CFLAGS=$(OPT)/include=([],"../include",[-.bfd])$(DEFS)\
|
||||
/name=(as_is,shortened)\
|
||||
/prefix=(all,except=("getopt","optarg","optopt","optind","opterr"))\
|
||||
/warns=(info=(ptrmismatch,shiftcount))
|
||||
|
||||
LIBBFD = [-.bfd]libbfd.olb/lib
|
||||
LIBBFD_DEP = [-.bfd]libbfd.olb
|
||||
LIBIBERTY_DEP = [-.libiberty]libiberty.olb
|
||||
LIBIBERTY = [-.libiberty]libiberty.olb/lib
|
||||
OPCODES_DEP = [-.opcodes]libopcodes.olb
|
||||
OPCODES = [-.opcodes]libopcodes.olb/lib
|
||||
|
||||
DEBUG_OBJS = rddbg.obj,debug.obj,stabs.obj,ieee.obj,rdcoff.obj,dwarf.obj,\
|
||||
elfcomm.obj
|
||||
|
||||
BULIBS = bucomm.obj,version.obj,filemode.obj
|
||||
|
||||
ADDL_DEPS = $(BULIBS),$(LIBBFD_DEP),$(LIBIBERTY_DEP)
|
||||
ADDL_LIBS = $(BULIBS),$(LIBBFD),$(LIBIBERTY)
|
||||
|
||||
SIZEOBJS = $(ADDL_DEPS),size.obj
|
||||
|
||||
STRINGSOBJS = $(ADDL_DEPS),strings.obj
|
||||
|
||||
NMOBJS = $(ADDL_DEPS),nm.obj
|
||||
|
||||
ADDR2LINEOBJS = $(ADDL_DEPS),addr2line.obj
|
||||
|
||||
OBJDUMPOBJS = objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_DEPS),$(OPCODES_DEP)
|
||||
|
||||
READELFOBJS = readelf.obj,dwarf.obj,unwind-ia64.obj,$(ADDL_DEPS)
|
||||
|
||||
all: config.h size.exe strings.exe objdump.exe nm.exe addr2line.exe
|
||||
|
||||
size.exe: $(SIZEOBJS)
|
||||
link/exe=$@ size.obj,$(ADDL_LIBS)
|
||||
|
||||
strings.exe: $(STRINGSOBJS)
|
||||
link/exe=$@ strings.obj,$(ADDL_LIBS)
|
||||
|
||||
nm.exe: $(NMOBJS)
|
||||
link/exe=$@ nm.obj,$(ADDL_LIBS)
|
||||
|
||||
addr2line.exe: $(ADDR2LINEOBJS)
|
||||
link/exe=$@ addr2line.obj,$(ADDL_LIBS)
|
||||
|
||||
objdump.exe: $(OBJDUMPOBJS)
|
||||
link/exe=$@ objdump.obj,prdbg.obj,$(DEBUG_OBJS),$(ADDL_LIBS),$(OPCODES)
|
||||
|
||||
readelf.exe: $(READELFOBJS)
|
||||
link/exe=$@ readelf.obj,dwarf.obj,unwind-ia64.obj,$(ADDL_LIBS)
|
||||
|
||||
config.h:
|
||||
$$ @configure
|
||||
$(MAKE) -f makefile.vms "CC=$(CC)"
|
||||
|
||||
clean:
|
||||
$$ purge
|
||||
$(RM) *.obj;
|
||||
$(RM) *.exe;
|
||||
|
||||
distclean: clean
|
||||
$(RM) config.h;
|
||||
$(RM) makefile.vms;
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with ar.o to flag that this program decides at runtime
|
||||
(using argv[0] if it is is 'ar' or 'ranlib'. */
|
||||
|
||||
int is_ranlib = -1;
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with objcopy.o to flag that this program decides at runtime
|
||||
(using argv[0] if it is is 'strip' or 'objcopy'. */
|
||||
|
||||
int is_strip = -1;
|
||||
441
binutils/mclex.c
441
binutils/mclex.c
@@ -1,441 +0,0 @@
|
||||
/* mclex.c -- lexer for Windows mc files parser.
|
||||
Copyright 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by Kai Tietz, Onevision.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* This is a lexer used by the Windows rc file parser.
|
||||
It basically just recognized a bunch of keywords. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
#include "libiberty.h"
|
||||
#include "safe-ctype.h"
|
||||
#include "windmc.h"
|
||||
#include "mcparse.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/* Exported globals. */
|
||||
bfd_boolean mclex_want_nl = FALSE;
|
||||
bfd_boolean mclex_want_line = FALSE;
|
||||
bfd_boolean mclex_want_filename = FALSE;
|
||||
|
||||
/* Local globals. */
|
||||
static unichar *input_stream = NULL;
|
||||
static unichar *input_stream_pos = NULL;
|
||||
static int input_line = 1;
|
||||
static const char *input_filename = NULL;
|
||||
|
||||
void
|
||||
mc_set_content (const unichar *src)
|
||||
{
|
||||
if (!src)
|
||||
return;
|
||||
input_stream = input_stream_pos = unichar_dup (src);
|
||||
}
|
||||
|
||||
void
|
||||
mc_set_inputfile (const char *name)
|
||||
{
|
||||
if (! name || *name == 0)
|
||||
input_filename = "-";
|
||||
else
|
||||
{
|
||||
const char *s1 = strrchr (name, '/');
|
||||
const char *s2 = strrchr (name, '\\');
|
||||
|
||||
if (! s1)
|
||||
s1 = s2;
|
||||
if (s1 && s2 && s1 < s2)
|
||||
s1 = s2;
|
||||
if (! s1)
|
||||
s1 = name;
|
||||
else
|
||||
s1++;
|
||||
s1 = xstrdup (s1);
|
||||
input_filename = s1;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
show_msg (const char *kind, const char *msg, va_list argp)
|
||||
{
|
||||
fprintf (stderr, "In %s at line %d: %s: ", input_filename, input_line, kind);
|
||||
vfprintf (stderr, msg, argp);
|
||||
fprintf (stderr, ".\n");
|
||||
}
|
||||
|
||||
void
|
||||
mc_warn (const char *s, ...)
|
||||
{
|
||||
va_list argp;
|
||||
va_start (argp, s);
|
||||
show_msg ("warning", s, argp);
|
||||
va_end (argp);
|
||||
}
|
||||
|
||||
void
|
||||
mc_fatal (const char *s, ...)
|
||||
{
|
||||
va_list argp;
|
||||
va_start (argp, s);
|
||||
show_msg ("fatal", s, argp);
|
||||
va_end (argp);
|
||||
xexit (1);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
yyerror (const char *s, ...)
|
||||
{
|
||||
va_list argp;
|
||||
va_start (argp, s);
|
||||
show_msg ("parser", s, argp);
|
||||
va_end (argp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static unichar *
|
||||
get_diff (unichar *end, unichar *start)
|
||||
{
|
||||
unichar *ret;
|
||||
unichar save = *end;
|
||||
|
||||
*end = 0;
|
||||
ret = unichar_dup (start);
|
||||
*end = save;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static rc_uint_type
|
||||
parse_digit (unichar ch)
|
||||
{
|
||||
rc_uint_type base = 10, v = 0, c;
|
||||
|
||||
if (ch == '0')
|
||||
{
|
||||
base = 8;
|
||||
switch (input_stream_pos[0])
|
||||
{
|
||||
case 'x': case 'X': base = 16; input_stream_pos++; break;
|
||||
case 'o': case 'O': base = 8; input_stream_pos++; break;
|
||||
case 'b': case 'B': base = 2; input_stream_pos++; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
v = (rc_uint_type) (ch - '0');
|
||||
|
||||
while ((ch = input_stream_pos[0]) != 0)
|
||||
{
|
||||
if (ch >= 'A' && ch <= 'F')
|
||||
c = (rc_uint_type) (ch - 'A') + 10;
|
||||
else if (ch >= 'a' && ch <= 'f')
|
||||
c = (rc_uint_type) (ch - 'a') + 10;
|
||||
else if (ch >= '0' && ch <= '9')
|
||||
c = (rc_uint_type) (ch - '0');
|
||||
else
|
||||
break;
|
||||
v *= base;
|
||||
v += c;
|
||||
++input_stream_pos;
|
||||
}
|
||||
if (input_stream_pos[0] == 'U' || input_stream_pos[0] == 'u')
|
||||
input_stream_pos++;
|
||||
if (input_stream_pos[0] == 'L' || input_stream_pos[0] == 'l')
|
||||
input_stream_pos++;
|
||||
if (input_stream_pos[0] == 'L' || input_stream_pos[0] == 'l')
|
||||
input_stream_pos++;
|
||||
return v;
|
||||
}
|
||||
|
||||
static mc_keyword *keyword_top = NULL;
|
||||
|
||||
const mc_keyword *
|
||||
enum_facility (int e)
|
||||
{
|
||||
mc_keyword *h = keyword_top;
|
||||
|
||||
while (h != NULL)
|
||||
{
|
||||
while (h && strcmp (h->group_name, "facility") != 0)
|
||||
h = h->next;
|
||||
if (e == 0)
|
||||
return h;
|
||||
--e;
|
||||
if (h)
|
||||
h = h->next;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
const mc_keyword *
|
||||
enum_severity (int e)
|
||||
{
|
||||
mc_keyword *h = keyword_top;
|
||||
|
||||
while (h != NULL)
|
||||
{
|
||||
while (h && strcmp (h->group_name, "severity") != 0)
|
||||
h = h->next;
|
||||
if (e == 0)
|
||||
return h;
|
||||
--e;
|
||||
if (h)
|
||||
h = h->next;
|
||||
}
|
||||
return h;
|
||||
}
|
||||
|
||||
static void
|
||||
mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv)
|
||||
{
|
||||
unichar *usz, *usv = NULL;
|
||||
rc_uint_type usz_len;
|
||||
|
||||
unicode_from_codepage (&usz_len, &usz, sz, CP_ACP);
|
||||
if (sv)
|
||||
unicode_from_codepage (&usz_len, &usv, sv, CP_ACP);
|
||||
mc_add_keyword (usz, rid, grp, nv, usv);
|
||||
}
|
||||
|
||||
void
|
||||
mc_add_keyword (unichar *usz, int rid, const char *grp, rc_uint_type nv, unichar *sv)
|
||||
{
|
||||
mc_keyword *p, *c, *n;
|
||||
size_t len = unichar_len (usz);
|
||||
|
||||
c = keyword_top;
|
||||
p = NULL;
|
||||
while (c != NULL)
|
||||
{
|
||||
if (c->len > len)
|
||||
break;
|
||||
if (c->len == len)
|
||||
{
|
||||
int e = memcmp (usz, c->usz, len * sizeof (unichar));
|
||||
|
||||
if (e < 0)
|
||||
break;
|
||||
if (! e)
|
||||
{
|
||||
if (! strcmp (grp, "keyword") || strcmp (c->group_name, grp) != 0)
|
||||
fatal (_("Duplicate symbol entered into keyword list."));
|
||||
c->rid = rid;
|
||||
c->nval = nv;
|
||||
c->sval = (!sv ? NULL : unichar_dup (sv));
|
||||
if (! strcmp (grp, "language"))
|
||||
{
|
||||
const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv);
|
||||
|
||||
if (lag == NULL)
|
||||
fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv);
|
||||
memcpy (&c->lang_info, lag, sizeof (*lag));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
c = (p = c)->next;
|
||||
}
|
||||
n = xmalloc (sizeof (mc_keyword));
|
||||
n->next = c;
|
||||
n->len = len;
|
||||
n->group_name = grp;
|
||||
n->usz = usz;
|
||||
n->rid = rid;
|
||||
n->nval = nv;
|
||||
n->sval = (!sv ? NULL : unichar_dup (sv));
|
||||
if (! strcmp (grp, "language"))
|
||||
{
|
||||
const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv);
|
||||
if (lag == NULL)
|
||||
fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv);
|
||||
memcpy (&n->lang_info, lag, sizeof (*lag));
|
||||
}
|
||||
if (! p)
|
||||
keyword_top = n;
|
||||
else
|
||||
p->next = n;
|
||||
}
|
||||
|
||||
static int
|
||||
mc_token (const unichar *t, size_t len)
|
||||
{
|
||||
static int was_init = 0;
|
||||
mc_keyword *k;
|
||||
|
||||
if (! was_init)
|
||||
{
|
||||
was_init = 1;
|
||||
mc_add_keyword_ascii ("OutputBase", MCOUTPUTBASE, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("MessageIdTypedef", MCMESSAGEIDTYPEDEF, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("SeverityNames", MCSEVERITYNAMES, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("FacilityNames", MCFACILITYNAMES, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("LanguageNames", MCLANGUAGENAMES, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("MessageId", MCMESSAGEID, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("Severity", MCSEVERITY, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("Facility", MCFACILITY, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("SymbolicName", MCSYMBOLICNAME, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("Language", MCLANGUAGE, "keyword", 0, NULL);
|
||||
mc_add_keyword_ascii ("Success", MCTOKEN, "severity", 0, NULL);
|
||||
mc_add_keyword_ascii ("Informational", MCTOKEN, "severity", 1, NULL);
|
||||
mc_add_keyword_ascii ("Warning", MCTOKEN, "severity", 2, NULL);
|
||||
mc_add_keyword_ascii ("Error", MCTOKEN, "severity", 3, NULL);
|
||||
mc_add_keyword_ascii ("System", MCTOKEN, "facility", 0xff, NULL);
|
||||
mc_add_keyword_ascii ("Application", MCTOKEN, "facility", 0xfff, NULL);
|
||||
mc_add_keyword_ascii ("English", MCTOKEN, "language", 0x409, "MSG00001");
|
||||
}
|
||||
k = keyword_top;
|
||||
if (!len || !t || *t == 0)
|
||||
return -1;
|
||||
while (k != NULL)
|
||||
{
|
||||
if (k->len > len)
|
||||
break;
|
||||
if (k->len == len)
|
||||
{
|
||||
if (! memcmp (k->usz, t, len * sizeof (unichar)))
|
||||
{
|
||||
if (k->rid == MCTOKEN)
|
||||
yylval.tok = k;
|
||||
return k->rid;
|
||||
}
|
||||
}
|
||||
k = k->next;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
yylex (void)
|
||||
{
|
||||
unichar *start_token;
|
||||
unichar ch;
|
||||
|
||||
if (! input_stream_pos)
|
||||
{
|
||||
fatal ("Input stream not setuped.\n");
|
||||
return -1;
|
||||
}
|
||||
if (mclex_want_line)
|
||||
{
|
||||
start_token = input_stream_pos;
|
||||
if (input_stream_pos[0] == '.'
|
||||
&& (input_stream_pos[1] == '\n'
|
||||
|| (input_stream_pos[1] == '\r' && input_stream_pos[2] == '\n')))
|
||||
{
|
||||
mclex_want_line = FALSE;
|
||||
while (input_stream_pos[0] != 0 && input_stream_pos[0] != '\n')
|
||||
++input_stream_pos;
|
||||
if (input_stream_pos[0] == '\n')
|
||||
++input_stream_pos;
|
||||
return MCENDLINE;
|
||||
}
|
||||
while (input_stream_pos[0] != 0 && input_stream_pos[0] != '\n')
|
||||
++input_stream_pos;
|
||||
if (input_stream_pos[0] == '\n')
|
||||
++input_stream_pos;
|
||||
yylval.ustr = get_diff (input_stream_pos, start_token);
|
||||
return MCLINE;
|
||||
}
|
||||
while ((ch = input_stream_pos[0]) <= 0x20)
|
||||
{
|
||||
if (ch == 0)
|
||||
return -1;
|
||||
++input_stream_pos;
|
||||
if (ch == '\n')
|
||||
input_line += 1;
|
||||
if (mclex_want_nl && ch == '\n')
|
||||
{
|
||||
mclex_want_nl = FALSE;
|
||||
return NL;
|
||||
}
|
||||
}
|
||||
start_token = input_stream_pos;
|
||||
++input_stream_pos;
|
||||
if (mclex_want_filename)
|
||||
{
|
||||
mclex_want_filename = FALSE;
|
||||
if (ch == '"')
|
||||
{
|
||||
start_token++;
|
||||
while ((ch = input_stream_pos[0]) != 0)
|
||||
{
|
||||
if (ch == '"')
|
||||
break;
|
||||
++input_stream_pos;
|
||||
}
|
||||
yylval.ustr = get_diff (input_stream_pos, start_token);
|
||||
if (ch == '"')
|
||||
++input_stream_pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
while ((ch = input_stream_pos[0]) != 0)
|
||||
{
|
||||
if (ch <= 0x20 || ch == ')')
|
||||
break;
|
||||
++input_stream_pos;
|
||||
}
|
||||
yylval.ustr = get_diff (input_stream_pos, start_token);
|
||||
}
|
||||
return MCFILENAME;
|
||||
}
|
||||
switch (ch)
|
||||
{
|
||||
case ';':
|
||||
++start_token;
|
||||
while (input_stream_pos[0] != '\n' && input_stream_pos[0] != 0)
|
||||
++input_stream_pos;
|
||||
if (input_stream_pos[0] == '\n')
|
||||
input_stream_pos++;
|
||||
yylval.ustr = get_diff (input_stream_pos, start_token);
|
||||
return MCCOMMENT;
|
||||
case '=':
|
||||
return '=';
|
||||
case '(':
|
||||
return '(';
|
||||
case ')':
|
||||
return ')';
|
||||
case '+':
|
||||
return '+';
|
||||
case ':':
|
||||
return ':';
|
||||
case '0': case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
yylval.ival = parse_digit (ch);
|
||||
return MCNUMBER;
|
||||
default:
|
||||
if (ch >= 0x40)
|
||||
{
|
||||
int ret;
|
||||
while (input_stream_pos[0] >= 0x40 || (input_stream_pos[0] >= '0' && input_stream_pos[0] <= '9'))
|
||||
++input_stream_pos;
|
||||
ret = mc_token (start_token, (size_t) (input_stream_pos - start_token));
|
||||
if (ret != -1)
|
||||
return ret;
|
||||
yylval.ustr = get_diff (input_stream_pos, start_token);
|
||||
return MCIDENT;
|
||||
}
|
||||
yyerror ("illegal character 0x%x.", ch);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -1,356 +0,0 @@
|
||||
%{ /* mcparse.y -- parser for Windows mc files
|
||||
Copyright 2007
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Parser for Windows mc files
|
||||
Written by Kai Tietz, Onevision.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* This is a parser for Windows rc files. It is based on the parser
|
||||
by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "bfd.h"
|
||||
#include "bucomm.h"
|
||||
#include "libiberty.h"
|
||||
#include "windmc.h"
|
||||
#include "safe-ctype.h"
|
||||
|
||||
static rc_uint_type mc_last_id = 0;
|
||||
static rc_uint_type mc_sefa_val = 0;
|
||||
static unichar *mc_last_symbol = NULL;
|
||||
static const mc_keyword *mc_cur_severity = NULL;
|
||||
static const mc_keyword *mc_cur_facility = NULL;
|
||||
static mc_node *cur_node = NULL;
|
||||
|
||||
%}
|
||||
|
||||
%union
|
||||
{
|
||||
rc_uint_type ival;
|
||||
unichar *ustr;
|
||||
const mc_keyword *tok;
|
||||
mc_node *nod;
|
||||
};
|
||||
|
||||
%start input
|
||||
|
||||
%token NL
|
||||
%token<ustr> MCIDENT MCFILENAME MCLINE MCCOMMENT
|
||||
%token<tok> MCTOKEN
|
||||
%token MCENDLINE
|
||||
%token MCLANGUAGENAMES MCFACILITYNAMES MCSEVERITYNAMES MCOUTPUTBASE MCMESSAGEIDTYPEDEF
|
||||
%token MCLANGUAGE MCMESSAGEID MCSEVERITY MCFACILITY MCSYMBOLICNAME
|
||||
%token <ival> MCNUMBER
|
||||
|
||||
%type<ival> id vid sefasy_def
|
||||
%type<ustr> alias_name token lines comments
|
||||
%type<tok> lang
|
||||
|
||||
%%
|
||||
input: entities
|
||||
;
|
||||
|
||||
entities:
|
||||
/* empty */
|
||||
| entities entity
|
||||
;
|
||||
entity: global_section
|
||||
| message
|
||||
| comments
|
||||
{
|
||||
cur_node = mc_add_node ();
|
||||
cur_node->user_text = $1;
|
||||
}
|
||||
| error { mc_fatal ("syntax error"); }
|
||||
;
|
||||
|
||||
global_section:
|
||||
MCSEVERITYNAMES '=' '(' severitymaps ')'
|
||||
| MCSEVERITYNAMES '=' '(' severitymaps error { mc_fatal ("missing ')' in SeverityNames"); }
|
||||
| MCSEVERITYNAMES '=' error { mc_fatal ("missing '(' in SeverityNames"); }
|
||||
| MCSEVERITYNAMES error { mc_fatal ("missing '=' for SeverityNames"); }
|
||||
| MCLANGUAGENAMES '=' '(' langmaps ')'
|
||||
| MCLANGUAGENAMES '=' '(' langmaps error { mc_fatal ("missing ')' in LanguageNames"); }
|
||||
| MCLANGUAGENAMES '=' error { mc_fatal ("missing '(' in LanguageNames"); }
|
||||
| MCLANGUAGENAMES error { mc_fatal ("missing '=' for LanguageNames"); }
|
||||
| MCFACILITYNAMES '=' '(' facilitymaps ')'
|
||||
| MCFACILITYNAMES '=' '(' facilitymaps error { mc_fatal ("missing ')' in FacilityNames"); }
|
||||
| MCFACILITYNAMES '=' error { mc_fatal ("missing '(' in FacilityNames"); }
|
||||
| MCFACILITYNAMES error { mc_fatal ("missing '=' for FacilityNames"); }
|
||||
| MCOUTPUTBASE '=' MCNUMBER
|
||||
{
|
||||
if ($3 != 10 && $3 != 16)
|
||||
mc_fatal ("OutputBase allows 10 or 16 as value");
|
||||
mcset_out_values_are_decimal = ($3 == 10 ? 1 : 0);
|
||||
}
|
||||
| MCMESSAGEIDTYPEDEF '=' MCIDENT
|
||||
{
|
||||
mcset_msg_id_typedef = $3;
|
||||
}
|
||||
| MCMESSAGEIDTYPEDEF '=' error
|
||||
{
|
||||
mc_fatal ("MessageIdTypedef expects an identifier");
|
||||
}
|
||||
| MCMESSAGEIDTYPEDEF error
|
||||
{
|
||||
mc_fatal ("missing '=' for MessageIdTypedef");
|
||||
}
|
||||
;
|
||||
|
||||
severitymaps:
|
||||
severitymap
|
||||
| severitymaps severitymap
|
||||
| error { mc_fatal ("severity ident missing"); }
|
||||
;
|
||||
|
||||
severitymap:
|
||||
token '=' MCNUMBER alias_name
|
||||
{
|
||||
mc_add_keyword ($1, MCTOKEN, "severity", $3, $4);
|
||||
}
|
||||
| token '=' error { mc_fatal ("severity number missing"); }
|
||||
| token error { mc_fatal ("severity missing '='"); }
|
||||
;
|
||||
|
||||
facilitymaps:
|
||||
facilitymap
|
||||
| facilitymaps facilitymap
|
||||
| error { mc_fatal ("missing ident in FacilityNames"); }
|
||||
;
|
||||
|
||||
facilitymap:
|
||||
token '=' MCNUMBER alias_name
|
||||
{
|
||||
mc_add_keyword ($1, MCTOKEN, "facility", $3, $4);
|
||||
}
|
||||
| token '=' error { mc_fatal ("facility number missing"); }
|
||||
| token error { mc_fatal ("facility missing '='"); }
|
||||
;
|
||||
|
||||
langmaps:
|
||||
langmap
|
||||
| langmaps langmap
|
||||
| error { mc_fatal ("missing ident in LanguageNames"); }
|
||||
;
|
||||
|
||||
langmap:
|
||||
token '=' MCNUMBER lex_want_filename ':' MCFILENAME
|
||||
{
|
||||
mc_add_keyword ($1, MCTOKEN, "language", $3, $6);
|
||||
}
|
||||
| token '=' MCNUMBER lex_want_filename ':' error { mc_fatal ("missing filename in LanguageNames"); }
|
||||
| token '=' MCNUMBER error { mc_fatal ("missing ':' in LanguageNames"); }
|
||||
| token '=' error { mc_fatal ("missing language code in LanguageNames"); }
|
||||
| token error { mc_fatal ("missing '=' for LanguageNames"); }
|
||||
;
|
||||
|
||||
alias_name:
|
||||
/* empty */
|
||||
{
|
||||
$$ = NULL;
|
||||
}
|
||||
| ':' MCIDENT
|
||||
{
|
||||
$$ = $2;
|
||||
}
|
||||
| ':' error { mc_fatal ("illegal token in identifier"); $$ = NULL; }
|
||||
;
|
||||
|
||||
message:
|
||||
id sefasy_def
|
||||
{
|
||||
cur_node = mc_add_node ();
|
||||
cur_node->symbol = mc_last_symbol;
|
||||
cur_node->facility = mc_cur_facility;
|
||||
cur_node->severity = mc_cur_severity;
|
||||
cur_node->id = ($1 & 0xffffUL);
|
||||
cur_node->vid = ($1 & 0xffffUL) | mc_sefa_val;
|
||||
mc_last_id = $1;
|
||||
}
|
||||
lang_entities
|
||||
;
|
||||
|
||||
id: MCMESSAGEID '=' vid { $$ = $3; }
|
||||
| MCMESSAGEID '=' error { mc_fatal ("missing number in MessageId"); $$ = 0; }
|
||||
| MCMESSAGEID error { mc_fatal ("missing '=' for MessageId"); $$ = 0; }
|
||||
;
|
||||
|
||||
vid: /* empty */
|
||||
{
|
||||
$$ = ++mc_last_id;
|
||||
}
|
||||
| MCNUMBER
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| '+' MCNUMBER
|
||||
{
|
||||
$$ = mc_last_id + $2;
|
||||
}
|
||||
| '+' error { mc_fatal ("missing number after MessageId '+'"); }
|
||||
;
|
||||
|
||||
sefasy_def:
|
||||
/* empty */
|
||||
{
|
||||
$$ = 0;
|
||||
mc_sefa_val = (mcset_custom_bit ? 1 : 0) << 29;
|
||||
mc_last_symbol = NULL;
|
||||
mc_cur_severity = NULL;
|
||||
mc_cur_facility = NULL;
|
||||
}
|
||||
| sefasy_def severity
|
||||
{
|
||||
if ($1 & 1)
|
||||
mc_warn (_("duplicate definition of Severity"));
|
||||
$$ = $1 | 1;
|
||||
}
|
||||
| sefasy_def facility
|
||||
{
|
||||
if ($1 & 2)
|
||||
mc_warn (_("duplicate definition of Facility"));
|
||||
$$ = $1 | 2;
|
||||
}
|
||||
| sefasy_def symbol
|
||||
{
|
||||
if ($1 & 4)
|
||||
mc_warn (_("duplicate definition of SymbolicName"));
|
||||
$$ = $1 | 4;
|
||||
}
|
||||
;
|
||||
|
||||
severity: MCSEVERITY '=' MCTOKEN
|
||||
{
|
||||
mc_sefa_val &= ~ (0x3UL << 30);
|
||||
mc_sefa_val |= (($3->nval & 0x3UL) << 30);
|
||||
mc_cur_severity = $3;
|
||||
}
|
||||
;
|
||||
|
||||
facility: MCFACILITY '=' MCTOKEN
|
||||
{
|
||||
mc_sefa_val &= ~ (0xfffUL << 16);
|
||||
mc_sefa_val |= (($3->nval & 0xfffUL) << 16);
|
||||
mc_cur_facility = $3;
|
||||
}
|
||||
;
|
||||
|
||||
symbol: MCSYMBOLICNAME '=' MCIDENT
|
||||
{
|
||||
mc_last_symbol = $3;
|
||||
}
|
||||
;
|
||||
|
||||
lang_entities:
|
||||
lang_entity
|
||||
| lang_entities lang_entity
|
||||
;
|
||||
|
||||
lang_entity:
|
||||
lang lex_want_line lines MCENDLINE
|
||||
{
|
||||
mc_node_lang *h;
|
||||
h = mc_add_node_lang (cur_node, $1, cur_node->vid);
|
||||
h->message = $3;
|
||||
if (mcset_max_message_length != 0 && unichar_len (h->message) > mcset_max_message_length)
|
||||
mc_warn ("message length to long");
|
||||
}
|
||||
;
|
||||
|
||||
lines: MCLINE
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
| lines MCLINE
|
||||
{
|
||||
unichar *h;
|
||||
rc_uint_type l1,l2;
|
||||
l1 = unichar_len ($1);
|
||||
l2 = unichar_len ($2);
|
||||
h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
|
||||
if (l1) memcpy (h, $1, l1 * sizeof (unichar));
|
||||
if (l2) memcpy (&h[l1], $2, l2 * sizeof (unichar));
|
||||
h[l1 + l2] = 0;
|
||||
$$ = h;
|
||||
}
|
||||
| error { mc_fatal ("missing end of message text"); $$ = NULL; }
|
||||
| lines error { mc_fatal ("missing end of message text"); $$ = $1; }
|
||||
;
|
||||
|
||||
comments: MCCOMMENT { $$ = $1; }
|
||||
| comments MCCOMMENT
|
||||
{
|
||||
unichar *h;
|
||||
rc_uint_type l1,l2;
|
||||
l1 = unichar_len ($1);
|
||||
l2 = unichar_len ($2);
|
||||
h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
|
||||
if (l1) memcpy (h, $1, l1 * sizeof (unichar));
|
||||
if (l2) memcpy (&h[l1], $2, l2 * sizeof (unichar));
|
||||
h[l1 + l2] = 0;
|
||||
$$ = h;
|
||||
}
|
||||
;
|
||||
|
||||
lang: MCLANGUAGE lex_want_nl '=' MCTOKEN NL
|
||||
{
|
||||
$$ = $4;
|
||||
}
|
||||
| MCLANGUAGE lex_want_nl '=' MCIDENT NL
|
||||
{
|
||||
$$ = NULL;
|
||||
mc_fatal (_("undeclared language identifier"));
|
||||
}
|
||||
| MCLANGUAGE lex_want_nl '=' token error
|
||||
{
|
||||
$$ = NULL;
|
||||
mc_fatal ("missing newline after Language");
|
||||
}
|
||||
| MCLANGUAGE lex_want_nl '=' error
|
||||
{
|
||||
$$ = NULL;
|
||||
mc_fatal ("missing ident for Language");
|
||||
}
|
||||
| MCLANGUAGE error
|
||||
{
|
||||
$$ = NULL;
|
||||
mc_fatal ("missing '=' for Language");
|
||||
}
|
||||
;
|
||||
|
||||
token: MCIDENT { $$ = $1; }
|
||||
| MCTOKEN { $$ = $1->usz; }
|
||||
;
|
||||
|
||||
lex_want_nl:
|
||||
/* Empty */ { mclex_want_nl = 1; }
|
||||
;
|
||||
|
||||
lex_want_line:
|
||||
/* Empty */ { mclex_want_line = 1; }
|
||||
;
|
||||
|
||||
lex_want_filename:
|
||||
/* Empty */ { mclex_want_filename = 1; }
|
||||
;
|
||||
|
||||
%%
|
||||
|
||||
/* Something else. */
|
||||
2138
binutils/nlmconv.c
2138
binutils/nlmconv.c
File diff suppressed because it is too large
Load Diff
@@ -1,86 +0,0 @@
|
||||
/* nlmconv.h -- header file for NLM conversion program
|
||||
Copyright 1993, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
|
||||
/* Written by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
bfd.h, nlm/common.h and nlm/internal.h must be included before this
|
||||
file. */
|
||||
|
||||
/* A linked list of strings. */
|
||||
|
||||
struct string_list
|
||||
{
|
||||
struct string_list *next;
|
||||
char *string;
|
||||
};
|
||||
|
||||
/* The NLM header parser in nlmheader.y stores information in the
|
||||
following variables. */
|
||||
|
||||
extern Nlm_Internal_Fixed_Header *fixed_hdr;
|
||||
extern Nlm_Internal_Variable_Header *var_hdr;
|
||||
extern Nlm_Internal_Version_Header *version_hdr;
|
||||
extern Nlm_Internal_Copyright_Header *copyright_hdr;
|
||||
extern Nlm_Internal_Extended_Header *extended_hdr;
|
||||
|
||||
/* Procedure named by CHECK. */
|
||||
extern char *check_procedure;
|
||||
/* File named by CUSTOM. */
|
||||
extern char *custom_file;
|
||||
/* Whether to generate debugging information (DEBUG). */
|
||||
extern bfd_boolean debug_info;
|
||||
/* Procedure named by EXIT. */
|
||||
extern char *exit_procedure;
|
||||
/* Exported symbols (EXPORT). */
|
||||
extern struct string_list *export_symbols;
|
||||
/* List of files from INPUT. */
|
||||
extern struct string_list *input_files;
|
||||
/* Map file name (MAP, FULLMAP). */
|
||||
extern char *map_file;
|
||||
/* Whether a full map has been requested (FULLMAP). */
|
||||
extern bfd_boolean full_map;
|
||||
/* File named by HELP. */
|
||||
extern char *help_file;
|
||||
/* Imported symbols (IMPORT). */
|
||||
extern struct string_list *import_symbols;
|
||||
/* File named by MESSAGES. */
|
||||
extern char *message_file;
|
||||
/* Autoload module list (MODULE). */
|
||||
extern struct string_list *modules;
|
||||
/* File named by OUTPUT. */
|
||||
extern char *output_file;
|
||||
/* File named by SHARELIB. */
|
||||
extern char *sharelib_file;
|
||||
/* Start procedure name (START). */
|
||||
extern char *start_procedure;
|
||||
/* VERBOSE. */
|
||||
extern bfd_boolean verbose;
|
||||
/* RPC description file (XDCDATA). */
|
||||
extern char *rpc_file;
|
||||
|
||||
/* The number of serious parse errors. */
|
||||
extern int parse_errors;
|
||||
|
||||
/* The parser. */
|
||||
extern int yyparse (void);
|
||||
|
||||
/* Tell the lexer what file to read. */
|
||||
extern bfd_boolean nlmlex_file (const char *);
|
||||
@@ -1,960 +0,0 @@
|
||||
%{/* nlmheader.y - parse NLM header specification keywords.
|
||||
Copyright 1993, 1994, 1995, 1997, 1998, 2001, 2002, 2003, 2005, 2007,
|
||||
2010 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Ian Lance Taylor <ian@cygnus.com>.
|
||||
|
||||
This bison file parses the commands recognized by the NetWare NLM
|
||||
linker, except for lists of object files. It stores the
|
||||
information in global variables.
|
||||
|
||||
This implementation is based on the description in the NetWare Tool
|
||||
Maker Specification manual, edition 1.0. */
|
||||
|
||||
#include "sysdep.h"
|
||||
#include "safe-ctype.h"
|
||||
#include "bfd.h"
|
||||
#include "nlm/common.h"
|
||||
#include "nlm/internal.h"
|
||||
#include "bucomm.h"
|
||||
#include "nlmconv.h"
|
||||
|
||||
/* Information is stored in the structures pointed to by these
|
||||
variables. */
|
||||
|
||||
Nlm_Internal_Fixed_Header *fixed_hdr;
|
||||
Nlm_Internal_Variable_Header *var_hdr;
|
||||
Nlm_Internal_Version_Header *version_hdr;
|
||||
Nlm_Internal_Copyright_Header *copyright_hdr;
|
||||
Nlm_Internal_Extended_Header *extended_hdr;
|
||||
|
||||
/* Procedure named by CHECK. */
|
||||
char *check_procedure;
|
||||
/* File named by CUSTOM. */
|
||||
char *custom_file;
|
||||
/* Whether to generate debugging information (DEBUG). */
|
||||
bfd_boolean debug_info;
|
||||
/* Procedure named by EXIT. */
|
||||
char *exit_procedure;
|
||||
/* Exported symbols (EXPORT). */
|
||||
struct string_list *export_symbols;
|
||||
/* List of files from INPUT. */
|
||||
struct string_list *input_files;
|
||||
/* Map file name (MAP, FULLMAP). */
|
||||
char *map_file;
|
||||
/* Whether a full map has been requested (FULLMAP). */
|
||||
bfd_boolean full_map;
|
||||
/* File named by HELP. */
|
||||
char *help_file;
|
||||
/* Imported symbols (IMPORT). */
|
||||
struct string_list *import_symbols;
|
||||
/* File named by MESSAGES. */
|
||||
char *message_file;
|
||||
/* Autoload module list (MODULE). */
|
||||
struct string_list *modules;
|
||||
/* File named by OUTPUT. */
|
||||
char *output_file;
|
||||
/* File named by SHARELIB. */
|
||||
char *sharelib_file;
|
||||
/* Start procedure name (START). */
|
||||
char *start_procedure;
|
||||
/* VERBOSE. */
|
||||
bfd_boolean verbose;
|
||||
/* RPC description file (XDCDATA). */
|
||||
char *rpc_file;
|
||||
|
||||
/* The number of serious errors that have occurred. */
|
||||
int parse_errors;
|
||||
|
||||
/* The current symbol prefix when reading a list of import or export
|
||||
symbols. */
|
||||
static char *symbol_prefix;
|
||||
|
||||
/* Parser error message handler. */
|
||||
#define yyerror(msg) nlmheader_error (msg);
|
||||
|
||||
/* Local functions. */
|
||||
static int yylex (void);
|
||||
static void nlmlex_file_push (const char *);
|
||||
static bfd_boolean nlmlex_file_open (const char *);
|
||||
static int nlmlex_buf_init (void);
|
||||
static char nlmlex_buf_add (int);
|
||||
static long nlmlex_get_number (const char *);
|
||||
static void nlmheader_identify (void);
|
||||
static void nlmheader_warn (const char *, int);
|
||||
static void nlmheader_error (const char *);
|
||||
static struct string_list * string_list_cons (char *, struct string_list *);
|
||||
static struct string_list * string_list_append (struct string_list *,
|
||||
struct string_list *);
|
||||
static struct string_list * string_list_append1 (struct string_list *,
|
||||
char *);
|
||||
static char *xstrdup (const char *);
|
||||
|
||||
%}
|
||||
|
||||
%union
|
||||
{
|
||||
char *string;
|
||||
struct string_list *list;
|
||||
};
|
||||
|
||||
/* The reserved words. */
|
||||
|
||||
%token CHECK CODESTART COPYRIGHT CUSTOM DATE DEBUG_K DESCRIPTION EXIT
|
||||
%token EXPORT FLAG_ON FLAG_OFF FULLMAP HELP IMPORT INPUT MAP MESSAGES
|
||||
%token MODULE MULTIPLE OS_DOMAIN OUTPUT PSEUDOPREEMPTION REENTRANT
|
||||
%token SCREENNAME SHARELIB STACK START SYNCHRONIZE
|
||||
%token THREADNAME TYPE VERBOSE VERSIONK XDCDATA
|
||||
|
||||
/* Arguments. */
|
||||
|
||||
%token <string> STRING
|
||||
%token <string> QUOTED_STRING
|
||||
|
||||
/* Typed non-terminals. */
|
||||
%type <list> symbol_list_opt symbol_list string_list
|
||||
%type <string> symbol
|
||||
|
||||
%%
|
||||
|
||||
/* Keywords must start in the leftmost column of the file. Arguments
|
||||
may appear anywhere else. The lexer uses this to determine what
|
||||
token to return, so we don't have to worry about it here. */
|
||||
|
||||
/* The entire file is just a list of commands. */
|
||||
|
||||
file:
|
||||
commands
|
||||
;
|
||||
|
||||
/* A possibly empty list of commands. */
|
||||
|
||||
commands:
|
||||
/* May be empty. */
|
||||
| command commands
|
||||
;
|
||||
|
||||
/* A single command. There is where most of the work takes place. */
|
||||
|
||||
command:
|
||||
CHECK STRING
|
||||
{
|
||||
check_procedure = $2;
|
||||
}
|
||||
| CODESTART STRING
|
||||
{
|
||||
nlmheader_warn (_("CODESTART is not implemented; sorry"), -1);
|
||||
free ($2);
|
||||
}
|
||||
| COPYRIGHT QUOTED_STRING
|
||||
{
|
||||
int len;
|
||||
|
||||
strncpy (copyright_hdr->stamp, "CoPyRiGhT=", 10);
|
||||
len = strlen ($2);
|
||||
if (len >= NLM_MAX_COPYRIGHT_MESSAGE_LENGTH)
|
||||
{
|
||||
nlmheader_warn (_("copyright string is too long"),
|
||||
NLM_MAX_COPYRIGHT_MESSAGE_LENGTH - 1);
|
||||
len = NLM_MAX_COPYRIGHT_MESSAGE_LENGTH - 1;
|
||||
}
|
||||
copyright_hdr->copyrightMessageLength = len;
|
||||
strncpy (copyright_hdr->copyrightMessage, $2, len);
|
||||
copyright_hdr->copyrightMessage[len] = '\0';
|
||||
free ($2);
|
||||
}
|
||||
| CUSTOM STRING
|
||||
{
|
||||
custom_file = $2;
|
||||
}
|
||||
| DATE STRING STRING STRING
|
||||
{
|
||||
/* We don't set the version stamp here, because we use the
|
||||
version stamp to detect whether the required VERSION
|
||||
keyword was given. */
|
||||
version_hdr->month = nlmlex_get_number ($2);
|
||||
version_hdr->day = nlmlex_get_number ($3);
|
||||
version_hdr->year = nlmlex_get_number ($4);
|
||||
free ($2);
|
||||
free ($3);
|
||||
free ($4);
|
||||
if (version_hdr->month < 1 || version_hdr->month > 12)
|
||||
nlmheader_warn (_("illegal month"), -1);
|
||||
if (version_hdr->day < 1 || version_hdr->day > 31)
|
||||
nlmheader_warn (_("illegal day"), -1);
|
||||
if (version_hdr->year < 1900 || version_hdr->year > 3000)
|
||||
nlmheader_warn (_("illegal year"), -1);
|
||||
}
|
||||
| DEBUG_K
|
||||
{
|
||||
debug_info = TRUE;
|
||||
}
|
||||
| DESCRIPTION QUOTED_STRING
|
||||
{
|
||||
int len;
|
||||
|
||||
len = strlen ($2);
|
||||
if (len > NLM_MAX_DESCRIPTION_LENGTH)
|
||||
{
|
||||
nlmheader_warn (_("description string is too long"),
|
||||
NLM_MAX_DESCRIPTION_LENGTH);
|
||||
len = NLM_MAX_DESCRIPTION_LENGTH;
|
||||
}
|
||||
var_hdr->descriptionLength = len;
|
||||
strncpy (var_hdr->descriptionText, $2, len);
|
||||
var_hdr->descriptionText[len] = '\0';
|
||||
free ($2);
|
||||
}
|
||||
| EXIT STRING
|
||||
{
|
||||
exit_procedure = $2;
|
||||
}
|
||||
| EXPORT
|
||||
{
|
||||
symbol_prefix = NULL;
|
||||
}
|
||||
symbol_list_opt
|
||||
{
|
||||
export_symbols = string_list_append (export_symbols, $3);
|
||||
}
|
||||
| FLAG_ON STRING
|
||||
{
|
||||
fixed_hdr->flags |= nlmlex_get_number ($2);
|
||||
free ($2);
|
||||
}
|
||||
| FLAG_OFF STRING
|
||||
{
|
||||
fixed_hdr->flags &=~ nlmlex_get_number ($2);
|
||||
free ($2);
|
||||
}
|
||||
| FULLMAP
|
||||
{
|
||||
map_file = "";
|
||||
full_map = TRUE;
|
||||
}
|
||||
| FULLMAP STRING
|
||||
{
|
||||
map_file = $2;
|
||||
full_map = TRUE;
|
||||
}
|
||||
| HELP STRING
|
||||
{
|
||||
help_file = $2;
|
||||
}
|
||||
| IMPORT
|
||||
{
|
||||
symbol_prefix = NULL;
|
||||
}
|
||||
symbol_list_opt
|
||||
{
|
||||
import_symbols = string_list_append (import_symbols, $3);
|
||||
}
|
||||
| INPUT string_list
|
||||
{
|
||||
input_files = string_list_append (input_files, $2);
|
||||
}
|
||||
| MAP
|
||||
{
|
||||
map_file = "";
|
||||
}
|
||||
| MAP STRING
|
||||
{
|
||||
map_file = $2;
|
||||
}
|
||||
| MESSAGES STRING
|
||||
{
|
||||
message_file = $2;
|
||||
}
|
||||
| MODULE string_list
|
||||
{
|
||||
modules = string_list_append (modules, $2);
|
||||
}
|
||||
| MULTIPLE
|
||||
{
|
||||
fixed_hdr->flags |= 0x2;
|
||||
}
|
||||
| OS_DOMAIN
|
||||
{
|
||||
fixed_hdr->flags |= 0x10;
|
||||
}
|
||||
| OUTPUT STRING
|
||||
{
|
||||
if (output_file == NULL)
|
||||
output_file = $2;
|
||||
else
|
||||
nlmheader_warn (_("ignoring duplicate OUTPUT statement"), -1);
|
||||
}
|
||||
| PSEUDOPREEMPTION
|
||||
{
|
||||
fixed_hdr->flags |= 0x8;
|
||||
}
|
||||
| REENTRANT
|
||||
{
|
||||
fixed_hdr->flags |= 0x1;
|
||||
}
|
||||
| SCREENNAME QUOTED_STRING
|
||||
{
|
||||
int len;
|
||||
|
||||
len = strlen ($2);
|
||||
if (len >= NLM_MAX_SCREEN_NAME_LENGTH)
|
||||
{
|
||||
nlmheader_warn (_("screen name is too long"),
|
||||
NLM_MAX_SCREEN_NAME_LENGTH);
|
||||
len = NLM_MAX_SCREEN_NAME_LENGTH;
|
||||
}
|
||||
var_hdr->screenNameLength = len;
|
||||
strncpy (var_hdr->screenName, $2, len);
|
||||
var_hdr->screenName[NLM_MAX_SCREEN_NAME_LENGTH] = '\0';
|
||||
free ($2);
|
||||
}
|
||||
| SHARELIB STRING
|
||||
{
|
||||
sharelib_file = $2;
|
||||
}
|
||||
| STACK STRING
|
||||
{
|
||||
var_hdr->stackSize = nlmlex_get_number ($2);
|
||||
free ($2);
|
||||
}
|
||||
| START STRING
|
||||
{
|
||||
start_procedure = $2;
|
||||
}
|
||||
| SYNCHRONIZE
|
||||
{
|
||||
fixed_hdr->flags |= 0x4;
|
||||
}
|
||||
| THREADNAME QUOTED_STRING
|
||||
{
|
||||
int len;
|
||||
|
||||
len = strlen ($2);
|
||||
if (len >= NLM_MAX_THREAD_NAME_LENGTH)
|
||||
{
|
||||
nlmheader_warn (_("thread name is too long"),
|
||||
NLM_MAX_THREAD_NAME_LENGTH);
|
||||
len = NLM_MAX_THREAD_NAME_LENGTH;
|
||||
}
|
||||
var_hdr->threadNameLength = len;
|
||||
strncpy (var_hdr->threadName, $2, len);
|
||||
var_hdr->threadName[len] = '\0';
|
||||
free ($2);
|
||||
}
|
||||
| TYPE STRING
|
||||
{
|
||||
fixed_hdr->moduleType = nlmlex_get_number ($2);
|
||||
free ($2);
|
||||
}
|
||||
| VERBOSE
|
||||
{
|
||||
verbose = TRUE;
|
||||
}
|
||||
| VERSIONK STRING STRING STRING
|
||||
{
|
||||
long val;
|
||||
|
||||
strncpy (version_hdr->stamp, "VeRsIoN#", 8);
|
||||
version_hdr->majorVersion = nlmlex_get_number ($2);
|
||||
val = nlmlex_get_number ($3);
|
||||
if (val < 0 || val > 99)
|
||||
nlmheader_warn (_("illegal minor version number (must be between 0 and 99)"),
|
||||
-1);
|
||||
else
|
||||
version_hdr->minorVersion = val;
|
||||
val = nlmlex_get_number ($4);
|
||||
if (val < 0)
|
||||
nlmheader_warn (_("illegal revision number (must be between 0 and 26)"),
|
||||
-1);
|
||||
else if (val > 26)
|
||||
version_hdr->revision = 0;
|
||||
else
|
||||
version_hdr->revision = val;
|
||||
free ($2);
|
||||
free ($3);
|
||||
free ($4);
|
||||
}
|
||||
| VERSIONK STRING STRING
|
||||
{
|
||||
long val;
|
||||
|
||||
strncpy (version_hdr->stamp, "VeRsIoN#", 8);
|
||||
version_hdr->majorVersion = nlmlex_get_number ($2);
|
||||
val = nlmlex_get_number ($3);
|
||||
if (val < 0 || val > 99)
|
||||
nlmheader_warn (_("illegal minor version number (must be between 0 and 99)"),
|
||||
-1);
|
||||
else
|
||||
version_hdr->minorVersion = val;
|
||||
version_hdr->revision = 0;
|
||||
free ($2);
|
||||
free ($3);
|
||||
}
|
||||
| XDCDATA STRING
|
||||
{
|
||||
rpc_file = $2;
|
||||
}
|
||||
;
|
||||
|
||||
/* A possibly empty list of symbols. */
|
||||
|
||||
symbol_list_opt:
|
||||
/* Empty. */
|
||||
{
|
||||
$$ = NULL;
|
||||
}
|
||||
| symbol_list
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
/* A list of symbols in an import or export list. Prefixes may appear
|
||||
in parentheses. We need to use left recursion here to avoid
|
||||
building up a large import list on the parser stack. */
|
||||
|
||||
symbol_list:
|
||||
symbol
|
||||
{
|
||||
$$ = string_list_cons ($1, NULL);
|
||||
}
|
||||
| symbol_prefix
|
||||
{
|
||||
$$ = NULL;
|
||||
}
|
||||
| symbol_list symbol
|
||||
{
|
||||
$$ = string_list_append1 ($1, $2);
|
||||
}
|
||||
| symbol_list symbol_prefix
|
||||
{
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
/* A prefix for subsequent symbols. */
|
||||
|
||||
symbol_prefix:
|
||||
'(' STRING ')'
|
||||
{
|
||||
if (symbol_prefix != NULL)
|
||||
free (symbol_prefix);
|
||||
symbol_prefix = $2;
|
||||
}
|
||||
;
|
||||
|
||||
/* A single symbol. */
|
||||
|
||||
symbol:
|
||||
STRING
|
||||
{
|
||||
if (symbol_prefix == NULL)
|
||||
$$ = $1;
|
||||
else
|
||||
{
|
||||
$$ = xmalloc (strlen (symbol_prefix) + strlen ($1) + 2);
|
||||
sprintf ($$, "%s@%s", symbol_prefix, $1);
|
||||
free ($1);
|
||||
}
|
||||
}
|
||||
;
|
||||
|
||||
/* A list of strings. */
|
||||
|
||||
string_list:
|
||||
/* May be empty. */
|
||||
{
|
||||
$$ = NULL;
|
||||
}
|
||||
| STRING string_list
|
||||
{
|
||||
$$ = string_list_cons ($1, $2);
|
||||
}
|
||||
;
|
||||
|
||||
%%
|
||||
|
||||
/* If strerror is just a macro, we want to use the one from libiberty
|
||||
since it will handle undefined values. */
|
||||
#undef strerror
|
||||
extern char *strerror PARAMS ((int));
|
||||
|
||||
/* The lexer is simple, too simple for flex. Keywords are only
|
||||
recognized at the start of lines. Everything else must be an
|
||||
argument. A comma is treated as whitespace. */
|
||||
|
||||
/* The states the lexer can be in. */
|
||||
|
||||
enum lex_state
|
||||
{
|
||||
/* At the beginning of a line. */
|
||||
BEGINNING_OF_LINE,
|
||||
/* In the middle of a line. */
|
||||
IN_LINE
|
||||
};
|
||||
|
||||
/* We need to keep a stack of files to handle file inclusion. */
|
||||
|
||||
struct input
|
||||
{
|
||||
/* The file to read from. */
|
||||
FILE *file;
|
||||
/* The name of the file. */
|
||||
char *name;
|
||||
/* The current line number. */
|
||||
int lineno;
|
||||
/* The current state. */
|
||||
enum lex_state state;
|
||||
/* The next file on the stack. */
|
||||
struct input *next;
|
||||
};
|
||||
|
||||
/* The current input file. */
|
||||
|
||||
static struct input current;
|
||||
|
||||
/* The character which introduces comments. */
|
||||
#define COMMENT_CHAR '#'
|
||||
|
||||
/* Start the lexer going on the main input file. */
|
||||
|
||||
bfd_boolean
|
||||
nlmlex_file (const char *name)
|
||||
{
|
||||
current.next = NULL;
|
||||
return nlmlex_file_open (name);
|
||||
}
|
||||
|
||||
/* Start the lexer going on a subsidiary input file. */
|
||||
|
||||
static void
|
||||
nlmlex_file_push (const char *name)
|
||||
{
|
||||
struct input *push;
|
||||
|
||||
push = (struct input *) xmalloc (sizeof (struct input));
|
||||
*push = current;
|
||||
if (nlmlex_file_open (name))
|
||||
current.next = push;
|
||||
else
|
||||
{
|
||||
current = *push;
|
||||
free (push);
|
||||
}
|
||||
}
|
||||
|
||||
/* Start lexing from a file. */
|
||||
|
||||
static bfd_boolean
|
||||
nlmlex_file_open (const char *name)
|
||||
{
|
||||
current.file = fopen (name, "r");
|
||||
if (current.file == NULL)
|
||||
{
|
||||
fprintf (stderr, "%s:%s: %s\n", program_name, name, strerror (errno));
|
||||
++parse_errors;
|
||||
return FALSE;
|
||||
}
|
||||
current.name = xstrdup (name);
|
||||
current.lineno = 1;
|
||||
current.state = BEGINNING_OF_LINE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Table used to turn keywords into tokens. */
|
||||
|
||||
struct keyword_tokens_struct
|
||||
{
|
||||
const char *keyword;
|
||||
int token;
|
||||
};
|
||||
|
||||
static struct keyword_tokens_struct keyword_tokens[] =
|
||||
{
|
||||
{ "CHECK", CHECK },
|
||||
{ "CODESTART", CODESTART },
|
||||
{ "COPYRIGHT", COPYRIGHT },
|
||||
{ "CUSTOM", CUSTOM },
|
||||
{ "DATE", DATE },
|
||||
{ "DEBUG", DEBUG_K },
|
||||
{ "DESCRIPTION", DESCRIPTION },
|
||||
{ "EXIT", EXIT },
|
||||
{ "EXPORT", EXPORT },
|
||||
{ "FLAG_ON", FLAG_ON },
|
||||
{ "FLAG_OFF", FLAG_OFF },
|
||||
{ "FULLMAP", FULLMAP },
|
||||
{ "HELP", HELP },
|
||||
{ "IMPORT", IMPORT },
|
||||
{ "INPUT", INPUT },
|
||||
{ "MAP", MAP },
|
||||
{ "MESSAGES", MESSAGES },
|
||||
{ "MODULE", MODULE },
|
||||
{ "MULTIPLE", MULTIPLE },
|
||||
{ "OS_DOMAIN", OS_DOMAIN },
|
||||
{ "OUTPUT", OUTPUT },
|
||||
{ "PSEUDOPREEMPTION", PSEUDOPREEMPTION },
|
||||
{ "REENTRANT", REENTRANT },
|
||||
{ "SCREENNAME", SCREENNAME },
|
||||
{ "SHARELIB", SHARELIB },
|
||||
{ "STACK", STACK },
|
||||
{ "STACKSIZE", STACK },
|
||||
{ "START", START },
|
||||
{ "SYNCHRONIZE", SYNCHRONIZE },
|
||||
{ "THREADNAME", THREADNAME },
|
||||
{ "TYPE", TYPE },
|
||||
{ "VERBOSE", VERBOSE },
|
||||
{ "VERSION", VERSIONK },
|
||||
{ "XDCDATA", XDCDATA }
|
||||
};
|
||||
|
||||
#define KEYWORD_COUNT (sizeof (keyword_tokens) / sizeof (keyword_tokens[0]))
|
||||
|
||||
/* The lexer accumulates strings in these variables. */
|
||||
static char *lex_buf;
|
||||
static int lex_size;
|
||||
static int lex_pos;
|
||||
|
||||
/* Start accumulating strings into the buffer. */
|
||||
#define BUF_INIT() \
|
||||
((void) (lex_buf != NULL ? lex_pos = 0 : nlmlex_buf_init ()))
|
||||
|
||||
static int
|
||||
nlmlex_buf_init (void)
|
||||
{
|
||||
lex_size = 10;
|
||||
lex_buf = xmalloc (lex_size + 1);
|
||||
lex_pos = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Finish a string in the buffer. */
|
||||
#define BUF_FINISH() ((void) (lex_buf[lex_pos] = '\0'))
|
||||
|
||||
/* Accumulate a character into the buffer. */
|
||||
#define BUF_ADD(c) \
|
||||
((void) (lex_pos < lex_size \
|
||||
? lex_buf[lex_pos++] = (c) \
|
||||
: nlmlex_buf_add (c)))
|
||||
|
||||
static char
|
||||
nlmlex_buf_add (int c)
|
||||
{
|
||||
if (lex_pos >= lex_size)
|
||||
{
|
||||
lex_size *= 2;
|
||||
lex_buf = xrealloc (lex_buf, lex_size + 1);
|
||||
}
|
||||
|
||||
return lex_buf[lex_pos++] = c;
|
||||
}
|
||||
|
||||
/* The lexer proper. This is called by the bison generated parsing
|
||||
code. */
|
||||
|
||||
static int
|
||||
yylex (void)
|
||||
{
|
||||
int c;
|
||||
|
||||
tail_recurse:
|
||||
|
||||
c = getc (current.file);
|
||||
|
||||
/* Commas are treated as whitespace characters. */
|
||||
while (ISSPACE (c) || c == ',')
|
||||
{
|
||||
current.state = IN_LINE;
|
||||
if (c == '\n')
|
||||
{
|
||||
++current.lineno;
|
||||
current.state = BEGINNING_OF_LINE;
|
||||
}
|
||||
c = getc (current.file);
|
||||
}
|
||||
|
||||
/* At the end of the file we either pop to the previous file or
|
||||
finish up. */
|
||||
if (c == EOF)
|
||||
{
|
||||
fclose (current.file);
|
||||
free (current.name);
|
||||
if (current.next == NULL)
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
struct input *next;
|
||||
|
||||
next = current.next;
|
||||
current = *next;
|
||||
free (next);
|
||||
goto tail_recurse;
|
||||
}
|
||||
}
|
||||
|
||||
/* A comment character always means to drop everything until the
|
||||
next newline. */
|
||||
if (c == COMMENT_CHAR)
|
||||
{
|
||||
do
|
||||
{
|
||||
c = getc (current.file);
|
||||
}
|
||||
while (c != '\n');
|
||||
++current.lineno;
|
||||
current.state = BEGINNING_OF_LINE;
|
||||
goto tail_recurse;
|
||||
}
|
||||
|
||||
/* An '@' introduces an include file. */
|
||||
if (c == '@')
|
||||
{
|
||||
do
|
||||
{
|
||||
c = getc (current.file);
|
||||
if (c == '\n')
|
||||
++current.lineno;
|
||||
}
|
||||
while (ISSPACE (c));
|
||||
BUF_INIT ();
|
||||
while (! ISSPACE (c) && c != EOF)
|
||||
{
|
||||
BUF_ADD (c);
|
||||
c = getc (current.file);
|
||||
}
|
||||
BUF_FINISH ();
|
||||
|
||||
ungetc (c, current.file);
|
||||
|
||||
nlmlex_file_push (lex_buf);
|
||||
goto tail_recurse;
|
||||
}
|
||||
|
||||
/* A non-space character at the start of a line must be the start of
|
||||
a keyword. */
|
||||
if (current.state == BEGINNING_OF_LINE)
|
||||
{
|
||||
BUF_INIT ();
|
||||
while (ISALNUM (c) || c == '_')
|
||||
{
|
||||
BUF_ADD (TOUPPER (c));
|
||||
c = getc (current.file);
|
||||
}
|
||||
BUF_FINISH ();
|
||||
|
||||
if (c != EOF && ! ISSPACE (c) && c != ',')
|
||||
{
|
||||
nlmheader_identify ();
|
||||
fprintf (stderr, _("%s:%d: illegal character in keyword: %c\n"),
|
||||
current.name, current.lineno, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < KEYWORD_COUNT; i++)
|
||||
{
|
||||
if (lex_buf[0] == keyword_tokens[i].keyword[0]
|
||||
&& strcmp (lex_buf, keyword_tokens[i].keyword) == 0)
|
||||
{
|
||||
/* Pushing back the final whitespace avoids worrying
|
||||
about \n here. */
|
||||
ungetc (c, current.file);
|
||||
current.state = IN_LINE;
|
||||
return keyword_tokens[i].token;
|
||||
}
|
||||
}
|
||||
|
||||
nlmheader_identify ();
|
||||
fprintf (stderr, _("%s:%d: unrecognized keyword: %s\n"),
|
||||
current.name, current.lineno, lex_buf);
|
||||
}
|
||||
|
||||
++parse_errors;
|
||||
/* Treat the rest of this line as a comment. */
|
||||
ungetc (COMMENT_CHAR, current.file);
|
||||
goto tail_recurse;
|
||||
}
|
||||
|
||||
/* Parentheses just represent themselves. */
|
||||
if (c == '(' || c == ')')
|
||||
return c;
|
||||
|
||||
/* Handle quoted strings. */
|
||||
if (c == '"' || c == '\'')
|
||||
{
|
||||
int quote;
|
||||
int start_lineno;
|
||||
|
||||
quote = c;
|
||||
start_lineno = current.lineno;
|
||||
|
||||
c = getc (current.file);
|
||||
BUF_INIT ();
|
||||
while (c != quote && c != EOF)
|
||||
{
|
||||
BUF_ADD (c);
|
||||
if (c == '\n')
|
||||
++current.lineno;
|
||||
c = getc (current.file);
|
||||
}
|
||||
BUF_FINISH ();
|
||||
|
||||
if (c == EOF)
|
||||
{
|
||||
nlmheader_identify ();
|
||||
fprintf (stderr, _("%s:%d: end of file in quoted string\n"),
|
||||
current.name, start_lineno);
|
||||
++parse_errors;
|
||||
}
|
||||
|
||||
/* FIXME: Possible memory leak. */
|
||||
yylval.string = xstrdup (lex_buf);
|
||||
return QUOTED_STRING;
|
||||
}
|
||||
|
||||
/* Gather a generic argument. */
|
||||
BUF_INIT ();
|
||||
while (! ISSPACE (c)
|
||||
&& c != ','
|
||||
&& c != COMMENT_CHAR
|
||||
&& c != '('
|
||||
&& c != ')')
|
||||
{
|
||||
BUF_ADD (c);
|
||||
c = getc (current.file);
|
||||
}
|
||||
BUF_FINISH ();
|
||||
|
||||
ungetc (c, current.file);
|
||||
|
||||
/* FIXME: Possible memory leak. */
|
||||
yylval.string = xstrdup (lex_buf);
|
||||
return STRING;
|
||||
}
|
||||
|
||||
/* Get a number from a string. */
|
||||
|
||||
static long
|
||||
nlmlex_get_number (const char *s)
|
||||
{
|
||||
long ret;
|
||||
char *send;
|
||||
|
||||
ret = strtol (s, &send, 10);
|
||||
if (*send != '\0')
|
||||
nlmheader_warn (_("bad number"), -1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Prefix the nlmconv warnings with a note as to where they come from.
|
||||
We don't use program_name on every warning, because then some
|
||||
versions of the emacs next-error function can't recognize the line
|
||||
number. */
|
||||
|
||||
static void
|
||||
nlmheader_identify (void)
|
||||
{
|
||||
static int done;
|
||||
|
||||
if (! done)
|
||||
{
|
||||
fprintf (stderr, _("%s: problems in NLM command language input:\n"),
|
||||
program_name);
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Issue a warning. */
|
||||
|
||||
static void
|
||||
nlmheader_warn (const char *s, int imax)
|
||||
{
|
||||
nlmheader_identify ();
|
||||
fprintf (stderr, "%s:%d: %s", current.name, current.lineno, s);
|
||||
if (imax != -1)
|
||||
fprintf (stderr, " (max %d)", imax);
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
/* Report an error. */
|
||||
|
||||
static void
|
||||
nlmheader_error (const char *s)
|
||||
{
|
||||
nlmheader_warn (s, -1);
|
||||
++parse_errors;
|
||||
}
|
||||
|
||||
/* Add a string to a string list. */
|
||||
|
||||
static struct string_list *
|
||||
string_list_cons (char *s, struct string_list *l)
|
||||
{
|
||||
struct string_list *ret;
|
||||
|
||||
ret = (struct string_list *) xmalloc (sizeof (struct string_list));
|
||||
ret->next = l;
|
||||
ret->string = s;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Append a string list to another string list. */
|
||||
|
||||
static struct string_list *
|
||||
string_list_append (struct string_list *l1, struct string_list *l2)
|
||||
{
|
||||
register struct string_list **pp;
|
||||
|
||||
for (pp = &l1; *pp != NULL; pp = &(*pp)->next)
|
||||
;
|
||||
*pp = l2;
|
||||
return l1;
|
||||
}
|
||||
|
||||
/* Append a string to a string list. */
|
||||
|
||||
static struct string_list *
|
||||
string_list_append1 (struct string_list *l, char *s)
|
||||
{
|
||||
struct string_list *n;
|
||||
register struct string_list **pp;
|
||||
|
||||
n = (struct string_list *) xmalloc (sizeof (struct string_list));
|
||||
n->next = NULL;
|
||||
n->string = s;
|
||||
for (pp = &l; *pp != NULL; pp = &(*pp)->next)
|
||||
;
|
||||
*pp = n;
|
||||
return l;
|
||||
}
|
||||
|
||||
/* Duplicate a string in memory. */
|
||||
|
||||
static char *
|
||||
xstrdup (const char *s)
|
||||
{
|
||||
unsigned long len;
|
||||
char *ret;
|
||||
|
||||
len = strlen (s);
|
||||
ret = xmalloc (len + 1);
|
||||
strcpy (ret, s);
|
||||
return ret;
|
||||
}
|
||||
1705
binutils/nm.c
1705
binutils/nm.c
File diff suppressed because it is too large
Load Diff
@@ -1,22 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with ar.o to flag that this program is 'ar' (not 'ranlib'). */
|
||||
|
||||
int is_ranlib = 0;
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
||||
02110-1301, USA. */
|
||||
|
||||
/* Linked with objcopy.o to flag that this program is 'objcopy' (not
|
||||
'strip'). */
|
||||
|
||||
int is_strip = 0;
|
||||
4146
binutils/objcopy.c
4146
binutils/objcopy.c
File diff suppressed because it is too large
Load Diff
3671
binutils/objdump.c
3671
binutils/objdump.c
File diff suppressed because it is too large
Load Diff
@@ -1,51 +0,0 @@
|
||||
/* objdump.h
|
||||
Copyright 2011, 2012 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Binutils.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, 51 Franklin Street - Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
struct objdump_private_option
|
||||
{
|
||||
/* Option name. */
|
||||
const char *name;
|
||||
|
||||
/* TRUE if the option is selected. Automatically set and cleared by
|
||||
objdump. */
|
||||
unsigned int selected;
|
||||
};
|
||||
|
||||
struct objdump_private_desc
|
||||
{
|
||||
/* Help displayed for --help. */
|
||||
void (*help)(FILE *stream);
|
||||
|
||||
/* Return TRUE if these options can be applied to ABFD. */
|
||||
int (*filter)(bfd *abfd);
|
||||
|
||||
/* Do the actual work: display whatever is requested according to the
|
||||
options whose SELECTED field is set. */
|
||||
void (*dump)(bfd *abfd);
|
||||
|
||||
/* List of options. Terminated by a NULL name. */
|
||||
struct objdump_private_option *options;
|
||||
};
|
||||
|
||||
/* XCOFF specific target. */
|
||||
extern const struct objdump_private_desc objdump_private_desc_xcoff;
|
||||
|
||||
/* Mach-O specific target. */
|
||||
extern const struct objdump_private_desc objdump_private_desc_mach_o;
|
||||
1094
binutils/od-macho.c
1094
binutils/od-macho.c
File diff suppressed because it is too large
Load Diff
1680
binutils/od-xcoff.c
1680
binutils/od-xcoff.c
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
*.gmo
|
||||
@@ -1,258 +0,0 @@
|
||||
# Makefile for program source directory in GNU NLS utilities package.
|
||||
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
|
||||
# Copyright 2003, 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file may be copied and used freely without restrictions. It can
|
||||
# be used in projects which are not available under the GNU Public License
|
||||
# but which still want to provide support for the GNU gettext functionality.
|
||||
# Please note that the actual code is *not* freely available.
|
||||
|
||||
PACKAGE = @PACKAGE@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SHELL = /bin/sh
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_builddir = @top_builddir@
|
||||
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
datadir = $(prefix)/@DATADIRNAME@
|
||||
localedir = $(datadir)/locale
|
||||
gnulocaledir = $(prefix)/share/locale
|
||||
gettextsrcdir = $(prefix)/share/gettext/po
|
||||
subdir = po
|
||||
|
||||
DESTDIR =
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||
|
||||
CC = @CC@
|
||||
GENCAT = @GENCAT@
|
||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
||||
MSGFMT = @MSGFMT@
|
||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
||||
|
||||
DEFS = @DEFS@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
INCLUDES = -I.. -I$(top_srcdir)/intl
|
||||
|
||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||
|
||||
SOURCES = cat-id-tbl.c
|
||||
POFILES = @POFILES@
|
||||
GMOFILES = @GMOFILES@
|
||||
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
||||
|
||||
POTFILES = \
|
||||
|
||||
CATALOGS = @CATALOGS@
|
||||
CATOBJEXT = @CATOBJEXT@
|
||||
INSTOBJEXT = @INSTOBJEXT@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) $<
|
||||
|
||||
.po.pox:
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
$(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
|
||||
|
||||
.po.mo:
|
||||
$(MSGFMT) -o $@ $<
|
||||
|
||||
.po.gmo:
|
||||
file=`echo $* | sed 's,.*/,,'`.gmo \
|
||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
||||
|
||||
.po.cat:
|
||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
||||
|
||||
|
||||
all: all-@USE_NLS@
|
||||
|
||||
all-yes: $(CATALOGS) @MAINT@ $(PACKAGE).pot
|
||||
all-no:
|
||||
|
||||
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
||||
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--msgid-bugs-address=bug-binutils@gnu.org \
|
||||
--files-from=$(srcdir)/POTFILES.in
|
||||
rm -f $(srcdir)/$(PACKAGE).pot
|
||||
mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
|
||||
|
||||
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
|
||||
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
|
||||
rm -f cat-id-tbl.tmp
|
||||
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
|
||||
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
|
||||
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
|
||||
rm cat-id-tbl.tmp; \
|
||||
else \
|
||||
echo cat-id-tbl.c changed; \
|
||||
rm -f $(srcdir)/cat-id-tbl.c; \
|
||||
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
|
||||
fi
|
||||
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
|
||||
|
||||
|
||||
install: install-exec install-data
|
||||
install-exec:
|
||||
install-info:
|
||||
install-html:
|
||||
install-pdf:
|
||||
install-data: install-data-@USE_NLS@
|
||||
install-data-no: all
|
||||
install-data-yes: all
|
||||
if test -r $(MKINSTALLDIRS); then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
||||
else \
|
||||
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
||||
fi
|
||||
@catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
case "$$cat" in \
|
||||
*.gmo) destdir=$(gnulocaledir);; \
|
||||
*) destdir=$(localedir);; \
|
||||
esac; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
|
||||
if test -r $(MKINSTALLDIRS); then \
|
||||
$(MKINSTALLDIRS) $$dir; \
|
||||
else \
|
||||
$(top_srcdir)/mkinstalldirs $$dir; \
|
||||
fi; \
|
||||
if test -r $$cat; then \
|
||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
else \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
||||
fi; \
|
||||
if test -r $$cat.m; then \
|
||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
if test -r $(srcdir)/$$cat.m ; then \
|
||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
echo "installing $(srcdir)/$$cat as" \
|
||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
||||
else \
|
||||
true; \
|
||||
fi; \
|
||||
fi; \
|
||||
done
|
||||
if test "$(PACKAGE)" = "gettext"; then \
|
||||
if test -r $(MKINSTALLDIRS); then \
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
||||
else \
|
||||
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||
else \
|
||||
: ; \
|
||||
fi
|
||||
|
||||
# Define this as empty until I found a useful application.
|
||||
installcheck:
|
||||
|
||||
uninstall:
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
||||
done
|
||||
rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
|
||||
|
||||
check: all
|
||||
|
||||
cat-id-tbl.o: ../intl/libgettext.h
|
||||
|
||||
html dvi pdf ps info tags TAGS ID:
|
||||
|
||||
mostlyclean:
|
||||
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
|
||||
rm -fr *.o
|
||||
|
||||
clean: mostlyclean
|
||||
|
||||
distclean: clean
|
||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
||||
|
||||
maintainer-clean: distclean
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
rm -f $(GMOFILES)
|
||||
|
||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
dist distdir: update-po $(DISTFILES)
|
||||
dists="$(DISTFILES)"; \
|
||||
for file in $$dists; do \
|
||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||
done
|
||||
|
||||
update-po: Makefile
|
||||
$(MAKE) $(PACKAGE).pot
|
||||
PATH=`pwd`/../src:$$PATH; \
|
||||
cd $(srcdir); \
|
||||
catalogs='$(CATALOGS)'; \
|
||||
for cat in $$catalogs; do \
|
||||
cat=`basename $$cat`; \
|
||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
||||
mv $$lang.po $$lang.old.po; \
|
||||
echo "$$lang:"; \
|
||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
||||
rm -f $$lang.old.po; \
|
||||
else \
|
||||
echo "msgmerge for $$cat failed!"; \
|
||||
rm -f $$lang.po; \
|
||||
mv $$lang.old.po $$lang.po; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
POTFILES: POTFILES.in
|
||||
( if test 'x$(srcdir)' != 'x.'; then \
|
||||
posrcprefix='$(top_srcdir)/'; \
|
||||
else \
|
||||
posrcprefix="../"; \
|
||||
fi; \
|
||||
rm -f $@-t $@ \
|
||||
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
|
||||
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
|
||||
| sed -e '$$s/\\$$//') > $@-t \
|
||||
&& chmod a-w $@-t \
|
||||
&& mv $@-t $@ )
|
||||
|
||||
POTFILES.in: @MAINT@ ../Makefile
|
||||
cd .. && $(MAKE) po/POTFILES.in
|
||||
|
||||
Makefile: Make-in ../config.status POTFILES
|
||||
cd .. \
|
||||
&& CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
|
||||
CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,75 +0,0 @@
|
||||
addr2line.c
|
||||
ar.c
|
||||
arsup.c
|
||||
arsup.h
|
||||
bin2c.c
|
||||
binemul.c
|
||||
binemul.h
|
||||
bucomm.c
|
||||
bucomm.h
|
||||
budbg.h
|
||||
coffdump.c
|
||||
coffgrok.c
|
||||
coffgrok.h
|
||||
cxxfilt.c
|
||||
debug.c
|
||||
debug.c
|
||||
debug.h
|
||||
dlltool.c
|
||||
dlltool.h
|
||||
dllwrap.c
|
||||
dwarf.c
|
||||
dwarf.h
|
||||
elfcomm.c
|
||||
elfcomm.h
|
||||
elfedit.c
|
||||
emul_aix.c
|
||||
emul_vanilla.c
|
||||
filemode.c
|
||||
ieee.c
|
||||
ieee.c
|
||||
is-ranlib.c
|
||||
is-strip.c
|
||||
maybe-ranlib.c
|
||||
maybe-strip.c
|
||||
mclex.c
|
||||
nlmconv.c
|
||||
nlmconv.h
|
||||
nm.c
|
||||
not-ranlib.c
|
||||
not-strip.c
|
||||
objcopy.c
|
||||
objdump.c
|
||||
objdump.h
|
||||
od-macho.c
|
||||
od-xcoff.c
|
||||
prdbg.c
|
||||
rclex.c
|
||||
rdcoff.c
|
||||
rdcoff.c
|
||||
rddbg.c
|
||||
rddbg.c
|
||||
readelf.c
|
||||
rename.c
|
||||
resbin.c
|
||||
rescoff.c
|
||||
resrc.c
|
||||
resres.c
|
||||
size.c
|
||||
srconv.c
|
||||
stabs.c
|
||||
stabs.c
|
||||
strings.c
|
||||
sysdep.h
|
||||
sysdump.c
|
||||
unwind-ia64.c
|
||||
unwind-ia64.h
|
||||
version.c
|
||||
windint.h
|
||||
windmc.c
|
||||
windmc.h
|
||||
windres.c
|
||||
windres.h
|
||||
winduni.c
|
||||
winduni.h
|
||||
wrstabs.c
|
||||
7825
binutils/po/bg.po
7825
binutils/po/bg.po
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
7486
binutils/po/da.po
7486
binutils/po/da.po
File diff suppressed because it is too large
Load Diff
8944
binutils/po/es.po
8944
binutils/po/es.po
File diff suppressed because it is too large
Load Diff
8682
binutils/po/fi.po
8682
binutils/po/fi.po
File diff suppressed because it is too large
Load Diff
8396
binutils/po/fr.po
8396
binutils/po/fr.po
File diff suppressed because it is too large
Load Diff
6486
binutils/po/id.po
6486
binutils/po/id.po
File diff suppressed because it is too large
Load Diff
8280
binutils/po/it.po
8280
binutils/po/it.po
File diff suppressed because it is too large
Load Diff
8782
binutils/po/ja.po
8782
binutils/po/ja.po
File diff suppressed because it is too large
Load Diff
5090
binutils/po/ro.po
5090
binutils/po/ro.po
File diff suppressed because it is too large
Load Diff
8495
binutils/po/ru.po
8495
binutils/po/ru.po
File diff suppressed because it is too large
Load Diff
4990
binutils/po/rw.po
4990
binutils/po/rw.po
File diff suppressed because it is too large
Load Diff
6306
binutils/po/sk.po
6306
binutils/po/sk.po
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user