Commit Graph

327 Commits

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