Fix second bug where --icf=safe triggers segfault when linking ARM.
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2018-04-19 Cary Coutant <ccoutant@gmail.com>
2
3 PR gold/23046
4 * gc.h (gc_process_relocs): Pass target to
5 scan.local_reloc_may_be_function_pointer.
6
7 2018-04-18 Nick Clifton <nickc@redhat.com>
8
9 * po/es.po: Updated Spanish translation.
10
11 2018-04-14 Cary Coutant <ccoutant@gmail.com>
12
13 PR gold/23046
14 * gc.h (gc_process_relocs): Pass target to
15 scan.global_reloc_may_be_function_pointer.
16
17 2018-04-09 Alan Modra <amodra@gmail.com>
18
19 * configure: Regenerate.
20
21 2018-04-09 Alan Modra <amodra@gmail.com>
22
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.
28
29 2018-04-09 Alan Modra <amodra@gmail.com>
30
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.
43
44 2018-04-09 Alan Modra <amodra@gmail.com>
45
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.
59
60 2018-04-06 Cary Coutant <ccoutant@gmail.com>
61
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
78 kept_section.
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.
89
90 2018-04-05 Cary Coutant <ccoutant@gmail.com>
91
92 * target-reloc.h (relocate_section): Add local symbol index or global
93 symbol name to warning about relocation that refers to discarded
94 section.
95
96 2018-04-05 James Cowgill <james.cowgill@mips.com>
97
98 Revert previous patch and apply revised patch.
99
100 PR gold/22770
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.
106
107 2018-04-05 James Cowgill <james.cowgill@mips.com>
108
109 PR gold/22770
110 * mips.cc (Mips_got_info::record_got_page_entry): Fetch existing
111 page entries for the object's GOT.
112
113 2018-04-05 Alan Modra <amodra@gmail.com>
114
115 * powerpc.cc (Target_powerpc::make_brlt_section): Make .branch_lt relro.
116
117 2018-04-04 Nick Clifton <nickc@redhat.com>
118
119 * po/es.po: Updated Spanish translation.
120
121 2018-04-02 Cary Coutant <ccoutant@gmail.com>
122
123 PR gold/23016
124 * incremental.cc (can_incremental_update): Check for unwind section
125 type.
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
132 and .eh_frame_hdr.
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
136 parameter.
137 * object.cc (Sized_relobj_file::check_eh_frame_flags): Check for
138 unwind section type.
139 (Sized_relobj_file::layout_section): Add sh_type parameter; pass it
140 to Layout::layout.
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.
152
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.
162
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.
172
173 2018-03-28 Cary Coutant <ccoutant@gmail.com>
174
175 PR gold/21423
176 PR gold/22500
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
182 enabled.
183 * Makefile.in: Regenerate.
184 * aclocal.m4: Regenerate.
185 * configure: Regenerate.
186 * testsuite/Makefile.in: Regenerate.
187
188 2018-03-28 Cary Coutant <ccoutant@gmail.com>
189
190 PR gold/22969
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.
197
198 2018-03-27 Roland McGrath <mcgrathr@google.com>
199
200 * testsuite/split_x86_64.sh: Fix bad regexp.
201
202 2018-03-26 Cary Coutant <ccoutant@gmail.com>
203
204 PR gold/22868
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.
212
213 2018-03-23 Cary Coutant <ccoutant@gmail.com>
214
215 * plugin.cc (link_or_copy_file): Remove newlines from warning messages.
216 Add pedantic check for return value from ::write.
217
218 2018-03-23 Cary Coutant <ccoutant@gmail.com>
219
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.
238
239 2018-03-07 Sriraman Tallam <tmsriram@google.com>
240
241 * layout.cc (Layout::default_section_order): Check for text section
242 prefixes.
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.
259
260 2018-02-22 Sriraman Tallam <tmsriram@google.com>
261
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
266 interface.
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.
272
273 2018-02-07 Sriraman Tallam <tmsriram@google.com>
274
275 * expression.cc (Symbol_expression::set_expr_sym_in_real_elf):
276 New method.
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.
298
299 2018-02-07 Alan Modra <amodra@gmail.com>
300
301 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
302 * options.h: Remove --speculate-indirect-jumps support.
303 * powerpc.cc: Likewise.
304
305 2018-02-02 Cary Coutant <ccoutant@gmail.com>
306
307 * PR gold/22776
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.
311
312 2018-01-18 Alan Modra <amodra@gmail.com>
313
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.
319
320 2018-01-17 Alan Modra <amodra@gmail.com>
321
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.
329
330 2018-01-17 Alan Modra <amodra@gmail.com>
331
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.
345
346 2018-01-15 Cary Coutant <ccoutant@gmail.com>
347
348 PR gold/22694
349 * options.h (-fuse-ld): Add correct helparg.
350
351 2018-01-15 Nick Clifton <nickc@redhat.com>
352
353 * po/uk.po: Updated Ukranian translation.
354
355 2018-01-13 Nick Clifton <nickc@redhat.com>
356
357 * po/gold.pot: Regenerated.
358
359 2018-01-13 Nick Clifton <nickc@redhat.com>
360
361 2.30 branch created.
362
363 2018-01-12 Cary Coutant <ccoutant@gmail.com>
364
365 * NEWS: Add new features in 1.15.
366 * version.cc (version_string): Bump to 1.15.
367
368 2018-01-12 Sterling Augustine <saugustine@google.com>
369
370 * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
371 conditionals and calls to is_forwarder.
372
373 2018-01-03 Alan Modra <amodra@gmail.com>
374
375 Update year range in copyright notice of all files.
376
377 For older changes see ChangeLog-2017
378 \f
379 Copyright (C) 2018 Free Software Foundation, Inc.
380
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.
384
385 Local Variables:
386 mode: change-log
387 left-margin: 8
388 fill-column: 74
389 version-control: never
390 End:
This page took 0.037489 seconds and 5 git commands to generate.