Add support for Nuxi CloudABI on x86-64
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2015-03-31 Ed Schouten <ed@nuxi.nl>
2
3 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
4 for x86_64-*-cloudabi*.
5 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
6 * configure: Regenerated.
7 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
8 (TARGET_LITTLE_NAME): Likewise.
9 (ELF_OSABI): Likewise.
10 (elf64_bed): Likewise.
11 * targets.c (x86_64_elf64_cloudabi_vec): New.
12 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
13
14 2015-03-31 H.J. Lu <hongjiu.lu@intel.com>
15
16 * configure.ac: Revert the AM_ZLIB change.
17 * Makefile.in: Regenerated.
18 * aclocal.m4: Likewise.
19 * configure: Likewise.
20 * doc/Makefile.in: Likewise.
21
22 2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
23
24 PR ld/18169
25 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
26 (_bfd_elf_get_reloc_section): New.
27 * elf.c (_bfd_elf_get_reloc_section): Likewise.
28 (assign_section_numbers): Call get_reloc_section to look up the
29 section the relocs apply.
30 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
31 (elfNN_bed): Initialize get_reloc_section with
32 elf_backend_get_reloc_section.
33
34 2015-03-29 H.J. Lu <hongjiu.lu@intel.com>
35
36 * Makefile.am (ZLIB): New.
37 (ZLIBINC): Likewise.
38 (AM_CFLAGS): Add $(ZLIBINC).
39 (libbfd_la_LIBADD): Add $(ZLIB).
40 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
41 (decompress_contents): Don't check HAVE_ZLIB_H.
42 (bfd_compress_section_contents): Likewise.
43 (bfd_get_full_section_contents): Likewise.
44 (bfd_init_section_decompress_status): Likewise.
45 (bfd_init_section_compress_status): Likewise.
46 * configure.ac (AM_ZLIB): Removed.
47 (zlibdir): New. AC_SUBST.
48 (zlibinc): Likewise.
49 Add --with-system-zlib.
50 * Makefile.in: Regenerated.
51 * acinclude.m4: Likewise.
52 * config.in: Likewise.
53 * configure: Likewise.
54 * doc/Makefile.in: Likewise.
55
56 2015-03-27 Alan Modra <amodra@gmail.com>
57
58 PR ld/15228
59 PR ld/18167
60 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
61 protected_def when symbol section is read-only. Adjust all calls.
62 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
63
64 2015-03-26 Tejas Belagod <tejas.belagod@arm.com>
65
66 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
67 _bfd_final_link_relocate with aarch64_relocate.
68
69 2015-03-26 H.J. Lu <hongjiu.lu@intel.com>
70
71 PR ld/18160
72 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
73 (bfd_elf_gc_sections): Likewise.
74
75 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
76
77 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
78 size for initial branch.
79 (elfNN_aarch64_build_stubs): Write initial branch.
80 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
81 mapping symbol on initial branch.
82
83 2015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
84
85 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
86 Update erratum count.
87
88 2015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
89
90 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
91 first matching debug section.
92
93 2015-03-24 H.J. Lu <hongjiu.lu@intel.com>
94
95 PR gas/18087
96 * compress.c (bfd_compress_section_contents): Don't write the
97 zlib header and set contents as well as compress_status if
98 compression didn't make the section smaller.
99 (bfd_init_section_compress_status): Don't check compression
100 size here.
101
102 2015-03-24 Nick Clifton <nickc@redhat.com>
103
104 PR binutils/17512
105 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
106 range auxillary sections.
107
108 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
109
110 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
111 code into:
112 (_bfd_aarch64_get_stub_for_link_section): Define.
113
114 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
115
116 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
117 update of section_group[].stub_sec.
118
119 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
120
121 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
122 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
123 Delete fixes, fix_table_size and associated code. Call
124 _bfd_aarch64_add_stub_entry_in_group. Rename to...
125 (bfd_aarch64_erratum_835769_scan): Define.
126 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
127 erratum_835769_fix_table_size, i and associated code. Relocate
128 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
129 correction. Delete construction of stub entry from
130 erratum_835769_fixes array.
131
132 2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
133
134 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
135 _bfd_aarch64_add_stub_entry_in_group.
136
137 2015-03-24 Alan Modra <amodra@gmail.com>
138
139 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
140 stubs, even those for undefined weak symbols. Otherwise, don't
141 report relocation overflow on branches to undefined strong
142 symbols. Fix memory leak.
143 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
144 overflow on branches to undefined strong symbols.
145
146 2015-03-23 Keith Seitz <keiths@redhat.com>
147
148 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
149 missing ';'.
150
151 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
152
153 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
154 construction into...
155 (_bfd_aarch64_erratum_835769_stub_name): Define.
156
157 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
158
159 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
160 stub resize code into...
161 (bfd_aarch64_resize_stubs): Define.
162
163 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
164
165 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
166 creation code into...
167 (bfd_aarch64_create_stub_section): Define.
168
169 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
170
171 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
172 from elf_aarch64_create_or_find_stub_sec.
173 (_bfd_aarch64_add_stub_entry_in_group): Rename from
174 elfNN_aarch64_add_stub. Call
175 _bfd_aarch64_create_or_find_stub_sec.
176 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
177 _bfd_aarch64_add_stub_entry_in_group.
178
179 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
180
181 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
182 sense of boolean return.
183 (elfNN_aarch64_size_stubs): Adjust for above.
184
185 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
186
187 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
188 Remove unused parameter.
189 (elfNN_aarch64_size_stubs): Adjust for above.
190
191 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
192
193 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
194
195 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
196
197 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
198 (num_aarch64_erratum_835769_fixes): Remove.
199 (elfNN_aarch64_size_stubs): Remove assignments to above.
200
201 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
202
203 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
204 to rt2.
205 (aarch64_erratum_seqeunce): Rename rtn to rt2.
206
207 2015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
208
209 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
210
211 2015-03-19 Nick Clifton <nickc@redhat.com>
212
213 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
214 the RL78 core based upon the flags.
215 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
216 flags.
217 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
218 (elf32_rl78_machine): Always return bfd_mach_rl78.
219
220 2015-03-19 Nick Clifton <nickc@redhat.com>
221
222 PR 18078
223 * compress.c (bfd_compress_section_contents): Do not define this
224 function if it is not used.
225
226 2015-03-18 H.J. Lu <hongjiu.lu@intel.com>
227
228 * compress.c (bfd_compress_section_contents): Make it static.
229 * bfd/bfd-in2.h: Regenerated.
230
231 2015-03-18 Eric Youngdale <eyoungdale@ptc.com>
232
233 PR ld/16598
234 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
235 suitable for the AMD64.
236
237 2015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
238 Nick Clifton <nickc@redhat.com>
239
240 PR binutils/18087
241 * coffgen.c (make_a_section_from_file): Only prepend a z to a
242 debug section's name if the section was actually compressed.
243 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
244 * compress.c (bfd_init_section_compress_status): Do not compress
245 the section if doing so would make it bigger. In such cases leave
246 the section alone and return COMPRESS_SECTION_NONE.
247
248 2015-03-17 Alan Modra <amodra@gmail.com>
249
250 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
251 on nothing to do, before malloc of returned symbol array.
252
253 2015-03-16 Nick Clifton <nickc@redhat.com>
254
255 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
256 stored in the elf_section_data structure then load them as
257 necessary.
258
259 2015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
260
261 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
262 relocs against code sections.
263 * elf32-s390.c: Define elf_backend_sort_relocs_p.
264 * elf64-s390.c: Likewise.
265
266 2015-03-11 Alan Modra <amodra@gmail.com>
267
268 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
269 reverse order. Account for larger size of __tls_get_addr_opt stub.
270
271 2015-03-10 Yuri Gribov <y.gribov@samsung.arm>
272
273 PR ld/16572
274 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
275 ELF_ARM_HASENTRY.
276 (elf32_arm_print_private_bfd_data): Likewise.
277
278 2015-03-06 Nick Clifton <nickc@redhat.com>
279
280 PR binutils/17765
281 * elflink.c (put_value): Like previous delta, but for the 32-bit
282 case.
283
284 2015-03-05 Nick Clifton <nickc@redhat.com>
285
286 PR binutils/17765
287 * elflink.c (put_value): Avoid using an undefined shift
288 operation.
289
290 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
291
292 PR ld/pr15228
293 PR ld/pr17709
294 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
295 * elf32-i386.c (elf_backend_extern_protected_data): New.
296 Defined to 1.
297 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
298 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
299 copy relocs against protected symbols if extern_protected_data
300 is true.
301 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
302 non-function symbols if extern_protected_data is true.
303 * elfxx-target.h (elf_backend_extern_protected_data): New.
304 Default to 0.
305 (elfNN_bed): Initialize extern_protected_data with
306 elf_backend_extern_protected_data.
307
308 2015-03-05 Nick Clifton <nickc@redhat.com>
309
310 PR binutils/18025
311 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
312 lookup fails, check for an address bias in the dwarf info, and if
313 one exists, retry the lookup with the biased value.
314 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
315 Determines if a bias exists bewteen the addresses of functions
316 based on DWARF information vs symbol table information.
317 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
318 * libbfd.h: Regenerate.
319
320 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
321
322 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
323 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
324 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
325
326 2015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
327
328 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
329 (aarch64_size_one_stub): Likewise.
330 (aarch64_map_one_stub): Likewise.
331
332 2015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
333
334 * cpu-s390.c (N): New macro.
335 (bfd_s390_31_arch): New. Define only if default target word size
336 is 64 bits. Otherwise define...
337 (bfd_390_64_arch): ...this. Make static.
338 (bfd_s390_arch): Define according to the default target word size.
339 Let the 'next' field point to the alternate arch.
340
341 2015-03-04 Richard Sandiford <richard.sandiford@arm.com>
342
343 PR gas/17843
344 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
345 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
346 to be used with MOVK rather than MOVZ.
347
348 2015-03-03 DJ Delorie <dj@redhat.com>
349
350 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
351 there's a symbol.
352
353 2015-02-28 Alan Modra <amodra@gmail.com>
354
355 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
356 not PLT_NEW.
357
358 2015-02-27 H.J. Lu <hongjiu.lu@intel.com>
359
360 * elf32-i386.c (need_convert_mov_to_lea): New.
361 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
362 (elf_i386_convert_mov_to_lea): Return TRUE if
363 need_convert_mov_to_lea is unset.
364 * elf64-x86-64.c (need_convert_mov_to_lea): New.
365 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
366 (elf_x86_64_convert_mov_to_lea): Return TRUE if
367 need_convert_mov_to_lea is unset.
368
369 2015-02-27 Nick Clifton <nickc@redhat.com>
370
371 PR binutils/17910
372 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
373 string length overflow when the string table length is actually
374 set.
375
376 2015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
377
378 * bfd/bfd-in2.h: Regenerate.
379 * bfd/libbfd.h: Regenerate.
380
381 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
382
383 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
384 TLSDESC_LD_PREL19 field width and masks.
385 (aarch64_tls_transition_without_check)
386 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
387 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
388 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
389 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
390 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
391 (_bfd_aarch64_elf_resolve_relocation): Likewise.
392
393 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
394
395 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
396 tests.
397 (aarch64_tls_transition_without_check)
398 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
399 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
400 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
401 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
402 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
403 (_bfd_aarch64_elf_resolve_relocation): Likewise.
404 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
405
406 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
407
408 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
409 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
410 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
411 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
412 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
413 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
414 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
415 (_bfd_aarch64_elf_resolve_relocation): Likewise.
416 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
417
418 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
419
420 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
421 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
422 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
423 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
424 (elfNN_aarch64_check_relocs): Handle
425 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
426
427 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
428 (_bfd_aarch64_elf_resolve_relocation): Likewise.
429
430 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
431
432 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
433
434 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
435
436 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
437 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
438 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
439 width.
440
441 2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
442
443 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
444 field width.
445
446 2015-02-26 Nick Clifton <nickc@redhat.com>
447
448 PR binutils/17512
449 * coffcode.h (coff_compute_section_file_positions): Report
450 negative page sizes.
451 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
452 (assign_file_positions_for_non_load_sections): Replace assertion
453 with an error message.
454 (rewrite_elf_program_header): Handle excessive segment
455 alignments.
456 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
457 (bfd_mach_o_read_section_64): Likewise.
458 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
459 print a bfd name, not %A.
460
461 2015-02-26 Alan Modra <amodra@gmail.com>
462
463 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
464 thread-safe stubs for iplt.
465 (build_tls_get_addr_stub): Restore r2 immediately after call.
466
467 2015-02-26 Terry Guo <terry.guo@arm.com>
468
469 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
470 merge Tag_ABI_HardFP_use.
471
472 2015-02-26 Alan Modra <amodra@gmail.com>
473
474 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
475 Use text relocs rather than giving an error on trying to use
476 .dynbss for protected shared lib vars.
477 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
478
479 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
480
481 * elf32-avr.c (struct elf_avr_section_data): New structure.
482 (struct avr_relax_info): New structure.
483 (elf_avr_new_section_hook): New function.
484 (struct elf_avr_section_data): Add relax_info.
485 (get_avr_relax_info): New function.
486 (init_avr_relax_info): New function.
487 (elf32_avr_relax_delete_bytes): Find next property record before
488 deleting bytes. When deleting don't move bytes beyond the next
489 property record.
490 (avr_elf32_assign_records_to_section): New function.
491 (avr_property_record_compare): New function.
492 (avr_load_all_property_sections): New function.
493 (elf32_avr_relax_section): Load property data. After relaxing the
494 section, move any .align directives that have enough deleted bytes
495 before them.
496 (bfd_elf32_new_section_hook): Define.
497
498 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
499
500 * elf32-avr.h (struct avr_property_header): New strucure.
501 (avr_elf32_load_property_records): Declare.
502 (avr_elf32_property_record_name): Declare.
503 * elf32-avr.c: Add bfd_stdint.h include.
504 (retrieve_local_syms): New function.
505 (get_elf_r_symndx_section): New function.
506 (get_elf_r_symndx_offset): New function.
507 (internal_reloc_compare): New function.
508 (struct avr_find_section_data): New structure.
509 (avr_is_section_for_address): New function.
510 (avr_find_section_for_address): New function.
511 (avr_elf32_load_records_from_section): New function.
512 (avr_elf32_load_property_records): New function.
513 (avr_elf32_property_record_name): New function.
514
515 2015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
516
517 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
518 (AVR_PROPERTY_RECORDS_VERSION): Define.
519 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
520 (struct avr_property_record): New structure.
521
522 2015-02-24 Nick Clifton <nickc@redhat.com>
523
524 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
525 style note entry.
526 (v850_elf_make_note_section): New function. Creates a note
527 section.
528 (v850_elf_create_sections): New function. Create a note section
529 if one is not already present.
530 (v850_elf_set_note): New function. Adds a note to a bfd.
531 (v850_elf_copy_private_bfd_data): New function. Copies V850
532 notes.
533 (v850_elf_merge_notes): New function. Merges V850 notes.
534 (print_v850_note): New function. Displays a V850 note.
535 (v850_elf_print_notes): New function. Displays all notes attached
536 to a bfd.
537 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
538 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
539 (v850_elf_fake_sections): Set the type of the V850 note section.
540 * bfd-in.h (v850_elf_create_sections): Add prototype.
541 (v850_elf_set_note): Add prototype.
542 * bfd-in2.h: Regenerate.
543
544 2015-02-24 Nick Clifton <nickc@redhat.com>
545
546 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
547 * configure: Regenerate.
548 * config.in: Regenerate.
549 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
550 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
551 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
552 is defined.
553
554 2015-02-24 Nick Clifton <nickc@redhat.com>
555
556 * pdp11.c (set_section_contents): Pad the .text and .data sections
557 to their aligned sizes.
558
559 2015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
560
561 * config.bfd: Add h8300-*-linux.
562 * configure.ac: Add h8300_elf32_linux_vec.
563 * configure: Regenerate.
564 * elf32-h8300.c: Likewise.
565 * targets.c(_bfd_target_vector): Likewise.
566
567 2015-02-23 Nick Clifton <nickc@redhat.com>
568
569 PR 17914
570 * cpu-w65.c: Correct typos in license notice.
571
572 PR 17940
573 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
574 symbols at end of sections. Adjust function sizes.
575
576 2015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
577
578 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
579 (elfcore_write_s390_vxrs_high): Likewise.
580 * elf.c (elfcore_grok_s390_vxrs_low): New function.
581 (elfcore_grok_s390_vxrs_high): New function.
582 (elfcore_grok_note): Call them.
583 (elfcore_write_s390_vxrs_low): New function.
584 (elfcore_write_s390_vxrs_high): New function.
585 (elfcore_write_register_note): Call them.
586
587 2015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
588
589 PR 17995
590 * verilog.c (verilog_write_record): Correct buffer size.
591
592 2015-02-19 Alan Modra <amodra@gmail.com>
593
594 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
595
596 2015-02-19 Alan Modra <amodra@gmail.com>
597
598 PR ld/4317
599 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
600 (elf_link_output_extsym): Drop local and global undefined syms.
601 Tidy. Expand comment.
602
603 2015-02-17 Alan Modra <amodra@gmail.com>
604
605 PR ld/17975
606 * elflink.c (struct elf_outext_info): Remove need_second_pass
607 and second_pass.
608 (elf_link_output_extsym): Delete code handling second forced
609 local pass. Move code emitting NULL STT_FILE symbol later, so
610 that it can be omitted if forced local is stripped. Don't
611 emit the NULL STT_FILE if no file symbols have been output.
612 (bfd_elf_final_link): Remove second forced local pass.
613 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
614 (ppc_elf_size_dynamic_sections): Likewise.
615 * elf64-ppc.c (ppc_build_one_stub): Likewise.
616 (build_global_entry_stubs): Likewise.
617 (ppc64_elf_build_stubs): Likewise.
618
619 2015-02-16 H.J. Lu <hongjiu.lu@intel.com>
620
621 PR ld/17975
622 * elflink.c (elf_link_output_extsym): Only check filesym_count
623 when outputting a NULL FILE symbol. Set second_pass_sym to
624 h->forced_local && !h->root.linker_def.
625
626 2015-02-15 H.J. Lu <hongjiu.lu@intel.com>
627
628 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
629 on _TLS_MODULE_BASE_.
630 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
631
632 2015-02-15 Alan Modra <amodra@gmail.com>
633
634 * dwarf2.c (read_rangelist): Correct buffer overflow check
635 Whitespace throughout file.
636
637 2015-02-14 Alan Modra <amodra@gmail.com>
638
639 PR ld/17973
640 * bfd.c (struct bfd): Add lto_output.
641 * linker.c (_bfd_handle_already_linked): Explicitly test for
642 objects added by the lto plugin.
643 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
644 no_export flags from archive.
645 * archive.c (open_nested_file): New function, setting lto_output
646 and no_export, extracted from..
647 (find_nested_archive): ..here. Flip params. Rename from
648 _bfd_find_nested_archive.
649 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
650 (_bfd_look_for_bfd_in_cache): Copy no_export.
651 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
652 my_archive->no_export test.
653 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
654 Don't use the file name when adding lto_output STT_FILE sym.
655 * bfd-in2.h: Regenerate.
656
657 2015-02-13 Alan Modra <amodra@gmail.com>
658
659 PR binutils/17512
660 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
661 now redundant assert.
662
663 2015-02-12 Nick Clifton <nickc@redhat.com>
664
665 PR binutils/17512
666 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
667 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
668 (read_indirect_string, read_alt_indirect_string)
669 (read_alt_indirect_ref, read_address, read_abbrevs)
670 (read_attribute_value, read_attribute, decode_line_info)
671 (find_abstract_instance_name, read_rangelist)
672 (scan_unit_for_symbols, parse_comp_unit)
673 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
674 end pointers to reading functions and check for offsets taking
675 pointers out of range. Replace calls to read_*_leb128 with calls
676 to safe_read_leb128.
677
678 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
679 offset.
680 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
681 computed file_name address being before the start of the string
682 table.
683
684 2015-02-11 H.J. Lu <hongjiu.lu@intel.com>
685
686 PR ld/17878
687 * bfd.c (bfd_plugin_format): New.
688 (bfd): Add plugin_format and plugin_dummy_bfd.
689 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
690 argument to return TRUE if any plugin is found. Set plugin_format.
691 (has_plugin): New.
692 (bfd_plugin_target_p): New.
693 (bfd_plugin_specified_p): Likewise.
694 (bfd_plugin_target_p): Likewise.
695 (register_ld_plugin_object_p): Likewise.
696 (bfd_plugin_set_plugin): Set has_plugin.
697 (load_plugin): Cache try_load_plugin result.
698 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
699 plugin_format.
700 * plugin.h (bfd_plugin_target_p): New.
701 (bfd_plugin_specified_p): Likewise.
702 (register_ld_plugin_object_p): Likewise.
703 * bfd-in2.h: Regenerated.
704
705 2015-02-11 Pedro Alves <palves@redhat.com>
706
707 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
708 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
709 * libbfd.h: Regenerate.
710 * libcoff.h: Regenerate.
711
712 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
713 * mach-o.h [__cplusplus]: Wrap in extern "C".
714 * som.h [__cplusplus]: Wrap in extern "C".
715
716 2015-02-10 Nick Clifton <nickc@redhat.com>
717
718 PR binutils/17512
719 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
720 hold the flag bits.
721 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
722 size and number of relocs.
723 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
724 codeview record.
725 * versados.c (process_otr): Check the esdid value before using it
726 to access the EDATA.
727
728 2015-02-09 Ed Maste <emaste@freebsd.org>
729
730 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
731 uninitialized and unused variable.
732 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
733
734 2015-02-09 Alan Modra <amodra@gmail.com>
735
736 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
737 tls_sec.
738 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
739 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
740
741 2015-02-09 Alan Modra <amodra@gmail.com>
742
743 * elflink.c: Whitespace, formatting fixes.
744 (elf_link_input_bfd): Clarify comment.
745 (elf_link_output_extsym): Exclude symbols in linker created
746 sections when testing for plugin symbols.
747
748 2015-02-07 H.J. Lu <hongjiu.lu@intel.com>
749
750 PR ld/17935
751 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
752 warning for relocation in readonly section for -z text.
753 (elf_i386_size_dynamic_sections): Likewise.
754 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
755 (elf_x86_64_size_dynamic_sections): Likewise.
756
757 2015-02-06 H.J. Lu <hongjiu.lu@intel.com>
758
759 PR ld/12365
760 PR ld/14272
761 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
762 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
763 referenced from a non-IR file.
764
765 2015-02-06 Nick Clifton <nickc@redhat.com>
766
767 PR binutils/17512
768 * peXXigen.c (rsrc_print_resource_entries): Add range check for
769 addresses that wrap around the address space.
770 (rsrc_parse_entry): Likewise.
771
772 2015-02-03 H.J. Lu <hongjiu.lu@intel.com>
773
774 PR ld/12365
775 PR ld/14272
776 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
777 undefined if it is referenced from a non-IR file.
778
779 2015-02-03 Nick Clifton <nickc@redhat.com>
780
781 PR binutils/17512
782 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
783 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
784 index or an out of range fdr index.
785 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
786 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
787 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
788 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
789 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
790 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
791 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
792 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
793 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
794 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
795 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
796 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
797 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
798 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
799 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
800 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
801 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
802 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
803 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
804 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
805 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
806 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
807 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
808 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
809 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
810 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
811 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
812 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
813 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
814 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
815 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
816 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
817 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
818 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
819 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
820 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
821 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
822 * elf32-vax.c (rtype_to_howto): Likewise.
823 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
824 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
825 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
826 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
827 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
828 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
829 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
830 of range symbol indicies.
831 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
832 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
833 (bfd_mach_o_build_dysymtab): Likewise.
834 (bfd_mach_o_write_symtab_content): Set the string table size to
835 zero upon error.
836 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
837 read fails.
838 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
839 fields.
840 * tekhex.c (first_phase): Check for src pointer reaching end of
841 buffer.
842
843 2015-02-03 Will Newton <will.newton@linaro.org>
844
845 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
846 Set st_value to zero for undefined symbols if the reference
847 is weak or pointer_equality_needed is FALSE.
848
849 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
850 comment discussing why we clear st_value for some symbols.
851
852 2015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
853
854 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
855 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
856
857 2015-01-29 Alan Modra <amodra@gmail.com>
858
859 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
860 optimization. Tidy mask for GOT_TLSGD optimization.
861 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
862 location of nop zapping high insn too.
863
864 2015-01-28 Alan Modra <amodra@gmail.com>
865
866 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
867 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
868 in .toc indicate xlc compiled code that might require a rw .toc.
869
870 2015-01-28 James Bowman <james.bowman@ftdichip.com>
871
872 * Makefile.am: Add FT32 files.
873 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
874 (bfd_mach_ft32): Define.
875 (bfd_ft32_arch): Declare.
876 (bfd_archures_list): Add bfd_ft32_arch.
877 * config.bfd: Handle FT32.
878 * configure.ac: Likewise.
879 * cpu-ft32.c: New file.
880 * elf32-ft32.c: New file.
881 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
882 BFD_RELOC_FT32_18): Define.
883 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
884 * bfd-in2.h: Regenerate.
885 * libbfd.h: Regenerate.
886 * Makefile.in: Regenerate.
887 * configure: Regenerate.
888 * po/SRC-POTFILES.in: Regenerate.
889
890 2015-01-27 Nick Clifton <nickc@redhat.com>
891
892 PR binutils/17512
893 * pdp11.c (aout_get_external_symbols): Return false if there are
894 no symbols.
895
896 * dwarf2.c (concat_filename): Check for an empty directory table.
897 (scan_unit_for_symbols): Check for reading off the end of the
898 unit.
899 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
900 non-string form.
901 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
902 available.
903
904 2015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
905
906 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
907
908 2015-01-22 DJ Delorie <dj@redhat.com>
909
910 * elf32-m32c.c (m32c_apply_reloc_24): New.
911 (m32c_elf_howto_table): Use it for R_M32C_24.
912 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
913
914 2015-01-22 Nick Clifton <nickc@redhat.com>
915
916 PR binutils/17512
917 * coffcode.h (handle_COMDAT): When searching for the section
918 symbol, make sure that there is space left in the symbol table.
919 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
920
921 2015-01-21 Nick Clifton <nickc@redhat.com>
922
923 PR binutils/17512
924 * coffcode.h (coff_set_arch_mach_hook): Check return value from
925 bfd_malloc.
926 (coff_slurp_line_table): Return FALSE if the line number
927 information was corrupt.
928 (coff_slurp_symbol_table): Return FALSE if the symbol information
929 was corrupt.
930 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
931 initialise the fields of the dyld_info structure.
932 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
933 error message and a return value.
934 (bfd_mach_o_layout_commands): Change the function to boolean.
935 Return FALSE if the function fails.
936 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
937 fails.
938 (bfd_mach_o_read_command): Fail if an unrecognised command is
939 encountered.
940 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
941 read fails.
942 (slurp_symtab): Check the return from bfd_malloc.
943 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
944 encountered an error.
945 (_bfd_XXi_final_link_postscript): Fail if a section could not be
946 copied.
947 * peicode.h (pe_bfd_object_p): Fail if the header could not be
948 swapped in.
949 * tekhex.c (first_phase): Fail if the section is too big.
950 * versados.c (struct esdid): Add content_size field.
951 (process_otr): Use and check the new field.
952 (versados_get_section_contents): Check that the section exists and
953 that the requested data is available.
954
955 2015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
956
957 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
958
959 2015-01-20 Alan Modra <amodra@gmail.com>
960
961 PR ld/17615
962 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
963 ELF_COMMON_DEF syms.
964
965 2015-01-19 Alan Modra <amodra@gmail.com>
966
967 PR ld/17615
968 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
969 linker script assignments too.
970 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
971 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
972
973 2015-01-19 Alan Modra <amodra@gmail.com>
974
975 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
976 to allow return of first howto.
977 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
978 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
979 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
980 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
981 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
982 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
983 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
984 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
985 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
986 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
987 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
988 (spu_elf_reloc_type_lookup): Adjust to suit.
989
990 2015-01-19 Alan Modra <amodra@gmail.com>
991
992 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
993 (bfd_get_section_limit): ..here.
994 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
995 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
996 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
997 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
998 bfd_reloc_outofrange check.
999 * bfd-in2.h: Regenerate.
1000
1001 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
1002 on zero size relocs.
1003 * ecoff.c (ecoff_reloc_link_order): Likewise.
1004 * elf32-nds32.c (nds32_relocate_contents): Likewise.
1005 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1006
1007 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
1008 (_bfd_clear_contents): Likewise.
1009 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
1010 (mips_elf_perform_relocation): Likewise.
1011
1012 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
1013 from malloc on zero size alloc.
1014 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1015 * elflink.c (elf_reloc_link_order): Likewise.
1016 * linker.c (_bfd_generic_reloc_link_order): Likewise.
1017 * pdp11.c (aout_link_reloc_link_order): Likewise.
1018 * xcofflink.c (xcoff_reloc_link_order): Likewise.
1019
1020 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
1021 bitsize 0, and complain_overflow_dont.
1022 * coff-sparc.c (coff_sparc_howto_table): Likewise.
1023 * elf-hppa.h (elf_hppa_howto_table): Likewise.
1024 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
1025 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
1026 * elf32-arc.c (elf_arc_howto_table): Likewise.
1027 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
1028 * elf32-avr.c (elf_avr_howto_table): Likewise.
1029 * elf32-bfin.c (bfin_howto_table): Likewise.
1030 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
1031 * elf32-cris.c (cris_elf_howto_table): Likewise.
1032 * elf32-crx.c (crx_elf_howto_table): Likewise.
1033 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
1034 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
1035 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
1036 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
1037 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
1038 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1039 * elf32-h8300.c (h8_elf_howto_table): Likewise.
1040 * elf32-i370.c (i370_elf_howto_raw): Likewise.
1041 * elf32-i386.c (elf_howto_table): Likewise.
1042 * elf32-i860.c (elf32_i860_howto_table): Likewise.
1043 * elf32-i960.c (elf32_i960_relocate): Likewise.
1044 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
1045 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
1046 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
1047 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
1048 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
1049 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
1050 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
1051 * elf32-m68k.c (howto_table): Likewise.
1052 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
1053 * elf32-mep.c (mep_elf_howto_table): Likewise.
1054 * elf32-metag.c (elf_metag_howto_table): Likewise.
1055 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
1056 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
1057 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
1058 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
1059 * elf32-mt.c (mt_elf_howto_table): Likewise.
1060 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
1061 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
1062 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
1063 * elf32-pj.c (pj_elf_howto_table): Likewise.
1064 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
1065 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
1066 * elf32-rx.c (rx_elf_howto_table): Likewise.
1067 * elf32-s390.c (elf_howto_table): Likewise.
1068 * elf32-score.c (elf32_score_howto_table): Likewise.
1069 * elf32-score7.c (elf32_score_howto_table): Likewise.
1070 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
1071 * elf32-spu.c (elf_howto_table): Likewise.
1072 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
1073 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
1074 * elf32-v850.c (v850_elf_howto_table): Likewise.
1075 * elf32-vax.c (howto_table): Likewise.
1076 * elf32-visium.c (visium_elf_howto_table): Likewise.
1077 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
1078 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
1079 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
1080 * elf32-xtensa.c (elf_howto_table): Likewise.
1081 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
1082 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
1083 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
1084 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
1085 * elf64-s390.c (elf_howto_table): Likewise.
1086 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
1087 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
1088 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
1089 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1090 (elfNN_aarch64_howto_none): Likewise.
1091 * elfxx-ia64.c (ia64_howto_table): Likewise.
1092 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
1093 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
1094 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
1095
1096 2015-01-15 H.J. Lu <hongjiu.lu@intel.com>
1097
1098 PR ld/17847
1099 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
1100 about -fPIC if the symbol is undefined when building executable.
1101
1102 2015-01-15 Nick Clifton <nickc@redhat.com>
1103
1104 PR binutils/17512
1105 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
1106 error message. Never return an invalid howto pointer.
1107 * elf32-cr16.c (cr16_info_to_howto): Likewise.
1108 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1109 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1110 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1111 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1112 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
1113 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1114 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1115 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1116 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
1117 * elf32-vax.c (rtype_to_howto): Likewise.
1118 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1119 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1120 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
1121 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1122 (sh_elf_reloc): Check that the reloc is in range.
1123 * reloc.c (bfd_perform_relocation): Check that the section is big
1124 enough for the entire reloc.
1125 (bfd_generic_get_relocated_section_contents): Report unexpected
1126 return values from perform_reloc.
1127
1128 2015-01-15 Nick Clifton <nickc@redhat.com>
1129
1130 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
1131 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
1132 relaxation.
1133
1134 2015-01-15 Alan Modra <amodra@gmail.com>
1135
1136 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
1137 any output section matching a linker created dynobj section.
1138
1139 2015-01-15 Alan Modra <amodra@gmail.com>
1140
1141 PR 17842
1142 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
1143 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
1144 Don't assign symtab file position unless symbols will be output.
1145 Merge blocks with condition in common. Don't call
1146 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
1147 unless other symbols are output. Move assignment of symtab_shndx
1148 file position. Localize variable.
1149
1150 2015-01-14 Jiong Wang <jiong.wang@arm.com>
1151
1152 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
1153 trying to defer them to runtime.
1154
1155 2015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1156
1157 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
1158 to check if a symbol should be bound symbolically.
1159
1160 2015-01-13 Jiong Wang <jiong.wang@arm.com>
1161
1162 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
1163 for TLSLE_MOVW_TPREL_G2.
1164
1165 2015-01-13 Jiong Wang <jiong.wang@arm.com>
1166
1167 PR ld/17415
1168 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
1169 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
1170 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
1171 bit mask.
1172
1173 2015-01-12 Terry Guo <terry.guo@arm.com>
1174
1175 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
1176 function.
1177 (_bfd_elf_gc_mark_extra_sections): Use it.
1178
1179 2015-01-11 H.J. Lu <hongjiu.lu@intel.com>
1180
1181 PR ld/17827
1182 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
1183 only discard space for pc-relative relocs symbols which turn
1184 out to need copy relocs.
1185
1186 2015-01-09 Nick Clifton <nickc@redhat.com>
1187
1188 * tekhex.c (getvalue): Fix thinko in test for correct extraction
1189 of value.
1190 (getsym): Return false if there was not enough data to extract the
1191 symbol.
1192
1193 2015-01-09 Anthony Green <green@moxielogic.com>
1194
1195 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
1196
1197 2015-01-08 Nick Clifton <nickc@redhat.com>
1198
1199 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
1200 16-bit absolute BR instructions to 10-bit pc-relative JMP
1201 instructions.
1202
1203 2015-01-08 Nick Clifton <nickc@redhat.com>
1204
1205 PR binutils/17512
1206 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
1207 to load the line table.
1208 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
1209 maxpagesize of 1.
1210 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
1211 the Data Directory Size is too large.
1212
1213 2015-01-06 H.J. Lu <hongjiu.lu@intel.com>
1214
1215 PR binutils/17512
1216 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
1217 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1218
1219 2015-01-06 Nick Clifton <nickc@redhat.com>
1220
1221 PR binutils/17512
1222 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
1223 string table.
1224
1225 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
1226 (bfd_perform_relocation): Include the size of the reloc in the
1227 test for an out of range relocation.
1228 (bfd_generic_get_relocated_section_contents): Remove reloc range
1229 test.
1230
1231 * coff-i860.c (CALC_ADDEND): Always set an addend value.
1232 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
1233 avoid reading off the end of the buffer.
1234 (getsym): Likewise.
1235 (first_phase): Likewise.
1236 (pass_over): Pass an end pointer to the invoked function.
1237
1238 2015-01-05 H.J. Lu <hongjiu.lu@intel.com>
1239
1240 PR binutils/17512
1241 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
1242 input.
1243 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1244
1245 2015-01-05 Nick Clifton <nickc@redhat.com>
1246
1247 PR binutils/17512
1248 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
1249 is at least big enough for the header to be read.
1250 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
1251 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
1252 (bfd_mach_o_read_command): Prevetn duplicate error messages about
1253 unrecognized commands.
1254 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
1255 when indexing into the string table.
1256
1257 2015-01-01 Alan Modra <amodra@gmail.com>
1258
1259 Update year range in copyright notice of all files.
1260
1261 For older changes see ChangeLog-2014
1262 \f
1263 Copyright (C) 2015 Free Software Foundation, Inc.
1264
1265 Copying and distribution of this file, with or without modification,
1266 are permitted in any medium without royalty provided the copyright
1267 notice and this notice are preserved.
1268
1269 Local Variables:
1270 mode: change-log
1271 left-margin: 8
1272 fill-column: 74
1273 version-control: never
1274 End:
This page took 0.055296 seconds and 5 git commands to generate.