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