1 2018-06-19 Joshua Watt <jpewhacker@gmail.com>
2 Cary Coutant <ccoutant@gmail.com>
4 * configure.ac: Replace manual thread configuration with AX_PTHREAD.
5 Add --enable-threads=auto.
6 * Makefile.am (THREADFLAGS, THREADLIBS): New defines.
7 (AM_CFLAGS, AM_CXXFLAGS): Add $(THREADFLAGS.
8 (THREADSLIB): Remove; change all references to THREADLIBS.
9 * Makefile.in: Regenerate.
10 * aclocal.m4: Regenerate.
11 * config.in: Regenerate.
12 * configure: Regenerate.
13 * testsuite/Makefile.am (THREADSLIB): Replace with...
14 (THREADFLAGS, THREADLIBS): ... these.
15 (LDADD): Remove; add as individual defines for...
16 (object_unittest, binary_unittest, leb128_unittest)
17 (overflow_unittest): ... these tests.
18 (tls_test, tls_pic_test, tls_pie_test, tls_pie_pic_test)
19 (tls_shared_test, tls_shared_ie_test, tls_shared_gd_to_ie_test)
20 (tls_shared_gnu2_gd_to_ie_test, tls_shared_gnu2_test_LDFLAGS)
21 (tls_shared_nonpic_test_LDFLAGS): Add $(THREADFLAGS) and ($THREADLIBS).
22 * testsuite/Makefile.in: Regenerate.
24 2018-06-19 Cary Coutant <ccoutant@gmail.com>
26 * testsuite/Makefile.am (MOSTLYCLEANFILES): Add *.stderr.
27 * testsuite/Makefile.in: Regenerate.
29 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
31 * configure.ac: Remove AC_PREREQ, add missing quoting and usage
33 * Makefile.in: Re-generate.
34 * aclocal.m4: Re-generate.
35 * configure: Re-generate.
36 * testsuite/Makefile.in: Re-generate.
38 2018-05-10 Stephen Crane <sjc@immunant.com>
40 * aarch64.cc (Target_aarch64::do_finalize_sections): Use size of
41 .got section for the _GLOBAL_OFFSET_TABLE_ symbol computation.
43 2018-04-24 Cary Coutant <ccoutant@gmail.com>
47 * gc.h (gc_process_relocs): Flag STT_SECTION symbols in symvec.
48 * icf.cc (get_section_contents): For merge sections, ignore the
49 addend for relocations against non-section symbols.
51 2018-04-24 Cary Coutant <ccoutant@gmail.com>
54 * dynobj.cc (Versions::symbol_section_contents): Don't set
55 VERSYM_HIDDEN flag for undefined symbols.
56 * symtab.cc (Symbol_table::add_from_object): Don't override default
57 version definition with a different default version.
58 * symtab.h (Symbol::from_dyn): New method.
59 * testsuite/plugin_test.c (struct sym_info): Add ver field.
60 (claim_file_hook): Pass symbol version to plugin API.
61 (parse_readelf_line): Parse symbol version.
62 * testsuite/Makefile.am (ver_test_pr16504): New test case.
63 * testsuite/Makefile.in: Regenerate.
64 * testsuite/ver_test_pr16504.sh: New test script.
65 * testsuite/ver_test_pr16504_a.c: New source file.
66 * testsuite/ver_test_pr16504_a.script: New version script.
67 * testsuite/ver_test_pr16504_b.c: New source file.
68 * testsuite/ver_test_pr16504_b.script: New version script.
70 2018-04-19 Cary Coutant <ccoutant@gmail.com>
73 * gc.h (gc_process_relocs): Pass target to
74 scan.local_reloc_may_be_function_pointer.
76 2018-04-18 Nick Clifton <nickc@redhat.com>
78 * po/es.po: Updated Spanish translation.
80 2018-04-14 Cary Coutant <ccoutant@gmail.com>
83 * gc.h (gc_process_relocs): Pass target to
84 scan.global_reloc_may_be_function_pointer.
86 2018-04-09 Alan Modra <amodra@gmail.com>
88 * configure: Regenerate.
90 2018-04-09 Alan Modra <amodra@gmail.com>
92 * powerpc.cc (Target_powerpc::Track_tls::maybe_skip_tls_get_addr_call):
93 Handle inline plt sequence relocs.
94 (Stub_table::Plt_stub_key::Plt_stub_key): Likewise.
95 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Likewise.
96 (Target_powerpc::Relocate::relocate): Likewise.
98 2018-04-09 Alan Modra <amodra@gmail.com>
100 * powerpc.cc (Target_powerpc::lplt_): New variable.
101 (Target_powerpc::lplt_section): Associated accessor.
102 (Target_powerpc::plt_off): Handle local non-ifunc symbols.
103 (Target_powerpc::make_lplt_section): New function.
104 (Target_powerpc::make_local_plt_entry): New function.
105 (Powerpc_relobj::do_relocate_sections): Write out lplt.
106 (Output_data_plt_powerpc::first_plt_entry_offset): Zero for lplt.
107 (Output_data_plt_powerpc::add_local_entry): New function.
108 (Output_data_plt_powerpc::do_write): Ignore lplt.
109 (Target_powerpc::make_iplt_section): Make lplt first.
110 (Target_powerpc::make_brlt_section): Make .branch_lt relro.
111 (Target_powerpc::Scan::local): Handle PLT16 relocs.
113 2018-04-09 Alan Modra <amodra@gmail.com>
115 * powerpc.cc (Target_powerpc::plt_off): New functions.
116 (is_plt16_reloc): New function.
117 (Stub_table::plt_off): Use Target_powerpc::plt_off.
118 (Stub_table::plt_call_size): Use plt_off.
119 (Stub_table::do_write): Likewise.
120 (Target_powerpc::Scan::get_reference_flags): Return RELATIVE_REF
121 for PLT16 relocations.
122 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Return true
123 for PLT16 relocations.
124 (Target_powerpc::Scan::global): Make a PLT entry for PLT16 relocations.
125 (Target_powerpc::Relocate::relocate): Support PLT16 relocations.
126 (Powerpc_scan_relocatable_reloc::global_strategy): Return RELOC_SPECIAL
127 for ppc32 plt16 relocs.
129 2018-04-06 Cary Coutant <ccoutant@gmail.com>
131 * object.cc (Sized_relobj_file::include_section_group): Store
132 reference to Kept_section info for discarded comdat sections
133 regardless of size. Move size checking to map_to_kept_section.
134 (Sized_relobj_file::include_linkonce_section): Likewise.
135 (Sized_relobj_file::map_to_kept_section): Add section name parameter.
136 Insert size checking logic from above functions.
137 (Sized_relobj_file::find_kept_section_object): New method.
138 (Sized_relobj_file::get_symbol_name): New method.
139 * object.h (Sized_relobj_file::map_to_kept_section): Add section_name
140 parameter. Adjust all callers.
141 (Sized_relobj_file::find_kept_section_object): New method.
142 (Sized_relobj_file::get_symbol_name): New method.
143 (Sized_relobj_file::Kept_comdat_section): Replace object and shndx
144 fields with sh_size, kept_section, symndx, and is_comdat fields.
145 (Sized_relobj_file::set_kept_comdat_section): Replace kept_object
146 and kept_shndx parameters with is_comdat, symndx, sh_size, and
148 (Sized_relobj_file::get_kept_comdat_section): Likewise.
149 * target-reloc.h (enum Comdat_behavior): Change CB_WARNING to CB_ERROR.
150 Adjust all references.
151 (issue_undefined_symbol_error): New function template.
152 (relocate_section): Pass section name to map_to_kept_section.
153 Move discarded section code to new function above.
154 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Move
155 declaration for gsym out one level. Call issue_discarded_error.
156 * arm.cc (Target_arm::scan_reloc_section_for_stubs): Likewise.
157 * powerpc.cc (Relocate_comdat_behavior): Change CB_WARNING to CB_ERROR.
159 2018-04-05 Cary Coutant <ccoutant@gmail.com>
161 * target-reloc.h (relocate_section): Add local symbol index or global
162 symbol name to warning about relocation that refers to discarded
165 2018-04-05 James Cowgill <james.cowgill@mips.com>
167 Revert previous patch and apply revised patch.
170 * mips.cc (Mips_got_info::record_got_page_entry): Don't insert
171 Got_page_entry for object's GOT.
172 (Mips_got_info::add_got_page_entries): Add all pages from from's GOT.
173 Rename to add_got_page_count.
174 (Got_page_entry): Remove num_pages.
176 2018-04-05 James Cowgill <james.cowgill@mips.com>
179 * mips.cc (Mips_got_info::record_got_page_entry): Fetch existing
180 page entries for the object's GOT.
182 2018-04-05 Alan Modra <amodra@gmail.com>
184 * powerpc.cc (Target_powerpc::make_brlt_section): Make .branch_lt relro.
186 2018-04-04 Nick Clifton <nickc@redhat.com>
188 * po/es.po: Updated Spanish translation.
190 2018-04-02 Cary Coutant <ccoutant@gmail.com>
193 * incremental.cc (can_incremental_update): Check for unwind section
195 * layout.h (Layout::layout): Add sh_type parameter.
196 * layout.cc (Layout::layout): Likewise.
197 (Layout::layout_reloc): Create new output reloc section if data
198 section does not already have one.
199 (Layout::layout_eh_frame): Check for unwind section type.
200 (Layout::make_eh_frame_section): Use unwind section type for .eh_frame
202 * object.h (Sized_relobj_file::Shdr_write): New typedef.
203 (Sized_relobj_file::layout_section): Add sh_type parameter.
204 (Sized_relobj_file::Deferred_layout::Deferred_layout): Add sh_type
206 * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
208 (Sized_relobj_file::layout_section): Add sh_type parameter; pass it
210 (Sized_relobj_file::do_layout): Make local copy of sh_type.
211 Force .eh_frame sections to unwind section type.
212 Pass sh_type to layout_section.
213 (Sized_relobj_file<size, big_endian>::do_layout_deferred_sections):
214 Pass sh_type to layout_section.
215 * output.cc (Output_section::Output_section): Initialize reloc_section_.
216 * output.h (Output_section::reloc_section): New method.
217 (Output_section::set_reloc_section): New method.
218 (Output_section::reloc_section_): New data member.
219 * target.h (Target::unwind_section_type): New method.
220 (Target::Target_info::unwind_section_type): New data member.
222 * aarch64.cc (aarch64_info): Add unwind_section_type.
223 * arm.cc (arm_info, arm_nacl_info): Likewise.
224 * i386.cc (i386_info, i386_nacl_info, iamcu_info): Likewise.
225 * mips.cc (mips_info, mips_nacl_info): Likewise.
226 * powerpc.cc (powerpc_info): Likewise.
227 * s390.cc (s390_info): Likewise.
228 * sparc.cc (sparc_info): Likewise.
229 * tilegx.cc (tilegx_info): Likewise.
230 * x86_64.cc (x86_64_info, x86_64_nacl_info): Likewise.
232 * testsuite/Makefile.am (pr23016_1, pr23016_2): New test cases.
233 * testsuite/Makefile.in: Regenerate.
234 * testsuite/testfile.cc: Add unwind_section_type.
235 * testsuite/pr23016_1.sh: New test script.
236 * testsuite/pr23016_1a.s: New source file.
237 * testsuite/pr23016_1b.s: New source file.
238 * testsuite/pr23016_2.sh: New test script.
239 * testsuite/pr23016_2a.s: New source file.
240 * testsuite/pr23016_2b.s: New source file.
242 2018-03-28 Cary Coutant <ccoutant@gmail.com>
246 * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
247 Replace check for --enable-plugins with AC_PLUGINS.
248 * options.cc (parse_plugin, parse_plugin_opt): Remove #ifdef.
249 (General_options::finalize): Check if plugins enabled.
250 * options.h (--plugin, --plugin-opt): Define even if plugins not
252 * Makefile.in: Regenerate.
253 * aclocal.m4: Regenerate.
254 * configure: Regenerate.
255 * testsuite/Makefile.in: Regenerate.
257 2018-03-28 Cary Coutant <ccoutant@gmail.com>
260 * aarch64-reloc.def: Add TLSLE_LDST* relocations.
261 * aarch64.cc (Target_aarch64::optimize_tls_reloc): Likewise.
262 (Target_aarch64::Scan::local): Likewise.
263 (Target_aarch64::Scan::global): Likewise.
264 (Target_aarch64::Relocate::relocate): Likewise.
265 (Target_aarch64::Relocate::relocate_tls): Likewise.
267 2018-03-27 Roland McGrath <mcgrathr@google.com>
269 * testsuite/split_x86_64.sh: Fix bad regexp.
271 2018-03-26 Cary Coutant <ccoutant@gmail.com>
274 * plugin.cc (Sized_pluginobj::do_add_symbols): Use a real section
275 index instead of SHN_ABS for defined symbols.
276 * testsuite/Makefile.am (plugin_pr22868): New test case.
277 * testsuite/Makefile.in: Regenerate
278 * testsuite/plugin_pr22868.sh: New test script.
279 * testsuite/plugin_pr22868_a.c: New source file.
280 * testsuite/plugin_pr22868_b.c: New source file.
282 2018-03-23 Cary Coutant <ccoutant@gmail.com>
284 * plugin.cc (link_or_copy_file): Remove newlines from warning messages.
285 Add pedantic check for return value from ::write.
287 2018-03-23 Cary Coutant <ccoutant@gmail.com>
289 * debug.h (DEBUG_PLUGIN): New constant.
290 (DEBUG_ALL): Add DEBUG_PLUGIN.
291 (debug_string_to_enum): Likewise.
292 * plugin.cc (make_sized_plugin_object): Add filename parameter.
293 (Plugin_recorder): New class.
294 (Plugin_manager::~Plugin_manager): Delete recorder_.
295 (Plugin_manager::load_plugins): Create and initialize recorder_.
296 (Plugin_manager::claim_file): Record claimed and unclaimed files.
297 (Plugin_manager::make_plugin_object): Use object name as name for
298 plugin object, if available.
299 (Plugin_manager::add_input_file): Record replacement files.
300 (Sized_pluginobj::do_add_symbols): Record plugin symbols.
301 (Plugin_finish::run): Call Plugin_recorder::finish().
302 (make_sized_plugin_object): Add filename parameter and pass to
303 Sized_pluginobj constructor.
304 * plugin.h (Plugin::filename): New method.
305 (Plugin::recorder): New method.
306 (Plugin::recorder_): New data member.
308 2018-03-07 Sriraman Tallam <tmsriram@google.com>
310 * layout.cc (Layout::default_section_order): Check for text section
312 (Layout::text_section_name_mapping): New static member.
313 (Layout::text_section_name_mapping_count): New static member.
314 (Layout::match_section_name): New static function.
315 (Layout::output_section_name): Check for text section prefixes.
316 * layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value.
317 (Output_section_order::ORDER_TEXT_STARTUP): New enum value.
318 (Output_section_order::ORDER_TEXT_EXIT): New enum value.
319 (Output_section_order::ORDER_TEXT_UNLIKELY): New enum value.
320 (Layout::text_section_name_mapping): New static member.
321 (Layout::text_section_name_mapping_count): New static member.
322 (Layout::match_section_name): New static function.
323 * options.h (keep_text_section_prefix): New -z option.
324 * testsuite/Makefile.am (keep_text_section_prefix): New test.
325 * testsuite/Makefile.in: Regenerate.
326 * testsuite/keep_text_section_prefix.cc: New test source.
327 * testsuite/keep_text_section_prefix.sh: New test script.
329 2018-02-22 Sriraman Tallam <tmsriram@google.com>
331 * plugin.cc (get_wrap_symbols): New plugin interface.
332 (load): Add get_wrap_symbols to transfer vector.
333 * plugin-api.h (ld_plugin_get_wrap_symbols): New plugin interface.
334 * testsuite/plugin_test.c (onload): Call and check get_wrap_symbols
336 * testsuite/plugin_test_wrap_symbols.sh: New test script.
337 * testsuite/plugin_test_wrap_symbols_1.cc: New file.
338 * testsuite/plugin_test_wrap_symbols_2.cc: New file.
339 * testsuite/Makefile.am (plugin_test_wrap_symbols): New test.
340 * testsuite/Makefile.in: Regenerate.
342 2018-02-07 Sriraman Tallam <tmsriram@google.com>
344 * expression.cc (Symbol_expression::set_expr_sym_in_real_elf):
346 (Unary_expression::set_expr_sym_in_real_elf): New method.
347 (Binary_expression::set_expr_sym_in_real_elf): New method.
348 (Trinary_expression::set_expr_sym_in_real_elf): New method.
349 * plugin.cc (get_symbol_resolution_info): Fix symbol resolution if
350 defined or used in defsyms.
351 * plugin.h (Plugin_manager::is_defsym_def): New method.
352 (Plugin_manager::Plugin_manager): Initialize defsym_defines_set_.
353 (Plugin_manager::defsym_defines_set_): New member.
354 (Plugin_manager::Defsym_defines_set): New typedef.
355 * script.cc (Script_options::set_defsym_uses_in_real_elf): New method.
356 (Script_options::find_defsym_defs): New method.
357 * script.h (Expression::set_expr_sym_in_real_elf): New method.
358 (Symbol_assignment::is_defsym): New method.
359 (Symbol_assignment::value): New method.
360 (Script_options::find_defsym_defs): New method.
361 (Script_options::set_defsym_uses_in_real_elf): New method.
362 * testsuite/Makefile.am (plugin_test_defsym): New test.
363 * testsuite/Makefile.in: Regenerate.
364 * testsuite/plugin_test.c: Check for new symbol resolution.
365 * testsuite/plugin_test_defsym.sh: New script.
366 * testsuite/plugin_test_defsym.c: New test source.
368 2018-02-07 Alan Modra <amodra@gmail.com>
370 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
371 * options.h: Remove --speculate-indirect-jumps support.
372 * powerpc.cc: Likewise.
374 2018-02-02 Cary Coutant <ccoutant@gmail.com>
377 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Add
378 support for DWARF-4 line number tables.
379 * dwarf_reader.h (Sized_dwarf_line_info::max_ops_per_insn): New field.
381 2018-01-18 Alan Modra <amodra@gmail.com>
383 * powerpc.cc (param_plt_align): New function supplying default
384 --plt-align values. Use it..
385 (Stub_table::plt_call_align): ..here, and..
386 (Output_data_glink::global_entry_align): ..here.
387 (Stub_table::stub_align): Correct 32-bit minimum alignment.
389 2018-01-17 Alan Modra <amodra@gmail.com>
391 * options.h (speculate_indirect_jumps): New option.
392 * powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants.
393 (output_bctr): New function.
394 (Stub_table::plt_call_size): Add space for speculation barrier.
395 (Stub_table::branch_stub_size): Likewise.
396 (Output_data_glink::pltresolve_size): Likewise.
397 (Stub_table::do_write): Output speculation barriers.
399 2018-01-17 Alan Modra <amodra@gmail.com>
401 * options.h (plt_align): Support for PowerPC32 too.
402 * powerpc.cc (Stub_table::stub_align): Heed --plt-align for 32-bit.
403 (Stub_table::plt_call_size, branch_stub_size): Tidy.
404 (Stub_table::plt_call_align): Implement using stub_align.
405 (Output_data_glink::global_entry_align): New function.
406 (Output_data_glink::global_entry_off): New function.
407 (Output_data_glink::global_entry_address): Use global_entry_off.
408 (Output_data_glink::pltresolve_size): New function, replacing
409 pltresolve_size_ constant. Update all uses.
410 (Output_data_glink::add_global_entry): Align offset.
411 (Output_data_glink::set_final_data_size): Use global_entry_align.
412 (Stub_table::do_write): Don't pad __glink_PLTrelsolve with nops.
413 Tidy stub output. Use global_entry_off.
415 2018-01-15 Cary Coutant <ccoutant@gmail.com>
418 * options.h (-fuse-ld): Add correct helparg.
420 2018-01-15 Nick Clifton <nickc@redhat.com>
422 * po/uk.po: Updated Ukranian translation.
424 2018-01-13 Nick Clifton <nickc@redhat.com>
426 * po/gold.pot: Regenerated.
428 2018-01-13 Nick Clifton <nickc@redhat.com>
432 2018-01-12 Cary Coutant <ccoutant@gmail.com>
434 * NEWS: Add new features in 1.15.
435 * version.cc (version_string): Bump to 1.15.
437 2018-01-12 Sterling Augustine <saugustine@google.com>
439 * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
440 conditionals and calls to is_forwarder.
442 2018-01-03 Alan Modra <amodra@gmail.com>
444 Update year range in copyright notice of all files.
446 For older changes see ChangeLog-2017
448 Copyright (C) 2018 Free Software Foundation, Inc.
450 Copying and distribution of this file, with or without modification,
451 are permitted in any medium without royalty provided the copyright
452 notice and this notice are preserved.
458 version-control: never