tui_set_win_height_command is just a simple wrapper for
tui_set_win_height, so rename the latter and remove the wrapper.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-win.c (tui_set_win_height_command): Rename from
tui_set_win_height.
(tui_set_win_height_command): Remove.
This changes the TUI source window to register itself on the
source_styling_changed observable, and removes a bit of code from
tui-hooks.c. This reduces the number of uses of the TUI_SRC_WIN
global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-source.c (tui_source_window): New constructor. Add
observer.
(~tui_source_window): New destructor.
(tui_source_window::style_changed): New method.
* tui/tui-hooks.c (tui_redisplay_source): Remove.
(tui_attach_detach_observers): Update.
* tui/tui-data.h (struct tui_source_window): Make constructor not
inline. Add destructor.
(struct tui_source_window) <style_changed>: New method.
<m_observable>: New member.
This fixes a couple of comment typos that I noticed.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-data.c (tui_clear_source_windows_detail): Fix typo.
* tui/tui-win.c (tui_resize_all): Fix typo.
This introduces an iterator class and a range adapter to make it
simpler to iterate over TUI windows.
One explicit iteration remains, in tui-win.c, because that spot is
deleting windows as well.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.h (tui_refresh_all): Update.
* tui/tui-wingeneral.c (make_all_visible): Use foreach.
(tui_refresh_all): Remove "list" parameter. Use foreach.
* tui/tui-win.c (window_name_completer): Use foreach.
(tui_refresh_all_win, tui_rehighlight_all, tui_all_windows_info)
(update_tab_width): Likewise.
* tui/tui-layout.c (show_layout): Update.
* tui/tui-data.h (class tui_window_iterator): New.
(struct all_tui_windows): New.
* tui/tui-data.c (tui_partial_win_by_name): Use foreach.
This changes tui_reg_next and tui_reg_prev so that they don't need to
reference the TUI_DATA_WIN globals.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_reg_next, tui_reg_prev): Add "current_group"
parameter. Don't reference globals.
(tui_reg_command): Update.
tui_show_registers keeps a local status variable, but it is not
actually needed. This rearranges the function to remove the variable.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_show_registers): Simplify.
This changes tui_show_register_group not to reference the TUI_DATA_WIN
global, instead leaving that to its caller.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_show_registers): Update.
(tui_show_register_group): Add win_info parameter.
This changes tui_display_reg_element_at_line to be a method on
tui_data_window, allowing for the removal of some uses of the
TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.c (tui_data_window::display_reg_element_at_line):
Rename from tui_display_reg_element_at_line.
(tui_data_window::display_registers_from_line): Update.
* tui/tui-data.h (struct tui_data_window)
<display_reg_element_at_line>: New method.
This changes tui_display_registers_from and
tui_display_registers_from_line to be methods on tui_data_window,
allowing for the removal of more uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (tui_display_registers_from)
(tui_display_registers_from_line): Don't declare.
* tui/tui-windata.c (tui_data_window::display_all_data)
(tui_data_window::refresh_all)
(tui_data_window::do_scroll_vertical): Update.
* tui/tui-regs.c (tui_data_window::display_registers_from): Rename
from tui_display_registers_from.
(tui_display_reg_element_at_line): Update.
(tui_data_window::display_registers_from_line): Rename from
tui_display_registers_from_line.
* tui/tui-data.h (struct tui_data_window) <display_registers_from,
display_registers_from_line>: New methods.
This changes tui_erase_data_content to be a method on tui_data_window,
allowing for the removal of some uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_erase_data_content): Don't declare.
* tui/tui-windata.c (tui_data_window::erase_data_content): Rename
from tui_erase_data_content.
(tui_data_window::display_all_data)
(tui_data_window::refresh_all)
(tui_data_window::do_scroll_vertical): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-data.h (struct tui_data_window) <erase_data_content>:
New method.
This changes tui_delete_data_content_windows to be a method on
tui_data_window, removing some uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_delete_data_content_windows): Don't
declare.
* tui/tui-windata.c
(tui_data_window::delete_data_content_windows): Rename from
tui_delete_data_content_windows.
(tui_data_window::display_all_data)
(tui_data_window::do_scroll_vertical): Update.
* tui/tui-data.h (struct tui_data_window)
<delete_data_content_windows>: New method.
A couple of functions were declared but never defined. This removes
the declarations.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_refresh_data_win): Don't declare.
* tui/tui-regs.h (tui_first_reg_element_inline): Don't declare.
This changes tui_display_all_data to be a method on tui_data_window.
This helps cluster uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_display_all_data): Don't declare.
* tui/tui-windata.c (tui_data_window::display_all_data): Rename
from tui_display_all_data.
* tui/tui-win.c
(tui_data_window::do_make_visible_with_new_height): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-layout.c (tui_set_layout): Update.
* tui/tui-data.h (struct tui_data_window) <display_all_data>: New
method.
tui_display_data_from is only called from a single place. Inlining it
there lets us remove some uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_display_data_from): Don't declare.
* tui/tui-windata.c (tui_display_data_from): Remove.
(tui_data_window::refresh_all): Update.
tui_display_data_from_line is just a wrapper for
tui_display_registers_from_line, so remove it. Also, nothing passed 0
as the "force_display" parameter to tui_display_registers_from_line,
so remove that parameter as well.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.h (tui_display_data_from_line): Don't declare.
* tui/tui-windata.c (tui_display_data_from_line): Remove.
(tui_display_data_from, tui_data_window::do_scroll_vertical): Call
tui_display_registers_from_line.
* tui/tui-regs.h (tui_display_registers_from_line): Update.
* tui/tui-regs.c (tui_display_registers_from_line): Remove
"force_display" parameter.
This changes tui_first_reg_element_no_inline to be a method on
tui_data_window. This again moves uses of the TUI_DATA_WIN global
from this function into other functions that are already using the
global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (tui_first_reg_element_no_inline): Don't
declare.
* tui/tui-regs.c (tui_data_window::first_reg_element_no_inline):
Rename from tui_first_reg_element_no_inline.
(tui_display_reg_element_at_line)
(tui_display_registers_from_line): Update.
* tui/tui-data.h (struct tui_data_window)
<first_reg_element_no_inline>: New method.
This changes tui_line_from_reg_element_no to be a method on
tui_data_window, allowing for the removal of some uses of the
TUI_DATA_WIN global. (Actually, in this particular patch, the number
of uses is not decreased, but rather the uses are moved to spots that
are already using the global, i.e., increasing the clustering.)
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-windata.c (tui_display_data_from)
(tui_data_window::do_scroll_vertical): Update.
* tui/tui-regs.h (tui_line_from_reg_element_no): Don't declare.
* tui/tui-regs.c (tui_data_window::line_from_reg_element_no):
Rename from tui_line_from_reg_element_no.
(tui_display_registers_from_line): Update.
* tui/tui-data.h (struct tui_data_window)
<line_from_reg_element_no>: New method.
This changes tui_last_regs_line_no into a method on tui_data_window,
allowing the removal of uses of the TUI_DATA_WIN global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-regs.h (tui_last_regs_line_no): Don't declare.
* tui/tui-regs.c (tui_data_window::last_regs_line_no): Rename from
tui_last_regs_line_no.
(tui_display_reg_element_at_line)
(tui_display_registers_from_line): Update.
* tui/tui-data.h (struct tui_data_window) <last_regs_line_no>: New
method.
PR tui/24722 points out that deleting a breakpoint does not cause the
"b" to be removed from the breakpoint display. The issue here was
that the breakpoint still exists at the moment the breakpoint-deleted
observer is notified. This fixes the problem by specially handling
the case where a breakpoint is being removed.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
PR tui/24722:
* tui/tui-winsource.h (tui_update_all_breakpoint_info)
(tui_update_breakpoint_info): Add "being_deleted" parameter.
* tui/tui-winsource.c (tui_update_source_window_as_is): Update.
(tui_update_all_breakpoint_info): Add "being_deleted" parameter.
(tui_update_breakpoint_info): Likewise.
* tui/tui-hooks.c (tui_event_create_breakpoint)
(tui_event_delete_breakpoint, tui_event_modify_breakpoint):
Update.
tui_show_frame_info has two parallel "if"s with the same condition and
no intervening code. The second "if" perhaps wasn't obviously
identical, but earlier refactorings made it clearer, by pointing out
that only source and disassembly windows can be handled here. This
merges the two statements.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-stack.c (tui_show_frame_info): Consolidate "if"s.
This adds a 'win_info' parameter to a couple of functions. This
reduces the number of references to the TUI_WIN_SRC global.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_update_source_window_as_is)
(tui_update_source_windows_with_addr): Update.
* tui/tui-source.h (tui_set_source_content)
(tui_show_symtab_source): Add "win_info" parameter.
* tui/tui-source.c (tui_set_source_content): Add "win_info"
parameter.
(tui_show_symtab_source): Likewise.
tui_check_and_display_highlight_if_needed currently checks the
window's type; but this can be replaced with a check of
"can_highlight", making it more polymorphically-correct.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-wingeneral.c
(tui_check_and_display_highlight_if_needed): Check can_highlight.
This introduces a "can_scroll" method, removing a spot that explicitly
checks a window's type.
gdb/ChangeLog
2019-07-17 Tom Tromey <tom@tromey.com>
* tui/tui-data.h (struct tui_win_info) <can_scroll>: New method.
(struct tui_cmd_window) <can_scroll>: New method.
* tui/tui-command.c (tui_dispatch_ctrl_char): Use can_scroll
method.
Non-const reference parameter should be avoided according to the GDB
coding standard:
https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Avoid_non-const_reference_parameters.2C_use_pointers_instead
This commit updates the gdbarch method gdbarch_stap_adjust_register,
and the one implementation i386_stap_adjust_register to avoid using a
non-const reference parameter.
I've also removed the kfail from the testsuite for bug 24541, as this
issue is now resolved.
gdb/ChangeLog:
PR breakpoints/24541
* gdbarch.c: Regenerate.
* gdbarch.h: Regenerate.
* gdbarch.sh: Adjust return type and parameter types for
'stap_adjust_register'.
(i386_stap_adjust_register): Adjust signature and return new
register name.
* stap-probe.c (stap_parse_register_operand): Adjust use of
'gdbarch_stap_adjust_register'.
gdb/testsuite/ChangeLog:
PR breakpoints/24541
* gdb.mi/mi-catch-cpp-exceptions.exp: Remove kfail due to 24541.
This removes a use of VEC fro s390-linux-nat.c, replacing it with
std::vector.
Tested using the Fedora-s390x-m64 buildbot builder.
gdb/ChangeLog
2019-07-17 Tom Tromey <tromey@adacore.com>
* s390-linux-nat.c (s390_watch_area): Remove typedef. Don't
declare VEC.
(struct s390_debug_reg_state) <watch_areas, break_areas>: Now
std::vector.
(struct s390_process_info): Add initializers.
(s390_add_process): Use new.
(s390_linux_nat_target::low_forget_process): Use delete.
(s390_linux_nat_target::low_new_fork)
(s390_linux_nat_target::stopped_by_watchpoint)
(s390_linux_nat_target::low_prepare_to_resume)
(s390_linux_nat_target::insert_watchpoint)
(s390_linux_nat_target::insert_hw_breakpoint)
(s390_linux_nat_target::remove_watchpoint)
(s390_linux_nat_target::remove_hw_breakpoint): Update.
Once operand parsing has completed, the simpler check of Operand_Mem can
be used in places where i.types[] got passed to operand_type_check().
Note that this has shown a couple of omissions of adjusting i.flags[]
when playing with i.op[] / i.types[] / i.tm.operand_types[]. Not all of
them get added here, just all of the ones needed in process_operands().
This was supposed to also be removed by c48dadc9a8 ('x86: drop "mem"
operand type attribute'). It's odd enough that this hasn't caused
build issues, considering the careful use of OTunused (apparently to
avoid "missing initializer" warnings).
To avoid such happening again introduce compile time consistency
checks.
... instead of an operand type bit: It's an insn property, not an
operand one. There's just one actual change to be made to the
templates: Most are now required to have the (unswapped) destination go
into ModR/M.rm, so VMOVD template needs its opcode adjusted accordingly
and its operands swapped. {,V}MOVS{S,D}, otoh, are left alone in this
regard, as otherwise generated code would differ from what we've been
producing so far (which I don't think is wanted).
Take the opportunity and add a missing IgnoreSize to pextrb (leading to
an error in 16-bit mode), and take the liberty to once again drop stray
IgnoreSize attributes from lines changed and neighboring related ones.
They're the only exception to there generally being no mix of register
kinds possible in an insn operand template, and there being two bits per
operand for their representation is also quite wasteful, considering the
low number of uses. Fold both bits and deal with the little bit of
fallout.
Also take the liberty and drop dead code trying to set REX_B: No segment
register has RegRex set on it.
Additionally I was quite surprised that PUSH/POP with the permitted
segment registers is not covered by the test cases. Add the missing
pieces.
Remove unused gdbarch argument to helper functions originally
copied from mips-fbsd-nat.c. Include regcache.h previously
included from defs.h via gdbarch.h.
gdb/ChangeLog:
* aarch64-fbsd-nat.c: Include regcache.h.
(getregs_supplies, getfpregs_supplies): Remove unused gdbarch
argument.
(aarch64_fbsd_nat_target::fetch_registers)
(aarch64_fbsd_nat_target::store_registers): Remove gdbarch
variable.
* arm-fbsd-nat.c, riscv-fbsd-nat.c: Likewise.
This removes a FIXME comment from mi_ui_out::do_field_int, by
replacing a printf with a use of plongest.
2019-07-15 Tom Tromey <tromey@adacore.com>
* mi/mi-out.c (mi_ui_out::do_field_int): Use plongest.
This adds field_unsigned and changes various places using field_fmt
with "%u" to use this instead. This also replaces an existing
equivalent helper function in record-btrace.c.
2019-07-15 Tom Tromey <tromey@adacore.com>
* mi/mi-out.h (class mi_ui_out) <do_field_unsigned>: Declare.
* mi/mi-out.c (mi_ui_out::do_field_unsigned): New method.
* cli-out.h (class cli_ui_out) <do_field_unsigned>: Declare.
* cli-out.c (cli_ui_out::do_field_int): New method.
* ui-out.c (ui_out::field_unsigned): New method.
* symfile.c (generic_load): Use field_unsigned.
(print_transfer_performance): Likewise.
* record-btrace.c (ui_out_field_uint): Remove.
(btrace_call_history_insn_range, btrace_call_history): Use
field_unsigned.
* disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
field_unsigned.
* ui-out.h (class ui_out) <field_unsigned>: New method.
<do_field_unsigned>: Likewise.
This replaces uses of field_fmt with a "%s" format string to use
field_string instead. Also, one use of "%9lx" is replaced with a call
to phex_nz; the '9' is dropped as it is implicit in the field width.
2019-07-15 Tom Tromey <tromey@adacore.com>
* mi/mi-main.c (list_available_thread_groups): Use field_string.
* mi/mi-interp.c (mi_memory_changed): Use field_string.
* target.c (flash_erase_command): Use field_string.
* infrun.c (print_signal_received_reason): Use field_string.
* i386-tdep.c (i386_mpx_print_bounds): Use field_string.
* breakpoint.c (maybe_print_thread_hit_breakpoint): Use
field_string.
* ada-tasks.c (print_ada_task_info): Use field_string.
This changes a few spots that use field_fmt to use field_core_addr
instead.
gdb/ChangeLog
2019-07-15 Tom Tromey <tromey@adacore.com>
* target.c (flash_erase_command): Use field_core_addr.
* symfile.c (generic_load): Use field_core_addr.
* sparc64-linux-tdep.c (sparc64_linux_handle_segmentation_fault):
Use field_core_addr.
* i386-linux-tdep.c (i386_linux_handle_segmentation_fault): Use
field_core_addr.
This patch fixes the eBPF CPU description in order to reflect the
right explicit arguments passed to the ldabs{b,h,w,dw} instructions,
updates the corresponding GAS tests, and updates the BPF section of
the GAS manual.
cpu/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf.cpu (dlabs): New pmacro.
(dlind): Likewise.
opcodes/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf-desc.c: Regenerate.
* bpf-opc.c: Likewise.
* bpf-opc.h: Likewise.
gas/ChangeLog:
2019-07-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/bpf/mem.s: ldabs instructions do not take a `src'
register as an argument.
* testsuite/gas/bpf/mem.d: Updated accordingly.
* testsuite/gas/bpf/mem-be.d: Likewise.
* doc/c-bpf.texi (BPF Opcodes): Update to reflect the correct
explicit arguments to ldabs and ldind instructions.
> Building LLVM 6.0 on FreeBSD/powerpc (devel/llvm60 port) the assertion
> in the subject trips (displays twice) when linking libLTO.so.1. The
> issue has been filed in FreeBSD's bugzilla, at
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=237068 . It appears
> the 'llvm::hashing::detail::get_execution_seed()::seed@@JL_LLVM_6.0'
> symbol is being weakly aliased to an indirect symbol
> __bss_start@@JL_LLVM_6.0. Since __bss_start@@JL_LLVM_6.0 is an
> indirect symbol, it fails the assertion.
I haven't looked under a debugger at your testcase but I think I know
what is going on here. You have a shared library with a weakly
defined llvm::hashing::detail::get_execution_seed()::seed which
happens to be at the same location as __bss_start in that library. At
the time the linker loads symbols for that library, it sees they are
both versioned and thus introduces non-versioned indirect symbols for
them. The linker considers the symbols as possibly being aliases,
setting up h->u.alias and h->is_weakalias such that
__bss_start@@JL_LLVM_6.0 is the definition. No real problem so far,
the definition is bfd_link_hash_defined, except that the zero size, no
type __bss_start symbol possibly should not be considered an alias in
the first place.
Later, __bss_start as defined by the linker script is entered into the
linker symbol table. This is similar to __bss_start being defined by
a regular object file in that ELF symbol resolution rules say that the
value of __bss_start in the library is overridden by __bss_start in
the executable/library being produced. So to accomplish the override,
ld flips __bss_start from being an indirect symbol pointing at
__bss_start@@JL_LLVM_6.0 to __bss_start@@JL_LLVM_6.0 being an indirect
symbol pointing at __bss_start. That's how we get an unexpected
indirect symbol and hit the assert.
What should happen I think, is for the def->def_regular code above the
assert to run in this case. The symbols are no longer aliases.
* elflink.c (_bfd_elf_fix_symbol_flags): If the def for an
alias is no longer bfd_link_hash_defined, clear the alias.
The eBPF non-generic load instructions ldind{b,h,w,dw} and
ldabs{b,h,w,dw} do not take an explicit destination register as an
argument. Instead, they put the loaded value in %r0, implicitly.
This patch fixes the CPU BPF description to not expect a 'dst'
argument in these arguments, regenerates the corresponding files in
opcodes, and updates the impacted GAS tests.
Tested in a x86-64 host.
cpu/ChangeLog:
2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf.cpu (dlsi): ldabs and ldind instructions do not take an
explicit 'dst' argument.
opcodes/ChangeLog:
2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com>
* bpf-desc.c: Regenerate.
* bpf-opc.c: Likewise.
gas/ChangeLog:
2019-07-14 Jose E. Marchesi <jose.marchesi@oracle.com>
* testsuite/gas/bpf/mem.s: Do not use explicit arguments for
ldabs and ldind instructions.
* testsuite/gas/bpf/mem.d: Updated accordingly.
* testsuite/gas/bpf/mem-be.d: Likewise.
A recent change renamed the common/ directory into gdbsupport/ in gdb.
This causes problems in the getver function in the src-release script
which doesn't find the create-version.sh script anymore. As a result,
it falls back on using the version.in file verbatim, meaning that
the "DATE" placeholder doesn't get replaced with the snapshot date,
and the "-git" suffix doesn't get stripped. More precisely, we get
snapshots called "gdb-8.3.50-DATE-git.tar" instead of (e.g.)
"gdb-8.3-20190712.tar".
This commit fixes the issue by adding support for this situation.
I left the support for $tool/common/create-version.sh, because
the sim still uses that directory structure.
ChangeLog:
* src-release (getver): If $tool/gdbsupport/create-version.sh
exists, use that to determine the version number.
It is possible to create shared libraries on PowerPC using
-ftls-model=inital-exec or -ftls-model=local-exec. The first is half
reasonable, getting you a shared library that can't be dlopen'd but
otherwise is reasonable. The second is quite bad. Not only do you
lose being able to dlopen, the library also has dynamic text
relocations. Worse, the TPREL16_LO, TPREL16_HA and other TPREL16
dynamic relocs emitted were wrong, resulting in wrong values being
applied by ld.so.
Using the first TLS section symbol in dynamic relocations for local
TLS symbols doesn't work. It's wrong because TLS symbols used by TLS
relocs have values relative to the TLS segment, whereas the TLS
section symbols are addresses. This patch instead uses a symbol index
of zero which is used elsewhere by PowerPC on dynamic TLS relocs.
It's not strictly ABI compliant to use a non-TLS symbol with TLS
relocs but symbol index zero can be interpreted as "no symbol". Not
using the first TLS section symbol means it doesn't need to be dynamic.
The patch also fixes a further problem with PowerPC32 dynamic TPREL16*
relocs, which shouldn't have the symbol value in the addend as we do
for non-TLS symbols.
bfd/
* elflink.c (_bfd_elf_omit_section_dynsym_default): Don't keep
tls_sec.
(_bfd_elf_init_1_index_section): Prefer not using TLS sections.
(_bfd_elf_init_2_index_sections): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): When emitting dynamic
relocations for local TLS symbols, use STN_UNDEF as the relocation
symbol.
* elf32-ppc.c (ppc_elf_relocate_section): Likewise, and don't
leave TLS symbol value in the addend.
ld/
* testsuite/ld-powerpc/tlsso.r: Update.
* testsuite/ld-powerpc/tlsso32.g: Update.
* testsuite/ld-powerpc/tlsso32.r: Update.
* testsuite/ld-powerpc/tlstocso.r: Update.
* testsuite/ld-cris/tls-dso-dtpoffd2.d: Update.
* testsuite/ld-cris/tls-dso-dtpoffd4.d: Update.
* testsuite/ld-cris/tls-dso-tpoffgotcomm1.d: Update.
* testsuite/ld-cris/tls-gd-1.d: Update.
* testsuite/ld-cris/tls-gd-1h.d: Update.
* testsuite/ld-cris/tls-gd-2.d: Update.
* testsuite/ld-cris/tls-gd-2h.d: Update.
* testsuite/ld-cris/tls-ie-10.d: Update.
* testsuite/ld-cris/tls-ie-11.d: Update.
* testsuite/ld-cris/tls-ie-8.d: Update.
* testsuite/ld-cris/tls-ie-9.d: Update.
* testsuite/ld-cris/tls-js1.d: Update.
* testsuite/ld-cris/tls-ld-4.d: Update.
* testsuite/ld-cris/tls-ld-5.d: Update.
* testsuite/ld-cris/tls-ld-6.d: Update.
* testsuite/ld-cris/tls-ld-7.d: Update.
* testsuite/ld-cris/tls-ldgd-14.d: Update.
* testsuite/ld-cris/tls-ldgd-15.d: Update.
* testsuite/ld-cris/tls-ldgdx-14.d: Update.
* testsuite/ld-cris/tls-ldgdx-15.d: Update.
* testsuite/ld-cris/tls-local-54.d: Update.
* testsuite/ld-cris/tls-local-60.d: Update.
* testsuite/ld-cris/tls-local-61.d: Update.
* testsuite/ld-cris/tls-local-63.d: Update.
* testsuite/ld-cris/tls-local-64.d: Update.
* testsuite/ld-cris/tls-ok-30.d: Update.
* testsuite/ld-cris/tls-ok-32.d: Update.
* testsuite/ld-cris/tls-ok-34.d: Update.
* testsuite/ld-mips-elf/tls-multi-got-1.got: Update.
* testsuite/ld-mips-elf/tls-multi-got-1.r: Update.
* testsuite/ld-mips-elf/tlsdyn-pie-o32.d: Update.
* testsuite/ld-mips-elf/tlsdyn-pie-o32.got: Update.
* testsuite/ld-mips-elf/tlslib-o32-hidden.got: Update.
* testsuite/ld-mips-elf/tlslib-o32-ver.got: Update.
* testsuite/ld-mips-elf/tlslib-o32.got: Update.
* testsuite/ld-s390/tlspic.rd: Update.
* testsuite/ld-s390/tlspic_64.rd: Update.
* testsuite/ld-sparc/tlssunnopic32.rd: Update.
* testsuite/ld-sparc/tlssunnopic64.rd: Update.
* testsuite/ld-sparc/tlssunpic32.rd: Update.
* testsuite/ld-sparc/tlssunpic64.rd: Update.
This stops the first overlay section being ignored when empty,
losing its LMA assignment
PR 24786
* ldlang.h (enum section_type): Add first_overlay_section.
* ldlang.c (lang_add_section): Adjust switch statement.
(map_input_to_output_sections): Likewise.
(lang_size_sections_1): Always set last_os for first overlay section.
(lang_leave_overlay): Set sectype to first_overlay_section.
Note that gold won't remove unused GOT entries, in contrast to ld.bfd
which will.
* powerpc.cc (Powerpc_relobj::make_got_relative): New function.
(relative_value_is_known): New functions.
(Target_powerpc::Relocate::relocate): Edit code using
GOT16_HA, GOT16_LO_DS, and GOT_PCREL34 relocs.