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