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