Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch extends --compress-debug-sections= with [zlib-gnu|zlib-gabi]
in gold.
PR gold/18322
* compressed_output.cc (zlib_compress): Add argument for
compression header size. Set header size to compression header
size if it isn't 0. Don't write out the zlib header here.
(Output_compressed_section::set_final_data_size): Support
zlib-gnu and zlib-gabi compressions. Pass compression header
size to zlib_compress and write out compression header. Set
the SHF_COMPRESSED bit for zlib-gabi compression. Otherwise
clear the SHF_COMPRESSED bit
* options.h (compress_debug_sections): Add zlib-gnu and
zlib-gabi.
* output.h (Output_section::set_flags): New.
* testsuite/Makefile.am (check_PROGRAMS): Add
flagstest_compress_debug_sections_none,
flagstest_compress_debug_sections_gnu and
flagstest_compress_debug_sections_gabi.
(check_DATA): Add flagstest_compress_debug_sections_none.stdout.
flagstest_compress_debug_sections.stdout,
flagstest_compress_debug_sections.cmp,
flagstest_compress_debug_sections.check,
flagstest_compress_debug_sections_gnu.stdout,
flagstest_compress_debug_sections_gnu.cmp,
flagstest_compress_debug_sections_gnu.check,
flagstest_compress_debug_sections_gabi.stdout,
flagstest_compress_debug_sections_gabi.cmp and
flagstest_compress_debug_sections_gabi.check.
(flagstest_compress_debug_sections_none): New.
(flagstest_compress_debug_sections_none.stdout): Likewise.
(flagstest_compress_debug_sections.stdout): Likewise.
(flagstest_compress_debug_sections.check): Likewise.
(flagstest_compress_debug_sections.cmp): Likewise.
(flagstest_compress_debug_sections_gnu): Likewise.
(flagstest_compress_debug_sections_gnu.stdout): Likewise.
(flagstest_compress_debug_sections_gnu.check): Likewise.
(flagstest_compress_debug_sections_gnu.cmp): Likewise.
(flagstest_compress_debug_sections_gabi): Likewise.
(flagstest_compress_debug_sections_gabi.stdout): Likewise.
(flagstest_compress_debug_sections_gnu.check): Likewise.
(flagstest_compress_debug_sections_gnu.cmp): Likewise.
* testsuite/Makefile.in: Regenerated.
|
|
This patch adds SHF_COMPRESSED section decompression to gold.
PR gold/18321
* compressed_output.h (decompress_input_section): Add arguments
for ELF class, big endian and sh_flags.
* compressed_output.cc (decompress_input_section): Likewise.
Support the SHF_COMPRESSED section.
* dynobj.h (Dynobj): Add elfsize and is_big_endian member
functions.
* plugin.h (Pluginobj): Likewise.
* layout.cc (Layout::get_output_section_flags): Also clear the
SHF_COMPRESSED bit.
* object.h (Compressed_section_info): Add flag to store sh_flags.
(Object): Add pure virtual elfsize and is_big_endian member
functions.
* object.cc (need_decompressed_section): Don't skip the ".zdebug"
prefix here.
(build_compressed_section_map): Check SHF_COMPRESSED for
uncompressed size. Store sh_flags in Compressed_section_info.
Pass size, big_endian and sh_flags to decompress_input_section.
Skip the ".debug"/".zdebug" prefix when passing section name to
need_decompressed_section.
(Sized_relobj_file<size, big_endian>::do_find_special_section):
Don't check ".zdebug_*" sections.
(Object::decompressed_section_contents): Pass ELF class, big
endian and sh_flags to decompress_input_section.
* reloc.cc (Sized_relobj_file<size, big_endian>::write_sections):
Likewise.
* testsuite/Makefile.am (check_DATA): Add
debug_msg_cdebug_gabi.err and gdb_index_test_2_gabi.stdout.
(MOSTLYCLEANFILES): Add debug_msg_cdebug_gabi.err and
gdb_index_test_2_gabi.stdout.
(debug_msg_cdebug_gabi.o): New.
(odr_violation1_cdebug_gabi.o): Likewise.
(odr_violation2_cdebug_gabi.o): Likewise.
(debug_msg_cdebug_gabi.err): Likewise.
(check_SCRIPTS): Add gdb_index_test_2_gabi.sh.
(gdb_index_test_cdebug_gabi.o): Likewise.
(gdb_index_test_2_gabi): Likewise.
(gdb_index_test_2_gabi.stdout): Likewise.
* testsuite/gdb_index_test_2_gabi.sh: New file.
* testsuite/Makefile.in: Regenerated.
|
|
gold/ChangeLog:
* aarch64.cc (Target_aarch64::scan_erratum_843419_span): Use 'gold_info'.
(Target_aarch64::scan_erratum_835769_span): USe 'gold_info'.
|
|
The psABI (AAELF) says this about mapping symbols:
4.6.5.1 Section-relative mapping symbols
Mapping symbols defined in a section define a sequence of
half-open address intervals that cover the address range of the
section. Each interval starts at the address defined by the
mapping symbol, and continues up to, but not including, the
address defined by the next (in address order) mapping symbol or
the end of the section. A section must have a mapping symbol
defined at the beginning of the section; however, if the section
contains only data then the mapping symbol may be omitted.
That makes it pretty clear that, in the absence of a mapping symbol,
the entire section can be treated as data.
gold/ChangeLog:
* aarch64.cc (AArch64_relobj::scan_errata): Drop missing symbol warning.
* arm.cc (Arm_relobj::scan_section_for_cortex_a8_erratum): Drop missing
symbol warning.
|
|
2015-07-07 Han Shen <shenhan@google.com>
gold/ChangeLog:
2015-07-06 Han Shen <shenhan@google.com>
* aarch64.cc (AArch64_relobj::do_count_local_symbols): Make legal
of mapping symbols.
|
|
|
|
The crash reason is that the insn to be moved to stub may be a
relocation spot, so instead of placing the origin insn (that is insn
before-relocation) to the stub, I have to place the relocated one.
Note the relocation involved is non-pc-relative, so it is safe to move
the relocated insn.
gold/ChangeLog:
2015-06-29 Han Shen <shenhan@google.com>
* AArch64.cc (Erratum_stub::Insn_utilities): New typedef.
(Erratum_stub::update_erratum_insn): New method.
(Stub_table::relocate_stubs): Modified to place relocated insn.
(AArch64_relobj::fix_errata): Modified gold_assert.
|
|
gold/ChangeLog:
* aarch64.cc (AArch64_insn_utilities::BYTES_PER_INSN): Move
defintion outside class definition.
(AArch64_insn_utilities::AARCH64_ZR): New static constant.
(AArch64_insn_utilities::aarch64_op31): New member.
(AArch64_insn_utilities::aarch64_ra): New member.
(AArch64_insn_utilities::aarch64_mac): New member.
(AArch64_insn_utilities::aarch64_mlxl): New member.
(ST_E_835769): New global enum member.
(Stub_table::relocate_stubs): Add 835769 handler.
(Stub_template_repertoire::Stub_template_repertoire): Install new
stub type.
(AArch64_relobj::scan_errata): This func is renamed from
scan_erratum_843419.
(AArch64_relobj::do_count_local_symbols): Add 835769 handler.
(AArch64_relobj::do_relocate_sections): Add 835769 handler.
(AArch64_relobj::scan_sections_for_stubs): Add 835769 handler.
(Target_aarch64::scan_erratum_835769_span): New method.
(Target_aarch64::create_erratum_stub): New method.
(Target_aarch64::is_erratum_835769_sequence): New method.
(Target_aarch64::scan_erratum_843419_sequence): Move part of the
code into create_erratum_stub.
* options.h (fix_cortex_a53_835769): New option.
|
|
In aarch64.cc, Erratum_stub::STUB_ADDR_ALIGN and Reloc_stub::STUB_ADDR_ALIGN
are declared as static const int, and initialized in the class body. These
values are referenced from outside the class body, and with no optimization,
the references go unresolved.
gold/
* aarch64.cc (Erratum_stub::STUB_ADDR_ALIGN): Move initialization
outside class body.
(Reloc_stub::STUB_ADDR_ALIGN): Likewise.
|
|
When laying out .debug_* sections, we translate the names of compressed
debug sections that start with ".zdebug", but when processing input
section specs in a linker script, we do not handle the translation there.
This results in an internal error as reported in PR 17731.
gold/
PR gold/17731
* layout.cc (corresponding_uncompressed_section_name): New function.
(Layout::choose_output_section): Call it.
* layout.h (corresponding_uncompressed_section_name): New function.
* script-sections.cc (Input_section_info::set_section_name): Check
for compressed debug section (.zdebug style).
|
|
This patch adds -O0 to gold script_test_12 test, hoping that compiler
won't change the order of globel variables that the test assumes.
Changelog:
testsuite/Makefile.am: Add -O0 to compile script_test_12 test.
testsuite/Makefile.in: Regenerate.
|
|
If the section contains 'Q' in the name, is_cident() returns false,
__start and __stop symbols for the section are not generated..
* gold.h (is_cident): Correct typo.
|
|
Now fixing for 843419 is fully functional.
The first part of the erratum fix CL is here -
https://sourceware.org/ml/binutils/2015-04/msg00229.html
gold/ChangeLog
2015-06-10 Han Shen <shenhan@google.com>
* aarch64.cc(global enum): New constants representing stub types.
(Stub_template): New POD struct.
(Stub_template_repertoire): New class.
(Stub_base): New class.
(Erratum_stub): New class.
(Reloc_stub): Refactored to be a subclass of Stub_base.
(Reloc_stub::Stub_type): Removed.
(Reloc_stub::offset): Moved to Stub_base.
(Reloc_stub::set_offset): Moved to Stub_base.
(Reloc_stub::destination_address): Moved to Stub_base.
(Reloc_stub::set_destination_address): Moved to Stub_base.
(Reloc_stub::reset_destination_address): Moved to Stub_base.
(Reloc_stub::stub_type): Renamed and moved to Stub_base.
(Reloc_stub::stub_size): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns): Renamed and moved to Stub_base.
(Reloc_stub::write): Moved to Stub_base.
(Reloc_stub::invalid_offset): Moved to Stub_base.
(Reloc_stub::invalid_address): Moved to Stub_base.
(Reloc_stub::stub_type_): Renamed and moved to Stub_base.
(Reloc_stub::stub_insns_): Moved to Stub_base.
(Reloc_stub::offset_): Moved to Stub_base.
(Reloc_stub::destination_address_): Moved to Stub_base.
(Stub_table::The_aarch64_relobj): New typedef.
(Stub_table::The_erratum_stub): New typedef.
(Stub_table::The_erratum_stub_less): New typedef.
(Stub_table::The_erratum_stub_set): New typedef.
(Stub_table::The_erratum_stub_set_iter): New typedef.
(Stub_table::empty): Added emptiness testing for erratum stubs.
(Stub_table::add_erratum_stub): New method to add an erratum stub.
(Stub_table::find_erratum_stub): New method.
(Stub_table::find_erratum_stubs_for_input_section): New method.
(Stub_table::erratum_stub_address): New method.
(Stub_table::update_date_size_changed_p): Modified to handle erratum stubs.
(Stub_table::do_addralign): Modified to handle erratum stubs.
(Stub_table::erratum_stubs_): New member.
(Stub_table::erratum_stub_size_): New member.
(Stub_table::relocate_stubs): Modified to handle erratum stubs.
(Stub_table::do_write): Modified to handle erratum stubs.
(AArch64_relobj::The_erratum_stub): New typedef.
(AArch64_relobj::Erratum_stub_set_iter): New typedef.
(AArch64_relobj::fix_errata): New method.
(Target_aarch64::The_reloc_stub_type): Removed.
(Target_aarch64::The_erratum_stub): New typede.
(AArch64_relocate_functions::construct_b): New method.
|
|
ld * po/fr.po: Updated French Translation.
gold * po/fr.po: New French Translation.
|
|
The gABI allows STT_COMMON symbols to appear in executables and shared
objects, so that the dynamic loader can resolve commons across modules.
When reading a shared object, however, an STT_COMMON symbol should be
treated as a regular definition at link time.
In a relocatable object, the gABI requires that any STT_COMMON symbols
must also be defined in the special SHN_COMMON section (which we extend
to include target-specific small and large common sections). Thus,
there is no need for gold to treat STT_COMMON symbols as common unless
the st_shndx field is also set to a common section.
gold/
PR gold/18288
* resolve.cc (symbol_to_bits): Remove type parameter; adjust all
callers. Don't use STT_COMMON to check for common symbols.
(Symbol_table::resolve): Warn if relocatable object has STT_COMMON
symbol that's not in a common section.
* symtab.h (Symbol::is_common): Don't use STT_COMMON to check for
common symbols.
|
|
gold/
PR gold/18200
* Makefile.am (diststuff): Add target.
* Makefile.in: Regenerate.
|
|
Add --discard-none to keep all local symbols.
gold/
PR gold/17498
* object.cc (Sized_relobj_file::do_count_local_symbols): Discard
temporary locals in merge sections.
* options.cc (General_options::parse_discard_all): New method.
(General_options::parse_discard_locals): New method.
(General_options::parse_discard_none): New method.
(General_options::General_options): Initialize discard_locals_.
* options.h (--discard-all): Convert to special option.
(--discard-locals): Likewise.
(--discard-none): New option.
(General_options::discard_all): New method.
(General_options::discard_locals): New method.
(General_options::discard_sec_merge): New method.
(General_options::Discard_locals): New enum.
(General_options::discard_locals_): New data member.
|
|
Gold undercounts the number of program headers it's going to add when
initially evaluating the SIZEOF_HEADERS expression. As a result, scripts
that use it end up skipping a page unnecessarily when the starting address
is too low. The undercounting is because it doesn't count the PT_INTERP
segment.
Then, when finalizing symbols, gold overcounts the program headers: all
segments have already been created, but we still count the headers we
expected to add from the script.
This patch fixes both problems.
gold/
* script-sections.cc (Script_sections::Script_sections): Initialize
segments_created_.
(Script_sections::create_note_and_tls_segments): Set flag when
segments are created.
(Script_sections::expected_segment_count): Count PT_INTERP.
(Script_sections::attach_sections_using_phdrs_clause): Set flag when
segments are created.
* script-sections.h (Script_sections::segments_created_): New data
member.
|
|
In PR 15370, it is noted that gold does not distinguish between
"*(.foo .bar)" and "*(.foo) *(.bar)" in linker scripts. In both
cases, gold groups all .foo sections together, followed by all
.bar sections, whereas in the first case, it should collect all
.foo and .bar sections in the order seen.
If you add sort specs, the Gnu linker has some bizarre corner
cases that I do not try to replicate. In particular,
"*(SORT_BY_NAME(.foo) SORT_BY_NAME(.bar))" does the same thing
as "*(.foo) *(.bar)". But if you apply a sort spec
to just one of several patterns, say, "*(SORT_BY_NAME(.foo) .bar)",
the Gnu linker will collect any .bar section it sees before the
first .foo, then all .foo sections, then all remaining .bar
sections. With this patch, if any of the input patterns have a
sort spec, gold will group them all as it did before; e.g.,
all .foo sections followed by all .bar sections.
2015-06-03 Cary Coutant <ccoutant@gmail.com>
gold/
PR gold/15370
* script-sections.cc
(Output_section_element_input::set_section_addresses): When there
are several patterns with no sort spec, put all sections in the same
bin.
* testsuite/Makefile.am (script_test_12): New testcase.
(script_test_12i): New testcase.
* testsuite/Makefile.in: Regenerate.
* testsuite/script_test_12.t: New test linker script.
* testsuite/script_test_12i.t: New test linker script.
* testsuite/script_test_12a.c: New test source file.
* testsuite/script_test_12b.c: New test source file.
|
|
gold/
* nacl.h (Sniff_file): Switch parameters to get_view to get an
aligned view.
|
|
When --build-id=tree is selected, gold would schedule a set of
tasks to run to compute md5 hashes in parallel on chunks of the
file. The scheduling was done before the
Write_after_input_sections_task ran, so if we are compressing
debug sections, the output file will change size and be remapped
to a new address, sometimes causing the build id computation to
crash, but even when it doesn't crash, it wouldn't include the
debug information in the hash computation.
This patch delays the scheduling of the md5 tasks until after
Write_after_input_sections_task.
gold/
PR gold/17819
* gold.cc (queue_final_tasks): When --build-id=tree, queue a
separate task to schedule the build id computation.
* layout.cc (Hash_task::Hash_task): Remove build_id_blocker,
add Output_file and offset.
(Hash_task::run): Get and release the input views.
(Hash_task::is_runnable): Always return NULL (always runnable).
(Layout::queue_build_id_tasks): Remove.
(Layout::write_build_id): Add array_of_hashes and size_of_hashes
parameters; use them instead of class members.
(Build_id_task_runner::run): New function.
(Close_task_runner::run): Pass array_of_hashes and size_of_hashes
to write_build_id.
* layout.h (Layout::queue_build_id_tasks): Remove.
(Layout::write_build_id): Add array_of_hashes and size_of_hashes
parameters.
(Layout::array_of_hashes_): Remove.
(Layout::size_of_array_of_hashes_): Remove.
(Layout::input_view_): Remove.
(Build_id_task_runner): New class.
(Close_task_runner::Close_task_runner): Add array_of_hashes and
size_of_hashes parameters.
(Close_task_runner::array_of_hashes_): New data member.
(Close_task_runner::size_of_hashes_): New data member.
* testsuite/Makefile.am
(flagstest_compress_debug_sections_and_build_id_tree): New test.
* testsuite/Makefile.in: Regenerate.
|
|
A std::map is hardly the best data structure for a small map from small
integers.
|
|
PowerPC64 ELFv1 requires a tweak to find_functions in order to return
code addresses, rather than OPD entry addresses.
* reloc.cc (Sized_relobj_file::find_functions): Use function_location.
* powerpc.cc (Target_powerpc::do_calls_non_split): New function.
(addi_12_1, addis_2_12, addis_12_1, cmpld_7_12_0): New constants.
(lis_0): Rename from lis_0_0.
|
|
2015-04-29 Cary Coutant <cary@google.com>
Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
gold/
* gc.h (Garbage_collection::is_section_garbage): Change Object*
to Relobj*.
(Garbage_collection::add_reference): Likewise.
(Garbage_collection::gc_process_relocs): Likewise. Don't push
object/shndx pair onto *secvec for dynamic objects. Don't follow
relocations pointing to dynamic objects for GC.
* icf.cc (Icf::find_identical_sections): Change Object* to Relobj*.
(Icf::unfold_section): Likewise.
(Icf::is_section_folded): Likewise.
(Icf::get_folded_section): Likewise.
* icf.h: (Icf::get_folded_section): Likewise.
(Icf::unfold_section): Likewise.
(Icf::is_section_folded): Likewise.
(Icf::section_has_function_pointers): Likewise.
(Icf::set_section_has_function_pointers): Likewise.
* object.h (Section_id): Likewise.
(Const_section_id): Likewise.
* output.cc (Output_section::update_section_layout): Likewise.
* output.h: (Output_section_lookup_maps::find_relaxed_input_section):
Likewise.
* plugin.cc (update_section_order): Likewise.
(unique_segment_for_sections): Likewise.
* powerpc.cc (Powerpc_relobj::add_reference): Likewise.
(Target_powerpc::do_gc_add_reference): Likewise.
(Target_powerpc::gc_process_relocs): Likewise.
(Target_powerpc::do_gc_add_reference): Likewise.
* symtab.cc (Symbol_table::is_section_folded): Likewise.
(Symbol_table::gc_mark_symbol): Likewise.
* symtab.h: (Symbol_table::is_section_folded): Likewise.
* target.h: (Sized_target::gc_add_reference): Likewise.
(Sized_target::do_gc_add_reference): Likewise.
|
|
gold * po/fi.po: Updated Finnish translation.
opcodes * po/fr.po: Updated French translation.
gprof * po/da.po: Update Danish translation.
|
|
Completely removing the assert probably wasn't the best idea, so
reinstate it for allocated sections. Also cope with debug info
potentially referring to a missing plt call stub.
And a tidy. find_global_entry now returns an Address, so make temps
holding the return value of type Address, and compare against
invalid_address.
* powerpc.cc (Target_powerpc::do_dynsym_value): Use Address rather
than unsigned int for find_global_entry result temp. Compare
against invalid_address.
(Target_powerpc::do_plt_address_for_global): Likewise.
(Target_powerpc::Relocate::relocate): Likewise. Don't assert
on plt call stub existence for debug info. Do assert for plt
and global entry stub existence if an alloc section.
|
|
Global entry stubs are used on ELFv2 to provide addresses for
functions not defined in a non-PIC executable but whose address is
taken, in much the same way as PLT stub code is used on other
targets to provide function addresses. We don't want to insert a
global entry stub just because (bogus) debug info refers to the
address of a non-local function, but we also don't want gold to die.
* powerpc.cc (Target_powerpc::Relocate::relocate): Don't assert
on missing global entry stub due to bogus debug info.
|
|
Keep gold consistent with bfd erratum-fixing option names, so as to
ease life in Makefile/scripts.
gold/
* options.h (--fix-cortex-a53-843419): Rename option.
* aarch64.cc (AArch64_relobj::do_count_local_symbols): Use renamed
option.
(AArch64_relobj::scan_sections_for_stubs): Use renamed option.
|
|
When Output_section::is_input_address_mapped is called we have entries for
all dropped ranges, but not for all ranges.
|
|
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as
weak references. This is helpful when we want the link to succeed with unresolved
symbols and the dynamic loader to not complain at run-time. Option
--warn-unresolved-symbols lets the link succeed but could fail at run-time with
unresolved symbol warnings especially when the unresolved symbols have GOT entries
and dynamic relocations against them, like when -fPIE is used.
|
|
This patch adds option --weak-unresolved-symbols to treat unresolved symbols as
weak references. This is helpful when we want the link to succeed with unresolved
symbols and the dynamic loader to not complain at run-time. Option
--warn-unresolved-symbols lets the link succeed but could fail at run-time with
unresolved symbol warnings especially when the unresolved symbols have GOT entries
and dynamic relocations against them, like when -fPIE is used.
2015-04-23 Sriraman Tallam <tmsriram@google.com>
* options.h (--weak-unresolved-symbols): New option.
* symtab.cc (Symbol_table::sized_write_globals): Change symbol
binding to weak with new option.
* symtab.h (is_weak_undefined): Check for new option.
(is_strong_undefined): Check for new option.
* testsuite/Makefile.am (weak_unresolved_symbols_test): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/weak_unresolved_symbols_test.cc: New file.
|
|
GNU_UNIQUE symbols.
gold/
* symtab.cc (Symbol::should_add_dynsym_entry): Return true for
GNU_UNIQUE.
|
|
FIFO is harder to implement and has less locality than LIFO. It is
also not necessary to implement a transitive closure, a LIFO works
just as well.
|
|
It implemented scanning the binary and reporting occurrences to users
when '--fix-cortex-a53' is turned on. With this, gold users will be
able to see if or not there are such erratum occurrences in the output
binary. Also included in the CL is reading/recording mapping symbols,
which is needed during scan.
gold/ChangeLog:
* aarch64.cc (AArch64_insn_utilities): New utility class.
(AArch64_relobj::Mapping_symbol_position): New struct.
(AArch64_relobj::Mapping_symbol_info): New typedef.
(AArch64_relobj::do_count_local_symbols): New function overriding
parent's implementation.
(AArch64_relobj::mapping_symbol_info_): New member
(AArch64_relobj::scan_erratum_843419): New method.
(Target_aarch64::scan_erratum_843419_span): New method.
(Target_aarch64::is_erratum_843419_sequence): New method.
* options.h (fix_cortex_a53): New option.
|
|
This patch fixes Symbol::final_value_is_known so that a defined TLS symbol
in a PIE link is treated as having a known final value, thus allowing
GD->LE TLS optimization, eliminating an unnecessary GOT entry and dynamic
relocation.
gold/
* symtab.cc (Symbol::final_value_is_known): Check for TLS symbol
in a PIE link.
* testsuite/Makefile.am (tls_pie_test.sh): New test.
* testsuite/Makefile.in: Regenerate.
* testsuite/tls_pie_test.sh: New.
|
|
gold/
* debug.h (DEBUG_LOCATION): New.
(DEBUG_ALL): Include DEBUG_LOCATION.
(debug_string_to_enum): Add DEBUG_LOCATION.
* dwarf_reader.cc (Sized_dwarf_line_info::read_lines): Fix debug
output to print correct context.
(Sized_dwarf_line_info::do_addr2line): Add debug output. Return
up to 4 more locations at the beginning of the function.
* symtab.cc (Symbol_table::detect_odr_violations): Get canonical
result before sorting list of line numbers.
* testsuite/debug_msg.sh: Allow range of line numbers for
canonical results on optimized code.
|
|
|
|
|
|
|
|
|
|
2015-04-06 Ilya Tocar <ilya.tocar@intel.com>
PR gold/17641
* x86_64.cc (Target_x86_64::can_convert_mov_to_lea): New.
(Target_x86_64::Scan::local): Don't create GOT entry, when we
can convert mov to lea.
(Target_x86_64::Scan::global): Ditto.
(Target_x86_64::Relocate::relocate): Convert mov foo@GOTPCREL(%rip),
%reg to lea foo(%rip), %reg if possible.
* testsuite/Makefile.am (x86_64_mov_to_lea): New test.
* testsuite/x86_64_mov_to_lea1.s: New.
* testsuite/x86_64_mov_to_lea2.s: Ditto.
* testsuite/x86_64_mov_to_lea3.s: Ditto.
* testsuite/x86_64_mov_to_lea4.s: Ditto.
* testsuite/x86_64_mov_to_lea.sh: Ditto.
---
|
|
bfd/
* configure: Regenerated.
binutils/
* configure: Regenerated.
gas/
* configure: Regenerated.
gdb/
* Makefile.in (top_srcdir): New.
* configure: Regenerated.
gold/
* configure: Regenerated.
|
|
2015-04-01 Ilya Tocar <ilya.tocar@intel.com>
PR gold/17640
* i386.cc (Target_i386::can_convert_mov_to_lea): New.
(Target_i386::Scan::local): Don't create GOT entry, when we
can convert GOT to GOTOFF.
(Target_i386::Scan::global): Ditto.
(Target_i386::Relocate::relocate): Convert mov foo@GOT(%reg), %reg to
lea foo@GOTOFF(%reg), %reg if possible.
* testsuite/Makefile.am (i386_mov_to_lea): New test.
* testsuite/i386_mov_to_lea1.s: New.
* testsuite/i386_mov_to_lea2.s: Ditto.
* testsuite/i386_mov_to_lea3.s: Ditto.
* testsuite/i386_mov_to_lea4.s: Ditto.
* testsuite/i386_mov_to_lea5.s: Ditto.
* testsuite/i386_mov_to_lea.sh: Ditto.
|
|
Regenerate configure for zlib.m4 change, which adds --with-system-zlib and
removes --with-zlib in gold. zlib is enabled unconditionally with builtin
zlib imported from GCC.
* Makefile.am (ZLIB): New.
(ZLIBINC): Likewise.
(AM_CFLAGS): Add $(ZLIBINC).
(AM_CXXFLAGS): Likewise.
(ldadd_varldadd_var): Add $(ZLIB).
(incremental_dump_LDADD): Likewise.
(dwp_LDADD): Likewise.
* compressed_output.cc: Don't check HAVE_ZLIB_H to include
<zlib.h>.
(zlib_compress): Don't check HAVE_ZLIB_H.
(zlib_decompress): Likewise.
* options.h (compress_debug_sections): Likewise.
* configure.ac (AM_CONDITIONAL): Removed.
* testsuite/Makefile.am (ZLIB): New.
(LDADD): Add $(ZLIB).
Don't check HAVE_ZLIB.
* Makefile.in: Regenerated.
* config.in: Likewise.
* configure: Likewise.
* testsuite/Makefile.in: Likewise.
|
|
Also Change _TLS_MODULE_BASE_. Always let it point to the start
of TLS segment.
2015-03-28 Jing Yu <jingyu@google.com>
* aarch64-reloc.def: New TLSLD_ADD_DTPREL_HI12,
TLSLD_ADD_DTPREL_LO12_NC.
* aarch64.cc (Target_aarch64::define_tls_base_symbol): Always
let _TLS_MODULE_BASE_ point to the start of tls segment.
(Target_aarch64::optimize_tls_reloc): Add cases for
R_AARCH64_TLSLD_ADD_DTPREL_HI12 and
R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
(Target_aarch64::Scan::local): Likewise.
(Target_aarch64::Scan::global): Likewise.
(Target_aarch64::Relocate::relocate): Likewise.
(Target_aarch64::Relocate::relocate_tls): Likewise. And remove
subtracting tls segment size from symbol value for
TLSLD_*_DTPREL relocations.
|
|
Avoid looking up Input_merge_map multiple times when we know were are
processing items from the same input section.
|
|
If ignoring unresolved symbols, ignore reloc overflows too. If not
ignoring unresolved symbols we will report an error about the symbol
being undefined, making any report about reloc overflow superfluous.
PR18147
* powerpc.cc (Target_powerpc::Relocate::relocate): Don't report
relocation errors for branches to strong undefined symbols.
|
|
Now that Input_merge_map has an Output_section_data, we can use it in
implementing find_merge_section and replace the only use of is_merge_section_for
with it.
|
|
There are two cases to support, one with an SIB-form (6-byte) LEA,
the other with a 5-byte LEA and a NOP after the call __tls_get_addr.
Gold did not yet support the second case. This patch adds that
support.
gold/
PR gold/18106
* i386.cc (Target_i386::Relocate::tls_gd_to_ie): Fix support for
non-SIB form of lea, with nop after the call.
|
|
When calculating the padding necessary to align the end of the relro
segment to a page boundary, gold erroneously ignores the .tdata section
when checking to see if there are any relro sections (so if .tdata
is the only relro section, we fail to align the segment properly),
and erroneously pads the cumulative size of the segment based on
the alignment of .tbss. If there are no relro sections following .tbss,
it then fails to note the padding needed at the end of .tdata.
This patch fixes both problems. is_first_section_relro() will return
true when it sees a .tdata section, and we do not align the cumulative
size until after checking for the .tbss section.
gold/
PR gold/14217
* output.cc (Output_segment::is_first_section_relro): Don't ignore
.tdata section.
(Output_segment::set_section_addresses): Don't align size of relro
segment for .tbss.
|