Paul Brook
6768797874
2005-02-11 Paul Brook <paul@codesourcery.com>
...
* elf-bfd.h (struct elf_link_hash_table): Add
is_relocatable_executable.
* elf.c (_bfd_elf_link_hash_table_init): Initialize it.
* elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
symbols in relocatable executables.
(bfd_elf_record_link_assignment): Create dynamic section symbols in
relocatable executables.
(_bfd_elf_link_renumber_dynsyms): Ditto.
(bfd_elf_final_link): Ditto.
* elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
relocations into relocatable executables.
(elf32_arm_check_relocs): Crate dynamic sections for relocatable
executables. Also copy absolute relocations.
(elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
in relocatable executables.
(allocate_dynrelocs): Copy relocations for relocatable executables.
Output dynamic symbols for symbols defined in linker scripts.
2005-02-11 16:41:09 +00:00
Paul Brook
e37c699c87
2005-02-10 Paul Brook <paul@codesourcery.com>
...
* elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2005-02-10 14:14:25 +00:00
Mark Mitchell
5cd3778de9
* elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
...
SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2005-01-31 17:50:20 +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
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
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
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
Paul Brook
83a358aab6
* elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2004-12-31 16:22:25 +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
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
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
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
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
Mark Mitchell
b32d3aa2a0
* elf32-arm.c (elf32_arm_relocate_section): Use
...
arm_real_reloc_type.
2004-11-16 10:08:00 +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
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
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
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
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
Catherine Moore
95c5070c6e
* Makefile.am (elf32-arm-oldabi.lo): New.
...
(elf32-arm-newabi.lo): New.
* Makefile.in: Regenerate.
* config.bfd (thumb-*-elf): Remove definition of targ_underscore.
(arm-*-elf): Likewise.
(arm-*-oabi): New.
(thumb-*-oabi): New.
* configure: Regenerate.
* configure.in (bfd_elf32_littlearm_oabi_vec): New.
(bfd_elf32_bigarm_oabi_vec): New.
* elf32-arm-newabi.c: New.
* elf32-arm-oldabi.c: New.
* elf32-arm.c: Removed.
* elf32-arm.h: New.
1999-02-01 20:21:00 +00:00
Catherine Moore
948beb4a24
* bfd-in.h: Add argument to elf_backend_get_symbol_type.
...
* bfd-in2.h: Rebuild.
* elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type.
* elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and
R_ARM_GNU_VTENTRY.
(elf32_arm_gc_mark_hook): New.
(elf32_arm_gc_sweep_hook): New.
(elf32_arm_check_relocs): New.
(elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY
relocations.
(elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
relocations.
1998-09-15 13:52:55 +00:00
Nick Clifton
a61c93863e
fix linker testsuite failure
1998-09-09 21:25:37 +00:00
Catherine Moore
bb3b4377a4
* Makefile.am: Add elf32-arm.c.
...
* Makefile.in: Rebuild.
* elf-bfd.h: Add elf_backend_get_symbol_type.
* elf.c (swap_out_syms): If defined, call
elf_backend_get_symbol_type.
* elf32-arm.c: Define elf_backend_get_symbol_type.
(elf32_arm_get_symbol-type): New routine.
(record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC.
(bfd_elf32_arm_process_before_allocation): Change to
check for STT_ARM_TFUNC.
(elf32_arm_final_link_relocate): Likewise.
* elfxx-target.h: Add elf_backend_get_symbol_type.
1998-08-31 15:50:04 +00:00
Nick Clifton
774852e913
Fix seg fault when displaying linker error message
1998-08-20 22:08:22 +00:00
Catherine Moore
2c3c46ad0c
* elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
...
elf32_arm_allocate_interworking_sections and
elf32_arm_process_before_allocation.
* bfd-in.h: Ammend prototype for
elf32_arm_process_before_allocation to remove surplus third
argument.
* bfd-in2.h: Regenerate.
1998-08-18 16:55:29 +00:00
Catherine Moore
a17e14c150
* elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
...
argument is_local. Add argument sym_flags. Check sym_flags
in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
(elf32_arm_relocate_section): Don't pass local sym and pass
sym_flags to elf32_arm_final_link_relocate.
1998-08-11 19:58:02 +00:00
Nick Clifton
0e7361bcd5
Add ARM ELF private flags
1998-08-05 22:52:27 +00:00
Catherine Moore
efaa65c99c
* Makefile.am: Add support for elf32-arm.lo.
...
* Makefile.in: Rebuild.
* config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
(thumb-*-elf): Define targ_defvec and targ_selvecs.
* configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
* configure: Regenerate.
* elf.c: (prep_headers): Support arch_type of EM_ARM.
* targets.c: Support new targets bfd_elf32_bigarm_vec and
bfd_target bfd_elf32_littlearm_vec.
* elf32-arm.c: New file.
1998-07-31 21:26:28 +00:00