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