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
Alan Modra
d4dd980d61
daily update
2013-05-18 00:00:06 +00:00
Alan Modra
67cb00443b
daily update
2013-05-17 00:00:06 +00:00
Cary Coutant
af65e5888e
bfd/
...
* ecoff.c (ecoff_link_check_archive_element): Add initializers for
external_ext_size and esize.
2013-05-16 16:34:51 +00:00
Tristan Gingold
9f6e76f4ea
bfd/
...
2013-05-16 Tristan Gingold <gingold@adacore.com>
* coff-rs6000.c (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_16.
* coff64-rs6000.c (xcoff64_reloc_type_lookup): Likewise.
gas/
2013-05-16 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (ppc_is_toc_sym): Symbols of class XMC_TC
are also TOC symbols.
2013-05-16 15:41:40 +00:00
Alan Modra
d5c48113b6
daily update
2013-05-16 00:00:06 +00:00
Andreas Schwab
c495064deb
* elf64-aarch64.c (elf_backend_default_execstack): Define to 0.
2013-05-15 06:51:19 +00:00
Alan Modra
ffc95def8f
daily update
2013-05-15 00:00:06 +00:00
Alan Modra
152af37f7f
daily update
2013-05-14 00:00:06 +00:00
Alan Modra
175caf72ec
daily update
2013-05-13 00:00:06 +00:00
Alan Modra
293228cd92
daily update
2013-05-12 00:00:06 +00:00
Alan Modra
4f8f8ad1bd
daily update
2013-05-11 00:00:06 +00:00
Joel Brobecker
110a61d342
XCOFF/AIX: Remove SEC_ALLOC flags for unmapped sections.
...
The .except, .loader and .typchk are not mapped to memory,
so do not set their SEC_ALLOC flag.
bfd/ChangeLog:
* coffcode.h (styp_to_sec_flags) [RS6000COFF_C]: Add handling
of STYP_EXCEPT, STYP_LOADER and STYP_TYPCHK sections.
ld/testsuite/ChangeLog:
* ld-powerpc/aix-core-sec-1.hd, ld-powerpc/aix-core-sec-2.hd,
ld-powerpc/aix-core-sec-3.hd: Adjust expected section flags
for section .loader.
2013-05-10 13:08:24 +00:00
Alan Modra
4e45246814
daily update
2013-05-10 00:00:05 +00:00
Joel Brobecker
ceae87f3fe
Use fputc in place of putc to avoid -Wunused-value warning (AIX).
...
Currently, bfd does not compile with -Wunused-value because
the following code:
val = putc ('\n', f);
gets expanded into some code that triggers a warning:
warning: value computed is not used [-Wunused-value]
This is because putc is implemented as a macro...
>#define putc(__x, __p) (((!((__p)->_flag & 0xC000)) && \
> ((__p)->_flag = ((__p)->_flag & 0x3FFF) | 0x8000)),\
> (--(__p)->_cnt < 0 ? \
> __flsbuf((unsigned char) (__x), (__p)) : \
> (int) (*(__p)->_ptr++ = (unsigned char) (__x))))
It's the first part, before the coma operator, which triggers
the unused-value warning.
This patch fixes the issue by simply avoiding the macro and using
fputc instead.
bfd/ChangeLog:
* bfd.c (_bfd_default_error_handler): Replace use of putc
by fputc. Add comment explaining why.
2013-05-09 06:58:16 +00:00
Alan Modra
9055c47acd
daily update
2013-05-09 00:00:05 +00:00
Alan Modra
012b2306cc
* elflink.c (elf_link_add_object_symbols): Don't omit reading
...
of symbols when hashes already exist.
2013-05-08 23:31:38 +00:00
Alan Modra
2f9ea77e8a
daily update
2013-05-08 00:00:06 +00:00