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