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