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