Commit graph

3938 commits

Author SHA1 Message Date
Gavin Romig-Koch
02650bd0a9 This adds ABI flags to MIPS/ELF object files.
For bfd:
	* elf32-mips.c (elf_mips_abi_name): New.
	(_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.

For gas:
	* config/tc-mips.c (mips_abi_string): New.
	(md_parse_option,md_longopts): Add mabi.
	(mips_elf_final_processing): Set e_flags based on mabi flag.

For gcc:
	* config/mips/mips.h (GAS_ASM_SPEC): Pass mabi to gas.
	(ABI_GAS_ASM_SPEC,abi_gas_asm_spec): New.
	(EXTRA_SPECS): Added ABI_GAS_ASM_SPEC,abi_gas_asm_spec.

For include/elf:

	* mips.h (EF_MIPS_ABI,E_MIPS_ABI_O32,E_MIPS_ABI_O64,
	E_MIPS_ABI_EABI32,E_MIPS_ABI_EABI64):
1998-12-15 14:10:46 +00:00
Gavin Romig-Koch
f14397f057 for bfd:
* archures.c,bfd-in2.h (bfd_mach_mips4121): New.
	* cpu-mips.c: Added vr4121.
	* elf32-mips.c (elf_mips_mach): Same.
	(_bfd_mips_elf_final_write_processing): Same.

for gas:
	* config/tc-mips.c (mips_4121): New.
	(md_begin,mips_ip,md_longopts,md_parse_option): Add vr4121.

for gcc:
	* config/mips/mips.c (override_options): Add vr4121.
	* config/mips/t-vr4xxx (MULTILIB_MATCHES): Same.

for include/elf:
	* mips.h (E_MIPS_MACH_4121): New.

for include/opcode:
	* mips.h (INSN_4121): New.

for opcodes:
	* mips-dis.c (set_mips_isa_type): Add bfd_mach_mips4121.
	(_print_insn_mips): Same.
	* mips-opc.c: Add vr4121.

for sim/mips:
	* configure.in,mips.igen,vr.igen: Add vr4121.
	* configure: Rebuilt.
1998-12-13 16:14:24 +00:00
Gavin Romig-Koch
b3f1799e81 elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4300. 1998-12-12 22:22:11 +00:00
Doug Evans
bcb601c149 * config.bfd (mips64el-skyb-elf): added new target 1998-12-12 17:07:24 +00:00
Ulrich Drepper
dee563f348 Update. 1998-12-11 17:14:50 +00:00
Ulrich Drepper
986b3b988a Update. 1998-12-10 22:48:35 +00:00
Ulrich Drepper
5f49173db3 (elf_i386_relocate_section): Don't fail relocations in debug sections
for symbol defined externally.
1998-12-10 22:47:25 +00:00
Ian Lance Taylor
da7f0954c9 * targets.c (bfd_target_vector): Remove duplicate entry for
tekhex_vec.
1998-12-10 16:01:06 +00:00
Nick Clifton
863553274c Fix generic relocs to work as RELAs not RELs. 1998-12-09 10:26:33 +00:00
Ian Lance Taylor
ed9f8d9414 SCO Open Server Release 5 core file support, from Jouke Numan
<jnuman@hiscom.nl>:
	* sco5-core.c: New file.
	* configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
	(sco5-core.lo): Define SCO5_CORE in COREFLAG.
	* Makefile.am: Rebuild dependencies.
	(OPTIONAL_BACKENDS): Add sco5-core.lo.
	(OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
	* bfd.c (struct _bfd): Add sco5_core_data field to tdata.
	* targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
	* bfd-in2.h, configure, Makefile.in: Rebuild.
1998-12-09 03:23:25 +00:00
Ian Lance Taylor
fa2b5a73cf Tue Dec 8 19:38:42 1998 Mark Klein <mklein@dis.com>
* config.bfd (hppa*-*-mpeix*): New target.
	* configure.in: Add AC_HEADER_DIRENT.
	(hppa*-*-mpeix*): New target.
	* configure.host (hppa*-*-mpeix*): New host.
	* hpux-core.c: Check HOST_HPPAMPEIX.  Use HAVE_DIRENT_H and
	friends rather than just including <sys/dir.h>.
	* som.h (struct som_symbol): Add hppa_priv_level and apto
	tc_data.  Change all users.
	(struct somdata): Add comp_unit field.
	(obj_som_compilation_unit): Define.
	(bfd_som_attach_compilation_unix): Declare.
	* som.c: Check HOST_HPPAMPEIX.
	(struct som_misc_symbol_info): Add new field priv_level.
	(som_object_setup): Add current_offset parameter.  Change all
	callers.
	(setup_sections): Likewise.
	(som_object_p): For EXECLIBMAGIC, read the lst header.
	(som_write_symbol_strings): Add compilation_unit parameter.
	Change all callers.
	(som_finish_writing): Write out compilation_unit.
	(som_bfd_derive_misc_symbol_info): Set priv_level.
	(som_build_and_write_symbol_table): Set xleast field to 3.
	(som_slurp_symbol_table): Set symbol priv_level.
	(bfd_som_attach_compilation_unit): New function.
	(som_bfd_ar_write_symbol_stuff): Set xleast field to 3.  Set
	priv_level into symbol_value.
	* configure, config.in: Rebuild.
1998-12-09 00:49:31 +00:00
Ian Lance Taylor
943695fcb9 * libbfd.c (COERCE32): Cast through unsigned long and long to
avoid bug in old version of gcc.
1998-12-08 21:55:15 +00:00
Ian Lance Taylor
a0acbf4ab5 * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
(elf_backend_additional_program_headers): Don't define.
1998-12-08 21:22:47 +00:00
Nick Clifton
811c57ffa1 Fix pc relative relocs. 1998-12-08 15:44:06 +00:00
David Taylor
8ecd559a56 HP merge changes by David Taylor, Edith Epstein, Jim Blandy, and Elena
Zannoni.

	* hpux-core.c (hpux_core_core_file_p): this function now
 	understands HPUX 10.30 thread info. Yes, the thread stacks can be
 	found in the corefile! Also, in hpux_core_core_file_p, if we
 	encounter a section with an unknown type, don't punt.  Instead,
 	just skip it.  Also, count the number of sections of known type
 	that we encounter.  If we encounter at least one good one, then
 	we'll declare that the file is a core file.  If we encounter any
 	unknown ones but some known ones, then we'll issue a warning (but
 	still declare it to be a core file). Also, correctly decide when a
 	file is not a core.
	(PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
	(CORE_ANON_SHMEM): define if not defined.
	(hpux_core_struct): add members lwpid and user_tid.
	(core_kernel_thread_id, core_user_thread_id): new macros.
	(make_bfd_asection): use bfd_alloc to allocate room for a copy of
 	the name before storing it in the bfd.
	(hpux_core_core_file_p): handle threads.

	* libhppa.h (GET_FIELD): protect against redefinition.
	(HPPA_WIDE): define.
	(GET_FIELD): define.
	(GET_BIT): define.
	(MASK): define.
	(CATENATE): define.
	(ELEVEN): define.
	(sign_extend): redefine.
	(assemble_6): define.
	(assemble_12): rewrite.
	(assemble_16): define.
	(assemble_16a): define.
	(assemble_17): rewrite.
	(assemble_22): define.
1998-12-08 15:44:05 +00:00
Nick Clifton
8f34fce550 Use signed values for signed relocaitons. 1998-12-07 13:23:17 +00:00
Ian Lance Taylor
b447de7ace * mipsbsd.c (MY(set_arch_mach)): Make static.
* aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
	bfd_mach_mips* macros rather than simple numbers.
1998-12-07 03:39:20 +00:00
Ian Lance Taylor
20a7eb6024 COFF weak symbol support, based on patches from Mark Elbrecht
<snowball3@usa.net>:
	* coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
	* coffgen.c (coff_renumber_symbols): Handle weak symbols.
	(coff_write_alien_symbol): Likewise.
	* cofflink.c (coff_link_check_ar_symbols): Likewise.
	(coff_link_add_symbols): Likewise.
	(_bfd_coff_link_input_bfd): Likewise.
	(_bfd_coff_write_global_sym): Likewise.
1998-12-07 02:47:22 +00:00
Ian Lance Taylor
8dabc9851d * elf.c (copy_private_bfd_data): Always initialize the
includes_phdrs field.
1998-12-07 00:33:13 +00:00
Ian Lance Taylor
e9814417ab * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
file defines a symbol first mentioned in an ELF file.
1998-12-06 23:02:41 +00:00
Ian Lance Taylor
859a615e58 * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
possible, rather than only if BFD64.
	* elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
	not __GNUC__.
	* bfd-in2.h: Rebuild.
1998-12-06 22:14:30 +00:00
Ian Lance Taylor
fa06287137 * srec.c (srec_set_section_contents): Correct test to avoid
switching to 4 byte addresses after seeing a second section which
	requires 3 byte addresses.  From Joel Schantz
	<joel.schantz@argosys.boeing.com>.
1998-12-06 21:56:13 +00:00
Ian Lance Taylor
955e17b0de rebuild correctly 1998-12-06 21:37:41 +00:00
Ian Lance Taylor
884949db64 * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
<aymeric.vincent@emi.u-bordeaux.fr>.
1998-12-06 21:31:24 +00:00
Jim Blandy
71812ec59b *** empty log message *** 1998-12-04 23:24:21 +00:00
Jim Blandy
cc95a2d522 *** empty log message *** 1998-12-04 23:17:38 +00:00
Nick Clifton
37b0c1aa72 Fix typo in orevious delta 1998-12-03 17:03:56 +00:00
Nick Clifton
a617cb0b12 Add support for R_FR30_48 reloc. 1998-12-03 16:53:03 +00:00
Ian Lance Taylor
3ac83be0c7 * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
link against a dynamic symbol with no type or size.
1998-12-02 05:59:07 +00:00
Ulrich Drepper
27f7e91adf Update. 1998-12-01 20:50:27 +00:00
Jim Wilson
16636918e8 patch for PR 18243.
* coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
	reloc_count and i long instead of unsigned long.  Handle error
	return from bfd_canonicalize_reloc.
1998-12-01 20:17:18 +00:00
Nick Clifton
1ab49c8481 Detect the absence of a symbol hash table. 1998-12-01 09:58:28 +00:00
Joern Rennecke
c2d4e43129 * elf32-sh.c (elf/sh.h): Include.
sh_reloc_type: Delete.  Changed all references to elf_sh_reloc_type.
        (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
        (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
        (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
        * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
1998-11-30 15:29:45 +00:00
Richard Henderson
5825dfc525 * elflink.h (compute_bucket_count): Don't allow minsize==0, it
causes division by zero later on.
1998-11-27 17:03:39 +00:00
Dave Brolley
3f298868ce Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
* elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
	needed.
1998-11-26 16:22:08 +00:00
DJ Delorie
8cde3351e4 * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
hook now.
1998-11-25 22:59:34 +00:00
Nick Clifton
226c1993e9 Add support for 9_PCREL and 12_PCREL relocs. 1998-11-25 01:21:53 +00:00
Nick Clifton
cb4ec68697 Fix handling of I32 and I20 relocs. 1998-11-25 00:54:31 +00:00
DJ Delorie
11dddceff5 * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
to see .DLL files as unrecognized.
	(i3coff_object_p): Sorry, had to hack it to not recognize these
	files (pei-i386) on request.
1998-11-24 04:25:41 +00:00
DJ Delorie
b7de6a0df6 * opncls.c (bfd_make_readable): need more cleanup for symbols and
relents.  Call bfd_check_format to reinitialize.
1998-11-23 19:45:45 +00:00
Nick Clifton
e203d46938 Remove spurous warnings. 1998-11-20 22:22:15 +00:00
Geoffrey Noer
4aeb051e8c Thu Nov 19 14:42:15 1998 Geoffrey Noer <noer@cygnus.com>
* aclocal.m4: regenerate
        * configure: regenerate
1998-11-19 22:42:35 +00:00
Geoffrey Noer
aba195432e Wed Nov 18 20:12:03 1998 Geoffrey Noer <noer@cygnus.com>
* aclocal.m4: regenerate
        * configure: regenerate
1998-11-19 04:14:00 +00:00
Richard Henderson
468bc0c5fe * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
* elf.c (_bfd_elf_link_hash_newfunc): Clear it.
        * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
        respect it as an upper bound on what memory to reference.
        (elf_gc_smash_unused_vtentry_relocs): Likewise.
        (elf_gc_record_vtentry): Handle as-yet undefined vtables.  Set and
        update vtable_entries_size appropriately.
1998-11-18 04:26:39 +00:00
Nick Clifton
82ef568c2e Fixed simple fr30 reloc handling. 1998-11-17 23:30:56 +00:00
DJ Delorie
949fae0bad typo 1998-11-17 03:27:26 +00:00
DJ Delorie
020917f9d0 * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
bfds; they have no "file" so we fake it.
	* bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
	* libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
 	resizing the memory buffer.
	* opncls.c (bfd_make_writable): New function; lets you write a
 	bfd_create'd bfd to an in-memory buffer.
	(bfd_make_readable): New function; lets you read back that buffer
 	as if it were from bfd_openr.  Used to build generated archive
 	members (winsup's ld's dlltool)
1998-11-17 03:25:29 +00:00
Dave Brolley
44e7cd63f3 Mon Nov 16 19:15:19 1998 Dave Brolley <brolley@cygnus.com>
* po/bfd.pot: Regenerated.
1998-11-17 00:16:52 +00:00
Nick Clifton
45cac0cb84 Replaced fixed size array for hi16 relocations with a linked list. 1998-11-16 18:58:32 +00:00
Richard Henderson
34c304a78c * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
element of the gotentry list for local symbols too.
        (elf64_alpha_relocate_section): Unify local and global handling.
        Assert that gotent->use_count > 0.
1998-11-16 04:31:19 +00:00