[GOLD] gcc-11 stringop-overflow warning
[deliverable/binutils-gdb.git] / gold / ChangeLog
1 2020-12-07 Alan Modra <amodra@gmail.com>
2
3 * plugin.cc (Plugin_recorder::init): Replace strncpy with memcpy.
4
5 2020-12-03 Alan Modra <amodra@gmail.com>
6
7 * testsuite/Makefile.am (pr26936a.o): Pass -mx86-used-note=yes.
8 (pr26936b.o, pr26936c.o, pr26936d.o): Likewise.
9 * testsuite/Makefile.in: Regenerate.
10
11 2020-11-29 H.J. Lu <hongjiu.lu@intel.com>
12
13 PR ld/26972
14 * x86_64.cc (Output_data_plt_x86_64_ibt::tlsdesc_plt_entry): Add
15 endbr64.
16 (Output_data_plt_x86_64_ibt::do_fill_tlsdesc_entry): Adjusted.
17
18 2020-11-29 H.J. Lu <hongjiu.lu@intel.com>
19
20 PR gold/26939
21 * x86_64.cc (Target_x86_64<size>::Scan::local): Check
22 get_r_addend() == -4 for GOTPCRELX conversion.
23 (Target_x86_64<size>::Scan::global): Likewise.
24 (Target_x86_64<size>::Relocate::relocate): Likewise.
25 * testsuite/Makefile.am (check_DATA): Add
26 x86_64_mov_to_lea15.stdout and x86_64_mov_to_lea16.stdout.
27 (MOSTLYCLEANFILES): Add x86_64_mov_to_lea15 and
28 x86_64_mov_to_lea16.
29 (x86_64_mov_to_lea9.o): New target.
30 (x86_64_mov_to_lea10.o): Likewise.
31 (x86_64_mov_to_lea15): Likewise.
32 (x86_64_mov_to_lea16): Likewise.
33 (x86_64_mov_to_lea15.stdout): Likewise.
34 (x86_64_mov_to_lea16.stdout): Likewise.
35 * testsuite/Makefile.in: Regenerated.
36 * testsuite/x86_64_mov_to_lea.sh: Updated.
37 * testsuite/x86_64_mov_to_lea5.s: New file.
38
39 2020-11-29 H.J. Lu <hongjiu.lu@intel.com>
40
41 PR gold/26937
42 * object.cc (Sized_relobj_file::map_to_kept_section): Get the
43 section index for linkonce section. Also check the single
44 comdat section.
45 * testsuite/Makefile.am (check_SCRIPTS): Add pr26936.sh.
46 (check_DATA): Add pr26936a.stdout and pr26936b.stdout.
47 (MOSTLYCLEANFILES): Add pr26936a and pr26936b.
48 (pr26936a.stdout): New target.
49 (pr26936a): Likewise.
50 (pr26936b.stdout): Likewise.
51 (pr26936b): Likewise.
52 (pr26936a.o): Likewise.
53 (pr26936b.o): Likewise.
54 (pr26936c.o): Likewise.
55 (pr26936d.o): Likewise.
56 * testsuite/Makefile.in: Regenerated.
57 * testsuite/pr26936.sh: New file.
58 * testsuite/pr26936a.s: Likewise.
59 * testsuite/pr26936b.s: Likewise.
60 * testsuite/pr26936c.s: Likewise.
61 * testsuite/pr26936d.s: Likewise.
62
63 2020-11-17 Alan Modra <amodra@gmail.com>
64
65 * powerpc.cc (Target_powerpc::no_tprel_opt_): Rename from tprel_opt_.
66 Init to false.
67 (Target_powerpc::tprel_opt): Test parameters->options().tls_optimize().
68 (Target_powerpc::set_tprel_opt): Delete.
69 (Target_powerpc::set_no_tprel_opt): New function. Update all uses
70 of set_tprel_opt.
71
72 2020-11-16 Michael Hudson-Doyle <michael.hudson@canonical.com>
73
74 PR 26902
75 * powerpc.cc (Relocate::relocate): Do not include local entry
76 offset of target function when computing the address of a stub.
77
78 2020-11-08 H.J. Lu <hongjiu.lu@intel.com>
79
80 PR gold/26200
81 * plugin.cc (Plugin_manager::claim_file): Don't share Plugin_list
82 iterator.
83 (Plugin_manager::all_symbols_read): Likewise.
84 (Plugin_manager::cleanup): Likewise.
85
86 2020-11-03 Alan Modra <amodra@gmail.com>
87
88 * powerpc.cc (Target_powerpc::tocsave_loc): Return a pointer.
89 (Target_powerpc::Relocate::relocate): Avoid -Wdangling-gsl error.
90
91 2020-11-03 Nick Gasson <nick.gasson@arm.com>
92
93 PR 26827
94 * fileread.cc (File_read::open): Ensure file_counts_lock is
95 initialized.
96 * testsuite/Makefile.am (check_PROGRAMS): Add a test that passes
97 -Wl,--threads.
98 * testsuite/Makefile.in: Regenerate.
99
100 2020-10-30 H.J. Lu <hongjiu.lu@intel.com>
101
102 * testsuite/gnu_property_test.sh: Updated.
103
104 2020-10-22 H.J. Lu <hongjiu.lu@intel.com>
105
106 * Makefile.am (bootstrap-test): Skip for LTO build.
107 (bootstrap-test-r): Likewise.
108
109 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
110
111 PR gold/23539
112 * configure.ac: Check for GCC 9 or later and for -fcf-protection.
113 * configure: Regenerated.
114 * testsuite/Makefile.am (check_PROGRAMS): Skip incremental_test_2,
115 incremental_test_3, incremental_test_4, incremental_test_5,
116 incremental_copy_test, incremental_common_test_1 and
117 incremental_comdat_test_1 for -fcf-protection. Also Skip
118 incremental_copy_test and incremental_comdat_test_1 for GCC 9 or
119 later.
120 * testsuite/Makefile.in: Regenerated.
121
122 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
123
124 PR gold/23503
125 * testsuite/Makefile.am (justsyms_lib): Pass
126 -T $(srcdir)/justsyms_lib.t to gold.
127 * testsuite/Makefile.in: Regenerated.
128 * testsuite/justsyms_lib.t: New file.
129 * testsuite/script_test_10.t: Discard .note.gnu.property section.
130
131 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
132
133 * x86_64.cc (Target_x86_64::Target_x86_64): Initialize
134 feature_2_used_, feature_2_needed_ and object_feature_2_used_.
135 (Target_x86_64::feature_2_used_): New data member.
136 (Target_x86_64::feature_2_needed_): Likewise.
137 (Target_x86_64::object_isa_1_used_): Likewise.
138 (Target_x86_64::record_gnu_property): Support
139 GNU_PROPERTY_X86_COMPAT_ISA_1_USED,
140 GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED,
141 GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED,
142 GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED,
143 GNU_PROPERTY_X86_FEATURE_2_USED and
144 GNU_PROPERTY_X86_FEATURE_2_NEEDED.
145 (Target_x86_64::merge_gnu_properties): Merge FEATURE_2_USED bits.
146 Initialize object_feature_2_used_.
147 (Target_x86_64::do_finalize_gnu_properties): Support
148 GNU_PROPERTY_X86_FEATURE_2_USED and
149 GNU_PROPERTY_X86_FEATURE_2_NEEDED.
150 * testsuite/gnu_property_a.S (GNU_PROPERTY_X86_ISA_1_USED): Set
151 to 0xc0010002.
152 (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
153 * testsuite/gnu_property_b.S (GNU_PROPERTY_X86_ISA_1_USED): Set
154 to 0xc0010002.
155 (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
156 * testsuite/gnu_property_c.S (GNU_PROPERTY_X86_ISA_1_USED): Set
157 to 0xc0010002.
158 (GNU_PROPERTY_X86_ISA_1_NEEDED): Set to 0xc0008002.
159 * testsuite/gnu_property_test.sh: Updated.
160
161 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
162
163 PR gold/22914
164 PR gold/23535
165 * layout.cc (Layout::attach_allocated_section_to_segment): Place
166 a note section in a PT_NOTE segment with the same alignment. Set
167 the alignment of the PT_NOTE segment from the alignment of the
168 note section.
169 (Layout::create_note): Align the NT_GNU_PROPERTY_TYPE_0 note to 8
170 bytes for 64-bit ELF.
171 (Layout::segment_precedes): Place segments with larger alignments
172 first.
173 * output.cc (Output_segment::Output_segment): Initialize align_.
174 * output.h (Output_segment): Add align, set_align and align_.
175 * testsuite/Makefile.am (gnu_property_test.stdout): Pass -lhSWn
176 to $(TEST_READELF).
177 (gnu_property_test): Pass --build-id to ld.
178 * testsuite/Makefile.in: Regenerated.
179 * testsuite/gnu_property_test.sh (check_alignment): New.
180 Use check_alignment to check the NT_GNU_PROPERTY_TYPE_0 note
181 alignment. Verify that there are 2 PT_NOTE segments.
182
183 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
184
185 PR gold/21452
186 * x86_64.cc (Scan::local_reloc_may_be_function_pointer): Remove
187 check for shared library.
188 (Scan::global_reloc_may_be_function_pointer): Remove check for
189 shared library and symbol visibility.
190 * testsuite/icf_safe_so_test.cc (bar_static): New function.
191 (main): Take function address of bar_static and use it.
192 * testsuite/icf_safe_so_test.sh (arch_specific_safe_fold): Also
193 check fold on x86-64. Check bar_static isn't folded.
194
195 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
196
197 * icf.cc (Icf::find_identical_sections): Skip zero-sized sections.
198
199 2020-10-09 Alan Modra <amodra@gmail.com>
200
201 * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do
202 local entry offset optimisation for lplt_section.
203 (Target_powerpc::Branch_info::make_stub): Don't add local
204 entry offset to long branch dest passed to
205 add_long_branch_entry. Do pass st_other bits.
206 (Stub_table::Branch_stub_ent): Add "other_" field.
207 (Stub_table::add_long_branch_entry): Add "other" param, and
208 save.
209 (Stub_table::branch_stub_size): Adjust long branch offset.
210 (Stub_table::do_write): Likewise.
211 (Target_powerpc::Relocate::relocate): Likewise.
212
213 2020-10-09 Alan Modra <amodra@gmail.com>
214
215 * powerpc.cc (is_got_reloc): New function.
216 (Target_powerpc::Relocate::relocate): Use it here, exclude GOT
217 relocs when looking for stubs.
218
219 2020-10-08 H.J. Lu <hongjiu.lu@intel.com>
220
221 * testsuite/split_i386.sh: Updated for --split-stack-adjust-size
222 default change.
223 * testsuite/split_x86_64.sh: Likewise.
224
225 2020-10-08 Alan Modra <amodra@gmail.com>
226
227 * options.h (split_stack_adjust_size): Default to 0x100000.
228
229 2020-09-26 Alan Modra <amodra@gmail.com>
230
231 * powerpc.cc (Target_powerpc): Rename power10_stubs_ to
232 power10_relocs_.
233 (Target_powerpc::set_power10_relocs): New accessor.
234 (Target_powerpc::set_power10_stubs): Delete.
235 (Target_powerpc::power10_stubs): Adjust.
236 (Target_powerpc::has_localentry0): New accessor.
237 (ld_0_11): New constant.
238 (glink_eh_frame_fde_64v1, glink_eh_frame_fde_64v2): Adjust.
239 (glink_eh_frame_fde_64v2_localentry0): New.
240 (Output_data_glink::pltresolve_size): Update.
241 (Output_data_glink::add_eh_frame): Use localentry0 version eh_frame.
242 (Output_data_glink::do_write): Move r2 save to start of ELFv2 stub
243 and only emit for has_localentry0. Don't use r2 in the stub.
244 (Target_powerpc::Scan::local, global): Adjust for
245 set_power10_relocs renaming.
246 (Target_powerpc::scan_relocs): Warn and reset plt_localentry0_.
247
248 2020-09-24 Alan Modra <amodra@gmail.com>
249
250 * powerpc.cc (Target_powerpc::Relocate::relocate): Don't skip
251 first insn of __tls_get_addr_opt stub.
252
253 2020-08-24 Alan Modra <amodra@gmail.com>
254
255 * powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors.
256 (Target_powerpc::Scan::local): Sanity check tprel high relocs.
257 (Target_powerpc::Scan::global): Likewise.
258 (Target_powerpc::Relocate::relocate): Control tprel optimisation
259 with tprel_opt_ and enable for 32-bit.
260
261 2020-08-12 Nick Clifton <nickc@redhat.com>
262
263 * po/sr.po: Updated Serbian translation.
264
265 2020-07-27 Alan Modra <amodra@gmail.com>
266
267 * options.h (DEFINE_enum): Add optional_arg__ param, adjust
268 all uses.
269 (General_options): Add --power10-stubs and --no-power10-stubs.
270 * options.cc (General_options::parse_no_power10_stubs): New.
271 (General_options::finalize): Handle --power10-stubs.
272 * powerpc.cc (set_power10_stubs): Don't set when --power10-stubs=no.
273 (power10_stubs_auto): New.
274 (struct Plt_stub_ent): Add toc_ and tocoff_. Don't use a bitfield
275 for indx_.
276 (struct Branch_stub_ent): Add toc_and tocoff_. Use bitfields for
277 iter_, notoc_ and save_res_.
278 (add_plt_call_entry): Set toc_. Adjust resizing conditions for
279 --power10-stubs=auto.
280 (add_long_branch_entry): Set toc_.
281 (add_eh_frame, define_stub_syms): No longer use const_iterators
282 for plt and long branch stub iteration.
283 (build_tls_opt_head, build_tls_opt_tail): Change parameters and
284 return value. Move tests for __tls_get_addr to callers.
285 (plt_call_size): Handle --power10-stubs=auto.
286 (branch_stub_size): Likewise.
287 (Stub_table::do_write): Likewise.
288 (relocate): Likewise.
289
290 2020-07-19 H.J. Lu <hongjiu.lu@intel.com>
291
292 * testsuite/bnd_ifunc_1.sh: Updated.
293 * testsuite/bnd_plt_1.sh: Likewise.
294 * testsuite/split_x32.sh: Likewise.
295 * testsuite/split_x86_64.sh: Likewise.
296 * testsuite/x86_64_indirect_call_to_direct.sh: Likewise.
297
298 2020-07-08 Nick Clifton <nickc@redhat.com>
299
300 * testsuite/script_test_7.sh: Adjust expected address of the .bss
301 section.
302 * testsuite/script_test_9.sh: Do not expect the .init section to
303 immediately follow the .text section in the mapping of sections to
304 segments.
305
306 2020-07-07 Nick Clifton <nickc@redhat.com>
307
308 * target-reloc.h: (Default_comdat_behaviour:get): Ignore discarded
309 relocs that refer to the .gnu.build.attributes section.
310
311 2020-07-06 Nick Clifton <nickc@redhat.com>
312
313 * po/fr.po: Updated French translation.
314 * po/uk.po: Updated Ukranian translation.
315
316 2020-07-04 Nick Clifton <nickc@redhat.com>
317
318 Binutils 2.35 branch created.
319
320 2020-07-03 Alan Modra <amodra@gmail.com>
321
322 PR 26028
323 * testsuite/Makefile.am (file_in_many_sections.stdout): Add -W
324 to readelf options.
325 * testsuite/Makefile.in: Regenerate.
326
327 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
328
329 * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
330 * configure: Regenerated.
331 * config.h.in: Likewise.
332
333 2020-06-24 Nick Clifton <nickc@redhat.com>
334
335 * target-reloc.h (issue_discarded_error): Initialise the
336 key_symndx variable.
337
338 2020-06-23 Roland McGrath <mcgrathr@google.com>
339
340 PR 22843
341 * options.h (class General_options): Add --dependency-file option.
342 * fileread.cc (File_read::files_read): New static variable.
343 (File_read::open): Add the file to the files_read list.
344 (File_read::record_file_read): New static member function.
345 (File_read::write_dependency_file): New static member function.
346 * fileread.h (class File_read): Declare them.
347 * layout.cc (Layout::read_layout_from_file): Call record_file_read.
348 (Close_task_runner::run): Call write_dependency_file if
349 --dependency-file was passed.
350
351 2020-06-18 Fangrui Song <i@maskray.me>
352
353 PR gold/26039
354 * layout.cc (Layout::finish_dynamic_section): Set DF_1_PIE.
355
356 2020-06-16 Alan Modra <amodra@gmail.com>
357
358 * testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
359 * testsuite/discard_locals_relocatable_test.c: Likewise.
360
361 2020-06-16 Alan Modra <amodra@gmail.com>
362
363 * testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE.
364 (plugin_test_wrap_symbols_1.o): Likewise.
365 (plugin_test_wrap_symbols_2.o): Likewise.
366 * testsuite/Makefile.in: Regenerate.
367
368 2020-06-15 Roland McGrath <mcgrathr@google.com>
369
370 Implement -z start-stop-visibility=... option.
371 * options.h (class General_options): Handle -z start-stop-visibility=.
372 (General_options::start_stop_visibility_enum): New public method.
373 (General_options::set_start_stop_visibility_enum): New private method.
374 (General_options::start_stop_visibility_enum_): New private member.
375 * options.cc (General_options::General_options): Add initializer.
376 (General_options::finalize): Set this->start_stop_visibility_enum_
377 from string value.
378 * layout.cc (Layout::define_section_symbols): Use option setting.
379
380 2020-06-06 Alan Modra <amodra@gmail.com>
381
382 * powerpc.cc: Update throughout for reloc renaming.
383
384 2020-05-22 Alan Modra <amodra@gmail.com>
385
386 PR 25882
387 * powerpc.cc (merge_object_attributes): Replace name param with
388 obj param. Update callers. Don't init FP attributes from shared
389 libraries, and do not emit an error if they don't match.
390
391 2020-05-15 Nikita Ermakov <coffe92@gmail.com>
392
393 * powerpc.cc (do_gc_mark_symbol): Don't segfault on plugin symbols.
394
395 2020-05-14 Nick Clifton <nickc@redhat.com>
396
397 * po/sr.po: New Serbian translation.
398
399 2020-05-11 Alan Modra <amodra@gmail.com>
400
401 * powerpc.cc: Rename powerxx to power10 throughout.
402
403 2020-05-02 H.J. Lu <hongjiu.lu@intel.com>
404
405 PR gold/25904
406 * testsuite/Makefile.am (COMMON_TEST_C_CFLAGS): New.
407 (common_test_1.o): New rule.
408 (common_test_2.o): Likewise.
409 (common_test_3.o): Likewise.
410 (plugin_common_test_1.o): Likewise.
411 (plugin_common_test_2.o): Likewise.
412 (common_test_1_v1.o): Likewise.
413 (common_test_1_v2.o): Likewise.
414 (common_test_2_pic.o): Compile with $(COMMON_TEST_C_CFLAGS).
415 (common_test_3_pic.o): Likewise.
416 * testsuite/Makefile.in: Regenerated.
417
418 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
419
420 PR gold/25426
421 * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie):
422 For x32, relax "rex leal foo@tlsdesc(%rip), %reg" to
423 "rex movl foo@gottpoff(%rip), %eax" and relax ""call *(%eax)"
424 to "nopl (%rax)".
425 (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): For x32,
426 relax "rex leal foo@tlsdesc(%rip), %reg" to
427 "rex movl foo@tpoff, %eax" and relax "call *foo@tlscall(%eax)"
428 to "nopl (%rax)".
429 * testsuite/Makefile.am (tls_test_gnu2.o): Depend on
430 gcctestdir/as.
431 (tls_test_file2_gnu2.o): Likewise.
432 (tls_test_c_gnu2.o): Likewise.
433 * testsuite/Makefile.in: Regenerated.
434
435 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
436
437 PR gold/25473
438 * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie):
439 Properly check r8 - r15 in "lea foo@TLSDESC(%rip), %reg".
440 (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): Properly
441 relax r8 - r15 in "lea foo@TLSDESC(%rip), %reg".
442 * testsuite/Makefile.am (check_SCRIPTS): Add x86_64_gd_to_le.sh.
443 (check_DATA): Add x86_64_gd_to_le.stdout.
444 (MOSTLYCLEANFILES): Add x86_64_gd_to_le.
445 (x86_64_gd_to_le.o): New target.
446 (x86_64_gd_to_le): Likewise.
447 (x86_64_gd_to_le.stdout): Likewise.
448 * testsuite/Makefile.in: Regenerated.
449 * testsuite/x86_64_gd_to_le.s: New file.
450 * testsuite/x86_64_gd_to_le.sh: Likewise.
451
452 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
453
454 * testsuite/odr_violation2.cc (Ordering::operator()): Make
455 expression even more complex.
456
457 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
458
459 * testsuite/ver_test_pr16504.sh: Updated.
460
461 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
462
463 PR gold/25872
464 * x86_64.cc (Output_data_plt_x86_64_bnd::do_write): Increment
465 plt_offset after setting the reserved TLSDESC PLT entry.
466 (Output_data_plt_x86_64_ibt<size>::do_write): Likewise.
467
468 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
469
470 PR gold/25872
471 * x86_64.cc (Output_data_plt_x86_64_bnd::do_address_for_local):
472 Handle local IFUNC symbol.
473 (Output_data_plt_x86_64_ibt::do_address_for_local): Likewise.
474
475 2020-03-19 Fangrui Song <maskray@google.com>
476
477 * options.h (General_options): Add --no-rosegment option.
478
479 2020-02-24 Nick Clifton <nickc@redhat.com>
480
481 * po/fr.po: Update French translation.
482
483 2020-01-20 Nick Clifton <nickc@redhat.com>
484
485 * po/uk.po: Updated Ukranian translation.
486
487 2020-01-18 Nick Clifton <nickc@redhat.com>
488
489 * configure: Regenerate.
490 * po/gold.pot: Regenerate.
491
492 2020-01-18 Nick Clifton <nickc@redhat.com>
493
494 Binutils 2.34 branch created.
495
496 2020-01-01 Alan Modra <amodra@gmail.com>
497
498 Update year range in copyright notice of all files.
499
500 For older changes see ChangeLog-2019
501 \f
502 Copyright (C) 2020 Free Software Foundation, Inc.
503
504 Copying and distribution of this file, with or without modification,
505 are permitted in any medium without royalty provided the copyright
506 notice and this notice are preserved.
507
508 Local Variables:
509 mode: change-log
510 left-margin: 8
511 fill-column: 74
512 version-control: never
513 End:
This page took 0.041212 seconds and 5 git commands to generate.