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