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