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