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