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