From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76755 invoked by alias); 22 Apr 2017 14:46:25 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 76728 invoked by uid 9674); 22 Apr 2017 14:46:24 -0000 Date: Sat, 22 Apr 2017 14:46:00 -0000 Message-ID: <20170422144622.76528.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] users/jkratoch/indexcxx: Merge remote-tracking branch 'gdb/master' into indexcxx X-Git-Refname: refs/heads/users/jkratoch/indexcxx X-Git-Reftype: branch X-Git-Oldrev: 828d7c2b97ad76c73c1a718d1bbaf434d045b937 X-Git-Newrev: 19072274ff8508f49bba532d84a6a2039b6ffad0 X-SW-Source: 2017-q2/txt/msg00006.txt.bz2 List-Id: The branch, users/jkratoch/indexcxx has been updated via 19072274ff8508f49bba532d84a6a2039b6ffad0 (commit) via a8cc8a548eccdfd78ad76c826339f56db815bdb8 (commit) via ebe553db6c639d7533650f8482d611109c2f98a9 (commit) via 9be21bb4d4f30975766dfaa7d40b53ba10dcc3a0 (commit) via b8ac4fa43d5d37e4028ba2a7cc2d9b100ee85418 (commit) via e133d00576f3da89e7772149e8d2b6a059d26919 (commit) via 3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359 (commit) via 0d4c07afb1e5e37e8e296858f8b14a3b4adf950b (commit) via 4daf993d4d4686f2707810af3725038d2f289bbb (commit) via 3ab87b688320e02db1bb7ed4bd45323d57737c77 (commit) via ddef72cdc10d82ba011a7ff81cafbbd3466acf54 (commit) via 792f174f8af4291c222d0a6de919118e488258bc (commit) via 73b58fda3b5976ad1a60feb43695eaf61cdf62b9 (commit) via afe9edbf486c4b27cceb258c11e104377512ec24 (commit) via 0fad29560ee055f1253a8e40bfc09b413117480d (commit) via 31321c8031315c8b5f7c6b73e464f14ad90310b6 (commit) via 64575f782b79e310852e43947bc1b06f24af388e (commit) via 59fa66c53823dc695f78669f40ec2eebab3aec42 (commit) via c76886885987e543f9162809ad86a0a37b394e82 (commit) via e492d2f8ac653b050019865ba1418fc5b057c00b (commit) via a6c21d4a553de184562fd8409a5bcd3f2cc2561a (commit) via 3a3fd0fd2c4c87fdd588c51d879961a49e38f0c1 (commit) via 9bcb1f1630b05594fa86bfd017639cfcc966b11c (commit) via 26fcd539dd38a27259d8179152d617118f016706 (commit) via 101691343ce5f815dc70f6cfd083393e259a18d8 (commit) via 954b63d4c8645f86e40c7ef6c6d60acd2bf019de (commit) via 951787ed6d13f8f441d93fc3f6fb870c234774af (commit) via fdd243b001585c5ca078342608332af77050c867 (commit) via 4895cde29761f6c39fdb6c319ff4666ee39f5d28 (commit) via bd8a901f9e34191e0645a5527556d124ba5c345a (commit) via d35d19584cf56a50b4833ff9c003597e01022f27 (commit) via 22796e972f18c5601cecb0251222411a352836b6 (commit) via a7fc9b6193f830293066479aa439cea924418393 (commit) via 010151c9146eb2a299686e41c714e57c344be8e8 (commit) via d56060f08aa4ed5786042a066f62aa8e474cc0fd (commit) via 6631d36456babbaf4c78b955165c3344f95ac5dd (commit) via e6699019c4f363f804f9646974ab1d5e78785ffc (commit) via 305d16a9beff2a817ee03b3881da68eb3a29edec (commit) via 8bb5723165d4e7308fb69b21a95f396f9e61caaf (commit) via c5d37467b152fe98f02ac1ff8188e32ecd0def95 (commit) via c661778cb6b406d5b55fbf22ff88fbc85ee3f4c2 (commit) via 94522e5f36e542a7f7eccc4e2fa31682e58f812c (commit) via 725bf5cf125783c2a7ca4ab63d3768e220bab2db (commit) via 096c92ddb3a5a959bc638cff3c4ffa0f48a737d7 (commit) via 5dc74d659d1c84b8ffdb4fcbf2ef73dc974d8a5b (commit) via 0550c9559522c84341edcb334af30bc9bf2df9fb (commit) via e3d60dfc000a29959c78bd69b85100aab33f7ab5 (commit) via 5fd69d0ab2c42d2be0781bf3a5d60e1d5b8d05dc (commit) via c6609450b33960a0e9f8c1df045b02f0677e866a (commit) via 2a00d7ce26a6ee15e3712b045c8b7932278ea23b (commit) via 441d7c93782a1b1877bfa903dc8da56a6041bfb4 (commit) via 7296a62a2a237f6b1ad8db8c38b090e9f592c8cf (commit) via 1d15e434f43bc41a07bc7b0648fcb7e6ccbe8dcc (commit) via 4274208406762da7af6dd697f44d8e6895061530 (commit) via 808480f667e41e2fdb66bfdc9d5e047f1aa34a68 (commit) via 8f0dd45fde9de100160f45cad3e537e4e01a5493 (commit) via b1b45502bdef95b57125b56287b45c2eb26707d3 (commit) via 63a5468afa8e2cf8843d87b99e780e9266b31014 (commit) via dae82561a286618acf097ad9894eafba98377f66 (commit) via c08bb8dd9bd9fd101018b287726187d7ed6a0035 (commit) via 10463f39c79843c2c141481a0781091870695b17 (commit) via 4af8774e1559b2a4e098ca0e4fc5daf857c633c1 (commit) via ad3d022a77afdbaba4bb36ff4aa99be52892de42 (commit) via e6ddc3bfedb4665c9d4baa2c85037af25167cdf3 (commit) via bfb8cf9091a174b42beeff3d014173084413af4d (commit) via f5336ca55ca0aca2507ac8c0f1d573d7f6b877ab (commit) via 4f70a994900c2f7b235add7d4131cc069c181cea (commit) via be628ab814f1c90e185d7482d27aa8a991ab5837 (commit) via 8e9e35b1808481735e2d1efbf70ed7396a845d8e (commit) via 16e802b9c085ce354b1ab9e2fd25d00bf7626fa8 (commit) via d28cd78ad820e3a40ac5064b6a30f3a12ce70bf0 (commit) via 711799d513206f6d8fc3dbfa81dcdecdb2ce6ece (commit) via 52d214d3e1b2f6a1382feafbf2984acdb24c0c95 (commit) via 4c404b8be6b1d8759eed50366207fc0e2e47d2b1 (commit) via 156d9eab863f40fc812245cf1213abbe12d192b3 (commit) via 4d89769a7b4e38e94a6e027281b36eff71fc8214 (commit) via 4b217cc72b7ab04e2bea519f9fbd47d8952e08f5 (commit) via 59d3651be7419fafa959f75a3fd46914f5ce395a (commit) via b24b0d6c3be6b95d4b5e8da901e1ef315bd458b4 (commit) via 80a3b8c578e93119183db5f5e34248f843e410a7 (commit) via c83dd8672698bcdf48d27e267e481230075f5900 (commit) via 0e8621a0bec2d0840b853c4104614f345f0569ca (commit) via 67d89901506da74d00a482b7560237dce404b41c (commit) via 93921405a46c0a58eae19fffb92e02416082801a (commit) via ffc2605c41d026cf5710704848b7c3b1cdbdcf49 (commit) via 8f10c9323357ad190c0383f2fc9d394316447905 (commit) via 0a31ccfbd84660a91b133a9915e6f63c30033189 (commit) via e9bb3fbbe81115b196b436cf513f0fd7b41d6a4a (commit) via 53375380e934928af133bca69c1e1912c35e9c73 (commit) via 53e710acd249e1861029b19b7a3d8195e7f28929 (commit) via 5e0e0422137063ff3846886c8eeb64e98e7669d6 (commit) via ab0538b875c054468aa205d8d36550d1223a3bfd (commit) via 5430098f1807e084fe4ff5057040d68435f3d8a2 (commit) via 7c5ded6a00c4817d56cdf04fbc1969bc33b2a930 (commit) via ef6a5ae7bd1dd7b528f5cf368d98056603003c35 (commit) via e4097f5ee55a0d14a6213bccb9da39d4878714c8 (commit) via 537616aaeb44bc698af9848987e7c8e96d550595 (commit) via ae0eee42821865ead8d391bb4f92bd2c136c6d43 (commit) via a6acac06113f4b04fa0333ee2a3ab3025b43ee7c (commit) via 64403bd1832e10aa8324194968f72bdc5feb5aeb (commit) via fbea15088db59186960134d11b8bf98070224d6c (commit) via b43c520dba2f909c9bbb3ff5f2657c1c9010939b (commit) via c03dc33b606c17231e47f37ae0f00d1c9a6c0506 (commit) via ef85eab0ec3d7c88ea05047538d11fe704806cd8 (commit) via 9570835e5597037bee5042edf822675e715b3caf (commit) via 9a85b496ac4e6488d427155c24f87367ab1f6b1b (commit) via a5bef50fdbfadbc6b8911b458580ee91cbfcdafd (commit) via 28d909e539567ab5ecd2bc20680e933869fdf889 (commit) via a70f34c01c7f250858bd62df245c241263200f63 (commit) via 9295a5a95da871bfdeec225a6fc2f52f7655bd1c (commit) via 996812e3d43f78b17b6454d2948cd825ec98c63b (commit) via 845b344fd54ba381a826b271dd33682d1f148438 (commit) via 803bdfe43083475c7df3db38dc96f4e20d05457d (commit) via 8c25b49760b854d0b8451e8ecffeb9860fc41158 (commit) via 947fa9141488c1d39303fcdaa056332d2d0b2599 (commit) via bb1dd176fb6f38ae3cc30dc61ce55a7fbf9d0d7b (commit) via d236cfd444630bd9ddb63edca54c056d5825e673 (commit) via 62adc51030ad83d09e6d20c455616fd9216e4783 (commit) via 6f9dbcd42f2cf034a9a21f46842c08d2e88449db (commit) via 37095d07b470ea94d578cd5ca2da032617200c52 (commit) via aa808707033a46ee063263f4bc1bd06449851621 (commit) via 8473b4472dce9ce87aaad35ff8e975e1487f914e (commit) via 4a44171e07147c6b943412c90184736ca5dbfb4c (commit) via 5e8bf44f4c94d430ac21257a1a953cfccd2ce79b (commit) via b630840c9c22a877b2c6270880a214f7b451f546 (commit) via ae27d3fe76ffb54e7d413a67d8c8d76ca78a9681 (commit) via aebcde5eb475befba571ca9ae7b6c58126d41160 (commit) via a7eaf017f95932eb2d654bd61f4c4a873ba71f77 (commit) via 8170f7693bc0a9442c0aa280197925db92d48ca6 (commit) via 6670ec13726c3afca789672f6235378a5e1f7d71 (commit) via 49f4617bf4b86a0b057f3477d57ffbf7c998b229 (commit) via ae3f8c28134b52414a4c31df2e156615087c46e5 (commit) via ac8f0f721bf0db9ffd0c6602744f1859cb4dd8d2 (commit) via 5c1f54ce0b21b19ac0b2a2c921c9ea2f33bbf5fd (commit) via 498e34425b38f69ceba28707962e3593c281261a (commit) via ba2f91bb5d69127da41b368c7226f596ee449eca (commit) via 1fd6d111905e76dfa7af9fbee5229f3f1d360b4c (commit) via 436252de3e9de546001c4312d0863ce7e10aa200 (commit) via 1379e3aaea5e9454d7e75f293c3fe24c0d11c688 (commit) via 62ecb94c4a2929c1aace3fb5470d2a5100255811 (commit) via 0dedf3777db42712f460123ac0c63c49de5456f5 (commit) via 3944e22b463a62bfc4f6f0a892c6b0ac705e3c43 (commit) via 86abf93a3a56ccdf1c5f15b841ee9d6a0516a2cf (commit) via 0f65a5d84d0a83e5594cf17d04e9f98ab66652a4 (commit) via 9014582538e38055e438b6cce28d165a73abcc60 (commit) via 6ca30fa5613cfa935834f27114d6db4f3854a13e (commit) via 4e9868d4e0c8e45505876901d22c021dd36972a8 (commit) via 9bf2a700667c53003ece783c05e8b355801105f2 (commit) via a121b7c1ac76833018f4fc3adaeddc3147272dd0 (commit) via 995816ba55d952b2823d2ead66495c5cad6dfe58 (commit) via 3e83a920090130052a407621b94b94513f539fda (commit) via 63160a43508fb50d9013df061b2191de71f67b50 (commit) via 9b2eba3dcc6b41f17180e1aee29ed133f942c733 (commit) via 2adadf517063fb1c3b9240bf99ad339968c12f15 (commit) via 0d1f4ceb3904c4c82231adf98f0e84f37bc8d4ea (commit) via 4d75997912d77497fd395fde222513436a7df046 (commit) via 21c8a587ab81a58d3e067551d5503a765f00ec6e (commit) via fb32b4f7005ef8f1bde02394b58b5c5eda9cbf10 (commit) via fdf9e36fa2ed39f0da0dfa5dfdbd8e2452c6cb45 (commit) via 9f33b8b7c19413efbb37638bdba54706e4da8573 (commit) via 67cb5b2da285175d37782f3606992b8052234b00 (commit) via 7a1149643d8621541025e2c70e6391e901c8c7ef (commit) via 69bbf465237819bd7bf2a21a682d695273b3c8cb (commit) via be47f9e8180d7275b0e2b26998472e99be9a2d7b (commit) via bde6261aed330cd8d108c387bfe659a6171525dd (commit) via b38ef47f47bda5509babd768092ceb09ab98828d (commit) via f995bbe8e62fdb5607acb1ee127240cfe50d2b8f (commit) via 0ad9d8c73486e60c5a4963c1b7a0ea7063d69cd2 (commit) via 4a596fe20e93109300e841a3d0ee5f198146ab6d (commit) from 828d7c2b97ad76c73c1a718d1bbaf434d045b937 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 19072274ff8508f49bba532d84a6a2039b6ffad0 Merge: 828d7c2 a8cc8a5 Author: Jan Kratochvil Date: Sat Apr 22 16:35:04 2017 +0200 Merge remote-tracking branch 'gdb/master' into indexcxx commit a8cc8a548eccdfd78ad76c826339f56db815bdb8 Author: Alan Modra Date: Sat Apr 22 14:09:21 2017 +0930 PowerPC VLE insn set additions opcodes/ * ppc-opc.c (ELEV): Define. (vle_opcodes): Add se_rfgi and e_sc. (powerpc_opcodes): Enable lbdx, lhdx, lwdx, stbdx, sthdx, stwdx for E200Z4. gas/ * testsuite/gas/ppc/vle.s: Format. Add se_rfgi and e_sc. * testsuite/gas/ppc/vle.d: Update. commit ebe553db6c639d7533650f8482d611109c2f98a9 Author: Simon Marchi Date: Fri Apr 21 21:50:22 2017 -0400 doc: Improve documentation about MI thread output I noticed that the documentation on how the info about threads is output in MI is duplicated and not up to date. The duplication is between the "GDB/MI Thread Information" page and the -thread-info result description. I improved the "GDB/MI Thread Information" page a bit and referred to it in the -thread-info doc. This way, the -thread-info doc is more precise (it did not mention the "threads" and "current-thread-id" attributes) and concise. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Thread Information): Add missing fields, re-word some things. (GDB/MI Thread Commands): Describe fields found in the output of -thread-info, remove description of fields in the thread output tuple, replace with a cross-reference to "GDB/MI Thread Information". commit 9be21bb4d4f30975766dfaa7d40b53ba10dcc3a0 Author: Simon Marchi Date: Fri Apr 21 21:45:15 2017 -0400 Remove dead code and "current" field from MI thread output doc The MI documentation says that -thread-info output contains a "current" field in the current thread tuple, with the value "*". Current GDB master does not do this, and I couldn't find any GDB version that did. I suspect that it was never the case. The code that would correspond to this in print_thread_info_1 is essentially dead code. The calls to uiout->text end up in mi_out::do_text, which is empty. This patch removes the documentation bit and the dead code. This "current" field is not necessary, since -thread-info outputs a "current-thread-id" field. gdb/ChangeLog: * thread.c (print_thread_info_1): Remove dead code. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Thread Commands): Remove "current" field from -thread-info output. commit b8ac4fa43d5d37e4028ba2a7cc2d9b100ee85418 Author: GDB Administrator Date: Sat Apr 22 00:00:47 2017 +0000 Automatic date update in version.in commit e133d00576f3da89e7772149e8d2b6a059d26919 Author: H.J. Lu Date: Fri Apr 21 12:03:14 2017 -0700 i386: Avoid dynamic symbol with GOT reference in PIE GOT reference to global symbol in PIE will lead to dynamic symbol. It becomes a problem when "time" or "times" is defined as a variable in an executable, clashing with functions of the same name in libc. If a symbol isn't undefined weak symbol, don't make it dynamic in PIE and generate R_386_RELATIVE relocation. bfd/ PR ld/21402 * elf32-i386.c (elf_i386_link_hash_entry): Add no_finish_dynamic_symbol. (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0. (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak symbol, don't make it dynamic in PIE. (elf_i386_relocate_section): If a symbol isn't dynamic in PIE, set no_finish_dynamic_symbol and generate R_386_RELATIVE relocation for R_386_GOT32 (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol isn't 0. ld/ PR ld/21402 * testsuite/ld-elf/indirect.exp: Don't skip PIE indirect5 and indirect6 tests on i386. commit 3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359 Author: H.J. Lu Date: Fri Apr 21 12:00:55 2017 -0700 Require --no-dynamic-linker with -static -E/--dynamic-list When -static -E/--dynamic-list are passed to linker, linker may create executable with dynamic sections which aren't supported by run-time. We require --no-dynamic-linker together with -static -E/--dynamic-list before adding dynamic symbol table to static executable. bfd/ PR ld/19617 PR ld/21086 * elflink.c (elf_link_add_object_symbols): Require --no-dynamic-linker with -E/--dynamic-list when creating dynamic sections. ld/ PR ld/19617 PR ld/21086 * testsuite/ld-elf/pr19617a.d: Pass --no-dynamic-linker to ld. * testsuite/ld-elf/pr19617b.d: Likewise. * testsuite/ld-elf/pr19617c.d: Likewise. *testsuite/ld-i386/pr19636-4d.d: Likewise. * testsuite/ld-elf/readelf.exp: Pass --no-dynamic-linker to ld with --export-dynamic. * testsuite/ld-elf/shared.exp: Pass --no-dynamic-linker to ld with -E. commit 0d4c07afb1e5e37e8e296858f8b14a3b4adf950b Author: Jan Kratochvil Date: Fri Apr 21 16:14:37 2017 +0200 release branch: Fix: --enable-werror gdb-8.0-branch ./configure --enable-werror --enable-targets=all aarch64-tdep.c:3045:13: error: ‘void selftests::aarch64_process_record_test()’ declared ‘static’ but never defined [-Werror=unused-function] arm-tdep.c:9601:13: error: ‘void selftests::arm_record_test()’ declared ‘static’ but never defined [-Werror=unused-function] gdb/ChangeLog 2017-04-21 Jan Kratochvil * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if GDB_SELF_TEST. * arm-tdep.c (selftests::arm_record_test): Likewise. commit 4daf993d4d4686f2707810af3725038d2f289bbb Author: Yao Qi Date: Fri Apr 21 14:59:27 2017 +0100 Simplify regcache_restore This patches removes the 2nd argument of regcache_restore, because it is only called by regcache_cpy. In regcache_cpy, if regcache_restore is called, dst is not readonly, but src is readonly. So this patch adds an assert that src is readonly in regcache_restore. regcache_cook_read read everything from a readonly regcache cache (src)'s register_buffer, and register status is from ->register_status. gdb: 2017-04-21 Yao Qi * regcache.c (regcache_restore): Remove argument 2. Replace argument 3 with regcache. Get register status from src->register_status and get register contents from register_buffer (src, regnum). (regcache_cpy): Update. commit 3ab87b688320e02db1bb7ed4bd45323d57737c77 Author: Jose E. Marchesi Date: Fri Apr 21 05:19:06 2017 -0700 opcodes: mark SPARC RETT instructions as v6notv9. This prevents the disassembler to show `return' instructions as `rett' in V9 and later architectures. opcodes/ChangeLog: 2017-04-21 Jose E. Marchesi * sparc-opc.c (sparc_opcodes): Mark RETT instructions as v6notv9. commit ddef72cdc10d82ba011a7ff81cafbbd3466acf54 Author: Nick Clifton Date: Fri Apr 21 12:31:59 2017 +0100 Fix shift overflow when parsing an overlarge note value. PR binutils/21378 * readelf.c (print_gnu_build_attribute_name): Check for an overlarge name field. commit 792f174f8af4291c222d0a6de919118e488258bc Author: Nick Clifton Date: Fri Apr 21 12:18:06 2017 +0100 Fix detection of illegal AArch64 opcodes that resemble LD1R, LD2R, LD3R and LD4R. PR binutils/21380 opcodes * aarch64-tbl.h (aarch64_opcode_table): Fix masks for LD1R, LD2R, LD3R and LD4R. gas * testsuite/gas/aarch64/illegal-3.s: New file. * testsuite/gas/aarch64/illegal-3.d: New file. commit 73b58fda3b5976ad1a60feb43695eaf61cdf62b9 Author: GDB Administrator Date: Fri Apr 21 00:00:18 2017 +0000 Automatic date update in version.in commit afe9edbf486c4b27cceb258c11e104377512ec24 Author: H.J. Lu Date: Thu Apr 20 12:33:55 2017 -0700 Skip PIE indirect5 and indirect6 tests on i386 On i386, since GOT reference is needed to access global symbols in PIE, those symbols are made dynamic. Crash happens when there is a reference to the same global symbol with a different symbol type in a shared object. Since mixing different types of the same symbol doesn't work in general, this patch skips those tests on i386 as well as compiles non-PIE indirect5 and indirect6 tests with $NOPIE_LDFLAGS and $NOPIE_CFLAGS. PR ld/21402 * testsuite/ld-elf/indirect.exp: Pass $NOPIE_LDFLAGS and $NOPIE_CFLAGS to non-PIE indirect5 and indirect6 tests. Skip PIE indirect5 and indirect6 tests on i386. commit 0fad29560ee055f1253a8e40bfc09b413117480d Author: Maciej W. Rozycki Date: Thu Apr 13 10:26:05 2017 +0100 ELF/LD: Always consider STB_LOCAL symbols local Do not require forced local (STB_LOCAL) symbols to have a definition in a regular file to be considered to resolve local to the current module, matching `elf_link_renumber_local_hash_table_dynsyms'. In the absence of a regular definition any reference to a STB_LOCAL symbol will have to be garbage collected along with the undefined symbol itself, or the link will eventually fail. Either way the symbol concerned is not going to be external. bfd/ * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE if forced local. commit 31321c8031315c8b5f7c6b73e464f14ad90310b6 Author: Maciej W. Rozycki Date: Thu Apr 20 01:39:30 2017 +0100 MIPS/LD/testsuite: Join `__ehdr_start' tests Complement commit 3807734dbe48 ("PR ld/15428: MIPS/LD/testsuite: Un-KFAIL `__ehdr_start' test 2") and join tests that do not need to be split anymore. ld/ * testsuite/ld-mips-elf/mips-elf.exp: Join `__ehdr_start' tests. commit 64575f782b79e310852e43947bc1b06f24af388e Author: Maciej W. Rozycki Date: Wed Apr 19 16:51:17 2017 +0100 MIPS/BFD: Reorder comment about dynamic symbol sorting Move the comment about dynamic symbol sorting next to where it happens. bfd/ * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about dynamic symbol sorting. commit 59fa66c53823dc695f78669f40ec2eebab3aec42 Author: H.J. Lu Date: Thu Apr 20 07:48:24 2017 -0700 Handle symbol defined in IR and referenced in DSO We need to make an IR symbol visible if it is defined in an IR object and referenced in a dynamic object. When --as-needed is used, since linker removes the IR symbol reference of the dynamic object if the dynamic object isn't needed in the first pass, the IR definition isn't visible to the dynamic object even if the dynamic object becomes needed in the second pass. Add dynamic_ref_after_ir_def to bfd_link_hash_entry to track IR symbol which is defined in an IR object and later referenced in a dynamic object. dynamic_ref_after_ir_def is preserved when restoring the symbol table for unneeded dynamic object. bfd/ PR ld/21382 * elflink.c (elf_link_add_object_symbols): Preserve dynamic_ref_after_ir_def when restoring the symbol table for unneeded dynamic object. include/ PR ld/21382 * bfdlink.h (bfd_link_hash_entry): Add dynamic_ref_after_ir_def. ld/ PR ld/21382 * plugin.c (is_visible_from_outside): Symbol may be visible from outside if dynamic_ref_after_ir_def is set. (plugin_notice): Set dynamic_ref_after_ir_def if the symbol is defined in an IR object and referenced in a dynamic object. * testsuite/ld-plugin/lto.exp: Run PR ld/21382 tests. * testsuite/ld-plugin/pr21382a.c: New file. * testsuite/ld-plugin/pr21382b.c: Likewise. commit c76886885987e543f9162809ad86a0a37b394e82 Author: GDB Administrator Date: Thu Apr 20 00:00:41 2017 +0000 Automatic date update in version.in commit e492d2f8ac653b050019865ba1418fc5b057c00b Author: H.J. Lu Date: Wed Apr 19 09:59:14 2017 -0700 x86-64: Handle undefined IFUNC symbol with -z now Since undefined IFUNC symbol is treated as normal FUNC symbol, don't abort on undefined IFUNC symbol in the second PLT. bfd/ PR ld/21401 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort on on undefined IFUNC symbol in the second PLT. ld/ PR ld/21401 * testsuite/ld-ifunc/ifunc.exp: Add a libtest-2-now.so test with -z now. commit a6c21d4a553de184562fd8409a5bcd3f2cc2561a Author: Pedro Alves Date: Wed Apr 19 13:16:05 2017 +0100 gdbthread.h: Fix comment typo gdb/ChangeLog: 2017-04-19 Pedro Alves * gdbthread.h (thread): Add missing closing parenthesis in comment. commit 3a3fd0fd2c4c87fdd588c51d879961a49e38f0c1 Author: Pedro Alves Date: Wed Apr 19 13:12:23 2017 +0100 Fix removing inferiors from within "thread apply" commands This patch fixes an internal error exposed by a test that does something like: define kill-and-remove kill inferiors 2 remove-inferiors 2 end # Start one inferior. start # Start another inferior. add-inferior 2 inferior 2 start # Kill and remove inferior 1 while inferior 2 is selected. thread apply 1.1 kill-and-remove The internal error looks like this: Thread 1.1 (Thread 0x7ffff7fc2700 (LWP 20677)): [Switching to inferior 1 [process 20677] (gdb/testsuite/outputs/gdb.threads/threadapply/threadapply)] [Switching to thread 1.1 (Thread 0x7ffff7fc2700 (LWP 20677))] #0 main () at src/gdb/testsuite/gdb.threads/threadapply.c:38 38 for (i = 0; i < NUM; i++) src/gdb/inferior.c:66: internal-error: void set_current_inferior(inferior*): Assertion `inf != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) FAIL: gdb.threads/threadapply.exp: kill_and_remove_inferior: try kill-and-remove: thread apply 1.1 kill-and-remove (GDB internal error) There are several problems around this area of the code. One is that in do_restore_current_thread_cleanup, we do a look up of inferior by ptid, which can find the wrong inferior if the previously selected inferior exited and some other inferior was started with a reused pid (rare, but still...). The other problem is that the "remove-inferiors" command rejects attempts to remove the current inferior, but when we get to "remove-inferiors" in a "thread apply THR remove-inferiors 2" command, the current inferior is the inferior of thread THR, not the previously selected inferior, so if the previously selected inferior was inferior 2, that command still manages to wipe it, and then gdb restores the old selected inferior, which is now a dangling pointer... So the fix here is: - Make make_cleanup_restore_current_thread store a pointer to the previously selected inferior directly, and use it directly instead of doing ptid look ups. - Add a refcount to inferiors, very similar to thread_info's refcount, that is incremented/decremented by make_cleanup_restore_current_thread, and checked before deleting an inferior. To avoid duplication, a new refcounted_object type is added, that both thread_info and inferior inherit from. gdb/ChangeLog: 2017-04-19 Pedro Alves * common/refcounted-object.h: New file. * gdbthread.h: Include "common/refcounted-object.h". (thread_info): Inherit from refcounted_object and add comments. (thread_info::incref, thread_info::decref) (thread_info::m_refcount): Delete. (thread_info::deletable): Use the refcounted_object::refcount() method. * inferior.c (current_inferior_): Add comment. (set_current_inferior): Increment/decrement refcounts. (prune_inferiors, remove_inferior_command): Skip inferiors marked not-deletable instead of comparing with the current inferior. (initialize_inferiors): Increment the initial inferior's refcount. * inferior.h (struct inferior): Forward declare. Include "common/refcounted-object.h". (current_inferior, set_current_inferior): Move declaration to before struct inferior's definition, and fix comment. (inferior): Inherit from refcounted_object. Add comments. * thread.c (switch_to_thread_no_regs): Reference the thread's inferior pointer directly instead of doing a ptid lookup. (switch_to_no_thread): New function. (switch_to_thread(thread_info *)): New function, factored out from ... (switch_to_thread(ptid_t)): ... this. (restore_current_thread): Delete. (current_thread_cleanup): Remove 'inf_id' and 'was_removable' fields, and add 'inf' field. (do_restore_current_thread_cleanup): Check whether old->inf is alive instead of looking up an inferior by ptid. Use switch_to_thread and switch_to_no_thread. (restore_current_thread_cleanup_dtor): Use old->inf directly instead of lookup up an inferior by id. Decref the inferior. Don't restore 'removable'. (make_cleanup_restore_current_thread): Same the inferior pointer in old, instead of the inferior number. Incref the inferior. Don't save/clear 'removable'. gdb/testsuite/ChangeLog: 2017-04-19 Pedro Alves * gdb.threads/threadapply.exp (kill_and_remove_inferior): New procedure. (top level): Call it. * lib/gdb.exp (gdb_define_cmd): New procedure. commit 9bcb1f1630b05594fa86bfd017639cfcc966b11c Author: Pedro Alves Date: Wed Apr 19 13:12:23 2017 +0100 Make inferior::detaching a bool, and introduce scoped_restore::release() I left making inferior::detaching a bool to a separate patch, because doing that makes a make_cleanup_restore_integer call in infrun.c:prepare_for_detach no longer compile (passing a 'bool *' when an 'int *' is expected). Since we want to get rid of cleanups anyway, I looked at converting that to a scoped_restore. However, prepare_for_detach wants to discard the cleanup on success, and scoped_restore doesn't have an equivalent for that. So I added one -- I called it "release()" because it seems like a natural fit in the way standard components call similarly-spirited methods, and, it's also what the proposal for a generic scope guard calls it too, AFAICS: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4189.pdf I've added some scoped_guard unit tests, while at it. gdb/ChangeLog: 2017-04-19 Pedro Alves * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add unittests/scoped_restore-selftests.c. (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o. * common/scoped_restore.h (scoped_restore_base): Make "class". (scoped_restore_base::release): New public method. (scoped_restore_base::scoped_restore_base): New protected ctor. (scoped_restore_base::m_saved_var): New protected field. (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the scoped_restore_base base class instead of m_saved_var directly. (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise. (scoped_restore_tmpl::scoped_restore_tmpl(const scoped_restore_tmpl&)): Likewise. (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var method. (scoped_restore_tmpl::saved_var): New method. (scoped_restore_tmpl::m_saved_var): Delete. * inferior.h (inferior::detaching): Now a bool. * infrun.c (prepare_for_detach): Use a scoped_restore instead of a cleanup. * unittests/scoped_restore-selftests.c: New file. commit 26fcd539dd38a27259d8179152d617118f016706 Author: Pedro Alves Date: Wed Apr 19 13:06:20 2017 +0100 gdb/Makefile.in: Re-sort SUBDIR_UNITTESTS_SRCS/SUBDIR_UNITTESTS_OBS Note to self: 'o' before 'p'. gdb/ChangeLog: 2017-04-19 Pedro Alves * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): Re-sort in alphabetic order. commit 101691343ce5f815dc70f6cfd083393e259a18d8 Author: Wedson Almeida Filho Date: Wed Apr 19 18:02:53 2017 +0930 Correct PE reloc display * peXXigen.c (pe_print_reloc): Correct chunk_end. commit 954b63d4c8645f86e40c7ef6c6d60acd2bf019de Author: Alan Modra Date: Wed Apr 19 01:26:57 2017 +0930 Implement -z dynamic-undefined-weak -z nodynamic-undefined-weak is only implemented for x86. (The sparc backend has some support code but doesn't enable the option by including ld/emulparams/dynamic_undefined_weak.sh, and since the support looks like it may be broken I haven't enabled it.) This patch adds the complementary -z dynamic-undefined-weak, extends both options to affect building of shared libraries as well as executables, and adds support for the option on powerpc. include/ * bfdlink.h (struct bfd_link_info ): Revise comment. bfd/ * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak or make dynamic for info->dynamic_undefined_weak 0 and 1. * elf32-ppc.c:Formatting. (ensure_undefweak_dynamic): Don't make dynamic when info->dynamic_undefined_weak is zero. (allocate_dynrelocs): Discard undefweak dyn_relocs for info->dynamic_undefined_weak. Discard undef dyn_relocs when not default visibility. Discard undef and undefweak dyn_relocs earlier. (ppc_elf_relocate_section): Adjust to suit. * elf64-ppc.c: Formatting. (ensure_undefweak_dynamic): Don't make dynamic when info->dynamic_undefined_weak is zero. (allocate_dynrelocs): Discard undefweak dyn_relocs for info->dynamic_undefined_weak. Discard them earlier. ld/ * ld.texinfo (dynamic-undefined-weak): Document. (nodynamic-undefined-weak): Document that this option now can be used with shared libs. * emulparams/dynamic_undefined_weak.sh: Support -z dynamic-undefined-weak. * emulparams/elf32ppccommon.sh: Include dynamic_undefined_weak.sh. * testsuite/ld-undefined/weak-undef.exp (undef_weak_so), (undef_weak_exe): New. Use them. Add -z dynamic-undefined-weak and -z nodynamic-undefined-weak tests. * Makefile.am: Update powerpc dependencies. * Makefile.in: Regenerate. commit 951787ed6d13f8f441d93fc3f6fb870c234774af Author: GDB Administrator Date: Wed Apr 19 00:00:40 2017 +0000 Automatic date update in version.in commit fdd243b001585c5ca078342608332af77050c867 Author: Pedro Alves Date: Tue Apr 18 21:39:25 2017 +0100 Eliminate obstack_printf Not used anywhere. gdb/ChangeLog: 2017-04-18 Pedro Alves * xml-support.c (obstack_xml_printf): Delete. * xml-support.h (obstack_xml_printf): Delete. commit 4895cde29761f6c39fdb6c319ff4666ee39f5d28 Author: Pedro Alves Date: Tue Apr 18 21:39:25 2017 +0100 gdb_xml_parser: make data fields private and make more functions methods This patch makes the data fields of gdb_xml_parser private, and makes more functions be gdb_xml_parser methods. This is mostly for better encapsulation. Some free functions have their parsing-related guts converted to methods, while the free functions remain, as they're used as expat callbacks. Now their only job is to be small shims that restore back the gdb_xml_parser type, defer work to the corresponding method, and make sure C++ exceptions don't cross expat. More C++-fycation of the XML parsers built on top of gdb_xml_parser could follow, but this was my stopping point. gdb/ChangeLog: 2017-04-18 Pedro Alves * xml-support.c (gdb_xml_parser) : New methods. : Make private and add m_ prefix. (gdb_xml_parser::body_text): New method, based on ... (gdb_xml_body_text): ... this. Adjust. (gdb_xml_parser::vdebug): New method, based on ... (gdb_xml_debug): ... this. Adjust. (gdb_xml_parser::verror): New method, based on ... (gdb_xml_error): ... this. Adjust. (gdb_xml_parser::start_element): New method, based on ... (gdb_xml_start_element): ... this. Adjust. (gdb_xml_start_element_wrapper): Defer to gdb_xml_parser::start_element and gdb_xml_parser::set_error. (gdb_xml_parser::end_element): New method, based on ... (gdb_xml_end_element_wrapper): ... this. Adjust. (gdb_xml_parser::~gdb_xml_parser): Adjust. (gdb_xml_parser::gdb_xml_parser): Adjust to field renames. (gdb_xml_parser::use_dtd): New method, based on ... (gdb_xml_use_dtd): ... this. Adjust. (gdb_xml_parser::parse): New method, based on ... (gdb_xml_parse): ... this. Adjust. (gdb_xml_parse_quick): Adjust to call the parser's parse method. (xinclude_start_include): Adjust to call the parser's name method. (xml_xinclude_default, xml_xinclude_start_doctype) (xml_xinclude_end_doctype): Adjust to call the parser's user_data method. (xml_process_xincludes): Adjust to call parser methods. * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete declarations. commit bd8a901f9e34191e0645a5527556d124ba5c345a Author: Pedro Alves Date: Tue Apr 18 21:39:25 2017 +0100 xml-support.c: Use std::string for growing string buffer This main idea behind this patch is this change to xml-support.c:scope_level - /* Body text accumulation. This is an owning pointer. */ - struct obstack *body; + /* Body text accumulation. */ + std::string body; ... which allows simplifying other parts of the code. In target_fetch_description_xml, we want to distinguish between returning "success + empty std::string" and "no success", and gdb::optional is a natural fit for that. gdb/ChangeLog: 2017-04-18 Pedro Alves * tracefile-tfile.c (tfile_write_tdesc): Adjust to use gdb::optional. * xml-support.c: Include . (scope_level::scope_level(scope_level &&)) (scope_level::~scope_level): Delete. (scope_level::body): Now a std::string. (gdb_xml_body_text, gdb_xml_end_element): Adjust. (xinclude_parsing_data::xinclude_parsing_data): Add 'output' parameter. (xinclude_parsing_data::~xinclude_parsing_data): Delete. (xinclude_parsing_data::output): Now a std::string reference. (xinclude_start_include): Adjust. (xml_xinclude_default): Adjust. (xml_process_xincludes): Add 'output' parameter, and return bool. * xml-support.h (xml_process_xincludes): Add 'output' parameter, and return bool. * xml-tdesc.c: Include and . (tdesc_xml_cache): Delete. (tdesc_xml_cache_s): Delete. (xml_cache): Now an std::unordered_map. (tdesc_parse_xml): Adjust to use std::string and unordered_map. (target_fetch_description_xml): Change return type to gdb::optional, and adjust. * xml-tdesc.h: Include "common/gdb_optional.h" and . (target_fetch_description_xml): Change return type to gdb::optional. commit d35d19584cf56a50b4833ff9c003597e01022f27 Author: Pedro Alves Date: Tue Apr 18 21:39:24 2017 +0100 gdb::optional unit tests I thought I'd add some unit tests to make sure gdb::optional behaved correctly, and started writing some, but then thought/realized that libstdc++ already has extensive testing for C++17 std::optional, which gdb::optional is a subset of, and thought why bother writing something from scratch. So I tried copying over a subset of libstdc++'s tests (that ones that cover the subset supported by gdb::optional), and was positively surprised that they mostly work OOTB. This did help shake out a few bugs from what I was implementing in the previous patch to gdb::optional. Still, it's a good chunk of code being copied over, so if people dislike this copying/duplication, I can drop this patch. gdb/ChangeLog: 2017-04-18 Pedro Alves * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add unittests/optional-selftests.c. (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o. * unittests/optional-selftests.c: New file. * unittests/optional/assignment/1.cc: New file. * unittests/optional/assignment/2.cc: New file. * unittests/optional/assignment/3.cc: New file. * unittests/optional/assignment/4.cc: New file. * unittests/optional/assignment/5.cc: New file. * unittests/optional/assignment/6.cc: New file. * unittests/optional/assignment/7.cc: New file. * unittests/optional/cons/copy.cc: New file. * unittests/optional/cons/default.cc: New file. * unittests/optional/cons/move.cc: New file. * unittests/optional/cons/value.cc: New file. * unittests/optional/in_place.cc: New file. * unittests/optional/observers/1.cc: New file. * unittests/optional/observers/2.cc: New file. commit 22796e972f18c5601cecb0251222411a352836b6 Author: Pedro Alves Date: Tue Apr 18 21:39:24 2017 +0100 More gdb::optional features Currently we can't use gdb::optional as function return type, because gdb::optional's copy ctor is deleted. For example, with: gdb::optional function () { gdb::optional opt; .... return opt; we get: src/gdb/foo.c: In function ‘gdb::optional foo()’: src/gdb/foo.c:75:10: error: use of deleted function ‘gdb::optional::optional(const gdb::optional&) [with T = int]’ return opt; ^ In file included from src/gdb/foo.c:68:0: src/gdb/common/gdb_optional.h:53:3: note: declared here optional (const optional &other) = delete; ^ I started by fixing that, and then ran into another missing feature, also fixed by this patch. The next feature I'm missing most from gdb::optional compared to std::optional is construction/move/assignment from a T, instead of having to default construct an gdb::optional and then use optional::emplace(....). For example: gdb::optional function () { gdb::optional opt; std::string str; ... opt.emplace (std::move (str)); return opt; vs gdb::optional function () { std::string str; ... return str; The copy/move ctor/assign methods weren't initialy implemented because std::optional supports construction from a type U if U is convertible to T too, and has rules to decide whether the ctors are explicit/implicit based on that, and rules for whether the ctor should be trivial or not, etc., which leads to a much more complicated implementation. If we stick to supporting copy/move construction/assignment of/to an optional from exactly only optional and T, then all that conversion-related complication disappears, and we still gain convenience in most use cases. The patch also makes emplace return a reference to the constructor object, per C++17 std::optional, and adds a reset method, againt because std::optional has one and it's trivial to support it. These two changes are a requirement of the gdb::optional unit testing patch that will follow. gdb/ChangeLog: 2017-04-18 Pedro Alves * common/gdb_optional.h: Include common/traits.h. (in_place_t): New type. (in_place): New constexpr variable. (optional::optional): Remove member initialization of m_instantiated. (optional::optional(in_place_t...)): New constructor. (optional::~optional): Use reset. (optional::optional(const optional&)): New. (optional::optional(const optional&&)): New. (optional::optional(T &)): New. (optional::optional(T &&)): New. (operator::operator=(const optional &)): New. (operator::operator=(optional &&)): New. (operator::operator= (const T &)) (operator::operator= (T &&)) (operator::emplace (Args &&... args)): Return a T&. Use reset. (operator::reset): New. (operator::m_instantiated):: Add in-class initializer. * common/traits.h: Include . (struct And): New types. commit a7fc9b6193f830293066479aa439cea924418393 Author: Pedro Alves Date: Tue Apr 18 21:39:24 2017 +0100 xml-support.c: Use std::vector scope_level::scope_level needed both a move ctor and a dtor explicitly coded, but those will be eliminated in a following patch. gdb/ChangeLog: 2017-04-18 Pedro Alves * xml-support.c: Include . (scope_level::scope_level(const gdb_xml_element *)) (scope_level::scope_level(scope_level&&)): New. (scope_level::~scope_level): New. (scope_level_s): Delete. (gdb_xml_parser::scopes): Now a std::vector. (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element): Use std::vector. (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary scope cleanup code. (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization of the scopes member. Use std::vector::emplace_back. commit 010151c9146eb2a299686e41c714e57c344be8e8 Author: Pedro Alves Date: Tue Apr 18 21:39:24 2017 +0100 C++-ify gdb/xml-support.c a bit to eliminate cleanups Basically convert cleanups to destructors in gdb_xml_parser and xinclude_parsing_data, and then allocate objects of those types on the stack. More C++-ification is possible / will follow, but this removes a few make_cleanup calls already. gdb/ChangeLog: 2017-04-18 Pedro Alves * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude a bool. (gdb_xml_end_element): Change type of first parameter. (gdb_xml_cleanup): Rename to ... (gdb_xml_parser::~gdb_xml_parser): ... this. (gdb_xml_create_parser_and_cleanup): Delete with ... (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out to this new ctor. (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of using gdb_xml_create_parser_and_cleanup. (xinclude_parsing_data): Add ctor/dtor. (xml_xinclude_cleanup): Delete. (xml_process_xincludes): Create a local xinclude_parsing_data instead of heap-allocating one. Create a local gdb_xml_parser instead of heap-allocating one with gdb_xml_create_parser_and_cleanup. commit d56060f08aa4ed5786042a066f62aa8e474cc0fd Author: John Baldwin Date: Tue Apr 18 09:44:32 2017 -0700 PR threads/20743: Don't attempt to suspend or resume exited threads. When resuming a native FreeBSD process, ignore exited threads when suspending/resuming individual threads prior to continuing the process. gdb/ChangeLog: PR threads/20743 * fbsd-nat.c (resume_one_thread_cb): Remove. (resume_all_threads_cb): Remove. (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of iterate_over_threads. commit 6631d36456babbaf4c78b955165c3344f95ac5dd Author: GDB Administrator Date: Tue Apr 18 00:00:36 2017 +0000 Automatic date update in version.in commit e6699019c4f363f804f9646974ab1d5e78785ffc Author: H.J. Lu Date: Mon Apr 17 07:47:17 2017 -0700 Put soname in the version definition section commit 902e9fc76a0ec9f642cefa71ef88cca1c675ad54 Author: Maciej W. Rozycki Date: Tue Feb 21 01:46:42 2017 +0000 PR ld/20828: Move symbol version processing ahead of GC symbol sweep breaks version definition with --version-script --soname. This patch fixes it by getting soname index before generating the version definition section. bfd/ PR ld/21389 * elflink.c (bfd_elf_size_dynamic_sections): Get soname index before generating the version definition section. ld/ PR ld/21389 * testsuite/ld-elf/pr21389.map: New file. * testsuite/ld-elf/pr21389.s: Likewise. * testsuite/ld-elf/pr21389a.d: Likewise. * testsuite/ld-elf/pr21389b.d: Likewise. * testsuite/ld-elf/pr21389c.d: Likewise. commit 305d16a9beff2a817ee03b3881da68eb3a29edec Author: Joel Brobecker Date: Mon Apr 17 07:30:29 2017 -0700 Update NEWS post GDB 8.0 branch creation. gdb/ChangeLog: * NEWS: Create a new section for the next release branch. Rename the section of the current branch, now that it has been cut. commit 8bb5723165d4e7308fb69b21a95f396f9e61caaf Author: Joel Brobecker Date: Mon Apr 17 07:20:49 2017 -0700 Bump version to 8.0.50.DATE-git Now that the GDB 8.0 branch has been created, we should bump the GDB version accordingly. gdb/ChangeLog: GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db): * version.in: Bump version to 7.99.90.DATE-git. commit c5d37467b152fe98f02ac1ff8188e32ecd0def95 Author: Alan Modra Date: Mon Apr 17 18:33:52 2017 +0930 Undo dynamic symbol state after regular object sym type mismatch We already handle the case of an object file first defining a symbol that a later shared library also defines where the symbol types are incompatible. This patch handles the reverse, when a later object file defines an incompatible symbol defined by an earlier shared library. bfd/ * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking state when a regular object file defines a symbol with incompatible type to that defined by an earlier shared lib. ld/ * testsuite/ld-elf/indirect5a.c, * testsuite/ld-elf/indirect5b.c, * testsuite/ld-elf/indirect5.map, * testsuite/ld-elf/indirect5.out: New test. * testsuite/ld-elf/indirect6a.c: Likewise. * testsuite/ld-elf/indirect.exp (check_dynamic_syms): New proc. Run new tests and check dynsyms. commit c661778cb6b406d5b55fbf22ff88fbc85ee3f4c2 Author: GDB Administrator Date: Mon Apr 17 00:00:33 2017 +0000 Automatic date update in version.in commit 94522e5f36e542a7f7eccc4e2fa31682e58f812c Author: GDB Administrator Date: Sun Apr 16 00:00:35 2017 +0000 Automatic date update in version.in commit 725bf5cf125783c2a7ca4ab63d3768e220bab2db Author: GDB Administrator Date: Sat Apr 15 00:00:36 2017 +0000 Automatic date update in version.in ----------------------------------------------------------------------- Summary of changes: ChangeLog | 4 + bfd/ChangeLog | 284 ++++ bfd/aout-cris.c | 4 +- bfd/aoutx.h | 17 +- bfd/archive.c | 4 +- bfd/bfd-in2.h | 3 +- bfd/bfd.c | 360 +++--- bfd/binary.c | 5 +- bfd/coff-arm.c | 11 +- bfd/coff-mcore.c | 2 +- bfd/coff-ppc.c | 2 +- bfd/coff-rs6000.c | 9 +- bfd/coff-tic4x.c | 4 +- bfd/coff-tic80.c | 2 +- bfd/coffcode.h | 23 +- bfd/coffgen.c | 21 +- bfd/cofflink.c | 19 +- bfd/coffswap.h | 10 +- bfd/config.bfd | 1 - bfd/cpu-arm.c | 4 +- bfd/elf-eh-frame.c | 16 +- bfd/elf-m10300.c | 4 +- bfd/elf-properties.c | 20 +- bfd/elf-s390-common.c | 2 +- bfd/elf.c | 64 +- bfd/elf32-arc.c | 8 +- bfd/elf32-arm.c | 78 +- bfd/elf32-avr.c | 3 +- bfd/elf32-bfin.c | 13 +- bfd/elf32-frv.c | 23 +- bfd/elf32-i386.c | 84 +- bfd/elf32-iq2000.c | 8 +- bfd/elf32-m32c.c | 9 +- bfd/elf32-m32r.c | 4 +- bfd/elf32-mep.c | 6 +- bfd/elf32-microblaze.c | 20 +- bfd/elf32-msp430.c | 19 +- bfd/elf32-nds32.c | 8 +- bfd/elf32-ppc.c | 46 +- bfd/elf32-rl78.c | 20 +- bfd/elf32-rx.c | 5 +- bfd/elf32-s390.c | 2 +- bfd/elf32-score.c | 5 +- bfd/elf32-score7.c | 5 +- bfd/elf32-sh64.c | 27 +- bfd/elf32-sparc.c | 1 + bfd/elf32-spu.c | 2 +- bfd/elf32-v850.c | 28 +- bfd/elf32-vax.c | 27 +- bfd/elf32-visium.c | 5 +- bfd/elf64-ia64-vms.c | 45 +- bfd/elf64-mmix.c | 41 +- bfd/elf64-ppc.c | 24 +- bfd/elf64-s390.c | 2 +- bfd/elf64-sh64.c | 20 +- bfd/elf64-sparc.c | 20 +- bfd/elf64-x86-64.c | 34 +- bfd/elfcode.h | 13 +- bfd/elflink.c | 176 ++- bfd/elfnn-aarch64.c | 4 +- bfd/elfnn-ia64.c | 30 +- bfd/elfxx-mips.c | 52 +- bfd/elfxx-sparc.c | 214 +++- bfd/elfxx-sparc.h | 5 + bfd/hpux-core.c | 6 +- bfd/ieee.c | 8 +- bfd/ihex.c | 4 +- bfd/linker.c | 3 +- bfd/merge.c | 4 +- bfd/mmo.c | 116 +- bfd/oasys.c | 3 +- bfd/opncls.c | 231 ++-- bfd/pdp11.c | 9 +- bfd/peXXigen.c | 15 +- bfd/po/SRC-POTFILES.in | 1 + bfd/rs6000-core.c | 3 +- bfd/version.h | 2 +- bfd/vms-alpha.c | 9 +- bfd/xcofflink.c | 8 +- binutils/ChangeLog | 51 + binutils/doc/binutils.texi | 16 +- binutils/dwarf.c | 2 +- binutils/objcopy.c | 205 +++- binutils/readelf.c | 63 +- config.sub | 6 +- gas/ChangeLog | 61 + gas/config/tc-ppc.c | 1 - gas/config/tc-xtensa.c | 66 +- gas/testsuite/gas/aarch64/illegal-3.d | 14 + gas/testsuite/gas/aarch64/illegal-3.s | 9 + gas/testsuite/gas/elf/section12a.d | 4 +- gas/testsuite/gas/ppc/altivec2.d | 182 +-- gas/testsuite/gas/ppc/altivec2.s | 48 - gas/testsuite/gas/ppc/htm.d | 4 +- gas/testsuite/gas/ppc/vle.d | 4 + gas/testsuite/gas/ppc/vle.s | 258 ++-- gas/testsuite/gas/wasm32/allinsn.d | 64 +- gas/testsuite/gas/wasm32/disass-2.d | 9 + gas/testsuite/gas/wasm32/disass-2.s | 3 + gas/testsuite/gas/wasm32/disass.d | 9 + gas/testsuite/gas/wasm32/disass.s | 3 + gas/testsuite/gas/wasm32/reloc.d | 7 +- gas/testsuite/gas/wasm32/reloc.s | 2 +- gas/testsuite/gas/wasm32/wasm32.exp | 4 +- gas/testsuite/gas/xtensa/all.exp | 2 + gas/testsuite/gas/xtensa/auto-litpools-first1.d | 12 + gas/testsuite/gas/xtensa/auto-litpools-first1.s | 3 + gas/testsuite/gas/xtensa/auto-litpools-first2.d | 15 + gas/testsuite/gas/xtensa/auto-litpools-first2.s | 3 + gas/testsuite/gas/xtensa/auto-litpools.d | 6 +- gdb/ChangeLog | 1354 ++++++++++++++++++++ gdb/Makefile.in | 12 +- gdb/NEWS | 4 +- gdb/aarch64-tdep.c | 4 + gdb/ada-exp.y | 4 +- gdb/ada-lang.c | 60 +- gdb/ada-lang.h | 8 +- gdb/aix-thread.c | 6 +- gdb/alpha-tdep.c | 2 + gdb/arc-tdep.c | 2 +- gdb/arm-tdep.c | 15 +- gdb/avr-tdep.c | 3 + gdb/ax-gdb.c | 32 +- gdb/bcache.c | 2 +- gdb/bcache.h | 2 +- gdb/bfin-tdep.c | 6 +- gdb/break-catch-throw.c | 37 +- gdb/breakpoint.c | 422 +++---- gdb/breakpoint.h | 217 ++-- gdb/bsd-kvm.c | 2 +- gdb/bsd-uthread.c | 6 +- gdb/buildsym.c | 2 +- gdb/buildsym.h | 4 +- gdb/c-exp.y | 10 +- gdb/c-lang.c | 9 + gdb/c-lang.h | 4 +- gdb/c-varobj.c | 2 +- gdb/charset.c | 54 +- gdb/charset.h | 6 +- gdb/cli/cli-cmds.c | 83 +- gdb/cli/cli-decode.c | 13 +- gdb/cli/cli-dump.c | 15 +- gdb/cli/cli-script.c | 87 +- gdb/cli/cli-script.h | 9 +- gdb/cli/cli-utils.c | 6 +- gdb/cli/cli-utils.h | 22 +- gdb/coff-pe-read.c | 2 +- gdb/command.h | 3 +- gdb/common/common-utils.c | 11 + gdb/common/common-utils.h | 5 + gdb/common/common.m4 | 3 +- gdb/common/gdb_optional.h | 132 ++- gdb/{terminal.h => common/gdb_termios.h} | 42 +- gdb/common/print-utils.c | 2 +- gdb/common/ptid.c | 69 +- gdb/common/ptid.h | 173 ++- gdb/common/refcounted-object.h | 56 + gdb/common/scoped_restore.h | 36 +- gdb/common/traits.h | 26 + gdb/compile/compile-c-support.c | 6 +- gdb/compile/compile-loc2c.c | 20 +- gdb/compile/compile.c | 12 +- gdb/completer.c | 76 +- gdb/completer.h | 8 +- gdb/configure | 2 +- gdb/configure.tgt | 4 + gdb/corefile.c | 2 +- gdb/corelow.c | 2 +- gdb/cp-name-parser.y | 4 +- gdb/cp-valprint.c | 2 +- gdb/cris-tdep.c | 6 +- gdb/d-exp.y | 10 +- gdb/d-lang.h | 2 +- gdb/darwin-nat.c | 16 +- gdb/dbxread.c | 80 +- gdb/defs.h | 35 +- gdb/disasm.c | 2 +- gdb/doc/ChangeLog | 14 + gdb/doc/gdb.texinfo | 77 +- gdb/dwarf2read.c | 29 +- gdb/elfread.c | 2 +- gdb/event-top.c | 4 +- gdb/exceptions.c | 4 +- gdb/exceptions.h | 3 +- gdb/expprint.c | 14 +- gdb/expression.h | 6 +- gdb/f-exp.y | 8 +- gdb/f-lang.c | 2 +- gdb/f-lang.h | 2 +- gdb/fbsd-nat.c | 62 +- gdb/fbsd-tdep.c | 2 +- gdb/fork-child.c | 383 ++++--- gdb/frv-tdep.c | 6 +- gdb/gdb-dlfcn.c | 45 +- gdb/gdb-dlfcn.h | 24 +- gdb/gdbarch.c | 54 +- gdb/gdbarch.h | 15 +- gdb/gdbarch.sh | 12 +- gdb/gdbcore.h | 2 +- gdb/gdbserver/ChangeLog | 41 + gdb/gdbserver/configure | 2 +- gdb/gdbserver/gdbreplay.c | 2 +- gdb/gdbserver/linux-x86-low.c | 2 +- gdb/gdbserver/remote-utils.c | 10 +- gdb/gdbserver/remote-utils.h | 4 +- gdb/gdbserver/server.c | 123 +- gdb/gdbserver/terminal.h | 51 - gdb/gdbserver/win32-low.c | 5 - gdb/gdbthread.h | 32 +- gdb/gdbtypes.c | 8 +- gdb/gdbtypes.h | 1 + gdb/gnu-nat.c | 5 +- gdb/gnu-v3-abi.c | 54 +- gdb/go-exp.y | 10 +- gdb/go-lang.h | 2 +- gdb/go32-nat.c | 10 +- gdb/guile/guile.c | 35 +- gdb/guile/scm-breakpoint.c | 16 +- gdb/guile/scm-cmd.c | 4 +- gdb/guile/scm-param.c | 2 +- gdb/guile/scm-ports.c | 3 +- gdb/h8300-tdep.c | 10 +- gdb/hppa-tdep.c | 4 +- gdb/i386-cygwin-tdep.c | 2 +- gdb/i386-go32-tdep.c | 72 + gdb/i386-nto-tdep.c | 3 + gdb/i386-tdep.c | 49 +- gdb/i386-tdep.h | 5 + gdb/ia64-tdep.c | 2 +- gdb/inf-ptrace.c | 6 +- gdb/infcmd.c | 19 +- gdb/inferior.c | 61 +- gdb/inferior.h | 105 +- gdb/inflow.c | 1 + gdb/inflow.h | 2 +- gdb/infrun.c | 17 +- gdb/jit.c | 42 +- gdb/language.c | 10 +- gdb/language.h | 8 +- gdb/linespec.c | 69 +- gdb/linespec.h | 45 +- gdb/linux-nat.c | 7 +- gdb/linux-tdep.c | 2 +- gdb/linux-thread-db.c | 6 +- gdb/lm32-tdep.c | 2 +- gdb/location.c | 121 +-- gdb/location.h | 55 +- gdb/m2-exp.y | 4 +- gdb/m2-lang.h | 2 +- gdb/m32r-tdep.c | 10 +- gdb/m68hc11-tdep.c | 2 +- gdb/m88k-tdep.c | 2 +- gdb/macroexp.c | 28 +- gdb/main.c | 6 +- gdb/mdebugread.c | 46 +- gdb/memattr.c | 2 +- gdb/mep-tdep.c | 2 +- gdb/mi/mi-cmd-break.c | 27 +- gdb/mi/mi-cmd-catch.c | 8 +- gdb/mi/mi-cmd-disas.c | 2 +- gdb/mi/mi-cmd-env.c | 16 +- gdb/mi/mi-cmd-file.c | 6 +- gdb/mi/mi-cmd-info.c | 10 +- gdb/mi/mi-cmd-stack.c | 18 +- gdb/mi/mi-cmd-target.c | 6 +- gdb/mi/mi-cmd-var.c | 36 +- gdb/mi/mi-cmds.h | 2 +- gdb/mi/mi-interp.c | 2 +- gdb/mi/mi-main.c | 119 +- gdb/mi/mi-parse.c | 55 +- gdb/mi/mi-parse.h | 13 +- gdb/mi/mi-symbol-cmds.c | 2 +- gdb/mips-tdep.c | 6 +- gdb/mn10300-tdep.c | 10 +- gdb/moxie-tdep.c | 5 +- gdb/msp430-tdep.c | 6 +- gdb/nat/linux-osdata.c | 6 +- gdb/nds32-tdep.c | 3 + gdb/nto-procfs.c | 9 +- gdb/nto-tdep.c | 4 +- gdb/nto-tdep.h | 2 +- gdb/objc-lang.c | 8 +- gdb/objc-lang.h | 7 +- gdb/objfiles.c | 2 +- gdb/objfiles.h | 2 +- gdb/obsd-nat.c | 2 +- gdb/osdata.c | 15 +- gdb/osdata.h | 6 +- gdb/p-exp.y | 6 +- gdb/p-lang.h | 2 +- gdb/parser-defs.h | 6 +- gdb/printcmd.c | 18 +- gdb/proc-api.c | 12 +- gdb/proc-events.c | 6 +- gdb/proc-flags.c | 4 +- gdb/proc-utils.h | 2 +- gdb/proc-why.c | 4 +- gdb/procfs.c | 28 +- gdb/psymtab.c | 5 +- gdb/python/py-arch.c | 7 +- gdb/python/py-block.c | 2 +- gdb/python/py-breakpoint.c | 28 +- gdb/python/py-cmd.c | 20 +- gdb/python/py-event.c | 6 +- gdb/python/py-event.h | 4 +- gdb/python/py-evts.c | 2 +- gdb/python/py-finishbreakpoint.c | 20 +- gdb/python/py-framefilter.c | 2 +- gdb/python/py-inferior.c | 40 +- gdb/python/py-infthread.c | 2 +- gdb/python/py-lazy-string.c | 2 +- gdb/python/py-linetable.c | 26 +- gdb/python/py-objfile.c | 12 +- gdb/python/py-param.c | 2 +- gdb/python/py-progspace.c | 2 +- gdb/python/py-record-btrace.c | 4 +- gdb/python/py-record.c | 2 +- gdb/python/py-symbol.c | 15 +- gdb/python/py-symtab.c | 4 +- gdb/python/py-type.c | 10 +- gdb/python/py-unwind.c | 2 +- gdb/python/py-value.c | 14 +- gdb/python/python-internal.h | 121 ++ gdb/python/python.c | 45 +- gdb/ravenscar-thread.c | 8 +- gdb/record-btrace.c | 8 +- gdb/record-full.c | 2 +- gdb/record.c | 14 +- gdb/regcache.c | 15 +- gdb/remote-fileio.c | 2 +- gdb/remote-sim.c | 9 +- gdb/remote.c | 26 +- gdb/reverse.c | 2 +- gdb/rl78-tdep.c | 2 +- gdb/rs6000-aix-tdep.c | 5 + gdb/rs6000-nat.c | 10 +- gdb/rs6000-tdep.c | 4 +- gdb/rust-exp.y | 2 +- gdb/rust-lang.c | 2 +- gdb/rust-lang.h | 2 +- gdb/rx-tdep.c | 4 +- gdb/ser-unix.c | 1 + gdb/serial.h | 2 +- gdb/sh-tdep.c | 26 +- gdb/sh64-tdep.c | 2 +- gdb/sol-thread.c | 8 +- gdb/sol2-tdep.c | 2 +- gdb/sol2-tdep.h | 2 +- gdb/solib-darwin.c | 2 +- gdb/sparc-tdep.c | 3 + gdb/sparc64-tdep.c | 3 + gdb/spu-tdep.c | 12 +- gdb/stabsread.c | 129 +- gdb/stabsread.h | 10 +- gdb/symfile.c | 50 +- gdb/symfile.h | 4 +- gdb/symtab.c | 11 +- gdb/symtab.h | 6 +- gdb/target-delegates.c | 18 +- gdb/target-descriptions.c | 8 +- gdb/target.c | 18 +- gdb/target.h | 14 +- gdb/terminal.h | 57 - gdb/testsuite/ChangeLog | 32 + .../gdb.cp/wide_char_types.c} | 27 +- gdb/testsuite/gdb.cp/wide_char_types.exp | 181 +++ gdb/testsuite/gdb.threads/threadapply.exp | 166 +++- gdb/testsuite/gdb.trace/tsv.exp | 4 + gdb/testsuite/lib/gdb.exp | 19 + gdb/thread.c | 453 +++---- gdb/top.c | 7 +- gdb/top.h | 2 +- gdb/tracefile-tfile.c | 18 +- gdb/tracefile.c | 2 +- gdb/tracepoint.c | 50 +- gdb/tracepoint.h | 2 +- gdb/tui/tui-data.c | 2 +- gdb/tui/tui-data.h | 2 +- gdb/tui/tui-source.c | 2 +- gdb/tui/tui-source.h | 2 +- gdb/tui/tui-win.c | 11 +- gdb/tui/tui-windata.c | 2 +- gdb/tui/tui-windata.h | 2 +- gdb/tui/tui-winsource.c | 2 +- gdb/tui/tui.c | 2 +- gdb/unittests/optional-selftests.c | 94 ++ gdb/unittests/optional/assignment/1.cc | 195 +++ gdb/unittests/optional/assignment/2.cc | 193 +++ gdb/unittests/optional/assignment/3.cc | 156 +++ gdb/unittests/optional/assignment/4.cc | 156 +++ gdb/unittests/optional/assignment/5.cc | 80 ++ gdb/unittests/optional/assignment/6.cc | 90 ++ gdb/unittests/optional/assignment/7.cc | 29 + gdb/unittests/optional/cons/copy.cc | 126 ++ gdb/unittests/optional/cons/default.cc | 58 + gdb/unittests/optional/cons/move.cc | 124 ++ gdb/unittests/optional/cons/value.cc | 294 +++++ gdb/unittests/optional/in_place.cc | 65 + gdb/unittests/optional/observers/1.cc | 31 + gdb/unittests/optional/observers/2.cc | 35 + gdb/unittests/ptid-selftests.c | 153 +++ gdb/unittests/scoped_restore-selftests.c | 110 ++ gdb/utils.c | 13 +- gdb/utils.h | 4 +- gdb/varobj.c | 2 +- gdb/varobj.h | 2 +- gdb/vax-tdep.c | 2 +- gdb/version.in | 2 +- gdb/warning.m4 | 2 +- gdb/windows-nat.c | 14 +- gdb/windows-tdep.c | 3 + gdb/xcoffread.c | 8 +- gdb/xml-support.c | 573 ++++----- gdb/xml-support.h | 36 +- gdb/xml-tdesc.c | 84 +- gdb/xml-tdesc.h | 17 +- gdb/xstormy16-tdep.c | 5 +- gdb/xtensa-tdep.c | 5 +- gdb/xtensa-tdep.h | 2 +- include/ChangeLog | 28 + include/bfdlink.h | 9 +- include/dis-asm.h | 11 +- include/opcode/ppc.h | 100 +- ld/ChangeLog | 166 +++ ld/Makefile.am | 21 +- ld/Makefile.in | 21 +- ld/emulparams/dynamic_undefined_weak.sh | 13 +- ld/emulparams/elf32ppccommon.sh | 2 + ld/emultempl/pe.em | 64 +- ld/emultempl/pep.em | 116 +- ld/ld.texinfo | 40 +- ld/pe-dll.c | 58 +- ld/pe-dll.h | 4 +- ld/pep-dll.h | 5 +- ld/plugin.c | 23 +- ld/testsuite/ld-elf/indirect.exp | 76 ++ ld/testsuite/ld-elf/indirect5.map | 6 + ld/testsuite/ld-elf/indirect5.out | 2 + ld/testsuite/ld-elf/indirect5a.c | 9 + ld/testsuite/ld-elf/indirect5b.c | 15 + ld/testsuite/ld-elf/indirect6a.c | 9 + ld/testsuite/ld-elf/init-fini-arrays.d | 4 +- ld/testsuite/ld-elf/init-fini-arrays.s | 13 +- ld/testsuite/ld-elf/mbind1a.d | 8 - ld/testsuite/ld-elf/mbind1b.d | 8 - ld/testsuite/ld-elf/mbind1c.d | 8 - ld/testsuite/ld-elf/mbind2a.s | 8 +- ld/testsuite/ld-elf/pr19579a.c | 2 +- ld/testsuite/ld-elf/pr19617a.d | 2 +- ld/testsuite/ld-elf/pr19617b.d | 2 +- ld/testsuite/ld-elf/pr19617c.d | 2 +- ld/testsuite/ld-elf/pr21086.c | 8 + ld/testsuite/ld-elf/pr21086.list | 3 + ld/testsuite/ld-elf/pr21389.map | 6 + ld/testsuite/ld-elf/pr21389.s | 5 + ld/testsuite/ld-elf/pr21389a.d | 10 + ld/testsuite/ld-elf/pr21389b.d | 8 + ld/testsuite/ld-elf/pr21389c.d | 8 + ld/testsuite/ld-elf/readelf.exp | 2 +- ld/testsuite/ld-elf/shared.exp | 21 +- ld/testsuite/ld-elfvsb/elfvsb.exp | 10 +- ld/testsuite/ld-i386/pr19636-4d.d | 2 +- ld/testsuite/ld-ifunc/ifunc.exp | 8 + ld/testsuite/ld-mips-elf/mips-elf.exp | 3 +- ld/testsuite/ld-pe/pe.exp | 2 + ld/testsuite/ld-pe/weakdef-1.d | 8 + ld/testsuite/ld-pe/weakdef-1.s | 19 + ld/testsuite/ld-plugin/lto.exp | 9 + ld/testsuite/ld-plugin/pr21382a.c | 17 + ld/testsuite/ld-plugin/pr21382b.c | 7 + ld/testsuite/ld-undefined/weak-undef.exp | 103 ++- ld/testsuite/ld-x86-64/x86-64.exp | 4 +- ld/testsuite/lib/ld-lib.exp | 11 +- opcodes/ChangeLog | 84 ++ opcodes/Makefile.am | 1 + opcodes/Makefile.in | 2 + opcodes/aarch64-tbl.h | 16 +- opcodes/arc-dis.c | 4 +- opcodes/arm-dis.c | 4 +- opcodes/configure | 2 +- opcodes/configure.ac | 2 +- opcodes/disassemble.c | 14 + opcodes/epiphany-desc.c | 5 +- opcodes/fr30-desc.c | 5 +- opcodes/frv-desc.c | 1 + opcodes/ip2k-desc.c | 5 +- opcodes/iq2000-desc.c | 5 +- opcodes/lm32-desc.c | 5 +- opcodes/m32c-desc.c | 5 +- opcodes/m32r-desc.c | 5 +- opcodes/mep-desc.c | 5 +- opcodes/mt-desc.c | 5 +- opcodes/or1k-desc.c | 5 +- opcodes/po/POTFILES.in | 1 + opcodes/po/opcodes.pot | 18 +- opcodes/ppc-dis.c | 27 +- opcodes/ppc-opc.c | 164 ++-- opcodes/sparc-opc.c | 14 +- opcodes/vax-dis.c | 2 +- opcodes/wasm32-dis.c | 520 ++++++++ opcodes/xc16x-desc.c | 5 +- opcodes/xstormy16-desc.c | 5 +- sim/aarch64/ChangeLog | 9 + sim/aarch64/simulator.c | 193 +++ sim/testsuite/sim/aarch64/ChangeLog | 6 + sim/testsuite/sim/aarch64/fcmXX.s | 77 ++ sim/testsuite/sim/aarch64/fcvtl.s | 59 + 507 files changed, 11533 insertions(+), 5021 deletions(-) create mode 100644 gas/testsuite/gas/aarch64/illegal-3.d create mode 100644 gas/testsuite/gas/aarch64/illegal-3.s create mode 100644 gas/testsuite/gas/wasm32/disass-2.d create mode 100644 gas/testsuite/gas/wasm32/disass-2.s create mode 100644 gas/testsuite/gas/wasm32/disass.d create mode 100644 gas/testsuite/gas/wasm32/disass.s create mode 100644 gas/testsuite/gas/xtensa/auto-litpools-first1.d create mode 100644 gas/testsuite/gas/xtensa/auto-litpools-first1.s create mode 100644 gas/testsuite/gas/xtensa/auto-litpools-first2.d create mode 100644 gas/testsuite/gas/xtensa/auto-litpools-first2.s copy gdb/{terminal.h => common/gdb_termios.h} (68%) create mode 100644 gdb/common/refcounted-object.h delete mode 100644 gdb/gdbserver/terminal.h create mode 100644 gdb/i386-go32-tdep.c copy gdb/{sol2-tdep.h => testsuite/gdb.cp/wide_char_types.c} (64%) create mode 100644 gdb/testsuite/gdb.cp/wide_char_types.exp create mode 100644 gdb/unittests/optional-selftests.c create mode 100644 gdb/unittests/optional/assignment/1.cc create mode 100644 gdb/unittests/optional/assignment/2.cc create mode 100644 gdb/unittests/optional/assignment/3.cc create mode 100644 gdb/unittests/optional/assignment/4.cc create mode 100644 gdb/unittests/optional/assignment/5.cc create mode 100644 gdb/unittests/optional/assignment/6.cc create mode 100644 gdb/unittests/optional/assignment/7.cc create mode 100644 gdb/unittests/optional/cons/copy.cc create mode 100644 gdb/unittests/optional/cons/default.cc create mode 100644 gdb/unittests/optional/cons/move.cc create mode 100644 gdb/unittests/optional/cons/value.cc create mode 100644 gdb/unittests/optional/in_place.cc create mode 100644 gdb/unittests/optional/observers/1.cc create mode 100644 gdb/unittests/optional/observers/2.cc create mode 100644 gdb/unittests/ptid-selftests.c create mode 100644 gdb/unittests/scoped_restore-selftests.c create mode 100644 ld/testsuite/ld-elf/indirect5.map create mode 100644 ld/testsuite/ld-elf/indirect5.out create mode 100644 ld/testsuite/ld-elf/indirect5a.c create mode 100644 ld/testsuite/ld-elf/indirect5b.c create mode 100644 ld/testsuite/ld-elf/indirect6a.c create mode 100644 ld/testsuite/ld-elf/pr21086.c create mode 100644 ld/testsuite/ld-elf/pr21086.list create mode 100644 ld/testsuite/ld-elf/pr21389.map create mode 100644 ld/testsuite/ld-elf/pr21389.s create mode 100644 ld/testsuite/ld-elf/pr21389a.d create mode 100644 ld/testsuite/ld-elf/pr21389b.d create mode 100644 ld/testsuite/ld-elf/pr21389c.d create mode 100644 ld/testsuite/ld-pe/weakdef-1.d create mode 100644 ld/testsuite/ld-pe/weakdef-1.s create mode 100644 ld/testsuite/ld-plugin/pr21382a.c create mode 100644 ld/testsuite/ld-plugin/pr21382b.c create mode 100644 opcodes/wasm32-dis.c create mode 100644 sim/testsuite/sim/aarch64/fcmXX.s create mode 100644 sim/testsuite/sim/aarch64/fcvtl.s First 500 lines of diff: diff --git a/ChangeLog b/ChangeLog index bb87497..4ac2d63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-04-13 Andrew Jenner + + * config.sub: Sync with master version in config project. + 2017-04-03 Andrew Jenner * config.sub: Handle ia16 in $basic_machine. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0e4ad30..ba2d134 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,287 @@ +2017-04-21 H.J. Lu + + PR ld/21402 + * elf32-i386.c (elf_i386_link_hash_entry): Add + no_finish_dynamic_symbol. + (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0. + (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak + symbol, don't make it dynamic in PIE. + (elf_i386_relocate_section): If a symbol isn't dynamic in PIE, + set no_finish_dynamic_symbol and generate R_386_RELATIVE + relocation for R_386_GOT32 + (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol + isn't 0. + +2017-04-21 H.J. Lu + + PR ld/19617 + PR ld/21086 + * elflink.c (elf_link_add_object_symbols): Require + --no-dynamic-linker with -E/--dynamic-list when creating + dynamic sections. + +2017-04-20 Maciej W. Rozycki + + * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE + if forced local. + +2017-04-20 Maciej W. Rozycki + + * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about + dynamic symbol sorting. + +2017-04-20 H.J. Lu + + PR ld/21382 + * elflink.c (elf_link_add_object_symbols): Preserve + dynamic_ref_after_ir_def when restoring the symbol table for + unneeded dynamic object. + +2017-04-19 H.J. Lu + + PR ld/21401 + * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort + on on undefined IFUNC symbol in the second PLT. + +2017-04-19 Wedson Almeida Filho + + * peXXigen.c (pe_print_reloc): Correct chunk_end. + +2017-04-19 Alan Modra + + * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak + or make dynamic for info->dynamic_undefined_weak 0 and 1. + * elf32-ppc.c:Formatting. + (ensure_undefweak_dynamic): Don't make dynamic when + info->dynamic_undefined_weak is zero. + (allocate_dynrelocs): Discard undefweak dyn_relocs for + info->dynamic_undefined_weak. Discard undef dyn_relocs when + not default visibility. Discard undef and undefweak + dyn_relocs earlier. + (ppc_elf_relocate_section): Adjust to suit. + * elf64-ppc.c: Formatting. + (ensure_undefweak_dynamic): Don't make dynamic when + info->dynamic_undefined_weak is zero. + (allocate_dynrelocs): Discard undefweak dyn_relocs for + info->dynamic_undefined_weak. Discard them earlier. + +2017-04-17 H.J. Lu + + PR ld/21389 + * elflink.c (bfd_elf_size_dynamic_sections): Get soname index + before generating the version definition section. + +2017-04-17 Alan Modra + + * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking + state when a regular object file defines a symbol with + incompatible type to that defined by an earlier shared lib. + +2017-04-13 Alan Modra + + * coffcode.h: Wrap some overly long _bfd_error_handler args. + * elf.c: Likewise. + * elf32-arm.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-mep.c: Likewise. + * elf64-ia64-vms.c: Likewise. + * elf64-x86-64.c: Likewise. + * elflink.c: Likewise. + * elfnn-ia64.c: Likewise. + * elfxx-mips.c: Likewise. + +2017-04-13 Alan Modra + + * aoutx.h: Use %B and %A in error messages throughout file. + * aout-cris.c: Likewise. + * archive.c: Likewise. + * binary.c: Likewise. + * coff-rs6000.c: Likewise. + * coff-tic4x.c: Likewise. + * coffcode.h: Likewise. + * coffgen.c: Likewise. + * cofflink.c: Likewise. + * coffswap.h: Likewise. + * cpu-arm.c: Likewise. + * elf-eh-frame.c: Likewise. + * elf-m10300.c: Likewise. + * elf.c: Likewise. + * elf32-arc.c: Likewise. + * elf32-arm.c: Likewise. + * elf32-bfin.c: Likewise. + * elf32-frv.c: Likewise. + * elf32-iq2000.c: Likewise. + * elf32-m32c.c: Likewise. + * elf32-microblaze.c: Likewise. + * elf32-nds32.c: Likewise. + * elf32-rl78.c: Likewise. + * elf32-rx.c: Likewise. + * elf32-score.c: Likewise. + * elf32-score7.c: Likewise. + * elf32-sh64.c: Likewise. + * elf32-v850.c: Likewise. + * elf32-vax.c: Likewise. + * elf32-visium.c: Likewise. + * elf64-ia64-vms.c: Likewise. + * elf64-mmix.c: Likewise. + * elf64-sh64.c: Likewise. + * elfcode.h: Likewise. + * elfnn-aarch64.c: Likewise. + * elfnn-ia64.c: Likewise. + * elfxx-mips.c: Likewise. + * hpux-core.c: Likewise. + * ieee.c: Likewise. + * ihex.c: Likewise. + * linker.c: Likewise. + * merge.c: Likewise. + * mmo.c: Likewise. + * oasys.c: Likewise. + * pdp11.c: Likewise. + * peXXigen.c: Likewise. + * rs6000-core.c: Likewise. + * vms-alpha.c: Likewise. + * xcofflink.c: Likewise. + +2017-04-13 Alan Modra + + * bfd.c (PRINT_TYPE): Define. + (_doprnt): New function. + (error_handler_internal): Use _doprnt. + * coff-arm.c: Put %A and %B arguments to _bfd_error_handler + calls in their natural order, throughout file. + * coff-mcore.c: Likewise. + * coff-ppc.c: Likewise. + * coff-tic80.c: Likewise. + * cofflink.c: Likewise. + * elf-s390-common.c: Likewise. + * elf.c: Likewise. + * elf32-arm.c: Likewise. + * elf32-i386.c: Likewise. + * elf32-m32r.c: Likewise. + * elf32-msp430.c: Likewise. + * elf32-spu.c: Likewise. + * elf64-ia64-vms.c: Likewise. + * elf64-sparc.c: Likewise. + * elf64-x86-64.c: Likewise. + * elflink.c: Likewise. + * elfnn-aarch64.c: Likewise. + * elfnn-ia64.c: Likewise. + * elfxx-mips.c: Likewise. + +2017-04-13 Alan Modra + + * elf32-arm.c (arm_type_of_stub): Supply missing args to "long + branch veneers" error. Fix double space and format message. + * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg. + * elf64-ppc.c (tocsave_find): Supply missing %B arg. + +2017-04-13 Alan Modra + + * bfd-in2.h: Regenerate. + +2017-04-11 H.J. Lu + + * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the + extra `\n' in warning/error messages. + * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise. + * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise. + +2017-04-11 H.J. Lu + + * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore + processor-specific properties with generic ELF target vector. + +2017-04-10 Qing Zhao + + * elf32-sparc.c (elf_backend_fixup_symbol): New. + * elf64-sparc.c (elf_backend_fixup_symbol): New. + * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New. + (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and + has_non_got_reloc. + (link_hash_newfunc): Initialize has_got_reloc and + has_non_got_reloc. + (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp + section. + (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and + has_non_got_reloc. + (_bfd_sparc_elf_check_relocs): Set has_got_reloc and + has_non_got_reloc. + (_bfd_sparc_elf_fixup_symbol): New function. + (allocate_dynrelocs): Don't allocate space for dynamic + relocations and discard relocations against resolved undefined + weak symbols in executable. Don't make resolved undefined weak + symbols in executable dynamic. Keep dynamic non-GOT/non-PLT + relocation against undefined weak symbols in PIE. + (_bfd_sparc_elf_relocate_section): Don't generate dynamic + relocations against resolved undefined weak symbols in PIE + (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries + without ynamic PLT/GOT relocations for resolved undefined weak + symbols. + Don't generate dynamic relocation against resolved undefined + weak symbol in executable. + (pie_finish_undefweak_symbol): New function. + (_bfd_sparc_elf_finish_dynamic_sections): Call + pie_finish_undefweak_symbol on all symbols in PIE. + * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp. + (_bfd_sparc_elf_fixup_symbol): New function. + +2017-04-10 Nick Clifton + + * config.bfd: Remove ns32k from obsolete list. + +2017-04-10 Alan Modra + + PR 21287 + * elf.c (special_sections_f): Match .fini_array and .fini_array.*. + (special_sections_i): Likewise for .init_array. + (special_sections_p): Likewise for .preinit_array. + +2017-04-07 H.J. Lu + + PR ld/19579 + PR ld/21306 + * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check + ELF_COMMON_DEF_P for common symbols. + * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. + * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise. + * elflink.c (_bfd_elf_merge_symbol): Revert commits + 202ac193bbbecc96a4978d1ac3d17148253f9b01 and + 07492f668d2173da7a2bda3707ff0985e0f460b6. + +2017-04-07 Pedro Alves + + * opncls.c (bfd_get_debug_link_info): Rename to... + (bfd_get_debug_link_info_1): ... this. Change type of second + parameter to void pointer. Adjust. + (bfd_get_debug_link_info): Reimplement on top of + bfd_get_debug_link_info_1. + (separate_debug_file_exists, separate_alt_debug_file_exists): + Change type of second parameter to void pointer. Adjust. + (get_func_type, check_func_type): Change type of second parameter + to void pointer. + (find_separate_debug_file): Add 'func_data' parameter. Pass it to + the callback functions instead of passing the address of a local. + (bfd_follow_gnu_debuglink): Pass address of unsigned long local to + find_separate_debug_file. + (get_alt_debug_link_info_shim): Change type of second parameter to + void pointer. Adjust. + (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to + find_separate_debug_file. + (get_build_id_name, bfd_boolean check_build_id_file): Change type + of second parameter to void pointer. Adjust. + (bfd_follow_build_id_debuglink): Pass address of bfd_build_id + pointer local to find_separate_debug_file. + +2017-04-07 Tristan Gingold + + * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak + external symbols with a definition. + (_bfd_coff_gc_mark_extra_sections): Fix typo. + +2017-04-07 Alan Modra + + * po/SRC-POTFILES.in: Regenerate. + 2017-04-05 Alan Modra * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c index 2e36e9d..6cd14e3 100644 --- a/bfd/aout-cris.c +++ b/bfd/aout-cris.c @@ -197,8 +197,8 @@ MY (swap_ext_reloc_out) (bfd *abfd, if (r_type > 2) { /* xgettext:c-format */ - _bfd_error_handler (_("%s: Invalid relocation type exported: %d"), - bfd_get_filename (abfd), r_type); + _bfd_error_handler (_("%B: Invalid relocation type exported: %d"), + abfd, r_type); bfd_set_error (bfd_error_wrong_format); } diff --git a/bfd/aoutx.h b/bfd/aoutx.h index d30e8b8..9a5f7ce 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -1279,8 +1279,8 @@ NAME (aout, set_section_contents) (bfd *abfd, { _bfd_error_handler /* xgettext:c-format */ - (_("%s: can not represent section `%s' in a.out object file format"), - bfd_get_filename (abfd), bfd_get_section_name (abfd, section)); + (_("%B: can not represent section `%A' in a.out object file format"), + abfd, section); bfd_set_error (bfd_error_nonrepresentable_section); return FALSE; } @@ -1580,9 +1580,9 @@ translate_to_native_sym_flags (bfd *abfd, file. */ _bfd_error_handler /* xgettext:c-format */ - (_("%s: can not represent section for symbol `%s' in a.out " + (_("%B: can not represent section for symbol `%s' in a.out " "object file format"), - bfd_get_filename (abfd), + abfd, cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*")); bfd_set_error (bfd_error_nonrepresentable_section); return FALSE; @@ -1616,8 +1616,8 @@ translate_to_native_sym_flags (bfd *abfd, { _bfd_error_handler /* xgettext:c-format */ - (_("%s: can not represent section `%s' in a.out object file format"), - bfd_get_filename (abfd), bfd_get_section_name (abfd, sec)); + (_("%B: can not represent section `%A' in a.out object file format"), + abfd, sec); bfd_set_error (bfd_error_nonrepresentable_section); return FALSE; } @@ -5419,9 +5419,8 @@ NAME (aout, final_link) (bfd *abfd, by the reloc size. */ _bfd_error_handler /* xgettext:c-format */ - (_("%s: relocatable link from %s to %s not supported"), - bfd_get_filename (abfd), - sub->xvec->name, abfd->xvec->name); + (_("%B: relocatable link from %s to %s not supported"), + abfd, sub->xvec->name, abfd->xvec->name); bfd_set_error (bfd_error_invalid_operation); goto error_return; } diff --git a/bfd/archive.c b/bfd/archive.c index d96c866..f209bab 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -2402,8 +2402,8 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) if (strcmp (syms[src_count]->name, "__gnu_lto_slim") == 0) _bfd_error_handler - (_("%s: plugin needed to handle lto object"), - bfd_get_filename (current)); + (_("%B: plugin needed to handle lto object"), + current); namelen = strlen (syms[src_count]->name); amt = sizeof (char *); map[orl_count].name = (char **) bfd_alloc (arch, amt); diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index fbd379f..1d73134 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1069,7 +1069,8 @@ bfd *bfd_openr (const char *filename, const char *target); bfd *bfd_fdopenr (const char *filename, const char *target, int fd); -bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); +bfd *bfd_openstreamr (const char * filename, const char * target, + void * stream); bfd *bfd_openr_iovec (const char *filename, const char *target, void *(*open_func) (struct bfd *nbfd, diff --git a/bfd/bfd.c b/bfd/bfd.c index a9402e4..23a4350 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -611,176 +611,240 @@ CODE_FRAGMENT static const char *_bfd_error_program_name; -/* This is the default routine to handle BFD error messages. - Like fprintf (stderr, ...), but also handles some extra format specifiers. - - %A section name from section. For group components, print group name too. - %B file name from bfd. For archive components, prints archive too. - - Note - because these two extra format specifiers require special handling - they are scanned for and processed in this function, before calling - vfprintf. This means that the *arguments* for these format specifiers - must be the first ones in the variable argument list, regardless of where - the specifiers appear in the format string. Thus for example calling - this function with a format string of: - - "blah %s blah %A blah %d blah %B" - - would involve passing the arguments as: - - "blah %s blah %A blah %d blah %B", - asection_for_the_%A, - bfd_for_the_%B, - string_for_the_%s, - integer_for_the_%d); - */ - -static void -error_handler_internal (const char *fmt, va_list ap) +/* This macro and _doprnt taken from libiberty _doprnt.c, tidied a + little and extended to handle '%A' and '%B'. */ + +#define PRINT_TYPE(TYPE) \ + do \ + { \ + TYPE value = va_arg (ap, TYPE); \ + result = fprintf (stream, specifier, value); \ + } while (0) + +static int +_doprnt (FILE *stream, const char *format, va_list ap) { - char *bufp; - const char *new_fmt, *p; - size_t avail = 1000; - char buf[1000]; - - /* PR 4992: Don't interrupt output being sent to stdout. */ - fflush (stdout); + const char *ptr = format; + char specifier[128]; + int total_printed = 0; - if (_bfd_error_program_name != NULL) - fprintf (stderr, "%s: ", _bfd_error_program_name); - else - fprintf (stderr, "BFD: "); - - new_fmt = fmt; - bufp = buf; - - /* Reserve enough space for the existing format string. */ - avail -= strlen (fmt) + 1; - if (avail > 1000) - _exit (EXIT_FAILURE); - - p = fmt; - while (1) + while (*ptr != '\0') { - char *q; - size_t len, extra, trim; + int result; - p = strchr (p, '%'); - if (p == NULL || p[1] == '\0') + if (*ptr != '%') { - if (new_fmt == buf) - { - len = strlen (fmt); - memcpy (bufp, fmt, len + 1); - } - break; + /* While we have regular characters, print them. */ + char *end = strchr (ptr, '%'); + if (end != NULL) + result = fprintf (stream, "%.*s", (int) (end - ptr), ptr); + else + result = fprintf (stream, "%s", ptr); + ptr += result; } - - if (p[1] == 'A' || p[1] == 'B') + else { - len = p - fmt; hooks/post-receive -- Repository for Project Archer.