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