x86: Don't set eh->local_ref to 1 for linker defined symbols
[external/binutils.git] / bfd / ChangeLog
1 2018-05-18  H.J. Lu  <hongjiu.lu@intel.com>
2
3         PR ld/23189
4         * elf32-i386.c (elf_i386_relocate_section): Handle R_386_GOT32X
5         like R_386_GOT32.
6         * elfxx-x86.c (_bfd_x86_elf_link_symbol_references_local): Don't
7         set eh->local_ref to 1 for linker defined symbols.
8
9 2018-05-18  Alan Modra  <amodra@gmail.com>
10
11         PR 23199
12         * elf.c (setup_group): Formatting.  Check that SHT_GROUP entries
13         don't point at other SHT_GROUP sections.  Set shdr corresponding
14         to invalid entry, to NULL rather than section 0.  Identify
15         SHT_GROUP section index when reporting an error.  Cope with NULL
16         shdr pointer.
17
18 2018-05-18  Alan Modra  <amodra@gmail.com>
19
20         * libbfd-in.h (ATTRIBUTE_HIDDEN): Define and use throughout.
21         * configure.ac (HAVE_HIDDEN): Check compiler support for hidden
22         visibility.
23         * libbfd.h: Regenerate.
24         * configure: Regenerate.
25         * config.in: Regenerate.
26
27 2018-05-18  Alan Modra  <amodra@gmail.com>
28
29         * libbfd-in.h: Add include guard.
30         * libcoff-in.h: Likewise.
31         * doc/Makefile.am (libbfd.h, libcoff.h): Append another #endif.
32         * doc/Makefile.in: Regenerate.
33         * libbfd.h: Regenerate.
34         * libcoff.h: Regenerate.
35
36 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
37
38         * elf32-nds32.c (nds32_convert_32_to_16): Preset `insn_type'.
39
40 2018-05-16  Alan Modra  <amodra@gmail.com>
41
42         PR 22458
43         * format.c (struct bfd_preserve): Add section_id.
44         (bfd_preserve_save, bfd_preserve_restore): Save and restore
45         _bfd_section_id.
46         (bfd_reinit): Set _bfd_section_id.
47         (bfd_check_format_matches): Put all matches of any priority into
48         matching_vector.  Save initial section id and start each attempted
49         match at that section id.
50         * libbfd-in.h (_bfd_section_id): Declare.
51         * section.c (_bfd_section_id): Rename from section_id and make
52         global.  Adjust uses.
53         (bfd_get_next_section_id): Delete.
54         * elf64-ppc.c (ppc64_elf_setup_section_lists): Replace use of
55         bfd_get_section_id with _bfd_section_id.
56         * libbfd.h: Regenerate.
57         * bfd-in2.h: Regenerate.
58
59 2018-05-15  Christophe Guillon  <christophe.guillon@st.com>
60
61         * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
62         of the aux structure are initialised.
63
64 2018-05-15  Francois H. Theron  <francois.theron@netronome.com>
65
66         * targets.c: Wrap nfp_elf64_vec in BFD64 ifdef.
67
68 2018-05-15  Nick Clifton  <nickc@redhat.com>
69
70         * po/pt.po: New Portuguese translation.
71         * configure.ac (ALL_LINGUAS): Add pt.
72         * configure: Regenerate.
73
74 2018-05-14  H.J. Lu  <hongjiu.lu@intel.com>
75
76         PR ld/23169
77         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Don't issue
78         an error on IFUNC pointer defined in PDE.
79         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Call
80         _bfd_x86_elf_link_fixup_ifunc_symbol.
81         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
82         * elfxx-x86.c (_bfd_x86_elf_link_fixup_ifunc_symbol): New
83         function.
84         * elfxx-x86.h (_bfd_x86_elf_link_fixup_ifunc_symbol): New.
85
86 2018-05-14  H.J. Lu  <hongjiu.lu@intel.com>
87
88         PR ld/23162
89         * elfxx-x86.c (elf_x86_linker_defined): New function.
90         (_bfd_x86_elf_link_check_relocs): Use it to mark __bss_start,
91         _end and _edata locally defined within executables.
92
93 2018-05-12  Alan Modra  <amodra@gmail.com>
94
95         PR 20659
96         * elf.c (rewrite_elf_program_header): Use segment_mark only for
97         PT_LOAD headers.  Delete first_matching_lma and first_suggested_lma.
98         Instead make matching_lma and suggested_lma pointers to the
99         sections.  Align section vma and lma calculated from segment.
100         Don't clear includes_phdrs or includes_filehdr based on p_paddr
101         test.  Try to handle alignment padding before first section by
102         adjusting new segment lma down.  Adjust PT_PHDR map p_paddr.
103
104 2018-05-09  Dimitar Dimitrov  <dimitar@dinux.eu>
105
106         * elf32-pru.c (pru_elf32_do_ldi32_relocate): Make LDI32 relocation
107         conformant to TI ABI.
108         (pru_elf32_relax_section): Likewise.
109         (pru_elf_relax_delete_bytes): Fix offsets for new LDI32 code.
110         * elf32-pru.c (pru_elf32_do_ldi32_relocate): Ignore addend.
111         (pru_elf32_pmem_relocate): Trap - should not get here.
112         (pru_elf32_relocate_section): Add support for REL relocations.
113         (elf_info_to_howto_rel): Enable REL.
114         (elf_backend_may_use_rel_p): Likewise.
115         (elf_backend_may_use_rela_p): Likewise.
116         (elf_backend_default_use_rela_p): Likewise.
117
118 2018-05-09  Alan Modra  <amodra@gmail.com>
119
120         PR 23148
121         * peXXigen.c (pe_print_edata): Correct minimum size.
122
123 2018-05-09  Alan Modra  <amodra@gmail.com>
124
125         PR 23147
126         * peXXigen.c (pe_print_idata): Bound check hint_addr.
127
128 2018-05-08  Nick Clifton  <nickc@redhat.com>
129
130         PR 22809
131         * elf.c (bfd_elf_get_str_section): Check for an excessively large
132         string section.
133         * elf-attrs.c (_bfd_elf_parse_attributes): Issue an error if the
134         attribute section is larger than the size of the file.
135
136 2018-05-07  Alan Modra  <amodra@gmail.com>
137
138         * cofflink.c (_bfd_coff_link_input_bfd): Use memcmp rather than
139         strncmp when checking for ".bf" special symbol.
140         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Make pe_required_section_flags
141         section name a char array, remove sentinal known_sections entry,
142         and adjust loop over known_sections to suit.  Use memcmp rather
143         than strncmp.
144
145 2018-05-04  Alan Modra  <amodra@gmail.com>
146
147         * elf-linux-core.h (struct elf_external_linux_prpsinfo32_ugid32),
148         (struct elf_external_linux_prpsinfo32_ugid16),
149         (struct elf_external_linux_prpsinfo64_ugid32),
150         (struct elf_external_linux_prpsinfo64_ugid16): Add ATTRIBUTE_NONSTRING
151         to pr_fname and pr_psargs fields.  Remove GCC diagnostic pragmas.
152         Move comment to..
153         * elf.c (elfcore_write_prpsinfo): ..here.  Indent nested preprocessor
154         directives.
155         * elf32-arm.c (elf32_arm_nabi_write_core_note): Add ATTRIBUTE_NONSTRING
156         to data.
157         * elf32-ppc.c (ppc_elf_write_core_note): Likewise.
158         * elf32-s390.c (elf_s390_write_core_note): Likewise.
159         * elf64-s390.c (elf_s390_write_core_note): Likewise.
160         * elfxx-aarch64.c (_bfd_aarch64_elf_write_core_note): Likewise.
161         * elf64-x86-64.c (elf_x86_64_write_core_note): Add GCC diagnostic
162         pragmas.
163         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Use strnlen to avoid
164         false positive gcc-8 warning.
165         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
166
167 2018-05-04  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
168
169         * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): Fix the order
170         of arguments when warning about different long double types.
171
172 2018-05-03  Simon Atanasyan  <simon@atanasyan.com>
173
174         * elf32-mips.c: (elf32_mips_fixup_symbol): New function.
175         (elf_backend_fixup_symbol): New macro.
176         * elfxx-mips.c: (mips_elf_output_extsym): Discard _gp_disp
177         handling.
178         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
179
180 2018-04-30  Francois H. Theron <francois.theron@netronome.com>
181
182         * Makefile.am: Added NFP files to build.
183         * archures.c: Added bfd_arch_nfp
184         * config.bfd: Added NFP support.
185         * configure.ac: Added NFP support.
186         * cpu-nfp.c: New, for NFP support.
187         * elf-bfd.h: Added elf_section_info()
188         * elf64-nfp.c: New, for NFP support.
189         * po/SRC-POTFILES.in: Added NFP source files.
190         * targets.c: Added nfp_elf64_vec
191         * bfd-in2.h: Regenerate.
192         * Makefile.in: Regenerate.
193         * configure: Regenerate.
194
195 2018-04-27  Alan Modra  <amodra@gmail.com>
196
197         * bfd-in2.h: Regenerate.
198         * libbfd.h: Regenerate.
199
200 2018-04-27  Alan Modra  <amodra@gmail.com>
201
202         PR 23123
203         PR 22374
204         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't drop plt
205         relocs for ifuncs.
206         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Comment fixes.
207
208 2018-04-26  Pedro Alves  <palves@redhat.com>
209
210         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't consider
211         ifunc and non-ifunc symbols duplicates.
212
213 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
214         Mickaël Guêné  <mickael.guene@st.com>
215
216         * elf32-arm.c (elf32_arm_fdpic_thumb_plt_entry): New.
217         (elf32_arm_plt_needs_thumb_stub_p): Handle thumb-only case.
218         (elf32_arm_populate_plt_entry): Likewise.
219         (elf32_arm_output_plt_map_1): Likewise.
220         (elf32_arm_output_arch_local_syms): Likewise.
221
222 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
223         Mickaël Guêné  <mickael.guene@st.com>
224
225         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Handle
226         _GLOBAL_OFFSET_TABLE_ in FDPIC mode.
227
228 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
229         Mickaël Guêné  <mickael.guene@st.com>
230
231         * elf32-arm.c (bfd_elf32_arm_set_target_params): Handle FDPIC case
232         for R_ARM_TARGET2.
233
234 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
235         Mickaël Guêné  <mickael.guene@st.com>
236
237         * elf32-arm.c (DEFAULT_STACK_SIZE): New.
238         (elf32_arm_always_size_sections): Create stack segment.
239
240 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
241         Mickaël Guêné  <mickael.guene@st.com>
242
243         * bfd-in2.h (BFD_RELOC_ARM_TLS_GD32_FDPIC)
244         (BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC): New
245         relocations.
246         * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_TLS_GD32_FDPIC,
247         R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC relocations.
248         (elf32_arm_reloc_map): Add R_ARM_TLS_GD32_FDPIC,
249         R_ARM_TLS_LDM32_FDPIC, R_ARM_TLS_IE32_FDPIC.
250         (struct elf32_arm_link_hash_table): Update comment.
251         (elf32_arm_final_link_relocate): Handle TLS FDPIC relocations.
252         (IS_ARM_TLS_RELOC): Likewise.
253         (elf32_arm_check_relocs): Likewise.
254         (allocate_dynrelocs_for_symbol): Likewise.
255         (elf32_arm_size_dynamic_sections): Update comment.
256         * reloc.c: Add BFD_RELOC_ARM_TLS_GD32_FDPIC,
257         BFD_RELOC_ARM_TLS_LDM32_FDPIC, BFD_RELOC_ARM_TLS_IE32_FDPIC.
258
259 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
260         Mickaël Guêné  <mickael.guene@st.com>
261
262         * elf32-arm.c (elf32_arm_fdpic_plt_entry): New.
263         (elf32_arm_create_dynamic_sections): Handle FDPIC.
264         (elf32_arm_allocate_plt_entry): Likewise.
265         (elf32_arm_populate_plt_entry): Likewise.
266         (elf32_arm_output_plt_map_1): Likewise.
267
268 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
269         Mickaël Guêné  <mickael.guene@st.com>
270
271         * elf32-arm.c (struct fdpic_local): New.
272         (elf_arm_obj_tdata): Add local_fdpic_cnts field.
273         (elf32_arm_local_fdpic_cnts): New.
274         (struct fdpic_global): New.
275         (elf32_arm_link_hash_entry): Add fdpic_cnts field.
276         (elf32_arm_link_hash_table): Add srofixup field.
277         (arm_elf_add_rofixup): New.
278         (arm_elf_fill_funcdesc): New.
279         (elf32_arm_link_hash_newfunc): Handle fdpic_cnts.
280         (elf32_arm_allocate_local_sym_info): Likewise.
281         (create_got_section): Create .rofixup section.
282         (elf32_arm_copy_indirect_symbol): Handle fdpic_cnts.
283         (bfd_elf32_arm_set_target_params): Handle FDPIC.
284         (elf32_arm_final_link_relocate): Likewise.
285         (elf32_arm_check_relocs): Likewise.
286         (allocate_dynrelocs_for_symbol): Likewise.
287         (elf32_arm_size_dynamic_sections): Likewise.
288         (elf32_arm_finish_dynamic_sections): Likewise.
289         (elf32_arm_output_arch_local_syms): Likewise.
290         (elf32_arm_fdpic_omit_section_dynsym): New.
291
292 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
293         Mickaël Guêné  <mickael.guene@st.com>
294
295         * bfd-in2.c (BFD_RELOC_ARM_GOTFUNCDESC)
296         (BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC)
297         (BFD_RELOC_ARM_FUNCDESC_VALUE): New.
298         * elf32-arm.c (elf32_arm_howto_table_2): Add R_ARM_GOTFUNCDESC,
299         R_ARM_GOTOFFFUNCDESC, R_ARM_FUNCDESC, R_ARM_FUNCDESC_VALUE.
300         (elf32_arm_howto_from_type): Take new members of
301         elf32_arm_howto_table_2 into account.
302         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_GOTFUNCDESC,
303         BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
304         BFD_RELOC_ARM_FUNCDESC_VALUE.
305         * reloc.c: Add BFD_RELOC_ARM_GOTFUNCDESC,
306         BFD_RELOC_ARM_GOTOFFFUNCDESC, BFD_RELOC_ARM_FUNCDESC,
307         BFD_RELOC_ARM_FUNCDESC_VALUE.
308
309 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
310         Mickaël Guêné  <mickael.guene@st.com>
311
312         * elf32-arm.c (elf32_arm_print_private_bfd_data): Support
313         EF_ARM_PIC and ELFOSABI_ARM_FDPIC.
314         (elf32_arm_post_process_headers): Support ELFOSABI_ARM_FDPIC.
315         (ELF_OSABI): Define to ELFOSABI_ARM_FDPIC.
316
317 2018-04-25  Christophe Lyon  <christophe.lyon@st.com>
318         Mickaël Guêné  <mickael.guene@st.com>
319
320         * config.bfd (arm*-*-linux-*): Add arm_elf32_fdpic_be_vec and
321         arm_elf32_fdpic_le_vec to targ_selvecs. Accept
322         arm*-*-uclinuxfdpiceabi.
323         * configure.ac: Add support for arm_elf32_fdpic_be_vec and
324         arm_elf32_fdpic_le_vec.
325         * configure: Regenerate.
326         * elf32-arm.c (struct elf32_arm_link_hash_table): Add fdpic_p.
327         (elf32_arm_link_hash_table_create): Initialize fdpic_p.
328         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM)
329         (TARGET_BIG_NAME, elf_match_priority): Define for FDPIC targets.
330         (elf32_arm_fdpic_link_hash_table_create): New.
331         * targets.c (_bfd_target_vector): Add arm_elf32_fdpic_be_vec and
332         arm_elf32_fdpic_le_vec.
333
334 2018-04-25  Alan Modra  <amodra@gmail.com>
335
336         * elf-linux-core.h: Disable gcc-8 string truncation warning.
337         * elf.c (elfcore_write_prpsinfo): Likewise.
338
339 2018-04-25  Alan Modra  <amodra@gmail.com>
340
341         * Makefile.am: Remove arm-aout and arm-coff support.
342         * config.bfd: Likewise.
343         * configure.ac: Likewise.
344         * targets.c: Likewise.
345         * aout-arm.c: Delete.
346         * armnetbsd.c: Delete.
347         * riscix.c: Delete.
348         * Makefile.in: Regenerate.
349         * configure: Regenerate.
350         * po/SRC-POTFILES.in: Regenerate.
351
352 2018-04-24  Nick Clifton  <nickc@redhat.com>
353
354         PR 23113
355         * elf.c (ignore_section_sym): Check for the output_section pointer
356         being NULL before dereferencing it.
357
358         PR 23110
359         * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Check for
360         a negative PE_DEBUG_DATA size before iterating over the debug data.
361
362 2018-04-23  Alan Modra  <amodra@gmail.com>
363
364         * elf-linux-core.h: Revert last change.
365         * elf.c: Likewise.
366
367 2018-04-23  Nick Clifton  <nickc@redhat.com>
368
369         PR 23056
370         * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
371         the end of the string table, and zero it.
372
373 2018-04-23  Alan Modra  <amodra@gmail.com>
374
375         * elf-linux-core.h (swap_linux_prpsinfo32_ugid32_out): Disable
376         gcc-8 string truncation warning.
377         (swap_linux_prpsinfo32_ugid16_out): Likewise.
378         (swap_linux_prpsinfo64_ugid32_out): Likewise.
379         (swap_linux_prpsinfo64_ugid16_out): Likewise.
380         * elf.c (elfcore_write_prpsinfo): Likewise.
381
382 2018-04-23  Nick Clifton  <nickc@redhat.com>
383
384         PR 23056
385         * aoutx.h (aout_get_external_symbols): Allocate an extra byte at
386         the end of the string table, and zero it.
387
388 2018-04-20  Alan Modra  <amodra@gmail.com>
389
390         PR 22978
391         * elf32-hppa.c (got_relocs_needed): Add extra param to special
392         case both dtprel and tprel relocs.
393         (allocate_dynrelocs): Adjust conditions for got relocs.
394         (elf32_hppa_relocate_section): Likewise for local sym got relocs.
395         Emit dynamic relocs on TLS GOT entries for shared libraries,
396         not when pic.  Omit dynamic reloc on dtprel entry when local,
397         and on tprel entry when local and executable.
398
399 2018-04-19  Alan Modra  <amodra@gmail.com>
400
401         PR 22537
402         * elf32-hppa.c (elf32_hppa_size_stubs): Init "destination" to -1.
403         (hppa_type_of_stub): Don't return a long branch stub for
404         symbols other than those defined statically.
405
406 2018-04-19  Alan Modra  <amodra@gmail.com>
407
408         * Makefile.am: Revert 2018-04-18 coff-mips changes.
409         * config.bfd: Add back mips_ecoff_le_vec and mips_ecoff_be_vec
410         to selvecs for mips targets change 2018-04-18.
411         * configure.ac: Reinstate mips_ecoff_le_vec, mips_ecoff_be_vec
412         and  mips_ecoff_bele_vec.
413         * targets.c: Likewise.
414         * coff-mips.c: Resurrect.
415         * Makefile.in: Regenerate.
416         * configure: Regenerate.
417         * po/SRC-POTFILES.in: Regenerate.
418
419 2018-04-18  Alan Modra  <amodra@gmail.com>
420
421         * Makefile.am: Remove mips aout and coff support.
422         * config.bfd: Likewise.
423         * configure.ac: Likewise.
424         * targets.c: Likewise.
425         * coff-mips.c: Delete
426         * mipsbsd.c: Delete
427         * pe-mips.c: Delete
428         * pei-mips.c: Delete
429         * Makefile.in: Regenerate.
430         * configure: Regenerate.
431         * po/SRC-POTFILES.in: Regenerate.
432
433 2018-04-17  H.J. Lu  <hongjiu.lu@intel.com>
434
435         * elf32-i386.c (elf32_bed): Define before including
436         "elf32-target.h".
437         * elf64-x86-64.c (elf64_bed): Define before including
438         "elf64-target.h".
439         (elf32_bed): Define before including "elf32-target.h".
440
441 2018-04-17  H.J. Lu  <hongjiu.lu@intel.com>
442
443         PR ld/23055
444         * elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Use a
445         normal input file with compatible relocation.
446
447 2018-04-18  Alan Modra  <amodra@gmail.com>
448
449         * Makefile.am: Remove support for assorted i386 aout and coff targets.
450         * config.bfd: Likewise.
451         * configure.ac: Likewise.
452         * doc/bfdint.texi: Likewise.
453         * targets.c: Likewise.
454         * freebsd.h: Delete.
455         * i386dynix.c: Delete.
456         * i386freebsd.c: Delete.
457         * i386linux.c: Delete.
458         * i386mach3.c: Delete.
459         * i386netbsd.c: Delete.
460         * i386os9k.c: Delete.
461         * Makefile.in: Regenerate.
462         * configure: Regenerate.
463         * po/SRC-POTFILES.in: Regenerate.
464
465 2018-04-17 Andrew Sadek  <andrew.sadek.se@gmail.com>
466
467         Microblaze Target: PIC data text relative
468
469         * bfd/reloc.c (2 new BFD relocations):
470         BFD_RELOC_MICROBLAZE_64_TEXTPCREL &
471         BFD_RELOC_MICROBLAZE_64_TEXTPCREL
472         * bfd/bfd-in2.h: Regenerate
473         * bfd/libbfd.h: Regenerate
474         * bfd/elf32-microblaze.c (Handle new relocs): define 'HOWTO' of 3
475         new relocs and handle them in both relocate and relax functions.
476         (microblaze_elf_reloc_type_lookup): add mapping between for new
477         bfd relocs.
478         (microblaze_elf_relocate_section): Handle new relocs in case of
479         elf relocation.
480         (microblaze_elf_relax_section): Handle new relocs for elf relaxation.
481
482 2018-04-17  Nick Clifton  <nickc@redhat.com>
483
484         PR 23055
485         * aoutx.h (find_nearest_line): Check that the symbol name exists
486         and is long enough, before attempting to see if it is for a .o
487         file.
488         * hash.c (bfd_hash_hash): Add an assertion that the string is not
489         NULL.
490         * linker.c (bfd_link_hash_lookup): Fail if the table or string are
491         NULL.
492         (_bfd_generic_link_add_archive_symbols): Fail if an archive entry
493         has no name.
494
495         PR 23065
496         * dwarf2.c (concat_filename): Check for a NULL table pointer.
497
498 2018-04-16  Nick Clifton  <nickc@redhat.com>
499
500         PR 23061
501         * coffgen.c (coff_pointerize_aux): Check for an out of range
502         fixup.
503
504 2018-04-16  Alan Modra  <amodra@gmail.com>
505
506         * Makefile.am: Remove arm-epoc-pe support.
507         * coff-arm.c: Likewise.
508         * config.bfd: Likewise.
509         * configure.ac: Likewise.
510         * targets.c: Likewise.
511         * epoc-pe-arm.c: Delete.
512         * epoc-pei-arm.c: Delete.
513         * Makefile.in: Regenerate.
514         * configure: Regenerate.
515         * po/SRC-POTFILES.in: Regenerate.
516
517 2018-04-16  Alan Modra  <amodra@gmail.com>
518
519         * Makefile.am: Remove sparc-aout and sparc-coff support.
520         * config.bfd: Likewise.
521         * configure.ac: Likewise.
522         * targets.c: Likewise.
523         * aout-sparcle.c: Delete.
524         * aoutf1.h: Delete.
525         * cf-sparclynx.c: Delete.
526         * coff-sparc.c: Delete.
527         * demo64.c: Delete.
528         * sparclinux.c: Delete.
529         * sparclynx.c: Delete.
530         * sparcnetbsd.c: Delete.
531         * sunos.c: Delete.
532         * Makefile.in: Regenerate.
533         * configure: Regenerate.
534         * po/SRC-POTFILES.in: Regenerate.
535
536 2018-04-16  Alan Modra  <amodra@gmail.com>
537
538         * Makefile.am: Remove m68k-aout and m68k-coff support.
539         * aoutf1.h: Likewise.
540         * aoutx.h: Likewise.
541         * archive.c: Likewise.
542         * bfd-in.h: Likewise.
543         * bfd.c: Likewise.
544         * coffcode.h: Likewise.
545         * coffswap.h: Likewise.
546         * config.bfd: Likewise.
547         * configure.ac: Likewise.
548         * configure.host: Likewise.
549         * doc/bfd.texinfo: Likewise.
550         * doc/bfdint.texi: Likewise.
551         * freebsd.h: Likewise.
552         * gen-aout.c: Likewise.
553         * hpux-core.c: Likewise.
554         * libaout.h: Likewise.
555         * libbfd-in.h: Likewise.
556         * pdp11.c: Likewise.
557         * peicode.h: Likewise.
558         * riscix.c: Likewise.
559         * targets.c: Likewise.
560         * aout0.c: Delete.
561         * coff-apollo.c: Delete.
562         * coff-aux.c: Delete.
563         * coff-m68k.c: Delete.
564         * coff-svm68k.c: Delete.
565         * coff-u68k.c: Delete.
566         * hosts/delta68.h: Delete.
567         * hosts/hp300bsd.h: Delete.
568         * hosts/m68kaux.h: Delete.
569         * hosts/news.h: Delete.
570         * hp300bsd.c: Delete.
571         * hp300hpux.c: Delete.
572         * liboasys.h: Delete.
573         * m68k4knetbsd.c: Delete.
574         * m68klinux.c: Delete.
575         * m68knetbsd.c: Delete.
576         * oasys.c: Delete.
577         * versados.c: Delete.
578         * Makefile.in: Regenerate.
579         * bfd-in2.h: Regenerate.
580         * configure: Regenerate.
581         * libbfd.h: Regenerate.
582         * po/SRC-POTFILES.in: Regenerate.
583
584 2018-04-16  Alan Modra  <amodra@gmail.com>
585
586         * Makefile.am: Remove sh5 and sh64 support.
587         * archures.c: Likewise.
588         * config.bfd: Likewise.
589         * configure.ac: Likewise.
590         * cpu-sh.c: Likewise.
591         * elf32-sh-relocs.h: Likewise.
592         * elf32-sh.c: Likewise.
593         * targets.c: Likewise.
594         * elf32-sh64-com.c: Delete.
595         * elf32-sh64.c: Delete.
596         * elf32-sh64.h: Delete.
597         * elf64-sh64.c: Delete.
598         * Makefile.in: Regenerate.
599         * bfd-in2.h: Regenerate.
600         * configure: Regenerate.
601         * po/SRC-POTFILES.in: Regenerate.
602
603 2018-04-16  Alan Modra  <amodra@gmail.com>
604
605         * Makefile.am: Remove sh-symbianelf support.
606         * config.bfd: Likewise.
607         * configure.ac: Likewise.
608         * targets.c: Likewise.
609         * elf32-sh-symbian.c: Delete.
610         * Makefile.in: Regenerate.
611         * configure: Regenerate.
612         * po/SRC-POTFILES.in: Regenerate.
613
614 2018-04-16  Alan Modra  <amodra@gmail.com>
615
616         * Makefile.am: Remove vax-bsd and vax-ultrix support.
617         * config.bfd: Likewise.
618         * configure.ac: Likewise.
619         * targets.c: Likewise.
620         * vaxbsd.c: Delete.
621         * Makefile.in: Regenerate.
622         * configure: Regenerate.
623         * po/SRC-POTFILES.in: Regenerate.
624
625 2018-04-16  Alan Modra  <amodra@gmail.com>
626
627         * Makefile.am: Remove w65 support.
628         * archures.c: Likewise.
629         * coffcode.h: Likewise.
630         * config.bfd: Likewise.
631         * configure.ac: Likewise.
632         * targets.c: Likewise.
633         * coff-w65.c: Delete.
634         * cpu-w65.c: Delete.
635         * Makefile.in: Regenerate.
636         * bfd-in2.h: Regenerate.
637         * configure: Regenerate.
638         * po/SRC-POTFILES.in: Regenerate.
639
640 2018-04-16  Alan Modra  <amodra@gmail.com>
641
642         * Makefile.am: Remove we32k support.
643         * archures.c: Likewise.
644         * coffcode.h: Likewise.
645         * config.bfd: Likewise.
646         * configure.ac: Likewise.
647         * targets.c: Likewise.
648         * coff-we32k.c: Delete.
649         * cpu-we32k.c: Delete.
650         * Makefile.in: Regenerate.
651         * bfd-in2.h: Regenerate.
652         * configure: Regenerate.
653         * po/SRC-POTFILES.in: Regenerate.
654
655 2018-04-16  Alan Modra  <amodra@gmail.com>
656
657         * Makefile.am: Remove m88k support.
658         * aoutx.h: Likewise.
659         * archures.c: Likewise.
660         * coffcode.h: Likewise.
661         * coffswap.h: Likewise.
662         * config.bfd: Likewise.
663         * configure.ac: Likewise.
664         * cpu-ns32k.c: Likewise.
665         * elf32-nds32.c: Likewise.
666         * mach-o.c: Likewise.
667         * netbsd-core.c: Likewise.
668         * reloc.c: Likewise.
669         * targets.c: Likewise.
670         * coff-m88k.c: Delete.
671         * cpu-m88k.c: Delete.
672         * elf32-m88k.c: Delete.
673         * hosts/m88kmach3.h: Delete.
674         * m88kmach3.c: Delete.
675         * m88kopenbsd.c: Delete.
676         * Makefile.in: Regenerate.
677         * bfd-in2.h: Regenerate.
678         * configure: Regenerate.
679         * po/SRC-POTFILES.in: Regenerate.
680
681 2018-04-16  Alan Modra  <amodra@gmail.com>
682
683         * Makefile.am: Remove i370 support.
684         * archures.c: Likewise.
685         * config.bfd: Likewise.
686         * configure.ac: Likewise.
687         * targets.c: Likewise.
688         * cpu-i370.c: Delete.
689         * elf32-i370.c: Delete.
690         * Makefile.in: Regenerate.
691         * bfd-in2.h: Regenerate.
692         * configure: Regenerate.
693         * po/SRC-POTFILES.in: Regenerate.
694
695 2018-04-16  Alan Modra  <amodra@gmail.com>
696
697         * Makefile.am: Remove h8500 support.
698         * archures.c: Likewise.
699         * coffcode.h: Likewise.
700         * config.bfd: Likewise.
701         * configure.ac: Likewise.
702         * targets.c: Likewise.
703         * coff-h8500.c: Delete.
704         * cpu-h8500.c: Delete.
705         * Makefile.in: Regenerate.
706         * bfd-in2.h: Regenerate.
707         * configure: Regenerate.
708         * po/SRC-POTFILES.in: Regenerate.
709
710 2018-04-16  Alan Modra  <amodra@gmail.com>
711
712         * Makefile.am: Remove h8300-coff support.
713         * coffcode.h: Likewise.
714         * config.bfd: Likewise.
715         * configure.ac: Likewise.
716         * reloc16.c: Likewise.
717         * targets.c: Likewise.
718         * coff-h8300.c: Delete.
719         * Makefile.in: Regenerate.
720         * configure: Regenerate.
721         * po/SRC-POTFILES.in: Regenerate.
722
723 2018-04-16  Alan Modra  <amodra@gmail.com>
724
725         * Makefile.am: Remove IEEE 695 support.
726         * archures.c: Likewise.
727         * bfd.c: Likewise.
728         * config.bfd: Likewise.
729         * configure.ac: Likewise.
730         * doc/bfd.texinfo: Likewise.
731         * doc/bfdint.texi: Likewise.
732         * doc/bfdsumm.texi: Likewise.
733         * section.c: Likewise.
734         * targets.c: Likewise.
735         * ieee.c: Delete.
736         * libieee.h: Delete.
737         * Makefile.in: Regenerate.
738         * bfd-in2.h: Regenerate.
739         * configure: Regenerate.
740         * po/SRC-POTFILES.in: Regenerate.
741
742 2018-04-16  Alan Modra  <amodra@gmail.com>
743
744         * config.bfd: Remove tandem support.
745
746 2018-04-16  Alan Modra  <amodra@gmail.com>
747
748         * Makefile.am: Remove newsos3 support.
749         * aoutx.h: Likewise.
750         * config.bfd: Likewise.
751         * configure.ac: Likewise.
752         * targets.c: Likewise.
753         * newsos3.c: Delete.
754         * Makefile.in: Regenerate.
755         * configure: Regenerate.
756         * po/SRC-POTFILES.in: Regenerate.
757
758 2018-04-16  Alan Modra  <amodra@gmail.com>
759
760         * Makefile.am: Remove netware support.
761         * bfd-in.h: Likewise.
762         * bfd.c: Likewise.
763         * config.bfd: Likewise.
764         * configure.ac: Likewise.
765         * doc/bfdint.texi: Likewise.
766         * ecoff.c: Likewise.
767         * targets.c: Likewise.
768         * libnlm.h: Delete.
769         * nlm-target.h: Delete.
770         * nlm.c: Delete.
771         * nlm32-alpha.c: Delete.
772         * nlm32-i386.c: Delete.
773         * nlm32-ppc.c: Delete.
774         * nlm32-sparc.c: Delete.
775         * nlm32.c: Delete.
776         * nlm64.c: Delete.
777         * nlmcode.h: Delete.
778         * nlmswap.h: Delete.
779         * Makefile.in: Regenerate.
780         * bfd-in2.h: Regenerate.
781         * configure: Regenerate.
782         * po/SRC-POTFILES.in: Regenerate.
783
784 2018-04-16  Alan Modra  <amodra@gmail.com>
785
786         * archures.c: Remove tahoe support.
787         * config.bfd: Likewise.
788         * configure.ac: Likewise.
789         * hosts/tahoe.h: Delete.
790         * bfd-in2.h: Regenerate.
791         * configure: Regenerate.
792
793 2018-04-14  Alan Modra  <amodra@gmail.com>
794
795         * elf-bfd.h (struct elf_backend_data): Add relropagesize.
796         * elfxx-target.h (ELF_RELROPAGESIZE): Provide default and
797         sanity test.
798         (elfNN_bed): Init relropagesize.
799         * bfd.c (bfd_emul_get_commonpagesize): Add boolean param to
800         select relropagesize.
801         * elf32-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
802         (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
803         (ELF_MINPAGESIZE): Don't define.
804         * elf64-ppc.c (ELF_COMMONPAGESIZE): Define as 0x1000.
805         (ELF_RELROPAGESIZE): Define as ELF_MAXPAGESIZE.
806         * bfd-in2.h: Regenerate.
807
808 2018-04-14  Alan Modra  <amodra@gmail.com>
809
810         * elf32-ppc.c (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Don't depend
811         on __QNXTARGET__ define.
812
813 2018-04-14  Alan Modra  <amodra@gmail.com>
814
815         * config.bfd: Add powerpc-*-lynxos* and powerpc-*-windiss*
816         to obsolete list.
817
818 2018-04-11  Alan Modra  <amodra@gmail.com>
819
820         * aout-adobe.c: Delete.
821         * bout.c: Delete.
822         * coff-i860.c: Delete.
823         * coff-i960.c: Delete.
824         * cpu-i860.c: Delete.
825         * cpu-i960.c: Delete.
826         * elf32-i860.c: Delete.
827         * elf32-i960.c: Delete.
828         * hosts/i860mach3.h: Delete.
829         * Makefile.am: Remove i860, i960, bout, and adobe support.
830         * archures.c: Remove i860 and i960 support.
831         * coffcode.h: Likewise.
832         * reloc.c: Likewise.
833         * aoutx.h: Comment updates.
834         * archive.c: Remove BOUT and i960 support.
835         * bfd.c: Remove BOUT support.
836         * coffswap.h: Remove i960 support.
837         * config.bfd: Remove i860, i960 and adobe targets.
838         * configure.ac: Remove adode, bout, i860, i960, icoff targets.
839         * targets.c: Likewise.
840         * ieee.c: Remove i960 support.
841         * mach-o.c: Remove i860 support.
842         * Makefile.in: Regenerate.
843         * bfd-in2.h: Regenerate.
844         * configure: Regenerate.
845         * libbfd.h: Regenerate.
846         * po/SRC-POTFILES.in: Regenerate.
847
848 2018-04-09  Maciej W. Rozycki  <macro@mips.com>
849
850         * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
851         in the BFD symbol referred by the relocation.
852         (mips_elf64_write_rela): Likewise.
853
854 2018-04-09  Maciej W. Rozycki  <macro@mips.com>
855
856         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
857         error for out-of-range `r_sym' values.
858
859 2018-04-09  Alan Modra  <amodra@gmail.com>
860
861         * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
862         (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
863         (ppc64_elf_check_relocs): Set has_pltcall.
864         (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
865         (ppc64_elf_inline_plt): New function.
866         (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
867         * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
868         * elf32-ppc.c (has_pltcall): Define.
869         (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
870         (ppc_elf_check_relocs): Set has_pltcall.
871         (ppc_elf_inline_plt): New function.
872         (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
873         (ppc_elf_size_dynamic_sections): Likewise.
874         * elf32-ppc.h (ppc_elf_inline_plt): Declare.
875
876 2018-04-09  Alan Modra  <amodra@gmail.com>
877
878         * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
879         (is_plt_seq_reloc): New function.
880         (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
881         (ppc_elf_tls_optimize): Handle inline plt call sequence.
882         (ppc_elf_relax_section): Handle PLTCALL reloc.
883         (ppc_elf_relocate_section): Nop out inline plt call sequence when
884         resolving locally.
885         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
886         R_PPC64_PLTCALL entries.  Comment R_PPC64_TOCSAVE.
887         (has_tls_get_addr_call): Correct comment.
888         (is_branch_reloc): Add PLTCALL.
889         (is_plt_seq_reloc): New function.
890         (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc.  Set
891         has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD.  Create plt
892         entry for R_PPC64_PLTCALL.
893         (ppc64_elf_tls_optimize): Handle inline plt call sequence.
894         (ppc_type_of_stub): Handle PLTCALL reloc.
895         (toc_adjusting_stub_needed): Likewise.
896         (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
897         reloc insn.  Nop out inline plt call sequence when resolving
898         locally.  Handle __tls_get_addr inline plt call optimization.
899
900 2018-04-09  Alan Modra  <amodra@gmail.com>
901
902         * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
903         (struct ppc_stub_hash_entry): Add symtype field.
904         (PLT_KEEP): Define.
905         (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
906         (create_linkage_sections): Create pltlocal and relpltlocal.
907         (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
908         Set PLT_KEEP.
909         (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
910         (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
911         (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
912         Keep PLT entries for inline calls against locals.
913         (ppc_build_one_stub): Use pltlocal as appropriate.
914         (ppc_size_one_stub): Likewise.
915         (ppc64_elf_size_stubs): Set symtype.
916         (build_global_entry_stubs_and_plt): Init pltlocal and write
917         relpltlocal for globals.
918         (write_plt_relocs_for_local_syms): Likewise for local syms.
919         (ppc64_elf_relocate_section): Support PLT for local syms.
920         * elf32-ppc.c (PLT_KEEP): Define.
921         (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
922         (ppc_elf_create_glink): Create pltlocal and relpltlocal.
923         (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
924         Set PLT_KEEP.  Adjust update_local_sym_info call.
925         (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
926         (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
927         (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
928         (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
929         (write_global_sym_plt): Init pltlocal and write relpltlocal.
930         (ppc_finish_symbols): Likewise for locals.
931
932 2018-04-09  Alan Modra  <amodra@gmail.com>
933
934         * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
935         for local symbols to..
936         (write_plt_relocs_for_local_syms): ..here.  New function.
937         (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
938         global symbols to..
939         (build_global_entry_stubs_and_plt): ..here.  Rename from
940         build_global_entry_stubs.
941         (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
942         Call write_plt_relocs_for_local_syms.
943         * elf32-ppc.c (get_sym_h): New function.
944         (ppc_elf_relax_section): Use get_sym_h.
945         (ppc_elf_relocate_section): Move output of PLT relocs and glink
946         stubs for local symbols to..
947         (ppc_finish_symbols): ..here.  New function.
948         (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
949         global syms to..
950         (write_global_sym_plt): ..here.  New function.
951         * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
952         (ppc_finish_symbols): Declare.
953
954 2018-04-09  Alan Modra  <amodra@gmail.com>
955
956         * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
957         (ppc_elf_relocate_section): Likewise.
958         * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
959         (ppc64_elf_relocate_section): Likewise.  Correct PLT16
960         resolution to plt entry relative to toc pointer.
961
962 2018-04-09  Alan Modra  <amodra@gmail.com>
963
964         * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
965         TLS_TPRELGD, TLS_EXPLICIT):  Renumber.  Test TLS_TLS throughout
966         file when other TLS flags are tested in a mask.
967         (TLS_MARK, NON_GOT): Define.
968         (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
969         (update_local_sym_info): Don't create got entry when NON_GOT.
970         (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
971         Set TLS_MARK.
972         (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
973         (ppc64_elf_relocate_section): Likewise.
974         (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
975         __tls_get_addr calls lacking a marker reloc.
976         * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
977         TLS_TPRELGD): Renumber.  Update comment.
978         (TLS_MARK, NON_GOT): Define.
979         (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
980         (update_local_sym_info): Don't create got entry when NON_GOT.
981         (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
982         Set TLS_MARK.
983         (ppc_elf_tls_optimize): Don't attempt to optimize indirect
984         __tls_get_addr calls lacking a marker reloc.
985
986 2018-04-06  H.J. Lu  <hongjiu.lu@intel.com>
987
988         * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
989         R_X86_64_converted_reloc_bit.
990
991 2018-04-05  H.J. Lu  <hongjiu.lu@intel.com>
992
993         PR gas/22318
994         * configure: Regenerated.
995
996 2018-04-05  Alan Modra  <amodra@gmail.com>
997
998         * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
999         (elf_hppa_info_to_howto_rel): Likewise.
1000
1001 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1002
1003         * elf-hppa.h (elf_hppa_info_to_howto): Also return
1004         unsuccessfully for unimplemented relocations.
1005         (elf_hppa_info_to_howto_rel): Likewise.
1006
1007 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1008
1009         * elf32-i860.c (lookup_howto): Add `abfd' parameter.  Set the
1010         `bfd_error_bad_value' error and call `_bfd_error_handler' on a
1011         howto lookup failure.
1012         (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
1013         accordingly.
1014         (elf32_i860_info_to_howto_rela): Likewise.
1015         (elf32_i860_relocate_splitn): Likewise.
1016         (elf32_i860_relocate_pc16): Likewise.
1017         (elf32_i860_relocate_pc26): Likewise.
1018         (elf32_i860_relocate_section): Likewise.
1019
1020 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1021
1022         * elf32-visium.c (visium_info_to_howto_rela): Correct the range
1023         check for `visium_elf_howto_table' table access.
1024
1025 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1026
1027         * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
1028         check for `iq2000_elf_howto_table' table access.
1029
1030 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1031
1032         * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
1033         for `elf32_frv_howto_table' table access.
1034
1035 2018-04-04  Maciej W. Rozycki  <macro@mips.com>
1036
1037         * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
1038         unsuccessfully for placeholder howtos.
1039         * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1040         * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
1041
1042 2018-03-29  Maciej W. Rozycki  <macro@mips.com>
1043
1044         * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
1045         `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
1046
1047 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1048
1049         * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
1050         ATTRIBUTE_UNUSED from `abfd'.
1051
1052 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1053
1054         * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
1055         `_bfd_error_handler' call formatting.
1056
1057 2018-03-28  Maciej W. Rozycki  <macro@mips.com>
1058
1059         * elf32-mips.c (mips_info_to_howto_rel): Call
1060         `mips_elf32_rtype_to_howto' directly rather than via
1061         `->elf_backend_mips_rtype_to_howto'.
1062
1063 2018-03-28  Renlin Li  <renlin.li@arm.com>
1064
1065         PR ld/22970
1066         * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
1067         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1068         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1069         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1070         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1071         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1072         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1073         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1074         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1075         (elfNN_aarch64_final_link_relocate): Support new relocations.
1076         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
1077         relocations.
1078         (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
1079
1080 2018-03-28  Renlin Li  <renlin.li@arm.com>
1081
1082         PR ld/22970
1083         * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
1084         BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
1085         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
1086         BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
1087         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
1088         BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
1089         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
1090         BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
1091         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
1092         BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
1093         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
1094         TLSLE_LDST16_TPREL_LO12,
1095         TLSLE_LDST16_TPREL_LO12_NC,
1096         TLSLE_LDST32_TPREL_LO12,
1097         TLSLE_LDST32_TPREL_LO12_NC,
1098         TLSLE_LDST64_TPREL_LO12,
1099         TLSLE_LDST64_TPREL_LO12_NC,
1100         TLSLE_LDST8_TPREL_LO12,
1101         TLSLE_LDST8_TPREL_LO12_NC.
1102         * bfd-in2.h: Regenerated.
1103         * libbfd.h: Regenerated.
1104
1105 2018-03-28  Eric Botcazou  <ebotcazou@adacore.com>
1106
1107         PR ld/22972
1108         * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
1109         has_old_style_got_reloc.
1110         (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
1111         relocations.  Fix a couple of long lines.
1112         (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
1113         a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
1114         GOT relocations.
1115
1116 2018-03-25  H.J. Lu  <hongjiu.lu@intel.com>
1117
1118         PR ld/23000
1119         * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
1120         ENDBR64 to the TLSDESC PLT entry.
1121
1122 2018-03-21  Alan Modra  <amodra@gmail.com>
1123
1124         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
1125         symbols.  Use size_t counts.  Delete redundant opd test.
1126
1127 2018-03-21  Alan Modra  <amodra@gmail.com>
1128
1129         * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
1130
1131 2018-03-21  Alan Modra  <amodra@gmail.com>
1132
1133         * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
1134         field unsigned.
1135         (update_local_sym_info): Likewise for local_got_tls_masks.
1136         (ppc_elf_tls_optimize): Likewise for lgot_masks.
1137
1138 2018-03-21  Alan Modra  <amodra@gmail.com>
1139
1140         * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
1141         (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
1142         do in size_dynamic_sections.
1143
1144 2018-03-21  Alan Modra  <amodra@gmail.com>
1145
1146         * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
1147         without first checking array bounds.
1148         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1149
1150 2018-03-20  H.J. Lu  <hongjiu.lu@intel.com>
1151
1152         PR ld/22983
1153         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
1154         non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
1155
1156 2018-03-19  Nick Clifton  <nickc@redhat.com>
1157
1158         * po/es.po: Updated Spanish translation.
1159
1160 2018-03-15  Max Filippov  <jcmvbkbc@gmail.com>
1161
1162         * elf32-xtensa.c (xlate_map_entry): Change types of address
1163         fields from 'unsigned' to 'bfd_vma'.
1164         (xlate_offset_with_removed_text): Use struct xlate_map_entry as
1165         the key argument to bsearch. Allow offsets past the end of a
1166         section, use the last map entry for translation of such offsets.
1167
1168 2018-03-15  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
1169
1170         * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
1171         Not support the target feature.
1172         (nds32_elf_ex9_itb_base): Likewise.
1173         (nds32_elf_ex9_import_table): Likewise.
1174         (nds32_elf_ex9_finish): Likewise.
1175         (nds32_elf_ex9_reloc_jmp): Likewise.
1176         (nds32_elf_get_insn_with_reg): Likewise.
1177         (nds32_get_local_syms): Likewise.
1178         (nds32_elf_ex9_replace_instruction): Likewise.
1179         (nds32_elf_ifc_calc): Likewise.
1180         (nds32_elf_ifc_finish): Likewise.
1181         (nds32_elf_ifc_replace): Likewise.
1182         (nds32_elf_ifc_reloc): Likewise.
1183
1184 2018-03-14  Alan Modra  <amodra@gmail.com>
1185
1186         * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
1187         sfpr size added before defining alias symbols.
1188         (ppc64_elf_build_stubs): Add stub section padding before
1189         copying sfpr contents and defining save/restore alias symbols.
1190
1191 2018-03-14  H.J. Lu  <hongjiu.lu@intel.com>
1192
1193         PR ld/20882
1194         * elflink.c (elf_gc_mark_debug_section): Also check the local
1195         debug definition section.
1196
1197 2018-03-13  Nick Clifton  <nickc@redhat.com>
1198
1199         PR 22113
1200         * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
1201         function.  Add an end address parameter.  Check access of the data
1202         pointer to make sure that they do not extend beyond the end
1203         address.  Return FALSE if any check fails.  Add the end address
1204         pointer to the ui structure.
1205         (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
1206         codes to make sure that they do not extend beyond the end address
1207         pointer.  Print an error message and return immediately if any
1208         check fails.
1209
1210 2018-03-09  Nick Clifton  <nickc@redhat.com>
1211
1212         * elf64-s390.c (elf_s390_relocate_section): Move check for
1213         relocations against non-allocated sections to before the code that
1214         handles ifunc relocations.
1215         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1216         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
1217         relocs against IFUNC symbols in non-allocated sections as relocs
1218         against FUNC symbols.
1219         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1220
1221 2018-03-08  H.J. Lu  <hongjiu.lu@intel.com>
1222
1223         PR ld/22929
1224         * elf32-i386.c (elf_i386_relocate_section): Treat relocation
1225         against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
1226         relocation against FUNC symbol.
1227         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1228
1229 2018-03-07  Renlin Li  <renlin.li@arm.com>
1230
1231         PR ld/20402
1232         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
1233         symbol, and don't emit relocation in specific case.
1234
1235 2018-03-07  Alan Modra  <amodra@gmail.com>
1236
1237         * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
1238         (mips_elf64_slurp_one_reloc_table): Pass on error.
1239
1240 2018-03-03  James Cowgill  <james.cowgill@mips.com>
1241             Maciej W. Rozycki  <macro@mips.com>
1242
1243         PR ld/21900
1244         * elfxx-mips.c (mips_elf_calculate_relocation): Only return
1245         after calling `undefined_symbol' hook if this is an error
1246         condition.  Assume the value of 0 for the symbol requested
1247         otherwise.
1248
1249 2018-03-02  Jim Wilson  <jimw@sifive.com>
1250
1251         PR 22903
1252         * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
1253         and nop instead of 4.
1254         (elfNN_arch64_build_stubs): Add nop after branch.  Increase size by
1255         8 instead of 4.
1256
1257 2018-03-01  Jim Wilson  <jimw@sifive.com>
1258
1259         PR 22756
1260         * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
1261         else if instead of if.
1262
1263 2018-03-01  Alan Modra  <amodra@gmail.com>
1264
1265         * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
1266
1267 2018-02-28  Alan Modra  <amodra@gmail.com>
1268
1269         PR 22887
1270         * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
1271
1272 2018-02-28  Nick Clifton  <nickc@redhat.com>
1273
1274         PR 22895
1275         PR 22893
1276         * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
1277         pointer.  Drop unused abfd parameter.  Check the size of the block
1278         before initialising the data field.  Return the end pointer if the
1279         size is invalid.
1280         (read_attribute_value): Adjust invocations of read_n_bytes.
1281
1282         PR 22894
1283         * dwarf1.c (parse_die): Check the length of form blocks before
1284         advancing the data pointer.
1285
1286 2018-02-28  Alan Modra  <amodra@gmail.com>
1287
1288         PR 22887
1289         * aoutx.h (translate_symbol_table): Print an error message and set
1290         bfd_error on finding an invalid name string offset.
1291
1292 2018-02-27  H.J. Lu  <hongjiu.lu@intel.com>
1293
1294         * config.in: Regenerated.
1295         * configure: Likewise.
1296         * configure.ac: Add --enable-separate-code.
1297         (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED.  Default
1298         to 1 for Linux/x86 targets,
1299         * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
1300         DEFAULT_LD_Z_SEPARATE_CODE is 1.
1301
1302 2018-02-27  Nick Clifton  <nickc@redhat.com>
1303
1304         * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
1305         message.
1306         * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
1307         * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
1308         * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
1309         * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
1310         * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1311         * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
1312         * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1313         * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
1314         * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1315
1316         PR 22875
1317         * elf-bfd.h (struct elf_backend_data): Change the return type of
1318         the elf_info_to_howto and elf_info_to_howto_rel function pointers
1319         to bfd_boolean.
1320         * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
1321         value from the info_to_howto function and fail if that function
1322         failed.
1323         * elf32-h8300.c (elf32_h8_relocate_section): Check return value
1324         from the info_to_howto function.
1325         (elf32_h8_relax_section): Likewise.
1326         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1327         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1328         * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1329         * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1330         * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1331         * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
1332         * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
1333         * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
1334         * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1335         * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
1336         (riscv_elf_relocate_section): Likewise.
1337         * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
1338         bfd_boolean.  Issue an error message, set an error value and
1339         return FALSE if the reloc is not recognized.
1340         (elf_hppa_info_to_howto_rel): Likewise.
1341         * elf-m10200.c (mn10200_info_to_howto): Likewise.
1342         * elf-m10300.c (mn10300_info_to_howto): Likewise.
1343         * elf.c (_bfd_elf_no_info_to_howto): Likewise.
1344         * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1345         * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
1346         * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1347         * elf32-bfin.c (bfin_info_to_howto): Likewise.
1348         * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1349         * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
1350         * elf32-cris.c (elf_cr16c_info_to_howto_rel)
1351         (cris_info_to_howto_rela): Likewise.
1352         * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1353         * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1354         * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
1355         Likewise.
1356         * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
1357         (elf32_dlx_info_to_howto_rel): Likewise.
1358         * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1359         * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1360         * elf32-frv.c (frv_info_to_howto_rela)
1361         (frvfdpic_info_to_howto_rel): Likewise.
1362         * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
1363         * elf32-gen.c (elf_generic_info_to_howto)
1364         (elf_generic_info_to_howto_rel): Likewise.
1365         * elf32-h8300.c (elf32_h8_info_to_howto)
1366         (elf32_h8_info_to_howto_rel): Likewise.
1367         * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1368         * elf32-i386.c (elf_i386_reloc_type_lookup)
1369         (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
1370         * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
1371         Likewise.
1372         * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1373         * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1374         * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1375         * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1376         * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1377         * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
1378         Likewise.
1379         * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1380         * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1381         * elf32-m68k.c (rtype_to_howto): Likewise.
1382         * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1383         * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1384         * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1385         * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1386         * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1387         Likewise.
1388         * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1389         * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1390         * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1391         * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
1392         Likewise.
1393         * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
1394         * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1395         * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1396         * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1397         * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
1398         * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1399         * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1400         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1401         * elf32-score.c (s3_bfd_score_info_to_howto)
1402         (_bfd_score_info_to_howto): Likewise.
1403         * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
1404         * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1405         * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1406         * elf32-tic6x.c (elf32_tic6x_info_to_howto)
1407         (elf32_tic6x_info_to_howto_rel): Likewise.
1408         * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
1409         * elf32-v850.c (v850_elf_info_to_howto_rel)
1410         (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
1411         * elf32-vax.c (rtype_to_howto): Likewise.
1412         * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1413         * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
1414         (elf32_wasm32_info_to_howto_rela): Likewise.
1415         * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
1416         * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1417         * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
1418         * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1419         * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1420         * elf64-gen.c (elf_generic_info_to_howto)
1421         (elf_generic_info_to_howto_rel): Likewise.
1422         * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
1423         * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
1424         * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1425         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1426         * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
1427         * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
1428         Likewise.
1429         * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
1430         * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
1431         Likewise.
1432         * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
1433         * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
1434         * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
1435         * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
1436         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
1437         * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
1438         * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
1439         * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
1440         * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
1441         * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
1442         Default to NULL.
1443
1444 2018-02-26  Jim Wilson  <jimw@sifive.com>
1445             Stephan Schreiber <info@fs-driver.org>
1446
1447         PR 15904
1448         * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
1449         call, set changed_contents and changed_relocs.  Likewise after
1450         successful ia64_elf_relax_br call.
1451
1452 2018-02-26  Alan Modra  <amodra@gmail.com>
1453
1454         * elf.c (assign_file_positions_except_relocs): Don't segfault
1455         when actual number of phdrs is less than allocated.  Delete
1456         outdated comment.  Formatting.
1457
1458 2018-02-26  Alan Modra  <amodra@gmail.com>
1459
1460         * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
1461         * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
1462         * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
1463         * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
1464         * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
1465         * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
1466         * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
1467         * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1468         * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
1469         * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
1470         error/warning messages.
1471
1472 2018-02-26  Alan Modra  <amodra@gmail.com>
1473
1474         * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
1475         * syms.c: Standardize error/warning messages.
1476
1477 2018-02-26  Alan Modra  <amodra@gmail.com>
1478
1479         * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
1480         * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
1481         * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
1482         * peXXigen.c, * peicode.h: Standardize error/warning messages.
1483
1484 2018-02-26  Alan Modra  <amodra@gmail.com>
1485
1486         * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
1487
1488 2018-02-26  Alan Modra  <amodra@gmail.com>
1489
1490         * elfxx-mips.c: Standardize error/warning messages.
1491
1492 2018-02-26  Alan Modra  <amodra@gmail.com>
1493
1494         * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
1495         * elflink.c: Standardize error/warning messages.  Replace use of
1496         linker callback einfo with _bfd_error_handler when possible.
1497
1498 2018-02-26  Alan Modra  <amodra@gmail.com>
1499
1500         * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
1501         * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
1502         * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
1503         * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
1504         * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1505         * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1506         * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
1507         * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1508         * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1509         * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
1510         * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1511         * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
1512         * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
1513         * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
1514         * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
1515         * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
1516         * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
1517         * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
1518         * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1519         * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
1520         * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
1521         unrecognized/unsupported reloc message.
1522
1523 2018-02-26  Alan Modra  <amodra@gmail.com>
1524
1525         * elf32-ppc.c: Standardize error/warning messages.  Use
1526         _bfd_error_handler rather than einfo when einfo features not used.
1527         * elf64-ppc.c: Likewise.
1528
1529 2018-02-23  Alan Modra  <amodra@gmail.com>
1530
1531         PR 22881
1532         * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
1533         segment if no matching LOAD segment.
1534
1535 2018-02-23  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
1536
1537         * elf32-nds32.h: Define mask for ict_model.
1538
1539 2018-02-20  Jason Duerstock  <jason.duerstock@gmail.com>
1540
1541         * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
1542
1543 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
1544
1545         Revert
1546         2018-01-12  Vlad Ivanov  <vlad@ivanov.email>
1547
1548         * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1549         .reginfo section has wrong size.
1550
1551 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
1552
1553         * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
1554         SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
1555         `.MIPS.abiflags' sections.
1556         (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
1557         section's end.
1558
1559 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
1560
1561         * section.c (SEC_FIXED_SIZE): New macro.
1562         * bfd-in2.h: Regenerate.
1563
1564 2018-02-19  Maciej W. Rozycki  <macro@mips.com>
1565
1566         * section.c (SEC_HAS_GOT_REF): Remove macro.
1567         * bfd-in2.h: Regenerate.
1568
1569 2018-02-19  Alan Modra  <amodra@gmail.com>
1570
1571         * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
1572         arguments.
1573         * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
1574         * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
1575         (_bfd_riscv_relax_pc): Likewise and fix typos.
1576         * libbfd-in.h (_bfd_error_handler): Add attribute printf.
1577         * libbfd.h: Regenerate.
1578
1579 2018-02-19  Alan Modra  <amodra@gmail.com>
1580
1581         * dwarf2.c (read_section): Don't use 'll' format modifier.
1582         (find_abstract_instance): Likewise.
1583         * elfcore.h (elf_core_file_p): Likewise.
1584
1585 2018-02-19  Alan Modra  <amodra@gmail.com>
1586
1587         * bfd-in.h: Include inttypes.h or if not available define
1588         PRId64, PRIu64 and PRIx64.
1589         * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
1590         modifier to print bfd_vma.
1591         * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
1592         * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
1593         * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
1594         * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
1595         * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
1596         * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
1597         * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
1598         * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
1599         * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
1600         * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1601         * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
1602         * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
1603         * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
1604         * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
1605         * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
1606         and cast input to uint64_t, and similarly for Ld and Lu.
1607         * bfd-in2.h: Regenerate.
1608
1609 2018-02-19  Alan Modra  <amodra@gmail.com>
1610
1611         * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
1612         * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
1613         * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
1614         * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
1615         * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
1616         * reloc.c: Replace use of %R and %T in format strings passed to
1617         einfo and friends by %pR and %pT.
1618
1619 2018-02-19  Alan Modra  <amodra@gmail.com>
1620
1621         * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
1622         of %A and %B.
1623         * aout-adobe.c: Update all messages using %A and %B.
1624         * aout-cris.c: Likewise.
1625         * aoutx.h: Likewise.
1626         * archive.c: Likewise.
1627         * binary.c: Likewise.
1628         * cache.c: Likewise.
1629         * coff-alpha.c: Likewise.
1630         * coff-arm.c: Likewise.
1631         * coff-i860.c: Likewise.
1632         * coff-mcore.c: Likewise.
1633         * coff-ppc.c: Likewise.
1634         * coff-rs6000.c: Likewise.
1635         * coff-sh.c: Likewise.
1636         * coff-tic4x.c: Likewise.
1637         * coff-tic54x.c: Likewise.
1638         * coff-tic80.c: Likewise.
1639         * coff64-rs6000.c: Likewise.
1640         * coffcode.h: Likewise.
1641         * coffgen.c: Likewise.
1642         * cofflink.c: Likewise.
1643         * coffswap.h: Likewise.
1644         * compress.c: Likewise.
1645         * cpu-arm.c: Likewise.
1646         * ecoff.c: Likewise.
1647         * elf-attrs.c: Likewise.
1648         * elf-eh-frame.c: Likewise.
1649         * elf-ifunc.c: Likewise.
1650         * elf-m10300.c: Likewise.
1651         * elf-properties.c: Likewise.
1652         * elf-s390-common.c: Likewise.
1653         * elf.c: Likewise.
1654         * elf32-arc.c: Likewise.
1655         * elf32-arm.c: Likewise.
1656         * elf32-avr.c: Likewise.
1657         * elf32-bfin.c: Likewise.
1658         * elf32-cr16.c: Likewise.
1659         * elf32-cr16c.c: Likewise.
1660         * elf32-cris.c: Likewise.
1661         * elf32-crx.c: Likewise.
1662         * elf32-d10v.c: Likewise.
1663         * elf32-d30v.c: Likewise.
1664         * elf32-epiphany.c: Likewise.
1665         * elf32-fr30.c: Likewise.
1666         * elf32-frv.c: Likewise.
1667         * elf32-gen.c: Likewise.
1668         * elf32-hppa.c: Likewise.
1669         * elf32-i370.c: Likewise.
1670         * elf32-i386.c: Likewise.
1671         * elf32-i960.c: Likewise.
1672         * elf32-ip2k.c: Likewise.
1673         * elf32-iq2000.c: Likewise.
1674         * elf32-lm32.c: Likewise.
1675         * elf32-m32c.c: Likewise.
1676         * elf32-m32r.c: Likewise.
1677         * elf32-m68hc11.c: Likewise.
1678         * elf32-m68hc12.c: Likewise.
1679         * elf32-m68hc1x.c: Likewise.
1680         * elf32-m68k.c: Likewise.
1681         * elf32-mcore.c: Likewise.
1682         * elf32-mep.c: Likewise.
1683         * elf32-metag.c: Likewise.
1684         * elf32-microblaze.c: Likewise.
1685         * elf32-moxie.c: Likewise.
1686         * elf32-msp430.c: Likewise.
1687         * elf32-mt.c: Likewise.
1688         * elf32-nds32.c: Likewise.
1689         * elf32-nios2.c: Likewise.
1690         * elf32-or1k.c: Likewise.
1691         * elf32-pj.c: Likewise.
1692         * elf32-ppc.c: Likewise.
1693         * elf32-rl78.c: Likewise.
1694         * elf32-rx.c: Likewise.
1695         * elf32-s390.c: Likewise.
1696         * elf32-score.c: Likewise.
1697         * elf32-score7.c: Likewise.
1698         * elf32-sh-symbian.c: Likewise.
1699         * elf32-sh.c: Likewise.
1700         * elf32-sh64.c: Likewise.
1701         * elf32-sparc.c: Likewise.
1702         * elf32-spu.c: Likewise.
1703         * elf32-tic6x.c: Likewise.
1704         * elf32-tilepro.c: Likewise.
1705         * elf32-v850.c: Likewise.
1706         * elf32-vax.c: Likewise.
1707         * elf32-visium.c: Likewise.
1708         * elf32-wasm32.c: Likewise.
1709         * elf32-xgate.c: Likewise.
1710         * elf32-xtensa.c: Likewise.
1711         * elf64-alpha.c: Likewise.
1712         * elf64-gen.c: Likewise.
1713         * elf64-hppa.c: Likewise.
1714         * elf64-ia64-vms.c: Likewise.
1715         * elf64-mmix.c: Likewise.
1716         * elf64-ppc.c: Likewise.
1717         * elf64-s390.c: Likewise.
1718         * elf64-sh64.c: Likewise.
1719         * elf64-sparc.c: Likewise.
1720         * elf64-x86-64.c: Likewise.
1721         * elfcode.h: Likewise.
1722         * elfcore.h: Likewise.
1723         * elflink.c: Likewise.
1724         * elfnn-aarch64.c: Likewise.
1725         * elfnn-ia64.c: Likewise.
1726         * elfnn-riscv.c: Likewise.
1727         * elfxx-mips.c: Likewise.
1728         * elfxx-sparc.c: Likewise.
1729         * elfxx-tilegx.c: Likewise.
1730         * elfxx-x86.c: Likewise.
1731         * hpux-core.c: Likewise.
1732         * ieee.c: Likewise.
1733         * ihex.c: Likewise.
1734         * libbfd.c: Likewise.
1735         * linker.c: Likewise.
1736         * mach-o.c: Likewise.
1737         * merge.c: Likewise.
1738         * mmo.c: Likewise.
1739         * oasys.c: Likewise.
1740         * pdp11.c: Likewise.
1741         * pe-mips.c: Likewise.
1742         * peXXigen.c: Likewise.
1743         * peicode.h: Likewise.
1744         * reloc.c: Likewise.
1745         * rs6000-core.c: Likewise.
1746         * srec.c: Likewise.
1747         * stabs.c: Likewise.
1748         * vms-alpha.c: Likewise.
1749         * xcofflink.c: Likewise.
1750
1751 2018-02-19  Alan Modra  <amodra@gmail.com>
1752
1753         PR 22845
1754         * elf.c (IS_TBSS): Define.
1755         (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
1756         (assign_file_positions_for_non_load_sections): Revert last change.
1757         Properly calculate load segment limits to compare against relro limits.
1758
1759 2018-02-17  Alan Modra  <amodra@gmail.com>
1760
1761         PR 22845
1762         * elf.c (assign_file_positions_for_non_load_sections): Ignore
1763         degenerate zero size PT_LOAD segments when finding one overlapping
1764         the PT_GNU_RELRO segment.
1765
1766 2018-02-16  Alan Modra  <amodra@gmail.com>
1767
1768         * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
1769         (_bfd_bool_bfd_true): Rename from bfd_true.
1770         (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
1771         (_bfd_int_bfd_0): Rename from bfd_0.
1772         (_bfd_uint_bfd_0): Rename from bfd_0u.
1773         (_bfd_long_bfd_0): Rename from bfd_0l.
1774         (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
1775         (_bfd_void_bfd): Rename from bfd_void.
1776         (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
1777         (_bfd_bool_bfd_link_false_error),
1778         (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
1779         (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
1780         (_bfd_bool_bfd_asection_bfd_asection_true),
1781         (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
1782         (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
1783         * archive.c (_bfd_noarchive_get_elt_at_index),
1784         (_bfd_noarchive_openr_next_archived_file),
1785         (_bfd_noarchive_construct_extended_name_table),
1786         (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
1787         (_bfd_noarchive_write_armap): New functions.
1788         * archures.c (_bfd_nowrite_set_arch_mach): New function.
1789         * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
1790         (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
1791         (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
1792         (alpha_ecoff_swap_coff_lineno_out),
1793         (alpha_ecoff_swap_coff_reloc_out): New functions.
1794         * coff-mips.c (mips_ecoff_swap_coff_aux_in),
1795         (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
1796         (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
1797         (mips_ecoff_swap_coff_lineno_out),
1798         (mips_ecoff_swap_coff_reloc_out): New functions.
1799         * coffcode.h (coff_set_alignment_hook): Replace define with
1800         new function.
1801         (symname_in_debug_hook): Likewise.
1802         * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
1803         * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
1804         * elf.c (assign_file_positions_except_relocs): Test
1805         elf_backend_allow_non_load_phdr for NULL.
1806         * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
1807         _bfd_elf_link_omit_section_dynsym.  Update uses.
1808         (_bfd_elf_omit_section_dynsym_all): New function.
1809         * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
1810         (_bfd_elf_omit_section_dynsym_default): Declare.
1811         (_bfd_elf_omit_section_dynsym_all): Declare.
1812         * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
1813         (_bfd_nolink_bfd_get_relocated_section_contents),
1814         (_bfd_nolink_bfd_lookup_section_flags),
1815         (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
1816         (_bfd_nolink_bfd_link_hash_table_create),
1817         (_bfd_nolink_bfd_link_just_syms),
1818         (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1819         (_bfd_nolink_bfd_link_split_section),
1820         (_bfd_nolink_section_already_linked),
1821         (_bfd_nolink_bfd_define_common_symbol),
1822         (_bfd_nolink_bfd_define_start_stop): New functions.
1823         * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1824         (_bfd_norelocs_bfd_reloc_name_lookup),
1825         (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1826         * section.c (_bfd_nowrite_set_section_contents): New function.
1827         * syms.c (_bfd_nosymbols_canonicalize_symtab),
1828         (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1829         (_bfd_nosymbols_get_symbol_version_string),
1830         (_bfd_nosymbols_bfd_is_local_label_name),
1831         (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1832         (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1833         (_bfd_nosymbols_bfd_make_debug_symbol),
1834         ( _bfd_nosymbols_read_minisymbols),
1835         ( _bfd_nosymbols_minisymbol_to_symbol),
1836         (_bfd_nodynamic_get_synthetic_symtab): New functions.
1837         * libbfd-in.h: Declare new functions.  Update existing defines,
1838         removing casts.
1839         * aix386-core.c: Update to use new hooks.  Formatting.
1840         * aout-adobe.c: Likewise.
1841         * aout-arm.c: Likewise.
1842         * aout-target.h: Likewise.
1843         * aout-tic30.c: Likewise.
1844         * aoutf1.h: Likewise.
1845         * binary.c: Likewise.
1846         * bout.c: Likewise.
1847         * cisco-core.c: Likewise.
1848         * coff-alpha.c: Likewise.
1849         * coff-i386.c: Likewise.
1850         * coff-i860.c: Likewise.
1851         * coff-i960.c: Likewise.
1852         * coff-ia64.c: Likewise.
1853         * coff-mips.c: Likewise.
1854         * coff-ppc.c: Likewise.
1855         * coff-rs6000.c: Likewise.
1856         * coff-sh.c: Likewise.
1857         * coff-tic30.c: Likewise.
1858         * coff-tic54x.c: Likewise.
1859         * coff-x86_64.c: Likewise.
1860         * coff64-rs6000.c: Likewise.
1861         * coffcode.h: Likewise.
1862         * elf-m10300.c: Likewise.
1863         * elf32-cr16.c: Likewise.
1864         * elf32-lm32.c: Likewise.
1865         * elf32-m32r.c: Likewise.
1866         * elf32-metag.c: Likewise.
1867         * elf32-score.c: Likewise.
1868         * elf32-score7.c: Likewise.
1869         * elf32-tilepro.c: Likewise.
1870         * elf32-xstormy16.c: Likewise.
1871         * elf32-xtensa.c: Likewise.
1872         * elf64-alpha.c: Likewise.
1873         * elf64-hppa.c: Likewise.
1874         * elf64-ia64-vms.c: Likewise.
1875         * elf64-mmix.c: Likewise.
1876         * elf64-sh64.c: Likewise.
1877         * elfnn-ia64.c: Likewise.
1878         * elfxx-sparc.c: Likewise.
1879         * elfxx-target.h: Likewise.
1880         * elfxx-tilegx.c: Likewise.
1881         * elfxx-x86.h: Likewise.
1882         * hp300hpux.c: Likewise.
1883         * hppabsd-core.c: Likewise.
1884         * hpux-core.c: Likewise.
1885         * i386msdos.c: Likewise.
1886         * i386os9k.c: Likewise.
1887         * ieee.c: Likewise.
1888         * ihex.c: Likewise.
1889         * irix-core.c: Likewise.
1890         * libaout.h: Likewise.
1891         * libecoff.h: Likewise.
1892         * mach-o-target.c: Likewise.
1893         * mach-o.c: Likewise.
1894         * mipsbsd.c: Likewise.
1895         * mmo.c: Likewise.
1896         * netbsd-core.c: Likewise.
1897         * nlm-target.h: Likewise.
1898         * oasys.c: Likewise.
1899         * osf-core.c: Likewise.
1900         * pdp11.c: Likewise.
1901         * pe-mips.c: Likewise.
1902         * pe-x86_64.c: Likewise.
1903         * pef.c: Likewise.
1904         * plugin.c: Likewise.
1905         * ppcboot.c: Likewise.
1906         * ptrace-core.c: Likewise.
1907         * sco5-core.c: Likewise.
1908         * som.c: Likewise.
1909         * sparclynx.c: Likewise.
1910         * srec.c: Likewise.
1911         * tekhex.c: Likewise.
1912         * trad-core.c: Likewise.
1913         * verilog.c: Likewise.
1914         * versados.c: Likewise.
1915         * vms-alpha.c: Likewise.
1916         * vms-lib.c: Likewise.
1917         * wasm-module.c: Likewise.
1918         * xsym.c: Likewise.
1919         * libbfd.h: Regenerate.
1920
1921 2018-02-15  Jim Wilson  <jimw@sifive.com>
1922
1923         * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1924         symbols whose section address is zero.
1925
1926         * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1927         when pcrel_lo reloc has an addend.  Use reloc_dangerous callback for
1928         bfd_reloc_dangerous.  Use einfo instead of warning callback for errors.
1929         Add %X%P to error messages.
1930
1931 2018-02-15  Eric Botcazou  <ebotcazou@adacore.com>
1932
1933         PR ld/22832
1934         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1935         Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1936         and assert that the result of the call is not NULL.
1937
1938 2018-02-14  Nick Clifton  <nickc@redhat.com>
1939
1940         PR 22823
1941         Revert previous delta.  Add extra casts to avoid compile time
1942         warnings instead.
1943         * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1944         cast to avoid warning from gcc v8 compiler.
1945         (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1946         (_bfd_generic_bfd_set_private_flags): Likewise.
1947         (_bfd_generic_bfd_copy_private_section_data): Likewise.
1948         (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1949         (_bfd_generic_bfd_copy_private_header_data): Likewise.
1950         (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1951         (_bfd_noarchive_construct_extended_name_table): Likewise.
1952         (_bfd_noarchive_truncate_arname): Likewise.
1953         (_bfd_noarchive_write_ar_hdr): Likewise.
1954         (_bfd_noarchive_get_elt_at_index): Likewise.
1955         (_bfd_nosymbols_canonicalize_symtab): Likewise.
1956         (_bfd_nosymbols_print_symbol): Likewise.
1957         (_bfd_nosymbols_get_symbol_info): Likewise.
1958         (_bfd_nosymbols_get_symbol_version_string): Likewise.
1959         (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1960         (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1961         (_bfd_nosymbols_get_lineno): Likewise.
1962         (_bfd_nosymbols_find_nearest_line): Likewise.
1963         (_bfd_nosymbols_find_line): Likewise.
1964         (_bfd_nosymbols_find_inliner_info): Likewise.
1965         (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1966         (_bfd_nosymbols_read_minisymbols): Likewise.
1967         (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1968         (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1969         (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1970         (_bfd_nowrite_set_arch_mach): Likewise.
1971         (_bfd_nowrite_set_section_contents): Likewise.
1972         (_bfd_nolink_sizeof_headers): Likewise.
1973         (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1974         (_bfd_nolink_bfd_relax_section): Likewise.
1975         (_bfd_nolink_bfd_gc_sections): Likewise.
1976         (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1977         (_bfd_nolink_bfd_merge_sections): Likewise.
1978         (_bfd_nolink_bfd_is_group_section): Likewise.
1979         (_bfd_nolink_bfd_discard_group): Likewise.
1980         (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1981         (_bfd_nolink_bfd_link_add_symbols): Likewise.
1982         (_bfd_nolink_bfd_link_just_syms): Likewise.
1983         (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1984         (_bfd_nolink_bfd_final_link): Likewise.
1985         (_bfd_nolink_bfd_link_split_section): Likewise.
1986         (_bfd_nolink_section_already_linked): Likewise.
1987         (_bfd_nolink_bfd_define_common_symbol): Likewise.
1988         (_bfd_nolink_bfd_define_start_stop): Likewise.
1989         (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1990         (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1991         (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1992         (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1993         * libbfd.c (bfd_false_any): Delete.
1994         (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1995         (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1996         * libbfd.h (extern): Regenerate
1997         * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1998         cast to avoid warning from gcc v8 compiler.
1999         * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2000         * binary.c (binary_get_symbol_info): Likewise.
2001         * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2002         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2003         * coffcode.h (coff_set_alignment_hook): Likewise.
2004         (symname_in_debug_hook): Likewise.
2005         (bfd_coff_backend_data bigobj_swap_table): Likewise.
2006         * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2007         * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2008         * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2009         * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2010         * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2011         * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2012         * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2013         * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2014         * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2015         * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2016         * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2017         * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2018         * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2019         * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2020         * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2021         * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2022         (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2023         (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2024         (bfd_elfNN_bfd_set_private_flags): Likewise.
2025         (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2026         (elf_backend_init_index_section): Likewise.
2027         (elf_backend_allow_non_load_phdr): Likewise.
2028         * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2029         * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2030         * ieee.c (ieee_construct_extended_name_table): Likewise.
2031         (ieee_write_armap): Likewise.
2032         (ieee_write_ar_hdr): Likewise.
2033         (ieee_bfd_is_target_special_symbol): Likewise.
2034         * ihex.c (ihex_canonicalize_symtab): Likewise.
2035         (ihex_bfd_is_target_special_symbol): Likewise.
2036         * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2037         * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2038         (_bfd_ecoff_set_alignment_hook): Likewise.
2039         * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2040         * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2041         * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2042         * oasys.c (oasys_construct_extended_name_table): Likewise.
2043         (oasys_write_armap): Likewise.
2044         (oasys_write_ar_hdr): Likewise.
2045         (oasys_bfd_is_target_special_symbol): Likewise.
2046         * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2047         * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2048         * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2049         * som.c (som_bfd_is_target_special_symbol): Likewise.
2050         * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2051         * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2052         * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2053         * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2054         (versados_bfd_reloc_name_lookup): Likewise.
2055         * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2056         (vms_bfd_define_start_stop): Likewise.
2057         (alpha_vms_bfd_is_target_special_symbol): Likewise.
2058         * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2059         * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2060
2061 2018-02-14  H.J. Lu  <hongjiu.lu@intel.com>
2062
2063         PR ld/22842
2064         * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
2065         PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2066         * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
2067         R_X86_64_PC32 reloc against dynamic function in data section.
2068         Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
2069         (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
2070         against dynamic function in data section.
2071         * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
2072         function address only if pcrel_plt is true.
2073         (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
2074         * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
2075         PC-relative PLT.  If PLT is PC-relative, don't generate dynamic
2076         PC-relative relocation against a function definition in data
2077         secton in PIE.  Remove the obsolete comments.
2078         (elf_x86_link_hash_table): Add pcrel_plt.
2079
2080 2018-02-13  H.J. Lu  <hongjiu.lu@intel.com>
2081
2082         * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
2083         instead of bfd_link_pic, for building shared library.
2084
2085 2018-02-13  H.J. Lu  <hongjiu.lu@intel.com>
2086
2087         PR gas/22791
2088         * elf64-x86-64.c (is_32bit_relative_branch): Removed.
2089         (elf_x86_64_relocate_section): Check PIC relocations in PIE.
2090         Remove is_32bit_relative_branch usage.  Disallow PC32 reloc
2091         against protected function in shared object.
2092
2093 2018-02-13  Sergei Trofimovich  <slyfox@inbox.ru>
2094
2095         PR 22828
2096         * po/ru.po: Fix typo in Russian translation.
2097
2098 2018-02-13  Maciej W. Rozycki  <macro@mips.com>
2099
2100         * wasm-module.c (wasm_scan_name_function_section): Rename
2101         `index' local variable to `idx'.
2102
2103 2018-02-13  Nick Clifton  <nickc@redhat.com>
2104
2105         PR 22823
2106         Fix compile time warnings generated by gcc version 8.
2107         * libbfd-in.h: Remove extraneous text from prototypes.
2108         Add prototypes for bfd_false_any, bfd_true_any,
2109         bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
2110         bfd_n1_any, bfd_void_any.
2111         (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
2112         function.
2113         (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
2114         (_bfd_generic_bfd_set_private_flags): Likewise.
2115         (_bfd_generic_bfd_copy_private_section_data): Likewise.
2116         (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
2117         (_bfd_generic_bfd_copy_private_header_data): Likewise.
2118         (_bfd_generic_bfd_print_private_bfd_data): Likewise.
2119         (_bfd_noarchive_construct_extended_name_table): Likewise.
2120         (_bfd_noarchive_truncate_arname): Likewise.
2121         (_bfd_noarchive_write_ar_hdr): Likewise.
2122         (_bfd_noarchive_get_elt_at_index): Likewise.
2123         (_bfd_nosymbols_canonicalize_symtab): Likewise.
2124         (_bfd_nosymbols_print_symbol): Likewise.
2125         (_bfd_nosymbols_get_symbol_info): Likewise.
2126         (_bfd_nosymbols_get_symbol_version_string): Likewise.
2127         (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
2128         (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
2129         (_bfd_nosymbols_get_lineno): Likewise.
2130         (_bfd_nosymbols_find_nearest_line): Likewise.
2131         (_bfd_nosymbols_find_line): Likewise.
2132         (_bfd_nosymbols_find_inliner_info): Likewise.
2133         (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
2134         (_bfd_nosymbols_read_minisymbols): Likewise.
2135         (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
2136         (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
2137         (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
2138         (_bfd_nowrite_set_arch_mach): Likewise.
2139         (_bfd_nowrite_set_section_contents): Likewise.
2140         (_bfd_nolink_sizeof_headers): Likewise.
2141         (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
2142         (_bfd_nolink_bfd_relax_section): Likewise.
2143         (_bfd_nolink_bfd_gc_sections): Likewise.
2144         (_bfd_nolink_bfd_lookup_section_flags): Likewise.
2145         (_bfd_nolink_bfd_merge_sections): Likewise.
2146         (_bfd_nolink_bfd_is_group_section): Likewise.
2147         (_bfd_nolink_bfd_discard_group): Likewise.
2148         (_bfd_nolink_bfd_link_hash_table_create): Likewise.
2149         (_bfd_nolink_bfd_link_add_symbols): Likewise.
2150         (_bfd_nolink_bfd_link_just_syms): Likewise.
2151         (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
2152         (_bfd_nolink_bfd_final_link): Likewise.
2153         (_bfd_nolink_bfd_link_split_section): Likewise.
2154         (_bfd_nolink_section_already_linked): Likewise.
2155         (_bfd_nolink_bfd_define_common_symbol): Likewise.
2156         (_bfd_nolink_bfd_define_start_stop): Likewise.
2157         (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
2158         (_bfd_nodynamic_get_synthetic_symtab): Likewise.
2159         (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
2160         (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
2161         * libbfd.c (bfd_false_any): New function.  Like bfd_false but
2162         accepts one or more arguments.
2163         (bfd_true_any): Likewise.
2164         (bfd_nullvoidptr_any): Likewise.
2165         (bfd_0_any): Likewise.
2166         (bfd_0u_any): Likewise.
2167         (bfd_0l_any): Likewise.
2168         (_bfd_n1_any): Likewise.
2169         (bfd_void_any): Likewise.
2170         * libbfd.h (extern): Regenerate
2171         * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
2172         based dummy function.
2173         * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
2174         * binary.c (binary_get_symbol_info): Likewise.
2175         * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
2176         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2177         * coffcode.h (coff_set_alignment_hook): Likewise.
2178         (symname_in_debug_hook): Likewise.
2179         (bfd_coff_backend_data bigobj_swap_table): Likewise.
2180         * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
2181         * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
2182         * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
2183         * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
2184         * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
2185         * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
2186         * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
2187         * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
2188         * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
2189         * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
2190         * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
2191         * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
2192         * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
2193         * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
2194         * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
2195         * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
2196         (bfd_elfNN_bfd_make_debug_symbol): Likewise.
2197         (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
2198         (bfd_elfNN_bfd_set_private_flags): Likewise.
2199         (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
2200         (elf_backend_init_index_section): Likewise.
2201         (elf_backend_allow_non_load_phdr): Likewise.
2202         * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
2203         * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
2204         * ieee.c (ieee_construct_extended_name_table): Likewise.
2205         (ieee_write_armap): Likewise.
2206         (ieee_write_ar_hdr): Likewise.
2207         (ieee_bfd_is_target_special_symbol): Likewise.
2208         * ihex.c (ihex_canonicalize_symtab): Likewise.
2209         (ihex_bfd_is_target_special_symbol): Likewise.
2210         * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
2211         * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
2212         (_bfd_ecoff_set_alignment_hook): Likewise.
2213         * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
2214         * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
2215         * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
2216         * oasys.c (oasys_construct_extended_name_table): Likewise.
2217         (oasys_write_armap): Likewise.
2218         (oasys_write_ar_hdr): Likewise.
2219         (oasys_bfd_is_target_special_symbol): Likewise.
2220         * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
2221         * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
2222         * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
2223         * som.c (som_bfd_is_target_special_symbol): Likewise.
2224         * srec.c (srec_bfd_is_target_special_symbol): Likewise.
2225         * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
2226         * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
2227         * versados.c (versados_bfd_is_target_special_symbol): Likewise.
2228         (versados_bfd_reloc_name_lookup): Likewise.
2229         * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
2230         (vms_bfd_define_start_stop): Likewise.
2231         (alpha_vms_bfd_is_target_special_symbol): Likewise.
2232         * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
2233         * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
2234         * elf32-arc.c (get_replace_function): Assign replacement function
2235         to func pointer.
2236         * elf32-i370.c (i370_noop): Update prototype.
2237
2238 2018-02-13  Alan Modra  <amodra@gmail.com>
2239
2240         PR 22836
2241         * elf.c (_bfd_elf_fixup_group_sections): Account for removed
2242         relocation sections.  If size reduces to just the flag word,
2243         remove that too and mark with SEC_EXCLUDE.
2244         * elflink.c (bfd_elf_final_link): Strip empty group sections.
2245
2246 2018-02-13  Alan Modra  <amodra@gmail.com>
2247
2248         PR 22829
2249         * elf.c (assign_file_positions_for_non_load_sections): Rewrite
2250         PT_GNU_RELRO setup.
2251
2252 2018-02-12  Zebediah Figura  <z.figura12@gmail.com>
2253
2254         * i386msdos.c (msdos_mkobject); New function.
2255         (msdos_object_p): New function.
2256         (i386_msdos_vec): Use msdos_object_p as the check_format
2257         function.
2258         * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
2259         NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
2260         IMAGE_NT_SIGNATURE.
2261         * peXXigen.c: Likewise.
2262         * coff-ia64.c: Likewise.
2263
2264 2018-02-12  Nick Clifton  <nickc@redhat.com>
2265
2266         * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
2267         assignment.
2268         * elf32-arc.c (elf_arc_relocate_section): Likewise.
2269
2270 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
2271
2272         * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
2273         (sparc_elf_append_rela): Assert that there is enough room in section.
2274         (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
2275         (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
2276         (allocate_dynrelocs): Remove outdated comments and reorder conditions.
2277         For a symbol subject to a GOT relocation, reserve a slot in the
2278         relocation section if the symbol isn't dynamic and we are in PIC mode.
2279         (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
2280         is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
2281         <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
2282         <R_SPARC_PC10>: Reorder conditions.  Remove always-false assertion.
2283         (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
2284         resolved_to_zero.  Do not generate a dynamic GOT relocation for an
2285         undefined weak symbol with non-default visibility.  Remove superfluous
2286         'else' and fix formatting.
2287
2288 2018-02-09  H.J. Lu  <hongjiu.lu@intel.com>
2289
2290         * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
2291         is_solaris.
2292         (i386_elf32_sol2_vec): Don't declare.
2293         (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
2294         Don't set need_global_offset_table.
2295         (elf_i386_solaris_arch_bed): New.
2296         (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
2297         Solaris.
2298         * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
2299         target_os != is_nacl instead of target_os == is_normal.
2300         (x86_64_elf64_sol2_vec): Don't declare.
2301         (elf_x86_64_link_setup_gnu_properties): Check target_os !=
2302         is_nacl instead of target_os == is_normal.  Don't set
2303         need_global_offset_table.
2304         (elf_x86_64_solaris_arch_bed): New.
2305         (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
2306         Solaris.
2307         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
2308         _GLOBAL_OFFSET_TABLE_ for Solaris.
2309         (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
2310         need_global_offset_table.
2311         * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
2312         (elf_x86_link_hash_table): Remove need_global_offset_table.
2313         (elf_x86_init_table): Likewise.
2314
2315 2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
2316
2317         * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2318         Remove prototype.
2319         (i386_elf32_sol2_vec): Declared.
2320         (elf_i386_link_setup_gnu_properties): Set
2321         need_global_offset_table with info->output_bfd->xvec.
2322         * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2323         Remove prototype.
2324         (x86_64_elf64_sol2_vec): Declared.
2325         (elf_x86_64_link_setup_gnu_properties): Set
2326         need_global_offset_table with info->output_bfd->xvec.
2327
2328 2018-02-08  H.J. Lu  <hongjiu.lu@intel.com>
2329
2330         * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
2331         New prototype.
2332         (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
2333         for Solaris.
2334         * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
2335         New prototype.
2336         (elf_x86_64_link_setup_gnu_properties): Set
2337         need_global_offset_table for Solaris.
2338         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
2339         unused _GLOBAL_OFFSET_TABLE_ for Solaris.
2340         (_bfd_x86_elf_link_setup_gnu_properties): Copy
2341         need_global_offset_table.
2342         * elfxx-x86.h (elf_x86_link_hash_table): Add
2343         need_global_offset_table.
2344         (elf_x86_init_table): Likewise.
2345
2346 2018-02-08  Jim Wilson  <jimw@sifive.com>
2347
2348         * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
2349         change.
2350
2351 2018-02-08  Nick Clifton  <nickc@redhat.com>
2352
2353         PR 22788
2354         * elf.c (elf_parse_notes): Reject notes with excessuively large
2355         alignments.
2356
2357 2018-02-07  Alan Modra  <amodra@gmail.com>
2358
2359         Revert 2018-01-17  Alan Modra  <amodra@gmail.com>
2360         * elf32-ppc.c: Remove speculation barrier support.
2361         * elf32-ppc.h: Likewise.
2362         * elf64-ppc.c: Likewise.
2363         * elf64-ppc.h: Likewise.
2364
2365 2018-02-06  Jim Wilson  <jimw@sifive.com>
2366
2367         * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
2368         callback to report an error.
2369
2370 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
2371
2372         PR ld/22263
2373         * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
2374         into call to !bfd_link_executable and tidy up.
2375         (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
2376         <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
2377         !bfd_link_executable.
2378         <R_SPARC_TLS_IE_HI22>: Likewise.
2379         <GOT relocations>: Remove useless code, tidy and merge related blocks.
2380         <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
2381         !bfd_link_executable.
2382         <R_SPARC_WPLT30>: Tidy up.
2383         (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
2384         !bfd_link_executable.
2385         (allocate_dynrelocs): Likewise.
2386         (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
2387         <R_SPARC_TLS_GD_HI22>: Merge into...
2388         <R_SPARC_TLS_GD_LO10>: ...this.  Adjust 4th argument in call to
2389         sparc_elf_tls_transition and remove redundant code.
2390         <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
2391         !bfd_link_executable.
2392         <R_SPARC_TLS_LDO_HIX22>: Likewise.
2393         <R_SPARC_TLS_LE_HIX22>: Likewise.  Tidy up.
2394         <R_SPARC_TLS_LDM_CALL>: Likewise.
2395         <R_SPARC_TLS_GD_CALL>: Likewise.  Tidy up.
2396         <R_SPARC_TLS_GD_ADD>: Likewise.
2397         <R_SPARC_TLS_LDM_ADD>: Likewise.
2398         <R_SPARC_TLS_LDO_ADD>: Likewise.
2399         <R_SPARC_TLS_IE_LD>: Likewise.
2400
2401 2018-02-06  Miloš Stojanović  <milos.stojanovic@rt-rk.com>
2402
2403         PR 22789
2404         * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
2405         functions failed to find the function name, try the generic elf
2406         find function instead.
2407
2408 2018-02-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2409
2410         * coff-rs6000.c (xcoff_write_archive_contents_old): Use
2411         'memcpy' instead of 'strncpy' when writing the magic number.
2412
2413 2018-02-06  Nick Clifton  <nickc@redhat.com>
2414
2415         PR 22794
2416         * opncls.c (bfd_get_debug_link_info_1): Check the size of the
2417         section before attempting to read it in.
2418         (bfd_get_alt_debug_link_info): Likewise.
2419
2420 2018-02-06  Paul Carroll  <pcarroll@codesourcery.com>
2421
2422         * bfd/dwarf2.c (find_abstract_name): Modified to return file and
2423         line information in addition to name, if they can be found.
2424
2425 2018-02-05  Renlin Li  <renlin.li@arm.com>
2426
2427         PR ld/22764
2428         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
2429         R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
2430         check for writeable section as well.
2431
2432 2018-02-05  H.J. Lu  <hongjiu.lu@intel.com>
2433
2434         PR ld/22782
2435         * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
2436         _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
2437         undefined weak symbol to 0.
2438         * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
2439         if _GLOBAL_OFFSET_TABLE_ is referenced.
2440         * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
2441         got_referenced instead of ref_regular_nonweak.  Remove the
2442         unused _GLOBAL_OFFSET_TABLE_ from symbol table.
2443         * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
2444
2445 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
2446
2447         * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
2448         initialize `hi_reloc'.
2449
2450 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
2451
2452         * elfxx-mips.c (_bfd_mips_elf_section_processing): For
2453         SHT_MIPS_REGINFO sections don't assert the correct size and
2454         report an error instead.
2455
2456 2018-02-05  Maciej W. Rozycki  <macro@mips.com>
2457
2458         * elf.c (_bfd_elf_write_object_contents): Propagate a failure
2459         status from `->elf_backend_section_processing'.
2460
2461 2018-02-02  Jim Wilson  <jimw@sifive.com>
2462
2463         PR ld/22756
2464         * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
2465         If link_info->wrap_hash, check for a duplicate symbol and ignore.
2466         (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
2467         Pass new argument to riscv_relax_delete_bytes.
2468         (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise.  Remove
2469         ATTRIBUTE_UNUSED from link_info parameter.
2470
2471 2018-02-02  Alan Modra  <amodra@gmail.com>
2472
2473         * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
2474         emitted for toc sequence optimization.  Set and use "howto" later.
2475
2476 2018-02-01  Simon Marchi  <simon.marchi@ericsson.com>
2477
2478         * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
2479         arithmetic on NULL pointer.
2480         * elflink.c (_bfd_elf_archive_symbol_lookup,
2481         elf_link_add_archive_symbols): Likewise.
2482
2483 2018-01-31  Michael Matz  <matz@suse.de>
2484
2485         * elflink.c (bfd_elf_define_start_stop): Fix check of
2486         def_dynamic.
2487
2488 2018-01-31  H.J. Lu  <hongjiu.lu@intel.com>
2489
2490         PR ld/21964
2491         * elflink.c (bfd_elf_define_start_stop): Check if __start and
2492         __stop symbols are referenced by shared objects.
2493
2494 2018-01-30  Alan Modra  <amodra@gmail.com>
2495
2496         PR 22758
2497         * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
2498         segment when demand paged with lma on the same page.  Test this
2499         before load/non-load, executable/non-executable,
2500         writable/non-writable tests and simplify.  Delete bogus relro
2501         condition in writable/non-writable test.  Delete outdated
2502         comment.  Formatting.
2503
2504 2018-01-30  Alan Modra  <amodra@gmail.com>
2505
2506         * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
2507         symbols dynamic.
2508
2509 2018-01-29  Alan Modra  <amodra@gmail.com>
2510
2511         PR 22741
2512         * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
2513         range before converting to a symbol table pointer.
2514
2515 2018-01-27  Nick Clifton  <nickc@redhat.com>
2516
2517         * po/ru.po: Updated Russian translation.
2518
2519 2018-01-26  Alan Modra  <amodra@gmail.com>
2520
2521         * elflink.c (bfd_elf_define_start_stop): Override symbols when
2522         they are defined dynamically.
2523
2524 2018-01-26  Alan Modra  <amodra@gmail.com>
2525
2526         * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
2527         .branch_lt changes size.
2528
2529 2018-01-25  Alan Modra  <amodra@gmail.com>
2530
2531         PR 22746
2532         * elfcode.h (elf_object_p): Avoid integer overflow.
2533
2534 2018-01-25  Eric Botcazou  <ebotcazou@adacore.com>
2535
2536         PR ld/22727
2537         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
2538         Do a mere lookup of the __tls_get_addr symbol instead of adding it.
2539
2540         Revert
2541         2017-10-19  H.J. Lu  <hongjiu.lu@intel.com>
2542
2543         PR ld/22263
2544         * elfxx-sparc.c (sparc_elf_tls_transition): Replace
2545         bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
2546         bfd_link_executable for TLS check.
2547         (_bfd_sparc_elf_check_relocs): Likewise.
2548         (allocate_dynrelocs): Likewise.
2549         (_bfd_sparc_elf_relocate_section): Likewise.
2550
2551 2018-01-24  Renlin Li  <renlin.li@arm.com>
2552
2553         * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
2554         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2555         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2556         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2557         BFD_RELOC_AARCH64_MOVW_PREL_G3.
2558         * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2559         (_bfd_aarch64_elf_resolve_relocation): Likewise.
2560
2561 2018-01-24  Renlin Li  <renlin.li@arm.com>
2562
2563         * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
2564         BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
2565         BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
2566         BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
2567         * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
2568         BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
2569         BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
2570         BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
2571         BFD_RELOC_AARCH64_MOVW_PREL_G3.
2572         * bfd-in2.h: Regenerate.
2573         * libbfd.h: Regenerate.
2574
2575 2018-01-23  Maciej W. Rozycki  <macro@mips.com>
2576
2577         * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
2578         `mips_elf32_section_processing' comment reference.
2579
2580 2018-01-20  H.J. Lu  <hongjiu.lu@intel.com>
2581
2582         PR ld/22721
2583         * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
2584         versioned __tls_get_addr symbol.
2585
2586 2018-01-19  Nick Clifton  <nickc@redhat.com>
2587
2588         * po/fr.po: Updated French translation.
2589
2590 2018-01-18  Alan Modra  <amodra@gmail.com>
2591
2592         * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
2593         * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
2594         (ppc64_elf_build_stubs): Likewise.
2595
2596 2018-01-17  Nick Clifton  <nickc@redhat.com>
2597
2598         * po/ru.po: Updated Russian translation.
2599         * po/uk/po: Updated Ukranian translation.
2600
2601 2018-01-17  Alan Modra  <amodra@gmail.com>
2602
2603         * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
2604
2605 2018-01-17  Alan Modra  <amodra@gmail.com>
2606
2607         * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
2608         (CRSETEQ, BEQCTRM): Define.
2609         (is_nonpic_glink_stub): Don't check bctr.
2610         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2611         (ppc_elf_relax_section): Size speculation barrier.
2612         (output_bctr): New function.
2613         (write_glink_stub): Use output_bctr.
2614         (ppc_elf_relocate_section): Use output_bctr for long branch stub.
2615         (ppc_elf_finish_dynamic_symbol): Likewise.
2616         (ppc_elf_finish_dynamic_sections): Use output_bctr.
2617         * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
2618         * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
2619         (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
2620         (size_global_entry_stubs): Handle speculation barrier sizing.
2621         (plt_stub_size): Likewise.
2622         (output_bctr): New function.
2623         (build_plt_stub, build_tls_get_addr_stub): Output speculation
2624         barrier.
2625         (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
2626         (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
2627         (build_global_entry_stubs): Output speculation barrier.
2628         (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
2629         * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
2630
2631 2018-01-17  Alan Modra  <amodra@gmail.com>
2632
2633         * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
2634         __tls_get_addr_opt, and alignment sizing.
2635         (TLS_GET_ADDR_GLINK_SIZE): Delete.
2636         (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
2637         (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
2638         or 8 insns.
2639         (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
2640         (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
2641         (ppc_elf_size_dynamic_sections): Likewise.  Size branch table
2642         by PLT reloc count.
2643         (write_glink_stub): Handle __tls_get_addr_opt stub.
2644         Pad out to size given by GLINK_ENTRY_SIZE.
2645         (ppc_elf_relocate_section): Adjust write_glink_stub call.
2646         (ppc_elf_finish_dynamic_symbol): Likewise.
2647         (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
2648         insn array since so many need rewriting.
2649         * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
2650         * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
2651         GLINK_CALL_STUB_SIZE.  Add htab param and evaluate to size without
2652         nops.  Adjust all uses.
2653         (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
2654         in glink_vma calculation.
2655         (struct ppc_link_hash_table): Add global_entry section pointer.
2656         (create_linkage_sections): Create separate section for global
2657         entry stubs.
2658         (PPC_LO, PPC_HI, PPC_HA): Move earlier.
2659         (size_global_entry_stubs): Handle sizing for aligned stubs.
2660         (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
2661         and don't stash end of glink branch table in rawsize.
2662         (ppc_build_one_stub): Rewrite stub size calculations.
2663         (build_global_entry_stubs): Use new section.
2664         (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
2665         Build lazy link stubs out to end of section.  Build global entry
2666         stubs in new section.
2667
2668 2018-01-15  Nick Clifton  <nickc@redhat.com>
2669
2670         * po/uk.po: Updated Ukranian translation.
2671
2672 2018-01-13  Nick Clifton  <nickc@redhat.com>
2673
2674         * po/bfd.pot: Regenerated.
2675
2676 2018-01-13  Nick Clifton  <nickc@redhat.com>
2677
2678         * version.m4: Bump version to 2.30.51
2679         * configure: Regenerate.
2680
2681 2018-01-13  Nick Clifton  <nickc@redhat.com>
2682
2683         2.30 branch created.
2684
2685 2018-01-12  Jens Widell  <jl@opera.com>
2686
2687         * elf.c (setup_group): Optimize search for group by remembering
2688         last found group and restarting search at that index.
2689         * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
2690
2691 2018-01-12  Gunther Nikl  <gnikl@users.sourceforge.net>
2692
2693         * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
2694         bfd_link_common_skip_none in switch.
2695
2696 2018-01-12  Alan Modra  <amodra@gmail.com>
2697
2698         PR ld/22649
2699         * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
2700         references on forced local symbols.
2701
2702 2018-01-12  Vlad Ivanov  <vlad@ivanov.email>
2703
2704         * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
2705         .reginfo section has wrong size.
2706
2707 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2708
2709         PR ld/22393
2710         * elf.c (_bfd_elf_map_sections_to_segments): When generating
2711         separate code and read-only data LOAD segments, create a new
2712         LOAD segment if the previous section contains text and the
2713         current section doesn't or vice versa.  Don't put a writable
2714         section in a read-only segment if there is a RELRO segment.
2715
2716 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2717
2718         PR ld/22649
2719         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
2720         references on forced local symbols.
2721
2722 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2723
2724         PR ld/22677
2725         * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
2726         INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
2727
2728 2018-01-09  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
2729
2730         PR 22662
2731         * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
2732
2733 2018-01-03  John Baldwin  <jhb@FreeBSD.org>
2734
2735         * elf.c (elfcore_grok_freebsd_note): Handle
2736         NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
2737         NT_FREEBSD_PROCSTAT_VMMAP.
2738
2739 2018-01-03  Alan Modra  <amodra@gmail.com>
2740
2741         Update year range in copyright notice of all files.
2742
2743 For older changes see ChangeLog-2017
2744 \f
2745 Copyright (C) 2018 Free Software Foundation, Inc.
2746
2747 Copying and distribution of this file, with or without modification,
2748 are permitted in any medium without royalty provided the copyright
2749 notice and this notice are preserved.
2750
2751 Local Variables:
2752 mode: change-log
2753 left-margin: 8
2754 fill-column: 74
2755 version-control: never
2756 End: