aboutsummaryrefslogtreecommitdiff
path: root/gold
AgeCommit message (Collapse)AuthorFilesLines
2021-09-18[GOLD] Output_data_got tidyAlan Modra3-123/+14
Some Output_data_got methods already have support for addends, but were implemented as separate methods. This removes unnecessary code duplication. Relobj::local_has_got_offset and others there get a similar treatment. Comments are removed since it should be obvious without a comment, and the existing comments are not precisely what the code does. For example, a local_has_got_offset call without an addend does not return whether the local symbol has *a* GOT offset of type GOT_TYPE, it returns whether there is a GOT entry of type GOT_TYPE for the symbol with addend of zero. PR 28192 * output.h (Output_data_got::add_local): Make addend optional. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_pair_with_rel): Likewise. * output.cc (Output_data_got::add_local): Delete overload without addend. (Output_data_got::add_local_with_rel): Likewise. (Output_data_got::add_local_pair_with_rel): Likewise. * object.h (Relobj::local_has_got_offset): Make addend optional. Delete overload without addend later. Update comment. (Relobj::local_got_offset): Likewise. (Relobj::set_local_got_offset): Likewise.
2021-09-18[GOLD] Remove addend from Local_got_entry_keyAlan Modra2-10/+7
This patch removes the addend from Local_got_entry_key, which is unnecessary now that Got_offset_list has an addend. Note that it might be advantageous to keep the addend in Local_got_entry_key when linking objects containing a large number of section_sym+addend@got relocations. I opted to save some memory by removing the field but left the class there in case we might need to restore {sym,addend} lookup. That's also why this change is split out from the Got_offset_list change. PR 28192 * object.h (Local_got_entry_key): Delete addend_ field. Adjust constructor and methods to suit. * object.cc (Sized_relobj::do_for_all_local_got_entries): Update key.
2021-09-18[GOLD] Got_offset_list: addend fieldAlan Modra3-22/+34
This is the first in a series of patches aimed at supporting GOT entries against symbol plus addend generally for PowerPC64 rather than just section symbol plus addend as gold has currently. This patch adds an addend field to Got_offset_list, so that both local and global symbols can have GOT entries with addend. PR 28192 * object.h (Got_offset_list): Add addend_ field, init in both constructors. Adjust all accessors to suit. (Sized_relobj::do_local_has_got_offset): Adjust to suit. (Sized_relobj::do_local_got_offset): Likewise. (Sized_relobj::do_set_local_got_offset): Likewise. * symtab.h (Symbol::has_got_offset): Add optional addend param. (Symbol::got_offset, Symbol::set_got_offset): Likewise. * incremental.cc (Local_got_offset_visitor::visit): Add unused uint64_t parameter with FIXME. (Global_got_offset_visitor::visit): Add unused uint64_t parameter.
2021-09-02gold: --export-dynamic-symbol: don't imply -uFangrui Song2-13/+0
to match GNU ld. gold/ * archive.cc (Library_base::should_include_member): Don't handle --export-dynamic-symbol. * symtab.cc (Symbol_table::do_add_undefined_symbols_from_command_line): Likewise.
2021-08-18[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcsAlan Modra1-0/+2
Fixes a silly mistake in calculating the address of -Os out-of-line register save/restore function copies. Copies of these linker defined functions are added to stub sections when the original (in target->savres_section) can't be reached. * powerpc.cc (Target_powerpc::Relocate::relocate): Correct address calculation of out-of-line save/restore function copies.
2021-08-11Deprecate a.out support for NetBSD targets.John Ericson1-1/+1
As discussed previously, a.out support is now quite deprecated, and in some cases removed, in both Binutils itself and NetBSD, so this legacy default makes little sense. `netbsdelf*` and `netbsdaout*` still work allowing the user to be explicit about there choice. Additionally, the configure script warns about the change as Nick Clifton requested. One possible concern was the status of NetBSD on NS32K, where only a.out was supported. But per [1] NetBSD has removed support, and if it were to come back, it would be with ELF. The binutils implementation is therefore marked obsolete, per the instructions in the last message. With that patch and this one applied, I have confirmed the following: --target=i686-unknown-netbsd --target=i686-unknown-netbsdelf builds completely --target=i686-unknown-netbsdaout properly fails because target is deprecated. --target=vax-unknown-netbsdaout builds completely except for gas, where the target is deprecated. [1]: https://mail-index.netbsd.org/tech-toolchain/2021/07/19/msg004025.html --- bfd/config.bfd | 43 +++++++++++++-------- bfd/configure.ac | 5 +-- binutils/testsuite/binutils-all/nm.exp | 2 +- binutils/testsuite/lib/binutils-common.exp | 7 +--- config/picflag.m4 | 4 +- gas/configure.tgt | 9 +++-- gas/testsuite/gas/arm/blx-bl-convert.d | 2 +- gas/testsuite/gas/arm/blx-local-thumb.d | 2 +- gas/testsuite/gas/sh/basic.exp | 2 +- gdb/configure.host | 34 +++++++---------- gdb/configure.tgt | 2 +- gdb/testsuite/gdb.asm/asm-source.exp | 6 +-- intl/configure | 2 +- ld/configure.tgt | 44 +++++++++++----------- ld/testsuite/ld-arm/arm-elf.exp | 4 +- ld/testsuite/ld-elf/elf.exp | 2 +- ld/testsuite/ld-elf/shared.exp | 4 +- libiberty/configure | 4 +-
2021-08-10Updated Serbian and Russian translations for various sub-directoriesNick Clifton2-424/+436
2021-07-20PR28106, build of 2.37 fails on FreeBSD and ClangAlan Modra2-2/+8
https://en.cppreference.com/w/cpp/types/NULL says NULL might be defined as nullptr. https://en.cppreference.com/w/cpp/language/reinterpret_cast says reinterpret_cast can't be used on nullptr. PR gold/28106 PR gold/27815 * gc.h (gc_process_relocs): Use static_cast in Section_id constructor.
2021-07-18PR28098 Skip R_*_NONE relocation entries with zero r_sym without countingMichael Krasnyk3-2/+11
PR gold/28098 * reloc.cc (Track_relocs::advance): Skip R_*_NONE relocation entries with r_sym of zero without counting in advance method.
2021-07-05Updated translations (mainly Ukranian and French) triggered by creation of ↵Nick Clifton2-919/+937
2.37 branch.
2021-07-03Update version number and regenerate filesNick Clifton2-513/+563
2021-07-03Add markers for 2.37 branchNick Clifton1-0/+4
2021-05-25[GOLD] PR27815, gold fails to build with latest GCCAlan Modra2-2/+7
Don't use nullptr, it requires -std=c++11 on versions of gcc prior to 6.1. It would be possible to arrange to pass -std=c++11 automatically when required (top level configure does that for gcc builds) but that seems overkill and since we're not up-to-date on the top level config files would mean someone would need to sync those over. PR gold/27815 * gc.h (gc_process_relocs): Use cast in Section_id constructor.
2021-05-22[GOLD] PR27815, gold fails to build with latest GCCAlan Modra2-2/+7
...gold/gc.h:250:37: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: [-Werror] 250 | (*secvec).push_back(Section_id(NULL, 0)); | ^~~~~~~~~~~~~~~~~~~ PR gold/27815 * gc.h (gc_process_relocs): Use nullptr in Section_id constructor.
2021-05-15[GOLD]: Re: Add -Bno-symbolicAlan Modra2-1/+7
PR 27834 * options.cc (General_options::General_options): Init bsymbolic_.
2021-05-14gold: Add -Bno-symbolicFangrui Song3-4/+60
gold/ PR 27834 * options.h (General_options): Make -Bsymbolic and -Bsymbolic-functions special and adjust the help messages. Add enum Bsymbolic_kind and -Bno-symbolic. * options.cc (General_options): Define parse_Bno_symbolic, parse_Bsymbolic_functions, and parse_Bsymbolic.
2021-03-30PR27625, powerpc64 gold __tls_get_addr callsAlan Modra2-53/+197
This patch supports linking powerpc64 glibc with gold, specifically the __tls_get_addr call in elf/dl-sym.c. That call lacks marker relocations tying it to the arg setup instructions, but the arg setup insns are also contructed lacking the usual relocations on a Global Dynamic TLS code sequence. So there is no chance that anything in that sequence might be wrongly edited by the linker. In fact, the aim of linking glibc could have been supported by simply omitting the error whenever TLS optimisation is disabled, as it is when linking a shared library. The patch goes further than that, disabling TLS GD and LD sequence optimisation on a per-object basis for object files lacking marker relocs. PR gold/27625 * powerpc.cc (Powerpc_relobj): Add no_tls_marker_, tls_marker_, and tls_opt_error_ variables and accessors. (Target_powerpc::Scan::local, global): Call set_tls_marker and set_no_tls_marker for GD and LD code sequence relocations. (Target_powerpc::Relocate::relocate): Downgrade the "lacks marker reloc" error to a warning when safe to do so, and omit the error entirely if not optimising TLS sequences. Do not optimise GD and LD sequences for objects lacking marker relocs. (Target_powerpc::relocate_relocs): Heed no_tls_marker here too.
2021-03-19Use stdout when printing object file names for -t option.Cary Coutant5-1/+39
gold/ PR gold/27615 * errors.cc (Errors::trace): New method. (gold_trace): New function. * errors.h (Errors::trace): New method. * gold.h (gold_trace): New function. * object.cc (Input_objects::add_object): Use gold_trace to print object file names.
2021-03-19Fix failing test for PR 23870.Cary Coutant3-6/+13
gold/ PR gold/pr23870 * testsuite/aarch64_pr23870_bar.c: Return a magic value. * testsuite/aarch64_pr23870_foo.c: Check the magic value and return success or failure.
2021-03-19Fix call to system fallocate to handle errno correctly.Holger Berger2-2/+9
2021-03-19 Holger Berger <holger.berger@googlemail.com> gold/ PR gold/26541 * output.cc (gold_fallocate): Use errno when calling system fallocate.
2021-03-19Fix typo in previous patch: should use struct mallinfo2.Cary Coutant2-2/+8
PR gold/26585 * main.cc (main): Fix typo in previous patch.
2021-03-19Regenerate config.in, missing from previous commit.Cary Coutant1-0/+3
PR gold/26585 * config.in: Regenerate from previous commit.
2021-03-19Fix gold to use mallinfo2 if available instead of deprecated mallinfo.Duncan Simpson4-4/+16
gold/ PR gold/26585 * configure.ac: Add check for mallinfo2. * configure: Regenerate. * main.cc (main): Use mallinfo2 if available.
2021-03-19Add DWARF 5 support in gold.Cary Coutant3-101/+644
elfcpp/ PR gold/27246 * dwarf.h (enum DW_LNCT): Add line number table content type codes. (enum DW_LINE_OPS): Reformat. (enum DW_LINE_EXTENDED_OPS): Reformat. (enum DW_CHILDREN): Reformat. (enum DW_RLE): Add range list entry types. (enum DW_SECT): Update values for DWARF 5. gold/ PR gold/27246 * dwarf_reader.cc (Dwarf_abbrev_table::do_get_abbrev): Handle DW_FORM_implicit_const. (Dwarf_ranges_table::read_ranges_table): Add version parameter; Adjust all callers. Look for .debug_rnglists section if DWARF 5. (Dwarf_ranges_table::read_range_list_v5): New method. (Dwarf_die::read_attributes): Handle new DWARF 5 DW_FORM codes. (Dwarf_die::skip_attributes): Likewise. (Dwarf_info_reader::do_parse): Support DWARF 5 unit header format. (Dwarf_info_reader::read_3bytes_from_pointer): New method. (Sized_dwarf_line_info::Sized_dwarf_line_info): Initialize str_buffer_, str_buffer_start, reloc_map_, line_number_map_. Look for .debug_line_str section. (Sized_dwarf_line_info::read_header_prolog): Support DWARF 5 prolog. (Sized_dwarf_line_info::read_header_tables): Rename to... (Sized_dwarf_line_info::read_header_tables_v2): ... this. (Sized_dwarf_line_info::read_header_tables_v5): New method. (Sized_dwarf_line_info::process_one_opcode): Insert missing "this->". Change advance_line to signed int64_t. (Sized_dwarf_line_info::read_lines): Add endptr parameter; adjust callers. Insert missing "this->". (Sized_dwarf_line_info::read_line_mappings): Support DWARF 5. (Sized_dwarf_line_info::do_addr2line): Add debug code. * dwarf_reader.h (Dwarf_abbrev_table::Attribute): Add implicit_const field. Adjust constructor. (Dwarf_abbrev_table::add_sttribute): Add implicit_const parameter. (Dwarf_ranges_table::read_ranges_table): Add version parameter. (Dwarf_ranges_table::read_range_list_v5): New method. (Dwarf_die): Remove unused attr_off field. (Dwarf_info_reader::Dwarf_info_reader): Initialize unit_type_ field. (Dwarf_info_reader::is_type_unit): New method. (Dwarf_info_reader::read_3bytes_from_pointer): New method. (Dwarf_info_reader::read_range_list): Call read_range_list_v5 for DWARF 5 range lists. (Dwarf_info_reader::is_type_unit_): Remove. (Dwarf_info_reader::unit_type_): New field. (Sized_dwarf_line_info::~Sized_dwarf_line_info): Delete str_buffer_start_. (Sized_dwarf_line_info::read_header_tables): Rename to... (Sized_dwarf_line_info::read_header_tables_v2): ... this. (Sized_dwarf_line_info::read_header_tables_v5): New method. (Sized_dwarf_line_info::read_lines): Add endptr parameter. (Sized_dwarf_line_info::Dwarf_line_infoHeader): Add address_size field. (Sized_dwarf_line_info::str_buffer_): New field. (Sized_dwarf_line_info::str_buffer_end_): New field. (Sized_dwarf_line_info::str_buffer_start_): New field. (Sized_dwarf_line_info::end_of_header_length_): New field. (Sized_dwarf_line_info::end_of_unit_): New field.
2021-01-28gold: Skip address size and segment selector for DWARF5H.J. Lu2-0/+10
The .debug_line secton in DWARF5 has a byte for address size and a byte for segment selector after DWARF version. Skip them for DWARF5. PR gold/27246 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Skip address size and segment selector for DWARF5.
2021-01-19[GOLD] powerpc assertion failureAlan Modra2-1/+6
A testcase with only ifuncs can result in no plt section (ifunc plt entries might instead be in iplt), which means we can get to this code without a static link. PR 27203 * powerpc.cc (do_plt_fde_location): Remove doing_static_link assertion.
2021-01-17gold: Remove the circular IFUNC dependency in ifuncmain6pieH.J. Lu3-16/+14
On Fedora 33 x86-64 with glibc 2.32-3, ifuncmain6pie failed with: ./ifuncmain6pie: IFUNC symbol 'foo' referenced in './ifuncmod6.so' is defined in the executable and creates an unsatisfiable circular dependency. FAIL ifuncmain6pie (exit status: 127) Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so, which trigger the circular IFUNC dependency. * testsuite/ifuncmain6pie.c: Remove non-JUMP_SLOT relocations against foo in ifuncmod6.so. * testsuite/ifuncmod6.c: Likewise.
2021-01-14Updated translations for some subdirectoriesNick Clifton2-353/+381
2021-01-11Updated translations for multiple subdirectoriesNick Clifton3-706/+758
2021-01-09Add Changelog entries and NEWS entries for 2.36 branchNick Clifton1-0/+4
2021-01-03PR27140, ppc32 segmentation fault in make_stubAlan Modra2-4/+13
This fixes a thinko in commit fa40fbe4849. st_other global entry bits are relevant only for 64-bit ELFv2. PowerPC gold leaves local sym vector of st_other bits as NULL for 32-bit, hence the segfault. PR 27140 * powerpc.cc (Target_powerpc::Branch_info::make_stub): Only access object->st_other() when 64-bit. (Stub_table::add_long_branch_entry): Ignore "other" when 32-bit.
2021-01-01PR27116, Spelling errors found by Debian style checkerAlan Modra2-1/+5
PR 27116 bfd/ * xcofflink.c: Correct spelling in comments. binutils/ * coffgrok.c (do_type): Correct spelling of auxiliary in errors. * doc/binutils.texi: Correct grammar. * readelf.c (process_version_sections): Correct spelling of auxiliary in warning. * testsuite/binutils-all/vax/objdump.exp: Comment grammar fix. config/ * override.m4: Correct comment grammar. gas/ * config/tc-i386.c: Correct comment spelling. * config/tc-riscv.c: Likewise. * config/tc-s390.c: Correct comment grammar. * doc/c-i386.texi: Correct spelling. * doc/c-s390.texi: Correct grammar. gold/ * tilegx.cc: Correct comment spelling. gprof/ * README: Correct grammar. * gprof.texi: Likewise. include/ * coff/internal.h: Correct comment spelling. * coff/sym.h: Likewise. * opcode/aarch64.h: Likewise. ld/ * configure.tgt: Correct comment grammar. * emultempl/m68hc1xelf.em: Likewise. * ld.texi: Correct grammar.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra484-485/+489
2021-01-01ChangeLog rotationAlan Modra2-568/+582
2020-12-19gold: Move sym declaration just before useH.J. Lu3-3/+11
Move sym declaration just before use to avoid -Wmaybe-uninitialized warning from GCC 11. PR gold/27097 * incremental.cc (Sized_relobj_incr::do_add_symbols): Move sym declaration just before use. (Sized_incr_dynobj::do_add_symbols): Likewise. * plugin.cc (Sized_pluginobj::do_add_symbols): Likewise.
2020-12-15Cosmetic improvements for OSABI access.Cary Coutant5-14/+21
Add accessor methods to elfcpp::Ehdr class for EI_OSABI and EI_ABIVERSION; use those to simplify initialization of Osabi class and eliminate the need to template the class. elfcpp/ * elfcpp.h (class Ehdr): Add get_ei_osabi and get_ei_abiversion methods. gold/ * dwp.cc (class Dwo_file): Use new Ehdr::get_ei_osabi and get_ei_abiversion methods. * incremental.cc (make_sized_incremental_binary): Likewise. * object.cc (Sized_relobj_file::Sized_relobj_file): Likewise. (make_elf_sized_object): Likewise. * object.h (class Osabi): Make the class untemplated.
2020-12-15gold: Add missing ChangeLog entries for commit ff4bc37d7H.J. Lu1-0/+24
2020-12-15Implement and document -z unique / -z nounique handling in goldVivek Das Mohapatra3-0/+15
* layout.cc (Layout::finish_dynamic_section): Set DF_GNU_1_UNIQUE. * options.h (class General_options): Handle -z unique, -z nounique.
2020-12-14Keep input SHF_GNU_RETAIN sections and strip output SHF_GNU_RETAIN for ↵Cary Coutant8-20/+293
GNU/FreBSD ELFOSABIs. 2020-12-14 H.J. Lu <hjl.tools@gmail.com> Cary Coutant <ccoutant@gmail.com> elfcpp/ PR gold/27039 * elfcpp.h (SHF): Add SHF_GNU_RETAIN. gold/ PR gold/27039 * layout.cc (Layout::layout): Strip SHF_GNU_RETAIN. * object.cc (Sized_relobj_file::Sized_relobj_file): Initialize osabi_. (Sized_relobj_file::do_layout): Keep SHF_GNU_RETAIN sections for GNU/FreBSD ELFOSABIs. * object.h (Osabi) New class. (Sized_relobj_file): Add osabi() and osabi_. * testsuite/Makefile.am (check_SCRIPTS): Add retain.sh. (check_DATA): Add retain_1.out retain_2.out. (MOSTLYCLEANFILES): Add retain_1 retain_2. (retain_1.out): New target. (retain_1): Likewise. (retain_1.o): Likewise. (retain_2.out): Likewise. (retain_2): Likewise. (retain_2.o): Likewise. * testsuite/Makefile.in: Regenerate. * testsuite/retain.sh: New file. * testsuite/retain_1.s: Likewise. * testsuite/retain_2.s: Likewise.
2020-12-13Re-enable incremental tests that were failing with GCC 9+.Cary Coutant3-55/+58
gold/ PR gold/23539 PR gold/24123 * testsuite/Makefile.am (incremental_copy_test): Re-enable for GCC 9+. (incremental_comdat_test_1): Likewise. * testsuite/Makefile.in: Regenerate.
2020-12-13Fix incremental tests using gcc 9, which adds Gnu properties sections.Cary Coutant2-0/+10
During an incremental link, we should simply ignore the Gnu properties sections. We were not handling them properly -- failing to process the properties from the base file. While that could be fixed, the property sections are meant for deployed binaries, and incremental linking is for development, so keeping the properties sections just adds to the likelihood of forcing a full link sooner. gold/ PR gold/23539 * object.cc (Sized_relobj_file::layout_gnu_property_section): Ignore Gnu properties during incremental links.
2020-12-13Fix incremental linking with rodata merge sections.Cary Coutant2-1/+8
When processing the incremental update, incoming .rodata merge sections do not match the corresponding section in the base file, because the SHF_MERGE flag had not been masked out of the latter. gold/ PR gold/24123 * layout.cc (Layout::init_fixed_output_section): Mask out flags that should be ignored when matching sections.
2020-12-07[GOLD] gcc-11 stringop-overflow warningAlan Modra2-1/+5
I'm unsure why this is deserving of a warning. Not writing the most efficient code surely can't be a real problem, but that is what https://gcc.gnu.org/bugzilla//show_bug.cgi?id=88059#c1 seems to say. plugin.cc:528:10: error: 'char* strncpy(char*, const char*, size_t)' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 528 | strncpy(tempdir, dir_template, len); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ plugin.cc:526:22: note: length computed here 526 | size_t len = strlen(dir_template) + 1; | ~~~~~~^~~~~~~~~~~~~~ * plugin.cc (Plugin_recorder::init): Replace strncpy with memcpy.
2020-12-03[GOLD] PR26936 testAlan Modra3-8/+14
Fails if you configure with --disable-x86-used-note. Fix that. * testsuite/Makefile.am (pr26936a.o): Pass -mx86-used-note=yes. (pr26936b.o, pr26936c.o, pr26936d.o): Likewise. * testsuite/Makefile.in: Regenerate.
2020-11-29gold: Add endbr64 to IBT TLSDESC PLT entryH.J. Lu2-6/+13
Gold generates: c10: ff 35 da 23 00 00 push 0x23da(%rip) # 2ff0 <_GLOBAL_OFFSET_TABLE_+0x8> c16: f2 ff 25 c3 23 00 00 bnd jmp *0x23c3(%rip) # 2fe0 <_DYNAMIC+0x260> c1d: 0f 1f 00 nopl (%rax) for IBT TLSDESC PLT entry which misses endbr64. Add endbr64 to generate: c10: f3 0f 1e fa endbr64 c14: ff 35 d6 23 00 00 push 0x23d6(%rip) # 2ff0 <_GLOBAL_OFFSET_TABLE_+0x8> c1a: ff 25 c0 23 00 00 jmp *0x23c0(%rip) # 2fe0 <_DYNAMIC+0x260> PR ld/26972 * x86_64.cc (Output_data_plt_x86_64_ibt::tlsdesc_plt_entry): Add endbr64. (Output_data_plt_x86_64_ibt::do_fill_tlsdesc_entry): Adjusted.
2020-11-29gold: Convert x86-64 GOTPCRELX only if addend == -4H.J. Lu6-52/+135
Convert x86-64 GOTPCRELX relocations only if addend == -4. PR gold/26939 * x86_64.cc (Target_x86_64<size>::Scan::local): Check get_r_addend() == -4 for GOTPCRELX conversion. (Target_x86_64<size>::Scan::global): Likewise. (Target_x86_64<size>::Relocate::relocate): Likewise. * testsuite/Makefile.am (check_DATA): Add x86_64_mov_to_lea15.stdout and x86_64_mov_to_lea16.stdout. (MOSTLYCLEANFILES): Add x86_64_mov_to_lea15 and x86_64_mov_to_lea16. (x86_64_mov_to_lea9.o): New target. (x86_64_mov_to_lea10.o): Likewise. (x86_64_mov_to_lea15): Likewise. (x86_64_mov_to_lea16): Likewise. (x86_64_mov_to_lea15.stdout): Likewise. (x86_64_mov_to_lea16.stdout): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/x86_64_mov_to_lea.sh: Updated. * testsuite/x86_64_mov_to_lea5.s: New file.
2020-11-29gold: Get linkonce/comdate sections for debugging sectionsH.J. Lu9-7/+166
When relocating debug sections, get the section index for the linkonce section. Since symbols referenced in debugging sections can be defined a single comdat section with a different section name, also check the single comdat section. PR gold/26937 * object.cc (Sized_relobj_file::map_to_kept_section): Get the section index for linkonce section. Also check the single comdat section. * testsuite/Makefile.am (check_SCRIPTS): Add pr26936.sh. (check_DATA): Add pr26936a.stdout and pr26936b.stdout. (MOSTLYCLEANFILES): Add pr26936a and pr26936b. (pr26936a.stdout): New target. (pr26936a): Likewise. (pr26936b.stdout): Likewise. (pr26936b): Likewise. (pr26936a.o): Likewise. (pr26936b.o): Likewise. (pr26936c.o): Likewise. (pr26936d.o): Likewise. * testsuite/Makefile.in: Regenerated. * testsuite/pr26936.sh: New file. * testsuite/pr26936a.s: Likewise. * testsuite/pr26936b.s: Likewise. * testsuite/pr26936c.s: Likewise. * testsuite/pr26936d.s: Likewise.
2020-11-17[GOLD] powerpc incremental-dump assertion failureAlan Modra2-10/+18
incremental-dump wants to instantiate Target_powerpc without options being set up. This patch fixes internal error in options, at gold/parameters.h:92 * powerpc.cc (Target_powerpc::no_tprel_opt_): Rename from tprel_opt_. Init to false. (Target_powerpc::tprel_opt): Test parameters->options().tls_optimize(). (Target_powerpc::set_tprel_opt): Delete. (Target_powerpc::set_no_tprel_opt): New function. Update all uses of set_tprel_opt.
2020-11-17[GOLD] fix jump to long branch on powerpcMichael Hudson-Doyle2-2/+7
PR 26902 * powerpc.cc (Relocate::relocate): Do not include local entry offset of target function when computing the address of a stub.
2020-11-08gold: Avoid sharing Plugin_list::iteratorH.J. Lu2-17/+25
class Plugin_manager has // A pointer to the current plugin. Used while loading plugins. Plugin_list::iterator current_; The same iterator is shared by all threads. It is OK to use it to load plugins since only one thread loads plugins. Avoid sharing Plugin_list iterator in all other cases. PR gold/26200 * plugin.cc (Plugin_manager::claim_file): Don't share Plugin_list iterator. (Plugin_manager::all_symbols_read): Likewise. (Plugin_manager::cleanup): Likewise.