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