[arm] watchpoint-reuse-slot.exp: skip setting HW points on some address
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
030aeb75
L
12015-04-10 H.J. Lu <hongjiu.lu@intel.com>
2
3 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
4 and free with bfd_alloc and bfd_release on compressed buffer.
5 Release buffer if compressed section isn't smaller.
6
d07a1b05
AM
72015-04-10 Alan Modra <amodra@gmail.com>
8
9 PR ld/18222
10 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
11 on adding a protected visibility variable to .dynbss.
12
8d2ea2a8
AM
132015-04-10 Alan Modra <amodra@gmail.com>
14
15 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
16 PR ld/pr15228
17 PR ld/pr17709
18 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
19 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
20 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
21 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
22 extern_protected_data test.
23 (_bfd_elf_symbol_refs_local_p): Likewise.
24 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
25 (elfNN_bed): Delete elf_backend_extern_protected_data init.
26
18ece1de
L
272015-04-09 H.J. Lu <hongjiu.lu@intel.com>
28
29 * compress.c (bfd_compress_section_contents): Update comments.
30 (bfd_init_section_decompress_status): Likewise.
31 (bfd_init_section_compress_status): Likewise.
32
cd6faa73
L
332015-04-09 H.J. Lu <hongjiu.lu@intel.com>
34
35 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
36 object_flags.
37 (TARGET_LITTLE_SYM): Likewise.
38
19424843
MF
392015-04-09 Max Filippov <jcmvbkbc@gmail.com>
40
41 * elf32-xtensa.c (splay-tree.h): include header.
42 (text_action_struct): drop next pointer.
43 (text_action_list_struct): drop head pointer, add count and
44 tree fields.
45 (find_fill_action): instead of linear search in text_action_list
46 search in the tree.
47 (text_action_compare, action_first, action_next): new functions.
48 (text_action_add, text_action_add_literal): instead of linear
49 search and insertion insert new node into the tree.
50 (removed_by_actions): pass additional parameter: action_list,
51 use it to traverse the tree.
52 (offset_with_removed_text): pass additional action_list parameter
53 to removed_by_actions.
54 (map_action_fn_context): new typedef.
55 (map_action_fn_context_struct): new structure.
56 (map_action_fn): new function.
57 (map_removal_by_action): use splay_tree_foreach to build map.
58 (find_insn_action): replace linear search in text_action_list
59 with series of splay_tree_lookups.
60 (print_action, print_action_list_fn): new functions.
61 (print_action_list): use splay_tree_foreach.
62 (init_xtensa_relax_info): drop action_list.head initialization.
63 Initialize the tree.
64 (compute_text_actions): use non-zero action_list_count instead of
65 non-NULL action list.
66 (xlate_map_context): new typedef.
67 (xlate_map_context_struct): new structure.
68 (xlate_map_fn): new function.
69 (build_xlate_map): use splay_tree_foreach to build map.
70 (action_remove_bytes_fn): new function.
71 (relax_section): use zero action_list_count instead of NULL
72 action list. Use splay_tree_foreach to count final section size.
73 Drop unused variable 'removed'.
74
752015-04-09 Max Filippov <jcmvbkbc@gmail.com>
76
77 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
78 (removed_literal_map_entry_struct): new structure.
79 (removed_literal_list_struct): add new fields: n_map and map.
80 (map_removed_literal, removed_literal_compare): new functions.
81 (find_removed_literal): build index array for literals ordered
82 by VMA, use binary search to find removed literal.
83
842015-04-09 Max Filippov <jcmvbkbc@gmail.com>
85
86 * elf32-xtensa.c (removal_by_action_entry_struct,
87 removal_by_action_map_struct): new structures.
88 (removal_by_action_entry, removal_by_action_map): new typedefs.
89 (text_action_list_struct): add new field: map.
90 (map_removal_by_action, removed_by_actions_map,
91 offset_with_removed_text_map): new functions.
92 (relax_section): replace offset_with_removed_text with
93 offset_with_removed_text_map.
94 (translate_reloc, relax_property_section, relax_section_symbols):
95 replace removed_by_actions with removed_by_actions_map.
96
972015-04-09 Max Filippov <jcmvbkbc@gmail.com>
98
99 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
100 reloc_range): new typedef.
101 (reloc_range_list_struct, reloc_range_list_entry_struct,
102 reloc_range_struct): new structures.
103 (reloc_range_compare, build_reloc_ranges,
104 reloc_range_list_append, reloc_range_list_remove,
105 reloc_range_list_update_range, free_reloc_range_list): new
106 functions.
107 (compute_text_actions): precompute relocation opcodes before the
108 loop. Add relevant_relocs variable, initialize it before the
109 loop, pass it to the check_section_ebb_pcrels_fit.
110 (check_section_ebb_pcrels_fit): add new parameter:
111 relevant_relocs. Update address range in the relevant_relocs if
112 it's non-NULL and iterate only over relevant relocations.
113
3525236c
NC
1142015-04-09 Nick Clifton <nickc@redhat.com>
115
116 * elf32-rx.c (describe_flags): Report the settings of the string
117 insn using bits.
118 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
119 using bits.
120
51509926
L
1212015-04-08 H.J. Lu <hongjiu.lu@intel.com>
122
123 * compress.c (bfd_compress_section_contents): Work around a GCC
124 uninitialized warning bug fixed in GCC 4.7.
125
151411f8
L
1262015-04-08 H.J. Lu <hongjiu.lu@intel.com>
127
128 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
129 bit.
130 * bfd.c (bfd::flags): Increase size to 18 bits.
131 (BFD_COMPRESS_GABI): New.
132 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
133 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
134 (bfd_update_compression_header): New fuction.
135 (bfd_check_compression_header): Likewise.
136 (bfd_get_compression_header_size): Likewise.
137 (bfd_is_section_compressed_with_header): Likewise.
138 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
139 (bfd_compress_section_contents): Return the uncompressed size if
140 the full section contents is compressed successfully. Support
141 converting from/to .zdebug* sections.
142 (bfd_get_full_section_contents): Call
143 bfd_get_compression_header_size to get compression header size.
144 (bfd_is_section_compressed): Renamed to ...
145 (bfd_is_section_compressed_with_header): This. Add a pointer
146 argument to return compression header size.
147 (bfd_is_section_compressed): Use it.
148 (bfd_init_section_decompress_status): Call
149 bfd_get_compression_header_size to get compression header size.
150 Return FALSE if uncompressed section size is 0.
151 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
152 from/to .zdebug* sections.
153 * bfd-in2.h: Regenerated.
154
87070c08
AM
1552015-04-07 Alan Modra <amodra@gmail.com>
156
157 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
158 mapped to output .got section.
159
d3e454b9
AM
1602015-04-07 Alan Modra <amodra@gmail.com>
161
162 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
163 and has_addr16_lo. Make has_sda_refs a bitfield.
164 (ppc_elf_check_relocs): Set new flags.
165 (ppc_elf_link_hash_table_create): Update default_params.
166 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
167 where we won't be making .dynbss entries or editing code. Set
168 params->pic_fixup when we'll edit code for protected var access.
169 (allocate_dynrelocs): Allocate got entry for edited code and
170 discard dyn_relocs.
171 (struct ppc_elf_relax_info): Add picfixup_size.
172 (ppc_elf_relax_section): Rename struct one_fixup to struct
173 one_branch_fixup. Rename fixups to branch_fixups. Size space for
174 pic fixups.
175 (ppc_elf_relocate_section): Edit non-PIC accessing protected
176 visibility variables to PIC. Don't emit dyn_relocs for code
177 we've edited.
178 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
179
ffa54770
NC
1802015-04-07 Nick Clifton <nickc@redhat.com>
181
182 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
183 local labels as local.
184
4aa90cc0
L
1852015-04-06 H.J. Lu <hongjiu.lu@intel.com>
186
187 * compress.c (get_uncompressed_size): Removed.
188 (bfd_compress_section_contents): Use bfd_putb64 to write
189 uncompressed section size.
190 (bfd_init_section_decompress_status): Replace
191 get_uncompressed_size with bfd_getb64.
192
68f5ff89
L
1932015-04-04 H.J. Lu <hongjiu.lu@intel.com>
194
195 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
196 SHF_COMPRESSED bit if not decompress.
197
8bed4e0f
L
1982015-04-04 H.J. Lu <hongjiu.lu@intel.com>
199
200 * compress.c (get_uncompressed_size): New. Extracted from ...
201 (bfd_init_section_decompress_status): This. Use it.
202
15c7659f
AT
2032015-04-02 Andrew Turner <andrew@freebsd.org>
204
205 * config.bfd: Add aarch64-*-freebsd* target triple.
206
39f3de7c
L
2072015-04-02 H.J. Lu <hongjiu.lu@intel.com>
208
209 * configure: Regenerated.
210
4106101c
MS
2112015-04-01 Tejas Belagod <tejas.belagod@arm.com>
212 Marcus Shawcroft <marcus.shawcroft@arm.com>
213 Jiong Wang <jiong.wang@arm.com>
214
215 * bfd-in.h (bfd_elf64_aarch64_set_options)
216 (bfd_elf32_aarch64_set_options): Add parameter.
217 * bfd-in2.h: Regenerated.
218 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
219 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
220 (_bfd_aarch64_erratum_843419_stub_name)
221 (_bfd_aarch64_erratum_843419_fixup)
222 (_bfd_aarch64_erratum_843419_scan)
223 (_bfd_aarch64_erratum_843419_branch_to_stub)
224 (_bfd_aarch64_erratum_843419_p): Define.
225 (enum elf_aarch64_stub_type): Define
226 aarch64_stub_erratum_843419_veneer.
227 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
228 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
229 and fix_erratum_843419_adr.
230 (stub_hash_newfunc): Initialize adrp_offset;
231 (_bfd_aarch64_add_stub_entry_after): Define.
232 (aarch64_map_one_stub, aarch64_build_one_stub)
233 (aarch64_size_one_stub): Handle
234 aarch64_stub_erratum_843419_veneer.
235 (_bfd_aarch64_resize_stubs): Round stub section size.
236 (elfNN_aarch64_size_stubs): Add scan for 843419.
237 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
238 fix_erratum_843419 and fix_erratum_843419_adr.
239 (struct erratum_835769_branch_to_stub_data): Add info.
240 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
241 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
242 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
243 (_bfd_aarch64_sign_extend): Define.
244 (reencode_adr_imm): Remove static. Rename to:
245 (_bfd_aarch64_reencode_adr_imm): Define.
246 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
247 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
248 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
249 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
250 Define.
251
afa59b79
L
2522015-04-01 H.J. Lu <hongjiu.lu@intel.com>
253
254 * configure: Regenerated.
255
6036f486
ES
2562015-03-31 Ed Schouten <ed@nuxi.nl>
257
258 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
259 for x86_64-*-cloudabi*.
260 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
261 * configure: Regenerated.
262 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
263 (TARGET_LITTLE_NAME): Likewise.
264 (ELF_OSABI): Likewise.
265 (elf64_bed): Likewise.
266 * targets.c (x86_64_elf64_cloudabi_vec): New.
267 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
268
9ae46699
L
2692015-03-31 H.J. Lu <hongjiu.lu@intel.com>
270
271 * configure.ac: Revert the AM_ZLIB change.
272 * Makefile.in: Regenerated.
273 * aclocal.m4: Likewise.
274 * configure: Likewise.
275 * doc/Makefile.in: Likewise.
276
bd53a53a
L
2772015-03-30 H.J. Lu <hongjiu.lu@intel.com>
278
279 PR ld/18169
280 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
281 (_bfd_elf_get_reloc_section): New.
282 * elf.c (_bfd_elf_get_reloc_section): Likewise.
283 (assign_section_numbers): Call get_reloc_section to look up the
284 section the relocs apply.
285 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
286 (elfNN_bed): Initialize get_reloc_section with
287 elf_backend_get_reloc_section.
288
243340ad
L
2892015-03-29 H.J. Lu <hongjiu.lu@intel.com>
290
291 * Makefile.am (ZLIB): New.
292 (ZLIBINC): Likewise.
293 (AM_CFLAGS): Add $(ZLIBINC).
294 (libbfd_la_LIBADD): Add $(ZLIB).
295 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
296 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
297 (bfd_compress_section_contents): Likewise.
298 (bfd_get_full_section_contents): Likewise.
299 (bfd_init_section_decompress_status): Likewise.
300 (bfd_init_section_compress_status): Likewise.
b51724e8 301 * configure.ac (AM_ZLIB): Removed.
243340ad
L
302 (zlibdir): New. AC_SUBST.
303 (zlibinc): Likewise.
304 Add --with-system-zlib.
305 * Makefile.in: Regenerated.
306 * acinclude.m4: Likewise.
307 * config.in: Likewise.
308 * configure: Likewise.
309 * doc/Makefile.in: Likewise.
310
b8417128
AM
3112015-03-27 Alan Modra <amodra@gmail.com>
312
313 PR ld/15228
314 PR ld/18167
315 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
316 protected_def when symbol section is read-only. Adjust all calls.
317 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
318
93ca8569
TB
3192015-03-26 Tejas Belagod <tejas.belagod@arm.com>
320
321 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
322 _bfd_final_link_relocate with aarch64_relocate.
323
b19a8f85
L
3242015-03-26 H.J. Lu <hongjiu.lu@intel.com>
325
326 PR ld/18160
327 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
328 (bfd_elf_gc_sections): Likewise.
329
61865519
MS
3302015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
331
332 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
333 size for initial branch.
334 (elfNN_aarch64_build_stubs): Write initial branch.
335 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
336 mapping symbol on initial branch.
337
d9ced15d 3382015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
339
340 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
341 Update erratum count.
342
d422d1c4
SKS
3432015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
344
345 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
346 first matching debug section.
347
8d001214
L
3482015-03-24 H.J. Lu <hongjiu.lu@intel.com>
349
350 PR gas/18087
351 * compress.c (bfd_compress_section_contents): Don't write the
352 zlib header and set contents as well as compress_status if
353 compression didn't make the section smaller.
354 (bfd_init_section_compress_status): Don't check compression
355 size here.
356
fc42baf3
NC
3572015-03-24 Nick Clifton <nickc@redhat.com>
358
359 PR binutils/17512
360 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
361 range auxillary sections.
362
fc6d53be
MS
3632015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
364
365 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
366 code into:
367 (_bfd_aarch64_get_stub_for_link_section): Define.
368
30068a6d
MS
3692015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
370
371 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
372 update of section_group[].stub_sec.
373
5421cc6e
MS
3742015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
375
376 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
377 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
378 Delete fixes, fix_table_size and associated code. Call
379 _bfd_aarch64_add_stub_entry_in_group. Rename to...
380 (bfd_aarch64_erratum_835769_scan): Define.
381 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
382 erratum_835769_fix_table_size, i and associated code. Relocate
383 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
384 correction. Delete construction of stub entry from
385 erratum_835769_fixes array.
386
e572930b
MS
3872015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
388
389 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
390 _bfd_aarch64_add_stub_entry_in_group.
391
8131c122
AM
3922015-03-24 Alan Modra <amodra@gmail.com>
393
394 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
395 stubs, even those for undefined weak symbols. Otherwise, don't
396 report relocation overflow on branches to undefined strong
397 symbols. Fix memory leak.
398 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
399 overflow on branches to undefined strong symbols.
400
c53ed7cf
KS
4012015-03-23 Keith Seitz <keiths@redhat.com>
402
403 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
404 missing ';'.
405
94a75bde
MS
4062015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
407
408 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
409 construction into...
410 (_bfd_aarch64_erratum_835769_stub_name): Define.
411
13f622ec
MS
4122015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
413
414 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
415 stub resize code into...
416 (bfd_aarch64_resize_stubs): Define.
417
66585675
MS
4182015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
419
420 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
421 creation code into...
422 (bfd_aarch64_create_stub_section): Define.
423
ef857521
MS
4242015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
425
426 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
427 from elf_aarch64_create_or_find_stub_sec.
428 (_bfd_aarch64_add_stub_entry_in_group): Rename from
429 elfNN_aarch64_add_stub. Call
430 _bfd_aarch64_create_or_find_stub_sec.
431 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
432 _bfd_aarch64_add_stub_entry_in_group.
433
2144188d
MS
4342015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
435
436 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
437 sense of boolean return.
438 (elfNN_aarch64_size_stubs): Adjust for above.
439
4c77202d
MS
4402015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
441
442 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
443 Remove unused parameter.
444 (elfNN_aarch64_size_stubs): Adjust for above.
445
9b9971aa
MS
4462015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
447
448 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
449
e2cdef47
MS
4502015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
451
452 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
453 (num_aarch64_erratum_835769_fixes): Remove.
454 (elfNN_aarch64_size_stubs): Remove assignments to above.
455
3d14faea
MS
4562015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
457
23956543
MS
458 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
459 to rt2.
3d14faea
MS
460 (aarch64_erratum_seqeunce): Rename rtn to rt2.
461
f872121a
MS
4622015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
463
464 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
465
1740ba0c
NC
4662015-03-19 Nick Clifton <nickc@redhat.com>
467
468 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
469 the RL78 core based upon the flags.
470 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
471 flags.
472 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
473 (elf32_rl78_machine): Always return bfd_mach_rl78.
474
e2575e05
NC
4752015-03-19 Nick Clifton <nickc@redhat.com>
476
477 PR 18078
478 * compress.c (bfd_compress_section_contents): Do not define this
479 function if it is not used.
480
0b0732e1
L
4812015-03-18 H.J. Lu <hongjiu.lu@intel.com>
482
483 * compress.c (bfd_compress_section_contents): Make it static.
484 * bfd/bfd-in2.h: Regenerated.
485
27aaeda0
NC
4862015-03-18 Eric Youngdale <eyoungdale@ptc.com>
487
488 PR ld/16598
489 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
490 suitable for the AMD64.
491
273a4985
JT
4922015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
493 Nick Clifton <nickc@redhat.com>
494
495 PR binutils/18087
496 * coffgen.c (make_a_section_from_file): Only prepend a z to a
497 debug section's name if the section was actually compressed.
498 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
499 * compress.c (bfd_init_section_compress_status): Do not compress
500 the section if doing so would make it bigger. In such cases leave
501 the section alone and return COMPRESS_SECTION_NONE.
502
c4b0b099
AM
5032015-03-17 Alan Modra <amodra@gmail.com>
504
505 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
506 on nothing to do, before malloc of returned symbol array.
507
9c761a55
NC
5082015-03-16 Nick Clifton <nickc@redhat.com>
509
510 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
511 stored in the elf_section_data structure then load them as
512 necessary.
513
b9005ba7
AK
5142015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
515
516 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
517 relocs against code sections.
518 * elf32-s390.c: Define elf_backend_sort_relocs_p.
519 * elf64-s390.c: Likewise.
520
1079403c
AM
5212015-03-11 Alan Modra <amodra@gmail.com>
522
523 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
524 reverse order. Account for larger size of __tls_get_addr_opt stub.
525
a5721edd
JW
5262015-03-10 Yuri Gribov <y.gribov@samsung.arm>
527
528 PR ld/16572
529 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
530 ELF_ARM_HASENTRY.
531 (elf32_arm_print_private_bfd_data): Likewise.
532
65164438
NC
5332015-03-06 Nick Clifton <nickc@redhat.com>
534
535 PR binutils/17765
536 * elflink.c (put_value): Like previous delta, but for the 32-bit
537 case.
538
41cd1ad1
NC
5392015-03-05 Nick Clifton <nickc@redhat.com>
540
541 PR binutils/17765
542 * elflink.c (put_value): Avoid using an undefined shift
543 operation.
544
ca3fe95e
L
5452015-03-05 H.J. Lu <hongjiu.lu@intel.com>
546
547 PR ld/pr15228
548 PR ld/pr17709
549 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
550 * elf32-i386.c (elf_backend_extern_protected_data): New.
551 Defined to 1.
552 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
553 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
554 copy relocs against protected symbols if extern_protected_data
555 is true.
556 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
557 non-function symbols if extern_protected_data is true.
558 * elfxx-target.h (elf_backend_extern_protected_data): New.
559 Default to 0.
560 (elfNN_bed): Initialize extern_protected_data with
561 elf_backend_extern_protected_data.
562
425bd9e1
NC
5632015-03-05 Nick Clifton <nickc@redhat.com>
564
565 PR binutils/18025
566 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
567 lookup fails, check for an address bias in the dwarf info, and if
568 one exists, retry the lookup with the biased value.
569 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
570 Determines if a bias exists bewteen the addresses of functions
571 based on DWARF information vs symbol table information.
572 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
573 * libbfd.h: Regenerate.
574
8ef229f3
MS
5752015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
576
577 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
578 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
579 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
580
8e2fe09f
MS
5812015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
582
583 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
584 (aarch64_size_one_stub): Likewise.
585 (aarch64_map_one_stub): Likewise.
586
df88b702
AA
5872015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
588
589 * cpu-s390.c (N): New macro.
590 (bfd_s390_31_arch): New. Define only if default target word size
591 is 64 bits. Otherwise define...
592 (bfd_390_64_arch): ...this. Make static.
593 (bfd_s390_arch): Define according to the default target word size.
594 Let the 'next' field point to the alternate arch.
595
e09ab7ac
RS
5962015-03-04 Richard Sandiford <richard.sandiford@arm.com>
597
598 PR gas/17843
599 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
600 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
601 to be used with MOVK rather than MOVZ.
602
71eef2bd
DD
6032015-03-03 DJ Delorie <dj@redhat.com>
604
605 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
606 there's a symbol.
607
f01f1741
AM
6082015-02-28 Alan Modra <amodra@gmail.com>
609
610 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
611 not PLT_NEW.
612
c1d11331
L
6132015-02-27 H.J. Lu <hongjiu.lu@intel.com>
614
615 * elf32-i386.c (need_convert_mov_to_lea): New.
616 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
617 (elf_i386_convert_mov_to_lea): Return TRUE if
618 need_convert_mov_to_lea is unset.
619 * elf64-x86-64.c (need_convert_mov_to_lea): New.
620 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
621 (elf_x86_64_convert_mov_to_lea): Return TRUE if
622 need_convert_mov_to_lea is unset.
623
cdb602b1
NC
6242015-02-27 Nick Clifton <nickc@redhat.com>
625
626 PR binutils/17910
627 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
628 string length overflow when the string table length is actually
629 set.
630
96c20bc1
MS
6312015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
632
633 * bfd/bfd-in2.h: Regenerate.
634 * bfd/libbfd.h: Regenerate.
635
1ada945d
MS
6362015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
637
638 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
639 TLSDESC_LD_PREL19 field width and masks.
640 (aarch64_tls_transition_without_check)
641 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
642 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
643 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
644 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
645 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
646 (_bfd_aarch64_elf_resolve_relocation): Likewise.
647
389b8029
MS
6482015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
649
73920eed
MS
650 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
651 tests.
389b8029
MS
652 (aarch64_tls_transition_without_check)
653 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
654 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
655 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
656 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
657 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
658 (_bfd_aarch64_elf_resolve_relocation): Likewise.
659 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
660
3c12b054
MS
6612015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
662
663 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
664 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
665 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
666 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
667 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
668 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
669 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
670 (_bfd_aarch64_elf_resolve_relocation): Likewise.
671 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
672
043bf05a
MS
6732015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
674
675 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
676 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
677 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
678 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
679 (elfNN_aarch64_check_relocs): Handle
680 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
681
682 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
683 (_bfd_aarch64_elf_resolve_relocation): Likewise.
684
7366006f
MS
6852015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
686
687 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
688
07875fbc
MS
6892015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
690
691 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
692 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
693 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
694 width.
695
49d8f92c
MS
6962015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
697
698 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
699 field width.
700
c86934ce
NC
7012015-02-26 Nick Clifton <nickc@redhat.com>
702
703 PR binutils/17512
704 * coffcode.h (coff_compute_section_file_positions): Report
705 negative page sizes.
706 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
707 (assign_file_positions_for_non_load_sections): Replace assertion
708 with an error message.
709 (rewrite_elf_program_header): Handle excessive segment
710 alignments.
711 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
712 (bfd_mach_o_read_section_64): Likewise.
713 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
714 print a bfd name, not %A.
715
bd4d2eaa
AM
7162015-02-26 Alan Modra <amodra@gmail.com>
717
718 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
719 thread-safe stubs for iplt.
720 (build_tls_get_addr_stub): Restore r2 immediately after call.
721
99654aaf
TG
7222015-02-26 Terry Guo <terry.guo@arm.com>
723
724 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
725 merge Tag_ABI_HardFP_use.
726
a127494f
AM
7272015-02-26 Alan Modra <amodra@gmail.com>
728
729 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
730 Use text relocs rather than giving an error on trying to use
731 .dynbss for protected shared lib vars.
732 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
733
bac13f5a
AB
7342015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
735
736 * elf32-avr.c (struct elf_avr_section_data): New structure.
737 (struct avr_relax_info): New structure.
738 (elf_avr_new_section_hook): New function.
739 (struct elf_avr_section_data): Add relax_info.
740 (get_avr_relax_info): New function.
741 (init_avr_relax_info): New function.
742 (elf32_avr_relax_delete_bytes): Find next property record before
743 deleting bytes. When deleting don't move bytes beyond the next
744 property record.
745 (avr_elf32_assign_records_to_section): New function.
746 (avr_property_record_compare): New function.
747 (avr_load_all_property_sections): New function.
748 (elf32_avr_relax_section): Load property data. After relaxing the
749 section, move any .align directives that have enough deleted bytes
750 before them.
751 (bfd_elf32_new_section_hook): Define.
752
137c83d6
AB
7532015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
754
755 * elf32-avr.h (struct avr_property_header): New strucure.
756 (avr_elf32_load_property_records): Declare.
757 (avr_elf32_property_record_name): Declare.
758 * elf32-avr.c: Add bfd_stdint.h include.
759 (retrieve_local_syms): New function.
760 (get_elf_r_symndx_section): New function.
761 (get_elf_r_symndx_offset): New function.
762 (internal_reloc_compare): New function.
763 (struct avr_find_section_data): New structure.
764 (avr_is_section_for_address): New function.
765 (avr_find_section_for_address): New function.
766 (avr_elf32_load_records_from_section): New function.
767 (avr_elf32_load_property_records): New function.
768 (avr_elf32_property_record_name): New function.
769
fdd410ac
AB
7702015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
771
772 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
773 (AVR_PROPERTY_RECORDS_VERSION): Define.
774 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
775 (struct avr_property_record): New structure.
776
685080f2
NC
7772015-02-24 Nick Clifton <nickc@redhat.com>
778
779 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
780 style note entry.
781 (v850_elf_make_note_section): New function. Creates a note
782 section.
783 (v850_elf_create_sections): New function. Create a note section
784 if one is not already present.
785 (v850_elf_set_note): New function. Adds a note to a bfd.
786 (v850_elf_copy_private_bfd_data): New function. Copies V850
787 notes.
788 (v850_elf_merge_notes): New function. Merges V850 notes.
789 (print_v850_note): New function. Displays a V850 note.
790 (v850_elf_print_notes): New function. Displays all notes attached
791 to a bfd.
792 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
793 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
794 (v850_elf_fake_sections): Set the type of the V850 note section.
795 * bfd-in.h (v850_elf_create_sections): Add prototype.
796 (v850_elf_set_note): Add prototype.
797 * bfd-in2.h: Regenerate.
798
31593e1b
NC
7992015-02-24 Nick Clifton <nickc@redhat.com>
800
801 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
802 * configure: Regenerate.
803 * config.in: Regenerate.
804 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
805 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
806 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
807 is defined.
808
3ad797fd
NC
8092015-02-24 Nick Clifton <nickc@redhat.com>
810
811 * pdp11.c (set_section_contents): Pad the .text and .data sections
812 to their aligned sizes.
813
5518c738
YS
8142015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
815
816 * config.bfd: Add h8300-*-linux.
817 * configure.ac: Add h8300_elf32_linux_vec.
818 * configure: Regenerate.
819 * elf32-h8300.c: Likewise.
820 * targets.c(_bfd_target_vector): Likewise.
821
cb967f0d
NC
8222015-02-23 Nick Clifton <nickc@redhat.com>
823
824 PR 17914
825 * cpu-w65.c: Correct typos in license notice.
826
0f8f0c57
NC
827 PR 17940
828 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
829 symbols at end of sections. Adjust function sizes.
830
4ef9f41a
AA
8312015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
832
833 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
834 (elfcore_write_s390_vxrs_high): Likewise.
835 * elf.c (elfcore_grok_s390_vxrs_low): New function.
836 (elfcore_grok_s390_vxrs_high): New function.
837 (elfcore_grok_note): Call them.
838 (elfcore_write_s390_vxrs_low): New function.
839 (elfcore_write_s390_vxrs_high): New function.
840 (elfcore_write_register_note): Call them.
841
837914ee
BD
8422015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
843
844 PR 17995
845 * verilog.c (verilog_write_record): Correct buffer size.
846
cf18fda4
AM
8472015-02-19 Alan Modra <amodra@gmail.com>
848
849 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
850
d983c8c5
AM
8512015-02-19 Alan Modra <amodra@gmail.com>
852
853 PR ld/4317
854 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
855 (elf_link_output_extsym): Drop local and global undefined syms.
856 Tidy. Expand comment.
857
2ec55de3
AM
8582015-02-17 Alan Modra <amodra@gmail.com>
859
860 PR ld/17975
861 * elflink.c (struct elf_outext_info): Remove need_second_pass
862 and second_pass.
863 (elf_link_output_extsym): Delete code handling second forced
864 local pass. Move code emitting NULL STT_FILE symbol later, so
865 that it can be omitted if forced local is stripped. Don't
866 emit the NULL STT_FILE if no file symbols have been output.
867 (bfd_elf_final_link): Remove second forced local pass.
868 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
869 (ppc_elf_size_dynamic_sections): Likewise.
870 * elf64-ppc.c (ppc_build_one_stub): Likewise.
871 (build_global_entry_stubs): Likewise.
872 (ppc64_elf_build_stubs): Likewise.
873
6dfb72b9
L
8742015-02-16 H.J. Lu <hongjiu.lu@intel.com>
875
876 PR ld/17975
877 * elflink.c (elf_link_output_extsym): Only check filesym_count
878 when outputting a NULL FILE symbol. Set second_pass_sym to
879 h->forced_local && !h->root.linker_def.
880
576fa883
L
8812015-02-15 H.J. Lu <hongjiu.lu@intel.com>
882
883 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
884 on _TLS_MODULE_BASE_.
885 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
886
62f8d217
AM
8872015-02-15 Alan Modra <amodra@gmail.com>
888
889 * dwarf2.c (read_rangelist): Correct buffer overflow check
890 Whitespace throughout file.
891
ce875075
AM
8922015-02-14 Alan Modra <amodra@gmail.com>
893
894 PR ld/17973
895 * bfd.c (struct bfd): Add lto_output.
896 * linker.c (_bfd_handle_already_linked): Explicitly test for
897 objects added by the lto plugin.
898 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
899 no_export flags from archive.
900 * archive.c (open_nested_file): New function, setting lto_output
901 and no_export, extracted from..
902 (find_nested_archive): ..here. Flip params. Rename from
903 _bfd_find_nested_archive.
904 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
905 (_bfd_look_for_bfd_in_cache): Copy no_export.
906 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
907 my_archive->no_export test.
908 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
909 Don't use the file name when adding lto_output STT_FILE sym.
910 * bfd-in2.h: Regenerate.
911
451dfd38
AM
9122015-02-13 Alan Modra <amodra@gmail.com>
913
914 PR binutils/17512
915 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
916 now redundant assert.
917
dbb3fbbb
NC
9182015-02-12 Nick Clifton <nickc@redhat.com>
919
920 PR binutils/17512
921 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
922 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
923 (read_indirect_string, read_alt_indirect_string)
924 (read_alt_indirect_ref, read_address, read_abbrevs)
925 (read_attribute_value, read_attribute, decode_line_info)
926 (find_abstract_instance_name, read_rangelist)
927 (scan_unit_for_symbols, parse_comp_unit)
928 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
929 end pointers to reading functions and check for offsets taking
930 pointers out of range. Replace calls to read_*_leb128 with calls
931 to safe_read_leb128.
932
933 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
934 offset.
935 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
936 computed file_name address being before the start of the string
937 table.
938
b9dc5a87
L
9392015-02-11 H.J. Lu <hongjiu.lu@intel.com>
940
941 PR ld/17878
942 * bfd.c (bfd_plugin_format): New.
943 (bfd): Add plugin_format and plugin_dummy_bfd.
944 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
945 argument to return TRUE if any plugin is found. Set plugin_format.
946 (has_plugin): New.
947 (bfd_plugin_target_p): New.
948 (bfd_plugin_specified_p): Likewise.
949 (bfd_plugin_target_p): Likewise.
950 (register_ld_plugin_object_p): Likewise.
951 (bfd_plugin_set_plugin): Set has_plugin.
952 (load_plugin): Cache try_load_plugin result.
953 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
954 plugin_format.
955 * plugin.h (bfd_plugin_target_p): New.
956 (bfd_plugin_specified_p): Likewise.
957 (register_ld_plugin_object_p): Likewise.
958 * bfd-in2.h: Regenerated.
959
55172d69
PA
9602015-02-11 Pedro Alves <palves@redhat.com>
961
962 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
963 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
964 * libbfd.h: Regenerate.
965 * libcoff.h: Regenerate.
966
967 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
968 * mach-o.h [__cplusplus]: Wrap in extern "C".
969 * som.h [__cplusplus]: Wrap in extern "C".
970
77ef8654
NC
9712015-02-10 Nick Clifton <nickc@redhat.com>
972
973 PR binutils/17512
974 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
975 hold the flag bits.
976 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
977 size and number of relocs.
978 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
979 codeview record.
980 * versados.c (process_otr): Check the esdid value before using it
981 to access the EDATA.
982
35181b3e
EM
9832015-02-09 Ed Maste <emaste@freebsd.org>
984
985 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
986 uninitialized and unused variable.
987 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
988
989f9879
AM
9892015-02-09 Alan Modra <amodra@gmail.com>
990
991 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
992 tls_sec.
993 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
994 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
995
ca4be51c
AM
9962015-02-09 Alan Modra <amodra@gmail.com>
997
998 * elflink.c: Whitespace, formatting fixes.
999 (elf_link_input_bfd): Clarify comment.
1000 (elf_link_output_extsym): Exclude symbols in linker created
1001 sections when testing for plugin symbols.
1002
1952c5cd
L
10032015-02-07 H.J. Lu <hongjiu.lu@intel.com>
1004
1005 PR ld/17935
1006 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1007 warning for relocation in readonly section for -z text.
1008 (elf_i386_size_dynamic_sections): Likewise.
1009 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1010 (elf_x86_64_size_dynamic_sections): Likewise.
1011
9e2dec47
L
10122015-02-06 H.J. Lu <hongjiu.lu@intel.com>
1013
1014 PR ld/12365
1015 PR ld/14272
1016 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1017 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
1018 referenced from a non-IR file.
1019
5929c344
NC
10202015-02-06 Nick Clifton <nickc@redhat.com>
1021
1022 PR binutils/17512
1023 * peXXigen.c (rsrc_print_resource_entries): Add range check for
1024 addresses that wrap around the address space.
1025 (rsrc_parse_entry): Likewise.
1026
60f79275
L
10272015-02-03 H.J. Lu <hongjiu.lu@intel.com>
1028
1029 PR ld/12365
1030 PR ld/14272
1031 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1032 undefined if it is referenced from a non-IR file.
1033
64d29018
NC
10342015-02-03 Nick Clifton <nickc@redhat.com>
1035
1036 PR binutils/17512
1037 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1038 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1039 index or an out of range fdr index.
1040 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1041 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1042 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1043 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1044 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1045 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
1046 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1047 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1048 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1049 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1050 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1051 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
1052 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1053 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1054 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1055 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1056 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1057 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1058 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
1059 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1060 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1061 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1062 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1063 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1064 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1065 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1066 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1067 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1068 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
1069 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1070 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1071 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1072 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1073 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1074 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1075 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1076 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
1077 * elf32-vax.c (rtype_to_howto): Likewise.
1078 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1079 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1080 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1081 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1082 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1083 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
1084 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
1085 of range symbol indicies.
1086 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
1087 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
1088 (bfd_mach_o_build_dysymtab): Likewise.
1089 (bfd_mach_o_write_symtab_content): Set the string table size to
1090 zero upon error.
1091 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
1092 read fails.
1093 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
1094 fields.
1095 * tekhex.c (first_phase): Check for src pointer reaching end of
1096 buffer.
1097
3a635617
WN
10982015-02-03 Will Newton <will.newton@linaro.org>
1099
46b87d49
WN
1100 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
1101 Set st_value to zero for undefined symbols if the reference
1102 is weak or pointer_equality_needed is FALSE.
1103
3a635617
WN
1104 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
1105 comment discussing why we clear st_value for some symbols.
1106
0c4bd9d9
KLC
11072015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1108
1109 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
1110 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
1111
b86ac8e3
AM
11122015-01-29 Alan Modra <amodra@gmail.com>
1113
1114 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
1115 optimization. Tidy mask for GOT_TLSGD optimization.
1116 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
1117 location of nop zapping high insn too.
1118
dbd1e97e
AM
11192015-01-28 Alan Modra <amodra@gmail.com>
1120
1121 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
1122 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
1123 in .toc indicate xlc compiled code that might require a rw .toc.
1124
3f8107ab
AM
11252015-01-28 James Bowman <james.bowman@ftdichip.com>
1126
1127 * Makefile.am: Add FT32 files.
1128 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
1129 (bfd_mach_ft32): Define.
1130 (bfd_ft32_arch): Declare.
1131 (bfd_archures_list): Add bfd_ft32_arch.
1132 * config.bfd: Handle FT32.
1133 * configure.ac: Likewise.
1134 * cpu-ft32.c: New file.
1135 * elf32-ft32.c: New file.
1136 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
1137 BFD_RELOC_FT32_18): Define.
1138 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
1139 * bfd-in2.h: Regenerate.
1140 * libbfd.h: Regenerate.
1141 * Makefile.in: Regenerate.
1142 * configure: Regenerate.
1143 * po/SRC-POTFILES.in: Regenerate.
1144
37e3922e
NC
11452015-01-27 Nick Clifton <nickc@redhat.com>
1146
1147 PR binutils/17512
1148 * pdp11.c (aout_get_external_symbols): Return false if there are
1149 no symbols.
1150
877a8638
NC
1151 * dwarf2.c (concat_filename): Check for an empty directory table.
1152 (scan_unit_for_symbols): Check for reading off the end of the
1153 unit.
1154 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
1155 non-string form.
1156 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
1157 available.
1158
18393a2e
KLC
11592015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1160
1161 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
1162
055173ca
DD
11632015-01-22 DJ Delorie <dj@redhat.com>
1164
1165 * elf32-m32c.c (m32c_apply_reloc_24): New.
1166 (m32c_elf_howto_table): Use it for R_M32C_24.
1167 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
1168
4e5cb37e
NC
11692015-01-22 Nick Clifton <nickc@redhat.com>
1170
1171 PR binutils/17512
1172 * coffcode.h (handle_COMDAT): When searching for the section
1173 symbol, make sure that there is space left in the symbol table.
1174 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
1175
86eafac0
NC
11762015-01-21 Nick Clifton <nickc@redhat.com>
1177
1178 PR binutils/17512
1179 * coffcode.h (coff_set_arch_mach_hook): Check return value from
1180 bfd_malloc.
1181 (coff_slurp_line_table): Return FALSE if the line number
1182 information was corrupt.
1183 (coff_slurp_symbol_table): Return FALSE if the symbol information
1184 was corrupt.
1185 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
1186 initialise the fields of the dyld_info structure.
1187 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
1188 error message and a return value.
1189 (bfd_mach_o_layout_commands): Change the function to boolean.
1190 Return FALSE if the function fails.
1191 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
1192 fails.
1193 (bfd_mach_o_read_command): Fail if an unrecognised command is
1194 encountered.
1195 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
1196 read fails.
1197 (slurp_symtab): Check the return from bfd_malloc.
1198 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
1199 encountered an error.
1200 (_bfd_XXi_final_link_postscript): Fail if a section could not be
1201 copied.
1202 * peicode.h (pe_bfd_object_p): Fail if the header could not be
1203 swapped in.
1204 * tekhex.c (first_phase): Fail if the section is too big.
1205 * versados.c (struct esdid): Add content_size field.
1206 (process_otr): Use and check the new field.
1207 (versados_get_section_contents): Check that the section exists and
1208 that the requested data is available.
1209
03d5b773
CLT
12102015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
1211
1212 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
1213
1c9177d9
AM
12142015-01-20 Alan Modra <amodra@gmail.com>
1215
1216 PR ld/17615
1217 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
1218 ELF_COMMON_DEF syms.
1219
c4621b33
AM
12202015-01-19 Alan Modra <amodra@gmail.com>
1221
3e2aa5bb 1222 PR ld/17615
c4621b33
AM
1223 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
1224 linker script assignments too.
1225 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
1226 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
1227
0ba38529
AM
12282015-01-19 Alan Modra <amodra@gmail.com>
1229
1230 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
1231 to allow return of first howto.
1232 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
1233 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
1234 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
1235 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
1236 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
1237 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
1238 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
1239 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
1240 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1241 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
1242 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
1243 (spu_elf_reloc_type_lookup): Adjust to suit.
1244
6346d5ca
AM
12452015-01-19 Alan Modra <amodra@gmail.com>
1246
1247 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
1248 (bfd_get_section_limit): ..here.
1249 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
1250 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
1251 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
1252 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
1253 bfd_reloc_outofrange check.
1254 * bfd-in2.h: Regenerate.
1255
1256 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
1257 on zero size relocs.
1258 * ecoff.c (ecoff_reloc_link_order): Likewise.
1259 * elf32-nds32.c (nds32_relocate_contents): Likewise.
1260 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1261
1262 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
1263 (_bfd_clear_contents): Likewise.
1264 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
1265 (mips_elf_perform_relocation): Likewise.
1266
1267 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
1268 from malloc on zero size alloc.
1269 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1270 * elflink.c (elf_reloc_link_order): Likewise.
1271 * linker.c (_bfd_generic_reloc_link_order): Likewise.
1272 * pdp11.c (aout_link_reloc_link_order): Likewise.
1273 * xcofflink.c (xcoff_reloc_link_order): Likewise.
1274
1275 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
1276 bitsize 0, and complain_overflow_dont.
1277 * coff-sparc.c (coff_sparc_howto_table): Likewise.
1278 * elf-hppa.h (elf_hppa_howto_table): Likewise.
1279 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
1280 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
1281 * elf32-arc.c (elf_arc_howto_table): Likewise.
1282 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
1283 * elf32-avr.c (elf_avr_howto_table): Likewise.
1284 * elf32-bfin.c (bfin_howto_table): Likewise.
1285 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
1286 * elf32-cris.c (cris_elf_howto_table): Likewise.
1287 * elf32-crx.c (crx_elf_howto_table): Likewise.
1288 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
1289 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
1290 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
1291 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
1292 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
1293 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1294 * elf32-h8300.c (h8_elf_howto_table): Likewise.
1295 * elf32-i370.c (i370_elf_howto_raw): Likewise.
1296 * elf32-i386.c (elf_howto_table): Likewise.
1297 * elf32-i860.c (elf32_i860_howto_table): Likewise.
1298 * elf32-i960.c (elf32_i960_relocate): Likewise.
1299 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
1300 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
1301 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
1302 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
1303 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
1304 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
1305 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
1306 * elf32-m68k.c (howto_table): Likewise.
1307 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
1308 * elf32-mep.c (mep_elf_howto_table): Likewise.
1309 * elf32-metag.c (elf_metag_howto_table): Likewise.
1310 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
1311 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
1312 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
1313 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
1314 * elf32-mt.c (mt_elf_howto_table): Likewise.
1315 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
1316 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
1317 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
1318 * elf32-pj.c (pj_elf_howto_table): Likewise.
1319 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
1320 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
1321 * elf32-rx.c (rx_elf_howto_table): Likewise.
1322 * elf32-s390.c (elf_howto_table): Likewise.
1323 * elf32-score.c (elf32_score_howto_table): Likewise.
1324 * elf32-score7.c (elf32_score_howto_table): Likewise.
1325 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
1326 * elf32-spu.c (elf_howto_table): Likewise.
1327 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
1328 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
1329 * elf32-v850.c (v850_elf_howto_table): Likewise.
1330 * elf32-vax.c (howto_table): Likewise.
1331 * elf32-visium.c (visium_elf_howto_table): Likewise.
1332 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
1333 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
1334 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
1335 * elf32-xtensa.c (elf_howto_table): Likewise.
1336 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
1337 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
1338 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
1339 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
1340 * elf64-s390.c (elf_howto_table): Likewise.
1341 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
1342 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
1343 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
1344 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1345 (elfNN_aarch64_howto_none): Likewise.
1346 * elfxx-ia64.c (ia64_howto_table): Likewise.
1347 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
1348 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
1349 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
1350
6333bc0d
L
13512015-01-15 H.J. Lu <hongjiu.lu@intel.com>
1352
1353 PR ld/17847
1354 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
1355 about -fPIC if the symbol is undefined when building executable.
1356
cd21f5da
NC
13572015-01-15 Nick Clifton <nickc@redhat.com>
1358
1359 PR binutils/17512
1360 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
1361 error message. Never return an invalid howto pointer.
1362 * elf32-cr16.c (cr16_info_to_howto): Likewise.
1363 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1364 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1365 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1366 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1367 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
1368 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1369 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1370 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1371 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
1372 * elf32-vax.c (rtype_to_howto): Likewise.
1373 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1374 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1375 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
1376 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1377 (sh_elf_reloc): Check that the reloc is in range.
1378 * reloc.c (bfd_perform_relocation): Check that the section is big
1379 enough for the entire reloc.
1380 (bfd_generic_get_relocated_section_contents): Report unexpected
1381 return values from perform_reloc.
1382
2d071cfc
NC
13832015-01-15 Nick Clifton <nickc@redhat.com>
1384
1385 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
1386 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
1387 relaxation.
1388
ca55926c
AM
13892015-01-15 Alan Modra <amodra@gmail.com>
1390
1391 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
1392 any output section matching a linker created dynobj section.
1393
8539e4e8
AM
13942015-01-15 Alan Modra <amodra@gmail.com>
1395
1396 PR 17842
1397 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
1398 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
1399 Don't assign symtab file position unless symbols will be output.
1400 Merge blocks with condition in common. Don't call
1401 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
1402 unless other symbols are output. Move assignment of symtab_shndx
1403 file position. Localize variable.
1404
52db4ec2
JW
14052015-01-14 Jiong Wang <jiong.wang@arm.com>
1406
1407 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
1408 trying to defer them to runtime.
1409
0941db69
JW
14102015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1411
1412 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
1413 to check if a symbol should be bound symbolically.
1414
0172429c
JW
14152015-01-13 Jiong Wang <jiong.wang@arm.com>
1416
1417 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
1418 for TLSLE_MOVW_TPREL_G2.
1419
bab91cce
JW
14202015-01-13 Jiong Wang <jiong.wang@arm.com>
1421
1422 PR ld/17415
1423 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
1424 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
1425 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
1426 bit mask.
1427
3c758495
TG
14282015-01-12 Terry Guo <terry.guo@arm.com>
1429
1430 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
1431 function.
1432 (_bfd_elf_gc_mark_extra_sections): Use it.
1433
9d1d54d5
L
14342015-01-11 H.J. Lu <hongjiu.lu@intel.com>
1435
1436 PR ld/17827
1437 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
1438 only discard space for pc-relative relocs symbols which turn
1439 out to need copy relocs.
1440
c6e8e93a
NC
14412015-01-09 Nick Clifton <nickc@redhat.com>
1442
1443 * tekhex.c (getvalue): Fix thinko in test for correct extraction
1444 of value.
1445 (getsym): Return false if there was not enough data to extract the
1446 symbol.
1447
400cf8cb
AG
14482015-01-09 Anthony Green <green@moxielogic.com>
1449
1450 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
1451
23d4663e
NC
14522015-01-08 Nick Clifton <nickc@redhat.com>
1453
1454 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
1455 16-bit absolute BR instructions to 10-bit pc-relative JMP
1456 instructions.
1457
063bb025
NC
14582015-01-08 Nick Clifton <nickc@redhat.com>
1459
1460 PR binutils/17512
1461 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
1462 to load the line table.
1463 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
1464 maxpagesize of 1.
1465 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
1466 the Data Directory Size is too large.
1467
6f25f223
L
14682015-01-06 H.J. Lu <hongjiu.lu@intel.com>
1469
1470 PR binutils/17512
1471 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
1472 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1473
85880250
NC
14742015-01-06 Nick Clifton <nickc@redhat.com>
1475
1476 PR binutils/17512
e7287c7f
NC
1477 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
1478 string table.
1479
ec93045b
NC
1480 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
1481 (bfd_perform_relocation): Include the size of the reloc in the
1482 test for an out of range relocation.
1483 (bfd_generic_get_relocated_section_contents): Remove reloc range
1484 test.
1485
85880250
NC
1486 * coff-i860.c (CALC_ADDEND): Always set an addend value.
1487 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
1488 avoid reading off the end of the buffer.
1489 (getsym): Likewise.
1490 (first_phase): Likewise.
1491 (pass_over): Pass an end pointer to the invoked function.
1492
533d0af0
L
14932015-01-05 H.J. Lu <hongjiu.lu@intel.com>
1494
1495 PR binutils/17512
1496 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
1497 input.
1498 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1499
896ca098
NC
15002015-01-05 Nick Clifton <nickc@redhat.com>
1501
1502 PR binutils/17512
1503 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
1504 is at least big enough for the header to be read.
1505 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
1506 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
1507 (bfd_mach_o_read_command): Prevetn duplicate error messages about
1508 unrecognized commands.
1509 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
1510 when indexing into the string table.
1511
b90efa5b 15122015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 1513
b90efa5b 1514 Update year range in copyright notice of all files.
ee3b52e9 1515
b90efa5b 1516For older changes see ChangeLog-2014
56882138 1517\f
b90efa5b 1518Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
1519
1520Copying and distribution of this file, with or without modification,
1521are permitted in any medium without royalty provided the copyright
1522notice and this notice are preserved.
1523
56882138
AM
1524Local Variables:
1525mode: change-log
1526left-margin: 8
1527fill-column: 74
1528version-control: never
1529End:
This page took 1.197145 seconds and 4 git commands to generate.