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