* vms.h: Include time.h. Add prototypes for vms_get_module_name,
vms_time_to_time_t and vms_rawtime_to_time_t.
* vms.c (vms_alpha_vec): Add archives support.
* vms-misc.c: Include safe-ctype.h
(vms_get_module_name): New function.
(vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
* vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
vms_get_module_name function. Use this function.
* targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
* libbfd-in.h: Add prototype for _bfd_append_relative_path.
Add prototypes for vms-lib.c
* libbfd.h: Regenerate.
* configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
vms-lib.lo to vms_alpha_vec.
* config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
* configure: Regenerate.
* bfd.c: Add selective_search field.
* bfd-in2.h: Regenerate.
* archive.c (append_relative_path): Rename to
_bfd_append_relative_path and make it public.
(_bfd_get_elt_at_filepos): Adjust for above renaming.
* Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
(BFD32_BACKENDS_CFILES): Add vms-lib.c
* Makefile.in: Regenerate.
2009-03-11 Chris Demetriou <cgd@google.com>
* bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
* bfd-in2.h: Regenerate.
* archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
mode.
(bsd_write_armap): Likewise.
(_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
flag is set, do nothing.
(coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
for timestamp.
[binutils/ChangeLog]
2009-03-11 Chris Demetriou <cgd@google.com>
* ar.c (deterministic): New global variable.
(main): Recognize new 'D' option, which enables 'deterministic mode'.
(usage): Document new 'D' option.
(write_archive): Set BFD_DETERMINISTIC_OUTPUT in output archive's
flags if deterministic mode was requested.
* doc/binutils.texi (ar): Document deterministic mode ('D' option).
[binutils/testsuite/ChangeLog]
2009-03-11 Chris Demetriou <cgd@google.com>
* binutils-all/ar.exp (deterministic_archive): New test.
* bfd/archive.c (_bfd_find_nested_archive): New function.
(get_extended_arelt_filename): Add origin parameter.
(_bfd_generic_read_ar_hdr_mag): Deal with extended name
combined with a file offset.
(append_relative_path): New function.
(_bfd_get_elt_at_filepos): Deal with external members and
nested archives.
(bfd_generic_openr_next_archived_file): Thin archives.
(bfd_generic_archive_p): Recognize new magic string.
(adjust_relative_path): New function.
(_bfd_construct_extended_name_table): Construct extended
names for thin archive members.
(_bfd_write_archive_contents): Emit new magic string, skip
copying files for thin archives.
* bfd/bfd-in.h (bfd_is_thin_archive): New macro.
* bfd/bfd.c (struct bfd): New fields for thin archives.
* bfd/libbfd-in.h (struct areltdata): New field for thin archives.
* bfd/opncls.c (bfd_close): Delete BFDs for nested archives.
* binutils/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.
* binutils/arsup.c (ar_open): Initialize new flag.
* binutils/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.
* binutils/dlltool.c (gen_lib_file): Initialize thin archive flag.
* binutils/emul_aix.c (ar_emul_aix_internal): Add new flatten
parameter, currently unimplemented.
All callers changed.
* binutils/objcopy.c (copy_archive): Preserve thin archive flag.
* binutils/doc/binutils.texi: Update ar documentation.
* binutils/testsuite/binutils-all/ar.exp: Add thin archive tests.
* include/aout/ar.h (ARMAGT): New magic string for thin archives.
* bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
targets as 64-bit values, even if running on a 64-bit host.
* coffgen.c (coff_print_symbol): Likewise.
* nm.c (value_format): Replace with value_format_32bit and
value_format_64bit.
(set_radix): Update setting of value_format.
(set_print_width): New function. Compute the address size of a
given bfd and set the print_width global appropriately.
(display_archive): Use set_print_width.
(display_file): Likewise,
(print_object_filename_sysv): Update use of print_width.
(print_archive_member_sysv): Likewise.
(print_symbol_filename_posix): Likewise.
(print_sumbol_info_bfd, print_symbol_info_sysv): Likewise.
argument and emits the string followed by a comma and then the length of
the string.
(CONST_STRNEQ): New macro. Checks to see if a variable string has a constant
string as its initial characters.
(CONST_STRNCPY): New macro. Copies a constant string to the start of a
variable string.
* bfd-in2.h: Regenerate.
* <remainign files>: Make use of the new macros.
* Makefile.am: Add rules to build pe-arm-wince.lo and pei-arm-wince.lo objects.
* Makefile.in: Regenerate.
* pe-arm-wince.c: New file.
* pei-arm-wince.c: New file.
* pei-arm.c: Remove ARM_WINCE block.
* pe-arm.c: Remove ARM_WINCE block. Rename
bfd_arm_pe_allocate_interworking_sections,
bfd_arm_pe_get_bfd_for_interworking, and
bfd_arm_pe_process_before_allocation to
bfd_armpe_allocate_interworking_sections,
bfd_armpe_get_bfd_for_interworking, and
bfd_armpe_process_before_allocation. Move them before including bfd.h.
* bfd.c: ARM wince bfd format names were renamed. Adjust.
* coff-arm.c [ARM_WINCE]: Adjust so Windows CE doesn't end up with unexpected/conflicting relocs.
* targets.c: The arm-wince-pe target got its own new vector. Adjust.
* config.bfd: Likewise.
* configure.in: Likewise.
* configure: Regenerate.
binutils
* 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.
gas
* Makefile.am (TARG_ENV_HFILES): Add te-wince-pe.h.
* Makefile.in: Regenerate.
* config/tc-arm.h [TARGET_FORMAT]: ARM wince bfd names were renamed. Adjust.
ld
* Makefile.am: Split arm-wince into its own emulation.
* Makefile.in: Regenerate.
* configure.tgt: Set targ_emul to arm_wince_pe for ARM Windows CE targets.
* pe-dll.c : Define PE_ARCH_arm_wince.
(pe_detail_list): Add PE_ARCH_arm_wince case.
(make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
* emulparams/arm_wince_pe.sh: New file.
* emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
Remap bfd_arm_allocate_interworking_sections, bfd_arm_get_bfd_for_interworking and
bfd_arm_process_before_allocation for arm-pe and arm-wince-pe targets too.
(gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and arm-epoc bfd format names.
* coff-arm.c (coff_arm_rtype_to_howto) [COFF_WITH_PE]: Handle ARM_SECREL.
(coff_arm_reloc_type_lookup): Map BFD_RELOC_32_SECREL to ARM_SECREL.
* pe-arm.c [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
* pei-arm.c [TARGET_UNDERSCORE]: Define for ARM_WINCE like in pe-arm.c.
[COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
* config/tc-arm.c: Move "dwarf2dbg.h" inclusion out of OBJ_ELF only block.
(pe_directive_secrel) [TE_PE]: New function.
(md_pseudo_table) [!OBJ_ELF]: Handle 2byte, 4byte, 8byte, file, loc, loc_mark_labels.
[TE_PE]: Handle secrel32.
(output_relax_insn): Remove OBJ_ELF around dwarf2_emit_insn call.
(output_inst): Remove OBJ_ELF around dwarf2_emit_insn call.
(arm_frob_label): Remove OBJ_ELF around dwarf2_emit_label call.
(md_section_align): Only round section sizes here for AOUT targets.
(tc_arm_regname_to_dw2regnum): Move out for OBJ_ELF only block.
(tc_pe_dwarf2_emit_offset): New function.
(md_apply_fix) [TE_PE]: Handle BFD_RELOC_32_SECREL.
(cons_fix_new_arm): Handle O_secrel.
* config/tc-arm.h : Move DWARF2_LINE_MIN_INSN_LENGTH, DWARF2_DEFAULT_RETURN_COLUMN and DWARF2_CIE_DATA_ALIGNMENT out of OBJ_ELF only block.
[TE_PE]: Define O_secrel, TC_DWARF2_EMIT_OFFSET, and declare tc_pe_dwarf2_emit_offset.
* ld-pe/pe.exp: Enable tests on arm-wince-pe.
* ld-pe/secrel.d: Adjust test to work on arm-wince-pe too.
* elflink.c (elf_link_add_object_symbols): Fix the warning message about
mismatched alignments to allow for the case where the common alignment
has been deduced from the section alignment.
* bfd.c (_bfd_default_error_handler): Update comment to explain why bfd
and asection varargs are out of order.
Explicitly catch and abort on NULL bfd and asection arguments.
2005-05-23 Fred Fish <fnf@specifixinc.com>
* dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
(struct funcinfo): Add caller_func, caller_file, caller_line.
tag, and nesting_level members.
(lookup_address_in_function_table): Change first passed parameter
from "struct funcinfo *" to "struct comp_unit *".
(lookup_address_in_function_table): Dereference unit to find function
table.
(lookup_address_in_function_table): Traverse the function list to
create a chain of inlined functions back to the first non inlined
function.
(scan_unit_for_functions): Remember tag and nesting level. Handle
DW_AT_call_file and DW_AT_call_line.
(comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
call to pass unit pointer instead of function table pointer. For
inlined functions, save pointer to the inliner chain.
(_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
(_bfd_dwarf2_find_inliner_info): New function that returns information
from the inliner chain after a call to bfd_find_nearest_line.
* bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
* targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
NAME##_find_inliner_info.
(bfd_target): Add _bfd_find_inliner_info.
* bfd-in2.h: Regenerate.
* libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
macro that always returns bfd_false.
(_bfd_dwarf2_find_inliner_info): Declare.
* libbfd.h: Regenerate.
* elf32-arm.c (elf32_arm_find_inliner_info): New function
that calls _bfd_dwarf2_find_inliner_info.
(bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
* elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
that calls _bfd_dwarf2_find_inliner_info.
* elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
* elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
_bfd_mips_elf_find_inliner_info.
* elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
* elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
* elf.c (_bfd_elf_find_inliner_info): New function that calls
_bfd_dwarf2_find_inliner_info.
* elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
* elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
_bfd_elf_find_inliner_info.
* coffgen.c (coff_find_inliner_info): New function that
calls _bfd_dwarf2_find_inliner_info.
* libcoff-in.h (coff_find_inliner_info): Declare.
* libcoff.h: Regenerate.
* coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
(pmac_xcoff_vec) Ditto.
* coff64-rs6000.c (rs6000coff64_vec): Ditto.
(aix5coff64_vec): Ditto.
* aout-target.h (MY_find_inliner_info): Define as
_bfd_nosymbols_find_inliner_info.
* aout-tic30.c (MY_find_inliner_info): Ditto.
* binary.c (binary_find_inliner_info): Ditto.
* i386msdos.c (msdos_find_inliner_info): Ditto.
* ihex.c (ihex_find_inliner_info): Ditto.
* libaout.h (aout_32_find_inliner_info): Ditto.
* libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
* mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
* mmo.c (mmo_find_inliner_info): Ditto.
* nlm-target.h (nlm_find_inliner_info): Ditto.
* pef.c (bfd_pef_find_inliner_info): Ditto.
* ppcboot.c (ppcboot_find_inliner_info): Ditto.
* srec.c (srec_find_inliner_info): Ditto.
* tekhex.c (tekhex_find_inliner_info): Ditto.
* versados.c (versados_find_inliner_info): Ditto.
* xsym.c (bfd_sym_find_inliner_info): Ditto.
* ieee.c (ieee_find_inliner_info): New function that always
returns FALSE.
* oasys.c (oasys_find_inliner_info): Ditto.
* vms.c (vms_find_inliner_info): Ditto.
* bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
* elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
* elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
* libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
* targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
Use both symbol tables on non-relocatable objects. Use a common
error exit. Fix "mid" warning.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
binutils/
* objdump.c (dump_bfd): Pass both symbol tables to
bfd_get_synthetic_symtab.
* elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
if not yet defined.
* elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
(synthetic_opd, synthetic_relocatable): New variables.
(compare_symbols, compare_relocs): New helper routines.
(ppc64_elf_get_synthetic_symtab): New function.
* bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
to relsyms.
* bfd-in2.h: Regenerated.
* elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
to relsyms. Return 0 if abfd is relocatable.
binutils/
* objdump.c (dump_bfd): For relocatable objects, pass syms instead
of dynsyms to bfd_get_synthetic_symtab.