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