Commit Graph

402 Commits

Author SHA1 Message Date
Ian Lance Taylor 37fb6db111 2000-02-27 Jakub Jelinek <jakub@redhat.com>
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
	architecture if the object causing the bump is dynamic.
	* elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
	and also don't it for memory ordering.
	(sparc64_elf_write_relocs): Take src_rela out of the loop.
2000-02-28 03:50:32 +00:00
Ian Lance Taylor 67d83c76c5 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
calling bfd_get_section_size_before_reloc.
	(decode_line_info): Likewise.
	(_bfd_dwarf2_find_nearest_line): Likewise.
2000-02-28 03:39:28 +00:00
Ian Lance Taylor e56f75e906 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
* Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
	name of the libtool directory.
	* Makefile.in: Rebuild.
2000-02-27 17:08:06 +00:00
Ian Lance Taylor a74801baf8 rebuild with current tools 2000-02-27 16:55:52 +00:00
Jeff Law 36e89602d2 * som.c (SOM_HOWTO): Define.
(som_hppa_howto_table): Use it.
2000-02-26 01:45:22 +00:00
Alexandre Oliva 9d23b7fed1 * config.bfd: Enable 64 bit support for GNU/Linux/sparc. 2000-02-25 19:39:00 +00:00
Alexandre Oliva 246c66877d * config.bfd: Enable 64 bit support for Solaris7+/sparc. 2000-02-25 19:18:17 +00:00
Catherine Moore ba20314ec2 * som.c (som_misc_symbol_info): Add field
secondary_def.
        (som_bfd_derive_misc_symbol_info):  Initialize
        secondary_def.
        (som_build_and_write_symbol_table): Keep track
        of secondary_def field.
        (som_slurp_symbol_table): Set BSF_WEAK symbol flag
        if secondary_def field is set.
        (som_bfd_ar_write_symbol_stuff): Initialize
        secondary_def.
2000-02-24 13:41:02 +00:00
Nick Clifton 1efe4b1082 fix typo in previous delta 2000-02-23 22:29:38 +00:00
Nick Clifton ecb651f0ab Accept 16-bit addresses. 2000-02-23 22:27:55 +00:00
Alan Modra 5b93d8bb51 Add IBM 370 support. 2000-02-23 13:52:23 +00:00
Ian Lance Taylor 1287d1cc37 2000-02-22 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): If a version symbol is
	not defined, don't add a second ELF_VER_CHR.
2000-02-22 08:06:01 +00:00
Ian Lance Taylor a432cc3d1c * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
invalid relocation types, and change them to R_386_NONE.
2000-02-22 05:52:59 +00:00
Ian Lance Taylor 2bd171e001 2000-02-22 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_bfd_final_link): Call output_extsym for global
	symbols converted to local symbols even when stripping all
	symbols.
        (elf_link_output_extsym): Process global symbols converted to
	local symbols even if they are being stripped.
2000-02-22 05:51:02 +00:00
Alan Modra f6af82bd44 This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings.  One usused var, and a macro parenthesis fix too.  Also check
input sections are elf when doing gc in elflink.h.
2000-02-21 12:01:27 +00:00
Ian Lance Taylor 494e2c585a ELF HPPA doesn't work at present; remove it until it does.
* config.bfd: Comment out setting targ_defvec to
	bfd_elf32_hppa_vec.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Remove elf32-hppa.lo.
	(BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
	(SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
	* Makefile.in: Rebuild.
	* targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
2000-02-21 05:33:40 +00:00
Geoffrey Keating 2fca4467d0 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
is no bfd_free().  Revert bfd_free part of previous change.
2000-02-19 01:11:19 +00:00
Geoffrey Keating 5ea1af0d5d * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
arrays.
(coff_compute_section_file_positions): Use bfd_free to pair
bfd_malloc.
(coff_write_object_contents): Likewise.

* coff-rs6000.c (xcoff_howto_table_16): New variable.
(xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
2000-02-19 00:59:26 +00:00
Richard Henderson c61b871721 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
and hide_symbol members.
        (elf_link_hash_copy_indirect): Remove.
        (elf_link_hash_hide_symbol): Remove.
        (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
        and elf_backend_hide_symbol.
        (_bfd_elf_link_hash_copy_indirect): Declare.
        (_bfd_elf_link_hash_hide_symbol): Declare.
        * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
        (_bfd_elf_link_hash_hide_symbol): Likewise.
        (_bfd_elf_link_hash_table_init): Don't init killed members.
        * elflink.h (elf_link_add_object_symbols): Use the bed function
        pointers not elf_link_hash_{copy_indirect,hide_symbol}.
        (elf_link_assign_sym_version): Likewise.
        * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
        (elf_backend_hide_symbol): Likewise.
        (elfNN_bed): Update for new members.
2000-02-18 09:23:06 +00:00
Kevin Buettner ced7a2cc9a Fix copyright line. 2000-02-17 21:16:16 +00:00
Kevin Buettner 6ad49cca4c AIX 4.3 core dump changes. 2000-02-17 09:01:28 +00:00
Joern Rennecke d4845d5762 bfd:
Reinstate bits of sh4 support that got accidentally deleted.
Add sh-dsp support.

bfd:

	* archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
	(bfd_mach_sh3_dsp): Likewise.
	(bfd_mach_sh4): Reinstate.
	(bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
	* bfd-in2.h: Regenerate.
	* coff-sh.c (struct sh_opcode): flags is no longer short.
	(USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
	(sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
	(sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
	(sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
	(sh_opcodes): No longer const.
	(sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
	(sh_insn_uses_reg): Check for USESAS and USESR8.
	(sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
	(_bfd_sh_align_load_span): Return early for SH4.
	Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
	Take into account that field b of a parallel processing insn
	could be mistaken for a separate insn.
	* cpu-sh.c (arch_info_struct): New array elements for
	sh2, sh-dsp and sh3-dsp.
	Reinstate element for sh4.
	(SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
	(SH4_NEXT): Reinstate.
	(SH3_NEXT, SH3E_NEXT): Adjust.
	* elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
	* elf32-sh.c (sh_elf_set_private_flags): New function.
	(sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
	(sh_elf_merge_private_data): New function.
	(elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
	(bfd_elf32_bfd_copy_private_bfd_data): Define.
	(bfd_elf32_bfd_merge_private_bfd_data): Change to
	sh_elf_merge_private_data.

gas:

	* config/tc-sh.c ("elf/sh.h"): Include.
	(sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables.
	(md.begin): Initialize target_arch.
	Only include opcodes in has table that match selected architecture.
	(parse_reg): Recognize register names for sh-dsp.
	(parse_at): Recognize post-modify addressing.
	(get_operands): The leading space is now optional.
	(get_specific): Remove FDREG_N support.  Add support for sh-dsp
	arguments.  Update valid_arch.
	(build_Mytes): Add support for SDT_REG_N.
	(find_cooked_opcode): New function, broken out of md_assemble.
	(assemble_ppi, sh_elf_final_processing): New functions.
	(md_assemble): Use find_cooked_opcode and assemble_ppi.
	(md_longopts, md_parse_option): New option: -dsp.
	* config/tc-sh.h (elf_tc_final_processing): Define.
	(sh_elf_final_processing): Declare.

include/elf:

	* sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
	(EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
	(EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.

opcodes:

	* sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
	(print_insn_ppi): Likewise.
	(print_insn_shx): Use info->mach to select appropriate insn set.
	Add support for sh-dsp.  Remove FD_REG_N support.
	* sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
	(sh_arg_type): Likewise.  Remove FD_REG_N.
	(sh_dsp_reg_nums): New enum.
	(arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
	(arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
	(arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
	(arch_sh3_dsp_up): Likewise.
	(sh_opcode_info): New field: arch.
	(sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
	D_REG_N.  Fill in arch field.  Add sh-dsp insns.
2000-02-17 00:33:36 +00:00
Richard Henderson 2920b85c63 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
hide_symbol members.
        (elf_link_hash_copy_indirect): New.
        (elf_link_hash_hide_symbol): New.
        * elflink.h (elf_link_add_object_symbols): Break out copy from
        indirect new new symbol to elf.c.
        (elf_link_assign_sym_version): Break out privatization of
        non-exported symbol to elf.c.
        * elf.c (_bfd_elf_link_hash_copy_indirect): New.
        (_bfd_elf_link_hash_hide_symbol): New.
        (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
2000-02-13 23:11:32 +00:00
Ian Lance Taylor 7f8d5fc90b * section.c (_bfd_strip_section_from_output): Add info parameter.
If it passed as non-NULL, use it to check whether any input BFD
	has an input section which uses this output section.  Change all
	callers.
	* bfd-in2.h: Rebuild.

	* bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
	bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
	1999-11-29.
	* bfd-in2.h: Rebuild.
2000-02-13 22:45:29 +00:00
Ian Lance Taylor e3c976c4eb rebuild 2000-02-13 22:40:13 +00:00
Timothy Wall 6c784c9aab Add hooks to support TI COFF handling. 2000-02-10 21:21:55 +00:00
Joern Rennecke 84dcfba7a2 Fix problem where -relax could reorder multiple consecutive sets of the
same register:
	* coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
	USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
	* (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
	* (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
	sh_insns_uses_or_sets_freg): New functions.
	* (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
	* (sh_insns_conflict): Use new functions and new macros to
	detect conflicts when two instructions both set same integer registers,
	both set same fp register, and both set special register.
2000-02-10 20:17:33 +00:00
Timothy Wall 363d7b14a5 Set arch/mach info prior to swapping in sections, so that the swapping
routines have access to the arch/mach info.
2000-02-09 13:41:44 +00:00
Nick Clifton 119a7cedc8 apply patch from MArk Elbrecht tpo update comment and copyright 2000-02-08 21:10:28 +00:00
Jason Molenda fd6848f679 2000-02-06 Jason Molenda (jsm@bugshack.cygnus.com)
* ChangeLog: Whitespace change to test logging.
	* bfd/ChangeLog, dejagnu/ChangeLog, include/ChangeLog, tcl/ChangeLog: Same.
2000-02-07 02:22:31 +00:00
Nick Clifton fad6fcbb00 Apply patch from Thomas de Lellis to allow nm to distinguish between weak
function symbols and weak data symbols.
2000-01-28 01:06:37 +00:00
Nick Clifton 2f0ca46a49 Apply Thoams de Lellis's patch to fic disassembly of Thumb instructions when
bounded by non-function labels.
2000-01-27 20:05:32 +00:00
Alan Modra 305c72062b Most of these changes are really only cosmetic. The readelf.c patch
fixes a thinko in get_dynamic_flags.  I found at least one message
string that included a `%' being passed to printf in the format
argument.
2000-01-26 23:11:48 +00:00
Nick Clifton b5f303f092 Remove use of a GCC extension when allocating local arrays. 2000-01-24 19:38:04 +00:00
Nick Clifton 2e4bb80ea1 Fix seeks and reads past the end of a BIM 2000-01-21 20:52:35 +00:00
Nick Clifton 3442f30943 fix spelling of Motorola 2000-01-20 19:08:43 +00:00
Nick Clifton 28240dcd30 fix mis-applied patch 2000-01-14 18:13:40 +00:00
Nick Clifton 6b3b007bde Applied Tim Wall's patch to replace RELSZ and friends with bfd_coff_relsz and
friends.
2000-01-13 23:55:21 +00:00
Nick Clifton 756fa1b9b7 Fix bug in interwork stubs from thumb to arm 2000-01-13 22:55:12 +00:00
Nick Clifton 9a968f4332 Apply Tim walls octest vs bytes patch 2000-01-13 22:10:36 +00:00
Nick Clifton f45fbf876d Apply for for CR 102957. 2000-01-13 20:46:54 +00:00
Nick Clifton 0decc84046 Add arm-conix target 2000-01-10 19:48:27 +00:00
Nick Clifton 16e9c715df Apply patch from Egor Duda to process win32_pstatus notes in core dumps. 2000-01-10 18:50:16 +00:00
Nick Clifton 9b234ee932 oops - omitted from previous delta 2000-01-04 23:28:10 +00:00
Nick Clifton 7a13edea08 ELF visibility patch from Martin Loewis. 2000-01-03 18:32:21 +00:00
Richard Henderson ea44b73426 * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
if no dynamic sections created.
1999-12-29 19:50:13 +00:00
Nick Clifton b1f10154aa fix PE file format detection 1999-12-28 00:25:18 +00:00
Nick Clifton cb665cd3e2 Move PE format object file detection code into common place. 1999-12-17 19:03:09 +00:00
Nick Clifton af74ae9911 catch bad arm relocs 1999-12-17 00:42:32 +00:00
Nick Clifton 48dfb43001 Fix detection of common symbols 1999-12-14 23:35:43 +00:00