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