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