Fix commit date.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2
3 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
4 (sparc_elf_append_rela): Assert that there is enough room in section.
5 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
6 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
7 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
8 For a symbol subject to a GOT relocation, reserve a slot in the
9 relocation section if the symbol isn't dynamic and we are in PIC mode.
10 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
11 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
12 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
13 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
14 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
15 resolved_to_zero. Do not generate a dynamic GOT relocation for an
16 undefined weak symbol with non-default visibility. Remove superfluous
17 'else' and fix formatting.
18
19 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
20
21 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
22 is_solaris.
23 (i386_elf32_sol2_vec): Don't declare.
24 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
25 Don't set need_global_offset_table.
26 (elf_i386_solaris_arch_bed): New.
27 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
28 Solaris.
29 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
30 target_os != is_nacl instead of target_os == is_normal.
31 (x86_64_elf64_sol2_vec): Don't declare.
32 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
33 is_nacl instead of target_os == is_normal. Don't set
34 need_global_offset_table.
35 (elf_x86_64_solaris_arch_bed): New.
36 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
37 Solaris.
38 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
39 _GLOBAL_OFFSET_TABLE_ for Solaris.
40 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
41 need_global_offset_table.
42 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
43 (elf_x86_link_hash_table): Remove need_global_offset_table.
44 (elf_x86_init_table): Likewise.
45
46 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
47
48 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
49 Remove prototype.
50 (i386_elf32_sol2_vec): Declared.
51 (elf_i386_link_setup_gnu_properties): Set
52 need_global_offset_table with info->output_bfd->xvec.
53 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
54 Remove prototype.
55 (x86_64_elf64_sol2_vec): Declared.
56 (elf_x86_64_link_setup_gnu_properties): Set
57 need_global_offset_table with info->output_bfd->xvec.
58
59 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
60
61 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
62 New prototype.
63 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
64 for Solaris.
65 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
66 New prototype.
67 (elf_x86_64_link_setup_gnu_properties): Set
68 need_global_offset_table for Solaris.
69 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
70 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
71 (_bfd_x86_elf_link_setup_gnu_properties): Copy
72 need_global_offset_table.
73 * elfxx-x86.h (elf_x86_link_hash_table): Add
74 need_global_offset_table.
75 (elf_x86_init_table): Likewise.
76
77 2018-02-08 Jim Wilson <jimw@sifive.com>
78
79 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
80 change.
81
82 2018-02-08 Nick Clifton <nickc@redhat.com>
83
84 PR 22788
85 * elf.c (elf_parse_notes): Reject notes with excessuively large
86 alignments.
87
88 2018-02-07 Alan Modra <amodra@gmail.com>
89
90 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
91 * elf32-ppc.c: Remove speculation barrier support.
92 * elf32-ppc.h: Likewise.
93 * elf64-ppc.c: Likewise.
94 * elf64-ppc.h: Likewise.
95
96 2018-02-06 Jim Wilson <jimw@sifive.com>
97
98 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
99 callback to report an error.
100
101 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
102
103 PR ld/22263
104 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
105 into call to !bfd_link_executable and tidy up.
106 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
107 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
108 !bfd_link_executable.
109 <R_SPARC_TLS_IE_HI22>: Likewise.
110 <GOT relocations>: Remove useless code, tidy and merge related blocks.
111 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
112 !bfd_link_executable.
113 <R_SPARC_WPLT30>: Tidy up.
114 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
115 !bfd_link_executable.
116 (allocate_dynrelocs): Likewise.
117 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
118 <R_SPARC_TLS_GD_HI22>: Merge into...
119 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
120 sparc_elf_tls_transition and remove redundant code.
121 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
122 !bfd_link_executable.
123 <R_SPARC_TLS_LDO_HIX22>: Likewise.
124 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
125 <R_SPARC_TLS_LDM_CALL>: Likewise.
126 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
127 <R_SPARC_TLS_GD_ADD>: Likewise.
128 <R_SPARC_TLS_LDM_ADD>: Likewise.
129 <R_SPARC_TLS_LDO_ADD>: Likewise.
130 <R_SPARC_TLS_IE_LD>: Likewise.
131
132 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
133
134 PR 22789
135 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
136 functions failed to find the function name, try the generic elf
137 find function instead.
138
139 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
140
141 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
142 'memcpy' instead of 'strncpy' when writing the magic number.
143
144 2018-02-06 Nick Clifton <nickc@redhat.com>
145
146 PR 22794
147 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
148 section before attempting to read it in.
149 (bfd_get_alt_debug_link_info): Likewise.
150
151 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
152
153 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
154 line information in addition to name, if they can be found.
155
156 2018-02-05 Renlin Li <renlin.li@arm.com>
157
158 PR ld/22764
159 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
160 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
161 check for writeable section as well.
162
163 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
164
165 PR ld/22782
166 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
167 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
168 undefined weak symbol to 0.
169 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
170 if _GLOBAL_OFFSET_TABLE_ is referenced.
171 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
172 got_referenced instead of ref_regular_nonweak. Remove the
173 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
174 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
175
176 2018-02-05 Maciej W. Rozycki <macro@mips.com>
177
178 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
179 initialize `hi_reloc'.
180
181 2018-02-05 Maciej W. Rozycki <macro@mips.com>
182
183 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
184 SHT_MIPS_REGINFO sections don't assert the correct size and
185 report an error instead.
186
187 2018-02-05 Maciej W. Rozycki <macro@mips.com>
188
189 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
190 status from `->elf_backend_section_processing'.
191
192 2018-02-02 Jim Wilson <jimw@sifive.com>
193
194 PR ld/22756
195 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
196 If link_info->wrap_hash, check for a duplicate symbol and ignore.
197 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
198 Pass new argument to riscv_relax_delete_bytes.
199 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
200 ATTRIBUTE_UNUSED from link_info parameter.
201
202 2018-02-02 Alan Modra <amodra@gmail.com>
203
204 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
205 emitted for toc sequence optimization. Set and use "howto" later.
206
207 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
208
209 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
210 arithmetic on NULL pointer.
211 * elflink.c (_bfd_elf_archive_symbol_lookup,
212 elf_link_add_archive_symbols): Likewise.
213
214 2018-01-31 Michael Matz <matz@suse.de>
215
216 * elflink.c (bfd_elf_define_start_stop): Fix check of
217 def_dynamic.
218
219 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
220
221 PR ld/21964
222 * elflink.c (bfd_elf_define_start_stop): Check if __start and
223 __stop symbols are referenced by shared objects.
224
225 2018-01-30 Alan Modra <amodra@gmail.com>
226
227 PR 22758
228 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
229 segment when demand paged with lma on the same page. Test this
230 before load/non-load, executable/non-executable,
231 writable/non-writable tests and simplify. Delete bogus relro
232 condition in writable/non-writable test. Delete outdated
233 comment. Formatting.
234
235 2018-01-30 Alan Modra <amodra@gmail.com>
236
237 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
238 symbols dynamic.
239
240 2018-01-29 Alan Modra <amodra@gmail.com>
241
242 PR 22741
243 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
244 range before converting to a symbol table pointer.
245
246 2018-01-27 Nick Clifton <nickc@redhat.com>
247
248 * po/ru.po: Updated Russian translation.
249
250 2018-01-26 Alan Modra <amodra@gmail.com>
251
252 * elflink.c (bfd_elf_define_start_stop): Override symbols when
253 they are defined dynamically.
254
255 2018-01-26 Alan Modra <amodra@gmail.com>
256
257 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
258 .branch_lt changes size.
259
260 2018-01-25 Alan Modra <amodra@gmail.com>
261
262 PR 22746
263 * elfcode.h (elf_object_p): Avoid integer overflow.
264
265 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
266
267 PR ld/22727
268 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
269 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
270
271 Revert
272 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
273
274 PR ld/22263
275 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
276 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
277 bfd_link_executable for TLS check.
278 (_bfd_sparc_elf_check_relocs): Likewise.
279 (allocate_dynrelocs): Likewise.
280 (_bfd_sparc_elf_relocate_section): Likewise.
281
282 2018-01-24 Renlin Li <renlin.li@arm.com>
283
284 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
285 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
286 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
287 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
288 BFD_RELOC_AARCH64_MOVW_PREL_G3.
289 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
290 (_bfd_aarch64_elf_resolve_relocation): Likewise.
291
292 2018-01-24 Renlin Li <renlin.li@arm.com>
293
294 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
295 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
296 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
297 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
298 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
299 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
300 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
301 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
302 BFD_RELOC_AARCH64_MOVW_PREL_G3.
303 * bfd-in2.h: Regenerate.
304 * libbfd.h: Regenerate.
305
306 2018-01-23 Maciej W. Rozycki <macro@mips.com>
307
308 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
309 `mips_elf32_section_processing' comment reference.
310
311 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
312
313 PR ld/22721
314 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
315 versioned __tls_get_addr symbol.
316
317 2018-01-19 Nick Clifton <nickc@redhat.com>
318
319 * po/fr.po: Updated French translation.
320
321 2018-01-18 Alan Modra <amodra@gmail.com>
322
323 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
324 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
325 (ppc64_elf_build_stubs): Likewise.
326
327 2018-01-17 Nick Clifton <nickc@redhat.com>
328
329 * po/ru.po: Updated Russian translation.
330 * po/uk/po: Updated Ukranian translation.
331
332 2018-01-17 Alan Modra <amodra@gmail.com>
333
334 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
335
336 2018-01-17 Alan Modra <amodra@gmail.com>
337
338 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
339 (CRSETEQ, BEQCTRM): Define.
340 (is_nonpic_glink_stub): Don't check bctr.
341 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
342 (ppc_elf_relax_section): Size speculation barrier.
343 (output_bctr): New function.
344 (write_glink_stub): Use output_bctr.
345 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
346 (ppc_elf_finish_dynamic_symbol): Likewise.
347 (ppc_elf_finish_dynamic_sections): Use output_bctr.
348 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
349 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
350 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
351 (size_global_entry_stubs): Handle speculation barrier sizing.
352 (plt_stub_size): Likewise.
353 (output_bctr): New function.
354 (build_plt_stub, build_tls_get_addr_stub): Output speculation
355 barrier.
356 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
357 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
358 (build_global_entry_stubs): Output speculation barrier.
359 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
360 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
361
362 2018-01-17 Alan Modra <amodra@gmail.com>
363
364 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
365 __tls_get_addr_opt, and alignment sizing.
366 (TLS_GET_ADDR_GLINK_SIZE): Delete.
367 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
368 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
369 or 8 insns.
370 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
371 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
372 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
373 by PLT reloc count.
374 (write_glink_stub): Handle __tls_get_addr_opt stub.
375 Pad out to size given by GLINK_ENTRY_SIZE.
376 (ppc_elf_relocate_section): Adjust write_glink_stub call.
377 (ppc_elf_finish_dynamic_symbol): Likewise.
378 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
379 insn array since so many need rewriting.
380 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
381 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
382 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
383 nops. Adjust all uses.
384 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
385 in glink_vma calculation.
386 (struct ppc_link_hash_table): Add global_entry section pointer.
387 (create_linkage_sections): Create separate section for global
388 entry stubs.
389 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
390 (size_global_entry_stubs): Handle sizing for aligned stubs.
391 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
392 and don't stash end of glink branch table in rawsize.
393 (ppc_build_one_stub): Rewrite stub size calculations.
394 (build_global_entry_stubs): Use new section.
395 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
396 Build lazy link stubs out to end of section. Build global entry
397 stubs in new section.
398
399 2018-01-15 Nick Clifton <nickc@redhat.com>
400
401 * po/uk.po: Updated Ukranian translation.
402
403 2018-01-13 Nick Clifton <nickc@redhat.com>
404
405 * po/bfd.pot: Regenerated.
406
407 2018-01-13 Nick Clifton <nickc@redhat.com>
408
409 * version.m4: Bump version to 2.30.51
410 * configure: Regenerate.
411
412 2018-01-13 Nick Clifton <nickc@redhat.com>
413
414 2.30 branch created.
415
416 2018-01-12 Jens Widell <jl@opera.com>
417
418 * elf.c (setup_group): Optimize search for group by remembering
419 last found group and restarting search at that index.
420 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
421
422 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
423
424 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
425 bfd_link_common_skip_none in switch.
426
427 2018-01-12 Alan Modra <amodra@gmail.com>
428
429 PR ld/22649
430 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
431 references on forced local symbols.
432
433 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
434
435 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
436 .reginfo section has wrong size.
437
438 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
439
440 PR ld/22393
441 * elf.c (_bfd_elf_map_sections_to_segments): When generating
442 separate code and read-only data LOAD segments, create a new
443 LOAD segment if the previous section contains text and the
444 current section doesn't or vice versa. Don't put a writable
445 section in a read-only segment if there is a RELRO segment.
446
447 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
448
449 PR ld/22649
450 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
451 references on forced local symbols.
452
453 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
454
455 PR ld/22677
456 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
457 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
458
459 2017-09-27 Kuan-Lin Chen <kuanlinchentw@gmail.com>
460
461 PR 22662
462 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
463
464 2018-01-03 John Baldwin <jhb@FreeBSD.org>
465
466 * elf.c (elfcore_grok_freebsd_note): Handle
467 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
468 NT_FREEBSD_PROCSTAT_VMMAP.
469
470 2018-01-03 Alan Modra <amodra@gmail.com>
471
472 Update year range in copyright notice of all files.
473
474 For older changes see ChangeLog-2017
475 \f
476 Copyright (C) 2018 Free Software Foundation, Inc.
477
478 Copying and distribution of this file, with or without modification,
479 are permitted in any medium without royalty provided the copyright
480 notice and this notice are preserved.
481
482 Local Variables:
483 mode: change-log
484 left-margin: 8
485 fill-column: 74
486 version-control: never
487 End:
This page took 0.070115 seconds and 5 git commands to generate.