Gold: Enable safe ICF for shared object on x86-64
[binutils-gdb.git] / gold / ChangeLog
1 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
2
3 PR gold/21452
4 * x86_64.cc (Scan::local_reloc_may_be_function_pointer): Remove
5 check for shared library.
6 (Scan::global_reloc_may_be_function_pointer): Remove check for
7 shared library and symbol visibility.
8 * testsuite/icf_safe_so_test.cc (bar_static): New function.
9 (main): Take function address of bar_static and use it.
10 * testsuite/icf_safe_so_test.sh (arch_specific_safe_fold): Also
11 check fold on x86-64. Check bar_static isn't folded.
12
13 2020-10-13 H.J. Lu <hongjiu.lu@intel.com>
14
15 * icf.cc (Icf::find_identical_sections): Skip zero-sized sections.
16
17 2020-10-09 Alan Modra <amodra@gmail.com>
18
19 * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do
20 local entry offset optimisation for lplt_section.
21 (Target_powerpc::Branch_info::make_stub): Don't add local
22 entry offset to long branch dest passed to
23 add_long_branch_entry. Do pass st_other bits.
24 (Stub_table::Branch_stub_ent): Add "other_" field.
25 (Stub_table::add_long_branch_entry): Add "other" param, and
26 save.
27 (Stub_table::branch_stub_size): Adjust long branch offset.
28 (Stub_table::do_write): Likewise.
29 (Target_powerpc::Relocate::relocate): Likewise.
30
31 2020-10-09 Alan Modra <amodra@gmail.com>
32
33 * powerpc.cc (is_got_reloc): New function.
34 (Target_powerpc::Relocate::relocate): Use it here, exclude GOT
35 relocs when looking for stubs.
36
37 2020-10-08 H.J. Lu <hongjiu.lu@intel.com>
38
39 * testsuite/split_i386.sh: Updated for --split-stack-adjust-size
40 default change.
41 * testsuite/split_x86_64.sh: Likewise.
42
43 2020-10-08 Alan Modra <amodra@gmail.com>
44
45 * options.h (split_stack_adjust_size): Default to 0x100000.
46
47 2020-09-26 Alan Modra <amodra@gmail.com>
48
49 * powerpc.cc (Target_powerpc): Rename power10_stubs_ to
50 power10_relocs_.
51 (Target_powerpc::set_power10_relocs): New accessor.
52 (Target_powerpc::set_power10_stubs): Delete.
53 (Target_powerpc::power10_stubs): Adjust.
54 (Target_powerpc::has_localentry0): New accessor.
55 (ld_0_11): New constant.
56 (glink_eh_frame_fde_64v1, glink_eh_frame_fde_64v2): Adjust.
57 (glink_eh_frame_fde_64v2_localentry0): New.
58 (Output_data_glink::pltresolve_size): Update.
59 (Output_data_glink::add_eh_frame): Use localentry0 version eh_frame.
60 (Output_data_glink::do_write): Move r2 save to start of ELFv2 stub
61 and only emit for has_localentry0. Don't use r2 in the stub.
62 (Target_powerpc::Scan::local, global): Adjust for
63 set_power10_relocs renaming.
64 (Target_powerpc::scan_relocs): Warn and reset plt_localentry0_.
65
66 2020-09-24 Alan Modra <amodra@gmail.com>
67
68 * powerpc.cc (Target_powerpc::Relocate::relocate): Don't skip
69 first insn of __tls_get_addr_opt stub.
70
71 2020-08-24 Alan Modra <amodra@gmail.com>
72
73 * powerpc.cc (Target_powerpc): Add tprel_opt_ and accessors.
74 (Target_powerpc::Scan::local): Sanity check tprel high relocs.
75 (Target_powerpc::Scan::global): Likewise.
76 (Target_powerpc::Relocate::relocate): Control tprel optimisation
77 with tprel_opt_ and enable for 32-bit.
78
79 2020-08-12 Nick Clifton <nickc@redhat.com>
80
81 * po/sr.po: Updated Serbian translation.
82
83 2020-07-27 Alan Modra <amodra@gmail.com>
84
85 * options.h (DEFINE_enum): Add optional_arg__ param, adjust
86 all uses.
87 (General_options): Add --power10-stubs and --no-power10-stubs.
88 * options.cc (General_options::parse_no_power10_stubs): New.
89 (General_options::finalize): Handle --power10-stubs.
90 * powerpc.cc (set_power10_stubs): Don't set when --power10-stubs=no.
91 (power10_stubs_auto): New.
92 (struct Plt_stub_ent): Add toc_ and tocoff_. Don't use a bitfield
93 for indx_.
94 (struct Branch_stub_ent): Add toc_and tocoff_. Use bitfields for
95 iter_, notoc_ and save_res_.
96 (add_plt_call_entry): Set toc_. Adjust resizing conditions for
97 --power10-stubs=auto.
98 (add_long_branch_entry): Set toc_.
99 (add_eh_frame, define_stub_syms): No longer use const_iterators
100 for plt and long branch stub iteration.
101 (build_tls_opt_head, build_tls_opt_tail): Change parameters and
102 return value. Move tests for __tls_get_addr to callers.
103 (plt_call_size): Handle --power10-stubs=auto.
104 (branch_stub_size): Likewise.
105 (Stub_table::do_write): Likewise.
106 (relocate): Likewise.
107
108 2020-07-19 H.J. Lu <hongjiu.lu@intel.com>
109
110 * testsuite/bnd_ifunc_1.sh: Updated.
111 * testsuite/bnd_plt_1.sh: Likewise.
112 * testsuite/split_x32.sh: Likewise.
113 * testsuite/split_x86_64.sh: Likewise.
114 * testsuite/x86_64_indirect_call_to_direct.sh: Likewise.
115
116 2020-07-08 Nick Clifton <nickc@redhat.com>
117
118 * testsuite/script_test_7.sh: Adjust expected address of the .bss
119 section.
120 * testsuite/script_test_9.sh: Do not expect the .init section to
121 immediately follow the .text section in the mapping of sections to
122 segments.
123
124 2020-07-07 Nick Clifton <nickc@redhat.com>
125
126 * target-reloc.h: (Default_comdat_behaviour:get): Ignore discarded
127 relocs that refer to the .gnu.build.attributes section.
128
129 2020-07-06 Nick Clifton <nickc@redhat.com>
130
131 * po/fr.po: Updated French translation.
132 * po/uk.po: Updated Ukranian translation.
133
134 2020-07-04 Nick Clifton <nickc@redhat.com>
135
136 Binutils 2.35 branch created.
137
138 2020-07-03 Alan Modra <amodra@gmail.com>
139
140 PR 26028
141 * testsuite/Makefile.am (file_in_many_sections.stdout): Add -W
142 to readelf options.
143 * testsuite/Makefile.in: Regenerate.
144
145 2020-06-26 Nick Alcock <nick.alcock@oracle.com>
146
147 * configure.ac: Check for bswap_16, bswap_32, and bswap_64 decls.
148 * configure: Regenerated.
149 * config.h.in: Likewise.
150
151 2020-06-24 Nick Clifton <nickc@redhat.com>
152
153 * target-reloc.h (issue_discarded_error): Initialise the
154 key_symndx variable.
155
156 2020-06-23 Roland McGrath <mcgrathr@google.com>
157
158 PR 22843
159 * options.h (class General_options): Add --dependency-file option.
160 * fileread.cc (File_read::files_read): New static variable.
161 (File_read::open): Add the file to the files_read list.
162 (File_read::record_file_read): New static member function.
163 (File_read::write_dependency_file): New static member function.
164 * fileread.h (class File_read): Declare them.
165 * layout.cc (Layout::read_layout_from_file): Call record_file_read.
166 (Close_task_runner::run): Call write_dependency_file if
167 --dependency-file was passed.
168
169 2020-06-18 Fangrui Song <i@maskray.me>
170
171 PR gold/26039
172 * layout.cc (Layout::finish_dynamic_section): Set DF_1_PIE.
173
174 2020-06-16 Alan Modra <amodra@gmail.com>
175
176 * testsuite/discard_locals_test.c: Replace uses of asm with __asm__.
177 * testsuite/discard_locals_relocatable_test.c: Likewise.
178
179 2020-06-16 Alan Modra <amodra@gmail.com>
180
181 * testsuite/Makefile.am (export_dynamic_plugin.o): Use CXXCOMPILE.
182 (plugin_test_wrap_symbols_1.o): Likewise.
183 (plugin_test_wrap_symbols_2.o): Likewise.
184 * testsuite/Makefile.in: Regenerate.
185
186 2020-06-15 Roland McGrath <mcgrathr@google.com>
187
188 Implement -z start-stop-visibility=... option.
189 * options.h (class General_options): Handle -z start-stop-visibility=.
190 (General_options::start_stop_visibility_enum): New public method.
191 (General_options::set_start_stop_visibility_enum): New private method.
192 (General_options::start_stop_visibility_enum_): New private member.
193 * options.cc (General_options::General_options): Add initializer.
194 (General_options::finalize): Set this->start_stop_visibility_enum_
195 from string value.
196 * layout.cc (Layout::define_section_symbols): Use option setting.
197
198 2020-06-06 Alan Modra <amodra@gmail.com>
199
200 * powerpc.cc: Update throughout for reloc renaming.
201
202 2020-05-22 Alan Modra <amodra@gmail.com>
203
204 PR 25882
205 * powerpc.cc (merge_object_attributes): Replace name param with
206 obj param. Update callers. Don't init FP attributes from shared
207 libraries, and do not emit an error if they don't match.
208
209 2020-05-15 Nikita Ermakov <coffe92@gmail.com>
210
211 * powerpc.cc (do_gc_mark_symbol): Don't segfault on plugin symbols.
212
213 2020-05-14 Nick Clifton <nickc@redhat.com>
214
215 * po/sr.po: New Serbian translation.
216
217 2020-05-11 Alan Modra <amodra@gmail.com>
218
219 * powerpc.cc: Rename powerxx to power10 throughout.
220
221 2020-05-02 H.J. Lu <hongjiu.lu@intel.com>
222
223 PR gold/25904
224 * testsuite/Makefile.am (COMMON_TEST_C_CFLAGS): New.
225 (common_test_1.o): New rule.
226 (common_test_2.o): Likewise.
227 (common_test_3.o): Likewise.
228 (plugin_common_test_1.o): Likewise.
229 (plugin_common_test_2.o): Likewise.
230 (common_test_1_v1.o): Likewise.
231 (common_test_1_v2.o): Likewise.
232 (common_test_2_pic.o): Compile with $(COMMON_TEST_C_CFLAGS).
233 (common_test_3_pic.o): Likewise.
234 * testsuite/Makefile.in: Regenerated.
235
236 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
237
238 PR gold/25426
239 * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie):
240 For x32, relax "rex leal foo@tlsdesc(%rip), %reg" to
241 "rex movl foo@gottpoff(%rip), %eax" and relax ""call *(%eax)"
242 to "nopl (%rax)".
243 (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): For x32,
244 relax "rex leal foo@tlsdesc(%rip), %reg" to
245 "rex movl foo@tpoff, %eax" and relax "call *foo@tlscall(%eax)"
246 to "nopl (%rax)".
247 * testsuite/Makefile.am (tls_test_gnu2.o): Depend on
248 gcctestdir/as.
249 (tls_test_file2_gnu2.o): Likewise.
250 (tls_test_c_gnu2.o): Likewise.
251 * testsuite/Makefile.in: Regenerated.
252
253 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
254
255 PR gold/25473
256 * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie):
257 Properly check r8 - r15 in "lea foo@TLSDESC(%rip), %reg".
258 (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): Properly
259 relax r8 - r15 in "lea foo@TLSDESC(%rip), %reg".
260 * testsuite/Makefile.am (check_SCRIPTS): Add x86_64_gd_to_le.sh.
261 (check_DATA): Add x86_64_gd_to_le.stdout.
262 (MOSTLYCLEANFILES): Add x86_64_gd_to_le.
263 (x86_64_gd_to_le.o): New target.
264 (x86_64_gd_to_le): Likewise.
265 (x86_64_gd_to_le.stdout): Likewise.
266 * testsuite/Makefile.in: Regenerated.
267 * testsuite/x86_64_gd_to_le.s: New file.
268 * testsuite/x86_64_gd_to_le.sh: Likewise.
269
270 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
271
272 * testsuite/odr_violation2.cc (Ordering::operator()): Make
273 expression even more complex.
274
275 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
276
277 * testsuite/ver_test_pr16504.sh: Updated.
278
279 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
280
281 PR gold/25872
282 * x86_64.cc (Output_data_plt_x86_64_bnd::do_write): Increment
283 plt_offset after setting the reserved TLSDESC PLT entry.
284 (Output_data_plt_x86_64_ibt<size>::do_write): Likewise.
285
286 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
287
288 PR gold/25872
289 * x86_64.cc (Output_data_plt_x86_64_bnd::do_address_for_local):
290 Handle local IFUNC symbol.
291 (Output_data_plt_x86_64_ibt::do_address_for_local): Likewise.
292
293 2020-03-19 Fangrui Song <maskray@google.com>
294
295 * options.h (General_options): Add --no-rosegment option.
296
297 2020-02-24 Nick Clifton <nickc@redhat.com>
298
299 * po/fr.po: Update French translation.
300
301 2020-01-20 Nick Clifton <nickc@redhat.com>
302
303 * po/uk.po: Updated Ukranian translation.
304
305 2020-01-18 Nick Clifton <nickc@redhat.com>
306
307 * configure: Regenerate.
308 * po/gold.pot: Regenerate.
309
310 2020-01-18 Nick Clifton <nickc@redhat.com>
311
312 Binutils 2.34 branch created.
313
314 2020-01-01 Alan Modra <amodra@gmail.com>
315
316 Update year range in copyright notice of all files.
317
318 For older changes see ChangeLog-2019
319 \f
320 Copyright (C) 2020 Free Software Foundation, Inc.
321
322 Copying and distribution of this file, with or without modification,
323 are permitted in any medium without royalty provided the copyright
324 notice and this notice are preserved.
325
326 Local Variables:
327 mode: change-log
328 left-margin: 8
329 fill-column: 74
330 version-control: never
331 End: