The branch, users/jkratoch/indexcxx has been updated via 025edc48851da0e21aea57628f5fb8cd305a281f (commit) via 24e5b4e682a92788ffa676e963b7f1dec2101333 (commit) via b67aeab02c05fdd654f132a550dd4f196cb1f6d3 (commit) via 11997a83a040245406b6e2e9978c6720f17e80c4 (commit) via 79778b30dc5881a8d88b55744cab53d95fa6fda2 (commit) via ffdbe8642e74527795b695988a176f0920d58f96 (commit) via 9d736fbf01d20bc03804fa0cb49d99fdf6628fab (commit) via 3e6c75670009a5e9eaa72eb456b296451b3c46fe (commit) via 4c8798c9923de48c71430ce262d83042179232c6 (commit) via 3de88e9afbf0d8d10a8c4ce1415c219120e0a0c1 (commit) via 0e7b8f61069f1219ca53a9dd927ba55c9a7eefd4 (commit) via 2253c8f089193b90141e08436417bc8ea1dd6015 (commit) via 4a14e306468af630a27302d68b8d4c59733141b4 (commit) via 645d3342ba2b920722991255513030bb903b794e (commit) via 75d7d2986cf896fac8f0690db68ebc552e0b0339 (commit) via 5badf10a18af78c57dd4ce8e6a6ead7f46e1a878 (commit) via 21701718895d186285e6daf04cc7342c6c88fb03 (commit) via cee59b3feac9a8f6300a5b788e3db4e15af2a894 (commit) via 09220eae9df07c40d206a35e6caaecba92ab8f46 (commit) via 639a9038c9f4fc50b6a57c18fe84db4559367a96 (commit) via bcc0c096d5b0f77482cdb3154acd2515a0ca832f (commit) via c0f55cc689a57deb342b988b8f0ecb908f0a76e1 (commit) via 15c0a2a9305648095f5586a02b5a5017e1643e99 (commit) via aa0061181ab00081e9907447561e589d6edee9f2 (commit) via 3fcf899da106890f3948093c2424f9dff67d6fe0 (commit) via 4297a3f0029974c62628d69b6f3f9ef25f01ea7d (commit) via e1cb3213476485a01aa11ecedfa186e386cb4bdb (commit) via e4347c89f3a14b480fc88581d1363835f7b99b68 (commit) via 53cc15f5fe1f5e2358994d4f60f1c2aa9115004d (commit) via a65cfae5f8b268158c23a862e7a996d15bbcef0e (commit) via 3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd (commit) via f9aeb8d499fa12610610dc19618230304c698f6c (commit) via 51457a05780da82b5321a1574caed95ac0e6923e (commit) via 5b291c049658614196197e4ea4bb42bcc176b876 (commit) via e696b3ad342dde596dcdad4cff6b875c361ed6d0 (commit) via 59a561480d547d041127630b1ba17a284eef8225 (commit) via 39e224f6f9ee3f6123d4c9ddb7c0955e0604c1b4 (commit) via e406e428dfe9d64e3be0b7a3c1c97c09edc5bdba (commit) via dcb84eda0c5f25835251a311c4d6704e70cfa498 (commit) via 4ea0266c22eccf6e7719469a981267659e47ef3a (commit) via d5e0ba9cdb0d002b97bab722cce673ce86cf7b11 (commit) via d3375ddde4011242ef576083459fc51d0ddc53c8 (commit) via 5c62b69b91e13c6b9c126480680cff836c0b282d (commit) via aaed6f5be3a41a88cc13c744e88af78f5a42dd5b (commit) via 84e8538ee3c8139a99e75e661fff500bb93c8cd5 (commit) via bbdf9b697fc0652379794267b23f597e15c7db57 (commit) via 82e66161e649e5e801c40a52cba759292a76a59a (commit) via d9cb6cdcfa12368f2f639f8cd06d18b94bd98a39 (commit) via 1afaf9f42fe201872d758214beceff85325a988a (commit) via aac12e2497a42b47223680ab1b5924137de77c9a (commit) via bbe1eef1e585e19d5493882e55f2b7902df9827a (commit) via 10799020a9336b6a88c1ace53c601960b840d580 (commit) via 00204cf7da01d99205aacc994e5c594ed12bba64 (commit) via 11a3371447f15af26def26646ad2eb7a4386462d (commit) via 317cd4925a9d6ef6f8752a771cb56e85ddfb30f0 (commit) via 9ac8a7c281aa949cf588cccb9977ea51eaff8130 (commit) via 4ac4bb6ad5ead16be5ca6996a3e325c26ddf71da (commit) via 0dd6ae21da832f351a3722d2f8bac187fc3bdfef (commit) via 9bcbdca808b5f9fec6217d20bd4b48a56008c460 (commit) via 7503099f3e29739d34cb1224d54fba96404e6e61 (commit) via 4b94dd2de12dd0389615700b13b63260e162ccf0 (commit) via 1d3fa25f5802fe2250f32f335ad57897a62e0fe2 (commit) via b4fcfd3b4d173129207f804f5eee4557c788d66b (commit) via 7942e96e435d1cf4d4dbf58c47bb28d9f628c9e6 (commit) via 6ebac3fbacebaebd9e2c9393da3b612342d953a9 (commit) via 2cc36e25db366d70a975702b61c7700ae934d4d0 (commit) via a8be5506b626a57f84771c5ddfaefabf2d61c017 (commit) via ba14f3792fe007bedd88b62e554c79258adc53d9 (commit) via b121eeb9971ebfceffc38e6131fdc15ec4188599 (commit) via 728a79135f51a1c20719ebaf3c98446d9ee248db (commit) via a7c0469f992721b30665ba92f4f2f74d29032a84 (commit) via 34b433203b5f56149c27a8dfea21a921392cb158 (commit) via a3a5feccd26be653efbdf1408874b98962baaa50 (commit) via f8d995870f957d5fd32fb21fb4afe76a754ddf31 (commit) via 28f1c60507ad4ca2252cebada30d2f63ec3b772f (commit) via ec3b243d4308ee56c9e3c62470b10ed2a822eb51 (commit) via 2c52e2e8c9e8f733cc0772d1400b0f4d3eb7379c (commit) via e189bfe660d335f3b7c61446c9b5d3b0f0701606 (commit) via aab2c17756ee5bef0ea5783a460a0990450b3bd5 (commit) via 4d78db49e6eee097365e31f9b5b47e5391243979 (commit) via 152c92b261fd9e4655688bef746ca32352f56bc4 (commit) via 1e1247c89ca2ce10dbf2c3ed61fba942f9c536ca (commit) via 1728969e93010862fe0ef7985cabe03a4494a63e (commit) via c3847462f86778e97222a72378a84182f92c644a (commit) via 453018bf4490421a995cd76b3d2a3f322359c6a5 (commit) via b416fe873ef44b2a613c9266c6462a481926d986 (commit) via 03b039a518fa0f89a9900a44a8b874cc91061305 (commit) via 9494d9636612cd9bd22e38625fbc89147beafea7 (commit) via 7cb7b948ce62831a999f88054a6b2d39afbe926e (commit) via cc7e96c25d59db0a5279da0a0ff36d61151f3021 (commit) via c98763221af696a9e0c6686da7d65881bfd6bdd0 (commit) via 87c336f60eccc6506ff19369c29575f43fea02ea (commit) via d47c3ff7d55122befac848fe64b7445789c78787 (commit) via 2aece2ba02457e83fd2a780a8ac596b6a90adf29 (commit) via c1b465c94e26be629315bf28e3763dea9dea8336 (commit) via 2c232b8361a044d689d12161b7a645d238586f5e (commit) via 9216a6f33592c350ad50696d5571c82e47b71a5e (commit) via cf81cf6081d1a8c15c477f903d15d7b88f31b686 (commit) via c799a79d66d09c442d85467986c2e8873f09297c (commit) via 0efcde634d45f4cda03fd18c43ff449103559d7a (commit) via a379284af268ed768674e7f452ca78dad2aaaf55 (commit) via 8a6200ba863f207d93467312431d107f50f0e2ab (commit) via 9c7272f0833da2bfdf513d41bc41cdbc5f4fc5f7 (commit) via f79ec2066662b2c32c9e62ee372c9c230d206b89 (commit) via edb5fb00a6865884f99be01a9e97f44243a9deb9 (commit) via 551196862e4e9dfda510f59c53b0a3ff3153e4ed (commit) via 6a06fbb7b73fe55d6b9057f8154652e1ae8f883c (commit) via c6386875ba57a806c896ba097afef525671de4a0 (commit) via ddaaf0fb8605fced72e84410fc7ac834e529eb53 (commit) via 1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9 (commit) via 36bc18a810a13f884d826842abbdd6d744ff6481 (commit) via a8ebe3d5f17f12490012a1a3c69d17b6e9362805 (commit) via 50cfacb78f3998e5ecc653090e4f1a11dfb3d8dd (commit) via c5a22423d09e3bf670fb0de0a98e6feb6176eb3f (commit) via 6bda016bec556855c6d4e191f360f921faa40ded (commit) via 21122961ecea30b3be7c788e09179d297e3233f0 (commit) via c362e6217b556ce932250c340218f1ca16391070 (commit) via 7978d7c385b072a344d969f71cdc68e1a1171ec2 (commit) via 896c0c1edee117ea333c66b1adac8c6f4def3f2b (commit) via b9da89d161e3903faa335f444af2bf05e40f926e (commit) via c793cac124dd2eb34042f2e43abb099a26e34cb0 (commit) via 5ef2d51bd6ae49b28282835156d1d6622beac4a6 (commit) via f955cccff399ccc4e16b8e90f140f2e9a785a07b (commit) via d40e34db392f834793fb9af487121776b4cec6e7 (commit) via 4b5900d8b81522bd6ebe4d94d45dfb54d1982c62 (commit) via b9d62f893fcc0b4c36aad0552810dcde304979d0 (commit) via d5bb792ca130aac17e080325e4005ef417ceabd5 (commit) via 118aa6cf395aec093fe12d7fb2d05441791a93fa (commit) via 316a1245fe31e327223ca66797b789eaf9544c2c (commit) via 4aef764338ed40a7fa9573b0e6e2ade817acd688 (commit) via bb4287c562027eafe63ddac9fd4c7e1730335795 (commit) via e299b3551edbe81be2062fcaef9319d681d0d15b (commit) via a08f8d99b87b0b0f681a27eba8e25e2fb0abd034 (commit) via 5f4d10850850cd95af5e95a16848c8c07a273d88 (commit) via 7b5d48229b7faa16f69e87fb269f17db0291d89f (commit) via 8b1e5da10ab58d2aa5eb84bf27de511294f061ef (commit) via 55e22ca83ae50d6fe422cd0542f2a1a5934b2dd2 (commit) via f9f791a1b147c404a489485dba5eca49f8dbcbb9 (commit) via 14ea2c1b230a62f312346fb16716b3dd4850815b (commit) via 77f5e65ecfb669ea1d2fd74b74fbbf0d0c20daf8 (commit) via a87ded7b88a85b40f2aec5e5b6c972dd7b74b3a9 (commit) via 86fa6981e7487e2c2df4337aa75ed2d93c32eaf2 (commit) via f03265d9cda1f5f8df238efa9b7a20330e5711f1 (commit) via c1fe188b154a4e81372629316be3d3a7820efdac (commit) via 4b8b687e885287ed85dafffcebbb8d03d7ea2c38 (commit) via c7341d5a6b334464d84672229d9912d99347db34 (commit) via 1de05205afe1ecd1f1fa2befc6843d0dc70adefc (commit) via 1437d0631b209500db8371c425e896deb66ec9f9 (commit) via c65d6b55b3a592906c470c566f57ad8ceacc1605 (commit) via 15c22686d0e33d87262bc9075296eeddd7d955f7 (commit) via 1fc87489b40b3100badf184a7c266387bae47def (commit) via 2e86a2830cfef688a27e17353b84f59f8147ab23 (commit) via 25dcbff6ef0088e080d92b3cbc346ae0b5071d9d (commit) via dc9366eb0592157e2125967690f0aed61b17bcf7 (commit) via 6e5d74e74756fafe59e8198c4cc462cf7c57e12c (commit) via 5cf70512f835032c413f2554af07814e1dc05cd6 (commit) via 9753a2f6d74dc92d2ad94993a5479ee0edbc6887 (commit) via 1a4dd9ddae4ce51724b4e08c6304e7c64f8f916f (commit) via 7cbbff33a502dcba0264a1935840345274b8aee2 (commit) via 50dbe6e1bc8589db8e900299ef03ce9ead4ef3d7 (commit) via 1672e0d98d88d11b5c7d5793bd2cf29cbb56696f (commit) via f7bb4e3a0d3738e8cce3dcded6ef12c9949cb85f (commit) via e45ced6c5e06b0092ac9f5497aa580cfad0c953c (commit) via 5f6fd321915fae0194e01322d22cad4e451e8d20 (commit) via 44959fa81858df7d06fd83b0595b66709e344074 (commit) via f8c4e718c26a0181821398e09d96113c0ff49c15 (commit) via 6dbb839a78d343b0a7435ec7db46ee359b1f62ec (commit) via 4a612d6f67d605f480ce7eec7fd9ca1cd1087b35 (commit) via ea86f5344298e24801c262d9b52afcc9cb692959 (commit) via 2b841ec2066db4870beaa5298feb02f5e20faf7b (commit) via d933941d6c5ce5b2dcaaa869919b6f3de06b725d (commit) via b1b07054c08eea65ba8d1a9f771796d686f337e5 (commit) via bb98f85480da563f4f6438abdabb68a69bc746b8 (commit) via 603555e563725616246912711419637add54c961 (commit) via 1cccfb31f5ba0dbc1cd3c679daf2f5b40252c6e0 (commit) via d274ecf4ddf76768af57e27f654b9ce6784b391c (commit) via 79a964dca572024447adf92e50959dc88aa4f27a (commit) via 73f07bffaf8d423295a38dde51dfe6ec7b273280 (commit) via ea0de82ec2d7f109ba179d8d55130805e680f02d (commit) via 9e1a8675d49a5bbb881f664f8b7a1081432c994d (commit) via 1f5345a614203185f7fdacbf4b000d2676de26dd (commit) via 62e755d208d7359e722a248df3e74278779272c8 (commit) via 49fced1206db40c71208c201165d65f92c69cebe (commit) via 2e0ce1c84d328bde4dca24b7cfc8b9c033ed271c (commit) via 0792e0e1199e76dce19a0f9fbdb29c75b8be8a9b (commit) via 921ea8830c62bf4a60af1783bdd443fd43286359 (commit) via 8ecbe595e69a84a0e3053884832d63af37113680 (commit) via df97be551faa262732128493c8ac159ae4b7f6d3 (commit) via 7d45f3df96ca108f6d7d0c5e4279e22b820145fa (commit) via 611a3ca929d6529f4e7576b0e2ffb588839c1b21 (commit) via d20928fac9ab65449db910bd99a0f48ad29fb22b (commit) via b565cf21c80945d5e9baa6871653aae5add2d493 (commit) via 05ed43104ef2c3f75779438111e2913dbd4555a6 (commit) via f98450c6eee6878ebf5b052d231758026d250427 (commit) via c871dadee1817d4b9f3ba6ee792730c9eccf88e0 (commit) via b451e98a909e1a6afa71c4a4655adc4cfeea5249 (commit) via d4620bee57be53f7a6b14c01b2ea22d22a61bef0 (commit) via 9875b36538d35f2292ddc3bb5e7c60e1582aa087 (commit) via 673cff9b8b3105f74ce97c202a0727f9e83e56e6 (commit) via 199add01b6704e1cd8a48945bd775fbe8524fa75 (commit) via ecd78df2707734ccb2d0f6e5426321fa399befaa (commit) via 134e805d3e18cf700a5046912b8dca9301fe6f2e (commit) via 01cca2f95e4a448cbfb7dc940cc38fe89300b15f (commit) via 9ef920e933bf2ea228c909cf81636e6d9577e51e (commit) via a7e8b06b8901309632fad842ffd7d90a81447c80 (commit) via 65b48a81404cb058c75c562f7dfdeb74f07eba72 (commit) via 2979a883540d9ce6e41dd0509ea2a345de9cf050 (commit) via 3de43e7beb9839fa268a73be77de73a7b7cd97db (commit) via 15c7c1d8a535000e94ed36f4259d0ede32001408 (commit) via 4ef97a1b459849ad190244c36b36d45bdd078030 (commit) via 7ba71655a425ac44721f97cc0ad7922ca15bce43 (commit) via afbf7e8e3aa24152ad58e430c8d37d82e5751f1c (commit) via 0e39210161e7c547ab53afb86997303e24a42c0c (commit) via 279a558a4d0fad268738ec916628c9c12cfcaf5b (commit) via 9dfd0db952fc07dccebbc244df2a20a6eda14b2c (commit) via d538e36decd5628c084dbd5a7de13719b8b92121 (commit) via 8362122330c97c8c4a15da4e7ba8aa29f0c11157 (commit) via 2123df0ebfc7ade46784ef412226490d59f8ce05 (commit) via fbf25dfdfdba2c057e7ccdae4e0d6a2139c66dd5 (commit) from bf7bf0b1083e2748d04205c67e245614e0b42929 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 025edc48851da0e21aea57628f5fb8cd305a281f Merge: bf7bf0b 24e5b4e Author: Jan Kratochvil Date: Wed Mar 22 22:51:17 2017 +0100 Merge remote-tracking branch 'gdb/master' into indexcxx commit 24e5b4e682a92788ffa676e963b7f1dec2101333 Author: Max Filippov Date: Wed Mar 22 10:19:14 2017 -0700 gas: xtensa: make trampolines relaxation work with jumps in slots other than 0 add_jump_to_trampoline assumes that jump instruction is in slot 0, when it's in other slot that results in fixup that references NULL symbol, which results in segfault later in xtensa_make_cached_fixup. Search for the non-NULL symbol in the tc_frag_data.slot_symbols and check that there's exactly one such slot. xtensa_relax_frag for RELAX_TRAMPOLINE reassigns fixup from the original instruction with jump to generated jump in the trampoline frag, but does not fix its fx_r_type or fx_size. That results in "undecodable fix" or "fixup not contained within frag" error messages during relaxation. Fix both these fields. gas/ 2017-03-22 Max Filippov * config/tc-xtensa.c (xtensa_relax_frag): Change fx_size of the reassigned fixup to size of jump instruction (3) and fx_r_type to BFD_RELOC_XTENSA_SLOT0_OP, as there's only one slot. (add_jump_to_trampoline): Search origfrag->tc_frag_data.slot_symbols for the slot with non-NULL symbol and use that slot instead of slot 0. commit b67aeab02c05fdd654f132a550dd4f196cb1f6d3 Author: Simon Marchi Date: Wed Mar 22 10:35:07 2017 -0400 Remove lwp -> pid conversion in linux_nat_xfer_partial The linux_nat_xfer_partial does a conversion of inferior_ptid: if it's an LWP (ptid::lwp != 0), it builds a new ptid with the lwp as the pid and assigns that temporarily to inferior_ptid. For example, if inferior_ptid is: { .pid = 1234, .lwp = 1235 } it will assign this to inferior_ptid for the duration of the call: { .pid = 1235, .lwp = 0 } Instead of doing this, this patch teaches the inf-ptrace implementation of xfer_partial to deal with ptids representing lwps by using get_ptrace_pid. Also, in linux_proc_xfer_spu and linux_proc_xfer_partial, we use ptid_get_lwp instead of ptid_get_pid. While not strictly necessary, since the content of /proc/ and /proc/ should be the same, it's a bit safer, because: - some files under /proc// may not work if the thread is running, just like ptrace requires a stopped thread. The current thread's lwp id is more likely to be in the necessary state (stopped). - if the leader () had exited and is thus now zombie, then several files under "/proc/" won't work, while they will if you use "/proc/". The testsuite found no regression on native amd64 linux. gdb/ChangeLog: * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid using get_ptrace_pid. * linux-nat.c (linux_nat_xfer_partial): Don't set/restore inferior_ptid. (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of inferior_ptid instead of pid. commit 11997a83a040245406b6e2e9978c6720f17e80c4 Author: Nick Clifton Date: Wed Mar 22 14:01:03 2017 +0000 Sync top level config files with master versions in the FSF config project. * config.sub: Sync with master version in config project. * config.guess: Likewise. commit 79778b30dc5881a8d88b55744cab53d95fa6fda2 Author: Yao Qi Date: Wed Mar 22 12:40:24 2017 +0000 Remove @code for python There's no reason to use @code for Python the name of a programming language. gdb/doc: 2017-03-22 Yao Qi * python.texi (Inferiors In Python): Remove @code from Python. commit ffdbe8642e74527795b695988a176f0920d58f96 Author: Yao Qi Date: Wed Mar 22 12:35:31 2017 +0000 Wrap locally used classes in anonymous namespace Both aarch64-tdep.c and arm-tdep.c defines a class instruction_reader, which violates ODR, but linker doesn't an emit error. I fix this issue by wrapping them by anonymous namespace, but I think it is better to apply this for all locally used classes. If it is a good idea to put locally used class into anonymous namespace, we should document this rule into GDB coding convention, or even GCC coding convention. Note that anonymous namespace has been used in GCC but GCC coding convention doesn't mention the it. gdb: 2017-03-22 Yao Qi * aarch64-tdep.c: Wrap locally used classes in anonymous namespace. * arm-tdep.c: Likewise. * linespec.c: Likewise. * ui-out.c: Likewise. commit 9d736fbf01d20bc03804fa0cb49d99fdf6628fab Author: Jonah Graham Date: Wed Mar 22 11:19:44 2017 +0000 Import sys in gdb/python/lib/gdb/printer/bound_registers.py Pick up missing bits from the patch merged in. 2017-03-22 Jonah Graham PR gdb/19637 * python/lib/gdb/printer/bound_registers.py: Import sys. commit 3e6c75670009a5e9eaa72eb456b296451b3c46fe Author: GDB Administrator Date: Wed Mar 22 00:00:28 2017 +0000 Automatic date update in version.in commit 4c8798c9923de48c71430ce262d83042179232c6 Author: Sandra Loosemore Date: Tue Mar 21 13:25:09 2017 -0700 Disable shared library tests for nios2-*-elf. The Nios II processor documentation defines relocations for PIC and shared libraries as part of the GNU/Linux ABI only; GCC rejects -fpic on bare-metal. 2017-03-21 Sandra Loosemore ld/ * testsuite/lib/ld-lib.exp (check_shared_lib_support): Return false for nios2-*-elf. commit 3de88e9afbf0d8d10a8c4ce1415c219120e0a0c1 Author: Simon Marchi Date: Tue Mar 21 11:35:54 2017 -0400 windows: Use ptid from regcache in register fetch/store Use the ptid from the regcache so we don't depend on the current value of the inferior_ptid global. Also, change how the current thread is passed to sub-functions. The windows_fetch_inferior_registers function sets current_thread then calls do_windows_fetch_inferior_registers, which reads current_thread. This very much looks like passing a parameter through a global variable. I think it would be more straightforward to pass the thread as a parameter. gdb/ChangeLog: * windows-nat.c (do_windows_fetch_inferior_registers): Add windows_thread_info parameter and use it instead of current_thread. (windows_fetch_inferior_registers): Don't set current_thread, pass the thread to do_windows_fetch_inferior_registers. Use ptid from regcache instead of inferior_ptid. (do_windows_store_inferior_registers): Add windows_thread_info parameter and use it instead of current_thread. (windows_store_inferior_registers): Don't set current_thread, pass the thread to do_windows_store_inferior_registers. Use ptid from regcache instead of inferior_ptid. commit 0e7b8f61069f1219ca53a9dd927ba55c9a7eefd4 Author: Simon Marchi Date: Tue Mar 21 11:35:42 2017 -0400 Remove remaining reference to struct serial::current_timeout I get this when trying to build for --host=x68_64-w64-mingw32: /home/emaisin/src/binutils-gdb/gdb/ser-mingw.c: In function 'void ser_windows_raw(serial*)': /home/emaisin/src/binutils-gdb/gdb/ser-mingw.c:166:8: error: 'struct serial' has no member named 'current_timeout' scb->current_timeout = 0; ^~~~~~~~~~~~~~~ It is just a leftover from 9bcbdca808b5f9fec6217d20bd4b48a56008c460 PR remote/21188: Fix remote serial timeout gdb/ChangeLog: * ser-mingw.c (ser_windows_raw): Remove reference to struct serial::current_timeout. commit 2253c8f089193b90141e08436417bc8ea1dd6015 Author: Andreas Krebbel Date: Tue Mar 21 14:21:02 2017 +0100 S/390: Remove vx2 facility flag This patch removes the vx2 facility flag. It will not be used by GCC and was a misnomer anyway. Committed to mainline and 2.28 branch. include/ChangeLog: 2017-03-21 Andreas Krebbel * opcode/s390.h (S390_INSTR_FLAG_VX2): Remove. (S390_INSTR_FLAG_FACILITY_MASK): Adjust value. gas/ChangeLog: 2017-03-21 Andreas Krebbel * config/tc-s390.c (s390_parse_cpu): Remove S390_INSTR_FLAG_VX2 from cpu_table. Remove vx2, and novx2 from cpu_flags. opcodes/ChangeLog: 2017-03-21 Andreas Krebbel * s390-mkopc.c (main): Remove vx2 check. * s390-opc.txt: Remove vx2 instruction flags. commit 4a14e306468af630a27302d68b8d4c59733141b4 Author: Andi Kleen Date: Tue Mar 21 13:05:19 2017 +0000 Add --inlines option to objdump to include scope backtrace of inlined functions when generating source line number information. * objdump.c (unwind_inlines): Add. (option_values): Add OPTION_INLINES. (show_line): Unwind inlines if requested. (main): Parse OPTION_INLINES. (usage): Document --inlines. * doc/binutils.texi: Document --inlines. * NEWS: Likewise. commit 645d3342ba2b920722991255513030bb903b794e Author: Rinat Zelig Date: Tue Mar 21 11:37:33 2017 +0000 arc/nps400: Add cp16/cp32 instructions to opcodes library Instructions for loading or storing 16/32B data from one address type to another. gas/ChangeLog * testsuite/gas/arc/nps400-11.s: New file. * testsuite/gas/arc/nps400-11.d: New file. include/ChangeLog * opcode/arc.h (insn_class_t): Add DMA class. opcodes/ChangeLog * arc-nps400-tbl.h: Add cp32/cp16 instructions format. * arc-opc.c: Add F_NPS_NA, NPS_DMA_IMM_ENTRY, NPS_DMA_IMM_OFFSET. (insert_nps_imm_offset): New function. (extract_nps_imm_offset): New function. (insert_nps_imm_entry): New function. (extract_nps_imm_entry): New function. commit 75d7d2986cf896fac8f0690db68ebc552e0b0339 Author: Nick Clifton Date: Tue Mar 21 11:48:57 2017 +0000 Update support for GNU BUILD notes so that version notes can contain extra information, and stack protection notes can contain numeric values. * readelf.c (print_gnu_build_attribute_name): Allow stack protection notes to contain numeric values. Use a colon rather than a space to separate a string name from its values. Decode the numeric value of a stack protection note. * objcopy.c (merge_gnu_build_notes): Allow version notes to contain extra text after the protocol version number. commit 5badf10a18af78c57dd4ce8e6a6ead7f46e1a878 Author: Ivo Raisr Date: Tue Mar 21 04:39:33 2017 -0700 Decode properly flags of %ccr register on sparc64. While at it, decode also properly one-bit flags for %fsr (accrued and current exception flags were mixed up). ChangeLog entry: 2017-03-21 Ivo Raisr PR tdep/20928 * gdb/sparc-tdep.h (gdbarch_tdep) : New field. * gdb/sparc64-tdep.c (sparc64_ccr_type): New function. (sparc64_fsr_type): Fix %fsr decoding. ChangeLog entry for testsuite: 2017-03-21 Ivo Raisr PR tdep/20928 * gdb.arch/sparc64-regs.exp: New file. * gdb.arch/sparc64-regs.S: Likewise. commit 21701718895d186285e6daf04cc7342c6c88fb03 Author: Tristan Gingold Date: Fri Mar 17 11:12:05 2017 +0100 ld: check overflow only for allocated sections. * ldlang.c (lang_check_section_addresses): Check only for allocated sections. commit cee59b3feac9a8f6300a5b788e3db4e15af2a894 Author: Tim Wiederhake Date: Tue Mar 21 08:19:59 2017 +0100 Fix break on Python 2 This changes the return type of "gdb.BtraceInstruction.data ()" from "memoryview" to "buffer" on Python 2.7 and below, similar to what "gdb.Inferior.read_memory ()" does. commit 09220eae9df07c40d206a35e6caaecba92ab8f46 Author: GDB Administrator Date: Tue Mar 21 00:00:24 2017 +0000 Automatic date update in version.in commit 639a9038c9f4fc50b6a57c18fe84db4559367a96 Author: Simon Marchi Date: Mon Mar 20 18:23:47 2017 -0400 spu: Use ptid from regcache instead of inferior_ptid The implementations of to_fetch_registers/to_store_registers in the spu code use some functions that rely on inferior_ptid. It's simpler for now to set/restore inferior_ptid. gdb/ChangeLog: * spu-linux-nat.c (spu_fetch_inferior_registers, spu_store_inferior_registers): Use ptid from regcache, set and restore inferior_ptid. * spu-multiarch.c (spu_fetch_registers, spu_store_registers): Likewise. commit bcc0c096d5b0f77482cdb3154acd2515a0ca832f Author: Simon Marchi Date: Mon Mar 20 17:37:36 2017 -0400 Use ptid from regcache in almost all remaining nat files This patch contains almost all of the remaining changes needed to make to_fetch_registers/to_store_registers/to_prepare_to_store independent of inferior_ptid. It contains only some "trivial" changes, the more complicated ones are in separate patches. gdb/ChangeLog: * i386-linux-nat.c (fetch_register, store_register, i386_linux_fetch_inferior_registers, i386_linux_store_inferior_registers): Use ptid from regcache. * ia64-linux-nat.c (ia64_linux_fetch_register, ia64_linux_store_register): Likewise. * inf-ptrace.c (inf_ptrace_fetch_register, inf_ptrace_store_register): Likewise. * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers, m32r_linux_store_inferior_registers): Likewise. * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers, m68kbsd_store_inferior_registers): Likewise. * m68k-linux-nat.c (fetch_register, store_register, m68k_linux_fetch_inferior_registers, m68k_linux_store_inferior_registers): Likewise. * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers, m88kbsd_store_inferior_registers): Likewise. * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers, mips_fbsd_store_inferior_registers): Likewise. * mips-linux-nat.c (mips64_linux_regsets_fetch_registers, mips64_linux_regsets_store_registers): Likewise. * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers, mipsnbsd_store_inferior_registers): Likewise. * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers, mips64obsd_store_inferior_registers): Likewise. * nto-procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise. * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers, ppcfbsd_store_inferior_registers): Likewise. * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers, ppc_linux_store_inferior_registers): Likewise. * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers, ppcnbsd_store_inferior_registers): Likewise. * ppc-obsd-nat.c (ppcobsd_fetch_registers, ppcobsd_store_registers): Likewise. * procfs.c (procfs_fetch_registers, procfs_store_registers): Likewise. * ravenscar-thread.c (ravenscar_fetch_registers, ravenscar_store_registers, ravenscar_prepare_to_store): Likewise. * record-btrace.c (record_btrace_fetch_registers, record_btrace_store_registers, record_btrace_prepare_to_store): Likewise. * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register): Lookup inferior using ptid from regcache, instead of current_inferior. * remote.c (remote_fetch_registers, remote_store_registers): Use ptid from regcache. * rs6000-nat.c (fetch_register, store_register): Likewise. * s390-linux-nat.c (s390_linux_fetch_inferior_registers, s390_linux_store_inferior_registers): Likewise. * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers, shnbsd_store_inferior_registers): Likewise. * sol-thread.c (sol_thread_fetch_registers, sol_thread_store_registers): Likewise. * sparc-nat.c (sparc_fetch_inferior_registers, sparc_store_inferior_registers): Likewise. * tilegx-linux-nat.c (fetch_inferior_registers, store_inferior_registers): Likewise. * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers, vaxbsd_store_inferior_registers): Likewise. * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs, store_xtregs): Likewise. commit c0f55cc689a57deb342b988b8f0ecb908f0a76e1 Author: Artemiy Volkov Date: Mon Mar 20 13:47:59 2017 -0700 Add rvalue reference tests and docs This patch adds tests for the initial rvalue reference support patchset. All of the new tests are practically mirrored regular references tests and, except for the demangler ones, are introduced in new files, which are set to be compiled with -std=gnu++11. Tested are printing of rvalue reference types and values, rvalue reference parameters in function overloading, demangling of function names containing rvalue reference parameters, casts to rvalue reference types, application of the sizeof operator to rvalue reference types and values, and support for rvalue references within the gdb python module. gdb/ChnageLog PR gdb/14441 * NEWS: Mention support for rvalue references in GDB and python. * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB supports both lvalue and rvalue references. gdb/testsuite/ChangeLog PR gdb/14441 * gdb.cp/demangle.exp: Add rvalue reference tests. * gdb.cp/rvalue-ref-casts.cc: New file. * gdb.cp/rvalue-ref-casts.exp: New file. * gdb.cp/rvalue-ref-overload.cc: New file. * gdb.cp/rvalue-ref-overload.exp: New file. * gdb.cp/rvalue-ref-params.cc: New file. * gdb.cp/rvalue-ref-params.exp: New file. * gdb.cp/rvalue-ref-sizeof.cc: New file. * gdb.cp/rvalue-ref-sizeof.exp: New file. * gdb.cp/rvalue-ref-types.cc: New file. * gdb.cp/rvalue-ref-types.exp: New file. * gdb.python/py-rvalue-ref-value-cc.cc: New file. * gdb.python/py-rvalue-ref-value-cc.exp: New file. commit 15c0a2a9305648095f5586a02b5a5017e1643e99 Author: Artemiy Volkov Date: Mon Mar 20 13:47:57 2017 -0700 Add rvalue references to overloading resolution This patch introduces changes to rank_one_type() dealing with ranking an rvalue reference type when selecting a best viable function from a set of candidate functions. The 4 new added rules for rvalue references are: 1) An rvalue argument cannot be bound to a non-const lvalue reference parameter and an lvalue argument cannot be bound to an rvalue reference parameter. [C++11 13.3.3.1.4p3] 2) If a conversion to one type of reference is an identity conversion, and a conversion to the second type of reference is a non-identity conversion, choose the first type. [C++11 13.3.3.2p3] 3) An rvalue should be first tried to bind to an rvalue reference, and then to an lvalue reference. [C++11 13.3.3.2p3] 4) An lvalue reference to a function gets higher priority than an rvalue reference to a function. [C++11 13.3.3.2p3] This patch is not exactly correct. See c++/15372 for tracking overload resolution bugs. gdb/ChangeLog PR gdb/14441 * gdbtypes.c (rank_one_type): Implement overloading resolution rules regarding rvalue references. commit aa0061181ab00081e9907447561e589d6edee9f2 Author: Artemiy Volkov Date: Mon Mar 20 13:47:54 2017 -0700 Convert lvalue reference type check to general reference type check In almost all contexts (except for overload resolution rules and expression semantics), lvalue and rvalue references are equivalent. That means that in all but these cases we can replace a TYPE_CODE_REF check to a TYPE_IS_REFERENCE check and, for switch statements, add a case label for a rvalue reference type next to a case label for an lvalue reference type. This patch does exactly that. gdb/ChangeLog PR gdb/14441 * aarch64-tdep.c (aarch64_type_align) (aarch64_extract_return_value, aarch64_store_return_value): Change lvalue reference type checks to general reference type checks. * amd64-tdep.c (amd64_classify): Likewise. * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register): Likewise. * arm-tdep.c (arm_type_align, arm_extract_return_value) (arm_store_return_value): Likewise. * ax-gdb.c (gen_fetch, gen_cast): Likewise. * c-typeprint.c (c_print_type): Likewise. * c-varobj.c (adjust_value_for_child_access, c_value_of_variable) (cplus_number_of_children, cplus_describe_child): Likewise. * compile/compile-c-symbols.c (generate_vla_size): Likewise. * completer.c (expression_completer): Likewise. * cp-support.c (make_symbol_overload_list_adl_namespace): Likewise. * darwin-nat-info.c (info_mach_region_command): Likewise. * dwarf2loc.c (entry_data_value_coerce_ref) (value_of_dwarf_reg_entry): Likewise. * eval.c (ptrmath_type_p, evaluate_subexp_standard) (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Likewise. * findvar.c (extract_typed_address, store_typed_address): Likewise. * gdbtypes.c (rank_one_type): Likewise. * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise. * infcall.c (value_arg_coerce): Likewise. * language.c (pointer_type): Likewise. * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer): Likewise. * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise. * mn10300-tdep.c (mn10300_type_align): Likewise. * msp430-tdep.c (msp430_push_dummy_call): Likewise. * ppc-sysv-tdep.c (do_ppc_sysv_return_value) (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value): Likewise. * printcmd.c (print_formatted, x_command): Likewise. * python/py-type.c (typy_get_composite, typy_template_argument): Likewise. * python/py-value.c (valpy_referenced_value) (valpy_get_dynamic_type, value_has_field): Likewise. * s390-linux-tdep.c (s390_function_arg_integer): Likewise. * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise. * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise. * spu-tdep.c (spu_scalar_value_p): Likewise. * symtab.c (lookup_symbol_aux): Likewise. * typeprint.c (whatis_exp, print_type_scalar): Likewise. * valarith.c (binop_types_user_defined_p, unop_user_defined_p): Likewise. * valops.c (value_cast_pointers, value_cast) (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp) (value_struct_elt, value_struct_elt_bitpos) (value_find_oload_method_list, find_overload_match) (value_rtti_indirect_type): Likewise. * valprint.c (val_print_scalar_type_p, generic_val_print): Likewise. * value.c (value_actual_type, value_as_address, unpack_long) (pack_long, pack_unsigned_long, coerce_ref_if_computed) (coerce_ref): Likewise. * varobj.c (varobj_get_value_type): Likewise. commit 3fcf899da106890f3948093c2424f9dff67d6fe0 Author: Artemiy Volkov Date: Mon Mar 20 13:47:52 2017 -0700 Support rvalue references in the gdb python module (includes doc/) This patch adds the ability to inspect rvalue reference types and values using the gdb python module. This is achieved by creating two wrappers for valpy_reference_value(), using the ReferenceExplorer class to handle the objects of rvalue reference types and placing necessary checks for a TYPE_CODE_RVALUE_REF type code next to the checks for a TYPE_CODE_REF type code. gdb/ChangeLog PR gdb/14441 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to table of constants. * python/lib/gdb/command/explore.py: Support exploring values of rvalue reference types. * python/lib/gdb/types.py: Implement get_basic_type() for rvalue reference types. * python/py-type.c (pyty_codes) : New constant. * python/py-value.c (valpy_getitem): Add an rvalue reference check. (valpy_reference_value): Add new parameter "refcode". (valpy_lvalue_reference_value, valpy_rvalue_reference_value): New wrappers for valpy_reference_value(). * python/py-xmethods.c (gdbpy_get_xmethod_result_type) (gdbpy_invoke_xmethod): Likewise. commit 4297a3f0029974c62628d69b6f3f9ef25f01ea7d Author: Artemiy Volkov Date: Mon Mar 20 13:47:50 2017 -0700 Support DW_TAG_rvalue_reference type Make gdb DWARF reader understand the DW_TAG_rvalue_reference type tag. Handling of this tag is done in the existing read_tag_reference_type() function, to which we add a new parameter representing the kind of reference type (lvalue vs rvalue). gdb/ChangeLog PR gdb/14441 * dwarf2read.c (process_die, read_type_die_1): Handle the DW_TAG_rvalue_reference_type DIE. (read_tag_reference_type): Add new parameter "refcode". commit e1cb3213476485a01aa11ecedfa186e386cb4bdb Author: Artemiy Volkov Date: Mon Mar 20 13:47:48 2017 -0700 Implement printing of rvalue reference types and values This patch provides the ability to print out names of rvalue reference types and values of those types. This is done in full similarity to regular references, and as with them, we don't print out "const" suffix because all rvalue references are const. gdb/ChangeLog PR gdb/14441 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix) (c_type_print_modifier, c_type_print_varspec_suffix) (c_type_print_base): Support printing rvalue reference types. * c-valprint.c (c_val_print, c_value_print): Support printing rvalue reference values. commit e4347c89f3a14b480fc88581d1363835f7b99b68 Author: Artemiy Volkov Date: Mon Mar 20 13:47:46 2017 -0700 Implement demangling for rvalue reference type names This patch fixes demangling of names containing rvalue reference typenames by handling DEMANGLE_COMPONENT_RVALUE_REFERENCE demangle component. gdb/ChangeLog PR gdb/14441 * cp-name-parser.y (ptr_operator): Handle the '&&' token in typename. * cp-support.c (replace_typedefs): Handle DEMANGLE_COMPONENT_RVALUE_REFERENCE. * python/py-type.c (typy_lookup_type): Likewise. commit 53cc15f5fe1f5e2358994d4f60f1c2aa9115004d Author: Artemiy Volkov Date: Mon Mar 20 13:47:43 2017 -0700 Support rvalue reference type in parser This patch implements correct parsing of C++11 rvalue reference typenames. This is done in full similarity to the handling of regular references by adding a '&&' token handling in c-exp.y, defining an rvalue reference type piece, and implementing a follow type derivation in follow_types(). gdb/ChangeLog PR gdb/14441 * c-exp.y (ptr_operator): Handle the '&&' token in the typename. * parse.c (insert_type): Change assert statement. (follow_types): Handle rvalue reference types. * parser-defs.h (enum type_pieces) : New constant. commit a65cfae5f8b268158c23a862e7a996d15bbcef0e Author: Artemiy Volkov Date: Mon Mar 20 13:47:41 2017 -0700 Add ability to return rvalue reference values from value_ref Parameterize value_ref() by the kind of reference type the value of which is requested. Change all callers to use the new API. gdb/ChangeLog PR gdb/14441 * ada-lang.c (ada_evaluate_subexp): Adhere to the new value_ref() interface. * c-valprint.c (c_value_print): Likewise. * infcall.c (value_arg_coerce): Likewise. * python/py-value.c (valpy_reference_value): Likewise. * valops.c (value_cast, value_reinterpret_cast) (value_dynamic_cast, typecmp): Likewise. (value_ref): Parameterize by kind of return value reference type. * value.h (value_ref): Add new parameter "refcode". commit 3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd Author: Artemiy Volkov Date: Mon Mar 20 13:47:39 2017 -0700 Change {lookup,make}_reference_type API Parameterize lookup_reference_type() and make_reference_type() by the kind of reference type we want to look up. Create two wrapper functions lookup_{lvalue,rvalue}_reference_type() for lookup_reference_type() to simplify the API. Change all callers to use the new API. gdb/Changelog PR gdb/14441 * dwarf2read.c (read_tag_reference_type): Use lookup_lvalue_reference_type() instead of lookup_reference_type(). * eval.c (evaluate_subexp_standard): Likewise. * f-exp.y: Likewise. * gdbtypes.c (make_reference_type, lookup_reference_type): Generalize with rvalue reference types. (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New convenience wrappers for lookup_reference_type(). * gdbtypes.h (make_reference_type, lookup_reference_type): Add a reference kind parameter. (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add wrappers for lookup_reference_type(). * guile/scm-type.c (gdbscm_type_reference): Use lookup_lvalue_reference_type() instead of lookup_reference_type(). * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise. * parse.c (follow_types): Likewise. * python/py-type.c (typy_reference, typy_lookup_type): Likewise. * python/py-value.c (valpy_get_dynamic_type, valpy_getitem): Likewise. * python/py-xmethods.c (gdbpy_get_xmethod_result_type) (gdbpy_invoke_xmethod): Likewise. * stabsread.c: Provide extra argument to make_reference_type() call. * valops.c (value_ref, value_rtti_indirect_type): Use lookup_lvalue_reference_type() instead of lookup_reference_type(). commit f9aeb8d499fa12610610dc19618230304c698f6c Author: Artemiy Volkov Date: Mon Mar 20 13:47:30 2017 -0700 Add definitions for rvalue reference types This patch introduces preliminal definitions regarding C++11 rvalue references to the gdb type system. In addition to an enum type_code entry, a field in struct type and an accessor macro for that which are created similarly to the lvalue references counterparts, we also introduce a TYPE_REFERENCE convenience macro used to check for both kinds of references simultaneously as they are equivalent in many contexts. gdb/Changelog PR gdb/14441 * gdbtypes.h (enum type_code) : New constant. (TYPE_IS_REFERENCE): New macro. (struct type): Add rvalue_reference_type field. (TYPE_RVALUE_REFERENCE_TYPE): New macro. commit 51457a05780da82b5321a1574caed95ac0e6923e Author: Marc-Andre Laperle Date: Mon Mar 20 14:57:51 2017 -0400 Add -file-list-shared-libraries MI command This change adds the MI equivalent for the "info sharedlibrary" command. The command was already partially documented but ignored as it was not implemented. The new MI command works similarly to the CLI command, taking an optional regular expression as an argument and outputting the library information. I included a test for the new command in mi-solib.exp. gdb/doc/ChangeLog: * gdb.texinfo (gdb/mi Symbol Query Commands): Document new MI command file-list-shared-libraries (GDB/MI Async Records): Update documentation of library-loaded with new field. gdb/ChangeLog: * NEWS: Add an entry about new '-file-list-shared-libraries' command. * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): New function definition. * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command. * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries): New function declaration. * mi/mi-interp.c (mi_output_solib_attribs): New Function. * mi/mi-interp.h: New file. * solib.c (info_sharedlibrary_command): Replace for loop with ALL_SO_LIBS macro * solib.h (update_solib_list): New function declaration. (so_list_head): Move macro. * solist.h (ALL_SO_LIBS): New macro. gdb/testsuite/ChangeLog: * gdb.mi/mi-solib.exp (test_file_list_shared_libraries): New procedure. Signed-off-by: Marc-Andre Laperle commit 5b291c049658614196197e4ea4bb42bcc176b876 Author: Marc-Andre Laperle Date: Mon Mar 20 14:57:45 2017 -0400 Add a better diagnostic message in mi_gdb_test When using mi_gdb_test, if it fails because of the presence of unexpected output, the error message is only the message passed as the argument with no indication that there was an unexpected output. This change adds an additional text to the failure message to indicate that there was an unexpected output. gdb/testsuite/ChangeLog: * lib/mi-support.exp (mi_gdb_test): Add additional message for unexpected output. Signed-off-by: Marc-Andre Laperle commit e696b3ad342dde596dcdad4cff6b875c361ed6d0 Author: Marc-Andre Laperle Date: Mon Mar 20 14:57:32 2017 -0400 Remove unused parameter in solib_add and update_solib_list The target parameter in both solib_add and update_solib_list functions is not used anymore and as not been used for a while. This change removes the parameter to clean up the code a little bit. gdb/ChangeLog: * infcmd.c (post_create_inferior): Remove unused argument in call to solib_add. * remote.c (remote_start_remote): Likewise. * solib-frv.c (frv_fetch_objfile_link_map): Likewise. * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise. (enable_break): Likewise. * solib.c (update_solib_list): Remove unused target argument and its documentation. (solib_add): Remove unused target argument. Remove unused argument in call to update_solib_list. (info_sharedlibrary_command): Remove unused argument in call to update_solib_list. (sharedlibrary_command): Remove unused argument in call to solib_add. (handle_solib_event): Likewise. (reload_shared_libraries): Likewise. * solib.h (solib_add): Remove unused target argument. Signed-off-by: Marc-Andre Laperle commit 59a561480d547d041127630b1ba17a284eef8225 Author: Andreas Arnez Date: Mon Mar 20 18:55:39 2017 +0100 Fix spurious FAILs with examine-backward.exp The test case examine-backward.exp issues the command "x/-s" after the end of the first string in TestStrings, but without making sure that this string is preceded by a string terminator. Thus GDB may spuriously print some random characters from before that string, and then the test fails. This patch assures that TestStrings is preceded by a string terminator. gdb/testsuite/ChangeLog: * gdb.base/examine-backward.c (Barrier): New character array constant, to ensure that TestStrings is preceded by a string terminator. commit 39e224f6f9ee3f6123d4c9ddb7c0955e0604c1b4 Author: Mark Wielaard Date: Mon Mar 20 15:32:34 2017 +0100 readelf: Don't error on .debug files with NOBITS .dynamic section. The fix for PR binutils/17512 added a check for the dynamic segment being inside the actual ELF file. If not an error message would be produced: readelf: Error: the dynamic segment offset + size exceeds the size of the file Unfortunately for separate debuginfo files it is common for the dynamic segment not being inside the file because the .dynamic section is NOBITS. Since the check is done unconditionally in process_program_headers and process_program_headers is always called (to setup dynamic_addr in case it is needed). The error is produced on any operations done on any .debug file (even if no program headers or the dynamic segment is used). If there are section headers then a cross check is done to see if the .dynamic section is NOBITS in which case dynamic_addr is set to zero without a warning or error (which is then checked first before any operation on the dynamic segement is done). Move the check for the dynamic segment being inside the actual ELF file after the cross check with the section headers to suppress the error for .debug files. binutils/ChangeLog: * readelf.c (process_program_headers): Move dynamic_addr check after .dynamic section cross check. commit e406e428dfe9d64e3be0b7a3c1c97c09edc5bdba Author: Nick Clifton Date: Mon Mar 20 16:57:07 2017 +0000 Update descriptions of the .2byte, .4byte and .8byte directives. * doc/as.texinfo (2byte): Note that if no expressions are present the directive does nothing. Emphasize that the output is unaligned, and that this can have an effect on the relocations generated. (4byte): Simplify description. Refer back to the 2byte description. (8byte): Likewise. commit dcb84eda0c5f25835251a311c4d6704e70cfa498 Author: Andreas Arnez Date: Mon Mar 20 17:30:01 2017 +0100 s390: Fix displaced-stepping certain relative branch insns On s390x targets GDB can not handle displaced stepping correctly for some relative branch instructions, such as cij (compare immediate and branch relative). When setting a breakpoint on such an instruction and single-stepping over it, the branch is never taken. This is because the check in s390_displaced_step_fixup for relative branch instructions is incomplete. Instead of completing the list of relative branch instructions to check against, this patch just treats relative branches and non-branching instructions in the same way and adjusts the PC with the negated displacement in both cases. gdb/ChangeLog: * s390-linux-tdep.c (is_rsi, is_rie): Remove functions. (s390_displaced_step_fixup): Cover relative branches with the default fixup handling. This fixes lack of support for some relative branch instructions. commit 4ea0266c22eccf6e7719469a981267659e47ef3a Author: Stafford Horne Date: Mon Mar 20 15:33:51 2017 +0000 Update the openrisc previous program counter (ppc) when running code in the cgen based simulator. * or1kcommon.cpu: Add pc set semantics to also update ppc. commit d5e0ba9cdb0d002b97bab722cce673ce86cf7b11 Author: Richard Earnshaw Date: Mon Mar 20 14:56:22 2017 +0000 [arm] Document missing -mfpu entries. Nick pointed out that I hadn't documented the new -mfpu option neon-vfpv3 and mentioned that some others were missing. Having looked through the list only one (neon-fp16) really should be documented; the other two entries in the real table should not be documented as they are aliases kept for legacy compatibility reasons. This patch adds the missing entries and notes in the main table that the other two entries should not be documented. I've also fixed a small spelling error in the accompanying text. * config/tc-arm.c (arm_fpus): Note entires that should not be documented. * doc/c-arm.texi (-mfpu): Add missing FPU entries for neon-vfpv3 and neon-fp16. Fix spelling error. commit d3375ddde4011242ef576083459fc51d0ddc53c8 Author: Richard Earnshaw Date: Mon Mar 20 10:03:15 2017 +0000 [arm] Add neon-vfp3 as an alias for neon to -mfpu. GCC recently added neon-vfpv3 as an alias for neon in -mfpu. This patch adds a similar alias in GAS. * config/tc-arm.c (arm_fpus): Add neon-vfpv3 as an alias for neon. commit 5c62b69b91e13c6b9c126480680cff836c0b282d Author: GDB Administrator Date: Mon Mar 20 00:00:40 2017 +0000 Automatic date update in version.in commit aaed6f5be3a41a88cc13c744e88af78f5a42dd5b Author: Alan Modra Date: Mon Mar 20 08:25:50 2017 +1030 PR 21266, unstable qsort in bfd/elf64-ppc.c PR 21266 * elf64-ppc.c (compare_symbols): Stabilize sort. commit 84e8538ee3c8139a99e75e661fff500bb93c8cd5 Author: GDB Administrator Date: Sun Mar 19 00:00:24 2017 +0000 Automatic date update in version.in commit bbdf9b697fc0652379794267b23f597e15c7db57 Author: GDB Administrator Date: Sat Mar 18 00:00:41 2017 +0000 Automatic date update in version.in commit 82e66161e649e5e801c40a52cba759292a76a59a Author: Alan Modra Date: Fri Mar 17 08:37:15 2017 +1030 DT_TEXTREL vs IFUNC If you should somehow link non-pic objects into a PIE or shared library, resulting in an object with DT_TEXTREL (text relocations) set, and your executable or shared library also contains GNU indirect functions, then you're in trouble. To apply dynamic relocations ld.so will make the text segment writable. On most systems this will make the text segment non-executable, which will then result in a segfault when ld.so tries to run ifunc resolvers when applying relocations against ifuncs. This patch teaches PowerPC ld to detect the situation, and warn. * elf64-ppc.c (struct ppc_link_hash_table): Add local_ifunc_resolver and maybe_local_ifunc_resolver. (ppc_build_one_stub): Set flags on emitting dynamic relocation to ifunc. (ppc64_elf_relocate_section): Likewise. (ppc64_elf_finish_dynamic_symbol): Likewise. (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with local dynamic relocs to ifuncs. * elf32-ppc.c (struct ppc_elf_link_hash_table): Add local_ifunc_resolver and maybe_local_ifunc_resolver. (ppc_elf_relocate_section): Set flag on emitting dynamic relocation to ifuncs. (ppc_elf_finish_dynamic_symbol): Likewise. (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local dynamic relocs to ifuncs. commit d9cb6cdcfa12368f2f639f8cd06d18b94bd98a39 Author: Simon Marchi Date: Fri Mar 17 13:55:57 2017 -0400 i386-gnu-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use ptid from regcache. commit 1afaf9f42fe201872d758214beceff85325a988a Author: Simon Marchi Date: Fri Mar 17 13:55:56 2017 -0400 i386-darwin-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers, i386_darwin_store_inferior_registers): Use ptid from regcache. commit aac12e2497a42b47223680ab1b5924137de77c9a Author: Simon Marchi Date: Fri Mar 17 13:55:55 2017 -0400 i386-bsd-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * i386-bsd-nat.c (i386bsd_fetch_inferior_registers, i386bsd_store_inferior_registers): Use ptid from regcache. commit bbe1eef1e585e19d5493882e55f2b7902df9827a Author: Simon Marchi Date: Fri Mar 17 13:55:55 2017 -0400 hppa-obsd-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * hppa-obsd-nat.c (hppaobsd_fetch_registers, hppaobsd_store_registers): Use ptid from regcache. commit 10799020a9336b6a88c1ace53c601960b840d580 Author: Simon Marchi Date: Fri Mar 17 13:55:54 2017 -0400 hppa-nbsd-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * hppa-nbsd-nat.c (hppanbsd_fetch_registers, hppanbsd_store_registers): Use ptid from regcache. commit 00204cf7da01d99205aacc994e5c594ed12bba64 Author: Simon Marchi Date: Fri Mar 17 13:55:53 2017 -0400 hppa-linux-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * hppa-linux-nat.c (fetch_register, store_register): Use ptid from regcache. Use get_ptrace_pid. commit 11a3371447f15af26def26646ad2eb7a4386462d Author: Simon Marchi Date: Fri Mar 17 13:55:52 2017 -0400 corelow: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * corelow.c (get_core_register_section): Use ptid from regcache, update doc. commit 317cd4925a9d6ef6f8752a771cb56e85ddfb30f0 Author: Simon Marchi Date: Fri Mar 17 13:55:51 2017 -0400 bsd-uthread: Use ptid from regcache instead of inferior_ptid This is one of the rare to_fetch/store_registers implementations that will still rely (for now) on inferior_ptid (because of the memory read/write operations). We therefore have to add a save/restore of inferior_ptid. We'll be able to remove it when we make the memory operations accept the ptid as a parameter. gdb/ChangeLog: * bsd-uthread.c (bsd_uthread_fetch_registers, bsd_uthread_store_registers): Use ptid from regcache, set and restore inferior_ptid. commit 9ac8a7c281aa949cf588cccb9977ea51eaff8130 Author: Simon Marchi Date: Fri Mar 17 13:55:50 2017 -0400 arm-nbsd-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register, fetch_fp_regs, store_register, store_regs, store_fp_register, store_fp_regs): Use ptid from regcache. commit 4ac4bb6ad5ead16be5ca6996a3e325c26ddf71da Author: Simon Marchi Date: Fri Mar 17 13:55:49 2017 -0400 arm-linux-nat.c: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs, store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs, store_vfp_regs): Use ptid from regcache. commit 0dd6ae21da832f351a3722d2f8bac187fc3bdfef Author: Nick Clifton Date: Fri Mar 17 17:36:51 2017 +0000 Fix displaying the value associated a GNU BUILD note that uses an ascii name. * readelf.c (print_gnu_build_attribute_name): Fix off by one error printing the value for a build note with an ascii name. commit 9bcbdca808b5f9fec6217d20bd4b48a56008c460 Author: Pedro Alves Date: Fri Mar 17 16:08:12 2017 +0000 PR remote/21188: Fix remote serial timeout As Gareth McMullin reports at , the timeout mechanism in ser-unix.c was broken by commit 048094acc ("target remote: Don't rely on immediate_quit (introduce quit handlers)"). Instead of applying a local fix, and since we now finally always use interrupt_select [1], let's get rid of hardwire_readchar entirely, and use ser_base_readchar instead, which has similar timeout handling, except for the bug. Smoke tested with: $ socat -d -d pty,raw,echo=0 pty,raw,echo=0 2017/03/14 14:08:13 socat[4994] N PTY is /dev/pts/14 2017/03/14 14:08:13 socat[4994] N PTY is /dev/pts/15 2017/03/14 14:08:13 socat[4994] N starting data transfer loop with FDs [3,3] and [5,5] $ gdbserver /dev/pts/14 PROG $ gdb PROG -ex "tar rem /dev/pts/15" and then a few continues/ctrl-c's, plus killing gdbserver and socat. [1] - See FIXME comments being removed. gdb/ChangeLog: 2017-03-17 Pedro Alves PR remote/21188 * ser-base.c (ser_base_wait_for): Add comment. (do_ser_base_readchar): Improve comment based on the ser-unix.c's version. * ser-unix.c (hardwire_raw): Remove reference to scb->current_timeout. (wait_for, do_hardwire_readchar, hardwire_readchar): Delete. (hardwire_ops): Install ser_base_readchar instead of hardwire_readchar. * serial.h (struct serial) : Remove fields. commit 7503099f3e29739d34cb1224d54fba96404e6e61 Author: Jonah Graham Date: Fri Mar 17 14:57:44 2017 +0000 Fix PR gdb/19637: bound_registers.py: Add support for Python 3 Fix this the same way gdb/python/lib/gdb/printing.py handles it. gdb/Changelog: 2017-03-17 Jonah Graham PR gdb/19637 * python/lib/gdb/printer/bound_registers.py: Add support for Python 3. commit 4b94dd2de12dd0389615700b13b63260e162ccf0 Author: Alan Modra Date: Fri Mar 17 19:06:12 2017 +1030 E6500 spr mnemonics PR 21248 * ppc-opc.c (powerpc_opcodes): Enable mfivor32, mfivor33, mtivor32, and mtivor33 for e6500. Move mfibatl and mfibatu after those spr mnemonics they alias. Similarly for mtibatl, mtibatu. commit 1d3fa25f5802fe2250f32f335ad57897a62e0fe2 Author: Alan Modra Date: Tue Mar 14 22:01:34 2017 +1030 ld sec64k test fix * testsuite/ld-elf/sec64k.exp: Don't run on h8300 and ip2k. commit b4fcfd3b4d173129207f804f5eee4557c788d66b Author: GDB Administrator Date: Fri Mar 17 00:00:34 2017 +0000 Automatic date update in version.in commit 7942e96e435d1cf4d4dbf58c47bb28d9f628c9e6 Author: Andreas Arnez Date: Thu Mar 16 19:50:24 2017 +0100 Big-endian targets: Don't ignore offset into DW_OP_stack_value Recently I fixed a bug that caused a DW_OP_implicit_pointer with non-zero offset into a DW_OP_implicit_value to be handled incorrectly on big-endian targets. GDB ignored the offset and copied the wrong bytes: https://sourceware.org/ml/gdb-patches/2017-01/msg00251.html But there is still a similar issue when a DW_OP_implicit_pointer points into a DW_OP_stack_value instead; and again, the offset is ignored. There is an important difference, though: While implicit values are treated like blocks of data and anchored at the lowest-addressed byte, stack values traditionally contain integer numbers and are anchored at the *least significant* byte. Also, stack values do not come in varying sizes, but are cut down appropriately when used. Thus, on big-endian targets the scenario looks like this (higher addresses shown right): |<- - - - - Stack value - - - - - - ->| | | |<- original object ->| | | offset ->|####| ^^^^ de-referenced implicit pointer (Note how the original object's size influences the position of the de-referenced implicit pointer within the stack value. This is not the case for little-endian targets, where the original object starts at offset zero within the stack value.) This patch implements the logic indicated in the above diagram and adds an appropriate test case. A new function dwarf2_fetch_die_type_sect_off is added; it is used for retrieving the original object's type, so its size can be determined. That type is passed to dwarf2_evaluate_loc_desc_full via a new parameter. gdb/ChangeLog: * dwarf2loc.c (indirect_synthetic_pointer): Get data type of pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full. (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename byte_offset to subobj_byte_offset. Fix the handling of DWARF_VALUE_STACK on big-endian targets when coming via an implicit pointer. (dwarf2_evaluate_loc_desc): Adjust call to dwarf2_evaluate_loc_desc_full. * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration. * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function. gdb/testsuite/ChangeLog: * lib/dwarf.exp: Add support for DW_OP_implicit_pointer. * gdb.dwarf2/nonvar-access.exp: Add test for stack value location and implicit pointer into such a location. commit 6ebac3fbacebaebd9e2c9393da3b612342d953a9 Author: Doug Evans Date: Thu Mar 16 10:43:21 2017 -0700 gdb.python/py-lazy-string (pointer): Really add new typedef. Somehow got dropped in earlier commit. gdb/testsuite/ChangeLog: * gdb.python/py-lazy-string (pointer): Really add new typedef. commit 2cc36e25db366d70a975702b61c7700ae934d4d0 Author: Doug Evans Date: Thu Mar 16 10:39:26 2017 -0700 Remove collision markers from earlier commit commit a8be5506b626a57f84771c5ddfaefabf2d61c017 Author: Nick Clifton Date: Thu Mar 16 16:44:55 2017 +0000 Add support for a GNU BUILD note type to record the enum size. include * elf/common.h (GNU_BUILD_ATTRIBUTE_SHORT_ENUM): New GNU BUILD note type. binutils * readelf.c (print_gnu_build_attribute_name): Add support for GNU_BUILD_ATTRIBUTE_SHORT_ENUM. commit ba14f3792fe007bedd88b62e554c79258adc53d9 Author: Yao Qi Date: Thu Mar 16 16:35:18 2017 +0000 Support CBNZ, CBZ, REV, REV16 and REVSH in arm process record This patch adds the support for these instructions in arm process record. gdb: 2017-03-16 Yao Qi * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16, and REVSH instructions. commit b121eeb9971ebfceffc38e6131fdc15ec4188599 Author: Yao Qi Date: Thu Mar 16 16:35:18 2017 +0000 Fix arm process record for some instructions I look at some fails in gdb.reverse/solib-precsave.exp in -mthumb, they are caused by some bugs on decoding these three instructions, uxtb, ldr and mrc. This patch adds unit tests against these three instructions, and fix these bugs by re-organizing the code to match the table in ARM ARM. gdb: 2017-03-16 Yao Qi * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h". (arm_record_test): Declare. (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test. (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to align with the manual. (thumb_record_misc): Adjust the code order to align with the manual. (thumb2_record_decode_insn_handler): Fix instruction matching. (instruction_reader_thumb): New class. (arm_record_test): New function. commit 728a79135f51a1c20719ebaf3c98446d9ee248db Author: Yao Qi Date: Thu Mar 16 16:35:18 2017 +0000 Add instruction_reader to arm process record This patch adds an abstract class abstract_memory_reader a and pass it to the code reading instructions in arm process record, rather than using target_read_memory to read from real target. This paves the way for adding more unit tests to arm process record. gdb: 2017-03-16 Yao Qi * arm-tdep.c (abstract_memory_reader): New class. (instruction_reader): New class. (extract_arm_insn): Add argument 'reader'. Callers updated. (decode_insn): Likewise. commit a7c0469f992721b30665ba92f4f2f74d29032a84 Author: Doug Evans Date: Wed Mar 15 15:44:45 2017 -0700 Copy lazy string handling fixes from Python. This patch keeps the Scheme side of lazy string handling in sync with the python size, bringing over fixes for PRs python/17728, python/18439, python/18779. gdb/ChangeLog: * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH member. Change type of TYPE member to SCM. All uses updated. (lsscm_make_lazy_string_smob): Add assert. (lsscm_make_lazy_string): Flag bad length values. (lsscm_elt_type): New function. (gdbscm_lazy_string_to_value): Rewrite to use lsscm_safe_lazy_string_to_value. (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR. * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs in incoming type. * guile/guile-internal.h (tyscm_scm_to_type): Declare. * guile/scm-type.c (tyscm_scm_to_type): New function. gdb/testsuite/ChangeLog: * gdb.guile/scm-value.c (main) Delete locals sptr, sn. * gdb.guile/scm-lazy-string.c: New file. * gdb.guile/scm-value.exp: Move lazy string tests to ... * gdb.guile/scm-lazy-string.exp: ... here, new file. Add more tests for pointer, array, typedef lazy strings. commit 34b433203b5f56149c27a8dfea21a921392cb158 Author: Doug Evans Date: Wed Mar 15 15:35:13 2017 -0700 Fix various python lazy string bugs. gdb/ChangeLog: PR python/17728, python/18439, python/18779 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH member. Change type of TYPE member to PyObject *. All uses updated. (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR. (gdbpy_create_lazy_string_object): Flag bad length values. Handle TYPE_CODE_ARRAY with possibly different user-provided length. Handle typedefs in incoming type. (stpy_lazy_string_elt_type): New function. (gdbpy_extract_lazy_string): Call it. * python/py-value.c (valpy_lazy_string): Flag bad length values. Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs in incoming type. gdb/testsuite/ChangeLog: PR python/17728, python/18439, python/18779 * gdb.python/py-value.c (main) Delete locals sptr, sn. * gdb.python/py-lazy-string.c (pointer): New typedef. (main): New locals ptr, array, typedef_ptr. * gdb.python/py-value.exp: Move lazy string tests to ... * gdb.python/py-lazy-string.exp: ... here. Add more tests for pointer, array, typedef lazy strings. commit a3a5feccd26be653efbdf1408874b98962baaa50 Author: Doug Evans Date: Sun Nov 6 16:10:00 2016 -0800 New function tyscm_scm_to_type. gdb/ChangeLog: * guile/guile-internal.h (tyscm_scm_to_type): Declare. * guile/scm-type.c (tyscm_scm_to_type): New function. commit f8d995870f957d5fd32fb21fb4afe76a754ddf31 Author: Doug Evans Date: Sun Nov 6 16:03:56 2016 -0800 Lazy strings can be made from arrays too. gdb/doc/ChangeLog: * guile.texi (Lazy Strings In Guile): Mention arrays. * python.texi (Lazy Strings In Python): Ditto. commit 28f1c60507ad4ca2252cebada30d2f63ec3b772f Author: Jiong Wang Date: Thu Mar 16 09:55:18 2017 +0000 [Patch] Fix variable type glitch in inf-ptrace.c gdb/ * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to "ULONGEST" for "skip". commit ec3b243d4308ee56c9e3c62470b10ed2a822eb51 Author: Thomas Preud'homme Date: Thu Mar 16 14:02:31 2017 +0000 Fix expect for gdb.cp/m-static.exp The expectation in gdb.cp/m-static.exp for the ptype of single_constructor is to get in the result of destructor with the following prototype: ~single_constructor(int). Yet, m-static.cc declares the destructor as ~single_constructor(). This commit fixes the expectation. 2017-03-16 Thomas Preud'homme gdb/testsuite/ * gdb.cp/m-static.exp: Fix expectation for prototype of test5.single_constructor and single_constructor::single_constructor. commit 2c52e2e8c9e8f733cc0772d1400b0f4d3eb7379c Author: Rinat Zelig Date: Thu Mar 16 10:05:22 2017 +0000 gas/arc: Limit special handling of t/nt flag to ARCv2 In a later commit I'll be adding a new version of the ".nt" flag for an ARC700 extension (NPS400) which does not require this same special handling. In this commit I have restricted the special flag handling to only apply if we are assembling for ARCv2. This is a restructuring commit, and there should be no user visible changes after this commit. gas/ChangeLog: * config/tc-arc.c (assemble_insn): Only handle ".t" and ".nt" specially for ARCv2. commit e189bfe660d335f3b7c61446c9b5d3b0f0701606 Author: GDB Administrator Date: Thu Mar 16 00:00:45 2017 +0000 Automatic date update in version.in commit aab2c17756ee5bef0ea5783a460a0990450b3bd5 Author: Vladimir Radosavljevic Date: Wed Mar 15 16:49:16 2017 -0700 Mips: Fix TLS LDM GOT entry. gold/ * mips.cc (Mips_got_entry::hash()): Shift addend to reduce possibility of collisions. (Mips_got_entry::equals): Fix case for GOT_TLS_LDM entries. commit 4d78db49e6eee097365e31f9b5b47e5391243979 Author: Vladimir Radosavljevic Date: Wed Mar 15 16:46:26 2017 -0700 Mips: Omit empty objects for merging processor-specific data. gold/ * mips.cc (Mips_relobj::merge_processor_specific_data_): New data member. (Mips_relobj::merge_processor_specific_data): New method. (Mips_relobj::do_read_symbols): Set merge_processor_specific_data_ to false, only if the input file is a binary or if object has no contents except the section name string table and an empty symbol table with the undefined symbol. (Target_mips::do_finalize_sections): Refactor. Skip empty object files for merging processor-specific data. commit 152c92b261fd9e4655688bef746ca32352f56bc4 Author: Vladimir Radosavljevic Date: Wed Mar 15 16:41:48 2017 -0700 Mips: Add support for resolving multiple consecutive relocations. gold/ * mips.cc (Target_mips::Relocate::calculated_value_): New data member. (Target_mips::Relocate::calculate_only_): Likewise. (Target_mips::Relocate::relocate): Handle multiple consecutive relocations with the same offset. commit 1e1247c89ca2ce10dbf2c3ed61fba942f9c536ca Author: Vladimir Radosavljevic Date: Wed Mar 15 15:52:12 2017 -0700 Remove redundant checks for relocatable link (MIPS). gold/ * mips.cc (Target_mips::Relocate::relocate): Remove redundant checks for relocatable link. (Mips_relocate_functions::reljalr): Likewise. commit 1728969e93010862fe0ef7985cabe03a4494a63e Author: Vladimir Radosavljevic Date: Wed Mar 15 15:47:58 2017 -0700 Add support for .MIPS.options section. gold/ * mips.cc (class Mips_output_section_options): New class. (Target_mips::do_make_output_section): New method. commit c3847462f86778e97222a72378a84182f92c644a Author: Vladimir Radosavljevic Date: Wed Mar 15 15:43:25 2017 -0700 Improve relocation overflow errors on MIPS. gold/ * mips.cc (Mips_relocate_functions::rel26): Don't print relocation overflow error message. (Target_mips::relocate_special_relocatable): Improve relocation overflow error message. (Target_mips::Relocate::relocate): Likewise. commit 453018bf4490421a995cd76b3d2a3f322359c6a5 Author: Vladimir Radosavljevic Date: Wed Mar 15 15:35:15 2017 -0700 Correct the definition of _gp and _GLOBAL_OFFSET_TABLE_ symbols for MIPS. gold/ * mips.cc (symbol_refs_local): Return false if a symbol is from a dynamic object. (Target_mips::got_section): Make _GLOBAL_OFFSET_TABLE_ STV_HIDDEN. (Target_mips::set_gp): Refactor. Make _gp STT_NOTYPE and STB_LOCAL. (Target_mips::do_finalize_sections): Set _gp after all the checks for creating .got are done. (Target_mips::Scan::global): Remove unused code. commit b416fe873ef44b2a613c9266c6462a481926d986 Author: Kito Cheng Date: Tue Mar 7 18:15:02 2017 +0800 RISC-V: Fix assembler for c.li, c.andi and c.addiw - They can accept 0 in imm field 2017-03-14 Kito Cheng * riscv-opc.c (riscv_opcodes> : Use the 'o' immediate encoding. : Likewise. Likewise. commit 03b039a518fa0f89a9900a44a8b874cc91061305 Author: Kito Cheng Date: Tue Mar 7 19:56:40 2017 +0800 RISC-V: Fix assembler for c.addi, rd can be x0 opcodes/ChangeLog: 2017-03-14 Kito Cheng * riscv-opc.c (riscv_opcodes) : Use match_opcode. commit 9494d9636612cd9bd22e38625fbc89147beafea7 Author: Tristan Gingold Date: Tue Mar 14 14:54:37 2017 +0100 ld-checks: tweak overflow checks. * testsuite/ld-checks/checks.exp (overflow_check): Disable for non-elf targets. commit 7cb7b948ce62831a999f88054a6b2d39afbe926e Author: Nick Clifton Date: Wed Mar 15 09:19:42 2017 +0000 Fix building riscv targets with gcc v6.3.1 * config/tc-riscv.c (riscv_pre_output_hook): Fix compile time warning about discarding a const qualifier. commit cc7e96c25d59db0a5279da0a0ff36d61151f3021 Author: GDB Administrator Date: Wed Mar 15 00:00:36 2017 +0000 Automatic date update in version.in commit c98763221af696a9e0c6686da7d65881bfd6bdd0 Author: H.J. Lu Date: Tue Mar 14 12:56:49 2017 -0700 Add DW_OP_GNU_variable_value Sync GCC dwarf.def change 2017-03-14 Jakub Jelinek PR debug/77589 * dwarf2.def (DW_OP_GNU_variable_value): New opcode. commit 87c336f60eccc6506ff19369c29575f43fea02ea Author: Andreas Arnez Date: Tue Mar 14 19:20:46 2017 +0100 inf-ptrace: Do not stop memory transfers after a single word When inf_ptrace_xfer_partial performs a memory transfer via ptrace with PT_READ_I, PT_WRITE_I (aka PTRACE_PEEKTEXT, PTRACE_POKETEXT), etc., then it currently transfers at most one word. This behavior yields degraded performance, particularly if the caller has significant preparation work for each invocation. And indeed it has for writing, in memory_xfer_partial in target.c, where all of the remaining data to be transferred is copied to a temporary buffer each time, for breakpoint shadow handling. Thus large writes have quadratic runtime and can take hours. Note: On GNU/Linux targets GDB usually does not use inf_ptrace_xfer_partial for large memory transfers, but attempts a single read/write from/to /proc//mem instead. However, the kernel may reject writes to /proc//mem (such as kernels prior to 2.6.39), or /proc may not be mounted. In both cases GDB falls back to the ptrace mechanism. This patch fixes the performance issue by attempting to fulfill the whole transfer request in inf_ptrace_xfer_partial, using a loop around the ptrace call. gdb/ChangeLog: PR gdb/21220 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke... (inf_ptrace_peek_poke): ...here. New function. Now also loop over ptrace peek/poke until end of buffer or error. commit d47c3ff7d55122befac848fe64b7445789c78787 Author: Kuan-Lin Chen Date: Thu Mar 2 14:54:32 2017 +0800 RISC-V: Define DWARF2_USE_FIXED_ADVANCE_PC. gas/ChangeLog 2017-03-02 Kuan-Lin Chen * config/tc-riscv.h (HWARD2_USE_FIXED_ADVANCE_PC): New define. commit 2aece2ba02457e83fd2a780a8ac596b6a90adf29 Author: Kuan-Lin Chen Date: Fri Feb 10 14:58:52 2017 +0800 RISC-V: Fix DW_CFA_advance_loc relocation. gas/ChangeLog: 2017-03-02 Kuan-Lin Chen * config/tc-riscv.c (md_apply_fix): Set fx_frag and fx_next->fx_frag for CFA_advance_loc relocations. commit c1b465c94e26be629315bf28e3763dea9dea8336 Author: Kuan-Lin Chen Date: Thu Feb 2 15:27:18 2017 +0800 RISC-V: Fix the offset of CFA relocation. gas/ChangeLog: 2017-03-02 Kuan-Lin Chen * config/tc-riscv.c (md_apply_fix): Compute the correct offsets for CFA relocations. commit 2c232b8361a044d689d12161b7a645d238586f5e Author: Andrew Waterman Date: Mon Mar 13 12:46:33 2017 -0700 RISC-V: Fix [dis]assembly of srai/srli These were simple copy/paste errors from the compressed left shift pattern, which can't have a 0-register. commit 9216a6f33592c350ad50696d5571c82e47b71a5e Author: H.J. Lu Date: Tue Mar 14 09:09:54 2017 -0700 Use addr_mask to check VMA and LMA Since BFD64 may be used on 32-bit address, we need to apply addr_mask to check VMA and LMA. * ldlang.c (lang_check_section_addresses): Use addr_mask to check VMA and LMA. commit cf81cf6081d1a8c15c477f903d15d7b88f31b686 Author: Simon Marchi Date: Tue Mar 14 10:25:39 2017 -0400 Make length_of_subexp static It isn't used anywhere else than the file it's defined in. gdb/ChangeLog: * parse.c (length_of_subexp): Make static. * parser-defs.h (length_of_subexp): Remove. commit c799a79d66d09c442d85467986c2e8873f09297c Author: Nick Clifton Date: Tue Mar 14 12:57:09 2017 +0000 Try harder to find the correct symbol to associate with OPEN GNU BUILD notes. * readelf.c (print_gnu_build_attribute_description): Move symbol printing code to... (print_symbol_for_build_attribute): New function. ...here. Add to find the best symbol to associate with an OPEN note. Add code to cache the symbol table and string table, so that they are not loaded every time a note is displayed. * testsuite/binutils-all/note-2-32.s: Add a function symbol. * testsuite/binutils-all/note-2-64.s: Likewise. * testsuite/binutils-all/note-2-32.d: Update expected note output. * testsuite/binutils-all/note-2-64.d: Likewise. commit 0efcde634d45f4cda03fd18c43ff449103559d7a Author: Anton Kolesov Date: Mon Mar 6 21:24:38 2017 +0300 Add test name argument to get_valueof, get_integer_valueof and get_sizeof An optional parameter TEST has been added to get_hexadecimal_valueof in commit: https://sourceware.org/ml/gdb-patches/2016-06/msg00469.html This patch adds a similar optional parameter to other related methods that retrieve expression values: get_valueof, get_integer_valueof and get_sizeof. Thus tests that evaluate same expression multiple times can provide custom test names, ensuring that test names will be unique. gdb/testsuite/ChangeLog: 2017-03-14 Anton Kolesov * lib/gdb.exp (get_valueof, get_integer_valueof, get_sizeof): Add optional 'test' parameter. commit a379284af268ed768674e7f452ca78dad2aaaf55 Author: Andreas Arnez Date: Tue Mar 14 11:14:49 2017 +0100 linux-nat: Exploit /proc//mem for writing So far linux_proc_xfer_partial refused to handle write requests. This is still based on the assumption that the Linux kernel does not support writes to /proc//mem. That used to be true, but has changed with Linux 2.6.39 released in May 2011. This patch lifts this restriction and now exploits /proc//mem for writing to inferior memory as well, if possible. gdb/ChangeLog: * linux-nat.c (linux_proc_xfer_partial): Handle write operations as well. commit 8a6200ba863f207d93467312431d107f50f0e2ab Author: Pedro Alves Date: Tue Mar 14 00:11:09 2017 +0000 Restore test-cp-name-parser build Commit c8b23b3f89fbb0 ("Add constructor and destructor to demangle_parse_info") a while ago broke the "test-cp-name-parser" build: $ make test-cp-name-parser [...] src/gdb/cp-name-parser.y: In function ‘int main(int, char**)’: src/gdb/cp-name-parser.y:2190:9: error: cannot convert ‘std::unique_ptr’ to ‘demangle_parse_info*’ in assignment result = cp_demangled_name_to_comp (str2, &errmsg); ^ src/gdb/cp-name-parser.y:2199:38: error: ‘cp_demangled_name_parse_free’ was not declared in this scope cp_demangled_name_parse_free (result); ^ src/gdb/cp-name-parser.y:2211:14: error: cannot convert ‘std::unique_ptr’ to ‘demangle_parse_info*’ in assignment result = cp_demangled_name_to_comp (argv[arg], &errmsg); ^ src/gdb/cp-name-parser.y:2219:43: error: ‘cp_demangled_name_parse_free’ was not declared in this scope cp_demangled_name_parse_free (result); ^ Makefile:2107: recipe for target 'test-cp-name-parser.o' failed make: *** [test-cp-name-parser.o] Error 1 This commit restores it. gdb/ChangeLog: 2017-03-14 Pedro Alves * cp-name-parser.y (cp_demangled_name_to_comp): Update comment. (main): Use std::unique_ptr. Remove calls to cp_demangled_name_parse_free. commit 9c7272f0833da2bfdf513d41bc41cdbc5f4fc5f7 Author: GDB Administrator Date: Tue Mar 14 00:00:40 2017 +0000 Automatic date update in version.in commit f79ec2066662b2c32c9e62ee372c9c230d206b89 Author: Simon Marchi Date: Mon Mar 13 18:51:40 2017 -0400 alpha-bsd-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers, alphabsd_store_inferior_registers): Use regcache->ptid instead of inferior_ptid. commit edb5fb00a6865884f99be01a9e97f44243a9deb9 Author: Simon Marchi Date: Mon Mar 13 18:51:40 2017 -0400 aix-thread: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * aix-thread.c (aix_thread_fetch_registers, aix_thread_store_registers): Use regcache->ptid instead of inferior_ptid. commit 551196862e4e9dfda510f59c53b0a3ff3153e4ed Author: Simon Marchi Date: Mon Mar 13 18:51:39 2017 -0400 aarc64-linux-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * aarch64-linux-nat.c (fetch_gregs_from_thread, store_gregs_to_thread, fetch_fpregs_from_thread, store_fpregs_to_thread): Use regcache->ptid instead of inferior_ptid. commit 6a06fbb7b73fe55d6b9057f8154652e1ae8f883c Author: Simon Marchi Date: Mon Mar 13 18:51:39 2017 -0400 amd64-linux-nat: Use ptid from regcache instead of inferior_ptid gdb/ChangeLog: * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers, amd64_linux_fetch_inferior_registers): Use regcache->ptid instead of inferior_ptid. commit c6386875ba57a806c896ba097afef525671de4a0 Author: Simon Marchi Date: Mon Mar 13 18:51:38 2017 -0400 Add asserts in target_fetch/store_registers We are currently assuming that regcache->ptid is equal to inferior_ptid when we call target_fetch/store_registers. These asserts just validate that assumption. Also, since the following patches will change target code to use regcache->ptid instead of inferior_ptid, asserting that they are the same should ensure that our changes don't have any unintended consequences. gdb/ChangeLog: * target.c (target_fetch_registers, target_store_registers): Add assert. commit ddaaf0fb8605fced72e84410fc7ac834e529eb53 Author: Simon Marchi Date: Mon Mar 13 18:51:38 2017 -0400 Introduce regcache_get_ptid This patch introduces the regcache_get_ptid function, which can be used to retrieve the ptid a regcache is connected to. It is used in subsequent patches. gdb/ChangeLog: * regcache.h (regcache_get_ptid): New function. * regcache.c (regcache_get_ptid): New function. commit 1a01e7c6b0eaed1bfe70d48692e1103c6e9ee2d9 Author: Simon Marchi Date: Mon Mar 13 18:44:05 2017 -0400 gdbserver: Use pattern rule for the remaining %-ipa.o objects gdb/gdbserver/ChangeLog: * Makefile.in (%-ipa.o: %-ipa.c): New rule. (ax-ipa.o: ax.c): Remove. (linux-i386-ipa.o: linux-i386-ipa.c): Remove. (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove. (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove. (linux-s390-ipa.o: linux-s390-ipa.c): Remove. (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove. commit 36bc18a810a13f884d826842abbdd6d744ff6481 Author: Simon Marchi Date: Mon Mar 13 18:44:04 2017 -0400 gdbserver: Use pattern rule for IPA objects from common/ gdb/gdbserver/ChangeLog: * Makefile.in (%-ipa.o: ../common/%.c): New rule. (print-utils-ipa.o: ../common/print-utils.c): Remove. (rsp-low-ipa.o: ../common/rsp-low.c): Remove. (errors-ipa.o: ../common/errors.c): Remove. (format-ipa.o: ../common/format.c): Remove. (common-utils-ipa.o: ../common/common-utils.c): Remove. commit a8ebe3d5f17f12490012a1a3c69d17b6e9362805 Author: Simon Marchi Date: Mon Mar 13 18:44:04 2017 -0400 gdbserver: Use pattern rule for IPA objects from gdbserver/ gdb/gdbserver/ChangeLog: * Makefile.in (%-ipa.o: %.c): New rule. (tracepoint-ipa.o: tracepoint.c): Remove. (utils-ipa.o: utils.c): Remove. (remote-utils-ipa.o: remote-utils.c): Remove. (regcache-ipa.o: regcache.c): Remove. (i386-linux-ipa.o: i386-linux.c): Remove. (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove. (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove. (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove. (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove. (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove. (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove. (amd64-linux-ipa.o: amd64-linux.c): Remove. (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove. (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove. (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove. (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove. (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove. (aarch64-ipa.o: aarch64.c): Remove. (s390-linux32-ipa.o: s390-linux32.c): Remove. (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove. (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove. (s390-linux64-ipa.o: s390-linux64.c): Remove. (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove. (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove. (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove. (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove. (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove. (s390x-linux64-ipa.o: s390x-linux64.c): Remove. (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove. (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove. (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove. (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove. (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove. (powerpc-32l-ipa.o: powerpc-32l.c): Remove. (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove. (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove. (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove. (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove. (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove. (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove. (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove. (powerpc-64l-ipa.o: powerpc-64l.c): Remove. (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove. (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove. (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove. (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove. (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove. (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove. (tdesc-ipa.o: tdesc.c): Remove. (x32-linux-ipa.o: x32-linux.c): Remove. (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove. (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove. commit 50cfacb78f3998e5ecc653090e4f1a11dfb3d8dd Author: Simon Marchi Date: Mon Mar 13 18:44:03 2017 -0400 gdbserver: Use pattern rule for objects from arch/ gdb/gdbserver/ChangeLog: * Makefile.in (%.o: ../arch/%.c): New rule. (arm.o: ../arch/arm.c): Remove. (arm-linux.o: ../arch/arm-linux.c): Remove. (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove. (aarch64-insn.o: ../arch/aarch64-insn.c): Remove. commit c5a22423d09e3bf670fb0de0a98e6feb6176eb3f Author: Simon Marchi Date: Mon Mar 13 18:44:03 2017 -0400 gdbserver: Use pattern rule for objects from nat/ gdb/gdbserver/ChangeLog: * Makefile.in (%.o: ../nat/%.c): New rule. (x86-dregs.o: ../nat/x86-dregs.c): Remove. (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove. (linux-btrace.o: ../nat/linux-btrace.c): Remove. (linux-osdata.o: ../nat/linux-osdata.c): Remove. (linux-procfs.o: ../nat/linux-procfs.c): Remove. (linux-ptrace.o: ../nat/linux-ptrace.c): Remove. (linux-waitpid.o: ../nat/linux-waitpid.c): Remove. (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove. (ppc-linux.o: ../nat/ppc-linux.c): Remove. (linux-personality.o: ../nat/linux-personality.c): Remove. (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove. (aarch64-linux.o: ../nat/aarch64-linux.c): Remove. (x86-linux.o: ../nat/x86-linux.c): Remove. (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove. (linux-namespaces.o: ../nat/linux-namespaces.c): Remove. commit 6bda016bec556855c6d4e191f360f921faa40ded Author: Simon Marchi Date: Mon Mar 13 18:44:02 2017 -0400 gdbserver: Use pattern rule for objects from common/ gdb/gdbserver/ChangeLog: * Makefile.in (%.o: ../common/%.c): New rule. (signals.o: ../common/signals.c): Remove. (print-utils.o: ../common/print-utils.c): Remove. (rsp-low.o: ../common/rsp-low.c): Remove. (common-utils.o: ../common/common-utils.c): Remove. (posix-strerror.o: ../common/posix-strerror.c): Remove. (mingw-strerror.o: ../common/mingw-strerror.c): Remove. (vec.o: ../common/vec.c): Remove. (gdb_vecs.o: ../common/gdb_vecs.c): Remove. (xml-utils.o: ../common/xml-utils.c): Remove. (ptid.o: ../common/ptid.c): Remove. (buffer.o: ../common/buffer.c): Remove. (format.o: ../common/format.c): Remove. (filestuff.o: ../common/filestuff.c): Remove. (agent.o: ../common/agent.c): Remove. (errors.o: ../common/errors.c): Remove. (environ.o: ../common/environ.c): Remove. (common-debug.o: ../common/common-debug.c): Remove. (cleanups.o: ../common/cleanups.c): Remove. (common-exceptions.o: ../common/common-exceptions.c): Remove. (fileio.o: ../common/fileio.c): Remove. (common-regcache.o: ../common/common-regcache.c): Remove. (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove. (new-op.o: ../common/new-op.c): Remove. (btrace-common.o: ../common/btrace-common.c): Remove. commit 21122961ecea30b3be7c788e09179d297e3233f0 Author: Simon Marchi Date: Mon Mar 13 18:44:02 2017 -0400 gdbserver: Use pattern rule for objects from target/ gdb/gdbserver/ChangeLog: * Makefile.in (%.o: ../target/%.c): New rule. (waitstatus.o: ../target/waitstatus.c): Remove. commit c362e6217b556ce932250c340218f1ca16391070 Author: Simon Marchi Date: Mon Mar 13 18:44:01 2017 -0400 gdbserver: Use pattern rule for regformats source file generation gdb/gdbserver/ChangeLog: * Makefile.in (%.c: ../regformats/%.dat, (%.c: ../regformats/arm/%.dat, (%.c: ../regformats/i386/%.dat, (%.c: ../regformats/rs6000/%.dat): New rules. (aarch64.c): Remove. (reg-arm.c): Remove. (arm-with-iwmmxt.c): Remove. (arm-with-vfpv2.c): Remove. (arm-with-vfpv3.c): Remove. (arm-with-neon.c): Remove. (reg-bfin.c): Remove. (reg-cris.c): Remove. (reg-crisv32.c): Remove. (i386.c): Remove. (i386-linux.c): Remove. (i386-avx.c): Remove. (i386-avx-linux.c): Remove. (i386-avx-avx512.c): Remove. (i386-avx-avx512-linux.c): Remove. (i386-mpx.c): Remove. (i386-mpx-linux.c): Remove. (i386-avx-mpx-avx512-pku.c): Remove. (i386-avx-mpx-avx512-pku-linux.c): Remove. (i386-avx-mpx.c): Remove. (i386-avx-mpx-linux.c): Remove. (i386-mmx.c): Remove. (i386-mmx-linux.c): Remove. (reg-ia64.c): Remove. (reg-m32r.c): Remove. (reg-m68k.c): Remove. (reg-cf.c): Remove. (mips-linux.c): Remove. (mips-dsp-linux.c): Remove. (mips64-linux.c): Remove. (mips64-dsp-linux.c): Remove. (nios2-linux.c): Remove. (powerpc-32.c): Remove. (powerpc-32l.c): Remove. (powerpc-altivec32l.c): Remove. (powerpc-cell32l.c): Remove. (powerpc-vsx32l.c): Remove. (powerpc-isa205-32l.c): Remove. (powerpc-isa205-altivec32l.c): Remove. (powerpc-isa205-vsx32l.c): Remove. (powerpc-e500l.c): Remove. (powerpc-64l.c): Remove. (powerpc-altivec64l.c): Remove. (powerpc-cell64l.c): Remove. (powerpc-vsx64l.c): Remove. (powerpc-isa205-64l.c): Remove. (powerpc-isa205-altivec64l.c): Remove. (powerpc-isa205-vsx64l.c): Remove. (s390-linux32.c): Remove. (s390-linux32v1.c): Remove. (s390-linux32v2.c): Remove. (s390-linux64.c): Remove. (s390-linux64v1.c): Remove. (s390-linux64v2.c): Remove. (s390-te-linux64.c): Remove. (s390-vx-linux64.c): Remove. (s390-tevx-linux64.c): Remove. (s390x-linux64.c): Remove. (s390x-linux64v1.c): Remove. (s390x-linux64v2.c): Remove. (s390x-te-linux64.c): Remove. (s390x-vx-linux64.c): Remove. (s390x-tevx-linux64.c): Remove. (tic6x-c64xp-linux.c): Remove. (tic6x-c64x-linux.c): Remove. (tic6x-c62x-linux.c): Remove. (reg-sh.c): Remove. (reg-sparc64.c): Remove. (reg-spu.c): Remove. (amd64.c): Remove. (amd64-linux.c): Remove. (amd64-avx.c): Remove. (amd64-avx-linux.c): Remove. (amd64-avx-avx512.c): Remove. (amd64-avx-avx512-linux.c): Remove. (amd64-mpx.c): Remove. (amd64-mpx-linux.c): Remove. (amd64-avx-mpx-avx512-pku.c): Remove. (amd64-avx-mpx-avx512-pku-linux.c): Remove. (amd64-avx-mpx.c): Remove. (amd64-avx-mpx-linux.c): Remove. (x32.c): Remove. (x32-linux.c): Remove. (x32-avx.c): Remove. (x32-avx-linux.c): Remove. (x32-avx-avx512.c): Remove. (x32-avx-avx512-linux.c): Remove. (reg-xtensa.c): Remove. (reg-tilegx.c): Remove. (reg-tilegx32.c): Remove. commit 7978d7c385b072a344d969f71cdc68e1a1171ec2 Author: Simon Marchi Date: Mon Mar 13 18:02:08 2017 -0400 testsuite: Disable backslash_in_multi_line_command_test for old DejaGnus I noticed that backslash_in_multi_line_command_test in gdb.base/commands.exp failed on our RHEL6 servers. I traced it to the old version of DejaGnu (1.4.4). I have found that instead of receiving the expected: "print \\\nargc\n" gdb received: "print argc\n" thus breaking the test and its purpose. Versionof DejaGnu < 1.5 mess up sending "\\\n", it somehow gets replaced with a space. I found that the following commit in DejaGnu fixed the issue: http://git.savannah.gnu.org/cgit/dejagnu.git/commit/lib/remote.exp?id=3f39294f5cd6802858838d3bcc0ccce847ae17f2 Even though the commit is almost 10 years old, the following release of DejaGnu was only in 2013, which is why we still have systems with the old code. If the DejaGnu version is < 1.5, we just skip the test. gdb/testsuite/ChangeLog: * gdb.base/commands.exp (backslash_in_multi_line_command_test): Skip for versions of DejaGnu < 1.5. commit 896c0c1edee117ea333c66b1adac8c6f4def3f2b Author: Simon Marchi Date: Mon Mar 13 18:02:07 2017 -0400 testsuite: Introduce dejagnu_version The next patch will require checking the DejaGnu version. There is already a test that does this, gdb.threads/attach-many-short-lived-threads.exp. This patch introduces a new procedure, dejagnu_version, and makes that test use it. The version number is "right-padded" with zeroes, to make sure that we always return a triplet (major, minor, patch). The procedure does not consider the DejaGnu versions from git. For example, if you used DejaGnu from its current master branch, the version would be "1.6.1-git", meaning that 1.6.1 will be the next release. I figured we'll cross that bridge when (and if) we get there. gdb/testsuite/ChangeLog: * lib/gdb.exp (dejagnu_version): New proc. * gdb.threads/attach-many-short-lived-threads.exp (bad_dejagnu): Use dejagnu_version. commit b9da89d161e3903faa335f444af2bf05e40f926e Author: mark Date: Mon Mar 13 18:26:47 2017 +0000 Merge libiberty: Initialize d_printing in all cplus_demangle_fill_* functions. While integrating the d_printing recursion guard change into gdb I noticed we forgot to initialize the demangle_component d_printing field in cplus_demangle_fill_{name,extended_operator,ctor,dtor}. As is done in cplus_demangle_fill_{component,builtin_type,operator}. It happened to work because in gcc all demangle_components were allocated through d_make_empty. But gdb has its own allocation mechanism (as might other users). libiberty/ChangeLog: * cp-demangle.c (cplus_demangle_fill_name): Initialize demangle_component d_printing. (cplus_demangle_fill_extended_operator): Likewise. (cplus_demangle_fill_ctor): Likewise. (cplus_demangle_fill_dtor): Likewise. gdb/ChangeLog: * cp-name-parser.y (make_empty): Initialize d_printing to zero. commit c793cac124dd2eb34042f2e43abb099a26e34cb0 Author: Nick Clifton Date: Mon Mar 13 17:49:32 2017 +0000 Sync libiberty sources with GCC. PR demangler/70909 PR demangler/67264 * cp-demangle.c: Fix endless recursion. Pass struct demangle_component as non const. (d_make_empty): Initialize variable. (d_print_comp_inner): Limit recursion. (d_print_comp): Decrement variable. * cp-demint.c (cplus_demangle_fill_component): Initialize variable. (cplus_demangle_fill_builtin_type): Likewise. (cplus_demangle_fill_operator): Likewise. * testsuite/demangle-expected: Add tests. commit 5ef2d51bd6ae49b28282835156d1d6622beac4a6 Author: Alan Modra Date: Mon Mar 13 20:56:25 2017 +1030 objdump -dS: warn if source is more recent than object If the source file is more recent than the object file, line number information in the object may no longer match the source. So print a warning message. * objdump.c (update_source_path): Add abfd param. Add struct stat vars. Pass to try_print_file_open. Warn if source is more recent than object. (try_print_file_open, slurp_file): Add struct stat param to return fstat. (show_line): Call update_source_path with bfd. commit f955cccff399ccc4e16b8e90f140f2e9a785a07b Author: Nick Clifton Date: Mon Mar 13 09:58:04 2017 +0000 Rename R_AARCH64_TLSDESC_LD64_LO12_NC to R_AARCH64_TLSDESC_LD64_LO12 and R_AARCH64_TLSDESC_ADD_LO12_NC to R_AARCH64_TLSDESC_ADD_LO12. PR binutils/21202 include * elf/aarch64.h (R_AARCH64_TLSDESC_LD64_LO12_NC): Rename to R_AARCH64_TLSDESC_LD64_LO12. (R_AARCH64_TLSDESC_ADD_LO12_NC): Rename to R_AARCH64_TLSDESC_ADD_LO12_NC. bfd * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to BFD_RELOC_AARCH64_TLSDESC_ADD_LO12. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc names. (IS_AARCH64_TLSDESC_RELOC): Likewise. (elfNN_aarch64_howto_table): Likewise. (aarch64_tls_transition_without_check): Likewise. (aarch64_reloc_got_type): Likewise. (elfNN_aarch64_final_link_relocate): Likewise. (elfNN_aarch64_tls_relax): Likewise. (elfNN_aarch64_relocate_section): Likewise. (elfNN_aarch64_gc_sweep_hook): Likewise. (elfNN_aarch64_check_relocs): Likewise. * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. (_bfd_aarch64_elf_resolve_relocation): Likewise. gas * config/tc-aarch64.c (reloc_table): Rename BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC to BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. Rname BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC to BFD_RELOC_AARCH64_TLSDESC_ADD_LO12. (md_apply_fix): Likewise. (aarch64_force_relocation): Likewise. * testsuite/gas/aarch64/tls.d: Update regexp. ld * testsuite/ld-aarch64/ifunc-5r-local.d: Update regexp. commit d40e34db392f834793fb9af487121776b4cec6e7 Author: Tristan Gingold Date: Fri Mar 10 15:16:19 2017 +0100 ld: add an error in case of address space overflow. ld/ * ldlang.c (lang_check_section_addresses): Check for address space overflow. * testsuite/ld-checks/checks.exp (overflow_check): New procedure * testsuite/ld-checks/over.s: New test source. * testsuite/ld-checks/over.d: New test. * testsuite/ld-checks/over2.s: New test source. * testsuite/ld-checks/over2.d: New test. commit 4b5900d8b81522bd6ebe4d94d45dfb54d1982c62 Author: Alexey Neyman Date: Sun Mar 12 20:49:46 2017 -0700 PowerPC: incorrect library search order First, need to match against just the CPU name, not the whole triplet. Otherwise, the test picks up "*le-*" pattern from x86_64-apple-darwin triplet. Second, it should be testing for $target, not $host. Host may be little endian by default, and the sysroot directory layout shouldn't depend on whether it is built on LE or BE machine. * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Set from target cpu, not host. commit b9d62f893fcc0b4c36aad0552810dcde304979d0 Author: GDB Administrator Date: Mon Mar 13 00:00:21 2017 +0000 Automatic date update in version.in commit d5bb792ca130aac17e080325e4005ef417ceabd5 Author: GDB Administrator Date: Sun Mar 12 00:00:28 2017 +0000 Automatic date update in version.in commit 118aa6cf395aec093fe12d7fb2d05441791a93fa Author: Alan Modra Date: Sat Mar 11 23:37:02 2017 +1030 Add sysroot for ld -rpath search * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Add sysroot for -rpath search. commit 316a1245fe31e327223ca66797b789eaf9544c2c Author: Alan Modra Date: Sat Mar 11 22:57:29 2017 +1030 Rewrite add_sysroot Relative paths shouldn't have the sysroot prefix added. The patch also makes some attempt at supporting DOS paths, and tidies code using the new add_sysroot. * emultempl/elf32.em (gld${EMULATION_NAME}_add_sysroot): Rewrite. Only prefix absolute paths with sysroot. Handle DOS paths. (gld${EMULATION_NAME}_check_ld_elf_hints): Constify variable. (gld${EMULATION_NAME}_check_ld_so_conf): Likewise. (gld${EMULATION_NAME}_after_open): Short-circuit NULL path searches. Rename variable. Simplify get_runpath search. commit 4aef764338ed40a7fa9573b0e6e2ade817acd688 Author: Alan Modra Date: Sat Mar 11 20:56:51 2017 +1030 Remove bogus ATTRIBUTE_UNUSED * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function parameter is in fact used. Whitespace fixes. * elf64-ppc.c: Likewise. commit bb4287c562027eafe63ddac9fd4c7e1730335795 Author: Alan Modra Date: Sat Mar 11 11:04:02 2017 +1030 Don't use -rdynamic in ld test This gcc option isn't well supported, so use the actual linker option we want to test. * testsuite/ld-elf/shared.exp: Use -Wl,-export-dynamic rather than -rdynamic. commit e299b3551edbe81be2062fcaef9319d681d0d15b Author: Alan Modra Date: Sat Mar 11 10:51:56 2017 +1030 Don't run new orphan tests on i860 and i960 These targets use the generic ELF support, so don't handle orphans well. The patch also updates the orphan doco to reflect this fact, and deletes some ELF details that don't really add anything. * ld.texinfo (Orphan Sections): Mention that not all targets handle orphans well. Delete ELF details. * testsuite/ld-elf/orphan-9.d: Don't run for i860 and i960. * testsuite/ld-elf/orphan-10.d: Likewise. commit a08f8d99b87b0b0f681a27eba8e25e2fb0abd034 Author: GDB Administrator Date: Sat Mar 11 00:00:23 2017 +0000 Automatic date update in version.in commit 5f4d10850850cd95af5e95a16848c8c07a273d88 Author: Keith Seitz Date: Fri Mar 10 10:32:09 2017 -0800 c++/8218: Destructors w/arguments. For a long time now, c++/8218 has noted that GDB is printing argument types for destructors: (gdb) ptype A type = class A { public: ~A(int); } This happens because cp_type_print_method_args doesn't ignore artificial arguments. [It ignores the first `this' pointer because it simply skips the first argument for any non-static function.] This patch fixes this: (gdb) ptype A type = class A { public: ~A(); } I've adjusted gdb.cp/templates.exp to account for this and added a new passing regexp. gdb/ChangeLog PR c++/8218 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments. gdb/testsuite/ChangeLog PR c++/8128 * gdb.cp/templates.exp (test_ptype_of_templates): Remove argument type from destructor regexps. Add a branch which actually passes the test. Adjust "ptype t5i" test names. commit 7b5d48229b7faa16f69e87fb269f17db0291d89f Author: Chia-Hao Lo Date: Fri Mar 10 16:29:58 2017 +0000 Make objdump's --wide command line option affect its output of DWARF debug information. PR binutils/21235 * objdump.c (main): Set do_wide with --wide. commit 8b1e5da10ab58d2aa5eb84bf27de511294f061ef Author: Nick Clifton Date: Fri Mar 10 15:42:04 2017 +0000 Document that the .2byte and .4byte directives warn about overlarge values. * doc/as.texinfo (2byte): Tidy up wording. Add note that overlarge values will produce a warning message and be trunacted. (4byte): Likewise. commit 55e22ca83ae50d6fe422cd0542f2a1a5934b2dd2 Author: Nick Clifton Date: Fri Mar 10 10:50:34 2017 +0000 Add basic recognition of new EM_ ELF machine numbers. include * elf/common.h (EM_LANAI): New machine number. (EM_BPF): Likewise. (EM_WEBASSEMBLY): Likewise. Move low value, deprecated, numbers to their numerical equivalents. binutils * readelf.c (get_machine_name): Rearrange switch table in order of increasing machine number. Add missing entries. commit f9f791a1b147c404a489485dba5eca49f8dbcbb9 Author: GDB Administrator Date: Fri Mar 10 00:00:28 2017 +0000 Automatic date update in version.in commit 14ea2c1b230a62f312346fb16716b3dd4850815b Author: Andrew Burgess Date: Tue Jan 17 19:13:29 2017 +0000 ld: Track changes to default region LMA even for empty sections Given a linker script fragment like this: SECTIONS { . = 0x1000; .text : AT(0x100) { *(.text) } .data : AT(0x200) { *(.data) } .rodata : AT(0x300) { *(.rodata) } } and an input file containing sections, '.text', '.data.1', and '.rodata', then we'd expect the linker to place '.text' and '.rodata' in the obvious way, and the '.data.1' orphan section would be located after the '.data' section (assuming similar section properties). Further, I believe that the expectation would be that the LMA for the orphan '.data.1' section would start from 0x200 (as there is no '.data' content). However, right now, the LMA for '.data.1' would be 0x101, following on from the '.text' section, this is because the change in LMA for the '.data' section is not noticed by the linker, if there's no content in the '.data' section. What can be even more confusing to a user (though the cause is obvious once you understand what's going on) is that adding some content to '.data' will cause the orphan '.data.1' to switch to an LMA based off of 0x200. This commit changes the behaviour so that an empty section that is in the default lma region, and sets its lma, will adjust the lma of the default region, this change will then be reflected in following sections within the default lma memory region. There's a new test to cover this issue that passes on a range of targets, however, some targets generate additional sections, or have stricter memory region size requirements that make it harder to come up with a generic pass pattern, that still tests the required features. For now I've set the test to ignore these targets. ld/ChangeLog: * ldlang.c (lang_size_sections_1): Shortcut loop only after tracking changes to the default regions LMA. * testsuite/ld-elf/orphan-9.ld: Extend header comment. * testsuite/ld-elf/orphan-10.d: New file. * testsuite/ld-elf/orphan-10.s: New file. * NEWS: Mention change in behaviour. commit 77f5e65ecfb669ea1d2fd74b74fbbf0d0c20daf8 Author: Andrew Burgess Date: Tue Jan 17 19:12:54 2017 +0000 ld: better handling of lma region for orphan sections When picking an lma_region for an orphan section we currently create a new lang_output_section_statement_type and then populate this with the orphan section. The problem is that the lang_output_section_statement_type has a prev pointer that links back to the previous output section. For non-orphan output sections, that are created in linker script order, the prev pointer will point to the output section that appears previous in linker script order, as you'd probably expect. The problem is that orphan sections are placed after processing the linker script, and so, in the case of an output section created for an orphan input section, the prev pointer actually points to the last output section created. This causes some unexpected behaviour when the orphan section is not placed after the last non-orphan section that was created. For example, consider this linker script: MEMORY { TEXT : ORIGIN = 0x200, LENGTH = 0x10 RODATA : ORIGIN = 0x400, LENGTH = 0x10 } SECTIONS { .text : {*(.text) } AT>TEXT .data : AT(0x300) { *(.data) } .rodata : { *(.rodata) } AT>RODATA } If we are processing an orphan section '.data.1' and decide to place this after '.data', then the output section created will have a prev pointer that references the '.rodata' output section. The result of this is that '.data.1' will actually be assigned to the RODATA lma region, which is probably not the expected behaviour. The reason why '.data.1' is placed into the lma region of the '.rodata' section is that lma region propagation is done at the time we create the output section, based on the previous output section pointer, which is really just a last-output-section-created pointer at that point in time, though the prev point is fixed up later to reflect the true order of the output sections. The solution I propose in this commit is to move the propagation of lma regions into a separate pass of the linker, rather than performing this as part of the enter/exit of output sections during linker script parsing. During this later phase we have all of the output sections to hand, and the prev/next points have been fixed up by this point to reflect the actual placement ordering. There's a new test to cover this issue that passes on a range of targets, however, some targets generate additional sections, or have stricter memory region size requirements that make it harder to come up with a generic pass pattern, that still tests the required features. For now I've set the test to ignore these targets. ld/ChangeLog: * ldlang.c (lang_leave_output_section_statement): Move lma_region logic to... (lang_propagate_lma_regions): ...this new function. (lang_process): Call new function. * testsuite/ld-elf/orphan-9.d: New file. * testsuite/ld-elf/orphan-9.ld: New file. * testsuite/ld-elf/orphan-9.s: New file. * NEWS: Mention change in behaviour. commit a87ded7b88a85b40f2aec5e5b6c972dd7b74b3a9 Author: Andrew Burgess Date: Tue Jan 17 18:08:17 2017 +0000 ld: Orphan section documentation Make more explicit mention of the fact that orphan sections can cause a new output section to be created. Though this information is clearly implied in the manual it might not be clear enough. A user _might_ (incorrectly) think that orphan sections can only be inserted into an existing output section. ld/ChangeLog: * ld.texinfo (Orphan Sections): Add more detail. commit 86fa6981e7487e2c2df4337aa75ed2d93c32eaf2 Author: H.J. Lu Date: Thu Mar 9 09:58:46 2017 -0800 X86: Add pseudo prefixes to control encoding Many x86 instructions have more than one encodings. Assembler picks the default one, usually the shortest one. Although the ".s", ".d8" and ".d32" suffixes can be used to swap register operands or specify displacement size, they aren't very flexible. This patch adds pseudo prefixes, {xxx}, to control instruction encoding. The available pseudo prefixes are {disp8}, {disp32}, {load}, {store}, {vex2}, {vex3} and {evex}. Pseudo prefixes are preferred over the ".s", ".d8" and ".d32" suffixes, which are deprecated. gas/ * config/tc-i386.c (_i386_insn): Add dir_encoding and vec_encoding. Remove swap_operand and need_vrex. (extra_symbol_chars): Add '}'. (md_begin): Mark '}' with LEX_BEGIN_NAME. Allow '}' in mnemonic. (build_vex_prefix): Don't use 2-byte VEX encoding with {vex3}. Check dir_encoding and load. (parse_insn): Check pseudo prefixes. Set dir_encoding. (VEX_check_operands): Likewise. (match_template): Check dir_encoding and load. (parse_real_register): Set vec_encoding instead of need_vrex. (parse_register): Likewise. * doc/c-i386.texi: Document {disp8}, {disp32}, {load}, {store}, {vex2}, {vex3} and {evex}. Remove ".s", ".d8" and ".d32" * testsuite/gas/i386/i386.exp: Run pseudos and x86-64-pseudos. * testsuite/gas/i386/pseudos.d: New file. * testsuite/gas/i386/pseudos.s: Likewise. * testsuite/gas/i386/x86-64-pseudos.d: Likewise. * testsuite/gas/i386/x86-64-pseudos.s: Likewise. opcodes/ * i386-gen.c (opcode_modifiers): Replace S with Load. * i386-opc.h (S): Removed. (Load): New. (i386_opcode_modifier): Replace s with load. * i386-opc.tbl: Add {disp8}, {disp32}, {swap}, {vex2}, {vex3} and {evex}. Replace S with Load. * i386-tbl.h: Regenerated. commit f03265d9cda1f5f8df238efa9b7a20330e5711f1 Author: Sam Thursfield Date: Thu Mar 9 15:58:39 2017 +0000 Fix compile time warnings about using possibly uninitialised variables in rs6000-core.c. * rs6000-core.c (CORE_NEW): Simplify macro when AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning. commit c1fe188b154a4e81372629316be3d3a7820efdac Author: H.J. Lu Date: Thu Mar 9 07:43:48 2017 -0800 Use CpuCET on rdsspq * i386-opc.tbl: Use CpuCET on rdsspq. * i386-tbl.h: Regenerated. commit 4b8b687e885287ed85dafffcebbb8d03d7ea2c38 Author: Peter Bergner Date: Wed Mar 8 20:49:03 2017 -0600 Update -maltivec and -mvsx options to only enable their oldest instructions. Currently, the -maltivec and -mvsx GAS options enable *all* of the altivec and vsx instructions respecitively that have ever been added. This is in constract to GCC's -maltivec and -mvsx options, which only enable the oldest (ie, first) set of altivec and vsx instructions. This patch changes GAS to mimic GCC's behaviour with respect to -maltivec and -mvsx and it solves a problem with trying to assemble the lxvx instruction which is different between POWER8 and POWER9. opcodes/ * ppc-dis.c (ppc_opts) : Do not use PPC_OPCODE_ALTIVEC2; : Do not use PPC_OPCODE_VSX3; gas/ * testsuite/gas/ppc/altivec2.d (as): Use the -mpower8 option. (objdump): Use the -Mpower8 option. commit c7341d5a6b334464d84672229d9912d99347db34 Author: GDB Administrator Date: Thu Mar 9 00:00:31 2017 +0000 Automatic date update in version.in commit 1de05205afe1ecd1f1fa2befc6843d0dc70adefc Author: Pedro Alves Date: Wed Mar 8 22:05:36 2017 +0000 Avoid unstable test message in gdb.base/step-over-exit.exp Currently diffing testrun results shows: -PASS: gdb.base/step-over-exit.exp: break *0x7ffff77e18c6 if main == 0 +PASS: gdb.base/step-over-exit.exp: break *0x2aaaab0988c6 if main == 0 gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves * gdb.base/step-over-exit.exp: Add explicit test message. commit 1437d0631b209500db8371c425e896deb66ec9f9 Author: Peter Bergner Date: Wed Mar 8 14:00:42 2017 -0600 Add support for the new 'lnia' extended mnemonic. opcodes/ * ppc-opc.c (powerpc_opcodes) : New extended mnemonic. gas/ * testsuite/gas/ppc/power9.d New test. * testsuite/gas/ppc/power9.s: Likewise. commit c65d6b55b3a592906c470c566f57ad8ceacc1605 Author: Pedro Alves Date: Wed Mar 8 18:54:34 2017 +0000 Fix PR18360 - internal error when using "interrupt -a" If you do "interrupt -a" just while some thread is stepping over a breakpoint, gdb trips on an internal error. The test added by this patch manages to trigger this consistently by spawning a few threads that are constantly tripping on a conditional breakpoint whose condition always evaluates to false. With current gdb, you get: ~~~ interrupt -a .../src/gdb/inline-frame.c:343: internal-error: void skip_inline_frames(ptid_t): Assertion `find_inline_frame_state (ptid) == 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/interrupt-while-step-over.exp: displaced-stepping=on: iter=0: interrupt -a (GDB internal error) [...] .../src/gdb/inline-frame.c:343: internal-error: void skip_inline_frames(ptid_t): Assertion `find_inline_frame_state (ptid) == 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/interrupt-while-step-over.exp: displaced-stepping=off: iter=0: wait for stops (GDB internal error) ~~~ The assertion triggers because we're processing a stop for a thread that had already stopped before and thus had already its inline-frame state filled in. Calling handle_inferior_event_1 directly within a "thread_stop_requested" observer is something that I've wanted to get rid of before, for being fragile. Nowadays, infrun is aware of threads with pending events, so we can use that instead, and let the normal fetch_inferior_event -> handle_inferior_event code path handle the forced stop. The change to finish_step_over is necessary because sometimes a thread that was told to PTRACE_SINGLESTEP reports back a SIGSTOP instead of a SIGTRAP (i.e., we tell it to single-step, and then interrupt it quick enough that on the kernel side the thread dequeues the SIGTOP before ever having had a chance of executing the instruction to be stepped). SIGSTOP gets translated to a GDB_SIGNAL_0. And then finish_step_over would miss calling clear_step_over_info, and thus miss restarting the other threads (which in this case of threads with pending events, means setting their "resumed" flag, so their pending events can be consumed). And now that we always restart threads in finish_step_over, we no longer need to do that in handle_signal_stop. Tested on x86_64 Fedora 23, native and gdbserver. gdb/ChangeLog: 2017-03-08 Pedro Alves PR gdb/18360 * infrun.c (start_step_over, do_target_resume, resume) (restart_threads): Assert we're not resuming a thread that is meant to be stopped. (infrun_thread_stop_requested_callback): Delete. (infrun_thread_stop_requested): If the thread is internally stopped, queue a pending stop event and clear the thread's inline-frame state. (handle_stop_requested): New function. (handle_syscall_event, handle_inferior_event_1): Use handle_stop_requested. (handle_stop_requested): New function. (handle_signal_stop): Set the thread's stop_signal here instead of at caller. (finish_step_over): Clear step over info unconditionally. (handle_signal_stop): If the user had interrupted the event thread, consider the stop a random signal. (handle_signal_stop) : Don't restart threads here. (stop_waiting): Don't clear step-over info here. gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves PR gdb/18360 * gdb.threads/interrupt-while-step-over.c: New file. * gdb.threads/interrupt-while-step-over.exp: New file. commit 15c22686d0e33d87262bc9075296eeddd7d955f7 Author: Pedro Alves Date: Wed Mar 8 15:52:16 2017 +0000 gdb: Fix ATTRIBUTE_NONNULL usage Should fix the build failure with Clang mentioned at : In file included from ../../binutils-gdb/gdb/dwarf2read.c:72: ../../binutils-gdb/gdb/common/gdb_unlinker.h:35:35: error: '__nonnull__' attribute is invalid for the implicit this argument unlinker (const char *filename) ATTRIBUTE_NONNULL (1) ^ ~ ../../binutils-gdb/gdb/../include/ansidecl.h:169:48: note: expanded from macro 'ATTRIBUTE_NONNULL' # define ATTRIBUTE_NONNULL(m) __attribute__ ((__nonnull__ (m))) gdb/ChangeLog: 2017-03-08 Pedro Alves PR 21206 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull goes to argument 2, not 1. commit 1fc87489b40b3100badf184a7c266387bae47def Author: H.J. Lu Date: Wed Mar 8 07:44:04 2017 -0800 Properly dump NT_GNU_PROPERTY_TYPE_0 Property type and datasz are always 4 bytes for both 32-bit and 64-bit objects. Property values for GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED are 4 bytes for both i386 and x86-64 objects. We should also check GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER. binutils/ PR binutils/21231 * readelf.c (decode_x86_isa): Change argument to unsigned int. (print_gnu_property_note): Retrieve property type and datasz as 4-byte integer. Consolidate property datasz check. Check GNU_PROPERTY_LOPROC and GNU_PROPERTY_LOUSER. * testsuite/binutils-all/i386/pr21231a.d: New file. * testsuite/binutils-all/i386/pr21231a.s: Likewise. * testsuite/binutils-all/i386/pr21231b.d: Likewise. * testsuite/binutils-all/i386/pr21231b.s: Likewise. * testsuite/binutils-all/x86-64/pr21231a.d: Likewise. * testsuite/binutils-all/x86-64/pr21231a.s: Likewise. * testsuite/binutils-all/x86-64/pr21231b.d: Likewise. * testsuite/binutils-all/x86-64/pr21231b.s: Likewise. include/ PR binutils/21231 * elf/common.h (GNU_PROPERTY_LOPROC): New. (GNU_PROPERTY_HIPROC): Likewise. (GNU_PROPERTY_LOUSER): Likewise. (GNU_PROPERTY_HIUSER): Likewise. commit 2e86a2830cfef688a27e17353b84f59f8147ab23 Author: Pedro Alves Date: Wed Mar 8 14:05:41 2017 +0000 gdb.arch/amd64-entry-value-param*.exp: Make sure test messages are unique gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves * gdb.arch/amd64-entry-value-param-dwarf5.exp: Use with_test_prefix. * gdb.arch/amd64-entry-value-param.exp: Use with_test_prefix. commit 25dcbff6ef0088e080d92b3cbc346ae0b5071d9d Author: Pedro Alves Date: Wed Mar 8 13:09:45 2017 +0000 "gdb.arch/i386-pkru.exp: probe PKRU support" shouldn't FAIL if not supported Currently I get: (gdb) print have_pkru() $1 = 0 (gdb) FAIL: gdb.arch/i386-pkru.exp: probe PKRU support UNSUPPORTED: gdb.arch/i386-pkru.exp: processor does not support protection key feature. Probing suceeded, so that should be a PASS -> UNSUPPORTED. gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves * gdb.arch/i386-pkru.exp (probe PKRU support): Handle detecting PKRU as not supported as a PASS. commit dc9366eb0592157e2125967690f0aed61b17bcf7 Author: Pedro Alves Date: Wed Mar 8 12:46:44 2017 +0000 gdb: Fix a few unstable test names Avoid putting unstable path names in test messages, in order to avoid spurious testrun result diffs like: [....] -PASS: gdb.base/break-fun-addr.exp: /home/pedro/gdb/test-build1/gdb/testsuite/outputs/gdb.base/break-fun-addr/break-fun-addr1: break *main +PASS: gdb.base/break-fun-addr.exp: /home/pedro/gdb/test-build2/gdb/testsuite/outputs/gdb.base/break-fun-addr/break-fun-addr1: break *main [....] gdb/ChangeLog: 2017-03-08 Pedro Alves * gdb.base/break-fun-addr.exp: Use $testfile1/$testfile2 for test prefix instead of $binfile1/$binfile2. * gdb.btrace/gcore.exp: Use "core" instead of unstable path name in test message. * gdb.python/py-completion.exp: Use "load python file" as test messages instead of unstable path names. commit 6e5d74e74756fafe59e8198c4cc462cf7c57e12c Author: Pedro Alves Date: Wed Mar 8 11:41:35 2017 +0000 Fix PR 21218: GDB dumps core when escaping newline in multi-line command With commit 3b12939dfc2399 ("Replace the sync_execution global with a new enum prompt_state tristate"), GDB started aborting if you try splitting an input line with a continuation char (backslash) while in a multi-line command: (gdb) commands Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >print \ (gdb) 1 # note "(gdb)" incorrectly printed here. >end readline: readline_callback_read_char() called with no handler! $ That abort is actually a symptom of an old problem introduced when gdb_readline_wrapper was rewritten to use asynchronous readline, back in 2007. Note how the "(gdb)" prompt is printed above in the "(gdb) 1" line. Clearly it shouldn't be there, but it already was before the commit mentioned above. Fixing that also fixes the readline abort shown above. The problem starts when command_line_input passes a NULL prompt to gdb_readline_wrapper when it finds previous incomplete input due to a backslash, trying to fetch more input without printing another ">" secondary prompt. That itself should not be a problem, because passing NULL to gdb_readline_wrapper has the same meaning as passing a pointer to empty string, since gdb_readline_wrapper exposes the same interface as 'readline(char *)'. However, gdb_readline_wrapper passes the prompt argument directly to display_gdb_prompt, and for the latter, a NULL prompt argument has a different meaning - it requests printing the primary prompt. Before commit 782a7b8ef9c096 (which rewrote gdb_readline_wrapper to use asynchronous readline), GDB behaved like this: (gdb) commands [....] >print \ 1 >end (gdb) The above is what this commit restores GDB back to. New test included. gdb/ChangeLog: 2017-03-08 Pedro Alves PR cli/21218 * top.c (gdb_readline_wrapper): Avoid passing NULL to display_gdb_prompt. (command_line_input): Add comment. gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves Jan Kratochvil PR cli/21218 * gdb.base/commands.exp (backslash_in_multi_line_command_test): New proc. (top level): Call it. commit 5cf70512f835032c413f2554af07814e1dc05cd6 Author: Jiong Wang Date: Wed Mar 8 11:14:41 2017 +0000 [gdb, doc] Add missing escape character '@' gdb/doc/ * gdb.texinfo (Memory Protection Extensions): Add missing escape character "@". commit 9753a2f6d74dc92d2ad94993a5479ee0edbc6887 Author: Pedro Alves Date: Wed Mar 8 00:14:59 2017 +0000 Fix PR tui/21216: TUI line breaks regression Commit d7e747318f4d04 ("Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy") regressed the TUI's command window. Newlines miss doing a "carriage return", resulting in output like: ~~~~~~~~~~~~~~~~~~ (gdb) helpList of classes of commands: aliases -- Aliases of other commands breakpoints -- Making program stop at certain points ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Before the commit mentioned above, the default ui_file->to_write implementation had a hack that would defer into the ui_file->to_fputs method. The TUI's ui_file did not implement the to_write method, so all writes would end up going to the ncurses window via tui_file_fputs -> tui_puts. After the commit above, the hack is gone, but the TUI's ui_file still does not implement the ui_file::write method. Since tui_file inherits from stdio_file, writing to a tui_file ends up doing fwrite on the FILE stream the TUI is "associated" with, via stdio_file::write, instead of writing to the ncurses window. The fix is to have tui_file override the "write" method. New test included. gdb/ChangeLog: 2017-03-08 Pedro Alves PR tui/21216 * tui/tui-file.c (tui_file::write): New. * tui/tui-file.h (tui_file): Override "write". * tui/tui-io.c (do_tui_putc, update_start_line): New functions, factored out from ... (tui_puts): ... here. (tui_putc): Use them. (tui_write): New function. * tui/tui-io.h (tui_write): Declare. gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves PR tui/21216 * gdb.tui/tui-nl-filtered-output.exp: New file. commit 1a4dd9ddae4ce51724b4e08c6304e7c64f8f916f Author: Pedro Alves Date: Wed Mar 8 00:14:58 2017 +0000 Move TUI completion tests to gdb.tui/completion.exp gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves * gdb.base/completion.exp: Move TUI completion tests to ... * gdb.tui/completion.exp: ... this new file. commit 7cbbff33a502dcba0264a1935840345274b8aee2 Author: Pedro Alves Date: Wed Mar 8 00:14:58 2017 +0000 Move TUI testcases to new gdb/testsuite/gdb.tui/ directory Let's start putting TUI tests in their own dir. gdb/testsuite/ 2017-03-08 Pedro Alves * gdb.base/tui-disasm-long-lines.c, gdb.base/tui-disasm-long-lines.exp, gdb.base/tui-layout.c, gdb.base/tui-layout.exp: Move to ... * gdb.tui/: ... this new directory. commit 50dbe6e1bc8589db8e900299ef03ce9ead4ef3d7 Author: GDB Administrator Date: Wed Mar 8 00:00:42 2017 +0000 Automatic date update in version.in commit 1672e0d98d88d11b5c7d5793bd2cf29cbb56696f Author: Sergio Durigan Junior Date: Thu Dec 22 09:20:00 2016 -0500 Share gdb/environ.[ch] with gdbserver We will need access to the environment functions when we share fork_inferior between GDB and gdbserver, therefore we simply make the API on gdb/environ.[ch] available on common/. No extra adjustments are needed to make it compile on gdbserver. gdb/ChangeLog: 2017-03-07 Sergio Durigan Junior * Makefile.in (SFILES): Replace "environ.c" with "common/environ.c". (HFILES_NO_SRCDIR): Likewise, for "environ.h". * environ.c: Include "common-defs.h" instead of "defs.h. Moved to... * common/environ.c: ... here. * environ.h: Moved to... * common/environ.h: ... here. gdb/gdbserver/ChangeLog: 2017-03-07 Sergio Durigan Junior * Makefile.in (SFILES): Add "common/environ.c". (OBJS): Add "common/environ.h". commit f7bb4e3a0d3738e8cce3dcded6ef12c9949cb85f Author: Peter Bergner Date: Tue Mar 7 09:49:10 2017 -0600 GDB: Fix some null pointer dereferences due to disassembler-options patch. gdb/ * gdbarch.sh (pstring_ptr): New static function. (gdbarch_disassembler_options): Use it. (gdbarch_verify_disassembler_options): Print valid_disassembler_options, not valid_disassembler_option->name. * gdbarch.c: Regenerate. commit e45ced6c5e06b0092ac9f5497aa580cfad0c953c Author: Peter Bergner Date: Tue Mar 7 09:39:13 2017 -0600 Remove use of the no longer needed -mminimal-toc option. * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete. commit 5f6fd321915fae0194e01322d22cad4e451e8d20 Author: Pedro Alves Date: Tue Mar 7 12:44:58 2017 +0000 Fix "layout reg" crash Commit d7e747318f4d04 ("Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy") introduced a problem when using "layout regs", that leads gdb to crash when issuing: ./gdb ./a.out -ex 'layout regs' -ex start From the backtrace, it's caused by this 'delete' on tui_restore_gdbout(): (gdb) bt #0 0x00007ffff6b962b2 in free () from /lib64/libc.so.6 #1 0x000000000059fa47 in tui_restore_gdbout (ui=0x22997b0) at ../../gdb/tui/tui-regs.c:714 #2 0x0000000000619996 in do_my_cleanups (pmy_chain=pmy_chain@entry=0x1e08320 , old_chain=old_chain@entry=0x235b4b0) at ../../gdb/common/cleanups.c:154 #3 0x0000000000619b1d in do_cleanups (old_chain=old_chain@entry=0x235b4b0) at ../../gdb/common/cleanups.c:176 #4 0x000000000059fb0d in tui_register_format (frame=frame@entry=0x22564e0, regnum=regnum@entry=0) at ../../gdb/tui/tui-regs.c:747 #5 0x000000000059ffeb in tui_get_register (data=0x2434d18, changedp=0x0, regnum=0, frame=0x22564e0) at ../../gdb/tui/tui-regs.c:768 #6 tui_show_register_group (refresh_values_only=, frame=0x22564e0, group=0x1e09250 ) at ../../gdb/tui/tui-regs.c:287 #7 tui_show_registers (group=0x1e09250 ) at ../../gdb/tui/tui-regs.c:156 #8 0x00000000005a07cf in tui_check_register_values (frame=frame@entry=0x22564e0) at ../../gdb/tui/tui-regs.c:496 #9 0x00000000005a3e65 in tui_check_data_values (frame=frame@entry=0x22564e0) at ../../gdb/tui/tui-windata.c:232 #10 0x000000000059cf65 in tui_refresh_frame_and_register_information (registers_too_p=1) at ../../gdb/tui/tui-hooks.c:156 #11 0x00000000006d5c05 in generic_observer_notify (args=0x7fffffffdbe0, subject=) at ../../gdb/observer.c:167 #12 observer_notify_normal_stop (bs=, print_frame=print_frame@entry=1) at ./observer.inc:61 #13 0x00000000006a6409 in normal_stop () at ../../gdb/infrun.c:8364 #14 0x00000000006af8f5 in fetch_inferior_event (client_data=) at ../../gdb/infrun.c:3990 #15 0x000000000066f0fd in gdb_wait_for_event (block=block@entry=0) at ../../gdb/event-loop.c:859 #16 0x000000000066f237 in gdb_do_one_event () at ../../gdb/event-loop.c:322 #17 0x000000000066f386 in gdb_do_one_event () at ../../gdb/event-loop.c:353 #18 0x00000000007411bc in wait_sync_command_done () at ../../gdb/top.c:570 #19 0x0000000000741426 in maybe_wait_sync_command_done (was_sync=0) at ../../gdb/top.c:587 #20 execute_command (p=, p@entry=0x7fffffffe43a "start", from_tty=from_tty@entry=1) at ../../gdb/top.c:676 #21 0x00000000006c2048 in catch_command_errors (command=0x741200 , arg=0x7fffffffe43a "start", from_tty=1) at ../../gdb/main.c:376 #22 0x00000000006c2b60 in captured_main_1 (context=0x7fffffffde70) at ../../gdb/main.c:1119 #23 captured_main (data=0x7fffffffde70) at ../../gdb/main.c:1140 #24 gdb_main (args=args@entry=0x7fffffffdf90) at ../../gdb/main.c:1158 #25 0x0000000000408cf5 in main (argc=, argv=) at ../../gdb/gdb.c:32 (gdb) f 1 #1 0x000000000059fa47 in tui_restore_gdbout (ui=0x22997b0) at ../../gdb/tui/tui-regs.c:714 714 delete gdb_stdout; The problem is simply that the commit mentioned above made the ui_file that gdb_stdout is temporarily set to be a stack-allocated string_file, while before it used to be a heap-allocated ui_file. The fix is simply to remove the now-incorrect delete. New test included, which exercises enabling all TUI layouts, with and without execution. (This particular crash only triggers with execution.) gdb/ChangeLog: 2017-03-07 Pedro Alves * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout. gdb/testsuite/ChangeLog: 2017-03-07 Pedro Alves * gdb.base/tui-layout.c: New file. * gdb.base/tui-layout.exp: New file. commit 44959fa81858df7d06fd83b0595b66709e344074 Author: Pedro Alves Date: Tue Mar 7 12:21:00 2017 +0000 Rename gdb.base/tui-layout.exp -> gdb.base/tui-disasm-long-lines.exp To better reflect what the testcase is about, and to make room for a different testcase. gdb/testsuite/ChangeLog: 2017-03-07 Pedro Alves * gdb.base/tui-layout.c: Rename to ... * gdb.base/tui-disasm-long-lines.c: ... this. * gdb.base/tui-layout.exp: Rename to ... * gdb.base/tui-disasm-long-lines.exp: ... this. commit f8c4e718c26a0181821398e09d96113c0ff49c15 Author: Pedro Alves Date: Tue Mar 7 12:11:45 2017 +0000 Add describing intro comment to gdb.base/tui-layout.exp gdb/testsuite/ChangeLog: 2017-03-07 Pedro Alves * gdb.base/tui-layout.exp: Add intro comment and fix typo. commit 6dbb839a78d343b0a7435ec7db46ee359b1f62ec Author: Pedro Alves Date: Tue Mar 7 13:51:33 2017 +0000 Fix whitespace/typos in gdb/ChangeLog and gdb/testsuite/ChangeLog commit 4a612d6f67d605f480ce7eec7fd9ca1cd1087b35 Author: Walfred Tedeschi Date: Tue Mar 7 13:53:41 2017 +0100 amd64-mpx: initialize BND register before performing inferior calls. This patch initializes the BND registers before executing the inferior call. BND registers can be in arbitrary values at the moment of the inferior call. In case the function being called uses as part of the parameters BND register, e.g. when passing a pointer as parameter, the current value of the register will be used. This can cause boundary violations that are not due to a real bug or even desired by the user. In this sense the best to be done is set the BND registers to allow access to the whole memory, i.e. initialized state, before pushing the inferior call. 2017-03-07 Walfred Tedeschi gdb/ChangeLog: * i387-tdep.h (i387_reset_bnd_regs): Add function definition. * i387-tdep.c (i387_reset_bnd_regs): Add function implementation. * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs. * amd64-tdep (amd64_push_dummy_call): Call i387_reset_bnd_regs. gdb/testsuite/ChangeLog: * i386-mpx-call.c: New file. * i386-mpx-call.exp: New file. gdb/doc/ChangeLog: * Memory Protection Extensions: Add information about inferior calls. commit ea86f5344298e24801c262d9b52afcc9cb692959 Author: Alan Modra Date: Tue Mar 7 19:39:32 2017 +1030 Correct @section placement for makeinfo 4.13 * doc/as.texinfo (2byte, 4byte, 8byte): Correct @section placement. commit 2b841ec2066db4870beaa5298feb02f5e20faf7b Author: Alan Modra Date: Tue Mar 7 16:46:36 2017 +1030 Document .Nbyte assembler directives * doc/as.texinfo (2byte, 4byte, 8byte): Document. * doc/c-arm.texi (2byte, 4byte, 8byte): Omit if ELF. commit d933941d6c5ce5b2dcaaa869919b6f3de06b725d Author: Alan Modra Date: Tue Mar 7 12:20:00 2017 +1030 Fix ld uninitialized read of script ASSERT data structure lang_assignment_statement serves both assignments and asserts. * ldlang.c (open_input_bfds): Check that lang_assignment_statement is not an assert before referencing defsym. commit b1b07054c08eea65ba8d1a9f771796d686f337e5 Author: Alan Modra Date: Tue Mar 7 11:04:19 2017 +1030 PowerPC64 abort due to dynamic relocs on hidden undefweak ppc64_elf_relocate_section lacked a check which meant that it emitted dynamic relocs against a hidden undefweak symbol for which no dynamic relocs had been allocated. PR 21224 PR 20519 * elf64-ppc.c (ppc64_elf_relocate_section): Add missing dyn_relocs check. commit bb98f85480da563f4f6438abdabb68a69bc746b8 Author: GDB Administrator Date: Tue Mar 7 00:00:39 2017 +0000 Automatic date update in version.in commit 603555e563725616246912711419637add54c961 Author: H.J. Lu Date: Mon Mar 6 15:26:37 2017 -0800 Add support for Intel CET instructions Support Intel Control-flow Enforcement Technology (CET) instructions: https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf gas/ * config/tc-i386.c (cpu_arch): Add .cet. * doc/c-i386.texi: Document cet. * testsuite/gas/i386/cet-intel.d: New file. * testsuite/gas/i386/cet.d: Likewise. * testsuite/gas/i386/cet.s: Likewise. * testsuite/gas/i386/x86-64-cet-intel.d: Likewise. * testsuite/gas/i386/x86-64-cet.d: Likewise. * testsuite/gas/i386/x86-64-cet.s: Likewise. * testsuite/gas/i386/i386.exp: Run Intel CET tests. opcodes/ * i386-dis.c (REG_0F1E_MOD_3): New enum. (MOD_0F1E_PREFIX_1): Likewise. (MOD_0F38F5_PREFIX_2): Likewise. (MOD_0F38F6_PREFIX_0): Likewise. (RM_0F1E_MOD_3_REG_7): Likewise. (PREFIX_MOD_0_0F01_REG_5): Likewise. (PREFIX_MOD_3_0F01_REG_5_RM_1): Likewise. (PREFIX_MOD_3_0F01_REG_5_RM_2): Likewise. (PREFIX_0F1E): Likewise. (PREFIX_MOD_0_0FAE_REG_5): Likewise. (PREFIX_0F38F5): Likewise. (dis386_twobyte): Use PREFIX_0F1E. (reg_table): Add REG_0F1E_MOD_3. (prefix_table): Add PREFIX_MOD_0_0F01_REG_5, PREFIX_MOD_3_0F01_REG_5_RM_1, PREFIX_MOD_3_0F01_REG_5_RM_2, PREFIX_0F1E, PREFIX_MOD_0_0FAE_REG_5 and PREFIX_0F38F5. Update PREFIX_0FAE_REG_6 and PREFIX_0F38F6. (three_byte_table): Use PREFIX_0F38F5. (mod_table): Use PREFIX_MOD_0_0F01_REG_5, PREFIX_MOD_0_0FAE_REG_5. Add MOD_0F1E_PREFIX_1, MOD_0F38F5_PREFIX_2, MOD_0F38F6_PREFIX_0. (rm_table): Add MOD_0F38F5_PREFIX_2, MOD_0F38F6_PREFIX_0, RM_0F1E_MOD_3_REG_7. Use PREFIX_MOD_3_0F01_REG_5_RM_1 and PREFIX_MOD_3_0F01_REG_5_RM_2. * i386-gen.c (cpu_flag_init): Add CPU_CET_FLAGS. (cpu_flags): Add CpuCET. * i386-opc.h (CpuCET): New enum. (CpuUnused): Commented out. (i386_cpu_flags): Add cpucet. * i386-opc.tbl: Add Intel CET instructions. * i386-init.h: Regenerated. * i386-tbl.h: Likewise. commit 1cccfb31f5ba0dbc1cd3c679daf2f5b40252c6e0 Author: H.J. Lu Date: Mon Mar 6 15:00:52 2017 -0800 Update x86-64-mpx-inval-2 test for COFF Assembler displays upper case hex numbers and we need to force a good alignment to avoid matching NOPs at the end. * testsuite/gas/i386/x86-64-mpx-inval-2.s: Force a good alignment. * testsuite/gas/i386/x86-64-mpx-inval-2.l: Expect [0-9A-F]+. commit d274ecf4ddf76768af57e27f654b9ce6784b391c Author: Simon Marchi Date: Mon Mar 6 16:06:42 2017 -0500 Remove const in xtensa-linux-nat.c:fetch_gregs Fixes: /home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c: In function 'void fetch_gregs(regcache*, ptid_t, int)': /home/emaisin/src/binutils-gdb/gdb/xtensa-linux-nat.c:178:23: error: uninitialized const 'regs' [-fpermissive] const gdb_gregset_t regs; ^ gdb/ChangeLog: * xtensa-linux-nat.c (fetch_gregs): Remove const. commit 79a964dca572024447adf92e50959dc88aa4f27a Author: Nick Clifton Date: Mon Mar 6 17:21:04 2017 +0000 Fix reading numeric values from GNU BUILD NOTEs. * readelf.c (print_gnu_build_attribute_name): Read byte values from the name string as unsigned bytes. (process_notes_at): Use memcpy to copy an unterminated name string. commit 73f07bffaf8d423295a38dde51dfe6ec7b273280 Author: Alan Modra Date: Mon Mar 6 19:39:34 2017 +1030 Don't decode powerpc insns with invalid fields Certain insns have restrictions on fields. For example, the insn mentioned in the PR, lqarx, must specify an even general purpose register as its destination and that register cannot appear in either of the base or index reg fields. This holds even when the RA0 field is 0 (meaning a zero rather than r0). PR 21124 * ppc-opc.c (extract_esync, extract_ls, extract_ral, extract_ram) (extract_raq, extract_ras, extract_rbx): New functions. (powerpc_operands): Use opposite corresponding insert function. (Q_MASK): Define. (powerpc_opcodes): Apply Q_MASK to all quad insns with even register restriction. commit ea0de82ec2d7f109ba179d8d55130805e680f02d Author: Alan Modra Date: Sun Mar 5 23:25:16 2017 +1030 dw2gencfi.c DWARF2_FDE_RELOC_SIZE Add asserts that reloc size matches encoding size, and tidy. * dw2gencfi.c (encoding_size): Return unsigned int. (emit_expr_encoded): Assert size matches reloc bitsize. (output_fde): Use unsigned for offset_size and addr_size. Set addr_size earlier and use in place of constant 4 and uses of DWARF2_FDE_RELOC_SIZE. Assert it matches reloc bitsize. commit 9e1a8675d49a5bbb881f664f8b7a1081432c994d Author: Alan Modra Date: Sun Mar 5 22:55:29 2017 +1030 gas/dw2gencfi.c formatting * dw2gencfi.c: Wrap overlong lines. Add parens for emacs auto reformat. Formatting and whitespace fixes. commit 1f5345a614203185f7fdacbf4b000d2676de26dd Author: Sam Thursfield Date: Fri Mar 3 14:14:35 2017 +0000 binutils: Fix warning on platforms that don't have asprintf * configure.ac (AC_CHECK_DECLS): Add asprintf. * config.in: Regenerate. * configure: Regenerate. commit 62e755d208d7359e722a248df3e74278779272c8 Author: GDB Administrator Date: Mon Mar 6 00:00:34 2017 +0000 Automatic date update in version.in commit 49fced1206db40c71208c201165d65f92c69cebe Author: Mark Wielaard Date: Sun Mar 5 23:37:54 2017 +0100 gas: Emit name, comp_dir and producer strings in .debug_str. Putting the name, comp_dir and producer strings in the .debug_str section makes it possible to share them across CUs. This saves a small amount of space (about ~20K on a glibc libc.so.6 build with debuginfo). And makes it easier for tools like rpm debugedit to adjust the source paths when generating separate debuginfo files. gas/ * dwarf2dbg.c (out_debug_abbrev): Use DW_FORM_strp instead of DW_FORM_string for DW_AT_name, DW_AT_comp_dir and DW_AT_producer. (out_debug_info): Accept symbols to name, comp_dir and producer in the .debug_str section and emit those offsets not full strings. (out_debug_str): New function that outputs the strings for name, comp_dir and producer in .debug_str and generates symbols to those strings. (out_debug_line): Create a .debug_str section if necessary and call out_debug_str before calling out_debug_info. * testsuite/gas/aarch64/dwarf.d: Add extra section symbol to expected output. commit 2e0ce1c84d328bde4dca24b7cfc8b9c033ed271c Author: Alan Modra Date: Sun Mar 5 14:49:54 2017 +1030 Align eh_frame FDEs according to their encoding bfd/ * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8. * elf-eh-frame.c (size_of_output_cie_fde): Don't align here. (next_cie_fde_offset): New function. (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8. (_bfd_elf_discard_section_eh_frame): Align zero terminator to four bytes. Align CIEs to four or eight bytes depending on per_encoding_aligned8. Align FDEs according to their encoding. Pad last FDE to output section alignment. (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove assertion. * elf64-ppc.c (glink_eh_frame_cie): Delete padding. (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c. (ppc64_elf_finish_dynamic_sections): Adjust to suit. ld/ * testsuite/ld-elf/eh3.d: Adjust for eh_frame alignment change. * testsuite/ld-elf/eh6.d: Likewise. * testsuite/ld-alpha/tlsbin.dd: Likewise. * testsuite/ld-alpha/tlsbin.td: Likewise. * testsuite/ld-alpha/tlsbinr.dd: Likewise. * testsuite/ld-alpha/tlspic.dd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-alpha/tlspic.sd: Likewise. * testsuite/ld-alpha/tlspic.td: Likewise. * testsuite/ld-mips-elf/eh-frame1-n64.d: Likewise. * testsuite/ld-mips-elf/eh-frame2-n64.d: Likewise. * testsuite/ld-mips-elf/eh-frame3.d: Likewise. * testsuite/ld-x86-64/pr20830a.d: Likewise. * testsuite/ld-x86-64/pr21038a.d: Likewise. * testsuite/ld-x86-64/pr21038b.d: Likewise. * testsuite/ld-x86-64/pr21038c.d: Likewise. commit 0792e0e1199e76dce19a0f9fbdb29c75b8be8a9b Author: GDB Administrator Date: Sun Mar 5 00:00:22 2017 +0000 Automatic date update in version.in commit 921ea8830c62bf4a60af1783bdd443fd43286359 Author: GDB Administrator Date: Sat Mar 4 00:00:25 2017 +0000 Automatic date update in version.in commit 8ecbe595e69a84a0e3053884832d63af37113680 Author: Jim Wilson Date: Fri Mar 3 13:10:45 2017 -0800 Fix umulh and smulh bugs. Fix bugs in last week's sumov.s testsuite. sim/aarch64/ * simulator.c (mul64hi): Shift carry left by 32. (smulh): Change signum to negate. If negate, invert result, and add carry bit if low part of multiply result is zero. sim/testsuite/sim/aarch64/ * sumov.s: Correct compare test values. * sumulh.s: New. commit df97be551faa262732128493c8ac159ae4b7f6d3 Author: Simon Marchi Date: Fri Mar 3 12:58:24 2017 -0500 Use range-based for loop in remote_add_target_side_commands gdb/ChangeLog: * remote.c (remote_add_target_side_commands): Use range-based for loop. commit 7d45f3df96ca108f6d7d0c5e4279e22b820145fa Author: Yao Qi Date: Fri Mar 3 17:16:19 2017 +0000 Fetch lazy value before calling val_print As reported in PR 21165, (gdb) info locals^M gv = /home/yao/SourceCode/gnu/gdb/git/gdb/value.c:372: internal-error: int value_bits_any_optimized_out(const value*, int, int): Assertion `!value->lazy' failed.^M A problem internal to GDB has been detected,^M further debugging may prove unreliable.^M Quit this debugging session? (y or n) FAIL: gdb.ada/info_locals_renaming.exp: info locals (GDB internal error) Resyncing due to internal error. This internal error is caused by e8b24d9 (Remove parameter valaddr from la_val_print). Commit e8b24d9 removes some calls to value_contents_for_printing, but value_fetch_lazy is not called, so the internal error above is triggered. This patch adds value_fetch_lazy call before val_print. gdb: 2017-03-03 Yao Qi PR gdb/21165 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if value is lazy. * valprint.c (common_val_print): Likewise. commit 611a3ca929d6529f4e7576b0e2ffb588839c1b21 Author: Nick Clifton Date: Fri Mar 3 11:35:03 2017 +0000 Make the linker fail if asked to create more than 1^16 ordinal values for PE targets. PR 12969 * pe-dll.c (generate_edata): Fail if the input file(s) require too many ordinals. commit d20928fac9ab65449db910bd99a0f48ad29fb22b Author: Nick Clifton Date: Fri Mar 3 10:22:16 2017 +0000 Fix thinko in previous changelog entry. PR ld/21212 * elf.c (rewrite_elf_program_header): Do not issue a warning for empty segments which have a zero filesz, but a non-zero memsz. commit b565cf21c80945d5e9baa6871653aae5add2d493 Author: GDB Administrator Date: Fri Mar 3 00:00:23 2017 +0000 Automatic date update in version.in commit 05ed43104ef2c3f75779438111e2913dbd4555a6 Author: Nick Clifton Date: Thu Mar 2 17:10:20 2017 +0000 Support merging build notes in sections without the SHF_GNU_BUILD_NOTE flag set. * objcopy.c (is_merged_note_section): Support build note sections without the SHF_GNU_BUILD_NOTE section flag set. commit f98450c6eee6878ebf5b052d231758026d250427 Author: Nick Clifton Date: Thu Mar 2 14:47:29 2017 +0000 Disable warning message about a program header with no associated sections when that header's file size is non-zero. PR ld/21212 * elf.c (rewrite_elf_program_header): Do not issue a warning for empty segments which have a non-zero filesz. commit c871dadee1817d4b9f3ba6ee792730c9eccf88e0 Author: Nick Clifton Date: Thu Mar 2 10:52:51 2017 +0000 Fix snafu parsing GNU_BUILD_NOTEs on ARM and AArch64 architectures. * readelf.c (print_gnu_build_attribute_description): Use global symbols for OPEN attributes if at all possible. commit b451e98a909e1a6afa71c4a4655adc4cfeea5249 Author: Jan Kratochvil Date: Thu Mar 2 10:58:19 2017 +0100 New debug_displays_assert binutils/ 2017-03-02 Jan Kratochvil * dwarf.c (debug_displays_assert): New static assertion. commit d4620bee57be53f7a6b14c01b2ea22d22a61bef0 Author: Jan Kratochvil Date: Thu Mar 2 10:06:00 2017 +0100 Fix dwarf_section_display_enum regression by DWARF-5 binutils/ 2017-03-02 Jan Kratochvil * dwarf.h (enum dwarf_section_display_enum): Add loclists and rnglists. commit 9875b36538d35f2292ddc3bb5e7c60e1582aa087 Author: Maciej W. Rozycki Date: Thu Mar 2 01:24:15 2017 +0000 GAS: Fix bogus "attempt to move .org backwards" relaxation errors Fix a commit 6afe8e98a664 ("internal error for backwards .org"), , GAS regression that caused legitimate code to fail assembly with an "attempt to move .org backwards" error. For example with the `mips-linux' target we get: $ cat org.s .set mips16 la $2, foo .org 0x1000 .align 2 foo: .half 0 $ as -o org.o org.s org.s: Assembler messages: org.s:3: Error: attempt to move .org backwards $ where the location pointer is obviously not moved backwards with `.org'. The cause is positive `stretch' in relaxation due to a PC-relative ADDIU instruction (produced from the LA macro used) getting expanded from 2 to 4 bytes as `foo' is noticed to be out of range for the short encoding. This in turn triggers logic in `relax_segment' which concludes in the processing of an `rs_org' frag produced that the location pointer is moved backwards while in fact only the amount to space forward to the location requested has shrunk, resulting in a negative growth of the frag. Correct the bad logic then and instead verify that the fixed part of an `rs_org' frag has not overrun the location requested, as per the comment already included with the error message: /* Growth may be negative, but variable part of frag cannot have fewer than 0 chars. That is, we can't .org backwards. */ which accurately describes the regression scenario. Move the comment ahead the conditional noted, for clarity. Add generic and MIPS test cases for the `.org' pseudo-op, including the test case discussed though not integrated with the offending commit in particular, adjusted to work across all targets. gas/ * write.c (relax_segment) : Only bail out if the fixed part of the frag has overrun the location requested. * testsuite/gas/all/org-1.d: New test. * testsuite/gas/all/org-2.d: New test. * testsuite/gas/all/org-3.d: New test. * testsuite/gas/all/org-4.d: New test. * testsuite/gas/all/org-5.d: New test. * testsuite/gas/all/org-6.d: New test. * testsuite/gas/all/org-1.l: New stderr output. * testsuite/gas/all/org-2.l: New stderr output. * testsuite/gas/all/org-3.l: New stderr output. * testsuite/gas/all/org-1.s: New test source. * testsuite/gas/all/org-2.s: New test source. * testsuite/gas/all/org-3.s: New test source. * testsuite/gas/all/org-4.s: New test source. * testsuite/gas/all/org-5.s: New test source. * testsuite/gas/all/org-6.s: New test source. * testsuite/gas/all/gas.exp: Run the new tests. * testsuite/gas/mips/org-1.d: New test. * testsuite/gas/mips/org-2.d: New test. * testsuite/gas/mips/org-3.d: New test. * testsuite/gas/mips/org-4.d: New test. * testsuite/gas/mips/org-5.d: New test. * testsuite/gas/mips/org-6.d: New test. * testsuite/gas/mips/org-7.d: New test. * testsuite/gas/mips/org-8.d: New test. * testsuite/gas/mips/org-9.d: New test. * testsuite/gas/mips/org-10.d: New test. * testsuite/gas/mips/org-11.d: New test. * testsuite/gas/mips/org-12.d: New test. * testsuite/gas/mips/org-1.l: New stderr output. * testsuite/gas/mips/org-4.l: New stderr output. * testsuite/gas/mips/org-5.l: New stderr output. * testsuite/gas/mips/org-6.l: New stderr output. * testsuite/gas/mips/org-10.l: New stderr output. * testsuite/gas/mips/org-1.s: New test source. * testsuite/gas/mips/org-2.s: New test source. * testsuite/gas/mips/org-3.s: New test source. * testsuite/gas/mips/org-4.s: New test source. * testsuite/gas/mips/org-5.s: New test source. * testsuite/gas/mips/org-6.s: New test source. * testsuite/gas/mips/org-7.s: New test source. * testsuite/gas/mips/org-8.s: New test source. * testsuite/gas/mips/org-9.s: New test source. * testsuite/gas/mips/org-10.s: New test source. * testsuite/gas/mips/org-11.s: New test source. * testsuite/gas/mips/org-12.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. commit 673cff9b8b3105f74ce97c202a0727f9e83e56e6 Author: Alan Modra Date: Thu Mar 2 10:24:14 2017 +1030 PowerPC VLE typo fix * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo. commit 199add01b6704e1cd8a48945bd775fbe8524fa75 Author: Alan Modra Date: Thu Mar 2 10:23:42 2017 +1030 Avoid gcc-7 warning killing ld testcases * testsuite/ld-elf/shared.exp: Pass -ansi when compiling new.cc and dl3.cc. commit ecd78df2707734ccb2d0f6e5426321fa399befaa Author: GDB Administrator Date: Thu Mar 2 00:00:42 2017 +0000 Automatic date update in version.in commit 134e805d3e18cf700a5046912b8dca9301fe6f2e Author: Nick Clifton Date: Wed Mar 1 15:09:29 2017 +0000 Sync libiberty sources with GCC mainline. Brings in: 2017-01-18 Markus Trippelsdorf PR PR c++/70182 * cp-demangle.c (d_unqualified_name): Handle "on" for operator names. * testsuite/demangle-expected: Add tests. 2017-01-18 Markus Trippelsdorf PR c++/77489 * cp-demangle.c (d_discriminator): Handle discriminator >= 10. * testsuite/demangle-expected: Add tests for discriminator. 2016-12-13 Jakub Jelinek PR c++/78761 * cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto). * testsuite/demangle-expected: Add test for decltype(auto). commit 01cca2f95e4a448cbfb7dc940cc38fe89300b15f Author: Szabolcs Nagy Date: Wed Mar 1 14:51:13 2017 +0000 [AArch64] Document +rcpc weak release consistency extension gas/ * doc/c-aarch64.texi (AArch64 Extensions): Document rcpc. commit 9ef920e933bf2ea228c909cf81636e6d9577e51e Author: Nick Clifton Date: Wed Mar 1 11:09:46 2017 +0000 Add support for displaying and merging GNU_BUILD_NOTEs. include * elf/common.h (SHF_GNU_BUILD_NOTE): Define. (NT_GNU_PROPERTY_TYPE_0): Define. (NT_GNU_BUILD_ATTRIBUTE_OPEN): Define. (NT_GNU_BUILD_ATTRIBUTE_FUN): Define. (GNU_BUILD_ATTRIBUTE_TYPE_NUMERIC): Define. (GNU_BUILD_ATTRIBUTE_TYPE_STRING): Define. (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_TRUE): Define. (GNU_BUILD_ATTRIBUTE_TYPE_BOOL_FALSE): Define. (GNU_BUILD_ATTRIBUTE_VERSION): Define. (GNU_BUILD_ATTRIBUTE_STACK_PROT): Define. (GNU_BUILD_ATTRIBUTE_RELRO): Define. (GNU_BUILD_ATTRIBUTE_STACK_SIZE): Define. (GNU_BUILD_ATTRIBUTE_TOOL): Define. (GNU_BUILD_ATTRIBUTE_ABI): Define. (GNU_BUILD_ATTRIBUTE_PIC): Define. (NOTE_GNU_PROPERTY_SECTION_NAME): Define. (GNU_BUILD_ATTRS_SECTION_NAME): Define. (GNU_PROPERTY_STACK_SIZE): Define. (GNU_PROPERTY_NO_COPY_ON_PROTECTED): Define. (GNU_PROPERTY_X86_ISA_1_USED): Define. (GNU_PROPERTY_X86_ISA_1_NEEDED): Define. (GNU_PROPERTY_X86_ISA_1_486): Define. (GNU_PROPERTY_X86_ISA_1_586): Define. (GNU_PROPERTY_X86_ISA_1_686): Define. (GNU_PROPERTY_X86_ISA_1_SSE): Define. (GNU_PROPERTY_X86_ISA_1_SSE2): Define. (GNU_PROPERTY_X86_ISA_1_SSE3): Define. (GNU_PROPERTY_X86_ISA_1_SSSE3): Define. (GNU_PROPERTY_X86_ISA_1_SSE4_1): Define. (GNU_PROPERTY_X86_ISA_1_SSE4_2): Define. (GNU_PROPERTY_X86_ISA_1_AVX): Define. (GNU_PROPERTY_X86_ISA_1_AVX2): Define. (GNU_PROPERTY_X86_ISA_1_AVX512F): Define. (GNU_PROPERTY_X86_ISA_1_AVX512CD): Define. (GNU_PROPERTY_X86_ISA_1_AVX512ER): Define. (GNU_PROPERTY_X86_ISA_1_AVX512PF): Define. (GNU_PROPERTY_X86_ISA_1_AVX512VL): Define. (GNU_PROPERTY_X86_ISA_1_AVX512DQ): Define. (GNU_PROPERTY_X86_ISA_1_AVX512BW): Define. binutils* readelf.c (get_note_type): Add support for GNU_BUILD_NOTEs. (get_gnu_elf_note_type): Add support for GNU_PROPERTY_NOTEs. (decode_x86_isa): New function. (print_gnu_property_note): New function. (print_gnu_note): Handle GNU_PROPERTY_NOTEs. (print_gnu_build_attribute_description): New function. (print_gnu_build_attribute_name): New function. (process_note): Add support for GNU_BUILD_NOTEs. * objcopy.c (--merge-notes): New command line option. (copy_options): Add merge-notes. (copy_usage): Likewise. (is_merge_note_section): New function. (merge_gnu_build_notes): New function. (copy_object): Merge note sections if asked to do so. (skip_section): Add skip_copy parameter. Add support for skipping merged note sections. (copy_relocations_in_section): Update call to skip_section. (copy_section): Likewise. (copy_main): Add support for merge-notes option. * doc/binutils.texi: Document the new option to objcopy. * NEWS: Mention the new feature. * testsuite/binutils-all/note-2-32.d: New test. Checks note merging on 32-bit targets. * testsuite/binutils-all/note-2-32.s: New test source file. * testsuite/binutils-all/note-2-64.d: New test. Like note-2-32.d but for 64-bit targets. * testsuite/binutils-all/note-2-64.s: New test source file. * testsuite/binutils-all/objcopy.exp: Run the new test. commit a7e8b06b8901309632fad842ffd7d90a81447c80 Author: GDB Administrator Date: Wed Mar 1 00:01:00 2017 +0000 Automatic date update in version.in commit 65b48a81404cb058c75c562f7dfdeb74f07eba72 Author: Peter Bergner Date: Tue Feb 28 12:32:07 2017 -0600 GDB: Add support for the new set/show disassembler-options commands. This commit adds support to GDB so that it can modify the disassembler-options value that is passed to the disassembler, similar to objdump's -M option. Currently, the only supported targets are ARM, PowerPC and S/390, but adding support for a new target(s) is not difficult. include/ * dis-asm.h (disasm_options_t): New typedef. (parse_arm_disassembler_option): Remove prototype. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (get_arm_regname_num_options): Likewise. (disassemble_init_s390): New prototype. (disassembler_options_powerpc): Likewise. (disassembler_options_arm): Likewise. (disassembler_options_s390): Likewise. (remove_whitespace_and_extra_commas): Likewise. (disassembler_options_cmp): Likewise. (next_disassembler_option): New inline function. (FOR_EACH_DISASSEMBLER_OPTION): New macro. opcodes/ * disassemble.c Include "safe-ctype.h". (disassemble_init_for_target): Handle s390 init. (remove_whitespace_and_extra_commas): New function. (disassembler_options_cmp): Likewise. * arm-dis.c: Include "libiberty.h". (NUM_ELEM): Delete. (regnames): Use long disassembler style names. Add force-thumb and no-force-thumb options. (NUM_ARM_REGNAMES): Rename from this... (NUM_ARM_OPTIONS): ...to this. Use ARRAY_SIZE. (get_arm_regname_num_options): Delete. (set_arm_regname_option): Likewise. (get_arm_regnames): Likewise. (parse_disassembler_options): Likewise. (parse_arm_disassembler_option): Rename from this... (parse_arm_disassembler_options): ...to this. Make static. Use new FOR_EACH_DISASSEMBLER_OPTION macro to scan over options. (print_insn): Use parse_arm_disassembler_options. (disassembler_options_arm): New function. (print_arm_disassembler_options): Handle updated regnames. * ppc-dis.c: Include "libiberty.h". (ppc_opts): Add "32" and "64" entries. (ppc_parse_cpu): Use ARRAY_SIZE and disassembler_options_cmp. (powerpc_init_dialect): Add break to switch statement. Use new FOR_EACH_DISASSEMBLER_OPTION macro. (disassembler_options_powerpc): New function. (print_ppc_disassembler_options): Use ARRAY_SIZE. Remove printing of "32" and "64". * s390-dis.c: Include "libiberty.h". (init_flag): Remove unneeded variable. (struct s390_options_t): New structure type. (options): New structure. (init_disasm): Rename from this... (disassemble_init_s390): ...to this. Add initializations for current_arch_mask and option_use_insn_len_bits_p. Remove init_flag. (print_insn_s390): Delete call to init_disasm. (disassembler_options_s390): New function. (print_s390_disassembler_options): Print using information from struct 'options'. * po/opcodes.pot: Regenerate. binutils/ * objdump.c (main): Use remove_whitespace_and_extra_commas. gdb/ * NEWS: Mention new set/show disassembler-options commands. * doc/gdb.texinfo: Document new set/show disassembler-options commands. * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h". (prospective_options): New static variable. (gdb_disassembler::gdb_disassembler): Initialize m_di.disassembler_options. (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options. (get_disassembler_options): New function. (set_disassembler_options): Likewise. (set_disassembler_options_sfunc): Likewise. (show_disassembler_options_sfunc): Likewise. (disassembler_options_completer): Likewise. (_initialize_disasm): Likewise. * disasm.h (get_disassembler_options): New prototype. (set_disassembler_options): Likewise. * gdbarch.sh (gdbarch_disassembler_options): New variable. (gdbarch_verify_disassembler_options): Likewise. * gdbarch.c: Regenerate. * gdbarch.h: Likewise. * arm-tdep.c (num_disassembly_options): Delete. (set_disassembly_style): Likewise. (arm_disassembler_options): New static variable. (set_disassembly_style_sfunc): Convert short style name into long option name. Call set_disassembler_options. (show_disassembly_style_sfunc): New function. (arm_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. (_initialize_arm_tdep): Delete regnames variable and update callers. (arm_disassembler_options): Initialize. (disasm_options): New variable. (num_disassembly_options): Rename from this... (num_disassembly_styles): ...to this. Compute by scanning through disasm_options. (valid_disassembly_styles): Initialize using disasm_options. Remove calls to parse_arm_disassembler_option, get_arm_regnames and set_arm_regname_option. Pass show_disassembly_style_sfunc to the "disassembler" setshow command. * rs6000-tdep.c (powerpc_disassembler_options): New static variable. (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. * s390-tdep.c (s390_disassembler_options): New static variable. (s390_gdbarch_init):all set_gdbarch_disassembler_options and set_gdbarch_verify_disassembler_options. gdb/testsuite/ * gdb.arch/powerpc-power.exp: Delete test. * gdb.arch/powerpc-power.s: Likewise. * gdb.disasm/disassembler-options.exp: New test. * gdb.arch/powerpc-altivec.exp: Likewise. * gdb.arch/powerpc-altivec.s: Likewise. * gdb.arch/powerpc-altivec2.exp: Likewise. * gdb.arch/powerpc-altivec2.s: Likewise. * gdb.arch/powerpc-altivec3.exp: Likewise. * gdb.arch/powerpc-altivec3.s: Likewise. * gdb.arch/powerpc-power7.exp: Likewise. * gdb.arch/powerpc-power7.s: Likewise. * gdb.arch/powerpc-power8.exp: Likewise. * gdb.arch/powerpc-power8.s: Likewise. * gdb.arch/powerpc-power9.exp: Likewise. * gdb.arch/powerpc-power9.s: Likewise. * gdb.arch/powerpc-vsx.exp: Likewise. * gdb.arch/powerpc-vsx.s: Likewise. * gdb.arch/powerpc-vsx2.exp: Likewise. * gdb.arch/powerpc-vsx2.s: Likewise. * gdb.arch/powerpc-vsx3.exp: Likewise. * gdb.arch/powerpc-vsx3.s: Likewise. * gdb.arch/arm-disassembler-options.exp: Likewise. * gdb.arch/powerpc-disassembler-options.exp: Likewise. * gdb.arch/s390-disassembler-options.exp: Likewise. commit 2979a883540d9ce6e41dd0509ea2a345de9cf050 Author: Nick Clifton Date: Tue Feb 28 16:54:16 2017 +0000 Revert "Add symbol called __nm_ to exported symbols created by dlltool." This reverts commit 47612ae91c5f2de8960df1d96adf225d2455123f. commit 3de43e7beb9839fa268a73be77de73a7b7cd97db Author: Alan Modra Date: Tue Feb 28 23:42:29 2017 +1030 PowerPC addpcis fix again In the last patch I said "The patch also fixes overflow checking". In fact, there wasn't anything wrong with the previous code. So, revert that change. The new checks are OK too, so this is just a tidy. * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change. (ppc64_elf_relocate_section): Likewise. commit 15c7c1d8a535000e94ed36f4259d0ede32001408 Author: Jan Beulich Date: Tue Feb 28 10:53:35 2017 +0100 x86: fix handling of 64-bit operand size VPCMPESTR{I,M} Just like REX.W affects operand size of the implicit rAX/rDX inputs to PCMPESTR{I,M}, VEX.W does for VPCMPESTR{I,M}. Allow Q or L suffixes on the instructions. Similarly the disassembler needs to be adjusted to no longer require VEX.W to be zero for the instructions to be valid, and to emit proper suffixes. Note, however, that this doesn't address the problem of there being no way to control (at least) {,E}VEX.W for 32- or 16-bit code. Nor does it address the problem of the many WIG instructions not getting properly disassembled when VEX.W=1. commit 4ef97a1b459849ad190244c36b36d45bdd078030 Author: Alan Modra Date: Tue Feb 28 10:38:51 2017 +1030 Nios2 dynobj handling fixes A number of places in elf32-nios.c created dynamic sections but didn't set the hash table dynobj. That meant we could have duplicate dynamic sections connected to a number of bfds, so size_dynamic_sections didn't properly discard or allocate contents. Also, the entire set of dynamic sections was created in check_relocs on seeing GOT relocs, when only .got related sections are needed, probably done to hide segfaults later in finish_dynamic_sections. The patch fixes these issues and makes the assembler emit errors when nios2 lacks the necessary pc-relative relocs for subtraction expressions, rather than silently generating bad code. eg. ld-elf/merge. I've also tidied uses of elf32_nios2_hash_table and elf_hash_table. bfd/ PR 20995 * elf32-nios2.c (nios2_elf32_relocate_section): Use htab rather than elf32_nios2_hash_table or elf_hash_table. (create_got_section): Likewise. (nios2_elf32_finish_dynamic_symbol): Likewise. (nios2_elf32_adjust_dynamic_symbol): Likewise. (nios2_elf32_size_dynamic_sections): Likewise. (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot vars. Use htab equivalents directly instead. Don't create all dynamic sections on needing just the GOT. Use a goto rather than a fall-through with reloc test. Ensure htab->dynobj is set when making dynamic sreloc section. (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab equivalent directly instead. Don't segfault on looking for .dynamic when dynamic sections have not been created. Don't segfault on .got.plt being discarded. (nios2_elf32_size_dynamic_sections): Delete plt and got vars. Don't set "relocs" on .rela.plt. Do handle .sbss. Delete fixme and another not so relevant comment. (nios2_elf_add_symbol_hook): Delete dynobj var. If not already set, set hash table dynobj on creating .sbss. gas/ * config/tc-nios2.h (TC_FORCE_RELOCATION_SUB_LOCAL): Define. ld/ * testsuite/ld-elf/merge.d: xfail for nios. commit 7ba71655a425ac44721f97cc0ad7922ca15bce43 Author: Alan Modra Date: Tue Feb 28 08:32:36 2017 +1030 PowerPC addpcis fix This came up because I was looking at ld/tmpdir/addpcis.o and noticed the odd addends on REL16DX_HA. They ought to both be -4. The error crept in due REL16DX_HA howto being pc-relative (as indeed it should be), and code at gas/write.c:1001 after this comment /* Make it pc-relative. If the back-end code has not selected a pc-relative reloc, cancel the adjustment we do later on all pc-relative relocs. */ *not* cancelling the pc-relative adjustment. So I've made a dummy non-relative split reloc so that the generic code handles this, rather than attempting to add hacks later in md_apply_fix which would not be very robust. Having the new internal reloc also makes it easy to support addpcis rx,sym@ha as an equivalent to addpcis rx,(sym-0f)@ha 0: The patch also fixes overflow checking, which must test whether the addi will overflow too since @l relocs don't have any overflow check. Lastly, since I was poking at md_apply_fix, I arranged to have the generic gas/write.c code emit errors for subtraction expressions where we lack reloc support. include/ * elf/ppc64.h (R_PPC64_16DX_HA): New. Expand fake reloc comment. * elf/ppc.h (R_PPC_16DX_HA): Likewise. bfd/ * reloc.c (BFD_RELOC_PPC_16DX_HA): New. * elf64-ppc.c (ppc64_elf_howto_raw ): New howto. (ppc64_elf_reloc_type_lookup): Translate new bfd reloc. (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA. (ppc64_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_howto_raw ): New howto. (ppc_elf_reloc_type_lookup): Translate new bfd reloc. (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. gas/ * config/tc-ppc.c (md_assemble): Use BFD_RELOC_PPC_16DX_HA for addpcis. (md_apply_fix): Remove fx_subsy check. Move code converting to pcrel reloc earlier and handle BFD_RELOC_PPC_16DX_HA. Remove code emiiting errors on seeing fx_pcrel set on unexpected relocs, as that is done now by the generic code via.. * config/tc-ppc.h (TC_FORCE_RELOCATION_SUB_LOCAL): ..this. Define. (TC_VALIDATE_FIX_SUB): Define. ld/ * testsuite/ld-powerpc/addpcis.d: Define ext1 and ext2 at limits of addpcis range. commit afbf7e8e3aa24152ad58e430c8d37d82e5751f1c Author: Alan Modra Date: Tue Feb 28 08:06:02 2017 +1030 Don't make dynamic .data.rel.ro SEC_READONLY I'd made this dynamic section read-only so a flag test distinguished it from .dynbss, but like any other .data.rel.ro section it really should be marked read-write. (It is read-only after relocation, not before.) When using the standard linker scripts this usually doesn't matter since the output section is among other read-write sections and not page aligned. However, it might matter in the extraordinary case of the dynamic section being the only .data.rel.ro section with the output section just happening to be page aligned and a multiple of a page in size. In that case the output section would be read-only, and live it its own read-only PT_LOAD segment, which is incorrect. * elflink.c (_bfd_elf_create_dynamic_sections): Don't make dynamic .data.rel.ro read-only. * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section rather than section flags when deciding where copy reloc goes. * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise. * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise. * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise. * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise. * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise. * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise. * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise. * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise. * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise. * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise. * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise. * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise. * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise. commit 0e39210161e7c547ab53afb86997303e24a42c0c Author: Maciej W. Rozycki Date: Tue Feb 28 00:14:08 2017 +0000 MIPS/BFD: Also handle `jalr $0, $25' with R_MIPS_JALR Interpret the `jalr $0, $25' instruction encoding with an R_MIPS_JALR relocation attached as an alias to `jr $25' and convert the jump to an equivalent branch where possible, consequently covering the MIPSr6 architecture for the purpose of this optimization too. bfd/ * elfxx-mips.c (mips_elf_perform_relocation): Also handle the `jalr $0, $25' instruction encoding. gas/ * testsuite/gas/mips/jalr4.s: Add `jalr $0, $25' instructions. * testsuite/gas/mips/jalr4.d: Adjust accordingly. Remove MIPSr6 encoding patterns. * testsuite/gas/mips/jalr4-n64.d: Likewise. * testsuite/gas/mips/mipsr6@jalr4.d: New test. * testsuite/gas/mips/mipsr6@jalr4-n32.d: New test. * testsuite/gas/mips/mipsr6@jalr4-n64.d: New test. ld/ * testsuite/ld-mips-elf/jalr4.dd: Adjust for `jalr $0, $25' instructions. * testsuite/ld-mips-elf/jalr4-r6.dd: New test. * testsuite/ld-mips-elf/mips-elf.exp: Run the new test. commit 279a558a4d0fad268738ec916628c9c12cfcaf5b Author: GDB Administrator Date: Tue Feb 28 00:00:25 2017 +0000 Automatic date update in version.in commit 9dfd0db952fc07dccebbc244df2a20a6eda14b2c Author: Jan Kratochvil Date: Mon Feb 27 23:22:53 2017 +0100 Fix compilation with GCC 4.4.7. binutils/ 2017-02-27 Jan Kratochvil Fix compilation with GCC 4.4.7. * dwarf.c (display_loclists_list, display_debug_rnglists_list): Initialize begin and end. ----------------------------------------------------------------------- Summary of changes: ChangeLog | 5 + bfd/ChangeLog | 163 +++ bfd/bfd-in2.h | 5 +- bfd/elf-bfd.h | 6 +- bfd/elf-eh-frame.c | 83 +- bfd/elf.c | 13 +- bfd/elf32-arm.c | 2 +- bfd/elf32-cris.c | 2 +- bfd/elf32-hppa.c | 2 +- bfd/elf32-i386.c | 2 +- bfd/elf32-metag.c | 2 +- bfd/elf32-microblaze.c | 2 +- bfd/elf32-nios2.c | 156 +-- bfd/elf32-or1k.c | 2 +- bfd/elf32-ppc.c | 116 ++- bfd/elf32-s390.c | 2 +- bfd/elf32-tic6x.c | 2 +- bfd/elf32-tilepro.c | 2 +- bfd/elf64-ppc.c | 123 ++- bfd/elf64-s390.c | 2 +- bfd/elf64-x86-64.c | 2 +- bfd/elflink.c | 9 +- bfd/elfnn-aarch64.c | 47 +- bfd/elfnn-riscv.c | 2 +- bfd/elfxx-aarch64.c | 8 +- bfd/elfxx-mips.c | 10 +- bfd/elfxx-sparc.c | 2 +- bfd/elfxx-tilegx.c | 2 +- bfd/libbfd.h | 5 +- bfd/reloc.c | 6 +- bfd/rs6000-core.c | 4 +- bfd/version.h | 2 +- binutils/ChangeLog | 155 ++- binutils/NEWS | 6 + binutils/config.in | 4 + binutils/configure | 10 + binutils/configure.ac | 2 +- binutils/dlltool.c | 20 +- binutils/doc/binutils.texi | 18 +- binutils/dwarf.c | 11 +- binutils/dwarf.h | 2 + binutils/objcopy.c | 397 +++++- binutils/objdump.c | 98 +- binutils/readelf.c | 722 +++++++++- binutils/testsuite/binutils-all/i386/pr21231a.d | 9 + binutils/testsuite/binutils-all/i386/pr21231a.s | 14 + binutils/testsuite/binutils-all/i386/pr21231b.d | 12 + binutils/testsuite/binutils-all/i386/pr21231b.s | 35 + binutils/testsuite/binutils-all/note-2-32.d | 17 + binutils/testsuite/binutils-all/note-2-32.s | 95 ++ binutils/testsuite/binutils-all/note-2-64.d | 17 + binutils/testsuite/binutils-all/note-2-64.s | 97 ++ binutils/testsuite/binutils-all/objcopy.exp | 5 + binutils/testsuite/binutils-all/x86-64/pr21231a.d | 9 + binutils/testsuite/binutils-all/x86-64/pr21231a.s | 14 + binutils/testsuite/binutils-all/x86-64/pr21231b.d | 12 + binutils/testsuite/binutils-all/x86-64/pr21231b.s | 35 + config.guess | 16 +- config.sub | 14 +- cpu/ChangeLog | 4 + cpu/or1kcommon.cpu | 5 + gas/ChangeLog | 274 ++++ gas/config/tc-aarch64.c | 12 +- gas/config/tc-arc.c | 18 +- gas/config/tc-arm.c | 7 +- gas/config/tc-i386.c | 160 ++- gas/config/tc-nios2.h | 8 + gas/config/tc-ppc.c | 126 +-- gas/config/tc-ppc.h | 16 + gas/config/tc-riscv.c | 32 +- gas/config/tc-riscv.h | 3 + gas/config/tc-s390.c | 6 +- gas/config/tc-xtensa.c | 20 +- gas/doc/as.texinfo | 47 + gas/doc/c-aarch64.texi | 2 + gas/doc/c-arm.texi | 6 +- gas/doc/c-i386.texi | 30 +- gas/dw2gencfi.c | 81 +- gas/dwarf2dbg.c | 65 +- gas/testsuite/gas/aarch64/dwarf.d | 7 +- gas/testsuite/gas/aarch64/tls.d | 4 +- gas/testsuite/gas/all/gas.exp | 28 + gas/testsuite/gas/all/org-1.d | 3 + gas/testsuite/gas/all/org-1.l | 2 + gas/testsuite/gas/all/org-1.s | 25 + gas/testsuite/gas/all/org-2.d | 2 + gas/testsuite/gas/all/org-2.l | 2 + gas/testsuite/gas/all/org-2.s | 9 + gas/testsuite/gas/all/org-3.d | 2 + gas/testsuite/gas/all/org-3.l | 2 + gas/testsuite/gas/all/org-3.s | 9 + gas/testsuite/gas/all/org-4.d | 5 + gas/testsuite/gas/all/org-4.s | 9 + gas/testsuite/gas/all/org-5.d | 5 + gas/testsuite/gas/all/org-5.s | 9 + gas/testsuite/gas/all/org-6.d | 5 + gas/testsuite/gas/all/org-6.s | 9 + gas/testsuite/gas/arc/nps400-11.d | 303 +++++ gas/testsuite/gas/arc/nps400-11.s | 308 +++++ gas/testsuite/gas/i386/cet-intel.d | 31 + gas/testsuite/gas/i386/cet.d | 29 + gas/testsuite/gas/i386/cet.s | 25 + gas/testsuite/gas/i386/i386.exp | 6 + gas/testsuite/gas/i386/ilp32/x86-64-avx-intel.d | 88 +- gas/testsuite/gas/i386/ilp32/x86-64-avx.d | 96 +- gas/testsuite/gas/i386/ilp32/x86-64-sse2avx.d | 12 +- gas/testsuite/gas/i386/ilp32/x86-64-sse4_2-intel.d | 4 + gas/testsuite/gas/i386/ilp32/x86-64-sse4_2.d | 12 +- gas/testsuite/gas/i386/pseudos.d | 66 + gas/testsuite/gas/i386/pseudos.s | 62 + gas/testsuite/gas/i386/x86-64-avx-intel.d | 88 +- gas/testsuite/gas/i386/x86-64-avx.d | 96 +- gas/testsuite/gas/i386/x86-64-avx.s | 4 + gas/testsuite/gas/i386/x86-64-cet-intel.d | 38 + gas/testsuite/gas/i386/x86-64-cet.d | 37 + gas/testsuite/gas/i386/x86-64-cet.s | 33 + gas/testsuite/gas/i386/x86-64-mpx-inval-2.l | 8 +- gas/testsuite/gas/i386/x86-64-mpx-inval-2.s | 3 + gas/testsuite/gas/i386/x86-64-pseudos.d | 66 + gas/testsuite/gas/i386/x86-64-pseudos.s | 62 + gas/testsuite/gas/i386/x86-64-sse2avx.d | 12 +- gas/testsuite/gas/i386/x86-64-sse2avx.s | 4 + gas/testsuite/gas/i386/x86-64-sse4_2-intel.d | 4 + gas/testsuite/gas/i386/x86-64-sse4_2.d | 12 +- gas/testsuite/gas/i386/x86-64-sse4_2.s | 4 + gas/testsuite/gas/mips/jalr4-n64.d | 21 +- gas/testsuite/gas/mips/jalr4.d | 15 +- gas/testsuite/gas/mips/jalr4.s | 6 + gas/testsuite/gas/mips/mips.exp | 13 + gas/testsuite/gas/mips/mipsr6@jalr4-n32.d | 5 + gas/testsuite/gas/mips/mipsr6@jalr4-n64.d | 57 + gas/testsuite/gas/mips/mipsr6@jalr4.d | 39 + gas/testsuite/gas/mips/org-1.d | 7 + gas/testsuite/gas/mips/org-1.l | 2 + gas/testsuite/gas/mips/org-1.s | 9 + gas/testsuite/gas/mips/org-10.d | 7 + gas/testsuite/gas/mips/org-10.l | 2 + gas/testsuite/gas/mips/org-10.s | 11 + gas/testsuite/gas/mips/org-11.d | 6 + gas/testsuite/gas/mips/org-11.s | 13 + gas/testsuite/gas/mips/org-12.d | 5 + gas/testsuite/gas/mips/org-12.s | 13 + gas/testsuite/gas/mips/org-2.d | 6 + gas/testsuite/gas/mips/org-2.s | 11 + gas/testsuite/gas/mips/org-3.d | 5 + gas/testsuite/gas/mips/org-3.s | 11 + gas/testsuite/gas/mips/org-4.d | 3 + gas/testsuite/gas/mips/org-4.l | 3 + gas/testsuite/gas/mips/org-4.s | 11 + gas/testsuite/gas/mips/org-5.d | 3 + gas/testsuite/gas/mips/org-5.l | 2 + gas/testsuite/gas/mips/org-5.s | 13 + gas/testsuite/gas/mips/org-6.d | 2 + gas/testsuite/gas/mips/org-6.l | 2 + gas/testsuite/gas/mips/org-6.s | 13 + gas/testsuite/gas/mips/org-7.d | 6 + gas/testsuite/gas/mips/org-7.s | 11 + gas/testsuite/gas/mips/org-8.d | 6 + gas/testsuite/gas/mips/org-8.s | 13 + gas/testsuite/gas/mips/org-9.d | 5 + gas/testsuite/gas/mips/org-9.s | 13 + gas/testsuite/gas/ppc/altivec2.d | 4 +- gas/testsuite/gas/ppc/power9.d | 5 +- gas/testsuite/gas/ppc/power9.s | 1 + gas/write.c | 9 +- gdb/ChangeLog | 731 ++++++++++- gdb/Makefile.in | 4 +- gdb/NEWS | 17 + gdb/aarch64-linux-nat.c | 8 +- gdb/aarch64-tdep.c | 9 +- gdb/ada-lang.c | 2 +- gdb/ada-valprint.c | 3 + gdb/aix-thread.c | 14 +- gdb/alpha-bsd-nat.c | 12 +- gdb/amd64-linux-nat.c | 8 +- gdb/amd64-tdep.c | 9 +- gdb/amd64-windows-tdep.c | 1 + gdb/arm-linux-nat.c | 16 +- gdb/arm-nbsd-nat.c | 20 +- gdb/arm-tdep.c | 465 +++++-- gdb/ax-gdb.c | 2 + gdb/bsd-uthread.c | 20 +- gdb/c-exp.y | 6 +- gdb/c-typeprint.c | 22 +- gdb/c-valprint.c | 14 +- gdb/c-varobj.c | 10 +- gdb/common/environ.c | 182 +++ gdb/{ => common}/environ.h | 0 gdb/common/gdb_unlinker.h | 2 +- gdb/compile/compile-c-symbols.c | 2 +- gdb/completer.c | 3 +- gdb/config/powerpc/ppc64-linux.mh | 6 - gdb/corelow.c | 11 +- gdb/cp-name-parser.y | 22 +- gdb/cp-support.c | 3 +- gdb/darwin-nat-info.c | 2 +- gdb/disasm.c | 179 +++ gdb/disasm.h | 8 + gdb/doc/ChangeLog | 31 + gdb/doc/gdb.texinfo | 90 ++- gdb/doc/guile.texi | 2 +- gdb/doc/python.texi | 11 +- gdb/dwarf2loc.c | 103 +- gdb/dwarf2loc.h | 3 + gdb/dwarf2read.c | 40 +- gdb/environ.c | 182 --- gdb/eval.c | 16 +- gdb/f-exp.y | 2 +- gdb/f-typeprint.c | 6 +- gdb/findvar.c | 6 +- gdb/gdbarch.c | 52 + gdb/gdbarch.h | 9 + gdb/gdbarch.sh | 13 + gdb/gdbserver/ChangeLog | 238 ++++ gdb/gdbserver/Makefile.in | 532 +------- gdb/gdbtypes.c | 105 ++- gdb/gdbtypes.h | 20 +- gdb/guile/guile-internal.h | 2 + gdb/guile/scm-lazy-string.c | 119 ++- gdb/guile/scm-type.c | 15 +- gdb/guile/scm-value.c | 67 +- gdb/hppa-linux-nat.c | 15 +- gdb/hppa-nbsd-nat.c | 22 +- gdb/hppa-obsd-nat.c | 20 +- gdb/hppa-tdep.c | 1 + gdb/i386-bsd-nat.c | 37 +- gdb/i386-darwin-nat.c | 4 +- gdb/i386-gnu-nat.c | 12 +- gdb/i386-linux-nat.c | 29 +- gdb/i386-tdep.c | 7 + gdb/i387-tdep.c | 17 + gdb/i387-tdep.h | 4 + gdb/ia64-linux-nat.c | 20 +- gdb/inf-ptrace.c | 162 +-- gdb/infcall.c | 5 +- gdb/infcmd.c | 2 +- gdb/infrun.c | 196 ++-- gdb/language.c | 3 +- gdb/linespec.c | 8 + gdb/linux-nat.c | 45 +- gdb/m32c-tdep.c | 8 +- gdb/m32r-linux-nat.c | 14 +- gdb/m68k-bsd-nat.c | 22 +- gdb/m68k-linux-nat.c | 32 +- gdb/m88k-bsd-nat.c | 6 +- gdb/m88k-tdep.c | 1 + gdb/mi/mi-cmd-file.c | 57 + gdb/mi/mi-cmds.c | 2 + gdb/mi/mi-cmds.h | 1 + gdb/mi/mi-interp.c | 36 +- gdb/mi/mi-interp.h | 27 + gdb/mips-fbsd-nat.c | 22 +- gdb/mips-linux-nat.c | 9 +- gdb/mips-nbsd-nat.c | 22 +- gdb/mips64-obsd-nat.c | 11 +- gdb/mn10300-tdep.c | 1 + gdb/msp430-tdep.c | 2 +- gdb/nto-procfs.c | 7 +- gdb/parse.c | 41 +- gdb/parser-defs.h | 3 +- gdb/ppc-fbsd-nat.c | 20 +- gdb/ppc-linux-nat.c | 15 +- gdb/ppc-nbsd-nat.c | 20 +- gdb/ppc-obsd-nat.c | 20 +- gdb/ppc-sysv-tdep.c | 7 +- gdb/printcmd.c | 2 +- gdb/procfs.c | 14 +- gdb/python/lib/gdb/command/explore.py | 2 +- gdb/python/lib/gdb/printer/bound_registers.py | 7 + gdb/python/lib/gdb/types.py | 4 +- gdb/python/py-lazy-string.c | 117 ++- gdb/python/py-record-btrace.c | 5 + gdb/python/py-type.c | 14 +- gdb/python/py-value.c | 113 ++- gdb/python/py-xmethods.c | 10 +- gdb/ravenscar-thread.c | 15 +- gdb/record-btrace.c | 6 +- gdb/regcache.c | 10 + gdb/regcache.h | 4 + gdb/remote-sim.c | 6 +- gdb/remote.c | 16 +- gdb/rs6000-nat.c | 18 +- gdb/rs6000-tdep.c | 7 + gdb/s390-linux-nat.c | 5 +- gdb/s390-linux-tdep.c | 64 +- gdb/ser-base.c | 14 +- gdb/ser-mingw.c | 2 - gdb/ser-unix.c | 152 +-- gdb/serial.h | 5 - gdb/sh-nbsd-nat.c | 10 +- gdb/sol-thread.c | 14 +- gdb/solib-frv.c | 2 +- gdb/solib-svr4.c | 6 +- gdb/solib.c | 47 +- gdb/solib.h | 23 +- gdb/solist.h | 10 +- gdb/sparc-nat.c | 12 +- gdb/sparc-tdep.c | 1 + gdb/sparc-tdep.h | 1 + gdb/sparc64-tdep.c | 48 +- gdb/spu-linux-nat.c | 10 + gdb/spu-multiarch.c | 10 + gdb/spu-tdep.c | 1 + gdb/stabsread.c | 3 +- gdb/symtab.c | 3 +- gdb/target.c | 4 + gdb/testsuite/ChangeLog | 204 +++ .../gdb.arch/amd64-entry-value-param-dwarf5.exp | 24 +- gdb/testsuite/gdb.arch/amd64-entry-value-param.exp | 24 +- .../gdb.arch/arm-disassembler-options.exp | 56 + gdb/testsuite/gdb.arch/i386-mpx-call.c | 131 ++ gdb/testsuite/gdb.arch/i386-mpx-call.exp | 387 ++++++ gdb/testsuite/gdb.arch/i386-pkru.exp | 3 + gdb/testsuite/gdb.arch/powerpc-altivec.exp | 261 ++++ gdb/testsuite/gdb.arch/powerpc-altivec.s | 217 +++ gdb/testsuite/gdb.arch/powerpc-altivec2.exp | 178 +++ gdb/testsuite/gdb.arch/powerpc-altivec2.s | 135 ++ gdb/testsuite/gdb.arch/powerpc-altivec3.exp | 131 ++ gdb/testsuite/gdb.arch/powerpc-altivec3.s | 88 ++ .../gdb.arch/powerpc-disassembler-options.exp | 56 + gdb/testsuite/gdb.arch/powerpc-power.exp | 1429 -------------------- gdb/testsuite/gdb.arch/powerpc-power.s | 1389 ------------------- gdb/testsuite/gdb.arch/powerpc-power7.exp | 164 +++ gdb/testsuite/gdb.arch/powerpc-power7.s | 121 ++ gdb/testsuite/gdb.arch/powerpc-power8.exp | 248 ++++ gdb/testsuite/gdb.arch/powerpc-power8.s | 205 +++ gdb/testsuite/gdb.arch/powerpc-power9.exp | 445 ++++++ gdb/testsuite/gdb.arch/powerpc-power9.s | 402 ++++++ gdb/testsuite/gdb.arch/powerpc-vsx.exp | 225 +++ gdb/testsuite/gdb.arch/powerpc-vsx.s | 182 +++ gdb/testsuite/gdb.arch/powerpc-vsx2.exp | 118 ++ gdb/testsuite/gdb.arch/powerpc-vsx2.s | 75 + gdb/testsuite/gdb.arch/powerpc-vsx3.exp | 184 +++ gdb/testsuite/gdb.arch/powerpc-vsx3.s | 141 ++ .../gdb.arch/s390-disassembler-options.exp | 56 + gdb/testsuite/gdb.arch/sparc64-regs.S | 136 ++ gdb/testsuite/gdb.arch/sparc64-regs.exp | 118 ++ gdb/testsuite/gdb.base/break-fun-addr.exp | 4 +- gdb/testsuite/gdb.base/commands.exp | 40 + gdb/testsuite/gdb.base/completion.exp | 37 - gdb/testsuite/gdb.base/examine-backward.c | 8 + gdb/testsuite/gdb.base/step-over-exit.exp | 3 +- gdb/testsuite/gdb.base/tui-layout.exp | 40 - gdb/testsuite/gdb.btrace/gcore.exp | 3 +- gdb/testsuite/gdb.cp/demangle.exp | 42 +- gdb/testsuite/gdb.cp/m-static.exp | 4 +- gdb/testsuite/gdb.cp/rvalue-ref-casts.cc | 75 + gdb/testsuite/gdb.cp/rvalue-ref-casts.exp | 77 ++ gdb/testsuite/gdb.cp/rvalue-ref-overload.cc | 86 ++ gdb/testsuite/gdb.cp/rvalue-ref-overload.exp | 69 + gdb/testsuite/gdb.cp/rvalue-ref-params.cc | 83 ++ gdb/testsuite/gdb.cp/rvalue-ref-params.exp | 69 + gdb/testsuite/gdb.cp/rvalue-ref-sizeof.cc | 75 + gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp | 43 + gdb/testsuite/gdb.cp/rvalue-ref-types.cc | 79 ++ gdb/testsuite/gdb.cp/rvalue-ref-types.exp | 128 ++ gdb/testsuite/gdb.cp/templates.exp | 24 +- gdb/testsuite/gdb.disasm/disassembler-options.exp | 34 + gdb/testsuite/gdb.dwarf2/nonvar-access.exp | 28 +- gdb/testsuite/gdb.guile/scm-lazy-string.c | 29 + gdb/testsuite/gdb.guile/scm-lazy-string.exp | 82 ++ gdb/testsuite/gdb.guile/scm-value.c | 2 - gdb/testsuite/gdb.guile/scm-value.exp | 31 - gdb/testsuite/gdb.mi/mi-solib.exp | 49 +- gdb/testsuite/gdb.python/py-completion.exp | 6 +- gdb/testsuite/gdb.python/py-lazy-string.c | 5 + gdb/testsuite/gdb.python/py-lazy-string.exp | 42 +- gdb/testsuite/gdb.python/py-record-btrace.exp | 6 +- gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.cc | 59 + .../gdb.python/py-rvalue-ref-value-cc.exp | 57 + gdb/testsuite/gdb.python/py-value.c | 2 - gdb/testsuite/gdb.python/py-value.exp | 24 - .../attach-many-short-lived-threads.exp | 8 +- .../gdb.threads/interrupt-while-step-over.c | 75 + .../gdb.threads/interrupt-while-step-over.exp | 204 +++ .../signal-while-stepping-over-bp-other-thread.exp | 1 - gdb/testsuite/gdb.tui/completion.exp | 58 + .../tui-disasm-long-lines.c} | 0 gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp | 43 + gdb/testsuite/gdb.tui/tui-layout.c | 22 + gdb/testsuite/gdb.tui/tui-layout.exp | 56 + gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp | 57 + gdb/testsuite/lib/dwarf.exp | 3 +- gdb/testsuite/lib/gdb.exp | 60 +- gdb/testsuite/lib/mi-support.exp | 2 +- gdb/tilegx-linux-nat.c | 13 +- gdb/top.c | 10 +- gdb/tui/tui-file.c | 10 + gdb/tui/tui-file.h | 3 +- gdb/tui/tui-io.c | 114 +- gdb/tui/tui-io.h | 4 + gdb/tui/tui-regs.c | 1 - gdb/typeprint.c | 4 +- gdb/ui-out.c | 4 + gdb/valarith.c | 6 +- gdb/valops.c | 70 +- gdb/valprint.c | 8 +- gdb/value.c | 12 +- gdb/value.h | 2 +- gdb/varobj.c | 2 +- gdb/vax-bsd-nat.c | 11 +- gdb/windows-nat.c | 52 +- gdb/xtensa-linux-nat.c | 10 +- gold/ChangeLog | 57 + gold/mips.cc | 579 +++++--- include/ChangeLog | 115 ++ include/demangle.h | 9 +- include/dis-asm.h | 41 +- include/dwarf2.def | 3 + include/elf/aarch64.h | 4 +- include/elf/common.h | 87 +- include/elf/ppc.h | 6 +- include/elf/ppc64.h | 6 +- include/opcode/arc.h | 1 + include/opcode/s390.h | 3 +- ld/ChangeLog | 148 ++ ld/NEWS | 6 + ld/emulparams/elf32ppccommon.sh | 10 +- ld/emultempl/elf32.em | 153 ++- ld/ld.texinfo | 29 +- ld/ldlang.c | 72 +- ld/pe-dll.c | 55 +- ld/scripttempl/avrtiny.sc | 10 +- ld/testsuite/ld-aarch64/ifunc-5r-local.d | 4 +- ld/testsuite/ld-alpha/tlsbin.dd | 10 +- ld/testsuite/ld-alpha/tlsbin.td | 12 +- ld/testsuite/ld-alpha/tlsbinr.dd | 2 +- ld/testsuite/ld-alpha/tlspic.dd | 10 +- ld/testsuite/ld-alpha/tlspic.rd | 2 +- ld/testsuite/ld-alpha/tlspic.sd | 14 +- ld/testsuite/ld-alpha/tlspic.td | 12 +- ld/testsuite/ld-checks/checks.exp | 16 + ld/testsuite/ld-checks/over.d | 4 + ld/testsuite/ld-checks/over.s | 7 + ld/testsuite/ld-checks/over2.d | 8 + ld/testsuite/ld-checks/over2.s | 4 + ld/testsuite/ld-elf/eh3.d | 12 +- ld/testsuite/ld-elf/eh6.d | 2 +- ld/testsuite/ld-elf/merge.d | 2 +- ld/testsuite/ld-elf/orphan-10.d | 10 + ld/testsuite/ld-elf/orphan-10.s | 8 + ld/testsuite/ld-elf/orphan-9.d | 12 + ld/testsuite/ld-elf/orphan-9.ld | 32 + ld/testsuite/ld-elf/orphan-9.s | 11 + ld/testsuite/ld-elf/sec64k.exp | 6 +- ld/testsuite/ld-elf/shared.exp | 10 +- ld/testsuite/ld-mips-elf/eh-frame1-n64.d | 76 +- ld/testsuite/ld-mips-elf/eh-frame2-n64.d | 84 +- ld/testsuite/ld-mips-elf/eh-frame3.d | 46 +- ld/testsuite/ld-mips-elf/jalr4-r6.dd | 25 + ld/testsuite/ld-mips-elf/jalr4.dd | 10 +- ld/testsuite/ld-mips-elf/mips-elf.exp | 11 + ld/testsuite/ld-powerpc/addpcis.d | 8 +- ld/testsuite/ld-x86-64/pr20830a.d | 6 +- ld/testsuite/ld-x86-64/pr21038a.d | 6 +- ld/testsuite/ld-x86-64/pr21038b.d | 6 +- ld/testsuite/ld-x86-64/pr21038c.d | 6 +- ld/testsuite/lib/ld-lib.exp | 1 + libiberty/ChangeLog | 87 +- libiberty/cp-demangle.c | 87 +- libiberty/cp-demint.c | 3 + libiberty/testsuite/demangle-expected | 54 + opcodes/ChangeLog | 161 +++ opcodes/arc-nps400-tbl.h | 191 +++ opcodes/arc-opc.c | 82 ++- opcodes/arm-dis.c | 169 +-- opcodes/disassemble.c | 70 + opcodes/i386-dis.c | 145 ++- opcodes/i386-gen.c | 5 +- opcodes/i386-init.h | 119 +- opcodes/i386-opc.h | 12 +- opcodes/i386-opc.tbl | 183 ++- opcodes/i386-tbl.h | 923 +++++++++---- opcodes/po/opcodes.pot | 199 ++-- opcodes/ppc-dis.c | 63 +- opcodes/ppc-opc.c | 226 +++- opcodes/riscv-opc.c | 16 +- opcodes/s390-dis.c | 72 +- opcodes/s390-mkopc.c | 4 - opcodes/s390-opc.txt | 284 ++-- sim/aarch64/ChangeLog | 6 + sim/aarch64/simulator.c | 19 +- sim/testsuite/sim/aarch64/ChangeLog | 5 + sim/testsuite/sim/aarch64/sumov.s | 12 +- sim/testsuite/sim/aarch64/sumulh.s | 56 + 485 files changed, 18562 insertions(+), 7390 deletions(-) create mode 100644 binutils/testsuite/binutils-all/i386/pr21231a.d create mode 100644 binutils/testsuite/binutils-all/i386/pr21231a.s create mode 100644 binutils/testsuite/binutils-all/i386/pr21231b.d create mode 100644 binutils/testsuite/binutils-all/i386/pr21231b.s create mode 100644 binutils/testsuite/binutils-all/note-2-32.d create mode 100644 binutils/testsuite/binutils-all/note-2-32.s create mode 100644 binutils/testsuite/binutils-all/note-2-64.d create mode 100644 binutils/testsuite/binutils-all/note-2-64.s create mode 100644 binutils/testsuite/binutils-all/x86-64/pr21231a.d create mode 100644 binutils/testsuite/binutils-all/x86-64/pr21231a.s create mode 100644 binutils/testsuite/binutils-all/x86-64/pr21231b.d create mode 100644 binutils/testsuite/binutils-all/x86-64/pr21231b.s create mode 100644 gas/testsuite/gas/all/org-1.d create mode 100644 gas/testsuite/gas/all/org-1.l create mode 100644 gas/testsuite/gas/all/org-1.s create mode 100644 gas/testsuite/gas/all/org-2.d create mode 100644 gas/testsuite/gas/all/org-2.l create mode 100644 gas/testsuite/gas/all/org-2.s create mode 100644 gas/testsuite/gas/all/org-3.d create mode 100644 gas/testsuite/gas/all/org-3.l create mode 100644 gas/testsuite/gas/all/org-3.s create mode 100644 gas/testsuite/gas/all/org-4.d create mode 100644 gas/testsuite/gas/all/org-4.s create mode 100644 gas/testsuite/gas/all/org-5.d create mode 100644 gas/testsuite/gas/all/org-5.s create mode 100644 gas/testsuite/gas/all/org-6.d create mode 100644 gas/testsuite/gas/all/org-6.s create mode 100644 gas/testsuite/gas/arc/nps400-11.d create mode 100644 gas/testsuite/gas/arc/nps400-11.s create mode 100644 gas/testsuite/gas/i386/cet-intel.d create mode 100644 gas/testsuite/gas/i386/cet.d create mode 100644 gas/testsuite/gas/i386/cet.s create mode 100644 gas/testsuite/gas/i386/pseudos.d create mode 100644 gas/testsuite/gas/i386/pseudos.s create mode 100644 gas/testsuite/gas/i386/x86-64-cet-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-cet.d create mode 100644 gas/testsuite/gas/i386/x86-64-cet.s create mode 100644 gas/testsuite/gas/i386/x86-64-pseudos.d create mode 100644 gas/testsuite/gas/i386/x86-64-pseudos.s create mode 100644 gas/testsuite/gas/mips/mipsr6@jalr4-n32.d create mode 100644 gas/testsuite/gas/mips/mipsr6@jalr4-n64.d create mode 100644 gas/testsuite/gas/mips/mipsr6@jalr4.d create mode 100644 gas/testsuite/gas/mips/org-1.d create mode 100644 gas/testsuite/gas/mips/org-1.l create mode 100644 gas/testsuite/gas/mips/org-1.s create mode 100644 gas/testsuite/gas/mips/org-10.d create mode 100644 gas/testsuite/gas/mips/org-10.l create mode 100644 gas/testsuite/gas/mips/org-10.s create mode 100644 gas/testsuite/gas/mips/org-11.d create mode 100644 gas/testsuite/gas/mips/org-11.s create mode 100644 gas/testsuite/gas/mips/org-12.d create mode 100644 gas/testsuite/gas/mips/org-12.s create mode 100644 gas/testsuite/gas/mips/org-2.d create mode 100644 gas/testsuite/gas/mips/org-2.s create mode 100644 gas/testsuite/gas/mips/org-3.d create mode 100644 gas/testsuite/gas/mips/org-3.s create mode 100644 gas/testsuite/gas/mips/org-4.d create mode 100644 gas/testsuite/gas/mips/org-4.l create mode 100644 gas/testsuite/gas/mips/org-4.s create mode 100644 gas/testsuite/gas/mips/org-5.d create mode 100644 gas/testsuite/gas/mips/org-5.l create mode 100644 gas/testsuite/gas/mips/org-5.s create mode 100644 gas/testsuite/gas/mips/org-6.d create mode 100644 gas/testsuite/gas/mips/org-6.l create mode 100644 gas/testsuite/gas/mips/org-6.s create mode 100644 gas/testsuite/gas/mips/org-7.d create mode 100644 gas/testsuite/gas/mips/org-7.s create mode 100644 gas/testsuite/gas/mips/org-8.d create mode 100644 gas/testsuite/gas/mips/org-8.s create mode 100644 gas/testsuite/gas/mips/org-9.d create mode 100644 gas/testsuite/gas/mips/org-9.s create mode 100644 gdb/common/environ.c rename gdb/{ => common}/environ.h (100%) delete mode 100644 gdb/environ.c create mode 100644 gdb/mi/mi-interp.h create mode 100644 gdb/testsuite/gdb.arch/arm-disassembler-options.exp create mode 100644 gdb/testsuite/gdb.arch/i386-mpx-call.c create mode 100644 gdb/testsuite/gdb.arch/i386-mpx-call.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec2.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec2.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec3.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-altivec3.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-disassembler-options.exp delete mode 100644 gdb/testsuite/gdb.arch/powerpc-power.exp delete mode 100644 gdb/testsuite/gdb.arch/powerpc-power.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-power7.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-power8.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-power8.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-power9.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-power9.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx2.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx2.s create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx3.exp create mode 100644 gdb/testsuite/gdb.arch/powerpc-vsx3.s create mode 100644 gdb/testsuite/gdb.arch/s390-disassembler-options.exp create mode 100644 gdb/testsuite/gdb.arch/sparc64-regs.S create mode 100644 gdb/testsuite/gdb.arch/sparc64-regs.exp delete mode 100644 gdb/testsuite/gdb.base/tui-layout.exp create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-casts.cc create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-casts.exp create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-overload.cc create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-overload.exp create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-params.cc create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-params.exp create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-sizeof.cc create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-sizeof.exp create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-types.cc create mode 100644 gdb/testsuite/gdb.cp/rvalue-ref-types.exp create mode 100644 gdb/testsuite/gdb.disasm/disassembler-options.exp create mode 100644 gdb/testsuite/gdb.guile/scm-lazy-string.c create mode 100644 gdb/testsuite/gdb.guile/scm-lazy-string.exp create mode 100644 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.cc create mode 100644 gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp create mode 100644 gdb/testsuite/gdb.threads/interrupt-while-step-over.c create mode 100644 gdb/testsuite/gdb.threads/interrupt-while-step-over.exp create mode 100644 gdb/testsuite/gdb.tui/completion.exp rename gdb/testsuite/{gdb.base/tui-layout.c => gdb.tui/tui-disasm-long-lines.c} (100%) create mode 100644 gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp create mode 100644 gdb/testsuite/gdb.tui/tui-layout.c create mode 100644 gdb/testsuite/gdb.tui/tui-layout.exp create mode 100644 gdb/testsuite/gdb.tui/tui-nl-filtered-output.exp create mode 100644 ld/testsuite/ld-checks/over.d create mode 100644 ld/testsuite/ld-checks/over.s create mode 100644 ld/testsuite/ld-checks/over2.d create mode 100644 ld/testsuite/ld-checks/over2.s create mode 100644 ld/testsuite/ld-elf/orphan-10.d create mode 100644 ld/testsuite/ld-elf/orphan-10.s create mode 100644 ld/testsuite/ld-elf/orphan-9.d create mode 100644 ld/testsuite/ld-elf/orphan-9.ld create mode 100644 ld/testsuite/ld-elf/orphan-9.s create mode 100644 ld/testsuite/ld-mips-elf/jalr4-r6.dd create mode 100644 sim/testsuite/sim/aarch64/sumulh.s First 500 lines of diff: diff --git a/ChangeLog b/ChangeLog index c9a95fe..8565325 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-03-22 Nick Clifton + + * config.sub: Sync with master version in config project. + * config.guess: Likewise. + 2017-01-23 Nick Clifton * configure.ac: Update year in copyright notice. diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0f8d9ee..50e76c2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,166 @@ +2017-03-20 Alan Modra + + PR 21266 + * elf64-ppc.c (compare_symbols): Stabilize sort. + +2017-03-18 Alan Modra + + * elf64-ppc.c (struct ppc_link_hash_table): Add + local_ifunc_resolver and maybe_local_ifunc_resolver. + (ppc_build_one_stub): Set flags on emitting dynamic + relocation to ifunc. + (ppc64_elf_relocate_section): Likewise. + (ppc64_elf_finish_dynamic_symbol): Likewise. + (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with + local dynamic relocs to ifuncs. + * elf32-ppc.c (struct ppc_elf_link_hash_table): Add + local_ifunc_resolver and maybe_local_ifunc_resolver. + (ppc_elf_relocate_section): Set flag on emitting dynamic + relocation to ifuncs. + (ppc_elf_finish_dynamic_symbol): Likewise. + (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local + dynamic relocs to ifuncs. + +2017-03-13 Nick Clifton + + PR binutils/21202 + * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12. + (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc + names. + (IS_AARCH64_TLSDESC_RELOC): Likewise. + (elfNN_aarch64_howto_table): Likewise. + (aarch64_tls_transition_without_check): Likewise. + (aarch64_reloc_got_type): Likewise. + (elfNN_aarch64_final_link_relocate): Likewise. + (elfNN_aarch64_tls_relax): Likewise. + (elfNN_aarch64_relocate_section): Likewise. + (elfNN_aarch64_gc_sweep_hook): Likewise. + (elfNN_aarch64_check_relocs): Likewise. + * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise. + (_bfd_aarch64_elf_resolve_relocation): Likewise. + +2017-03-11 Alan Modra + + * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function + parameter is in fact used. Whitespace fixes. + * elf64-ppc.c: Likewise. + +2017-03-09 Sam Thursfield + + * rs6000-core.c (CORE_NEW): Simplify macro when + AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning. + +2017-03-07 Alan Modra + + PR 21224 + PR 20519 + * elf64-ppc.c (ppc64_elf_relocate_section): Add missing + dyn_relocs check. + +2017-03-05 Alan Modra + + * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8. + * elf-eh-frame.c (size_of_output_cie_fde): Don't align here. + (next_cie_fde_offset): New function. + (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8. + (_bfd_elf_discard_section_eh_frame): Align zero terminator to + four bytes. Align CIEs to four or eight bytes depending on + per_encoding_aligned8. Align FDEs according to their encoding. + Pad last FDE to output section alignment. + (_bfd_elf_write_section_eh_frame): Adjust to suit. Remove + assertion. + * elf64-ppc.c (glink_eh_frame_cie): Delete padding. + (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c. + (ppc64_elf_finish_dynamic_sections): Adjust to suit. + +2017-03-02 Martin Bickel + + PR ld/21212 + * elf.c (rewrite_elf_program_header): Do not issue a warning for + empty segments which have a zero filesz, but a non-zero memsz. + +2017-03-02 Alan Modra + + * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo. + +2017-02-28 Alan Modra + + * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change. + (ppc64_elf_relocate_section): Likewise. + +2017-02-28 Alan Modra + + PR 20995 + * elf32-nios2.c (nios2_elf32_relocate_section): Use htab + rather than elf32_nios2_hash_table or elf_hash_table. + (create_got_section): Likewise. + (nios2_elf32_finish_dynamic_symbol): Likewise. + (nios2_elf32_adjust_dynamic_symbol): Likewise. + (nios2_elf32_size_dynamic_sections): Likewise. + (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot + vars. Use htab equivalents directly instead. Don't create + all dynamic sections on needing just the GOT. Use a goto + rather than a fall-through with reloc test. Ensure + htab->dynobj is set when making dynamic sreloc section. + (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab + equivalent directly instead. Don't segfault on looking for + .dynamic when dynamic sections have not been created. Don't + segfault on .got.plt being discarded. + (nios2_elf32_size_dynamic_sections): Delete plt and got vars. + Don't set "relocs" on .rela.plt. Do handle .sbss. Delete + fixme and another not so relevant comment. + (nios2_elf_add_symbol_hook): Delete dynobj var. If not + already set, set hash table dynobj on creating .sbss. + +2017-02-28 Alan Modra + + * reloc.c (BFD_RELOC_PPC_16DX_HA): New. + * elf64-ppc.c (ppc64_elf_howto_raw ): New howto. + (ppc64_elf_reloc_type_lookup): Translate new bfd reloc. + (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA. + (ppc64_elf_relocate_section): Likewise. + * elf32-ppc.c (ppc_elf_howto_raw ): New howto. + (ppc_elf_reloc_type_lookup): Translate new bfd reloc. + (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + +2017-02-28 Alan Modra + + * elflink.c (_bfd_elf_create_dynamic_sections): Don't make + dynamic .data.rel.ro read-only. + * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section + rather than section flags when deciding where copy reloc goes. + * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise. + * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise. + * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise. + * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise. + * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise. + * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise. + * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise. + * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise. + * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. + * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise. + * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise. + * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise. + * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise. + * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise. + * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise. + * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise. + * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. + * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise. + +2017-02-28 Maciej W. Rozycki + + * elfxx-mips.c (mips_elf_perform_relocation): Also handle the + `jalr $0, $25' instruction encoding. + 2017-02-27 Nick Clifton PR ld/21180 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index f17813a..59403af 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3362,6 +3362,7 @@ instruction. */ BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A, BFD_RELOC_PPC_VLE_SDAREL_HA16D, + BFD_RELOC_PPC_16DX_HA, BFD_RELOC_PPC_REL16DX_HA, BFD_RELOC_PPC64_HIGHER, BFD_RELOC_PPC64_HIGHER_S, @@ -6155,13 +6156,13 @@ instructions. */ BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21, /* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC, + BFD_RELOC_AARCH64_TLSDESC_LD64_LO12, /* AArch64 TLS DESC relocation. */ BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC, /* AArch64 TLS DESC relocation. */ - BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC, + BFD_RELOC_AARCH64_TLSDESC_ADD_LO12, /* AArch64 TLS DESC relocation. */ BFD_RELOC_AARCH64_TLSDESC_OFF_G1, diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index f5a8d75..9e3d6f5 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -342,6 +342,10 @@ struct eh_cie_fde make_per_encoding_relative is. */ unsigned int per_encoding_relative : 1; + /* True if the CIE contains personality data aligned to a + multiple of eight bytes. */ + unsigned int per_encoding_aligned8 : 1; + /* True if we need to add an 'R' (FDE encoding) entry to the CIE's augmentation data. */ unsigned int add_fde_encoding : 1; @@ -350,7 +354,7 @@ struct eh_cie_fde unsigned int merged : 1; /* Unused bits. */ - unsigned int pad1 : 18; + unsigned int pad1 : 17; } cie; } u; unsigned int reloc_index; diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 1b03b9b..6967f37 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -309,11 +309,10 @@ extra_augmentation_data_bytes (struct eh_cie_fde *entry) return size; } -/* Return the size that ENTRY will have in the output. ALIGNMENT is the - required alignment of ENTRY in bytes. */ +/* Return the size that ENTRY will have in the output. */ static unsigned int -size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment) +size_of_output_cie_fde (struct eh_cie_fde *entry) { if (entry->removed) return 0; @@ -321,8 +320,22 @@ size_of_output_cie_fde (struct eh_cie_fde *entry, unsigned int alignment) return 4; return (entry->size + extra_augmentation_string_bytes (entry) - + extra_augmentation_data_bytes (entry) - + alignment - 1) & -alignment; + + extra_augmentation_data_bytes (entry)); +} + +/* Return the offset of the FDE or CIE after ENT. */ + +static unsigned int +next_cie_fde_offset (struct eh_cie_fde *ent, + struct eh_cie_fde *last, + asection *sec) +{ + while (++ent < last) + { + if (!ent->removed) + return ent->new_offset; + } + return sec->size; } /* Assume that the bytes between *ITER and END are CFA instructions. @@ -811,6 +824,8 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, { length = -(buf - ehbuf) & (per_width - 1); REQUIRE (skip_bytes (&buf, end, length)); + if (per_width == 8) + this_inf->u.cie.per_encoding_aligned8 = 1; } this_inf->u.cie.personality_offset = buf - start; ENSURE_NO_RELOCS (buf); @@ -1326,7 +1341,7 @@ _bfd_elf_discard_section_eh_frame struct eh_cie_fde *ent; struct eh_frame_sec_info *sec_info; struct eh_frame_hdr_info *hdr_info; - unsigned int ptr_size, offset; + unsigned int ptr_size, offset, eh_alignment; if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) return FALSE; @@ -1406,14 +1421,46 @@ _bfd_elf_discard_section_eh_frame sec_info->cies = NULL; } + /* It may be that some .eh_frame input section has greater alignment + than other .eh_frame sections. In that case we run the risk of + padding with zeros before that section, which would be seen as a + zero terminator. Alignment padding must be added *inside* the + last FDE instead. For other FDEs we align according to their + encoding, in order to align FDE address range entries naturally. */ offset = 0; for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent) if (!ent->removed) { + eh_alignment = 4; + if (ent->size == 4) + ; + else if (ent->cie) + { + if (ent->u.cie.per_encoding_aligned8) + eh_alignment = 8; + } + else + { + eh_alignment = get_DW_EH_PE_width (ent->fde_encoding, ptr_size); + if (eh_alignment < 4) + eh_alignment = 4; + } + offset = (offset + eh_alignment - 1) & -eh_alignment; ent->new_offset = offset; - offset += size_of_output_cie_fde (ent, ptr_size); + offset += size_of_output_cie_fde (ent); } + /* Pad the last FDE out to the output section alignment if there are + following sections, in order to ensure no padding between this + section and the next. (Relies on the output section alignment + being the maximum of all input sections alignments, which is the + case unless someone is overriding alignment via scripts.) */ + eh_alignment = 4; + if (sec->map_head.s != NULL + && (sec->map_head.s->size != 4 + || sec->map_head.s->map_head.s != NULL)) + eh_alignment = 1 << sec->output_section->alignment_power; + offset = (offset + eh_alignment - 1) & -eh_alignment; sec->rawsize = sec->size; sec->size = offset; return offset != sec->rawsize; @@ -1732,8 +1779,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, struct elf_link_hash_table *htab; struct eh_frame_hdr_info *hdr_info; unsigned int ptr_size; - struct eh_cie_fde *ent; - bfd_size_type sec_size; + struct eh_cie_fde *ent, *last_ent; if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) /* FIXME: octets_per_byte. */ @@ -1771,7 +1817,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (!ent->removed && ent->new_offset < ent->offset) memmove (contents + ent->new_offset, contents + ent->offset, ent->size); - for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent) + last_ent = sec_info->entry + sec_info->count; + for (ent = sec_info->entry; ent < last_ent; ++ent) { unsigned char *buf, *end; unsigned int new_size; @@ -1782,13 +1829,13 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (ent->size == 4) { /* Any terminating FDE must be at the end of the section. */ - BFD_ASSERT (ent == sec_info->entry + sec_info->count - 1); + BFD_ASSERT (ent == last_ent - 1); continue; } buf = contents + ent->new_offset; end = buf + ent->size; - new_size = size_of_output_cie_fde (ent, ptr_size); + new_size = next_cie_fde_offset (ent, last_ent, sec) - ent->new_offset; /* Update the size. It may be shrinked. */ bfd_put_32 (abfd, new_size - 4, buf); @@ -2059,18 +2106,6 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, } } - /* We don't align the section to its section alignment since the - runtime library only expects all CIE/FDE records aligned at - the pointer size. _bfd_elf_discard_section_eh_frame should - have padded CIE/FDE records to multiple of pointer size with - size_of_output_cie_fde. */ - sec_size = sec->size; - if (sec_info->count != 0 - && sec_info->entry[sec_info->count - 1].size == 4) - sec_size -= 4; - if ((sec_size % ptr_size) != 0) - abort (); - /* FIXME: octets_per_byte. */ return bfd_set_section_contents (abfd, sec->output_section, contents, (file_ptr) sec->output_offset, diff --git a/bfd/elf.c b/bfd/elf.c index 94726ba..9418e51 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6689,11 +6689,16 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd) /* Special segments, such as the PT_PHDR segment, may contain no sections, but ordinary, loadable segments should contain something. They are allowed by the ELF spec however, so only - a warning is produced. */ - if (segment->p_type == PT_LOAD) + a warning is produced. + There is however the valid use case of embedded systems which + have segments with p_filesz of 0 and a p_memsz > 0 to initialize + flash memory with zeros. No warning is shown for that case. */ + if (segment->p_type == PT_LOAD + && (segment->p_filesz > 0 || segment->p_memsz == 0)) + /* xgettext:c-format */ _bfd_error_handler (_("\ -%B: warning: Empty loadable segment detected, is this intentional ?"), - ibfd); +%B: warning: Empty loadable segment detected at vaddr=0x%.8x, is this intentional ?"), + ibfd, segment->p_vaddr); map->count = 0; *pointer_to_map = map; diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 8171b0b..0a78595 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -16311,7 +16311,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, + h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset); rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_COPY); - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) + if (h->root.u.def.section == htab->root.sdynrelro) s = htab->root.sreldynrelro; else s = htab->root.srelbss; diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index a69c7e4..97b8cc3 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -2275,7 +2275,7 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd, && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)); - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) + if (h->root.u.def.section == htab->root.sdynrelro) s = htab->root.sreldynrelro; else s = htab->root.srelbss; diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index d5b911c..1deebf4 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -4432,7 +4432,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, + eh->root.u.def.section->output_section->vma); rela.r_addend = 0; rela.r_info = ELF32_R_INFO (eh->dynindx, R_PARISC_COPY); - if ((eh->root.u.def.section->flags & SEC_READONLY) != 0) + if (eh->root.u.def.section == htab->etab.sdynrelro) sec = htab->etab.sreldynrelro; else sec = htab->etab.srelbss; diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index e6e70d8..2784ef7 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -5666,7 +5666,7 @@ do_glob_dat: + h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset); rel.r_info = ELF32_R_INFO (h->dynindx, R_386_COPY); - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) + if (h->root.u.def.section == htab->elf.sdynrelro) s = htab->elf.sreldynrelro; else s = htab->elf.srelbss; diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 40a2baf..c45d719 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -3229,7 +3229,7 @@ elf_metag_finish_dynamic_symbol (bfd *output_bfd, + eh->root.u.def.section->output_section->vma); rel.r_addend = 0; rel.r_info = ELF32_R_INFO (eh->dynindx, R_METAG_COPY); - if ((eh->root.u.def.section->flags & SEC_READONLY) != 0) + if (eh->root.u.def.section == htab->etab.sdynrelro) s = htab->etab.sreldynrelro; else s = htab->etab.srelbss; diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index 27118c1..325a0d6 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -3277,7 +3277,7 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd, + h->root.u.def.section->output_offset); rela.r_info = ELF32_R_INFO (h->dynindx, R_MICROBLAZE_COPY); rela.r_addend = 0; - if ((h->root.u.def.section->flags & SEC_READONLY) != 0) + if (h->root.u.def.section == htab->elf.sdynrelro) hooks/post-receive -- Repository for Project Archer.