9b5f15dc24a8c46c4d168763ac4db14100818e97
[external/binutils.git] / bfd / ChangeLog
1 2017-04-23  Alan Modra  <amodra@gmail.com>
2
3         PR 21412
4         * elf-bfd.h (struct elf_backend_data <get_reloc_section>): Change
5         parameters and comment.
6         (_bfd_elf_get_reloc_section): Delete.
7         (_bfd_elf_plt_get_reloc_section): Declare.
8         * elf.c (_bfd_elf_plt_get_reloc_section, elf_get_reloc_section):
9         New functions.  Don't blindly skip over assumed .rel/.rela prefix.
10         Extracted from..
11         (_bfd_elf_get_reloc_section): ..here.  Delete.
12         (assign_section_numbers): Call elf_get_reloc_section.
13         * elf64-ppc.c (elf_backend_get_reloc_section): Define.
14         * elfxx-target.h (elf_backend_get_reloc_section): Update.
15
16 2017-04-23  Alan Modra  <amodra@gmail.com>
17
18         PR 21409
19         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Don't segfault when
20         no symbols.
21
22 2017-04-21  H.J. Lu  <hongjiu.lu@intel.com>
23
24         PR ld/21402
25         * elf32-i386.c (elf_i386_link_hash_entry): Add
26         no_finish_dynamic_symbol.
27         (elf_i386_link_hash_newfunc): Set no_finish_dynamic_symbol to 0.
28         (elf_i386_allocate_dynrelocs): If a symbol isn't undefined weak
29         symbol, don't make it dynamic in PIE.
30         (elf_i386_relocate_section): If a symbol isn't dynamic in PIE,
31         set no_finish_dynamic_symbol and generate R_386_RELATIVE
32         relocation for R_386_GOT32
33         (elf_i386_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol
34         isn't 0.
35
36 2017-04-21  H.J. Lu  <hongjiu.lu@intel.com>
37
38         PR ld/19617
39         PR ld/21086
40         * elflink.c (elf_link_add_object_symbols): Require
41         --no-dynamic-linker with -E/--dynamic-list when creating
42         dynamic sections.
43
44 2017-04-20  Maciej W. Rozycki  <macro@imgtec.com>
45
46         * elflink.c (_bfd_elf_symbol_refs_local_p): Always return TRUE
47         if forced local.
48
49 2017-04-20  Maciej W. Rozycki  <macro@imgtec.com>
50
51         * elfxx-mips.c (_bfd_mips_elf_final_link): Reorder comment about
52         dynamic symbol sorting.
53
54 2017-04-20  H.J. Lu  <hongjiu.lu@intel.com>
55
56         PR ld/21382
57         * elflink.c (elf_link_add_object_symbols): Preserve
58         dynamic_ref_after_ir_def when restoring the symbol table for
59         unneeded dynamic object.
60
61 2017-04-19  H.J. Lu  <hongjiu.lu@intel.com>
62
63         PR ld/21401
64         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Don't abort
65         on on undefined IFUNC symbol in the second PLT.
66
67 2017-04-19  Wedson Almeida Filho  <wedsonaf@gmail.com>
68
69         * peXXigen.c (pe_print_reloc): Correct chunk_end.
70
71 2017-04-19  Alan Modra  <amodra@gmail.com>
72
73         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
74         or make dynamic for info->dynamic_undefined_weak 0 and 1.
75         * elf32-ppc.c:Formatting.
76         (ensure_undefweak_dynamic): Don't make dynamic when
77         info->dynamic_undefined_weak is zero.
78         (allocate_dynrelocs): Discard undefweak dyn_relocs for
79         info->dynamic_undefined_weak.  Discard undef dyn_relocs when
80         not default visibility.  Discard undef and undefweak
81         dyn_relocs earlier.
82         (ppc_elf_relocate_section): Adjust to suit.
83         * elf64-ppc.c: Formatting.
84         (ensure_undefweak_dynamic): Don't make dynamic when
85         info->dynamic_undefined_weak is zero.
86         (allocate_dynrelocs): Discard undefweak dyn_relocs for
87         info->dynamic_undefined_weak.  Discard them earlier.
88
89 2017-04-17  H.J. Lu  <hongjiu.lu@intel.com>
90
91         PR ld/21389
92         * elflink.c (bfd_elf_size_dynamic_sections): Get soname index
93         before generating the version definition section.
94
95 2017-04-17  Alan Modra  <amodra@gmail.com>
96
97         * elflink.c (_bfd_elf_merge_symbol): Undo dynamic linking
98         state when a regular object file defines a symbol with
99         incompatible type to that defined by an earlier shared lib.
100
101 2017-04-13  Alan Modra  <amodra@gmail.com>
102
103         * coffcode.h: Wrap some overly long _bfd_error_handler args.
104         * elf.c: Likewise.
105         * elf32-arm.c: Likewise.
106         * elf32-i386.c: Likewise.
107         * elf32-mep.c: Likewise.
108         * elf64-ia64-vms.c: Likewise.
109         * elf64-x86-64.c: Likewise.
110         * elflink.c: Likewise.
111         * elfnn-ia64.c: Likewise.
112         * elfxx-mips.c: Likewise.
113
114 2017-04-13  Alan Modra  <amodra@gmail.com>
115
116         * aoutx.h: Use %B and %A in error messages throughout file.
117         * aout-cris.c: Likewise.
118         * archive.c: Likewise.
119         * binary.c: Likewise.
120         * coff-rs6000.c: Likewise.
121         * coff-tic4x.c: Likewise.
122         * coffcode.h: Likewise.
123         * coffgen.c: Likewise.
124         * cofflink.c: Likewise.
125         * coffswap.h: Likewise.
126         * cpu-arm.c: Likewise.
127         * elf-eh-frame.c: Likewise.
128         * elf-m10300.c: Likewise.
129         * elf.c: Likewise.
130         * elf32-arc.c: Likewise.
131         * elf32-arm.c: Likewise.
132         * elf32-bfin.c: Likewise.
133         * elf32-frv.c: Likewise.
134         * elf32-iq2000.c: Likewise.
135         * elf32-m32c.c: Likewise.
136         * elf32-microblaze.c: Likewise.
137         * elf32-nds32.c: Likewise.
138         * elf32-rl78.c: Likewise.
139         * elf32-rx.c: Likewise.
140         * elf32-score.c: Likewise.
141         * elf32-score7.c: Likewise.
142         * elf32-sh64.c: Likewise.
143         * elf32-v850.c: Likewise.
144         * elf32-vax.c: Likewise.
145         * elf32-visium.c: Likewise.
146         * elf64-ia64-vms.c: Likewise.
147         * elf64-mmix.c: Likewise.
148         * elf64-sh64.c: Likewise.
149         * elfcode.h: Likewise.
150         * elfnn-aarch64.c: Likewise.
151         * elfnn-ia64.c: Likewise.
152         * elfxx-mips.c: Likewise.
153         * hpux-core.c: Likewise.
154         * ieee.c: Likewise.
155         * ihex.c: Likewise.
156         * linker.c: Likewise.
157         * merge.c: Likewise.
158         * mmo.c: Likewise.
159         * oasys.c: Likewise.
160         * pdp11.c: Likewise.
161         * peXXigen.c: Likewise.
162         * rs6000-core.c: Likewise.
163         * vms-alpha.c: Likewise.
164         * xcofflink.c: Likewise.
165
166 2017-04-13  Alan Modra  <amodra@gmail.com>
167
168         * bfd.c (PRINT_TYPE): Define.
169         (_doprnt): New function.
170         (error_handler_internal): Use _doprnt.
171         * coff-arm.c: Put %A and %B arguments to _bfd_error_handler
172         calls in their natural order, throughout file.
173         * coff-mcore.c: Likewise.
174         * coff-ppc.c: Likewise.
175         * coff-tic80.c: Likewise.
176         * cofflink.c: Likewise.
177         * elf-s390-common.c: Likewise.
178         * elf.c: Likewise.
179         * elf32-arm.c: Likewise.
180         * elf32-i386.c: Likewise.
181         * elf32-m32r.c: Likewise.
182         * elf32-msp430.c: Likewise.
183         * elf32-spu.c: Likewise.
184         * elf64-ia64-vms.c: Likewise.
185         * elf64-sparc.c: Likewise.
186         * elf64-x86-64.c: Likewise.
187         * elflink.c: Likewise.
188         * elfnn-aarch64.c: Likewise.
189         * elfnn-ia64.c: Likewise.
190         * elfxx-mips.c: Likewise.
191
192 2017-04-13  Alan Modra  <amodra@gmail.com>
193
194         * elf32-arm.c (arm_type_of_stub): Supply missing args to "long
195         branch veneers" error.  Fix double space and format message.
196         * elf32-avr.c (avr_add_stub): Do not pass NULL as %B arg.
197         * elf64-ppc.c (tocsave_find): Supply missing %B arg.
198
199 2017-04-13  Alan Modra  <amodra@gmail.com>
200
201         * bfd-in2.h: Regenerate.
202
203 2017-04-11  H.J. Lu  <hongjiu.lu@intel.com>
204
205         * elf-properties.c (_bfd_elf_parse_gnu_properties): Remove the
206         extra `\n' in warning/error messages.
207         * elf32-i386.c (elf_i386_parse_gnu_properties): Likewise.
208         * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
209
210 2017-04-11  H.J. Lu  <hongjiu.lu@intel.com>
211
212         * elf-properties.c (_bfd_elf_parse_gnu_properties): Ignore
213         processor-specific properties with generic ELF target vector.
214
215 2017-04-10  Qing Zhao  <qing.zhao@oracle.com>
216
217         * elf32-sparc.c (elf_backend_fixup_symbol): New.
218         * elf64-sparc.c (elf_backend_fixup_symbol): New.
219         * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): New.
220         (_bfd_sparc_elf_link_hash_entry): Add has_got_reloc and
221         has_non_got_reloc.
222         (link_hash_newfunc): Initialize has_got_reloc and
223         has_non_got_reloc.
224         (_bfd_sparc_elf_size_dynamic_sections): Set interp to .interp
225         section.
226         (_bfd_sparc_elf_copy_indirect_symbol): Copy has_got_reloc and
227         has_non_got_reloc.
228         (_bfd_sparc_elf_check_relocs): Set has_got_reloc and
229         has_non_got_reloc.
230         (_bfd_sparc_elf_fixup_symbol): New function.
231         (allocate_dynrelocs): Don't allocate space for dynamic
232         relocations and discard relocations against resolved undefined
233         weak symbols in executable.  Don't make resolved undefined weak
234         symbols in executable dynamic.  Keep dynamic non-GOT/non-PLT
235         relocation against undefined weak symbols in PIE.
236         (_bfd_sparc_elf_relocate_section): Don't generate dynamic
237         relocations against resolved undefined weak symbols in PIE
238         (_bfd_sparc_elf_finish_dynamic_symbol): Keep PLT/GOT entries
239         without ynamic PLT/GOT relocations for resolved undefined weak
240         symbols.
241         Don't generate dynamic relocation against resolved undefined
242         weak symbol in executable.
243         (pie_finish_undefweak_symbol): New function.
244         (_bfd_sparc_elf_finish_dynamic_sections): Call
245         pie_finish_undefweak_symbol on all symbols in PIE.
246         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add interp.
247         (_bfd_sparc_elf_fixup_symbol): New function.
248
249 2017-04-10  Nick Clifton  <nickc@redhat.com>
250
251         * config.bfd: Remove ns32k from obsolete list.
252
253 2017-04-10  Alan Modra  <amodra@gmail.com>
254
255         PR 21287
256         * elf.c (special_sections_f): Match .fini_array and .fini_array.*.
257         (special_sections_i): Likewise for .init_array.
258         (special_sections_p): Likewise for .preinit_array.
259
260 2017-04-07  H.J. Lu  <hongjiu.lu@intel.com>
261
262         PR ld/19579
263         PR ld/21306
264         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Check
265         ELF_COMMON_DEF_P for common symbols.
266         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
267         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
268         * elflink.c (_bfd_elf_merge_symbol): Revert commits
269         202ac193bbbecc96a4978d1ac3d17148253f9b01 and
270         07492f668d2173da7a2bda3707ff0985e0f460b6.
271
272 2017-04-07  Pedro Alves  <palves@redhat.com>
273
274         * opncls.c (bfd_get_debug_link_info): Rename to...
275         (bfd_get_debug_link_info_1): ... this.  Change type of second
276         parameter to void pointer.  Adjust.
277         (bfd_get_debug_link_info): Reimplement on top of
278         bfd_get_debug_link_info_1.
279         (separate_debug_file_exists, separate_alt_debug_file_exists):
280         Change type of second parameter to void pointer.  Adjust.
281         (get_func_type, check_func_type): Change type of second parameter
282         to void pointer.
283         (find_separate_debug_file): Add 'func_data' parameter.  Pass it to
284         the callback functions instead of passing the address of a local.
285         (bfd_follow_gnu_debuglink): Pass address of unsigned long local to
286         find_separate_debug_file.
287         (get_alt_debug_link_info_shim): Change type of second parameter to
288         void pointer.  Adjust.
289         (bfd_follow_gnu_debugaltlink): Adjust to pass NULL to
290         find_separate_debug_file.
291         (get_build_id_name, bfd_boolean check_build_id_file): Change type
292         of second parameter to void pointer.  Adjust.
293         (bfd_follow_build_id_debuglink): Pass address of bfd_build_id
294         pointer local to find_separate_debug_file.
295
296 2017-04-07  Tristan Gingold  <gingold@gingold-Precision-7510>
297
298         * coffgen.c (_bfd_coff_gc_mark_hook): Handle PE weak
299         external symbols with a definition.
300         (_bfd_coff_gc_mark_extra_sections): Fix typo.
301
302 2017-04-07  Alan Modra  <amodra@gmail.com>
303
304         * po/SRC-POTFILES.in: Regenerate.
305
306 2017-04-05  Alan Modra  <amodra@gmail.com>
307
308         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Support ELFv2 PLT
309         reference counting.
310
311 2017-04-02  Jon Turney  <jon.turney@dronecode.org.uk>
312
313         (_bfd_XXi_swap_aouthdr_out): For clarity, use defines rather than
314         numbers for DataDirectory entry indicies passed to
315         add_data_entry().
316
317 2017-04-04  H.J. Lu  <hongjiu.lu@intel.com>
318
319         * elf.c (get_program_header_size): Add a GNU_MBIND segment for
320         each GNU_MBIND section and align GNU_MBIND section to page size.
321         (_bfd_elf_map_sections_to_segments): Create a GNU_MBIND
322         segment for each GNU_MBIND section.
323         (_bfd_elf_init_private_section_data): Copy sh_info from input
324         for GNU_MBIND section.
325
326 2017-04-03  Palmer Dabbelt  <palmer@dabbelt.com>
327
328         * elfnn-riscv.c (GP_NAME): Delete.
329         (riscv_global_pointer_value): Change GP_NAME to RISCV_GP_SYMBOL.
330         (_bfd_riscv_relax_lui): Likewise.
331
332 2017-04-04  Nick Clifton  <nickc@redhat.com>
333
334         PR binutils/21342
335         * elflink.c (_bfd_elf_define_linkage_sym): Prevent null pointer
336         dereference.
337         (bfd_elf_final_link): Only initialize the extended symbol index
338         section if there are extended symbol tables to list.
339
340 2017-04-03  H.J. Lu  <hongjiu.lu@intel.com>
341
342         * Makefile.am (BFD32_BACKENDS): Add elf-properties.lo.
343         (BFD32_BACKENDS_CFILES): Add elf-properties.c.
344         * configure.ac (elf): Add elf-properties.lo.
345         * Makefile.in: Regenerated.
346         * configure: Likewise.
347         * elf-bfd.h (elf_property_kind): New.
348         (elf_property): Likewise.
349         (elf_property_list): Likewise.
350         (elf_properties): Likewise.
351         (_bfd_elf_parse_gnu_properties): Likewise.
352         (_bfd_elf_get_property): Likewise.
353         (_bfd_elf_link_setup_gnu_properties): Likewise.
354         (elf_backend_data): Add parse_gnu_properties, merge_gnu_properties
355         and setup_gnu_properties.
356         (elf_obj_tdata): Add properties.
357         * elf-properties.c: New file.
358         * elf32-i386.c (elf_i386_parse_gnu_properties): New.
359         (elf_i386_merge_gnu_properties): Likewise.
360         (elf_backend_parse_gnu_properties): Likewise.
361         (elf_backend_merge_gnu_properties): Likewise.
362         * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
363         (elf_x86_64_merge_gnu_properties): Likewise.
364         (elf_backend_parse_gnu_properties): Likewise.
365         (elf_backend_merge_gnu_properties): Likewise.
366         * elfxx-target.h (elf_backend_merge_gnu_properties): Likewise.
367         (elf_backend_parse_gnu_properties): Likewise.
368         (elf_backend_setup_gnu_properties): Likewise.
369         (elfNN_bed): Add elf_backend_parse_gnu_properties,
370         elf_backend_merge_gnu_properties and
371         elf_backend_setup_gnu_properties.
372
373 2017-03-30  Pip Cet  <pipcet@gmail.com>
374
375         * elf32-wasm32.c: Add relocation code, two relocs.
376         * reloc.c: Add wasm32 relocations.
377         * libbfd.h: Regenerate.
378         * bfd-in2.h: Regenerate.
379         * bfd/po/bfd.pot: Regenerate.
380
381 2017-03-29  Nick Clifton  <nickc@redhat.com>
382
383         PR binutils/18025
384         * coff-bfd.h (struct coff_section_data): Add new fields:
385         saved_bias and bias.
386         * coffgen.c (coff_find_nearest_line_with_names): Cache the bias
387         computed for PE binaries.
388         * dwarf2.c (scan_unit_for_symbols): Only warn once about each
389         missing abbrev.
390
391 2017-03-28  Hans-Peter Nilsson  <hp@axis.com>
392
393         PR ld/16044
394         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Adjust BFD_ASSERT
395         to handle a local symbol with a hash-symbol-entry; without PLT.
396         Add BFD_ASSERT for an incidental case with GOT entry present.
397         (cris_elf_check_relocs): Increment PLT refcount only if the symbol
398         isn't forced-or-set local.
399
400 2017-03-27  Pip Cet  <pipcet@gmail.com>
401
402         * wasm-module.c: New file to support WebAssembly modules.
403         * wasm-module.h: New file to support WebAssembly modules.
404         * doc/webassembly.texi: Start documenting wasm-module.c.
405         * config.bfd: Add wasm_vec.
406         * targets.c: Likewise.
407         * configure.ac: Likewise.
408         * Makefile.am: Add entries for wasm-module.c.
409         * Makefile.in: Regenerate.
410         * configure: Regenerate.
411         * po/SRC-POTFILES.in: Regenerate.
412
413 2017-03-27  Pip Cet  <pipcet@gmail.com>
414
415         * cpu-wasm32.c: New file to support wasm32 architecture.
416         * elf32-wasm32.c: New file to support wasm32 architecture.
417         * Makefile.am: Add wasm32 architecture.
418         * archures.c: Likewise.
419         * config.bfd: Likewise.
420         * configure.ac: Likewise.
421         * targets.c: Likewise.
422         * Makefile.in: Regenerate.
423         * bfd-in2.h: Regenerate.
424         * configure: Regenerate.
425         * po/SRC-POTFILES.in: Regenerate.
426
427 2017-03-20  Alan Modra  <amodra@gmail.com>
428
429         PR 21266
430         * elf64-ppc.c (compare_symbols): Stabilize sort.
431
432 2017-03-18  Alan Modra  <amodra@gmail.com>
433
434         * elf64-ppc.c (struct ppc_link_hash_table): Add
435         local_ifunc_resolver and maybe_local_ifunc_resolver.
436         (ppc_build_one_stub): Set flags on emitting dynamic
437         relocation to ifunc.
438         (ppc64_elf_relocate_section): Likewise.
439         (ppc64_elf_finish_dynamic_symbol): Likewise.
440         (ppc64_elf_finish_dynamic_sections): Error on DT_TEXTREL with
441         local dynamic relocs to ifuncs.
442         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add
443         local_ifunc_resolver and maybe_local_ifunc_resolver.
444         (ppc_elf_relocate_section): Set flag on emitting dynamic
445         relocation to ifuncs.
446         (ppc_elf_finish_dynamic_symbol): Likewise.
447         (ppc_elf_finish_dynamic_sections): Error on DT_TEXTREL with local
448         dynamic relocs to ifuncs.
449
450 2017-03-13  Nick Clifton  <nickc@redhat.com>
451
452         PR binutils/21202
453         * reloc.c (BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC): Rename to
454         BFD_RELOC_AARCH64_TLSDESC_LD64_LO12.
455         (BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC): Rename to
456         BFD_RELOC_AARCH64_TLSDESC_ADD_LO12.
457         * bfd-in2.h: Regenerate.
458         * libbfd.h: Regenerate.
459         * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Update reloc
460         names.
461         (IS_AARCH64_TLSDESC_RELOC): Likewise.
462         (elfNN_aarch64_howto_table): Likewise.
463         (aarch64_tls_transition_without_check): Likewise.
464         (aarch64_reloc_got_type): Likewise.
465         (elfNN_aarch64_final_link_relocate): Likewise.
466         (elfNN_aarch64_tls_relax): Likewise.
467         (elfNN_aarch64_relocate_section): Likewise.
468         (elfNN_aarch64_gc_sweep_hook): Likewise.
469         (elfNN_aarch64_check_relocs): Likewise.
470         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
471         (_bfd_aarch64_elf_resolve_relocation): Likewise.
472
473 2017-03-11  Alan Modra  <amodra@gmail.com>
474
475         * elf32-ppc.c: Remove ATTRIBUTE_UNUSED throughout when function
476         parameter is in fact used.  Whitespace fixes.
477         * elf64-ppc.c: Likewise.
478
479 2017-03-09  Sam Thursfield  <sam.thursfield@codethink.co.uk>
480
481         * rs6000-core.c (CORE_NEW): Simplify macro when
482         AIX_CORE_DUMPX_CORE and BFD64 are true to avoid compile warning.
483
484 2017-03-07  Alan Modra  <amodra@gmail.com>
485
486         PR 21224
487         PR 20519
488         * elf64-ppc.c (ppc64_elf_relocate_section): Add missing
489         dyn_relocs check.
490
491 2017-03-05  Alan Modra  <amodra@gmail.com>
492
493         * elf-bfd.h (struct eh_cie_fde): Add u.cie.per_encoding_aligned8.
494         * elf-eh-frame.c (size_of_output_cie_fde): Don't align here.
495         (next_cie_fde_offset): New function.
496         (_bfd_elf_parse_eh_frame): Set u.cie.per_encoding_aligned8.
497         (_bfd_elf_discard_section_eh_frame): Align zero terminator to
498         four bytes.  Align CIEs to four or eight bytes depending on
499         per_encoding_aligned8.  Align FDEs according to their encoding.
500         Pad last FDE to output section alignment.
501         (_bfd_elf_write_section_eh_frame): Adjust to suit.  Remove
502         assertion.
503         * elf64-ppc.c (glink_eh_frame_cie): Delete padding.
504         (ppc64_elf_size_stubs): Pad glink eh_frame as per elf-eh-frame.c.
505         (ppc64_elf_finish_dynamic_sections): Adjust to suit.
506
507 2017-03-02  Martin Bickel  <binutils@ineranves.de>
508
509         PR ld/21212
510         * elf.c (rewrite_elf_program_header): Do not issue a warning for
511         empty segments which have a zero filesz, but a non-zero memsz.
512
513 2017-03-02  Alan Modra  <amodra@gmail.com>
514
515         * elf32-ppc.c (ppc_elf_vle_split16): Correct insn mask typo.
516
517 2017-02-28  Alan Modra  <amodra@gmail.com>
518
519         * elf64-ppc.c (ppc64_elf_ha_reloc): Revert last change.
520         (ppc64_elf_relocate_section): Likewise.
521
522 2017-02-28  Alan Modra  <amodra@gmail.com>
523
524         PR 20995
525         * elf32-nios2.c (nios2_elf32_relocate_section): Use htab
526         rather than elf32_nios2_hash_table or elf_hash_table.
527         (create_got_section): Likewise.
528         (nios2_elf32_finish_dynamic_symbol): Likewise.
529         (nios2_elf32_adjust_dynamic_symbol): Likewise.
530         (nios2_elf32_size_dynamic_sections): Likewise.
531         (nios2_elf32_check_relocs): Delete dynobj, sgot, and srelgot
532         vars.  Use htab equivalents directly instead.  Don't create
533         all dynamic sections on needing just the GOT.  Use a goto
534         rather than a fall-through with reloc test.  Ensure
535         htab->dynobj is set when making dynamic sreloc section.
536         (nios2_elf32_finish_dynamic_sections): Delete dynobj, use htab
537         equivalent directly instead.  Don't segfault on looking for
538         .dynamic when dynamic sections have not been created.  Don't
539         segfault on .got.plt being discarded.
540         (nios2_elf32_size_dynamic_sections): Delete plt and got vars.
541         Don't set "relocs" on .rela.plt.  Do handle .sbss.  Delete
542         fixme and another not so relevant comment.
543         (nios2_elf_add_symbol_hook): Delete dynobj var.  If not
544         already set, set hash table dynobj on creating .sbss.
545
546 2017-02-28  Alan Modra  <amodra@gmail.com>
547
548         * reloc.c (BFD_RELOC_PPC_16DX_HA): New.
549         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_16DX_HA>): New howto.
550         (ppc64_elf_reloc_type_lookup): Translate new bfd reloc.
551         (ppc64_elf_ha_reloc): Correct overflow test on REL16DX_HA.
552         (ppc64_elf_relocate_section): Likewise.
553         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_16DX_HA>): New howto.
554         (ppc_elf_reloc_type_lookup): Translate new bfd reloc.
555         (ppc_elf_check_relocs): Handle R_PPC_16DX_HA to pacify gcc.
556         * libbfd.h: Regenerate.
557         * bfd-in2.h: Regenerate.
558
559 2017-02-28  Alan Modra  <amodra@gmail.com>
560
561         * elflink.c (_bfd_elf_create_dynamic_sections): Don't make
562         dynamic .data.rel.ro read-only.
563         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Compare section
564         rather than section flags when deciding where copy reloc goes.
565         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
566         * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
567         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
568         * elf32-metag.c (elf_metag_finish_dynamic_symbol): Likewise.
569         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Likewise.
570         * elf32-nios2.c (nios2_elf32_finish_dynamic_symbol): Likewise.
571         * elf32-or1k.c (or1k_elf_finish_dynamic_symbol): Likewise.
572         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Likewise.
573         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
574         * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
575         * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
576         * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Likewise.
577         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
578         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
579         * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Likewise.
580         * elfnn-riscv.c (riscv_elf_finish_dynamic_symbol): Likewise.
581         * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
582         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
583         * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
584
585 2017-02-28  Maciej W. Rozycki  <macro@imgtec.com>
586
587         * elfxx-mips.c (mips_elf_perform_relocation): Also handle the
588         `jalr $0, $25' instruction encoding.
589
590 2017-02-27  Nick Clifton  <nickc@redhat.com>
591
592         PR ld/21180
593         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Avoid
594         generating a seg-fault when encountering a symbol that has been
595         deleted by garbage collection.
596
597 2017-02-25  Alan Modra  <amodra@gmail.com>
598
599         * elf32-arc.c (struct dynamic_sections): Delete.
600         (enum dyn_section_types): Delete.
601         (dyn_section_names): Delete.
602         (arc_create_dynamic_sections): Delete.
603         (elf_arc_finish_dynamic_sections): Don't call the above.  Don't
604         segfault on discarded .rela.plt section.
605         (elf_arc_size_dynamic_sections): Formatting.  Don't call
606         arc_create_dynamic_sections.  Don't allocate memory for sections
607         handled by the generic linker.  Correct code finding relocs in
608         read-only sections.  Set SEC_EXCLUDE on zero size .got,
609         .got.plt, and .dynbss sections.  Do set .interp for pies.
610
611 2017-02-24  Andrew Waterman  <andrew@sifive.com>
612
613         * elfnn-riscv.c (GP_NAME): New macro.
614         (riscv_global_pointer_value): Use it.
615         (_bfd_riscv_relax_lui): If symbol and global pointer are in same
616         output section, consider only that section's alignment.
617
618 2017-02-23  Maciej W. Rozycki  <macro@imgtec.com>
619
620         * elfxx-mips.h (_bfd_mips_relax_section): Remove prototype.
621         * elfxx-mips.c (_bfd_mips_relax_section): Remove function.
622         * elf64-mips.c (bfd_elf64_bfd_relax_section): Remove macro.
623         * elfn32-mips.c (bfd_elf32_bfd_relax_section): Likewise.
624
625 2017-02-23  Maciej W. Rozycki  <macro@imgtec.com>
626
627         * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS_JALR>
628         <R_MICROMIPS_JALR>: Discard relocation if `cross_mode_jump_p'
629         or misaligned.
630
631 2017-02-23  Alan Modra  <amodra@gmail.com>
632
633         PR 20744
634         * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask on all VLE
635         16D relocations.
636         (ppc_elf_vle_split16): Correct field mask and shift for 16D relocs.
637         (ppc_elf_relocate_section): Correct calculation for VLE SDAREL
638         relocs.
639
640 2017-02-22  Maciej W. Rozycki  <macro@imgtec.com>
641
642         PR ld/20828
643         * elflink.c (bfd_elf_size_dynamic_sections): Move symbol version
644         processing ahead of the call to `elf_gc_sweep_symbol'.
645
646 2017-02-22  Nick Clifton  <nickc@redhat.com>
647
648         PR binutils/21193
649         * opncls.c (bfd_create_gnu_debuglink_section): Give the newly
650         created section 4-byte alignment.
651
652 2017-02-22  Alan Modra  <amodra@gmail.com>
653
654         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Don't segfault
655         on .got or .plt output section being discarded by script.
656         * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Likewise.  Move
657         vxworks splt temp.
658
659 2017-02-21  Alan Modra  <amodra@gmail.com>
660
661         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only emit
662         DT_RELA, DT_RELASZ, and DT_RELAENT when DT_RELASZ is non-zero.
663
664 2017-02-20  Alan Modra  <amodra@gmail.com>
665
666         PR 21181
667         * elflink.c (bfd_elf_final_link): Make DT_REL/DT_RELA zero
668         if DT_RELSZ/DT_RELASZ is zero.
669
670 2017-02-17  Nick Clifton  <nickc@redhat.com>
671
672         * compress.c (bfd_get_full_section_contents): Remember to reduce
673         compressed size by the sizeof the compression header when
674         decompressing the contents.
675
676 2017-02-17  Pedro Alves  <palves@redhat.com>
677
678         * srec.c (Chunk): Rename to ...
679         (_bfd_srec_len): ... this.
680         (S3Forced): Rename to ...
681         (_bfd_srec_forceS3): ... this.
682         * objcopy.c: Adjust all references.
683
684 2017-02-17  Pedro Alves  <palves@redhat.com>
685
686         * archive.c (bsd_write_armap): Rename to ...
687         (_bfd_bsd_write_armap): ... this.
688         (coff_write_armap): Rename to ...
689         (_bfd_coff_write_armap): ... this.
690         * libbfd-in.h (bsd_write_armap): Rename to ...
691         (_bfd_bsd_write_armap): ... this.
692         (coff_write_armap): Rename to ...
693         (_bfd_coff_write_armap): ... this.
694         * aout-target.h, aout-tic30.c: Adjust all users.
695         * libbfd.h: Regenerate.
696
697 2017-02-17  Pedro Alves  <palves@redhat.com>
698
699         * bfd-in.h (bfd_read, bfd_write): Adjust to rename.
700         (warn_deprecated): Rename to ...
701         (_bfd_warn_deprecated): ... this.
702         * libbfd.c (warn_deprecated): Rename to ...
703         (_bfd_warn_deprecated): ... this.
704         * bfd-in2.h: Regenerate.
705
706 2017-02-17  Pedro Alves  <palves@redhat.com>
707
708         * bfdio.c (real_ftell): Rename to ...
709         (_bfd_real_ftell): ... this.
710         (real_fseek): Rename to ...
711         (_bfd_real_fseek): ... this.
712         (real_fopen): Rename to ...
713         (_bfd_real_fopen): ... this.
714         * libbfd-in.h (real_ftell): Rename to ...
715         (_bfd_real_ftell): ... this.
716         (real_fseek): Rename to ...
717         (_bfd_real_fseek): ... this.
718         (real_fopen): Rename to ...
719         (_bfd_real_fopen): ... this.
720         * cache.c, dwarf2.c, opncls.c: Adjust all callers.
721         * libbfd.h: Regenerate.
722
723 2017-02-17  Pedro Alves  <palves@redhat.com>
724
725         * dwarf2.c, elf-attrs.c, elf32-nds32.c: Adjust all callers.
726         * libbfd.c (read_unsigned_leb128): Rename to ...
727         (_bfd_read_unsigned_leb128): ... this.
728         (read_signed_leb128): Rename to ...
729         (_bfd_read_signed_leb128): ... this.
730         (safe_read_leb128): Rename to ...
731         (_bfd_safe_read_leb128): ... this.
732         * libbfd-in.h (read_unsigned_leb128): Rename to ...
733         (_bfd_read_unsigned_leb128): ... this.
734         (read_signed_leb128): Rename to ...
735         (_bfd_read_signed_leb128): ... this.
736         (safe_read_leb128): Rename to ...
737         (_bfd_safe_read_leb128): ... this.
738         * libbfd.h: Renegerate.
739
740 2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
741
742         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Perform symbol lookup
743         before trying to fine matching file and line information.
744
745 2017-02-16  Andrew Burgess  <andrew.burgess@embecosm.com>
746
747         * dwarf2.c (struct dwarf2_debug): Add orig_bfd member.
748         (_bfd_dwarf2_slurp_debug_info): If stashed debug information does
749         not match current bfd, then reload debug information.  Record bfd
750         we're loading debug info for in the stash.  If we have debug
751         informatin in the cache then perform section placement before
752         returning.
753
754 2017-02-16  Alan Modra  <amodra@gmail.com>
755
756         PR 21000
757         * elf-bfd.h (struct elf_backend_data): Add no_page_alias.
758         * elfxx-target.h (elf_backend_no_page_alias): Define.
759         (elfNN_bed): Init new field.
760         * elf.c (assign_file_positions_for_load_sections): If no_page_alias
761         ensure PT_LOAD segment starts on a new page.
762         * elf32-hppa.c (elf_backend_no_page_alias): Define.
763
764 2017-02-16  Alan Modra  <amodra@gmail.com>
765
766         PR 21132
767         * elf32-hppa.c (allocate_plt_static): Allocate space for relocs
768         if pic.
769
770 2017-02-16  Jiong Wang <jiong.wang@arm.com>
771
772         * bfd.c (BFD_FLAGS_SAVED): Add BFD_LINKER_CREATED.
773         * bfd-in2.h: Regenerated.
774
775 2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
776
777         PR ld/21168
778         * elf32-i386.c (elf_i386_relocate_section): Allow
779         "lea foo@GOT, %reg" in PIC.
780
781 2017-02-15  H.J. Lu  <hongjiu.lu@intel.com>
782
783         PR ld/20244
784         * elf32-i386.c (elf_i386_relocate_section): Properly get IFUNC
785         symbol name when reporting R_386_GOT32/R_386_GOT32X relocation
786         error against local IFUNC symbol without a base register for
787         PIC.
788
789 2017-02-15  Maciej W. Rozycki  <macro@imgtec.com>
790
791         * elf32-ppc.c (ppc_elf_check_relocs): Use `%H:' rather than
792         `%P: %H:' with `info->callbacks->einfo'.
793         (ppc_elf_relocate_section): Likewise.
794         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
795         (ppc64_elf_edit_toc): Likewise.
796         (ppc64_elf_relocate_section): Likewise.
797
798 2017-02-14  Alan Modra  <amodra@gmail.com>
799
800         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
801         --gc-keep-exported, and test versioned field of sym rather than
802         looking for @ in name.
803
804 2017-02-13  Palmer Dabbelt  <palmer@dabbelt.com>
805
806         * elfnn-riscv.c (riscv_global_pointer_value): Change _gp to
807         __global_pointer$.
808
809 2017-02-13  Nick Clifton  <nickc@redhat.com>
810
811         PR binutils/21151
812         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Check for an invalid
813         unit length field.
814
815 2017-02-07  Andrew Waterman  <andrew@sifive.com>
816
817         * elfnn-riscv.c (riscv_elf_finish_dynamic_sections): Only write PLT
818         entry size if PLT header is written.
819
820 2017-02-06  Sheldon Lobo  <sheldon.lobo@oracle.com>
821
822         Fix sparc64 dynamic relocation processing to use the dynamic
823         symbol count.
824         * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Use 'dynamic'
825         to determine if bfd_get_symcount() or bfd_get_dynamic_symcount()
826         should be used.
827
828 2017-02-03  Nick Clifton  <nickc@redhat.com>
829
830         PR 21096
831         * coffcode.h (coff_write_object_contents): Enlarge size of
832         s_name_buf in order to avoid compile time warning about possible
833         integer truncation.
834         * elf32-nds32.c (nds32_elf_ex9_import_table): Mask off lower
835         32-bits of insn value before printing into buffer.
836
837 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
838
839         * elfxx-mips.c (mips_elf_hash_sort_data): Add
840         `max_local_dynindx'.
841         (mips_elf_sort_hash_table): Handle it.
842         (mips_elf_sort_hash_table_f) <GGA_NONE>: For forced local
843         symbols bump up `max_local_dynindx' rather than
844         `max_non_got_dynindx'.
845
846 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
847
848         * elfxx-mips.c (mips_elf_hash_sort_data): Convert the
849         `min_got_dynindx', `max_unref_got_dynindx' and
850         `max_non_got_dynindx' members to the `bfd_size_type' data type.
851         (mips_elf_sort_hash_table): Adjust accordingly.
852
853 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
854
855         * elfxx-mips.c (mips_elf_sort_hash_table): Use `htab' throughout
856         to access the hash table.
857
858 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
859
860         * elfxx-mips.c (mips_elf_sort_hash_table): Move assertion on
861         non-NULL `htab' to the beginning.
862
863 2017-02-02  Maciej W. Rozycki  <macro@imgtec.com>
864
865         * elflink.c (elf_gc_sweep): Wrap overlong line.
866
867 2017-01-30  Maciej W. Rozycki  <macro@imgtec.com>
868
869         * elfxx-mips.h (_bfd_mips_elf_insn32): Rename prototype to...
870         (_bfd_mips_elf_linker_flags): ... this.  Add another parameter.
871         * elfxx-mips.c (mips_elf_link_hash_table): Add
872         `ignore_branch_isa' member.
873         (mips_elf_perform_relocation): Do not treat an ISA mode mismatch
874         in branch relocation calculation as an error if
875         `ignore_branch_isa' has been set.
876         (_bfd_mips_elf_insn32): Rename to...
877         (_bfd_mips_elf_linker_flags): ... this.  Rename the `on'
878         parameter to `insn32' and add an `ignore_branch_isa' parameter.
879         Handle the new parameter.
880
881 2017-01-27  Hans-Peter Nilsson  <hp@axis.com>
882
883         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Remove now unused
884         local variable dynobj.
885
886         PR ld/20995
887         * elf32-cris.c (elf_cris_size_dynamic_sections): Handle sdynrelro.
888         (elf_cris_adjust_dynamic_symbol): Place variables copied into the
889         executable from read-only sections into sdynrelro.
890         (elf_cris_finish_dynamic_symbol): Select sreldynrelro for
891         dynamic relocs in sdynrelro.
892         (elf_backend_want_dynrelro): Define.
893
894 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
895
896         * config.bfd (*-*-rtemsaout*): Mark as removed.
897
898 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
899
900         * config.bfd (powerpcle-*-rtems*): Do not mark as removed.
901         (arm-*-rtems*): Move to (arm*-*-eabi*).
902         (i[3-7]86-*-rtems*): Move to (i[3-7]86-*-elf*).
903         (m68-*-rtems*): Move to (m68*-*-elf*).
904
905 2017-01-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
906
907         * config.bfd (*-*-rtemscoff*): Mark as removed.
908
909 2017-01-24  Maciej W. Rozycki  <macro@imgtec.com>
910
911         PR ld/20828
912         * elflink.c (bfd_elf_record_link_assignment): Revert last
913         change and don't ever clear `forced_local'.  Set `mark'
914         unconditionally.
915         (elf_gc_sweep_symbol_info, elf_gc_sweep_symbol): Reorder within
916         file.
917         (elf_gc_sweep): Move the call to `elf_gc_sweep_symbol'...
918         (bfd_elf_size_dynamic_sections): ... here.
919         * elf32-ppc.c (ppc_elf_tls_setup): Don't clear `forced_local'
920         and set `mark' instead in `__tls_get_addr_opt' processing.
921         * elf64-ppc.c (ppc64_elf_tls_setup): Likewise.
922
923 2017-01-24  Alan Modra  <amodra@gmail.com>
924
925         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Merge two cases
926         where dynamic relocs are preferable.  Allow ifunc too.
927         (ensure_undefweak_dynamic): New function.
928         (allocate_dynrelocs): Use it here.  Move plt handling last and
929         don't make symbols dynamic, simplifying loop.  Only make undef
930         weak symbols with GOT entries dynamic.  Correct condition
931         for GOT relocs.  Handle dynamic relocs on ifuncs.  Correct
932         comments.  Remove goto.
933         (ppc_elf_relocate_section): Correct test for using dynamic
934         symbol on GOT relocs.  Rearrange test for emitting GOT relocs
935         to suit.  Set up explicit tls_index entries and implicit GOT
936         tls_index entries resolvable at link time for
937         __tls_get_addr_opt.  Simplify test to clear mem for prelink.
938         * elf64-ppc.c (allocate_got): Correct condition for GOT relocs.
939         (ensure_undefweak_dynamic): New function.
940         (allocate_dynrelocs): Use it here.  Only make undef weak symbols
941         with GOT entries dynamic.  Remove unnecessary test of
942         WILL_CALL_FINISH_DYNAMIC_SYMBOL in PLT handling.
943         (ppc64_elf_relocate_section): Correct test for using dynamic
944         symbol on GOT relocs.  Rearrange test for emitting GOT relocs
945         to suit.  Set up explicit tls_index entries and implicit GOT
946         tls_index entries resolvable at link time for __tls_get_addr_opt.
947         Simplify expression to clear mem for prelink.
948
949 2017-01-23  Yury Norov  <ynorov@caviumnetworks.com>
950
951         * elfnn-aarch64.c: Fix relaxations for ILP32 mode.
952
953 2017-01-20  Jiong Wang <jiong.wang@arm.com>
954
955         * elfnn-aarch64.c (elf_aarch64_hash_symbol): New function.
956         (elf_backend_hash_symbol): Define.
957
958 2017-01-18  Maciej W. Rozycki  <macro@imgtec.com>
959
960         PR ld/20828
961         * elflink.c (bfd_elf_record_link_assignment): Clear any
962         `forced_local' marking for DSO symbols that are not being
963         provided.
964
965 2017-01-17  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
966
967         * elfnn-riscv.c (riscv_elf_object_p): New function.
968
969 2017-01-12  H.J. Lu  <hongjiu.lu@intel.com>
970
971         PR ld/21038
972         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
973         plt_bnd_eh_frame.
974         (elf_x86_64_check_relocs): Create .eh_frame section for the
975         .plt.bnd section.
976         (elf_x86_64_size_dynamic_sections): Allocate and initialize
977         .eh_frame section for the .plt.bnd section.
978         (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
979         for the .plt.bnd section.
980
981 2017-01-12  Nick Clifton  <nickc@redhat.com>
982
983         PR binutils/20876
984         * opncls.c (find_separate_debug_file): Add include_dirs
985         parameter.  Only include the directory part of the bfd's filename
986         in search paths if include_dirs is true.  Add a couple of extra
987         locations for looking for debug files.
988         ( bfd_follow_gnu_debuglink): Update invocation of
989         find_separate_debug_file.
990         (bfd_follow_gnu_debugaltlink): Likewise.
991         (get_build_id): New function: Finds the build-id of the given bfd.
992         (get_build_id_name): New function: Computes the name of the
993         separate debug info file for a bfd, based upon its build-id.
994         (check_build_id_file): New function: Checks to see if a separate
995         debug info file exists at the given location, and that its
996         build-id matches that of the original bfd.
997         (bfd_follow_build_id_debuglink): New function: Finds a separate
998         debug info file for a given bfd by using the build-id method.
999         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Try using the build-id
1000         method of locating a separate debug info file before using the
1001         debuglink method.
1002         * bfd-in2.h: Regenerate.
1003
1004 2017-01-11  H.J. Lu  <hongjiu.lu@intel.com>
1005
1006         PR ld/21038
1007         * elf64-x86-64.c (elf_x86_64_eh_frame_bnd_plt): New.
1008         (elf_x86_64_bnd_arch_bed): Use elf_x86_64_eh_frame_bnd_plt and
1009         elf_x86_64_eh_frame_plt_got.
1010         (elf_x86_64_size_dynamic_sections): Get unwind info from
1011         elf_x86_64_bnd_arch_bed for the BND PLT.
1012
1013 2017-01-11  Jeremy Soller  <jackpot51@gmail.com>
1014
1015         * config.bfd: Add entries for i686-redox and x86_64-redox.
1016
1017 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
1018
1019         * elf32-i386.c (elf_i386_check_relocs): Align .eh_frame section
1020         to 4 bytes.
1021         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Align
1022         .eh_frame section to 4 bytes for x32.
1023         (elf_x86_64_check_relocs): Likewise.
1024
1025 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
1026
1027         PR ld/20830
1028         * elf32-i386.c (elf_i386_eh_frame_plt_got): New.
1029         (PLT_GOT_FDE_LENGTH): Likewise.
1030         (elf_i386_plt_layout): Add eh_frame_plt_got and
1031         eh_frame_plt_got_size.
1032         (elf_i386_plt): Updated.
1033         (elf_i386_link_hash_table): Add plt_got_eh_frame.
1034         (elf_i386_check_relocs): Create .eh_frame section for .plt.got.
1035         (elf_i386_size_dynamic_sections): Allocate and initialize
1036         .eh_frame section for .plt.got.
1037         (elf_i386_finish_dynamic_sections): Adjust .eh_frame section for
1038         .plt.got.
1039         (elf_i386_nacl_plt): Add FIXME for eh_frame_plt_got and
1040         eh_frame_plt_got_size.
1041         * elf64-x86-64.c (elf_x86_64_eh_frame_plt_got): New.
1042         (PLT_GOT_FDE_LENGTH): Likewise.
1043         (elf_x86_64_backend_data): Add eh_frame_plt_got and
1044         eh_frame_plt_got_size.
1045         (elf_x86_64_arch_bed): Updated.
1046         (elf_x86_64_bnd_arch_bed): Add FIXME for eh_frame_plt_got and
1047         eh_frame_plt_got_size.
1048         (elf_x86_64_nacl_arch_bed): Likewise.
1049         (elf_x86_64_link_hash_table): Add plt_got_eh_frame.
1050         (elf_x86_64_check_relocs): Create .eh_frame section for .plt.got.
1051         (elf_x86_64_size_dynamic_sections): Allocate and initialize
1052         .eh_frame section for .plt.got.
1053         (elf_x86_64_finish_dynamic_sections): Adjust .eh_frame section
1054         for .plt.got.
1055
1056 2017-01-10  H.J. Lu  <hongjiu.lu@intel.com>
1057
1058         * elf32-i386.c (elf_i386_size_dynamic_sections): Set
1059         plt_eh_frame->size to eh_frame_plt_size and use eh_frame_plt.
1060
1061 2017-01-09  Nick Clifton  <nickc@redhat.com>
1062
1063         * dwarf2.c (lookup_address_in_function_table): Return early if
1064         there are no functions in the given comp unit, or if the high
1065         address of the last function in the comp unit is less than the
1066         desired address.
1067
1068 2017-01-09  Nick Clifton  <nickc@redhat.com>
1069
1070         PR binutils/21013
1071         * coffgen.c (_bfd_coff_get_external_symbols): Generate an error
1072         message if there are too many symbols to load.
1073
1074 2017-01-04  James Clarke  <jrtc27@jrtc27.com>
1075
1076         * elf64-alpha.c (elf64_alpha_relax_opt_call): Don't set tsec_free
1077         if relocs are cached.
1078
1079 2017-01-03  Rich Felker  <bugdal@aerifal.cx>
1080
1081         PR ld/21017
1082         * elf32-microblaze.c (microblaze_elf_check_relocs): Add an entry
1083         for R_MICROBLAZE_GOTOFF_64.
1084
1085 2017-01-03  Nick Clifton  <nickc@redhat.com>
1086
1087         * mach-o.c (bfd_mach_o_lookup_uuid_command): Fix compile time
1088         warning about using a possibly uninitialised variable.
1089
1090 2017-01-02  Alan Modra  <amodra@gmail.com>
1091
1092         * elf32-hppa.c (ensure_undef_weak_dynamic): New function.
1093         (allocate_plt_static, allocate_dynrelocs): Use it.
1094
1095 2017-01-02  Alan Modra  <amodra@gmail.com>
1096
1097         * elf-hppa.h (elf_hppa_fake_sections): Set SHF_INFO_LINK for
1098         .PARISC.unwind section.
1099
1100 2017-01-02  Alan Modra  <amodra@gmail.com>
1101
1102         PR ld/20989
1103         * elfxx-sparc.c (gdop_relative_offset_ok): New function.
1104         (_bfd_sparc_elf_relocate_section): Use it to validate GOT
1105         indirect to GOT pointer relative code edit.
1106
1107 2017-01-02  Alan Modra  <amodra@gmail.com>
1108
1109         Update year range in copyright notice of all files.
1110
1111 For older changes see ChangeLog-2016
1112 \f
1113 Copyright (C) 2017 Free Software Foundation, Inc.
1114
1115 Copying and distribution of this file, with or without modification,
1116 are permitted in any medium without royalty provided the copyright
1117 notice and this notice are preserved.
1118
1119 Local Variables:
1120 mode: change-log
1121 left-margin: 8
1122 fill-column: 74
1123 version-control: never
1124 End: