Commit Graph

620 Commits

Author SHA1 Message Date
H.J. Lu c0f7859bc6 2000-08-03 H.J. Lu <hjl@gnu.org>
* section.c: Back out the change made by Nick Clifton
	<nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
	binaries.
	* bfd-in2.h: Likewise.
	* elf.c: Likewise.
2000-08-03 13:50:35 +00:00
Alexandre Oliva 61ff180434 * elf32-sh.c (sh_elf_reloc_loop): Warning removal. 2000-08-03 09:30:50 +00:00
Jason Eckhardt a87fdb8d10 2000-07-31 Jason Eckhardt <jle@cygnus.com>
* reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
        * bfd-in2.h, libbfd.h: Regenerate.
2000-08-01 01:45:29 +00:00
Nick Clifton a022216bd4 Minor formatting fixes. 2000-07-31 18:49:56 +00:00
Nick Clifton 5c440b1e3b Improve section to segment mapping code. 2000-07-31 18:45:26 +00:00
Jason Eckhardt 24208c5c83 200007-22 Jason Eckhardt <jle@cygnus.com>
* cpu-i860.c: Added comments.

	* elf32-i860.c (TARGET_LITTLE_SYM): Defined to
	bfd_elf32_i860_little_vec.
	(TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
	(ELF_MAXPAGESIZE): Changed to 4096.

	* targets.c (bfd_elf32_i860_little_vec): Declaration of
	new target.
	(bfd_target_vector): Added bfd_elf32_i860_little_vec.

	* config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
	config for little endian elf32 i860.
	(targ_defvec): Define for the new config above
	as "bfd_elf32_i860_little_vec".
	(targ_selvecs): Define for the new config above
	as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"

	* configure.in (bfd_elf32_i860_little_vec): Added recognition
	of new target vec.

	* configure: Regenerated.
2000-07-28 21:15:04 +00:00
Jason Eckhardt 9d75133528 2000-07-22 Jason Eckhardt <jle@cygnus.com>
* include/opcode/i860.h (btne, bte, bla): Changed these opcodes
	to use sbroff ('r') instead of split16 ('s').
	(J, K, L, M): New operand types for 16-bit aligned fields.
	(ld.x, {p}fld.x, fst.x, pst.d): Changed these opcodes to
	use I, J, K, L, M instead of just I.
	(T, U): New operand types for split 16-bit aligned fields.
	(st.x): Changed these opcodes to use S, T, U instead of just S.
	(andh, andnoth, orh, xorh): Deleted 3-register forms as they do not
	exist on the i860.
	(pfgt.sd, pfle.sd): Deleted these as they do not exist on the i860.
	(pfeq.ss, pfeq.dd): New opcodes.
	(st.s): Fixed incorrect mask bits.
	(fmlow): Fixed incorrect mask bits.
	(fzchkl, pfzchkl): Fixed incorrect mask bits.
	(faddz, pfaddz): Fixed incorrect mask bits.
	(form, pform): Fixed incorrect mask bits.
	(pfld.l): Fixed incorrect mask bits.
	(fst.q): Fixed incorrect mask bits.
	(all floating point opcodes): Fixed incorrect mask bits for
	handling of dual bit.

	* include/elf/i860.h: New file.
	(elf_i860_reloc_type): Defined ELF32 i860 relocations.

	* bfd/cpu-i860.c: Added comments.

	* bfd/elf32-i860.c (TARGET_LITTLE_SYM): Defined to
	bfd_elf32_i860_little_vec.
	(TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
	(ELF_MAXPAGESIZE): Changed to 4096.

	* bfd/targets.c (bfd_elf32_i860_little_vec): Declaration of
	new target.
	(bfd_target_vector): Added bfd_elf32_i860_little_vec.

	* bfd/config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
	config for little endian elf32 i860.
	(targ_defvec): Define for the new config above
	as "bfd_elf32_i860_little_vec".
	(targ_selvecs): Define for the new config above
	as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"

	* bfd/configure.in (bfd_elf32_i860_little_vec): Added recognition
	of new target vec.

	* bfd/configure: Regenerated.

	* opcodes/i860-dis.c: New file.
	(print_insn_i860): New function.
	(print_br_address): New function.
	(sign_extend): New function.
	(BITWISE_OP): New macro.
	(I860_REG_PREFIX): New macro.
	(grnames, frnames, crnames): New structures.

	* opcodes/disassemble.c (ARCH_i860): Define.
	(disassembler): Add check for bfd_arch_i860 to set disassemble
	function to print_insn_i860.

	* include/dis-asm.h (print_insn_i860): Add prototype.

	* opcodes/Makefile.in (CFILES): Added i860-dis.c.
	(ALL_MACHINES): Added i860-dis.lo.
	(i860-dis.lo): New dependences.

	* opcodes/configure.in: New bits for bfd_i860_arch.

	* opcodes/configure: Regenerated.
2000-07-28 21:10:20 +00:00
H.J. Lu 456981d715 2000-07-27 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_merge_symbol): Take one more argument,
	dt_needed, to indicate if the symbol comes from a DT_NEEDED
	entry. Don't overide the existing weak definition if dt_needed
	is true.
	(elf_link_add_object_symbols): Pass dt_needed to
	elf_merge_symbol ().
2000-07-28 00:49:07 +00:00
Nick Clifton 755cfd2922 Zero the allocated contents of reloc sections. 2000-07-27 22:35:08 +00:00
Geoffrey Keating adfdf8387c * configure.host (*-*-aix*): AIX has 'long long' always. 2000-07-25 19:29:42 +00:00
Geoffrey Keating 1a6df346e3 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
(xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
(xcoff_write_archive_contents_big): Don't update the offset
of the symbol table, xcoff_write_armap will do it.
2000-07-25 19:25:40 +00:00
Nick Clifton 3eb6f68f1b Regenerate auto-generated files 2000-07-24 17:22:17 +00:00
Ulf Carlsson 313ba8d62b 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
* elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
	of dynobj for SGI_COMPAT checks.
2000-07-23 20:51:35 +00:00
Nick Clifton e702a51c72 oops - omitted from previous delta 2000-07-21 23:40:12 +00:00
Nick Clifton 20bccb3485 Applied Michael's Sokolov's patch to implement --embedded-relocs for m68k coff. 2000-07-21 23:31:53 +00:00
Nick Clifton 7a3120d9a6 Detect and report corrupt relocs 2000-07-21 19:56:19 +00:00
H.J. Lu 4d538889a8 2000-07-20 H.J. Lu <hjl@gnu.org>
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
	info->new_dtags when setting DT_FLAGS_1. It will only be set
	by the new linker options. It shouldn't break anything.
2000-07-21 03:58:32 +00:00
H.J. Lu b586af581d 2000-07-20 H.J. Lu <hjl@gnu.org>
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
	only if info->new_dtags is true.
2000-07-21 02:16:31 +00:00
H.J. Lu c25373b76a 2000-07-20 H.J. Lu <hjl@gnu.org>
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
	DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2000-07-20 21:16:58 +00:00
Hans-Peter Nilsson 3bd336f7c8 Fix typo in CRIS entry 2000-07-20 16:35:18 +00:00
Hans-Peter Nilsson 06c15ad74f * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
(ALL_MACHINES_CFILES): Add cpu-cris.c.
	(BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
	(BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
	(cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
	* Makefile.in: Rebuild.
	* aclocal.m4: Rebuild.
	* aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
	* archures.c (enum bfd_architecture): Add bfd_arch_cris.
	(bfd_cris_arch): Declare.
	(bfd_archures_list): Add bfd_cris_arch.
	* bfd-in2.h: Rebuild.
	* config.bfd: (cris-*-*): New target.
	* configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
	* configure: Rebuild.
	* elf.c (prep_headers): Add bfd_arch_cris.
	* libbfd.h: Rebuild.
	* libaout.h (enum machine_type): Add M_CRIS.
	* reloc.c: Add CRIS relocations.
	* targets.c (bfd_target bfd_elf32_cris_vec, cris_aout_vec):
	Declare.
	(bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
	* cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
	* po/POTFILES.in, po/bfd.pot: Regenerate.
2000-07-20 16:21:07 +00:00
H.J. Lu d6cf28795d 2000-07-19 H.J. Lu <hjl@gnu.org>
* elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
	DF_TEXTREL if DT_TEXTREL is set.
	* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
	* elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
	* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
	* elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
	* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.

	* bfd/elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
	set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
	DT_RPATH is set.
	Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2000-07-20 03:21:59 +00:00
H.J. Lu 7481689898 2000-07-19 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_set_dt_needed_soname): New.
	* bfd-in2.h: Rebuild.

	* elf-bfd.h (elf_obj_tdata): Add dt_soname.
	(elf_dt_soname): New.

	* elf.c (bfd_elf_set_dt_needed_soname): New.

	* elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
	entry if the shared object loaded by DT_NEEDED is used to
	resolve the reference in a regular object.
2000-07-20 03:16:18 +00:00
H.J. Lu 36a30e65ca 2000-07-19 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
	DT_DEPAUDIT and DT_AUDIT as strings.
2000-07-20 02:19:23 +00:00
Nick Clifton 1d713d9eaf Fix formatting 2000-07-20 00:31:39 +00:00
H.J. Lu d48188b96e 2000-07-19 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2000-07-19 18:26:38 +00:00
H.J. Lu 9455883401 2000-07-19 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
	DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
	DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
	DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
	DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
	DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
	DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2000-07-19 18:02:13 +00:00
Nick Clifton 125c4a69c4 Rename bfd_elf_get_arch_size to bfd_get_arch_size
Rename bfd_elf_get_sign_extend_vma  to  bfd_get_sign_extend_vma
2000-07-18 19:20:13 +00:00
Ulf Carlsson 31a9bdd961 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
* elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
	paranthesis in if statement.
2000-07-18 09:45:26 +00:00
Ulf Carlsson f7cb7d68c2 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
Enable the support for Traditional MIPS.
	* elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
	return ict_none appropriately for traditional mips targets.
	(STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
	(STUB_MOVE): Conditionalize for traditonal mips.
	(STUB_LI16): Likewise.
	(_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
	room for RTPROC header.
	(_bfd_mips_elf_modify_segment_map): For a normal mips executable set
	the permission for the PT_DYNAMIC as read, write and execute.
	(mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
	for traditonal mips.
	(_bfd_mips_elf_create_dynamic_sections): Add the symbol
	_DYNAMIC_LINKING for traditonal mips.
	(_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
	in case of traditonal mips.
	(_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
	entry is required. For a function if PLT is not required then set the
	corresponding hash table entry to 0.
	(_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
	traditonal mips.
	(_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
	shared object set the value to 0.
	(_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
	_DYNAMIC_LINKING for traditonal mips.
	(_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
	for traditonal mips.
2000-07-17 19:39:40 +00:00
H.J. Lu 930d924dd4 2000-07-15 H.J. Lu <hjl@gnu.org>
* aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
2000-07-15 18:42:01 +00:00
DJ Delorie e67f03db5b * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
out a structure that is BFD_IN_MEMORY.
2000-07-12 18:29:55 +00:00
Alan Modra 0ba2a60ea9 Use section id in get_dyn_name. 2000-07-12 05:03:01 +00:00
Andrew Cagney 6d9019e4c0 Add function bfd_elf_get_sign_extend_vma. 2000-07-11 07:28:25 +00:00
Andrew Cagney 23e2c83b83 The MIPS thinks that addresses are signed. Sign extend MIPS ECOFF
addresses.
2000-07-11 06:37:34 +00:00
Andrew Cagney 448cafa400 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
bfd_get_start_address.
(elf_swap_ehdr_in): Sign extend e_entry when applicable.
(elf_swap_ehdr_out): Ditto.
2000-07-11 06:08:19 +00:00
Nick Clifton 83ea41ad9c Add set of bfd_mach_ cases for compatibility with older binutils 2000-07-10 18:29:39 +00:00
Alan Modra b7af50e3f8 Ryan Bradetich's warning fixes. 2000-07-10 05:14:13 +00:00
Alan Modra 3df7b4e2d2 Avoid negative section sequence ids. 2000-07-10 02:05:40 +00:00
Ulf Carlsson adb76a3e5c 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
* elf32-mips.c (sort_dynamic_relocs): New Function.
        (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
	via qsort to sort the dynamic relocations in increasing r_symndx
	value.
2000-07-09 13:48:21 +00:00
Alan Modra edd21acadc Restore hppa-elf32 to working order. 2000-07-09 07:23:07 +00:00
Alan Modra 52b219b5e4 Add sequence id field to asection.
Tidy comments and replace deprecated CONST with const.
2000-07-08 12:08:43 +00:00
Alan Modra 181866dcc7 Don't add a space before `/*' when processing comments. 2000-07-08 12:00:26 +00:00
DJ Delorie 8000a61811 * archive.c (_bfd_write_archive_contents): Add an informative
comment.
2000-07-07 17:40:23 +00:00
Nick Clifton c3b7c7671f Fix formatting 2000-07-06 23:26:55 +00:00
DJ Delorie 302ab118e1 add MAINTAINERS files 2000-07-05 19:28:06 +00:00
Alexandre Oliva ed1de528f6 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
value of PC-relative offsets.
2000-07-04 05:11:37 +00:00
Jim Wilson 70bcb1452f Fix hash section entry size to match ELF standard. Override for alpha-linux.
* elf64-alpha.c (alpha_elf_size_info): New.
	(elf_backend_size_info): Define to alpha_elf_size_info.
	* elfcode.h (elf_size_info): Change hash bucket size to 4.
2000-07-04 02:18:06 +00:00
Ulf Carlsson b8ee63fa40 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
* elf32-mips.c: Include elf32-target.h again for the traditional
	MIPS targets.
2000-07-04 00:10:15 +00:00
Ulf Carlsson e364195dbd 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
* elf32-mips.c: Include elf32-target.h again for the traditional
	MIPS targets.
2000-07-03 23:49:36 +00:00