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