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