From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58534 invoked by alias); 12 Jan 2017 17:45:55 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 58508 invoked by uid 9674); 12 Jan 2017 17:45:55 -0000 Date: Thu, 12 Jan 2017 17:45:00 -0000 Message-ID: <20170112174553.58343.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/dwarf5readelf-indexcxx-debugnames: Merge branch 'readelf-indexcxx' into readelf-indexcxx-debugnames X-Git-Refname: refs/heads/users/jkratoch/dwarf5readelf-indexcxx-debugnames X-Git-Reftype: branch X-Git-Oldrev: 3957561029ae9cf78a9c49d2d2ffd3d3a851f0c3 X-Git-Newrev: 2a6d38e0c7f1e6454847e30797c72a74c9eed52d X-SW-Source: 2017-q1/txt/msg00022.txt.bz2 List-Id: The branch, users/jkratoch/dwarf5readelf-indexcxx-debugnames has been updated via 2a6d38e0c7f1e6454847e30797c72a74c9eed52d (commit) via 747f8a06b7cc14a469b0dc06a979efe59b8b941b (commit) via 72fd5bdde06e30104d82167f4137d8931d855a9c (commit) via 70b6d66ecdd50daedb75677577f5fd3cc64d1f12 (commit) via 2425a30e406a0523020b7e70abb864a06a45bb97 (commit) via 620214f742f7816e2844e1bb7f78a7a684431927 (commit) via 3015c06465584a437261c65a397fbd8f1a71aae7 (commit) via fde1b17d37fd5557a22948d500bb5f4b6ef5d089 (commit) via ca1ca08b0893eb6ec530db0cc7e12537417244fa (commit) via 1181551ef0a9a7f611a3d1130d2b284280882870 (commit) via d95014a2ef6e9aee927c13960fa37e509d46eb32 (commit) via eed0b5b26320bfcdb858a6b889dffe4f037f814d (commit) via 6624f3a142811450fab7eed1f406c4a030c3c9be (commit) via 976e204b369fd01f9d35d87ea2cd07707c3a40cf (commit) via 1fa5f68bf38fc29f173990614db70fed1b66c0e0 (commit) via 9e65917652e994b0864b344bfa47014155d93100 (commit) via 4ad2da7317c11fbf09e8feb9948b446d30ba9ec2 (commit) via f2e2d2f54b462db40efac449f4d7724ae4728fe5 (commit) via c8b23b3f89fbb0ed28d6b78f775b0038d8604798 (commit) via 1ac32117f7224620f44ac966b5ca53df6e4fc5bd (commit) via 0cf082277804ba3747be70a4013019f68b92bb84 (commit) via eb115069323087e15210c09e3b581be0f6fb5852 (commit) via 906768f970826102252e8cfd30ee72da71de29f7 (commit) via bef155c3e8a995fcdb1c2ba5aba012eb653d9f30 (commit) via 192b62ce0b4bb5c61188f570e127a26d2c32f716 (commit) via 50315b21779d71c172eb98a786a9b8281622e407 (commit) via fc4007c969ec4208fb7c7cee2f50211a9aa0f40f (commit) via 8dbcee674ea4a8daa55f880ad7ade96efca96951 (commit) via 13df46cc0f340253e8a7bd984d1e4f38f29eec2d (commit) via 06fc9bf7d92d0bc857f3e8c109686f36aea5509c (commit) via 830a493402da4a055bf2d34ab300a83305391095 (commit) via 4586d54305ed275bb909f3373a7372c02d7e579e (commit) via 59876f8f9f32081b2831aed83a03a815e8d85a97 (commit) via 97d83487d5fbffd04d68a049f97009e1df2562a3 (commit) via 9205649a38c609a42ba52680a316fceaa08c1543 (commit) via 74c49d454b81c84fcffbc090466e241bdefd2f3a (commit) via 16361ffbd145c877952f3c124c247460a6005d26 (commit) via 905f2ccab1b7070c7953e9f12de638e2dc147a9a (commit) via 64081434cce13f38288d82d3d31b6199e9deff4a (commit) via 59e9e83119a528f17afea89ee22195a95322c6d6 (commit) via 9de10f6d53dffbec12cec9843662d5764526983d (commit) via 2bd5759dcb71adfb26b1c7cf20b3b032af29b845 (commit) via 3b4e0e01f8b19269d720948ee2350cb753f8ede4 (commit) via 17a22718b113a220de121ef4211fc3990d9b1745 (commit) via 68cdc55720bbe34d9d844ef2a0c4d75fcab4bc99 (commit) via 1eba63835ea23cbae6059c076db985a47e39ce24 (commit) via bde7b3e3a0d5e1f0b66730d692b21c98a8686f75 (commit) via a7785f8c797183eb363e95c201343df67d8536c6 (commit) via 2865bfce3875fa16046b0a987d98ab19fc8bbb9a (commit) via 0e9dcc758786feaaaf5026c6e59af42b30a35d36 (commit) via 12a5cedd4f2c5b1f4e303efda6f8ac3e06eec944 (commit) via 788f258604773ccbe9ccba71f9b1725930324275 (commit) via 6cd67beaae58c9e870b79feea3cf74ffdf7a9b33 (commit) via 14b122bf1ce59f5f1b82f6e2a347f4ad89801f45 (commit) via bf1ca3b9476185fb6e301d85e646f5d2af95e257 (commit) via 572a5524c1eb50d8064a44108fd0ef22a0e63bf8 (commit) via 396a78b6271c45410fc22c4bc7f8cff75da3d153 (commit) via a88b13c7e36e8eb0a3bf772d508380682536c0da (commit) via e9f0c3639f33dc76fcab1b9299209c29ef2ee26e (commit) via 6349f452e01ddb7a1e64b8a63c93a9c9abc95725 (commit) via c0171de646ddd85bac9d4bb1ebdf601f7ba7eeab (commit) via f18e226ff84f7fba9ce7197ed7a2969eba231b4d (commit) via c57af3f12b91ca49adc2e06056f794cb09514897 (commit) via 60e600ec691255536ae53e365d0410ecf79bdea2 (commit) via bf7da5b06ffbbaa40c8a2900727a791265f897ea (commit) via 2d38bcedc2f91692857d257e106dafc9269d8f1a (commit) via 07bc7329128028e6d3e2733c6d2ebd874367bcee (commit) via 6e7c365ee0ea2551f9f840b71081fdf759088b5e (commit) via 6ba0cd406511d3edbe643f5e599d79538febedc5 (commit) via de2dc875c2ddb731741f3c326545ff91fd587dd5 (commit) via 4ecee2c47da3e91c0571683acb5cfb8400402663 (commit) via 37fce74fb42f45ec340962170a4b297beede733a (commit) via 53a0cca3bd0f6ae80b2d6fc34b2873046965c7f0 (commit) via ff3724f5123b9d9c52a07f7c1a5d85852e666c48 (commit) via 0700aea50c7a77d7908868373d0f9644b0ece29c (commit) via 1bb44c9f567c75355c1b4417d88cda959e82a3a3 (commit) via 87ce03fdc5a94f48fe62580410a099c0a0f68ee0 (commit) via ee0a3fb85b33b172f704796612c4487ea368d675 (commit) via bf2a52fa2ac2c4486653993a765fd922b3cd64a6 (commit) via f59fe7f8e3e55472e6fcfb06677ff4925dad1f64 (commit) via 80bd970a4b1388fc4373b3e087006e6c93d71f60 (commit) via d1b3de2e43380a0c51772a40315cd2268573d985 (commit) via 3bb4338431288002c2225ff660e1500818684c16 (commit) via abf5651e47c0396df58a37951bc03a349169c5f2 (commit) via a68ff33e0dcb4733584265088030d12a31e740e4 (commit) via 0b67023188fef926357f0fd27e600195ab35727e (commit) via 52b232b366355b1d0a9d2721e55a6b2b96789b00 (commit) via 59a1e29d9e1fc7ed31e66d51899ada46e5dd9a56 (commit) via fff53daefb7838b5718422c87946330e4a8288ce (commit) via 5edad15d7c1e6a2409102b3426b444d6ea98bdfc (commit) via f129e49f4d07f4d36319ac757fdcf3a8ce7d605b (commit) via e92372274e77fc0ce87f35a833de8a60d733580a (commit) via 7becfd03bad526c02216eeb5ec2bebae694b1af1 (commit) via 98461510d3a8cefa6603980294bfc647cddcab97 (commit) via df2946549f60624503663cc6c28cd5a6ef0ab434 (commit) via 1a94eb29d0dd72e6c34bb2d32927c510d16e4c00 (commit) via b972a0d61a8b6e1dc3f9baf93ef3e57c7bfb9715 (commit) via 07e8e62387eb914b29cbf79f468db89fa4e57b3f (commit) via 07ccf83cf5424d019ab091a7bac0fee26564e420 (commit) via 74def31dcd248441a49755721da81ca73d99c4fb (commit) via f7fd19e2b83c06cf1590d2ac8d0e9fc1ea4739c2 (commit) via f159cdb61155d699f5aff2a9fbad8b787a7fe10c (commit) via eaa38cfd42fe323fb7868e676ced7419bc5eec12 (commit) via a4fb5981b7ec3d4006e93141afb1d0da566bb97b (commit) via 694b382c67a4fc656f30acbc74776c5e9cb53622 (commit) via a5ec5e3fe1b8fe1395c79ff29052edad91266a76 (commit) via e294484ee7e8dea53d091443a0f24c7939ac15ed (commit) via 6ec11ab97ab47ec4a22118e5b1c77df567796002 (commit) via cd6581da62c32a391f9a4c2c5d248a11aa6fa8f7 (commit) via 20b52c88ea31f8a0af60d6172ab0da5f2ad616ee (commit) via 98f02962fefbacf1b805e93fb7bddeb58ec6ff70 (commit) via 011561117eeaff00862eb5f465c3470f29e8a9a9 (commit) via 3254d32c4b47f17a7d609f25394fbfb2313f09ff (commit) via 4d74727a4a41e811950dcd0bed7bc6747a068886 (commit) via a631dd7b79e7dd670995d2c9b58577b1d1a29795 (commit) from 3957561029ae9cf78a9c49d2d2ffd3d3a851f0c3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 2a6d38e0c7f1e6454847e30797c72a74c9eed52d Merge: 3957561 747f8a0 Author: Jan Kratochvil Date: Thu Jan 12 18:43:05 2017 +0100 Merge branch 'readelf-indexcxx' into readelf-indexcxx-debugnames ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 93 + bfd/bfd-in2.h | 2 + bfd/coffgen.c | 7 +- bfd/config.bfd | 10 + bfd/dwarf2.c | 12 +- bfd/elf32-i386.c | 120 +- bfd/elf64-x86-64.c | 178 +- bfd/opncls.c | 373 +- bfd/version.h | 2 +- binutils/ChangeLog | 27 + binutils/ChangeLog-2016 | 3 + binutils/NEWS | 4 + binutils/deflex.l | 2 +- binutils/objdump.c | 22 +- binutils/readelf.c | 4 +- binutils/stabs.c | 2 +- binutils/testsuite/binutils-all/objdump.exp | 80 + gas/ChangeLog | 77 + gas/config/tc-i386.c | 3 + gas/config/tc-riscv.c | 16 +- gas/configure | 2 +- gas/configure.ac | 2 +- gas/configure.tgt | 1 + gas/doc/c-i386.texi | 4 +- gas/po/sv.po |19974 ++++++++++++++++++++ gas/read.c | 58 +- gas/read.h | 2 + gas/stabs.c | 47 +- gas/testsuite/gas/all/gas.exp | 1 + gas/testsuite/gas/all/sleb128-8.d | 7 + gas/testsuite/gas/all/sleb128-8.s | 2 + gas/testsuite/gas/i386/avx512_vpopcntdq-intel.d | 68 + gas/testsuite/gas/i386/avx512_vpopcntdq.d | 68 + gas/testsuite/gas/i386/avx512_vpopcntdq.s | 63 + gas/testsuite/gas/i386/i386.exp | 4 + .../gas/i386/x86-64-avx512_vpopcntdq-intel.d | 68 + gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.d | 68 + gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.s | 63 + gdb/ChangeLog | 556 + gdb/breakpoint.c | 2 +- gdb/build-id.c | 30 +- gdb/build-id.h | 6 +- gdb/cli-out.c | 4 +- gdb/cli-out.h | 2 +- gdb/cli/cli-decode.c | 2 +- gdb/cli/cli-dump.c | 55 +- gdb/cli/cli-logging.c | 15 +- gdb/coffread.c | 6 +- gdb/command.h | 2 +- gdb/common/gdb_ref_ptr.h | 221 + gdb/common/gdb_unlinker.h | 60 + gdb/compile/compile-c-symbols.c | 11 +- gdb/compile/compile-object-load.c | 20 +- gdb/corelow.c | 14 +- gdb/cp-name-parser.y | 39 +- gdb/cp-support.c | 52 +- gdb/cp-support.h | 11 +- gdb/disasm.c | 14 +- gdb/dwarf2-frame.c | 5 +- gdb/dwarf2loc.c | 185 +- gdb/dwarf2read.c | 224 +- gdb/elfread.c | 17 +- gdb/exec.c | 12 +- gdb/gcore.c | 48 +- gdb/gcore.h | 4 +- gdb/gdb_bfd.c | 30 +- gdb/gdb_bfd.h | 81 +- gdb/gdbserver/ChangeLog | 7 + gdb/gdbserver/linux-aarch32-low.c | 4 +- gdb/gdbserver/linux-arm-low.c | 5 +- gdb/gnu-v3-abi.c | 12 +- gdb/guile/guile.c | 2 +- gdb/guile/scm-ports.c | 6 +- gdb/jit.c | 30 +- gdb/linespec.c | 28 +- gdb/linux-nat.c | 5 +- gdb/machoread.c | 76 +- gdb/mi/mi-out.c | 4 +- gdb/mi/mi-out.h | 2 +- gdb/minidebug.c | 8 +- gdb/procfs.c | 11 +- gdb/psympriv.h | 36 +- gdb/psymtab.c | 38 - gdb/python/py-arch.c | 29 +- gdb/python/py-bpevent.c | 23 +- gdb/python/py-breakpoint.c | 47 +- gdb/python/py-cmd.c | 133 +- gdb/python/py-continueevent.c | 9 +- gdb/python/py-event.c | 28 +- gdb/python/py-event.h | 4 +- gdb/python/py-exitedevent.c | 49 +- gdb/python/py-finishbreakpoint.c | 17 +- gdb/python/py-framefilter.c | 311 +- gdb/python/py-function.c | 59 +- gdb/python/py-inferior.c | 115 +- gdb/python/py-infevents.c | 138 +- gdb/python/py-lazy-string.c | 9 +- gdb/python/py-linetable.c | 51 +- gdb/python/py-newobjfileevent.c | 52 +- gdb/python/py-objfile.c | 8 +- gdb/python/py-param.c | 104 +- gdb/python/py-prettyprint.c | 355 +- gdb/python/py-progspace.c | 4 +- gdb/{gcore.h => python/py-ref.h} | 34 +- gdb/python/py-signalevent.c | 27 +- gdb/python/py-stopevent.c | 54 +- gdb/python/py-symbol.c | 18 +- gdb/python/py-threadevent.c | 19 +- gdb/python/py-type.c | 206 +- gdb/python/py-unwind.c | 77 +- gdb/python/py-utils.c | 91 +- gdb/python/py-value.c | 105 +- gdb/python/py-varobj.c | 36 +- gdb/python/py-xmethods.c | 378 +- gdb/python/python-internal.h | 42 +- gdb/python/python.c | 447 +- gdb/record-full.c | 54 +- gdb/remote.c | 3 +- gdb/serial.c | 6 +- gdb/solib-aix.c | 65 +- gdb/solib-darwin.c | 65 +- gdb/solib-dsbt.c | 23 +- gdb/solib-frv.c | 28 +- gdb/solib-spu.c | 35 +- gdb/solib-svr4.c | 31 +- gdb/solib.c | 48 +- gdb/solist.h | 7 +- gdb/spu-linux-nat.c | 38 +- gdb/stack.c | 4 +- gdb/symfile-mem.c | 7 +- gdb/symfile.c | 81 +- gdb/symfile.h | 5 +- gdb/top.c | 13 +- gdb/ui-out.c | 4 +- gdb/ui-out.h | 4 +- gdb/utils.c | 33 +- gdb/utils.h | 14 +- gdb/value.h | 32 + gdb/varobj.c | 83 +- gdb/varobj.h | 2 - gdb/windows-nat.c | 19 +- gdb/windows-tdep.c | 6 +- gold/ChangeLog | 80 + gold/aarch64.cc | 6 +- gold/arm.cc | 6 +- gold/object.h | 7 + gold/options.h | 3 + gold/powerpc.cc | 602 +- gold/reloc.cc | 73 +- gold/testsuite/copy_test_relro.cc | 45 +- gold/testsuite/copy_test_relro_1.cc | 14 +- gold/testsuite/script_test_13.sh | 2 +- gold/testsuite/script_test_15a.sh | 4 +- gold/testsuite/script_test_15b.sh | 4 +- gold/testsuite/script_test_15c.sh | 4 +- gold/testsuite/ver_test_8.sh | 6 +- gold/x86_64.cc | 42 +- ld/ChangeLog | 59 + ld/Makefile.am | 6 + ld/Makefile.in | 7 + ld/configure.tgt | 8 +- ld/emulparams/arc-nps.sh | 78 + ld/emulparams/arclinux_nps.sh | 3 + ld/emulparams/elf32_x86_64.sh | 4 + ld/emulparams/elf32lriscv-defs.sh | 12 - ld/po/sv.po | 2261 ++- ld/testsuite/ld-arc/arclinux-nps.d | 50 + ld/testsuite/ld-arc/arclinux-nps.s | 46 + ld/testsuite/ld-i386/i386.exp | 5 +- ld/testsuite/ld-i386/pr20830.d | 60 + ld/testsuite/ld-i386/pr20830.s | 8 + ld/testsuite/ld-i386/tls.exp | 6 +- ld/testsuite/ld-x86-64/pr20830.s | 8 + ld/testsuite/ld-x86-64/pr20830a.d | 72 + ld/testsuite/ld-x86-64/pr20830b.d | 60 + ld/testsuite/ld-x86-64/pr21038a.d | 71 + ld/testsuite/ld-x86-64/pr21038a.s | 8 + ld/testsuite/ld-x86-64/pr21038b.d | 64 + ld/testsuite/ld-x86-64/pr21038b.s | 7 + ld/testsuite/ld-x86-64/x86-64.exp | 4 + opcodes/ChangeLog | 23 + opcodes/i386-dis-evex.h | 13 +- opcodes/i386-dis.c | 2 + opcodes/i386-gen.c | 7 +- opcodes/i386-init.h | 278 +- opcodes/i386-opc.h | 3 + opcodes/i386-opc.tbl | 10 +- opcodes/i386-tbl.h |10450 +++++----- opcodes/msp430-dis.c | 103 +- sim/aarch64/ChangeLog | 4 + sim/aarch64/simulator.c | 68 +- sim/testsuite/sim/aarch64/ChangeLog | 4 + sim/testsuite/sim/aarch64/uzp.s | 214 + 193 files changed, 32891 insertions(+), 9423 deletions(-) create mode 100644 gas/po/sv.po create mode 100644 gas/testsuite/gas/all/sleb128-8.d create mode 100644 gas/testsuite/gas/all/sleb128-8.s create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq-intel.d create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq.d create mode 100644 gas/testsuite/gas/i386/avx512_vpopcntdq.s create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.d create mode 100644 gas/testsuite/gas/i386/x86-64-avx512_vpopcntdq.s create mode 100644 gdb/common/gdb_ref_ptr.h create mode 100644 gdb/common/gdb_unlinker.h copy gdb/{gcore.h => python/py-ref.h} (54%) create mode 100644 ld/emulparams/arc-nps.sh create mode 100644 ld/emulparams/arclinux_nps.sh create mode 100644 ld/testsuite/ld-arc/arclinux-nps.d create mode 100644 ld/testsuite/ld-arc/arclinux-nps.s create mode 100644 ld/testsuite/ld-i386/pr20830.d create mode 100644 ld/testsuite/ld-i386/pr20830.s create mode 100644 ld/testsuite/ld-x86-64/pr20830.s create mode 100644 ld/testsuite/ld-x86-64/pr20830a.d create mode 100644 ld/testsuite/ld-x86-64/pr20830b.d create mode 100644 ld/testsuite/ld-x86-64/pr21038a.d create mode 100644 ld/testsuite/ld-x86-64/pr21038a.s create mode 100644 ld/testsuite/ld-x86-64/pr21038b.d create mode 100644 ld/testsuite/ld-x86-64/pr21038b.s create mode 100644 sim/testsuite/sim/aarch64/uzp.s First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f238d86..6705ae4 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,96 @@ +2017-01-12 Nick Clifton + + PR binutils/20876 + * opncls.c (find_separate_debug_file): Add include_dirs + parameter. Only include the directory part of the bfd's filename + in search paths if include_dirs is true. Add a couple of extra + locations for looking for debug files. + ( bfd_follow_gnu_debuglink): Update invocation of + find_separate_debug_file. + (bfd_follow_gnu_debugaltlink): Likewise. + (get_build_id): New function: Finds the build-id of the given bfd. + (get_build_id_name): New function: Computes the name of the + separate debug info file for a bfd, based upon its build-id. + (check_build_id_file): New function: Checks to see if a separate + debug info file exists at the given location, and that its + build-id matches that of the original bfd. + (bfd_follow_build_id_debuglink): New function: Finds a separate + debug info file for a given bfd by using the build-id method. + * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id + method of locating a separate debug info file before using the + debuglink method. + * bfd-in2.h: Regenerate. + +2017-01-11 H.J. Lu + + PR ld/21038 + * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New. + (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and + elf_x86_64_eh_frame_plt_got. + (elf_x86_64_size_dynamic_sections): Get unwind info from + elf_x86_64_bnd_arch_bed for the BND PLT. + +2017-01-11 Jeremy Soller + + * config.bfd: Add entries for i686-redox and x86_64-redox. + +2017-01-10 H.J. Lu + + * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section + to 4 bytes. + * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align + .eh_frame section to 4 bytes for x32. + (elf_x86_64_check_relocs): Likewise. + +2017-01-10 H.J. Lu + + PR ld/20830 + * elf32-i386.c (elf_i386_eh_frame_plt_got): New. + (PLT_GOT_FDE_LENGTH): Likewise. + (elf_i386_plt_layout): Add eh_frame_plt_got and + eh_frame_plt_got_size. + (elf_i386_plt): Updated. + (elf_i386_link_hash_table): Add plt_got_eh_frame. + (elf_i386_check_relocs): Create .eh_frame section for .plt.got. + (elf_i386_size_dynamic_sections): Allocate and initialize + .eh_frame section for .plt.got. + (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for + .plt.got. + (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and + eh_frame_plt_got_size. + * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New. + (PLT_GOT_FDE_LENGTH): Likewise. + (elf_x86_64_backend_data): Add eh_frame_plt_got and + eh_frame_plt_got_size. + (elf_x86_64_arch_bed): Updated. + (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and + eh_frame_plt_got_size. + (elf_x86_64_nacl_arch_bed): Likewise. + (elf_x86_64_link_hash_table): Add plt_got_eh_frame. + (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got. + (elf_x86_64_size_dynamic_sections): Allocate and initialize + .eh_frame section for .plt.got. + (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section + for .plt.got. + +2017-01-10 H.J. Lu + + * elf32-i386.c (elf_i386_size_dynamic_sections): Set + plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt. + +2017-01-09 Nick Clifton + + * dwarf2.c (lookup_address_in_function_table): Return early if + there are no functions in the given comp unit, or if the high + address of the last function in the comp unit is less than the + desired address. + +2017-01-09 Nick Clifton + + PR binutils/21013 + * coffgen.c (_bfd_coff_get_external_symbols): Generate an error + message if there are too many symbols to load. + 2017-01-04 James Clarke * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 2930089..80d60cb 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1121,6 +1121,8 @@ struct bfd_section *bfd_create_gnu_debuglink_section bfd_boolean bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename); +char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); + /* Extracted from libbfd.c. */ /* Byte swapping macros for user section data. */ diff --git a/bfd/coffgen.c b/bfd/coffgen.c index d2cc591..5a61f6d 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -1643,7 +1643,12 @@ _bfd_coff_get_external_symbols (bfd *abfd) syms = bfd_malloc (size); if (syms == NULL) - return FALSE; + { + /* PR 21013: Provide an error message when the alloc fails. */ + _bfd_error_handler (_("%B: Not enough memory to allocate space for %lu symbols"), + abfd, size); + return FALSE; + } if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 || bfd_bread (syms, size, abfd) != size) diff --git a/bfd/config.bfd b/bfd/config.bfd index 6b93b51..d824065 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -760,6 +760,11 @@ case "${targ}" in targ64_selvecs="x86_64_elf64_nacl_vec x86_64_elf32_nacl_vec" targ_archs="$targ_archs bfd_arm_arch" ;; + i[3-7]86-*-redox*) + targ_defvec=i386_elf32_vec + targ_selvecs= + targ64_selvecs=x86_64_elf64_vec + ;; #ifdef BFD64 x86_64-*-cloudabi*) targ_defvec=x86_64_elf64_cloudabi_vec @@ -817,6 +822,11 @@ case "${targ}" in targ_defvec=x86_64_elf64_vec want64=true ;; + x86_64-*-redox*) + targ_defvec=x86_64_elf64_vec + targ_selvecs=i386_elf32_vec + want64=true + ;; #endif i[3-7]86-*-lynxos*) targ_defvec=i386_elf32_vec diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index b477d27..3699587 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -2336,9 +2336,15 @@ lookup_address_in_function_table (struct comp_unit *unit, bfd_size_type low, high, mid, first; struct arange *arange; + if (number_of_functions == 0) + return FALSE; + if (!build_lookup_funcinfo_table (unit)) return FALSE; + if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr) + return FALSE; + /* Find the first function in the lookup table which may contain the specified address. */ low = 0; @@ -3915,7 +3921,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, msec = find_debug_info (debug_bfd, debug_sections, NULL); if (msec == NULL && abfd == debug_bfd) { - char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR); + char * debug_filename; + + debug_filename = bfd_follow_build_id_debuglink (abfd, DEBUGDIR); + if (debug_filename == NULL) + debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR); if (debug_filename == NULL) /* No dwarf2 info, and no gnu_debuglink to follow. diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index e977dd7..0860ada 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -648,6 +648,32 @@ static const bfd_byte elf_i386_eh_frame_plt[] = DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop }; +/* .eh_frame covering the .plt.got section. */ + +static const bfd_byte elf_i386_eh_frame_plt_got[] = +{ +#define PLT_GOT_FDE_LENGTH 16 + PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */ + 0, 0, 0, 0, /* CIE ID */ + 1, /* CIE version */ + 'z', 'R', 0, /* Augmentation string */ + 1, /* Code alignment factor */ + 0x7c, /* Data alignment factor */ + 8, /* Return address column */ + 1, /* Augmentation size */ + DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */ + DW_CFA_def_cfa, 4, 4, /* DW_CFA_def_cfa: r4 (esp) ofs 4 */ + DW_CFA_offset + 8, 1, /* DW_CFA_offset: r8 (eip) at cfa-4 */ + DW_CFA_nop, DW_CFA_nop, + + PLT_GOT_FDE_LENGTH, 0, 0, 0, /* FDE length */ + PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */ + 0, 0, 0, 0, /* the start of .plt.got goes here */ + 0, 0, 0, 0, /* .plt.got size goes here */ + 0, /* Augmentation size */ + DW_CFA_nop, DW_CFA_nop, DW_CFA_nop +}; + struct elf_i386_plt_layout { /* The first entry in an absolute procedure linkage table looks like this. */ @@ -679,6 +705,10 @@ struct elf_i386_plt_layout /* .eh_frame covering the .plt section. */ const bfd_byte *eh_frame_plt; unsigned int eh_frame_plt_size; + + /* .eh_frame covering the .plt.got section. */ + const bfd_byte *eh_frame_plt_got; + unsigned int eh_frame_plt_got_size; }; #define GET_PLT_ENTRY_SIZE(abfd) \ @@ -701,6 +731,8 @@ static const struct elf_i386_plt_layout elf_i386_plt = elf_i386_pic_plt_entry, /* pic_plt_entry */ elf_i386_eh_frame_plt, /* eh_frame_plt */ sizeof (elf_i386_eh_frame_plt), /* eh_frame_plt_size */ + elf_i386_eh_frame_plt_got, /* eh_frame_plt_got */ + sizeof (elf_i386_eh_frame_plt_got), /* eh_frame_plt_got_size */ }; @@ -850,6 +882,7 @@ struct elf_i386_link_hash_table asection *interp; asection *plt_eh_frame; asection *plt_got; + asection *plt_got_eh_frame; union { @@ -2347,6 +2380,24 @@ do_size: htab->plt_got, plt_got_align)) goto error_return; + + if (!info->no_ld_generated_unwind_info + && htab->plt_got_eh_frame == NULL + && get_elf_i386_backend_data (abfd)->plt->eh_frame_plt_got != NULL) + { + flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY + | SEC_HAS_CONTENTS | SEC_IN_MEMORY + | SEC_LINKER_CREATED); + htab->plt_got_eh_frame + = bfd_make_section_anyway_with_flags (htab->elf.dynobj, + ".eh_frame", + flags); + if (htab->plt_got_eh_frame == NULL + || !bfd_set_section_alignment (htab->elf.dynobj, + htab->plt_got_eh_frame, + 2)) + goto error_return; + } } if (r_type == R_386_GOT32X @@ -3379,13 +3430,22 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) htab->elf.sgotplt->size = 0; } - - if (htab->plt_eh_frame != NULL - && htab->elf.splt != NULL - && htab->elf.splt->size != 0 - && !bfd_is_abs_section (htab->elf.splt->output_section) - && _bfd_elf_eh_frame_present (info)) - htab->plt_eh_frame->size = sizeof (elf_i386_eh_frame_plt); + if (_bfd_elf_eh_frame_present (info)) + { + if (htab->plt_eh_frame != NULL + && htab->elf.splt != NULL + && htab->elf.splt->size != 0 + && !bfd_is_abs_section (htab->elf.splt->output_section)) + htab->plt_eh_frame->size + = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_size; + + if (htab->plt_got_eh_frame != NULL + && htab->plt_got != NULL + && htab->plt_got->size != 0 + && !bfd_is_abs_section (htab->plt_got->output_section)) + htab->plt_got_eh_frame->size + = get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got_size; + } /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ @@ -3414,6 +3474,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) || s == htab->elf.igotplt || s == htab->plt_got || s == htab->plt_eh_frame + || s == htab->plt_got_eh_frame || s == htab->elf.sdynbss || s == htab->elf.sdynrelro) { @@ -3468,12 +3529,24 @@ elf_i386_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) if (htab->plt_eh_frame != NULL && htab->plt_eh_frame->contents != NULL) { - memcpy (htab->plt_eh_frame->contents, elf_i386_eh_frame_plt, - sizeof (elf_i386_eh_frame_plt)); + memcpy (htab->plt_eh_frame->contents, + get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt, + htab->plt_eh_frame->size); bfd_put_32 (dynobj, htab->elf.splt->size, htab->plt_eh_frame->contents + PLT_FDE_LEN_OFFSET); } + if (htab->plt_got_eh_frame != NULL + && htab->plt_got_eh_frame->contents != NULL) + { + memcpy (htab->plt_got_eh_frame->contents, + get_elf_i386_backend_data (output_bfd)->plt->eh_frame_plt_got, + htab->plt_got_eh_frame->size); + bfd_put_32 (dynobj, htab->plt_got->size, + (htab->plt_got_eh_frame->contents + + PLT_FDE_LEN_OFFSET)); + } + if (htab->elf.dynamic_sections_created) { /* Add some entries to the .dynamic section. We fill in the @@ -5883,6 +5956,33 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, } } + /* Adjust .eh_frame for .plt.got section. */ + if (htab->plt_got_eh_frame != NULL + && htab->plt_got_eh_frame->contents != NULL) + { + if (htab->plt_got != NULL + && htab->plt_got->size != 0 + && (htab->plt_got->flags & SEC_EXCLUDE) == 0 + && htab->plt_got->output_section != NULL + && htab->plt_got_eh_frame->output_section != NULL) + { + bfd_vma plt_start = htab->plt_got->output_section->vma; + bfd_vma eh_frame_start = htab->plt_got_eh_frame->output_section->vma + + htab->plt_got_eh_frame->output_offset + + PLT_FDE_START_OFFSET; + bfd_put_signed_32 (dynobj, plt_start - eh_frame_start, + htab->plt_got_eh_frame->contents + + PLT_FDE_START_OFFSET); + } + if (htab->plt_got_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME) + { + if (! _bfd_elf_write_section_eh_frame (output_bfd, info, + htab->plt_got_eh_frame, + htab->plt_got_eh_frame->contents)) + return FALSE; + } + } + if (htab->elf.sgot && htab->elf.sgot->size > 0) elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4; @@ -6426,6 +6526,8 @@ static const struct elf_i386_plt_layout elf_i386_nacl_plt = elf_i386_nacl_pic_plt_entry, /* pic_plt_entry */ elf_i386_nacl_eh_frame_plt, /* eh_frame_plt */ sizeof (elf_i386_nacl_eh_frame_plt),/* eh_frame_plt_size */ + NULL, /* eh_frame_plt_got */ + 0, /* eh_frame_plt_got_size */ }; static const struct elf_i386_backend_data elf_i386_nacl_arch_bed = diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 36630f8..1fb865c 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -659,6 +659,68 @@ static const bfd_byte elf_x86_64_eh_frame_plt[] = DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop }; +/* .eh_frame covering the BND .plt section. */ + +static const bfd_byte elf_x86_64_eh_frame_bnd_plt[] = +{ + PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */ + 0, 0, 0, 0, /* CIE ID */ + 1, /* CIE version */ + 'z', 'R', 0, /* Augmentation string */ + 1, /* Code alignment factor */ + 0x78, /* Data alignment factor */ + 16, /* Return address column */ + 1, /* Augmentation size */ + DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */ + DW_CFA_def_cfa, 7, 8, /* DW_CFA_def_cfa: r7 (rsp) ofs 8 */ + DW_CFA_offset + 16, 1, /* DW_CFA_offset: r16 (rip) at cfa-8 */ + DW_CFA_nop, DW_CFA_nop, + + PLT_FDE_LENGTH, 0, 0, 0, /* FDE length */ + PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */ + 0, 0, 0, 0, /* R_X86_64_PC32 .plt goes here */ + 0, 0, 0, 0, /* .plt size goes here */ + 0, /* Augmentation size */ + DW_CFA_def_cfa_offset, 16, /* DW_CFA_def_cfa_offset: 16 */ + DW_CFA_advance_loc + 6, /* DW_CFA_advance_loc: 6 to __PLT__+6 */ + DW_CFA_def_cfa_offset, 24, /* DW_CFA_def_cfa_offset: 24 */ + DW_CFA_advance_loc + 10, /* DW_CFA_advance_loc: 10 to __PLT__+16 */ + DW_CFA_def_cfa_expression, /* DW_CFA_def_cfa_expression */ + 11, /* Block length */ + DW_OP_breg7, 8, /* DW_OP_breg7 (rsp): 8 */ + DW_OP_breg16, 0, /* DW_OP_breg16 (rip): 0 */ + DW_OP_lit15, DW_OP_and, DW_OP_lit5, DW_OP_ge, + DW_OP_lit3, DW_OP_shl, DW_OP_plus, + DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop +}; + +/* .eh_frame covering the .plt.got section. */ + +static const bfd_byte elf_x86_64_eh_frame_plt_got[] = +{ +#define PLT_GOT_FDE_LENGTH 20 + PLT_CIE_LENGTH, 0, 0, 0, /* CIE length */ + 0, 0, 0, 0, /* CIE ID */ + 1, /* CIE version */ + 'z', 'R', 0, /* Augmentation string */ + 1, /* Code alignment factor */ + 0x78, /* Data alignment factor */ + 16, /* Return address column */ + 1, /* Augmentation size */ + DW_EH_PE_pcrel | DW_EH_PE_sdata4, /* FDE encoding */ + DW_CFA_def_cfa, 7, 8, /* DW_CFA_def_cfa: r7 (rsp) ofs 8 */ + DW_CFA_offset + 16, 1, /* DW_CFA_offset: r16 (rip) at cfa-8 */ + DW_CFA_nop, DW_CFA_nop, + + PLT_GOT_FDE_LENGTH, 0, 0, 0, /* FDE length */ + PLT_CIE_LENGTH + 8, 0, 0, 0, /* CIE pointer */ + 0, 0, 0, 0, /* the start of .plt.got goes here */ + 0, 0, 0, 0, /* .plt.got size goes here */ + 0, /* Augmentation size */ + DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, DW_CFA_nop, + DW_CFA_nop, DW_CFA_nop, DW_CFA_nop +}; + /* Architecture-specific backend data for x86-64. */ struct elf_x86_64_backend_data @@ -693,6 +755,10 @@ struct elf_x86_64_backend_data /* .eh_frame covering the .plt section. */ const bfd_byte *eh_frame_plt; unsigned int eh_frame_plt_size; + + /* .eh_frame covering the .plt.got section. */ + const bfd_byte *eh_frame_plt_got; + unsigned int eh_frame_plt_got_size; }; #define get_elf_x86_64_arch_data(bed) \ @@ -721,6 +787,8 @@ static const struct elf_x86_64_backend_data elf_x86_64_arch_bed = 6, /* plt_lazy_offset */ elf_x86_64_eh_frame_plt, /* eh_frame_plt */ sizeof (elf_x86_64_eh_frame_plt), /* eh_frame_plt_size */ + elf_x86_64_eh_frame_plt_got, /* eh_frame_plt_got */ + sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */ }; static const struct elf_x86_64_backend_data elf_x86_64_bnd_arch_bed = @@ -737,8 +805,10 @@ static const struct elf_x86_64_backend_data elf_x86_64_bnd_arch_bed = 1+6, /* plt_got_insn_size */ 11, /* plt_plt_insn_end */ 0, /* plt_lazy_offset */ - elf_x86_64_eh_frame_plt, /* eh_frame_plt */ - sizeof (elf_x86_64_eh_frame_plt), /* eh_frame_plt_size */ + elf_x86_64_eh_frame_bnd_plt, /* eh_frame_plt */ + sizeof (elf_x86_64_eh_frame_bnd_plt), /* eh_frame_plt_size */ + elf_x86_64_eh_frame_plt_got, /* eh_frame_plt_got */ + sizeof (elf_x86_64_eh_frame_plt_got), /* eh_frame_plt_got_size */ }; #define elf_backend_arch_data &elf_x86_64_arch_bed @@ -865,6 +935,7 @@ struct elf_x86_64_link_hash_table asection *plt_eh_frame; asection *plt_bnd; hooks/post-receive -- Repository for Project Archer.