Commit Graph

547 Commits

Author SHA1 Message Date
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
Andrew Cagney 93be3c4bd2 Add support for sparc-*-netbsdelf* and sparc-*-netbsdaout*. 1999-12-14 05:13:29 +00:00
Nick Clifton ceddadb217 fix detection of common symbols. 1999-12-14 02:20:57 +00:00
Nick Clifton a3a8c91d41 Fix elf linker's handling of commons in archive maps 1999-12-10 20:17:28 +00:00
Nick Clifton 77fb9c28ac Revert previous patch. 1999-12-10 18:51:35 +00:00
Nick Clifton ad247e3c7d Change AR for ELF so that common symbols are not included in archive map.
Change LD for ELF so that archive elements whoes archive map contains a
 reference to a common symbol will get linkled in.
Add new field to bfd_target structure and initialise it for all bfd targets.
1999-12-10 01:41:22 +00:00
Jim Blandy 6fe6a46127 *** empty log message *** 1999-12-07 23:56:53 +00:00
Jim Blandy ff08c6bbc8 Add support for SSE registers in ELF core files.
* elf.c (elfcore_make_note_pseudosection): New function.
(elfcore_grok_prfpreg): Use it.
(elfcore_grok_prxfpreg): New function.
(elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
1999-12-07 23:51:02 +00:00
Ian Lance Taylor 2a6d49ea17 * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
value by 4 before storing it back in the field.  From
	Koundinya. K <kk@ddeorg.soft.net>.
1999-12-03 06:51:54 +00:00
Jeff Law 31f8dc8fce * archures.c (bfd_mach_am33): Define.
* bfd-in2.h: Rebuilt.
        * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
        * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
        (compute_function_info): Handle additional registers saved by
        movm on the am33.
        (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
        (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
1999-12-01 10:14:02 +00:00
Jim Blandy 98d8431c7d * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
functions.
* bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
declarations.
1999-11-29 20:33:38 +00:00
Michael Meissner fe174262ec Add new relocations for alpha explicit relocation support 1999-11-28 03:26:42 +00:00
Nick Clifton 20cfcaae7b Add support for target specific processing of ELF segments 1999-11-26 09:52:23 +00:00
Nick Clifton ba3d4249ed Add SEC_CODE and SEC_READONLY flags to glue sections. 1999-11-25 11:52:39 +00:00
Nick Clifton 811b4bf61d Add SEC_CODE and SEC_READONLY flags to glue sections. 1999-11-25 11:45:05 +00:00
Nick Clifton 01ef19d281 fix typoi 1999-11-20 11:53:57 +00:00
Catherine Moore 1ca42bada0 * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
(elf_cpu32_plt_entry): Likewise.
1999-11-19 15:41:55 +00:00
Nick Clifton 078c8694a9 Fix processing of RVA relocs 1999-11-18 18:36:35 +00:00
Richard Henderson 86dc0f79f5 * elf-bfd.h (struct elf_backend_data): Reorder collect and
type_change_ok; add sign_extend_vma.
        * elf32-mips.c (elf_backend_sign_extend_vma): Define.
        * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
        (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
        * elfxx-target.h (elf_backend_sign_extend_vma): Default.
        (elfNN_bed): Follow struture changes.
1999-11-18 01:06:45 +00:00
Ian Lance Taylor 0bff3f4bb6 * libbfd.c (bfd_read): Check result of read against desired result
using !=, not <.
	(_bfd_generic_get_section_contents): Set bfd_error if the seek is
	invalid compared to the section size.
1999-11-09 19:13:21 +00:00
Ian Lance Taylor a8c5faf7f6 * ieee.c (ieee_slurp_debug): Get the length of the debug
information right if there is no data part.
1999-11-09 19:11:52 +00:00
Jeff Law 832fc2027d * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
1999-11-02 08:46:25 +00:00
Ian Lance Taylor 71a40b32ae * elflink.h (elf_bfd_final_link): Make last_local signed. 1999-10-28 04:08:57 +00:00
Ian Lance Taylor 8140b6644d * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
starts with a zero.
1999-10-28 03:52:01 +00:00
Michael Meissner 7af8cca959 D10V patches from Cagney 1999-10-25 13:57:39 +00:00
Andrew Haley a67a877774 1999-10-15 Andrew Haley <aph@cygnus.com>
* dwarf1.c (parse_die): Fail to parse a die if its length is zero.
1999-10-18 12:45:21 +00:00
Jeff Law 68f8e33e59 Fix typo in last change. 1999-10-17 23:41:19 +00:00
Jeff Law 7a7191b720 * libhppa.h (bfd_hppa_insn2fmt): Change to return an int. 1999-10-17 23:21:41 +00:00
Ian Lance Taylor 64df8d0bce * elflink.h (elf_merge_symbol): When overriding a weak symbol with
a defined symbol in a shared library, clear the DEF_DYNAMIC flag
	too.
1999-10-08 15:21:56 +00:00
Geoffrey Keating 0af9979518 * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
relocs also need the GP value.
(_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
properly.  Handle sign-extension for R_MIPS_64 correctly.  Correct
the GP value for R_MIPS_LITERAL relocs too.  Handle
R_MIPS_64 relocs properly on big-endian MIPS.
(mips_elf_sign_extend): Behave properly with 'long long'.
(mips_elf_highest): Correct typo.
1999-10-08 03:07:07 +00:00
Doug Evans a23ef39fe9 * archures.c (bfd_mach_m32rx): Define it.
* bfd-in2.h: Rebuild.
1999-10-05 01:14:20 +00:00
Doug Evans e916b64e85 * cpu-m32r.c (arch_info_struct): New static global.
(bfd_m32r_arch): Refer to it.
	* elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
	(m32r_elf_print_private_bfd_data): Ditto.
	(m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
1999-10-05 00:54:12 +00:00
Richard Henderson f4bda9848f Fred Fish <fnf@cygnus.com>
* targets.c (cisco_core_vec): Replaced with two new vecs ...
        (cisco_core_big_vec): Add new bigendian vec.
        (cisco_core_little_vec): Add new little endian vec.

        * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
        (crash_info_locs): Add array of possible offsets.
        (MASK_ADDR): Mask to apply to crash info offset.
        (crashinfo_external): Add textbase, database, bssbase and
        turn into a typedef.
        (cisco_core_file_validate): Renamed from cisco_core_file_p.
        Many small changes to account for additional hardware versions.
        Pick a reasonable size for ".reg" section.  Add a ".crash"
        section to allow access to crashinfo_external struct.
        (cisco_core_file_p): New version of this function that
        iterates over crash_info_locs, calling cisco_core_file_validate.
        (cisco_core_vec): Old big endian only vec replaced with ...
        (cisco_core_big_vec): Add big endian version.
        (cisco_core_little_vec): Add little endian version.

        * configure.in (cisco_core_vec): Split to two new vectors ...
        (cisco_core_big_vec): New target vector.
        (cisco_core_little_vec): New target vector.
        * configure: Regenerate.
        * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
        to cisco_core_big_vec in targ_selvecs.
1999-09-28 21:45:39 +00:00
Geoffrey Keating d02f29adb2 * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
(mips_elf_relocate_got_local): Unused, delete.
(mips_elf_relocate_global_got): Unused, delete.
1999-09-28 04:11:05 +00:00
Richard Henderson 27ac83bfca Fred Fish <fnf@cygnus.com>
* elf.c (bfd_section_from_phdr): Add typename variable.  Use p_type
        to initialize it to something meaningful.  Then use it to generate
        more useful segment names.
1999-09-24 17:06:35 +00:00
Ian Lance Taylor 9eb7245e8b fix comment; from Fred Fish <fnf@ninemoons.com> 1999-09-19 22:43:16 +00:00
Jeff Law 2667095fc0 * som.c (NO_PCREL_MODES): Define if the system does not define
R_SHORT_PCREL_MODE.
        (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
        (som_write_fixups): Eliminate redundant pcrel mode relocs.  Handle
        R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
        * libhppa.h (dis_assemble_22): New function.
        (bfd_hppa_insn2fmt): Handle long branch.

        * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
        in PA2.0.
1999-09-19 18:22:20 +00:00
Alan Modra b7be1db6b5 Support 8 and 16-bit relocs for i386coff. Enable i386 gas testsuite tests
previously disabled for lack of such support.  For *-*-linux*libc1 targets,
XFAIL a ld testsuite that fails due to a bug in the dynamic linker prior to
glibc-2.1.
1999-09-18 00:44:47 +00:00
Nick Clifton 57db232e4b Undeo previous delta. Set gc_mark instead. 1999-09-17 11:04:47 +00:00
Jeff Law b2df14602e * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL. 1999-09-16 21:01:08 +00:00
Jeff Law 1209c61294 * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
symbol table, then just compute a suitable value (but do not
        create a __gp symbol).
1999-09-16 20:39:10 +00:00
Catherine Moore 38f7d33d09 (elf_cpu32_plt0_entry): Use a1 instead of a0.
(elf_cpu32_plt_entry): Likewise.
 ----------------------------------------------------------------------
1999-09-16 18:25:09 +00:00
Jeff Law dfec422f08 * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
symbols when building shared libraries.
        (elf_hppa_final_link_relocate): Correct handling of PCREL
        relocations against undefined symbols.
1999-09-16 16:51:34 +00:00
Nick Clifton d0f2103d07 Mark interworking sections as linker created to prevent garbage collection. 1999-09-16 15:32:40 +00:00
Jeff Law 19ef546580 * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
(elf_hppa_final_link_relocate): Consistently create an absolute
        address, then subtract out the value of __gp.
1999-09-15 08:51:45 +00:00
Michael Meissner 6d83c84bcf Fix problem with going to automake 2.14 1999-09-14 23:29:35 +00:00
Nick Clifton 06a5ee5553 Change ELF_MAXPAGESIZE to 0x1 1999-09-14 10:34:02 +00:00
Jeff Law 2ec0dd123c * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
(elf_hppa_final_link): Initialize text_segment_base and
        data_segment_base.
        (elf_hppa_final_link_relocate): Handle SEGREL relocations.
1999-09-14 03:44:43 +00:00
Jeff Law b2e311df32 * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
(elf_hppa_final_link_relocate): Likewise.
        (elf_hppa_relocate_insn): Likewise.
        (elf_hppa_relocate_section): Initialize HOWTO.
1999-09-14 02:03:58 +00:00
Ian Lance Taylor e5db213db2 1999-09-13 Donn Terry <donn@interix.com>
* coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
	handling to support both GNU and MS objects.
1999-09-13 23:55:22 +00:00
Ian Lance Taylor 7920749071 1999-09-13 Donn Terry <donn@interix.com>
* coffcode.h (coff_write_object_contents): Don't check reloc_count
	when determining whether to set F_RELFLG.
1999-09-13 23:42:43 +00:00
Nick Clifton 59f2c4e703 Apply Philip Blundell's patch to prevent range checks on weak symbols. 1999-09-13 09:59:02 +00:00
Alan Modra 2f66722d55 Hackery to handle ix86 "jmp constant" as a pc-relative jump to the given
absolute address.
1999-09-13 06:45:15 +00:00
Jeff Law 228d307f1b * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
Stub SEGREL32.  Return an error for any relocation not handled.
1999-09-13 05:51:32 +00:00
Ian Lance Taylor 49147fca36 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
constant symbols, and avoid multiple definition errors on them.
1999-09-12 16:28:20 +00:00
Ian Lance Taylor 86b21447e7 1999-09-12 Donn Terry <donn@interix.com>
* libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
	significant bit is set.
1999-09-12 14:27:21 +00:00
Ian Lance Taylor 2fbadf2cf5 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pei_final_link_postscript): Declare.
	(coff_final_link_postscript): Define.
	* peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
	directory entries here.
	(_bfd_pei_final_link_postscript): New function.
1999-09-12 00:45:26 +00:00
Ian Lance Taylor 8c42d01089 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
	section flags based on the section name.
1999-09-12 00:32:32 +00:00
Ian Lance Taylor cb43721da5 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
	get the overflow of the s_nlnno field from the s_nreloc field.
	* peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
	the s_nlnno overflow of the .text section into the s_nreloc
	field.
1999-09-12 00:30:27 +00:00
Ian Lance Taylor 5933bdc9a1 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (add_data_entry): Declare.
	(pei_swap_aouthdr_out): Get image size right.  Set linker version
	more intuitively.
	(pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
	(pe_print_idata): Code cleanup, print more info, get rid of (now)
	extraneous ImageBase.
	(pe_print_edata): Likewise.
	(pe_print_pdata): Likewise.  Print exception entries.
	(pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
	(tbl): Make const, add "UNKNOWN".
	(_bfd_pe_print_private_bfd_data_common): Print timestamp.
	(_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
	section data directory.
	(_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
1999-09-12 00:22:01 +00:00
Ian Lance Taylor 7d2b58d612 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
	* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
	* peicode.h (coff_get_symbol_info): Define.
1999-09-12 00:02:11 +00:00
Ian Lance Taylor 0717ebb780 1999-09-11 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): Set targ_cflags to
	-DSTRICT_PE_FORMAT.
	* coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
	than __INTERIX.
	(coff_classify_symbol): Re-revert 1999-08-08 patch if
	STRICT_PE_FORMAT.
1999-09-11 23:46:09 +00:00
Ian Lance Taylor 650f5dd8d8 add some comments about peigen.c 1999-09-11 23:38:11 +00:00
Ian Lance Taylor 277d1b5e45 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h: New file, broken out of peicode.h.
	* peigen.c: New file, broken out of peicode.h.
	* peicode.h: A bunch of code moved out to libpei.h and peigen.c.
	* configure.in: Add peigen.lo to list of files required for each
	PE target.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Add peigen.lo.
	(BFD32_BACKENDS_CFILES): Add peigen.c.
	(SOURCE_HFILES): Add libpei.h.
	* configure, Makefile.in: Rebuild.
1999-09-11 23:37:28 +00:00
Ian Lance Taylor e166a60fd9 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): Don't check for a special
	section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
	instead.  Don't clear the s_paddr field for an uninitialized data
	section.
1999-09-11 22:52:20 +00:00
Ian Lance Taylor 1135238bd0 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): Set timestamp field in
	coff_data_type to f_timdat.
	* peicode.h (pe_mkobject_hook): Likewise.
1999-09-11 22:46:37 +00:00
Ian Lance Taylor 05bf877ad1 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_filehdr_in): Check the NT executable magic
	number if COFF_IMAGE_WITH_PE.
1999-09-11 22:41:54 +00:00
Ian Lance Taylor 4cfec37b92 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
	to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
	(coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
	there is no SEC_DEBUGGING section.
	* peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
	IMAGE_FILE_DEBUG_STRIPPED.
1999-09-11 22:33:45 +00:00
Ian Lance Taylor 33d7d19757 1999-09-11 Donn Terry <donn@interix.com>
* pe-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* pei-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11 22:17:33 +00:00
Ian Lance Taylor 402ef9d421 1999-09-11 Donn Terry <donn@interix.com>
* coffswap.h (IMAGE_BASE): Don't define.
	* pei-arm.c (IMAGE_BASE): Don't define.
	* pei-i386.c (IMAGE_BASE): Don't define.
	* pei-mcore.c (IMAGE_BASE): Don't define.
	* pei-ppc.c (IMAGE_BASE): Don't define.
1999-09-11 22:10:33 +00:00
Ian Lance Taylor 8add8e3099 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): When writing out a
	symbol, switch on the class when determining whether to modify the
	value.  For PE, don't modify the value of a C_FCN symbol not named
	.bf.
1999-09-11 22:04:16 +00:00
Ian Lance Taylor c0bed66d09 1999-09-11 Donn Terry <donn@interix.com>
* libbfd-in.h (_bfd_abort): Declare.
	(abort): Define.
	* bfd.c (_bfd_abort): New function.
	* libbfd.h: Rebuild.
1999-09-11 21:51:55 +00:00
Ian Lance Taylor a50f8417d5 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11  Donn Terry  <donn@interix.com>

	* coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
	special handling.
1999-09-11 21:39:03 +00:00
Ian Lance Taylor b545f675c1 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
	don't write out the associated line numbers.
1999-09-11 21:27:15 +00:00
Ian Lance Taylor 2c546cd84f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
	aux entries.
1999-09-11 21:15:16 +00:00
Ian Lance Taylor d510f9a69b 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
	for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
	symbols named .bf.
1999-09-11 21:04:09 +00:00
Ian Lance Taylor eeaf533e61 * elfcode.h (write_relocs): Handle an absolute symbol in REL
relocs as we do for RELA relocs.
1999-09-11 20:14:57 +00:00
Ian Lance Taylor 5d3aaa749f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (coff_link_add_symbols): Don't warn about symbol type
	changes when the base type is unknown.
1999-09-11 15:26:22 +00:00
Ian Lance Taylor 312191a689 1999-09-11 Donn Terry <donn@interix.com>
* coffgen.c (coff_print_symbol): Fix printing of aux record for
	function symbols.
1999-09-11 15:16:14 +00:00
Ian Lance Taylor 703153b566 1999-09-11 Donn Terry <donn@interix.com>
* syms.c (BSF_DEBUGGING_RELOC): Define.
	* coffgen.c (fixup_symbol_value): Relocate a symbol which has
	BSF_DEBUGGING_RELOC set.
	* bfd-in2.h: Rebuild.
1999-09-11 14:41:11 +00:00
Ian Lance Taylor 7b50b349e2 * ecoff.c (bfd_debug_section): Update initialization for new
comdat_info field.
	(_bfd_ecoff_styp_to_sec_flags): Add section parameter.
	* libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.

1999-09-10  H.J. Lu  <hjl@gnu.org>

	* coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
	_bfd_filnmlen field.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
1999-09-10 23:25:51 +00:00
Jeff Law e48c661ee6 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
for FPTR relocs involving local symbols.
1999-09-10 15:46:37 +00:00
Jeff Law 6a0b987115 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
value for the stub address in a call through a stub.
        Install the value for a local symbol directly into the DLT
        instead of generating a reloc.  Correctly handle FPTR64 relocs.
1999-09-10 14:05:36 +00:00
Jeff Law af7dc6449e * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
(elf_hppa_remark_useless_dynamic_symbols): Similarly.
        (elf_hppa_final_link): Call them.
1999-09-10 06:38:05 +00:00
Ian Lance Taylor fc4cc5bb8f * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
(elf_adjust_dynamic_symbol): ...from here.
1999-09-10 04:22:23 +00:00
Jeff Law b1d5590577 Update some comments. 1999-09-09 14:52:15 +00:00
Jeff Law b726396160 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
relocation, remove them.  SECREL64->LTOFF16WF.
        (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
        DIR* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:51:33 +00:00
Jeff Law 8267b1550c * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
(elf_hppa_relocate_insn): Similarly.
1999-09-09 14:20:18 +00:00
Jeff Law 6849fb4de7 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
GPREL* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:10:24 +00:00
Jeff Law b233eaabc0 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
Handle LTOFF_TP* relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:55:46 +00:00
Jeff Law 571047ad0a * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
        (elf_hppa_relocate_insn): Handle PCREL* relocs.
1999-09-09 13:32:38 +00:00
Jeff Law e5bb3efcc5 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
DIR32, DIR64 and FPTR64 relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:01:11 +00:00
Jeff Law be7582f38a Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
* elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
        address of the .PARISC.global section.
        (elf_hppa_relocate_section): Lookup and pass the PA64 hash
        table entry elf_hppa_final_link_relocate.  Do not give a warning
        for a reloc against an external symbol if it has a PA64 hash
        table entry.
        (elf_hppa_final_link_relocate): Significantly rework.  Handle
        DLTIND relocations.  Compute the final value of the relocation
        before passing the value of elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
        relocation support.  Handle DLTIND relocation requests just like
        DLTREL relocation requests.  Simplify branch handling.

1999-09-08  Ulrich Drepper  <drepper@cygnus.com>

        * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
        non-allocated section as done in i386 version.
        (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
        statement since this is no know relocation.
1999-09-09 12:01:24 +00:00
Jeff Law 084d930bff * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 01:00:12 +00:00
Jeff Law 11c19a4e3c * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
DLTREL14WD relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 00:50:50 +00:00
Jeff Law c8933571da * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
        Pass the relocate type rather than the insn format to
        elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Make switch dependent on relocation type
        rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
1999-09-08 00:09:52 +00:00
Ian Lance Taylor 692b7d62e8 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
(bfd_coff_filnmlen): Define.
	(bfd_coff_std_swap_table): Initialize new field.
	* coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
	than FILNMLEN.
	(coff_write_symbols): Likewise.
	(coff_get_normalized_symtab): Likewise.
	* coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
1999-09-07 04:28:27 +00:00
Ian Lance Taylor 4c117b10b2 reformat for 80 column screen 1999-09-07 04:14:35 +00:00
Ian Lance Taylor 75cc718903 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sort_by_secaddr): New static function if
	COFF_IMAGE_WITH_PE.
	(coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
	sections by VMA when assigning target_index values.  Always set
	virt_size.
1999-09-07 04:06:50 +00:00
Ian Lance Taylor fdfd89ab43 remove unneeded ifdefs 1999-09-07 03:42:53 +00:00
Ian Lance Taylor 8d3ad4e16f 1999-09-06 Donn Terry <donn@interix.com>
* libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
	* coffcode.h (coff_set_alignment_hook): Set pe_flags field if
	COFF_WITH_PE.
	* libcoff.h: Rebuild.
1999-09-07 03:40:32 +00:00
Ian Lance Taylor 8a1ad8e793 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (coff_set_custom_section_alignment): Add const to
	declaration to match definition.
	(coff_write_object_contents): Don't set F_AR32W(R)? if
	COFF_WITH_PE.
1999-09-07 03:00:32 +00:00
Ian Lance Taylor 6fb72d08dc * coff-i386.c (in_reloc_p): Add declaration.
(i386coff_vec): Simplify initialization of
	application_section_flags.
1999-09-07 02:59:17 +00:00
Ian Lance Taylor 2820a0b713 add comment 1999-09-07 02:58:00 +00:00
Ian Lance Taylor 417335159b 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
	version.  Move COFF_WITH_PE specific code to new version.
	(stype_to_sec_flags): Likewise.  Add section parameter.
	* coffgen.c (make_a_section_from_file): Set target_index before
	calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
	* libcoff.h: Rebuild.
1999-09-07 02:11:54 +00:00
Ian Lance Taylor 9296256064 1999-09-06 Donn Terry <donn@interix.com>
* syms.c (stt): Add some PE/PEI section names.
	(bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
	symbol.
	(bfd_symbol_info): Check for 'w'.
1999-09-06 18:44:56 +00:00
Ian Lance Taylor 022a5af495 1999-09-06 Donn Terry <donn@interix.com>
* section.c (struct bfd_comdat_info): Define.
	(asection): Add comdat field.
	(STD_SECTION): Initialize comdat field.
	(bfd_make_section_anyway): Likewise.
	* bfd-in2.h: Rebuild.
1999-09-06 18:34:29 +00:00
Andreas Schwab 0d271c1a5e * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
to version symbols.
1999-09-06 10:56:08 +00:00
Nick Clifton fed79cc616 use bfd memory allcation routines 1999-09-06 08:57:49 +00:00
Ian Lance Taylor 0bcb993b9f 1999-09-04 Steve Chamberlain <sac@pobox.com>
* cpu-pj.c: New file.
	* elf32-pj.c: New file.
	* config.bfd (pj*): New cpu.
	(pj-*-*, pjl-*-*): New targets.
	* configure.in (bfd_elf32_pj_vec): New target vector.
	(bfd_elf32_pjl_vec): New target vector.
 	* archures.c (bfd_arch_pj): Define.
	* elf.c (prep_headers): Handle bfd_arch_pj.
	* reloc.c: Define BFD_RELOC_PJ_* relocations.
	* targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
	to target vector list.
	* Makefile.am: Rebuild dependencies.
	(ALL_MACHINES): Add cpu-pj.lo.
	(ALL_MACHINES_CFILES): Add cpu-pj.c.
	(BFD32_BACKENDS): Add elf32-pj.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-pj.c.
	* configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
1999-09-04 17:07:46 +00:00
Ian Lance Taylor 7843f00e2d * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
* elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
	and NON_GOT_REF from weak defined symbol to real symbol.
	* elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
	(elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
	create a COPY reloc.
	* elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
	(elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
	don't create a COPY reloc.
1999-09-04 16:26:08 +00:00
Ian Lance Taylor dca1443537 rebuild 1999-09-03 18:34:45 +00:00
Ian Lance Taylor 814fe68ac5 * elflink.h (elf_bfd_final_link): When counting relocations, don't
count those in sections we are not including in the link.
1999-09-03 18:34:02 +00:00
Jeff Law 20e29382fd * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
field in hpux11 shared libraries.
1999-09-02 23:44:54 +00:00
Nick Clifton 4b56dbbd4a Fix memory leak. 1999-09-02 17:56:51 +00:00
Jeff Law f273939b8e Fix minor typos introduced while cleaning up the previous patch. 1999-09-01 20:06:15 +00:00
Jeff Law 2eb429af04 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
(elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
        (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
1999-09-01 19:42:17 +00:00
Ian Lance Taylor d7f1f2b0be fix FSF address 1999-08-31 15:12:20 +00:00
Nick Clifton 994819d267 When possible, keep the original type of the symbol. 1999-08-31 14:07:27 +00:00
Jeff Law 735c91d811 Check in correct version of previous patch. 1999-08-30 21:57:08 +00:00
Jeff Law 0d571602ca * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
        tools were configured.
        * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
1999-08-30 21:30:36 +00:00
Mark Mitchell 9458945f8f * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
GOT entries for GOT16 relocations; they're not required.
1999-08-27 00:08:50 +00:00
Nick Clifton 021e3cc067 Path from Roland McGrath <roland@baalperazim.frob.com>
Added arm-netbsd target.
1999-08-24 15:16:53 +00:00
Jeff Law 7da1b1756d * som.c (som_slurp_symbol_table): Fix typo in comment. 1999-08-24 06:26:39 +00:00
Jeff Law 1ca740621c * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
here instead of using elf_section_data...
1999-08-20 23:03:04 +00:00
Nick Clifton ddda4409ce fix bug in previous delta 1999-08-20 07:56:08 +00:00
Nick Clifton 69e70d3056 Add code to emit relocs into a base file. 1999-08-19 13:04:45 +00:00
Nick Clifton 98c1d4aab7 Fix partial REL relocs. 1999-08-19 10:12:28 +00:00
Ian Lance Taylor b2d638c7ec 1999-08-18 Donn Terry <donn@interix.com>
* cofflink.c: Move definitions of N_TMASK, et. al., out of
	_bfd_coff_link_input_bfd into top level.
1999-08-19 00:55:50 +00:00
Ian Lance Taylor 00692651e0 1999-08-18 Donn Terry <donn@interix.com>
* coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
	(RTYPE2HOWTO): Return NULL if reloc type is out of range.
	(coff_i386_rtype_to_howto): Likewise.
	* coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
	Completely ignore symbols which are all zero.
	(dummy_reloc16_estimate): Add return 0.
	* cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
	variable copy to name_copy to avoid shadowing outer scope
	variable.
	* libcoff-in.h (coff_data_type): Change raw_syment_count field
	from unsigned int to unsigned long.  Add timestamp field.
	* libcoff.h: Rebuild.

Also comment changes.
1999-08-18 06:00:13 +00:00
Ian Lance Taylor 7bb9db4d63 comment changes from Donn Terry, and indentation changes 1999-08-18 05:59:47 +00:00
Ian Lance Taylor f994ccccd3 add comment from Donn Terry 1999-08-18 05:58:46 +00:00
Ian Lance Taylor 1396cd2d7f 1999-08-17 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
	macro definition.
1999-08-17 07:53:37 +00:00
Ian Lance Taylor 0035bd7bda * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
for special section symbols.
	* elflink.h (elf_merge_symbol): If we have no old BFD, check
	BSF_DYNAMIC on the section symbol to see whether the old BFD is
	dynamic.
1999-08-17 07:50:30 +00:00
Mark Mitchell 8535d39cc8 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
coincidence of variable names between old and new code.
1999-08-15 22:56:21 +00:00
Nick Clifton bcbdc74cb2 Fix interworking problems. 1999-08-12 08:37:15 +00:00
Jeff Law 183df869b6 Fix typo. 1999-08-11 18:15:39 +00:00
Nick Clifton 230801466a Check for overflow on R_ARM_PC24 relocs. 1999-08-11 10:56:35 +00:00
Jeff Law 052e120f44 * elf-hppa.h (elf_hppa_fake_sections): New function.
* elf32-hppa.c (elf_backend_fake_sections): Define.
1999-08-11 09:30:20 +00:00
Jeff Law 3a9acac86a * elf-hppa.h (elf_hppa_final_write_processing): Update for
recent changes to the arch_info structure.
1999-08-10 19:19:22 +00:00
Jeff Law fc91f6585b * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
R_HPPA_SEGBASE and R_HPPA_SEGREL32.
        * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
        list.
1999-08-10 18:51:53 +00:00
Mark Mitchell 5499724a85 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
output DT_MIPS_GOTSYM.
	(_bfd_mips_elf_finish_dynamic_sections): Use the same value as
 	DT_MIPS_SYMTABNO if there are no global GOT symbols.
1999-08-10 06:43:11 +00:00
Mark Mitchell 7b1f123191 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
prototype.  Handle local symbols.  Add commentary.
	(mips_elf_calculate_relocation): Adjust accordingly.
	(_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
	relocations.
1999-08-10 06:27:48 +00:00
Mark Mitchell ce00621771 * elflink.h (elf_bfd_final_link): Tweak last change. 1999-08-10 06:22:57 +00:00
Mark Mitchell b037af20d6 * elflink.h (elf_link_size_reloc_section): Use the counts in the
elf-section data to allocate just the right amount of relocation
	space.  Don't allocate the hash space twice.
	(elf_bfd_final_link): Calculate the amount of space to allocate in
	each relocation section.
1999-08-10 03:36:28 +00:00
Jeff Law 432bdd91dd * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
64bit mode, generate a section relative relocation for a 32bit
        wide relocation.
        (elf_hppa_is_local_label_name): New function.
        * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
        shared between 32bit and 64bit port.
1999-08-09 23:47:04 +00:00
Mark Mitchell b944b044fb * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
R_MIPS_GOT16 and R_MIPS_CALL16.
	(mips_elf_got16_entry): Use mips_elf_high to calculate the value
	to use wheen looking for a preexisting GOT entry.
1999-08-09 22:45:39 +00:00
Ian Lance Taylor 10e80b4145 rebuild with patched automake 1999-08-09 20:22:04 +00:00
Ian Lance Taylor 840a9995b3 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
	the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
	not binutils.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1999-08-09 15:07:32 +00:00
Ian Lance Taylor 91d3970e7d 1999-08-09 Geoff Keating <geoffk@cygnus.com>
* elflink.h (elf_link_output_extsym): Don't output a weak
	reference to an undefined symbol just because it was defined weak
	in a shared object.
1999-08-09 05:42:31 +00:00
Ian Lance Taylor 798c1fb8d7 1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
* coffgen.c (coff_find_nearest_line): When looking for file, use
	last best match rather than first.  If address is beyond last line
	number record, don't return the last line as the correct value.
1999-08-09 04:04:17 +00:00
Ian Lance Taylor 851edbafcc * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
* bfd-in2.h: Rebuild.
1999-08-09 03:20:31 +00:00
Ian Lance Taylor 5dccc1ddaa 1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
* libcoff-in.h (struct coff_section_alignment_entry): Define.
	* coffcode.h (coff_set_custom_section_alignment): New static
	function.
	(coff_section_alignment_table): New static array.
	(coff_new_section_hook): Use coff_set_customer_section_alignment.
	* coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* libcoff.h: Rebuild.
1999-08-09 02:56:16 +00:00
Ian Lance Taylor 74eeebeafb * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.
	* Makefile.in: Rebuild.
1999-08-08 17:26:50 +00:00
Ian Lance Taylor bd826630b1 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* section.c (SEC_SHARED): Define.
	* coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
	(styp_to_sec_flags): Likewise.
	* peicode.h (coff_swap_scnhdr_out): Likewise.
	* bfd-in2.h: Rebuild.

1999-08-08  Ian Lance Taylor  <ian@zembu.com>

	* coffcode.h (coff_classify_symbol): Comment out part of
	1999-08-05 change which breaks cygwin DLLs.
1999-08-08 16:50:27 +00:00
Ian Lance Taylor 855b0be7f7 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
* aclocal.m4, configure: Rebuild.
1999-08-08 16:01:13 +00:00