Commit Graph

4387 Commits

Author SHA1 Message Date
Alan Modra 30bffb23b0 daily update 2005-01-28 23:00:07 +00:00
Daniel Jacobowitz b134237006 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
* elf32-arm.c (ELF_MINPAGESIZE): Define.
	* elf32-ppc.c (ELF_MINPAGESIZE): Define.
	* elfcode.h (elf_object_p): Use minpagesize instead of
	maxpagesize.
	* elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
	(elfNN_bed): Include ELF_MINPAGESIZE.
2005-01-28 17:58:24 +00:00
Julian Brown 319850b451 * bfd/bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd/bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
	* bfd/elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
	(bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
	passing flag value from ld. Set flag value in global hash table entry.
	(elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
	relocation.
	* ld/emultempl/armelf.em (fix_v4bx): New variable.
	(arm_elf_create_output_section_statements): Communicate fix_v4bx flag
	value to bfd.
	(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_FIX_V4BX.
	(PARSE_AND_LIST_LONGOPTS): Add option --fix-v4bx.
	(PARSE_AND_LIST_OPTIONS): Add option --fix-v4bx.
	(PARSE_AND_LIST_ARGS_CASES): Add option OPTION_FIX_V4BX.
	* ld/NEWS: Mention --fix-v4bx.
	* ld/ld.texinfo: Document --fix-v4bx.
2005-01-28 17:24:41 +00:00
Alan Modra 1705a2660b daily update 2005-01-27 23:00:05 +00:00
Andrew Cagney a53bf50624 2005-01-27 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Don't use NONE as a default for CATOBJEXT.
2005-01-27 14:48:23 +00:00
Alan Modra 7e8dae1527 daily update 2005-01-26 23:00:06 +00:00
Mark Mitchell dc4c9c199b * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
SymbianOS.

	* emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
	as to include .ARM.exidx$${Base,Limit}.
	* ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
	Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
	Put .init_array, .fini_array, etc. into the read-only data
	segment.
2005-01-26 06:10:45 +00:00
Alan Modra 22a96d786c daily update 2005-01-25 23:00:05 +00:00
Alexandre Oliva 90219bd0f3 bfd/ChangeLog:
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* elf32-frv.c (elf32_frv_relocate_section): Force local binding
for TLSMOFF.
* reloc.c: Add R_FRV_TLSMOFF.
* elf32-frv.c (elf32_frv_howto_table): Likewise.
(frv_reloc_map, frv_reloc_type_lookup): Map it.
(elf32_frv_relocate_section): Handle it.
(elf32_frv_check_relocs): Likewise.
* libbfd.h, bfd-in2.h: Rebuilt.
2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
* elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
when given an undefweak TLS symbol.  Fix constant TLS PLT entries
such that they return the constant in gr9.
(_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
symbols.
(_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
too, such that they shrink on relaxation.
(elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
(_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
if we can guarantee the use of 16-bit constants.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
Introduce TLS support for FR-V FDPIC.
* reloc.c: Add TLS relocations.
* elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
(elf32_frv_rel_tlsdesc_value_howto): New.
(elf32_frv_rel_tlsoff_howto): New.
(frv_reloc_map): Add new mappings.
(struct frvfdpic_elf_link_hash_table): Add pointer to summary
reloc information.
(frvfdpic_dynamic_got_plt_info): New.
(frvfdpic_plt_tls_ret_offset): New.
(ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
(struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
(struct _frvfdpic_dynamic_got_plt_info): Likewise.
(FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
section as local.
(struct frvfdpic_relocs_info): Add TLS fields.
(frvfdpic_relocs_info_hash): Warning clean up.
(frvfdpic_relocs_info_find): Initialize tlsplt_entry.
(frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
(FRVFDPIC_TLS_BIAS): Define.
(tls_biased_base): New.
(_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
relocations.
(frv_reloc_type_lookup): Likewise.
(frvfdpic_info_to_howto_rel): Likewise.
(elf32_frv_relocate_section): Likewise.
(_frv_create_got_section): Create the PLT section here.
(elf32_frvfdpic_create_dynamic_sections): Not here.
(_frvfdpic_count_nontls_entries): Move out of...
(_frvfdpic_count_got_plt_entries): ... here.
(_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
(_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
support.
(_frvfdpic_relax_tls_entries): New.
(_frvfdpic_compute_got_alloc_data): Add TLS support.
(_frvfdpic_get_tlsdesc_entry): New.
(_frvfdpic_assign_got_entries): Add TLS support.
(_frvfdpic_assign_plt_entries): Likewise.
(_frvfdpic_reset_got_plt_entries): New.
(_frvfdpic_size_got_plt): Move out of...
(elf32_frvfdpic_size_dynamic_sections): ... here.
(_frvfdpic_relax_got_plt_entries): New.
(elf32_frvfdpic_relax_section): New.
(elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
(elf32_frv_check_relocs): Add TLS support.
(bfd_elf32_bfd_relax_section): Define for FDPIC.
* libbfd.h, bfd-in2.h: Rebuilt.
cpu/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.cpu: Add support for TLS annotations in loads and calll.
* frv.opc (parse_symbolic_address): New.
(parse_ldd_annotation): New.
(parse_call_annotation): New.
(parse_ld_annotation): New.
(parse_ulo16, parse_uslo16): Use parse_symbolic_address.
Introduce TLS relocations.
(parse_d12, parse_s12, parse_u12): Likewise.
(parse_uhi16): Likewise.  Fix constant checking on 64-bit host.
(parse_call_label, print_at): New.
gas/ChangeLog:
* config/tc-frv.c (md_apply_fix3): Mark TLS symbols as such.
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-frv.c (frv_pic_ptr): Add tlsmoff support.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* cgen.c (gas_cgen_parse_operand): Handle
CGEN_PARSE_OPERAND_SYMBOLIC.
* config/tc-frv.c (md_cgen_lookup_reloc): Handle TLS relocations.
(frv_force_relocation): Likewise.  Fix handling of PIC
relocations.
(md_apply_fix3): Likewise.
include/elf/ChangeLog:
2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.h: Add R_FRV_TLSMOFF.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv.h: Add TLS relocations.
include/opcode/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* cgen.h (enum cgen_parse_operand_type): Add
CGEN_PARSE_OPERAND_SYMBOLIC.
ld/testsuite/ChangeLog:
* ld-frv/fdpic.exp: Add -mfdpic to ASFLAGS.
* ld-frv/tls.exp: Likewise.
2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
* ld-frv/tls-3.s: New.
* ld-frv/tls-static-3.d: New.
* ld-frv/tls-dynamic-3.d: New.
* ld-frv/tls-pie-3.d: New.
* ld-frv/tls-shared-3.d: New.
* ld-frv/tls-relax-static-3.d: New.
* ld-frv/tls-relax-dynamic-3.d: New.
* ld-frv/tls-relax-pie-3.d: New.
* ld-frv/tls-relax-shared-3.d: New.
* ld-frv/tls.exp: Run the new tests.
* ld-frv/tls-dynamic-2.d: Adjust for improved relaxation.
* ld-frv/tls-relax-dynamic-2.d: Likewise.
* ld-frv/tls-relax-initial-shared-2.d: Likewise.
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* ld-frv/tls-1-dep.s: New.
* ld-frv/tls-1-shared.lds: New.
* ld-frv/tls-1.s: New.
* ld-frv/tls-2.s: New.
* ld-frv/tls-dynamic-1.d: New.
* ld-frv/tls-dynamic-2.d: New.
* ld-frv/tls-initial-shared-2.d: New.
* ld-frv/tls-pie-1.d: New.
* ld-frv/tls-relax-dynamic-1.d: New.
* ld-frv/tls-relax-dynamic-2.d: New.
* ld-frv/tls-relax-initial-shared-2.d: New.
* ld-frv/tls-relax-pie-1.d: New.
* ld-frv/tls-relax-shared-1.d: New.
* ld-frv/tls-relax-shared-2.d: New.
* ld-frv/tls-relax-static-1.d: New.
* ld-frv/tls-shared-1-fail.d: New.
* ld-frv/tls-shared-1.d: New.
* ld-frv/tls-shared-2.d: New.
* ld-frv/tls-static-1.d: New.
* ld-frv/tls.exp: New.
* ld-frv/fdpic-pie-1.d: Adjust for 64-bit host.
* ld-frv/fdpic-pie-2.d: Likewise.
* ld-frv/fdpic-pie-6.d: Likewise.
* ld-frv/fdpic-pie-7.d: Likewise.
* ld-frv/fdpic-pie-8.d: Likewise.
* ld-frv/fdpic-shared-1.d: Likewise.
* ld-frv/fdpic-shared-2.d: Likewise.
* ld-frv/fdpic-shared-3.d: Likewise.
* ld-frv/fdpic-shared-4.d: Likewise.
* ld-frv/fdpic-shared-5.d: Likewise.
* ld-frv/fdpic-shared-6.d: Likewise.
* ld-frv/fdpic-shared-7.d: Likewise.
* ld-frv/fdpic-shared-8.d: Likewise.
* ld-frv/fdpic-shared-local-2.d: Likewise.
* ld-frv/fdpic-shared-local-8.d: Likewise.
* ld-frv/fdpic-static-1.d: Likewise.
* ld-frv/fdpic-static-2.d: Likewise.
* ld-frv/fdpic-static-6.d: Likewise.
* ld-frv/fdpic-static-7.d: Likewise.
* ld-frv/fdpic-static-8.d: Likewise.
opcodes/ChangeLog:
2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
* frv-asm.c: Rebuilt.
* frv-desc.c: Rebuilt.
* frv-desc.h: Rebuilt.
* frv-dis.c: Rebuilt.
* frv-ibld.c: Rebuilt.
* frv-opc.c: Rebuilt.
* frv-opc.h: Rebuilt.
2005-01-25 20:22:41 +00:00
Alan Modra 8615f3f213 bfd/
* elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
	loadable reloc sections.
	(_bfd_elf_canonicalize_dynamic_reloc): Likewise.
	(_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
binutils/
	* nm.c (display_rel_file): Read dynamic syms before calling
	bfd_get_synthetic_symtab.
2005-01-25 10:33:55 +00:00
Alan Modra 7e9f086769 bfd/
* elflink.c (elf_link_add_object_symbols): Don't create link dynamic
	sections immediately when linking shared libs.  Instead, wait until
	we know a lib is needed.
	(_bfd_elf_link_create_dynstrtab): Extract from..
	(_bfd_elf_link_create_dynamic_sections_): ..here.
	(elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
	_bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
	for non-existent .dynamic.
	(elf_link_output_extsym): Don't complain about undefined symbols
	in as-needed dynamic libs that aren't actually linked.
ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
	(gld${EMULATION_NAME}_after_open): Ignore needed libs if they were
	only needed by an as-needed lib that didn't get linked.
2005-01-25 01:40:04 +00:00
Alan Modra 147db43d38 daily update 2005-01-24 23:00:07 +00:00
Andrew Cagney 45181ed16d 2005-01-24 Andrew Cagney <cagney@gnu.org>
* gettext.m4: Only fall back to ../intl/ when it's present.
2005-01-24 20:01:09 +00:00
Alan Modra 7cf2451106 daily update 2005-01-23 23:00:06 +00:00
Alan Modra a6f6220f01 daily update 2005-01-22 23:00:05 +00:00
Alan Modra 5f0715770b daily update 2005-01-21 23:00:11 +00:00
Ben Elliston 753e3eb6f2 * aout-encap.c: Remove unused file. 2005-01-21 03:27:53 +00:00
Alan Modra 9a12353f39 daily update 2005-01-20 23:00:05 +00:00
Alan Modra b4f61ddf3a daily update 2005-01-19 23:00:05 +00:00
H.J. Lu 1c16dfa5fd 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
PR 679
	* elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
	non-function symbols are local.
	(_bfd_elf_symbol_refs_local_p): Likewise.
2005-01-19 16:15:11 +00:00
Alan Modra b16a311506 daily update 2005-01-18 23:00:07 +00:00
Alan Modra 1449d79bae bfd/
* bfd.c (bfd_link_just_syms): Add abfd param.
	* bfd-in2.h: Regenerate.
ld/
	* ldlang.c (section_already_linked): Adjust bfd_link_just_syms call.
	(lang_place_orphans): Don't abort on just_syms_flag, instead call
	bfd_link_just_syms.
2005-01-18 08:51:54 +00:00
Alan Modra f2ea2a2251 daily update 2005-01-17 23:00:08 +00:00
Richard Sandiford dcf507a6ee * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
(_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
	instructions.  If the amount of padding is known, reduce the size
	of the CIE or FDE by that amount.
2005-01-17 17:44:41 +00:00
Richard Sandiford 2c42be6506 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
augmentation_size.  Use bfd_signed_vmas for data_align.
	* elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
	(read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
	functions.  Don't read past the end of the enclosing CIE or FDE.
	(skip_bytes): New utility function.
	(_bfd_elf_discard_section_eh_frame): Use new functions, adding more
	sanity checking.
	(_bfd_elf_write_section_eh_frame): Use new functions.
2005-01-17 17:41:47 +00:00
Richard Sandiford acfe556796 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
assert-style REQUIRE() macro to handle sanity checks.
2005-01-17 17:39:27 +00:00
H.J. Lu c0c28ab8b2 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
* dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
	(comp_unit): Here.
	(read_unsigned_leb128): Removed.
	(read_signed_leb128): Removed.
	(find_abstract_instance_name): Updated.
	(parse_comp_unit): Accept info_ptr_unit.
	(_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
	comp unit and pass it to parse_comp_unit.

	* elf-eh-frame.c (read_unsigned_leb128): Moved to ...
	(read_signed_leb128): Moved to ...
	* libbfd.c: Here.

	* libbfd-in.h (read_unsigned_leb128): New prototype.
	(read_signed_leb128): Likewise.
	* libbfd.h: Regenerated.
2005-01-17 17:12:00 +00:00
Nick Clifton e38bc3b524 Fix SH2A machine variants in order to correctly select instruction inheritance 2005-01-17 14:08:17 +00:00
Alan Modra d7ebd26642 daily update 2005-01-16 23:00:05 +00:00
Alan Modra 5bd605a683 daily update 2005-01-15 23:00:06 +00:00
Andrew Cagney 8fb84ecc44 2005-01-15 Andrew Cagney <cagney@gnu.org>
* bfd.m4: New file.
	* acinclude.m4: Move BFD_NEED_DECLARATION,
	BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
	the new file bfd.m4.  Include ../bfd/bfd.m4.
	* configure: Re-generate.
2005-01-15 19:14:54 +00:00
Alan Modra f304d6ec50 daily update 2005-01-14 23:00:06 +00:00
Alan Modra e5f80da454 daily update 2005-01-13 23:00:05 +00:00
Alan Modra 310368cbdf daily update 2005-01-12 23:00:05 +00:00
Alan Modra b4a38de6b6 include/elf/
* ppc.h (R_PPC_RELAX32_PLT, R_PPC_RELAX32PC_PLT): Define.
	(R_PPC_RELAX32, R_PPC_RELAX32PC): Adjust value.
bfd/
	* elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
	(ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
	reaching PLT.
	(ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
	R_PPC_RELAX32PC_PLT.
2005-01-12 11:28:28 +00:00
Alan Modra 917e110241 daily update 2005-01-11 23:00:06 +00:00
Alan Modra 3eb128b2a5 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
symbols.
	* elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
	* elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
	* elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
	* elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
	* elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
	* elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
	* elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
	* elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
	* elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
	* elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
	* elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
	* elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2005-01-11 09:32:53 +00:00
Alan Modra 264a1fe053 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
.dynsbss flags.
2005-01-11 08:30:35 +00:00
Alan Modra 96d24e6d62 daily update 2005-01-10 23:00:06 +00:00
Nick Clifton 5c4504f7c5 Add support for maxq10 and maxq20 machine values 2005-01-10 16:33:51 +00:00
Eric Botcazou 669460c7e6 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt
	for regular symbols neither defined nor referenced in shared objects.
2005-01-10 11:23:01 +00:00
Alan Modra f7b8d4d00a daily update 2005-01-09 23:00:05 +00:00
Eric Botcazou 01aac484a6 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
to zero the structure.
	(create_got_section): Use BFD_ASSERT instead of abort.
2005-01-09 19:49:22 +00:00
Eric Botcazou a51a7930ba * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
'srelgot' fields.
	(create_got_section): New function.
	(sparc64_elf_create_dynamic_sections): Likewise.
	(sparc64_elf_check_relocs): Invoke create_got_section instead of
	_bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
	(sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
	(sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
	(sparc64_elf_finish_dynamic_symbol): Likewise.
	(sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
	(elf_backend_create_dynamic_sections): Define to
	sparc64_elf_create_dynamic_sections.
2005-01-09 19:48:28 +00:00
Eric Botcazou 151e5294b9 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
(elf_backend_omit_section_dynsym): Define to it.
	* elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
	(elf_backend_omit_section_dynsym): Define to it.
2005-01-09 09:26:55 +00:00
Alan Modra a5e16994ff daily update 2005-01-08 23:00:05 +00:00
Alan Modra 5110786067 daily update 2005-01-07 23:00:05 +00:00
Jakub Jelinek 6f79b21913 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
PT_DYNAMIC segment, unless .dynamic.
2005-01-07 09:52:00 +00:00
Alan Modra d89a8790cd daily update 2005-01-06 23:00:07 +00:00
Paul Brook 4e7fd91e3e 2005-01-06 Paul Brook <paul@codesourcery.com>
bfd/
	* config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
	* configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
	* configure: Regenerate.
	* elf32-arm.c: Add VxWorks target bfd.
	(USE_REL): Remove.
	(elf32_arm_link_hash_table): Add use_rel.
	(elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
	elf32_arm_relocate_section): Replace USE_REL with runtime check.
	Correct offset calculation for RELA case.
	(elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
	elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
	(elf32_arm_vxworks_link_hash_table_create): New function.
	* targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
	(bfd_elf32_littlearm_vxworks_vec): Ditto.
	(_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
gas/
	* config/tc-arm.c (FPU_DEFAULT): Define for TE_VXWORKS.
	(md_begin): Handle TE_VXWORKS for FP defaults.
	(md_apply_fix3): Correct rela offsets.
	(elf32_arm_target_format): Add VxWorks targets.
ld/
	* Makefie.am: Add earmelf_vxworks.
	* Makefile.in: Regenerate.
	* configure.tgt: Make arm-*-vxworks a separate case.
	* emulparams/armelf_vxworks.sh: New function.
2005-01-06 16:18:25 +00:00
Alan Modra 4c52953f84 bfd/
* elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
	multi_toc_needed.
	(has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
	(ppc64_elf_check_relocs): Update references to has_gp_reloc.
	(ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
	(ppc64_elf_next_toc_section): Heed no_multi_toc.
	(ppc64_elf_reinit_toc): Set multi_toc_needed.
	(toc_adjusting_stub_needed): Rewrite.
	(ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
	toc tests.  Adjust for toc_adjusting_stub_needed changes.
	(ppc64_elf_size_stubs): Update references to has_gp_reloc.
	* elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
	* section.c: Expand comment on backend bits.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
ld/
	* emultempl/ppc64elf.em (no_multi_toc): New var.
	(gld${EMULATION_NAME}_finish): Pass to ppc64_elf_setup_section_lists.
	(OPTION_NO_MULTI_TOC): Define.
	(PARSE_AND_LIST_LONGOPTS): Add --no-multi-toc support.
	(PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
2005-01-06 09:03:56 +00:00
Alan Modra f03d65b413 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
toc adjusting stub, do not test source section flags.
2005-01-06 08:41:05 +00:00
Alan Modra 36a969794b daily update 2005-01-05 23:00:05 +00:00
Eric Botcazou 8af139b3f9 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
from STABS debugging sections again.
2005-01-05 15:24:56 +00:00
Fred Fish 06f22d7e75 Approved by nickc@redhat.com:
2005-01-05  Fred Fish  <fnf@specifixinc.com>
	* dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
	(find_abstract_instance_name): New function.
	(scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
	(scan_unit_for_functions): Handle DW_AT_abstract_origin.
	(_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2005-01-05 10:37:05 +00:00
Alan Modra 80837d18f6 daily update 2005-01-04 23:00:05 +00:00
Alan Modra f8c6763531 daily update 2005-01-03 23:00:05 +00:00
Alan Modra cbe32a9d91 daily update 2005-01-02 23:00:05 +00:00
Alan Modra 0161d54a92 daily update 2005-01-01 23:00:06 +00:00
Alan Modra 54884041fe daily update 2004-12-31 23:00:05 +00:00
Paul Brook 83a358aab6 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo. 2004-12-31 16:22:25 +00:00
Alan Modra b996922c85 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
Commit missing changes from 2004-12-22.
	* bfd-in2.h: Regenerate.
2004-12-31 00:43:58 +00:00
Alan Modra 69658edde8 daily update 2004-12-30 23:00:04 +00:00
Alan Modra dc11a40137 daily update 2004-12-29 23:00:38 +00:00
Alan Modra f67758b303 daily update 2004-12-28 23:00:05 +00:00
Alan Modra 90c81d816f daily update 2004-12-27 23:00:05 +00:00
Alan Modra 3a3f751dac daily update 2004-12-26 23:00:05 +00:00
Alan Modra 5c447fb8ff daily update 2004-12-25 23:00:05 +00:00
Alan Modra 40c00f3da0 daily update 2004-12-24 23:00:08 +00:00
Alan Modra 2c0667804a daily update 2004-12-23 23:00:05 +00:00
Tomer Levi 17a8343285 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
* elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2004-12-23 13:48:25 +00:00
Alan Modra 0c4b2fab0b daily update 2004-12-22 23:00:05 +00:00
Kris Warkentin d69f560c9e * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
Add 'base' argument for constructing register sections.  Reformat.
(elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
gp and fp regs.  Reformat.
2004-12-22 14:43:44 +00:00
Nick Clifton 750bce0ee1 Add support for the new R_AVR_LDI, R_AVR_6 and R_AVR_6_ADIW relocs for the
LDI, ADIW/SBIW and LDD/STD instructions.
2004-12-22 14:25:42 +00:00
Alan Modra a5db907e36 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
as-needed dynamic libs as undefined.
	(elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
	libs when finding they are needed.
2004-12-22 03:59:26 +00:00
Alan Modra a42599b6fa daily update 2004-12-21 23:00:06 +00:00
Alan Modra ab102f4afe daily update 2004-12-20 23:00:06 +00:00
Ian Lance Taylor d639b1c345 * Makefile.am: Use $(SHELL) whenever we run move-if-change.
* Makefile.in: Rebuild.
2004-12-20 21:22:33 +00:00
Alan Modra 8860955fbe * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
(opd_entry_value): Use opd_relocs if available.
	(ppc64_elf_relocate_section): Don't set reloc_done.  Instead
	copy .opd relocations to opd_relocs.
	(ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2004-12-19 23:24:46 +00:00
Alan Modra 22b476cb5a daily update 2004-12-19 23:00:05 +00:00
Alan Modra ec00c00c75 daily update 2004-12-18 23:00:11 +00:00
Alan Modra 062c0f611f daily update 2004-12-17 23:00:05 +00:00
Alan Modra a4789f3bdb daily update 2004-12-16 23:00:05 +00:00
Richard Sandiford 1e50d24d55 include/elf/
* v850.h (R_V850_LO16_SPLIT_OFFSET): New reloc.

bfd/
	* reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
	* elf32-v850.c (v850_elf_howto_table): Add entry for
	R_V850_LO16_SPLIT_OFFSET.
	(v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
	(v850_elf_perform_lo16_relocation): New function, extracted from...
	(v850_elf_perform_relocation): ...here.  Use it to handle
	R_V850_LO16_SPLIT_OFFSET.
	(v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
	R_V850_LO16_SPLIT_OFFSET.
	* libbfd.h, bfd-in2.h: Regenerate.

gas/
	* config/tc-v850.c (handle_lo16): New function.
	(v850_reloc_prefix): Use it to check lo().
	(md_assemble, md_apply_fix3): Handle BFD_RELOC_V850_LO16_SPLIT_OFFSET.

gas/testsuite/
	* gas/v850/split-lo16.{s,d}: New test.
	* gas/v850/v850.exp: Run it.

ld/testsuite/
	* ld-v850: New directory.
2004-12-16 16:56:04 +00:00
Nick Clifton 2fbd2a87e2 Add support for s390x-ibm-tpf target 2004-12-16 16:02:59 +00:00
Alan Modra d7c68bf6b4 daily update 2004-12-15 23:00:13 +00:00
Alan Modra 86b894a3cb daily update 2004-12-14 23:00:06 +00:00
Tomer Levi 063027706a 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
* elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
	to prototype, to make hash info available.
	Prevent wrapped symbols from being adjusted twice.
2004-12-14 15:38:04 +00:00
Tomer Levi e3f9830cf4 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
* elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *' to prototype, to make hash info available.
	Prevent wrapped symbols from being adjusted twice.
2004-12-14 15:36:23 +00:00
Richard Sandiford c314987d19 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
overflow for calls to undefined weak symbols.
2004-12-14 09:48:20 +00:00
Alan Modra 8f0506a226 daily update 2004-12-13 23:00:05 +00:00
Alan Modra 779de648d7 daily update 2004-12-12 23:00:04 +00:00
Alan Modra 17a53e46b0 daily update 2004-12-11 23:00:04 +00:00
Alan Modra 5c799c0790 bfd/
* elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
	canonical sections syms have a name.

gas/testsuite/
	Update for changed section syms.

ld/testsuite/
	Update for changed section syms.
2004-12-11 04:32:37 +00:00
Alan Modra 645ea6a951 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
have been adjusted for output.
	(ppc64_elf_relocate_section): Mark sections with reloc_done.
2004-12-11 03:56:43 +00:00
Alan Modra d6d9b1bd36 daily update 2004-12-10 23:00:05 +00:00
Alan Modra be8dd2ca9e * elf.c (bfd_elf_sym_name): Add symtab_hdr param.
(group_signature): Update call.
	* elf-bfd.h (bfd_elf_sym_name): Update.
	* elf32-ppc.c (ppc_elf_relocate_section): Update.
	* elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc)
	(ppc64_elf_relocate_section): Update
	* elflink.c (elf_link_input_bfd): Update.
2004-12-10 14:04:58 +00:00
Alan Modra 0e2cfdce25 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name.
(group_signature): Update calls.
	* elf-bfd.h (bfd_elf_sym_name): Update.
	* elf32-ppc.c (ppc_elf_relocate_section): Update.
	* elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc)
	(ppc64_elf_relocate_section): Update
	* elflink.c (elf_link_input_bfd): Update.
2004-12-10 13:18:40 +00:00
Jakub Jelinek 138f35cc73 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
st_shndx on STT_SECTION sections.
2004-12-10 13:08:03 +00:00
Alan Modra dc9298fc70 daily update 2004-12-09 23:00:24 +00:00
Daniel Jacobowitz f9cfae629f * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
ELF section symbols.
2004-12-09 16:17:42 +00:00
Ian Lance Taylor 1367d393bb * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
return a real value, unless it is a PLT symbol.
	(mips_elf_perform_relocation): On the RM9000, turn a jal into a
	bal if possible.
2004-12-09 07:12:28 +00:00
Ian Lance Taylor 74f79d8d75 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
R_MIPS_JALR entry to 0.
2004-12-09 06:32:41 +00:00
Ian Lance Taylor 0d2e43ed77 * archures.c: Define bfd_mach_mips9000.
* elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
	(mips_set_isa_flags): Handle bfd_mach_mips9000.
	* cpu-mips.c (I_mips9000): Define.
	(arch_info_struct): Add case for bfd_mach_mips9000.
	* aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
	* bfd-in2.h: Regenerate.
2004-12-09 06:08:45 +00:00
Alan Modra a81bcc1045 daily update 2004-12-08 23:00:05 +00:00
Ian Lance Taylor 728b2f2114 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
overflow.
2004-12-08 20:27:50 +00:00
Alan Modra 18b05eb7a5 daily update 2004-12-07 23:00:05 +00:00
Ben Elliston 45ab555df7 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned. 2004-12-07 10:53:44 +00:00
Daniel Jacobowitz 1511ddaff3 Suggested by Fergal Daly <fergal@esatclear.ie>:
* simple.c (simple_dummy_multiple_definition): New function.
	(bfd_simple_get_relocated_section_contents): Use it.
2004-12-07 04:37:56 +00:00
Alan Modra 5f1b1ee7b0 daily update 2004-12-06 23:00:05 +00:00
Alan Modra 41e7f70474 daily update 2004-12-05 23:00:04 +00:00
Alan Modra bb97b34f6a daily update 2004-12-04 23:00:07 +00:00
Alan Modra 7785b0982a daily update 2004-12-03 23:00:06 +00:00
Jan Beulich 5742623224 bfd/
2004-12-03 Jan Beulich  <jbeulich@novell.com>

	* elf.c (elf_find_function): Don't use the last file symbol ever,
	seen, but the last one seen prior to the symbol being reported.
	Don't report a filename at all for global symbols when that might
	be ambiguous/wrong.
2004-12-03 13:59:36 +00:00
Alan Modra febeb2918c daily update 2004-12-02 23:00:05 +00:00
Paul Brook 94a3258fc5 2004-12-01 Paul Brook <paul@codesourcery.com>
* elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
	(elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
	version.
2004-12-02 15:05:34 +00:00
Paul Brook 529fcb9585 2004-12-01 Paul Brook <paul@codesourcery.com>
bfd/
	* elflink.c (elf_link_add_object_symbols): Make symbols from discarded
	sections undefined.
ld/testsuite/
	* ld-elf/group1.d: New test.
	* ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.
2004-12-01 23:23:12 +00:00
Alan Modra 24b4912d64 daily update 2004-12-01 23:00:09 +00:00
Alan Modra b3f8a860a3 daily update 2004-11-30 23:00:05 +00:00
Paul Brook dea514f51d 2004-11-30 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (struct elf32_arm_link_hash_table): Remove
	no_pipeline_knowledge
	(elf32_arm_link_hash_table_create): Ditto.
	(bfd_elf32_arm_process_before_allocation): Ditto.
	(elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
	handling.
	* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
	prototype.
	* bfd-in2.h: Regenerate.
ld/
	* emultempl/armelf.em: Ignore -p and -no-pipeline-knowledge.
2004-11-30 17:45:54 +00:00
Alan Modra edfc032f0a * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
(elf32_hppa_grok_psinfo): New function.
	(elf_backend_grok_prstatus): Define.
	(elf_backend_grok_psinfo): Define.
2004-11-30 00:50:36 +00:00
Alan Modra 962a81e9fd daily update 2004-11-29 23:00:05 +00:00
Alan Modra e29360381b daily update 2004-11-28 23:00:05 +00:00
Alan Modra 27bd6ae644 daily update 2004-11-27 23:00:45 +00:00
Alan Modra 96ef073b45 daily update 2004-11-26 23:00:09 +00:00
Alan Modra 8126954ae3 daily update 2004-11-25 23:00:05 +00:00
H.J. Lu 0be9069d28 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
PR 574:
	* elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2004-11-25 02:14:10 +00:00
Paul Brook 47cc2cf519 2004-11-24 Paul Brook <paul@codesourcery.com>
bfd/
	* elf.c (assign_section_numbers): Number SHT_GROUP sections first.
gas/testsuite/
	* gas/elf/group0a.d: Adjust expected secion ordering.
	* gas/elf/group1a.d: Ditto.
	* gas/elf/section4.d: Ditto.
2004-11-25 00:56:00 +00:00
Alan Modra 33a516e0ce daily update 2004-11-24 23:00:09 +00:00
Paul Brook 0beaef2b05 2004-11-24 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c (elf32_arm_swap_symbol_in): New function.
	(elf32_arm_swap_symbol_out): New function.
	(elf32_arm_size_info): Add.
	(elf_backend_size_info): Define.
ld/testsuite/
	* ld-arm/mixed-lib.sym: Update for THUMB_FUNC change.
2004-11-24 14:44:47 +00:00
Alan Modra a32da378e3 daily update 2004-11-23 23:00:07 +00:00
Alan Modra 054a261226 daily update 2004-11-22 23:00:06 +00:00
Alan Modra 8f27efac6b daily update 2004-11-21 23:00:07 +00:00
Alan Modra 77ee03ac8e daily update 2004-11-20 23:00:05 +00:00
Dave Anglin 3dd2fcf06b * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
make_bfd_asection.
2004-11-20 16:54:15 +00:00
Alan Modra 60575ce718 daily update 2004-11-19 23:00:08 +00:00
Alan Modra de52dba4ab * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
* elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
	* nlmcode.h (nlm_write_object_contents): Warning fix.
2004-11-19 11:58:02 +00:00
Bob Wilson 288f74fae9 * elf32-xtensa.c (ebb_propose_action): Fix argument order. 2004-11-19 00:28:58 +00:00
Alan Modra 36ed297bac daily update 2004-11-18 23:00:06 +00:00
Alan Modra 4a709ceef9 daily update 2004-11-17 23:00:07 +00:00
Daniel Jacobowitz b7693d0213 bfd/
* elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
	(elf32_arm_plt_thumb_stub): New.
	(struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
	and plt_got_offset.
	(elf32_arm_link_hash_traverse): Fix typo.
	(elf32_arm_link_hash_table): Add obfd.
	(elf32_arm_link_hash_newfunc): Initialize new fields.
	(elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
	(elf32_arm_link_hash_table_create): Initialize obfd.
	(record_arm_to_thumb_glue): Mark the glue as a local ARM function.
	(record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
	(bfd_elf32_arm_get_bfd_for_interworking): Verify that the
	interworking BFD is not dynamic.
	(bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
	not emit glue for PLT references.
	(elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
	emit glue for PLT references.  Support the Thumb PLT prefix.
	(elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
	plt_thumb_refcount.
	(elf32_arm_check_relocs): Likewise.
	(elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
	plt_thumb_refcount.
	(allocate_dynrelocs): Handle Thumb PLT references.
	(elf32_arm_finish_dynamic_symbol): Likewise.
	(elf32_arm_symbol_processing): New function.
	(elf_backend_symbol_processing): Define.
opcodes/
	* arm-dis.c (WORD_ADDRESS): Define.
	(print_insn): Use it.  Correct big-endian end-of-section handling.
gas/testsuite/
	* gas/arm/mapping.d: Expect F markers for Thumb code.
	* gas/arm/unwind.d: Update big-endian pattern.
ld/
	* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
	a dynamic object for stubs.
ld/testsuite/
	* ld-arm/mixed-app.d, ld-arm/mixed-app.r, ld-arm/mixed-app.s,
	ld-arm/mixed-app.sym, ld-arm/mixed-lib.d, ld-arm/mixed-lib.r,
	ld-arm/mixed-lib.s, ld-arm/mixed-lib.sym, ld-arm/arm-dyn.ld,
	ld-arm/arm-lib.ld: New files.
	* ld-arm/arm-app-abs32.d, ld-arm/arm-app-abs32.r, ld-arm/arm-app.d,
	ld-arm/arm-app.r, ld-arm/arm-lib-plt32.d, ld-arm/arm-lib-plt32.r,
	ld-arm/arm-lib.d, ld-arm/arm-lib.r, ld-arm/arm-static-app.d,
	ld-arm/arm-static-app.r: Update for big-endian.
	* ld-arm/arm-elf.exp: Run the new tests.
2004-11-17 17:50:28 +00:00
Alan Modra 5a0a6f7a13 daily update 2004-11-16 23:00:07 +00:00
Richard Sandiford 353057a53c * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
add_fde_encoding.  Remove need_relative.
	* elf-eh-frame.c (extra_augmentation_string_bytes)
	(extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
	(_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
	in cases where the CIE has no existing 'R' augmentation.  Use
	size_of_output_cie_fde when assigning offsets.  Use the final offset
	as the new section size.
	(_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
	Account for any extra augmentation bytes in the returned offset.
	(_bfd_elf_write_section_eh_frame): Rework so that the entries are
	moved before being modified.  Pad growing entries with DW_CFA_nops.
	Add 'z' and 'R' augmentations as directed by add_augmentation_size
	and add_fde_encoding.
2004-11-16 10:16:30 +00:00
Mark Mitchell b32d3aa2a0 * elf32-arm.c (elf32_arm_relocate_section): Use
arm_real_reloc_type.
2004-11-16 10:08:00 +00:00
Richard Sandiford 5d41f0b6e5 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
for discard relocations; don't add an R_MIPS_NONE to the main body
	of .rel.dyn.
2004-11-16 09:54:10 +00:00
Paul Brook fc0e6df64d bfd/
* elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
	* elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
	(_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
	default version definition for unversioned symbols.
	* elfcode.h (elf_slurp_symbol_table): Pass extra argument.
	* elflink.c (elf_link_add_object_symbols): Pass extra argument to
	_bfd_elf_slurp_version_tables.  Set default version for unversioned
	imported symbols.
include/
	* bfdlink.h (bfd_link_info): Add default_imported_symver.
ld/
	* ld.texinfo: Document --default-imported-symver.
	* ldmain.c (main): Set link_info.default_imported_symver.
	* lexsup.c (option_values): Add OPTION_DEFAULT_IMPORTED_SYMVER.
	(ld_options): Add --default-imported-symver.
	(parse_args): Handle OPTION_DEFAULT_IMPORTED_SYMVER.
2004-11-15 23:21:27 +00:00
Alan Modra 2e8d14f482 daily update 2004-11-15 23:00:07 +00:00
Paul Brook b23e50e23e * elflink.c (elf_link_add_object_symbols): Don't assume version
indices are consecutive.
2004-11-15 12:39:01 +00:00
Richard Sandiford f4a6705cf8 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
composite relocations against the personality data.
2004-11-15 09:09:13 +00:00
Alan Modra c87cb54921 daily update 2004-11-14 23:00:04 +00:00
Alan Modra 603e93b5b7 daily update 2004-11-13 23:00:05 +00:00
Paul Brook ee06dc0791 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
R_ARM_PREL31 relocations to PLT entries.
	(elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
	(elf32_arm_check_relocs): Ditto.
2004-11-13 13:38:15 +00:00
Alan Modra 1a0360db88 daily update 2004-11-12 23:00:05 +00:00
Bob Wilson a1ace8d858 2004-11-12 Bob Wilson <bob.wilson@acm.org>
include/ChangeLog
	* xtensa-isa-internal.h (xtensa_interface_internal): Add class_id.
	* xtensa-isa.h (xtensa_interface_class_id): New prototype.

bfd/ChangeLog
	* xtensa-isa.c (xtensa_interface_class_id): New.

gas/ChangeLog
	* config/tc-xtensa.c (finish_vinsn): Clear pending instruction if
	there is a conflict.
	(check_t1_t2_reads_and_writes): Check for both reads and writes to
	interfaces that are related as determined by xtensa_interface_class_id.
2004-11-12 21:59:13 +00:00
Bob Wilson e411546021 * elf32-xtensa.c (property_table_compare): Remove assertion about
entries with the same address and non-zero size.
	(xtensa_read_table_entries): Report such entries as errors.
2004-11-11 23:09:24 +00:00
Alan Modra a9516b1d5e daily update 2004-11-11 23:00:05 +00:00
Mark Mitchell 6366ff1ead * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
R_ARM_RELATIVE on Symbian OS.
2004-11-11 18:24:24 +00:00
Alan Modra 6df114aef5 daily update 2004-11-10 23:00:06 +00:00
Alan Modra 194c914474 daily update 2004-11-09 23:00:06 +00:00
Mark Mitchell e6dc21b695 * som.c (som_bfd_print_private_bfd_data): New function.
(som_object_setup): Save the auxiliary header.  Don't assume that
	zero is an invalid entry point for a shared library.
	(som_object_p): Allocate the auxiliary header on the heap.
2004-11-09 17:40:22 +00:00
Mark Mitchell b34af79cca * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
declaration.
	(elf32_arm_symbian_modify_segment_map): Likewise.
2004-11-09 16:50:38 +00:00
Daniel Jacobowitz 08d1f311bf From David Poole <daveml@mbuf.com>:
* elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
	(elf32_arm_size_dynamic_sections): Call it.
2004-11-09 16:44:31 +00:00
Alan Modra 0306b3bf8d * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
(ALL_MACHINES_CFILES): Fix typo.
	* Makefile.in: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
2004-11-09 13:29:16 +00:00
Alan Modra e325f4b4df daily update 2004-11-08 23:00:08 +00:00
Mark Mitchell a16385dc25 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
R_ARM_RELATIVE relocation for Symbian OS, mention the section
	symbol in the relocation.
2004-11-08 22:08:07 +00:00
Nick Clifton 7499d566bb Add support fpr MAXQ processor 2004-11-08 13:17:43 +00:00
Nick Clifton 0c429e0711 oops - omitted fom previous delta 2004-11-08 08:51:47 +00:00
Nick Clifton 977cdf5aa7 Fix support for PECOFF weak symbols 2004-11-08 08:12:53 +00:00
Alan Modra 5f7836ba7e daily update 2004-11-07 23:00:05 +00:00
Andreas Schwab 9dfe873851 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
SYMBOL_CALLS_LOCAL and check for undefweak symbols with
	non-default visibility.
2004-11-07 10:51:45 +00:00
Alan Modra 0576292809 daily update 2004-11-06 23:00:05 +00:00
Alan Modra 290085aeab daily update 2004-11-05 23:00:07 +00:00
Alan Modra 156d775fb2 daily update 2004-11-04 23:00:04 +00:00
Mark Mitchell c3c766200a * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
D_PAGED.
	(elf32_arm_symbian_modify_segment_map): Don't
	reset includes_filehdr and includes_phdrs here.
2004-11-04 18:57:34 +00:00
Daniel Jacobowitz 7f266840a2 ./
* configure.in (arm-*-oabi*, thumb-*-oabi*): Remove.
	* configure: Regenerated.
bfd/
	* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
	elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
	(elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
	dependency.
	* config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
	to a new removed list.  Remove normal configuration stanzas.
	* configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
	(bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
	elfarm-nabi.lo with elf32-arm.lo.
	(bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
	* elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
	* elf32-arm.h: Remove.
	* elfarm-oabi.c: Remove.
	* targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
	and bfd_elf32_littlearm_oabi_vec.
	* aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
gas/
	* configure.in: Remove arm-*-oabi and thumb-*-oabi.
	* config/tc-arm.c (target_oabi): Delete.
	(md_apply_fix3, elf32_arm_target_format): Remove target_oabi checks.
	(arm_opts): Remove moabi.
	* doc/as.texinfo (Overview): Remove documentation of -moabi.
	* doc/c-arm.texi (ARM Options): Likewise.
	* configure: Regenerated.
ld/
	* Makefile.am (ALL_EMULATIONS): Remove earmelf_oabi.o.
	(earmelf_oabi.c): Remove rule.
	* configure.tgt: Remove arm-*-oabi and thumb-*-oabi.
	* emulparams/armelf_oabi.sh, emultempl/armelf_oabi.em: Delete files.
	* Makefile.in: Regenerated.
2004-11-04 15:54:50 +00:00
Hans-Peter Nilsson bac23f82ae * config.bfd: Support crisv32-*-* like cris-*-*.
* archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
	(bfd_mach_cris_v10_v32): New macros.
	* cpu-cris.c: Tweak formatting.
	(get_compatible): New function.
	(N): New macro.
	(bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
	bfd_arch_info_type:s.
	(bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
	get_compatible for member compatible and link bfd_cris_arch_v32 as
	next.
	* elf32-cris.c (cris_elf_pcrel_reloc)
	(cris_elf_set_mach_from_flags): New functions.
	(cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
	<R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
	(cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
	numbers for bfd_mach_cris_v32.
	(PLT_ENTRY_SIZE_V32): New macro.
	(elf_cris_plt0_entry): Drop last comma in initializer.
	(elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
	(elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
	PLT initializers.
	(cris_elf_relocate_section): Change all "%B(%A)" messages to
	"%B, section %A".
	(elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
	(elf_cris_finish_dynamic_sections): Similar.
	(elf_cris_adjust_dynamic_symbol): Similar.
	(cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
	section %A".
	<switch with PIC relocs>: Emit error and return FALSE for
	bfd_mach_cris_v10_v32.
	<case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
	Emit warning when generating textrel reloc.
	(cris_elf_object_p): Call cris_elf_set_mach_from_flags.
	(cris_elf_final_write_processing): Set flags according to mach.
	(cris_elf_print_private_bfd_data): Display
	EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
	(cris_elf_merge_private_bfd_data): Drop variables old_flags,
	new_flags.  Don't call cris_elf_final_write_processing.  Don't
	look at the actual elf header flags at all; use
	bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
	in bfd_get_mach for ibfd and obfd and handle merging of compatible
	objects.
	(bfd_elf32_bfd_copy_private_bfd_data): Define.
	* reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
	(BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
	(BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
	* bfd-in2.h, libbfd.h: Regenerate.
2004-11-04 14:58:13 +00:00
Alan Modra c5614fa460 bfd/
* elf64-ppc.h (ppc64_elf_edit_toc): Declare.
	* elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
	comment.
	(struct adjust_toc_info): New.
	(adjust_toc_syms, ppc64_elf_edit_toc): New functions.
ld/
	* emultempl/ppc64elf.em (no_tls_opt): Rename from notlsopt.
	(no_opd_opt, no_toc_opt): New static vars.
	(ppc_before_allocation): Don't edit opt if no_opd_opt.  Call
	ppc64_elf_edit_toc.
	(OPTION_NO_OPD_OPT, OPTION_NO_TOC_OPT): Define.
	(PARSE_AND_LIST_LONGOPTS): Add no-opd-optimize and no-toc-optimize.
	(PARSE_AND_LIST_OPTIONS): Describe new options.
	(PARSE_AND_LIST_ARGS_CASES): Handle them.
2004-11-04 11:55:13 +00:00
Bob Wilson 0ebdbb8312 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
if there are no segments.
2004-11-04 00:44:23 +00:00
Alan Modra 166ada5802 daily update 2004-11-03 23:00:07 +00:00
Alan Modra 8d09dc2fb0 daily update 2004-11-02 23:00:05 +00:00
Daniel Jacobowitz 675b2ace5d * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete. 2004-11-02 16:24:35 +00:00
Nick Clifton 58852c2769 Convert to ISO C90 2004-11-02 12:52:32 +00:00
Hans-Peter Nilsson 20288ed68a Correct last entry: s/SYMBOL/TABLE_/ 2004-11-02 05:51:13 +00:00
Hans-Peter Nilsson e6857c0cd5 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_SYMBOL. 2004-11-02 05:44:34 +00:00
Alan Modra a2425a5207 daily update 2004-11-01 23:00:05 +00:00
Alan Modra 305d843561 daily update 2004-10-31 23:00:05 +00:00
Alan Modra aeab9e265f daily update 2004-10-30 23:00:05 +00:00
Alan Modra 44b4bcc2c9 daily update 2004-10-30 00:00:06 +00:00
Alan Modra a6b63b08f5 daily update 2004-10-29 00:00:06 +00:00
H.J. Lu bf71845826 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
	undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
	R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2004-10-28 14:55:41 +00:00
Kaz Kojima 044ad7e3d7 * elf32-sh.c (tpoff): Take alignment into account. 2004-10-28 12:00:17 +00:00
Nick Clifton 0d48eab68d Fix spelling typo 2004-10-28 09:56:14 +00:00
Nick Clifton d5cb4bb8aa iq2000_elf_relocate_section): Do nothing when perfoming a relocatable link.
(iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only	for MIPS ports
  under Irix.
2004-10-28 09:53:44 +00:00
Alan Modra e5be0a72e1 daily update 2004-10-28 00:00:10 +00:00
Paul Brook 5b5bb74101 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
bfd/
	* elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
	R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
	(elf32_arm_final_link_relocate): Ditto.
	(arm_add_to_rel, elf32_arm_relocate_section): Ditto.
	(elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
	(elf32_arm_adjust_dynamic_symbol): Ditto.
	* elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
	R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
	(elf32_arm_r_howto): ... To here.
	(elf32_arm_howto_from_type): Use elf32_arm_r_howto.
include/
	* elf/arm.h: Add R_ARM_CALL and R_ARM_JUMP32.
2004-10-27 20:48:22 +00:00
H.J. Lu 97ecf3226d 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
PR 475
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
	R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
	and R_IA64_SECREL64LSB.
2004-10-27 00:46:05 +00:00
Alan Modra 6cb7e1ce46 daily update 2004-10-27 00:00:06 +00:00
Paul Brook 3e3b46e5c8 bfd/
* elflink.c (elf_finalize_dynstr): Skip shared aux structure.
	(bfd_elf_size_dynamic_sections): Create default version definition.
	(elf_link_output_extsym): Adjust for default symbol version.
include/
	* bfdlink.h (struct bfd_link_info): Add create_default_symver.
ld/
	* ld.texinfo: Document --default-symver.
	* ldmain.c (main): Set link_info.create_default_symver.
	* lexsup.c (enum option_values): Add OPTION_DEFAULT_SYMVER.
	(ld_options): Add default-symver.
	(parse_args): Handle OPTION_DEFAULT_SYMVER.
ld/testsuite/
	* ld-elfvers/vers.exp (build_binary): Add ldargs parameter.
	(build_vers_lib_pic_flags): New function.
	Add vers29 test.
	* ld-elfvers/vers29.c: New file.
	* ld-elfvers/vers29.dsym: New file.
	* ld-elfvers/vers29.ver: New file.
2004-10-26 13:46:05 +00:00
Alan Modra 1c24292617 daily update 2004-10-26 00:00:06 +00:00
Alan Modra b2a7b577d1 daily update 2004-10-25 00:00:05 +00:00
Hans-Peter Nilsson 278b46236c * mmo.c: Adjust to ISO C. 2004-10-24 22:50:43 +00:00
Hans-Peter Nilsson aa69fe43dd * mmo.c (mmo_write_section_description): New function broken out
of mmo_internal_write_section.
	(mmo_internal_write_section): For each of .text and .data, call
	mmo_write_section_description before outputting contents if it has
	nontrivially deducible vma or contents.
	(mmo_has_leading_or_trailing_zero_tetra_p): New function.
	(mmo_canonicalize_symtab): Adjust absolute symbols to .data
	symbols if found within the .data address range.
2004-10-24 21:40:36 +00:00
Daniel Jacobowitz ed0403211c * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY. 2004-10-24 18:45:38 +00:00
Hans-Peter Nilsson 830866afa5 * mmo.c (File Layout): Correct place of misplaced blurb about
special data.
2004-10-24 14:09:16 +00:00
Alan Modra 7153fe4e5f daily update 2004-10-24 00:00:06 +00:00
Mark Kettenis 5f417ca318 * config.bfd: Add mips64*-*-openbsd. 2004-10-23 12:23:15 +00:00
Alan Modra 95706ff588 daily update 2004-10-23 00:00:06 +00:00
Alan Modra 052d973636 daily update 2004-10-22 00:00:07 +00:00
Bob Wilson 823fc61f00 * elf32-xtensa.c (ebb_propose_action): Put declarations before
statements.
2004-10-21 16:29:11 +00:00
H.J. Lu 8697aafb0c 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
* configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
	* configure: Regenerate.
2004-10-21 15:32:41 +00:00
H.J. Lu dfeffb9fe1 bfd/
2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* aoutx.h (aout_link_input_section_std): Pass proper hash entry
	to linker reloc_overflow callback.
	(aout_link_input_section_ext): Likewise.
	(aout_link_reloc_link_order): Likewise.
	* coff-a29k.c (coff_a29k_relocate_section): Likewise.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
	Likewise.
	(alpha_relocate_section): Likewise.
	* coff-arm.c (coff_arm_relocate_section): Likewise.
	* coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
	* coff-h8500.c (extra_case): Likewise.
	* coff-i960.c (coff_i960_relocate_section): Likewise.
	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
	* coff-mips.c (mips_relocate_section): Likewise.
	* coff-or32.c (coff_or32_relocate_section): Likewise.
	* coff-ppc.c (coff_ppc_relocate_section): Likewise.
	* coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
	* coff-sh.c (sh_relocate_section): Likewise.
	* coff-tic80.c (coff_tic80_relocate_section): Likewise.
	* coff-w65.c (w65_reloc16_extra_cases): Likewise.
	* coff-z8k.c (extra_case): Likewise.
	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
	* cofflink.c (_bfd_coff_reloc_link_order): Likewise.
	(_bfd_coff_generic_relocate_section): Likewise.
	* ecoff.c (ecoff_reloc_link_order): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Likewise.
	* elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-crx.c (elf32_crx_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-frv.c (elf32_frv_relocate_section): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
	* elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf32-vax.c (elf_vax_relocate_section): Likewise.
	* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elflink.c (elf_reloc_link_order): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
	(_bfd_elf_mips_get_relocated_section_contents): Likewise.
	* linker.c (_bfd_generic_reloc_link_order): Likewise.
	* pdp11.c (pdp11_aout_link_input_section): Likewise.
	(aout_link_reloc_link_order): Likewise.
	* reloc.c (bfd_generic_get_relocated_section_contents):
	Likewise.
	* xcofflink.c (xcoff_reloc_link_order): Likewise.
	* simple.c (simple_dummy_reloc_overflow): Updated.

include/

2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* bfdlink.h (bfd_link_callbacks): Add a pointer to struct
	bfd_link_hash_entry to reloc_overflow.

ld/

2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR 463
	* ldmain.c (reloc_overflow): Accept a pointer to struct
	bfd_link_hash_entry. Report symbol location for relocation
	overflow.
2004-10-21 15:28:33 +00:00
Alan Modra a6b6b87b69 daily update 2004-10-21 00:00:07 +00:00
Andreas Schwab 1715e0e33e * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
(elf_backend_plt_sym_val): Define.
2004-10-20 21:29:45 +00:00
Danny Smith db3d41a858 * config.bfd: Set targ_underscore=yes for PE COFF targets. 2004-10-20 01:58:47 +00:00
Alan Modra 3d7e772352 daily update 2004-10-20 00:00:06 +00:00
Alan Modra 4b85d634bf * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
(ppc64_elf_edit_opd): Likewise.
2004-10-19 12:00:58 +00:00
Mark Mitchell 6df4d94c68 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
* elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
	set SEC_ALLOC and SEC_LOAD.
2004-10-19 06:02:46 +00:00
Alan Modra 1c5a9c8047 daily update 2004-10-19 00:00:05 +00:00
Nick Clifton 00d962d155 Compute 'name' for relocs against both local and global symbols. 2004-10-18 08:06:31 +00:00
Alan Modra 40d98813d0 daily update 2004-10-18 00:00:06 +00:00
Alan Modra e814958604 daily update 2004-10-17 00:00:06 +00:00
Daniel Jacobowitz b58f81aef6 bfd/
* bfd-in2.h: Regenerate.
	* bfd.c (struct bfd): Add no_export.
	* elflink.c (elf_link_add_object_symbols): Handle no_export.
ld/
	* ldlang.c (struct excluded_lib, excluded_libs, add_excluded_libs)
	(check_excluded_libs): New.
	(load_symbols): Call check_excluded_libs.
	* ldlang.h (add_excluded_libs): New prototype.
	* emultempl/elf32.em (OPTION_EXCLUDED_LIBS): Define.
	(gld${EMULATION_NAME}_add_options): Add --exclude-libs.
	(gld${EMULATION_NAME}_handle_option): Handle --exclude-libs.
	* ld.texinfo (Command Line Variables): Document --exclude-libs.
	(Options Specific to i386 PE Targets): Remove --exclude-libs.
ld/testsuite/
	* ld-elf/exclude1.s, ld-elf/exclude2.s, ld-elf/exclude.exp: New.
2004-10-16 18:13:54 +00:00
Alan Modra a872aebf0a daily update 2004-10-16 00:00:07 +00:00
Alan Modra 7d3f158fa8 * config.bfd: Whitespace cleanup.
* Makefile.am: Run "make dep-am"
	* Makefile.in: Regenerate.
2004-10-15 05:47:11 +00:00
Jakub Jelinek 6d2cd2108d * elflink.c (struct already_linked_section): Removed.
(try_match_symbols_in_sections, already_linked): Removed.
	(_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
	prefix of section names when finding already_linked_table
	chain.  Compare section names.  Instead of calling already_linked,
	do it inline and only for sections in the same already_linked_list.
2004-10-15 05:19:19 +00:00
Alan Modra e25e99ac83 daily update 2004-10-15 00:00:05 +00:00
Alan Modra 92e4ec35d9 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
parameter.  If called after _bfd_elf_write_section_eh_frame,
	don't allow a -2 return unless need_* bit is already set, and
	handle offsets adjusted for output_offset.
	* elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
	* elf.c (_bfd_elf_section_offset): Update call.
2004-10-14 23:38:08 +00:00
Alan Modra b411323258 daily update 2004-10-14 00:00:14 +00:00
H.J. Lu 7bf6dedeec 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
PR 440
	* coffcode.h (coff_compute_section_file_positions): Cast to
	bfd_vma when computing page alignment.
2004-10-13 18:14:40 +00:00
Mark Mitchell c0042f5da0 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.

	* scripttempl/armbpabi.sc: Do not put .gnu.version.* into a
	loadable segment.
2004-10-13 17:45:31 +00:00
Mark Mitchell 2a1b9a480a * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
relocations use a virtual address, not a section offset.
2004-10-13 03:09:28 +00:00
Alan Modra 05d073081f daily update 2004-10-13 00:00:06 +00:00
Bob Wilson b08b507153 bfd ChangeLog
* elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
	(narrow_instruction, widen_instruction): Remove unnecessary calls to
	xtensa_format_encode.
	(ebb_propose_action): Inline call to ebb_add_proposed_action.
	(ebb_add_proposed_action): Delete.

gas ChangeLog

	* config/tc-xtensa.c (xtensa_frequency_pseudo): Use set_subseg_freq.
	(is_entry_opcode, is_movi_opcode, is_the_loop_opcode, is_jx_opcode,
	is_windowed_return_opcode): Delete.
	(xtensa_frob_label): Use get_subseg_target_freq.
	(md_assemble): Inline call to is_entry_opcode.
	(xtensa_handle_align): Inline call to get_frag_is_literal.
	(relaxation_requirements): Inline call to is_jx_opcode.
	(emit_single_op): Inline call to is_movi_opcode.
	(xg_assemble_vliw_tokens): Inline calls to get_frag_is_insn,
	get_frag_is_no_transform, is_entry_opcode, and
	set_frag_is_specific_opcode.  Use get_subseg_total_freq.
	(xtensa_fix_a0_b_retw_frags, xtensa_fix_b_j_loop_end_frags,
	xtensa_fix_close_loop_end_frags, relax_frag_immed, convert_frag_immed):
	Inline calls to get_frag_is_no_transform.
	(next_instrs_are_b_retw): Inline call to is_windowed_return_opcode.
	(xtensa_fix_short_loop_frags): Inline calls to is_the_loop_opcode and
	get_frag_is_no_transform.
	(convert_frag_immed_finish_loop): Inline calls to get_expression_value
	and set_frag_is_no_transform.
	(get_expression_value): Delete.
	(subseg_map struct): Rename cur_total_freq to total_freq.  Rename
	cur_target_freq to target_freq.
	(get_subseg_info): Split out code to create a new map entry into ...
	(add_subseg_info): ... this new function.
	(get_last_insn_flags): Check if get_subseg_info succeeded.
	(set_last_insn_flags): Call add_subseg_info if needed.
	(get_subseg_total_freq, get_subseg_target_freq, set_subseg_freq): New.
	(xtensa_reorder_segments): Compute last_sec while counting sections.
	Remove call to get_last_sec.
	(get_last_sec): Delete.
	(cache_literal_section): Inline call to retrieve_literal_seg and its
	callees, seg_present and add_seg_list.
	(retrieve_literal_seg, seg_present, add_seg_list): Delete.
	(get_frag_is_insn, get_frag_is_no_transform,
	set_frag_is_specific_opcode, set_frag_is_no_transform): Delete.
	* config/tc-xtensa.h (MAX_SLOTS): Reduce from 31 to 15.
2004-10-12 23:05:32 +00:00
Bob Wilson 7fa3d080a2 bfd ChangeLog
* elf32-xtensa.c: Use ISO C90 formatting.

gas ChangeLog

	* config/tc-xtensa.c: Use ISO C90 formatting.
	* config/tc-xtensa.h: Likewise.
	* config/xtensa-istack.h: Likewise.
	* config/xtensa-relax.c: Likewise.
	* config/xtensa-relax.h: Likewise.

ld ChangeLog

	* emultempl/xtensaelf.em: Use ISO C90 formatting.

opcodes ChangeLog

	* xtensa-dis.c: Use ISO C90 formatting.
2004-10-12 18:33:17 +00:00
Paul Brook 3656d5e3c7 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
message.
2004-10-12 14:51:42 +00:00
Paul Brook 8cb5156692 2004-10-12 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.h: Support EABI version 4 objects.
binutils/
	* readelf.c (decode_ARM_machine_flags): Support EABI version 4.
gas/
	* config/tc-arm.c (md_begin): Change EF_ARM_EABI_VER3 to
	EF_ARM_EABI_VER4.
	(arm_eabis): Ditto.
	* doc/c-arm.texi: Document that we actually support -meabi=4, not
	-meabi=3.
include/
	* elf/arm.h (EF_ARM_EABI_VER4): Define.
2004-10-12 14:17:08 +00:00
Alan Modra 1abc85973a PR 325
* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
	Don't mark as default.
	(bfd_x86_64_arch): Don't mark as default.
2004-10-12 08:13:46 +00:00
Alan Modra 9e66c9426b * elflink.c (enum action_discarded): New.
(elf_section_complain_discarded): Delete.
	(elf_action_discarded): New function subsuming the above and also
	controlling reloc behaviour.
	(elf_link_input_bfd): Use it.
2004-10-12 02:27:53 +00:00
Alan Modra a4e749e942 daily update 2004-10-12 00:00:18 +00:00
Jakub Jelinek 7f1204bb4f * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
(special_sections): Add .gnu.liblist and .gnu.conflict.
	(assign_section_numbers): Handle SHT_GNU_LIBLIST.
2004-10-11 13:48:36 +00:00
Alan Modra 87e5235d04 PR 233
* elflink.c (elf_link_input_bfd): Try harder to support
	relocations against symbols in removed linkonce sections.
2004-10-11 13:29:01 +00:00
Alan Modra 029446c42d * elflink.c (elf_link_input_bfd): Revert PR 354 change. 2004-10-11 09:17:13 +00:00
Alan Modra 2ad770c380 PR 354
* elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
	sections do not reference symbols in non-SEC_ALLOC sections.
2004-10-11 04:54:27 +00:00
Alan Modra 1da212d6fb PR 437
* elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
	(_bfd_elf_link_omit_section_dynsym): Formatting.
2004-10-11 01:13:10 +00:00
Alan Modra ed7aa6d6f8 daily update 2004-10-11 00:00:06 +00:00
Alan Modra f12123c0d5 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
* libbfd.h: Regnerate.
	* elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
	* elf32-frv.c: Likewise.
	* elf32-m32r.c: Likewise.
	* elf32-ppc.c: Likewise.
	* elf64-hppa.c: Likewise.
	* elfxx-ia64.c: Likewise.
	* opncls.c: Likewise.
2004-10-10 13:58:05 +00:00
Alan Modra 3472e2e999 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
	offsets stored in struct eh_cie_fde entries before doing other
	work.
2004-10-10 13:02:01 +00:00
Alan Modra fda3ecf23f * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
(struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
	setting offsets for removed CIEs.  Don't set "sec", instead set
	cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
	CIE in hdr_info.  Only set make_relative and make_lsda_relative
	for CIEs.  Use pointers rather than array indices.
	(_bfd_elf_eh_frame_section_offset): Test/set make_relative,
	make_lsda_relative, need_* on cie_inf for FDEs.
	(_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
	section output_offset.  Delete cie_offset, instead use cie_inf
	pointer to CIE entry.  Use need_relative and need_lsda_relative on
	CIE entry for FDEs.  Use pointers rather than array indices.
2004-10-10 07:58:07 +00:00
Alan Modra 35f0d9373b daily update 2004-10-10 00:00:05 +00:00
Alan Modra 7db6994ff2 * coff-rs6000.c (rs6000coff_vec): Add initializer for
bfd_is_target_special_symbol.
	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
	* som.c (som_bfd_is_target_special_symbol): Define.
2004-10-09 02:51:31 +00:00