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