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