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