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