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