- Sep 21, 2019
-
-
Dan Albert authored
This was broken when I changed this API. ld can't be run from the arch-specific bin directory because this is missing. Test: Build, check that winpthread is copied Bug: None Change-Id: Ia01e88624b0e66edc5563c931bdfbea174d2a131
-
- Aug 09, 2019
-
-
Pirama Arumuga Nainar authored
Commit 325ba6fb34 excluded degenerate zero length PT_LOAD segments, but that only fixed part of the problem, which was that the load segment limits were not calculated properly. PR 22845 * elf.c (IS_TBSS): Define. (_bfd_elf_map_sections_to_segments): Use IS_TBSS. (assign_file_positions_for_non_load_sections): Revert last change. Properly calculate load segment limits to compare against relro limits. This change is backport of dbc88fc14992c556b94e77de563a8f7abcb0b653 - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=dbc88fc14992c556b94e77de563a8f7abcb0b653 to binutils-2.27. Bug: http://b/135627985 Change-Id: I793d6b1c8082bef1b1c46662d194790d5e7d7577
-
Pirama Arumuga Nainar authored
Fixes a failure triggered by -z separate-code. p_memsz is tested rather than p_filesz for objcopy --only-keep-debug where p_filesz is set to zero. PR 22845 * elf.c (assign_file_positions_for_non_load_sections): Ignore degenerate zero size PT_LOAD segments when finding one overlapping the PT_GNU_RELRO segment. This change is backport of commit 325ba6fb34be799c885fad9287d883e86b835c84 - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f to binutils-2.27. It is needed to cleanly cherry-pick dbc88fc14992c556b94e77de563a8f7abcb0b653. Bug: http://b/135627985 Change-Id: Ic860cd5fa2992214b45b3bd0c8c5f1a222973533
-
- Jul 03, 2019
-
-
Tiancong Wang authored
Gold linker by default turns on the --fix-arm1176 option. It has missing cases for TAG_CPU_ARCH_V8 and various other arm v8 architectures. The result of this causes gold using v4t stubs for arm v8 cpus, which results in measurable code-size and performance impact. See https://sourceware.org/bugzilla/show_bug.cgi?id=24642 for more details on the bug. This patches extend the condition to be any TAGs larger than v7, instead of checking the tag individually. It enables any future updates on the tags. All the tag are defined in include/elf/arm.h. Bug: b/134709902 Test: ./checkbuild.by passes, after the ../prebuilt/ndk/binutils is updated with newly built binutils. Change-Id: I66277f62db1b1377b19f0e6d056f3b2d0a6f129b
-
- Jun 13, 2019
-
-
Dan Albert authored
Test: ./build.py --arch arm64 --host windows64 Bug: None Exempt-From-Owner-Approval: janitorial Change-Id: I4403dd0e1d406b65577a3af0b96b9b4cb95c5c53
-
- Jun 04, 2019
-
-
Dan Albert authored
This function was removed since we're all Python 3 now. Test: ./build.py --arch arm64 --host linux Bug: None Change-Id: I35a9f9afa9eed4b74c365a73b653bddd64a11c0e
-
- Mar 23, 2019
-
-
Dan Albert authored
Test: ./build.py --arch arm64 --host win Bug: None Exempt-From-Owner-Approval: trivial janitorial changes Change-Id: I64b4a8caab872168e5a3a2dccb6a80abe9c839d9
-
- Nov 15, 2018
-
-
Dan Albert authored
Apparently their build scripts do not do this automatically. Test: ./build.py --arch arm64 --host linux Bug: https://issuetracker.google.com/118423828 Change-Id: I5bee38c76152b8b67360c61277b996b7ba3eee9e
-
Dan Albert authored
The Python libraries we depend on from the NDK are now Python 3. Test: ./build.py --arch arm64 --host linux Bug: None Change-Id: I7725069b37be531b43851f7bc37400493cff616d
-
- Oct 09, 2018
-
-
Pirama Arumuga Nainar authored
Bug: http://b/117439724 Without specifying alignment, if __CTOR_LIST__ is not aligned to 4 bytes, we end up with garbage after the -1. This causes access violations in __do_global_ctors. The 64-bit version aligns it to 8 bytes (ld/scrpittempl/pep.sc). Test: With this fix, AOSP Windows tools built with Clang + MinGW + libc++ no longer crash. Change-Id: I76be11a265cdcf272d740fa8715024f1f6df3e1b
-
- Jul 18, 2018
-
-
Yunlian Jiang authored
am: 49e1641c Change-Id: I6d0d2c56e1a860de81c6f140b90d26728d4fc333
-
- Jul 13, 2018
-
-
Yunlian Jiang authored
This option is intended to make gold not apply link-time values for absolution relocations which have dynamic relocations emitted for them, in order to workaround an android dynamic loader bug in old versions of android. Unfortunately, it also had the side-effect of breaking debug data, because the dynamic relocations are not used for non-ALLOC sections, but the flag was also suppressing the static relocation. This fix was proposed by jyknight@ and it fixed the problem by filtering out non-ALLOC sections with the --no-apply-dynamic-relocs option. BUG: 70838247 TEST: Debug info appears with --no-apply-dynamic-relocs
-
- Jul 12, 2018
-
-
Logan Chien authored
am: fcb56510 Change-Id: I1123440e0e3eda6ac467eb0a45a8152c694bda38
-
- Jul 10, 2018
-
-
Logan Chien authored
This commit replaces `std::make_pair<int, std::string>(dirindex, path)` with `std::make_pair(dirindex, path)` because C++11 replaces `std::make_pair<T, V>(T t, V v)` with `std::make_pair<T, V>(T &&t, V &&v)`. This commit removes explicit template arguments because forward references are only available during template arguments deduction. If the explicit template arguments are specified, the argument `t` and `v` will become R-value references, which can not bind to an L-value. Test: It builds with clang++ (or g++) with CXXFLAGS="-std=c++11" Change-Id: I79eb94552445354f7e7bff02169879195c7f6283
-
- Jun 20, 2018
-
-
James Greenhalgh authored
am: 726e32dc Change-Id: Iad6e3535a096c9b674fe72f3e135b980db353b9f
-
James Greenhalgh authored
Based on upstream change 1e2926 and 15a769. Bug: 110235326 Change-Id: Ieee5ad4cfb0aa21b46e918191215c4ce12248661
-
- Jun 02, 2018
-
-
Alan Modra authored
am: ee60eb7f Change-Id: I15268f7baa80a3b2e40788ba56bec78b66451070
-
Alan Modra authored
am: cce69c1b Change-Id: Ie1dfbaeb7c0a3c0be167215e8bd190be16af3b01
-
- Jun 01, 2018
-
-
Alan Modra authored
lld lays out the relro segment differently to GNU ld, not bothering to include the first few bytes of .got.plt and padding out to a page at the end of the segment. This patch teaches binutils to recognize the different (and somewhat inferior) layout as valid. bfd/ PR 22829 * elf.c (assign_file_positions_for_non_load_sections): Rewrite PT_GNU_RELRO setup. ld/ * testsuite/ld-x86-64/pr14207.d: Adjust relro p_filesz. This change is backport of commit f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f - https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=f2731e0c374e5323ce4cdae2bcc7b7fe22da1a6f to binutils-2.27. Change-Id: I9d598adb1a0ef4778f0f29d0faf19c7c8112a74a
-
- Apr 07, 2018
-
-
Ryan Prichard authored
am: 49f78f5d Change-Id: I0453330e4274ca698dfbaba0e63d004d4285cdf0
-
Ryan Prichard authored
am: 2485f18b Change-Id: Id8b65c16f617b6c4995a94a11002944c052b9dc2
-
- Apr 06, 2018
-
-
Ryan Prichard authored
Copy libwinpthread-1.dll alongside the binutils executables on Windows. The install_winpthreads function is copied from llvm_android: https://android.googlesource.com/toolchain/llvm_android/+/bd22d9779676661ae9571972dcd744c42c70ffd0/build.py#1063 Most C++ MinGW programs need libpthread, because even libstdc++'s "operator new" pulls in EH code, which calls into libpthread. Currently, the ld.gold.exe and dwp.exe binaries need libwinpthread-1.dll, which is not generally in the PATH, so the binaries don't run. Previously, the Android GCC build of binutils linked ld.gold.exe and dwp.exe with -static, which selected the static libpthread.a. Packaging libwinpthread-1.dll alongside the binaries ensures that ld.gold.exe and the LLVMgold plugin use the same copy of the winpthreads runtime, which might be important. Test: ./toolchain/binutils/build.py --arch arm64 --host win64 Test: ./toolchain/binutils/build.py --arch arm64 --host win Test: ./toolchain/binutils/build.py --arch arm64 --host linux Test: ./toolchain/binutils/build.py --arch x86 --host win64 Bug: none Change-Id: I5fc2d38b67c72fa4760be1c2688ef88479759160
-
- Mar 28, 2018
-
-
Rahul Chaudhry authored
am: 19df9bb8 Change-Id: I7d0adc629592f7785b44ea20fbedac0d53f50ee5
-
Rahul Chaudhry authored
am: b415c49e Change-Id: I483b208c1052e9a7d33881bd4ceee90605fadc7f
-
Rahul Chaudhry authored
Some cc files include both "gold.h" and "output.h", which makes the compiler on mac complain about redefinition of __STDC_FORMAT_MACROS. Change-Id: I11875d9b76d27449167485ae5f91f026acbda8e1
-
- Mar 27, 2018
-
-
Rahul Chaudhry authored
am: f1ff343f Change-Id: I2bebcd2a3a6fc88f8865dce8db6051a1b4344407
-
Rahul Chaudhry authored
am: 61006b81 Change-Id: I9d5b9c2f0f760e5833c66e9d2ec338350c3f9be8
-
Rahul Chaudhry authored
am: b162eb11 Change-Id: Ifda56cebb333499e72c5692cced93b0bd425d559
-
Rahul Chaudhry authored
am: b4a70cbe Change-Id: Iee9ed64d9af676334c861e08485b79119247cf5a
-
Rahul Chaudhry authored
If the relocation offset is odd, create the relocation in rela_dyn section instead of the relr_dyn section. Bug: None Test: Verified relocations after linking test binary with odd offset. Change-Id: If0d65176639bfb7401f7fb2dd43efc55c17670a4
-
Rahul Chaudhry authored
Print a more informative error message instead of asserting out. This prints errors for all the odd offsets before exiting gold. Bug: None Test: Verified error message on linking test binary with odd offset. Change-Id: Ib481a4983cac2e637b1128ea0559d9606e671c35
-
- Mar 16, 2018
-
-
Stephen Crane authored
am: 73fe135c Change-Id: I721a8cab09b24a6de1bdee0f47de584367c2885b
-
Stephen Crane authored
am: 41d8fcbb Change-Id: I5f394a221c1fa3e3efb92f7e9d8793545af37417
-
Stephen Crane authored
If a shared library contains an undefined symbol and LTO adds a new reference to that same undefined symbol, the reference in the new object added by the plugin would not trigger a rescan of the archive containing the symbol. 2017-11-17 Stephen Crane <sjc@immunant.com> gold/ PR gold/22448 * symtab.cc (Symbol_table::add_from_object): Only rescan for undefined symbols in regular, not dynamic, objects. This change is backport of commit 71739b698d47945463f183619078ff680c277f0f - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=71739b698d47945463f183619078ff680c277f0f to binutils-2.27. Change-Id: I9d926d8c56b02601785e18c88ef886ed2433c25b
-
- Mar 10, 2018
-
-
Ryan Prichard authored
am: 4c4cb9ac Change-Id: If19e50676576b73072b86f75a92d9ed646b7e258
-
Ryan Prichard authored
am: b01e31e3 Change-Id: I824423dc012b7ec47ac3a4a3866d4c1e6215cefe
-
- Mar 09, 2018
-
-
Ryan Prichard authored
The --disable-nls flag is also used to build gdb and gcc for Android. Adding it here prevents 428 *.mo files from being added to the next NDK release. (AFAICT, the SDK and NDK currently have no *.mo files.) It also fixes a sporadic build failure that can happen when binutils needs its bundled copy of libintl/gettext (see build 4635300 of ab/aosp-binutils or the linked issue). Test: ./toolchain/binutils/build.py --arch arm --host win Test: ./toolchain/binutils/build.py --arch arm --host win64 Test: ./toolchain/binutils/build.py --arch arm --host linux Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=22941 Change-Id: I0810406dc52f366fac7491676c2d5cb000fcfcaa
-
- Feb 28, 2018
-
-
Ryan Prichard authored
am: 808f4aae Change-Id: Ic9d4379eb08863289825d3d41be3836b3ca1846e
-
Ryan Prichard authored
am: 7b817cb1 Change-Id: I6fc48248643e41de96bfa5720b2f259d63b10fdb
-
Ryan Prichard authored
am: 1702a216 Change-Id: I1aa6eaa83794ec80861a833c5f6ca138d2adeb3a
-