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