1 2018-04-24 Cary Coutant <ccoutant@gmail.com>
5 * gc.h (gc_process_relocs): Flag STT_SECTION symbols in symvec.
6 * icf.cc (get_section_contents): For merge sections, ignore the
7 addend for relocations against non-section symbols.
9 2018-04-24 Cary Coutant <ccoutant@gmail.com>
12 * dynobj.cc (Versions::symbol_section_contents): Don't set
13 VERSYM_HIDDEN flag for undefined symbols.
14 * symtab.cc (Symbol_table::add_from_object): Don't override default
15 version definition with a different default version.
16 * symtab.h (Symbol::from_dyn): New method.
17 * testsuite/plugin_test.c (struct sym_info): Add ver field.
18 (claim_file_hook): Pass symbol version to plugin API.
19 (parse_readelf_line): Parse symbol version.
20 * testsuite/Makefile.am (ver_test_pr16504): New test case.
21 * testsuite/Makefile.in: Regenerate.
22 * testsuite/ver_test_pr16504.sh: New test script.
23 * testsuite/ver_test_pr16504_a.c: New source file.
24 * testsuite/ver_test_pr16504_a.script: New version script.
25 * testsuite/ver_test_pr16504_b.c: New source file.
26 * testsuite/ver_test_pr16504_b.script: New version script.
28 2018-04-19 Cary Coutant <ccoutant@gmail.com>
31 * gc.h (gc_process_relocs): Pass target to
32 scan.local_reloc_may_be_function_pointer.
34 2018-04-18 Nick Clifton <nickc@redhat.com>
36 * po/es.po: Updated Spanish translation.
38 2018-04-14 Cary Coutant <ccoutant@gmail.com>
41 * gc.h (gc_process_relocs): Pass target to
42 scan.global_reloc_may_be_function_pointer.
44 2018-04-09 Alan Modra <amodra@gmail.com>
46 * configure: Regenerate.
48 2018-04-09 Alan Modra <amodra@gmail.com>
50 * powerpc.cc (Target_powerpc::Track_tls::maybe_skip_tls_get_addr_call):
51 Handle inline plt sequence relocs.
52 (Stub_table::Plt_stub_key::Plt_stub_key): Likewise.
53 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Likewise.
54 (Target_powerpc::Relocate::relocate): Likewise.
56 2018-04-09 Alan Modra <amodra@gmail.com>
58 * powerpc.cc (Target_powerpc::lplt_): New variable.
59 (Target_powerpc::lplt_section): Associated accessor.
60 (Target_powerpc::plt_off): Handle local non-ifunc symbols.
61 (Target_powerpc::make_lplt_section): New function.
62 (Target_powerpc::make_local_plt_entry): New function.
63 (Powerpc_relobj::do_relocate_sections): Write out lplt.
64 (Output_data_plt_powerpc::first_plt_entry_offset): Zero for lplt.
65 (Output_data_plt_powerpc::add_local_entry): New function.
66 (Output_data_plt_powerpc::do_write): Ignore lplt.
67 (Target_powerpc::make_iplt_section): Make lplt first.
68 (Target_powerpc::make_brlt_section): Make .branch_lt relro.
69 (Target_powerpc::Scan::local): Handle PLT16 relocs.
71 2018-04-09 Alan Modra <amodra@gmail.com>
73 * powerpc.cc (Target_powerpc::plt_off): New functions.
74 (is_plt16_reloc): New function.
75 (Stub_table::plt_off): Use Target_powerpc::plt_off.
76 (Stub_table::plt_call_size): Use plt_off.
77 (Stub_table::do_write): Likewise.
78 (Target_powerpc::Scan::get_reference_flags): Return RELATIVE_REF
79 for PLT16 relocations.
80 (Target_powerpc::Scan::reloc_needs_plt_for_ifunc): Return true
81 for PLT16 relocations.
82 (Target_powerpc::Scan::global): Make a PLT entry for PLT16 relocations.
83 (Target_powerpc::Relocate::relocate): Support PLT16 relocations.
84 (Powerpc_scan_relocatable_reloc::global_strategy): Return RELOC_SPECIAL
85 for ppc32 plt16 relocs.
87 2018-04-06 Cary Coutant <ccoutant@gmail.com>
89 * object.cc (Sized_relobj_file::include_section_group): Store
90 reference to Kept_section info for discarded comdat sections
91 regardless of size. Move size checking to map_to_kept_section.
92 (Sized_relobj_file::include_linkonce_section): Likewise.
93 (Sized_relobj_file::map_to_kept_section): Add section name parameter.
94 Insert size checking logic from above functions.
95 (Sized_relobj_file::find_kept_section_object): New method.
96 (Sized_relobj_file::get_symbol_name): New method.
97 * object.h (Sized_relobj_file::map_to_kept_section): Add section_name
98 parameter. Adjust all callers.
99 (Sized_relobj_file::find_kept_section_object): New method.
100 (Sized_relobj_file::get_symbol_name): New method.
101 (Sized_relobj_file::Kept_comdat_section): Replace object and shndx
102 fields with sh_size, kept_section, symndx, and is_comdat fields.
103 (Sized_relobj_file::set_kept_comdat_section): Replace kept_object
104 and kept_shndx parameters with is_comdat, symndx, sh_size, and
106 (Sized_relobj_file::get_kept_comdat_section): Likewise.
107 * target-reloc.h (enum Comdat_behavior): Change CB_WARNING to CB_ERROR.
108 Adjust all references.
109 (issue_undefined_symbol_error): New function template.
110 (relocate_section): Pass section name to map_to_kept_section.
111 Move discarded section code to new function above.
112 * aarch64.cc (Target_aarch64::scan_reloc_section_for_stubs): Move
113 declaration for gsym out one level. Call issue_discarded_error.
114 * arm.cc (Target_arm::scan_reloc_section_for_stubs): Likewise.
115 * powerpc.cc (Relocate_comdat_behavior): Change CB_WARNING to CB_ERROR.
117 2018-04-05 Cary Coutant <ccoutant@gmail.com>
119 * target-reloc.h (relocate_section): Add local symbol index or global
120 symbol name to warning about relocation that refers to discarded
123 2018-04-05 James Cowgill <james.cowgill@mips.com>
125 Revert previous patch and apply revised patch.
128 * mips.cc (Mips_got_info::record_got_page_entry): Don't insert
129 Got_page_entry for object's GOT.
130 (Mips_got_info::add_got_page_entries): Add all pages from from's GOT.
131 Rename to add_got_page_count.
132 (Got_page_entry): Remove num_pages.
134 2018-04-05 James Cowgill <james.cowgill@mips.com>
137 * mips.cc (Mips_got_info::record_got_page_entry): Fetch existing
138 page entries for the object's GOT.
140 2018-04-05 Alan Modra <amodra@gmail.com>
142 * powerpc.cc (Target_powerpc::make_brlt_section): Make .branch_lt relro.
144 2018-04-04 Nick Clifton <nickc@redhat.com>
146 * po/es.po: Updated Spanish translation.
148 2018-04-02 Cary Coutant <ccoutant@gmail.com>
151 * incremental.cc (can_incremental_update): Check for unwind section
153 * layout.h (Layout::layout): Add sh_type parameter.
154 * layout.cc (Layout::layout): Likewise.
155 (Layout::layout_reloc): Create new output reloc section if data
156 section does not already have one.
157 (Layout::layout_eh_frame): Check for unwind section type.
158 (Layout::make_eh_frame_section): Use unwind section type for .eh_frame
160 * object.h (Sized_relobj_file::Shdr_write): New typedef.
161 (Sized_relobj_file::layout_section): Add sh_type parameter.
162 (Sized_relobj_file::Deferred_layout::Deferred_layout): Add sh_type
164 * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
166 (Sized_relobj_file::layout_section): Add sh_type parameter; pass it
168 (Sized_relobj_file::do_layout): Make local copy of sh_type.
169 Force .eh_frame sections to unwind section type.
170 Pass sh_type to layout_section.
171 (Sized_relobj_file<size, big_endian>::do_layout_deferred_sections):
172 Pass sh_type to layout_section.
173 * output.cc (Output_section::Output_section): Initialize reloc_section_.
174 * output.h (Output_section::reloc_section): New method.
175 (Output_section::set_reloc_section): New method.
176 (Output_section::reloc_section_): New data member.
177 * target.h (Target::unwind_section_type): New method.
178 (Target::Target_info::unwind_section_type): New data member.
180 * aarch64.cc (aarch64_info): Add unwind_section_type.
181 * arm.cc (arm_info, arm_nacl_info): Likewise.
182 * i386.cc (i386_info, i386_nacl_info, iamcu_info): Likewise.
183 * mips.cc (mips_info, mips_nacl_info): Likewise.
184 * powerpc.cc (powerpc_info): Likewise.
185 * s390.cc (s390_info): Likewise.
186 * sparc.cc (sparc_info): Likewise.
187 * tilegx.cc (tilegx_info): Likewise.
188 * x86_64.cc (x86_64_info, x86_64_nacl_info): Likewise.
190 * testsuite/Makefile.am (pr23016_1, pr23016_2): New test cases.
191 * testsuite/Makefile.in: Regenerate.
192 * testsuite/testfile.cc: Add unwind_section_type.
193 * testsuite/pr23016_1.sh: New test script.
194 * testsuite/pr23016_1a.s: New source file.
195 * testsuite/pr23016_1b.s: New source file.
196 * testsuite/pr23016_2.sh: New test script.
197 * testsuite/pr23016_2a.s: New source file.
198 * testsuite/pr23016_2b.s: New source file.
200 2018-03-28 Cary Coutant <ccoutant@gmail.com>
204 * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS.
205 Replace check for --enable-plugins with AC_PLUGINS.
206 * options.cc (parse_plugin, parse_plugin_opt): Remove #ifdef.
207 (General_options::finalize): Check if plugins enabled.
208 * options.h (--plugin, --plugin-opt): Define even if plugins not
210 * Makefile.in: Regenerate.
211 * aclocal.m4: Regenerate.
212 * configure: Regenerate.
213 * testsuite/Makefile.in: Regenerate.
215 2018-03-28 Cary Coutant <ccoutant@gmail.com>
218 * aarch64-reloc.def: Add TLSLE_LDST* relocations.
219 * aarch64.cc (Target_aarch64::optimize_tls_reloc): Likewise.
220 (Target_aarch64::Scan::local): Likewise.
221 (Target_aarch64::Scan::global): Likewise.
222 (Target_aarch64::Relocate::relocate): Likewise.
223 (Target_aarch64::Relocate::relocate_tls): Likewise.
225 2018-03-27 Roland McGrath <mcgrathr@google.com>
227 * testsuite/split_x86_64.sh: Fix bad regexp.
229 2018-03-26 Cary Coutant <ccoutant@gmail.com>
232 * plugin.cc (Sized_pluginobj::do_add_symbols): Use a real section
233 index instead of SHN_ABS for defined symbols.
234 * testsuite/Makefile.am (plugin_pr22868): New test case.
235 * testsuite/Makefile.in: Regenerate
236 * testsuite/plugin_pr22868.sh: New test script.
237 * testsuite/plugin_pr22868_a.c: New source file.
238 * testsuite/plugin_pr22868_b.c: New source file.
240 2018-03-23 Cary Coutant <ccoutant@gmail.com>
242 * plugin.cc (link_or_copy_file): Remove newlines from warning messages.
243 Add pedantic check for return value from ::write.
245 2018-03-23 Cary Coutant <ccoutant@gmail.com>
247 * debug.h (DEBUG_PLUGIN): New constant.
248 (DEBUG_ALL): Add DEBUG_PLUGIN.
249 (debug_string_to_enum): Likewise.
250 * plugin.cc (make_sized_plugin_object): Add filename parameter.
251 (Plugin_recorder): New class.
252 (Plugin_manager::~Plugin_manager): Delete recorder_.
253 (Plugin_manager::load_plugins): Create and initialize recorder_.
254 (Plugin_manager::claim_file): Record claimed and unclaimed files.
255 (Plugin_manager::make_plugin_object): Use object name as name for
256 plugin object, if available.
257 (Plugin_manager::add_input_file): Record replacement files.
258 (Sized_pluginobj::do_add_symbols): Record plugin symbols.
259 (Plugin_finish::run): Call Plugin_recorder::finish().
260 (make_sized_plugin_object): Add filename parameter and pass to
261 Sized_pluginobj constructor.
262 * plugin.h (Plugin::filename): New method.
263 (Plugin::recorder): New method.
264 (Plugin::recorder_): New data member.
266 2018-03-07 Sriraman Tallam <tmsriram@google.com>
268 * layout.cc (Layout::default_section_order): Check for text section
270 (Layout::text_section_name_mapping): New static member.
271 (Layout::text_section_name_mapping_count): New static member.
272 (Layout::match_section_name): New static function.
273 (Layout::output_section_name): Check for text section prefixes.
274 * layout.h (Output_section_order::ORDER_TEXT_HOT): New enum value.
275 (Output_section_order::ORDER_TEXT_STARTUP): New enum value.
276 (Output_section_order::ORDER_TEXT_EXIT): New enum value.
277 (Output_section_order::ORDER_TEXT_UNLIKELY): New enum value.
278 (Layout::text_section_name_mapping): New static member.
279 (Layout::text_section_name_mapping_count): New static member.
280 (Layout::match_section_name): New static function.
281 * options.h (keep_text_section_prefix): New -z option.
282 * testsuite/Makefile.am (keep_text_section_prefix): New test.
283 * testsuite/Makefile.in: Regenerate.
284 * testsuite/keep_text_section_prefix.cc: New test source.
285 * testsuite/keep_text_section_prefix.sh: New test script.
287 2018-02-22 Sriraman Tallam <tmsriram@google.com>
289 * plugin.cc (get_wrap_symbols): New plugin interface.
290 (load): Add get_wrap_symbols to transfer vector.
291 * plugin-api.h (ld_plugin_get_wrap_symbols): New plugin interface.
292 * testsuite/plugin_test.c (onload): Call and check get_wrap_symbols
294 * testsuite/plugin_test_wrap_symbols.sh: New test script.
295 * testsuite/plugin_test_wrap_symbols_1.cc: New file.
296 * testsuite/plugin_test_wrap_symbols_2.cc: New file.
297 * testsuite/Makefile.am (plugin_test_wrap_symbols): New test.
298 * testsuite/Makefile.in: Regenerate.
300 2018-02-07 Sriraman Tallam <tmsriram@google.com>
302 * expression.cc (Symbol_expression::set_expr_sym_in_real_elf):
304 (Unary_expression::set_expr_sym_in_real_elf): New method.
305 (Binary_expression::set_expr_sym_in_real_elf): New method.
306 (Trinary_expression::set_expr_sym_in_real_elf): New method.
307 * plugin.cc (get_symbol_resolution_info): Fix symbol resolution if
308 defined or used in defsyms.
309 * plugin.h (Plugin_manager::is_defsym_def): New method.
310 (Plugin_manager::Plugin_manager): Initialize defsym_defines_set_.
311 (Plugin_manager::defsym_defines_set_): New member.
312 (Plugin_manager::Defsym_defines_set): New typedef.
313 * script.cc (Script_options::set_defsym_uses_in_real_elf): New method.
314 (Script_options::find_defsym_defs): New method.
315 * script.h (Expression::set_expr_sym_in_real_elf): New method.
316 (Symbol_assignment::is_defsym): New method.
317 (Symbol_assignment::value): New method.
318 (Script_options::find_defsym_defs): New method.
319 (Script_options::set_defsym_uses_in_real_elf): New method.
320 * testsuite/Makefile.am (plugin_test_defsym): New test.
321 * testsuite/Makefile.in: Regenerate.
322 * testsuite/plugin_test.c: Check for new symbol resolution.
323 * testsuite/plugin_test_defsym.sh: New script.
324 * testsuite/plugin_test_defsym.c: New test source.
326 2018-02-07 Alan Modra <amodra@gmail.com>
328 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
329 * options.h: Remove --speculate-indirect-jumps support.
330 * powerpc.cc: Likewise.
332 2018-02-02 Cary Coutant <ccoutant@gmail.com>
335 * dwarf_reader.cc (Sized_dwarf_line_info::read_header_prolog): Add
336 support for DWARF-4 line number tables.
337 * dwarf_reader.h (Sized_dwarf_line_info::max_ops_per_insn): New field.
339 2018-01-18 Alan Modra <amodra@gmail.com>
341 * powerpc.cc (param_plt_align): New function supplying default
342 --plt-align values. Use it..
343 (Stub_table::plt_call_align): ..here, and..
344 (Output_data_glink::global_entry_align): ..here.
345 (Stub_table::stub_align): Correct 32-bit minimum alignment.
347 2018-01-17 Alan Modra <amodra@gmail.com>
349 * options.h (speculate_indirect_jumps): New option.
350 * powerpc.cc (beqctrm, beqctrlm, crseteq): New insn constants.
351 (output_bctr): New function.
352 (Stub_table::plt_call_size): Add space for speculation barrier.
353 (Stub_table::branch_stub_size): Likewise.
354 (Output_data_glink::pltresolve_size): Likewise.
355 (Stub_table::do_write): Output speculation barriers.
357 2018-01-17 Alan Modra <amodra@gmail.com>
359 * options.h (plt_align): Support for PowerPC32 too.
360 * powerpc.cc (Stub_table::stub_align): Heed --plt-align for 32-bit.
361 (Stub_table::plt_call_size, branch_stub_size): Tidy.
362 (Stub_table::plt_call_align): Implement using stub_align.
363 (Output_data_glink::global_entry_align): New function.
364 (Output_data_glink::global_entry_off): New function.
365 (Output_data_glink::global_entry_address): Use global_entry_off.
366 (Output_data_glink::pltresolve_size): New function, replacing
367 pltresolve_size_ constant. Update all uses.
368 (Output_data_glink::add_global_entry): Align offset.
369 (Output_data_glink::set_final_data_size): Use global_entry_align.
370 (Stub_table::do_write): Don't pad __glink_PLTrelsolve with nops.
371 Tidy stub output. Use global_entry_off.
373 2018-01-15 Cary Coutant <ccoutant@gmail.com>
376 * options.h (-fuse-ld): Add correct helparg.
378 2018-01-15 Nick Clifton <nickc@redhat.com>
380 * po/uk.po: Updated Ukranian translation.
382 2018-01-13 Nick Clifton <nickc@redhat.com>
384 * po/gold.pot: Regenerated.
386 2018-01-13 Nick Clifton <nickc@redhat.com>
390 2018-01-12 Cary Coutant <ccoutant@gmail.com>
392 * NEWS: Add new features in 1.15.
393 * version.cc (version_string): Bump to 1.15.
395 2018-01-12 Sterling Augustine <saugustine@google.com>
397 * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
398 conditionals and calls to is_forwarder.
400 2018-01-03 Alan Modra <amodra@gmail.com>
402 Update year range in copyright notice of all files.
404 For older changes see ChangeLog-2017
406 Copyright (C) 2018 Free Software Foundation, Inc.
408 Copying and distribution of this file, with or without modification,
409 are permitted in any medium without royalty provided the copyright
410 notice and this notice are preserved.
416 version-control: never