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