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