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