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