aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-02Handle DW_OP_form_tls_addressTom Tromey6-7/+26
Currently gdb supports DW_OP_GNU_push_tls_address, but not DW_OP_form_tls_address. I think it would be better if the toolchain as a whole moved to using the standard opcode, and the prerequisite to this is getting gdb to recognize it. GCC can sometimes emit DW_OP_form_tls_address for emultls targets. As far as I know, nobody has ever tried this with gdb (since it wouldn't work at all). I don't think there's a major drawback to using a single opcode for all targets, because computing the location of a thread-local is already target specific. This is PR gdb/11616. I don't know how to write a test case for this; though it's worth noting that there aren't explicit tests for DW_OP_GNU_push_tls_address either -- and if I change GCC, these paths will be tested to the same extent they are now. 2016-09-02 Tom Tromey <tom@tromey.com> PR gdb/11616: * dwarf2read.c (decode_locdesc): Handle DW_OP_form_tls_address. * dwarf2loc.c (dwarf2_compile_expr_to_ax): Handle DW_OP_form_tls_address. (locexpr_describe_location_piece): Likewise. * dwarf2expr.h (struct dwarf_expr_context_funcs): Update comment. * dwarf2expr.c (execute_stack_op): Handle DW_OP_form_tls_address. (ctx_no_get_tls_address): Mention DW_OP_form_tls_address. * compile/compile-loc2c.c (struct insn_info): Update comment. (compute_stack_depth_worker): Handle DW_OP_form_tls_address.
2016-09-02Limit pr20513c/pr20513d to Linux and GNU targetsH.J. Lu3-0/+8
* testsuite/ld-elf/pr20513c.d: Limit to *-*-linux* and *-*-gnu* targets. * testsuite/ld-elf/pr20513d.d: Likewise.
2016-09-02[GDBserver] Replace "reinsert_breakpoint" with "single_step_breakpoint"Yao Qi3-89/+90
reinsert_breakpoint is used for software single step, so it is more clear to rename it to single_step_breakpoint. This was pointed out in the review https://sourceware.org/ml/gdb-patches/2016-05/msg00429.html I don't rename "other_breakpoint" in this patch. gdb/gdbserver: 2016-09-02 Yao Qi <yao.qi@linaro.org> * linux-low.c: Replace "reinsert_breakpoints" with "single_step_breakpoints". Replace "reinsert breakpoints" with "single-step breakpoints". * mem-break.c: Likewise. * mem-break.h: Likewise.
2016-09-02Skip floating point tests in return-nodebug.exp if gdb_skip_float_test is trueYao Qi2-0/+10
return-nodebug.exp does the test for various types, but we shouldn't test with floating point type if gdb_skip_float_test returns true. gdb/testsuite: 2016-09-02 Yao Qi <yao.qi@linaro.org> * gdb.base/return-nodebug.exp: Skip the test if skip_float_test is true and $type is "float" or "double".
2016-09-02Detect broken ptrace in gdb_skip_float_testYao Qi12-28/+156
We recently found a ARM kernel ptrace bug http://lists.infradead.org/pipermail/linux-arm-kernel/2016-May/431962.html Details can be found in the comment in gdb_skip_float_test. We can skip floating point tests if the kernel bug is detected. This patch adds more code in gdb_skip_float_test to detect the broken ptrace on arm-linux. Such detection should be done at the beginning of the test, because it starts a fresh GDB, so change the test cases to invoke gdb_skip_float_test at the beginning of test, and use its return value afterwards. Since gdb_skip_float_test becomes a gdb_caching_proc, so it can't have an argument, this patch also removes argument "msg", which isn't useful. gdb/testsuite: 2016-09-02 Yao Qi <yao.qi@linaro.org> * gdb.arch/arm-neon.exp: Skip it if gdb_skip_float_test returns true. * gdb.base/call-ar-st.exp: Invoke gdb_skip_float_test. * gdb.base/call-rt-st.exp: Likewise. * gdb.base/call-sc.exp: Invoke gdb_skip_float_test and use its return value instead of gdb,skip_float_test. * gdb.base/callfuncs.exp: Invoke gdb_skip_float_test. (do_function_calls): Use its return value instead of gdb,skip_float_test. * gdb.base/finish.exp: Likewise. * gdb.base/funcargs.exp: Likewise. * gdb.base/return.exp: Likewise. * gdb.base/return2.exp: Likewise. * gdb.base/varargs.exp: Likewise. * lib/gdb.exp (gdb_skip_float_test): Change it to gdb_caching_proc. Detect the broken ptrace on arm-linux.
2016-09-02Automatic date update in version.inGDB Administrator1-1/+1
2016-09-01Add tests for PR ld/20513H.J. Lu9-0/+84
PR ld/20513 * testsuite/ld-elf/pr20513a.d: New file. * testsuite/ld-elf/pr20513a.s: Likewise. * testsuite/ld-elf/pr20513b.d: Likewise. * testsuite/ld-elf/pr20513b.s: Likewise. * testsuite/ld-elf/pr20513c.d: Likewise. * testsuite/ld-elf/pr20513d.d: Likewise. * testsuite/ld-elf/pr20513e.d: Likewise. * testsuite/ld-elf/pr20513f.d: Likewise.
2016-09-01Share target_wait prototype between GDB and gdbserverSergio Durigan Junior6-12/+37
This commit moves the target_wait prototype from the GDB-specific target.h header to the common target/target.h header. Then, it creates a compatible implementation of target_wait on gdbserver using the_target->wait, and adjusts the (only) caller (mywait function). Pretty straightforward, no regressions introduced. gdb/gdbserver/ChangeLog: 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (mywait): Call target_wait instead of the_target->wait. (target_wait): New function. gdb/ChangeLog: 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com> * target.c (target_wait): Mention that the function's prototype can be found at target/target.h. * target.h (target_wait): Move prototype from here... * target/target.h (target_wait): ... to here.
2016-09-01Use target_continue{,_no_signal} instead of target_resumeSergio Durigan Junior9-31/+60
This commit implements a new function, target_continue, on top of the target_resume function. Then, it replaces all calls to target_resume by calls to target_continue or to the already existing target_continue_no_signal. This is one of the (many) necessary steps needed to consolidate the target interface between GDB and gdbserver. In particular, I am interested in the impact this change will have on the unification of the fork_inferior function (which I have been working on). Tested on the BuildBot, no regressions introduced. gdb/gdbserver/ChangeLog: 2016-09-31 Sergio Durigan Junior <sergiodj@redhat.com> * server.c (start_inferior): New variable 'ptid'. Replace calls to the_target->resume by target_continue{,_no_signal}, depending on the case. * target.c (target_stop_and_wait): Call target_continue_no_signal instead of the_target->resume. (target_continue): New function. gdb/ChangeLog: 2016-09-31 Sergio Durigan Junior <sergiodj@redhat.com> * fork-child.c (startup_inferior): Replace calls to target_resume by target_continue{,_no_signal}, depending on the case. * linux-nat.c (cleanup_target_stop): Call target_continue_no_signal instead of target_resume. * procfs.c (procfs_wait): Likewise. * target.c (target_continue): New function. * target/target.h (target_continue): New prototype.
2016-09-012016-09-01 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme2-3/+12
bfd/ * elf32-arm.c (cmse_entry_fct_p): Store instruction encoding in an array of bytes and use bfd_get_16 to interpret its encoding according to endianness of target.
2016-09-01Don't treat .opd section specially when ELFv2Alan Modra2-10/+26
Fixes a gdb segfault if a section named .opd is found in ELFv2 binaries. * elf64-ppc.c (synthetic_opd): New static var. (compare_symbols): Don't treat symbols in .opd specially for ELFv2. (ppc64_elf_get_synthetic_symtab): Likewise. Comment.
2016-09-01Automatic date update in version.inGDB Administrator1-1/+1
2016-08-31Fix lwp_suspend/unsuspend imbalance in linux_wait_1Antoine Tremblay2-18/+23
This patch fixes imbalanced lwp_suspend/unsuspend calls caused by the premature choosing of another event for fairness. select_event_lwp would switch the event before a call to unsuspend_all_lwps, thus it would be called with the wrong event. This caused an assertion failure: unsuspend LWP xx, suspended=-1 when testing gdb.threads/non-stop-fair-events.exp with ARM range stepping in GDBServer. This patch moves the switch of event after the unsuspend/unstop calls. No regressions, tested on ubuntu 14.04 ARMv7 and x86. With gdbserver-native. gdb/gdbserver/ChangeLog: * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2016-08-31Fix a typo in commentYao Qi2-1/+5
This patch replaces "keep things single" with "keep things simple". gdb: 2016-08-31 Yao Qi <yao.qi@linaro.org> * record-full.c (record_full_insert_breakpoint): Fix typo.
2016-08-31Ignore symbols defined in SHF_EXCLUDE sectionsAlan Modra2-0/+11
PR 20513 * ldlang.c (section_already_linked): Deal with SHF_EXCLUDE sections.
2016-08-31[GOLD] Further tidy to powerpc can_add_to_stub_groupAlan Modra2-19/+27
This patch adds a little more debug output, and replaces two variables with one, tracking current max group size by group_size_ rather than by has14_. * powerpc.cc (class Stub_control): Delete stub14_group_size_ and has14_. Add group_size_. (Stub_control::can_add_to_stub_group): Adjust to suit. Print debug info when switching to adding sections before stubs.
2016-08-31PowerPC64, correct grouping of stubs for ld.bfdAlan Modra2-24/+26
Like 57f6d32d, this patch ensures that sections containing external conditional branches limit the group size. * elf64-ppc.c (group_sections): Delete stub14_group_size. Instead, track max group size with a new "group_size" var that is reduced by a factor of 1024 from the 24-bit branch size whenever a 14-bit branch is seen.
2016-08-31Adjust VLE testsuiteAlan Modra6-107/+105
To suit f7d69005. * testsuite/ld-powerpc/vle-multiseg-1.d: Adjust to suit segment change. * testsuite/ld-powerpc/vle-multiseg-2.d: Likewise. * testsuite/ld-powerpc/vle-multiseg-3.d: Likewise. * testsuite/ld-powerpc/vle-multiseg-6.d: Likewise. * testsuite/ld-powerpc/vle-reloc-2.d: Likewise.
2016-08-31PowerPC VLE sh_flags and p_flagsAlan Modra4-42/+71
ELF section sh_flags SHF_PPC_VLE was being set based on arch/mach, which meant all code sections in an object file has the flag or all lacked it. We can do better than that. Only those code sections where VLE is enabled ought to have the flag, allowing an object file to contain both VLE and non-VLE code. Also, ELF header p_flags PF_PPC_VLE wasn't being set, and segments were being split unnecessarily. bfd/ * elf32-ppc.c (ppc_elf_section_processing): Delete. (elf_backend_section_processing): Don't define. (ppc_elf_modify_segment_map): Set p_flags and mark valid. Don't split on non-exec sections differing in SHF_PPC_VLE. When splitting segments, mark size invalid. gas/ * config/tc-ppc.c (md_assemble): Set sh_flags for VLE. Test ppc_cpu rather than calling ppc_mach to determine VLE mode. (ppc_frag_check, ppc_handle_align): Likewise use ppc_cpu.
2016-08-31[GOLD] Add debug output for powerpc section groupingAlan Modra3-3/+21
* debug.h (DEBUG_TARGET): New. (DEBUG_ALL): Add DEBUG_TARGET. (gold_debug): Delete FORMAT param. * powerpc.cc (Stub_control::can_add_to_stub_group): Print debug ourput.
2016-08-31Automatic date update in version.inGDB Administrator1-1/+1
2016-08-30Fixed issue with NULL pointer access on header var.Cupertino Miranda2-1/+8
Variable "header" in function is set conditionally, but was accessed without verifying if pointer was NULL. opcodes/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * opcodes/arc-dis.c (print_insn_arc): Changed.
2016-08-30Fix order of inferiors in "thread apply all"Andreas Arnez4-1/+15
This inserts missing parentheses in the calculation of the comparison result between two different inferior numbers. The problem was found by Philipp Rudo. gdb/ChangeLog: * thread.c (tp_array_compar): Insert missing parentheses. gdb/testsuite/ChangeLog: * gdb.multi/tids.exp: Test "thread apply all".
2016-08-30Made tests to XFAIL for arc*-*-elf*.Cupertino Miranda3-0/+7
ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * testsuite/ld-arc/tls_gs-01.d: Set to XFAIL on arc*-*-elf*. * testsuite/ld-arc/tls_ie-01.d: Likewise.
2016-08-30Partially revert previous delta - move limit testing code to first scan over ↵Nick Clifton2-15/+12
symbol file. PR gprof/20499 * corefile.c (num_of_syms_in): Return an unsigned int. Fail if the count exceeds the maximum possible allocatable size. (core_create_syms_from): Exit early if num_of_syms_in returns a failure code.
2016-08-30Fix more potential seg-faults in gprof.Nick Clifton2-2/+24
PR gprof/20499 * corefile.c (num_of_syms_in): Return an unsigned int. (core_create_syms_from): Catch a possible integer overflow computing the argument to xmalloc. Also allow for the possibility that an integer overflow in num_of_syms_in means that less space has been allocated than expected.
2016-08-30ppc apuinfo for spe parsed incorrectlyAlan Modra2-0/+6
apuinfo saying SPE resulted in mach = bfd_mach_ppc_vle due to a missing break. PR 20531 * elf32-ppc.c (_bfd_elf_ppc_set_arch): Add missing "break".
2016-08-30[GOLD] correct grouping of stubsAlan Modra2-33/+81
This patch rewrites the rather obscure can_add_to_stub_group, fixing a problem with the handling of sections containing conditional external branches. When a section group contains any such section, the group size needs to be limited to a much smaller size than groups with only non-conditional external branches. PR 20523 * powerpc.cc (class Stub_control): Add has14_. Comment owner_. (Stub_control::can_add_to_stub_group): Correct grouping of sections containing 14-bit external branches. When returning false, set state_ to reflect the fact that we have one section for the next group. Rewrite most of function for clarity. Add and expand comments. (Target_powerpc::do_relax): Print stub group size retry in hex.
2016-08-30Automatic date update in version.inGDB Administrator1-1/+1
2016-08-29Run PR ld/19784 tests only if ifunc attribute worksH.J. Lu2-38/+52
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/19784 tests only if ifunc attribute works.
2016-08-29Check the external compression header sizeH.J. Lu2-4/+11
Since the internal compression header size can be bigger than the external compression header size, we should check the external compression header size. * readelf.c (load_specific_debug_section): Check the external compression header size.
2016-08-29i386: Issue an error on non-PIC call to IFUNC in PIC objectH.J. Lu15-44/+101
On i386, IFUNC function must be called via PLT. Since PLT in PIC object uses EBX register, R_386_PLT32 relocation must be used to call IFUNC function even when IFUNC function is defined locally. Linker should issue an error when R_386_PC32 relocation is used to call IFUNC function. Since PR ld/19784 tests doesn't use PLT relocation to local IFUNC function, they are moved to the x86-64 test directory. bfd/ PR ld/14961 PR ld/20515 * elf32-i386.c (elf_i386_check_relocs): Issue an error when R_386_PC32 relocation is used to call IFUNC function in PIC object. ld/ PR ld/14961 PR ld/20515 * testsuite/ld-i386/i386.exp: Run pr20515. * testsuite/ld-i386/pr20515.d: New file. * testsuite/ld-i386/pr20515.s: Likewise. * testsuite/ld-ifunc/ifunc-14a.s: Use R_386_PLT32 to call IFUNC function. * testsuite/ld-ifunc/ifunc-14c.s: Likewise. * testsuite/ld-ifunc/ifunc-2-i386.s: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386.s: Likewise. * testsuite/ld-ifunc/ifunc.exp: Move PR ld/19784 tests to ... * testsuite/ld-x86-64/x86-64.exp: Here. * testsuite/ld-ifunc/pr19784a.c: Moved to ... * testsuite/ld-x86-64/pr19784a.c: Here. * testsuite/ld-ifunc/pr19784b.c: Moved to ... * testsuite/ld-x86-64/pr19784b.c: Here. * testsuite/ld-ifunc/pr19784c.c: Moved to ... * testsuite/ld-x86-64/pr19784c.c: Here.
2016-08-29gdb.base/default.exp regressionJan Kratochvil2-2/+4
tty^M (gdb) FAIL: gdb.base/default.exp: tty gdb/testsuite/ChangeLog 2016-08-29 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.base/default.exp (tty): Remove.
2016-08-29Automatic date update in version.inGDB Administrator1-1/+1
2016-08-28PR gold/20529 - relaxing loop never ends.Han Shen2-3/+35
gold/ChangeLog 2016-08-26 Han Shen <shenhan@google.com> * powerpc.cc (Stub_table::min_size_threshold_): New member to limit size. (Stub_table::set_min_size_threshold): New member function. (Stub_table::set_address_and_size): Add code to only allow size increase. (Target_powerpc::do_relax): Add code to record last size.
2016-08-28Automatic date update in version.inGDB Administrator1-1/+1
2016-08-27Lack of SHF_GROUP sections result in ld segfaultAlan Modra2-4/+26
PR 20520 * elf.c (_bfd_elf_setup_sections): Check that SHT_GROUP sections have corresponding SHF_GROUP sections. (bfd_elf_set_group_contents): Comment.
2016-08-27Fix commit 980aa3e6Alan Modra2-4/+25
Commit 980aa3e6 was supposed to cure dyn_reloc counting problems, but did the opposite. For PIC we count two types of dyn_reloc, those on pc-relative relocs, and the total. If a sym needs pc-relative dyn relocs then all the relocs are dynamic. If not, then only those that are must_be_dyn_reloc are dynamic. PR 20519 * elf64-ppc.c (pc_dynrelocs): New function. (ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to handle pic dynamic relocs.
2016-08-27Automatic date update in version.inGDB Administrator1-1/+1
2016-08-26opcodes, gas: fix mnemonic of sparc camellia_flJose E. Marchesi5-3/+14
This patch fixes a typo in the mnemonic of the camellia_fl instruction, which was implemented before as camellia_fi. gas/ChangeLog: 2016-08-26 Jose E. Marchesi <jose.marchesi@oracle.com> * testsuite/gas/sparc/crypto.d: Rename invalid opcode camellia_fi to camellia_fl. * testsuite/gas/sparc/crypto.s: Likewise. opcodes/ChangeLog: 2016-08-26 Jose E. Marchesi <jose.marchesi@oracle.com> * sparc-opc.c (sparc_opcodes): Fix typo in opcode, camellia_fi -> camellia_fl.
2016-08-26Reduce parameter list in bfd_elf32_arm_target_relocsThomas Preud'homme6-95/+145
2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com> bfd/ * bfd-in.h (struct elf32_arm_params): Define. (bfd_elf32_arm_set_target_relocs): Rename into ... (bfd_elf32_arm_set_target_params): This. Use a struct elf32_arm_params to pass all parameters but the bfd and bfd_link_info. * bfd-in2.h: Regenerate. * elf32-arm.c (bfd_elf32_arm_set_target_relocs): Rename into ... (bfd_elf32_arm_set_target_params): This. Pass all values via a struct elf32_arm_params rather than as individual parameters. ld/ * emultempl/armelf.em (params): New static variable. (thumb_entry_symbol, byteswap_code, target1_is_rel, target2_type, fix_v4bx, use_blx, vfp11_denorm_fix, stm32l4xx_fix, fix_cortex_a8, no_enum_size_warning, no_wchar_size_warning, pic_veneer, merge_exidx_entries, fix_arm1176, cmse_implib): move as part of the above new structure. (arm_elf_before_allocation): Access static variable from the params structure. (gld${EMULATION_NAME}_finish): Likewise. (arm_elf_create_output_section_statements): Likewise and pass the address of that structure to bfd_elf32_arm_set_target_relocs instead of the static variables. (PARSE_AND_LIST_ARGS_CASES): Access static variable from the params structure.
2016-08-262016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com>Thomas Preud'homme2-0/+10
bfd/ * elf32-arm.c (elf32_arm_get_stub_entry): Assert that we don't access passed the end of htab->stub_group array. (elf32_arm_create_or_find_stub_sec): Likewise. (elf32_arm_create_stub): Likewise.
2016-08-26Add missing ARMv8-M special registersThomas Preud'homme8-80/+366
2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com> gas/ * config/tc-arm.c (v7m_psrs): Add MSPLIM, PSPLIM, MSPLIM_NS, PSPLIM_NS, PRIMASK_NS, BASEPRI_NS, FAULTMASK_NS, CONTROL_NS, SP_NS and their lowecase counterpart special registers. Write register identifier in hex. * testsuite/gas/arm/archv8m-cmse-msr.s: Reorganize tests per operation, special register and then case. Use different register for each operation. Add tests for new special registers. * testsuite/gas/arm/archv8m-cmse-msr-base.d: Adapt expected result accordingly. * testsuite/gas/arm/archv8m-cmse-msr-main.d: Likewise. * testsuite/gas/arm/archv8m-main-dsp-4.d: Likewise. opcodes/ * arm-dis.c (psr_name): Use hex as case labels. Add detection for MSPLIM, PSPLIM, MSPLIM_NS, PSPLIM_NS, PRIMASK_NS, BASEPRI_NS, FAULTMASK_NS, CONTROL_NS and SP_NS special registers.
2016-08-26Dynamic TLS GOT entries would not be relocated.Cupertino Miranda5-0/+32
Forgot to set should_relocate to TRUE in case of GOT and TLS relocations of undefined symbols for shared libraries. In dynamic libraries if symbol is not known the instruction relocation would not be resolved to point to the respective .got entry. A test was created to detect similar future mistakes. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * elf32-arc.c (elf_arc_relocate_section): Changed. Set should_relocate to TRUE for GOT and TLS relocs. ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * ld/testsuite/ld-arc/tls_gd-01.s: Added a testcase for this patch. * ld/testsuite/ld-arc/tls_gd-01.d: Likewise.
2016-08-26Fixed -init, -fini linker options.Cupertino Miranda2-4/+8
ARC was overloading this options by forcing DT_INIT AND DT_FINI to always point to _init and _fini, respectively. bfd/ChangeLog: Cupertino Miranda <cmiranda@synospsys.com> * elf32-arc.c (elf_arc_finish_dynamic_sections): Changed.
2016-08-26Several fixes related to ARC PIE support.Cupertino Miranda3-41/+164
Fixed conditions related to dynamic relocs relative offset patching. Added arc_link_hash_table to be able to always generate and track .rela.bss section. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * elf-bfd.h: Added ARC_ELF_DATA to enum elf_target_id. * elf32-arc.c (struct elf_arc_link_hash_entry): Added. (struct elf_arc_link_hash_table): Likewise. (elf_arc_link_hash_newfunc): Likewise. (elf_arc_link_hash_table_free): Likewise. (arc_elf_link_hash_table_create): Likewise. (elf_arc_relocate_section): Fixed conditions related to dynamic (elf_arc_check_relocs): Likewise. (arc_elf_create_dynamic_sections): Added (elf_arc_adjust_dynamic_symbol): Changed access to .rela.bss to be done through the hash table.
2016-08-26Content for TLS_IE_GOT not written to .got.Cupertino Miranda5-7/+47
When no dynamic relocation was generated the .got content would not be updated for the TLS_IE_GOT relocation addresses. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * arc-got.h (relocate_fix_got_relocs_for_got_info): Fixed addresses in debug comments. Fixed address in .got related to TLS_IE_GOT dynamic relocation. ld/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * testsuite/ld-arc/tls_ie-01.s: Added to verify associated fix. * testsuite/ld-arc/tls_ie-01.d: Likewise
2016-08-26Fixes to legacy ARC relocations.Cupertino Miranda7-28/+67
Added support for ARC_SDA_12 reloc. Fixed ARC_N32_ME. Added ME (middle-endian) to ARC_SDA_12 reloc. bfd/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * reloc.c: Fixed type in ARC_SECTOFF relocations. Added ARC_SDA_12 relocation. * bfd-in2.h: Regenerated from the previous changes. * libbfd.h: Regenerated from the previous changes. include/ChangeLog: Cupertino Miranda <cmiranda@synopsys.com> * elf/arc-reloc.def: Fixed relocation formula for N*, SDA, SDA_12, SDA_16_LD*, S13_PCREL, N32_ME, SECTOFF_* relocations. * opcode/arc-func.h (replace_disp12s): Added. Used for SDA_12 relocation.
2016-08-26Add support for stable secure gateway veneers addressesThomas Preud'homme17-38/+632
2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com> bfd/ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for the input import library bfd. * bfd-in2.h: Regenerate. * elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd and new_cmse_stub_offset fields. (stub_hash_newfunc): Initialize stub_offset and stub_template_size to -1. (elf32_arm_add_stub): Likewise for stub_offset. (arm_new_stubs_start_offset_ptr): New function. (arm_build_one_stub): Only allocate a stub_offset if it is -1. Allow empty SG veneers to have zero relocations. (arm_size_one_stub): Only initialize stub size and template information for non empty veneers. Do not update veneer section size if veneer already has an offset. (elf32_arm_create_stub): Return the stub entry pointer or NULL instead of a boolean indicating success or failure. (cmse_scan): Change stub_changed parameter into an integer pointer parameter cmse_stub_created to count the number of stub created and adapt to change of return value in elf32_arm_create_stub. (cmse_entry_fct_p): New function. (arm_list_new_cmse_stub): Likewise. (set_cmse_veneer_addr_from_implib): Likewise. (elf32_arm_size_stubs): Define cmse_stub_created, pass its address to cmse_scan instead of that of cmse_stub_changed to compute the number of stub created and use it to initialize stub_changed. Call set_cmse_veneer_addr_from_implib after all cmse_scan. Adapt to change of return value in elf32_arm_create_stub. Use arm_stub_section_start_offset () if not NULL to initialize size of secure gateway veneers section. Initialize stub_offset of Cortex-A8 erratum fix to -1. Use ret to hold return value. (elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not NULL to initialize size of secure gateway veneers section. Adapt comment to stress the importance of zeroing veneer section content. (bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to initialize eponymous field in struct elf32_arm_link_hash_table. ld/ * emultempl/armelf.em (in_implib_filename): Declare and initialize new variable. (arm_elf_create_output_section_statements): Open import input library file for writing and pass resulting in_implib_bfd to bfd_elf32_arm_set_target_relocs. (PARSE_AND_LIST_PROLOGUE): Define OPTION_IN_IMPLIB option. (PARSE_AND_LIST_LONGOPTS): Define --in-implib option. (PARSE_AND_LIST_OPTIONS): Add help message for --in-implib option. (PARSE_AND_LIST_ARGS_CASES): Handle new OPTION_IN_IMPLIB case. * ld.texinfo (--cmse-implib): Update to mention --in-implib. (--in-implib): Document new option. * NEWS: Likewise. * testsuite/ld-arm/arm-elf.exp (Secure gateway import library generation): add --defsym VER=1 to gas CLI. (Secure gateway import library generation: errors): Likewise. (Input secure gateway import library): New test. (Input secure gateway import library: no output import library): Likewise. (Input secure gateway import library: not an SG input import library): Likewise. (Input secure gateway import library: earlier stub section base): Likewise. (Input secure gateway import library: later stub section base): Likewise. (Input secure gateway import library: veneer comeback): Likewise. (Input secure gateway import library: entry function change): Likewise. * testsuite/ld-arm/cmse-implib.s: Add input import library testing. * testsuite/ld-arm/cmse-implib.rd: Update accordingly. * testsuite/ld-arm/cmse-new-implib.out: New file. * testsuite/ld-arm/cmse-new-implib.rd: Likewise. * testsuite/ld-arm/cmse-new-implib-no-output.out: Likewise. * testsuite/ld-arm/cmse-new-implib-not-sg-in-implib.out: Likewise. * testsuite/ld-arm/cmse-new-earlier-later-implib.out: Likewise. * testsuite/ld-arm/cmse-new-comeback-implib.rd: Likewise. * testsuite/ld-arm/cmse-new-wrong-implib.out: Likewise.
2016-08-26Automatic date update in version.inGDB Administrator1-1/+1