summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd
Commit message (Collapse)AuthorAgeFilesLines
* Create an unified binutils source tree for both Android and ChromiumOS.Han Shen2015-11-1919-193/+480
| | | | | | | | | | | | | | | | | | | | | | About source code - The base version of this binutils is newer than that of aosp/binutils-2.25, it is based on the binutils that is used to build google products and ChromiumOS. And it contains *all* local Android patches as well as all patches that are cherry-picked from upstream for aosp/binutils-2.25 tree (up to Nov. 5 - 932d71b85). You may find the detailed development history for this binutils tree here - https://chromium.googlesource.com/chromiumos/third_party/binutils/+log/unification (This CL is a combination of all the CLs in it. After this CL is submitted the tree will be identical to https://chromium.googlesource.com/chromiumos/third_party/binutils/+log/unification at 2865a3615d80bd5f82d14d7e0484e84dc052596a) About testing - We tested this binutils for both ChromiumOS and Android. For android, we tested building N4, N5X, N6, N7, N9 using new binutils, we also did a full-build of toolchain (by build.py) and built a N5X image; for ChromiumOS - it passed ChromiumOS toolchain release tests on all 4 platforms (x86, x86_64, arm32 and arm64). Change-Id: I2bb2cf579f9458d0a8bc9612331dc7d5043e3d82
* Fix Mac OS X build failures (wcsncasecmp unsat)Nick Clifton2015-11-035-6/+40
| | | | | | | | | | | | | | | | | Cherry-pick of upstream commit 31593e1b96c792abba3c5268d6423975aefa56b2 2015-02-24 Nick Clifton <nickc@redhat.com> * configure.ac (AC_CHECK_HEADERS): Add wctype.h. * configure: Regenerate. * config.in: Regenerate. * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined. (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined. (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H is defined. Bug: 25427405 Change-Id: I06e99d906226ce9c88ff1c568ae7a4d84df7f332
* Fix DT_MIPS_RLD_MAP_REL tag for n64 target and 32-bit host.Joseph Myers2015-07-272-1/+7
| | | | | | | | | | | | | | | | | | Cherry-picked from upstream: d5cff5df74b18e1e5ed94de8f4c9adee3ffd95c6 For the case of MIPS n64 target and 32-bit host, the computation of the DT_MIPS_RLD_MAP_REL tag involves sdyn->output_section->vma + sdyn->output_offset (64-bit) being added to b (32-bit host pointer), so losing the high part and resulting in an incorrect DT_MIPS_RLD_MAP_REL tag, and all dynamically linked glibc tests failing for n64. This patch fixes this (spot-tested with glibc tests; however, I don't have a self-contained testcase for this bug). * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections) <DT_MIPS_RLD_MAP_REL>: Add target address to host address difference, not to host pointer. Change-Id: If4984d632723a36a3d6c739a96706b5636f975bc
* Apple has had wcsncasecmp since 10.7.Dan Albert2015-06-221-22/+0
| | | | | | | | AFAICT this was an Android hack. I don't see it anywhere in the history for upstream. Just remove it. Bug: http://b/21534147 Change-Id: I7c69f543a80a0e4805fbea2934eaec052544d6c7
* Fix darwin buildAndrew Hsieh2015-05-061-0/+22
| | | | | | | | 1. In Drawin PTHREAD_ONCE_INIT is {0x30B1BCBA, {0}} and the GCC < 4.4 doesn't support ended initializer list 2. wcsncasecmp doesn't exist in MacSDK10.6.x Change-Id: I69204a72f853f5263dffedc448379d75ed4eca2e
* [AArch64] Workaround for cortex-a53 erratum 843419Marcus Shawcroft2015-03-305-13/+475
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the erratum. 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-03-30 Tejas Belagod <tejas.belagod@arm.com> Marcus Shawcroft <marcus.shawcroft@arm.com> Jiong Wang <jiong.wang@arm.com> * bfd-in.h (bfd_elf64_aarch64_set_options) (bfd_elf32_aarch64_set_options): Add parameter. * bfd-in2.h: Regenerated. * elfnn-aarch64.c (aarch64_erratum_843419_stub) (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p) (_bfd_aarch64_erratum_843419_stub_name) (_bfd_aarch64_erratum_843419_fixup) (_bfd_aarch64_erratum_843419_scan) (_bfd_aarch64_erratum_843419_branch_to_stub) (_bfd_aarch64_erratum_843419_p): Define. (enum elf_aarch64_stub_type): Define aarch64_stub_erratum_843419_veneer. (struct elf_aarch64_stub_hash_entry): Define adrp_offset. (struct elf_aarch64_link_hash_table): Define fix_erratum_843419 and fix_erratum_843419_adr. (stub_hash_newfunc): Initialize adrp_offset; (_bfd_aarch64_add_stub_entry_after): Define. (aarch64_map_one_stub, aarch64_build_one_stub) (aarch64_size_one_stub): Handle aarch64_stub_erratum_843419_veneer. (_bfd_aarch64_resize_stubs): Round stub section size. (elfNN_aarch64_size_stubs): Add scan for 843419. (bfd_elfNN_aarch64_set_options): Add parameter. Initialize fix_erratum_843419 and fix_erratum_843419_adr. (struct erratum_835769_branch_to_stub_data): Add info. (elfNN_aarch64_write_section): Initialise info. Handle 843419. (elfNN_aarch64_size_dynamic_sections): Handle 843419. * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm) (_bfd_aarch64_sign_extend): Define. (reencode_adr_imm): Remove static. Rename to: (_bfd_aarch64_reencode_adr_imm): Define. (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm. * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP) (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend) (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm): Define. ld/testsuite: 2015-03-24 Tejas Belagod <tejas.belagod@arm.com> * emultempl/aarch64elf.em (aarch64_elf_create_output_section_statements): Add parameter in bfd_elf${ELFSIZE}_aarch64_set_options call. (OPTION_FIX_ERRATUM_843419): Define. (PARSE_AND_LIST_LONGOPTS): Add fix-cortex-a53-843419. (PARSE_AND_LIST_ARGS_CASES): Add OPTION_FIX_ERRATUM_843419. Change-Id: I758b04c90d431f4e72a978871d5a66676c413d92
* [AArch64] Implement branch over stub section.Marcus Shawcroft2015-03-301-1/+17
| | | | | | | | | | | | | 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. Change-Id: I8ccadcfb2f43e6409cb5a649087a47c0c8826b15
* [AArch64] Adjust veneer count.Marcus Shawcroft2015-03-301-0/+2
| | | | Change-Id: Idc292f60196ed4bf417eb77acc239761666adb8b
* [AArch64] Factor out _bfd_aarch64_get_stub_for_link_section.Marcus Shawcroft2015-03-301-12/+18
| | | | Change-Id: Ib6171d8646bc0e825a5038c7087acc534a8612a9
* [AArch64] Refactor section_group[] representation.Marcus Shawcroft2015-03-301-12/+3
| | | | | | | | | | | | | 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. Change-Id: I19bce3feea77bbc71c04f2d8b3a204c527a21d9a
* [AArch64] Refactor generation of 835769 workaround stubs.Marcus Shawcroft2015-03-301-104/+28
| | | | | | | | | | | | | | | | | 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. Change-Id: I1ac3b2b7a8a5faf678a1e375f50f63ab6fd22d1f
* [AArch64] Use _bfd_aarch64_add_stub_entry_in_group.Marcus Shawcroft2015-03-301-15/+5
| | | | | | | | Adjust the 835769 workaround code to use _bfd_aarch64_add_stub_entry_in_group rather than inspect the underlying section_group structure directly. Change-Id: I26e7793af2a8bd6ab57c2b958cec12565d280a8f
* [OBV] Fix build -- missing ';'Keith Seitz2015-03-301-1/+1
| | | | | | | | | bfd/ChangeLog * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add missing ';'. Change-Id: I174cb391792c428521a9334eb166cdc8c979b12f
* Factor out _bfd_aarch64_erratum_835769_stub_nameMarcus Shawcroft2015-03-301-7/+11
|
* [AArch64] Factor out _bfd_aarch64_resize_stubs()Marcus Shawcroft2015-03-301-12/+24
| | | | Change-Id: I3e92b1a8cf997ea7eb902bc38d5163cf919789e0
* [AArch64] Factor stub creation code into _bfd_aarch64_create_stub_section.Marcus Shawcroft2015-03-301-14/+23
| | | | Change-Id: I6f01f9c9c3a64ed8ed52486f0f6f66f66b85a317
* [AArch64] Factor out common behaviour between ↵Marcus Shawcroft2015-03-301-52/+32
| | | | | | elf_aarch64_create_or_find_stub_sec and elfNN_aarch64_add_stub Change-Id: I8e5ce0f4dd3aa322f97fa09d42c6f95e0d45118d
* [AArch64] Flip sense of erratum_835769_scan.Marcus Shawcroft2015-03-301-8/+13
| | | | Change-Id: Ia79975e3ce9f1eca6ae092b4c9e2d92168fde1a0
* [AArch64] Drop unused argument to elf_aarch64_create_or_find_stub_secMarcus Shawcroft2015-03-301-10/+5
| | | | Change-Id: I0454073cfad254ee5e28c5d597d615abdef9331d
* [AArch64] Remove unused variable.Marcus Shawcroft2015-03-301-3/+2
| | | | Change-Id: I5e0be2e412d13fe4a5d738d7949bfb11909783d0
* Remove dead code.Marcus Shawcroft2015-03-301-16/+0
| | | | Change-Id: Iea5ae8c19790beebc6188b094895cbe7c7c221c5
* [AArch64] Removing unused functions.Marcus Shawcroft2015-03-301-42/+0
| | | | | | Removing a group of unused functions from the AArch64 BFD backend. Change-Id: I9dc2a43084f21ee2771d26d32e1a26692018bb5c
* Fixed Cortex-A53 Erratum 835769 -- LD segfaults with unordered maps.Tejas Belagod2015-03-301-0/+27
| | | | | | | | | | | | | | | | | | | The BFD/LD patch for Cortex-A53 erratum 835769 (https://sourceware.org/ml/binutils/2014-10/msg00199.html) does not handle a particular case of the AArch64 ELF ABI where mapping symbols are allowed to be unordered in the symbol table (not in address order). The unordering causes section maps to be traversed with incorrect span boundaries (in the erratum scanning function) which causes memory faults. The attached patch fixes this issue by ordering the section maps by their 'vma' before starting to traverse them. While this is not an issue with a the GNU toolchain, it is a potential issue with Clang/LLVM. We have observed at least one case where LLVM generates an ELF object with mapping symbols unordered in the symbol table and causes a fault. We have been unable to construct a test case with the GNU toolchain. We have verified by manual inspection the correctness of the traversal with this patch for an LLVM-generated ELF object which triggered this issue. This patch has been bootstrapped on aarch64-linux and regressed.
* Fix buildAndrew Hsieh2015-03-021-0/+6
| | | | | | | | 1. revert https://android-review.googlesource.com/#/c/38591. 2. add a few constants from ToT 3. fix a typo about pthread_mutexattr_settype Change-Id: I55a829e7907658f920aedbf1100c6d9b1a93052b
* Add support for the new tag DT_MIPS_RLD_MAP2.Nikola Veljkovic2014-12-251-3/+30
| | | | | | | DT_MIPS_RLD_MAP2 is used by the loader to communicate shared library information of a PIE to the GDB. Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com>
* Add MIPS specific changes to binutils 2.25 (prerelease) for MIPSR6 bug fixes,Steve Ellcey2014-12-182-17/+50
| | | | MXU support, and a fix to needed by gdbserver.
* [2.25] re-apply local patchesAndrew Hsieh2014-12-093-5/+25
| | | | | | | | | | | e0bca373a85fa71b89d9ea42370433b3c0499b9d 160ce55a90bcdcb3000d74805795969edc3f8422 b33d0ddc123435be5e60ebb15a37b3bfb651dc7e f25603579c0a04b3d5099259cf54c5b3c8775b78 1000fadfaa979b623e1fbd0c87858be4f5b6dffd 83cabeb81083ac53719eaaf68c48734ff9c48fa9 Change-Id: I15f9c78c69f4cfce7a617b7e9d91dd855b6d8efc
* [2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6Andrew Hsieh2014-12-09491-17287/+48691
| | | | | | | | | | | | local patches will be re-applied later commit a30720e3e633f275250e26f85ccae5dbdddfb6c6 Author: Alan Modra <amodra@gmail.com> Date: Wed Nov 19 10:30:16 2014 +1030 daily update Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab
* [2.24][2.25] Backport prevent user links ARM ELF binary into an AARCH64 ELF ↵Lai Wei-Chih2014-11-281-0/+3
| | | | | | | | | | | | | | | executable. Prevent the linker from generating a seg-fault when the user attempts to link an ARM ELF binary into an AARCH64 ELF executable. 2014-03-12 Nick Clifton <nickc@redhat.com> PR ld/16671 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format before testing for vxworks. Change-Id: Ibc81a168b85f70422d428d857b8de0c71e2824ed
* [2.25] apply local patchesAndrew Hsieh2014-06-133-5/+25
| | | | | | | | | | | | | | 7a17fb955bb42018c3c84e003700ac120c3502d4 b2a417bdb17191ef2afc20bbd308e308c0730403 e0bca373a85fa71b89d9ea42370433b3c0499b9d 57fbbfbda5a77b558c24a44e7eed8c4030c31bcd 160ce55a90bcdcb3000d74805795969edc3f8422 b33d0ddc123435be5e60ebb15a37b3bfb651dc7e f25603579c0a04b3d5099259cf54c5b3c8775b78 1000fadfaa979b623e1fbd0c87858be4f5b6dffd 83cabeb81083ac53719eaaf68c48734ff9c48fa9 Change-Id: I174be6632426ed720e643bca7c48a9077b31d34b
* Add upstream binutils-2.25 snapshot 4/4 2014Andrew Hsieh2014-06-13519-0/+741939
For MIPS -mmsa support Change-Id: I08c4f002fa7b33dec85ed75956e6ab551bb03c96