Commit Graph

1041 Commits

Author SHA1 Message Date
H.J. Lu 37c9e45c89 Revert the last change on aclocal.m4. 2001-04-27 21:25:04 +00:00
Nick Clifton 87748b3227 Add support for arm-vxworks target 2001-04-27 17:12:18 +00:00
H.J. Lu f5f31454c5 2001-04-26 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
	valid.
2001-04-26 19:09:20 +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 5a0a214415 Fix autoconf breakage + commit target.c, omitted in previous delta 2001-04-25 19:09:30 +00:00
Jakub Jelinek a531bbd206 * merge.c (struct sec_merge_hash_entry): Add alignment field.
(struct sec_merge_hash): Remove alignment_power.
	(sec_merge_hash_newfunc): Clear alignment.
	(sec_merge_hash_lookup): Pass alignment as argument.
	Use hashp->root.next, not hashp->next to walk the hash chain.
	If a string already in the hashtable does not have required
	alignment, create a new hashtable entry.
	(sec_merge_init): Remove alignment_power argument.
	(sec_merge_add): Add alignment argument.
	(sec_merge_emit): Alignment is now a per-entity thing, not per
	section.
	(_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
	for proper alignment.
	Pass alignment information to sec_merge_add.
2001-04-24 17:55:57 +00:00
Nick Clifton 6840198f93 z8k fixes 2001-04-24 15:22:25 +00:00
Nick Clifton b3baf5d0a8 Add OpenRISC support 2001-04-24 15:08:16 +00:00
Andreas Jaeger fe4770f478 2001-04-23 Bo Thorsen <bo@suse.de>
* x86-64.h: Add vtable support.

2001-04-23  Bo Thorsen  <bo@suse.de>

	* elf64-x86-64.c: Add c++ vtable hack.
	Small whitespace and comment changes.
2001-04-23 08:00:14 +00:00
Andreas Jaeger 653165cc0d 2001-04-19 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
	(elf64_x86_64_plt_entry): Likewise.
	(elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
	(elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
2001-04-19 09:39:28 +00:00
Hans-Peter Nilsson 4d96d12825 * elf32-cris.c: Tweak comments related to dynamic linking.
(cris_elf_relocate_section): When not creating shared object, fill
	in the .got table for any symbol not in the dynamic symbol table.
	(elf_cris_finish_dynamic_symbol): When not creating shared object,
	only emit a .got.rela reloc if the symbol is in the dynamic symbol
	table.
	(cris_elf_check_relocs): Use variable r_type in all places rather
	than the original expression.  Add default case in switch for
	reloc types.
	(elf_cris_size_dynamic_sections): Iterate over
	elf_cris_discard_excess_program_dynamics when not creating shared
	library.
 	(elf_cris_discard_excess_dso_dynamics): Renamed from
	elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
	(elf_cris_discard_excess_program_dynamics): New.
2001-04-17 12:32:30 +00:00
DJ Delorie 3ed30d29c6 * coffcode.h (coff_write_object_contents): Use
bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
2001-04-15 04:23:46 +00:00
H.J. Lu a80f694198 2001-04-14 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Regenerate.
2001-04-15 01:02:54 +00:00
Jakub Jelinek 767e4b0d59 * section.c (STD_SECTION): Add entsize. 2001-04-14 14:23:31 +00:00
H.J. Lu 2dd439c54e 2001-04-13 H.J. Lu <hjl@gnu.org>
* section.c (SEC_MERGE): Define new flag for merging.
	(SEC_STRINGS): Likewise.
	(entsize): New field.
2001-04-14 04:13:00 +00:00
DJ Delorie baf80c32ae * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
flag on pe-i386 targets.
2001-04-13 22:42:48 +00:00
Jakub Jelinek f5fa8ca231 bfd/
* libbfd-in.h (_bfd_merge_section): New.
	(_bfd_write_merged_section): New.
	(_bfd_merged_section_offset): New.
	* libbfd.h: Rebuilt.
	* linker.c (_bfd_generic_link_output_symbols): Handle
	discard_sec_merge.
	* aoutx.h (aout_link_write_symbols): Likewise.
	* pdp11.c (aout_link_write_symbols): Likewise.
	* elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
	(elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
	sections.
	(elf_link_sec_merge_syms): New.
	(elf_link_input_bfd): Call _bfd_merged_section_offset
	and _bfd_write_merged_section.
	Handle discard_sec_merge.
	* elf-bfd.h (struct elf_link_hash_table): Add merge_info
	field.
	(struct bfd_elf_section_data): Likewise.
	* elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
	SEC_STRINGS section flags and entsize from their ELF counterparts.
	(_bfd_elf_link_hash_table_init): Initialize merge_info.
	(elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
	from their BFD counterparts.
	* merge.c: New file.
	* Makefile.am: Add strtab.lo.
	* Makefile.in: Rebuilt.
include/
	* bfdlink.h (bfd_link_discard): Add discard_sec_merge.
gas/
	* config/obj-elf.c (obj_elf_change_section): Add entsize argument,
	handle SHF_MERGE and SHF_STRINGS.
	(obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS.
	(obj_elf_section): Allow additional argument specifying entity size.
	* write.c (adjust_reloc_syms): Keep relocations against local symbols
	in SEC_MERGE sections.
ld/
	* ldmain.c (main): Default to discard_sec_merge.
	* lexsup.c (OPTION_DISCARD_NONE): Define.
	(ld_options): Add --discard-none.
	(parse_args): Handle OPTION_DISCARD_NONE.
	* ldlang.c (wild_doit): SEC_MERGE should be set in the output
	section only if SEC_MERGE and SEC_STRINGS flags and entsize of
	all its input sections match.
2001-04-13 00:34:36 +00:00
Hans-Peter Nilsson d954b04094 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
only hide symbols marked STV_INTERNAL or STV_HIDDEN.
2001-04-09 03:24:32 +00:00
H.J. Lu fdbafa100f 2001-04-05 Steven J. Hill <sjhill@cotw.com>
* config.bfd (mips*el*-*-linux-gnu*): Use traditional little
	endian MIPS ELF target.
	* config.bfd (mips*-*-linux-gnu*): Use traditional big endian
	MIPS ELF target.

	* configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
	64bit big endian MIPS ELF target.
	(bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
	endian MIPS ELF target.
	* configure: Regenerated.

	* elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
	little endian targets.
	(mips_elf_sym_is_global): Handle traditional targets.

	* elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
	64bit big endian MIPS ELF target.
	(bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
	endian MIPS ELF target.

	* targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
	and bfd_elf64_tradlittlemips_vec.
2001-04-08 05:11:49 +00:00
H.J. Lu dd484e5c56 2001-04-05 David Mosberger <davidm@hpl.hp.com>
* elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
	ordinary "progbits" section.
2001-04-06 00:37:30 +00:00
Alan Modra 391a809a0a * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
when -Bsymbolic causes a symbol to no longer need a .plt entry.
2001-04-04 00:31:37 +00:00
H.J. Lu 5854c6337e 2001-04-03 David Mosberger <davidm@hpl.hp.com>
* efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
2001-04-03 14:45:43 +00:00
H.J. Lu 8b4b0fac4b 2001-03-30 H.J. Lu <hjl@gnu.org>
* efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
	(PEI_DEFAULT_TARGET_SUBSYSTEM): This.
2001-03-30 16:08:34 +00:00
H.J. Lu b9d8899626 Remove ATTRIBUTE_UNUSED in the last patch. 2001-03-27 02:05:18 +00:00
H.J. Lu eb4a6e4f4b 2001-03-26 H.J. Lu <hjl@gnu.org>
* elf32-gen.c (elf32_generic_link_add_symbols): New. Check
	if there are any relocations for generic ELF.
	(bfd_elf32_bfd_link_add_symbols): Defined to
	elf32_generic_link_add_symbols.
	* elf64-gen.c (elf64_generic_link_add_symbols): New. Check
	if there are any relocations for generic ELF.
	(bfd_elf64_bfd_link_add_symbols): Defined to
	elf64_generic_link_add_symbols.
2001-03-27 02:00:34 +00:00
Nick Clifton 55c80943b8 Fix building bfd.pot in maintainer mode 2001-03-23 18:05:30 +00:00
Hans-Peter Nilsson 915e51468a * elf32-cris.c: Shlib and PIC support. PCREL tweaks. 2001-03-22 14:56:06 +00:00
Hans-Peter Nilsson 58d29fc398 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
	BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
	BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
	BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
	BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
	* bfd-in2.h, libbfd.h: Regenerate.
2001-03-22 11:17:16 +00:00
Diego Novillo 7a65545dc5 2001-03-21 Diego Novillo <dnovillo@redhat.com>
(_bfd_mips_elf_relocate_section): Give a better error message when
	a relocation is not recognized.
2001-03-22 00:29:15 +00:00
Alan Modra b32b5d6e64 Prevent NULL pointer dereference. 2001-03-21 08:09:25 +00:00
H.J. Lu f4fbb4a3d1 2001-03-20 H.J. Lu <hjl@gnu.org>
* configure.in: Remove the redundent AC_ARG_PROGRAM.
	* configure: Rebuild.
2001-03-20 18:24:30 +00:00
Andreas Schwab 95fc45e66f * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
relocation value when resolving a reference from a debugging
	section.
2001-03-20 10:11:07 +00:00
Nick Clifton 03d411a927 Fix syntax errors. 2001-03-16 18:49:32 +00:00
Nick Clifton d165939296 Fix warning message 2001-03-16 17:34:31 +00:00
Hans-Peter Nilsson 0dc1fa070b Fix accidental loss of bit 7 in peoples names 2001-03-16 03:00:24 +00:00
Alan Modra 12cca0d293 Don't assume non-PIC to PIC call stubs are unneeded just because
the function happens to have a plabel.
2001-03-15 13:47:56 +00:00
DJ Delorie cd6ec716b6 * elf32-sh.c (sh_elf_relocate_section): Only relocation
R_SH_DIR8WP* relocs if they're against external symbols, else
they're just for relaxing.  Validate the reloc values.
2001-03-13 04:43:40 +00:00
Nick Clifton 43a0748c78 Add --binary-architecture switch to objcopy to allow the output architecture
to be set when the input file type is binary.
2001-03-13 00:08:35 +00:00
Phil Blundell d982ba7301 2001-03-11 Philip Blundell <philb@gnu.org>
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
	entries that could serve as a definition for a weak symbol.
2001-03-11 13:10:51 +00:00
Nick Clifton 7898dedac0 Update copyright notices 2001-03-08 21:04:02 +00:00
Nick Clifton df425bc0dd Conditionalize prevbious pathc on ! defined OLD_ARM_ABI. 2001-03-07 23:52:58 +00:00
Andreas Jaeger bcdd92f3e0 2001-03-07 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
	some relocation values.
2001-03-07 13:49:11 +00:00
Nick Clifton 4f3c3dbb37 Fix BLX(1) for Thumb 2001-03-06 22:33:47 +00:00
Nick Clifton f8f3c6cc37 Add BFD_RELOC_THUMB_PCREL_BLX. 2001-03-06 20:27:50 +00:00
Nick Clifton 3cac17aec8 Rest of the changes for Coldfire V4. 2001-03-06 20:15:27 +00:00
Nick Clifton d1b17ab0f3 Add s390 target 2001-03-01 18:48:14 +00:00
Andreas Jaeger 5608e05bb4 2001-02-28 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
	to addend.
2001-02-28 12:32:10 +00:00
Phil Blundell fd2ec33034 2001-02-28 Philip Blundell <pb@futuretv.com>
* elf32-arm.h: Update mentions of renamed EF_xx constants.
 	(elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
2001-02-28 10:13:20 +00:00
H.J. Lu 920581c57e 2001-02-27 H.J. Lu <hjl@gnu.org>
* aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
	abfd->tdata.aout_data == NULL.
2001-02-27 18:45:45 +00:00
Alan Modra 3ee1d8549f Fix some comments, and a formatting error. 2001-02-27 07:11:41 +00:00
Alan Modra 27b7e12d2d Bump version to 2.11.90, fix missing dependencies in bfd/,
and run "make dep-am".
2001-02-27 06:43:56 +00:00
Timothy Wall 10d1e03a7a Update elf64 aix5 comments. 2001-02-27 03:26:47 +00:00
Nick Clifton 1276aefac0 BFD: Catch & report unhandled PE section flags.
LD: Catch BFD errors whilst loading symbols and do not produce an executable.
2001-02-27 01:38:06 +00:00
Andreas Jaeger 4a73f21b0c 2001-02-26 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
2001-02-26 07:50:22 +00:00
Timothy Wall 7b6dab7f4b ia64-*-aix* support. 2001-02-22 16:38:46 +00:00
Jim Wilson 87f8eb977e Improve gas error messages for invalid instructions.
* cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
	C8 said "1" instead of "8".  Clarify error string for IMM22:
	"signed integer" instead of just "integer".
	* config/tc-ia64.c (enum operand_match_result): New type.
	(operand_match): Change return type to operand_match_result.
	Fix all returns appropriately, adding support for returning the
	out-of-range result.
	(parse_operands): New locals result, error_pos, out_of_range_pos,
	curr_out_of_range_pos.  Rewrite operand matching loop to give better
	error messages.
	* ia64-opc-d.c (ia64_opcodes_d): Break the "add" pattern into two
	separate variants: one for IMM22 and the other for IMM14.
	* ia64-asmtab.c: Regenerate.
2001-02-22 03:16:21 +00:00
Andreas Jaeger 05aa1441bb 2001-02-20 Andreas Jaeger <aj@suse.de>
* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
	PLT entries that could serve as a definition for a weak symbol.
2001-02-20 08:01:32 +00:00
Jakub Jelinek 8701c1bc04 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
entries that could serve as a definition for a weak symbol.
	* elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
2001-02-19 22:35:47 +00:00
David O'Brien d4af977521 2001-02-18 David O'Brien <obrien@FreeBSD>
* configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
	FreeBSD/i386-CURRENT differently until I can figure out the needed
	corefile changes.
	* configure: Regenerate.
	* config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
	FreeBSD/PowerPC, and FreeBSD/sparc64.

Approved by:  Philip Blundell <philb@gnu.org>
              Message-Id: <E14URxF-00023n-00@kings-cross.london.uk.eu.org>
2001-02-19 06:33:41 +00:00
Nick Clifton e135f41bc2 Add PDP-11 support 2001-02-18 23:33:11 +00:00
Nick Clifton dc3febfa6e Set the architecture (GDB multiarch needs it). 2001-02-18 22:29:52 +00:00
H.J. Lu ea412e04e5 2001-02-18 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Ignore invalid section symbol
	index.
2001-02-18 22:04:08 +00:00
Kazu Hirata 47eee8a91c 2001-02-18 Kazu Hirata <kazu@hxi.com>
* vms-misc.c: Fix formatting.
2001-02-18 21:35:55 +00:00
Kazu Hirata 8a0c27cda9 2001-02-16 Kazu Hirata <kazu@hxi.com>
* vms.c: Fix formatting.
2001-02-16 19:22:12 +00:00
Nick Clifton d1fad7c69e fixes for elf_find_nearest_line 2001-02-14 19:58:45 +00:00
Nick Clifton 51d7ee16bb Fix initialisation of asection structure 2001-02-14 19:37:05 +00:00
Nick Clifton 825b47db31 Apply changes to Makefile.in to Makefile.am 2001-02-14 19:18:53 +00:00
H.J. Lu ea36a178b2 2001-02-14 H.J. Lu <hjl@gnu.org>
* libcoff-in.h (pe_tdata): Add members target_subsystem and
	force_minimum_alignment.
2001-02-14 17:29:47 +00:00
Andreas Jaeger 407443a31c 2001-02-14 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Small formatting fixes and rearrangements of code.
	(elf64_86_64_size_info): Struct added to fix a problem
	with the hashtable string entries.
	(elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
	(elf64_x86_64_size_dynamic_sections): A FIXME removed.
	(elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
	remove the FIXME for this.
	(elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
	section. Also removed the FIXME for it.
	(x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
	(ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
	(elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
2001-02-14 10:57:47 +00:00
H.J. Lu 6757257fb5 It is SYMTAB, not STMTAB. 2001-02-13 23:58:35 +00:00
Richard Henderson b4adccfd55 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
and not user provided.
2001-02-13 23:08:09 +00:00
Kazu Hirata 6a125b16c8 2001-02-13 Kazu Hirata <kazu@hxi.com>
* rs6000-core.c: Fix formatting.
2001-02-13 22:41:23 +00:00
Kazu Hirata 9635981ad3 2001-02-13 Kazu Hirata <kazu@hxi.com>
* vms.c (vms_print_symbol): Remove unreachable code.
2001-02-13 22:39:17 +00:00
DJ Delorie 6433dece0a Regenerate 2001-02-13 21:05:09 +00:00
DJ Delorie cbff5e0d66 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
as _bfd_XXi_only_swap_filehdr_out.
(pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
pe->force_minimum_alignment to TRUE.
(pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
PEI_TARGET_SUBSYSTEM.
(pe_print_private_bfd_data): Call
_bfd_XX_print_private_bfd_data_common() instead of
_bfd_pe_print_private_bfd_data_common().
(pe_bfd_copy_private_bfd_data): Call
_bfd_XX_bfd_copy_private_bfd_data_common() instead of
_bfd_pe_bfd_copy_private_bfd_data_common().
(coff_bfd_copy_private_section_data): Define as
_bfd_XX_bfd_copy_private_section_data instead of
_bfd_pe_bfd_copy_private_section_data.
(coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
of a _bfd_pe_get_symbol_info.

* peigen.c: Delete.

* peXXigen.c: Renamed from peigen.c.
(COFF_WITH_XX): Define this macro (will get expanded into
COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
compiled as peigen.c or pepigen.c.
[COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
define the canonical PEP structures and definitions.
(_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
effect, enforce minimum file and section alignments.  If
extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
so, by default, this is a no-op).

* libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
(_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
_bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
_bfd_pefoo if it's not defined.  Use these macros to define
coff swap macros.

* libcoff.h (pe_tdata): Add members target_subsystem and
force_minimum_alignment.

* efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
COFF_WITH_pep.
(PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.

* configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
peigen.lo.

* coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
(AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
PEPAOUTHDR.

* Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
(BFD64_BACKENDS_CFILES): Mention pepigen.c
(peigen.c): Add rule to generate from peXXigen.c.
(pepigen.c): Ditto.
(pepigen.lo): List dependencies for pepigen.lo.

* unwind-ia64.c (unw_decode_x1): Declare code arg with
ATTRIBUTE_UNUSED.
(unw_decode_x2): Ditto.
(unw_decode_x3): Ditto.
(unw_decode_x4): Ditto.

* pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
Rename from PEPAOUTHDR.
2001-02-13 19:23:08 +00:00
Alan Modra df8634e34b (elf32_hppa_set_gp): Handle weak $global$.
If $global$ referenced but not defined, set its value here.
2001-02-13 10:14:14 +00:00
Jan Hubicka 51e0a107ce 2001-02-09 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
	alignment to 3.
	(elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
	and relocation.
	(elf64_x86_64_relocate_section): Fix formatting.
	(elf64_x86_64_relocate_section): Fix addend for relocation of
	R_X86_64_(8|16|32|PC8|PC16|PC32).
2001-02-12 16:54:08 +00:00
Jan Hubicka 23df107806 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
* tc-i386.c (i386_displacement): Fix handling of
	BFD_RELOC_X86_64_GOTPCREL.
	(i386_validate_fix): Likewise.
2001-02-12 16:47:15 +00:00
H.J. Lu f0e1d18ad3 2001-02-11 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_bfd_final_link): Use file_align for STMTAB
	alignment.
2001-02-12 00:23:37 +00:00
Nick Clifton 708b82c780 fix formatting 2001-02-11 23:22:25 +00:00
Nick Clifton b401d8e517 oops - omitted from previous delta 2001-02-11 23:21:01 +00:00
Nick Clifton 9117d2197e Apply several patches from Maciej W. Rozycki 2001-02-11 23:11:41 +00:00
Michael Sokolov 9f93bca5c7 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
* Makefile.in: Regenerate.
2001-02-11 22:53:28 +00:00
Richard Henderson 81545d45ad * elfxx-ia64.c (is_unwind_section_name): New function. Returns
true if section name is an unwind table section name.
        (elfNN_ia64_additional_program_headers): Count each unwind section
        separately.
        (elfNN_ia64_modify_segment_map): Install one unwind program header
        for each unwind separate section.  Note: normally the linker
        script merges the unwind sections that go into a single segment,
        so this still generates at most one unwind program header per
        segment.

        * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
        name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
        (elfNN_ia64_fake_sections): Mark sections with names that start
        with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
        unwind section.

        * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
        Use it to make sh_info in unwind section point to the text section
        it applies to.
2001-02-10 01:41:06 +00:00
Nick Clifton a85d7ed0f0 Add s390 support 2001-02-10 00:58:38 +00:00
Nick Clifton 356d255deb Suppress extra addition of ImageBase. 2001-02-09 18:38:58 +00:00
Jakub Jelinek 069f40e56f * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function. 2001-02-09 17:53:16 +00:00
Jakub Jelinek eadfa8abf1 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
(sparc64_elf_relocate_section): Likewise.
2001-02-09 17:31:11 +00:00
Mark Kettenis 9fc54e1950 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
similar to R_SPARC_32.
* elf64-sparc.c	(sparc64_elf_howto_table): Likewise.
2001-02-09 16:19:25 +00:00
H.J. Lu 1f655a0986 2001-02-08 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
	relocation entries for weak definitions when building DSO with
	-Bsymbolic.
2001-02-09 06:58:59 +00:00
Richard Henderson ca88208ac8 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
before visibility.  Locally defined protected symbols are not
        dynamic.
2001-02-09 00:29:58 +00:00
Geoffrey Keating 4603e845c0 * config.bfd: Enable coff64 for rs6000-*. Patch from
<hzoli@austin.ibm.com>.
2001-02-09 00:11:24 +00:00
Nick Clifton 4ca29a6acf If stabs info is successfully found, do not attempt to find dwarf2 info
before returning.
2001-02-07 23:50:04 +00:00
Nick Clifton 7da9d88fe4 ignore common definitions of function symbols in unlinked archives 2001-02-07 23:42:15 +00:00
Nick Clifton 7340082dc8 Change bfd_target_vector from an array to a pointer 2001-02-07 23:16:22 +00:00
H.J. Lu 2719f88070 2001-02-06 H.J. Lu <hjl@gnu.org>
* elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
	internal symbols are not dynamic.
	* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2001-02-07 06:19:58 +00:00
Nick Clifton 175aa013d9 Remove elf64-ia64.c from list of backend C files - it is auto-generated. 2001-02-07 01:58:26 +00:00
H.J. Lu 15e0ecd9c7 2001-02-06 H.J. Lu <hjl@gnu.org>
* bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
	checking.
	(pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
	external_PEI_IMAGE_hdr.
2001-02-06 19:43:19 +00:00
Kazu Hirata 27def10f96 2001-02-06 Kazu Hirata <kazu@hxi.com>
* elf-m10200.c: Fix formatting.
2001-02-06 19:04:20 +00:00
Nick Clifton a0f2e916a7 Do not convert reloc addend to PC rel, it will be handled later on. 2001-02-04 22:14:19 +00:00
Nick Clifton d96031fbcc Fix typo 2001-02-03 00:53:10 +00:00
Kazu Hirata 010ac81f2a 2001-02-01 Kazu Hirata <kazu@hxi.com>
* elf-m10300.c: Fix formatting.
2001-02-01 19:35:29 +00:00
Alan Modra d9634ba1ff (elf64_hppa_object_p): Set architecture and machine from elf header flags. 2001-01-31 13:28:50 +00:00
Alan Modra 3fab46d0e9 Write out millicode functions with the right elf symbol type. 2001-01-30 13:40:08 +00:00
Richard Henderson 9540464302 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
before mdebug.
2001-01-30 09:52:27 +00:00
Richard Henderson 8fb35fedd5 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
for non-default visibility.
        * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
        delete ugly macro and replace with pretty function.
2001-01-27 00:04:09 +00:00
Nick Clifton a4f685449e DJGPP config tweaks 2001-01-25 21:08:10 +00:00
Kazu Hirata c02e7c3eff 2001-01-25 Kazu Hirata <kazu@hxi.com>
* bfd-in2.h: Fix formatting.
	* libbfd.h: Likewise.
2001-01-25 20:17:45 +00:00
Kazu Hirata 10bfd974d4 2001-01-25 Kazu Hirata <kazu@hxi.com>
* chew.c: Do not output trailing whitespaces in type and
	functionname.  Update copyright.
2001-01-25 20:12:49 +00:00
Kazu Hirata 05c6581e28 2001-01-24 Kazu Hirata <kazu@hxi.com>
* chew.c: Do not output a trailing whitespace.
2001-01-24 22:38:31 +00:00
H.J. Lu 541389e202 2001-01-23 H.J. Lu <hjl@gnu.org>
* bfd-in2.h: Rebuild.
2001-01-24 04:56:29 +00:00
H.J. Lu 0007625f8f 2001-01-23 H.J. Lu <hjl@gnu.org>
* vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
	is NULL or PRIV(vms_rec) is outside of the buffer.
2001-01-23 21:50:36 +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
Kazu Hirata b653e1b152 2001-01-23 Kazu Hirata <kazu@hxi.com>
* coff64-rs6000.c: Fix formatting.
	* coff-arm.c: Likewise.
	* coffgen.c: Likewise.
	* cofflink.c: Likewise.
	* coff-mcore.c: Likewise.
	* coff-mips.c: Likewise.
	* coff-pmac.c: Likewise.
	* coff-ppc.c: Likewise.
	* coff-rs6000.c: Likewise.
	* elf32.c: Likewise.
	* elf32-fr30.c: Likewise.
	* elf32-i370.c: Likewise.
	* elf32-i860.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-m68k.c: Likewise.
	* elf32-mcore.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf32-sh.c: Likewise.
	* elf32-v850.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elf64-sparc.c: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elf-m10200.c: Likewise.
	* elf-m10300.c: Likewise.
	* elfxx-ia64.c: Likewise.
2001-01-23 11:45:53 +00:00
Andreas Jaeger 70256ad8ae 2001-01-22 Bo Thorsen <bo@suse.de>
* elf64-x86-64.c: Added PIC support for X86-64.
        (elf64_x86_64_link_hash_newfunc): Function added.
        (elf64_x86_64_link_hash_table_create): Likewise.
        (elf64_x86_64_check_relocs): Likewise.
        (elf64_x86_64_gc_mark_hook): Likewise.
        (elf64_x86_64_gc_sweep_hook): Likewise.
        (elf64_x86_64_adjust_dynamic_symbol): Likewise.
        (elf64_x86_64_size_dynamic_sections): Likewise.
        (elf64_x86_64_discard_copies): Likewise.
        (elf64_x86_64_finish_dynamic_symbol): Likewise.
        (elf64_x86_64_finish_dynamic_sections): Likewise.
        (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2001-01-23 10:49:50 +00:00
Andreas Jaeger ee0bebb8ef 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
* Makefile.am (install-data-local): Make use of $(DESTDIR).
	* Makefile.in: Regenerate.
2001-01-22 09:41:40 +00:00
Kazu Hirata 2a38f751b6 2001-01-21 Kazu Hirata <kazu@hxi.com>
* coff-a29k.c: Fix formatting.
2001-01-21 19:19:59 +00:00
H.J. Lu c849217624 2001-01-19 H.J. Lu <hjl@gnu.org>
* elf32-i386.c (elf_i386_check_relocs): Report files with bad
	relocation section names.
	(elf_i386_relocate_section): Report files with bad relocation
	section names and return false.
2001-01-20 06:08:35 +00:00
Andreas Jaeger a5377ec020 * targets.c: Alphabetize list of xvecs. 2001-01-18 07:47:51 +00:00
Alan Modra d952f17a9d Linux target variants for elfxx-hppa. 2001-01-14 11:12:53 +00:00
Alan Modra c46b75158b Use SEGREL32 relocs for elf32-hppa unwind. 2001-01-14 07:03:49 +00:00
Alan Modra d768008d61 Add parens like the comment says. 2001-01-14 06:12:07 +00:00
Alan Modra 150ccafb7a Correct DT_INIT/DT_FINI ABI violation 2001-01-14 05:58:15 +00:00
Alan Modra b352eebf39 Wide mode .plt offsets for elf64-hppa 2001-01-14 05:22:51 +00:00
Nick Clifton b7ed8fad53 formatting fix 2001-01-13 19:45:52 +00:00
Nick Clifton b3b9a0622f formatting fix 2001-01-13 19:42:21 +00:00
Alan Modra 6e0b89ee6c Cure recent x86 warts. 2001-01-12 03:34:49 +00:00
Nick Clifton 0d2bcfafbf Updated ARC assembler from arccores.com 2001-01-11 21:20:20 +00:00
Nick Clifton 2f6d2f8520 Rotate ChangeLogs 2001-01-11 19:01:42 +00:00
Nick Clifton 2758140ba5 fix spelling typo 2001-01-11 01:43:44 +00:00
Nick Clifton c31c1f70c0 Change defn of LOCAL_LABEL_PREFIX to "" 2001-01-11 01:43:20 +00:00
Phil Blundell 5ad083e32d Update address for bug reports. 2001-01-07 14:53:57 +00:00
Kazu Hirata 7eae7d229a 2001-01-04 Kazu Hirata <kazu@hxi.com>
* som.c: Fix formatting.
2001-01-04 23:27:08 +00:00
Kazu Hirata 3e932841da 2001-01-03 Kazu Hirata <kazu@hxi.com>
* ecoffswap.h: Fix formatting.
	* elf-bfd.h: Likewise.
	* elfarm-nabi.c: Likewise.
	* elfarm-oabi.c: Likewise.
	* elfcode.h: Likewise.
	* elfcore.h: Likewise.
	* elflink.c: Likewise.
	* elflink.h: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-target.h: Likewise.
2001-01-03 22:53:39 +00:00
Kazu Hirata 509945ae4b 2001-01-03 Kazu Hirata <kazu@hxi.com>
* libbfd.c: Fix formatting.
	* linker.c: Likewise.
	* lynx-core.c: Likewise.
2001-01-03 19:26:07 +00:00
Kazu Hirata ee91ed7972 2001-01-02 Kazu Hirata <kazu@hxi.com>
* peicode.h: Fix formatting.
2001-01-02 19:22:56 +00:00
Kazu Hirata 892339eeeb 2001-01-02 Kazu Hirata <kazu@hxi.com>
* pc532-mach.c: Fix formatting.
	* pe-arm.c: Likewise.
	* pe-i386.c: Likewise.
	* pe-mips.c: Likewise.
	* pe-ppc.c: Likewise.
	* pe-sh.c: Likewise.
	* pei-mips.c: Likewise.
	* pei-sh.c: Likewise.
	* ppcboot.c: Likewise.
	* ptrace-core.c: Likewise.
2001-01-02 18:58:44 +00:00
Kazu Hirata 3d85563291 2001-01-01 Kazu Hirata <kazu@hxi.com>
* reloc.c: Fix formatting.
	* riscix.c: Likewise.
	* rs6000-core.c: Likewise.
	* xcoff-target.h: Likewise.
2001-01-01 21:37:35 +00:00
Hans-Peter Nilsson a77a9fefcf * elfcode.h (elf_object_p): Also restore the bfd mach field on
error, by calling bfd_default_set_arch_mach with incoming
	values.
2000-12-29 05:44:51 +00:00
Kazu Hirata 558e161f24 2000-12-26 Kazu Hirata <kazu@hxi.com>
* vaxnetbsd.c: Fix formatting.
	* versados.c: Likewise.
	* vms-gsd.c: Likewise.
	* vms-hdr.c: Likewise.
	* vms-misc.c: Likewise.
2000-12-26 19:50:50 +00:00
Alexandre Oliva 3c5798123f * archive.c (coff_write_armap): Don't write more than symbol_count
`archive_member_file_ptr's.
2000-12-25 21:41:20 +00:00
Kazu Hirata 672579e99b 2000-12-25 Kazu Hirata <kazu@hxi.com>
* vms-tir.c: Fix formatting.
2000-12-25 14:42:42 +00:00
Kazu Hirata 55f2d5ed30 2000-12-23 Kazu Hirata <kazu@hxi.com>
* vms.c: Fix formatting.
	* vms.h: Likewise.
2000-12-23 16:48:10 +00:00
Nick Clifton 23ccc829e2 Fixes to allow sources to compile under Solaris 2.8 2000-12-21 18:40:21 +00:00
Nick Clifton 8c603c85a1 Add bfd_get_bits() and bfd_put_bits(). 2000-12-21 18:20:04 +00:00
Kazu Hirata 5bff4f5642 2000-12-20 Kazu Hirata <kazu@hxi.com>
* targets.c: Fix formatting.
	* tekhex.c: Likewise.
	* trad-core.c: Likewise.
2000-12-20 19:53:11 +00:00
Kazu Hirata 7b82c249fa 2000-12-19 Kazu Hirata <kazu@hxi.com>
* sco5-core.c: Fix formatting.
	* section.c: Likewise.
	* sparclinux.c: Likewise.
	* sparclynx.c: Likewise.
	* sparcnetbsd.c: Likewise.
	* srec.c: Likewise.
	* stabs.c: Likewise.
	* stab-syms.c: Likewise.
	* sunos.c: Likewise.
	* syms.c: Likewise.
	* sysdep.h: Likewise.
2000-12-20 00:21:57 +00:00
Nick Clifton f78c52818f Definbe extra allowable COFF section flags for ARM_PE target/ 2000-12-18 20:50:41 +00:00
Nick Clifton 02b89dcefc Add default case to file_format switch. 2000-12-18 19:03:30 +00:00
Nick Clifton d20966a734 Move to the start of the program headers before attempting to read them. 2000-12-15 18:53:04 +00:00