* output.cc: Rename Output_data_got template parameter from size
to got_size for all functions. Compile all variants of
Output_data_got.
(Output_data_got::Got_entry::write): Correct use of size for
symbol value. Use local_is_tls rather than casting to
Sized_relobj_file.
* object.h (class Object): Add local_is_tls and do_local_is_tls.
(class Sized_relobj_file): Add do_local_is_tls.
* incremental.h (class Sized_relobj_incr): Add do_local_is_tls.
bfd/
* bfd-in2.h: Regenerated.
* elf64-aarch64.c
(elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
(elf64_aarch64_reloc_map): Add reloc entry.
(aarch64_resolve_relocation): Likewise.
(bfd_elf_aarch64_put_addend): Likewise.
(aarch64_reloc_got_type): Likewise.
(elf64_aarch64_final_link_relocate): Likewise.
(lf64_aarch64_check_relocs): Likewise.
(elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
reloc.
* libbfd.h: Regenerated.
* reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
gas/
* config/tc-aarch64.c
(reloc_table): Add reloc to table entry.
(parse_address_main): Add support for #:<reloc_op>:<symbol>.
(parse_operands): Check for unused reloc.
(md_apply_fix): New case for reloc.
(aarch64_force_relocation): Likewise.
gas/testsuite
* gas/aarch64/reloc-insn.d
(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add expected asm for new reloc test.
* gas/aarch64/reloc-insn.s
(BFD_RELOC_AARCH64_GOT_LD_PREL19): Add test for reloc.
include/
* elf/aarch64.h (R_AARCH64_GOT_LD_PREL19): New reloc.
ld/testsuite
* ld-aarch64/aarch64-elf.exp: New reloc tests.
* ld-aarch64/emit-relocs-309-low-bad.d: New file. Expected asm for test
failure (lower bound overflow).
* ld-aarch64/emit-relocs-309-low.d: New file. Expected asm for test
success (lower bound).
* ld-aarch64/emit-relocs-309-up-bad.d: New file. Expected asm for test
failure (upper bound overflow).
* ld-aarch64/emit-relocs-309-up.d: New file. Expected asm for test
success (upper bound).
* ld-aarch64/emit-relocs-309.s: New file. Asm for new reloc tests.
The build_address_symbolic funnction filters out data symbols if
their size is set to zero. But the problem is that the COFF symbol
table (for instance) does not provide any size information, leaving
the size to its default value of zero, thus always triggering
the filter.
This shows up when trying to print the address of a global variable
when debugging a Windows executable, for instance.
gdb/ChangeLog:
* symtab.h (struct minimal_symbol) [has_size]: New field.
(MSYMBOL_SIZE): Adjust to forbid macro from being used as lvalue.
(SET_MSYMBOL_SIZE, MSYMBOL_HAS_SIZE): New macros.
* printcmd.c (build_address_symbolic): Only filter out zero-sized
minimal symbols if the symbol's size is actually known.
* minsyms.c (prim_record_minimal_symbol_full): Adjust setting
of msymbol's size field. Add comment.
* elfread.c (elf_symtab_read, elf_rel_plt_read): Use
SET_MSYMBOL_SIZE to set the minimal symbol size.
gdb/ChangeLog:
* minsyms.c (install_minimal_symbols): Use memset to fill entire
minimal_symbol struct object, rather than setting some of its
fields one by one.
gdb/ChangeLog:
* c-typeprint.c (c_type_print_varspec_prefix): Pass through the
passed_a_ptr flag when displaying typedef types.
gdb/testsuite/ChangeLog:
* gdb.base/ptype.exp: Test ptype on a pointer to a typedef.
* layout.cc (Layout::set_segment_offsets): When using
common-page-size alignment, ensure we are on a new max-page-size
page.
* output.cc (Output_segment::set_section_addresses): Use
abi_pagesize, not common_pagesize for relro boundary.
(Output_segment::set_offset): Likewise.
Assuming the following declarations:
type Discriminants_Record (A : Integer; B : Boolean) is record
C : Float;
end record;
Z : Discriminants_Record := (A => 1, B => False, C => 2.0);
If variable Z is not used, and the compiler optimizes it out,
GDB would crash as follow:
(gdb) print Z
/[...]/gdb/valops.c:1121: internal-error: Unexpected lazy value type.
This is because the ada-lang module forgot to set the optimized_out
flag in the value returned by ada_evaluate_subexp during the value's
"fixing" process. Later on, when trying to print the resulting value,
GDB finds that the value is still lazily allocated, and thus tries to
fetch it. But this is not allowed for not_lval values, hence the internal
error.
gdb/ChangeLog:
* ada-lang.c (coerce_unspec_val_to_type): Make sure that
the optimized_out flag is preserved.
gdb/testsuite/ChangeLog:
* gdb.ada/optim_drec: New testcase.
* gdb-index.cc (Gdb_index::pubnames_read): New parameter.
(Gdb_index::pubtypes_read): New parameter.
(Gdb_index_info_reader::read_pubnames_and_pubtypes): Add parameters
to calls.
* gdb-index.h (Gdb_index): New fields pubnames_object_ and
pubtypes_object_.
* gdbtypes.h (BOOL_PTR_CONVERSION_BADNESS): Rename to ...
(BOOL_CONVERSION_BADNESS): ... this.
* gdbtypes.c (BOOL_PTR_CONVERSION_BADNESS): Likewise.
(rank_one_type): Allow all boolean conversions
permitted by the standard.
* gdb.cp/converts.cc (A::A): Add ctor.
(A::member_): Add member.
(enum my_enum): New enumeration.
(main): Add calls to foo1_7 with various
permitted arguments.
* gdb.cp/converts.exp: Add tests for boolean
conversions permitted by the standard.
orphan sections to .data and .bss output sections, not just .text.
When giving up on finding a suitable output section, attach to any
output section other than .MMIX.reg_contents, if it exists.
* scripttempl/mmo.sc: Move output debug sections to just before
.MMIX.reg_contents. Add .gnu.attributes. Add new . = . NOP
assignments and move end-of-section provide-symbols after them
to force the end-of-section symbols to the address after orphan
placement. Add SORT_NONE to .init and .fini sections.
(Sized_target::gc_add_reference, do_gc_add_reference): New functions.
* gc.h (gc_process_relocs): Call target gc_add_reference.
* gold.cc (queue_middle_tasks): Use gc_mark_symbol on start sym.
* symtab.cc (Symbol_table::gc_mark_undef_symbols): Use gc_mark_symbol.
(Symbol_table::gc_mark_symbol): Call target gc_mark_symbol. Remove
unnecessary cast.
* powerpc.cc (Powerpc_relobj::get_opd_ent): Rearrange parameters
to cater for when we don't need code offset. Update use.
(Powerpc_relobj::access_from_map_, opd_valid_): New vars.
(Powerpc_relobj::access_from_map, add_reference, opd_valid,
set_opd_valid): New functions.
(Target_powerpc::do_gc_add_reference): New function.
(Target_powerpc::gc_process_relocs): Call gc()->add_reference on
stashed refs.
(Target_powerpc::do_gc_mark_symbol): New function.
Replace -nw option with $INTERNAL_GDBFLAGS in "xgdb" tests to
avoid spurious results due to ~/.gdbinit.
* gdb.gdb/complaint.exp (setup_test): Replace -nw option with
$INTERNAL_GDBFLAGS in run command.
* gdb.gdb/observer.exp (setup_test): Ditto.
* gdb.gdb/selftest.exp (test_with_self): Ditto.
* gdb.gdb/xfullpath.exp (setup_test): Ditto.