Commit Graph

384 Commits

Author SHA1 Message Date
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