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