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