Nick Clifton [Mon, 30 Jan 2012 11:35:38 +0000 (11:35 +0000)]
PR binutils/13622
* readelf.c (process_section_groups): If there are no section
headers do not scan for section groups.
(process_note_sections): Likewise for note sections.
Dave Anglin [Sat, 28 Jan 2012 02:25:35 +0000 (02:25 +0000)]
Backport from mainline:
2011-12-11 John Davis Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR binutils/13476
* elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
R_PARISC_DPREL21L when not doing a shared link. Likewise convert
R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
Dave Anglin [Sat, 28 Jan 2012 02:22:00 +0000 (02:22 +0000)]
Backport from mainline:
2011-11-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR ld/13387
* elf32-hppa.c (elf32_hppa_hide_symbol): Make STT_GNU_IFUNC symbol
go through PLT. Reset plt field with init_plt_offset.
(elf32_hppa_adjust_dynamic_symbol): Ensure that a PLT slot is
allocated for symbols referenced by a plabel.
nobody [Tue, 10 Jan 2012 20:18:19 +0000 (20:18 +0000)]
This commit was manufactured by cvs2svn to create branch 'binutils-
2_22-branch'.
Cherrypick from master 2012-01-10 20:18:18 UTC H.J. Lu <hjl.tools@gmail.com> 'Remove ABI_64_P check on R_X86_64_PCXX':
ld/testsuite/ld-x86-64/ilp32-10.d
ld/testsuite/ld-x86-64/ilp32-10.s
ld/testsuite/ld-x86-64/ilp32-4.s
nobody [Sun, 8 Jan 2012 12:33:55 +0000 (12:33 +0000)]
This commit was manufactured by cvs2svn to create branch 'binutils-
2_22-branch'.
Cherrypick from master 2012-01-08 12:33:54 UTC Richard Sandiford <rdsandiford@googlemail.com> 'gas/':
gas/testsuite/gas/mips/tls-relw.d
gas/testsuite/gas/mips/tls-relw.s
PR gold/13023
* expression.cc (Expression::eval_with_dot): Add
is_section_dot_assignment parameter.
(Expression::eval_maybe_dot): Likewise. Adjust value when rhs is
absolute and assigning to dot within a section.
* script-sections.cc
(Output_section_element_assignment::set_section_addresses): Pass
dot_section to set_if_absolute.
(Output_section_element_dot_assignment::finalize_symbols): Pass TRUE
as is_section_dot_assignment flag to eval_with_dot.
(Output_section_element_dot_assignment::set_section_addresses):
Likewise.
* script.cc (Symbol_assignment::set_if_absolute): Add dot_section
parameter. Also set value if relative to dot_section; set the
symbol's output_section.
* script.h (Expression::eval_with_dot): Add is_section_dot_assignment
parameter. Adjust all callers.
(Expression::eval_maybe_dot): Likewise.
(Symbol_assignment::set_if_absolute): Add dot_section parameter.
Adjust all callers.
* testsuite/script_test_2.t: Test assignment of an absolute value
to dot within an output section element.
2011-10-31 Cary Coutant <ccoutant@google.com>
* options.h (class General_options): Add --[no-]gnu-unique options.
* symtab.cc (Symbol_table::sized_write_globals): Convert
STB_GNU_UNIQUE to STB_GLOBAL if --no-gnu-unique.
* symtab.h (Symbol_table::gc_mark_symbol_for_shlib): Rename to
gc_mark_symbol.
* symtab.cc (Symbol_table::gc_mark_symbol_for_shlib): Rename to
gc_mark_symbol.
Change to just keep the section associated with symbol.
(Symbol_table::add_from_relobj): Mark symbols as not garbage when
they are externally visible and --export-dynamic is turned on.
(Symbol_table::gc_mark_dyn_syms): Call gc_mark_symbol.
2011-10-19 Ian Lance Taylor <iant@google.com>
PR gold/13163
* script-sections.cc
(Output_section_element_dot_assignment::needs_output_section): New
function.
2011-10-19 Ian Lance Taylor <iant@google.com>
PR gold/13204
* layout.cc (Layout::segment_precedes): Don't assert failure if a
--section-start option was seen.
* options.h (General_options::any_section_start): New function.
2011-10-18 Cary Coutant <ccoutant@google.com>
* output.cc (posix_fallocate): Return 0 on success, errno on failure.
(Output_file::map_no_anonymous): Check for non-zero
return code from posix_fallocate.
2011-10-17 Cary Coutant <ccoutant@google.com>
PR gold/13245
* plugin.cc (is_visible_from_outside): Check for symbols
referenced from dynamic objects.
* resolve.cc (Symbol_table::resolve): Don't count references
from dynamic objects as references from real ELF files.
* testsuite/plugin_test_2.sh: Adjust expected result.
2011-10-17 Cary Coutant <ccoutant@google.com>
* readsyms.cc (Read_symbols::run): Don't queue an unblocker
task for members of lib groups.
2011-10-17 Cary Coutant <ccoutant@google.com>
PR gold/13288
* fileread.cc (File_read::find_view): Add assert.
(File_read::make_view): Move bounds check (replace with assert)...
(File_read::find_or_make_view): ... to here.
2011-10-12 Cary Coutant <ccoutant@google.com>
* output.cc (Output_file::open_base_file): Handle case where
::read returns less than requested size.
2011-10-10 Cary Coutant <ccoutant@google.com>
* incremental.cc (Sized_relobj_incr::Sized_relobj_incr):
Initialize defined_count_.
(Sized_relobj_incr::do_add_symbols): Count defined symbols.
(Sized_relobj_incr::do_get_global_symbol_counts): Rewrite.
(Sized_incr_dynobj::Sized_incr_dynobj): Initialize defined_count_.
(Sized_incr_dynobj::do_add_symbols): Count defined symbols.
(Sized_incr_dynobj::do_get_global_symbol_counts): Rewrite.
* incremental.h (Sized_relobj_incr::defined_count_): New data
member.
(Sized_incr_dynobj::defined_count_): New data member.
* plugin.cc (Sized_pluginobj::do_get_global_symbol_counts):
Return zeroes instead of internal error.
2011-10-10 Cary Coutant <ccoutant@google.com>
PR gold/13249
* output.cc (Output_reloc::Output_reloc): Add use_plt_offset flag.
(Output_reloc::symbol_value): Return PLT offset if flag is set.
* output.h (class Output_reloc): Add use_plt_offset flag.
(Output_reloc::type_): Adjust size of bit field.
(Output_reloc::use_plt_offset_): New bit field.
(class Output_data_reloc): Adjust all calls to Output_reloc_type.
(Output_data_reloc::add_local_relative): (RELA only) Add use_plt_offset
flag. Adjust all callers.
* x86_64.cc (Target_x86_64::Scan::local): Check for IFUNC when
creating RELATIVE relocations.
2011-10-03 Diego Novillo <dnovillo@google.com>
* options.cc (parse_uint): Fix dereference of RETVAL.
2011-09-29 Cary Coutant <ccoutant@google.com>
* incremental.cc (Sized_incremental_binary::do_process_got_plt):
Check for NULL.
* symtab.cc (Symbol_table::add_from_relobj): Ignore version
symbols during incremental update.
(Symbol_table::add_from_dynobj): Likewise.
2011-09-26 Cary Coutant <ccoutant@google.com>
* gold.cc (queue_initial_tasks): Move option checks ...
* options.cc (General_options::finalize): ... to here. Disable
some options; make others fatal.
2011-09-23 Simon Baldwin <simonb@google.com>
* configure.ac: Add new --with-gold-ldadd and --with-gold-ldflags
configuration options.
* configure: Regenerate.
* Makefile.am: Handle GOLD_LDADD and GOLD_LDFLAGS.
* Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
gas/
* config/tc-mips.c (mips_pseudo_table): Add tprelword/tpreldword
entries.
(mips16_percent_op): Add MIPS16 TLS relocation ops.
(md_apply_fix): Add BFD_RELOC_MIPS16_TLS_* switch cases.
(s_tls_rel_directive): Rename from s_dtprel_internal(). Abstract out
directive string and reloc type as function parameters. Update
comments.
(s_dtprelword,s_dtpreldword): Change to use s_tls_rel_directive().
(s_tprelword,s_tpreldword): New functions.
2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
Catherine Moore <clm@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
Richard Sandiford <rdsandiford@googlemail.com>
* elfxx-mips.c (mips_elf_local_pic_function_p): Return true when
H is a MIPS16 function with a kept 32-bit stub. Update comments.
(mips_elf_get_la25_target): New function.
(mips_elf_add_la25_intro): Change to use mips_elf_get_la25_target().
(mips_elf_add_la25_stub): Move compute of use_trampoline_p down,
change to use mips_elf_get_la25_target().
(mips_elf_relocation_needs_la25_stub): Add target_is_16_bit_code_p
parameter, add switch case for R_MIPS16_26.
(mips_elf_calculate_relocation): Redirect relocation to point to the
LA25 stub if it exists, instead of the MIPS16 stub. Update arguments
of call to mips_elf_relocation_needs_la25_stub(), don't use la25 stub
for mips16->mips16 calls.
(_bfd_mips_elf_check_relocs): Update arguments of call to
mips_elf_relocation_needs_la25_stub().
(mips_elf_create_la25_stub): Change to use mips_elf_get_la25_target().
David Daney [Sun, 11 Dec 2011 02:28:11 +0000 (02:28 +0000)]
Backport from mainline:
2011-12-10 David Daney <david.daney@cavium.com>
* elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove.
(mips_elf_link_hash_table.rld_symbol): New field;
(MIPS_ELF_RLD_MAP_SIZE): New macro.
(_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol
in rld_symbol.
(_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol
in rld_symbol.
(_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map.
(_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling.
(_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to
calculate DT_MIPS_RLD_MAP value.
(_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol,
quit initializing rld_value.
Apply mainline patches
* elf32-cris.c (cris_elf_check_relocs) <plt accounting for
R_CRIS_8, R_CRIS_16, and R_CRIS_32>: Move early break for
non-SEC_ALLOC sections before GOT and PLT accounting.