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