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