From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18466 invoked by alias); 27 Feb 2014 17:52:19 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 18446 invoked by uid 9674); 27 Feb 2014 17:52:19 -0000 Date: Thu, 27 Feb 2014 17:52:00 -0000 Message-ID: <20140227175218.18391.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] jankratochvil/gdbserverbuildid: Merge branch 'common-mergehex-empty-moveprep-move-attrgen-validate' into common-mergehex-empty-moveprep-move-attrgen-validate-tests X-Git-Refname: refs/heads/jankratochvil/gdbserverbuildid X-Git-Reftype: branch X-Git-Oldrev: 8953a9a98a975ea23b068978d1ee372c2edf44c2 X-Git-Newrev: 25f74e017f132f23bb1739cd6d138b241aeda267 X-SW-Source: 2014-q1/txt/msg00012.txt.bz2 List-Id: The branch, jankratochvil/gdbserverbuildid has been updated via 25f74e017f132f23bb1739cd6d138b241aeda267 (commit) via 0ab7e2d25bf216fd9bd63e9c652e81a556595aad (commit) via c27b897f403c5997fe203b921c67ef5ec512225c (commit) via 6dc0e59c89084a2352ef6d45e50a4bfd9e053ef8 (commit) via b0c663b3612a09d625a5f64c2dc0b8ff9997ba35 (commit) via d767a007c3608c8c3efefd214a30df7bb5411ae5 (commit) via 335e60d6a25687a38957d4a67d1af6aaed586e50 (commit) via 01c4ebea0c2e5ab1989a8b6104c00bef8db990bf (commit) via 47191c56e4d64c6232384c1a07c146e75bcc5044 (commit) via f17c8bfcc87ba90d55a0fecfb8f7a9933b883457 (commit) via a58549dda5a060d3cadb05dbf54c607a8efb8092 (commit) via 2fa0369e5127bff4ea68b596b1984314feb68299 (commit) via 1db37fe62781b677a37acbe801c1e69d8912a124 (commit) via fa96cb382c12b099675c5cc238aaa7352a3fd3d7 (commit) via d632a0971cf9c8044e2b59da45ba6bbc27714c84 (commit) via 2ebd5a35208e40dab7df46c7d6d58f4d614c6e21 (commit) via 5063daf7357ccdc2c9e899ca0421c2e8e580c88d (commit) via db434ba03edb5491d48415069d6116b5037e6fa1 (commit) via 3cdd631f17c822cd58f2fc9c742dc60ed683b5c1 (commit) via bee30a640c950b86019bceb4a8dca7a94ef11600 (commit) via 27a48a9223d0c7558f0bfde2d704d4a660f5d4ea (commit) via 2e877f5ecb5916d147f91dfad461a8fa5017d8b0 (commit) via 7a5a839f3a82e23f7745dd9905191716c74e34df (commit) from 8953a9a98a975ea23b068978d1ee372c2edf44c2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 25f74e017f132f23bb1739cd6d138b241aeda267 Merge: 8953a9a 0ab7e2d Author: Jan Kratochvil Date: Thu Feb 27 18:51:49 2014 +0100 Merge branch 'common-mergehex-empty-moveprep-move-attrgen-validate' into common-mergehex-empty-moveprep-move-attrgen-validate-tests commit 0ab7e2d25bf216fd9bd63e9c652e81a556595aad Merge: 47191c5 c27b897 Author: Jan Kratochvil Date: Thu Feb 27 18:51:49 2014 +0100 Merge branch 'common-mergehex-empty-moveprep-move-attrgen' into common-mergehex-empty-moveprep-move-attrgen-validate commit c27b897f403c5997fe203b921c67ef5ec512225c Merge: e737810 6dc0e59 Author: Jan Kratochvil Date: Thu Feb 27 18:51:48 2014 +0100 Merge branch 'common-mergehex-empty-moveprep-move' into common-mergehex-empty-moveprep-move-attrgen commit 6dc0e59c89084a2352ef6d45e50a4bfd9e053ef8 Merge: 02febad b0c663b Author: Jan Kratochvil Date: Thu Feb 27 18:51:47 2014 +0100 Merge branch 'common-mergehex-empty-moveprep' into common-mergehex-empty-moveprep-move commit b0c663b3612a09d625a5f64c2dc0b8ff9997ba35 Merge: 6e89496 d767a00 Author: Jan Kratochvil Date: Thu Feb 27 18:51:47 2014 +0100 Merge branch 'common-mergehex-empty' into common-mergehex-empty-moveprep commit d767a007c3608c8c3efefd214a30df7bb5411ae5 Merge: 82a64af 335e60d Author: Jan Kratochvil Date: Thu Feb 27 18:51:46 2014 +0100 Merge branch 'common-mergehex' into common-mergehex-empty commit 335e60d6a25687a38957d4a67d1af6aaed586e50 Merge: ea6f736 01c4ebe Author: Jan Kratochvil Date: Thu Feb 27 18:51:45 2014 +0100 Merge branch 'common' into common-mergehex commit 01c4ebea0c2e5ab1989a8b6104c00bef8db990bf Merge: 12e2836 f17c8bf Author: Jan Kratochvil Date: Thu Feb 27 18:51:44 2014 +0100 Merge remote-tracking branch 'gdb/master' into common commit 47191c56e4d64c6232384c1a07c146e75bcc5044 Author: Jan Kratochvil Date: Thu Feb 27 18:51:17 2014 +0100 . commit f17c8bfcc87ba90d55a0fecfb8f7a9933b883457 Author: Yufeng Zhang Date: Thu Feb 27 15:06:56 2014 +0000 opcodes/ * aarch64-tbl.h (aarch64_opcode_table): Replace IMM0 with FPIMM0 for fcmeq, fcmgt, fcmge, fcmlt and fcmle. gas/testsuite/ * gas/aarch64/fp-const0-parsing.s: New test. * gas/aarch64/fp-const0-parsing.d: Likewise. commit a58549dda5a060d3cadb05dbf54c607a8efb8092 Author: Yufeng Zhang Date: Thu Feb 27 14:55:46 2014 +0000 opcodes/ * aarch64-opc.c (print_register_offset_address): Call get_int_reg_name to prepare the register name. gas/testsuite/ * gas/aarch64/ldst-reg-reg-offset.s: Add tests. * gas/aarch64/ldst-reg-reg-offset.d: Update. commit 2fa0369e5127bff4ea68b596b1984314feb68299 Author: Pedro Alves Date: Thu Feb 27 14:44:16 2014 +0000 Linux waitpid/__WALL emulation wrapper: If WNOHANG is set, don't touch sigprocmask. Just a small optimization. No need to block/unblock signals if we're not going to call sigsuspend. gdb/ 2014-02-27 Pedro Alves * nat/linux-waitpid.c (my_waitpid): Only block signals if WNOHANG isn't set. commit 1db37fe62781b677a37acbe801c1e69d8912a124 Author: Yuri Gribov Date: Thu Feb 27 14:35:37 2014 +0000 This patch adds support for ARM PLT entries that support a full 32-bit offset range. Enabled via the use of a new linker command line option: --long-plt. * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt. * bfd-in2.h: Regenerate. * elf32-arm.c (elf32_arm_plt_entry_long): New array. (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if using long PLT entries. (bfd_elf32_arm_use_long_plt): New function. (elf32_arm_populate_plt_entry): Add support for long PLT entries. * emultempl/armelf.em (OPTION_LONG_PLT): Define. (PARSE_AND_LIST_LONGOPTS): Add long-plt. (PARSE_AND_LIST_OPTIONS): Likewise. (PARSE_AND_LIST_ARGS_CASES): Handle long-plt. * ld.texinfo: Document --long-plt. * ld-arm/long-plt-format.s: New test case. * ld-arm/long-plt-format.d: Expected disassembly. * ld-arm/arm-elf.exp: Run the new test. commit fa96cb382c12b099675c5cc238aaa7352a3fd3d7 Author: Pedro Alves Date: Thu Feb 27 14:30:08 2014 +0000 Teach GDBserver's Linux backend about no unwaited-for children (TARGET_WAITKIND_NO_RESUMED). GDBserver currently hangs forever in waitpid if the leader thread exits before other threads, or if all resumed threads exit - e.g., next over a thread exit with sched-locking on. This is exposed by leader-exit.exp. leader-exit.exp is part of a series of tests for a set of related problems. See : " To recap, on the Linux kernel, ptrace/waitpid don't allow reaping the leader thread until all other threads in the group are reaped. When the leader exits, it goes zombie, but waitpid will not return an exit status until the other threads are gone. This is presently exercised by the gdb.threads/leader-exit.exp test. The fix for that test, in linux-nat.c:wait_lwp, handles the case where we see the leader gone when we're stopping all threads to report an event to some other thread to the core. (...) The latter bit about not blocking if there no resumed threads in the process also applies to some other thread exiting, not just the main thread. E.g., this test starts a thread, and runs to a breakpoint in that thread: ... (gdb) c Continuing. [New Thread 0x7ffff75a4700 (LWP 23397)] [Switching to Thread 0x7ffff75a4700 (LWP 23397)] Breakpoint 2, thread_a (arg=0x0) at ../../../src/gdb/testsuite/gdb.threads/no-unwaited-for-left.c:28 28 return 0; /* break-here */ (gdb) info threads * 2 Thread 0x7ffff75a4700 (LWP 23397) thread_a (arg=0x0) at ../../../src/gdb/testsuite/gdb.threads/no-unwaited-for-left.c:28 1 Thread 0x7ffff7fcb720 (LWP 23391) 0x00007ffff7bc606d in pthread_join (threadid=140737343276800, thread_return=0x0) at pthread_join.c:89 The thread will exit as soon as we resume it. But if we only resume that thread, leaving the rest of the threads stopped: (gdb) set scheduler-locking on (gdb) c Continuing. ^C^C^C^C^C^C^C^C " This patch fixes the issues by implementing TARGET_WAITKIND_NO_RESUMED on GDBserver, similarly to what the patch above did for native Linux GDB. gdb.threads/leader-exit.exp now passes. gdb.threads/no-unwaited-for-left.exp now at least errors out instead of hanging: continue Continuing. warning: Remote failure reply: E.No unwaited-for children left. [Thread 15454] #1 stopped. 0x00000034cf408e60 in pthread_join (threadid=140737353922368, thread_return=0x0) at pthread_join.c:93 93 lll_wait_tid (pd->tid); (gdb) FAIL: gdb.threads/no-unwaited-for-left.exp: continue stops when the main thread exits The gdb.threads/non-ldr-exc-*.exp tests are skipped because GDBserver unfortunately doesn't support fork/exec yet, but I'm confident this fixes the related issues. I'm leaving modeling TARGET_WAITKIND_NO_RESUMED in the RSP for a separate pass. (BTW, in case of error in response to a vCont, it would be better for GDB to query the target for the current thread, or re-select one, instead of assuming current inferior_ptid is still the selected thread.) This implementation is a little different from GDB's, because I'm avoiding bringing in more of this broken use of waitpid(PID) into GDBserver. Specifically, this avoids waitpid(PID) when stopping all threads. There's really no need for wait_for_sigstop to wait for each LWP in turn. Instead, with some refactoring, we make it reuse linux_wait_for_event. gdb/gdbserver/ 2014-02-27 Pedro Alves PR 12702 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New macros. * linux-low.c (delete_lwp, handle_extended_wait): Add debug output. (last_thread_of_process_p): Take a PID argument instead of a thread pointer. (linux_wait_for_lwp): Delete. (num_lwps, check_zombie_leaders, not_stopped_callback): New functions. (linux_low_filter_event): New function, party factored out from linux_wait_for_event. (linux_wait_for_event): Rename to ... (linux_wait_for_event_filtered): ... this. Add new filter ptid argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and sigsuspend. Check for zombie leaders. (linux_wait_for_event): Reimplement as wrapper around linux_wait_for_event_filtered. (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if a normal or signal exit is seen, it's the whole process exiting. (wait_for_sigstop): No longer a for_each_inferior callback. Rewrite on top of linux_wait_for_event_filtered. (stop_all_lwps): Call wait_for_sigstop directly. * server.c (resume, handle_target_event): Handle TARGET_WAITKIND_NO_RESUMED. commit d632a0971cf9c8044e2b59da45ba6bbc27714c84 Author: Pedro Alves Date: Thu Feb 27 14:30:08 2014 +0000 Move linux-nat.c:status_to_str to nat/linux-waitpid.c. So that gdbserver's Linux backend can use it too. gdb/ 2014-02-27 Pedro Alves PR 12702 * linux-nat.c (status_to_str): Moved to nat/linux-waitpid.c. * nat/linux-waitpid.c: Include string.h. (status_to_str): Moved here and made extern. * nat/linux-waitpid.h (status_to_str): New declaration. commit 2ebd5a35208e40dab7df46c7d6d58f4d614c6e21 Author: Hui Zhu Date: Thu Feb 27 14:30:07 2014 +0000 Move ptid_match to common/ptid.c. So that gdbserver can use it too. gdb/ 2014-02-27 Hui Zhu PR 12702 * infrun.c (ptid_match): Move ... * common/ptid.c (ptid_match): ... here. * inferior.h (ptid_match): Move ... * common/ptid.h (ptid_match): ... here. commit 5063daf7357ccdc2c9e899ca0421c2e8e580c88d Author: Nick Clifton Date: Thu Feb 27 14:09:29 2014 +0000 This patch adds a default manifest in to the final links performed by the Cygwin and MinGW targets. The manifest is necessary in order for the linked binaries to be executed in a Windows 8 environment. The manifest is added using a linker script so that this feature will be compiler-neutral. The resource merging code in the linker means that if an application provides its own manifest then the default manifest will be ignored. * configure.in (all_emul_extra_binaries): New variable. Populated by invoking configure.tgt. (EMUL_EXTRA_BINARIES): New substitution. * configure: Regenerate. * configure.tgt (target_extra_binaries): New variable. Set to default-manifest.o for Cygwin and MinGW targets. * Makefile.am (EMUL_EXTRA_BINARIES): New variable. Initialised by the configure script. (ALL_EMUL_EXTRA_BINARIES): New variable. (default-manifest.o): New rule to build the default manifest. (ld_new_DEPENDENCIES): Add EMUL_EXTRA_BINARIES. (install-data-local): Add EMUL_EXTRA_BINARIES. * Makefile.in: Regenerate. * ld.texinfo: Document default manifest support. * emulparams/i386pe.sh (DEFAULT_MANIFEST): Define. * emulparams/i386pep.sh (DEFAULT_MANIFEST): Define. * emultempl/default-manifest.rc: New file. * scripttempl/pe.sc (R_RSRC): Include DEFAULT_MANIFEST, if defined. * scripttempl/pep.sc (R_RSRC): Likewise. * ld-pe/longsecn-1.d: Allow for extra sections. * ld-pe/longsecn-2.d: Likewise. * ld-pe/longsecn.d: Likewise. * ld-pe/secrel.d: Likewise. commit db434ba03edb5491d48415069d6116b5037e6fa1 Author: Alan Modra Date: Thu Feb 27 23:31:35 2014 +1030 Fix ELF ppc32 targets that don't use ppc32elf.em 5446cbdf82892a800ed7eef563a795e75223ec52 broke powerpc-lynxos, powerpc-netware, powerpc-windiss and powerpc-vxworks. bfd/ * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default params for targets that don't use ppc32elf.em. ld/ * emulparams/elf32ppcvxworks.sh: Source plt_unwind.sh and use ppc32elf.em. * emultempl/ppc32elf.em (ppc_after_open): Don't compile for vxworks. (LDEMUL_AFTER_OPEN): Don't set for vxworks. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Exclude -secure-plt, -bss-plt and -sdata-got when vxworks. commit 3cdd631f17c822cd58f2fc9c742dc60ed683b5c1 Author: Mark Kettenis Date: Thu Feb 27 14:07:10 2014 +0100 Call common OpenBSD ABI init code on OpenBSD/mips64. * mips64obsd-tdep.c (mips64obsd_init_abi): Call obsd_init_abi. * configure.tgt (mips64*-*-openbsd*): Add obsd-tdep.c to gdb_target_obs. commit bee30a640c950b86019bceb4a8dca7a94ef11600 Author: Mark Kettenis Date: Thu Feb 27 13:47:00 2014 +0100 Add gdbarch auxv parsing for OpenBSD. gdb/Changelog: * obsd-tdep.c (obsd_auxv_parse): New function. (obsd_init_abi): Set auxv_parse. commit 27a48a9223d0c7558f0bfde2d704d4a660f5d4ea Author: Mark Kettenis Date: Thu Feb 27 13:40:15 2014 +0100 Add auxv parsing to the architecture vector. Necessary to fix parsing auxv entries from core files on systems that use the layout specified by ELF instead of the incompatible variant used by Linux. gdb/Changelog: * gdbarch.sh (auxv_parse): New. * gdbarch.h: Regenerated. * gdbarch.c: Regenerated. * auxv.c (target_auxv_parse): Call gdbarch_parse_auxv if provided. commit 2e877f5ecb5916d147f91dfad461a8fa5017d8b0 Author: Alan Modra Date: Thu Feb 27 09:31:09 2014 +1030 daily update commit 7a5a839f3a82e23f7745dd9905191716c74e34df Author: Ludovic Courtès Date: Tue Feb 18 23:35:46 2014 +0100 guile: Add 'history-append!' procedure. gdb/ 2014-02-26 Ludovic Courtès * guile/scm-value.c (gdbscm_history_append_x): New function. (value_functions): Add it. gdb/testsuite/ 2014-02-26 Ludovic Courtès * gdb.guile/scm-value.exp (test_value_in_inferior): Add test for 'history-append!'. gdb/doc/ 2014-02-26 Ludovic Courtès * gdb/doc/guile.texi (Basic Guile): Document 'history-append!'. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 15 + bfd/bfd-in.h | 12 +- bfd/bfd-in2.h | 12 +- bfd/elf32-arm.c | 83 ++- bfd/elf32-ppc.c | 7 +- bfd/version.h | 2 +- gas/testsuite/ChangeLog | 10 + gas/testsuite/gas/aarch64/fp-const0-parse.d | 37 + gas/testsuite/gas/aarch64/fp-const0-parse.s | 60 ++ gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d | 4 + gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s | 6 + gdb/ChangeLog | 42 ++ gdb/auxv.c | 5 + gdb/common/ptid.c | 14 + gdb/common/ptid.h | 10 + gdb/configure.tgt | 2 +- gdb/doc/ChangeLog | 4 + gdb/doc/guile.texi | 9 + gdb/gdbarch.c | 32 + gdb/gdbarch.h | 11 + gdb/gdbarch.sh | 6 + gdb/gdbserver/ChangeLog | 28 + gdb/gdbserver/inferiors.h | 22 + gdb/gdbserver/linux-low.c | 852 +++++++++++++---------- gdb/gdbserver/server.c | 18 +- gdb/guile/scm-value.c | 25 + gdb/inferior.h | 10 - gdb/infrun.c | 14 - gdb/linux-nat.c | 25 - gdb/mips64obsd-tdep.c | 3 + gdb/nat/linux-waitpid.c | 49 ++- gdb/nat/linux-waitpid.h | 4 + gdb/obsd-tdep.c | 28 + gdb/solib-svr4.c | 103 +--- gdb/testsuite/ChangeLog | 5 + gdb/testsuite/gdb.guile/scm-value.exp | 8 + ld/ChangeLog | 40 ++ ld/Makefile.am | 16 +- ld/Makefile.in | 17 +- ld/configure | 18 +- ld/configure.in | 13 + ld/configure.tgt | 12 +- ld/emulparams/elf32ppcvxworks.sh | 2 + ld/emulparams/i386pe.sh | 1 + ld/emulparams/i386pep.sh | 1 + ld/emultempl/armelf.em | 14 +- ld/emultempl/default-manifest.rc | 28 + ld/emultempl/ppc32elf.em | 31 +- ld/ld.texinfo | 44 +- ld/scripttempl/pe.sc | 34 +- ld/scripttempl/pep.sc | 34 +- ld/testsuite/ChangeLog | 13 + ld/testsuite/ld-arm/arm-elf.exp | 6 +- ld/testsuite/ld-arm/long-plt-format.d | 15 + ld/testsuite/ld-arm/long-plt-format.s | 7 + ld/testsuite/ld-pe/longsecn-1.d | 2 +- ld/testsuite/ld-pe/longsecn-2.d | 1 + ld/testsuite/ld-pe/longsecn.d | 2 +- ld/testsuite/ld-pe/secrel.d | 1 + opcodes/ChangeLog | 10 + opcodes/aarch64-opc.c | 7 +- opcodes/aarch64-tbl.h | 20 +- 62 files changed, 1359 insertions(+), 607 deletions(-) create mode 100644 gas/testsuite/gas/aarch64/fp-const0-parse.d create mode 100644 gas/testsuite/gas/aarch64/fp-const0-parse.s create mode 100644 ld/emultempl/default-manifest.rc create mode 100644 ld/testsuite/ld-arm/long-plt-format.d create mode 100644 ld/testsuite/ld-arm/long-plt-format.s First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c5868ef..472bc89 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,18 @@ +2014-02-27 Yuri Gribov + + * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt. + * bfd-in2.h: Regenerate. + * elf32-arm.c (elf32_arm_plt_entry_long): New array. + (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if + using long PLT entries. + (bfd_elf32_arm_use_long_plt): New function. + (elf32_arm_populate_plt_entry): Add support for long PLT entries. + +2014-02-27 Alan Modra + + * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default + params for targets that don't use ppc32elf.em. + 2014-02-20 Chung-Lin Tang * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index c7c5a7d..54ddac9 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -1,6 +1,6 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990-2013 Free Software Foundation, Inc. + Copyright 1990-2014 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -877,15 +877,19 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); -/* ELF ARM mapping symbol support */ +/* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) + extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); + (const char *, int); + +extern void bfd_elf32_arm_set_byteswap_code + (struct bfd_link_info *, int); -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); +extern void bfd_elf32_arm_use_long_plt (void); /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 33792f4..ebc7496 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -7,7 +7,7 @@ /* Main header file for the bfd library -- portable access to object files. - Copyright 1990-2013 Free Software Foundation, Inc. + Copyright 1990-2014 Free Software Foundation, Inc. Contributed by Cygnus Support. @@ -884,15 +884,19 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); -/* ELF ARM mapping symbol support */ +/* ELF ARM mapping symbol support. */ #define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0) #define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) + extern bfd_boolean bfd_is_arm_special_symbol_name - (const char * name, int type); + (const char *, int); + +extern void bfd_elf32_arm_set_byteswap_code + (struct bfd_link_info *, int); -extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int); +extern void bfd_elf32_arm_use_long_plt (void); /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 7216244..b17f4d4 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -1,5 +1,5 @@ /* 32-bit ELF support for ARM - Copyright 1998-2013 Free Software Foundation, Inc. + Copyright 1998-2014 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -2140,15 +2140,27 @@ static const bfd_vma elf32_arm_plt0_entry [] = 0x00000000, /* &GOT[0] - . */ }; -/* Subsequent entries in a procedure linkage table look like - this. */ -static const bfd_vma elf32_arm_plt_entry [] = +/* By default subsequent entries in a procedure linkage table look like + this. Offsets that don't fit into 28 bits will cause link error. */ +static const bfd_vma elf32_arm_plt_entry_short [] = { 0xe28fc600, /* add ip, pc, #0xNN00000 */ 0xe28cca00, /* add ip, ip, #0xNN000 */ 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */ }; +/* When explicitly asked, we'll use this "long" entry format + which can cope with arbitrary displacements. */ +static const bfd_vma elf32_arm_plt_entry_long [] = +{ + 0xe28fc200, /* add ip, pc, #0xN0000000 */ + 0xe28cc600, /* add ip, ip, #0xNN00000 */ + 0xe28cca00, /* add ip, ip, #0xNN000 */ + 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */ +}; + +static bfd_boolean elf32_arm_use_long_plt_entry = FALSE; + #endif /* The format of the first entry in the procedure linkage table @@ -3464,7 +3476,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) ret->plt_entry_size = 16; #else ret->plt_header_size = 20; - ret->plt_entry_size = 12; + ret->plt_entry_size = elf32_arm_use_long_plt_entry ? 16 : 12; #endif ret->use_rel = 1; ret->obfd = abfd; @@ -6027,6 +6039,15 @@ arm_make_glue_section (bfd * abfd, const char * name) return TRUE; } +/* Set size of .plt entries. This function is called from the + linker scripts in ld/emultempl/{armelf}.em. */ + +void +bfd_elf32_arm_use_long_plt (void) +{ + elf32_arm_use_long_plt_entry = TRUE; +} + /* Add the glue sections to ABFD. This function is called from the linker scripts in ld/emultempl/{armelf}.em. */ @@ -7705,8 +7726,6 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info, of the PLT stub. */ got_displacement = got_address - (plt_address + 8); - BFD_ASSERT ((got_displacement & 0xf0000000) == 0); - if (elf32_arm_plt_needs_thumb_stub_p (info, arm_plt)) { put_thumb_insn (htab, output_bfd, @@ -7715,21 +7734,45 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info, elf32_arm_plt_thumb_stub[1], ptr - 2); } - put_arm_insn (htab, output_bfd, - elf32_arm_plt_entry[0] - | ((got_displacement & 0x0ff00000) >> 20), - ptr + 0); - put_arm_insn (htab, output_bfd, - elf32_arm_plt_entry[1] - | ((got_displacement & 0x000ff000) >> 12), - ptr+ 4); - put_arm_insn (htab, output_bfd, - elf32_arm_plt_entry[2] - | (got_displacement & 0x00000fff), - ptr + 8); + if (!elf32_arm_use_long_plt_entry) + { + BFD_ASSERT ((got_displacement & 0xf0000000) == 0); + + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_short[0] + | ((got_displacement & 0x0ff00000) >> 20), + ptr + 0); + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_short[1] + | ((got_displacement & 0x000ff000) >> 12), + ptr+ 4); + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_short[2] + | (got_displacement & 0x00000fff), + ptr + 8); #ifdef FOUR_WORD_PLT - bfd_put_32 (output_bfd, elf32_arm_plt_entry[3], ptr + 12); + bfd_put_32 (output_bfd, elf32_arm_plt_entry_short[3], ptr + 12); #endif + } + else + { + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_long[0] + | ((got_displacement & 0xf0000000) >> 28), + ptr + 0); + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_long[1] + | ((got_displacement & 0x0ff00000) >> 20), + ptr + 4); + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_long[2] + | ((got_displacement & 0x000ff000) >> 12), + ptr+ 8); + put_arm_insn (htab, output_bfd, + elf32_arm_plt_entry_long[3] + | (got_displacement & 0x00000fff), + ptr + 12); + } } /* Fill in the entry in the .rel(a).(i)plt section. */ diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 1c8724f..5bfa33b 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1,7 +1,5 @@ /* PowerPC-specific support for 32-bit ELF - Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Free Software Foundation, Inc. + Copyright (C) 1994-2014 Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -3252,6 +3250,7 @@ static struct bfd_link_hash_table * ppc_elf_link_hash_table_create (bfd *abfd) { struct ppc_elf_link_hash_table *ret; + static struct ppc_elf_params default_params = { PLT_OLD, 0, 1, 0, 0, 4096 }; ret = bfd_zmalloc (sizeof (struct ppc_elf_link_hash_table)); if (ret == NULL) @@ -3271,6 +3270,8 @@ ppc_elf_link_hash_table_create (bfd *abfd) ret->elf.init_plt_offset.offset = 0; ret->elf.init_plt_offset.glist = NULL; + ret->params = &default_params; + ret->sdata[0].name = ".sdata"; ret->sdata[0].sym_name = "_SDA_BASE_"; ret->sdata[0].bss_name = ".sbss"; diff --git a/bfd/version.h b/bfd/version.h index b29a89e..b9ae06c 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -1,4 +1,4 @@ -#define BFD_VERSION_DATE 20140226 +#define BFD_VERSION_DATE 20140227 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index c32ec63..86fdf4f 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2014-02-27 Jiong Wang + + * gas/aarch64/fp-const0-parsing.s: New test. + * gas/aarch64/fp-const0-parsing.d: Likewise. + +2014-02-27 Yufeng Zhang + + * gas/aarch64/ldst-reg-reg-offset.s: Add tests. + * gas/aarch64/ldst-reg-reg-offset.d: Update. + 2014-02-21 Ilya Tocar * gas/i386/avx512pf-intel.d: Remove prefetchwt1. diff --git a/gas/testsuite/gas/aarch64/fp-const0-parse.d b/gas/testsuite/gas/aarch64/fp-const0-parse.d new file mode 100644 index 0000000..172f35c --- /dev/null +++ b/gas/testsuite/gas/aarch64/fp-const0-parse.d @@ -0,0 +1,37 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: 5ea0dbc0 fcmeq s0, s30, #0.0 + 4: 7ea0cba1 fcmge s1, s29, #0.0 + 8: 5ea0cb82 fcmgt s2, s28, #0.0 + c: 7ea0db63 fcmle s3, s27, #0.0 + 10: 5ea0eb44 fcmlt s4, s26, #0.0 + 14: 5ee0dbc0 fcmeq d0, d30, #0.0 + 18: 7ee0cba1 fcmge d1, d29, #0.0 + 1c: 5ee0cb82 fcmgt d2, d28, #0.0 + 20: 7ee0db63 fcmle d3, d27, #0.0 + 24: 5ee0eb44 fcmlt d4, d26, #0.0 + 28: 0ea0dbc0 fcmeq v0.2s, v30.2s, #0.0 + 2c: 6ea0cba1 fcmge v1.4s, v29.4s, #0.0 + 30: 4ee0cb82 fcmgt v2.2d, v28.2d, #0.0 + 34: 2ea0db63 fcmle v3.2s, v27.2s, #0.0 + 38: 4ea0eb44 fcmlt v4.4s, v26.4s, #0.0 + 3c: 5ea0dbc0 fcmeq s0, s30, #0.0 + 40: 7ea0cba1 fcmge s1, s29, #0.0 + 44: 5ea0cb82 fcmgt s2, s28, #0.0 + 48: 7ea0db63 fcmle s3, s27, #0.0 + 4c: 5ea0eb44 fcmlt s4, s26, #0.0 + 50: 5ee0dbc0 fcmeq d0, d30, #0.0 + 54: 7ee0cba1 fcmge d1, d29, #0.0 + 58: 5ee0cb82 fcmgt d2, d28, #0.0 + 5c: 7ee0db63 fcmle d3, d27, #0.0 + 60: 5ee0eb44 fcmlt d4, d26, #0.0 + 64: 0ea0dbc0 fcmeq v0.2s, v30.2s, #0.0 + 68: 6ea0cba1 fcmge v1.4s, v29.4s, #0.0 + 6c: 4ee0cb82 fcmgt v2.2d, v28.2d, #0.0 + 70: 2ea0db63 fcmle v3.2s, v27.2s, #0.0 + 74: 4ea0eb44 fcmlt v4.4s, v26.4s, #0.0 diff --git a/gas/testsuite/gas/aarch64/fp-const0-parse.s b/gas/testsuite/gas/aarch64/fp-const0-parse.s new file mode 100644 index 0000000..b2d4d57 --- /dev/null +++ b/gas/testsuite/gas/aarch64/fp-const0-parse.s @@ -0,0 +1,60 @@ +/* fp-const0-parse.s Test file For AArch64 float constant 0 parse. + + Copyright 2014 Free Software Foundation, Inc. + Contributed by ARM Ltd. + + This file is part of GAS. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the license, or + (at your option) any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING3. If not, + see . */ + + + .text + // Check #0 with scalar register. + fcmeq s0, s30, #0 + fcmge s1, s29, #0 + fcmgt s2, s28, #0 + fcmle s3, s27, #0 + fcmlt s4, s26, #0 + fcmeq d0, d30, #0 + fcmge d1, d29, #0 + fcmgt d2, d28, #0 + fcmle d3, d27, #0 + fcmlt d4, d26, #0 + + // Check #0 with vector register. + fcmeq v0.2s, v30.2s, #0 + fcmge v1.4s, v29.4s, #0 + fcmgt v2.2d, v28.2d, #0 + fcmle v3.2s, v27.2s, #0 + fcmlt v4.4s, v26.4s, #0 + + // Check #0.0 with scalar register. + fcmeq s0, s30, #0.0 + fcmge s1, s29, #0.0 + fcmgt s2, s28, #0.0 + fcmle s3, s27, #0.0 + fcmlt s4, s26, #0.0 + fcmeq d0, d30, #0.0 + fcmge d1, d29, #0.0 + fcmgt d2, d28, #0.0 + fcmle d3, d27, #0.0 + fcmlt d4, d26, #0.0 + + // Check #0.0 with vector register. + fcmeq v0.2s, v30.2s, #0.0 + fcmge v1.4s, v29.4s, #0.0 + fcmgt v2.2d, v28.2d, #0.0 + fcmle v3.2s, v27.2s, #0.0 + fcmlt v4.4s, v26.4s, #0.0 diff --git a/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d b/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d index 486d9c8..b720633 100644 --- a/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d +++ b/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.d @@ -85,3 +85,7 @@ Disassembly of section \.text: 134: fc67fbe7 ldr d7, \[sp,x7,sxtx #3\] 138: 3ce7ebe7 ldr q7, \[sp,x7,sxtx\] 13c: 3ce7fbe7 ldr q7, \[sp,x7,sxtx #4\] + 140: f87ffbe1 ldr x1, \[sp,xzr,sxtx #3\] + 144: f83ffbe1 str x1, \[sp,xzr,sxtx #3\] + 148: b87fdbe1 ldr w1, \[sp,wzr,sxtw #2\] + 14c: b83fdbe1 str w1, \[sp,wzr,sxtw #2\] diff --git a/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s b/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s index afa7c4d..195c830 100644 --- a/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s +++ b/gas/testsuite/gas/aarch64/ldst-reg-reg-offset.s @@ -86,3 +86,9 @@ func: ld_or_st str ld_or_st ldr + + /* When the index register is of register 31, it should be ZR. */ + ldr x1, [sp, xzr, sxtx #3] + str x1, [sp, xzr, sxtx #3] + ldr w1, [sp, wzr, sxtw #2] + str w1, [sp, wzr, sxtw #2] diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bb7060c..6cfb9c5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,45 @@ +2014-02-27 Pedro Alves + + * nat/linux-waitpid.c (my_waitpid): Only block signals if WNOHANG + isn't set. + +2014-02-27 Pedro Alves + + PR 12702 + * linux-nat.c (status_to_str): Moved to nat/linux-waitpid.c. + * nat/linux-waitpid.c: Include string.h. + (status_to_str): Moved here and made extern. + * nat/linux-waitpid.h (status_to_str): New declaration. + +2014-02-27 Hui Zhu + + PR 12702 + * infrun.c (ptid_match): Move ... + * common/ptid.c (ptid_match): ... here. + * inferior.h (ptid_match): Move ... + * common/ptid.h (ptid_match): ... here. + +2014-02-27 Mark Kettenis + + * mips64obsd-tdep.c (mips64obsd_init_abi): Call obsd_init_abi. + * configure.tgt (mips64*-*-openbsd*): Add obsd-tdep.c to + gdb_target_obs. + +2014-02-27 Mark Kettenis + + * obsd-tdep.c (obsd_auxv_parse): New function. + (obsd_init_abi): Set auxv_parse. + + * gdbarch.sh (auxv_parse): New. + * gdbarch.h: Regenerated. + * gdbarch.c: Regenerated. + * auxv.c (target_auxv_parse): Call gdbarch_parse_auxv if provided. + +2014-02-26 Ludovic Courtès + + * guile/scm-value.c (gdbscm_history_append_x): New function. + (value_functions): Add it. + 2014-02-27 Joel Brobecker * dwarf2read.c (attr_value_as_address): New function. diff --git a/gdb/auxv.c b/gdb/auxv.c index ce0a71c..0f322e6 100644 --- a/gdb/auxv.c +++ b/gdb/auxv.c @@ -287,6 +287,11 @@ int target_auxv_parse (struct target_ops *ops, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp) { + struct gdbarch *gdbarch = target_gdbarch(); + + if (gdbarch_auxv_parse_p (gdbarch)) + return gdbarch_auxv_parse (gdbarch, readptr, endptr, typep, valp); + return current_target.to_auxv_parse (¤t_target, readptr, endptr, typep, valp); } diff --git a/gdb/common/ptid.c b/gdb/common/ptid.c index 49354ad..f614669 100644 --- a/gdb/common/ptid.c +++ b/gdb/common/ptid.c @@ -114,3 +114,17 @@ ptid_tid_p (ptid_t ptid) return (ptid_get_tid (ptid) != 0); } + +int +ptid_match (ptid_t ptid, ptid_t filter) +{ hooks/post-receive -- Repository for Project Archer.