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