1 2015-08-31 Alan Modra <amodra@gmail.com>
3 * elflink.c (elf_sort_symbol): Use correctly sized type for
4 calculating signed section->id difference.
5 (elf_link_add_object_symbols): Likewise.
6 * pef.c (bfd_pef_scan_start_address): Warning fix.
7 * vms-alpha.c (vms_new_section_hook): Likewise.
9 2015-08-31 Alan Modra <amodra@gmail.com>
11 * elf32-nds32.c (nds32_convert_32_to_16_alu1): Warning fix.
12 (find_relocs_at_address_addr): Make "reloc_type" an enum.
13 (nds32_elf_relax_delete_blanks): Warning fix.
14 (nds32_elf_relax_loadstore): Correct loop bound.
16 2015-08-31 Alan Modra <amodra@gmail.com>
18 * section.c (struct bfd_section): Make "id" and "index" unsigned.
19 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
20 * elf.c (elf_map_symbols): Likewise.
21 * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
22 (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
23 (ppc64_elf_setup_section_lists): Ditto for local vars.
24 * elf32-arm.c: Similarly to elf64-ppc.c.
25 * elf32-avr.c: Likewise.
26 * elf32-hppa.c: Likewise.
27 * elf32-m68hc1x.c: Likewise.
28 * elf32-metag.c: Likewise.
29 * elf32-nios2.c: Likewise.
30 * elfnn-aarch64.c: Likewise.
31 * simple.c (struct saved_offsets): Make "section_count" unsigned.
32 * bfd-in2.h: Regenerate.
34 2015-08-27 Alan Modra <amodra@gmail.com>
37 * elf64-alpha.c (elf64_alpha_sort_relocs_p): New function.
38 (elf_backend_sort_relocs_p): Define.
40 2015-08-26 Alan Modra <amodra@gmail.com>
43 * elflink.c (cmp_ext32l_r_offset, cmp_ext32b_r_offset): Delete.
44 (cmp_ext64l_r_offset, cmp_ext64b_r_offset): Delete.
45 (ext32l_r_offset, ext32b_r_offset, ext64l_r_offset, ext64b_r_offset):
47 (elf_link_adjust_relocs): Use an insertion sort to sort relocs.
49 2015-08-26 Matthew Fortune <matthew.fortune@imgtec.com>
52 * elfxx-mips.c (bfd_mips_isa_ext_mach): New function: Converts an
53 ISA value to a bfd machine number.
54 (bfd_mips_isa_ext): Update the ISA level and revision if
55 necessary. Use mips_mach_extends_p to decide if the ISA extension
57 (_bfd_mips_elf_merge_private_bfd_data): Allow the ISA extension to
58 be inferred from the ABI setting. Set the ISA level from the
59 maximum of the incoming and outgoing ISA levels.
61 2015-08-25 Nick Clifton <nickc@redhat.com>
64 * elf.c (bfd_section_from_shdr): Replace assertions with warnings
65 about multiple symbol tables.
67 2015-08-25 Renlin Li <renlin.li@arm.com>
69 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): Use LP64 instead of
71 * bfd-in2.h: Regenerate.
73 2015-08-22 Alan Modra <amodra@gmail.com>
75 * elf.c (_bfd_elf_slurp_version_tables): Always init vd_nodename.
76 Don't copy fields not set by _bfd_elf_swap_verdef_in.
78 2015-08-19 Jiong Wang <jiong.wang@arm.com>
80 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
81 types, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
82 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
83 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
84 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
85 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
86 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC,
87 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
88 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC.
89 (elfNN_aarch64_final_link_relocate): Likewise.
90 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
91 (_bfd_aarch64_elf_resolve_relocation): Likewise.
93 2015-08-19 Jiong Wang <jiong.wang@arm.com>
95 * reloc.c (BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12,
96 BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC,
97 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12,
98 BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC,
99 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12,
100 BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC.
101 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12,
102 BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC): New entries.
103 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
104 * bfd-in2.h: Regenerate.
105 * libbfd.h: Regenerate.
107 2015-08-19 Jiong Wang <jiong.wang@arm.com>
110 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize new relocation
111 types, including BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
112 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
113 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
114 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
115 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
116 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2.
117 (elfNN_aarch64_final_link_relocate): Likewise.
118 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
119 (_bfd_aarch64_elf_resolve_relocation): Likewise.
121 2015-08-19 Jiong Wang <jiong.wang@arm.com>
123 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12,
124 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0,
125 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC,
126 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1,
127 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC,
128 BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries.
129 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
130 * bfd-in2.h: Regenerate.
131 * libbfd.h: Regenerate.
133 2015-08-19 Jiong Wang <jiong.wang@arm.com>
135 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
136 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
137 (aarch64_reloc_got_type): Likewise.
138 (elfNN_aarch64_final_link_relocate): Likewise.
139 (elfNN_aarch64_relocate_section): Likewise.
140 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
141 (_bfd_aarch64_elf_resolve_relocation): Likewise.
143 2015-08-19 Jiong Wang <jiong.wang@arm.com>
145 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC): New entry.
146 * bfd-in2.h: Regenerate.
147 * libbfd.h: Regenerate.
148 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
149 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC.
151 2015-08-19 Alan Modra <amodra@gmail.com>
153 * elf-s390-common.c: Simplify expressions using
154 bfd_linke_executable, bfd_link_pie and bfd_link_pic.
155 * elf32-arm.c: Likewise.
156 * elf32-bfin.c: Likewise.
157 * elf32-frv.c: Likewise.
158 * elf32-m68k.c: Likewise.
159 * elf32-nios2.c: Likewise.
160 * elf32-ppc.c: Likewise.
161 * elf32-s390.c: Likewise.
162 * elf32-sh.c: Likewise.
163 * elf64-alpha.c: Likewise.
164 * elf64-ppc.c: Likewise.
165 * elf64-s390.c: Likewise.
166 * elflink.c: Likewise.
168 2015-08-18 Jiong Wang <jiong.wang@arm.com>
170 * elfnn-aarch64.c (aarch64_reloc_got_type): Delete useless check.
171 (elfNN_aarch64_relocate_section): Likewise.
172 (elfNN_aarch64_gc_sweep_hook): Likewise.
173 (elfNN_aarch64_check_relocs): Likewise.
175 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
178 * elf-bfd.h (elf_link_hash_table): Add dynsym.
179 * elf32-i386.c (elf_i386_reloc_type_class): Return
180 reloc_class_ifunc for relocation against STT_GNU_IFUNC symbol.
181 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Likewise.
182 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set dynsym.
183 (bfd_elf_size_dynsym_hash_dynstr): Use dynsym.
184 (elf_final_link_info): Remove dynsym_sec.
185 (elf_link_output_extsym): Replace dynsym_sec with dynsym.
186 (bfd_elf_final_link): Remove reference to dynsym_sec. Replace
187 dynsym_sec with dynsym.
189 2015-08-18 H.J. Lu <hongjiu.lu@intel.com>
191 * bfd/aoutx.h: Replace shared, executable, relocatable and pie
192 fields with bfd_link_executable, bfd_link_dll,
193 bfd_link_relocatable, bfd_link_pic and bfd_link_pie.
194 * bfd/bout.c: Likewise.
195 * bfd/coff-alpha.c: Likewise.
196 * bfd/coff-arm.c: Likewise.
197 * bfd/coff-i386.c: Likewise.
198 * bfd/coff-i960.c: Likewise.
199 * bfd/coff-m68k.c: Likewise.
200 * bfd/coff-mcore.c: Likewise.
201 * bfd/coff-mips.c: Likewise.
202 * bfd/coff-ppc.c: Likewise.
203 * bfd/coff-rs6000.c: Likewise.
204 * bfd/coff-sh.c: Likewise.
205 * bfd/coff-tic80.c: Likewise.
206 * bfd/coff-x86_64.c: Likewise.
207 * bfd/coff64-rs6000.c: Likewise.
208 * bfd/coffgen.c: Likewise.
209 * bfd/cofflink.c: Likewise.
210 * bfd/ecoff.c: Likewise.
211 * bfd/ecofflink.c: Likewise.
212 * bfd/elf-bfd.h: Likewise.
213 * bfd/elf-eh-frame.c: Likewise.
214 * bfd/elf-ifunc.c: Likewise.
215 * bfd/elf-m10200.c: Likewise.
216 * bfd/elf-m10300.c: Likewise.
217 * bfd/elf-s390-common.c: Likewise.
218 * bfd/elf-vxworks.c: Likewise.
219 * bfd/elf.c: Likewise.
220 * bfd/elf32-arm.c: Likewise.
221 * bfd/elf32-avr.c: Likewise.
222 * bfd/elf32-bfin.c: Likewise.
223 * bfd/elf32-cr16.c: Likewise.
224 * bfd/elf32-cr16c.c: Likewise.
225 * bfd/elf32-cris.c: Likewise.
226 * bfd/elf32-crx.c: Likewise.
227 * bfd/elf32-d10v.c: Likewise.
228 * bfd/elf32-dlx.c: Likewise.
229 * bfd/elf32-epiphany.c: Likewise.
230 * bfd/elf32-fr30.c: Likewise.
231 * bfd/elf32-frv.c: Likewise.
232 * bfd/elf32-ft32.c: Likewise.
233 * bfd/elf32-h8300.c: Likewise.
234 * bfd/elf32-hppa.c: Likewise.
235 * bfd/elf32-i370.c: Likewise.
236 * bfd/elf32-i386.c: Likewise.
237 * bfd/elf32-i860.c: Likewise.
238 * bfd/elf32-ip2k.c: Likewise.
239 * bfd/elf32-iq2000.c: Likewise.
240 * bfd/elf32-lm32.c: Likewise.
241 * bfd/elf32-m32c.c: Likewise.
242 * bfd/elf32-m32r.c: Likewise.
243 * bfd/elf32-m68hc11.c: Likewise.
244 * bfd/elf32-m68hc1x.c: Likewise.
245 * bfd/elf32-m68k.c: Likewise.
246 * bfd/elf32-mcore.c: Likewise.
247 * bfd/elf32-mep.c: Likewise.
248 * bfd/elf32-metag.c: Likewise.
249 * bfd/elf32-microblaze.c: Likewise.
250 * bfd/elf32-moxie.c: Likewise.
251 * bfd/elf32-msp430.c: Likewise.
252 * bfd/elf32-mt.c: Likewise.
253 * bfd/elf32-nds32.c: Likewise.
254 * bfd/elf32-nios2.c: Likewise.
255 * bfd/elf32-or1k.c: Likewise.
256 * bfd/elf32-ppc.c: Likewise.
257 * bfd/elf32-rl78.c: Likewise.
258 * bfd/elf32-rx.c: Likewise.
259 * bfd/elf32-s390.c: Likewise.
260 * bfd/elf32-score.c: Likewise.
261 * bfd/elf32-score7.c: Likewise.
262 * bfd/elf32-sh-symbian.c: Likewise.
263 * bfd/elf32-sh.c: Likewise.
264 * bfd/elf32-sh64.c: Likewise.
265 * bfd/elf32-spu.c: Likewise.
266 * bfd/elf32-tic6x.c: Likewise.
267 * bfd/elf32-tilepro.c: Likewise.
268 * bfd/elf32-v850.c: Likewise.
269 * bfd/elf32-vax.c: Likewise.
270 * bfd/elf32-visium.c: Likewise.
271 * bfd/elf32-xc16x.c: Likewise.
272 * bfd/elf32-xstormy16.c: Likewise.
273 * bfd/elf32-xtensa.c: Likewise.
274 * bfd/elf64-alpha.c: Likewise.
275 * bfd/elf64-hppa.c: Likewise.
276 * bfd/elf64-ia64-vms.c: Likewise.
277 * bfd/elf64-mmix.c: Likewise.
278 * bfd/elf64-ppc.c: Likewise.
279 * bfd/elf64-s390.c: Likewise.
280 * bfd/elf64-sh64.c: Likewise.
281 * bfd/elf64-x86-64.c: Likewise.
282 * bfd/elflink.c: Likewise.
283 * bfd/elfnn-aarch64.c: Likewise.
284 * bfd/elfnn-ia64.c: Likewise.
285 * bfd/elfxx-mips.c: Likewise.
286 * bfd/elfxx-sparc.c: Likewise.
287 * bfd/elfxx-tilegx.c: Likewise.
288 * bfd/i386linux.c: Likewise.
289 * bfd/linker.c: Likewise.
290 * bfd/m68klinux.c: Likewise.
291 * bfd/pdp11.c: Likewise.
292 * bfd/pe-mips.c: Likewise.
293 * bfd/peXXigen.c: Likewise.
294 * bfd/reloc.c: Likewise.
295 * bfd/reloc16.c: Likewise.
296 * bfd/sparclinux.c: Likewise.
297 * bfd/sunos.c: Likewise.
298 * bfd/vms-alpha.c: Likewise.
299 * bfd/xcofflink.c: Likewise.
301 2015-08-18 Alan Modra <amodra@gmail.com>
304 * Makefile.am: Use $(SED) in place of sed throughout.
305 * Makefile.in: Regenerate.
307 2015-08-18 Alan Modra <amodra@gmail.com>
309 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't redefine .TOC.
310 if already defined, and set linker_def.
311 (ppc64_elf_set_toc): Use .TOC. value if defined other than by
314 2015-08-14 Alan Modra <amodra@gmail.com>
317 * elf32-or1k.c: Revert 2015-08-11 change.
319 2015-08-13 H.J. Lu <hongjiu.lu@intel.com>
322 * elf32-i386.c (elf_i386_size_dynamic_sections): Issue an error
323 for read-only segment with dynamic IFUNC relocations.
324 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
326 2015-08-12 Simon Dardis <simon.dardis@imgtec.com>
328 * elfxx-mips.c (STUB_MOVE): Change to use 'or' only.
329 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry,
330 mips_n64_exec_plt0_entry, micromips_insn32_o32_exec_plt0_entry):
331 Update to use 'or' instead of 'addu/daddu'.
332 (_bfd_mips_elf_finish_dynamic_symbol): Update usage of STUB_MOVE.
333 (move_insns_32): Reorder table.
335 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
337 * elf32-i386.c (elf_i386_relocate_section): Properly skip IFUNC
338 relocations in debug sections.
339 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
341 2015-08-11 Jiong Wang <jiong.wang@arm.com>
343 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Improve warning
344 message for R_AARCH64_LD64_GOTPAGE_LO15/R_AARCH64_LD32_GOTPAGE_LO14.
346 2015-08-11 Jiong Wang <jiong.wang@arm.com>
348 * elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): New.
349 (aarch64_can_relax_tls): Use the new IS_AARCH64_TLS_RELAX_RELOC.
351 2015-08-11 Jiong Wang <jiong.wang@arm.com>
353 * bfd/elfnn-aarch64.c (aarch64_type_of_stub): New parameter "sym_sec".
354 Loose the check for symbol from ABS section.
355 (elfNN_aarch64_size_stubs): Pass sym_sec.
357 2015-08-11 Jiong Wang <jiong.wang@arm.com>
360 * elfnn-aarch64.c (aarch64_type_of_stub): Update destination for
361 calls go through plt stub.
362 (elfNN_aarch64_final_link_relocate): Adjust code logic for CALL26,
363 JUMP26 relocation to support inserting veneer for call to plt stub.
365 2015-08-11 Jiong Wang <jiong.wang@arm.com>
367 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
368 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
369 (aarch64_reloc_got_type): Likewise.
370 (elfNN_aarch64_final_link_relocate): Likewise.
371 (elfNN_aarch64_relocate_section): Likewise.
372 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
373 (_bfd_aarch64_elf_resolve_relocation): Likewise.
375 2015-08-11 Jiong Wang <jiong.wang@arm.com>
377 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12): New entry.
378 * bfd-in2.h: Regenerate.
379 * libbfd.h: Regenerate.
380 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
381 BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
383 2015-08-11 Jiong Wang <jiong.wang@arm.com>
385 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
386 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
387 (aarch64_reloc_got_type): Likewise.
388 (elfNN_aarch64_final_link_relocate): Likewise.
389 (elfNN_aarch64_relocate_section): Likewise.
390 (elfNN_aarch64_gc_sweep_hook): Likewise.
391 (elfNN_aarch64_check_relocs): Likewise.
392 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
393 (_bfd_aarch64_elf_resolve_relocation): Likewise.
395 2015-08-11 Jiong Wang <jiong.wang@arm.com>
397 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC): New entry.
398 * bfd-in2.h: Regenerate.
399 * libbfd.h: Regenerate.
400 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
401 BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC.
403 2015-08-11 Jiong Wang <jiong.wang@arm.com>
405 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
406 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
407 (aarch64_reloc_got_type): Likewise.
408 (elfNN_aarch64_final_link_relocate): Likewise.
409 (elfNN_aarch64_relocate_section): Likewise.
410 (elfNN_aarch64_gc_sweep_hook): Likewise.
411 (elfNN_aarch64_check_relocs): Likewise.
412 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
413 (_bfd_aarch64_elf_resolve_relocation): Likewise.
415 2015-08-11 Jiong Wang <jiong.wang@arm.com>
417 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21): New entry.
418 * bfd-in2.h: Regenerate.
419 * libbfd.h: Regenerate.
420 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
421 BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
423 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
426 * elf32-i386.c (elf_i386_relocate_section): Skip IFUNC
427 relocations in debug sections.
428 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
430 2015-08-11 Peter Zotov <whitequark@whitequark.org>
433 * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
434 (R_OR1K_16_PCREL): Likewise.
435 (R_OR1K_8_PCREL): Likewise.
437 2015-08-11 Nick Clifton <nickc@redhat.com>
440 * coff-sh.c (_bfd_sh_align_load_span): Fix typo when setting
444 * elf.c (_bfd_elf_setup_sections): Add checks for corrupt section
446 * peicode.h (pe_ILF_make_a_section): Ensure alignment of the
448 (pe_ILF_build_a_bfd): Ensure alignment of vars.data pointer.
450 2015-08-11 H.J. Lu <hongjiu.lu@intel.com>
452 * elf.c (_bfd_elf_copy_private_bfd_data): Fix a typo.
454 2015-08-10 H.J. Lu <hongjiu.lu@intel.com>
456 * elf-bfd.h (elf_symbol_version): New enum.
457 (elf_link_hash_entry): Replace hidden with versioned.
458 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
459 version if the symbol is unversioned. Initialize versioned.
460 (_bfd_elf_add_default_symbol): Don't look for symbol version
461 if the symbol is unversioned or hidden. Initialize versioned.
462 (elf_collect_hash_codes): Don't look for symbol version if the
463 symbol is unversioned.
464 (elf_collect_gnu_hash_codes): Likewise.
465 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
466 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
468 (elf_link_output_extsym): Likewise.
470 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
473 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
474 sh_link and sh_info fields in stripped section headers, we also
475 check if the sh_type, sh_flags, sh_addralign and sh_entsize
476 fields of the output section match the output. Since
477 --only-keep-debug turns all non-debug sections into SHT_NOBITS
478 sections, the output SHT_NOBITS type matches any input type.
480 2015-08-07 H.J. Lu <hongjiu.lu@intel.com>
483 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
484 if the new symbol matches the existing one. The new hidden
485 versioned symbol matches the existing symbol if they have the
486 same symbol version. Update the existing symbol only if they
488 (_bfd_elf_add_default_symbol): Update call to
489 _bfd_elf_merge_symbol.
490 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
492 (elf_link_add_object_symbols): Override a definition only if the
493 new symbol matches the existing one.
494 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
495 the hidden versioned symbol.
496 (elf_link_output_extsym): Bind a symbol locally when linking
497 executable if it is locally defined, hidden versioned, not
498 referenced by shared library and not exported. Turn on
499 VERSYM_HIDDEN only if the hidden versioned symbol is defined
502 2015-08-05 Nick Clifton <nickc@redhat.com>
504 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
505 sh_info fields of sections whose type has been changed to
508 2015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
509 Tyler Hicks <tyhicks@canonical.com>
512 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
513 and stack overflow when char is signed and \200-\376 was in place of hex
514 digit; also fixes \377 was handled as EOF instead of "incorrect character".
515 (ihex_read_section): Changed for consistency.
516 (ihex_bad_byte): Prevent (now impossible to trigger) stack
517 overflow and incorrect escape sequence handling.
518 * srec.c (srec_bad_byte): Likewise.
520 2015-08-03 Hans-Peter Nilsson <hp@axis.com>
522 * elf32-cris.c (cris_elf_relocate_section)
523 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
524 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
525 just link_info->symbolic, to check if a symbol should be bound
528 2015-07-30 H.J. Lu <hongjiu.lu@intel.com>
531 * elflink.c (_bfd_elf_add_default_symbol): Add the default
532 symbol if not performing a relocatable link.
533 (elf_link_add_object_symbols): Adjust the default symbol if
534 not performing a relocatable link.
536 2015-07-29 H.J. Lu <hongjiu.lu@intel.com>
538 * elflink.c (elf_link_add_object_symbols): Remove
539 !info->relocatable check for info->executable. Add
540 !info->relocatable check for !info->executable.
541 (elf_link_output_extsym): Remove
542 !info->relocatable check for info->executable.
544 2015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
546 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
547 assignment loop for bfd plugin objects.
549 2015-07-28 Alan Modra <amodra@gmail.com>
551 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
552 segment for loaded sections after nonloaded sections if the
553 sections are on the same page.
555 2015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
557 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
558 * config.in, configure: Regenerate.
560 2015-07-27 H.J. Lu <hongjiu.lu@intel.com>
562 * configure: Regenerated.
564 2015-07-27 Nick Clifton <nickc@redhat.com>
566 * elf32-msp430.c (uses_large_model): New function.
567 (msp430_elf_eh_frame_address_size): New function.
568 (elf_backend_eh_frame_address_size): Define.
570 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
573 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
575 2015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
578 * elf32-arm.c (elf_backend_extern_protected_data): Define.
580 2015-07-25 H.J. Lu <hongjiu.lu@intel.com>
583 * elflink.c (elf_link_output_extsym): Check symbol version
584 section check only if not linking executable, the symbol is
585 referenced by shared library or not locally defined.
587 2015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
589 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
590 check if a symbol should be bound symbolically.
591 * elf32-hppa.c (elf32_hppa_check_relocs,
592 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
593 elf32_hppa_finish_dynamic_symbol): Likewise.
594 * elf32-m68k.c (elf_m68k_check_relocs,
595 elf_m68k_relocate_section): Likewise.
596 * elf32-nios2.c (nios2_elf32_relocate_section,
597 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
598 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
599 elf32_tic6x_relocate_section): Likewise.
601 2015-07-24 Alan Modra <amodra@gmail.com>
603 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
604 prefix for reloc section corresponding to rela section associated
605 with renamed debug section.
607 2015-07-24 Alan Modra <amodra@gmail.com>
609 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
612 2015-07-23 Joseph Myers <joseph@codesourcery.com>
614 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
615 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
616 difference, not to host pointer.
618 2015-07-22 Alan Modra <amodra@gmail.com>
620 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
621 return -1 if symbol referenced is not defined. Tidy.
623 2015-07-20 Alan Modra <amodra@gmail.com>
625 * po/SRC-POTFILES.in: Regenerate.
627 2015-07-17 Jiong Wang <jiong.wang@arm.com>
629 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
630 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
632 2015-07-16 Jiong Wang <jiong.wang@arm.com>
634 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
635 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
636 (aarch64_reloc_got_type): Ditto.
637 (elfNN_aarch64_final_link_relocate): Ditto.
638 (elfNN_aarch64_relocate_section): Ditto.
639 (elfNN_aarch64_gc_sweep_hook): Ditto.
640 (elfNN_aarch64_check_relocs): Ditto.
641 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
642 (_bfd_aarch64_elf_resolve_relocation): Ditto.
644 2015-07-16 Jiong Wang <jiong.wang@arm.com>
646 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
647 * bfd-in2.h: Regenerate.
648 * libbfd.h: Regenerate.
649 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
650 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
652 2015-07-10 H.J. Lu <hongjiu.lu@intel.com>
655 * bfd.c (bfd_convert_section_size): New function.
656 (bfd_convert_section_contents): Likewise.
657 * bfd-in2.h: Regenerated.
659 2015-07-09 Catherine Moore <clm@codesourcery.com>
661 * elflink.c (bfd_elf_size_dynamic_sections): Call to
662 _bfd_elf_maybe_strip_eh_frame_hdr should be before
663 bed->elf_backend_size_dynamic_sections.
665 2015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
667 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
669 2015-07-05 Richard Sandiford <richard.sandiford@arm.com>
671 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
672 plus addend rather than the original st_value when looking up
673 entries in opd->adjust.
675 2015-07-03 Kai Tietz <ktietz@redhat.com>
676 Nick Clifton <nickc@redhat.com>
679 * coffcode.h (coff_bfd_gc_sections): Define default
680 to bfd_coff_gc_sections function.
681 (coff_gc_mark_hook_fn): New type.
682 * coffgen.c (init_reloc_cookie): Copy and adjust coff
683 related code about gc-sections from elflink.c to here.
684 (fini_reloc_cookie): Likewise.
685 (init_reloc_cookie_rels): Likewise.
686 (fini_reloc_cookie_rels): Likewise.
687 (init_reloc_cookie_for_section): Likewise.
688 (fini_reloc_cookie_for_section): Likewise.
689 (_bfd_coff_gc_mark_hook): Likewise.
690 (_bfd_coff_gc_mark_rsec): Likewise.
691 (_bfd_coff_gc_mark_reloc): Likewise.
692 (_bfd_coff_gc_mark): Likewise.
693 (_bfd_coff_gc_mark_extra_sections): Likewise.
694 (coff_gc_sweep_symbol_info): Likewise.
695 (coff_gc_sweep_symbol): Likewise.
696 (gc_sweep_hook_fn): Likewise.
697 (coff_gc_sweep): Likewise.
698 (bfd_coff_gc_sections): Likewise.
699 (_bfd_coff_gc_keep): Likewise.
700 * libcoff-in.h (coff_reloc_cookie): New struct.
701 (bfd_coff_gc_sections): New prototype.
702 * libcoff.h: Regenerate.
704 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
705 Cesar Philippidis <cesar@codesourcery.com>
707 * bfd-in2.h: Regenerated.
708 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
709 (elf_nios2_r1_howto_table_rel): This.
710 (elf_nios2_r2_howto_table_rel): New.
712 (lookup_howto): Add ABFD parameter. Adjust to look up in either
713 the R1 or R2 relocation table, as determined by ABFD.
714 (nios2_reloc_map): Add R2 relocations.
715 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
716 Pass it the ABFD parameter.
717 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
718 return an R1 or R2 relocation.
719 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
720 Pass it the ABFD parameter.
721 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
723 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
724 * libbfd.h: Regenerated.
725 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
726 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
727 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
728 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
729 (BFD_RELOC_NIOS2_R2_T2I4): New.
730 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
731 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
732 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
733 (BFD_RELOC_NIOS2_R2_X2L5): New.
734 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
735 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
736 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
737 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
739 2015-07-01 Sandra Loosemore <sandra@codesourcery.com>
740 Cesar Philippidis <cesar@codesourcery.com>
742 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
743 * bfd-in2.h: Regenerated.
744 * cpu-nios2.c (nios2_compatible): New.
745 (N): Use nios2_compatible instead of bfd_default_compatible.
746 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
747 (arch_info_struct): New.
748 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
749 * elf32-nios2.c (is_nios2_elf): New.
750 (nios2_elf32_merge_private_bfd_data): New.
751 (nios2_elf32_object_p): New.
752 (bfd_elf32_bfd_merge_private_bfd_data): Define.
753 (elf_backend_object_p): Define.
755 2015-07-01 H.J. Lu <hongjiu.lu@intel.com>
757 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
759 2015-06-30 Nick Clifton <nickc@redhat.com>
762 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
763 (write_obj_attribute): Likewise.
764 (elf_new_obj_attr): Likewise.
765 (bfd_elf_get_obj_attr_int): Likewise.
766 (bfd_elf_add_obj_attr_int): Likewise.
767 (bfd_elf_add_obj_attr_string): Likewise.
768 (bfd_elf_add_obj_attr_int_string): Likewise.
769 (gnu_obj_attrs_arg_type): Likewise.
770 (_bfd_elf_obj_attrs_arg_type): Likewise.
771 (_bfd_elf_parse_attributes): Likewise.
772 (_bfd_elf_merge_unknown_attribute_list): Likewise.
773 * elf-bfd.h (struct obj_attribute_list): Likewise.
776 2015-06-28 H.J. Lu <hongjiu.lu@intel.com>
778 * bfd-in.h (compressed_debug_section_type): Remove
780 * bfd-in2.h : Regenerated.
782 2015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
784 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
785 instead of !shared to indicate an application vs shared library.
786 (_bfd_mips_elf_size_dynamic_sections): Likewise.
787 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
788 (_bfd_mips_elf_get_target_dtag): Likewise.
790 2015-06-25 DJ Delorie <dj@redhat.com>
792 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
793 REL loads to match RELA stores.
795 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
797 * elf.c (_bfd_elf_compute_section_file_positions): Don't
798 initialize sh_size for .shstrtab here.
800 2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
803 * elf-bfd.h (elf_sym_strtab): New.
804 (elf_link_hash_table): Add strtabcount, strtabsize and
806 (_bfd_elf_stringtab_init): Removed.
807 * elf.c (_bfd_elf_stringtab_init): Removed.
808 (_bfd_elf_compute_section_file_positions): Replace
809 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
810 _bfd_stringtab_size with
811 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
812 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
813 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
815 (swap_out_syms): Likewise.
816 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
817 with elf_strtab_hash. Remove symbuf, symbuf_count,
818 symbuf_size and shndxbuf_size.
819 (elf_link_flush_output_syms): Removed.
820 (elf_link_output_sym): Renamed to ...
821 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
822 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
824 (elf_link_swap_symbols_out): New.
825 (elf_link_output_extsym): Replace elf_link_output_sym with
826 elf_link_output_symstrtab.
827 (elf_link_input_bfd): Likewise.
828 (elf_final_link_free): Replace _bfd_stringtab_free with
829 _bfd_elf_strtab_free. Remove symbuf.
830 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
831 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
832 symbuf_size nor shndxbuf_size. Initialize strtabsize and
833 strtab. Initialize symshndxbuf to -1 when number of sections
834 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
835 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
836 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
837 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
838 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
839 _bfd_elf_strtab_emit.
841 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
843 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
846 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
848 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
849 space for the first .plt entry.
850 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
851 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
852 there are PLT relocations.
853 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
854 allocate space for the first .plt entry.
855 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
856 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
857 there are PLT relocations.
859 2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
862 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
863 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
866 2015-06-23 Jiong Wang <jiong.wang@arm.com>
868 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
869 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
870 relocations against read-only sections.
872 2015-06-18 Nick Clifton <nickc@redhat.com>
875 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
877 2015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
879 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
880 * bfd-in2.h : Regenerate.
882 2015-06-16 Alan Modra <amodra@gmail.com>
884 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
887 2015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
889 * elf-bfd.h : Remove struct elf_build_id.
890 * bfd.c : Add struct bfd_build_id.
891 * bfd-in2.h: Regenerate.
892 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
893 * libpei.h: Add protoype and macros for
894 bfd_XXi_slurp_codeview_record.
895 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
896 * peicode.h (pe_bfd_read_buildid): Add.
897 (pe_bfd_object_p): Use pe_bfd_read_buildid().
899 2015-06-15 Renlin Li <renlin.li@arm.com>
901 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
902 * bfd-in2.h: Regenerate.
903 * libbfd.h: Regenerate.
904 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
905 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
907 2015-06-15 Alan Modra <amodra@gmail.com>
909 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
910 2014-03-26 change. Call _bfd_clear_contents for relocs against
911 local and global symbols defined in discarded input sections.
913 2015-06-05 Nick Clifton <nickc@redhat.com>
915 * elf32-msp430.c (rl78_sym_diff_handler): New function.
916 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
917 (msp430x_howto_table): Likewise.
919 2015-06-05 Alan Modra <amodra@gmail.com>
921 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
922 relocs with insns moved by --ppc476-workaround. Correct
923 output of REL16 relocs.
925 2015-06-01 Jiong Wang <jiong.wang@arm.com>
927 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
928 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
929 (elfNN_aarch64_final_link_relocate): Ditto.
930 (elfNN_aarch64_gc_swap_hook): Ditto.
931 (elfNN_aarch64_check_relocs): Ditto.
932 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
934 2015-06-01 Jiong Wang <jiong.wang@arm.com>
936 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
937 * bfd-in2.h: Regenerate.
938 * libbfd.h: Regenerate.
939 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
940 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
942 2015-06-01 Jiong Wang <jiong.wang@arm.com>
944 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
945 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
946 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
947 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
949 2015-06-01 Jiong Wang <jiong.wang@arm.com>
951 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
952 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
953 (elfNN_aarch64_final_link_relocate): Ditto.
954 (elfNN_aarch64_gc_swap_hook): Ditto.
955 (elfNN_aarch64_check_relocs): Ditto.
956 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
958 2015-06-01 Jiong Wang <jiong.wang@arm.com>
960 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
961 * bfd-in2.h: Regenerate.
962 * libbfd.h: Regenerate.
963 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
964 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
966 2015-05-28 Catherine Moore <clm@codesourcery.com>
967 Bernd Schmidt <bernds@codesourcery.com>
968 Paul Brook <paul@codesourcery.com>
971 * bfd-in2.h: Regenerated.
972 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
973 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
974 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
976 (compact_eh_frame_hdr_info): Declare.
977 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
978 fields and compact-eh fields.
979 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
980 (bfd_elf_section_data): Add eh_frame_entry_field.
981 (elf_section_eh_frame_entry): Define.
982 (bfd_elf_parse_eh_frame_entries): Declare.
983 (_bfd_elf_parse_eh_frame_entry): Declare.
984 (_bfd_elf_end_eh_frame_parsing): Declare.
985 (_bfd_elf_write_section_eh_frame_entry): Declare.
986 (_bfd_elf_eh_frame_entry_present): Declare.
987 (_bfd_elf_section_for_symbol): Declare.
988 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
989 (bfd_elf_record_eh_frame_entry): New function.
990 (_bfd_elf_parse_eh_frame_entry): New function.
991 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
992 (cmp_eh_frame_hdr): New function.
993 (add_eh_frame_hdr_terminator): New function.
994 (_bfd_elf_end_eh_frame_parsing): New function.
995 (find_merged_cie): Update hdr_info field references.
996 (_bfd_elf_discard_section_eh_frame): Likewise.
997 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
998 (_bfd_elf_eh_frame_entry_present): New function.
999 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
1000 (_bfd_elf_write_section_eh_frame_entry): New function.
1001 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
1002 (_bfd_elf_fixup_eh_frame_hdr): New function.
1003 (write_compact_eh_frame_hdr): New function.
1004 (write_dwarf_eh_frame_hdr): New function.
1005 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
1006 * elflink.c (_bfd_elf_section_for_symbol): New function.
1007 (elf_section_ignore_discarded_relocs): Add Compact EH support.
1008 (elf_link_input_bfd): Likewise.
1009 (bfd_elf_final_link): Likewise.
1010 (_bfd_elf_gc_mark): Likewise.
1011 (bfd_elf_parse_eh_frame_entries): New function.
1012 (bfd_elf_gc_sections): Add Compact EH support.
1013 (bfd_elf_discard_info): Likewise.
1014 * elfxx-mips.c: Include dwarf2.h.
1015 (_bfd_mips_elf_compact_eh_encoding): New function.
1016 (_bfd_mips_elf_cant_unwind_opcode): New function.
1017 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
1018 (_bfd_mips_elf_cant_unwind_opcode): Declare.
1019 (elf_backend_compact_eh_encoding): Define.
1020 (elf_backend_cant_unwind_opcode): Define.
1021 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
1022 (elf_backend_cant_unwind_opcode): Provide default.
1023 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
1024 elf_backend_cant_unwind_opcode.
1025 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
1027 2015-05-27 H.J. Lu <hongjiu.lu@intel.com>
1030 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1031 for now binding only if pointer equality isn't needed.
1032 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1033 binding only if pointer equality isn't needed.
1034 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1035 section for now binding only if pointer equality isn't needed.
1036 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1037 binding only if pointer equality isn't needed.
1039 2015-05-26 H.J. Lu <hongjiu.lu@intel.com>
1042 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
1043 in .rel.plt/.rela.plt.
1044 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1046 2015-05-19 Jiong Wang <jiong.wang@arm.com>
1048 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
1049 relocation case labels alphabetically.
1050 (elfNN_aarch64_final_link_relocate): Ditto.
1051 (elfNN_aarch64_tls_relax): Ditto.
1052 (elfNN_aarch64_relocate_section): Ditto.
1053 (elfNN_aarch64_gc_sweep_hook): Ditto.
1054 (elfNN_aarch64_check_relocs): Ditto.
1055 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
1056 (_bfd_aarch64_elf_resolve_relocation): Ditto.
1058 2015-05-18 Jiong Wang <jiong.wang@arm.com>
1060 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
1063 2015-05-16 H.J. Lu <hongjiu.lu@intel.com>
1065 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
1067 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
1069 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
1070 section for now binding.
1071 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
1074 2015-05-14 H.J. Lu <hongjiu.lu@intel.com>
1076 * bfd.c (bfd_update_compression_header): Also write the zlib
1077 header if the SHF_COMPRESSED bit cleared..
1078 (bfd_check_compression_header): Return the uncompressed size.
1079 * compress.c (decompress_contents): Don't skip the zlib header.
1080 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
1081 which doesn't have the zlib header.
1082 (bfd_init_section_decompress_status): Likewise.
1083 (bfd_get_full_section_contents): Updated.
1084 (bfd_is_section_compressed): Likewise.
1085 (bfd_is_section_compressed_with_header): Return the uncompressed
1087 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
1088 * bfd-in2.h: Regenerated.
1090 2015-05-14 Jiong Wang <jiong.wang@arm.com>
1092 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
1095 2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
1097 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
1098 as GOT reference when plt.refcount is not positive.
1100 2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
1102 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
1103 for the first .plt entry only if needed.
1104 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
1106 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1108 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
1109 (ALL_MACHINES_CFILES): Likewise.
1110 * archures.c (bfd_mach_iamcu): New.
1111 (bfd_mach_i386_iamcu): Likewise.
1112 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
1113 (bfd_iamcu_arch): Likewise.
1114 (bfd_archures_list): Add &bfd_iamcu_arch.
1115 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
1117 (targ_archs): Add bfd_iamcu_arch if needed.
1118 * configure.ac: Support iamcu_elf32_vec.
1119 * cpu-iamcu.c: New file.
1120 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
1121 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
1122 * targets.c (iamcu_elf32_vec): New.
1123 (_bfd_target_vector): Add iamcu_elf32_vec.
1124 * Makefile.in: Regenerated.
1125 * bfd-in2.h: Likewise.
1126 * configure: Likewise.
1128 2015-05-11 H.J. Lu <hongjiu.lu@intel.com>
1130 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
1132 2015-05-10 H.J. Lu <hongjiu.lu@intel.com>
1134 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
1135 and output_bfd with abfd.
1136 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1138 2015-05-06 Toni Spets <toni.spets@iki.fi>
1141 * peXXigen.c (rsrc_process_section): Skip discarded resource
1144 2015-05-01 H.J. Lu <hongjiu.lu@intel.com>
1146 * config.bfd: Support i[3-7]86-*-elf*.
1148 2015-04-30 H.J. Lu <hongjiu.lu@intel.com>
1150 * elf32-i386.c (elf_backend_post_process_headers): Undef for
1153 2015-04-30 Nick Clifton <nickc@redhat.com>
1156 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
1158 (mep_reloc): Delete unused function.
1160 2015-04-29 Nick Clifton <nickc@redhat.com>
1163 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
1166 2015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1168 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
1169 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
1170 elf_s390_merge_obj_attributes.
1171 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
1173 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1176 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
1177 GOT_NORMAL for both sgot/srelgot section.
1178 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
1179 and generate necessary runtime relocation for GOT entry.
1181 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1184 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
1186 2015-04-24 Jiong Wang <jiong.wang@arm.com>
1188 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
1189 PC-relative relocation for external symbol.
1191 2015-04-24 Nick Clifton <nickc@redhat.com>
1194 * compress.c (decompress_contents): Zero initialse the z_stream
1197 2015-04-24 Nick Clifton <nickc@redhat.com>
1199 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
1200 local labels to include local labels with a numeric suffix and
1203 2015-04-24 H.J. Lu <hongjiu.lu@intel.com>
1206 * section.c (SEC_MEP_VLIW): New.
1207 * bfd-in2.h: Regenerated.
1209 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1212 * compress.c (bfd_compress_section_contents): Remove the
1213 write_compress argument.
1214 (bfd_init_section_compress_status): Updated.
1215 (bfd_compress_section): Likewise.
1216 * elf.c (_bfd_elf_set_reloc_sh_name): New.
1217 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
1218 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
1219 _bfd_elf_set_reloc_sh_name.
1220 (elf_fake_sections): Don't rename DWARF debug section for
1221 linker output if it will be compressed. Instead, set
1222 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
1223 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
1224 sh_name != (unsigned int) -1. Don't finalize nor assign
1225 shstrtab section here. Delay setting output section names to
1226 _bfd_elf_write_object_contents.
1227 (_bfd_elf_compute_section_file_positions): Update comments on
1228 sh_offset for shstrtab section.
1229 (assign_file_positions_for_non_load_sections): Set sh_offset to
1230 -1 for shstrtab section.
1231 (assign_file_positions_except_relocs): Likewise.
1232 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
1233 when compressing DWARF debug sections. Place shstrtab section
1234 after DWARF debug sections have been compressed.
1235 (_bfd_elf_write_object_contents): Setting sh_name for output
1238 2015-04-23 H.J. Lu <hongjiu.lu@intel.com>
1241 * bfd.c (bfd): Add is_linker_input.
1242 * elf.c (convert_debug_to_zdebug): New.
1243 (convert_zdebug_to_debug): Likewise.
1244 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
1245 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
1246 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
1247 instead of a pointer to section.
1248 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
1250 * section.c (SEC_ELF_RENAME): New.
1251 * bfd-in2.h: Regenerated.
1253 2015-04-23 Alan Modra <amodra@gmail.com>
1255 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
1256 (ppc64_elf_next_toc_section): Align multi-got toc base.
1257 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
1259 2015-04-22 H.J. Lu <hongjiu.lu@intel.com>
1262 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
1263 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
1264 (elf_i386_create_dynamic_sections): Always allow copy relocs for
1265 building executables.
1266 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
1267 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
1268 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
1269 PIE and R_386_GOTOFF.
1270 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
1272 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1274 * elf.c (assign_section_numbers): Always set up sh_name.
1276 2015-04-20 H.J. Lu <hongjiu.lu@intel.com>
1278 * elf.c (assign_file_positions_for_non_load_sections): Iterate
1279 sections by pointer.
1280 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
1282 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1284 * bfd-in.h (compressed_debug_section_type): New.
1285 * compress.c (bfd_compress_section_contents): Add an argument
1286 for linker write compression and always generate .zdebug_*
1287 section when linking.
1288 (bfd_init_section_compress_status): Pass FALSE to
1289 bfd_compress_section_contents.
1290 (bfd_compress_section): New function.
1291 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
1292 on DWARF debug sections if COMPRESS_DEBUG is set and rename
1293 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
1294 (assign_file_positions_for_non_load_sections): Set sh_offset
1295 to -1 if SEC_ELF_COMPRESS is set.
1296 (assign_file_positions_except_relocs): Likwise.
1297 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
1298 (_bfd_elf_assign_file_positions_for_non_load): This. Change
1299 return time to bfd_boolean. Compress the section if
1300 SEC_ELF_COMPRESS is set.
1301 (_bfd_elf_write_object_contents): Updated.
1302 (_bfd_elf_set_section_contents): Write section contents to
1303 the buffer if SEC_ELF_COMPRESS is set.
1304 * merge.c: Include "elf-bfd.h".
1305 (sec_merge_emit): Add arguments for contents and offset. Write
1306 to contents with offset if contents isn't NULL.
1307 (_bfd_write_merged_section): Write section contents to the
1308 buffer if SEC_ELF_COMPRESS is set. Pass contents and
1309 output_offset to sec_merge_emit.
1310 * elflink.c (bfd_elf_final_link): Allocate the buffer for
1311 output section contents if SEC_ELF_COMPRESS is set.
1312 * section.c (SEC_ELF_COMPRESS): New.
1313 * bfd-in2.h: Regenerated.
1315 2015-04-15 Alan Modra <amodra@gmail.com>
1317 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
1319 2015-04-14 Nick Clifton <nickc@redhat.com>
1321 * elf32-rl78.c (RL78_OP_REL): New macro.
1322 (rl78_elf_howto_table): Use it for complex relocs.
1323 (get_symbol_value): Handle the cases when the info or status
1325 (get_romstart): Cache the status returned by get_symbol_value.
1326 (get_ramstart): Likewise.
1327 (RL78_STACK_PUSH): Generate an error message if the stack
1329 (RL78_STACK_POP): Likewise for underflows.
1330 (rl78_compute_complex_reloc): New function. Contains the basic
1331 processing code for all RL78 complex relocs.
1332 (rl78_special_reloc): New function. Provides special reloc
1333 handling for complex relocs.
1334 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
1335 (rl78_offset_for_reloc): Likewise.
1337 2015-04-14 H.J. Lu <hongjiu.lu@intel.com>
1340 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
1341 info->extern_protected_data when warning copy relocs against
1343 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
1344 when checking protected non-function symbols.
1346 2015-04-13 John Baldwin <jhb@FreeBSD.org>
1348 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
1350 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
1352 2015-04-13 H.J. Lu <hongjiu.lu@intel.com>
1355 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
1356 if the object has been claimed by plugin.
1358 2015-04-11 H.J. Lu <hongjiu.lu@intel.com>
1360 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
1361 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
1362 protected data symbol when building shared library.
1363 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
1364 R_X86_64_GOTOFF64 against undefined symbol and replace
1365 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
1366 R_X86_64_GOTOFF64 against protected data symbol when building
1369 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1372 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
1373 against protected data symbol when building shared library.
1374 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
1375 R_X86_64_GOTOFF64 against protected data symbol when building
1378 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1382 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1383 * elf32-i386.c (elf_backend_extern_protected_data): New.
1385 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1386 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1387 copy relocs against protected symbols if extern_protected_data
1389 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1390 non-function symbols if extern_protected_data is true.
1391 * elfxx-target.h (elf_backend_extern_protected_data): New.
1393 (elfNN_bed): Initialize extern_protected_data with
1394 elf_backend_extern_protected_data.
1396 2015-04-10 H.J. Lu <hongjiu.lu@intel.com>
1398 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
1399 and free with bfd_alloc and bfd_release on compressed buffer.
1400 Release buffer if compressed section isn't smaller.
1402 2015-04-10 Alan Modra <amodra@gmail.com>
1405 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
1406 on adding a protected visibility variable to .dynbss.
1408 2015-04-10 Alan Modra <amodra@gmail.com>
1410 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1413 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
1414 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
1415 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1416 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
1417 extern_protected_data test.
1418 (_bfd_elf_symbol_refs_local_p): Likewise.
1419 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
1420 (elfNN_bed): Delete elf_backend_extern_protected_data init.
1422 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1424 * compress.c (bfd_compress_section_contents): Update comments.
1425 (bfd_init_section_decompress_status): Likewise.
1426 (bfd_init_section_compress_status): Likewise.
1428 2015-04-09 H.J. Lu <hongjiu.lu@intel.com>
1430 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
1432 (TARGET_LITTLE_SYM): Likewise.
1434 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1436 * elf32-xtensa.c (splay-tree.h): include header.
1437 (text_action_struct): drop next pointer.
1438 (text_action_list_struct): drop head pointer, add count and
1440 (find_fill_action): instead of linear search in text_action_list
1442 (text_action_compare, action_first, action_next): new functions.
1443 (text_action_add, text_action_add_literal): instead of linear
1444 search and insertion insert new node into the tree.
1445 (removed_by_actions): pass additional parameter: action_list,
1446 use it to traverse the tree.
1447 (offset_with_removed_text): pass additional action_list parameter
1448 to removed_by_actions.
1449 (map_action_fn_context): new typedef.
1450 (map_action_fn_context_struct): new structure.
1451 (map_action_fn): new function.
1452 (map_removal_by_action): use splay_tree_foreach to build map.
1453 (find_insn_action): replace linear search in text_action_list
1454 with series of splay_tree_lookups.
1455 (print_action, print_action_list_fn): new functions.
1456 (print_action_list): use splay_tree_foreach.
1457 (init_xtensa_relax_info): drop action_list.head initialization.
1458 Initialize the tree.
1459 (compute_text_actions): use non-zero action_list_count instead of
1460 non-NULL action list.
1461 (xlate_map_context): new typedef.
1462 (xlate_map_context_struct): new structure.
1463 (xlate_map_fn): new function.
1464 (build_xlate_map): use splay_tree_foreach to build map.
1465 (action_remove_bytes_fn): new function.
1466 (relax_section): use zero action_list_count instead of NULL
1467 action list. Use splay_tree_foreach to count final section size.
1468 Drop unused variable 'removed'.
1470 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1472 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1473 (removed_literal_map_entry_struct): new structure.
1474 (removed_literal_list_struct): add new fields: n_map and map.
1475 (map_removed_literal, removed_literal_compare): new functions.
1476 (find_removed_literal): build index array for literals ordered
1477 by VMA, use binary search to find removed literal.
1479 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1481 * elf32-xtensa.c (removal_by_action_entry_struct,
1482 removal_by_action_map_struct): new structures.
1483 (removal_by_action_entry, removal_by_action_map): new typedefs.
1484 (text_action_list_struct): add new field: map.
1485 (map_removal_by_action, removed_by_actions_map,
1486 offset_with_removed_text_map): new functions.
1487 (relax_section): replace offset_with_removed_text with
1488 offset_with_removed_text_map.
1489 (translate_reloc, relax_property_section, relax_section_symbols):
1490 replace removed_by_actions with removed_by_actions_map.
1492 2015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1494 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1495 reloc_range): new typedef.
1496 (reloc_range_list_struct, reloc_range_list_entry_struct,
1497 reloc_range_struct): new structures.
1498 (reloc_range_compare, build_reloc_ranges,
1499 reloc_range_list_append, reloc_range_list_remove,
1500 reloc_range_list_update_range, free_reloc_range_list): new
1502 (compute_text_actions): precompute relocation opcodes before the
1503 loop. Add relevant_relocs variable, initialize it before the
1504 loop, pass it to the check_section_ebb_pcrels_fit.
1505 (check_section_ebb_pcrels_fit): add new parameter:
1506 relevant_relocs. Update address range in the relevant_relocs if
1507 it's non-NULL and iterate only over relevant relocations.
1509 2015-04-09 Nick Clifton <nickc@redhat.com>
1511 * elf32-rx.c (describe_flags): Report the settings of the string
1513 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1516 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1518 * compress.c (bfd_compress_section_contents): Work around a GCC
1519 uninitialized warning bug fixed in GCC 4.7.
1521 2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1523 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1525 * bfd.c (bfd::flags): Increase size to 18 bits.
1526 (BFD_COMPRESS_GABI): New.
1527 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1528 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1529 (bfd_update_compression_header): New fuction.
1530 (bfd_check_compression_header): Likewise.
1531 (bfd_get_compression_header_size): Likewise.
1532 (bfd_is_section_compressed_with_header): Likewise.
1533 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
1534 (bfd_compress_section_contents): Return the uncompressed size if
1535 the full section contents is compressed successfully. Support
1536 converting from/to .zdebug* sections.
1537 (bfd_get_full_section_contents): Call
1538 bfd_get_compression_header_size to get compression header size.
1539 (bfd_is_section_compressed): Renamed to ...
1540 (bfd_is_section_compressed_with_header): This. Add a pointer
1541 argument to return compression header size.
1542 (bfd_is_section_compressed): Use it.
1543 (bfd_init_section_decompress_status): Call
1544 bfd_get_compression_header_size to get compression header size.
1545 Return FALSE if uncompressed section size is 0.
1546 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
1547 from/to .zdebug* sections.
1548 * bfd-in2.h: Regenerated.
1550 2015-04-07 Alan Modra <amodra@gmail.com>
1552 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
1553 mapped to output .got section.
1555 2015-04-07 Alan Modra <amodra@gmail.com>
1557 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
1558 and has_addr16_lo. Make has_sda_refs a bitfield.
1559 (ppc_elf_check_relocs): Set new flags.
1560 (ppc_elf_link_hash_table_create): Update default_params.
1561 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
1562 where we won't be making .dynbss entries or editing code. Set
1563 params->pic_fixup when we'll edit code for protected var access.
1564 (allocate_dynrelocs): Allocate got entry for edited code and
1566 (struct ppc_elf_relax_info): Add picfixup_size.
1567 (ppc_elf_relax_section): Rename struct one_fixup to struct
1568 one_branch_fixup. Rename fixups to branch_fixups. Size space for
1570 (ppc_elf_relocate_section): Edit non-PIC accessing protected
1571 visibility variables to PIC. Don't emit dyn_relocs for code
1573 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
1575 2015-04-07 Nick Clifton <nickc@redhat.com>
1577 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
1578 local labels as local.
1580 2015-04-06 H.J. Lu <hongjiu.lu@intel.com>
1582 * compress.c (get_uncompressed_size): Removed.
1583 (bfd_compress_section_contents): Use bfd_putb64 to write
1584 uncompressed section size.
1585 (bfd_init_section_decompress_status): Replace
1586 get_uncompressed_size with bfd_getb64.
1588 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1590 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
1591 SHF_COMPRESSED bit if not decompress.
1593 2015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1595 * compress.c (get_uncompressed_size): New. Extracted from ...
1596 (bfd_init_section_decompress_status): This. Use it.
1598 2015-04-02 Andrew Turner <andrew@freebsd.org>
1600 * config.bfd: Add aarch64-*-freebsd* target triple.
1602 2015-04-02 H.J. Lu <hongjiu.lu@intel.com>
1604 * configure: Regenerated.
1606 2015-04-01 Tejas Belagod <tejas.belagod@arm.com>
1607 Marcus Shawcroft <marcus.shawcroft@arm.com>
1608 Jiong Wang <jiong.wang@arm.com>
1610 * bfd-in.h (bfd_elf64_aarch64_set_options)
1611 (bfd_elf32_aarch64_set_options): Add parameter.
1612 * bfd-in2.h: Regenerated.
1613 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
1614 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
1615 (_bfd_aarch64_erratum_843419_stub_name)
1616 (_bfd_aarch64_erratum_843419_fixup)
1617 (_bfd_aarch64_erratum_843419_scan)
1618 (_bfd_aarch64_erratum_843419_branch_to_stub)
1619 (_bfd_aarch64_erratum_843419_p): Define.
1620 (enum elf_aarch64_stub_type): Define
1621 aarch64_stub_erratum_843419_veneer.
1622 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
1623 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
1624 and fix_erratum_843419_adr.
1625 (stub_hash_newfunc): Initialize adrp_offset;
1626 (_bfd_aarch64_add_stub_entry_after): Define.
1627 (aarch64_map_one_stub, aarch64_build_one_stub)
1628 (aarch64_size_one_stub): Handle
1629 aarch64_stub_erratum_843419_veneer.
1630 (_bfd_aarch64_resize_stubs): Round stub section size.
1631 (elfNN_aarch64_size_stubs): Add scan for 843419.
1632 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
1633 fix_erratum_843419 and fix_erratum_843419_adr.
1634 (struct erratum_835769_branch_to_stub_data): Add info.
1635 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
1636 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
1637 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
1638 (_bfd_aarch64_sign_extend): Define.
1639 (reencode_adr_imm): Remove static. Rename to:
1640 (_bfd_aarch64_reencode_adr_imm): Define.
1641 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
1642 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
1643 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
1644 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
1647 2015-04-01 H.J. Lu <hongjiu.lu@intel.com>
1649 * configure: Regenerated.
1651 2015-03-31 Ed Schouten <ed@nuxi.nl>
1653 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
1654 for x86_64-*-cloudabi*.
1655 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
1656 * configure: Regenerated.
1657 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
1658 (TARGET_LITTLE_NAME): Likewise.
1659 (ELF_OSABI): Likewise.
1660 (elf64_bed): Likewise.
1661 * targets.c (x86_64_elf64_cloudabi_vec): New.
1662 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1664 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1666 * configure.ac: Revert the AM_ZLIB change.
1667 * Makefile.in: Regenerated.
1668 * aclocal.m4: Likewise.
1669 * configure: Likewise.
1670 * doc/Makefile.in: Likewise.
1672 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1675 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1676 (_bfd_elf_get_reloc_section): New.
1677 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1678 (assign_section_numbers): Call get_reloc_section to look up the
1679 section the relocs apply.
1680 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1681 (elfNN_bed): Initialize get_reloc_section with
1682 elf_backend_get_reloc_section.
1684 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1686 * Makefile.am (ZLIB): New.
1687 (ZLIBINC): Likewise.
1688 (AM_CFLAGS): Add $(ZLIBINC).
1689 (libbfd_la_LIBADD): Add $(ZLIB).
1690 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1691 (decompress_contents): Don't check HAVE_ZLIB_H.
1692 (bfd_compress_section_contents): Likewise.
1693 (bfd_get_full_section_contents): Likewise.
1694 (bfd_init_section_decompress_status): Likewise.
1695 (bfd_init_section_compress_status): Likewise.
1696 * configure.ac (AM_ZLIB): Removed.
1697 (zlibdir): New. AC_SUBST.
1698 (zlibinc): Likewise.
1699 Add --with-system-zlib.
1700 * Makefile.in: Regenerated.
1701 * acinclude.m4: Likewise.
1702 * config.in: Likewise.
1703 * configure: Likewise.
1704 * doc/Makefile.in: Likewise.
1706 2015-03-27 Alan Modra <amodra@gmail.com>
1710 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1711 protected_def when symbol section is read-only. Adjust all calls.
1712 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1714 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1716 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1717 _bfd_final_link_relocate with aarch64_relocate.
1719 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1722 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1723 (bfd_elf_gc_sections): Likewise.
1725 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1727 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1728 size for initial branch.
1729 (elfNN_aarch64_build_stubs): Write initial branch.
1730 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1731 mapping symbol on initial branch.
1733 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1735 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1736 Update erratum count.
1738 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1740 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1741 first matching debug section.
1743 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
1746 * compress.c (bfd_compress_section_contents): Don't write the
1747 zlib header and set contents as well as compress_status if
1748 compression didn't make the section smaller.
1749 (bfd_init_section_compress_status): Don't check compression
1752 2015-03-24 Nick Clifton <nickc@redhat.com>
1755 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
1756 range auxillary sections.
1758 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1760 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1762 (_bfd_aarch64_get_stub_for_link_section): Define.
1764 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1766 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1767 update of section_group[].stub_sec.
1769 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1771 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1772 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1773 Delete fixes, fix_table_size and associated code. Call
1774 _bfd_aarch64_add_stub_entry_in_group. Rename to...
1775 (bfd_aarch64_erratum_835769_scan): Define.
1776 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1777 erratum_835769_fix_table_size, i and associated code. Relocate
1778 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
1779 correction. Delete construction of stub entry from
1780 erratum_835769_fixes array.
1782 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1784 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1785 _bfd_aarch64_add_stub_entry_in_group.
1787 2015-03-24 Alan Modra <amodra@gmail.com>
1789 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1790 stubs, even those for undefined weak symbols. Otherwise, don't
1791 report relocation overflow on branches to undefined strong
1792 symbols. Fix memory leak.
1793 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1794 overflow on branches to undefined strong symbols.
1796 2015-03-23 Keith Seitz <keiths@redhat.com>
1798 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1801 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1803 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1804 construction into...
1805 (_bfd_aarch64_erratum_835769_stub_name): Define.
1807 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1809 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1810 stub resize code into...
1811 (bfd_aarch64_resize_stubs): Define.
1813 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1815 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1816 creation code into...
1817 (bfd_aarch64_create_stub_section): Define.
1819 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1821 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1822 from elf_aarch64_create_or_find_stub_sec.
1823 (_bfd_aarch64_add_stub_entry_in_group): Rename from
1824 elfNN_aarch64_add_stub. Call
1825 _bfd_aarch64_create_or_find_stub_sec.
1826 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1827 _bfd_aarch64_add_stub_entry_in_group.
1829 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1831 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
1832 sense of boolean return.
1833 (elfNN_aarch64_size_stubs): Adjust for above.
1835 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1837 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1838 Remove unused parameter.
1839 (elfNN_aarch64_size_stubs): Adjust for above.
1841 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1843 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1845 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1847 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1848 (num_aarch64_erratum_835769_fixes): Remove.
1849 (elfNN_aarch64_size_stubs): Remove assignments to above.
1851 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1853 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1855 (aarch64_erratum_seqeunce): Rename rtn to rt2.
1857 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1859 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1861 2015-03-19 Nick Clifton <nickc@redhat.com>
1863 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
1864 the RL78 core based upon the flags.
1865 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1867 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1868 (elf32_rl78_machine): Always return bfd_mach_rl78.
1870 2015-03-19 Nick Clifton <nickc@redhat.com>
1873 * compress.c (bfd_compress_section_contents): Do not define this
1874 function if it is not used.
1876 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1878 * compress.c (bfd_compress_section_contents): Make it static.
1879 * bfd/bfd-in2.h: Regenerated.
1881 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1884 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1885 suitable for the AMD64.
1887 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1888 Nick Clifton <nickc@redhat.com>
1891 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1892 debug section's name if the section was actually compressed.
1893 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1894 * compress.c (bfd_init_section_compress_status): Do not compress
1895 the section if doing so would make it bigger. In such cases leave
1896 the section alone and return COMPRESS_SECTION_NONE.
1898 2015-03-17 Alan Modra <amodra@gmail.com>
1900 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1901 on nothing to do, before malloc of returned symbol array.
1903 2015-03-16 Nick Clifton <nickc@redhat.com>
1905 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1906 stored in the elf_section_data structure then load them as
1909 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1911 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1912 relocs against code sections.
1913 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1914 * elf64-s390.c: Likewise.
1916 2015-03-11 Alan Modra <amodra@gmail.com>
1918 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1919 reverse order. Account for larger size of __tls_get_addr_opt stub.
1921 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1924 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1926 (elf32_arm_print_private_bfd_data): Likewise.
1928 2015-03-06 Nick Clifton <nickc@redhat.com>
1931 * elflink.c (put_value): Like previous delta, but for the 32-bit
1934 2015-03-05 Nick Clifton <nickc@redhat.com>
1937 * elflink.c (put_value): Avoid using an undefined shift
1940 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1944 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1945 * elf32-i386.c (elf_backend_extern_protected_data): New.
1947 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1948 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1949 copy relocs against protected symbols if extern_protected_data
1951 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1952 non-function symbols if extern_protected_data is true.
1953 * elfxx-target.h (elf_backend_extern_protected_data): New.
1955 (elfNN_bed): Initialize extern_protected_data with
1956 elf_backend_extern_protected_data.
1958 2015-03-05 Nick Clifton <nickc@redhat.com>
1961 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1962 lookup fails, check for an address bias in the dwarf info, and if
1963 one exists, retry the lookup with the biased value.
1964 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1965 Determines if a bias exists bewteen the addresses of functions
1966 based on DWARF information vs symbol table information.
1967 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1968 * libbfd.h: Regenerate.
1970 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1972 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1973 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1974 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1976 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1978 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1979 (aarch64_size_one_stub): Likewise.
1980 (aarch64_map_one_stub): Likewise.
1982 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1984 * cpu-s390.c (N): New macro.
1985 (bfd_s390_31_arch): New. Define only if default target word size
1986 is 64 bits. Otherwise define...
1987 (bfd_390_64_arch): ...this. Make static.
1988 (bfd_s390_arch): Define according to the default target word size.
1989 Let the 'next' field point to the alternate arch.
1991 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
1994 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1995 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1996 to be used with MOVK rather than MOVZ.
1998 2015-03-03 DJ Delorie <dj@redhat.com>
2000 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
2003 2015-02-28 Alan Modra <amodra@gmail.com>
2005 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
2008 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
2010 * elf32-i386.c (need_convert_mov_to_lea): New.
2011 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
2012 (elf_i386_convert_mov_to_lea): Return TRUE if
2013 need_convert_mov_to_lea is unset.
2014 * elf64-x86-64.c (need_convert_mov_to_lea): New.
2015 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
2016 (elf_x86_64_convert_mov_to_lea): Return TRUE if
2017 need_convert_mov_to_lea is unset.
2019 2015-02-27 Nick Clifton <nickc@redhat.com>
2022 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
2023 string length overflow when the string table length is actually
2026 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
2028 * bfd/bfd-in2.h: Regenerate.
2029 * bfd/libbfd.h: Regenerate.
2031 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2033 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
2034 TLSDESC_LD_PREL19 field width and masks.
2035 (aarch64_tls_transition_without_check)
2036 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2037 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2038 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2039 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
2040 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2041 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2043 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2045 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
2047 (aarch64_tls_transition_without_check)
2048 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2049 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2050 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2051 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
2052 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2053 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2054 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2056 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2058 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
2059 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
2060 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
2061 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
2062 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
2063 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
2064 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2065 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2066 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
2068 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2070 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
2071 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
2072 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
2073 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
2074 (elfNN_aarch64_check_relocs): Handle
2075 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
2077 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
2078 (_bfd_aarch64_elf_resolve_relocation): Likewise.
2080 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2082 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
2084 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2086 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
2087 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
2088 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
2091 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
2093 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
2096 2015-02-26 Nick Clifton <nickc@redhat.com>
2099 * coffcode.h (coff_compute_section_file_positions): Report
2100 negative page sizes.
2101 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
2102 (assign_file_positions_for_non_load_sections): Replace assertion
2103 with an error message.
2104 (rewrite_elf_program_header): Handle excessive segment
2106 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
2107 (bfd_mach_o_read_section_64): Likewise.
2108 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
2109 print a bfd name, not %A.
2111 2015-02-26 Alan Modra <amodra@gmail.com>
2113 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
2114 thread-safe stubs for iplt.
2115 (build_tls_get_addr_stub): Restore r2 immediately after call.
2117 2015-02-26 Terry Guo <terry.guo@arm.com>
2119 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
2120 merge Tag_ABI_HardFP_use.
2122 2015-02-26 Alan Modra <amodra@gmail.com>
2124 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
2125 Use text relocs rather than giving an error on trying to use
2126 .dynbss for protected shared lib vars.
2127 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2129 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2131 * elf32-avr.c (struct elf_avr_section_data): New structure.
2132 (struct avr_relax_info): New structure.
2133 (elf_avr_new_section_hook): New function.
2134 (struct elf_avr_section_data): Add relax_info.
2135 (get_avr_relax_info): New function.
2136 (init_avr_relax_info): New function.
2137 (elf32_avr_relax_delete_bytes): Find next property record before
2138 deleting bytes. When deleting don't move bytes beyond the next
2140 (avr_elf32_assign_records_to_section): New function.
2141 (avr_property_record_compare): New function.
2142 (avr_load_all_property_sections): New function.
2143 (elf32_avr_relax_section): Load property data. After relaxing the
2144 section, move any .align directives that have enough deleted bytes
2146 (bfd_elf32_new_section_hook): Define.
2148 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2150 * elf32-avr.h (struct avr_property_header): New strucure.
2151 (avr_elf32_load_property_records): Declare.
2152 (avr_elf32_property_record_name): Declare.
2153 * elf32-avr.c: Add bfd_stdint.h include.
2154 (retrieve_local_syms): New function.
2155 (get_elf_r_symndx_section): New function.
2156 (get_elf_r_symndx_offset): New function.
2157 (internal_reloc_compare): New function.
2158 (struct avr_find_section_data): New structure.
2159 (avr_is_section_for_address): New function.
2160 (avr_find_section_for_address): New function.
2161 (avr_elf32_load_records_from_section): New function.
2162 (avr_elf32_load_property_records): New function.
2163 (avr_elf32_property_record_name): New function.
2165 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
2167 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
2168 (AVR_PROPERTY_RECORDS_VERSION): Define.
2169 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
2170 (struct avr_property_record): New structure.
2172 2015-02-24 Nick Clifton <nickc@redhat.com>
2174 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
2176 (v850_elf_make_note_section): New function. Creates a note
2178 (v850_elf_create_sections): New function. Create a note section
2179 if one is not already present.
2180 (v850_elf_set_note): New function. Adds a note to a bfd.
2181 (v850_elf_copy_private_bfd_data): New function. Copies V850
2183 (v850_elf_merge_notes): New function. Merges V850 notes.
2184 (print_v850_note): New function. Displays a V850 note.
2185 (v850_elf_print_notes): New function. Displays all notes attached
2187 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
2188 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
2189 (v850_elf_fake_sections): Set the type of the V850 note section.
2190 * bfd-in.h (v850_elf_create_sections): Add prototype.
2191 (v850_elf_set_note): Add prototype.
2192 * bfd-in2.h: Regenerate.
2194 2015-02-24 Nick Clifton <nickc@redhat.com>
2196 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
2197 * configure: Regenerate.
2198 * config.in: Regenerate.
2199 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
2200 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
2201 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
2204 2015-02-24 Nick Clifton <nickc@redhat.com>
2206 * pdp11.c (set_section_contents): Pad the .text and .data sections
2207 to their aligned sizes.
2209 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
2211 * config.bfd: Add h8300-*-linux.
2212 * configure.ac: Add h8300_elf32_linux_vec.
2213 * configure: Regenerate.
2214 * elf32-h8300.c: Likewise.
2215 * targets.c(_bfd_target_vector): Likewise.
2217 2015-02-23 Nick Clifton <nickc@redhat.com>
2220 * cpu-w65.c: Correct typos in license notice.
2223 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
2224 symbols at end of sections. Adjust function sizes.
2226 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
2228 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
2229 (elfcore_write_s390_vxrs_high): Likewise.
2230 * elf.c (elfcore_grok_s390_vxrs_low): New function.
2231 (elfcore_grok_s390_vxrs_high): New function.
2232 (elfcore_grok_note): Call them.
2233 (elfcore_write_s390_vxrs_low): New function.
2234 (elfcore_write_s390_vxrs_high): New function.
2235 (elfcore_write_register_note): Call them.
2237 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
2240 * verilog.c (verilog_write_record): Correct buffer size.
2242 2015-02-19 Alan Modra <amodra@gmail.com>
2244 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
2246 2015-02-19 Alan Modra <amodra@gmail.com>
2249 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
2250 (elf_link_output_extsym): Drop local and global undefined syms.
2251 Tidy. Expand comment.
2253 2015-02-17 Alan Modra <amodra@gmail.com>
2256 * elflink.c (struct elf_outext_info): Remove need_second_pass
2258 (elf_link_output_extsym): Delete code handling second forced
2259 local pass. Move code emitting NULL STT_FILE symbol later, so
2260 that it can be omitted if forced local is stripped. Don't
2261 emit the NULL STT_FILE if no file symbols have been output.
2262 (bfd_elf_final_link): Remove second forced local pass.
2263 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
2264 (ppc_elf_size_dynamic_sections): Likewise.
2265 * elf64-ppc.c (ppc_build_one_stub): Likewise.
2266 (build_global_entry_stubs): Likewise.
2267 (ppc64_elf_build_stubs): Likewise.
2269 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
2272 * elflink.c (elf_link_output_extsym): Only check filesym_count
2273 when outputting a NULL FILE symbol. Set second_pass_sym to
2274 h->forced_local && !h->root.linker_def.
2276 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
2278 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
2279 on _TLS_MODULE_BASE_.
2280 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
2282 2015-02-15 Alan Modra <amodra@gmail.com>
2284 * dwarf2.c (read_rangelist): Correct buffer overflow check
2285 Whitespace throughout file.
2287 2015-02-14 Alan Modra <amodra@gmail.com>
2290 * bfd.c (struct bfd): Add lto_output.
2291 * linker.c (_bfd_handle_already_linked): Explicitly test for
2292 objects added by the lto plugin.
2293 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
2294 no_export flags from archive.
2295 * archive.c (open_nested_file): New function, setting lto_output
2296 and no_export, extracted from..
2297 (find_nested_archive): ..here. Flip params. Rename from
2298 _bfd_find_nested_archive.
2299 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
2300 (_bfd_look_for_bfd_in_cache): Copy no_export.
2301 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
2302 my_archive->no_export test.
2303 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
2304 Don't use the file name when adding lto_output STT_FILE sym.
2305 * bfd-in2.h: Regenerate.
2307 2015-02-13 Alan Modra <amodra@gmail.com>
2310 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
2311 now redundant assert.
2313 2015-02-12 Nick Clifton <nickc@redhat.com>
2316 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
2317 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
2318 (read_indirect_string, read_alt_indirect_string)
2319 (read_alt_indirect_ref, read_address, read_abbrevs)
2320 (read_attribute_value, read_attribute, decode_line_info)
2321 (find_abstract_instance_name, read_rangelist)
2322 (scan_unit_for_symbols, parse_comp_unit)
2323 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
2324 end pointers to reading functions and check for offsets taking
2325 pointers out of range. Replace calls to read_*_leb128 with calls
2326 to safe_read_leb128.
2328 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
2330 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
2331 computed file_name address being before the start of the string
2334 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
2337 * bfd.c (bfd_plugin_format): New.
2338 (bfd): Add plugin_format and plugin_dummy_bfd.
2339 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
2340 argument to return TRUE if any plugin is found. Set plugin_format.
2342 (bfd_plugin_target_p): New.
2343 (bfd_plugin_specified_p): Likewise.
2344 (bfd_plugin_target_p): Likewise.
2345 (register_ld_plugin_object_p): Likewise.
2346 (bfd_plugin_set_plugin): Set has_plugin.
2347 (load_plugin): Cache try_load_plugin result.
2348 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
2350 * plugin.h (bfd_plugin_target_p): New.
2351 (bfd_plugin_specified_p): Likewise.
2352 (register_ld_plugin_object_p): Likewise.
2353 * bfd-in2.h: Regenerated.
2355 2015-02-11 Pedro Alves <palves@redhat.com>
2357 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
2358 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
2359 * libbfd.h: Regenerate.
2360 * libcoff.h: Regenerate.
2362 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
2363 * mach-o.h [__cplusplus]: Wrap in extern "C".
2364 * som.h [__cplusplus]: Wrap in extern "C".
2366 2015-02-10 Nick Clifton <nickc@redhat.com>
2369 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
2371 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
2372 size and number of relocs.
2373 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
2375 * versados.c (process_otr): Check the esdid value before using it
2376 to access the EDATA.
2378 2015-02-09 Ed Maste <emaste@freebsd.org>
2380 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
2381 uninitialized and unused variable.
2382 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2384 2015-02-09 Alan Modra <amodra@gmail.com>
2386 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
2388 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2389 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
2391 2015-02-09 Alan Modra <amodra@gmail.com>
2393 * elflink.c: Whitespace, formatting fixes.
2394 (elf_link_input_bfd): Clarify comment.
2395 (elf_link_output_extsym): Exclude symbols in linker created
2396 sections when testing for plugin symbols.
2398 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
2401 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
2402 warning for relocation in readonly section for -z text.
2403 (elf_i386_size_dynamic_sections): Likewise.
2404 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2405 (elf_x86_64_size_dynamic_sections): Likewise.
2407 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
2411 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
2412 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
2413 referenced from a non-IR file.
2415 2015-02-06 Nick Clifton <nickc@redhat.com>
2418 * peXXigen.c (rsrc_print_resource_entries): Add range check for
2419 addresses that wrap around the address space.
2420 (rsrc_parse_entry): Likewise.
2422 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
2426 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
2427 undefined if it is referenced from a non-IR file.
2429 2015-02-03 Nick Clifton <nickc@redhat.com>
2432 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
2433 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
2434 index or an out of range fdr index.
2435 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
2436 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
2437 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
2438 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
2439 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
2440 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
2441 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2442 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
2443 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
2444 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
2445 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
2446 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
2447 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2448 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
2449 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
2450 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
2451 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
2452 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2453 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2454 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2455 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2456 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2457 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2458 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2459 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2460 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2461 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2462 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2463 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2464 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2465 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2466 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2467 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2468 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2469 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2470 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2471 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2472 * elf32-vax.c (rtype_to_howto): Likewise.
2473 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2474 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2475 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2476 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2477 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2478 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2479 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2480 of range symbol indicies.
2481 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2482 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2483 (bfd_mach_o_build_dysymtab): Likewise.
2484 (bfd_mach_o_write_symtab_content): Set the string table size to
2486 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2488 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2490 * tekhex.c (first_phase): Check for src pointer reaching end of
2493 2015-02-03 Will Newton <will.newton@linaro.org>
2495 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2496 Set st_value to zero for undefined symbols if the reference
2497 is weak or pointer_equality_needed is FALSE.
2499 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2500 comment discussing why we clear st_value for some symbols.
2502 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2504 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2505 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2507 2015-01-29 Alan Modra <amodra@gmail.com>
2509 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2510 optimization. Tidy mask for GOT_TLSGD optimization.
2511 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2512 location of nop zapping high insn too.
2514 2015-01-28 Alan Modra <amodra@gmail.com>
2516 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2517 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2518 in .toc indicate xlc compiled code that might require a rw .toc.
2520 2015-01-28 James Bowman <james.bowman@ftdichip.com>
2522 * Makefile.am: Add FT32 files.
2523 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2524 (bfd_mach_ft32): Define.
2525 (bfd_ft32_arch): Declare.
2526 (bfd_archures_list): Add bfd_ft32_arch.
2527 * config.bfd: Handle FT32.
2528 * configure.ac: Likewise.
2529 * cpu-ft32.c: New file.
2530 * elf32-ft32.c: New file.
2531 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
2532 BFD_RELOC_FT32_18): Define.
2533 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
2534 * bfd-in2.h: Regenerate.
2535 * libbfd.h: Regenerate.
2536 * Makefile.in: Regenerate.
2537 * configure: Regenerate.
2538 * po/SRC-POTFILES.in: Regenerate.
2540 2015-01-27 Nick Clifton <nickc@redhat.com>
2543 * pdp11.c (aout_get_external_symbols): Return false if there are
2546 * dwarf2.c (concat_filename): Check for an empty directory table.
2547 (scan_unit_for_symbols): Check for reading off the end of the
2549 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
2551 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
2554 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2556 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
2558 2015-01-22 DJ Delorie <dj@redhat.com>
2560 * elf32-m32c.c (m32c_apply_reloc_24): New.
2561 (m32c_elf_howto_table): Use it for R_M32C_24.
2562 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
2564 2015-01-22 Nick Clifton <nickc@redhat.com>
2567 * coffcode.h (handle_COMDAT): When searching for the section
2568 symbol, make sure that there is space left in the symbol table.
2569 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
2571 2015-01-21 Nick Clifton <nickc@redhat.com>
2574 * coffcode.h (coff_set_arch_mach_hook): Check return value from
2576 (coff_slurp_line_table): Return FALSE if the line number
2577 information was corrupt.
2578 (coff_slurp_symbol_table): Return FALSE if the symbol information
2580 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
2581 initialise the fields of the dyld_info structure.
2582 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
2583 error message and a return value.
2584 (bfd_mach_o_layout_commands): Change the function to boolean.
2585 Return FALSE if the function fails.
2586 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
2588 (bfd_mach_o_read_command): Fail if an unrecognised command is
2590 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
2592 (slurp_symtab): Check the return from bfd_malloc.
2593 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
2594 encountered an error.
2595 (_bfd_XXi_final_link_postscript): Fail if a section could not be
2597 * peicode.h (pe_bfd_object_p): Fail if the header could not be
2599 * tekhex.c (first_phase): Fail if the section is too big.
2600 * versados.c (struct esdid): Add content_size field.
2601 (process_otr): Use and check the new field.
2602 (versados_get_section_contents): Check that the section exists and
2603 that the requested data is available.
2605 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
2607 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
2609 2015-01-20 Alan Modra <amodra@gmail.com>
2612 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
2613 ELF_COMMON_DEF syms.
2615 2015-01-19 Alan Modra <amodra@gmail.com>
2618 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
2619 linker script assignments too.
2620 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
2621 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
2623 2015-01-19 Alan Modra <amodra@gmail.com>
2625 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
2626 to allow return of first howto.
2627 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
2628 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
2629 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
2630 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
2631 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
2632 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
2633 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
2634 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
2635 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2636 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
2637 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
2638 (spu_elf_reloc_type_lookup): Adjust to suit.
2640 2015-01-19 Alan Modra <amodra@gmail.com>
2642 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
2643 (bfd_get_section_limit): ..here.
2644 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
2645 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
2646 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
2647 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
2648 bfd_reloc_outofrange check.
2649 * bfd-in2.h: Regenerate.
2651 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
2652 on zero size relocs.
2653 * ecoff.c (ecoff_reloc_link_order): Likewise.
2654 * elf32-nds32.c (nds32_relocate_contents): Likewise.
2655 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2657 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
2658 (_bfd_clear_contents): Likewise.
2659 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2660 (mips_elf_perform_relocation): Likewise.
2662 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2663 from malloc on zero size alloc.
2664 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2665 * elflink.c (elf_reloc_link_order): Likewise.
2666 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2667 * pdp11.c (aout_link_reloc_link_order): Likewise.
2668 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2670 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2671 bitsize 0, and complain_overflow_dont.
2672 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2673 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2674 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2675 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2676 * elf32-arc.c (elf_arc_howto_table): Likewise.
2677 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2678 * elf32-avr.c (elf_avr_howto_table): Likewise.
2679 * elf32-bfin.c (bfin_howto_table): Likewise.
2680 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2681 * elf32-cris.c (cris_elf_howto_table): Likewise.
2682 * elf32-crx.c (crx_elf_howto_table): Likewise.
2683 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2684 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2685 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2686 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2687 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2688 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2689 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2690 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2691 * elf32-i386.c (elf_howto_table): Likewise.
2692 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2693 * elf32-i960.c (elf32_i960_relocate): Likewise.
2694 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2695 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2696 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2697 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2698 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2699 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2700 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2701 * elf32-m68k.c (howto_table): Likewise.
2702 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2703 * elf32-mep.c (mep_elf_howto_table): Likewise.
2704 * elf32-metag.c (elf_metag_howto_table): Likewise.
2705 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2706 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2707 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2708 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2709 * elf32-mt.c (mt_elf_howto_table): Likewise.
2710 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2711 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2712 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2713 * elf32-pj.c (pj_elf_howto_table): Likewise.
2714 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2715 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2716 * elf32-rx.c (rx_elf_howto_table): Likewise.
2717 * elf32-s390.c (elf_howto_table): Likewise.
2718 * elf32-score.c (elf32_score_howto_table): Likewise.
2719 * elf32-score7.c (elf32_score_howto_table): Likewise.
2720 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2721 * elf32-spu.c (elf_howto_table): Likewise.
2722 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2723 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2724 * elf32-v850.c (v850_elf_howto_table): Likewise.
2725 * elf32-vax.c (howto_table): Likewise.
2726 * elf32-visium.c (visium_elf_howto_table): Likewise.
2727 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2728 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
2729 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2730 * elf32-xtensa.c (elf_howto_table): Likewise.
2731 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2732 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2733 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
2734 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2735 * elf64-s390.c (elf_howto_table): Likewise.
2736 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
2737 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2738 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2739 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2740 (elfNN_aarch64_howto_none): Likewise.
2741 * elfxx-ia64.c (ia64_howto_table): Likewise.
2742 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2743 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2744 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2746 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
2749 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2750 about -fPIC if the symbol is undefined when building executable.
2752 2015-01-15 Nick Clifton <nickc@redhat.com>
2755 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2756 error message. Never return an invalid howto pointer.
2757 * elf32-cr16.c (cr16_info_to_howto): Likewise.
2758 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2759 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2760 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2761 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2762 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2763 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2764 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2765 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2766 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2767 * elf32-vax.c (rtype_to_howto): Likewise.
2768 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2769 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2770 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2771 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2772 (sh_elf_reloc): Check that the reloc is in range.
2773 * reloc.c (bfd_perform_relocation): Check that the section is big
2774 enough for the entire reloc.
2775 (bfd_generic_get_relocated_section_contents): Report unexpected
2776 return values from perform_reloc.
2778 2015-01-15 Nick Clifton <nickc@redhat.com>
2780 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2781 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
2784 2015-01-15 Alan Modra <amodra@gmail.com>
2786 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2787 any output section matching a linker created dynobj section.
2789 2015-01-15 Alan Modra <amodra@gmail.com>
2792 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2793 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
2794 Don't assign symtab file position unless symbols will be output.
2795 Merge blocks with condition in common. Don't call
2796 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2797 unless other symbols are output. Move assignment of symtab_shndx
2798 file position. Localize variable.
2800 2015-01-14 Jiong Wang <jiong.wang@arm.com>
2802 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2803 trying to defer them to runtime.
2805 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2807 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2808 to check if a symbol should be bound symbolically.
2810 2015-01-13 Jiong Wang <jiong.wang@arm.com>
2812 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2813 for TLSLE_MOVW_TPREL_G2.
2815 2015-01-13 Jiong Wang <jiong.wang@arm.com>
2818 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2819 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2820 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2823 2015-01-12 Terry Guo <terry.guo@arm.com>
2825 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2827 (_bfd_elf_gc_mark_extra_sections): Use it.
2829 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
2832 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2833 only discard space for pc-relative relocs symbols which turn
2834 out to need copy relocs.
2836 2015-01-09 Nick Clifton <nickc@redhat.com>
2838 * tekhex.c (getvalue): Fix thinko in test for correct extraction
2840 (getsym): Return false if there was not enough data to extract the
2843 2015-01-09 Anthony Green <green@moxielogic.com>
2845 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2847 2015-01-08 Nick Clifton <nickc@redhat.com>
2849 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2850 16-bit absolute BR instructions to 10-bit pc-relative JMP
2853 2015-01-08 Nick Clifton <nickc@redhat.com>
2856 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
2857 to load the line table.
2858 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2860 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2861 the Data Directory Size is too large.
2863 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
2866 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2867 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2869 2015-01-06 Nick Clifton <nickc@redhat.com>
2872 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2875 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2876 (bfd_perform_relocation): Include the size of the reloc in the
2877 test for an out of range relocation.
2878 (bfd_generic_get_relocated_section_contents): Remove reloc range
2881 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2882 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2883 avoid reading off the end of the buffer.
2885 (first_phase): Likewise.
2886 (pass_over): Pass an end pointer to the invoked function.
2888 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2891 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2893 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2895 2015-01-05 Nick Clifton <nickc@redhat.com>
2898 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2899 is at least big enough for the header to be read.
2900 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2901 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2902 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2903 unrecognized commands.
2904 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2905 when indexing into the string table.
2907 2015-01-01 Alan Modra <amodra@gmail.com>
2909 Update year range in copyright notice of all files.
2911 For older changes see ChangeLog-2014
2913 Copyright (C) 2015 Free Software Foundation, Inc.
2915 Copying and distribution of this file, with or without modification,
2916 are permitted in any medium without royalty provided the copyright
2917 notice and this notice are preserved.
2923 version-control: never