From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25615 invoked by alias); 29 Jul 2010 19:17:12 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 25518 invoked by uid 9561); 29 Jul 2010 19:17:10 -0000 Date: Thu, 29 Jul 2010 19:17:00 -0000 Message-ID: <20100729191710.25503.qmail@sourceware.org> From: swagiaal@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] master: Merge remote branch 'gdb/master' X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 29fbe7188915338a2686ada9f3d97b918efef34f X-Git-Newrev: 3b158e5790b3fde9365605fd38bfc7aa062fb81d X-SW-Source: 2010-q3/txt/msg00035.txt.bz2 List-Id: The branch, master has been updated via 3b158e5790b3fde9365605fd38bfc7aa062fb81d (commit) via 0f597fa288350b6ba9cc075034d793c6212d0c17 (commit) via b592dbe3d4dba7b6c738ac028c17d74d4270d8d0 (commit) via 3358514aa7178f075cef16c396803a6411bbcb07 (commit) via 6618ea3a99a036a40dab1e0b41777239d82b76e5 (commit) via ebdf45cbea6689382d62487f64535e69205495ee (commit) via 79497d9b1653855007fe8384b628bf02803165df (commit) via 1577e7a90ac9e9c12a75472531e7f87eeb4e0cde (commit) via d368ee72a6e0b90097a438acddcfe6b6eade4b82 (commit) via 6a2e7ca37e12b739efe2e1f7e1d480118b8a3529 (commit) via 25729a9b2f2618b553bb7e3c23122c8cf9ab8e24 (commit) via 167893a158260a4899d7794670e02ed4f9d70044 (commit) via 306c28ca57a9c458b5c1f3e8cd4d52355d2d51bd (commit) via ff524be399d834428bbb0ab0ed2f604f8c6c527b (commit) via 2f22c795e000ddecc31a0c31043781ec9dc400c3 (commit) via a784c85c8628c9fd029cc40cbedb24b45e69d31f (commit) via 281ab0938c2f8c0aeb352f145b3cce9632b787f3 (commit) via a47132a306dc9d8ba5256b5c2dda8e6431e09e38 (commit) via b46beb83683bd8c768bdb94f61ab7b673db10b35 (commit) via 240d54e9507a9f69b59fe6dc8579a6459dded8b6 (commit) via ae12049ce8f4d3df561bcbdcf87e99fc687ab382 (commit) via a2229b21161745a8e3a134d7f585974f64c90acd (commit) via 034fa30fdc14e32155b6f8b45861431ffb749100 (commit) via 22062438ac3e852c7f4e16ae6935b86ecb177515 (commit) via 0a625e37eedfdf9ab15294e6a4bc6b61655cd768 (commit) via 3385a47878a034f1846463c3dc762b843b7622ec (commit) via 41ca0490e75673444f196c38238b99de3c508068 (commit) via 807c64142e3d8f889a65ab43b5b54a337023243c (commit) via d0a9a3b021b2c575eb5bc3068b41153685d042dd (commit) via 54ada89b5be3936d3c67202ca3d7591273f14af8 (commit) via 127f494f61e8cb22cb3858a0e51e1264db094804 (commit) via 0a3d0aafd216c9ead108fd884f6949ca3c093ac4 (commit) via 863d2ec79fefeec6c809ad326a01b73b098bde46 (commit) via 46e055dbf94f70cca454d58a9cfe280568c622e7 (commit) via 627a10296d9924eaf6d5b82437f918d3ee1147e3 (commit) via 5b909a306db5bf7928c2b9f1789345712a9bec71 (commit) via 7d84bcda6efce413dd48c2c8480c97fc57fd78d3 (commit) via 790f671028d5fbb71f79ac4947e5534b5cb96678 (commit) via cc09084970d1cd31b0d79349b7144c77195a0336 (commit) via 8f2b33202dadde3125fd749d96796b60746409e6 (commit) via e6bae1821e2110c0729f51434c435d99d8e73f9f (commit) via 8f4767c33fdac33d2e0f42d61c77c70ecca51e10 (commit) via 504417cf7d66816fd4172a3005ec11c047005f80 (commit) via 6c2a93bcfd0084689e9e1be9bda63527744dbebf (commit) via 457b1d1e76ca6ed6b78183c1401de7043dd239cd (commit) via 326905fb03804adfdece491aeaa1de2fc8eedbc6 (commit) via 040b3ec8ba6a03e71b95360adeeccee2f6ddeb4f (commit) via 03f540a385b3a0602e5c2d479793eda4de55cf15 (commit) via 0237a5b0c0050cae462ce98c89b64cd92a95d75e (commit) via b85b0aa3aeb0947ebeb409ec87f95dbd0a640f79 (commit) via 0c5b436dee83775287a325df891187989c0f093a (commit) via 9602d20e52e1a2291bd9edbdf98e4d82995a385e (commit) via d34898d46a2ca579cc57fd0cc88c1030e899ccf2 (commit) via 11655a1abab8186b0d02e3da79e1f9464496e0da (commit) via 9777e6d891ae65d0e52d99188211d43c4e3294b3 (commit) via da4475edb710bcf49c979a60ab7e917efb08aebf (commit) via c5cc41c70845d68733901d111fbdb4323bf6987b (commit) via 0e3e5bfb3afb9030ea577a84eb30046433324e62 (commit) via 695bb929a235093a96ac8074c61d8d753146c9f8 (commit) via 373ce0dbfb54b641898389e8d060dd127c54bcdf (commit) via 012405a22c9fb719ea380c714b27d32df3945758 (commit) via be6c0f53bf638f3c36e8cb7c2fb3373a0edd0c9b (commit) via af3a1fd54a5965a856bf217baa62daa5ba43124f (commit) via 811505a651e517d67df03c29e2949464c76ab19a (commit) via 5e21715ada570869e5aa9eda263587015ab4830e (commit) via 692a7dfc401f35c4a51c44783d08abe50947e06f (commit) via 074fcaf639b2480f2eed590e30fcb2007c120986 (commit) via 213e596721b522f45c6c58f5e1f9d7500cdb2366 (commit) from 29fbe7188915338a2686ada9f3d97b918efef34f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 3b158e5790b3fde9365605fd38bfc7aa062fb81d Merge: 29fbe71 0f597fa Author: Sami Wagiaalla Date: Thu Jul 29 15:16:59 2010 -0400 Merge remote branch 'gdb/master' commit 0f597fa288350b6ba9cc075034d793c6212d0c17 Author: DJ Delorie Date: Thu Jul 29 17:35:33 2010 +0000 * rx-tdep.c (rx_analyze_prologue): Don't require branches to have conditions. commit b592dbe3d4dba7b6c738ac028c17d74d4270d8d0 Author: Pedro Alves Date: Thu Jul 29 14:48:57 2010 +0000 * PROBLEMS: Remove mention of all problems. commit 3358514aa7178f075cef16c396803a6411bbcb07 Author: Pedro Alves Date: Thu Jul 29 14:18:56 2010 +0000 * lib/gdb.exp (gdb_init): Set LC_ALL and LANG to C in the environment. commit 6618ea3a99a036a40dab1e0b41777239d82b76e5 Author: Alan Modra Date: Thu Jul 29 07:35:58 2010 +0000 * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in .toc section, even when none are used in relocs. commit ebdf45cbea6689382d62487f64535e69205495ee Author: gdbadmin Date: Thu Jul 29 00:00:32 2010 +0000 *** empty log message *** commit 79497d9b1653855007fe8384b628bf02803165df Author: Alan Modra Date: Thu Jul 29 00:00:05 2010 +0000 daily update commit 1577e7a90ac9e9c12a75472531e7f87eeb4e0cde Author: Pedro Alves Date: Wed Jul 28 23:24:57 2010 +0000 2010-07-28 Pedro Alves PR build/11848 * configure.ac: Check for wresize. * configure, config.in: Regenerate. * tui/tui-win.c (make_visible_with_new_height): Wrap wresize call with HAVE_WRESIZE. commit d368ee72a6e0b90097a438acddcfe6b6eade4b82 Author: DJ Delorie Date: Wed Jul 28 22:31:09 2010 +0000 Sort *alphabetically* this time commit 6a2e7ca37e12b739efe2e1f7e1d480118b8a3529 Author: DJ Delorie Date: Wed Jul 28 21:58:22 2010 +0000 [sim/rx] * README.txt: New. * config.h (CYCLE_ACCURATE, CYCLE_STATS): New. * configure.in (--enable-cycle-accurate, --enable-cycle-stats): New. Default to enabled. * configure: Regenerate. * cpu.h (regs_type): Add cycle tracking info. (reset_pipeline_stats): Declare. (halt_pipeline_stats): Declare. (pipeline_stats): Declare. * main.c (done): Call pipeline_stats(). * mem.h (rx_mem_ptr): Moved to here ... * mem.c (mem_ptr): ... from here. Rename throughout. (mem_put_byte): Move LEDs to Port A. Add Port B to control cycle statistics. Move UART to SCI4. (mem_put_hi): Add TPU 1-2. TPU 1 and 2 count CPU cycles. * reg.c (init_regs): Set Rt reg to -1 (no reg). * rx.c: Add cycle counting and statistics throughout. (rx_get_byte): Optimize for speed. (decode_opcode): Likewise. (reset_pipeline_stats): New. (halt_pipeline_stats): New. (pipeline_stats): New. * trace.c (sim_disasm_one): Print cycle count. [include/opcode] * rx.h (RX_Opcode_ID): Add nop2 and nop3 for statistics. commit 25729a9b2f2618b553bb7e3c23122c8cf9ab8e24 Author: DJ Delorie Date: Wed Jul 28 21:56:16 2010 +0000 * MAINTAINERS: Add self as RX maintainer. Sort list. commit 167893a158260a4899d7794670e02ed4f9d70044 Author: H.J. Lu Date: Wed Jul 28 21:54:34 2010 +0000 Add 0F to VEX opcode enums. 2010-07-28 H.J. Lu * i386-dis.c: Add 0F to VEX opcode enums. commit 306c28ca57a9c458b5c1f3e8cd4d52355d2d51bd Author: Tom Tromey Date: Wed Jul 28 20:50:15 2010 +0000 gdb PR python/11060: * python/py-type.c (typy_legacy_template_argument): New function, extracted from typy_template_argument. (typy_template_argument): Use TYPE_TEMPLATE_ARGUMENT. Return a value when needed. gdb/testsuite PR python/11060: * gdb.python/py-type.c (Temargs): New template. (temvar): New variable. * gdb.python/py-type.exp (test_template): New proc. commit ff524be399d834428bbb0ab0ed2f604f8c6c527b Author: Tom Tromey Date: Wed Jul 28 20:20:26 2010 +0000 2010-07-28 Oleg Nesterov * remote.c (readchar): Call pop_target in case of SERIAL_ERROR. commit 2f22c795e000ddecc31a0c31043781ec9dc400c3 Author: Tom Tromey Date: Wed Jul 28 20:05:00 2010 +0000 * dwarf2read.c (dwarf2_const_value_data): Never sign extend. commit a784c85c8628c9fd029cc40cbedb24b45e69d31f Author: Pedro Alves Date: Wed Jul 28 19:04:07 2010 +0000 2010-07-28 Daniel Jacobowitz gdb/ * dwarf2read.c (read_subroutine_type): Improve THIS detection, handling DW_AT_object_pointer, and workaround GCC PR 43053. gdb/testsuite/ * gdb.cp/member-ptr.exp, gdb.cp/printmethod.exp, gdb.dwarf2/member-ptr-forwardref.exp: Adjust. commit 281ab0938c2f8c0aeb352f145b3cce9632b787f3 Author: Tom Tromey Date: Wed Jul 28 18:32:32 2010 +0000 * Makefile.in (HFILES_NO_SRCDIR): Remove link-warning.h. commit a47132a306dc9d8ba5256b5c2dda8e6431e09e38 Author: Joel Brobecker Date: Wed Jul 28 18:04:18 2010 +0000 Add missing gettext markup. gdb/ChangeLog: * remote.c (remote_download_tracepoint): Add missing gettext markup. * tracepoint.c (parse_static_tracepoint_marker_definition): Likewise. commit b46beb83683bd8c768bdb94f61ab7b673db10b35 Author: Joel Brobecker Date: Wed Jul 28 17:57:53 2010 +0000 [PATCH] breakpoint_re_set fails while connecting to gdbserver. This is a problem that I noticed on GNU/Linux, when using both GDB and GDBserver to debug an Ada program. To reproduce, use any Ada program, built with debug info ("gnatmake -g ..."). Then start the program with gdbserver: % gdbserver :4444 simple_main And then insert a breakpoint using the name of an Ada function, followed by connecting to the target server: (gdb) b simple.test_simple Breakpoint 1 at 0x401f28: file simple.adb, line 16. (gdb) tar rem :4444 Remote debugging using :4444 Reading symbols from /lib64/ld-linux-x86-64.so.2... Reading symbols from /usr/lib/debug/lib/ld-2.11.1.so...done. done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 !! -> Error in re-setting breakpoint 1: Can't find member of namespace, class, !! -> struct, or union named "simple.test_simple" !! -> Hint: try 'simple.test_simple or 'simple.test_simple !! -> (Note leading single quote.) 0x00007f4db3cf2af0 in _start () from /lib64/ld-linux-x86-64.so.2 Created trace state variable $trace_timestamp for target's variable 1. The problem is related to the fact that GDB found debug symbols for ld.so in /usr/lib/debug. For debugger configured with a prefix that is different from /usr, one way to force the problem to reproduce is to use: (gdb) set debug-file-directory /usr/lib/debug (assuming that debug info has been installed at that location). The problem is that the wrong language is used to parse the breakpoint location because it gets changed from under us as a side effect of some of the code that we do in prepration for re-parsing. In particular, breakpoint_re_set_one reads: set_language (b->language); input_radix = b->input_radix; s = b->addr_string; save_current_space_and_thread (); switch_to_program_space_and_thread (b->pspace); marker_spec = b->type == bp_static_tracepoint && is_marker_spec (s); [if (marker_spec) decode_tracepoint_spec (...) else decode_line_1] What happens in our case is that debugging information gets found for ld.so. As a result, the current_frame language is C whereas it would have been unknown if we did not have debugging info. And save_current_space_and_thread() implicitly causes the current frame to be selected, which changes the language automatically if the new language is not uknown and the the language mode is auto. The fix, until all parsing routines (including decode_line_1) get upgraded to take a language, is to select the breakpoint language as late as possible. In this case, we don't need to do that until we actually try to parse the breakpoint addr_string. gdb/ChangeLog: * breakpoint.c (breakpoint_re_set_one): Move call to set_language down, just before the block that parse the breakpoint addr_string. commit 240d54e9507a9f69b59fe6dc8579a6459dded8b6 Author: Tom Tromey Date: Wed Jul 28 16:23:54 2010 +0000 gdb PR c++/9946: * symfile.c (reread_symbols): Clear template_symbols. * symtab.h (struct symbol) : New field. (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): New macro. (struct template_symbol): New. * symtab.c (lookup_symbol_aux_local): Use cp_lookup_symbol_imports_or_template. * objfiles.h (struct objfile) : New field. * objfiles.c (relocate_one_symbol): New function. (objfile_relocate1): Use it. Relocate isolated symbols. * gdbtypes.h (struct cplus_struct_type) : New fields. (TYPE_N_TEMPLATE_ARGUMENTS): New macro. (TYPE_TEMPLATE_ARGUMENTS): Likewise. (TYPE_TEMPLATE_ARGUMENT): Likewise. (lookup_typename): Update. * gdbtypes.c (lookup_typename): Constify "block" argument. * dwarf2read.c: Include vec.h. (symbolp): New typedef. (read_func_scope): Read template arguments. Allocate a template_symbol when needed. (read_structure_type): Read template arguments. (new_symbol_full): New function, from new_symbol. Handle DW_TAG_template_type_param and DW_TAG_template_value_param. (new_symbol): Rewrite as wrapper. * cp-support.h (cp_lookup_symbol_imports_or_template): Declare. * cp-namespace.c: Include language.h. (search_symbol_list): New function. (cp_lookup_symbol_imports_or_template): Likewise. gdb/testsuite PR c++/9946: * gdb.cp/temargs.exp: New file. * gdb.cp/temargs.cc: New file. commit ae12049ce8f4d3df561bcbdcf87e99fc687ab382 Author: Pedro Alves Date: Wed Jul 28 12:08:19 2010 +0000 2010-07-28 Balazs Kezes * tui/tui-win.c (make_visible_with_new_height): Resize and move the command window to the new size and position. commit a2229b21161745a8e3a134d7f585974f64c90acd Author: Pedro Alves Date: Wed Jul 28 12:02:36 2010 +0000 tabs vs spaces commit 034fa30fdc14e32155b6f8b45861431ffb749100 Author: Pedro Alves Date: Wed Jul 28 12:01:21 2010 +0000 * tui/tui-win.c (tui_resize_all): Update the locator's origin's coordinates. commit 22062438ac3e852c7f4e16ae6935b86ecb177515 Author: Pedro Alves Date: Wed Jul 28 11:56:30 2010 +0000 2010-07-28 Balazs Kezes * tui/tui-io.c (tui_handle_resize_during_io): Call tui_resize_all after a detecting a resize. * tui/tui-win.c (tui_resize_all): Remove tui_set_win_resized_to call. commit 0a625e37eedfdf9ab15294e6a4bc6b61655cd768 Author: Pedro Alves Date: Wed Jul 28 11:48:20 2010 +0000 * configure.ac: Check for resize_term. * configure, config.in: Regenerate. commit 3385a47878a034f1846463c3dc762b843b7622ec Author: Joel Brobecker Date: Wed Jul 28 04:09:04 2010 +0000 misordered names in Write After Approval list This patch moves a couple of write-after-approval names up to keep the list in alphabetical order. 2010-07-27 Joel Brobecker * MAINTAINERS (Write After Approval): Reorder a couple of entries. commit 41ca0490e75673444f196c38238b99de3c508068 Author: Joel Brobecker Date: Wed Jul 28 04:04:17 2010 +0000 Minor (space) reformatting. commit 807c64142e3d8f889a65ab43b5b54a337023243c Author: DJ Delorie Date: Wed Jul 28 00:36:45 2010 +0000 * rx-decode.opc (store_flags): Remove, replace with F_* macros. (rx_decode_opcode): Likewise. * rx-decode.c: Regenerate. commit d0a9a3b021b2c575eb5bc3068b41153685d042dd Author: gdbadmin Date: Wed Jul 28 00:00:33 2010 +0000 *** empty log message *** commit 54ada89b5be3936d3c67202ca3d7591273f14af8 Author: Alan Modra Date: Wed Jul 28 00:00:05 2010 +0000 daily update commit 127f494f61e8cb22cb3858a0e51e1264db094804 Author: Jan Kratochvil Date: Tue Jul 27 23:18:38 2010 +0000 gdb/testsuite/ * gdb.base/help.exp (help disassemble): Update the content. commit 0a3d0aafd216c9ead108fd884f6949ca3c093ac4 Author: Pedro Alves Date: Tue Jul 27 22:26:26 2010 +0000 * dwarf2read.c (read_string): Rename to ... (read_direct_string): ... this. (skip_one_die, read_attribute_value, dwarf_decode_line_header) (dwarf_decode_lines, dwarf_decode_macros): Adjust. commit 863d2ec79fefeec6c809ad326a01b73b098bde46 Author: Jan Kratochvil Date: Tue Jul 27 21:22:07 2010 +0000 gdb/ * linux-nat.c (linux_nat_lp_status_is_event): New function. (count_events_callback, select_event_lwp_callback) (cancel_breakpoints_callback, linux_nat_wait_1): Use it. commit 46e055dbf94f70cca454d58a9cfe280568c622e7 Author: Maciej W. Rozycki Date: Tue Jul 27 21:18:52 2010 +0000 * elfxx-mips.h: Include "elf/mips.h". (gprel16_reloc_p): New static inline function. * elfxx-mips.c (_bfd_mips_elf_check_relocs) [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]: Use got16_reloc_p. (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use gprel16_reloc_p. * elf32-mips.c (mips_info_to_howto_rel): Likewise. * elfn32-mips.c (mips_info_to_howto_rel): Likewise. commit 627a10296d9924eaf6d5b82437f918d3ee1147e3 Author: Maciej W. Rozycki Date: Tue Jul 27 21:14:45 2010 +0000 Fix up last ChangeLog entry in gas/ and bfd/. commit 5b909a306db5bf7928c2b9f1789345712a9bec71 Author: Maciej W. Rozycki Date: Tue Jul 27 21:08:21 2010 +0000 * elf64-mips.c (mips_elf64_howto_table_rela) [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace. [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. * elfn32-mips.c (elf_mips_howto_table_rela) [R_MIPS_TLS_DTPMOD32]: Likewise. [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise. [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. commit 7d84bcda6efce413dd48c2c8480c97fc57fd78d3 Author: Jan Kratochvil Date: Tue Jul 27 20:51:37 2010 +0000 gdb/ * ia64-linux-nat.c (ia64_linux_status_is_event): New function. (_initialize_ia64_linux_nat): Install it. * linux-nat.c (sigtrap_is_event, linux_nat_status_is_event) (linux_nat_set_status_is_event): New. (stop_wait_callback, count_events_callback, select_event_lwp_callback) cancel_breakpoints_callback, linux_nat_filter_event) (linux_nat_wait_1): Use linux_nat_status_is_event. * linux-nat.h (linux_nat_set_status_is_event): New prototype. gdb/testsuite/ * gdb.threads/ia64-sigill.exp: New file. * gdb.threads/ia64-sigill.c: New file. commit 790f671028d5fbb71f79ac4947e5534b5cb96678 Author: Tom Tromey Date: Tue Jul 27 20:44:30 2010 +0000 * NEWS: Mention labels, .gdb_index. commit cc09084970d1cd31b0d79349b7144c77195a0336 Author: crq Date: Tue Jul 27 20:33:39 2010 +0000 * cli/cli-cmds.c (disassemble_command): Add support of disassemble "start,+length" form of arguments. commit 8f2b33202dadde3125fd749d96796b60746409e6 Author: Jan Kratochvil Date: Tue Jul 27 19:11:51 2010 +0000 gdb/ * top.c (input_from_terminal_p): Return 0 on BATCH_FLAG. * utils.c (defaulted_query): Do not explicitly check for BATCH_FLAG. (fputs_maybe_filtered): Do not do filtering also on ! INPUT_FROM_TERMINAL_P. commit e6bae1821e2110c0729f51434c435d99d8e73f9f Author: Doug Evans Date: Tue Jul 27 18:13:25 2010 +0000 Fix file name mentioned in this entry: 2010-07-27 Ken Werner * dwarf2read.c (dwarf2_read_index): Initialize the types_list and types_list_elements variables. commit 8f4767c33fdac33d2e0f42d61c77c70ecca51e10 Author: Tom Tromey Date: Tue Jul 27 18:08:47 2010 +0000 * gdb.opt/inline-cmds.c (ATTR): New define. (func1): Use it. (func2): Likewise. (func3): Likewise. (outer_inline1): Likewise. (outer_inline2): Likewise. * gdb.opt/inline-bt.c (ATTR): New define. (func1): Use it. (func2): Likewise. * gdb.opt/inline-locals.c (ATTR): New define. (func1): Use it. (func2): Likewise. commit 504417cf7d66816fd4172a3005ec11c047005f80 Author: Tom Tromey Date: Tue Jul 27 16:58:20 2010 +0000 * gdb.stabs/gdb11479.c (hack): New function. (test): Use it. (test2): Use it. * gdb.python/py-inferior.c (int8_search_buf, int16_search_buf) (int32_search_buf, int64_search_buf): No longer static. (x): Remove. * gdb.base/relocate.c (hack): New function. commit 6c2a93bcfd0084689e9e1be9bda63527744dbebf Author: Joel Brobecker Date: Tue Jul 27 16:16:32 2010 +0000 ARI fix (trailing newline in warning message). * dwarf2read.c (dw2_find_pc_sect_symtab): Remove trailing newline in warning message. commit 457b1d1e76ca6ed6b78183c1401de7043dd239cd Author: pmuldoon Date: Tue Jul 27 12:40:40 2010 +0000 2010-07-27 Phil Muldoon * python/py-value.c (valpy_call): New Function. 2010-07-27 Phil Muldoon * gdb.python/py-value.exp (test_inferior_function_call): New function. * gdb.python/py-value.c (func1): New function. (func2): Likewise. 2010-07-27 Phil Muldoon * gdb.texinfo (Values From Inferior): Add value inferior function call description. commit 326905fb03804adfdece491aeaa1de2fc8eedbc6 Author: kwerner Date: Tue Jul 27 07:57:49 2010 +0000 * valops.c (dwarf2_read_index): Initialize the types_list and types_list_elements variables. commit 040b3ec8ba6a03e71b95360adeeccee2f6ddeb4f Author: gdbadmin Date: Tue Jul 27 00:00:34 2010 +0000 *** empty log message *** commit 03f540a385b3a0602e5c2d479793eda4de55cf15 Author: Tom Tromey Date: Mon Jul 26 20:25:00 2010 +0000 * dwarf2loc.c (locexpr_describe_location_piece): Also recognize TLS with DW_OP_const4u or DW_OP_const8u. commit 0237a5b0c0050cae462ce98c89b64cd92a95d75e Author: Thiago Jung Bauermann Date: Mon Jul 26 17:06:24 2010 +0000 * ppc-linux-nat.c (store_vsx_register): Use PTRACE_GETVSXREGS to get VSX registers contents. commit b85b0aa3aeb0947ebeb409ec87f95dbd0a640f79 Author: Corinna Vinschen Date: Mon Jul 26 12:31:08 2010 +0000 * gdb.asm/xstormy16.inc (gdbasm_startup): Fix beginning of stack so as not to clash with .data section. commit 0c5b436dee83775287a325df891187989c0f093a Author: Jerome Guitton Date: Mon Jul 26 09:38:49 2010 +0000 gdb/testsuite/ * gdb.base/code_elim.exp: New file. * gdb.base/code_elim1.c: New file. * gdb.base/code_elim2.c: New file. commit 9602d20e52e1a2291bd9edbdf98e4d82995a385e Author: Jerome Guitton Date: Mon Jul 26 09:29:59 2010 +0000 gdb/ * dwarf2read.c (add_partial_symbol): Do not add a global variable if its adress is null. Add comment to explain why. (new_symbol): Ditto. commit d34898d46a2ca579cc57fd0cc88c1030e899ccf2 Author: Alan Modra Date: Mon Jul 26 00:00:05 2010 +0000 daily update commit 11655a1abab8186b0d02e3da79e1f9464496e0da Author: gdbadmin Date: Mon Jul 26 00:00:03 2010 +0000 *** empty log message *** commit 9777e6d891ae65d0e52d99188211d43c4e3294b3 Author: Jan Kratochvil Date: Sun Jul 25 10:15:54 2010 +0000 gdb/gdbserver/ * server.c (handle_target_event): Use target_signal_to_host for resume_info.sig initialization. * target.h (struct thread_resume) : New comment. commit da4475edb710bcf49c979a60ab7e917efb08aebf Author: Jan Kratochvil Date: Sun Jul 25 09:31:11 2010 +0000 gdb/ * linux-nat.c (linux_nat_do_thread_registers): Convert STOP_SIGNAL to the host signal first. commit c5cc41c70845d68733901d111fbdb4323bf6987b Author: Alan Modra Date: Sun Jul 25 00:00:05 2010 +0000 daily update commit 0e3e5bfb3afb9030ea577a84eb30046433324e62 Author: gdbadmin Date: Sun Jul 25 00:00:03 2010 +0000 *** empty log message *** commit 695bb929a235093a96ac8074c61d8d753146c9f8 Author: Alan Modra Date: Sat Jul 24 00:00:05 2010 +0000 daily update commit 373ce0dbfb54b641898389e8d060dd127c54bcdf Author: gdbadmin Date: Sat Jul 24 00:00:02 2010 +0000 *** empty log message *** commit 012405a22c9fb719ea380c714b27d32df3945758 Author: Tom Tromey Date: Fri Jul 23 22:15:13 2010 +0000 * dwarf2read.c (struct dwarf2_per_objfile) : New fields. (dw2_get_cu): New function. (create_cus_from_index): Remove unused argument. (create_signatured_type_hash_from_index): New function. (create_addrmap_from_index): Update. (dwarf2_read_index): Handle version 2. (dw2_find_last_source_symtab, dw2_forget_cached_source_info) (dw2_lookup_symtab, dw2_do_expand_symtabs_matching) (dw2_print_stats, dw2_expand_all_symtabs) (dw2_expand_symtabs_with_filename, dw2_find_symbol_file) (dw2_expand_symtabs_matching, dw2_map_symbol_filenames): Update. (dwarf2_initialize_objfile): Call create_debug_types_hash_table. (allocate_signatured_type_hash_table): New function. (add_signatured_type_cu_to_list): Likewise. (create_debug_types_hash_table): Use them. Set type_comp_units. (read_signatured_type): Ensure section data is available. (add_address_entry): Don't record empty ranges. (struct signatured_type_index_data): New. (write_one_signatured_type): New function. (write_psymtabs_to_index): Write type CUs. (save_gdb_index_command): Update comment. (process_type_comp_unit): Move inititalization of from_debug_types... (create_debug_types_hash_table): ... here. commit be6c0f53bf638f3c36e8cb7c2fb3373a0edd0c9b Author: Jan Kratochvil Date: Fri Jul 23 21:10:54 2010 +0000 gdb/ * gdb_gcore.sh (tmpfile): Remove the variable, its initialization, cleanup and generating of gdb script to it. (gdb): Use redirection from /dev/null. Use --nx. Turn off pagination and terminal size. Convert $tmpfile to a series of -ex-es. commit af3a1fd54a5965a856bf217baa62daa5ba43124f Author: Keith Seitz Date: Fri Jul 23 17:42:11 2010 +0000 * symtab.c (basic_lookup_transparent_type): Call pre-expand hook for STATIC_BLOCK types, too. commit 811505a651e517d67df03c29e2949464c76ab19a Author: Nick Clifton Date: Fri Jul 23 14:52:41 2010 +0000 Add support for v850E2 and v850E2V3 commit 5e21715ada570869e5aa9eda263587015ab4830e Author: Keith Seitz Date: Fri Jul 23 14:43:33 2010 +0000 * dwarf2read.c: Remove unused typedef dwarf2_cu_per_cu_data_ptr and vector definition. commit 692a7dfc401f35c4a51c44783d08abe50947e06f Author: Jan Kratochvil Date: Fri Jul 23 12:18:58 2010 +0000 gdb/ * linux-nat.c (cancel_breakpoint): Remove unused forward declaration. commit 074fcaf639b2480f2eed590e30fcb2007c120986 Author: Alan Modra Date: Fri Jul 23 00:00:05 2010 +0000 daily update commit 213e596721b522f45c6c58f5e1f9d7500cdb2366 Author: gdbadmin Date: Fri Jul 23 00:00:04 2010 +0000 *** empty log message *** ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 70 + bfd/archures.c | 4 +- bfd/bfd-in2.h | 68 + bfd/config.bfd | 8 +- bfd/cpu-v850.c | 10 +- bfd/elf32-mips.c | 3 +- bfd/elf32-v850.c | 766 +++- bfd/elf64-mips.c | 20 +- bfd/elf64-ppc.c | 56 +- bfd/elfn32-mips.c | 23 +- bfd/elfxx-mips.c | 4 +- bfd/elfxx-mips.h | 7 + bfd/libbfd.h | 22 + bfd/reloc.c | 88 + bfd/version.h | 2 +- configure | 10 +- configure.ac | 10 +- gdb/ChangeLog | 238 + gdb/MAINTAINERS | 4 +- gdb/Makefile.in | 2 +- gdb/NEWS | 22 +- gdb/PROBLEMS | 102 +- gdb/breakpoint.c | 2 +- gdb/cli/cli-cmds.c | 18 +- gdb/config.in | 6 + gdb/configure | 4 +- gdb/configure.ac | 4 +- gdb/cp-namespace.c | 90 + gdb/cp-support.h | 6 + gdb/doc/ChangeLog | 10 + gdb/doc/gdb.texinfo | 44 +- gdb/dwarf2loc.c | 14 +- gdb/dwarf2read.c | 635 +++- gdb/gdb_gcore.sh | 25 +- gdb/gdbserver/ChangeLog | 6 + gdb/gdbserver/server.c | 2 +- gdb/gdbserver/target.h | 3 +- gdb/gdbtypes.c | 2 +- gdb/gdbtypes.h | 17 +- gdb/ia64-linux-nat.c | 13 + gdb/linux-nat.c | 68 +- gdb/linux-nat.h | 4 + gdb/objfiles.c | 43 +- gdb/objfiles.h | 6 + gdb/ppc-linux-nat.c | 2 +- gdb/python/py-type.c | 92 +- gdb/python/py-value.c | 50 +- gdb/remote.c | 5 +- gdb/rx-tdep.c | 1 - gdb/symfile.c | 1 + gdb/symtab.c | 27 +- gdb/symtab.h | 26 + gdb/testsuite/ChangeLog | 74 + gdb/testsuite/gdb.asm/xstormy16.inc | 2 +- gdb/testsuite/gdb.base/code_elim.exp | 173 + .../gdb.base/{relocate.c => code_elim1.c} | 20 +- .../gdb.base/{relocate.c => code_elim2.c} | 18 +- gdb/testsuite/gdb.base/help.exp | 2 +- gdb/testsuite/gdb.base/relocate.c | 7 + gdb/testsuite/gdb.cp/member-ptr.exp | 22 +- gdb/testsuite/gdb.cp/printmethod.exp | 4 +- gdb/testsuite/gdb.cp/temargs.cc | 71 + gdb/testsuite/gdb.cp/temargs.exp | 102 + gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp | 2 +- gdb/testsuite/gdb.opt/inline-bt.c | 13 +- gdb/testsuite/gdb.opt/inline-bt.exp | 2 +- gdb/testsuite/gdb.opt/inline-cmds.c | 19 +- gdb/testsuite/gdb.opt/inline-locals.c | 13 +- gdb/testsuite/gdb.python/py-inferior.c | 10 +- gdb/testsuite/gdb.python/py-type.c | 8 + gdb/testsuite/gdb.python/py-type.exp | 18 + gdb/testsuite/gdb.python/py-value.c | 16 + gdb/testsuite/gdb.python/py-value.exp | 30 + gdb/testsuite/gdb.stabs/gdb11479.c | 14 +- gdb/testsuite/gdb.threads/ia64-sigill.c | 360 ++ gdb/testsuite/gdb.threads/ia64-sigill.exp | 76 + gdb/testsuite/lib/gdb.exp | 5 + gdb/top.c | 3 + gdb/tracepoint.c | 2 +- gdb/tui/tui-io.c | 1 + gdb/tui/tui-win.c | 10 +- gdb/utils.c | 5 +- gdb/version.in | 2 +- include/elf/ChangeLog | 6 + include/elf/v850.h | 28 + include/opcode/ChangeLog | 22 + include/opcode/rx.h | 3 +- include/opcode/v850.h | 94 +- opcodes/ChangeLog | 33 + opcodes/i386-dis.c | 4518 ++++++++++---------- opcodes/rx-decode.c | 1511 ++++---- opcodes/rx-decode.opc | 301 +- opcodes/v850-dis.c | 609 ++- opcodes/v850-opc.c | 1246 ++++-- sim/ChangeLog | 4 + sim/MAINTAINERS | 3 +- sim/rx/ChangeLog | 27 + sim/rx/README.txt | 121 + sim/rx/config.in | 6 + sim/rx/configure | 3191 ++++++++------ sim/rx/configure.in | 30 + sim/rx/cpu.h | 19 + sim/rx/main.c | 2 + sim/rx/mem.c | 156 +- sim/rx/mem.h | 15 + sim/rx/reg.c | 6 + sim/rx/rx.c | 825 ++++- sim/rx/trace.c | 9 +- 108 files changed, 10901 insertions(+), 5753 deletions(-) create mode 100644 gdb/testsuite/gdb.base/code_elim.exp copy gdb/testsuite/gdb.base/{relocate.c => code_elim1.c} (78%) copy gdb/testsuite/gdb.base/{relocate.c => code_elim2.c} (74%) create mode 100644 gdb/testsuite/gdb.cp/temargs.cc create mode 100644 gdb/testsuite/gdb.cp/temargs.exp create mode 100644 gdb/testsuite/gdb.threads/ia64-sigill.c create mode 100644 gdb/testsuite/gdb.threads/ia64-sigill.exp create mode 100644 sim/rx/README.txt First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cdbf3a0..81379db 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,73 @@ +2010-07-29 Alan Modra + + * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in + .toc section, even when none are used in relocs. + +2010-07-27 Maciej W. Rozycki + + * elfxx-mips.h: Include "elf/mips.h". + (gprel16_reloc_p): New static inline function. + * elfxx-mips.c (_bfd_mips_elf_check_relocs) + [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]: + Use got16_reloc_p. + (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use + gprel16_reloc_p. + * elf32-mips.c (mips_info_to_howto_rel): Likewise. + * elfn32-mips.c (mips_info_to_howto_rel): Likewise. + +2010-07-27 Maciej W. Rozycki + + * elf64-mips.c (mips_elf64_howto_table_rela) + [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace. + [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. + [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. + [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise. + [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. + * elfn32-mips.c (elf_mips_howto_table_rela) + [R_MIPS_TLS_DTPMOD32]: Likewise. + [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise. + [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise. + [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise. + [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise. + +2010-07-23 Naveen.H.S + Ina Pandit + + * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and + bfd_mach_v850e2v3. + * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and + bfd_mach_v850e2v3. + (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL, + BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23, + BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS, + BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1, + BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET, + BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET, + BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT, + BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL, + BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY, + BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT, + BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF, + BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE, + BFD_RELOC_V850_DATA): New relocations for V850 target. + * config.bfd: Match all v850 targets. + * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3. + * elf32-v850.c (v850_elf_check_relocs): Check the newly added + relocations. + (v850_elf_perform_relocation ): Update the newly added + relocations. + (v850_elf_howto_t): Update the specifications of added + relocations. + (v850_elf_reloc_map): Update the relocation mappings. + (v850_elf_final_link_relocate): Maps added relocation into the + appropriate howto structure. + (v850_elf_object_p): Add support for V850E2 and V850E2V3. + (v850_elf_final_write_processing): Likewise. + (v850_elf_merge_private_bfd_data): Likewise. + (v850_elf_print_private_bfd_data): Likewise. + * libbfd.h: Regenerate. + * bfd-in2.h: Regenerate. + 2010-07-23 Alan Modra * archive.c (_bfd_archive_bsd44_construct_extended_name_table): diff --git a/bfd/archures.c b/bfd/archures.c index 0e08571..1867154 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -310,7 +310,9 @@ DESCRIPTION . bfd_arch_v850, {* NEC V850 *} .#define bfd_mach_v850 1 .#define bfd_mach_v850e 'E' -.#define bfd_mach_v850e1 '1' +.#define bfd_mach_v850e1 '1' +.#define bfd_mach_v850e2 0x4532 +.#define bfd_mach_v850e2v3 0x45325633 . bfd_arch_arc, {* ARC Cores *} .#define bfd_mach_arc_5 5 .#define bfd_mach_arc_6 6 diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index f97c67f..277d432 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1977,6 +1977,8 @@ enum bfd_architecture #define bfd_mach_v850 1 #define bfd_mach_v850e 'E' #define bfd_mach_v850e1 '1' +#define bfd_mach_v850e2 0x4532 /* ('E'<<8|'2') */ +#define bfd_mach_v850e2v3 0x45325633 /* ('E'<<24|'2'<<16|'V'<<8|'3') */ bfd_arch_arc, /* ARC Cores */ #define bfd_mach_arc_5 5 #define bfd_mach_arc_6 6 @@ -3605,6 +3607,72 @@ bits placed non-contiguously in the instruction. */ instructions. */ BFD_RELOC_V850_LO16_SPLIT_OFFSET, +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_PCREL, + +/* This is a 17-bit reloc. */ + BFD_RELOC_V850_17_PCREL, + +/* This is a 23-bit reloc. */ + BFD_RELOC_V850_23, + +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_PCREL, + +/* This is a 32-bit reloc. */ + BFD_RELOC_V850_32_ABS, + +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_SPLIT_OFFSET, + +/* This is a 16-bit reloc. */ + BFD_RELOC_V850_16_S1, + +/* Low 16 bits. 16 bit shifted by 1. */ + BFD_RELOC_V850_LO16_S1, + +/* This is a 16 bit offset from the call table base pointer. */ + BFD_RELOC_V850_CALLT_15_16_OFFSET, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTPCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_16_GOT, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOT, + +/* DSO relocations. */ + BFD_RELOC_V850_22_PLT_PCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_32_PLT_PCREL, + +/* DSO relocations. */ + BFD_RELOC_V850_COPY, + +/* DSO relocations. */ + BFD_RELOC_V850_GLOB_DAT, + +/* DSO relocations. */ + BFD_RELOC_V850_JMP_SLOT, + +/* DSO relocations. */ + BFD_RELOC_V850_RELATIVE, + +/* DSO relocations. */ + BFD_RELOC_V850_16_GOTOFF, + +/* DSO relocations. */ + BFD_RELOC_V850_32_GOTOFF, + +/* start code. */ + BFD_RELOC_V850_CODE, + +/* start data in text. */ + BFD_RELOC_V850_DATA, + /* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the instruction. */ BFD_RELOC_MN10300_32_PCREL, diff --git a/bfd/config.bfd b/bfd/config.bfd index 1015f3c..960d4d4 100644 --- a/bfd/config.bfd +++ b/bfd/config.bfd @@ -1468,13 +1468,7 @@ case "${targ}" in targ_underscore=yes ;; - v850-*-*) - targ_defvec=bfd_elf32_v850_vec - ;; - v850e-*-*) - targ_defvec=bfd_elf32_v850_vec - ;; - v850ea-*-*) + v850*-*-*) targ_defvec=bfd_elf32_v850_vec ;; diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c index 77ca519..6ebc96c 100644 --- a/bfd/cpu-v850.c +++ b/bfd/cpu-v850.c @@ -1,6 +1,6 @@ /* BFD support for the NEC V850 processor - Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007 - Free Software Foundation, Inc. + Copyright 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2007, + 2010 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -32,8 +32,10 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[1]), - N (bfd_mach_v850e, "v850e", FALSE, NULL) + N (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[1]), + N (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[2]), + N (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[3]), + N (bfd_mach_v850e, "v850e", FALSE, NULL) }; #undef NEXT diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index c987ff9..5155557 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1422,8 +1422,7 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) when we do the relocation, because the symbol manipulations done by the linker may cause us to lose track of the input BFD. */ if (((*cache_ptr->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0 - && (r_type == (unsigned int) R_MIPS_GPREL16 - || r_type == (unsigned int) R_MIPS_LITERAL)) + && (gprel16_reloc_p (r_type) || r_type == (unsigned int) R_MIPS_LITERAL)) cache_ptr->addend = elf_gp (abfd); } diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 0ab7de8..e153e83 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -31,8 +31,11 @@ #include "elf/v850.h" #include "libiberty.h" -/* Sign-extend a 24-bit number. */ -#define SEXT24(x) ((((x) & 0xffffff) ^ 0x800000) - 0x800000) +/* Sign-extend a 17-bit number. */ +#define SEXT17(x) ((((x) & 0x1ffff) ^ 0x10000) - 0x10000) + +/* Sign-extend a 22-bit number. */ +#define SEXT22(x) ((((x) & 0x3fffff) ^ 0x200000) - 0x200000) static reloc_howto_type v850_elf_howto_table[]; @@ -89,16 +92,25 @@ v850_elf_check_relocs (bfd *abfd, default: case R_V850_NONE: case R_V850_9_PCREL: + case R_V850_16_PCREL: + case R_V850_17_PCREL: case R_V850_22_PCREL: - case R_V850_HI16_S: + case R_V850_32_PCREL: + case R_V850_32_ABS: case R_V850_HI16: + case R_V850_HI16_S: case R_V850_LO16: + case R_V850_LO16_S1: case R_V850_LO16_SPLIT_OFFSET: + case R_V850_23: case R_V850_ABS32: case R_V850_REL32: case R_V850_16: + case R_V850_16_S1: + case R_V850_16_SPLIT_OFFSET: case R_V850_8: case R_V850_CALLT_6_7_OFFSET: + case R_V850_CALLT_15_16_OFFSET: case R_V850_CALLT_16_16_OFFSET: break; @@ -132,11 +144,11 @@ v850_elf_check_relocs (bfd *abfd, common = ".zcommon"; goto small_data_common; - case R_V850_TDA_4_5_OFFSET: case R_V850_TDA_4_4_OFFSET: + case R_V850_TDA_4_5_OFFSET: + case R_V850_TDA_7_7_OFFSET: case R_V850_TDA_6_8_OFFSET: case R_V850_TDA_7_8_OFFSET: - case R_V850_TDA_7_7_OFFSET: case R_V850_TDA_16_16_OFFSET: other = V850_OTHER_TDA; common = ".tcommon"; @@ -315,15 +327,15 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) will store 0 in the value fields for the MOVHI and MOVEA instructions and addend will be the address of fred, but for these instructions: - movhi hi( fred + 0x123456), r0, r1 - movea lo( fred + 0x123456), r1, r1 + movhi hi( fred + 0x123456 ), r0, r1 + movea lo( fred + 0x123456 ), r1, r1 the value stored in the MOVHI instruction will be 0x12 and the value stored in the MOVEA instruction will be 0x3456. If however the instructions were: - movhi hi( fred + 0x10ffff), r0, r1 - movea lo( fred + 0x10ffff), r1, r1 + movhi hi( fred + 0x10ffff ), r0, r1 + movea lo( fred + 0x10ffff ), r1, r1 then the value stored in the MOVHI instruction would be 0x11 (not 0x10) and the value stored in the MOVEA instruction would be 0xffff. @@ -332,8 +344,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) adds 0xffffffff (sign extension!) producing 0x10ffff. Similarly if the instructions were: - movhi hi( fred - 1), r0, r1 - movea lo( fred - 1), r1, r1 + movhi hi( fred - 1 ), r0, r1 + movea lo( fred - 1 ), r1, r1 then 0 is stored in the MOVHI instruction and -1 is stored in the MOVEA instruction. @@ -345,8 +357,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) clear, the assembler will not have added 1 to the previous HI16S reloc to compensate for this effect. For example: - movhi hi( fred + 0x123456), r0, r1 - movea lo( fred + 0x123456), r1, r1 + movhi hi( fred + 0x123456 ), r0, r1 + movea lo( fred + 0x123456 ), r1, r1 The value stored in HI16S reloc is 0x12, the value stored in the LO16 reloc is 0x3456. If we assume that the address of fred is 0x00007000 @@ -366,8 +378,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) Note that if the 15th bit was set in the value stored in the LO16 reloc, then we do not have to do anything: - movhi hi( fred + 0x10ffff), r0, r1 - movea lo( fred + 0x10ffff), r1, r1 + movhi hi( fred + 0x10ffff ), r0, r1 + movea lo( fred + 0x10ffff ), r1, r1 HI16S: 0x0011 + (0x00007000 >> 16) = 0x11 LO16: 0xffff + (0x00007000 & 0xffff) = 0x6fff @@ -387,8 +399,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) So, for example if fred is at address 0xf000: - movhi hi( fred + 0xffff), r0, r1 [bit 15 of the offset is set] - movea lo( fred + 0xffff), r1, r1 + movhi hi( fred + 0xffff ), r0, r1 [bit 15 of the offset is set] + movea lo( fred + 0xffff ), r1, r1 HI16S: 0x0001 + (0x0000f000 >> 16) = 0x0001 LO16: 0xffff + (0x0000f000 & 0xffff) = 0xefff (carry into bit 16 is lost) @@ -401,8 +413,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) Similarly, if the 15th bit remains clear, but overflow occurs into the 16th bit then (assuming the address of fred is 0xf000): - movhi hi( fred + 0x7000), r0, r1 [bit 15 of the offset is clear] - movea lo( fred + 0x7000), r1, r1 + movhi hi( fred + 0x7000 ), r0, r1 [bit 15 of the offset is clear] + movea lo( fred + 0x7000 ), r1, r1 HI16S: 0x0000 + (0x0000f000 >> 16) = 0x0000 LO16: 0x7000 + (0x0000f000 & 0xffff) = 0x6fff (carry into bit 16 is lost) @@ -416,8 +428,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) 15th bit changes its value from being set to being clear, as the HI16S reloc will have already added in 1 to the high part for us: - movhi hi( fred + 0xffff), r0, r1 [bit 15 of the offset is set] - movea lo( fred + 0xffff), r1, r1 + movhi hi( fred + 0xffff ), r0, r1 [bit 15 of the offset is set] + movea lo( fred + 0xffff ), r1, r1 HI16S: 0x0001 + (0x00007000 >> 16) LO16: 0xffff + (0x00007000 & 0xffff) = 0x6fff (carry into bit 16 is lost) @@ -430,8 +442,8 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) but if the 15th bit goes from being clear to being set, then we must once again handle overflow: - movhi hi( fred + 0x7000), r0, r1 [bit 15 of the offset is clear] - movea lo( fred + 0x7000), r1, r1 + movhi hi( fred + 0x7000 ), r0, r1 [bit 15 of the offset is clear] + movea lo( fred + 0x7000 ), r1, r1 HI16S: 0x0000 + (0x0000ffff >> 16) LO16: 0x7000 + (0x0000ffff & 0xffff) = 0x6fff (carry into bit 16) @@ -504,6 +516,13 @@ v850_elf_perform_relocation (bfd *abfd, bfd_put_32 (abfd, addend, address); return bfd_reloc_ok; + case R_V850_23: + insn = bfd_get_32 (abfd, address); + insn &= ~((0x7f << 4) | (0x7fff80 << (16-7))); + insn |= ((addend & 0x7f) << 4) | ((addend & 0x7fff80) << (16-7)); + bfd_put_32 (abfd, (bfd_vma) insn, address); + return bfd_reloc_ok; + case R_V850_22_PCREL: if (saddend > 0x1fffff || saddend < -0x200000) return bfd_reloc_overflow; @@ -517,6 +536,30 @@ v850_elf_perform_relocation (bfd *abfd, bfd_put_32 (abfd, (bfd_vma) insn, address); return bfd_reloc_ok; + case R_V850_17_PCREL: + if (saddend > 0xffff || saddend < -0x10000) + return bfd_reloc_overflow; + + if ((addend % 2) != 0) + return bfd_reloc_dangerous; + + insn = bfd_get_32 (abfd, address); + insn &= ~ 0xfffe0010; + insn |= ((addend & 0xfffe) << 16) | ((addend & 0x10000) >> (16-4)); + break; + + case R_V850_16_PCREL: + if ((saddend < -0xffff) || (saddend > 0)) + return bfd_reloc_overflow; + + if ((addend % 2) != 0) + return bfd_reloc_dangerous; + + insn = bfd_get_16 (abfd, address); + insn &= ~0xfffe; + insn |= (-addend & 0xfffe); + break; + case R_V850_9_PCREL: if (saddend > 0xff || saddend < -0x100) return bfd_reloc_overflow; @@ -577,6 +620,36 @@ v850_elf_perform_relocation (bfd *abfd, insn = addend; break; + case R_V850_CALLT_15_16_OFFSET: + insn = bfd_get_16 (abfd, address); + + addend += insn & 0xfffe;; + + saddend = (bfd_signed_vma) addend; + + if (saddend > 0xffff || saddend < 0) + return bfd_reloc_overflow; + + insn = (0xfffe & addend) + | (insn & ~0xfffe); + break; + + case R_V850_CALLT_6_7_OFFSET: + insn = bfd_get_16 (abfd, address); + addend += ((insn & 0x3f) << 1); + + saddend = (bfd_signed_vma) addend; + + if (saddend > 0x7e || saddend < 0) + return bfd_reloc_overflow; + + if (addend & 1) + return bfd_reloc_dangerous; + + insn &= 0xff80; + insn |= (addend >> 1); + break; + case R_V850_16: case R_V850_SDA_16_16_OFFSET: case R_V850_ZDA_16_16_OFFSET: @@ -591,6 +664,7 @@ v850_elf_perform_relocation (bfd *abfd, insn = addend; break; + case R_V850_16_S1: case R_V850_SDA_15_16_OFFSET: case R_V850_ZDA_15_16_OFFSET: insn = bfd_get_16 (abfd, address); @@ -681,6 +755,18 @@ v850_elf_perform_relocation (bfd *abfd, insn |= addend; break; + case R_V850_LO16_S1: + insn = bfd_get_16 (abfd, address); + result = insn & 0xfffe; + if (! v850_elf_perform_lo16_relocation (abfd, &result, addend)) + return bfd_reloc_overflow; + if (result & 1) + return bfd_reloc_overflow; + insn = (result & 0xfffe) + | (insn & ~0xfffe); + bfd_put_16 (abfd, insn, address); + return bfd_reloc_ok; + hooks/post-receive -- Repository for Project Archer.