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