aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
2015-04-07Automatic date update in version.inGDB Administrator1-1/+1
2015-04-06Use bfd_putb64/bfd_getb64H.J. Lu2-31/+10
bfd/ * compress.c (get_uncompressed_size): Removed. (bfd_compress_section_contents): Use bfd_putb64 to write uncompressed section size. (bfd_init_section_decompress_status): Replace get_uncompressed_size with bfd_getb64. gas/ * write.c (compress_debug): Use bfd_putb64 to write uncompressed section size.
2015-04-06Automatic date update in version.inGDB Administrator1-1/+1
2015-04-05Automatic date update in version.inGDB Administrator1-1/+1
2015-04-04Also preserve the SHF_COMPRESSED bitH.J. Lu2-0/+10
For objcopy and relocatable link, we should also preserve the SHF_COMPRESSED bit if not decompress. * elf.c (_bfd_elf_init_private_section_data): Also preserve the SHF_COMPRESSED bit if not decompress.
2015-04-04Replace uncompressed_size_buffer with compressed_size_bufferH.J. Lu1-9/+9
2015-04-04Extract get_uncompressed_sizeH.J. Lu2-9/+27
* compress.c (get_uncompressed_size): New. Extracted from ... (bfd_init_section_decompress_status): This. Use it.
2015-04-04Automatic date update in version.inGDB Administrator1-1/+1
2015-04-03Automatic date update in version.inGDB Administrator1-1/+1
2015-04-02Add support for configuring an aarch64-freebsd target.Andrew Turner2-0/+9
ld * Makefile.am: Add FreeBSD aarch64 files. * Makefile.in: Regenerate. * configure.tgt: Add aarch64-*-freebsd* target triple. * emulparams/aarch64fbsd.sh: New file. * emulparams/aarch64fbsdb.sh: New file. bfd * config.bfd: Add aarch64-*-freebsd* target triple.
2015-04-02Regenerate configure in bfd/binutils/gas/gdb/goldH.J. Lu2-2/+6
bfd/ * configure: Regenerated. binutils/ * configure: Regenerated. gas/ * configure: Regenerated. gdb/ * Makefile.in (top_srcdir): New. * configure: Regenerated. gold/ * configure: Regenerated.
2015-04-02Automatic date update in version.inGDB Administrator1-1/+1
2015-04-01[AArch64] Workaround for Cortex A53 erratum 843419Marcus Shawcroft6-13/+516
Some early revisions of the Cortex-A53 have an erratum (843419). The details of the erratum are quite complex and involve dynamic conditions. For the purposes of the workaround we have simplified the static conditions to an ADRP in the last two instructions of a 4KByte page, followed within four instructions by a load/store dependent on the ADRP. This patch adds support to conservatively scan for and workaround Cortex A53 erratum 843419. There are two different workaround strategies used. The first is to rewrite ADRP instructions which form part of an erratum sequence with an ADR instruction. In situations where the ADR provides insufficient offset the dependent load or store instruction from the sequence is moved to a stub section and branches are inserted from the original sequence to the relocated instruction and back again. Stub section sizes are rounded up to a multiple of 4096 in order to ensure that the act of inserting work around stubs does not create more errata sequences. Workaround stubs are always inserted into the stub section associated with the input section containing the erratum sequence. This ensures that the fully relocated form of the veneered load store instruction is available at the point in time when the stub section is written.
2015-04-01Regenerate configure in bfd/binutils/gas/gdbH.J. Lu2-2/+8
bfd/ 2015-04-01 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. binutils/ 2015-04-01 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. gas/ 2015-04-01 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated. gdb/ 2015-04-01 H.J. Lu <hongjiu.lu@intel.com> * configure: Regenerated.
2015-04-01Automatic date update in version.inGDB Administrator1-1/+1
2015-03-31Add support for Nuxi CloudABI on x86-64Ed Schouten6-0/+36
bfd/ * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec for x86_64-*-cloudabi*. * configure.ac: Handle x86_64_elf64_cloudabi_vec. * configure: Regenerated. * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*. (TARGET_LITTLE_NAME): Likewise. (ELF_OSABI): Likewise. (elf64_bed): Likewise. * targets.c (x86_64_elf64_cloudabi_vec): New. (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec. gas/ * configure.tgt (fmt): Set to elf for *-*-cloudabi*. ld/ * Makefile.am (ALL_64_EMULATION_SOURCES): Add eelf_x86_64_cloudabi.c. (eelf_x86_64_cloudabi.c): New. * configure.tgt (targ_emul): Set to elf_x86_64_cloudabi for x86_64-*-cloudabi*. * Makefile.in: Regenerated. * emulparams/elf_x86_64_cloudabi.sh: New file.
2015-03-31Revert the AM_ZLIB change in bfdH.J. Lu6-16/+24
* configure.ac: Revert the AM_ZLIB change. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise.
2015-03-31Automatic date update in version.inGDB Administrator1-1/+1
2015-03-30Properly set sh_info for .rela.plt/rel.plt sectionH.J. Lu4-8/+57
Since .rela.plt/rel.plt section may contain relocations against .got.plt section, we set sh_info for .rela.plt/rel.plt section to .got.plt section index if target has .got.plt section. bfd/ PR ld/18169 * elf-bfd.h (elf_backend_data): Add get_reloc_section. (_bfd_elf_get_reloc_section): New. * elf.c (_bfd_elf_get_reloc_section): Likewise. (assign_section_numbers): Call get_reloc_section to look up the section the relocs apply. * elfxx-target.h (elf_backend_get_reloc_section): Likewise. (elfNN_bed): Initialize get_reloc_section with elf_backend_get_reloc_section. ld/testsuite/ PR ld/18169 * ld-elf/linkinfo1a.d: Updated. * ld-elf/linkinfo1b.d: Likewise.
2015-03-30Automatic date update in version.inGDB Administrator1-1/+1
2015-03-29Fix a typo in bfd/ChangeLogH.J. Lu1-2/+1
2015-03-29Add --with-system-zlib in bfdH.J. Lu9-130/+76
This patch adds --with-system-zlib and remove --with-zlib in bfd. * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (libbfd_la_LIBADD): Add $(ZLIB). * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>. (decompress_contents): Don't check HAVE_ZLIB_H. (decompress_contents): Likewise. (bfd_compress_section_contents): Likewise. (bfd_get_full_section_contents): Likewise. (bfd_init_section_decompress_status): Likewise. (bfd_init_section_compress_status): Likewise. * configure.ac (AM_ZLIB): Removed (zlibdir): New. AC_SUBST. (zlibinc): Likewise. Add --with-system-zlib. * Makefile.in: Regenerated. * acinclude.m4: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise.
2015-03-29Automatic date update in version.inGDB Administrator1-1/+1
2015-03-28Automatic date update in version.inGDB Administrator1-1/+1
2015-03-27Relax PR 15228 protected visibility restrictionAlan Modra3-6/+17
Allows .dynbss copy of shared library protected visibility variables if they are read-only. To recap: Copying a variable from a shared library into an executable's .dynbss is an old hack invented for non-PIC executables, to avoid the text relocations you'd otherwise need to access a shared library variable. This works with ELF shared libraries because global symbols can be overridden. The trouble is that protected visibility symbols can't be overridden. A shared library will continue to access it's own protected visibility variable while the executable accesses a copy. If either the shared library or the executable updates the value then the copy diverges from the original. This is wrong since there is only one definition of the variable in the application. So I made the linker report an error on attempting to copy protected visibility variables into .dynbss. However, you'll notice the above paragraph contains an "If". An application that does not modify the variable value remains correct even though two copies of the variable exist. The linker can detect this situation if the variable was defined in a read-only section. PR ld/15228 PR ld/18167 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set protected_def when symbol section is read-only. Adjust all calls. * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
2015-03-27Automatic date update in version.inGDB Administrator1-1/+1
2015-03-26[AArch64] Fix branch stubs for BETejas Belagod2-13/+11
2015-03-26 Tejas Belagod <tejas.belagod@arm.com> ld/testsuite * ld-aarch64/farcall-back-be.d: New. bfd/ * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic _bfd_final_link_relocate with aarch64_relocate.
2015-03-26Skip gc-sections if relocation is incompatibleH.J. Lu2-2/+10
This patch skips gc-sections if input relocation is incompatible with output. bfd/ PR ld/18160 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible. (bfd_elf_gc_sections): Likewise. ld/testsuite/ PR ld/18160 * ld-x86-64/pr18160.d: New file. * ld-x86-64/pr18160.s: Likewise. * ld-x86-64/pr18160.t: Likewise. * ld-x86-64/x86-64.exp: Run pr18160.
2015-03-26Automatic date update in version.inGDB Administrator1-1/+1
2015-03-25[AArch64] Implement branch over stub section.Marcus Shawcroft2-1/+25
Ensure that injection of a stub section does not break a link where there is an xpectation that flow of control can pass from one input section to another simply by linking the input sections in series. The solution here is to allow stub sections to be inserted after any input section (existing behaviour), but inject an additional branch at the start of each stub section such that control flow falling into the stub section will branch over the stub section.
2015-03-25[AArch64] Remove padding before stub sections.Marcus Shawcroft1-1/+1
Lower stub alignment from 8 to 4 bytes thus removing padding between input section content and stub section content.
2015-03-25[AArch64] Adjust veneer count.Marcus Shawcroft2-0/+7
2015-03-25Garbage collecting debug sectionsSenthil Kumar Selvaraj2-1/+5
I noticed that _bfd_elf_gc_mark_extra_sections attempts to unmark related debug sections when it finds an unmarked code section. When it finds .text.foo is unmarked, for example, it removes .debug_line.text.foo as well (using the section name as a suffix match check. However, it bails out after finding one such section. bfd/ * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on first matching debug section. ld/testsuite/ * ld-gc/all-debug-sections.d: New file. * ld-gc/all-debug-sections.s: Likewise. * ld-gc/gc.exp: Execute new testcase.
2015-03-25Automatic date update in version.inGDB Administrator1-1/+1
2015-03-24Don't write the zlib header if not usedH.J. Lu2-30/+35
No need to write the zlib header if compression didn't make the section smaller. PR binutils/18087 * compress.c (bfd_compress_section_contents): Don't write the zlib header and set contents as well as compress_status if compression didn't make the section smaller. (bfd_init_section_compress_status): Don't check compression size here.
2015-03-24Fixes a bug introduced by the new ranges checks on COFF symbol tables.Nick Clifton2-2/+7
PR binutils/17512 * coffgen.c (coff_get_normalized_symtab): Fix test for out of range auxillary sections.
2015-03-24[AArch64] Factor out _bfd_aarch64_get_stub_for_link_section.Marcus Shawcroft2-12/+24
2015-03-24[AArch64] Refactor section_group[] representation.Marcus Shawcroft2-12/+8
Change the behaviour of section_group[] such that .stub_sec points to the stub section attached to the indexed section rather than the stub section attached to the link_section pointed to be the index section. This provides a mechanism to get to the stub section following any input section. While still allowing the section grouping mechanism to find the section group stub section associated with an input section by first following the link_sec pointer.
2015-03-24[AArch64] Refactor generation of 835769 workaround stubs.Marcus Shawcroft2-104/+41
This patch recognizes that we only need to perform one scan for the 835769 errata and that this scan can take place before we insert branch stubs. The erratum scan code is relocated and adjusted to create stub entries directly rather than populating an intermediate representation. Since stub entries are created immediately we can drop the adhoc stub size adjustment code and allow the generic stub sizing code to deal with 835769 stub entries. This patch restructures the code but does not change the workaround used to deal with erratum 83679, the exact placement of workaround stubs in the final image may change slightly after this patch due to stubs being created in a different order.
2015-03-24[AArch64] Use _bfd_aarch64_add_stub_entry_in_group.Marcus Shawcroft2-15/+10
Adjust the 835769 workaround code to use _bfd_aarch64_add_stub_entry_in_group rather than inspect the underlying section_group structure directly.
2015-03-24Make powerpc bfd ld reloc overflow vs undefined symbols match goldAlan Modra3-40/+34
* elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to stubs, even those for undefined weak symbols. Otherwise, don't report relocation overflow on branches to undefined strong symbols. Fix memory leak. * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation overflow on branches to undefined strong symbols.
2015-03-24Automatic date update in version.inGDB Administrator1-1/+1
2015-03-23[OBV] Fix build -- missing ';'Keith Seitz2-1/+6
bfd/ChangeLog * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add missing ';'.
2015-03-23Adding Changelog for previous commit.Marcus Shawcroft1-0/+6
2015-03-23Factor out _bfd_aarch64_erratum_835769_stub_nameMarcus Shawcroft1-7/+11
2015-03-23[AArch64] Factor out _bfd_aarch64_resize_stubs()Marcus Shawcroft2-12/+30
2015-03-23[AArch64] Factor stub creation code into _bfd_aarch64_create_stub_section.Marcus Shawcroft2-14/+29
2015-03-23[AArch64] Factor out common behaviour between ↵Marcus Shawcroft2-52/+42
elf_aarch64_create_or_find_stub_sec and elfNN_aarch64_add_stub
2015-03-23[AArch64] Flip sense of erratum_835769_scan.Marcus Shawcroft2-8/+19
2015-03-23[AArch64] Drop unused argument to elf_aarch64_create_or_find_stub_secMarcus Shawcroft2-10/+11