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