Remove i860, i960, bout and aout-adobe targets
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2018-04-11 Alan Modra <amodra@gmail.com>
2
3 * aout-adobe.c: Delete.
4 * bout.c: Delete.
5 * coff-i860.c: Delete.
6 * coff-i960.c: Delete.
7 * cpu-i860.c: Delete.
8 * cpu-i960.c: Delete.
9 * elf32-i860.c: Delete.
10 * elf32-i960.c: Delete.
11 * hosts/i860mach3.h: Delete.
12 * Makefile.am: Remove i860, i960, bout, and adobe support.
13 * archures.c: Remove i860 and i960 support.
14 * coffcode.h: Likewise.
15 * reloc.c: Likewise.
16 * aoutx.h: Comment updates.
17 * archive.c: Remove BOUT and i960 support.
18 * bfd.c: Remove BOUT support.
19 * coffswap.h: Remove i960 support.
20 * config.bfd: Remove i860, i960 and adobe targets.
21 * configure.ac: Remove adode, bout, i860, i960, icoff targets.
22 * targets.c: Likewise.
23 * ieee.c: Remove i960 support.
24 * mach-o.c: Remove i860 support.
25 * Makefile.in: Regenerate.
26 * bfd-in2.h: Regenerate.
27 * configure: Regenerate.
28 * libbfd.h: Regenerate.
29 * po/SRC-POTFILES.in: Regenerate.
30
31 2018-04-09 Maciej W. Rozycki <macro@mips.com>
32
33 * elf64-mips.c (mips_elf64_write_rel): Handle a NULL BFD pointer
34 in the BFD symbol referred by the relocation.
35 (mips_elf64_write_rela): Likewise.
36
37 2018-04-09 Maciej W. Rozycki <macro@mips.com>
38
39 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Issue an
40 error for out-of-range `r_sym' values.
41
42 2018-04-09 Alan Modra <amodra@gmail.com>
43
44 * elf64-ppc.c (struct _ppc64_elf_section_data): Add has_pltcall field.
45 (struct ppc_link_hash_table): Add can_convert_all_inline_plt.
46 (ppc64_elf_check_relocs): Set has_pltcall.
47 (ppc64_elf_adjust_dynamic_symbol): Discard some PLT entries.
48 (ppc64_elf_inline_plt): New function.
49 (ppc64_elf_size_dynamic_sections): Discard some PLT entries for locals.
50 * elf64-ppc.h (ppc64_elf_inline_plt): Declare.
51 * elf32-ppc.c (has_pltcall): Define.
52 (struct ppc_elf_link_hash_table): Add can_convert_all_inline_plt.
53 (ppc_elf_check_relocs): Set has_pltcall.
54 (ppc_elf_inline_plt): New function.
55 (ppc_elf_adjust_dynamic_symbol): Discard some PLT entries.
56 (ppc_elf_size_dynamic_sections): Likewise.
57 * elf32-ppc.h (ppc_elf_inline_plt): Declare.
58
59 2018-04-09 Alan Modra <amodra@gmail.com>
60
61 * elf32-ppc.c (ppc_elf_howto_raw): Add PLTSEQ and PLTCALL howtos.
62 (is_plt_seq_reloc): New function.
63 (ppc_elf_check_relocs): Handle PLTSEQ and PLTCALL relocs.
64 (ppc_elf_tls_optimize): Handle inline plt call sequence.
65 (ppc_elf_relax_section): Handle PLTCALL reloc.
66 (ppc_elf_relocate_section): Nop out inline plt call sequence when
67 resolving locally.
68 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_PLTSEQ and
69 R_PPC64_PLTCALL entries. Comment R_PPC64_TOCSAVE.
70 (has_tls_get_addr_call): Correct comment.
71 (is_branch_reloc): Add PLTCALL.
72 (is_plt_seq_reloc): New function.
73 (ppc64_elf_check_relocs): Handle PLT16_LO_DS reloc. Set
74 has_tls_reloc for R_PPC64_TLSGD and R_PPC64_TLSLD. Create plt
75 entry for R_PPC64_PLTCALL.
76 (ppc64_elf_tls_optimize): Handle inline plt call sequence.
77 (ppc_type_of_stub): Handle PLTCALL reloc.
78 (toc_adjusting_stub_needed): Likewise.
79 (ppc64_elf_relocate_section): Set "can_plt_call" for PLTCALL
80 reloc insn. Nop out inline plt call sequence when resolving
81 locally. Handle __tls_get_addr inline plt call optimization.
82
83 2018-04-09 Alan Modra <amodra@gmail.com>
84
85 * elf64-ppc.c (LOCAL_PLT_ENTRY_SIZE): Define.
86 (struct ppc_stub_hash_entry): Add symtype field.
87 (PLT_KEEP): Define.
88 (struct ppc_link_hash_table): Add pltlocal and relpltlocal.
89 (create_linkage_sections): Create pltlocal and relpltlocal.
90 (ppc64_elf_check_relocs): Allow PLT relocs on local symbols.
91 Set PLT_KEEP.
92 (ppc64_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
93 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
94 (ppc64_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
95 Keep PLT entries for inline calls against locals.
96 (ppc_build_one_stub): Use pltlocal as appropriate.
97 (ppc_size_one_stub): Likewise.
98 (ppc64_elf_size_stubs): Set symtype.
99 (build_global_entry_stubs_and_plt): Init pltlocal and write
100 relpltlocal for globals.
101 (write_plt_relocs_for_local_syms): Likewise for local syms.
102 (ppc64_elf_relocate_section): Support PLT for local syms.
103 * elf32-ppc.c (PLT_KEEP): Define.
104 (struct ppc_elf_link_hash_table): Add pltlocal and relpltlocal.
105 (ppc_elf_create_glink): Create pltlocal and relpltlocal.
106 (ppc_elf_check_relocs): Allow PLT relocs on local symbols.
107 Set PLT_KEEP. Adjust update_local_sym_info call.
108 (ppc_elf_adjust_dynamic_symbol): Keep PLT entries for inline calls.
109 (allocate_dynrelocs): Allocate pltlocal and relpltlocal.
110 (ppc_elf_size_dynamic_sections): Size pltlocal and relpltlocal.
111 (ppc_elf_relocate_section): Support PLT16 relocs for local syms.
112 (write_global_sym_plt): Init pltlocal and write relpltlocal.
113 (ppc_finish_symbols): Likewise for locals.
114
115 2018-04-09 Alan Modra <amodra@gmail.com>
116
117 * elf64-ppc.c (ppc_build_one_stub): Move output of PLT relocs
118 for local symbols to..
119 (write_plt_relocs_for_local_syms): ..here. New function.
120 (ppc64_elf_finish_dynamic_symbol): Move output of PLT relocs for
121 global symbols to..
122 (build_global_entry_stubs_and_plt): ..here. Rename from
123 build_global_entry_stubs.
124 (ppc64_elf_build_stubs): Always call build_global_entry_stubs_and_plt.
125 Call write_plt_relocs_for_local_syms.
126 * elf32-ppc.c (get_sym_h): New function.
127 (ppc_elf_relax_section): Use get_sym_h.
128 (ppc_elf_relocate_section): Move output of PLT relocs and glink
129 stubs for local symbols to..
130 (ppc_finish_symbols): ..here. New function.
131 (ppc_elf_finish_dynamic_symbol): Move output of PLT relocs for
132 global syms to..
133 (write_global_sym_plt): ..here. New function.
134 * elf32-ppc.h (ppc_elf_modify_segment_map): Delete attribute.
135 (ppc_finish_symbols): Declare.
136
137 2018-04-09 Alan Modra <amodra@gmail.com>
138
139 * elf32-ppc.c (ppc_elf_check_relocs): Handle PLT16 relocs.
140 (ppc_elf_relocate_section): Likewise.
141 * elf64-ppc.c (ppc64_elf_check_relocs): Handle PLT16_LO_DS.
142 (ppc64_elf_relocate_section): Likewise. Correct PLT16
143 resolution to plt entry relative to toc pointer.
144
145 2018-04-09 Alan Modra <amodra@gmail.com>
146
147 * elf64-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
148 TLS_TPRELGD, TLS_EXPLICIT): Renumber. Test TLS_TLS throughout
149 file when other TLS flags are tested in a mask.
150 (TLS_MARK, NON_GOT): Define.
151 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
152 (update_local_sym_info): Don't create got entry when NON_GOT.
153 (ppc64_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
154 Set TLS_MARK.
155 (get_tls_mask): Do toc lookup if tls_mask is just TLS_MARK.
156 (ppc64_elf_relocate_section): Likewise.
157 (ppc64_elf_tls_optimize): Don't attempt to optimize indirect
158 __tls_get_addr calls lacking a marker reloc.
159 * elf32-ppc.c (TLS_TLS, TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL,
160 TLS_TPRELGD): Renumber. Update comment.
161 (TLS_MARK, NON_GOT): Define.
162 (PLT_IFUNC): Redefine, and test TLS_TLS throughout file as well.
163 (update_local_sym_info): Don't create got entry when NON_GOT.
164 (ppc_elf_check_relocs): Pass NON_GOT with PLT_IFUNC.
165 Set TLS_MARK.
166 (ppc_elf_tls_optimize): Don't attempt to optimize indirect
167 __tls_get_addr calls lacking a marker reloc.
168
169 2018-04-06 H.J. Lu <hongjiu.lu@intel.com>
170
171 * elf64-x86-64.c (elf_x86_64_info_to_howto): Don't mask out
172 R_X86_64_converted_reloc_bit.
173
174 2018-04-05 H.J. Lu <hongjiu.lu@intel.com>
175
176 PR gas/22318
177 * configure: Regenerated.
178
179 2018-04-05 Alan Modra <amodra@gmail.com>
180
181 * elf-hppa.h (elf_hppa_info_to_howto): Init howto to NULL.
182 (elf_hppa_info_to_howto_rel): Likewise.
183
184 2018-04-04 Maciej W. Rozycki <macro@mips.com>
185
186 * elf-hppa.h (elf_hppa_info_to_howto): Also return
187 unsuccessfully for unimplemented relocations.
188 (elf_hppa_info_to_howto_rel): Likewise.
189
190 2018-04-04 Maciej W. Rozycki <macro@mips.com>
191
192 * elf32-i860.c (lookup_howto): Add `abfd' parameter. Set the
193 `bfd_error_bad_value' error and call `_bfd_error_handler' on a
194 howto lookup failure.
195 (elf32_i860_reloc_type_lookup): Adjust `lookup_howto' call
196 accordingly.
197 (elf32_i860_info_to_howto_rela): Likewise.
198 (elf32_i860_relocate_splitn): Likewise.
199 (elf32_i860_relocate_pc16): Likewise.
200 (elf32_i860_relocate_pc26): Likewise.
201 (elf32_i860_relocate_section): Likewise.
202
203 2018-04-04 Maciej W. Rozycki <macro@mips.com>
204
205 * elf32-visium.c (visium_info_to_howto_rela): Correct the range
206 check for `visium_elf_howto_table' table access.
207
208 2018-04-04 Maciej W. Rozycki <macro@mips.com>
209
210 * elf32-iq2000.c (iq2000_info_to_howto_rela): Correct the range
211 check for `iq2000_elf_howto_table' table access.
212
213 2018-04-04 Maciej W. Rozycki <macro@mips.com>
214
215 * elf32-frv.c (frv_info_to_howto_rela): Correct the range check
216 for `elf32_frv_howto_table' table access.
217
218 2018-04-04 Maciej W. Rozycki <macro@mips.com>
219
220 * elf32-mips.c (mips_elf32_rtype_to_howto): Also return
221 unsuccessfully for placeholder howtos.
222 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
223 * elfn32-mips.c (mips_elf_n32_rtype_to_howto): Likewise.
224
225 2018-03-29 Maciej W. Rozycki <macro@mips.com>
226
227 * elf32-mips.c (mips_info_to_howto_rel): Remove the calls to
228 `_bfd_error_handler' and to set the `bfd_error_bad_value' error.
229
230 2018-03-28 Maciej W. Rozycki <macro@mips.com>
231
232 * elf-hppa.h (elf_hppa_info_to_howto_rel): Remove
233 ATTRIBUTE_UNUSED from `abfd'.
234
235 2018-03-28 Maciej W. Rozycki <macro@mips.com>
236
237 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
238 `_bfd_error_handler' call formatting.
239
240 2018-03-28 Maciej W. Rozycki <macro@mips.com>
241
242 * elf32-mips.c (mips_info_to_howto_rel): Call
243 `mips_elf32_rtype_to_howto' directly rather than via
244 `->elf_backend_mips_rtype_to_howto'.
245
246 2018-03-28 Renlin Li <renlin.li@arm.com>
247
248 PR ld/22970
249 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
250 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
251 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
252 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
253 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
254 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
255 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
256 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
257 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
258 (elfNN_aarch64_final_link_relocate): Support new relocations.
259 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
260 relocations.
261 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
262
263 2018-03-28 Renlin Li <renlin.li@arm.com>
264
265 PR ld/22970
266 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
267 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
268 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
269 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
270 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
271 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
272 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
273 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
274 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
275 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
276 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
277 TLSLE_LDST16_TPREL_LO12,
278 TLSLE_LDST16_TPREL_LO12_NC,
279 TLSLE_LDST32_TPREL_LO12,
280 TLSLE_LDST32_TPREL_LO12_NC,
281 TLSLE_LDST64_TPREL_LO12,
282 TLSLE_LDST64_TPREL_LO12_NC,
283 TLSLE_LDST8_TPREL_LO12,
284 TLSLE_LDST8_TPREL_LO12_NC.
285 * bfd-in2.h: Regenerated.
286 * libbfd.h: Regenerated.
287
288 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
289
290 PR ld/22972
291 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
292 has_old_style_got_reloc.
293 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
294 relocations. Fix a couple of long lines.
295 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
296 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
297 GOT relocations.
298
299 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
300
301 PR ld/23000
302 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
303 ENDBR64 to the TLSDESC PLT entry.
304
305 2018-03-21 Alan Modra <amodra@gmail.com>
306
307 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
308 symbols. Use size_t counts. Delete redundant opd test.
309
310 2018-03-21 Alan Modra <amodra@gmail.com>
311
312 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
313
314 2018-03-21 Alan Modra <amodra@gmail.com>
315
316 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
317 field unsigned.
318 (update_local_sym_info): Likewise for local_got_tls_masks.
319 (ppc_elf_tls_optimize): Likewise for lgot_masks.
320
321 2018-03-21 Alan Modra <amodra@gmail.com>
322
323 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
324 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
325 do in size_dynamic_sections.
326
327 2018-03-21 Alan Modra <amodra@gmail.com>
328
329 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
330 without first checking array bounds.
331 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
332
333 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
334
335 PR ld/22983
336 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
337 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
338
339 2018-03-19 Nick Clifton <nickc@redhat.com>
340
341 * po/es.po: Updated Spanish translation.
342
343 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
344
345 * elf32-xtensa.c (xlate_map_entry): Change types of address
346 fields from 'unsigned' to 'bfd_vma'.
347 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
348 the key argument to bsearch. Allow offsets past the end of a
349 section, use the last map entry for translation of such offsets.
350
351 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
352
353 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
354 Not support the target feature.
355 (nds32_elf_ex9_itb_base): Likewise.
356 (nds32_elf_ex9_import_table): Likewise.
357 (nds32_elf_ex9_finish): Likewise.
358 (nds32_elf_ex9_reloc_jmp): Likewise.
359 (nds32_elf_get_insn_with_reg): Likewise.
360 (nds32_get_local_syms): Likewise.
361 (nds32_elf_ex9_replace_instruction): Likewise.
362 (nds32_elf_ifc_calc): Likewise.
363 (nds32_elf_ifc_finish): Likewise.
364 (nds32_elf_ifc_replace): Likewise.
365 (nds32_elf_ifc_reloc): Likewise.
366
367 2018-03-14 Alan Modra <amodra@gmail.com>
368
369 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
370 sfpr size added before defining alias symbols.
371 (ppc64_elf_build_stubs): Add stub section padding before
372 copying sfpr contents and defining save/restore alias symbols.
373
374 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
375
376 PR ld/20882
377 * elflink.c (elf_gc_mark_debug_section): Also check the local
378 debug definition section.
379
380 2018-03-13 Nick Clifton <nickc@redhat.com>
381
382 PR 22113
383 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
384 function. Add an end address parameter. Check access of the data
385 pointer to make sure that they do not extend beyond the end
386 address. Return FALSE if any check fails. Add the end address
387 pointer to the ui structure.
388 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
389 codes to make sure that they do not extend beyond the end address
390 pointer. Print an error message and return immediately if any
391 check fails.
392
393 2018-03-09 Nick Clifton <nickc@redhat.com>
394
395 * elf64-s390.c (elf_s390_relocate_section): Move check for
396 relocations against non-allocated sections to before the code that
397 handles ifunc relocations.
398 * elf32-s390.c (elf_s390_relocate_section): Likewise.
399 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
400 relocs against IFUNC symbols in non-allocated sections as relocs
401 against FUNC symbols.
402 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
403
404 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
405
406 PR ld/22929
407 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
408 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
409 relocation against FUNC symbol.
410 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
411
412 2018-03-07 Renlin Li <renlin.li@arm.com>
413
414 PR ld/20402
415 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
416 symbol, and don't emit relocation in specific case.
417
418 2018-03-07 Alan Modra <amodra@gmail.com>
419
420 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
421 (mips_elf64_slurp_one_reloc_table): Pass on error.
422
423 2018-03-03 James Cowgill <james.cowgill@mips.com>
424 Maciej W. Rozycki <macro@mips.com>
425
426 PR ld/21900
427 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
428 after calling `undefined_symbol' hook if this is an error
429 condition. Assume the value of 0 for the symbol requested
430 otherwise.
431
432 2018-03-02 Jim Wilson <jimw@sifive.com>
433
434 PR 22903
435 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
436 and nop instead of 4.
437 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
438 8 instead of 4.
439
440 2018-03-01 Jim Wilson <jimw@sifive.com>
441
442 PR 22756
443 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
444 else if instead of if.
445
446 2018-03-01 Alan Modra <amodra@gmail.com>
447
448 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
449
450 2018-02-28 Alan Modra <amodra@gmail.com>
451
452 PR 22887
453 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
454
455 2018-02-28 Nick Clifton <nickc@redhat.com>
456
457 PR 22895
458 PR 22893
459 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
460 pointer. Drop unused abfd parameter. Check the size of the block
461 before initialising the data field. Return the end pointer if the
462 size is invalid.
463 (read_attribute_value): Adjust invocations of read_n_bytes.
464
465 PR 22894
466 * dwarf1.c (parse_die): Check the length of form blocks before
467 advancing the data pointer.
468
469 2018-02-28 Alan Modra <amodra@gmail.com>
470
471 PR 22887
472 * aoutx.h (translate_symbol_table): Print an error message and set
473 bfd_error on finding an invalid name string offset.
474
475 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
476
477 * config.in: Regenerated.
478 * configure: Likewise.
479 * configure.ac: Add --enable-separate-code.
480 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
481 to 1 for Linux/x86 targets,
482 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
483 DEFAULT_LD_Z_SEPARATE_CODE is 1.
484
485 2018-02-27 Nick Clifton <nickc@redhat.com>
486
487 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
488 message.
489 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
490 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
491 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
492 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
493 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
494 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
495 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
496 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
497 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
498
499 PR 22875
500 * elf-bfd.h (struct elf_backend_data): Change the return type of
501 the elf_info_to_howto and elf_info_to_howto_rel function pointers
502 to bfd_boolean.
503 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
504 value from the info_to_howto function and fail if that function
505 failed.
506 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
507 from the info_to_howto function.
508 (elf32_h8_relax_section): Likewise.
509 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
510 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
511 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
512 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
513 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
514 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
515 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
516 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
517 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
518 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
519 (riscv_elf_relocate_section): Likewise.
520 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
521 bfd_boolean. Issue an error message, set an error value and
522 return FALSE if the reloc is not recognized.
523 (elf_hppa_info_to_howto_rel): Likewise.
524 * elf-m10200.c (mn10200_info_to_howto): Likewise.
525 * elf-m10300.c (mn10300_info_to_howto): Likewise.
526 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
527 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
528 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
529 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
530 * elf32-bfin.c (bfin_info_to_howto): Likewise.
531 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
532 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
533 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
534 (cris_info_to_howto_rela): Likewise.
535 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
536 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
537 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
538 Likewise.
539 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
540 (elf32_dlx_info_to_howto_rel): Likewise.
541 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
542 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
543 * elf32-frv.c (frv_info_to_howto_rela)
544 (frvfdpic_info_to_howto_rel): Likewise.
545 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
546 * elf32-gen.c (elf_generic_info_to_howto)
547 (elf_generic_info_to_howto_rel): Likewise.
548 * elf32-h8300.c (elf32_h8_info_to_howto)
549 (elf32_h8_info_to_howto_rel): Likewise.
550 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
551 * elf32-i386.c (elf_i386_reloc_type_lookup)
552 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
553 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
554 Likewise.
555 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
556 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
557 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
558 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
559 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
560 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
561 Likewise.
562 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
563 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
564 * elf32-m68k.c (rtype_to_howto): Likewise.
565 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
566 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
567 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
568 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
569 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
570 Likewise.
571 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
572 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
573 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
574 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
575 Likewise.
576 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
577 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
578 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
579 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
580 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
581 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
582 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
583 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
584 * elf32-score.c (s3_bfd_score_info_to_howto)
585 (_bfd_score_info_to_howto): Likewise.
586 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
587 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
588 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
589 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
590 (elf32_tic6x_info_to_howto_rel): Likewise.
591 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
592 * elf32-v850.c (v850_elf_info_to_howto_rel)
593 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
594 * elf32-vax.c (rtype_to_howto): Likewise.
595 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
596 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
597 (elf32_wasm32_info_to_howto_rela): Likewise.
598 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
599 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
600 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
601 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
602 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
603 * elf64-gen.c (elf_generic_info_to_howto)
604 (elf_generic_info_to_howto_rel): Likewise.
605 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
606 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
607 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
608 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
609 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
610 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
611 Likewise.
612 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
613 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
614 Likewise.
615 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
616 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
617 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
618 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
619 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
620 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
621 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
622 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
623 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
624 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
625 Default to NULL.
626
627 2018-02-26 Jim Wilson <jimw@sifive.com>
628 Stephan Schreiber <info@fs-driver.org>
629
630 PR 15904
631 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
632 call, set changed_contents and changed_relocs. Likewise after
633 successful ia64_elf_relax_br call.
634
635 2018-02-26 Alan Modra <amodra@gmail.com>
636
637 * elf.c (assign_file_positions_except_relocs): Don't segfault
638 when actual number of phdrs is less than allocated. Delete
639 outdated comment. Formatting.
640
641 2018-02-26 Alan Modra <amodra@gmail.com>
642
643 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
644 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
645 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
646 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
647 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
648 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
649 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
650 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
651 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
652 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
653 error/warning messages.
654
655 2018-02-26 Alan Modra <amodra@gmail.com>
656
657 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
658 * syms.c: Standardize error/warning messages.
659
660 2018-02-26 Alan Modra <amodra@gmail.com>
661
662 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
663 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
664 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
665 * peXXigen.c, * peicode.h: Standardize error/warning messages.
666
667 2018-02-26 Alan Modra <amodra@gmail.com>
668
669 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
670
671 2018-02-26 Alan Modra <amodra@gmail.com>
672
673 * elfxx-mips.c: Standardize error/warning messages.
674
675 2018-02-26 Alan Modra <amodra@gmail.com>
676
677 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
678 * elflink.c: Standardize error/warning messages. Replace use of
679 linker callback einfo with _bfd_error_handler when possible.
680
681 2018-02-26 Alan Modra <amodra@gmail.com>
682
683 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
684 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
685 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
686 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
687 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
688 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
689 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
690 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
691 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
692 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
693 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
694 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
695 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
696 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
697 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
698 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
699 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
700 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
701 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
702 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
703 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
704 unrecognized/unsupported reloc message.
705
706 2018-02-26 Alan Modra <amodra@gmail.com>
707
708 * elf32-ppc.c: Standardize error/warning messages. Use
709 _bfd_error_handler rather than einfo when einfo features not used.
710 * elf64-ppc.c: Likewise.
711
712 2018-02-23 Alan Modra <amodra@gmail.com>
713
714 PR 22881
715 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
716 segment if no matching LOAD segment.
717
718 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
719
720 * elf32-nds32.h: Define mask for ict_model.
721
722 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
723
724 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
725
726 2018-02-19 Maciej W. Rozycki <macro@mips.com>
727
728 Revert
729 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
730
731 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
732 .reginfo section has wrong size.
733
734 2018-02-19 Maciej W. Rozycki <macro@mips.com>
735
736 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
737 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
738 `.MIPS.abiflags' sections.
739 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
740 section's end.
741
742 2018-02-19 Maciej W. Rozycki <macro@mips.com>
743
744 * section.c (SEC_FIXED_SIZE): New macro.
745 * bfd-in2.h: Regenerate.
746
747 2018-02-19 Maciej W. Rozycki <macro@mips.com>
748
749 * section.c (SEC_HAS_GOT_REF): Remove macro.
750 * bfd-in2.h: Regenerate.
751
752 2018-02-19 Alan Modra <amodra@gmail.com>
753
754 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
755 arguments.
756 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
757 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
758 (_bfd_riscv_relax_pc): Likewise and fix typos.
759 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
760 * libbfd.h: Regenerate.
761
762 2018-02-19 Alan Modra <amodra@gmail.com>
763
764 * dwarf2.c (read_section): Don't use 'll' format modifier.
765 (find_abstract_instance): Likewise.
766 * elfcore.h (elf_core_file_p): Likewise.
767
768 2018-02-19 Alan Modra <amodra@gmail.com>
769
770 * bfd-in.h: Include inttypes.h or if not available define
771 PRId64, PRIu64 and PRIx64.
772 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
773 modifier to print bfd_vma.
774 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
775 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
776 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
777 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
778 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
779 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
780 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
781 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
782 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
783 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
784 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
785 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
786 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
787 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
788 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
789 and cast input to uint64_t, and similarly for Ld and Lu.
790 * bfd-in2.h: Regenerate.
791
792 2018-02-19 Alan Modra <amodra@gmail.com>
793
794 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
795 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
796 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
797 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
798 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
799 * reloc.c: Replace use of %R and %T in format strings passed to
800 einfo and friends by %pR and %pT.
801
802 2018-02-19 Alan Modra <amodra@gmail.com>
803
804 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
805 of %A and %B.
806 * aout-adobe.c: Update all messages using %A and %B.
807 * aout-cris.c: Likewise.
808 * aoutx.h: Likewise.
809 * archive.c: Likewise.
810 * binary.c: Likewise.
811 * cache.c: Likewise.
812 * coff-alpha.c: Likewise.
813 * coff-arm.c: Likewise.
814 * coff-i860.c: Likewise.
815 * coff-mcore.c: Likewise.
816 * coff-ppc.c: Likewise.
817 * coff-rs6000.c: Likewise.
818 * coff-sh.c: Likewise.
819 * coff-tic4x.c: Likewise.
820 * coff-tic54x.c: Likewise.
821 * coff-tic80.c: Likewise.
822 * coff64-rs6000.c: Likewise.
823 * coffcode.h: Likewise.
824 * coffgen.c: Likewise.
825 * cofflink.c: Likewise.
826 * coffswap.h: Likewise.
827 * compress.c: Likewise.
828 * cpu-arm.c: Likewise.
829 * ecoff.c: Likewise.
830 * elf-attrs.c: Likewise.
831 * elf-eh-frame.c: Likewise.
832 * elf-ifunc.c: Likewise.
833 * elf-m10300.c: Likewise.
834 * elf-properties.c: Likewise.
835 * elf-s390-common.c: Likewise.
836 * elf.c: Likewise.
837 * elf32-arc.c: Likewise.
838 * elf32-arm.c: Likewise.
839 * elf32-avr.c: Likewise.
840 * elf32-bfin.c: Likewise.
841 * elf32-cr16.c: Likewise.
842 * elf32-cr16c.c: Likewise.
843 * elf32-cris.c: Likewise.
844 * elf32-crx.c: Likewise.
845 * elf32-d10v.c: Likewise.
846 * elf32-d30v.c: Likewise.
847 * elf32-epiphany.c: Likewise.
848 * elf32-fr30.c: Likewise.
849 * elf32-frv.c: Likewise.
850 * elf32-gen.c: Likewise.
851 * elf32-hppa.c: Likewise.
852 * elf32-i370.c: Likewise.
853 * elf32-i386.c: Likewise.
854 * elf32-i960.c: Likewise.
855 * elf32-ip2k.c: Likewise.
856 * elf32-iq2000.c: Likewise.
857 * elf32-lm32.c: Likewise.
858 * elf32-m32c.c: Likewise.
859 * elf32-m32r.c: Likewise.
860 * elf32-m68hc11.c: Likewise.
861 * elf32-m68hc12.c: Likewise.
862 * elf32-m68hc1x.c: Likewise.
863 * elf32-m68k.c: Likewise.
864 * elf32-mcore.c: Likewise.
865 * elf32-mep.c: Likewise.
866 * elf32-metag.c: Likewise.
867 * elf32-microblaze.c: Likewise.
868 * elf32-moxie.c: Likewise.
869 * elf32-msp430.c: Likewise.
870 * elf32-mt.c: Likewise.
871 * elf32-nds32.c: Likewise.
872 * elf32-nios2.c: Likewise.
873 * elf32-or1k.c: Likewise.
874 * elf32-pj.c: Likewise.
875 * elf32-ppc.c: Likewise.
876 * elf32-rl78.c: Likewise.
877 * elf32-rx.c: Likewise.
878 * elf32-s390.c: Likewise.
879 * elf32-score.c: Likewise.
880 * elf32-score7.c: Likewise.
881 * elf32-sh-symbian.c: Likewise.
882 * elf32-sh.c: Likewise.
883 * elf32-sh64.c: Likewise.
884 * elf32-sparc.c: Likewise.
885 * elf32-spu.c: Likewise.
886 * elf32-tic6x.c: Likewise.
887 * elf32-tilepro.c: Likewise.
888 * elf32-v850.c: Likewise.
889 * elf32-vax.c: Likewise.
890 * elf32-visium.c: Likewise.
891 * elf32-wasm32.c: Likewise.
892 * elf32-xgate.c: Likewise.
893 * elf32-xtensa.c: Likewise.
894 * elf64-alpha.c: Likewise.
895 * elf64-gen.c: Likewise.
896 * elf64-hppa.c: Likewise.
897 * elf64-ia64-vms.c: Likewise.
898 * elf64-mmix.c: Likewise.
899 * elf64-ppc.c: Likewise.
900 * elf64-s390.c: Likewise.
901 * elf64-sh64.c: Likewise.
902 * elf64-sparc.c: Likewise.
903 * elf64-x86-64.c: Likewise.
904 * elfcode.h: Likewise.
905 * elfcore.h: Likewise.
906 * elflink.c: Likewise.
907 * elfnn-aarch64.c: Likewise.
908 * elfnn-ia64.c: Likewise.
909 * elfnn-riscv.c: Likewise.
910 * elfxx-mips.c: Likewise.
911 * elfxx-sparc.c: Likewise.
912 * elfxx-tilegx.c: Likewise.
913 * elfxx-x86.c: Likewise.
914 * hpux-core.c: Likewise.
915 * ieee.c: Likewise.
916 * ihex.c: Likewise.
917 * libbfd.c: Likewise.
918 * linker.c: Likewise.
919 * mach-o.c: Likewise.
920 * merge.c: Likewise.
921 * mmo.c: Likewise.
922 * oasys.c: Likewise.
923 * pdp11.c: Likewise.
924 * pe-mips.c: Likewise.
925 * peXXigen.c: Likewise.
926 * peicode.h: Likewise.
927 * reloc.c: Likewise.
928 * rs6000-core.c: Likewise.
929 * srec.c: Likewise.
930 * stabs.c: Likewise.
931 * vms-alpha.c: Likewise.
932 * xcofflink.c: Likewise.
933
934 2018-02-19 Alan Modra <amodra@gmail.com>
935
936 PR 22845
937 * elf.c (IS_TBSS): Define.
938 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
939 (assign_file_positions_for_non_load_sections): Revert last change.
940 Properly calculate load segment limits to compare against relro limits.
941
942 2018-02-17 Alan Modra <amodra@gmail.com>
943
944 PR 22845
945 * elf.c (assign_file_positions_for_non_load_sections): Ignore
946 degenerate zero size PT_LOAD segments when finding one overlapping
947 the PT_GNU_RELRO segment.
948
949 2018-02-16 Alan Modra <amodra@gmail.com>
950
951 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
952 (_bfd_bool_bfd_true): Rename from bfd_true.
953 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
954 (_bfd_int_bfd_0): Rename from bfd_0.
955 (_bfd_uint_bfd_0): Rename from bfd_0u.
956 (_bfd_long_bfd_0): Rename from bfd_0l.
957 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
958 (_bfd_void_bfd): Rename from bfd_void.
959 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
960 (_bfd_bool_bfd_link_false_error),
961 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
962 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
963 (_bfd_bool_bfd_asection_bfd_asection_true),
964 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
965 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
966 * archive.c (_bfd_noarchive_get_elt_at_index),
967 (_bfd_noarchive_openr_next_archived_file),
968 (_bfd_noarchive_construct_extended_name_table),
969 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
970 (_bfd_noarchive_write_armap): New functions.
971 * archures.c (_bfd_nowrite_set_arch_mach): New function.
972 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
973 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
974 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
975 (alpha_ecoff_swap_coff_lineno_out),
976 (alpha_ecoff_swap_coff_reloc_out): New functions.
977 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
978 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
979 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
980 (mips_ecoff_swap_coff_lineno_out),
981 (mips_ecoff_swap_coff_reloc_out): New functions.
982 * coffcode.h (coff_set_alignment_hook): Replace define with
983 new function.
984 (symname_in_debug_hook): Likewise.
985 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
986 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
987 * elf.c (assign_file_positions_except_relocs): Test
988 elf_backend_allow_non_load_phdr for NULL.
989 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
990 _bfd_elf_link_omit_section_dynsym. Update uses.
991 (_bfd_elf_omit_section_dynsym_all): New function.
992 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
993 (_bfd_elf_omit_section_dynsym_default): Declare.
994 (_bfd_elf_omit_section_dynsym_all): Declare.
995 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
996 (_bfd_nolink_bfd_get_relocated_section_contents),
997 (_bfd_nolink_bfd_lookup_section_flags),
998 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
999 (_bfd_nolink_bfd_link_hash_table_create),
1000 (_bfd_nolink_bfd_link_just_syms),
1001 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
1002 (_bfd_nolink_bfd_link_split_section),
1003 (_bfd_nolink_section_already_linked),
1004 (_bfd_nolink_bfd_define_common_symbol),
1005 (_bfd_nolink_bfd_define_start_stop): New functions.
1006 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
1007 (_bfd_norelocs_bfd_reloc_name_lookup),
1008 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
1009 * section.c (_bfd_nowrite_set_section_contents): New function.
1010 * syms.c (_bfd_nosymbols_canonicalize_symtab),
1011 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
1012 (_bfd_nosymbols_get_symbol_version_string),
1013 (_bfd_nosymbols_bfd_is_local_label_name),
1014 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
1015 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
1016 (_bfd_nosymbols_bfd_make_debug_symbol),
1017 ( _bfd_nosymbols_read_minisymbols),
1018 ( _bfd_nosymbols_minisymbol_to_symbol),
1019 (_bfd_nodynamic_get_synthetic_symtab): New functions.
1020 * libbfd-in.h: Declare new functions. Update existing defines,
1021 removing casts.
1022 * aix386-core.c: Update to use new hooks. Formatting.
1023 * aout-adobe.c: Likewise.
1024 * aout-arm.c: Likewise.
1025 * aout-target.h: Likewise.
1026 * aout-tic30.c: Likewise.
1027 * aoutf1.h: Likewise.
1028 * binary.c: Likewise.
1029 * bout.c: Likewise.
1030 * cisco-core.c: Likewise.
1031 * coff-alpha.c: Likewise.
1032 * coff-i386.c: Likewise.
1033 * coff-i860.c: Likewise.
1034 * coff-i960.c: Likewise.
1035 * coff-ia64.c: Likewise.
1036 * coff-mips.c: Likewise.
1037 * coff-ppc.c: Likewise.
1038 * coff-rs6000.c: Likewise.
1039 * coff-sh.c: Likewise.
1040 * coff-tic30.c: Likewise.
1041 * coff-tic54x.c: Likewise.
1042 * coff-x86_64.c: Likewise.
1043 * coff64-rs6000.c: Likewise.
1044 * coffcode.h: Likewise.
1045 * elf-m10300.c: Likewise.
1046 * elf32-cr16.c: Likewise.
1047 * elf32-lm32.c: Likewise.
1048 * elf32-m32r.c: Likewise.
1049 * elf32-metag.c: Likewise.
1050 * elf32-score.c: Likewise.
1051 * elf32-score7.c: Likewise.
1052 * elf32-tilepro.c: Likewise.
1053 * elf32-xstormy16.c: Likewise.
1054 * elf32-xtensa.c: Likewise.
1055 * elf64-alpha.c: Likewise.
1056 * elf64-hppa.c: Likewise.
1057 * elf64-ia64-vms.c: Likewise.
1058 * elf64-mmix.c: Likewise.
1059 * elf64-sh64.c: Likewise.
1060 * elfnn-ia64.c: Likewise.
1061 * elfxx-sparc.c: Likewise.
1062 * elfxx-target.h: Likewise.
1063 * elfxx-tilegx.c: Likewise.
1064 * elfxx-x86.h: Likewise.
1065 * hp300hpux.c: Likewise.
1066 * hppabsd-core.c: Likewise.
1067 * hpux-core.c: Likewise.
1068 * i386msdos.c: Likewise.
1069 * i386os9k.c: Likewise.
1070 * ieee.c: Likewise.
1071 * ihex.c: Likewise.
1072 * irix-core.c: Likewise.
1073 * libaout.h: Likewise.
1074 * libecoff.h: Likewise.
1075 * mach-o-target.c: Likewise.
1076 * mach-o.c: Likewise.
1077 * mipsbsd.c: Likewise.
1078 * mmo.c: Likewise.
1079 * netbsd-core.c: Likewise.
1080 * nlm-target.h: Likewise.
1081 * oasys.c: Likewise.
1082 * osf-core.c: Likewise.
1083 * pdp11.c: Likewise.
1084 * pe-mips.c: Likewise.
1085 * pe-x86_64.c: Likewise.
1086 * pef.c: Likewise.
1087 * plugin.c: Likewise.
1088 * ppcboot.c: Likewise.
1089 * ptrace-core.c: Likewise.
1090 * sco5-core.c: Likewise.
1091 * som.c: Likewise.
1092 * sparclynx.c: Likewise.
1093 * srec.c: Likewise.
1094 * tekhex.c: Likewise.
1095 * trad-core.c: Likewise.
1096 * verilog.c: Likewise.
1097 * versados.c: Likewise.
1098 * vms-alpha.c: Likewise.
1099 * vms-lib.c: Likewise.
1100 * wasm-module.c: Likewise.
1101 * xsym.c: Likewise.
1102 * libbfd.h: Regenerate.
1103
1104 2018-02-15 Jim Wilson <jimw@sifive.com>
1105
1106 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
1107 symbols whose section address is zero.
1108
1109 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
1110 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
1111 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
1112 Add %X%P to error messages.
1113
1114 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
1115
1116 PR ld/22832
1117 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1118 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
1119 and assert that the result of the call is not NULL.
1120
1121 2018-02-14 Nick Clifton <nickc@redhat.com>
1122
1123 PR 22823
1124 Revert previous delta. Add extra casts to avoid compile time
1125 warnings instead.
1126 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
1127 cast to avoid warning from gcc v8 compiler.
1128 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1129 (_bfd_generic_bfd_set_private_flags): Likewise.
1130 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1131 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1132 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1133 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1134 (_bfd_noarchive_construct_extended_name_table): Likewise.
1135 (_bfd_noarchive_truncate_arname): Likewise.
1136 (_bfd_noarchive_write_ar_hdr): Likewise.
1137 (_bfd_noarchive_get_elt_at_index): Likewise.
1138 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1139 (_bfd_nosymbols_print_symbol): Likewise.
1140 (_bfd_nosymbols_get_symbol_info): Likewise.
1141 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1142 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1143 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1144 (_bfd_nosymbols_get_lineno): Likewise.
1145 (_bfd_nosymbols_find_nearest_line): Likewise.
1146 (_bfd_nosymbols_find_line): Likewise.
1147 (_bfd_nosymbols_find_inliner_info): Likewise.
1148 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1149 (_bfd_nosymbols_read_minisymbols): Likewise.
1150 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1151 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1152 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1153 (_bfd_nowrite_set_arch_mach): Likewise.
1154 (_bfd_nowrite_set_section_contents): Likewise.
1155 (_bfd_nolink_sizeof_headers): Likewise.
1156 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1157 (_bfd_nolink_bfd_relax_section): Likewise.
1158 (_bfd_nolink_bfd_gc_sections): Likewise.
1159 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1160 (_bfd_nolink_bfd_merge_sections): Likewise.
1161 (_bfd_nolink_bfd_is_group_section): Likewise.
1162 (_bfd_nolink_bfd_discard_group): Likewise.
1163 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1164 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1165 (_bfd_nolink_bfd_link_just_syms): Likewise.
1166 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1167 (_bfd_nolink_bfd_final_link): Likewise.
1168 (_bfd_nolink_bfd_link_split_section): Likewise.
1169 (_bfd_nolink_section_already_linked): Likewise.
1170 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1171 (_bfd_nolink_bfd_define_start_stop): Likewise.
1172 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1173 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1174 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1175 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1176 * libbfd.c (bfd_false_any): Delete.
1177 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
1178 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
1179 * libbfd.h (extern): Regenerate
1180 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
1181 cast to avoid warning from gcc v8 compiler.
1182 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1183 * binary.c (binary_get_symbol_info): Likewise.
1184 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1185 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1186 * coffcode.h (coff_set_alignment_hook): Likewise.
1187 (symname_in_debug_hook): Likewise.
1188 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1189 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1190 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1191 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1192 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1193 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1194 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1195 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1196 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1197 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1198 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1199 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1200 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1201 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1202 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1203 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1204 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1205 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1206 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1207 (bfd_elfNN_bfd_set_private_flags): Likewise.
1208 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1209 (elf_backend_init_index_section): Likewise.
1210 (elf_backend_allow_non_load_phdr): Likewise.
1211 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1212 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1213 * ieee.c (ieee_construct_extended_name_table): Likewise.
1214 (ieee_write_armap): Likewise.
1215 (ieee_write_ar_hdr): Likewise.
1216 (ieee_bfd_is_target_special_symbol): Likewise.
1217 * ihex.c (ihex_canonicalize_symtab): Likewise.
1218 (ihex_bfd_is_target_special_symbol): Likewise.
1219 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1220 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1221 (_bfd_ecoff_set_alignment_hook): Likewise.
1222 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1223 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1224 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1225 * oasys.c (oasys_construct_extended_name_table): Likewise.
1226 (oasys_write_armap): Likewise.
1227 (oasys_write_ar_hdr): Likewise.
1228 (oasys_bfd_is_target_special_symbol): Likewise.
1229 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1230 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1231 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1232 * som.c (som_bfd_is_target_special_symbol): Likewise.
1233 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1234 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1235 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1236 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1237 (versados_bfd_reloc_name_lookup): Likewise.
1238 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1239 (vms_bfd_define_start_stop): Likewise.
1240 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1241 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1242 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1243
1244 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1245
1246 PR ld/22842
1247 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1248 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1249 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1250 R_X86_64_PC32 reloc against dynamic function in data section.
1251 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1252 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1253 against dynamic function in data section.
1254 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1255 function address only if pcrel_plt is true.
1256 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1257 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1258 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1259 PC-relative relocation against a function definition in data
1260 secton in PIE. Remove the obsolete comments.
1261 (elf_x86_link_hash_table): Add pcrel_plt.
1262
1263 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1264
1265 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1266 instead of bfd_link_pic, for building shared library.
1267
1268 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1269
1270 PR gas/22791
1271 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1272 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1273 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1274 against protected function in shared object.
1275
1276 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1277
1278 PR 22828
1279 * po/ru.po: Fix typo in Russian translation.
1280
1281 2018-02-13 Maciej W. Rozycki <macro@mips.com>
1282
1283 * wasm-module.c (wasm_scan_name_function_section): Rename
1284 `index' local variable to `idx'.
1285
1286 2018-02-13 Nick Clifton <nickc@redhat.com>
1287
1288 PR 22823
1289 Fix compile time warnings generated by gcc version 8.
1290 * libbfd-in.h: Remove extraneous text from prototypes.
1291 Add prototypes for bfd_false_any, bfd_true_any,
1292 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1293 bfd_n1_any, bfd_void_any.
1294 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1295 function.
1296 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1297 (_bfd_generic_bfd_set_private_flags): Likewise.
1298 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1299 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1300 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1301 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1302 (_bfd_noarchive_construct_extended_name_table): Likewise.
1303 (_bfd_noarchive_truncate_arname): Likewise.
1304 (_bfd_noarchive_write_ar_hdr): Likewise.
1305 (_bfd_noarchive_get_elt_at_index): Likewise.
1306 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1307 (_bfd_nosymbols_print_symbol): Likewise.
1308 (_bfd_nosymbols_get_symbol_info): Likewise.
1309 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1310 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1311 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1312 (_bfd_nosymbols_get_lineno): Likewise.
1313 (_bfd_nosymbols_find_nearest_line): Likewise.
1314 (_bfd_nosymbols_find_line): Likewise.
1315 (_bfd_nosymbols_find_inliner_info): Likewise.
1316 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1317 (_bfd_nosymbols_read_minisymbols): Likewise.
1318 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1319 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1320 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1321 (_bfd_nowrite_set_arch_mach): Likewise.
1322 (_bfd_nowrite_set_section_contents): Likewise.
1323 (_bfd_nolink_sizeof_headers): Likewise.
1324 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1325 (_bfd_nolink_bfd_relax_section): Likewise.
1326 (_bfd_nolink_bfd_gc_sections): Likewise.
1327 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1328 (_bfd_nolink_bfd_merge_sections): Likewise.
1329 (_bfd_nolink_bfd_is_group_section): Likewise.
1330 (_bfd_nolink_bfd_discard_group): Likewise.
1331 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1332 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1333 (_bfd_nolink_bfd_link_just_syms): Likewise.
1334 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1335 (_bfd_nolink_bfd_final_link): Likewise.
1336 (_bfd_nolink_bfd_link_split_section): Likewise.
1337 (_bfd_nolink_section_already_linked): Likewise.
1338 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1339 (_bfd_nolink_bfd_define_start_stop): Likewise.
1340 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1341 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1342 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1343 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1344 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1345 accepts one or more arguments.
1346 (bfd_true_any): Likewise.
1347 (bfd_nullvoidptr_any): Likewise.
1348 (bfd_0_any): Likewise.
1349 (bfd_0u_any): Likewise.
1350 (bfd_0l_any): Likewise.
1351 (_bfd_n1_any): Likewise.
1352 (bfd_void_any): Likewise.
1353 * libbfd.h (extern): Regenerate
1354 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1355 based dummy function.
1356 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1357 * binary.c (binary_get_symbol_info): Likewise.
1358 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1359 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1360 * coffcode.h (coff_set_alignment_hook): Likewise.
1361 (symname_in_debug_hook): Likewise.
1362 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1363 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1364 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1365 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1366 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1367 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1368 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1369 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1370 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1371 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1372 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1373 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1374 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1375 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1376 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1377 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1378 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1379 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1380 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1381 (bfd_elfNN_bfd_set_private_flags): Likewise.
1382 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1383 (elf_backend_init_index_section): Likewise.
1384 (elf_backend_allow_non_load_phdr): Likewise.
1385 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1386 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1387 * ieee.c (ieee_construct_extended_name_table): Likewise.
1388 (ieee_write_armap): Likewise.
1389 (ieee_write_ar_hdr): Likewise.
1390 (ieee_bfd_is_target_special_symbol): Likewise.
1391 * ihex.c (ihex_canonicalize_symtab): Likewise.
1392 (ihex_bfd_is_target_special_symbol): Likewise.
1393 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1394 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1395 (_bfd_ecoff_set_alignment_hook): Likewise.
1396 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1397 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1398 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1399 * oasys.c (oasys_construct_extended_name_table): Likewise.
1400 (oasys_write_armap): Likewise.
1401 (oasys_write_ar_hdr): Likewise.
1402 (oasys_bfd_is_target_special_symbol): Likewise.
1403 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1404 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1405 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1406 * som.c (som_bfd_is_target_special_symbol): Likewise.
1407 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1408 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1409 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1410 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1411 (versados_bfd_reloc_name_lookup): Likewise.
1412 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1413 (vms_bfd_define_start_stop): Likewise.
1414 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1415 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1416 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1417 * elf32-arc.c (get_replace_function): Assign replacement function
1418 to func pointer.
1419 * elf32-i370.c (i370_noop): Update prototype.
1420
1421 2018-02-13 Alan Modra <amodra@gmail.com>
1422
1423 PR 22836
1424 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1425 relocation sections. If size reduces to just the flag word,
1426 remove that too and mark with SEC_EXCLUDE.
1427 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1428
1429 2018-02-13 Alan Modra <amodra@gmail.com>
1430
1431 PR 22829
1432 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1433 PT_GNU_RELRO setup.
1434
1435 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
1436
1437 * i386msdos.c (msdos_mkobject); New function.
1438 (msdos_object_p): New function.
1439 (i386_msdos_vec): Use msdos_object_p as the check_format
1440 function.
1441 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1442 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1443 IMAGE_NT_SIGNATURE.
1444 * peXXigen.c: Likewise.
1445 * coff-ia64.c: Likewise.
1446
1447 2018-02-12 Nick Clifton <nickc@redhat.com>
1448
1449 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1450 assignment.
1451 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1452
1453 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1454
1455 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1456 (sparc_elf_append_rela): Assert that there is enough room in section.
1457 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1458 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1459 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1460 For a symbol subject to a GOT relocation, reserve a slot in the
1461 relocation section if the symbol isn't dynamic and we are in PIC mode.
1462 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1463 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1464 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1465 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1466 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1467 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1468 undefined weak symbol with non-default visibility. Remove superfluous
1469 'else' and fix formatting.
1470
1471 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1472
1473 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1474 is_solaris.
1475 (i386_elf32_sol2_vec): Don't declare.
1476 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1477 Don't set need_global_offset_table.
1478 (elf_i386_solaris_arch_bed): New.
1479 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1480 Solaris.
1481 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1482 target_os != is_nacl instead of target_os == is_normal.
1483 (x86_64_elf64_sol2_vec): Don't declare.
1484 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1485 is_nacl instead of target_os == is_normal. Don't set
1486 need_global_offset_table.
1487 (elf_x86_64_solaris_arch_bed): New.
1488 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1489 Solaris.
1490 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1491 _GLOBAL_OFFSET_TABLE_ for Solaris.
1492 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1493 need_global_offset_table.
1494 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1495 (elf_x86_link_hash_table): Remove need_global_offset_table.
1496 (elf_x86_init_table): Likewise.
1497
1498 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1499
1500 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1501 Remove prototype.
1502 (i386_elf32_sol2_vec): Declared.
1503 (elf_i386_link_setup_gnu_properties): Set
1504 need_global_offset_table with info->output_bfd->xvec.
1505 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1506 Remove prototype.
1507 (x86_64_elf64_sol2_vec): Declared.
1508 (elf_x86_64_link_setup_gnu_properties): Set
1509 need_global_offset_table with info->output_bfd->xvec.
1510
1511 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1512
1513 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1514 New prototype.
1515 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1516 for Solaris.
1517 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1518 New prototype.
1519 (elf_x86_64_link_setup_gnu_properties): Set
1520 need_global_offset_table for Solaris.
1521 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1522 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1523 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1524 need_global_offset_table.
1525 * elfxx-x86.h (elf_x86_link_hash_table): Add
1526 need_global_offset_table.
1527 (elf_x86_init_table): Likewise.
1528
1529 2018-02-08 Jim Wilson <jimw@sifive.com>
1530
1531 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1532 change.
1533
1534 2018-02-08 Nick Clifton <nickc@redhat.com>
1535
1536 PR 22788
1537 * elf.c (elf_parse_notes): Reject notes with excessuively large
1538 alignments.
1539
1540 2018-02-07 Alan Modra <amodra@gmail.com>
1541
1542 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1543 * elf32-ppc.c: Remove speculation barrier support.
1544 * elf32-ppc.h: Likewise.
1545 * elf64-ppc.c: Likewise.
1546 * elf64-ppc.h: Likewise.
1547
1548 2018-02-06 Jim Wilson <jimw@sifive.com>
1549
1550 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1551 callback to report an error.
1552
1553 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1554
1555 PR ld/22263
1556 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1557 into call to !bfd_link_executable and tidy up.
1558 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1559 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1560 !bfd_link_executable.
1561 <R_SPARC_TLS_IE_HI22>: Likewise.
1562 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1563 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1564 !bfd_link_executable.
1565 <R_SPARC_WPLT30>: Tidy up.
1566 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1567 !bfd_link_executable.
1568 (allocate_dynrelocs): Likewise.
1569 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1570 <R_SPARC_TLS_GD_HI22>: Merge into...
1571 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1572 sparc_elf_tls_transition and remove redundant code.
1573 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1574 !bfd_link_executable.
1575 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1576 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1577 <R_SPARC_TLS_LDM_CALL>: Likewise.
1578 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1579 <R_SPARC_TLS_GD_ADD>: Likewise.
1580 <R_SPARC_TLS_LDM_ADD>: Likewise.
1581 <R_SPARC_TLS_LDO_ADD>: Likewise.
1582 <R_SPARC_TLS_IE_LD>: Likewise.
1583
1584 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1585
1586 PR 22789
1587 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1588 functions failed to find the function name, try the generic elf
1589 find function instead.
1590
1591 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1592
1593 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1594 'memcpy' instead of 'strncpy' when writing the magic number.
1595
1596 2018-02-06 Nick Clifton <nickc@redhat.com>
1597
1598 PR 22794
1599 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1600 section before attempting to read it in.
1601 (bfd_get_alt_debug_link_info): Likewise.
1602
1603 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1604
1605 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1606 line information in addition to name, if they can be found.
1607
1608 2018-02-05 Renlin Li <renlin.li@arm.com>
1609
1610 PR ld/22764
1611 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1612 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1613 check for writeable section as well.
1614
1615 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1616
1617 PR ld/22782
1618 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1619 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1620 undefined weak symbol to 0.
1621 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1622 if _GLOBAL_OFFSET_TABLE_ is referenced.
1623 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1624 got_referenced instead of ref_regular_nonweak. Remove the
1625 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1626 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1627
1628 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1629
1630 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1631 initialize `hi_reloc'.
1632
1633 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1634
1635 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1636 SHT_MIPS_REGINFO sections don't assert the correct size and
1637 report an error instead.
1638
1639 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1640
1641 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1642 status from `->elf_backend_section_processing'.
1643
1644 2018-02-02 Jim Wilson <jimw@sifive.com>
1645
1646 PR ld/22756
1647 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1648 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1649 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1650 Pass new argument to riscv_relax_delete_bytes.
1651 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1652 ATTRIBUTE_UNUSED from link_info parameter.
1653
1654 2018-02-02 Alan Modra <amodra@gmail.com>
1655
1656 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1657 emitted for toc sequence optimization. Set and use "howto" later.
1658
1659 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1660
1661 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1662 arithmetic on NULL pointer.
1663 * elflink.c (_bfd_elf_archive_symbol_lookup,
1664 elf_link_add_archive_symbols): Likewise.
1665
1666 2018-01-31 Michael Matz <matz@suse.de>
1667
1668 * elflink.c (bfd_elf_define_start_stop): Fix check of
1669 def_dynamic.
1670
1671 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1672
1673 PR ld/21964
1674 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1675 __stop symbols are referenced by shared objects.
1676
1677 2018-01-30 Alan Modra <amodra@gmail.com>
1678
1679 PR 22758
1680 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1681 segment when demand paged with lma on the same page. Test this
1682 before load/non-load, executable/non-executable,
1683 writable/non-writable tests and simplify. Delete bogus relro
1684 condition in writable/non-writable test. Delete outdated
1685 comment. Formatting.
1686
1687 2018-01-30 Alan Modra <amodra@gmail.com>
1688
1689 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1690 symbols dynamic.
1691
1692 2018-01-29 Alan Modra <amodra@gmail.com>
1693
1694 PR 22741
1695 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1696 range before converting to a symbol table pointer.
1697
1698 2018-01-27 Nick Clifton <nickc@redhat.com>
1699
1700 * po/ru.po: Updated Russian translation.
1701
1702 2018-01-26 Alan Modra <amodra@gmail.com>
1703
1704 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1705 they are defined dynamically.
1706
1707 2018-01-26 Alan Modra <amodra@gmail.com>
1708
1709 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1710 .branch_lt changes size.
1711
1712 2018-01-25 Alan Modra <amodra@gmail.com>
1713
1714 PR 22746
1715 * elfcode.h (elf_object_p): Avoid integer overflow.
1716
1717 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1718
1719 PR ld/22727
1720 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1721 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1722
1723 Revert
1724 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1725
1726 PR ld/22263
1727 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1728 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1729 bfd_link_executable for TLS check.
1730 (_bfd_sparc_elf_check_relocs): Likewise.
1731 (allocate_dynrelocs): Likewise.
1732 (_bfd_sparc_elf_relocate_section): Likewise.
1733
1734 2018-01-24 Renlin Li <renlin.li@arm.com>
1735
1736 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1737 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1738 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1739 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1740 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1741 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1742 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1743
1744 2018-01-24 Renlin Li <renlin.li@arm.com>
1745
1746 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1747 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1748 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1749 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1750 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1751 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1752 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1753 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1754 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1755 * bfd-in2.h: Regenerate.
1756 * libbfd.h: Regenerate.
1757
1758 2018-01-23 Maciej W. Rozycki <macro@mips.com>
1759
1760 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1761 `mips_elf32_section_processing' comment reference.
1762
1763 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1764
1765 PR ld/22721
1766 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1767 versioned __tls_get_addr symbol.
1768
1769 2018-01-19 Nick Clifton <nickc@redhat.com>
1770
1771 * po/fr.po: Updated French translation.
1772
1773 2018-01-18 Alan Modra <amodra@gmail.com>
1774
1775 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1776 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1777 (ppc64_elf_build_stubs): Likewise.
1778
1779 2018-01-17 Nick Clifton <nickc@redhat.com>
1780
1781 * po/ru.po: Updated Russian translation.
1782 * po/uk/po: Updated Ukranian translation.
1783
1784 2018-01-17 Alan Modra <amodra@gmail.com>
1785
1786 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1787
1788 2018-01-17 Alan Modra <amodra@gmail.com>
1789
1790 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1791 (CRSETEQ, BEQCTRM): Define.
1792 (is_nonpic_glink_stub): Don't check bctr.
1793 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1794 (ppc_elf_relax_section): Size speculation barrier.
1795 (output_bctr): New function.
1796 (write_glink_stub): Use output_bctr.
1797 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1798 (ppc_elf_finish_dynamic_symbol): Likewise.
1799 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1800 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1801 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1802 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1803 (size_global_entry_stubs): Handle speculation barrier sizing.
1804 (plt_stub_size): Likewise.
1805 (output_bctr): New function.
1806 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1807 barrier.
1808 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1809 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1810 (build_global_entry_stubs): Output speculation barrier.
1811 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1812 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1813
1814 2018-01-17 Alan Modra <amodra@gmail.com>
1815
1816 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1817 __tls_get_addr_opt, and alignment sizing.
1818 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1819 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1820 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1821 or 8 insns.
1822 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1823 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1824 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1825 by PLT reloc count.
1826 (write_glink_stub): Handle __tls_get_addr_opt stub.
1827 Pad out to size given by GLINK_ENTRY_SIZE.
1828 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1829 (ppc_elf_finish_dynamic_symbol): Likewise.
1830 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1831 insn array since so many need rewriting.
1832 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1833 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1834 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1835 nops. Adjust all uses.
1836 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1837 in glink_vma calculation.
1838 (struct ppc_link_hash_table): Add global_entry section pointer.
1839 (create_linkage_sections): Create separate section for global
1840 entry stubs.
1841 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1842 (size_global_entry_stubs): Handle sizing for aligned stubs.
1843 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1844 and don't stash end of glink branch table in rawsize.
1845 (ppc_build_one_stub): Rewrite stub size calculations.
1846 (build_global_entry_stubs): Use new section.
1847 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1848 Build lazy link stubs out to end of section. Build global entry
1849 stubs in new section.
1850
1851 2018-01-15 Nick Clifton <nickc@redhat.com>
1852
1853 * po/uk.po: Updated Ukranian translation.
1854
1855 2018-01-13 Nick Clifton <nickc@redhat.com>
1856
1857 * po/bfd.pot: Regenerated.
1858
1859 2018-01-13 Nick Clifton <nickc@redhat.com>
1860
1861 * version.m4: Bump version to 2.30.51
1862 * configure: Regenerate.
1863
1864 2018-01-13 Nick Clifton <nickc@redhat.com>
1865
1866 2.30 branch created.
1867
1868 2018-01-12 Jens Widell <jl@opera.com>
1869
1870 * elf.c (setup_group): Optimize search for group by remembering
1871 last found group and restarting search at that index.
1872 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1873
1874 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1875
1876 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1877 bfd_link_common_skip_none in switch.
1878
1879 2018-01-12 Alan Modra <amodra@gmail.com>
1880
1881 PR ld/22649
1882 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1883 references on forced local symbols.
1884
1885 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1886
1887 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1888 .reginfo section has wrong size.
1889
1890 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1891
1892 PR ld/22393
1893 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1894 separate code and read-only data LOAD segments, create a new
1895 LOAD segment if the previous section contains text and the
1896 current section doesn't or vice versa. Don't put a writable
1897 section in a read-only segment if there is a RELRO segment.
1898
1899 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1900
1901 PR ld/22649
1902 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1903 references on forced local symbols.
1904
1905 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1906
1907 PR ld/22677
1908 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1909 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1910
1911 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1912
1913 PR 22662
1914 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1915
1916 2018-01-03 John Baldwin <jhb@FreeBSD.org>
1917
1918 * elf.c (elfcore_grok_freebsd_note): Handle
1919 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1920 NT_FREEBSD_PROCSTAT_VMMAP.
1921
1922 2018-01-03 Alan Modra <amodra@gmail.com>
1923
1924 Update year range in copyright notice of all files.
1925
1926 For older changes see ChangeLog-2017
1927 \f
1928 Copyright (C) 2018 Free Software Foundation, Inc.
1929
1930 Copying and distribution of this file, with or without modification,
1931 are permitted in any medium without royalty provided the copyright
1932 notice and this notice are preserved.
1933
1934 Local Variables:
1935 mode: change-log
1936 left-margin: 8
1937 fill-column: 74
1938 version-control: never
1939 End:
This page took 0.067895 seconds and 4 git commands to generate.