Simon Marchi [Thu, 1 Dec 2016 20:59:01 +0000 (15:59 -0500)]
Use std::string for ui_out_hdr's text fields
This patch makes ui_out_hdr use std::string for its text fields. It
makes freeing automatic when the object is deleted.
gdb/ChangeLog:
* mi/mi-out.c (mi_table_header): Change char * args to
std::string.
* cli-out.c (cli_table_header): Likewise.
* ui-out.h (table_header_ftype): Likewise.
(ui_out_table_header): Constify colhdr argument.
(ui_out_query_field): Constify col_name argument.
* ui-out.c (ui_out_hdr) <col_name, colhdr>: Change type to
std::string.
(uo_table_header): Change char * args to std::string.
(ui_out_table_header): Likewise.
(get_next_header): Constify colhdr argument and adapt.
(clear_header_list): Don't free col_name/colhdr fields.
(append_header_to_list): Change char * args to std::string and
adapt.
(verify_field): Constify variable.
(ui_out_query_field): Constify col_name argument and adapt.
* breakpoint.c (wrap_indent_at_field): Constify variable.
Simon Marchi [Thu, 1 Dec 2016 20:58:40 +0000 (15:58 -0500)]
Replace hand-made linked list of ui_out_hdr by vector and iterator
Instead of keeping pointers to first, last and current ui_out_hdr in
ui_out_table, we can use an std::vector and an iterator. Direct random
access of to vector helps make get_next_header a bit nicer by avoiding
iterating on all the headers. append_header_to_list is also a bit
simpler.
Also, using unique_ptr inside the vector allows expressing the ownership
of the ui_out_hdr objects by the ui_out_table object, and it simplifies
the destruction.
gdb/ChangeLog:
* ui-out.c (struct ui_out_hdr) <next>: Remove.
(struct ui_out_table) <header_first, header_last, header_next>: Remove.
<headers, headers_iterator>: New fields.
(ui_out_table_body): Update for the new data structure.
(ui_out_begin): Likewise.
(clear_header_list): Likewise.
(append_header_to_list): Likewise.
(get_next_header): Likewise.
(ui_out_query_field): Likewise.
(ui_out_new): Likewise.
Cary Coutant [Thu, 1 Dec 2016 20:50:21 +0000 (12:50 -0800)]
Fix internal error when relaxing branches to STT_SECTION symbols.
gold/
PR gold/20807
* aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Handle
section symbols correctly.
* arm.cc (Target_arm): Likewise.
* powerpc.cc (Target_powerpc): Likewise.
Luis Machado [Thu, 1 Dec 2016 20:47:50 +0000 (14:47 -0600)]
Fixup testcases outputting own name as a test name and standardize failed compilation messages
Changes in v3:
- Adjusted some testcases where the message "failed to compile" was not unique.
Changes in v2:
- Addressed comments from reviewers.
- Fixed spurious whitespaces.
- Changed compilation failure messages that included source/binary paths to
ones that are short and deterministic.
---
Another bit of cleanup to the testsuite. We have a number of tests that are
not honoring the rule of not outputting their own name as a test name.
I fixed up all the offenders i could find with the following regular
expression:
"(xfail|kfail|kpass|fail|pass|unsupported|untested) ([A-Za-z0-9]+|\\\$(.)*testfile(.)*)\.exp$"
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names and standardize compilation error messages throughout
the following files:
* gdb.ada/start.exp
* gdb.arch/alpha-step.exp
* gdb.arch/e500-prologue.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/gdb1291.exp
* gdb.arch/gdb1431.exp
* gdb.arch/gdb1558.exp
* gdb.arch/i386-dr3-watch.exp
* gdb.arch/i386-sse-stack-align.exp
* gdb.arch/ia64-breakpoint-shadow.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-aix-prologue.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.base/annota1.exp
* gdb.base/annota3.exp
* gdb.base/arrayidx.exp
* gdb.base/assign.exp
* gdb.base/attach.exp
* gdb.base/auxv.exp
* gdb.base/bang.exp
* gdb.base/bfp-test.exp
* gdb.base/bigcore.exp
* gdb.base/bitfields2.exp
* gdb.base/break-fun-addr.exp
* gdb.base/break-probes.exp
* gdb.base/call-rt-st.exp
* gdb.base/callexit.exp
* gdb.base/catch-fork-kill.exp
* gdb.base/charset.exp
* gdb.base/checkpoint.exp
* gdb.base/comprdebug.exp
* gdb.base/constvars.exp
* gdb.base/coredump-filter.exp
* gdb.base/cursal.exp
* gdb.base/cvexpr.exp
* gdb.base/detach.exp
* gdb.base/display.exp
* gdb.base/dmsym.exp
* gdb.base/dprintf-pending.exp
* gdb.base/dso2dso.exp
* gdb.base/dtrace-probe.exp
* gdb.base/dump.exp
* gdb.base/enum_cond.exp
* gdb.base/exe-lock.exp
* gdb.base/exec-invalid-sysroot.exp
* gdb.base/execl-update-breakpoints.exp
* gdb.base/exprs.exp
* gdb.base/fileio.exp
* gdb.base/find.exp
* gdb.base/finish.exp
* gdb.base/fixsection.exp
* gdb.base/foll-vfork.exp
* gdb.base/frame-args.exp
* gdb.base/gcore.exp
* gdb.base/gdb1250.exp
* gdb.base/global-var-nested-by-dso.exp
* gdb.base/gnu-ifunc.exp
* gdb.base/hashline1.exp
* gdb.base/hashline2.exp
* gdb.base/hashline3.exp
* gdb.base/hbreak-in-shr-unsupported.exp
* gdb.base/huge.exp
* gdb.base/infcall-input.exp
* gdb.base/info-fun.exp
* gdb.base/info-shared.exp
* gdb.base/jit-simple.exp
* gdb.base/jit-so.exp
* gdb.base/jit.exp
* gdb.base/jump.exp
* gdb.base/label.exp
* gdb.base/lineinc.exp
* gdb.base/logical.exp
* gdb.base/longjmp.exp
* gdb.base/macscp.exp
* gdb.base/miscexprs.exp
* gdb.base/new-ui-echo.exp
* gdb.base/new-ui-pending-input.exp
* gdb.base/new-ui.exp
* gdb.base/nodebug.exp
* gdb.base/nofield.exp
* gdb.base/offsets.exp
* gdb.base/overlays.exp
* gdb.base/pending.exp
* gdb.base/pointers.exp
* gdb.base/pr11022.exp
* gdb.base/printcmds.exp
* gdb.base/prologue.exp
* gdb.base/ptr-typedef.exp
* gdb.base/realname-expand.exp
* gdb.base/relativedebug.exp
* gdb.base/relocate.exp
* gdb.base/remote.exp
* gdb.base/reread.exp
* gdb.base/return2.exp
* gdb.base/savedregs.exp
* gdb.base/sep.exp
* gdb.base/sepdebug.exp
* gdb.base/sepsymtab.exp
* gdb.base/set-inferior-tty.exp
* gdb.base/setshow.exp
* gdb.base/shlib-call.exp
* gdb.base/sigaltstack.exp
* gdb.base/siginfo-addr.exp
* gdb.base/signals.exp
* gdb.base/signull.exp
* gdb.base/sigrepeat.exp
* gdb.base/so-impl-ld.exp
* gdb.base/solib-display.exp
* gdb.base/solib-overlap.exp
* gdb.base/solib-search.exp
* gdb.base/solib-symbol.exp
* gdb.base/structs.exp
* gdb.base/structs2.exp
* gdb.base/symtab-search-order.exp
* gdb.base/twice.exp
* gdb.base/unload.exp
* gdb.base/varargs.exp
* gdb.base/watchpoint-solib.exp
* gdb.base/watchpoint.exp
* gdb.base/whatis.exp
* gdb.base/wrong_frame_bt_full.exp
* gdb.btrace/dlopen.exp
* gdb.cell/ea-standalone.exp
* gdb.cell/ea-test.exp
* gdb.cp/dispcxx.exp
* gdb.cp/gdb2384.exp
* gdb.cp/method2.exp
* gdb.cp/nextoverthrow.exp
* gdb.cp/pr10728.exp
* gdb.disasm/am33.exp
* gdb.disasm/h8300s.exp
* gdb.disasm/mn10300.exp
* gdb.disasm/sh3.exp
* gdb.dwarf2/dw2-dir-file-name.exp
* gdb.fortran/complex.exp
* gdb.fortran/library-module.exp
* gdb.guile/scm-pretty-print.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-type.exp
* gdb.guile/scm-value.exp
* gdb.linespec/linespec.exp
* gdb.mi/gdb701.exp
* gdb.mi/gdb792.exp
* gdb.mi/mi-breakpoint-changed.exp
* gdb.mi/mi-dprintf-pending.exp
* gdb.mi/mi-dprintf.exp
* gdb.mi/mi-exit-code.exp
* gdb.mi/mi-pending.exp
* gdb.mi/mi-solib.exp
* gdb.mi/new-ui-mi-sync.exp
* gdb.mi/pr11022.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.opt/solib-intra-step.exp
* gdb.python/py-events.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-mi.exp
* gdb.python/py-prettyprint.exp
* gdb.python/py-shared.exp
* gdb.python/py-symbol.exp
* gdb.python/py-template.exp
* gdb.python/py-type.exp
* gdb.python/py-value.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.server/solib-list.exp
* gdb.stabs/weird.exp
* gdb.threads/reconnect-signal.exp
* gdb.threads/stepi-random-signal.exp
* gdb.trace/actions.exp
* gdb.trace/ax.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/deltrace.exp
* gdb.trace/ftrace-lock.exp
* gdb.trace/ftrace.exp
* gdb.trace/infotrace.exp
* gdb.trace/mi-tracepoint-changed.exp
* gdb.trace/packetlen.exp
* gdb.trace/passcount.exp
* gdb.trace/pending.exp
* gdb.trace/range-stepping.exp
* gdb.trace/report.exp
* gdb.trace/stap-trace.exp
* gdb.trace/tfind.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-condition.exp
* gdb.trace/trace-enable-disable.exp
* gdb.trace/trace-mt.exp
* gdb.trace/tracecmd.exp
* gdb.trace/tspeed.exp
* gdb.trace/tsv.exp
* lib/perftest.exp
Luis Machado [Thu, 1 Dec 2016 20:46:28 +0000 (14:46 -0600)]
Fix test names starting with uppercase using multi-line gdb_test_multiple
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_multiple in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
* gdb.cp/gdb2495.exp: Replace gdb_test_multiple
with gdb_test_no_output.
Use command as test name.
Luis Machado [Thu, 1 Dec 2016 20:45:32 +0000 (14:45 -0600)]
Fix test names starting with uppercase using multi-line gdb_test_no_output
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_no_output in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.ada/assign_1.exp
* gdb.ada/boolean_expr.exp
* gdb.base/arrayidx.exp
* gdb.base/del.exp
* gdb.base/gcore-buffer-overflow.exp
* gdb.base/testenv.exp
* gdb.compile/compile.exp
* gdb.python/py-framefilter-invalidarg.exp
* gdb.python/py-framefilter.exp
Luis Machado [Thu, 1 Dec 2016 20:44:38 +0000 (14:44 -0600)]
Fix test names starting with uppercase using multi-line gdb_test/mi_gdb_test
This fixes offender testcases that have test names starting with uppercase
when using gdb_test/mi_gdb_test in a multi-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.ada/array_return.exp
* gdb.ada/expr_delims.exp
* gdb.ada/mi_dyn_arr.exp
* gdb.ada/mi_interface.exp
* gdb.ada/mi_var_array.exp
* gdb.ada/watch_arg.exp
* gdb.arch/alpha-step.exp
* gdb.arch/altivec-regs.exp
* gdb.arch/e500-regs.exp
* gdb.arch/powerpc-d128-regs.exp
* gdb.base/arrayidx.exp
* gdb.base/break.exp
* gdb.base/checkpoint.exp
* gdb.base/debug-expr.exp
* gdb.base/dmsym.exp
* gdb.base/radix.exp
* gdb.base/sepdebug.exp
* gdb.base/testenv.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-cond-gone.exp
* gdb.cell/break.exp
* gdb.cell/ea-cache.exp
* gdb.compile/compile.exp
* gdb.cp/gdb2495.exp
* gdb.gdb/selftest.exp
* gdb.gdb/xfullpath.exp
* gdb.go/hello.exp
* gdb.go/integers.exp
* gdb.objc/basicclass.exp
* gdb.pascal/hello.exp
* gdb.pascal/integers.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-cmd.exp
* gdb.python/py-linetable.exp
* gdb.python/py-xmethods.exp
* gdb.python/python.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/watch-precsave.exp
* gdb.threads/leader-exit.exp
* gdb.threads/pthreads.exp
* gdb.threads/wp-replication.exp
* gdb.trace/actions.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/tsv.exp
Luis Machado [Thu, 1 Dec 2016 20:43:42 +0000 (14:43 -0600)]
Fix test names starting with uppercase using gdb_test_multiple
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_multiple in a single-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/macscp.exp
* gdb.base/pending.exp
* gdb.base/watch_thread_num.exp
* gdb.cp/exception.exp
* gdb.cp/gdb2495.exp
* gdb.cp/local.exp
* gdb.python/py-evsignal.exp
* gdb.python/python.exp
* gdb.trace/tracecmd.exp
Luis Machado [Thu, 1 Dec 2016 20:42:48 +0000 (14:42 -0600)]
Fix test names starting with uppercase using gdb_test_no_output
This fixes offender testcases that have test names starting with uppercase
when using gdb_test_no_output in a single-line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.base/charset.exp
* gdb.base/eval.exp
* gdb.base/multi-forks.exp
* gdb.guile/scm-progspace.exp
* gdb.opencl/datatypes.exp
* gdb.python/py-block.exp
* gdb.python/py-function.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-xmethods.exp
* gdb.reverse/break-precsave.exp
* gdb.reverse/break-reverse.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/consecutive-reverse.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/finish-reverse.exp
* gdb.reverse/fstatat-reverse.exp
* gdb.reverse/getresuid-reverse.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/i386-reverse.exp
* gdb.reverse/i386-sse-reverse.exp
* gdb.reverse/i387-stack-reverse.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/machinestate.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/pipe-reverse.exp
* gdb.reverse/readv-reverse.exp
* gdb.reverse/recvmsg-reverse.exp
* gdb.reverse/rerun-prec.exp
* gdb.reverse/s390-mvcle.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/sigall-reverse.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/step-reverse.exp
* gdb.reverse/time-reverse.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/until-reverse.exp
* gdb.reverse/waitpid-reverse.exp
* gdb.reverse/watch-precsave.exp
* gdb.reverse/watch-reverse.exp
Luis Machado [Thu, 1 Dec 2016 20:41:23 +0000 (14:41 -0600)]
Fix test names starting with uppercase using gdb_test on a single line.
Changes in v3:
Fixed incorrect substitutions.
This fixes offender testcases that have test names starting with uppercase
when using gdb_test in a single line construct.
gdb/testsuite/ChangeLog
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout the files.
* gdb.arch/i386-mpx-simple_segv.exp
* gdb.arch/i386-mpx.exp
* gdb.arch/i386-permbkpt.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-d128-regs.exp
* gdb.arch/vsx-regs.exp
* gdb.base/bfp-test.exp
* gdb.base/break.exp
* gdb.base/breakpoint-shadow.exp
* gdb.base/callfuncs.exp
* gdb.base/charset.exp
* gdb.base/commands.exp
* gdb.base/completion.exp
* gdb.base/dfp-test.exp
* gdb.base/echo.exp
* gdb.base/ending-run.exp
* gdb.base/eval.exp
* gdb.base/expand-psymtabs.exp
* gdb.base/float128.exp
* gdb.base/floatn.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/gdb1056.exp
* gdb.base/gdb11531.exp
* gdb.base/kill-after-signal.exp
* gdb.base/multi-forks.exp
* gdb.base/overlays.exp
* gdb.base/pending.exp
* gdb.base/sepdebug.exp
* gdb.base/testenv.exp
* gdb.base/valgrind-db-attach.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-cond-gone.exp
* gdb.base/watchpoint.exp
* gdb.base/watchpoints.exp
* gdb.cp/arg-reference.exp
* gdb.cp/baseenum.exp
* gdb.cp/operator.exp
* gdb.cp/shadow.exp
* gdb.dwarf2/dw2-op-out-param.exp
* gdb.dwarf2/dw2-reg-undefined.exp
* gdb.go/chan.exp
* gdb.go/hello.exp
* gdb.go/integers.exp
* gdb.go/methods.exp
* gdb.go/package.exp
* gdb.guile/scm-parameter.exp
* gdb.guile/scm-progspace.exp
* gdb.guile/scm-value.exp
* gdb.mi/mi-pending.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.multi/multi-attach.exp
* gdb.multi/tids.exp
* gdb.opt/clobbered-registers-O2.exp
* gdb.pascal/floats.exp
* gdb.pascal/integers.exp
* gdb.python/py-block.exp
* gdb.python/py-events.exp
* gdb.python/py-parameter.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-type.exp
* gdb.python/py-value.exp
* gdb.python/py-xmethods.exp
* gdb.python/python.exp
* gdb.reverse/break-precsave.exp
* gdb.reverse/consecutive-precsave.exp
* gdb.reverse/finish-precsave.exp
* gdb.reverse/i386-precsave.exp
* gdb.reverse/machinestate-precsave.exp
* gdb.reverse/sigall-precsave.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/step-precsave.exp
* gdb.reverse/until-precsave.exp
* gdb.reverse/watch-precsave.exp
* gdb.server/ext-attach.exp
* gdb.server/ext-restart.exp
* gdb.server/ext-run.exp
* gdb.server/ext-wrapper.exp
* gdb.stabs/gdb11479.exp
* gdb.stabs/weird.exp
* gdb.threads/attach-many-short-lived-threads.exp
* gdb.threads/kill.exp
* gdb.threads/watchpoint-fork.exp
Luis Machado [Thu, 1 Dec 2016 20:40:05 +0000 (14:40 -0600)]
Fix test names starting with uppercase output by basic functions
The following patch is based on the previous patch i sent and handles cases of
test names that start with an uppercase letter. Test names should start with
lowercase unless it starts with the name of a technology, architecture, ISA
etc.
This first patch addresses cases of test names output explicitly via xfail,
kfail, kpass, fail, pass, unsupported, untested and also names set with the
pattern "set test" and "set testname".
gdb/testsuite/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
Fix test names starting with uppercase throughout all the files below.
* gdb.ada/array_return.exp
* gdb.ada/catch_ex.exp
* gdb.ada/info_exc.exp
* gdb.ada/mi_catch_ex.exp
* gdb.ada/mi_dyn_arr.exp
* gdb.ada/mi_ex_cond.exp
* gdb.ada/mi_exc_info.exp
* gdb.ada/mi_interface.exp
* gdb.ada/mi_task_arg.exp
* gdb.ada/mi_task_info.exp
* gdb.ada/mi_var_array.exp
* gdb.arch/alpha-step.exp
* gdb.arch/amd64-disp-step.exp
* gdb.arch/arm-disp-step.exp
* gdb.arch/disp-step-insn-reloc.exp
* gdb.arch/e500-prologue.exp
* gdb.arch/ftrace-insn-reloc.exp
* gdb.arch/gdb1558.exp
* gdb.arch/i386-bp_permanent.exp
* gdb.arch/i386-disp-step.exp
* gdb.arch/i386-float.exp
* gdb.arch/i386-gnu-cfi.exp
* gdb.arch/ia64-breakpoint-shadow.exp
* gdb.arch/mips16-thunks.exp
* gdb.arch/pa-nullify.exp
* gdb.arch/powerpc-aix-prologue.exp
* gdb.arch/powerpc-power.exp
* gdb.arch/ppc-dfp.exp
* gdb.arch/s390-tdbregs.exp
* gdb.arch/spu-info.exp
* gdb.arch/spu-ls.exp
* gdb.arch/thumb-bx-pc.exp
* gdb.base/advance.exp
* gdb.base/annota-input-while-running.exp
* gdb.base/arrayidx.exp
* gdb.base/asmlabel.exp
* gdb.base/async.exp
* gdb.base/attach-wait-input.exp
* gdb.base/auto-connect-native-target.exp
* gdb.base/batch-preserve-term-settings.exp
* gdb.base/bfp-test.exp
* gdb.base/bigcore.exp
* gdb.base/bp-permanent.exp
* gdb.base/break-always.exp
* gdb.base/break-fun-addr.exp
* gdb.base/break-idempotent.exp
* gdb.base/break-main-file-remove-fail.exp
* gdb.base/break-probes.exp
* gdb.base/break-unload-file.exp
* gdb.base/break.exp
* gdb.base/call-ar-st.exp
* gdb.base/call-rt-st.exp
* gdb.base/call-sc.exp
* gdb.base/call-signal-resume.exp
* gdb.base/call-strs.exp
* gdb.base/callexit.exp
* gdb.base/callfuncs.exp
* gdb.base/catch-gdb-caused-signals.exp
* gdb.base/catch-signal-siginfo-cond.exp
* gdb.base/catch-syscall.exp
* gdb.base/compare-sections.exp
* gdb.base/cond-eval-mode.exp
* gdb.base/condbreak-call-false.exp
* gdb.base/consecutive-step-over.exp
* gdb.base/cursal.exp
* gdb.base/disabled-location.exp
* gdb.base/disasm-end-cu.exp
* gdb.base/display.exp
* gdb.base/double-prompt-target-event-error.exp
* gdb.base/dprintf-bp-same-addr.exp
* gdb.base/dprintf-detach.exp
* gdb.base/dprintf-next.exp
* gdb.base/dprintf-non-stop.exp
* gdb.base/dprintf-pending.exp
* gdb.base/dso2dso.exp
* gdb.base/ending-run.exp
* gdb.base/enum_cond.exp
* gdb.base/examine-backward.exp
* gdb.base/exe-lock.exp
* gdb.base/exec-invalid-sysroot.exp
* gdb.base/execl-update-breakpoints.exp
* gdb.base/execution-termios.exp
* gdb.base/fileio.exp
* gdb.base/fixsection.exp
* gdb.base/foll-exec-mode.exp
* gdb.base/foll-exec.exp
* gdb.base/fork-running-state.exp
* gdb.base/frame-args.exp
* gdb.base/fullpath-expand.exp
* gdb.base/func-ptr.exp
* gdb.base/gcore-relro-pie.exp
* gdb.base/gdb1090.exp
* gdb.base/gdb1555.exp
* gdb.base/global-var-nested-by-dso.exp
* gdb.base/gnu-ifunc.exp
* gdb.base/hbreak-in-shr-unsupported.exp
* gdb.base/hbreak-unmapped.exp
* gdb.base/hook-stop.exp
* gdb.base/infcall-input.exp
* gdb.base/info-fun.exp
* gdb.base/info-shared.exp
* gdb.base/interrupt-noterm.exp
* gdb.base/jit-so.exp
* gdb.base/jit.exp
* gdb.base/line-symtabs.exp
* gdb.base/list.exp
* gdb.base/longjmp.exp
* gdb.base/macscp.exp
* gdb.base/max-value-size.exp
* gdb.base/nodebug.exp
* gdb.base/nofield.exp
* gdb.base/overlays.exp
* gdb.base/paginate-after-ctrl-c-running.exp
* gdb.base/paginate-bg-execution.exp
* gdb.base/paginate-inferior-exit.exp
* gdb.base/pending.exp
* gdb.base/pr11022.exp
* gdb.base/printcmds.exp
* gdb.base/ptr-typedef.exp
* gdb.base/ptype.exp
* gdb.base/randomize.exp
* gdb.base/range-stepping.exp
* gdb.base/realname-expand.exp
* gdb.base/relativedebug.exp
* gdb.base/remote.exp
* gdb.base/savedregs.exp
* gdb.base/sepdebug.exp
* gdb.base/set-noassign.exp
* gdb.base/shlib-call.exp
* gdb.base/shreloc.exp
* gdb.base/sigaltstack.exp
* gdb.base/sigbpt.exp
* gdb.base/siginfo-addr.exp
* gdb.base/siginfo-obj.exp
* gdb.base/siginfo-thread.exp
* gdb.base/signest.exp
* gdb.base/signull.exp
* gdb.base/sigrepeat.exp
* gdb.base/skip.exp
* gdb.base/so-impl-ld.exp
* gdb.base/solib-corrupted.exp
* gdb.base/solib-disc.exp
* gdb.base/solib-display.exp
* gdb.base/solib-overlap.exp
* gdb.base/solib-search.exp
* gdb.base/solib-symbol.exp
* gdb.base/source-execution.exp
* gdb.base/sss-bp-on-user-bp-2.exp
* gdb.base/sss-bp-on-user-bp.exp
* gdb.base/stack-checking.exp
* gdb.base/stale-infcall.exp
* gdb.base/step-break.exp
* gdb.base/step-line.exp
* gdb.base/step-over-exit.exp
* gdb.base/step-test.exp
* gdb.base/structs.exp
* gdb.base/sym-file.exp
* gdb.base/symtab-search-order.exp
* gdb.base/term.exp
* gdb.base/type-opaque.exp
* gdb.base/unload.exp
* gdb.base/until-nodebug.exp
* gdb.base/until.exp
* gdb.base/unwindonsignal.exp
* gdb.base/watch-cond.exp
* gdb.base/watch-non-mem.exp
* gdb.base/watch_thread_num.exp
* gdb.base/watchpoint-reuse-slot.exp
* gdb.base/watchpoint-solib.exp
* gdb.base/watchpoint.exp
* gdb.btrace/dlopen.exp
* gdb.cell/arch.exp
* gdb.cell/break.exp
* gdb.cell/bt.exp
* gdb.cell/core.exp
* gdb.cell/data.exp
* gdb.cell/dwarfaddr.exp
* gdb.cell/ea-cache.exp
* gdb.cell/ea-standalone.exp
* gdb.cell/ea-test.exp
* gdb.cell/f-regs.exp
* gdb.cell/fork.exp
* gdb.cell/gcore.exp
* gdb.cell/mem-access.exp
* gdb.cell/ptype.exp
* gdb.cell/registers.exp
* gdb.cell/sizeof.exp
* gdb.cell/solib-symbol.exp
* gdb.cell/solib.exp
* gdb.compile/compile-tls.exp
* gdb.cp/exception.exp
* gdb.cp/gdb2495.exp
* gdb.cp/local.exp
* gdb.cp/mb-inline.exp
* gdb.cp/mb-templates.exp
* gdb.cp/pr10687.exp
* gdb.cp/pr9167.exp
* gdb.cp/scope-err.exp
* gdb.cp/templates.exp
* gdb.cp/virtfunc.exp
* gdb.dwarf2/dw2-dir-file-name.exp
* gdb.dwarf2/dw2-single-line-discriminators.exp
* gdb.fortran/complex.exp
* gdb.fortran/library-module.exp
* gdb.guile/guile.exp
* gdb.guile/scm-cmd.exp
* gdb.guile/scm-frame-inline.exp
* gdb.guile/scm-objfile.exp
* gdb.guile/scm-pretty-print.exp
* gdb.guile/scm-symbol.exp
* gdb.guile/scm-type.exp
* gdb.guile/scm-value.exp
* gdb.linespec/keywords.exp
* gdb.linespec/ls-errs.exp
* gdb.linespec/macro-relative.exp
* gdb.linespec/thread.exp
* gdb.mi/mi-breakpoint-changed.exp
* gdb.mi/mi-dprintf-pending.exp
* gdb.mi/mi-fullname-deleted.exp
* gdb.mi/mi-logging.exp
* gdb.mi/mi-pending.exp
* gdb.mi/mi-solib.exp
* gdb.mi/new-ui-mi-sync.exp
* gdb.mi/user-selected-context-sync.exp
* gdb.multi/dummy-frame-restore.exp
* gdb.multi/multi-arch-exec.exp
* gdb.multi/remove-inferiors.exp
* gdb.multi/watchpoint-multi-exit.exp
* gdb.opt/solib-intra-step.exp
* gdb.perf/backtrace.exp
* gdb.perf/single-step.exp
* gdb.perf/skip-command.exp
* gdb.perf/skip-prologue.exp
* gdb.perf/solib.exp
* gdb.python/lib-types.exp
* gdb.python/py-as-string.exp
* gdb.python/py-bad-printers.exp
* gdb.python/py-block.exp
* gdb.python/py-breakpoint.exp
* gdb.python/py-cmd.exp
* gdb.python/py-events.exp
* gdb.python/py-evthreads.exp
* gdb.python/py-finish-breakpoint.exp
* gdb.python/py-finish-breakpoint2.exp
* gdb.python/py-frame-inline.exp
* gdb.python/py-frame.exp
* gdb.python/py-inferior.exp
* gdb.python/py-infthread.exp
* gdb.python/py-mi.exp
* gdb.python/py-objfile.exp
* gdb.python/py-pp-maint.exp
* gdb.python/py-pp-registration.exp
* gdb.python/py-prettyprint.exp
* gdb.python/py-recurse-unwind.exp
* gdb.python/py-shared.exp
* gdb.python/py-symbol.exp
* gdb.python/py-symtab.exp
* gdb.python/py-template.exp
* gdb.python/py-type.exp
* gdb.python/py-unwind-maint.exp
* gdb.python/py-unwind.exp
* gdb.python/py-value.exp
* gdb.python/python.exp
* gdb.reverse/finish-reverse-bkpt.exp
* gdb.reverse/insn-reverse.exp
* gdb.reverse/next-reverse-bkpt-over-sr.exp
* gdb.reverse/solib-precsave.exp
* gdb.reverse/solib-reverse.exp
* gdb.stabs/gdb11479.exp
* gdb.stabs/weird.exp
* gdb.threads/fork-child-threads.exp
* gdb.threads/fork-plus-threads.exp
* gdb.threads/fork-thread-pending.exp
* gdb.threads/forking-threads-plus-breakpoint.exp
* gdb.threads/hand-call-in-threads.exp
* gdb.threads/interrupted-hand-call.exp
* gdb.threads/linux-dp.exp
* gdb.threads/local-watch-wrong-thread.exp
* gdb.threads/next-while-other-thread-longjmps.exp
* gdb.threads/non-ldr-exit.exp
* gdb.threads/pending-step.exp
* gdb.threads/print-threads.exp
* gdb.threads/process-dies-while-detaching.exp
* gdb.threads/process-dies-while-handling-bp.exp
* gdb.threads/pthreads.exp
* gdb.threads/queue-signal.exp
* gdb.threads/reconnect-signal.exp
* gdb.threads/signal-command-handle-nopass.exp
* gdb.threads/signal-command-multiple-signals-pending.exp
* gdb.threads/signal-delivered-right-thread.exp
* gdb.threads/signal-sigtrap.exp
* gdb.threads/sigthread.exp
* gdb.threads/staticthreads.exp
* gdb.threads/stepi-random-signal.exp
* gdb.threads/thread-unwindonsignal.exp
* gdb.threads/thread_check.exp
* gdb.threads/thread_events.exp
* gdb.threads/tid-reuse.exp
* gdb.threads/tls-nodebug.exp
* gdb.threads/tls-shared.exp
* gdb.threads/tls-so_extern.exp
* gdb.threads/tls.exp
* gdb.threads/wp-replication.exp
* gdb.trace/actions-changed.exp
* gdb.trace/actions.exp
* gdb.trace/backtrace.exp
* gdb.trace/change-loc.exp
* gdb.trace/collection.exp
* gdb.trace/deltrace.exp
* gdb.trace/disconnected-tracing.exp
* gdb.trace/entry-values.exp
* gdb.trace/ftrace-lock.exp
* gdb.trace/ftrace.exp
* gdb.trace/infotrace.exp
* gdb.trace/mi-trace-frame-collected.exp
* gdb.trace/mi-trace-unavailable.exp
* gdb.trace/mi-traceframe-changed.exp
* gdb.trace/mi-tracepoint-changed.exp
* gdb.trace/mi-tsv-changed.exp
* gdb.trace/no-attach-trace.exp
* gdb.trace/packetlen.exp
* gdb.trace/passc-dyn.exp
* gdb.trace/passcount.exp
* gdb.trace/pending.exp
* gdb.trace/pr16508.exp
* gdb.trace/qtro.exp
* gdb.trace/range-stepping.exp
* gdb.trace/read-memory.exp
* gdb.trace/report.exp
* gdb.trace/save-trace.exp
* gdb.trace/signal.exp
* gdb.trace/stap-trace.exp
* gdb.trace/status-stop.exp
* gdb.trace/strace.exp
* gdb.trace/tfile.exp
* gdb.trace/tfind.exp
* gdb.trace/trace-break.exp
* gdb.trace/trace-condition.exp
* gdb.trace/trace-enable-disable.exp
* gdb.trace/trace-mt.exp
* gdb.trace/tracecmd.exp
* gdb.trace/tracefile-pseudo-reg.exp
* gdb.trace/tspeed.exp
* gdb.trace/tstatus.exp
* gdb.trace/tsv.exp
* gdb.trace/unavailable.exp
* gdb.trace/while-dyn.exp
* gdb.trace/while-stepping.exp
* lib/gdb-guile.exp
* lib/gdb.exp
* lib/mi-support.exp
* lib/pascal.exp
* lib/perftest.exp
* lib/prelink-support.exp
* lib/selftest-support.exp
Jim Wilson [Thu, 1 Dec 2016 17:07:55 +0000 (09:07 -0800)]
Fix typo in ChangeLog entry.
Jim Wilson [Thu, 1 Dec 2016 17:06:07 +0000 (09:06 -0800)]
Fix bug with FP stur instructions.
sim/aarch64
* simulator.c (fsturs): Switch use of rn and st variables.
(fsturd, fsturq): Likewise
Nick Clifton [Thu, 1 Dec 2016 15:20:19 +0000 (15:20 +0000)]
Fix seg fault attempting to unget an EOF character.
PR gas/20898
* app.c (do_scrub_chars): Do not attempt to unget EOF.
Nick Clifton [Thu, 1 Dec 2016 15:02:45 +0000 (15:02 +0000)]
Fix seg-fault printing assembler statistics when the output file was not created.
PR gas/20897
* subsegs.c (subsegs_print_statistics): Do nothing if no output
file was created.
Rudy Y [Thu, 1 Dec 2016 14:43:36 +0000 (14:43 +0000)]
Fix generation of IDATA[6] for PE files.
PR ld/20880
* pe-dll.c (make_one): Use the hint if the ordinal is -1.
Luis Machado [Thu, 1 Dec 2016 14:42:11 +0000 (08:42 -0600)]
Fix calculation of synthetic symbol sizes (ppc64)
The attached patch fixes a problem where nm displays bogus information for
synthetic symbol sizes when --size-sort is used.
This happens because the synthetic symbols (dot symbols for ppc64) are
generated based on their non-dot symbols. The generation process doesn't copy
over the ELF-specific bits of the regular non-dot symbols.
When --size-sort is used, the code attempts to access the symbol size from
the ELF-specific bits and ends up reading gargabe, causing the size to be
displayed incorrectly.
With the patch, i can see dot and non-dot symbols having the same size with
--size-sort.
This doesn't fix the fact that we don't display size information for synthetic
symbols without --size-sort, which i may address in the future.
binutils/ChangeLog:
2016-12-01 Luis Machado <lgustavo@codesourcery.com>
* nm.c (sort_symbols_by_size): Don't read symbol size if symbol
is synthetic.
Yury Norov [Thu, 1 Dec 2016 12:31:51 +0000 (12:31 +0000)]
Fix accesses to the GOT for AARCH64 operating in 32-bit mode.
PR ld/20868
bfd * elfnn-aarch64.c (elfNN_aarch64_tls_relax): Use 32-bit accesses
to the GOT when operating in 32-bit mode.
ld * testsuite/ld-aarch64/tls-relax-gd-ie-ilp32.d: New test.
* testsuite/ld-aarch64/relocs-ilp32.ld: Linker script for the new
test.
* testsuite/ld-aarch64/aarch64-elf.exp: Run the new test.
Ma Jiang [Thu, 1 Dec 2016 12:21:30 +0000 (12:21 +0000)]
Fix handling of MIPS16 HI16 relocs.
PR ld/16720
* elfxx-mips.c (mips_elf_calculate_relocation): Remove overflow
test for HI16 relocs.
Nick Clifton [Thu, 1 Dec 2016 10:49:39 +0000 (10:49 +0000)]
Fix a seg-fault disassembling a corrupt binary.
PR binutils/20892
* aoutx.h (find_nearest_line): Handle the case where the function
name is empty.
Nick Clifton [Thu, 1 Dec 2016 10:38:40 +0000 (10:38 +0000)]
Fix ICE in assembler when passed a corrupt input file.
PR gas/20895
* symbols.c (resolve_symbol_value): Gracefully handle erroneous
symbolic expressions.
Nick Clifton [Thu, 1 Dec 2016 10:26:32 +0000 (10:26 +0000)]
Fix abort in x86 disassembler.
PR binutils/20893
* i386-dis.c (OP_VEX): Replace call to abort with a append of bad
opcode designator.
Nick Clifton [Thu, 1 Dec 2016 10:15:07 +0000 (10:15 +0000)]
Fix seg-fault running addr2line on a corrupt binary.
PR binutils/20891
* aoutx.h (find_nearest_line): Handle the case where the main file
name and the directory name are both empty.
Simon Marchi [Thu, 1 Dec 2016 02:46:49 +0000 (21:46 -0500)]
Use std::string in ui_out_table
Use std::string for the id field of the ui_out_table object.
I found that all users of ui_out_table_begin passed a non-NULL value to
the tblid parameter, so we don't have to worry about the NULL case. I
changed the tblid parameter to be a std::string while at it.
gdb/ChangeLog:
* ui-out.c (struct ui_out_table) <id>: Change type to
std::string.
(ui_out_table_begin): Change tblid parameter type to
std::string, adapt code.
update following type change.
(clear_table): Update.
(ui_out_new): Update.
Simon Marchi [Thu, 1 Dec 2016 02:46:08 +0000 (21:46 -0500)]
Use std::vector for cli_ui_out_data::streams
Use a standard vector instead of the home-made version. I used a vector
of plain pointers, because the cli_ui_out_data object doesn't own the
streams objects (i.e. they shouldn't be deleted when the vector is
deleted).
gdb/ChangeLog:
* cli-out.h (cli_ui_out_data) <streams>: Change type to
std::vector.
* cli-out.c: Remove vec.h include.
(cli_uiout_dtor): Update.
(cli_field_fmt): Update.
(cli_spaces): Update.
(cli_text): Update.
(cli_message): Update.
(cli_flush): Update.
(cli_redirect): Update.
(out_field_fmt): Update.
(field_separator): Update.
(cli_out_data_ctor): Update.
(cli_out_new): Update.
(cli_out_set_stream): Update.
Simon Marchi [Thu, 1 Dec 2016 02:43:17 +0000 (21:43 -0500)]
Use std::vector for mi_ui_out_data::streams
Use a standard vector instead of the home-made version. I used a vector
of plain pointers, because the mi_ui_out_data object doesn't own the
streams objects (i.e. they shouldn't be deleted when the vector is
deleted).
gdb/ChangeLog:
* mi/mi-out.c: Remove vec.h include.
(mi_ui_out_data) <streams>: Change type to std::vector.
(mi_field_string): Update.
(mi_field_fmt): Update.
(mi_flush): Update.
(mi_redirect): Update.
(field_separator): Update.
(mi_open): Update.
(mi_close): Update.
(mi_out_buffered): Update.
(mi_out_rewind): Update.
(mi_out_put): Update.
(mi_out_data_ctor): Update.
(mi_out_data_dtor): Don't free streams.
Simon Marchi [Thu, 1 Dec 2016 02:42:47 +0000 (21:42 -0500)]
Use std::vector for ui_out::levels
Convert the levels field of struct ui_out to be a vector of unique_ptr
to ui_out_level. This way, the ownership of the ui_out_level objects by
the ui_out instance is clear.
gdb/ChangeLog:
* ui-out.c (ui_out_level_p): Remove typedef.
(DEF_VEC_P (ui_out_level_p)): Remove definition.
(struct ui_out) <levels>: Change type to vector of unique_ptr of
ui_out_level.
(current_level): Update.
(push_level): Update.
(pop_level): Update, don't manually delete the ui_out_level
instance.
(ui_out_new): Update.
Simon Marchi [Thu, 1 Dec 2016 02:41:46 +0000 (21:41 -0500)]
Use new/delete instead of malloc/free-based functions
The following patches introduce C++ vectors and strings as fields of the
various ui_out structures. We therefore need to use new/delete so that
their contructor/destructor is called. I find it simpler to change all
the allocations in a separate preliminary patch, rather than in each
individual patch.
gdb/ChangeLog:
* cli-out.c (cli_uiout_dtor): Use delete instead of xfree.
(cli_out_new): Use new instead of XNEW.
* mi/mi-out.c (mi_out_data_dtor): Use delete instead of xfree.
(mi_out_new): Use new instead of XNEW.
* tui/tui-out.c (tui_out_new): Likewise.
* ui-out.c (push_level): Likewise.
(pop_level): Use delete instead of xfree.
(clear_header_list): Use delete instead of xfree.
(append_header_to_list): Use new instead of XNEW.
(ui_out_new): Likewise.
GDB Administrator [Thu, 1 Dec 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Wed, 30 Nov 2016 21:23:59 +0000 (16:23 -0500)]
Makefiles: Disable suffix rules and implicit rules
Since we don't use suffix rules nor implicit rules in gdb, we can
disable them. The advantage is a slightly faster make [1].
Here are some numbers about the speedup. I ran this on my trusty old
Intel Q6600, so the time numbers are probably higher than what you'd get
on any recent hardware. I ran "make" in the gdb/ directory of an
already built repository (configured with --enable-targets=all). I
recorded the time of execution (average of 5). I then ran "make -d" and
recorded the number of printed lines, which gives a rough idea of the
number of operations done.
I compared the following configurations, to see the impact of both the
empty .SUFFIXES target and the empty pattern rules, as well as running
"make -r", which can be considered the "ideal" case.
A - baseline
B - baseline + .SUFFIXES
C - baseline + pattern rules
D - baseline + .SUFFIXES + pattern rules
E - baseline + make -r
config | time (s) | "make -d"
-----------------------------
A | 5.74 | 2396643
B | 1.19 | 298469
C | 2.81 | 1266573
D | 1.13 | 245489
E | 1.01 | 163914
We can see that the empty .SUFFIXES target has a bigger impact than the
empty pattern rules, but still it doesn't hurt to disable the implicit
pattern rules as well.
There are still some mentions of implicit rules I can't get rid of in
the "make -d" output. For example, it's trying to build .c files from
.w files:
Looking for an implicit rule for '/home/simark/src/binutils-gdb/gdb/infrun.c'.
Trying pattern rule with stem 'infrun'.
Trying implicit prerequisite '/home/simark/src/binutils-gdb/gdb/infrun.w'.
and trying to build Makefile.in from a bunch of extensions:
Looking for an implicit rule for 'Makefile.in'.
Trying pattern rule with stem 'Makefile.in'.
Trying implicit prerequisite 'Makefile.in.o'.
Trying pattern rule with stem 'Makefile.in'.
Trying implicit prerequisite 'Makefile.in.c'.
Trying pattern rule with stem 'Makefile.in'.
Trying implicit prerequisite 'Makefile.in.cc'.
... many more ...
If somebody knows how to disable them, we can do it, but at this point
the returns are minimal, so it is not that important.
I verified that both in-tree and out-of-tree builds work.
[1] Switching from explicit rules to pattern rules for files in
subdirectories actually made it slower, so this is kind of a way to
redeem myself. But it the end it's faster than it was previously,
so it was all worth it. :)
gdb/ChangeLog:
* disable-implicit-rules.mk: New file.
* Makefile.in: Include disable-implicit-rules.mk.
* data-directory/Makefile.in: Likewise.
* gnulib/Makefile.in: Likewise.
gdb/doc/ChangeLog:
* Makefile.in: Likewise.
gdb/gdbserver/ChangeLog:
* Makefile.in: Include disable-implicit-rules.mk.
gdb/testsuite/ChangeLog:
* Makefile.in: Include disable-implicit-rules.mk.
Yao Qi [Wed, 30 Nov 2016 11:55:56 +0000 (11:55 +0000)]
[ARM] Read memory as unsigned integer
When GDB read inferior memory as an address or an instruction,
it should be unsigned.
gdb:
2016-11-30 Yao Qi <yao.qi@linaro.org>
* arm-tdep.c (arm_scan_prologue): Read memory as unsigned integer.
(arm_exidx_unwind_sniffer): Likewise.
Alan Modra [Mon, 28 Nov 2016 05:44:56 +0000 (16:14 +1030)]
Revert accidental elf.c change
* elf.c (get_program_header_size): Revert accidental change.
Nick Clifton [Wed, 30 Nov 2016 11:06:42 +0000 (11:06 +0000)]
Stop readelf from complaining about out of order PT_LOAD segments.
PR ld/20815
* readelf.c (process_program_headers): Do not warn about out of
order PT_LOAD segments.
Alan Modra [Wed, 30 Nov 2016 05:03:07 +0000 (15:33 +1030)]
PR20886, looping in ppc64_elf_size_stubs
The PR20886 binary is large enough that there are two stub sections
servicing .text (which is 88M). It so happens that between one
iteration of sizing and the next that one stub section grows while
the other shrinks. Since one section is always growing, the loop
never terminates.
This patch changes the algorithm to not update previous size on
shrinking, once we go past a certain number of iterations.
PR ld/20886
* elf64-ppc.c (ppc64_elf_size_stubs): Make rawsize max size seen
on any pass past STUB_SHRINK_ITER.
GDB Administrator [Wed, 30 Nov 2016 00:00:20 +0000 (00:00 +0000)]
Automatic date update in version.in
Claudiu Zissulescu [Tue, 15 Nov 2016 14:11:47 +0000 (15:11 +0100)]
[ARC] Add checking for LP_COUNT reg usage, improve error reporting.
gas/
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/tc-arc.c (find_opcode_match): New function argument
errmsg.
(assemble_tokens): Collect and report the eventual error message
found during opcode matching process.
* testsuite/gas/arc/lpcount-err.s: New file.
* testsuite/gas/arc/add_s-err.s: Update error message.
opcode/
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* arc-opc.c (insert_ra_chk): New function.
(insert_rb_chk): Likewise.
(insert_rad): Update text error message.
(insert_rcd): Likewise.
(insert_rhv2): Likewise.
(insert_r0): Likewise.
(insert_r1): Likewise.
(insert_r2): Likewise.
(insert_r3): Likewise.
(insert_sp): Likewise.
(insert_gp): Likewise.
(insert_pcl): Likewise.
(insert_blink): Likewise.
(insert_ilink1): Likewise.
(insert_ilink2): Likewise.
(insert_ras): Likewise.
(insert_rbs): Likewise.
(insert_rcs): Likewise.
(insert_simm3s): Likewise.
(insert_rrange): Likewise.
(insert_fpel): Likewise.
(insert_blinkel): Likewise.
(insert_pcel): Likewise.
(insert_nps_3bit_dst): Likewise.
(insert_nps_3bit_dst_short): Likewise.
(insert_nps_3bit_src2_short): Likewise.
(insert_nps_bitop_size_2b): Likewise.
(MAKE_SRC_POS_INSERT_EXTRACT_FUNCS): Likewise.
(RA_CHK): Define.
(RB): Adjust.
(RB_CHK): Define.
(RC): Adjust.
* arc-dis.c (print_insn_arc): Add LOAD and STORE class.
* arc-tbl.h (div, divu): All instructions are DIVREM class.
Change first insn argument to check for LP_COUNT usage.
(rem): Likewise.
(ld, ldd): All instructions are LOAD class. Change first insn
argument to check for LP_COUNT usage.
(st, std): All instructions are STORE class.
(mac, mpy, dmac, mul, dmpy): All instructions are MPY class.
Change first insn argument to check for LP_COUNT usage.
(mov): All instructions are MOVE class. Change first insn
argument to check for LP_COUNT usage.
include/
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* opcode/arc.h (insn_class_t): Add DIVREM, LOAD, MOVE, MPY, STORE
instruction classes.
Claudiu Zissulescu [Thu, 6 Oct 2016 10:05:27 +0000 (12:05 +0200)]
[ARC] Fix disassembler option.
This patch fixes:
- fpus and fpud are swaped.
- quarkse_em doesn't include FPX extensions.
- auto guessed opcode mechanism may ignore the option passed via -M<feature> option.
opcodes/
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* arc-dis.c (is_compatible_p): Remove function.
(skip_this_opcode): Don't add any decoding class to decode list.
Remove warning.
(find_format_from_table): Go through all opcodes, and warn if we
use a guessed mnemonic.
binutils/
2016-11-29 Claudiu Zissulescu <claziss@synopsys.com>
* testsuite/binutils-all/arc/objdump.exp (Warning test): Update
test.
Simon Marchi [Tue, 29 Nov 2016 02:34:54 +0000 (21:34 -0500)]
Fix debug output in record_full_open_1
The printed function name should be record_full_open_1, not
record_full_open.
gdb/ChangeLog:
* record-full.c (record_full_open_1): Fix debug output.
GDB Administrator [Tue, 29 Nov 2016 00:00:22 +0000 (00:00 +0000)]
Automatic date update in version.in
Andrew Burgess [Fri, 18 Nov 2016 14:15:12 +0000 (14:15 +0000)]
arc/ld: Remove duplicate TEMPLATE_NAME from emulparam file
Remove duplicate definition of TEMPLATE_NAME, only the last of these
will have any effect, so this should result in no visible changes to the
user.
ld/ChangeLog:
* emulparams/arclinux_prof.sh: Remove duplicate TEMPLATE_NAME.
Nick Clifton [Mon, 28 Nov 2016 17:51:57 +0000 (17:51 +0000)]
Update linker tests after partial reversion of PR 20815 patch.
PR 20815
* testsuite/ld-elf/loadaddr1.d: Update.
* testsuite/ld-powerpc/vle-multiseg-5.d: Update.
* testsuite/ld-scripts/phdrs3a.d: Update.
Nick Clifton [Mon, 28 Nov 2016 17:45:22 +0000 (17:45 +0000)]
Partially revert patch for PR 20815 - do not sort the PT_LOAD segments. Non-ordered segments are needed by the Linux kernel.
PR ld/20815
* elf.c (phdr_sorter): Delete.
(assign_file_positions_except_relocs): Do not sort program
headers.
Amit Pawar [Mon, 28 Nov 2016 17:21:05 +0000 (09:21 -0800)]
X86: Ignore REX_B bit for 32-bit XOP instructions
While decoding 32-bit XOP instructions, 64 bit registers names are printed.
This patch fixes this by ignoring REX_B bit in 32-bit mode.
opcodes/
PR binutils/20637
* i386-dis.c (get_valid_dis386): Ignore REX_B for 32-bit XOP
instructions.
gas/
PR binutils/20637
* testsuite/gas/i386/xop32reg.d: New file.
* testsuite/gas/i386/xop32reg.s: New file.
* testsuite/gas/i386/i386.exp: Run new test.
Yao Qi [Mon, 28 Nov 2016 17:09:26 +0000 (17:09 +0000)]
Restrict checking value.lval on using address
With the previous change, value.location.address is only valid for
lval_memory. This patch restrict some checking on value.lval on
using address. Since we have a check on VALUE_VAL in
set_value_address, we need to set VALUE_VAL properly before
set_value_address too.
gdb:
2016-11-25 Yao Qi <yao.qi@linaro.org>
* ada-lang.c (ensure_lval): Call set_value_address after setting
VALUE_LVAL.
* elfread.c (elf_gnu_ifunc_resolve_addr): Set VALUE_LVAL to
lval_memory.
(elf_gnu_ifunc_resolver_return_stop): Likewise.
* value.c (value_fn_field): Likewise.
(value_from_contents_and_address_unresolved): Likewise.
(value_from_contents_and_address): Likewise.
(value_address): Check value->lval isn't
lval_memory.
(value_raw_address): Likewise.
(set_value_address): Assert value->lval is lval_memory.
Yao Qi [Mon, 28 Nov 2016 17:09:26 +0000 (17:09 +0000)]
Adjust Value.location for lval_register
value.regnum and value.next_frame_id are only used for lval_register,
so this patch moves them to union value.location. As a result, when
we copy value, only copy location, don't need to copy regnum and
next_frame_id.
This patch also changes regnum's type to int as there is no space
constraint, so update deprecated_value_regnum_hack return type too.
gdb:
2016-11-28 Yao Qi <yao.qi@linaro.org>
* valops.c (value_slice): Don't set frame id of slice.
* value.c (struct value) <regnum, next_frame_id>: Move them to...
(struct value) <location>: ... here. Update comments.
(allocate_value_lazy): Don't set frame id and regnum.
(deprecated_value_next_frame_id_hack): Adjust.
(deprecated_value_regnum_hack): Adjust.
(value_copy): Don't copy frame id and regnu.
(value_primitive_field): Likewise.
(value_from_component): Likewise.
(deprecated_value_regnum_hack): Return int *.
* value.h (deprecated_value_regnum_hack): Update declaration.
Yao Qi [Mon, 28 Nov 2016 17:09:26 +0000 (17:09 +0000)]
Move computed value's frame id to piece_closure
Nowadays, we set computed value's frame id, which is a misuse to me.
The computed value itself doesn't care about frame id, but function
value_computed_funcs (val)->read (or read_pieced_value) cares about
which frame the register is relative to, so 'struct piece_closure' is
a better place to fit frame id.
This patch adds a frame id in 'struct piece_closure', and use it
instead of using computed value's frame id.
gdb:
2016-11-28 Yao Qi <yao.qi@linaro.org>
* dwarf2loc.c (struct piece_closure) <frame_id>: New field.
(allocate_piece_closure): Add new parameter 'frame' and set
closure's frame_id field accordingly.
(read_pieced_value): Get frame from closure instead of value.
(dwarf2_evaluate_loc_desc_full): Remove code getting frame id.
Don't set value's frame id.
H.J. Lu [Mon, 28 Nov 2016 16:03:46 +0000 (08:03 -0800)]
Properly hide hidden versioned symbol in executable
A hidden versioned symbol in executable should be forced local if it is
locally defined, not referenced by shared library and not exported. We
must do it before _bfd_elf_link_renumber_dynsyms.
bfd/
* elflink.c (_bfd_elf_fix_symbol_flags): Hide hidden versioned
symbol in executable.
(elf_link_output_extsym): Don't change bind from global to
local when linking executable.
ld/
* testsuite/ld-elf/indirect.exp: Add a test for PR 18720.
* testsuite/ld-elf/pr18720.rd: New file.
GDB Administrator [Mon, 28 Nov 2016 00:00:22 +0000 (00:00 +0000)]
Automatic date update in version.in
Alan Modra [Sun, 27 Nov 2016 09:37:08 +0000 (20:07 +1030)]
Fix powerpc vle test for sorting of program headers
1a9ccd70f changed the order of headers.
PR 20815
* testsuite/ld-powerpc/vle-multiseg-5.d: Update.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:54 +0000 (21:01 +0100)]
Fix spelling in comments in .y files (ld)
* deffilep.y: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:53 +0000 (21:01 +0100)]
Fix spelling in comments in .y files (binutils)
* arparse.y: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:52 +0000 (21:01 +0100)]
Fix spelling in comments in .sc files (ld)
* scripttempl/ia64vms.sc: Fix spelling in comments.
* scripttempl/ip2k.sc: Fix spelling in comments.
* scripttempl/v850.sc: Fix spelling in comments.
* scripttempl/v850_rh850.sc: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:51 +0000 (21:01 +0100)]
Fix spelling in comments in .l files (gas)
* config/bfin-lex.l: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:50 +0000 (21:01 +0100)]
Fix spelling in comments in .em files (ld)
* emultempl/avrelf.em: Fix spelling in comments.
* emultempl/elf32.em: Fix spelling in comments.
* emultempl/pe.em: Fix spelling in comments.
* emultempl/pep.em: Fix spelling in comments.
* emultempl/spuelf.em: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:49 +0000 (21:01 +0100)]
Fix spelling in comments in .def files (gold)
* aarch64-reloc.def: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:48 +0000 (21:01 +0100)]
Fix spelling in comments in Expect scripts (ld)
* testsuite/ld-sh/arch/arch.exp: Fix spelling in comments.
* testsuite/ld-sh/rd-sh.exp: Fix spelling in comments.
* testsuite/ld-sh/sh64/rd-sh64.exp: Fix spelling in comments.
* testsuite/ld-undefined/undefined.exp: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:47 +0000 (21:01 +0100)]
Fix spelling in comments in Expect scripts (gas)
* testsuite/gas/all/gas.exp: Fix spelling in comments.
* testsuite/gas/cris/cris.exp: Fix spelling in comments.
* testsuite/gas/hppa/basic/basic.exp: Fix spelling in comments.
* testsuite/gas/hppa/parse/parse.exp: Fix spelling in comments.
* testsuite/gas/hppa/reloc/reloc.exp: Fix spelling in comments.
* testsuite/gas/sh/arch/arch.exp: Fix spelling in comments.
* testsuite/gas/tic4x/tic4x.exp: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:46 +0000 (21:01 +0100)]
Fix spelling in comments in Assembler files (ld)
* testsuite/ld-arm/stm32l4xx-fix-all.s: Fix spelling in comments.
* testsuite/ld-arm/thumb2-b-interwork.s: Fix spelling in comments.
* testsuite/ld-arm/thumb2-bl.s: Fix spelling in comments.
* testsuite/ld-s390/tlspic1.s: Fix spelling in comments.
* testsuite/ld-s390/tlspic1_64.s: Fix spelling in comments.
* testsuite/ld-scripts/section-match-1.d: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:45 +0000 (21:01 +0100)]
Fix spelling in comments in Assembler files (gas)
* testsuite/gas/arm/local_function.d: Fix spelling in comments.
* testsuite/gas/arm/req.s: Fix spelling in comments.
* testsuite/gas/arm/vfp1.s: Fix spelling in comments.
* testsuite/gas/arm/vfp1_t2.s: Fix spelling in comments.
* testsuite/gas/arm/vfp1xD.s: Fix spelling in comments.
* testsuite/gas/arm/vfp1xD_t2.s: Fix spelling in comments.
* testsuite/gas/mcore/allinsn.s: Fix spelling in comments.
* testsuite/gas/mips/24k-triple-stores-5.s: Fix spelling in comments.
* testsuite/gas/mips/delay.d: Fix spelling in comments.
* testsuite/gas/mips/nodelay.d: Fix spelling in comments.
* testsuite/gas/mips/r5900-full.s: Fix spelling in comments.
* testsuite/gas/mips/r5900.s: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:44 +0000 (21:01 +0100)]
Fix spelling in comments in C source files (ld)
* deffile.h: Fix spelling in comments.
* ld.h: Fix spelling in comments.
* ldlang.c: Fix spelling in comments.
* ldmisc.c: Fix spelling in comments.
* pe-dll.c: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:43 +0000 (21:01 +0100)]
Fix spelling in comments in C source files (gprof)
* basic_blocks.c: Fix spelling in comments.
* cg_arcs.c: Fix spelling in comments.
* cg_print.c: Fix spelling in comments.
* corefile.c: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:42 +0000 (21:01 +0100)]
Fix spelling in comments in C source files (gold)
* aarch64.cc: Fix spelling in comments.
* arm.cc: Fix spelling in comments.
* icf.cc: Fix spelling in comments.
* layout.cc: Fix spelling in comments.
* layout.h: Fix spelling in comments.
* mips.cc: Fix spelling in comments.
* output.h: Fix spelling in comments.
* plugin.h: Fix spelling in comments.
* script-sections.h: Fix spelling in comments.
* script.h: Fix spelling in comments.
* stringpool.h: Fix spelling in comments.
* tilegx.cc: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:41 +0000 (21:01 +0100)]
Fix spelling in comments in C source files (gas)
* as.h: Fix spelling in comments.
* config/obj-ecoff.c: Fix spelling in comments.
* config/obj-macho.c: Fix spelling in comments.
* config/tc-aarch64.c: Fix spelling in comments.
* config/tc-arc.c: Fix spelling in comments.
* config/tc-arm.c: Fix spelling in comments.
* config/tc-avr.c: Fix spelling in comments.
* config/tc-cr16.c: Fix spelling in comments.
* config/tc-epiphany.c: Fix spelling in comments.
* config/tc-frv.c: Fix spelling in comments.
* config/tc-hppa.c: Fix spelling in comments.
* config/tc-hppa.h: Fix spelling in comments.
* config/tc-i370.c: Fix spelling in comments.
* config/tc-m68hc11.c: Fix spelling in comments.
* config/tc-m68k.c: Fix spelling in comments.
* config/tc-mcore.c: Fix spelling in comments.
* config/tc-mep.c: Fix spelling in comments.
* config/tc-metag.c: Fix spelling in comments.
* config/tc-mips.c: Fix spelling in comments.
* config/tc-mn10200.c: Fix spelling in comments.
* config/tc-mn10300.c: Fix spelling in comments.
* config/tc-nds32.c: Fix spelling in comments.
* config/tc-nios2.c: Fix spelling in comments.
* config/tc-ns32k.c: Fix spelling in comments.
* config/tc-pdp11.c: Fix spelling in comments.
* config/tc-ppc.c: Fix spelling in comments.
* config/tc-riscv.c: Fix spelling in comments.
* config/tc-rx.c: Fix spelling in comments.
* config/tc-score.c: Fix spelling in comments.
* config/tc-score7.c: Fix spelling in comments.
* config/tc-sparc.c: Fix spelling in comments.
* config/tc-tic54x.c: Fix spelling in comments.
* config/tc-vax.c: Fix spelling in comments.
* config/tc-xgate.h: Fix spelling in comments.
* config/tc-xtensa.c: Fix spelling in comments.
* config/tc-z80.c: Fix spelling in comments.
* dwarf2dbg.c: Fix spelling in comments.
* input-file.h: Fix spelling in comments.
* itbl-ops.c: Fix spelling in comments.
* read.c: Fix spelling in comments.
* stabs.c: Fix spelling in comments.
* symbols.c: Fix spelling in comments.
* write.c: Fix spelling in comments.
* testsuite/gas/all/itbl-test.c: Fix spelling in comments.
* testsuite/gas/tic4x/opclasses.h: Fix spelling in comments.
Ambrogino Modigliani [Fri, 25 Nov 2016 20:01:40 +0000 (21:01 +0100)]
Fix spelling in comments in C source files (binutils)
* dwarf.c: Fix spelling in comments.
* dwarf.h: Fix spelling in comments.
* objcopy.c: Fix spelling in comments.
* od-macho.c: Fix spelling in comments.
* rclex.c: Fix spelling in comments.
* readelf.c: Fix spelling in comments.
* stabs.c: Fix spelling in comments.
Simon Marchi [Sun, 27 Nov 2016 03:06:07 +0000 (22:06 -0500)]
Remove verbosity from ui_out_message and friends
That concept is never actually used, so it's just a burden. Removing it
facilitates the refactoring in upcoming patches.
gdb/ChangeLog:
* mi/mi-out.c (mi_message): Remove verbosity argument.
* ada-tasks.c (print_ada_task_info, info_task, task_command):
Update call.
* auto-load.c (auto_load_info_scripts): Likewise.
* breakpoint.c (breakpoint_1, watchpoints_info, tracepoints_info):
Likewise.
* cli-out.c (cli_message): Remove verbosity argument.
* inferior.c (print_inferior): Update call.
* linux-thread-db.c (info_auto_load_libthread_db): Likewise.
* probe.c (info_probes_for_ops): Likewise.
* skip.c (skip_info): Likewise.
* solib.c (info_sharedlibrary_command): Likewise.
* symfile.c (load_progress): Likewise.
* thread.c (print_thread_info_1): Likewise.
* ui-out.c (uo_message, ui_out_message): Remove verbosity argument.
(ui_out_get_verblvl): Remove.
* ui-out.h (ui_out_message): Remove verbosity argument.
(ui_out_get_verblvl): Remove.
(message_ftype): Remove verbosity argument.
Simon Marchi [Sun, 27 Nov 2016 03:05:42 +0000 (22:05 -0500)]
Constify wrap_here/wrap_hint code path
Constify the data path between ui_out_wrap_hint and the wrap_indent
global, because we can. It's clearer that the argument passed to
wrap_hint is not intended to be modified by the ui_out implementation.
gdb/ChangeLog:
* mi/mi-out.c (mi_wrap_hint): Constify argument.
* cli-out.c (cli_wrap_hint): Likewise.
* ui-out.c (ui_out_wrap_hint, uo_wrap_hint): Likewise.
* ui-out.h (ui_out_wrap_hint, wrap_hint_ftype): Likewise.
* utils.c (wrap_here): Likewise.
(wrap_indent): Constify.
* utils.h (wrap_here): Constify argument.
Simon Marchi [Sun, 27 Nov 2016 03:05:25 +0000 (22:05 -0500)]
Fix return value of uo_redirect
The wrapper uo_redirect seems like it should return the return value
from of implementation function, since callers rely on it, but it
doesn't.
gdb/ChangeLog:
* ui-out.c (uo_redirect): Return the return value from the
implementation function.
Simon Marchi [Sun, 27 Nov 2016 03:05:06 +0000 (22:05 -0500)]
Remove ui_out_destroy
It's not actually used, and removing it simplifies the upcoming patches
a bit. After the whole series, destroying an ui_out object will be
simply "delete uiout", which will call the default destructor.
gdb/ChangeLog:
* ui-out.c (ui_out_destroy, uo_data_destroy): Remove.
* ui-out.h (ui_out_destroy): Remove.
Simon Marchi [Sun, 27 Nov 2016 03:04:49 +0000 (22:04 -0500)]
Rename ui_out_data to mi_ui_out_data
Just a little cleanup, so the name is more consistent with the naming of
the equivalent structures of cli and tui. It goes away in subsequent
patches anyway, but it might help follow the changes in those patches...
gdb/ChangeLog:
* mi/mi-out.c (ui_out_data): Rename to ...
(mi_ui_out_data): ... this.
Simon Marchi [Sun, 27 Nov 2016 03:02:56 +0000 (22:02 -0500)]
Remove unused functions and declarations
gdb/ChangeLog:
* ui-out.c (_initialize_ui_out): Remove.
(ui_out_set_flags): Remove.
(ui_out_clear_flags): Remove.
* ui-out.h (ui_out_begin_cleanup_end): Remove.
(ui_out_begin_cleanup_end): Remove.
(ui_out_set_flags): Remove.
(ui_out_clear_flags): Remove.
* mi/mi-out.c (_initialize_mi_out): Remove.
(mi_out_buffered): Remove.
* mi/mi-out.h (mi_out_buffered): Remove.
GDB Administrator [Sun, 27 Nov 2016 00:00:30 +0000 (00:00 +0000)]
Automatic date update in version.in
Simon Marchi [Thu, 24 Nov 2016 15:23:07 +0000 (10:23 -0500)]
Remove stale comments
The default ui_out is gone since commit
23ff98d2fed4a1eaeb815e18cd4169e5aa7aaa60.
gdb/ChangeLog:
* ui-out.h (struct ui_out_impl): Remove comment.
* ui-out.c (struct ui_out): Remove comment.
GDB Administrator [Sat, 26 Nov 2016 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
John Baldwin [Fri, 25 Nov 2016 18:29:50 +0000 (10:29 -0800)]
Remove check requiring void argument to functions with no parameters.
C++ treats an empty parameter list as no parameters unlike C.
gdb/ChangeLog:
* contrib/ari/gdb_ari.sh (no parameter function): Remove check.
Simon Marchi [Fri, 25 Nov 2016 14:58:02 +0000 (09:58 -0500)]
Fix typo in Makefile
Fix a typo I made in my previous Makefile cleanup series.
Thanks to Patrick Monnerat for reporting.
gdb/ChangeLog:
* Makefile.in: Fix typo.
Simon Marchi [Fri, 25 Nov 2016 14:41:58 +0000 (09:41 -0500)]
Fix typos in comment
gdb/ChangeLog:
* record-full.c (record_full_resume): Fix typos in comment.
Simon Marchi [Fri, 25 Nov 2016 14:07:35 +0000 (09:07 -0500)]
Fix typo in comment
gdb/ChangeLog:
* infcmd.c (interrupt_command): Fix typo in comment.
Jose E. Marchesi [Fri, 25 Nov 2016 11:40:15 +0000 (03:40 -0800)]
gas: fix CBCOND diagnostics for invalid immediate operands.
This patch fixes two problems in the SPARC assembler:
- The diagnostic message
Error: Illegal operands: Immediate value in cbcond is out of range.
is incorrectly issued for non-CBCOND instructions that feature a
simm5 immediate field, such as MPMUL, MONTMUL, etc.
- When an invalid immediate operand is used in a CBCOND
instruction, two redundant error messages are issued to the
user, the second due to a stale fixup (this happens since
commit
85024cd8bcb93f4112470ecdbd6c10fc2aea724f).
Some diagnostic tests for the CBCOND instructions are also
included in the patch.
Tested in both sparc64-linux-gnu and sparcv9-linux-gnu targets.
gas/ChangeLog:
2016-11-25 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-sparc.c (sparc_ip): Avoid emitting a cbcond error
messages for non-cbcond instructions.
* testsuite/gas/sparc/cbcond-diag.s: New file.
* testsuite/gas/sparc/cbcond-diag.l: Likewise.
* testsuite/gas/sparc/sparc.exp (gas_64_check): Run cbcond-diag tests.
Jon Turney [Fri, 25 Nov 2016 09:47:31 +0000 (09:47 +0000)]
Prevent problems with section alignment by not shrinking the .rsrc section.
PR ld/20193
* peXXigen.c (rsrc_process_section): Do not shrink the merged
.rsrc section.
GDB Administrator [Fri, 25 Nov 2016 00:00:09 +0000 (00:00 +0000)]
Automatic date update in version.in
John Baldwin [Thu, 24 Nov 2016 20:01:24 +0000 (12:01 -0800)]
Do not use std::move when assigning an anonymous object to a unique_ptr.
Using std::move forces an extra copy of the object. These changes fix
-Wpessimizing-move warnings from clang.
gdb/ChangeLog:
* ada-lang.c (create_excep_cond_exprs): Do not use 'std::move'.
* ax-gdb.c (agent_eval_command_one): Likewise.
(agent_eval_command_one): Likewise.
* breakpoint.c (parse_cond_to_aexpr): Likewise.
(parse_cmd_to_aexpr): Likewise.
* dtrace-probe.c (dtrace_process_dof_probe): Likewise.
* parse.c (parse_expression_for_completion): Likewise.
John Baldwin [Thu, 24 Nov 2016 20:01:24 +0000 (12:01 -0800)]
Add noexcept to custom non-throwing new operators.
Both libc++ and libstdc++ declare non-throwing new operators as
noexcept and overloads must also be noexcept. This fixes a
-Wmissing-exception-spec warning with clang.
gdb/ChangeLog:
* common/new-op.c (operator new): Mark 'noexcept'.
(operator new[]): Likewise.
Andreas Arnez [Thu, 24 Nov 2016 16:48:04 +0000 (17:48 +0100)]
Optimize byte-aligned copies in copy_bitwise()
The function copy_bitwise used for copying DWARF pieces can potentially
be invoked for large chunks of data. For instance, consider a large
struct one of whose members is currently located in a register. In this
case copy_bitwise would still copy the data bitwise in a loop, which is
much slower than necessary.
This change uses memcpy for the large part instead, if possible.
gdb/ChangeLog:
* dwarf2loc.c (copy_bitwise): Use memcpy for the middle part, if
it is byte-aligned.
Andreas Arnez [Thu, 24 Nov 2016 16:48:04 +0000 (17:48 +0100)]
Add unit test for copy_bitwise
This adds a unit test for the copy_bitwise function in dwarf2loc.c.
With the old (broken) version of copy_bitwise this test would generate
the following failure message:
(gdb) maintenance selftest
Self test failed: copy_bitwise
11000000 !=
10000000 (7+2 -> 0)
gdb/ChangeLog:
2016-11-24 Andreas Arnez <arnez@linux.vnet.ibm.com>
Pedro Alves <palves@redhat.com>
* dwarf2loc.c (bits_to_str, check_copy_bitwise)
(copy_bitwise_tests): New functions.
(_initialize_dwarf2loc): Register the new function
copy_bitwise_tests as a unit test.
* selftest.c (run_self_tests): Improve the failure message's
wording and formatting.
Andreas Arnez [Thu, 24 Nov 2016 16:48:03 +0000 (17:48 +0100)]
Fix copy_bitwise()
When the user writes or reads a variable whose location is described
with DWARF pieces (DW_OP_piece or DW_OP_bit_piece), GDB's helper
function copy_bitwise is invoked for each piece. The implementation of
this function has a bug that may result in a corrupted copy, depending
on alignment and bit size. (Full-byte copies are not affected.)
This rewrites copy_bitwise, replacing its algorithm by a fixed version,
and adding an appropriate test case. Without the fix the new test case
fails, e.g.:
print def_t
$2 = {a = 0, b = 4177919}
(gdb) FAIL: gdb.dwarf2/nonvar-access.exp: print def_t
Written in binary, the wrong result above looks like this:
01111111011111111111111
Which means that two zero bits have sneaked into the copy of the
original all-one bit pattern. The test uses this simple all-one value
in order to avoid another GDB bug that causes the DWARF piece of a
DW_OP_stack_value to be taken from the wrong end on big-endian
architectures.
gdb/ChangeLog:
* dwarf2loc.c (extract_bits_primitive): Remove.
(extract_bits): Remove.
(copy_bitwise): Rewrite. Fixes a possible corruption that may
occur for non-byte-aligned copies.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/nonvar-access.exp: Add a test for accessing
non-byte-aligned bit fields.
Andreas Arnez [Thu, 24 Nov 2016 16:48:03 +0000 (17:48 +0100)]
Fix PR12616 - gdb does not implement DW_AT_data_bit_offset
The DW_AT_data_bit_offset attribute was introduced by DWARF V4 and
allows specifying the offset of a data member within its containing
entity. But although the new attribute was intended to replace
DW_AT_bit_offset for this purpose, GDB ignores it, and thus GCC still
emits DW_AT_bit_offset instead. See also
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71669.
This change fixes GDB's lack of support for DW_AT_data_bit_offset and
adds an appropriate test case.
gdb/ChangeLog:
PR gdb/12616
* dwarf2read.c (dwarf2_add_field): Handle the DWARF V4 attribute
DW_AT_data_bit_offset.
gdb/testsuite/ChangeLog:
PR gdb/12616
* gdb.dwarf2/nonvar-access.exp: New testcase. Check that GDB
respects the DW_AT_data_bit_offset attribute.
Jiong Wang [Thu, 24 Nov 2016 14:01:53 +0000 (14:01 +0000)]
[ARM] Bind defined symbol locally in PIE
bfd/
PR target/20737
* elf32-arm.c (elf32_arm_final_link_relocate): Bind defined symbol
locally in PIE.
ld/
* testsuite/ld-arm/pie-bind-locally-a.s: New test source.
* testsuite/ld-arm/pie-bind-locally-b.s: Likewise.
* testsuite/ld-arm/pie-bind-locally.d: New testcase.
* testsuite/ld-arm/arm-elf.exp: Run new testcase.
Nick Clifton [Thu, 24 Nov 2016 10:00:20 +0000 (10:00 +0000)]
Fix snafu parsing $ORIGIN.
PR ld/20858
* emultempl/elf32.em (_search_needed): Allow for path separator
and terminating NUL byte when allocating space for new $ORIGIN
path.
Kuan-Lin Chen [Thu, 24 Nov 2016 02:22:15 +0000 (10:22 +0800)]
RISC-V/bfd: Fix bitsize of R_RISCV_ADD8.
bfd/ChangeLog:
* bfd/elfxx-riscv.c (howto_table): Fix bitsize of R_RISCV_ADD8.
GDB Administrator [Thu, 24 Nov 2016 00:00:32 +0000 (00:00 +0000)]
Automatic date update in version.in
Pedro Alves [Wed, 23 Nov 2016 15:36:26 +0000 (15:36 +0000)]
gdb: Use C++11 std::chrono
This patch fixes a few problems with GDB's time handling.
#1 - It avoids problems with gnulib's C++ namespace support
On MinGW, the struct timeval that should be passed to gnulib's
gettimeofday replacement is incompatible with libiberty's
timeval_sub/timeval_add. That's because gnulib also replaces "struct
timeval" with its own definition, while libiberty expects the
system's.
E.g., in code like this:
gettimeofday (&prompt_ended, NULL);
timeval_sub (&prompt_delta, &prompt_ended, &prompt_started);
timeval_add (&prompt_for_continue_wait_time,
&prompt_for_continue_wait_time, &prompt_delta);
That's currently handled in gdb by not using gnulib's gettimeofday at
all (see common/gdb_sys_time.h), but that #undef hack won't work with
if/when we enable gnulib's C++ namespace support, because that mode
adds compile time warnings for uses of ::gettimeofday, which are hard
errors with -Werror.
#2 - But there's an elephant in the room: gettimeofday is not monotonic...
We're using it to:
a) check how long functions take, for performance analysis
b) compute when in the future to fire events in the event-loop
c) print debug timestamps
But that's exactly what gettimeofday is NOT meant for. Straight from
the man page:
~~~
The time returned by gettimeofday() is affected by
discontinuous jumps in the system time (e.g., if the system
administrator manually changes the system time). If you need a
monotonically increasing clock, see clock_gettime(2).
~~~
std::chrono (part of the C++11 standard library) has a monotonic clock
exactly for such purposes (std::chrono::steady_clock). This commit
switches to use that instead of gettimeofday, fixing all the issues
mentioned above.
gdb/ChangeLog:
2016-11-23 Pedro Alves <palves@redhat.com>
* Makefile.in (SFILES): Add common/run-time-clock.c.
(HFILES_NO_SRCDIR): Add common/run-time-clock.h.
(COMMON_OBS): Add run-time-clock.o.
* common/run-time-clock.c, common/run-time-clock.h: New files.
* defs.h (struct timeval, print_transfer_performance): Delete
declarations.
* event-loop.c (struct gdb_timer) <when>: Now a
std::chrono::steady_clock::time_point.
(create_timer): use std::chrono::steady_clock instead of
gettimeofday. Use new instead of malloc.
(delete_timer): Use delete instead of xfree.
(duration_cast_timeval): New.
(update_wait_timeout): Use std::chrono::steady_clock instead of
gettimeofday.
* maint.c: Include <chrono> instead of "gdb_sys_time.h", <time.h>
and "timeval-utils.h".
(scoped_command_stats::~scoped_command_stats)
(scoped_command_stats::scoped_command_stats): Use
std::chrono::steady_clock instead of gettimeofday. Use
user_cpu_time_clock instead of get_run_time.
* maint.h: Include "run-time-clock.h" and <chrono>.
(scoped_command_stats): <m_start_cpu_time>: Now a
user_cpu_time_clock::time_point.
<m_start_wall_time>: Now a std::chrono::steady_clock::time_point.
* mi/mi-main.c: Include "run-time-clock.h" and <chrono> instead of
"gdb_sys_time.h" and <sys/resource.h>.
(rusage): Delete.
(mi_execute_command): Use new instead of XNEW.
(mi_load_progress): Use std::chrono::steady_clock instead of
gettimeofday.
(timestamp): Rewrite in terms of std::chrono::steady_clock,
user_cpu_time_clock and system_cpu_time_clock.
(timeval_diff): Delete.
(print_diff): Adjust to use std::chrono::steady_clock,
user_cpu_time_clock and system_cpu_time_clock.
* mi/mi-parse.h: Include "run-time-clock.h" and <chrono> instead
of "gdb_sys_time.h".
(struct mi_timestamp): Change fields types to
std::chrono::steady_clock::time_point, user_cpu_time_clock::time
and system_cpu_time_clock::time_point, instead of struct timeval.
* symfile.c: Include <chrono> instead of <time.h> and
"gdb_sys_time.h".
(struct time_range): New.
(generic_load): Use std::chrono::steady_clock instead of
gettimeofday.
(print_transfer_performance): Replace timeval parameters with a
std::chrono::steady_clock::duration parameter. Adjust.
* utils.c: Include <chrono> instead of "timeval-utils.h",
"gdb_sys_time.h", and <time.h>.
(prompt_for_continue_wait_time): Now a
std::chrono::steady_clock::duration.
(defaulted_query, prompt_for_continue): Use
std::chrono::steady_clock instead of
gettimeofday/timeval_sub/timeval_add.
(reset_prompt_for_continue_wait_time): Use
std::chrono::steady_clock::duration instead of struct timeval.
(get_prompt_for_continue_wait_time): Return a
std::chrono::steady_clock::duration instead of struct timeval.
(vfprintf_unfiltered): Use std::chrono::steady_clock instead of
gettimeofday. Use std::string. Use '.' instead of ':'.
* utils.h: Include <chrono>.
(get_prompt_for_continue_wait_time): Return a
std::chrono::steady_clock::duration instead of struct timeval.
gdb/gdbserver/ChangeLog:
2016-11-23 Pedro Alves <palves@redhat.com>
* debug.c: Include <chrono> instead of "gdb_sys_time.h".
(debug_vprintf): Use std::chrono::steady_clock instead of
gettimeofday. Use '.' instead of ':'.
* tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
(get_timestamp): Use std::chrono::steady_clock instead of
gettimeofday.
Nick Clifton [Wed, 23 Nov 2016 14:57:51 +0000 (14:57 +0000)]
Adjust linker test for arm-vxworks in wake of patch for PR 20815.
Simon Marchi [Tue, 22 Nov 2016 21:14:25 +0000 (16:14 -0500)]
Minor formatting fixups in Makefiles
Mostly some whitespace changes to make things a bit more consistent.
gdb/ChangeLog:
* Makefile.in: Fix whitespace formatting.
gdb/gdbserver/ChangeLog:
* Makefile.in: Fix whitespace formatting.
Simon Marchi [Tue, 22 Nov 2016 21:14:24 +0000 (16:14 -0500)]
Normalize names of some source files
Most tdep/nat files are named:
<cpu>-<os>-tdep.c
<cpu>-<os>-nat.c
A few files do not respect this scheme. This patch renames them so that
they are consistent with the rest of the files. It builds fine with
--enable-targets=all, but that doesn't test the nat files. I can only
hope that my grep skill is good enough.
gdb/ChangeLog:
* Makefile.in (ALL_64_TARGET_OBS, ALL_TARGET_OBS,
HFILES_NO_SRCDIR, ALLDEPFILES): Rename files.
* alphabsd-nat.c: Rename to ...
* alpha-bsd-nat.c: ... this, adjust include.
* alphabsd-tdep.c: Rename to ...
* alpha-bsd-tdep.c: ... this, adjust include.
* alphabsd-tdep.h: Rename to ...
* alpha-bsd-tdep.h: ... this, adjust include barrier and comment.
* alphafbsd-tdep.c: Rename to ...
* alpha-fbsd-tdep.c: ... this.
* alphanbsd-tdep.c: Rename to ...
* alpha-nbsd-tdep.c: ... this, adjust include.
* alphaobsd-tdep.c: Rename to ...
* alpha-obsd-tdep.c: ... this, adjust include.
* amd64bsd-nat.c: Rename to ...
* amd64-bsd-nat.c: ... this, adjust include.
* amd64fbsd-nat.c: Rename to ...
* amd64-fbsd-nat.c: ... this, adjust include.
* amd64fbsd-tdep.c: Rename to ...
* amd64-fbsd-tdep.c: ... this, adjust include.
* amd64nbsd-nat.c: Rename to ...
* amd64-nbsd-nat.c: ... this.
* amd64nbsd-tdep.c: Rename to ...
* amd64-nbsd-tdep.c: ... this.
* amd64obsd-nat.c: Rename to ...
* amd64-obsd-nat.c: ... this.
* amd64obsd-tdep.c: Rename to ...
* amd64-obsd-tdep.c: ... this.
* amd64-tdep.h: Update comments.
* armbsd-tdep.c: Rename to ...
* arm-bsd-tdep.c: ... this.
* armnbsd-nat.c: Rename to ...
* arm-nbsd-nat.c: ... this.
* armnbsd-tdep.c: Rename to ...
* arm-nbsd-tdep.c: ... this.
* armobsd-tdep.c: Rename to ...
* arm-obsd-tdep.c: ... this.
* arm-tdep.h: Update comments.
* hppabsd-tdep.c: Rename to ...
* hppa-bsd-tdep.c: ... this, adjust include.
* hppabsd-tdep.h: Rename to ...
* hppa-bsd-tdep.h: ... this, adjust include barrier and comment.
* hppanbsd-nat.c: Rename to ...
* hppa-nbsd-nat.c: ... this.
* hppanbsd-tdep.c: Rename to ...
* hppa-nbsd-tdep.c: ... this, adjust include.
* hppaobsd-nat.c: Rename to ...
* hppa-obsd-nat.c: ... this.
* hppaobsd-tdep.c: Rename to ...
* hppa-obsd-tdep.c: ... this, adjust include.
* i386bsd-nat.c: Rename to ...
* i386-bsd-nat.c: ... this, adjust include.
* i386bsd-nat.h: Rename to ...
* i386-bsd-nat.h: ... this, adjust include barrier and comment.
* i386bsd-tdep.c: Rename to ...
* i386-bsd-tdep.c: ... this.
* i386fbsd-nat.c: Rename to ...
* i386-fbsd-nat.c: ... this, adjust include.
* i386fbsd-tdep.c: Rename to ...
* i386-fbsd-tdep.c: ... this, adjust include.
* i386fbsd-tdep.h: Rename to ...
* i386-fbsd-tdep.h: ... this, adjust include barrier and comment.
* i386gnu-nat.c: Rename to ...
* i386-gnu-nat.c: ... this.
* i386gnu-tdep.c: Rename to ...
* i386-gnu-tdep.c: ... this.
* i386nbsd-nat.c: Rename to ...
* i386-nbsd-nat.c: ... this, adjust include.
* i386nbsd-tdep.c: Rename to ...
* i386-nbsd-tdep.c: ... this.
* i386obsd-nat.c: Rename to ...
* i386-obsd-nat.c: ... this, adjust include.
* i386obsd-tdep.c: Rename to ...
* i386-obsd-tdep.c: ... this.
* i386v4-nat.c: Rename to ...
* i386-v4-nat.c: ... this.
* i386-tdep.h: Update comments.
* m68k-tdep.h: Update comments.
* m68kbsd-nat.c: Rename to ...
* m68k-bsd-nat.c: ... this.
* m68kbsd-tdep.c: Rename to ...
* m68k-bsd-tdep.c: ... this.
* m68klinux-nat.c: Rename to ...
* m68k-linux-nat.c: ... this.
* m68klinux-tdep.c: Rename to ...
* m68k-linux-tdep.c: ... this.
* m88kbsd-nat.c: Rename to ...
* m88k-bsd-nat.c: ... this.
* mipsnbsd-nat.c: Rename to ...
* mips-nbsd-nat.c: ... this, adjust include.
* mipsnbsd-tdep.c: Rename to ...
* mips-nbsd-tdep.c: ... this, adjust include.
* mipsnbsd-tdep.h: Rename to ...
* mips-nbsd-tdep.h: ... this, adjust include barrier and comment.
* mips64obsd-nat.c: Rename to ...
* mips64-obsd-nat.c: ... this.
* mips64obsd-tdep.c: Rename to ...
* mips64-obsd-tdep.c: ... this.
* ppcfbsd-nat.c: Rename to ...
* ppc-fbsd-nat.c: ... this, adjust include.
* ppcfbsd-tdep.c: Rename to ...
* ppc-fbsd-tdep.c: ... this, adjust include.
* ppcfbsd-tdep.h: Rename to ...
* ppc-fbsd-tdep.h: ... this, adjust include barrier and comment.
* ppcnbsd-nat.c: Rename to ...
* ppc-nbsd-nat.c: ... this, adjust include.
* ppcnbsd-tdep.c: Rename to ...
* ppc-nbsd-tdep.c: ... this, adjust include.
* ppcnbsd-tdep.h: Rename to ...
* ppc-nbsd-tdep.h: ... this, adjust include barrier and comment.
* ppcobsd-nat.c: Rename to ...
* ppc-obsd-nat.c: ... this, adjust include.
* ppcobsd-tdep.c: Rename to ...
* ppc-obsd-tdep.c: ... this, adjust include.
* ppcobsd-tdep.h: Rename to ...
* ppc-obsd-tdep.h: ... this, adjust include barrier and comment.
* shnbsd-nat.c: Rename to ...
* sh-nbsd-nat.c: ... this.
* shnbsd-tdep.c: Rename to ...
* sh-nbsd-tdep.c: ... this.
* sparcnbsd-nat.c: Rename to ...
* sparc-nbsd-nat.c: ... this.
* sparcnbsd-tdep.c: Rename to ...
* sparc-nbsd-tdep.c: ... this.
* sparcobsd-tdep.c: Rename to ...
* sparc-obsd-tdep.c: ... this.
* sparc64fbsd-nat.c: Rename to ...
* sparc64-fbsd-nat.c: ... this.
* sparc64fbsd-tdep.c: Rename to ...
* sparc64-fbsd-tdep.c: ... this.
* sparc64nbsd-nat.c: Rename to ...
* sparc64-nbsd-nat.c: ... this.
* sparc64nbsd-tdep.c: Rename to ...
* sparc64-nbsd-tdep.c: ... this.
* sparc64obsd-nat.c: Rename to ...
* sparc64-obsd-nat.c: ... this.
* sparc64obsd-tdep.c: Rename to ...
* sparc64-obsd-tdep.c: ... this.
* sparc64-tdep.h: Update comments.
* vaxbsd-nat.c: Rename to ...
* vax-bsd-nat.c: ... this.
* vaxnbsd-tdep.c: Rename to ...
* vax-nbsd-tdep.c: ... this.
* vaxobsd-tdep.c: Rename to ...
* vax-obsd-tdep.c: ... this.
* x86bsd-nat.h: Rename to ...
* x86-bsd-nat.h: ... this, adjust include barrier and comment.
* x86bsd-nat.c: Rename to ...
* x86-bsd-nat.c: ... this, adjust include.
* configure.tgt: Update renamed files.
* config/alpha/fbsd.mh: Update renamed files.
* config/alpha/nbsd.mh: Update renamed files.
* config/arm/nbsdelf.mh: Update renamed files.
* config/djgpp/fnchange.lst: Update renamed files.
* config/i386/fbsd.mh: Update renamed files.
* config/i386/fbsd64.mh: Update renamed files.
* config/i386/i386gnu.mh: Update renamed files.
* config/i386/i386sol2.mh: Update renamed files.
* config/i386/nbsd64.mh: Update renamed files.
* config/i386/nbsdelf.mh: Update renamed files.
* config/i386/obsd.mh: Update renamed files.
* config/i386/obsd64.mh: Update renamed files.
* config/i386/sol2-64.mh: Update renamed files.
* config/m68k/linux.mh: Update renamed files.
* config/m68k/nbsdelf.mh: Update renamed files.
* config/m68k/obsd.mh: Update renamed files.
* config/m88k/obsd.mh: Update renamed files.
* config/mips/nbsd.mh: Update renamed files.
* config/mips/obsd64.mh: Update renamed files.
* config/pa/nbsd.mh: Update renamed files.
* config/pa/obsd.mh: Update renamed files.
* config/powerpc/fbsd.mh: Update renamed files.
* config/powerpc/nbsd.mh: Update renamed files.
* config/powerpc/obsd.mh: Update renamed files.
* config/sh/nbsd.mh: Update renamed files.
* config/sparc/fbsd.mh: Update renamed files.
* config/sparc/nbsd64.mh: Update renamed files.
* config/sparc/nbsdelf.mh: Update renamed files.
* config/sparc/obsd64.mh: Update renamed files.
* config/vax/nbsdelf.mh: Update renamed files.
* config/vax/obsd.mh: Update renamed files.
Simon Marchi [Tue, 22 Nov 2016 21:14:22 +0000 (16:14 -0500)]
Makefiles: Flatten and sort file lists
I find the big file lists in the Makefiles a bit ugly and not very
practical. Since there are multiple filenames on each line (as much as
fits in 80 columns), it's not easy to add, remove or change a name in
the middle. As a result, we have a mix of long and short lines in no
particular order (ALL_TARGET_OBS is a good example).
I therefore suggest flattening the lists (one name per line) and keeping
them in alphabetical order. The diffs will be much clearer and merge
conflicts will be easier to resolve.
A nice (IMO) side-effect I observed is that the files are compiled
alphabetically by make, so it gives a rough idea of the progress of the
build.
I added a comment in gdb/Makefile.in to mention to keep the file lists
ordered, and gave the general guidelines on what order to respect. I
added a comment in other Makefiles which refers to gdb/Makefile.in, to
avoid duplication.
Running the patch through the buildbot found that gdb.base/default.exp
started to fail. The languages in the error message shown when typing
"set language" have changed order. We could probably improve gdb so
that it prints them in a stable order, regardless of the order of the
object list passed to the linked, but just fixing the test is easier for
now.
New in v2:
- Change ordering style, directories go at the end.
- Cleanup gdbserver's and data-directory's Makefile as well.
- Add comments at top of Makefiles about the ordering.
- Remove wrong trailing backslahes.
- Fix test gdb.base/default.exp.
gdb/ChangeLog:
* Makefile.in: Add comment about file lists ordering.
(SUBDIR_CLI_OBS, SUBDIR_CLI_SRCS, SUBDIR_MI_OBS, SUBDIR_MI_SRCS,
SUBDIR_TUI_OBS, SUBDIR_TUI_SRCS, SUBDIR_GCC_COMPILE_OBS,
SUBDIR_GCC_COMPILE_SRCS, SUBDIR_GUILE_OBS, SUBDIR_GUILE_SRCS,
SUBDIR_PYTHON_OBS, SUBDIR_PYTHON_SRCS, SUBDIR_GDBTK_OBS,
SUBDIR_GDBTK_SRCS, XMLFILES, REMOTE_OBS, ALL_64_TARGET_OBS,
ALL_TARGET_OBS, SFILES, HFILES_NO_SRCDIR, HFILES_WITH_SRCDIR,
COMMON_OBS, YYFILES, YYOBJ, generated_files, ALLDEPFILES):
Flatten list and order alphabetically.
* data-directory/Makefile.in: Add comment about file lists
ordering.
(GEN_SYSCALLS_FILES, PYTHON_FILE_LIST): Flatten list and order
alphabetically.
gdb/gdbserver/ChangeLog:
* Makefile.in (SFILES, OBS): Flatten list and order
alphabetically.
gdb/testsuite/ChangeLog:
* gdb.base/default.exp: Fix output of "set language".
Nick Clifton [Wed, 23 Nov 2016 11:10:39 +0000 (11:10 +0000)]
Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries.
PR ld/20815
bfd * elf.c (elf_modify_segment_map): Allow empty LOAD segments if
they contain the program headers.
(_bfd_elf_map_sections_to_segments): If the linker created the
PHDR segment then always attempt to include it in a LOAD segment.
(assign_file_positions_for_non_load_sections): Allow LOAD segments
to overlap PHDR segments.
(phdr_sorter): New function. Sorts program headers.
(assign_file_positions_except_relocs): Sort the program headers
before writing them out. Issue an error if the PHDR segment is
not covered by a LOAD segment, unless the backend allows it.
* elf-bfd.h (struct elf_backend_data): Add
elf_backend_allow_non_load_phdr.
* elfxx-target.h (elf_backend_allow_non_load_phdr): Provide
default definition that returns FALSE.
(elfNN_bed): Initialise the elf_backend_allow_non_load_phdr
field.
* elf64-hppa.c (elf64_hppa_allow_non_load_phdr): New function.
Returns TRUE.
(elf_backend_allow_non_load_phdr): Define.
* elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Do not
place the interpreter string into the .interp section if the
nointerp flag is set in the link info structure.
* elf32-arc.c (elf_arc_size_dynamic_sections): Likewise.
* elf32-score7.c (score_elf_final_link_relocate): Allow for the
_gp symbol not being part of the output.
binutils* readelf.c (process_program_headers): Check PT_LOAD and PT_PHDR
segments for validity.
ld * ld.texinfo: Note that PT_TLS can be used as a segment type.
* testsuite/ld-discard/discard.ld: Add space for program headers.
* testsuite/ld-elf/flags1.ld: Likewise.
* testsuite/ld-elf/maxpage3.t: Likewise.
* testsuite/ld-elf/noload-1.t: Likewise.
* testsuite/ld-elf/orphan.ld: Likewise.
* testsuite/ld-elf/overlay.t: Likewise.
* testsuite/ld-elf/pr14052.t: Likewise.
* testsuite/ld-elf/pr19539.t: Likewise.
* testsuite/ld-elf/provide-hidden-1.ld: Likewise.
* testsuite/ld-elf/provide-hidden-s.ld: Likewise.
* testsuite/ld-elf/weak-dyn-1.ld: Likewise.
* testsuite/ld-i386/pr19539.t: Likewise.
* testsuite/ld-scripts/defined.t: Likewise.
* testsuite/ld-scripts/defined6.t: Likewise.
* testsuite/ld-scripts/dynamic-sections.t: Likewise.
* testsuite/ld-scripts/empty-aligned.t: Likewise.
* testsuite/ld-scripts/provide-2.t: Likewise.
* testsuite/ld-scripts/provide-4.t: Likewise.
* testsuite/ld-vax-elf/plt-local.ld: Likewise.
* testsuite/ld-x86-64/pr19539.t: Likewise.
* testsuite/ld-elf/ehdr_start-missing.d: Do not initialise the
dynamic linker.
* testsuite/ld-elf/ehdr_start-weak.d: Likewise.
* testsuite/ld-elf/elf.exp (pr14170, pr17068): Likewise.
* testsuite/ld-elf/loadaddr1.d: Update expected readelf output.
* testsuite/ld-elf/noload-2.d: Likewise.
* testsuite/ld-powerpc/vxworks2.sd: Likewise.
* testsuite/ld-scripts/phdrs3a.d: Likewise.
* testsuite/ld-scripts/size-2.d: Likewise.
* testsuite/ld-elf/group.ld: Add program headers.
* testsuite/ld-elf/overlay.d: Skip for SPU.
* testsuite/ld-elf/flags1.d: Skip for RX.
* testsuite/ld-elf/pr19162.d: Skip for HPPA64.
* testsuite/ld-elf/pr19539.d: Skip for ALPHA.
* testsuite/ld-scripts/empty-orphan.t: Update program headers.
* testsuite/ld-scripts/size-2.t: Likewise.
Jose E. Marchesi [Wed, 23 Nov 2016 11:04:17 +0000 (03:04 -0800)]
gas: run the hwcaps-bump tests with 64-bit sparc objects only.
gas/ChangeLog:
2016-11-23 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/sparc/sparc.exp (gas_64_check): Make sure the
hwcaps-bump test is run with 64-bit objects.
Kuan-Lin Chen [Wed, 23 Nov 2016 05:18:59 +0000 (13:18 +0800)]
RISCV/GAS Add missing break in md_apply_fix.
gdb/ChangeLog:
* config/tc-riscv.c: Add missing break.
Alan Modra [Wed, 23 Nov 2016 04:37:17 +0000 (15:07 +1030)]
elf_backend_dtrel_excludes_plt
Now that all targets creating .rel.plt/.rela.plt use the ELF hash
table shortcut srelplt, the generic ELF code can set up DT_RELSZ/
DT_RELASZ and DT_REL/DT_RELA for targets that don't want PLT relocs
included in those tags.
* elf-bfd.h (struct elf_backend_data): Add dtrel_excludes_plt.
* elfxx-target.h (elf_backend_dtrel_excludes_plt): Define.
(elfNN_bed): Init new field.
* elflink.c (bfd_elf_final_link): Add and use htab variable. Handle
dtrel_excludes_plt.
* elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_sections): Delete
DT_RELASZ code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-arc.c (elf_arc_finish_dynamic_sections): Delete DT_RELASZ code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-arm.c (elf32_arm_finish_dynamic_sections): Delete code
subtracting off plt relocs from DT_RELSZ, DT_RELASZ.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-cr16.c (_bfd_cr16_elf_finish_dynamic_sections): Delete
DT_RELASZ code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-cris.c (elf_cris_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Delete DT_RELASZ
and DT_RELA code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-i386.c (elf_i386_finish_dynamic_sections): Delete DT_RELSZ
and DT_REL code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-lm32.c (lm32_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-m32r.c (m32r_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-m68k.c (elf_m68k_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-metag.c (elf_metag_finish_dynamic_sections): Delete DT_RELASZ
and DT_RELA code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-microblaze.c (microblaze_elf_finish_dynamic_sections): Delete
DT_RELASZ and DT_RELA code. Use ELF htab shortcuts for other
dynamic sections.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-mips.c (elf_backend_dtrel_excludes_plt): Define.
* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-or1k.c (or1k_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-ppc.c (ppc_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-sh.c (sh_elf_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-sparc.c (elf_backend_dtrel_excludes_plt): Define.
* elf32-vax.c (elf_vax_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Delete DT_RELASZ
and DT_RELA code.
(elf_backend_dtrel_excludes_plt): Define.
* elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections): Delete
DT_RELASZ code.
(elf_backend_dtrel_excludes_plt): Define.
* elfnn-ia64.c (elfNN_ia64_finish_dynamic_sections): Delete DT_RELASZ
code.
(elf_backend_dtrel_excludes_plt): Define.
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Delete
DT_RELASZ code.
* elfxx-sparc.c (sparc_finish_dyn): Delete DT_RELASZ code.
Alan Modra [Wed, 23 Nov 2016 04:36:34 +0000 (15:06 +1030)]
Delete duplicate target short-cuts to dynamic sections
We'd like to have the elf_link_hash_table srelplt field rather than
some private target field used to save short-cuts to a PLT relocation
section. This save a little space but mainly is so that the generic
ELF code can access the field. Ditto for other dynamic sections.
* elf-m10300.c (mn10300_elf_check_relocs): Use elf htab shortcuts
to dynamic sections.
(mn10300_elf_final_link_relocate): Likewise.
(_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
(_bfd_mn10300_elf_size_dynamic_sections): Likewise.
(_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
(_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
* elf32-bfin.c (bfin_check_relocs): Likewise.
(bfin_relocate_section): Likewise.
(bfin_gc_sweep_hook): Likewise.
(struct bfinfdpic_elf_link_hash_table): Delete sgot, sgotrel, splt
and spltrel.
(bfinfdpic_got_section, bfinfdpic_gotrel_section,
bfinfdpic_plt_section, bfinfdpic_pltrel_section): Define using elf
shortcut sections.
(_bfin_create_got_section): Use elf htab shortcuts to dyn sections.
Delete dead code.
(bfin_finish_dynamic_symbol): Use elf htab shortcuts to dyn sections.
(bfin_size_dynamic_sections): Likewise.
* elf32-cr16.c (_bfd_cr16_elf_create_got_section): Likewise.
(cr16_elf_check_relocs): Likewise.
(cr16_elf_final_link_relocate): Likewise.
(_bfd_cr16_elf_create_dynamic_sections): Likewise.
(_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
(_bfd_cr16_elf_size_dynamic_sections): Likewise.
(_bfd_cr16_elf_finish_dynamic_symbol): Likewise.
(_bfd_cr16_elf_finish_dynamic_sections): Likewise.
* elf32-cris.c (cris_elf_relocate_section): Likewise.
(elf_cris_finish_dynamic_symbol): Likewise.
(elf_cris_finish_dynamic_sections): Likewise.
(cris_elf_gc_sweep_hook): Likewise.
(elf_cris_adjust_gotplt_to_got): Likewise.
(elf_cris_adjust_dynamic_symbol): Likewise.
(cris_elf_check_relocs): Likewise. Delete dead code.
(elf_cris_size_dynamic_sections): Use elf htab shortcuts to dynamic
sections.
(elf_cris_discard_excess_program_dynamics): Likewise.
* elf32-frv.c (struct frvfdpic_elf_link_hash_table): Delete sgot,
sgotrel, splt and spltrel.
(frvfdpic_got_section, frvfdpic_gotrel_section,
frvfdpic_plt_section, frvfdpic_pltrel_section): Define using elf
shortcut sections.
(_frv_create_got_section): Likewise.
* elf32-hppa.c (struct elf32_hppa_link_hash_table): Delete sgot,
srelgot, splt and srelplt.
(hppa_build_one_stub): Use elf htab shortcuts to dynamic sections.
(elf32_hppa_create_dynamic_sections): Likewise.
(elf32_hppa_check_relocs): Likewise.
(allocate_plt_static): Likewise.
(allocate_dynrelocs): Likewise.
(elf32_hppa_size_dynamic_sections): Likewise.
(elf32_hppa_relocate_section): Likewise.
(elf32_hppa_finish_dynamic_symbol): Likewise.
(elf32_hppa_finish_dynamic_sections): Likewise.
* elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
* elf32-lm32.c (struct elf_lm32_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
(lm32fdpic_got_section, lm32fdpic_gotrel_section): Define using elf
shortcut sections.
(create_got_section): Delete. Use _bfd_elf_create_got_section instead.
(lm32_elf_relocate_section): Use elf htab shortcuts to dyn sections.
(lm32_elf_check_relocs): Likewise.
(lm32_elf_finish_dynamic_sections): Likewise.
(lm32_elf_finish_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(lm32_elf_size_dynamic_sections): Likewise.
(lm32_elf_create_dynamic_sections): Likewise.
* elf32-m32c.c (m32c_elf_relocate_section): Likewise.
(m32c_elf_check_relocs): Likewise.
(m32c_elf_finish_dynamic_sections): Likewise.
(m32c_elf_always_size_sections): Likewise.
* elf32-m32r.c (struct elf_m32r_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
(create_got_section): Delete. Use _bfd_elf_create_got_section instead.
(m32r_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
sections.
(allocate_dynrelocs): Likewise.
(m32r_elf_size_dynamic_sections): Likewise.
(m32r_elf_relocate_section): Likewise.
(m32r_elf_finish_dynamic_symbol): Likewise.
(m32r_elf_finish_dynamic_sections): Likewise.
(m32r_elf_check_relocs): Likewise.
* elf32-m68k.c (elf_m68k_partition_multi_got): Likewise.
(elf_m68k_check_relocs): Likewise.
(elf_m68k_adjust_dynamic_symbol): Likewise.
(elf_m68k_size_dynamic_sections): Likewise.
(elf_m68k_relocate_section): Likewise.
(elf_m68k_finish_dynamic_symbol): Likewise.
(elf_m68k_finish_dynamic_sections): Likewise.
* elf32-metag.c (struct elf_metag_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
(elf_metag_relocate_section): Use elf htab shortcuts to dynamic
sections.
(elf_metag_create_dynamic_sections): Likewise. Allocate got header
here in .got.
(elf_metag_check_relocs): Use elf htab shortcuts to dynamic sections.
(allocate_dynrelocs): Likewise.
(elf_metag_size_dynamic_sections): Likewise.
(elf_metag_finish_dynamic_symbol): Likewise.
(elf_metag_finish_dynamic_sections): Likewise.
(elf_metag_size_stubs): Likewise.
(elf_backend_got_header_size): Don't define.
(elf_backend_want_got_plt): Define.
* elf32-microblaze.c (struct elf32_mb_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelpl.
(microblaze_elf_relocate_section): Use elf htab shortcuts to dynamic
sections.
(create_got_section): Delete. Use _bfd_elf_create_got_section instead.
(microblaze_elf_check_relocs): Use elf htab shortcuts to dyn sections.
(microblaze_elf_create_dynamic_sections): Likewise.
(allocate_dynrelocs): Likewise.
(microblaze_elf_size_dynamic_sections): Likewise.
(microblaze_elf_finish_dynamic_symbol): Likewise.
(microblaze_elf_finish_dynamic_sections): Likewise.
* elf32-nds32.c (nds32_elf_link_hash_table_create): Don't NULL
already zero fields.
(create_got_section): Delete. Use _bfd_elf_create_got_section instead.
(nds32_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
sections.
(allocate_dynrelocs): Likewise.
(nds32_elf_size_dynamic_sections): Likewise.
(nds32_elf_relocate_section): Likewise.
(nds32_elf_finish_dynamic_symbol): Likewise.
(nds32_elf_finish_dynamic_sections): Likewise.
(nds32_elf_check_relocs): Likewise.
(calculate_plt_memory_address): Likewise.
(calculate_got_memory_address): Likewise.
* elf32-nds32.h (struct elf_nds32_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
* elf32-or1k.c (struct elf_or1k_link_hash_table): Likewise.
(or1k_elf_relocate_section): Use elf htab shortcuts to dyn sections.
(create_got_section): Delete. Use _bfd_elf_create_got_section instead.
(or1k_elf_check_relocs): Use elf htab shortcuts to dynamic sections.
(or1k_elf_finish_dynamic_sections): Likewise.
(or1k_elf_finish_dynamic_symbol): Likewise.
(allocate_dynrelocs): Likewise.
(or1k_elf_size_dynamic_sections): Likewise.
(or1k_elf_create_dynamic_sections): Likewise.
* elf32-ppc.c (struct ppc_elf_link_hash_table): Delete got, relgot,
plt, relplt, iplt, reliplt and sgotplt.
(ppc_elf_create_got): Use elf htab shortcuts to dynamic sections.
(ppc_elf_create_glink): Likewise.
(ppc_elf_create_dynamic_sections): Likewise.
(ppc_elf_check_relocs): Likewise.
(ppc_elf_select_plt_layout): Likewise.
(ppc_elf_tls_setup): Likewise.
(allocate_got): Likewise.
(allocate_dynrelocs): Likewise.
(ppc_elf_size_dynamic_sections): Likewise.
(ppc_elf_relax_section): Likewise.
(ppc_elf_relocate_section): Likewise.
(ppc_elf_finish_dynamic_symbol): Likewise.
(ppc_elf_reloc_type_class): Likewise.
(ppc_elf_finish_dynamic_sections): Likewise.
* elf32-rl78.c (rl78_elf_relocate_section): Likewise.
(rl78_elf_check_relocs): Likewise.
(rl78_elf_finish_dynamic_sections): Likewise.
(rl78_elf_always_size_sections): Likewise.
* elf32-s390.c (create_got_section): Delete.
(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
(elf_s390_check_relocs): Likewise.
* elf32-score.c (score_elf_create_got_section): Set elf shortcuts.
(s3_bfd_score_elf_finish_dynamic_sections): Use elf shortcuts.
* elf32-score7.c (score_elf_create_got_section): As above.
(s7_bfd_score_elf_finish_dynamic_sections): As above.
* elf32-sh.c (struct elf_sh_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
(create_got_section): Don't set them.
(sh_elf_create_dynamic_sections): Use elf htab shortcuts to dynamic
sections.
(allocate_dynrelocs): Likewise.
(sh_elf_size_dynamic_sections): Likewise.
(sh_elf_add_rofixup): Likewise.
(sh_elf_relocate_section): Likewise.
(sh_elf_check_relocs): Likewise.
(sh_elf_finish_dynamic_symbol): Likewise.
(sh_elf_finish_dynamic_sections): Likewise.
* elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
* elf32-tilepro.c (tilepro_elf_create_got_section): Likewise.
* elf32-vax.c (elf_vax_check_relocs): Likewise.
(elf_vax_adjust_dynamic_symbol): Likewise.
(elf_vax_always_size_sections): Likewise.
(elf_vax_instantiate_got_entries): Likewise.
(elf_vax_relocate_section): Likewise.
(elf_vax_finish_dynamic_symbol): Likewise.
(elf_vax_finish_dynamic_sections): Likewise.
* elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
(xstormy16_elf_always_size_sections): Likewise.
(xstormy16_elf_relocate_section): Likewise.
(xstormy16_elf_finish_dynamic_sections): Likewise.
* elf32-xtensa.c (struct elf_xtensa_link_hash_table): Delete sgot,
sgotplt, srelgot, splt and srelplt.
(elf_xtensa_create_dynamic_sections): Use elf htab shortcuts to
dynamic sections.
(elf_xtensa_allocate_dynrelocs): Likewise.
(elf_xtensa_allocate_local_got_size): Likewise.
(elf_xtensa_size_dynamic_sections): Likewise.
(elf_xtensa_relocate_section): Likewise.
(elf_xtensa_finish_dynamic_sections): Likewise.
(shrink_dynamic_reloc_sections): Likewise.
(elf_xtensa_get_plt_section): Likewise.
(elf_xtensa_get_gotplt_section): Likewise.
(xtensa_callback_required_dependence): Likewise.
* elf64-alpha.c (elf64_alpha_create_dynamic_sections): Set elf htab
shortcuts to dynamic sections.
(elf64_alpha_adjust_dynamic_symbol): Use elf htab shortcuts to
dynamic sections.
(elf64_alpha_size_plt_section): Likewise.
(elf64_alpha_size_rela_got_1): Likewise.
(elf64_alpha_size_rela_got_section): Likewise.
(elf64_alpha_relocate_section): Likewise.
(elf64_alpha_finish_dynamic_symbol): Likewise.
(elf64_alpha_finish_dynamic_sections): Likewise.
* elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
* elf64-s390.c (create_got_section): Delete.
(elf_s390_create_dynamic_sections): Use _bfd_elf_create_got_section.
(elf_s390_check_relocs): Likewise.
* elf64-sh64.c (sh_elf64_relocate_section): Use elf htab shortcuts to
dynamic sections.
(sh_elf64_check_relocs): Likewise.
(sh64_elf64_adjust_dynamic_symbol): Likewise.
(sh64_elf64_size_dynamic_sections): Likewise.
(sh64_elf64_finish_dynamic_symbol): Likewise.
(sh64_elf64_finish_dynamic_sections): Likewise.
* elflink.c (_bfd_elf_create_got_section): Likewise.
* elfnn-aarch64.c (aarch64_elf_create_got_section): Likewise.
* elfnn-ia64.c (elfNN_ia64_size_dynamic_sections): Likewise.
(elfNN_ia64_finish_dynamic_sections): Likewise.
* elfnn-riscv.c (riscv_elf_create_got_section): Likewise.
* elfxx-mips.c (struct mips_elf_link_hash_table): Delete srellt,
sgotplt, splt and sgot.
(mips_elf_initialize_tls_slots): Use elf htab shortcuts to dynamic
sections.
(mips_elf_gotplt_index): Likewise.
(mips_elf_primary_global_got_index): Likewise.
(mips_elf_global_got_index): Likewise.
(mips_elf_got_offset_from_index): Likewise.
(mips_elf_create_local_got_entry): Likewise.
(mips_elf_create_got_section): Likewise.
(mips_elf_calculate_relocation): Likewise.
(_bfd_mips_elf_create_dynamic_sections): Likewise.
(_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
(mips_elf_lay_out_got): Likewise.
(mips_elf_set_plt_sym_value): Likewise.
(_bfd_mips_elf_size_dynamic_sections): Likewise.
(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
(_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
(mips_finish_exec_plt): Likewise.
(mips_vxworks_finish_exec_plt): Likewise.
(mips_vxworks_finish_shared_plt): Likewise.
(_bfd_mips_elf_finish_dynamic_sections): Likewise.
* elfxx-sparc.c (sparc_finish_dyn): Likewise.
* elfxx-tilegx.c (tilegx_elf_create_got_section): Likewise.