Commit Graph

244 Commits

Author SHA1 Message Date
Nick Clifton eb1e0e807a Add AIX 64 shared library support and emulation layer for binutils 2002-03-18 12:46:27 +00:00
Tom Rix 69f284c74e Add support for -brtl, run time linking, to AIX ld. 2002-02-19 05:01:40 +00:00
Daniel Jacobowitz e108f47052 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
        been included, not drag it in.
        * bfd-in2.h: Regenerate.
2002-02-07 22:28:31 +00:00
Daniel Jacobowitz 4e4770d0c6 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h: Include <stdbool.h> if it is available.
        * bfd-in2.h: Regenerated.
2002-01-31 04:42:30 +00:00
Nick Clifton b5f79c764c Tidy up formatting in bfd-in2.h 2002-01-30 18:12:17 +00:00
Chris Demetriou 030d18fb6f 2002-01-29 Chris Demetriou <cgd@broadcom.com>
Mitch Lichtenberg  <mpl@broadcom.com>

        * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
        * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
        to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
        generation.
        * bfd-in2.h: Regenerate.
2002-01-30 02:19:21 +00:00
Tom Rix 9a4c7f1669 -binitfini emulation, put __rtinit symbol generation into linker. 2001-12-22 17:18:34 +00:00
Jakub Jelinek 6576570080 * elf-bfd.h (enum elf_link_info_type): New.
(struct bfd_elf_section_data): Remove stab_info and merge_info
	fields, add sec_info and sec_info_type.
	(struct elf_obj_tdata): Add eh_frame_hdr field.
	(_bfd_elf_discard_section_eh_frame): New prototype.
	(_bfd_elf_discard_section_eh_frame_hdr): Likewise.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_write_section_eh_frame_hdr): Likewise.
	* Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
	(BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
	(elf-eh-frame.lo): New.
	* Makefile.in: Rebuilt.
	* configure.in (elf): Add elf-eh-frame.lo.
	* configure: Rebuilt.
	* elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
	(map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
	(get_program_header_size): Take into account PT_GNU_EH_FRAME
	segment.
	(_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
	(_bfd_elf_rel_local_sym): Likewise.
	(_bfd_elf_section_offset): Likewise.  Call
	_bfd_elf_eh_frame_section_offset too.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
	sec_info.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf-eh-frame.c: New file.
	* elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
	.stab sections.  Set sec_info_type, use sec_info instead
	of merge_info and stab_info.
	(elf_link_create_dynamic_sections): Create .eh_frame_hdr section
	if --eh-frame-hdr.
	(elf_bfd_final_link): Write .eh_frame_hdr section.
	(elf_link_sec_merge_syms): Use sec_info_type and sec_info.
	(elf_link_input_bfd): Likewise.
	Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
	(elf_bfd_discard_info): Add output_bfd argument.
	Call _bfd_elf_discard_section_eh_frame and
	_bfd_elf_discard_section_eh_frame_hdr.
	(elf_section_ignore_discarded_relocs): Use sec_info_type, not section
	names.
	* bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
	prototypes.
	* bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.

	* elf/common.h (PT_GNU_EH_FRAME): Define.
	* bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.

	* emultempl/elf32.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	(OPTION_EH_FRAME_HDR): Define.
	(longopts): Add --eh-frame-hdr.
	(parse_args): Handle it.
	(list_options): Add --eh-frame-hdr to help.
	* emultempl/hppaelf.em (finish): Supply output_bfd
	to bfd_elf*_discard_info.
	* scripttempl/elf.sc (.eh_frame_hdr): Add.

	* readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
2001-12-13 11:09:34 +00:00
Daniel Jacobowitz 73d074b4e2 2001-11-11 Daniel Jacobowitz <drow@mvista.com>
* bfd-in.h (bfd_elf32_discard_info): Add prototype.
	(bfd_elf64_discard_info): Likewise.
	* bfd-in2.h: Regenerate.
	* elf-bfd.h (struct elf_reloc_cookie): New.
	(struct elf_backend_data): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
	(_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
	(_bfd_elf64_reloc_symbol_deleted_p): Likewise.
	* elf32-mips.c (_bfd_elf32_mips_discard_info): New.
	(_bfd_elf32_mips_ignore_discarded_relocs): New.
	(_bfd_elf32_mips_write_section): New.
	(elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	* elfcode.h (elf_bfd_discard_info): Define.
	(elf_reloc_symbol_deleted_p): Define.
	* elflink.h (elf_link_input_bfd): Check
	elf_section_ignore_discarded_relocs.  Call
	bed->elf_backend_write_section if available.
	(elf_reloc_symbol_deleted_p): New.
	(elf_bfd_discard_info): New.
	(elf_section_ignore_discarded_relocs): New.
	* elfxx-target.h (elf_backend_discard_info): Define.
	(elf_backend_ignore_discarded_relocs): Define.
	(elf_backend_write_section): Define.
	(elfNN_bed): Add elf_backend_discard_info,
	elf_backend_ignore_discarded_relocs, and
	elf_backend_write_section.
	* libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
	* libbfd.h: Regenerate.
	* stabs.c (_bfd_discard_section_stabs): New.

2001-11-11  Daniel Jacobowitz  <drow@mvista.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
	(struct ld_emulation_xfer_struct): Use it.
2001-11-15 01:34:12 +00:00
Alan Modra e43d48ccc3 * version.h: New file.
* bfd-in.h: (BFD_VERSION): Substitute bfd_version.
	(BFD_VERSION_DATE): Define.
	(BFD_VERSION_STRING): Define.
	* configure.in: AC_SUBST bfd_version, bfd_version_date and
	bfd_version_string.
	(AC_OUTPUT <bfd-in3.h>): Depend on version.h.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
	* Makefile.am: Run "make dep-am"
	* Makefile.in: Regenerate.

	* bfd-in.h: Include "symcat.h".
	(CONCAT4): Redefine as for old CAT4.
	* aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
	Add warning regarding whitespace.
	* aout-cris.c: Likewise.
	* aout-ns32k.c: Likewise.
	* aout-sparcle.c: Likewise.
	* aout-tic30.c: Likewise.
	* aout0.c: Likewise.
	* armnetbsd.c: Likewise.
	* demo64.c: Likewise.
	* elf-bfd.h: Likewise.
	* gen-aout.c: Likewise.
	* host-aout.c: Likewise.
	* hp300bsd.c: Likewise.
	* hp300hpux.c: Likewise.
	* i386aout.c: Likewise.
	* i386bsd.c: Likewise.
	* i386dynix.c: Likewise.
	* i386freebsd.c: Likewise.
	* i386linux.c: Likewise.
	* i386lynx.c: Likewise.
	* i386mach3.c: Likewise.
	* i386netbsd.c: Likewise.
	* libaout.h: Likewise.
	* m68k4knetbsd.c: Likewise.
	* m68klinux.c: Likewise.
	* m68klynx.c: Likewise.
	* m68knetbsd.c: Likewise.
	* m88kmach3.c: Likewise.
	* mipsbsd.c: Likewise.
	* newsos3.c: Likewise.
	* ns32knetbsd.c: Likewise.
	* pc532-mach.c: Likewise.
	* pdp11.c: Likewise.
	* riscix.c: Likewise.
	* sparclinux.c: Likewise.
	* sparclynx.c: Likewise.
	* sparcnetbsd.c: Likewise.
	* sunos.c: Likewise.
	* targets.c: Likewise.
	* vaxnetbsd.c: Likewise.
	* vms-hdr.c: Likewise.
2001-10-02 05:58:41 +00:00
Alan Modra 4eef72c77d bfd/
* bfd-in.h: Remove comments regarding generated files.
	* libbfd-in.h: Likewise.
	* libcoff-in.h: Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Likewise.
	* libcoff.h: Likewise.
bfd/doc/
	* header.sed: New file, adds header to generated files.
	* Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and
	bfd.h, using above.  Add missing elf.c dependecy for libbfd.h.
	* Makefile.in: Regenerate.
2001-10-01 14:03:36 +00:00
Alan Modra dc810e3900 Touches most files in bfd/, so likely will be blamed for everything..
o  bfd_read and bfd_write lose an unnecessary param and become
   bfd_bread and bfd_bwrite.

o  bfd_*alloc now all take a bfd_size_type arg, and will error if
   size_t is too small.  eg. 32 bit host, 64 bit bfd, verrry big files
   or bugs in linker scripts etc.

o  file_ptr becomes a bfd_signed_vma.  Besides matching sizes with
   various other types involved in handling sections, this should make
   it easier for bfd to support a 64 bit off_t on 32 bit hosts that
   provide it.

o  I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*)
   generally available.  They now cast their args to bfd_vma and
   bfd_byte * as appropriate, which removes a swag of casts from the
   source.

o  Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and
   aout-encap.c.

o  Zillions of formatting and -Wconversion fixes.
2001-09-18 09:57:26 +00:00
Tom Rix 1fdf02497c Fix import symbols for AIX. 2001-09-06 15:20:01 +00:00
Alan Modra 69263e9083 * bfd-in.h (BFD_VERSION): Remove wrong comment.
(BFD_DEFAULT_TARGET_SIZE): New.
	(BFD_ARCH_SIZE): Comment.
	* configure.in (target_size): New.  Set instead of target64 in
	selvecs case statement.  Set target64 from it.
	(bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
	* bfd-in2.h: Regenerate.
	* configure: Regenerate.
2001-08-17 03:54:53 +00:00
H.J. Lu d69bb69b89 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
	to ...
	* elf-bfd.h: Here.
	* bfd-in2.h: Regenerated.
2001-08-09 16:46:02 +00:00
H.J. Lu ae4221d7c2 2001-08-09 H.J. Lu <hjl@gnu.org>
* bfd-in.h (bfd_sprintf_vma): New prototype.
	(bfd_fprintf_vma): Likewise.
	(bfd_elf_sprintf_vma): Likewise.
	(bfd_elf_fprintf_vma): Likewise.
	(bfd_printf_vma): New. Defined with bfd_fprintf_vma.
	* bfd-in2.h: Regenerated.

	* bfd.c (bfd_sprintf_vma): New. Defined.
	(bfd_fprintf_vma): Likewise.

	* elf.c (bfd_elf_sprintf_vma): New. Defined.
	(bfd_elf_fprintf_vma): Likewise.
2001-08-09 16:00:21 +00:00
Hans-Peter Nilsson 99293407a5 * elflink.h (struct elf_assign_sym_version_info): Remove member
export_dynamic.  All users changed to use info member.
	NAME(bfd_elf,size_dynamic_sections)): Remove parameter
	export_dynamic, instead use member in parameter info.
	* bfd-in.h (bfd_elf32_size_dynamic_sections,
	bfd_elf64_size_dynamic_sections): Update prototype.
	* bfd-in2.h: Regenerate.
2001-06-18 22:05:10 +00:00
Tom Rix beb1bf64d0 Support for xcoff64 2001-05-24 20:50:50 +00:00
Frank Ch. Eigler d436a9b307 * externalize a function
2001-04-25  Frank Ch. Eigler  <fche@redhat.com>

	* bfd-in.h (bfd_cache_close): Declare newly exported function.
	* bfd-in2.h: Regenerated.
2001-04-25 21:08:02 +00:00
Nick Clifton 7898dedac0 Update copyright notices 2001-03-08 21:04:02 +00:00
Kazu Hirata 3fde5a36df 2001-01-23 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd.c: Likewise.
	* bfd-in2.h: Likewise.
	* bfd-in.h: Likewise.
	* cpu-i386.c: Likewise.
	* cpu-m68hc11.c: Likewise.
	* dwarf2.c: Likewise.
	* elf64-x86-64.c: Likewise.
	* format.c: Likewise.
	* freebsd.h: Likewise.
	* hash.c: Likewise.
	* hp300hpux.c: Likewise.
	* hppabsd-core.c: Likewise.
	* hpux-core.c: Likewise.
2001-01-23 20:27:54 +00:00
Nick Clifton 8c603c85a1 Add bfd_get_bits() and bfd_put_bits(). 2000-12-21 18:20:04 +00:00
Kazu Hirata e60b52c622 2000-11-28 Kazu Hirata <kazu@hxi.com>
* aoutx.h: Fix formatting.
	* bfd-in.h: Likewise.
	* bfd-in2.h: Likewise.
	* cache.c: Likewise.
	* cisco-core.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* coffcode.h: Likewise.
	* coffswap.h: Likewise.
	* corefile.c: Likewise.
2000-11-28 21:42:16 +00:00
Kazu Hirata eb6e10cb73 2000-11-20 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
	* bfd.c: Likewise.
	* bout.c: Likewise.
2000-11-21 02:24:32 +00:00
Kazu Hirata 8546af7422 2000-11-08 Kazu Hirata <kazu@hxi.com>
* bfd-in.h: Fix formatting.
	* bfd-in2.h: Likewise.
2000-11-08 23:57:04 +00:00
Nick Clifton 0752970ef8 add support for embedded relocs in m68k ELF port 2000-09-15 18:52:52 +00:00
H.J. Lu a963dc6ade 2000-08-22 H.J. Lu <hjl@gnu.org>
* elf-bfd.h (elf_link_hash_table): Add runpath.

	* bfd-in.h (bfd_elf_get_runpath_list): New prototype.
	* bfd-in2.h: Rebuilt.

	* elf.c (_bfd_elf_link_hash_table_init): Initialize the
	"runpath" field to NULL.
	(bfd_elf_get_runpath_list): New function.

	* elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
	DT_RUNPATH entries.
2000-08-22 19:33:16 +00:00
Nick Clifton e702a51c72 oops - omitted from previous delta 2000-07-21 23:40:12 +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
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
Andrew Cagney 6d9019e4c0 Add function bfd_elf_get_sign_extend_vma. 2000-07-11 07:28:25 +00:00
Nick Clifton 60bcf0fa8c Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add support
for m68hc11 and m68hc12 processors.
2000-06-19 01:22:44 +00:00
Nicholas Duffek 9bd09e220f * bfd-in.h (bfd_family_coff): Define.
* bfd-in2.h: Regenerate.
	* coffgen.c (coff_count_linenumbers, coff_symbol_from,
	coff_find_nearest_line): Check COFFness using bfd_family_coff()
	instead of bfd_target_coff_flavour.
	* cofflink.c (_bfd_coff_final_link): Likewise.
	* cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
	exclude XCOFF files.
	* reloc.c (bfd_perform_relocation, bfd_install_relocation):
	Likewise.
	* targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
	* xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
	* xcofflink.c (XCOFF_XVECP): Delete.
	(bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
	bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
	bfd_xcoff_record_link_assignment,
	bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
	check for bfd_target_xcoff_flavour.
2000-06-16 20:35:08 +00:00
Michael Snyder 3425c18298 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
* elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
        * bfd-in.h: Prototype bfd_elf_get_arch_size.
        * bfd-in2.h: Prototype bfd_elf_get_arch_size.
2000-05-05 18:12:53 +00:00
Alan Modra a1934524a3 Correctly check gcc version. 2000-04-29 00:56:29 +00:00
Timothy Wall b9af77f58f Clean up load page support for tic54x. 2000-04-18 02:21:27 +00:00
Nick Clifton 8603339400 Fix building with --enable-targets=all 2000-03-01 20:39:07 +00:00
Alan Modra 5b93d8bb51 Add IBM 370 support. 2000-02-23 13:52:23 +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 67e5d3d6d0 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
* bfd-in2.h: Rebuild.
1999-07-12 11:06:03 +00:00
Ian Lance Taylor a3e38ad3ed * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
prototype.
	(bfd_elf32_arm_process_before_allocation): Likewise.
	* bfd-in2.h: Rebuild.
1999-06-03 09:21:53 +00:00
Nick Clifton ba96a88f08 Fix implementation of R_ARM_PC24 and R_ARM_THM_PC22 relocs to conform to spec. 1999-05-29 11:05:22 +00:00
Catherine Moore ba1b93173e * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
if COFF_IMAGE_WITH_PE.
        (bfd_arm_process_before_allocation): Likewise.
        (bfd_arm_get_bfd_for_interworking): Likewise.
        * coff-arm.c: Likewise.
        * bfd-in2.h: Regenerate.
        * configure.in (armpe_little_vec): Remove coff-arm.lo.
        (armpe_big_vec): Likewise.
        * configure: Rebuild.
1999-05-10 18:27:37 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00