1 2018-03-28 Maciej W. Rozycki <macro@mips.com>
3 * elf-hppa.h (elf_hppa_info_to_howto_rel): Correct
4 `_bfd_error_handler' call formatting.
6 2018-03-28 Maciej W. Rozycki <macro@mips.com>
8 * elf32-mips.c (mips_info_to_howto_rel): Call
9 `mips_elf32_rtype_to_howto' directly rather than via
10 `->elf_backend_mips_rtype_to_howto'.
12 2018-03-28 Renlin Li <renlin.li@arm.com>
15 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
16 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
17 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
18 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
19 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
20 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
21 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
22 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
23 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
24 (elfNN_aarch64_final_link_relocate): Support new relocations.
25 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
27 (_bfd_aarch64_elf_resolve_relocation): Support new relocations.
29 2018-03-28 Renlin Li <renlin.li@arm.com>
32 * reloc.c: Add BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12
33 BFD_RELOC_AARCH64_TLSLE_LDST_TPREL_LO12_NC,
34 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
35 BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
36 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
37 BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
38 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
39 BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
40 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
41 BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
42 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add table entry for
43 TLSLE_LDST16_TPREL_LO12,
44 TLSLE_LDST16_TPREL_LO12_NC,
45 TLSLE_LDST32_TPREL_LO12,
46 TLSLE_LDST32_TPREL_LO12_NC,
47 TLSLE_LDST64_TPREL_LO12,
48 TLSLE_LDST64_TPREL_LO12_NC,
49 TLSLE_LDST8_TPREL_LO12,
50 TLSLE_LDST8_TPREL_LO12_NC.
51 * bfd-in2.h: Regenerated.
52 * libbfd.h: Regenerated.
54 2018-03-28 Eric Botcazou <ebotcazou@adacore.com>
57 * elfxx-sparc.c (struct _bfd_sparc_elf_link_hash_entry): Add new flag
58 has_old_style_got_reloc.
59 (_bfd_sparc_elf_check_relocs) <GOT relocations>: Set it for old-style
60 relocations. Fix a couple of long lines.
61 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: Do not generate
62 a R_SPARC_NONE for the GOT slot if the symbol is also subject to old-style
65 2018-03-25 H.J. Lu <hongjiu.lu@intel.com>
68 * elf64-x86-64.c (elf_x86_64_finish_dynamic_sections): Add
69 ENDBR64 to the TLSDESC PLT entry.
71 2018-03-21 Alan Modra <amodra@gmail.com>
73 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Trim uninteresting
74 symbols. Use size_t counts. Delete redundant opd test.
76 2018-03-21 Alan Modra <amodra@gmail.com>
78 * elf32-ppc.c (ppc_elf_tls_optimize): Delete locsyms.
80 2018-03-21 Alan Modra <amodra@gmail.com>
82 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Make tls_mask
84 (update_local_sym_info): Likewise for local_got_tls_masks.
85 (ppc_elf_tls_optimize): Likewise for lgot_masks.
87 2018-03-21 Alan Modra <amodra@gmail.com>
89 * elf64-ppc.c (ppc_size_one_stub): Fix comment typo.
90 (ppc64_elf_layout_multitoc): Allocate relocs for tprel as we
91 do in size_dynamic_sections.
93 2018-03-21 Alan Modra <amodra@gmail.com>
95 * elf64-ppc.c (ppc64_elf_relocate_section): Don't access rel[1]
96 without first checking array bounds.
97 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
99 2018-03-20 H.J. Lu <hongjiu.lu@intel.com>
102 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Set
103 non_ir_ref_dynamic if a symbol is made dynamic by --dynamic-list.
105 2018-03-19 Nick Clifton <nickc@redhat.com>
107 * po/es.po: Updated Spanish translation.
109 2018-03-15 Max Filippov <jcmvbkbc@gmail.com>
111 * elf32-xtensa.c (xlate_map_entry): Change types of address
112 fields from 'unsigned' to 'bfd_vma'.
113 (xlate_offset_with_removed_text): Use struct xlate_map_entry as
114 the key argument to bsearch. Allow offsets past the end of a
115 section, use the last map entry for translation of such offsets.
117 2018-03-15 Kuan-Lin Chen <kuanlinchentw@gmail.com>
119 * elf32-nds32.c (nds32_elf_ex9_build_hash_table): Removed.
120 Not support the target feature.
121 (nds32_elf_ex9_itb_base): Likewise.
122 (nds32_elf_ex9_import_table): Likewise.
123 (nds32_elf_ex9_finish): Likewise.
124 (nds32_elf_ex9_reloc_jmp): Likewise.
125 (nds32_elf_get_insn_with_reg): Likewise.
126 (nds32_get_local_syms): Likewise.
127 (nds32_elf_ex9_replace_instruction): Likewise.
128 (nds32_elf_ifc_calc): Likewise.
129 (nds32_elf_ifc_finish): Likewise.
130 (nds32_elf_ifc_replace): Likewise.
131 (nds32_elf_ifc_reloc): Likewise.
133 2018-03-14 Alan Modra <amodra@gmail.com>
135 * elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
136 sfpr size added before defining alias symbols.
137 (ppc64_elf_build_stubs): Add stub section padding before
138 copying sfpr contents and defining save/restore alias symbols.
140 2018-03-14 H.J. Lu <hongjiu.lu@intel.com>
143 * elflink.c (elf_gc_mark_debug_section): Also check the local
144 debug definition section.
146 2018-03-13 Nick Clifton <nickc@redhat.com>
149 * pei-x86_64.c (pex64_get_unwind_info): Change to a boolean
150 function. Add an end address parameter. Check access of the data
151 pointer to make sure that they do not extend beyond the end
152 address. Return FALSE if any check fails. Add the end address
153 pointer to the ui structure.
154 (pex64_xdata_print_uwd_codes): Check accesses of the raw unwind
155 codes to make sure that they do not extend beyond the end address
156 pointer. Print an error message and return immediately if any
159 2018-03-09 Nick Clifton <nickc@redhat.com>
161 * elf64-s390.c (elf_s390_relocate_section): Move check for
162 relocations against non-allocated sections to before the code that
163 handles ifunc relocations.
164 * elf32-s390.c (elf_s390_relocate_section): Likewise.
165 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Treat
166 relocs against IFUNC symbols in non-allocated sections as relocs
167 against FUNC symbols.
168 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
170 2018-03-08 H.J. Lu <hongjiu.lu@intel.com>
173 * elf32-i386.c (elf_i386_relocate_section): Treat relocation
174 against IFUNC symbol in SHT_NOTE section without SHF_ALLOC as
175 relocation against FUNC symbol.
176 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
178 2018-03-07 Renlin Li <renlin.li@arm.com>
181 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute
182 symbol, and don't emit relocation in specific case.
184 2018-03-07 Alan Modra <amodra@gmail.com>
186 * elf64-mips.c (mips_elf64_rtype_to_howto): Return NULL on error.
187 (mips_elf64_slurp_one_reloc_table): Pass on error.
189 2018-03-03 James Cowgill <james.cowgill@mips.com>
190 Maciej W. Rozycki <macro@mips.com>
193 * elfxx-mips.c (mips_elf_calculate_relocation): Only return
194 after calling `undefined_symbol' hook if this is an error
195 condition. Assume the value of 0 for the symbol requested
198 2018-03-02 Jim Wilson <jimw@sifive.com>
201 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Add 8 bytes for branch
202 and nop instead of 4.
203 (elfNN_arch64_build_stubs): Add nop after branch. Increase size by
206 2018-03-01 Jim Wilson <jimw@sifive.com>
209 * elfnn-riscv.c (riscv_relax_delete_bytes): When adjust st_size, use
210 else if instead of if.
212 2018-03-01 Alan Modra <amodra@gmail.com>
214 * elf32-ft32.c (ft32_info_to_howto_rela): Correct range test.
216 2018-02-28 Alan Modra <amodra@gmail.com>
219 * aoutx.h (swap_std_reloc_in): Correct r_index bound check.
221 2018-02-28 Nick Clifton <nickc@redhat.com>
225 * dwarf2.c (read_n_bytes): Replace size parameter with dwarf_block
226 pointer. Drop unused abfd parameter. Check the size of the block
227 before initialising the data field. Return the end pointer if the
229 (read_attribute_value): Adjust invocations of read_n_bytes.
232 * dwarf1.c (parse_die): Check the length of form blocks before
233 advancing the data pointer.
235 2018-02-28 Alan Modra <amodra@gmail.com>
238 * aoutx.h (translate_symbol_table): Print an error message and set
239 bfd_error on finding an invalid name string offset.
241 2018-02-27 H.J. Lu <hongjiu.lu@intel.com>
243 * config.in: Regenerated.
244 * configure: Likewise.
245 * configure.ac: Add --enable-separate-code.
246 (DEFAULT_LD_Z_SEPARATE_CODE): New AC_DEFINE_UNQUOTED. Default
247 to 1 for Linux/x86 targets,
248 * elf64-x86-64.c (ELF_MAXPAGESIZE): Set to 0x1000 if
249 DEFAULT_LD_Z_SEPARATE_CODE is 1.
251 2018-02-27 Nick Clifton <nickc@redhat.com>
253 * aout-cris.c (swap_ext_reloc_out): Standadize error/warning
255 * elf-hppa.h (elf_hppa_info_to_howto_rel): Likewise.
256 * elf32-i386.c (elf_i386_reloc_type_lookup): Likewise.
257 * elf32-xtensa.c (elf_xtensa_reloc_type_lookup): Likewise.
258 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Likewise.
259 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
260 * elf64-sh64.c (sh_elf64_info_to_howto): Likewise.
261 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
262 * elfxx-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Likewise.
263 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
266 * elf-bfd.h (struct elf_backend_data): Change the return type of
267 the elf_info_to_howto and elf_info_to_howto_rel function pointers
269 * elfcode.h (elf_slurp_reloc_table_from_section): Check the return
270 value from the info_to_howto function and fail if that function
272 * elf32-h8300.c (elf32_h8_relocate_section): Check return value
273 from the info_to_howto function.
274 (elf32_h8_relax_section): Likewise.
275 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
276 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
277 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
278 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
279 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
280 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise.
281 * elf64-sparc.c (elf64_sparc_slurp_one_reloc_table): Likewise.
282 * elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
283 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
284 * elfnn-riscv.c (riscv_elf_check_relocs): Likewise.
285 (riscv_elf_relocate_section): Likewise.
286 * elf-hppa.h (elf_hppa_info_to_howto): Change return type to
287 bfd_boolean. Issue an error message, set an error value and
288 return FALSE if the reloc is not recognized.
289 (elf_hppa_info_to_howto_rel): Likewise.
290 * elf-m10200.c (mn10200_info_to_howto): Likewise.
291 * elf-m10300.c (mn10300_info_to_howto): Likewise.
292 * elf.c (_bfd_elf_no_info_to_howto): Likewise.
293 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
294 * elf32-arm.c (elf32_arm_info_to_howto): Likewise.
295 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
296 * elf32-bfin.c (bfin_info_to_howto): Likewise.
297 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
298 * elf32-cr16c.c (elf_cr16c_info_to_howto): Likewise.
299 * elf32-cris.c (elf_cr16c_info_to_howto_rel)
300 (cris_info_to_howto_rela): Likewise.
301 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
302 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
303 * elf32-d30v.c (d30v_info_to_howto_rel, d30v_info_to_howto_rela):
305 * elf32-dlx.c (dlx_rtype_to_howto, elf32_dlx_info_to_howto)
306 (elf32_dlx_info_to_howto_rel): Likewise.
307 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
308 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
309 * elf32-frv.c (frv_info_to_howto_rela)
310 (frvfdpic_info_to_howto_rel): Likewise.
311 * elf32-ft32.c (ft32_info_to_howto_rela): Likewise.
312 * elf32-gen.c (elf_generic_info_to_howto)
313 (elf_generic_info_to_howto_rel): Likewise.
314 * elf32-h8300.c (elf32_h8_info_to_howto)
315 (elf32_h8_info_to_howto_rel): Likewise.
316 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
317 * elf32-i386.c (elf_i386_reloc_type_lookup)
318 (elf_i386_rtype_to_howto, elf_i386_info_to_howto_rel): Likewise.
319 * elf32-i860.c (lookup_howto, elf32_i860_info_to_howto_rela):
321 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
322 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
323 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
324 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
325 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
326 * elf32-m32r.c (m32r_info_to_howto_rel, m32r_info_to_howto):
328 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
329 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
330 * elf32-m68k.c (rtype_to_howto): Likewise.
331 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
332 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
333 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
334 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
335 * elf32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
337 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
338 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
339 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
340 * elf32-nds32.c (nds32_info_to_howto_rel, nds32_info_to_howto):
342 * elf32-nios2.c (nios2_elf32_info_to_howto): Likewise.
343 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
344 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
345 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
346 * elf32-pru.c (pru_elf32_info_to_howto): Likewise.
347 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
348 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
349 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
350 * elf32-score.c (s3_bfd_score_info_to_howto)
351 (_bfd_score_info_to_howto): Likewise.
352 * elf32-score7.c (s7_bfd_score_info_to_howto): Likewise.
353 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
354 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
355 * elf32-tic6x.c (elf32_tic6x_info_to_howto)
356 (elf32_tic6x_info_to_howto_rel): Likewise.
357 * elf32-tilepro.c (tilepro_info_to_howto_rela): Likewise.
358 * elf32-v850.c (v850_elf_info_to_howto_rel)
359 (v850_elf_info_to_howto_rela, v800_elf_info_to_howto): Likewise.
360 * elf32-vax.c (rtype_to_howto): Likewise.
361 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
362 * elf32-wasm32.c (elf32_wasm32_rtype_to_howto)
363 (elf32_wasm32_info_to_howto_rela): Likewise.
364 * elf32-xc16x.c (elf32_xc16x_info_to_howto): Likewise.
365 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
366 * elf32-xstormy16.c (xstormy16_info_to_howto_rela): Likewise.
367 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
368 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
369 * elf64-gen.c (elf_generic_info_to_howto)
370 (elf_generic_info_to_howto_rel): Likewise.
371 * elf64-ia64-vms.c (elf64_ia64_info_to_howto): Likewise.
372 * elf64-mips.c (mips_elf64_info_to_howto_rela): Likewise.
373 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
374 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
375 * elf64-s390.c (elf_s390_reloc_type_lookup): Likewise.
376 * elf64-sh64.c (elf_s390_info_to_howto, sh_elf64_info_to_howto):
378 * elf64-x86-64.c (elf_x86_64_info_to_howto): Likewise.
379 * elfn32-mips.c (mips_info_to_howto_rel, mips_info_to_howto_rela):
381 * elfnn-aarch64.c (elfNN_aarch64_info_to_howto): Likewise.
382 * elfnn-ia64.c (elfNN_ia64_info_to_howto): Likewise.
383 * elfnn-riscv.c (riscv_info_to_howto_rela): Likewise.
384 * elfxx-ia64.c (ia64_elf_reloc_type_lookup): Likewise.
385 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto): Likewise.
386 * elfxx-tilegx.c (tilegx_info_to_howto_rela): Likewise.
387 * elf32-score.h (s7_bfd_score_info_to_howto): Update prototype.
388 * elfxx-sparc.h (_bfd_sparc_elf_info_to_howto): Update prototype.
389 * elfxx-tilegx.h (tilegx_info_to_howto_rela): Update prototype.
390 * elfxx-target.h (elf_info_to_howto, elf_info_to_howto_rel):
393 2018-02-26 Jim Wilson <jimw@sifive.com>
394 Stephan Schreiber <info@fs-driver.org>
397 * elfnn-ia64.c (elfNN_ia64_relax_section): After ia64_elf_relax_brl
398 call, set changed_contents and changed_relocs. Likewise after
399 successful ia64_elf_relax_br call.
401 2018-02-26 Alan Modra <amodra@gmail.com>
403 * elf.c (assign_file_positions_except_relocs): Don't segfault
404 when actual number of phdrs is less than allocated. Delete
405 outdated comment. Formatting.
407 2018-02-26 Alan Modra <amodra@gmail.com>
409 * elf-m10300.c, * elf-s390-common.c, * elf32-arc.c, * elf32-cris.c,
410 * elf32-dlx.c, * elf32-frv.c, * elf32-i370.c, * elf32-lm32.c,
411 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-m68k.c,
412 * elf32-microblaze.c, * elf32-msp430.c, * elf32-nds32.c,
413 * elf32-nios2.c, * elf32-or1k.c, * elf32-rl78.c, * elf32-rx.c,
414 * elf32-score.c, * elf32-score7.c, * elf32-sh-symbian.c,
415 * elf32-sh.c, * elf32-spu.c, * elf32-v850.c, * elf32-xtensa.c,
416 * elf64-alpha.c, * elf64-ia64-vms.c, * elf64-mmix.c,
417 * elf64-sh64.c, * elf64-sparc.c, * elfnn-ia64.c, * elfxx-tilegx.c,
418 * mmo.c, * osf-core.c, * srec.c, * vms-alpha.c: Standardize
419 error/warning messages.
421 2018-02-26 Alan Modra <amodra@gmail.com>
423 * archive.c, * bfd.c, * linker.c, * reloc.c, * stabs.c,
424 * syms.c: Standardize error/warning messages.
426 2018-02-26 Alan Modra <amodra@gmail.com>
428 * aout-adobe.c, * aout-cris.c, * i386linux.c, * m68klinux.c,
429 * sparclinux.c, * coff-alpha.c, * coff-arm.c, * coff-mcore.c,
430 * coffcode.h, * coffgen.c, * cofflink.c, * ecoff.c, * pe-mips.c,
431 * peXXigen.c, * peicode.h: Standardize error/warning messages.
433 2018-02-26 Alan Modra <amodra@gmail.com>
435 * elf32-arm.c, * elfnn-aarch64.c: Standardize error/warning messages.
437 2018-02-26 Alan Modra <amodra@gmail.com>
439 * elfxx-mips.c: Standardize error/warning messages.
441 2018-02-26 Alan Modra <amodra@gmail.com>
443 * dwarf2.c, * elf-attrs.c, * elf-eh-frame.c, * elf.c, * elf32-gen.c,
444 * elflink.c: Standardize error/warning messages. Replace use of
445 linker callback einfo with _bfd_error_handler when possible.
447 2018-02-26 Alan Modra <amodra@gmail.com>
449 * aoutx.h, * coff-alpha.c, * coff-i860.c, * coff-m68k.c,
450 * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c,
451 * coff-tic4x.c, * coff-tic54x.c, * coff-tic80.c, * coff-w65.c,
452 * elf-bfd.h, * elf-m10300.c, * elf.c, * elf32-avr.c, * elf32-bfin.c,
453 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
454 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
455 * elf32-fr30.c, * elf32-frv.c, * elf32-i370.c, * elf32-i386.c,
456 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
457 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
458 * elf32-m68k.c, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c,
459 * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
460 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-or1k.c,
461 * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-rx.c,
462 * elf32-s390.c, * elf32-sh.c, * elf32-spu.c, * elf32-tic6x.c,
463 * elf32-v850.c, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c,
464 * elf32-xgate.c, * elf32-xtensa.c, * elf64-alpha.c,
465 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c,
466 * elf64-ppc.c, * elf64-s390.c, * elf64-sparc.c, * elf64-x86-64.c,
467 * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
468 * elfnn-riscv.c, * elfxx-mips.c, * elfxx-riscv.c, * elfxx-riscv.h,
469 * elfxx-sparc.c, * elfxx-sparc.h, * reloc.c: Standardize
470 unrecognized/unsupported reloc message.
472 2018-02-26 Alan Modra <amodra@gmail.com>
474 * elf32-ppc.c: Standardize error/warning messages. Use
475 _bfd_error_handler rather than einfo when einfo features not used.
476 * elf64-ppc.c: Likewise.
478 2018-02-23 Alan Modra <amodra@gmail.com>
481 * elf.c (assign_file_positions_for_non_load_sections): Remove RELRO
482 segment if no matching LOAD segment.
484 2018-02-23 Kuan-Lin Chen <kuanlinchentw@gmail.com>
486 * elf32-nds32.h: Define mask for ict_model.
488 2018-02-20 Jason Duerstock <jason.duerstock@gmail.com>
490 * elfnn-ia64.c (elf_backend_can_gc_sections): Enable.
492 2018-02-19 Maciej W. Rozycki <macro@mips.com>
495 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
497 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
498 .reginfo section has wrong size.
500 2018-02-19 Maciej W. Rozycki <macro@mips.com>
502 * elfxx-mips.c (_bfd_mips_elf_always_size_sections): Set
503 SEC_FIXED_SIZE and SEC_HAS_CONTENTS flags for `.reginfo' and
504 `.MIPS.abiflags' sections.
505 (_bfd_mips_elf_final_link): Avoid reading beyond `.reginfo'
508 2018-02-19 Maciej W. Rozycki <macro@mips.com>
510 * section.c (SEC_FIXED_SIZE): New macro.
511 * bfd-in2.h: Regenerate.
513 2018-02-19 Maciej W. Rozycki <macro@mips.com>
515 * section.c (SEC_HAS_GOT_REF): Remove macro.
516 * bfd-in2.h: Regenerate.
518 2018-02-19 Alan Modra <amodra@gmail.com>
520 * elf-attrs.c (_bfd_elf_parse_attributes): Correct _bfd_error_handler
522 * elfxx-mips.c (_bfd_mips_elf_final_link): Likewise.
523 * elfnn-riscv.c (_bfd_riscv_relax_align): Likewise.
524 (_bfd_riscv_relax_pc): Likewise and fix typos.
525 * libbfd-in.h (_bfd_error_handler): Add attribute printf.
526 * libbfd.h: Regenerate.
528 2018-02-19 Alan Modra <amodra@gmail.com>
530 * dwarf2.c (read_section): Don't use 'll' format modifier.
531 (find_abstract_instance): Likewise.
532 * elfcore.h (elf_core_file_p): Likewise.
534 2018-02-19 Alan Modra <amodra@gmail.com>
536 * bfd-in.h: Include inttypes.h or if not available define
537 PRId64, PRIu64 and PRIx64.
538 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L
539 modifier to print bfd_vma.
540 * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c,
541 * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c,
542 * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c,
543 * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c,
544 * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c,
545 * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c,
546 * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c,
547 * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c,
548 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c,
549 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
550 * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c,
551 * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c,
552 * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c,
553 * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c,
554 * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64,
555 and cast input to uint64_t, and similarly for Ld and Lu.
556 * bfd-in2.h: Regenerate.
558 2018-02-19 Alan Modra <amodra@gmail.com>
560 * elf32-arm.c, * elf32-hppa.c, * elf32-lm32.c, * elf32-m32r.c,
561 * elf32-metag.c, * elf32-nds32.c, * elf32-or1k.c, * elf32-ppc.c,
562 * elf32-s390.c, * elf32-sh.c, * elf32-tic6x.c, * elf32-tilepro.c,
563 * elf64-ppc.c, * elf64-s390.c, * elflink.c, * elfnn-aarch64.c,
564 * elfnn-riscv.c, * elfxx-sparc.c, * elfxx-tilegx.c, * elfxx-x86.c,
565 * reloc.c: Replace use of %R and %T in format strings passed to
566 einfo and friends by %pR and %pT.
568 2018-02-19 Alan Modra <amodra@gmail.com>
570 * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Handle %pA and %pB in place
572 * aout-adobe.c: Update all messages using %A and %B.
573 * aout-cris.c: Likewise.
575 * archive.c: Likewise.
576 * binary.c: Likewise.
578 * coff-alpha.c: Likewise.
579 * coff-arm.c: Likewise.
580 * coff-i860.c: Likewise.
581 * coff-mcore.c: Likewise.
582 * coff-ppc.c: Likewise.
583 * coff-rs6000.c: Likewise.
584 * coff-sh.c: Likewise.
585 * coff-tic4x.c: Likewise.
586 * coff-tic54x.c: Likewise.
587 * coff-tic80.c: Likewise.
588 * coff64-rs6000.c: Likewise.
589 * coffcode.h: Likewise.
590 * coffgen.c: Likewise.
591 * cofflink.c: Likewise.
592 * coffswap.h: Likewise.
593 * compress.c: Likewise.
594 * cpu-arm.c: Likewise.
596 * elf-attrs.c: Likewise.
597 * elf-eh-frame.c: Likewise.
598 * elf-ifunc.c: Likewise.
599 * elf-m10300.c: Likewise.
600 * elf-properties.c: Likewise.
601 * elf-s390-common.c: Likewise.
603 * elf32-arc.c: Likewise.
604 * elf32-arm.c: Likewise.
605 * elf32-avr.c: Likewise.
606 * elf32-bfin.c: Likewise.
607 * elf32-cr16.c: Likewise.
608 * elf32-cr16c.c: Likewise.
609 * elf32-cris.c: Likewise.
610 * elf32-crx.c: Likewise.
611 * elf32-d10v.c: Likewise.
612 * elf32-d30v.c: Likewise.
613 * elf32-epiphany.c: Likewise.
614 * elf32-fr30.c: Likewise.
615 * elf32-frv.c: Likewise.
616 * elf32-gen.c: Likewise.
617 * elf32-hppa.c: Likewise.
618 * elf32-i370.c: Likewise.
619 * elf32-i386.c: Likewise.
620 * elf32-i960.c: Likewise.
621 * elf32-ip2k.c: Likewise.
622 * elf32-iq2000.c: Likewise.
623 * elf32-lm32.c: Likewise.
624 * elf32-m32c.c: Likewise.
625 * elf32-m32r.c: Likewise.
626 * elf32-m68hc11.c: Likewise.
627 * elf32-m68hc12.c: Likewise.
628 * elf32-m68hc1x.c: Likewise.
629 * elf32-m68k.c: Likewise.
630 * elf32-mcore.c: Likewise.
631 * elf32-mep.c: Likewise.
632 * elf32-metag.c: Likewise.
633 * elf32-microblaze.c: Likewise.
634 * elf32-moxie.c: Likewise.
635 * elf32-msp430.c: Likewise.
636 * elf32-mt.c: Likewise.
637 * elf32-nds32.c: Likewise.
638 * elf32-nios2.c: Likewise.
639 * elf32-or1k.c: Likewise.
640 * elf32-pj.c: Likewise.
641 * elf32-ppc.c: Likewise.
642 * elf32-rl78.c: Likewise.
643 * elf32-rx.c: Likewise.
644 * elf32-s390.c: Likewise.
645 * elf32-score.c: Likewise.
646 * elf32-score7.c: Likewise.
647 * elf32-sh-symbian.c: Likewise.
648 * elf32-sh.c: Likewise.
649 * elf32-sh64.c: Likewise.
650 * elf32-sparc.c: Likewise.
651 * elf32-spu.c: Likewise.
652 * elf32-tic6x.c: Likewise.
653 * elf32-tilepro.c: Likewise.
654 * elf32-v850.c: Likewise.
655 * elf32-vax.c: Likewise.
656 * elf32-visium.c: Likewise.
657 * elf32-wasm32.c: Likewise.
658 * elf32-xgate.c: Likewise.
659 * elf32-xtensa.c: Likewise.
660 * elf64-alpha.c: Likewise.
661 * elf64-gen.c: Likewise.
662 * elf64-hppa.c: Likewise.
663 * elf64-ia64-vms.c: Likewise.
664 * elf64-mmix.c: Likewise.
665 * elf64-ppc.c: Likewise.
666 * elf64-s390.c: Likewise.
667 * elf64-sh64.c: Likewise.
668 * elf64-sparc.c: Likewise.
669 * elf64-x86-64.c: Likewise.
670 * elfcode.h: Likewise.
671 * elfcore.h: Likewise.
672 * elflink.c: Likewise.
673 * elfnn-aarch64.c: Likewise.
674 * elfnn-ia64.c: Likewise.
675 * elfnn-riscv.c: Likewise.
676 * elfxx-mips.c: Likewise.
677 * elfxx-sparc.c: Likewise.
678 * elfxx-tilegx.c: Likewise.
679 * elfxx-x86.c: Likewise.
680 * hpux-core.c: Likewise.
683 * libbfd.c: Likewise.
684 * linker.c: Likewise.
685 * mach-o.c: Likewise.
690 * pe-mips.c: Likewise.
691 * peXXigen.c: Likewise.
692 * peicode.h: Likewise.
694 * rs6000-core.c: Likewise.
697 * vms-alpha.c: Likewise.
698 * xcofflink.c: Likewise.
700 2018-02-19 Alan Modra <amodra@gmail.com>
703 * elf.c (IS_TBSS): Define.
704 (_bfd_elf_map_sections_to_segments): Use IS_TBSS.
705 (assign_file_positions_for_non_load_sections): Revert last change.
706 Properly calculate load segment limits to compare against relro limits.
708 2018-02-17 Alan Modra <amodra@gmail.com>
711 * elf.c (assign_file_positions_for_non_load_sections): Ignore
712 degenerate zero size PT_LOAD segments when finding one overlapping
713 the PT_GNU_RELRO segment.
715 2018-02-16 Alan Modra <amodra@gmail.com>
717 * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
718 (_bfd_bool_bfd_true): Rename from bfd_true.
719 (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
720 (_bfd_int_bfd_0): Rename from bfd_0.
721 (_bfd_uint_bfd_0): Rename from bfd_0u.
722 (_bfd_long_bfd_0): Rename from bfd_0l.
723 (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
724 (_bfd_void_bfd): Rename from bfd_void.
725 (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
726 (_bfd_bool_bfd_link_false_error),
727 (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
728 (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
729 (_bfd_bool_bfd_asection_bfd_asection_true),
730 (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
731 (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
732 * archive.c (_bfd_noarchive_get_elt_at_index),
733 (_bfd_noarchive_openr_next_archived_file),
734 (_bfd_noarchive_construct_extended_name_table),
735 (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
736 (_bfd_noarchive_write_armap): New functions.
737 * archures.c (_bfd_nowrite_set_arch_mach): New function.
738 * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
739 (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
740 (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
741 (alpha_ecoff_swap_coff_lineno_out),
742 (alpha_ecoff_swap_coff_reloc_out): New functions.
743 * coff-mips.c (mips_ecoff_swap_coff_aux_in),
744 (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
745 (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
746 (mips_ecoff_swap_coff_lineno_out),
747 (mips_ecoff_swap_coff_reloc_out): New functions.
748 * coffcode.h (coff_set_alignment_hook): Replace define with
750 (symname_in_debug_hook): Likewise.
751 * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
752 * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
753 * elf.c (assign_file_positions_except_relocs): Test
754 elf_backend_allow_non_load_phdr for NULL.
755 * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
756 _bfd_elf_link_omit_section_dynsym. Update uses.
757 (_bfd_elf_omit_section_dynsym_all): New function.
758 * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
759 (_bfd_elf_omit_section_dynsym_default): Declare.
760 (_bfd_elf_omit_section_dynsym_all): Declare.
761 * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
762 (_bfd_nolink_bfd_get_relocated_section_contents),
763 (_bfd_nolink_bfd_lookup_section_flags),
764 (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
765 (_bfd_nolink_bfd_link_hash_table_create),
766 (_bfd_nolink_bfd_link_just_syms),
767 (_bfd_nolink_bfd_copy_link_hash_symbol_type),
768 (_bfd_nolink_bfd_link_split_section),
769 (_bfd_nolink_section_already_linked),
770 (_bfd_nolink_bfd_define_common_symbol),
771 (_bfd_nolink_bfd_define_start_stop): New functions.
772 * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
773 (_bfd_norelocs_bfd_reloc_name_lookup),
774 (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
775 * section.c (_bfd_nowrite_set_section_contents): New function.
776 * syms.c (_bfd_nosymbols_canonicalize_symtab),
777 (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
778 (_bfd_nosymbols_get_symbol_version_string),
779 (_bfd_nosymbols_bfd_is_local_label_name),
780 (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
781 (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
782 (_bfd_nosymbols_bfd_make_debug_symbol),
783 ( _bfd_nosymbols_read_minisymbols),
784 ( _bfd_nosymbols_minisymbol_to_symbol),
785 (_bfd_nodynamic_get_synthetic_symtab): New functions.
786 * libbfd-in.h: Declare new functions. Update existing defines,
788 * aix386-core.c: Update to use new hooks. Formatting.
789 * aout-adobe.c: Likewise.
790 * aout-arm.c: Likewise.
791 * aout-target.h: Likewise.
792 * aout-tic30.c: Likewise.
793 * aoutf1.h: Likewise.
794 * binary.c: Likewise.
796 * cisco-core.c: Likewise.
797 * coff-alpha.c: Likewise.
798 * coff-i386.c: Likewise.
799 * coff-i860.c: Likewise.
800 * coff-i960.c: Likewise.
801 * coff-ia64.c: Likewise.
802 * coff-mips.c: Likewise.
803 * coff-ppc.c: Likewise.
804 * coff-rs6000.c: Likewise.
805 * coff-sh.c: Likewise.
806 * coff-tic30.c: Likewise.
807 * coff-tic54x.c: Likewise.
808 * coff-x86_64.c: Likewise.
809 * coff64-rs6000.c: Likewise.
810 * coffcode.h: Likewise.
811 * elf-m10300.c: Likewise.
812 * elf32-cr16.c: Likewise.
813 * elf32-lm32.c: Likewise.
814 * elf32-m32r.c: Likewise.
815 * elf32-metag.c: Likewise.
816 * elf32-score.c: Likewise.
817 * elf32-score7.c: Likewise.
818 * elf32-tilepro.c: Likewise.
819 * elf32-xstormy16.c: Likewise.
820 * elf32-xtensa.c: Likewise.
821 * elf64-alpha.c: Likewise.
822 * elf64-hppa.c: Likewise.
823 * elf64-ia64-vms.c: Likewise.
824 * elf64-mmix.c: Likewise.
825 * elf64-sh64.c: Likewise.
826 * elfnn-ia64.c: Likewise.
827 * elfxx-sparc.c: Likewise.
828 * elfxx-target.h: Likewise.
829 * elfxx-tilegx.c: Likewise.
830 * elfxx-x86.h: Likewise.
831 * hp300hpux.c: Likewise.
832 * hppabsd-core.c: Likewise.
833 * hpux-core.c: Likewise.
834 * i386msdos.c: Likewise.
835 * i386os9k.c: Likewise.
838 * irix-core.c: Likewise.
839 * libaout.h: Likewise.
840 * libecoff.h: Likewise.
841 * mach-o-target.c: Likewise.
842 * mach-o.c: Likewise.
843 * mipsbsd.c: Likewise.
845 * netbsd-core.c: Likewise.
846 * nlm-target.h: Likewise.
848 * osf-core.c: Likewise.
850 * pe-mips.c: Likewise.
851 * pe-x86_64.c: Likewise.
853 * plugin.c: Likewise.
854 * ppcboot.c: Likewise.
855 * ptrace-core.c: Likewise.
856 * sco5-core.c: Likewise.
858 * sparclynx.c: Likewise.
860 * tekhex.c: Likewise.
861 * trad-core.c: Likewise.
862 * verilog.c: Likewise.
863 * versados.c: Likewise.
864 * vms-alpha.c: Likewise.
865 * vms-lib.c: Likewise.
866 * wasm-module.c: Likewise.
868 * libbfd.h: Regenerate.
870 2018-02-15 Jim Wilson <jimw@sifive.com>
872 * elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
873 symbols whose section address is zero.
875 * elfnn-riscv.c (riscv_elf_relocate_section): Use bfd_reloc_dangerous
876 when pcrel_lo reloc has an addend. Use reloc_dangerous callback for
877 bfd_reloc_dangerous. Use einfo instead of warning callback for errors.
878 Add %X%P to error messages.
880 2018-02-15 Eric Botcazou <ebotcazou@adacore.com>
883 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
884 Pass FALSE instead of TRUE as 'create' argument to bfd_link_hash_lookup
885 and assert that the result of the call is not NULL.
887 2018-02-14 Nick Clifton <nickc@redhat.com>
890 Revert previous delta. Add extra casts to avoid compile time
892 * libbfd-in.h (_bfd_generic_bfd_copy_private_bfd_data): Add extra
893 cast to avoid warning from gcc v8 compiler.
894 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
895 (_bfd_generic_bfd_set_private_flags): Likewise.
896 (_bfd_generic_bfd_copy_private_section_data): Likewise.
897 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
898 (_bfd_generic_bfd_copy_private_header_data): Likewise.
899 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
900 (_bfd_noarchive_construct_extended_name_table): Likewise.
901 (_bfd_noarchive_truncate_arname): Likewise.
902 (_bfd_noarchive_write_ar_hdr): Likewise.
903 (_bfd_noarchive_get_elt_at_index): Likewise.
904 (_bfd_nosymbols_canonicalize_symtab): Likewise.
905 (_bfd_nosymbols_print_symbol): Likewise.
906 (_bfd_nosymbols_get_symbol_info): Likewise.
907 (_bfd_nosymbols_get_symbol_version_string): Likewise.
908 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
909 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
910 (_bfd_nosymbols_get_lineno): Likewise.
911 (_bfd_nosymbols_find_nearest_line): Likewise.
912 (_bfd_nosymbols_find_line): Likewise.
913 (_bfd_nosymbols_find_inliner_info): Likewise.
914 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
915 (_bfd_nosymbols_read_minisymbols): Likewise.
916 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
917 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
918 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
919 (_bfd_nowrite_set_arch_mach): Likewise.
920 (_bfd_nowrite_set_section_contents): Likewise.
921 (_bfd_nolink_sizeof_headers): Likewise.
922 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
923 (_bfd_nolink_bfd_relax_section): Likewise.
924 (_bfd_nolink_bfd_gc_sections): Likewise.
925 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
926 (_bfd_nolink_bfd_merge_sections): Likewise.
927 (_bfd_nolink_bfd_is_group_section): Likewise.
928 (_bfd_nolink_bfd_discard_group): Likewise.
929 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
930 (_bfd_nolink_bfd_link_add_symbols): Likewise.
931 (_bfd_nolink_bfd_link_just_syms): Likewise.
932 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
933 (_bfd_nolink_bfd_final_link): Likewise.
934 (_bfd_nolink_bfd_link_split_section): Likewise.
935 (_bfd_nolink_section_already_linked): Likewise.
936 (_bfd_nolink_bfd_define_common_symbol): Likewise.
937 (_bfd_nolink_bfd_define_start_stop): Likewise.
938 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
939 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
940 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
941 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
942 * libbfd.c (bfd_false_any): Delete.
943 (bfd_true_any, bfd_nullvoidptr_any, bfd_0_any): Delete.
944 (bfd_0u_any, bfd_0l_any, _bfd_n1_any, bfd_void_any): Delete.
945 * libbfd.h (extern): Regenerate
946 * aout-target.h (MY_bfd_is_target_special_symbol): Add extra
947 cast to avoid warning from gcc v8 compiler.
948 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
949 * binary.c (binary_get_symbol_info): Likewise.
950 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
951 * coff-mips.c (mips_ecoff_backend_data): Likewise.
952 * coffcode.h (coff_set_alignment_hook): Likewise.
953 (symname_in_debug_hook): Likewise.
954 (bfd_coff_backend_data bigobj_swap_table): Likewise.
955 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
956 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
957 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
958 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
959 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
960 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
961 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
962 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
963 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
964 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
965 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
966 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
967 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
968 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
969 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
970 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
971 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
972 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
973 (bfd_elfNN_bfd_set_private_flags): Likewise.
974 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
975 (elf_backend_init_index_section): Likewise.
976 (elf_backend_allow_non_load_phdr): Likewise.
977 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
978 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
979 * ieee.c (ieee_construct_extended_name_table): Likewise.
980 (ieee_write_armap): Likewise.
981 (ieee_write_ar_hdr): Likewise.
982 (ieee_bfd_is_target_special_symbol): Likewise.
983 * ihex.c (ihex_canonicalize_symtab): Likewise.
984 (ihex_bfd_is_target_special_symbol): Likewise.
985 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
986 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
987 (_bfd_ecoff_set_alignment_hook): Likewise.
988 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
989 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
990 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
991 * oasys.c (oasys_construct_extended_name_table): Likewise.
992 (oasys_write_armap): Likewise.
993 (oasys_write_ar_hdr): Likewise.
994 (oasys_bfd_is_target_special_symbol): Likewise.
995 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
996 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
997 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
998 * som.c (som_bfd_is_target_special_symbol): Likewise.
999 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1000 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1001 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1002 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1003 (versados_bfd_reloc_name_lookup): Likewise.
1004 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1005 (vms_bfd_define_start_stop): Likewise.
1006 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1007 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1008 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1010 2018-02-14 H.J. Lu <hongjiu.lu@intel.com>
1013 * elf32-i386.c (elf_i386_check_relocs): Pass FALSE for non
1014 PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1015 * elf64-x86-64.c (elf_x86_64_check_relocs): Create PLT for
1016 R_X86_64_PC32 reloc against dynamic function in data section.
1017 Pass TRUE for PC-relative PLT to NEED_DYNAMIC_RELOCATION_P.
1018 (elf_x86_64_relocate_section): Use PLT for R_X86_64_PC32 reloc
1019 against dynamic function in data section.
1020 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Use PLT in PIE as
1021 function address only if pcrel_plt is true.
1022 (_bfd_x86_elf_link_hash_table_create): Set pcrel_plt.
1023 * elfxx-x86.h (NEED_DYNAMIC_RELOCATION_P): Add PCREL_PLT for
1024 PC-relative PLT. If PLT is PC-relative, don't generate dynamic
1025 PC-relative relocation against a function definition in data
1026 secton in PIE. Remove the obsolete comments.
1027 (elf_x86_link_hash_table): Add pcrel_plt.
1029 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1031 * elfxx-x86.c (elf_x86_allocate_dynrelocs): Check bfd_link_dll,
1032 instead of bfd_link_pic, for building shared library.
1034 2018-02-13 H.J. Lu <hongjiu.lu@intel.com>
1037 * elf64-x86-64.c (is_32bit_relative_branch): Removed.
1038 (elf_x86_64_relocate_section): Check PIC relocations in PIE.
1039 Remove is_32bit_relative_branch usage. Disallow PC32 reloc
1040 against protected function in shared object.
1042 2018-02-13 Sergei Trofimovich <slyfox@inbox.ru>
1045 * po/ru.po: Fix typo in Russian translation.
1047 2018-02-13 Maciej W. Rozycki <macro@mips.com>
1049 * wasm-module.c (wasm_scan_name_function_section): Rename
1050 `index' local variable to `idx'.
1052 2018-02-13 Nick Clifton <nickc@redhat.com>
1055 Fix compile time warnings generated by gcc version 8.
1056 * libbfd-in.h: Remove extraneous text from prototypes.
1057 Add prototypes for bfd_false_any, bfd_true_any,
1058 bfd_nullvoidptr_any, bfd_0_any, bfd_0u_any, bfd_0l_any,
1059 bfd_n1_any, bfd_void_any.
1060 (_bfd_generic_bfd_copy_private_bfd_data): Use vararg based dummy
1062 (_bfd_generic_bfd_merge_private_bfd_data): Likewise.
1063 (_bfd_generic_bfd_set_private_flags): Likewise.
1064 (_bfd_generic_bfd_copy_private_section_data): Likewise.
1065 (_bfd_generic_bfd_copy_private_symbol_data): Likewise.
1066 (_bfd_generic_bfd_copy_private_header_data): Likewise.
1067 (_bfd_generic_bfd_print_private_bfd_data): Likewise.
1068 (_bfd_noarchive_construct_extended_name_table): Likewise.
1069 (_bfd_noarchive_truncate_arname): Likewise.
1070 (_bfd_noarchive_write_ar_hdr): Likewise.
1071 (_bfd_noarchive_get_elt_at_index): Likewise.
1072 (_bfd_nosymbols_canonicalize_symtab): Likewise.
1073 (_bfd_nosymbols_print_symbol): Likewise.
1074 (_bfd_nosymbols_get_symbol_info): Likewise.
1075 (_bfd_nosymbols_get_symbol_version_string): Likewise.
1076 (_bfd_nosymbols_bfd_is_local_label_name): Likewise.
1077 (_bfd_nosymbols_bfd_is_target_special_symbol): Likewise.
1078 (_bfd_nosymbols_get_lineno): Likewise.
1079 (_bfd_nosymbols_find_nearest_line): Likewise.
1080 (_bfd_nosymbols_find_line): Likewise.
1081 (_bfd_nosymbols_find_inliner_info): Likewise.
1082 (_bfd_nosymbols_bfd_make_debug_symbol): Likewise.
1083 (_bfd_nosymbols_read_minisymbols): Likewise.
1084 (_bfd_nosymbols_minisymbol_to_symbol): Likewise.
1085 (_bfd_norelocs_bfd_reloc_type_lookup): Likewise.
1086 (_bfd_norelocs_bfd_reloc_name_lookup): Likewise.
1087 (_bfd_nowrite_set_arch_mach): Likewise.
1088 (_bfd_nowrite_set_section_contents): Likewise.
1089 (_bfd_nolink_sizeof_headers): Likewise.
1090 (_bfd_nolink_bfd_get_relocated_section_contents): Likewise.
1091 (_bfd_nolink_bfd_relax_section): Likewise.
1092 (_bfd_nolink_bfd_gc_sections): Likewise.
1093 (_bfd_nolink_bfd_lookup_section_flags): Likewise.
1094 (_bfd_nolink_bfd_merge_sections): Likewise.
1095 (_bfd_nolink_bfd_is_group_section): Likewise.
1096 (_bfd_nolink_bfd_discard_group): Likewise.
1097 (_bfd_nolink_bfd_link_hash_table_create): Likewise.
1098 (_bfd_nolink_bfd_link_add_symbols): Likewise.
1099 (_bfd_nolink_bfd_link_just_syms): Likewise.
1100 (_bfd_nolink_bfd_copy_link_hash_symbol_type): Likewise.
1101 (_bfd_nolink_bfd_final_link): Likewise.
1102 (_bfd_nolink_bfd_link_split_section): Likewise.
1103 (_bfd_nolink_section_already_linked): Likewise.
1104 (_bfd_nolink_bfd_define_common_symbol): Likewise.
1105 (_bfd_nolink_bfd_define_start_stop): Likewise.
1106 (_bfd_nodynamic_canonicalize_dynamic_symtab): Likewise.
1107 (_bfd_nodynamic_get_synthetic_symtab): Likewise.
1108 (_bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_): Likewise.
1109 (_bfd_nodynamic_canonicalize_dynamic_reloc): Likewise.
1110 * libbfd.c (bfd_false_any): New function. Like bfd_false but
1111 accepts one or more arguments.
1112 (bfd_true_any): Likewise.
1113 (bfd_nullvoidptr_any): Likewise.
1114 (bfd_0_any): Likewise.
1115 (bfd_0u_any): Likewise.
1116 (bfd_0l_any): Likewise.
1117 (_bfd_n1_any): Likewise.
1118 (bfd_void_any): Likewise.
1119 * libbfd.h (extern): Regenerate
1120 * aout-target.h (MY_bfd_is_target_special_symbol): Use vararg
1121 based dummy function.
1122 * aout-tic30.c (tic30_aout_set_arch_mach): Likewise.
1123 * binary.c (binary_get_symbol_info): Likewise.
1124 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1125 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1126 * coffcode.h (coff_set_alignment_hook): Likewise.
1127 (symname_in_debug_hook): Likewise.
1128 (bfd_coff_backend_data bigobj_swap_table): Likewise.
1129 * elf-m10300.c (elf_backend_omit_section_dynsym): Likewise.
1130 * elf32-cr16.c (elf_backend_omit_section_dynsym): Likewise.
1131 * elf32-lm32.c (elf_backend_omit_section_dynsym): Likewise.
1132 * elf32-m32r.c (elf_backend_omit_section_dynsym): Likewise.
1133 * elf32-metag.c (elf_backend_omit_section_dynsym): Likewise.
1134 * elf32-score.c (elf_backend_omit_section_dynsym): Likewise.
1135 * elf32-score7.c (elf_backend_omit_section_dynsym): Likewise.
1136 * elf32-xstormy16.c (elf_backend_omit_section_dynsym): Likewise.
1137 * elf32-xtensa.c (elf_backend_omit_section_dynsym): Likewise.
1138 * elf64-alpha.c (elf_backend_omit_section_dynsym): Likewise.
1139 * elf64-hppa.c (elf_backend_omit_section_dynsym): Likewise.
1140 * elf64-ia64-vms.c (elf_backend_omit_section_dynsym): Likewise.
1141 * elf64-mmix.c (elf_backend_omit_section_dynsym): Likewise.
1142 * elf64-sh64.c (elf_backend_omit_section_dynsym): Likewise.
1143 * elfnn-ia64.c (elf_backend_omit_section_dynsym): Likewise.
1144 * elfxx-target.h (bfd_elfNN_bfd_debug_info_accumulate): Likewise.
1145 (bfd_elfNN_bfd_make_debug_symbol): Likewise.
1146 (bfd_elfNN_bfd_merge_private_bfd_data): Likewise.
1147 (bfd_elfNN_bfd_set_private_flags): Likewise.
1148 (bfd_elfNN_bfd_is_target_special_symbol): Likewise.
1149 (elf_backend_init_index_section): Likewise.
1150 (elf_backend_allow_non_load_phdr): Likewise.
1151 * elfxx-x86.h (elf_backend_omit_section_dynsym): Likewise.
1152 * i386msdos.c (msdos_bfd_is_target_special_symbol): Likewise.
1153 * ieee.c (ieee_construct_extended_name_table): Likewise.
1154 (ieee_write_armap): Likewise.
1155 (ieee_write_ar_hdr): Likewise.
1156 (ieee_bfd_is_target_special_symbol): Likewise.
1157 * ihex.c (ihex_canonicalize_symtab): Likewise.
1158 (ihex_bfd_is_target_special_symbol): Likewise.
1159 * libaout.h (aout_32_bfd_is_target_special_symbol): Likewise.
1160 * libecoff.h (_bfd_ecoff_bfd_is_target_special_symbol): Likewise.
1161 (_bfd_ecoff_set_alignment_hook): Likewise.
1162 * mach-o-target.c (bfd_mach_o_bfd_is_target_special_symbol): Likewise.
1163 * mmo.c (mmo_bfd_is_target_special_symbol): Likewise.
1164 * nlm-target.h (nlm_bfd_is_target_special_symbol): Likewise.
1165 * oasys.c (oasys_construct_extended_name_table): Likewise.
1166 (oasys_write_armap): Likewise.
1167 (oasys_write_ar_hdr): Likewise.
1168 (oasys_bfd_is_target_special_symbol): Likewise.
1169 * pef.c (bfd_pef_bfd_is_target_special_symbol): Likewise.
1170 * plugin.c (bfd_plugin_bfd_is_target_special_symbol): Likewise.
1171 * ppcboot.c (ppcboot_bfd_is_target_special_symbol): Likewise.
1172 * som.c (som_bfd_is_target_special_symbol): Likewise.
1173 * srec.c (srec_bfd_is_target_special_symbol): Likewise.
1174 * tekhex.c (tekhex_bfd_is_target_special_symbol): Likewise.
1175 * verilog.c (verilog_bfd_is_target_special_symbol): Likewise.
1176 * versados.c (versados_bfd_is_target_special_symbol): Likewise.
1177 (versados_bfd_reloc_name_lookup): Likewise.
1178 * vms-alpha.c (vms_bfd_is_target_special_symbol): Likewise.
1179 (vms_bfd_define_start_stop): Likewise.
1180 (alpha_vms_bfd_is_target_special_symbol): Likewise.
1181 * wasm-module.c (wasm_bfd_is_target_special_symbol): Likewise.
1182 * xsym.c (bfd_sym_bfd_is_target_special_symbol): Likewise.
1183 * elf32-arc.c (get_replace_function): Assign replacement function
1185 * elf32-i370.c (i370_noop): Update prototype.
1187 2018-02-13 Alan Modra <amodra@gmail.com>
1190 * elf.c (_bfd_elf_fixup_group_sections): Account for removed
1191 relocation sections. If size reduces to just the flag word,
1192 remove that too and mark with SEC_EXCLUDE.
1193 * elflink.c (bfd_elf_final_link): Strip empty group sections.
1195 2018-02-13 Alan Modra <amodra@gmail.com>
1198 * elf.c (assign_file_positions_for_non_load_sections): Rewrite
1201 2018-02-12 Zebediah Figura <z.figura12@gmail.com>
1203 * i386msdos.c (msdos_mkobject); New function.
1204 (msdos_object_p): New function.
1205 (i386_msdos_vec): Use msdos_object_p as the check_format
1207 * peicode.h: Rename external_PEI_DOS_hdr, DOSMAGIC, and
1208 NT_SIGNATURE to external_DOS_hdr, IMAGE_DOS_SIGNATURE, and
1210 * peXXigen.c: Likewise.
1211 * coff-ia64.c: Likewise.
1213 2018-02-12 Nick Clifton <nickc@redhat.com>
1215 * elf32-nds32.c (nds32_elf_relax_longjump3): Remove redundant
1217 * elf32-arc.c (elf_arc_relocate_section): Likewise.
1219 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1221 * elfxx-sparc.c (UNDEFINED_WEAK_RESOLVED_TO_ZERO): Reorder conditions.
1222 (sparc_elf_append_rela): Assert that there is enough room in section.
1223 (_bfd_sparc_elf_copy_indirect_symbol): Fix formatting.
1224 (_bfd_sparc_elf_adjust_dynamic_symbol): Minor tweak.
1225 (allocate_dynrelocs): Remove outdated comments and reorder conditions.
1226 For a symbol subject to a GOT relocation, reserve a slot in the
1227 relocation section if the symbol isn't dynamic and we are in PIC mode.
1228 (_bfd_sparc_elf_relocate_section) <R_SPARC_GOTDATA_OP>: If relocation
1229 is relaxed and a slot was reserved, generate a R_SPARC_NONE relocation.
1230 <R_SPARC_GOTDATA_OP_HIX22>: Adjust comments.
1231 <R_SPARC_PC10>: Reorder conditions. Remove always-false assertion.
1232 (_bfd_sparc_elf_finish_dynamic_symbol): Rename local_undefweak into
1233 resolved_to_zero. Do not generate a dynamic GOT relocation for an
1234 undefined weak symbol with non-default visibility. Remove superfluous
1235 'else' and fix formatting.
1237 2018-02-09 H.J. Lu <hongjiu.lu@intel.com>
1239 * elf32-i386.c (elf_i386_get_synthetic_symtab): Also handle
1241 (i386_elf32_sol2_vec): Don't declare.
1242 (elf_i386_link_setup_gnu_properties): Also handle is_solaris.
1243 Don't set need_global_offset_table.
1244 (elf_i386_solaris_arch_bed): New.
1245 (elf_backend_arch_data): Set to elf_i386_solaris_arch_bed for
1247 * elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Check
1248 target_os != is_nacl instead of target_os == is_normal.
1249 (x86_64_elf64_sol2_vec): Don't declare.
1250 (elf_x86_64_link_setup_gnu_properties): Check target_os !=
1251 is_nacl instead of target_os == is_normal. Don't set
1252 need_global_offset_table.
1253 (elf_x86_64_solaris_arch_bed): New.
1254 (elf_backend_arch_data): Set to elf_x86_64_solaris_arch_bed for
1256 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep
1257 _GLOBAL_OFFSET_TABLE_ for Solaris.
1258 (_bfd_x86_elf_link_setup_gnu_properties): Don't copy
1259 need_global_offset_table.
1260 * elfxx-x86.h (elf_x86_target_os): Add is_solaris.
1261 (elf_x86_link_hash_table): Remove need_global_offset_table.
1262 (elf_x86_init_table): Likewise.
1264 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1266 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1268 (i386_elf32_sol2_vec): Declared.
1269 (elf_i386_link_setup_gnu_properties): Set
1270 need_global_offset_table with info->output_bfd->xvec.
1271 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1273 (x86_64_elf64_sol2_vec): Declared.
1274 (elf_x86_64_link_setup_gnu_properties): Set
1275 need_global_offset_table with info->output_bfd->xvec.
1277 2018-02-08 H.J. Lu <hongjiu.lu@intel.com>
1279 * elf32-i386.c (elf32_i386_copy_solaris_special_section_fields):
1281 (elf_i386_link_setup_gnu_properties): Set need_global_offset_table
1283 * elf64-x86-64.c (elf64_x86_64_copy_solaris_special_section_fields):
1285 (elf_x86_64_link_setup_gnu_properties): Set
1286 need_global_offset_table for Solaris.
1287 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Keep the
1288 unused _GLOBAL_OFFSET_TABLE_ for Solaris.
1289 (_bfd_x86_elf_link_setup_gnu_properties): Copy
1290 need_global_offset_table.
1291 * elfxx-x86.h (elf_x86_link_hash_table): Add
1292 need_global_offset_table.
1293 (elf_x86_init_table): Likewise.
1295 2018-02-08 Jim Wilson <jimw@sifive.com>
1297 * elfnn-riscv.c (riscv_elf_relocate_section): Add comment for previous
1300 2018-02-08 Nick Clifton <nickc@redhat.com>
1303 * elf.c (elf_parse_notes): Reject notes with excessuively large
1306 2018-02-07 Alan Modra <amodra@gmail.com>
1308 Revert 2018-01-17 Alan Modra <amodra@gmail.com>
1309 * elf32-ppc.c: Remove speculation barrier support.
1310 * elf32-ppc.h: Likewise.
1311 * elf64-ppc.c: Likewise.
1312 * elf64-ppc.h: Likewise.
1314 2018-02-06 Jim Wilson <jimw@sifive.com>
1316 * elfnn-riscv.c (riscv_elf_relocate_section): Return TRUE if used
1317 callback to report an error.
1319 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
1322 * elfxx-sparc.c (sparc_elf_tls_transition): Turn call to bfd_link_pic
1323 into call to !bfd_link_executable and tidy up.
1324 (_bfd_sparc_elf_check_relocs): Fix formatting and tidy up.
1325 <R_SPARC_TLS_LE_HIX22>: Turn call to bfd_link_pic into call to
1326 !bfd_link_executable.
1327 <R_SPARC_TLS_IE_HI22>: Likewise.
1328 <GOT relocations>: Remove useless code, tidy and merge related blocks.
1329 <R_SPARC_TLS_GD_CALL>: Turn call to bfd_link_pic into call to
1330 !bfd_link_executable.
1331 <R_SPARC_WPLT30>: Tidy up.
1332 (_bfd_sparc_elf_gc_mark_hook): Turn call to bfd_link_pic into call to
1333 !bfd_link_executable.
1334 (allocate_dynrelocs): Likewise.
1335 (_bfd_sparc_elf_relocate_section): Fix formatting and tidy up.
1336 <R_SPARC_TLS_GD_HI22>: Merge into...
1337 <R_SPARC_TLS_GD_LO10>: ...this. Adjust 4th argument in call to
1338 sparc_elf_tls_transition and remove redundant code.
1339 <R_SPARC_TLS_LDM_HI22>: Turn call to bfd_link_pic into call to
1340 !bfd_link_executable.
1341 <R_SPARC_TLS_LDO_HIX22>: Likewise.
1342 <R_SPARC_TLS_LE_HIX22>: Likewise. Tidy up.
1343 <R_SPARC_TLS_LDM_CALL>: Likewise.
1344 <R_SPARC_TLS_GD_CALL>: Likewise. Tidy up.
1345 <R_SPARC_TLS_GD_ADD>: Likewise.
1346 <R_SPARC_TLS_LDM_ADD>: Likewise.
1347 <R_SPARC_TLS_LDO_ADD>: Likewise.
1348 <R_SPARC_TLS_IE_LD>: Likewise.
1350 2018-02-06 Miloš Stojanović <milos.stojanovic@rt-rk.com>
1353 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): If the dwarf
1354 functions failed to find the function name, try the generic elf
1355 find function instead.
1357 2018-02-06 Sergio Durigan Junior <sergiodj@redhat.com>
1359 * coff-rs6000.c (xcoff_write_archive_contents_old): Use
1360 'memcpy' instead of 'strncpy' when writing the magic number.
1362 2018-02-06 Nick Clifton <nickc@redhat.com>
1365 * opncls.c (bfd_get_debug_link_info_1): Check the size of the
1366 section before attempting to read it in.
1367 (bfd_get_alt_debug_link_info): Likewise.
1369 2018-02-06 Paul Carroll <pcarroll@codesourcery.com>
1371 * bfd/dwarf2.c (find_abstract_name): Modified to return file and
1372 line information in addition to name, if they can be found.
1374 2018-02-05 Renlin Li <renlin.li@arm.com>
1377 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
1378 R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
1379 check for writeable section as well.
1381 2018-02-05 H.J. Lu <hongjiu.lu@intel.com>
1384 * elf32-i386.c (elf_i386_check_relocs): Set got_referenced if
1385 _GLOBAL_OFFSET_TABLE_ is referenced or GOT is needed to resolve
1386 undefined weak symbol to 0.
1387 * elf64-x86-64.c (elf_x86_64_check_relocs): Set got_referenced
1388 if _GLOBAL_OFFSET_TABLE_ is referenced.
1389 * elfxx-x86.c (_bfd_x86_elf_size_dynamic_sections): Check
1390 got_referenced instead of ref_regular_nonweak. Remove the
1391 unused _GLOBAL_OFFSET_TABLE_ from symbol table.
1392 * elfxx-x86.h (elf_x86_link_hash_table): Add got_referenced.
1394 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1396 * elfnn-riscv.c (_bfd_riscv_relax_pc): Use `memset' to
1397 initialize `hi_reloc'.
1399 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1401 * elfxx-mips.c (_bfd_mips_elf_section_processing): For
1402 SHT_MIPS_REGINFO sections don't assert the correct size and
1403 report an error instead.
1405 2018-02-05 Maciej W. Rozycki <macro@mips.com>
1407 * elf.c (_bfd_elf_write_object_contents): Propagate a failure
1408 status from `->elf_backend_section_processing'.
1410 2018-02-02 Jim Wilson <jimw@sifive.com>
1413 * elfnn-riscv.c (riscv_relax_delete_bytes): New parameter link_info.
1414 If link_info->wrap_hash, check for a duplicate symbol and ignore.
1415 (_bfd_riscv_relax_call, bfd_riscv_relax_lui, _bfd_riscv_relax_tls_le):
1416 Pass new argument to riscv_relax_delete_bytes.
1417 (_bfd_riscv_relax_align, _bfd_riscv_relax_delete): Likewise. Remove
1418 ATTRIBUTE_UNUSED from link_info parameter.
1420 2018-02-02 Alan Modra <amodra@gmail.com>
1422 * elf64-ppc.c (ppc64_elf_relocate_section): Don't relocate nops
1423 emitted for toc sequence optimization. Set and use "howto" later.
1425 2018-02-01 Simon Marchi <simon.marchi@ericsson.com>
1427 * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Avoid pointer
1428 arithmetic on NULL pointer.
1429 * elflink.c (_bfd_elf_archive_symbol_lookup,
1430 elf_link_add_archive_symbols): Likewise.
1432 2018-01-31 Michael Matz <matz@suse.de>
1434 * elflink.c (bfd_elf_define_start_stop): Fix check of
1437 2018-01-31 H.J. Lu <hongjiu.lu@intel.com>
1440 * elflink.c (bfd_elf_define_start_stop): Check if __start and
1441 __stop symbols are referenced by shared objects.
1443 2018-01-30 Alan Modra <amodra@gmail.com>
1446 * elf.c (_bfd_elf_map_sections_to_segments): Don't start a new
1447 segment when demand paged with lma on the same page. Test this
1448 before load/non-load, executable/non-executable,
1449 writable/non-writable tests and simplify. Delete bogus relro
1450 condition in writable/non-writable test. Delete outdated
1451 comment. Formatting.
1453 2018-01-30 Alan Modra <amodra@gmail.com>
1455 * elflink.c (bfd_elf_define_start_stop): Make __start and __stop
1458 2018-01-29 Alan Modra <amodra@gmail.com>
1461 * coffgen.c (coff_pointerize_aux): Ensure auxent tagndx is in
1462 range before converting to a symbol table pointer.
1464 2018-01-27 Nick Clifton <nickc@redhat.com>
1466 * po/ru.po: Updated Russian translation.
1468 2018-01-26 Alan Modra <amodra@gmail.com>
1470 * elflink.c (bfd_elf_define_start_stop): Override symbols when
1471 they are defined dynamically.
1473 2018-01-26 Alan Modra <amodra@gmail.com>
1475 * elf64-ppc.c (ppc64_elf_size_stubs): Iterate sizing when
1476 .branch_lt changes size.
1478 2018-01-25 Alan Modra <amodra@gmail.com>
1481 * elfcode.h (elf_object_p): Avoid integer overflow.
1483 2018-01-25 Eric Botcazou <ebotcazou@adacore.com>
1486 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
1487 Do a mere lookup of the __tls_get_addr symbol instead of adding it.
1490 2017-10-19 H.J. Lu <hongjiu.lu@intel.com>
1493 * elfxx-sparc.c (sparc_elf_tls_transition): Replace
1494 bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
1495 bfd_link_executable for TLS check.
1496 (_bfd_sparc_elf_check_relocs): Likewise.
1497 (allocate_dynrelocs): Likewise.
1498 (_bfd_sparc_elf_relocate_section): Likewise.
1500 2018-01-24 Renlin Li <renlin.li@arm.com>
1502 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Add support for
1503 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1504 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1505 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1506 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1507 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1508 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1510 2018-01-24 Renlin Li <renlin.li@arm.com>
1512 * reloc.c: Add BFD_RELOC_AARCH64_MOVW_PREL_G0,
1513 BFD_RELOC_AARCH64_MOVW_PREL_G0_NC, BFD_RELOC_AARCH64_MOVW_PREL_G1,
1514 BFD_RELOC_AARCH64_MOVW_PREL_G1_NC, BFD_RELOC_AARCH64_MOVW_PREL_G2,
1515 BFD_RELOC_AARCH64_MOVW_PREL_G2_NC, BFD_RELOC_AARCH64_MOVW_PREL_G3.
1516 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Add entries for
1517 BFD_RELOC_AARCH64_MOVW_PREL_G0, BFD_RELOC_AARCH64_MOVW_PREL_G0_NC,
1518 BFD_RELOC_AARCH64_MOVW_PREL_G1, BFD_RELOC_AARCH64_MOVW_PREL_G1_NC,
1519 BFD_RELOC_AARCH64_MOVW_PREL_G2, BFD_RELOC_AARCH64_MOVW_PREL_G2_NC,
1520 BFD_RELOC_AARCH64_MOVW_PREL_G3.
1521 * bfd-in2.h: Regenerate.
1522 * libbfd.h: Regenerate.
1524 2018-01-23 Maciej W. Rozycki <macro@mips.com>
1526 * elfxx-mips.c (_bfd_mips_elf_final_link): Update a stale
1527 `mips_elf32_section_processing' comment reference.
1529 2018-01-20 H.J. Lu <hongjiu.lu@intel.com>
1532 * elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Check the
1533 versioned __tls_get_addr symbol.
1535 2018-01-19 Nick Clifton <nickc@redhat.com>
1537 * po/fr.po: Updated French translation.
1539 2018-01-18 Alan Modra <amodra@gmail.com>
1541 * elf32-ppc.c (ppc_elf_create_glink): Correct alignment of .glink.
1542 * elf64-ppc.c (ppc64_elf_size_stubs): Handle negative plt_stub_align.
1543 (ppc64_elf_build_stubs): Likewise.
1545 2018-01-17 Nick Clifton <nickc@redhat.com>
1547 * po/ru.po: Updated Russian translation.
1548 * po/uk/po: Updated Ukranian translation.
1550 2018-01-17 Alan Modra <amodra@gmail.com>
1552 * elf64-ppc.c (ppc64_elf_build_stubs): Silence gcc warning.
1554 2018-01-17 Alan Modra <amodra@gmail.com>
1556 * elf32-ppc.c (GLINK_ENTRY_SIZE): Handle speculation barrier.
1557 (CRSETEQ, BEQCTRM): Define.
1558 (is_nonpic_glink_stub): Don't check bctr.
1559 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1560 (ppc_elf_relax_section): Size speculation barrier.
1561 (output_bctr): New function.
1562 (write_glink_stub): Use output_bctr.
1563 (ppc_elf_relocate_section): Use output_bctr for long branch stub.
1564 (ppc_elf_finish_dynamic_symbol): Likewise.
1565 (ppc_elf_finish_dynamic_sections): Use output_bctr.
1566 * elf32-ppc.h (struct ppc_elf_params): Add speculate_indirect_jumps.
1567 * elf64-ppc.c (CRSETEQ, BEQCTRM, BEQCTRLM): Define.
1568 (GLINK_PLTRESOLVE_SIZE): Size speculation barrier.
1569 (size_global_entry_stubs): Handle speculation barrier sizing.
1570 (plt_stub_size): Likewise.
1571 (output_bctr): New function.
1572 (build_plt_stub, build_tls_get_addr_stub): Output speculation
1574 (ppc_build_one_stub): Likewise for ppc_stub_plt_branch.
1575 (ppc_size_one_stub): Size speculation barrier in ppc_stub_plt_branch.
1576 (build_global_entry_stubs): Output speculation barrier.
1577 (ppc64_elf_build_stubs): Likewise in __glink_PLTresolve stub.
1578 * elf64-ppc.h (struct ppc64_elf_params): Add speculate_indirect_jumps.
1580 2018-01-17 Alan Modra <amodra@gmail.com>
1582 * elf32-ppc.c (GLINK_ENTRY_SIZE): Add parameters, handle
1583 __tls_get_addr_opt, and alignment sizing.
1584 (TLS_GET_ADDR_GLINK_SIZE): Delete.
1585 (is_nonpic_glink_stub): Don't use GLINK_ENTRY_SIZE.
1586 (ppc_elf_get_synthetic_symtab): Recognize stubs spaced at 4, 6,
1588 (ppc_elf_link_hash_table_create): Init new ppc_elf_params field.
1589 (allocate_dynrelocs): Use new GLINK_ENTRY_SIZE.
1590 (ppc_elf_size_dynamic_sections): Likewise. Size branch table
1592 (write_glink_stub): Handle __tls_get_addr_opt stub.
1593 Pad out to size given by GLINK_ENTRY_SIZE.
1594 (ppc_elf_relocate_section): Adjust write_glink_stub call.
1595 (ppc_elf_finish_dynamic_symbol): Likewise.
1596 (ppc_elf_finish_dynamic_sections): Write PLTresolve without using
1597 insn array since so many need rewriting.
1598 * elf32-ppc.h (struct ppc_elf_params): Add plt_stub_align.
1599 * elf64-ppc.c (GLINK_PLTRESOLVE_SIZE): Rename from
1600 GLINK_CALL_STUB_SIZE. Add htab param and evaluate to size without
1601 nops. Adjust all uses.
1602 (ppc64_elf_get_synthetic_symtab): Don't use GLINK_CALL_STUB_SIZE
1603 in glink_vma calculation.
1604 (struct ppc_link_hash_table): Add global_entry section pointer.
1605 (create_linkage_sections): Create separate section for global
1607 (PPC_LO, PPC_HI, PPC_HA): Move earlier.
1608 (size_global_entry_stubs): Handle sizing for aligned stubs.
1609 (ppc64_elf_size_dynamic_sections): Handle global_entry alloc,
1610 and don't stash end of glink branch table in rawsize.
1611 (ppc_build_one_stub): Rewrite stub size calculations.
1612 (build_global_entry_stubs): Use new section.
1613 (ppc64_elf_build_stubs): Don't pad __glink_PLTresolve with nops.
1614 Build lazy link stubs out to end of section. Build global entry
1615 stubs in new section.
1617 2018-01-15 Nick Clifton <nickc@redhat.com>
1619 * po/uk.po: Updated Ukranian translation.
1621 2018-01-13 Nick Clifton <nickc@redhat.com>
1623 * po/bfd.pot: Regenerated.
1625 2018-01-13 Nick Clifton <nickc@redhat.com>
1627 * version.m4: Bump version to 2.30.51
1628 * configure: Regenerate.
1630 2018-01-13 Nick Clifton <nickc@redhat.com>
1632 2.30 branch created.
1634 2018-01-12 Jens Widell <jl@opera.com>
1636 * elf.c (setup_group): Optimize search for group by remembering
1637 last found group and restarting search at that index.
1638 * elf-bfd.h (struct elf_obj_tdata): Add group_search_offset field.
1640 2018-01-12 Gunther Nikl <gnikl@users.sourceforge.net>
1642 * aoutx.h (aout_link_check_ar_symbols): Remove default and handle
1643 bfd_link_common_skip_none in switch.
1645 2018-01-12 Alan Modra <amodra@gmail.com>
1648 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Ignore dynamic
1649 references on forced local symbols.
1651 2018-01-12 Vlad Ivanov <vlad@ivanov.email>
1653 * elfxx-mips.c (_bfd_mips_elf_final_link): Notify user when
1654 .reginfo section has wrong size.
1656 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1659 * elf.c (_bfd_elf_map_sections_to_segments): When generating
1660 separate code and read-only data LOAD segments, create a new
1661 LOAD segment if the previous section contains text and the
1662 current section doesn't or vice versa. Don't put a writable
1663 section in a read-only segment if there is a RELRO segment.
1665 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1668 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Ignore dynamic
1669 references on forced local symbols.
1671 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
1674 * elflink.c (bfd_elf_gc_sections): Keep all PREINIT_ARRAY,
1675 INIT_ARRAY as well as FINI_ARRAY sections for ld -r --gc-section.
1677 2018-01-09 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1680 * elf32-nds32.c (nds32_elf_relax_loadstore): Fix a typographical error.
1682 2018-01-03 John Baldwin <jhb@FreeBSD.org>
1684 * elf.c (elfcore_grok_freebsd_note): Handle
1685 NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and
1686 NT_FREEBSD_PROCSTAT_VMMAP.
1688 2018-01-03 Alan Modra <amodra@gmail.com>
1690 Update year range in copyright notice of all files.
1692 For older changes see ChangeLog-2017
1694 Copyright (C) 2018 Free Software Foundation, Inc.
1696 Copying and distribution of this file, with or without modification,
1697 are permitted in any medium without royalty provided the copyright
1698 notice and this notice are preserved.
1704 version-control: never