Will Newton
8847944f8c
aarch64: Revert AArch64 ifunc changes.
...
The AArch64 ifunc patch introduced a regression caused by incorrect
PLT layout. Revert it until a fix is verified.
bfd/ChangeLog:
2013-06-19 Will Newton <will.newton@linaro.org>
* configure: Regenerated.
* configure.in: Remove aarch64 dependency on elf-ifunc.c.
* elf64-aarch64.c: Remove objalloc.h include.
(elf64_aarch64_howto_dynrelocs): Remove R_AARCH64_IRELATIVE howto.
(struct elf64_aarch64_link_hash_table): Remove ifunc related
members. (elf_aarch64_local_htab_hash): Remove function.
(elf_aarch64_local_htab_eq): Remove function.
(elf_aarch64_get_local_sym_hash): Remove function.
(elf64_aarch64_link_hash_table_create): Remove local hash
table initialization.
(elf64_aarch64_final_link_relocate): Remove sym argument and
handling of ifunc symbols.
(elf64_aarch64_relocate_section): Don't pass sym argument to
elf64_aarch64_final_link_relocate.
(elf64_aarch64_gc_sweep_hook): Remove handling of ifunc symbols.
(elf64_aarch64_adjust_dynamic_symbol): Likewise.
(elf64_aarch64_check_relocs): Likewise.
(elf64_aarch64_post_process_headers): Remove call to
_bfd_elf_set_osabi.
(elf64_aarch64_is_function_type): New function.
(elf64_aarch64_allocate_dynrelocs): Remove handling of ifunc
symbols. (elf_aarch64_allocate_local_dynrelocs): Remove function.
(elf64_aarch64_size_dynamic_sections): Remove call to
elf_aarch64_allocate_local_dynrelocs.
(elf64_aarch64_create_small_pltn_entry): Remove info argument.
Remove creation of R_AARCH64_IRELATIVE dynamic relocs.
(elf64_aarch64_finish_dynamic_symbol): Remove handling of ifunc
symbols. (elf_aarch64_finish_local_dynamic_symbol): Remove
function. (elf64_aarch64_finish_dynamic_sections): Remove call to
elf_aarch64_finish_local_dynamic_symbol.
(elf64_aarch64_add_symbol_hook): Remove function.
include/elf/ChangeLog:
2013-06-19 Will Newton <will.newton@linaro.org>
* aarch64.h: Remove R_AARCH64_IRELATIVE.
ld/ChangeLog:
2013-06-19 Will Newton <will.newton@linaro.org>
* emulparams/aarch64elf.sh: Remove IREL_IN_PLT.
ld/testsuite/ChangeLog:
2013-06-19 Will Newton <will.newton@linaro.org>
* ld-aarch64/aarch64-elf.exp: Remove ifunc tests.
* ld-ifunc/ifunc.exp: Disable ifunc tests on AArch64.
* ld-aarch64/ifunc-1-local.d: Remove.
* ld-aarch64/ifunc-1-local.s: Likewise.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-1.s: Likewise.
* ld-aarch64/ifunc-10.d: Likewise.
* ld-aarch64/ifunc-10.s: Likewise.
* ld-aarch64/ifunc-11.d: Likewise.
* ld-aarch64/ifunc-11.s: Likewise.
* ld-aarch64/ifunc-12.d: Likewise.
* ld-aarch64/ifunc-12.s: Likewise.
* ld-aarch64/ifunc-13.d: Likewise.
* ld-aarch64/ifunc-13a.s: Likewise.
* ld-aarch64/ifunc-13b.s: Likewise.
* ld-aarch64/ifunc-14a.d: Likewise.
* ld-aarch64/ifunc-14a.s: Likewise.
* ld-aarch64/ifunc-14b.d: Likewise.
* ld-aarch64/ifunc-14b.s: Likewise.
* ld-aarch64/ifunc-14c.d: Likewise.
* ld-aarch64/ifunc-14c.s: Likewise.
* ld-aarch64/ifunc-14d.d: Likewise.
* ld-aarch64/ifunc-14e.d: Likewise.
* ld-aarch64/ifunc-14f.d: Likewise.
* ld-aarch64/ifunc-15.d: Likewise.
* ld-aarch64/ifunc-15.s: Likewise.
* ld-aarch64/ifunc-16.d: Likewise.
* ld-aarch64/ifunc-16.s: Likewise.
* ld-aarch64/ifunc-17a.d: Likewise.
* ld-aarch64/ifunc-17a.s: Likewise.
* ld-aarch64/ifunc-17b.d: Likewise.
* ld-aarch64/ifunc-17b.s: Likewise.
* ld-aarch64/ifunc-18a.d: Likewise.
* ld-aarch64/ifunc-18a.s: Likewise.
* ld-aarch64/ifunc-18b.d: Likewise.
* ld-aarch64/ifunc-18b.s: Likewise.
* ld-aarch64/ifunc-19a.d: Likewise.
* ld-aarch64/ifunc-19a.s: Likewise.
* ld-aarch64/ifunc-19b.d: Likewise.
* ld-aarch64/ifunc-19b.s: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2-local.s: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-2.s: Likewise.
* ld-aarch64/ifunc-20.d: Likewise.
* ld-aarch64/ifunc-20.s: Likewise.
* ld-aarch64/ifunc-3.s: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-3b.d: Likewise.
* ld-aarch64/ifunc-4.d: Likewise.
* ld-aarch64/ifunc-4.s: Likewise.
* ld-aarch64/ifunc-4a.d: Likewise.
* ld-aarch64/ifunc-5-local.s: Likewise.
* ld-aarch64/ifunc-5.s: Likewise.
* ld-aarch64/ifunc-5a-local.d: Likewise.
* ld-aarch64/ifunc-5a.d: Likewise.
* ld-aarch64/ifunc-5b-local.d: Likewise.
* ld-aarch64/ifunc-5b.d: Likewise.
* ld-aarch64/ifunc-5r-local.d: Likewise.
* ld-aarch64/ifunc-6.s: Likewise.
* ld-aarch64/ifunc-6a.d: Likewise.
* ld-aarch64/ifunc-6b.d: Likewise.
* ld-aarch64/ifunc-7.s: Likewise.
* ld-aarch64/ifunc-7a.d: Likewise.
* ld-aarch64/ifunc-7b.d: Likewise.
* ld-aarch64/ifunc-7c.d: Likewise.
* ld-aarch64/ifunc-8.d: Likewise.
* ld-aarch64/ifunc-8a.s: Likewise.
* ld-aarch64/ifunc-8b.s: Likewise.
* ld-aarch64/ifunc-9.d: Likewise.
* ld-aarch64/ifunc-9.s: Likewise.
2013-06-19 10:30:59 +00:00
Alan Modra
8f250eb133
daily update
2013-06-19 00:00:03 +00:00
Alan Modra
d467c2b757
daily update
2013-06-18 00:00:04 +00:00
Alan Modra
e6f926d054
daily update
2013-06-17 00:00:04 +00:00
Alan Modra
aed45c8334
daily update
2013-06-16 00:00:05 +00:00
Alan Modra
6a3eab0fb3
daily update
2013-06-15 00:00:04 +00:00
Yufeng Zhang
2532064ada
bfd/
...
* elf64-aarch64.c (elf64_aarch64_final_link_relocate): Call
aarch64_resolve_relocation and bfd_elf_aarch64_put_addend to
handle the relocations of R_AARCH64_JUMP26, R_AARCH64_CALL26,
R_AARCH64_LD64_GOT_LO12_NC, R_AARCH64_ADR_GOT_PAGE and
R_AARCH64_GOT_LD_PREL19.
ld/testsuite/
* ld-aarch64/aarch64-elf.exp: Add 'ifunc-7c'.
* ld-aarch64/ifunc-7c.d: New test.
2013-06-14 16:07:20 +00:00
Alan Modra
28a68a3b91
daily update
2013-06-14 00:00:04 +00:00
Nick Clifton
2f47f5fc13
PR ld/15302
...
* elf32-arm.c (allocate_dynrelocs_for_symbol): Transform
ST_BRANCH_TO_ARM into ST_BRANCH_TO_THUMB if the target only
supports thumb instructions.
PR ld/15302
* ld-arm/branch-lks-sym.ld: New script.
* ld-arm/thumb-b-lks-sym.s: New test.
* ld-arm/thumb-b-lks-sym.d: Expected disassembly.
* ld-arm/thumb-bl-lks-sym.s: New test.
* ld-arm/thumb-bl-lks-sym.d: Expected disassembly.
* ld-arm/arm-elf.exp: Run the new tests.
2013-06-13 12:36:02 +00:00
Alan Modra
23266b5b70
daily update
2013-06-13 00:00:04 +00:00
Alan Modra
5e1f7017e7
daily update
2013-06-12 00:00:04 +00:00
DJ Delorie
34064ff3cd
* elf32-rl78.c (rl78_elf_relocate_section): Fix OPsub math.
2013-06-11 19:16:07 +00:00
Will Newton
3368874f75
bfd/elf64-aarch64.c: Use ELF64_R_SYM instead of ELF32_R_SYM.
...
Fix incorrect usage of ELF32_R_SYM introduced in ifunc changes.
bfd/ChangeLog:
2013-06-11 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf_aarch64_get_local_sym_hash): Use
ELF64_R_SYM instead of ELF32_R_SYM.
2013-06-11 09:25:53 +00:00
Nick Clifton
47fc0f1f21
* elf32-rl78.c (rl78_elf_finish_dynamic_sections): Onlly run
...
checks if the dynamic sections have been created and relaxation
has not been performed.
2013-06-11 07:21:40 +00:00
Alan Modra
c933105541
daily update
2013-06-11 00:00:04 +00:00
Alan Modra
f1ae789781
daily update
2013-06-10 00:00:04 +00:00
Alan Modra
78bccbc1a5
daily update
2013-06-09 00:00:04 +00:00
Alan Modra
5576f6ff94
daily update
2013-06-08 00:00:04 +00:00
Will Newton
692e2b8bcd
aarch64: Add support for GNU indirect functions.
...
Add support for STT_GNU_IFUNC symbols to the AArch64 bfd backend. The tests
are ported from the ld-ifunc tests but are enabled for cross builds so can
be run easily without hardware or a simulator.
bfd/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* configure: Regenerate.
* configure.in: Build elf-ifunc.o for AArch64.
* elf64-aarch64.c: Include objalloc.h.
(elf64_aarch64_howto_dynrelocs): Add R_AARCH64_IRELATIVE howto.
(struct elf64_aarch64_link_hash_table): Add members for handling
R_AARCH64_IRELATIVE relocations.
(elf_aarch64_local_htab_hash): New function.
(elf_aarch64_local_htab_eq): New function.
(elf_aarch64_get_local_sym_hash): New function.
(elf64_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC
symbol hash.
(elf64_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash.
(elf64_aarch64_final_link_relocate): Add sym argument. Add support
for handling STT_GNU_IFUNC symbols.
(elf64_aarch64_gc_sweep_hook): Add support for garbage collecting
references to STT_GNU_IFUNC symbols.
(elf64_aarch64_adjust_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols.
(elf64_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC
symbols. Ensure we don't increase plt.refcount from -1 to 0.
(elf64_aarch64_post_process_headers): Call _bfd_elf_set_osabi.
(elf64_aarch64_is_function_type): Remove function.
(elf64_aarch64_allocate_dynrelocs): Call
_bfd_elf_allocate_ifunc_dyn_relocs for STT_GNU_IFUNC symbols.
(elf_aarch64_allocate_local_dynrelocs): New function.
(elf64_aarch64_size_dynamic_sections): Call
elf_aarch64_allocate_local_dynrelocs. Initialize next_irelative_index.
(elf64_aarch64_create_small_pltn_entry): Add info argument.
Add support for creating .iplt entries for STT_GNU_IFUNC symbols.
(elf64_aarch64_finish_dynamic_symbol): Add support for handling
STT_GNU_IFUNC symbols and .iplt.
(elf_aarch64_finish_local_dynamic_symbol): New function.
(elf64_aarch64_finish_dynamic_sections): Call
elf_aarch64_finish_local_dynamic_symbol.
(elf64_aarch64_add_symbol_hook): New function.
include/elf/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* aarch64.h: Add R_AARCH64_IRELATIVE reloc.
ld/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* emulparams/aarch64elf.sh: Add IREL_IN_PLT.
ld/testsuite/ChangeLog:
2013-06-07 Will Newton <will.newton@linaro.org>
* ld-ifunc/ifunc.exp: Enable ifunc tests for AArch64.
* ld-aarch64/aarch64-elf.exp: Add ifunc tests.
* ld-aarch64/ifunc-1-local.d: New file.
* ld-aarch64/ifunc-1-local.s: Likewise.
* ld-aarch64/ifunc-1.d: Likewise.
* ld-aarch64/ifunc-1.s: Likewise.
* ld-aarch64/ifunc-10.d: Likewise.
* ld-aarch64/ifunc-10.s: Likewise.
* ld-aarch64/ifunc-11.d: Likewise.
* ld-aarch64/ifunc-11.s: Likewise.
* ld-aarch64/ifunc-12.d: Likewise.
* ld-aarch64/ifunc-12.s: Likewise.
* ld-aarch64/ifunc-13.d: Likewise.
* ld-aarch64/ifunc-13a.s: Likewise.
* ld-aarch64/ifunc-13b.s: Likewise.
* ld-aarch64/ifunc-14a.d: Likewise.
* ld-aarch64/ifunc-14a.s: Likewise.
* ld-aarch64/ifunc-14b.d: Likewise.
* ld-aarch64/ifunc-14b.s: Likewise.
* ld-aarch64/ifunc-14c.d: Likewise.
* ld-aarch64/ifunc-14c.s: Likewise.
* ld-aarch64/ifunc-14d.d: Likewise.
* ld-aarch64/ifunc-14e.d: Likewise.
* ld-aarch64/ifunc-14f.d: Likewise.
* ld-aarch64/ifunc-15.d: Likewise.
* ld-aarch64/ifunc-15.s: Likewise.
* ld-aarch64/ifunc-16.d: Likewise.
* ld-aarch64/ifunc-16.s: Likewise.
* ld-aarch64/ifunc-17a.d: Likewise.
* ld-aarch64/ifunc-17a.s: Likewise.
* ld-aarch64/ifunc-17b.d: Likewise.
* ld-aarch64/ifunc-17b.s: Likewise.
* ld-aarch64/ifunc-18a.d: Likewise.
* ld-aarch64/ifunc-18a.s: Likewise.
* ld-aarch64/ifunc-18b.d: Likewise.
* ld-aarch64/ifunc-18b.s: Likewise.
* ld-aarch64/ifunc-19a.d: Likewise.
* ld-aarch64/ifunc-19a.s: Likewise.
* ld-aarch64/ifunc-19b.d: Likewise.
* ld-aarch64/ifunc-19b.s: Likewise.
* ld-aarch64/ifunc-2-local.d: Likewise.
* ld-aarch64/ifunc-2-local.s: Likewise.
* ld-aarch64/ifunc-2.d: Likewise.
* ld-aarch64/ifunc-2.s: Likewise.
* ld-aarch64/ifunc-20.d: Likewise.
* ld-aarch64/ifunc-20.s: Likewise.
* ld-aarch64/ifunc-3.s: Likewise.
* ld-aarch64/ifunc-3a.d: Likewise.
* ld-aarch64/ifunc-3b.d: Likewise.
* ld-aarch64/ifunc-4.d: Likewise.
* ld-aarch64/ifunc-4.s: Likewise.
* ld-aarch64/ifunc-4a.d: Likewise.
* ld-aarch64/ifunc-5-local.s: Likewise.
* ld-aarch64/ifunc-5.s: Likewise.
* ld-aarch64/ifunc-5a-local.d: Likewise.
* ld-aarch64/ifunc-5a.d: Likewise.
* ld-aarch64/ifunc-5b-local.d: Likewise.
* ld-aarch64/ifunc-5b.d: Likewise.
* ld-aarch64/ifunc-5r-local.d: Likewise.
* ld-aarch64/ifunc-6.s: Likewise.
* ld-aarch64/ifunc-6a.d: Likewise.
* ld-aarch64/ifunc-6b.d: Likewise.
* ld-aarch64/ifunc-7.s: Likewise.
* ld-aarch64/ifunc-7a.d: Likewise.
* ld-aarch64/ifunc-7b.d: Likewise.
* ld-aarch64/ifunc-8.d: Likewise.
* ld-aarch64/ifunc-8a.s: Likewise.
* ld-aarch64/ifunc-8b.s: Likewise.
* ld-aarch64/ifunc-9.d: Likewise.
* ld-aarch64/ifunc-9.s: Likewise.
2013-06-07 18:57:03 +00:00
Alan Modra
21d6c799a7
daily update
2013-06-07 00:00:05 +00:00
Alan Modra
d6f98092c9
daily update
2013-06-06 00:00:04 +00:00
Alan Modra
11e35e8a9b
daily update
2013-06-05 00:00:05 +00:00
Alan Modra
3f3b58850a
daily update
2013-06-04 00:00:05 +00:00
Alan Modra
fa549f3baa
* syms.c (_bfd_stab_section_find_nearest_line): Add last_str
...
var. Use it with last_stab.
2013-06-03 04:11:09 +00:00
Alan Modra
0a59cc46ca
daily update
2013-06-03 00:00:04 +00:00
Alan Modra
3b826cfcf8
daily update
2013-06-02 00:00:05 +00:00
Alan Modra
c5c412da3c
daily update
2013-06-01 00:00:04 +00:00
Alan Modra
0d6e7de99c
daily update
2013-05-31 00:00:04 +00:00
Catherine Moore
067ec077d7
2013-05-30 Paul Brook <paul@codesourcery.com>
...
bfd/
* bfd-in2.h: Regenerate.
* elf32-mips.c (elf_mips_eh_howto): New.
(bfd_elf32_bfd_reloc_type_lookup ): Support BFD_RELOC_MIPS_EH.
(bfd_elf32_bfd_reloc_name_lookup): Likewise.
(mips_elf32_rtype_to_howto): Support R_MIPS_EH.
* elf64-mips.c (elf_mips_eh_howto): New.
(bfd_elf64_bfd_reloc_type_lookup): Support BFD_RELOC_MIPS_EH.
(bfd_elf64_bfd_reloc_name_lookup): Likewise.
(mips_elf64_rtype_to_howto): Support R_MIPS_EH.
* libbfd.h: Regenerate.
* reloc.c (BFD_RELOC_MIPS_EH): New.
gas/
* config/tc-mips.c (md_apply_fix): Support BFD_RELOC_MIPS_EH.
include/elf
* mips.h (R_MIPS_EH): New.
2013-05-30 20:27:21 +00:00
Alan Modra
079eae43c3
daily update
2013-05-30 00:00:06 +00:00
Nick Clifton
95e34fb4f4
* dwarf2.c (struct dwarf2_debug): Add fields for handling
...
alternate debug info source.
(dwarf_debug_sections): Add entries for alternate .debug_str and
.debug_info sections.
(dwarf_debug_section_enum): Likewise.
(read_alt_indirect_string): New function. Handles a
DW_FORM_GNU_strp_alt attribute.
(read_alt_indirect_ref): New function. Handles a
DW_FORM_GNU_ref_alt attribute.
(read_attribute_value): Process DW_FORM_GNU_ref_alt and
DW_FORM_GNU_strp_alt.
(find_abstract_instance_name): Handle DW_FORM_GNU_ref_alt
attributes.
(_bfd_dwarf2_cleanup_debug_info): Free alternate debug info
sources.
* opncls.c (GNU_DEBUGALTLINK): Define.
(bfd_get_alt_debug_link_info): New function.
(separate_alt_debug_file_exists): New function.
(find_separate_debug_file): Add parameters for fetch and check
functions.
(bfd_follow_gnu_debugaltlink): New function.
* bfd-in2.h: Regenerate.
2013-05-29 14:58:35 +00:00
Alan Modra
17e53d7bf1
daily update
2013-05-29 00:00:04 +00:00
Yufeng Zhang
418009c200
Correct the relocation names for R_AARCH64_TLSDESC_LD_PREL19 and R_AARCH64_TLSDESC_ADR_PAGE21.
2013-05-28 16:39:51 +00:00
Alan Modra
3bc357f6f2
daily update
2013-05-28 00:00:04 +00:00
Mark Wielaard
9d782e8df0
bfd: Make bfd_cache_max_open depend on actual open file limit.
...
The current hard coded limit of open files in bfd/cache.c is 10. This
is pretty low these days. Binaries are often linked against much more
than 10 files (and sometimes against more than 100 shared libraries).
When debugging with GDB some files are opened and closed multiple
times because of this low limit. If possible make the BFD cache file
limit depend on the actual open file limit of the process so more BFD
files can be open at the same time.
* cache.c (BFD_CACHE_MAX_OPEN): Remove define.
(max_open_files): New static int initialized to zero.
(bfd_cache_max_open): New static function to set and return
max_open_files.
(bfd_cache_init): Use bfd_cache_max_open.
(bfd_open_file): Likewise.
* configure.in (AC_CHECK_HEADERS): Add sys/resource.h.
(AC_CHECK_FUNCS): Add getrlimit.
* configure: Regenerated.
* config.in: Likewise.
* sysdep.h: Check and include sys/resource.h for getrlimit.
2013-05-27 07:55:17 +00:00
Alan Modra
7bd153c858
daily update
2013-05-27 00:00:04 +00:00
Alan Modra
f1c4c44bae
daily update
2013-05-26 00:00:04 +00:00
Alan Modra
c6f695b95f
daily update
2013-05-25 00:00:04 +00:00
Alan Modra
34e02e2590
daily update
2013-05-24 00:00:05 +00:00
Alan Modra
03ae2d5e4f
* format.c (bfd_check_format_matches): Don't match a target in
...
targ_selvecs if some other target is a better match. If
targets implement match priority, fall back to the first of
the best matches.
2013-05-23 03:35:59 +00:00
Alan Modra
2c573464eb
daily update
2013-05-23 00:00:05 +00:00
Alan Modra
ad3d91277b
PR binutils/15462
...
* elfxx-mips.c (_bfd_mips_elf_relocate_section): Warning fix.
2013-05-22 08:39:52 +00:00
Alan Modra
5b3905f13a
PR binutils/15474
...
* srec.c (srec_set_section_contents): Properly convert size
and offset to address when octets_per_byte is not unity.
2013-05-22 06:13:59 +00:00
Alan Modra
65bff914ee
daily update
2013-05-22 00:00:05 +00:00
Alan Modra
954f389075
daily update
2013-05-21 00:00:04 +00:00
Maciej W. Rozycki
8be65dd3d9
* elf32-vax.c (elf_vax_instantiate_got_entries): Only set the
...
refcount member of the gotplt_union when resetting the reference
count. Adjust comment.
2013-05-20 23:28:32 +00:00
Will Newton
593f8f2938
bfd/elf64-aarch64.c: Remove dead code.
...
The relocs_copied member is never assigned a non-NULL value, so
this code does not appear to be used.
bfd/ChangeLog:
2013-05-20 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf64_aarch64_link_hash_entry): Remove
relocs_copied member.
(elf64_aarch64_link_hash_newfunc): Remove initialization of
relocs_copied member.
(elf64_aarch64_copy_indirect_symbol): Remove code to copy
relocs_copied member.
2013-05-20 13:26:40 +00:00
Alan Modra
94b7bb3559
daily update
2013-05-20 00:00:04 +00:00
Maciej W. Rozycki
a0f0eb1e92
* elf32-vax.c (elf_vax_adjust_dynamic_symbol): Convert K&R
...
function definition.
2013-05-19 21:40:00 +00:00
Alan Modra
f3018c5d82
daily update
2013-05-19 00:00:07 +00:00