]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
[AArch64] BFD Support BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
99ad26cb
JW
12015-06-01 Jiong Wang <jiong.wang@arm.com>
2
3 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
4 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
5 (elfNN_aarch64_final_link_relocate): Ditto.
6 (elfNN_aarch64_gc_swap_hook): Ditto.
7 (elfNN_aarch64_check_relocs): Ditto.
8 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
9
a921b5bd
JW
102015-06-01 Jiong Wang <jiong.wang@arm.com>
11
12 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
13 * bfd-in2.h: Regenerate.
14 * libbfd.h: Regenerate.
15 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
16 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
17
2f0c68f2
CM
182015-05-28 Catherine Moore <clm@codesourcery.com>
19 Bernd Schmidt <bernds@codesourcery.com>
20 Paul Brook <paul@codesourcery.com>
21
22 bfd/
23 * bfd-in2.h: Regenerated.
24 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
25 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
26 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
27 eh_frame_hdr_info.
28 (compact_eh_frame_hdr_info): Declare.
29 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
30 fields and compact-eh fields.
31 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
32 (bfd_elf_section_data): Add eh_frame_entry_field.
33 (elf_section_eh_frame_entry): Define.
34 (bfd_elf_parse_eh_frame_entries): Declare.
35 (_bfd_elf_parse_eh_frame_entry): Declare.
36 (_bfd_elf_end_eh_frame_parsing): Declare.
37 (_bfd_elf_write_section_eh_frame_entry): Declare.
38 (_bfd_elf_eh_frame_entry_present): Declare.
39 (_bfd_elf_section_for_symbol): Declare.
40 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
41 (bfd_elf_record_eh_frame_entry): New function.
42 (_bfd_elf_parse_eh_frame_entry): New function.
43 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
44 (cmp_eh_frame_hdr): New function.
45 (add_eh_frame_hdr_terminator): New function.
46 (_bfd_elf_end_eh_frame_parsing): New function.
47 (find_merged_cie): Update hdr_info field references.
48 (_bfd_elf_discard_section_eh_frame): Likewise.
49 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
50 (_bfd_elf_eh_frame_entry_present): New function.
51 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
52 (_bfd_elf_write_section_eh_frame_entry): New function.
53 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
54 (_bfd_elf_fixup_eh_frame_hdr): New function.
55 (write_compact_eh_frame_hdr): New function.
56 (write_dwarf_eh_frame_hdr): New function.
57 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
58 * elflink.c (_bfd_elf_section_for_symbol): New function.
59 (elf_section_ignore_discarded_relocs): Add Compact EH support.
60 (elf_link_input_bfd): Likewise.
61 (bfd_elf_final_link): Likewise.
62 (_bfd_elf_gc_mark): Likewise.
63 (bfd_elf_parse_eh_frame_entries): New function.
64 (bfd_elf_gc_sections): Add Compact EH support.
65 (bfd_elf_discard_info): Likewise.
66 * elfxx-mips.c: Include dwarf2.h.
67 (_bfd_mips_elf_compact_eh_encoding): New function.
68 (_bfd_mips_elf_cant_unwind_opcode): New function.
69 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
70 (_bfd_mips_elf_cant_unwind_opcode): Declare.
71 (elf_backend_compact_eh_encoding): Define.
72 (elf_backend_cant_unwind_opcode): Define.
73 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
74 (elf_backend_cant_unwind_opcode): Provide default.
75 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
76 elf_backend_cant_unwind_opcode.
77 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
78
8ded2ddc
L
792015-05-27 H.J. Lu <hongjiu.lu@intel.com>
80
81 PR binutils/18458
82 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
83 for now binding only if pointer equality isn't needed.
84 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
85 binding only if pointer equality isn't needed.
86 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
87 section for now binding only if pointer equality isn't needed.
88 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
89 binding only if pointer equality isn't needed.
90
fca6ae69
L
912015-05-26 H.J. Lu <hongjiu.lu@intel.com>
92
93 PR binutils/18437
94 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
95 in .rel.plt/.rela.plt.
96 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
97
ce336788
JW
982015-05-19 Jiong Wang <jiong.wang@arm.com>
99
100 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
101 relocation case labels alphabetically.
102 (elfNN_aarch64_final_link_relocate): Ditto.
103 (elfNN_aarch64_tls_relax): Ditto.
104 (elfNN_aarch64_relocate_section): Ditto.
105 (elfNN_aarch64_gc_sweep_hook): Ditto.
106 (elfNN_aarch64_check_relocs): Ditto.
107 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
108 (_bfd_aarch64_elf_resolve_relocation): Ditto.
109
80de0c6d
JW
1102015-05-18 Jiong Wang <jiong.wang@arm.com>
111
112 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
113 comments.
114
25070364
L
1152015-05-16 H.J. Lu <hongjiu.lu@intel.com>
116
117 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
118 for now binding.
119 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
120 binding.
121 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
122 section for now binding.
123 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
124 binding.
125
dab394de
L
1262015-05-14 H.J. Lu <hongjiu.lu@intel.com>
127
128 * bfd.c (bfd_update_compression_header): Also write the zlib
129 header if the SHF_COMPRESSED bit cleared..
130 (bfd_check_compression_header): Return the uncompressed size.
131 * compress.c (decompress_contents): Don't skip the zlib header.
132 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
133 which doesn't have the zlib header.
134 (bfd_init_section_decompress_status): Likewise.
135 (bfd_get_full_section_contents): Updated.
136 (bfd_is_section_compressed): Likewise.
137 (bfd_is_section_compressed_with_header): Return the uncompressed
138 size.
139 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
140 * bfd-in2.h: Regenerated.
141
fdc3b1b1
JW
1422015-05-14 Jiong Wang <jiong.wang@arm.com>
143
144 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
145 check restrictions.
146
e6c9a083
MF
1472015-05-14 Max Filippov <jcmvbkbc@gmail.com>
148
149 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
150 as GOT reference when plt.refcount is not positive.
151
a3747075
L
1522015-05-12 H.J. Lu <hongjiu.lu@intel.com>
153
154 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
155 for the first .plt entry only if needed.
156 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
157
bf64a951
L
1582015-05-11 H.J. Lu <hongjiu.lu@intel.com>
159
160 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
161 (ALL_MACHINES_CFILES): Likewise.
162 * archures.c (bfd_mach_iamcu): New.
163 (bfd_mach_i386_iamcu): Likewise.
164 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
165 (bfd_iamcu_arch): Likewise.
166 (bfd_archures_list): Add &bfd_iamcu_arch.
167 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
168 i386_elf32_vec.
169 (targ_archs): Add bfd_iamcu_arch if needed.
170 * configure.ac: Support iamcu_elf32_vec.
171 * cpu-iamcu.c: New file.
172 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
173 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
174 * targets.c (iamcu_elf32_vec): New.
175 (_bfd_target_vector): Add iamcu_elf32_vec.
176 * Makefile.in: Regenerated.
177 * bfd-in2.h: Likewise.
178 * configure: Likewise.
179
22abe556
L
1802015-05-11 H.J. Lu <hongjiu.lu@intel.com>
181
182 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
183
4b71eec6
L
1842015-05-10 H.J. Lu <hongjiu.lu@intel.com>
185
186 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
187 and output_bfd with abfd.
188 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
189
9ac47a43
TS
1902015-05-06 Toni Spets <toni.spets@iki.fi>
191
192 PR ld/18372
193 * peXXigen.c (rsrc_process_section): Skip discarded resource
194 sections.
195
b633b725
L
1962015-05-01 H.J. Lu <hongjiu.lu@intel.com>
197
198 * config.bfd: Support i[3-7]86-*-elf*.
199
914082d1
L
2002015-04-30 H.J. Lu <hongjiu.lu@intel.com>
201
202 * elf32-i386.c (elf_backend_post_process_headers): Undef for
203 Solaris 2.
204
153a2776
NC
2052015-04-30 Nick Clifton <nickc@redhat.com>
206
207 PR 18317
208 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
209 mep_reloc.
210 (mep_reloc): Delete unused function.
211
a93d5cb1
NC
2122015-04-29 Nick Clifton <nickc@redhat.com>
213
214 PR 17099
215 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
216 relocs.
217
643f7afb
AK
2182015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
219
220 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
221 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
222 elf_s390_merge_obj_attributes.
223 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
224
b53b1bed
JW
2252015-04-24 Jiong Wang <jiong.wang@arm.com>
226
227 PR ld/18270
228 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
229 GOT_NORMAL for both sgot/srelgot section.
230 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
231 and generate necessary runtime relocation for GOT entry.
232
69b52ab8
L
2332015-04-24 H.J. Lu <hongjiu.lu@intel.com>
234
235 PR binutils/18209
236 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
237
dcbd20eb
JW
2382015-04-24 Jiong Wang <jiong.wang@arm.com>
239
240 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
241 PC-relative relocation for external symbol.
242
de13ef81
NC
2432015-04-24 Nick Clifton <nickc@redhat.com>
244
245 PR 18313
246 * compress.c (decompress_contents): Zero initialse the z_stream
247 structure.
248
b1fa9dd6
NC
2492015-04-24 Nick Clifton <nickc@redhat.com>
250
251 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
252 local labels to include local labels with a numeric suffix and
253 fake symbols.
254
9361e630
L
2552015-04-24 H.J. Lu <hongjiu.lu@intel.com>
256
257 PR binutils/18316
258 * section.c (SEC_MEP_VLIW): New.
259 * bfd-in2.h: Regenerated.
260
3e19fb8f
L
2612015-04-23 H.J. Lu <hongjiu.lu@intel.com>
262
263 PR ld/18277
264 * compress.c (bfd_compress_section_contents): Remove the
265 write_compress argument.
266 (bfd_init_section_compress_status): Updated.
267 (bfd_compress_section): Likewise.
268 * elf.c (_bfd_elf_set_reloc_sh_name): New.
269 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
270 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
271 _bfd_elf_set_reloc_sh_name.
272 (elf_fake_sections): Don't rename DWARF debug section for
273 linker output if it will be compressed. Instead, set
274 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
275 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
276 sh_name != (unsigned int) -1. Don't finalize nor assign
277 shstrtab section here. Delay setting output section names to
278 _bfd_elf_write_object_contents.
279 (_bfd_elf_compute_section_file_positions): Update comments on
280 sh_offset for shstrtab section.
281 (assign_file_positions_for_non_load_sections): Set sh_offset to
282 -1 for shstrtab section.
283 (assign_file_positions_except_relocs): Likewise.
284 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
285 when compressing DWARF debug sections. Place shstrtab section
286 after DWARF debug sections have been compressed.
287 (_bfd_elf_write_object_contents): Setting sh_name for output
288 sections.
289
f6fe1ccd
L
2902015-04-23 H.J. Lu <hongjiu.lu@intel.com>
291
292 PR binutils/18209
293 * bfd.c (bfd): Add is_linker_input.
294 * elf.c (convert_debug_to_zdebug): New.
295 (convert_zdebug_to_debug): Likewise.
296 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
297 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
298 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
299 instead of a pointer to section.
300 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
301 is set.
302 * section.c (SEC_ELF_RENAME): New.
303 * bfd-in2.h: Regenerated.
304
a27e685f
AM
3052015-04-23 Alan Modra <amodra@gmail.com>
306
307 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
308 (ppc64_elf_next_toc_section): Align multi-got toc base.
309 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
2f0c68f2
CM
310=======
3112015-05-04 Catherine Moore <clm@codesourcery.com>
312
313 * elfxx-target.h: Add missing #endif.
314
3152015-04-22 Catherine Moore <clm@codesourcery.com>
316
317 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_entry): Don't write
318 the .eh_frame_entry section if the corresponding text section is marked
319 with SEC_EXCLUDE.
320
3212015-04-22 Catherine Moore <clm@codesourcery.com>
322 Bernd Schmidt <bernds@codesourcery.com>
323 Paul Brook <paul@codesourcery.com>
324
325 * bfd-in2.h (SEC_INFO_TYPE_EH_FRAME_ENTRY): Define.
326 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
327 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
328 (dwarf_eh_frame_hdr_info): New struct.
329 (compact_eh_frame_hdr_info): New struct.
330 (eh_frame_hdr_info): Separate dwarf and compact fields.
331 (elf_backend_data): Add compact_eh_encoding and cant_unwind_opcode
332 fields.
333 (bfd_elf_section_data): Add eh_frame_entry field.
334 (elf_section_eh_frame_entry): Define.
335 (bfd_elf_parse_eh_frame_entries): Declare.
336 (_bfd_elf_parse_eh_frame_entry): Declare.
337 (_bfd_elf_end_eh_frame_parsing): Declare.
338 (_bfd_elf_write_section_eh_frame_entry): Declare.
339 (_bfd_elf_fixup_eh_frame_hdr): Declare.
340 (_bfd_elf_eh_frame_entry_present): Declare.
341 (_bfd_elf_section_for_symbol): Declare.
342 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
343 (bfd_elf_record_eh_frame_entry): New function.
344 (_bfd_elf_parse_eh_frame_entry): New function.
345 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
346 (cmp_eh_frame_hdr): New function.
347 (add_eh_frame_hdr_terminator): New function.
348 (_bfd_elf_end_eh_frame_parsing): New function.
349 (find_merged_cie): Update hdr_info field references.
350 (_bfd_elf_discard_section_eh_frame): Likewise.
351 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
352 Add Compact EH support.
353 (_bfd_elf_eh_frame_entry_present): New function.
354 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
355 (_bfd_elf_write_section_eh_frame_entry): New function.
356 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
357 (_bfd_elf_write_section_eh_frame): Likewise.
358 (_bfd_elf_fixup_eh_frame_hdr): New function.
359 (write_compact_eh_frame_hdr): New function.
360 (_bfd_elf_write_section_eh_frame_hdr): Compact EH support. Update
361 hdr_info field references.
362 * elflink.c (_bfd_elf_section_for_symbol): New function.
363 (elf_section_ignore_discarded_relocs, elf_link_input_bfd):
364 Handle SEC_INFO_TYPE_EH_FRAME_ENTRY.
365 (bfd_elf_final_link): Call _bfd_elf_fixup_eh_frame_hdr.
366 (_bfd_elf_gc_mark): Support Compact EH.
367 (bfd_elf_parse_eh_frame_entries): New function.
368 (bfd_elf_gc_sections): Support Compact EH.
369 (bfd_elf_discard_info): Likewise.
370 * elfxx-mips.c (_bfd_mips_elf_compact_eh_encoding): New function.
371 (_bfd_mips_elf_cant_unwind_opcode): New function.
372 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
373 (_bfd_mips_elf_cant_unwind_opcode): Declare.
374 (elf_backend_compact_eh_encoding): Define.
375 (elf_backend_cant_unwind_opcode): Define.
376 * elfxx-target.h (elf_backend_compact_eh_encoding):
377 Provide default definition.
378 (elf_backend_cant_unwind_opcode): Provide default definition.
379 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Define.
380>>>>>>> 2015-05-04 Catherine Moore <clm@codesourcery.com>
a27e685f 381
d5597ebc
L
3822015-04-22 H.J. Lu <hongjiu.lu@intel.com>
383
384 PR ld/18289
385 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
386 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
387 (elf_i386_create_dynamic_sections): Always allow copy relocs for
388 building executables.
389 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
390 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
391 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
392 PIE and R_386_GOTOFF.
393 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
394
e9702963
L
3952015-04-20 H.J. Lu <hongjiu.lu@intel.com>
396
397 * elf.c (assign_section_numbers): Always set up sh_name.
398
e06efbf1
L
3992015-04-20 H.J. Lu <hongjiu.lu@intel.com>
400
401 * elf.c (assign_file_positions_for_non_load_sections): Iterate
402 sections by pointer.
403 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
404
0ce398f1
L
4052015-04-14 H.J. Lu <hongjiu.lu@intel.com>
406
407 * bfd-in.h (compressed_debug_section_type): New.
408 * compress.c (bfd_compress_section_contents): Add an argument
409 for linker write compression and always generate .zdebug_*
410 section when linking.
411 (bfd_init_section_compress_status): Pass FALSE to
412 bfd_compress_section_contents.
413 (bfd_compress_section): New function.
414 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
415 on DWARF debug sections if COMPRESS_DEBUG is set and rename
416 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
417 (assign_file_positions_for_non_load_sections): Set sh_offset
418 to -1 if SEC_ELF_COMPRESS is set.
419 (assign_file_positions_except_relocs): Likwise.
420 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
421 (_bfd_elf_assign_file_positions_for_non_load): This. Change
422 return time to bfd_boolean. Compress the section if
423 SEC_ELF_COMPRESS is set.
424 (_bfd_elf_write_object_contents): Updated.
425 (_bfd_elf_set_section_contents): Write section contents to
426 the buffer if SEC_ELF_COMPRESS is set.
427 * merge.c: Include "elf-bfd.h".
428 (sec_merge_emit): Add arguments for contents and offset. Write
429 to contents with offset if contents isn't NULL.
430 (_bfd_write_merged_section): Write section contents to the
431 buffer if SEC_ELF_COMPRESS is set. Pass contents and
432 output_offset to sec_merge_emit.
433 * elflink.c (bfd_elf_final_link): Allocate the buffer for
434 output section contents if SEC_ELF_COMPRESS is set.
435 * section.c (SEC_ELF_COMPRESS): New.
436 * bfd-in2.h: Regenerated.
437
95b57ade
AM
4382015-04-15 Alan Modra <amodra@gmail.com>
439
440 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
441
6ff71e76
NC
4422015-04-14 Nick Clifton <nickc@redhat.com>
443
444 * elf32-rl78.c (RL78_OP_REL): New macro.
445 (rl78_elf_howto_table): Use it for complex relocs.
446 (get_symbol_value): Handle the cases when the info or status
447 arguments are NULL.
448 (get_romstart): Cache the status returned by get_symbol_value.
449 (get_ramstart): Likewise.
450 (RL78_STACK_PUSH): Generate an error message if the stack
451 overflows.
452 (RL78_STACK_POP): Likewise for underflows.
453 (rl78_compute_complex_reloc): New function. Contains the basic
454 processing code for all RL78 complex relocs.
455 (rl78_special_reloc): New function. Provides special reloc
456 handling for complex relocs.
457 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
458 (rl78_offset_for_reloc): Likewise.
459
889c2a67
L
4602015-04-14 H.J. Lu <hongjiu.lu@intel.com>
461
462 PR ld/pr17709
463 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
464 info->extern_protected_data when warning copy relocs against
465 protected symbols.
466 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
467 when checking protected non-function symbols.
468
97de3545
JB
4692015-04-13 John Baldwin <jhb@FreeBSD.org>
470
471 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
472 FreeBSD.
473 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
474
f0bf6bfd
L
4752015-04-13 H.J. Lu <hongjiu.lu@intel.com>
476
477 PR ld/18250
478 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
479 if the object has been claimed by plugin.
480
e3c0e327
L
4812015-04-11 H.J. Lu <hongjiu.lu@intel.com>
482
483 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
484 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
485 protected data symbol when building shared library.
486 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
487 R_X86_64_GOTOFF64 against undefined symbol and replace
488 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
489 R_X86_64_GOTOFF64 against protected data symbol when building
490 shared library.
491
3d949995
L
4922015-04-10 H.J. Lu <hongjiu.lu@intel.com>
493
494 PR ld/pr17709
495 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
496 against protected data symbol when building shared library.
497 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
498 R_X86_64_GOTOFF64 against protected data symbol when building
499 shared library.
500
f7483970
L
5012015-04-10 H.J. Lu <hongjiu.lu@intel.com>
502
503 PR ld/pr15228
504 PR ld/pr17709
505 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
506 * elf32-i386.c (elf_backend_extern_protected_data): New.
507 Defined to 1.
508 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
509 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
510 copy relocs against protected symbols if extern_protected_data
511 is true.
512 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
513 non-function symbols if extern_protected_data is true.
514 * elfxx-target.h (elf_backend_extern_protected_data): New.
515 Default to 0.
516 (elfNN_bed): Initialize extern_protected_data with
517 elf_backend_extern_protected_data.
518
030aeb75
L
5192015-04-10 H.J. Lu <hongjiu.lu@intel.com>
520
521 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
522 and free with bfd_alloc and bfd_release on compressed buffer.
523 Release buffer if compressed section isn't smaller.
524
d07a1b05
AM
5252015-04-10 Alan Modra <amodra@gmail.com>
526
527 PR ld/18222
528 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
529 on adding a protected visibility variable to .dynbss.
530
8d2ea2a8
AM
5312015-04-10 Alan Modra <amodra@gmail.com>
532
533 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
534 PR ld/pr15228
535 PR ld/pr17709
536 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
537 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
538 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
539 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
540 extern_protected_data test.
541 (_bfd_elf_symbol_refs_local_p): Likewise.
542 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
543 (elfNN_bed): Delete elf_backend_extern_protected_data init.
544
18ece1de
L
5452015-04-09 H.J. Lu <hongjiu.lu@intel.com>
546
547 * compress.c (bfd_compress_section_contents): Update comments.
548 (bfd_init_section_decompress_status): Likewise.
549 (bfd_init_section_compress_status): Likewise.
550
cd6faa73
L
5512015-04-09 H.J. Lu <hongjiu.lu@intel.com>
552
553 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
554 object_flags.
555 (TARGET_LITTLE_SYM): Likewise.
556
19424843
MF
5572015-04-09 Max Filippov <jcmvbkbc@gmail.com>
558
559 * elf32-xtensa.c (splay-tree.h): include header.
560 (text_action_struct): drop next pointer.
561 (text_action_list_struct): drop head pointer, add count and
562 tree fields.
563 (find_fill_action): instead of linear search in text_action_list
564 search in the tree.
565 (text_action_compare, action_first, action_next): new functions.
566 (text_action_add, text_action_add_literal): instead of linear
567 search and insertion insert new node into the tree.
568 (removed_by_actions): pass additional parameter: action_list,
569 use it to traverse the tree.
570 (offset_with_removed_text): pass additional action_list parameter
571 to removed_by_actions.
572 (map_action_fn_context): new typedef.
573 (map_action_fn_context_struct): new structure.
574 (map_action_fn): new function.
575 (map_removal_by_action): use splay_tree_foreach to build map.
576 (find_insn_action): replace linear search in text_action_list
577 with series of splay_tree_lookups.
578 (print_action, print_action_list_fn): new functions.
579 (print_action_list): use splay_tree_foreach.
580 (init_xtensa_relax_info): drop action_list.head initialization.
581 Initialize the tree.
582 (compute_text_actions): use non-zero action_list_count instead of
583 non-NULL action list.
584 (xlate_map_context): new typedef.
585 (xlate_map_context_struct): new structure.
586 (xlate_map_fn): new function.
587 (build_xlate_map): use splay_tree_foreach to build map.
588 (action_remove_bytes_fn): new function.
589 (relax_section): use zero action_list_count instead of NULL
590 action list. Use splay_tree_foreach to count final section size.
591 Drop unused variable 'removed'.
592
5932015-04-09 Max Filippov <jcmvbkbc@gmail.com>
594
595 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
596 (removed_literal_map_entry_struct): new structure.
597 (removed_literal_list_struct): add new fields: n_map and map.
598 (map_removed_literal, removed_literal_compare): new functions.
599 (find_removed_literal): build index array for literals ordered
600 by VMA, use binary search to find removed literal.
601
6022015-04-09 Max Filippov <jcmvbkbc@gmail.com>
603
604 * elf32-xtensa.c (removal_by_action_entry_struct,
605 removal_by_action_map_struct): new structures.
606 (removal_by_action_entry, removal_by_action_map): new typedefs.
607 (text_action_list_struct): add new field: map.
608 (map_removal_by_action, removed_by_actions_map,
609 offset_with_removed_text_map): new functions.
610 (relax_section): replace offset_with_removed_text with
611 offset_with_removed_text_map.
612 (translate_reloc, relax_property_section, relax_section_symbols):
613 replace removed_by_actions with removed_by_actions_map.
614
6152015-04-09 Max Filippov <jcmvbkbc@gmail.com>
616
617 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
618 reloc_range): new typedef.
619 (reloc_range_list_struct, reloc_range_list_entry_struct,
620 reloc_range_struct): new structures.
621 (reloc_range_compare, build_reloc_ranges,
622 reloc_range_list_append, reloc_range_list_remove,
623 reloc_range_list_update_range, free_reloc_range_list): new
624 functions.
625 (compute_text_actions): precompute relocation opcodes before the
626 loop. Add relevant_relocs variable, initialize it before the
627 loop, pass it to the check_section_ebb_pcrels_fit.
628 (check_section_ebb_pcrels_fit): add new parameter:
629 relevant_relocs. Update address range in the relevant_relocs if
630 it's non-NULL and iterate only over relevant relocations.
631
3525236c
NC
6322015-04-09 Nick Clifton <nickc@redhat.com>
633
634 * elf32-rx.c (describe_flags): Report the settings of the string
635 insn using bits.
636 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
637 using bits.
638
51509926
L
6392015-04-08 H.J. Lu <hongjiu.lu@intel.com>
640
641 * compress.c (bfd_compress_section_contents): Work around a GCC
642 uninitialized warning bug fixed in GCC 4.7.
643
151411f8
L
6442015-04-08 H.J. Lu <hongjiu.lu@intel.com>
645
646 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
647 bit.
648 * bfd.c (bfd::flags): Increase size to 18 bits.
649 (BFD_COMPRESS_GABI): New.
650 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
651 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
652 (bfd_update_compression_header): New fuction.
653 (bfd_check_compression_header): Likewise.
654 (bfd_get_compression_header_size): Likewise.
655 (bfd_is_section_compressed_with_header): Likewise.
656 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
657 (bfd_compress_section_contents): Return the uncompressed size if
658 the full section contents is compressed successfully. Support
659 converting from/to .zdebug* sections.
660 (bfd_get_full_section_contents): Call
661 bfd_get_compression_header_size to get compression header size.
662 (bfd_is_section_compressed): Renamed to ...
663 (bfd_is_section_compressed_with_header): This. Add a pointer
664 argument to return compression header size.
665 (bfd_is_section_compressed): Use it.
666 (bfd_init_section_decompress_status): Call
667 bfd_get_compression_header_size to get compression header size.
668 Return FALSE if uncompressed section size is 0.
669 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
670 from/to .zdebug* sections.
671 * bfd-in2.h: Regenerated.
672
87070c08
AM
6732015-04-07 Alan Modra <amodra@gmail.com>
674
675 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
676 mapped to output .got section.
677
d3e454b9
AM
6782015-04-07 Alan Modra <amodra@gmail.com>
679
680 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
681 and has_addr16_lo. Make has_sda_refs a bitfield.
682 (ppc_elf_check_relocs): Set new flags.
683 (ppc_elf_link_hash_table_create): Update default_params.
684 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
685 where we won't be making .dynbss entries or editing code. Set
686 params->pic_fixup when we'll edit code for protected var access.
687 (allocate_dynrelocs): Allocate got entry for edited code and
688 discard dyn_relocs.
689 (struct ppc_elf_relax_info): Add picfixup_size.
690 (ppc_elf_relax_section): Rename struct one_fixup to struct
691 one_branch_fixup. Rename fixups to branch_fixups. Size space for
692 pic fixups.
693 (ppc_elf_relocate_section): Edit non-PIC accessing protected
694 visibility variables to PIC. Don't emit dyn_relocs for code
695 we've edited.
696 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
697
ffa54770
NC
6982015-04-07 Nick Clifton <nickc@redhat.com>
699
700 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
701 local labels as local.
702
4aa90cc0
L
7032015-04-06 H.J. Lu <hongjiu.lu@intel.com>
704
705 * compress.c (get_uncompressed_size): Removed.
706 (bfd_compress_section_contents): Use bfd_putb64 to write
707 uncompressed section size.
708 (bfd_init_section_decompress_status): Replace
709 get_uncompressed_size with bfd_getb64.
710
68f5ff89
L
7112015-04-04 H.J. Lu <hongjiu.lu@intel.com>
712
713 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
714 SHF_COMPRESSED bit if not decompress.
715
8bed4e0f
L
7162015-04-04 H.J. Lu <hongjiu.lu@intel.com>
717
718 * compress.c (get_uncompressed_size): New. Extracted from ...
719 (bfd_init_section_decompress_status): This. Use it.
720
15c7659f
AT
7212015-04-02 Andrew Turner <andrew@freebsd.org>
722
723 * config.bfd: Add aarch64-*-freebsd* target triple.
724
39f3de7c
L
7252015-04-02 H.J. Lu <hongjiu.lu@intel.com>
726
727 * configure: Regenerated.
728
4106101c
MS
7292015-04-01 Tejas Belagod <tejas.belagod@arm.com>
730 Marcus Shawcroft <marcus.shawcroft@arm.com>
731 Jiong Wang <jiong.wang@arm.com>
732
733 * bfd-in.h (bfd_elf64_aarch64_set_options)
734 (bfd_elf32_aarch64_set_options): Add parameter.
735 * bfd-in2.h: Regenerated.
736 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
737 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
738 (_bfd_aarch64_erratum_843419_stub_name)
739 (_bfd_aarch64_erratum_843419_fixup)
740 (_bfd_aarch64_erratum_843419_scan)
741 (_bfd_aarch64_erratum_843419_branch_to_stub)
742 (_bfd_aarch64_erratum_843419_p): Define.
743 (enum elf_aarch64_stub_type): Define
744 aarch64_stub_erratum_843419_veneer.
745 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
746 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
747 and fix_erratum_843419_adr.
748 (stub_hash_newfunc): Initialize adrp_offset;
749 (_bfd_aarch64_add_stub_entry_after): Define.
750 (aarch64_map_one_stub, aarch64_build_one_stub)
751 (aarch64_size_one_stub): Handle
752 aarch64_stub_erratum_843419_veneer.
753 (_bfd_aarch64_resize_stubs): Round stub section size.
754 (elfNN_aarch64_size_stubs): Add scan for 843419.
755 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
756 fix_erratum_843419 and fix_erratum_843419_adr.
757 (struct erratum_835769_branch_to_stub_data): Add info.
758 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
759 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
760 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
761 (_bfd_aarch64_sign_extend): Define.
762 (reencode_adr_imm): Remove static. Rename to:
763 (_bfd_aarch64_reencode_adr_imm): Define.
764 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
765 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
766 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
767 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
768 Define.
769
afa59b79
L
7702015-04-01 H.J. Lu <hongjiu.lu@intel.com>
771
772 * configure: Regenerated.
773
6036f486
ES
7742015-03-31 Ed Schouten <ed@nuxi.nl>
775
776 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
777 for x86_64-*-cloudabi*.
778 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
779 * configure: Regenerated.
780 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
781 (TARGET_LITTLE_NAME): Likewise.
782 (ELF_OSABI): Likewise.
783 (elf64_bed): Likewise.
784 * targets.c (x86_64_elf64_cloudabi_vec): New.
785 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
786
9ae46699
L
7872015-03-31 H.J. Lu <hongjiu.lu@intel.com>
788
789 * configure.ac: Revert the AM_ZLIB change.
790 * Makefile.in: Regenerated.
791 * aclocal.m4: Likewise.
792 * configure: Likewise.
793 * doc/Makefile.in: Likewise.
794
bd53a53a
L
7952015-03-30 H.J. Lu <hongjiu.lu@intel.com>
796
797 PR ld/18169
798 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
799 (_bfd_elf_get_reloc_section): New.
800 * elf.c (_bfd_elf_get_reloc_section): Likewise.
801 (assign_section_numbers): Call get_reloc_section to look up the
802 section the relocs apply.
803 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
804 (elfNN_bed): Initialize get_reloc_section with
805 elf_backend_get_reloc_section.
806
243340ad
L
8072015-03-29 H.J. Lu <hongjiu.lu@intel.com>
808
809 * Makefile.am (ZLIB): New.
810 (ZLIBINC): Likewise.
811 (AM_CFLAGS): Add $(ZLIBINC).
812 (libbfd_la_LIBADD): Add $(ZLIB).
813 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
814 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
815 (bfd_compress_section_contents): Likewise.
816 (bfd_get_full_section_contents): Likewise.
817 (bfd_init_section_decompress_status): Likewise.
818 (bfd_init_section_compress_status): Likewise.
b51724e8 819 * configure.ac (AM_ZLIB): Removed.
243340ad
L
820 (zlibdir): New. AC_SUBST.
821 (zlibinc): Likewise.
822 Add --with-system-zlib.
823 * Makefile.in: Regenerated.
824 * acinclude.m4: Likewise.
825 * config.in: Likewise.
826 * configure: Likewise.
827 * doc/Makefile.in: Likewise.
828
b8417128
AM
8292015-03-27 Alan Modra <amodra@gmail.com>
830
831 PR ld/15228
832 PR ld/18167
833 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
834 protected_def when symbol section is read-only. Adjust all calls.
835 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
836
93ca8569
TB
8372015-03-26 Tejas Belagod <tejas.belagod@arm.com>
838
839 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
840 _bfd_final_link_relocate with aarch64_relocate.
841
b19a8f85
L
8422015-03-26 H.J. Lu <hongjiu.lu@intel.com>
843
844 PR ld/18160
845 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
846 (bfd_elf_gc_sections): Likewise.
847
61865519
MS
8482015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
849
850 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
851 size for initial branch.
852 (elfNN_aarch64_build_stubs): Write initial branch.
853 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
854 mapping symbol on initial branch.
855
d9ced15d 8562015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
857
858 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
859 Update erratum count.
860
d422d1c4
SKS
8612015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
862
863 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
864 first matching debug section.
865
8d001214
L
8662015-03-24 H.J. Lu <hongjiu.lu@intel.com>
867
868 PR gas/18087
869 * compress.c (bfd_compress_section_contents): Don't write the
870 zlib header and set contents as well as compress_status if
871 compression didn't make the section smaller.
872 (bfd_init_section_compress_status): Don't check compression
873 size here.
874
fc42baf3
NC
8752015-03-24 Nick Clifton <nickc@redhat.com>
876
877 PR binutils/17512
878 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
879 range auxillary sections.
880
fc6d53be
MS
8812015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
882
883 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
884 code into:
885 (_bfd_aarch64_get_stub_for_link_section): Define.
886
30068a6d
MS
8872015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
888
889 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
890 update of section_group[].stub_sec.
891
5421cc6e
MS
8922015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
893
894 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
895 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
896 Delete fixes, fix_table_size and associated code. Call
897 _bfd_aarch64_add_stub_entry_in_group. Rename to...
898 (bfd_aarch64_erratum_835769_scan): Define.
899 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
900 erratum_835769_fix_table_size, i and associated code. Relocate
901 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
902 correction. Delete construction of stub entry from
903 erratum_835769_fixes array.
904
e572930b
MS
9052015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
906
907 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
908 _bfd_aarch64_add_stub_entry_in_group.
909
8131c122
AM
9102015-03-24 Alan Modra <amodra@gmail.com>
911
912 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
913 stubs, even those for undefined weak symbols. Otherwise, don't
914 report relocation overflow on branches to undefined strong
915 symbols. Fix memory leak.
916 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
917 overflow on branches to undefined strong symbols.
918
c53ed7cf
KS
9192015-03-23 Keith Seitz <keiths@redhat.com>
920
921 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
922 missing ';'.
923
94a75bde
MS
9242015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
925
926 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
927 construction into...
928 (_bfd_aarch64_erratum_835769_stub_name): Define.
929
13f622ec
MS
9302015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
931
932 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
933 stub resize code into...
934 (bfd_aarch64_resize_stubs): Define.
935
66585675
MS
9362015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
937
938 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
939 creation code into...
940 (bfd_aarch64_create_stub_section): Define.
941
ef857521
MS
9422015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
943
944 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
945 from elf_aarch64_create_or_find_stub_sec.
946 (_bfd_aarch64_add_stub_entry_in_group): Rename from
947 elfNN_aarch64_add_stub. Call
948 _bfd_aarch64_create_or_find_stub_sec.
949 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
950 _bfd_aarch64_add_stub_entry_in_group.
951
2144188d
MS
9522015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
953
954 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
955 sense of boolean return.
956 (elfNN_aarch64_size_stubs): Adjust for above.
957
4c77202d
MS
9582015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
959
960 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
961 Remove unused parameter.
962 (elfNN_aarch64_size_stubs): Adjust for above.
963
9b9971aa
MS
9642015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
965
966 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
967
e2cdef47
MS
9682015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
969
970 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
971 (num_aarch64_erratum_835769_fixes): Remove.
972 (elfNN_aarch64_size_stubs): Remove assignments to above.
973
3d14faea
MS
9742015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
975
23956543
MS
976 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
977 to rt2.
3d14faea
MS
978 (aarch64_erratum_seqeunce): Rename rtn to rt2.
979
f872121a
MS
9802015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
981
982 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
983
1740ba0c
NC
9842015-03-19 Nick Clifton <nickc@redhat.com>
985
986 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
987 the RL78 core based upon the flags.
988 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
989 flags.
990 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
991 (elf32_rl78_machine): Always return bfd_mach_rl78.
992
e2575e05
NC
9932015-03-19 Nick Clifton <nickc@redhat.com>
994
995 PR 18078
996 * compress.c (bfd_compress_section_contents): Do not define this
997 function if it is not used.
998
0b0732e1
L
9992015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1000
1001 * compress.c (bfd_compress_section_contents): Make it static.
1002 * bfd/bfd-in2.h: Regenerated.
1003
27aaeda0
NC
10042015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1005
1006 PR ld/16598
1007 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1008 suitable for the AMD64.
1009
273a4985
JT
10102015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1011 Nick Clifton <nickc@redhat.com>
1012
1013 PR binutils/18087
1014 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1015 debug section's name if the section was actually compressed.
1016 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1017 * compress.c (bfd_init_section_compress_status): Do not compress
1018 the section if doing so would make it bigger. In such cases leave
1019 the section alone and return COMPRESS_SECTION_NONE.
1020
c4b0b099
AM
10212015-03-17 Alan Modra <amodra@gmail.com>
1022
1023 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1024 on nothing to do, before malloc of returned symbol array.
1025
9c761a55
NC
10262015-03-16 Nick Clifton <nickc@redhat.com>
1027
1028 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1029 stored in the elf_section_data structure then load them as
1030 necessary.
1031
b9005ba7
AK
10322015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1033
1034 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1035 relocs against code sections.
1036 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1037 * elf64-s390.c: Likewise.
1038
1079403c
AM
10392015-03-11 Alan Modra <amodra@gmail.com>
1040
1041 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1042 reverse order. Account for larger size of __tls_get_addr_opt stub.
1043
a5721edd
JW
10442015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1045
1046 PR ld/16572
1047 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1048 ELF_ARM_HASENTRY.
1049 (elf32_arm_print_private_bfd_data): Likewise.
1050
65164438
NC
10512015-03-06 Nick Clifton <nickc@redhat.com>
1052
1053 PR binutils/17765
1054 * elflink.c (put_value): Like previous delta, but for the 32-bit
1055 case.
1056
41cd1ad1
NC
10572015-03-05 Nick Clifton <nickc@redhat.com>
1058
1059 PR binutils/17765
1060 * elflink.c (put_value): Avoid using an undefined shift
1061 operation.
1062
ca3fe95e
L
10632015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1064
1065 PR ld/pr15228
1066 PR ld/pr17709
1067 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1068 * elf32-i386.c (elf_backend_extern_protected_data): New.
1069 Defined to 1.
1070 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1071 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1072 copy relocs against protected symbols if extern_protected_data
1073 is true.
1074 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1075 non-function symbols if extern_protected_data is true.
1076 * elfxx-target.h (elf_backend_extern_protected_data): New.
1077 Default to 0.
1078 (elfNN_bed): Initialize extern_protected_data with
1079 elf_backend_extern_protected_data.
1080
425bd9e1
NC
10812015-03-05 Nick Clifton <nickc@redhat.com>
1082
1083 PR binutils/18025
1084 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1085 lookup fails, check for an address bias in the dwarf info, and if
1086 one exists, retry the lookup with the biased value.
1087 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1088 Determines if a bias exists bewteen the addresses of functions
1089 based on DWARF information vs symbol table information.
1090 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1091 * libbfd.h: Regenerate.
1092
8ef229f3
MS
10932015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1094
1095 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1096 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1097 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1098
8e2fe09f
MS
10992015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1100
1101 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1102 (aarch64_size_one_stub): Likewise.
1103 (aarch64_map_one_stub): Likewise.
1104
df88b702
AA
11052015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1106
1107 * cpu-s390.c (N): New macro.
1108 (bfd_s390_31_arch): New. Define only if default target word size
1109 is 64 bits. Otherwise define...
1110 (bfd_390_64_arch): ...this. Make static.
1111 (bfd_s390_arch): Define according to the default target word size.
1112 Let the 'next' field point to the alternate arch.
1113
e09ab7ac
RS
11142015-03-04 Richard Sandiford <richard.sandiford@arm.com>
1115
1116 PR gas/17843
1117 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1118 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1119 to be used with MOVK rather than MOVZ.
1120
71eef2bd
DD
11212015-03-03 DJ Delorie <dj@redhat.com>
1122
1123 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
1124 there's a symbol.
1125
f01f1741
AM
11262015-02-28 Alan Modra <amodra@gmail.com>
1127
1128 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
1129 not PLT_NEW.
1130
c1d11331
L
11312015-02-27 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * elf32-i386.c (need_convert_mov_to_lea): New.
1134 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
1135 (elf_i386_convert_mov_to_lea): Return TRUE if
1136 need_convert_mov_to_lea is unset.
1137 * elf64-x86-64.c (need_convert_mov_to_lea): New.
1138 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
1139 (elf_x86_64_convert_mov_to_lea): Return TRUE if
1140 need_convert_mov_to_lea is unset.
1141
cdb602b1
NC
11422015-02-27 Nick Clifton <nickc@redhat.com>
1143
1144 PR binutils/17910
1145 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
1146 string length overflow when the string table length is actually
1147 set.
1148
96c20bc1
MS
11492015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
1150
1151 * bfd/bfd-in2.h: Regenerate.
1152 * bfd/libbfd.h: Regenerate.
1153
1ada945d
MS
11542015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1155
1156 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
1157 TLSDESC_LD_PREL19 field width and masks.
1158 (aarch64_tls_transition_without_check)
1159 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1160 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1161 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1162 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
1163 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1164 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1165
389b8029
MS
11662015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1167
73920eed
MS
1168 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
1169 tests.
389b8029
MS
1170 (aarch64_tls_transition_without_check)
1171 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1172 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1173 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1174 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
1175 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1176 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1177 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1178
3c12b054
MS
11792015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1180
1181 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
1182 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
1183 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1184 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1185 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1186 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
1187 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1188 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1189 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1190
043bf05a
MS
11912015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1192
1193 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
1194 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
1195 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
1196 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
1197 (elfNN_aarch64_check_relocs): Handle
1198 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
1199
1200 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1201 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1202
7366006f
MS
12032015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1204
1205 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
1206
07875fbc
MS
12072015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1208
1209 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
1210 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
1211 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
1212 width.
1213
49d8f92c
MS
12142015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1215
1216 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
1217 field width.
1218
c86934ce
NC
12192015-02-26 Nick Clifton <nickc@redhat.com>
1220
1221 PR binutils/17512
1222 * coffcode.h (coff_compute_section_file_positions): Report
1223 negative page sizes.
1224 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
1225 (assign_file_positions_for_non_load_sections): Replace assertion
1226 with an error message.
1227 (rewrite_elf_program_header): Handle excessive segment
1228 alignments.
1229 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
1230 (bfd_mach_o_read_section_64): Likewise.
1231 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
1232 print a bfd name, not %A.
1233
bd4d2eaa
AM
12342015-02-26 Alan Modra <amodra@gmail.com>
1235
1236 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
1237 thread-safe stubs for iplt.
1238 (build_tls_get_addr_stub): Restore r2 immediately after call.
1239
99654aaf
TG
12402015-02-26 Terry Guo <terry.guo@arm.com>
1241
1242 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
1243 merge Tag_ABI_HardFP_use.
1244
a127494f
AM
12452015-02-26 Alan Modra <amodra@gmail.com>
1246
1247 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
1248 Use text relocs rather than giving an error on trying to use
1249 .dynbss for protected shared lib vars.
1250 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1251
bac13f5a
AB
12522015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1253
1254 * elf32-avr.c (struct elf_avr_section_data): New structure.
1255 (struct avr_relax_info): New structure.
1256 (elf_avr_new_section_hook): New function.
1257 (struct elf_avr_section_data): Add relax_info.
1258 (get_avr_relax_info): New function.
1259 (init_avr_relax_info): New function.
1260 (elf32_avr_relax_delete_bytes): Find next property record before
1261 deleting bytes. When deleting don't move bytes beyond the next
1262 property record.
1263 (avr_elf32_assign_records_to_section): New function.
1264 (avr_property_record_compare): New function.
1265 (avr_load_all_property_sections): New function.
1266 (elf32_avr_relax_section): Load property data. After relaxing the
1267 section, move any .align directives that have enough deleted bytes
1268 before them.
1269 (bfd_elf32_new_section_hook): Define.
1270
137c83d6
AB
12712015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1272
1273 * elf32-avr.h (struct avr_property_header): New strucure.
1274 (avr_elf32_load_property_records): Declare.
1275 (avr_elf32_property_record_name): Declare.
1276 * elf32-avr.c: Add bfd_stdint.h include.
1277 (retrieve_local_syms): New function.
1278 (get_elf_r_symndx_section): New function.
1279 (get_elf_r_symndx_offset): New function.
1280 (internal_reloc_compare): New function.
1281 (struct avr_find_section_data): New structure.
1282 (avr_is_section_for_address): New function.
1283 (avr_find_section_for_address): New function.
1284 (avr_elf32_load_records_from_section): New function.
1285 (avr_elf32_load_property_records): New function.
1286 (avr_elf32_property_record_name): New function.
1287
fdd410ac
AB
12882015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1289
1290 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
1291 (AVR_PROPERTY_RECORDS_VERSION): Define.
1292 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
1293 (struct avr_property_record): New structure.
1294
685080f2
NC
12952015-02-24 Nick Clifton <nickc@redhat.com>
1296
1297 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
1298 style note entry.
1299 (v850_elf_make_note_section): New function. Creates a note
1300 section.
1301 (v850_elf_create_sections): New function. Create a note section
1302 if one is not already present.
1303 (v850_elf_set_note): New function. Adds a note to a bfd.
1304 (v850_elf_copy_private_bfd_data): New function. Copies V850
1305 notes.
1306 (v850_elf_merge_notes): New function. Merges V850 notes.
1307 (print_v850_note): New function. Displays a V850 note.
1308 (v850_elf_print_notes): New function. Displays all notes attached
1309 to a bfd.
1310 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
1311 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
1312 (v850_elf_fake_sections): Set the type of the V850 note section.
1313 * bfd-in.h (v850_elf_create_sections): Add prototype.
1314 (v850_elf_set_note): Add prototype.
1315 * bfd-in2.h: Regenerate.
1316
31593e1b
NC
13172015-02-24 Nick Clifton <nickc@redhat.com>
1318
1319 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
1320 * configure: Regenerate.
1321 * config.in: Regenerate.
1322 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
1323 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
1324 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
1325 is defined.
1326
3ad797fd
NC
13272015-02-24 Nick Clifton <nickc@redhat.com>
1328
1329 * pdp11.c (set_section_contents): Pad the .text and .data sections
1330 to their aligned sizes.
1331
5518c738
YS
13322015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
1333
1334 * config.bfd: Add h8300-*-linux.
1335 * configure.ac: Add h8300_elf32_linux_vec.
1336 * configure: Regenerate.
1337 * elf32-h8300.c: Likewise.
1338 * targets.c(_bfd_target_vector): Likewise.
1339
cb967f0d
NC
13402015-02-23 Nick Clifton <nickc@redhat.com>
1341
1342 PR 17914
1343 * cpu-w65.c: Correct typos in license notice.
1344
0f8f0c57
NC
1345 PR 17940
1346 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
1347 symbols at end of sections. Adjust function sizes.
1348
4ef9f41a
AA
13492015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
1350
1351 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
1352 (elfcore_write_s390_vxrs_high): Likewise.
1353 * elf.c (elfcore_grok_s390_vxrs_low): New function.
1354 (elfcore_grok_s390_vxrs_high): New function.
1355 (elfcore_grok_note): Call them.
1356 (elfcore_write_s390_vxrs_low): New function.
1357 (elfcore_write_s390_vxrs_high): New function.
1358 (elfcore_write_register_note): Call them.
1359
837914ee
BD
13602015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
1361
1362 PR 17995
1363 * verilog.c (verilog_write_record): Correct buffer size.
1364
cf18fda4
AM
13652015-02-19 Alan Modra <amodra@gmail.com>
1366
1367 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
1368
d983c8c5
AM
13692015-02-19 Alan Modra <amodra@gmail.com>
1370
1371 PR ld/4317
1372 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
1373 (elf_link_output_extsym): Drop local and global undefined syms.
1374 Tidy. Expand comment.
1375
2ec55de3
AM
13762015-02-17 Alan Modra <amodra@gmail.com>
1377
1378 PR ld/17975
1379 * elflink.c (struct elf_outext_info): Remove need_second_pass
1380 and second_pass.
1381 (elf_link_output_extsym): Delete code handling second forced
1382 local pass. Move code emitting NULL STT_FILE symbol later, so
1383 that it can be omitted if forced local is stripped. Don't
1384 emit the NULL STT_FILE if no file symbols have been output.
1385 (bfd_elf_final_link): Remove second forced local pass.
1386 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
1387 (ppc_elf_size_dynamic_sections): Likewise.
1388 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1389 (build_global_entry_stubs): Likewise.
1390 (ppc64_elf_build_stubs): Likewise.
1391
6dfb72b9
L
13922015-02-16 H.J. Lu <hongjiu.lu@intel.com>
1393
1394 PR ld/17975
1395 * elflink.c (elf_link_output_extsym): Only check filesym_count
1396 when outputting a NULL FILE symbol. Set second_pass_sym to
1397 h->forced_local && !h->root.linker_def.
1398
576fa883
L
13992015-02-15 H.J. Lu <hongjiu.lu@intel.com>
1400
1401 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
1402 on _TLS_MODULE_BASE_.
1403 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
1404
62f8d217
AM
14052015-02-15 Alan Modra <amodra@gmail.com>
1406
1407 * dwarf2.c (read_rangelist): Correct buffer overflow check
1408 Whitespace throughout file.
1409
ce875075
AM
14102015-02-14 Alan Modra <amodra@gmail.com>
1411
1412 PR ld/17973
1413 * bfd.c (struct bfd): Add lto_output.
1414 * linker.c (_bfd_handle_already_linked): Explicitly test for
1415 objects added by the lto plugin.
1416 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
1417 no_export flags from archive.
1418 * archive.c (open_nested_file): New function, setting lto_output
1419 and no_export, extracted from..
1420 (find_nested_archive): ..here. Flip params. Rename from
1421 _bfd_find_nested_archive.
1422 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
1423 (_bfd_look_for_bfd_in_cache): Copy no_export.
1424 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
1425 my_archive->no_export test.
1426 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
1427 Don't use the file name when adding lto_output STT_FILE sym.
1428 * bfd-in2.h: Regenerate.
1429
451dfd38
AM
14302015-02-13 Alan Modra <amodra@gmail.com>
1431
1432 PR binutils/17512
1433 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
1434 now redundant assert.
1435
dbb3fbbb
NC
14362015-02-12 Nick Clifton <nickc@redhat.com>
1437
1438 PR binutils/17512
1439 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1440 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
1441 (read_indirect_string, read_alt_indirect_string)
1442 (read_alt_indirect_ref, read_address, read_abbrevs)
1443 (read_attribute_value, read_attribute, decode_line_info)
1444 (find_abstract_instance_name, read_rangelist)
1445 (scan_unit_for_symbols, parse_comp_unit)
1446 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
1447 end pointers to reading functions and check for offsets taking
1448 pointers out of range. Replace calls to read_*_leb128 with calls
1449 to safe_read_leb128.
1450
1451 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
1452 offset.
1453 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
1454 computed file_name address being before the start of the string
1455 table.
1456
b9dc5a87
L
14572015-02-11 H.J. Lu <hongjiu.lu@intel.com>
1458
1459 PR ld/17878
1460 * bfd.c (bfd_plugin_format): New.
1461 (bfd): Add plugin_format and plugin_dummy_bfd.
1462 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
1463 argument to return TRUE if any plugin is found. Set plugin_format.
1464 (has_plugin): New.
1465 (bfd_plugin_target_p): New.
1466 (bfd_plugin_specified_p): Likewise.
1467 (bfd_plugin_target_p): Likewise.
1468 (register_ld_plugin_object_p): Likewise.
1469 (bfd_plugin_set_plugin): Set has_plugin.
1470 (load_plugin): Cache try_load_plugin result.
1471 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
1472 plugin_format.
1473 * plugin.h (bfd_plugin_target_p): New.
1474 (bfd_plugin_specified_p): Likewise.
1475 (register_ld_plugin_object_p): Likewise.
1476 * bfd-in2.h: Regenerated.
1477
55172d69
PA
14782015-02-11 Pedro Alves <palves@redhat.com>
1479
1480 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
1481 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
1482 * libbfd.h: Regenerate.
1483 * libcoff.h: Regenerate.
1484
1485 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
1486 * mach-o.h [__cplusplus]: Wrap in extern "C".
1487 * som.h [__cplusplus]: Wrap in extern "C".
1488
77ef8654
NC
14892015-02-10 Nick Clifton <nickc@redhat.com>
1490
1491 PR binutils/17512
1492 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
1493 hold the flag bits.
1494 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
1495 size and number of relocs.
1496 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
1497 codeview record.
1498 * versados.c (process_otr): Check the esdid value before using it
1499 to access the EDATA.
1500
35181b3e
EM
15012015-02-09 Ed Maste <emaste@freebsd.org>
1502
1503 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
1504 uninitialized and unused variable.
1505 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1506
989f9879
AM
15072015-02-09 Alan Modra <amodra@gmail.com>
1508
1509 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
1510 tls_sec.
1511 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1512 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
1513
ca4be51c
AM
15142015-02-09 Alan Modra <amodra@gmail.com>
1515
1516 * elflink.c: Whitespace, formatting fixes.
1517 (elf_link_input_bfd): Clarify comment.
1518 (elf_link_output_extsym): Exclude symbols in linker created
1519 sections when testing for plugin symbols.
1520
1952c5cd
L
15212015-02-07 H.J. Lu <hongjiu.lu@intel.com>
1522
1523 PR ld/17935
1524 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1525 warning for relocation in readonly section for -z text.
1526 (elf_i386_size_dynamic_sections): Likewise.
1527 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1528 (elf_x86_64_size_dynamic_sections): Likewise.
1529
9e2dec47
L
15302015-02-06 H.J. Lu <hongjiu.lu@intel.com>
1531
1532 PR ld/12365
1533 PR ld/14272
1534 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1535 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
1536 referenced from a non-IR file.
1537
5929c344
NC
15382015-02-06 Nick Clifton <nickc@redhat.com>
1539
1540 PR binutils/17512
1541 * peXXigen.c (rsrc_print_resource_entries): Add range check for
1542 addresses that wrap around the address space.
1543 (rsrc_parse_entry): Likewise.
1544
60f79275
L
15452015-02-03 H.J. Lu <hongjiu.lu@intel.com>
1546
1547 PR ld/12365
1548 PR ld/14272
1549 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1550 undefined if it is referenced from a non-IR file.
1551
64d29018
NC
15522015-02-03 Nick Clifton <nickc@redhat.com>
1553
1554 PR binutils/17512
1555 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1556 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1557 index or an out of range fdr index.
1558 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1559 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1560 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1561 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1562 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1563 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
1564 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1565 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1566 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1567 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1568 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1569 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
1570 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1571 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1572 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1573 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1574 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1575 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1576 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
1577 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1578 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1579 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1580 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1581 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1582 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1583 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1584 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1585 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1586 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
1587 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1588 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1589 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1590 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1591 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1592 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1593 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1594 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
1595 * elf32-vax.c (rtype_to_howto): Likewise.
1596 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1597 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1598 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1599 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1600 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1601 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
1602 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
1603 of range symbol indicies.
1604 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
1605 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
1606 (bfd_mach_o_build_dysymtab): Likewise.
1607 (bfd_mach_o_write_symtab_content): Set the string table size to
1608 zero upon error.
1609 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
1610 read fails.
1611 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
1612 fields.
1613 * tekhex.c (first_phase): Check for src pointer reaching end of
1614 buffer.
1615
3a635617
WN
16162015-02-03 Will Newton <will.newton@linaro.org>
1617
46b87d49
WN
1618 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
1619 Set st_value to zero for undefined symbols if the reference
1620 is weak or pointer_equality_needed is FALSE.
1621
3a635617
WN
1622 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
1623 comment discussing why we clear st_value for some symbols.
1624
0c4bd9d9
KLC
16252015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1626
1627 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
1628 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
1629
b86ac8e3
AM
16302015-01-29 Alan Modra <amodra@gmail.com>
1631
1632 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
1633 optimization. Tidy mask for GOT_TLSGD optimization.
1634 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
1635 location of nop zapping high insn too.
1636
dbd1e97e
AM
16372015-01-28 Alan Modra <amodra@gmail.com>
1638
1639 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
1640 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
1641 in .toc indicate xlc compiled code that might require a rw .toc.
1642
3f8107ab
AM
16432015-01-28 James Bowman <james.bowman@ftdichip.com>
1644
1645 * Makefile.am: Add FT32 files.
1646 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
1647 (bfd_mach_ft32): Define.
1648 (bfd_ft32_arch): Declare.
1649 (bfd_archures_list): Add bfd_ft32_arch.
1650 * config.bfd: Handle FT32.
1651 * configure.ac: Likewise.
1652 * cpu-ft32.c: New file.
1653 * elf32-ft32.c: New file.
1654 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
1655 BFD_RELOC_FT32_18): Define.
1656 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
1657 * bfd-in2.h: Regenerate.
1658 * libbfd.h: Regenerate.
1659 * Makefile.in: Regenerate.
1660 * configure: Regenerate.
1661 * po/SRC-POTFILES.in: Regenerate.
1662
37e3922e
NC
16632015-01-27 Nick Clifton <nickc@redhat.com>
1664
1665 PR binutils/17512
1666 * pdp11.c (aout_get_external_symbols): Return false if there are
1667 no symbols.
1668
877a8638
NC
1669 * dwarf2.c (concat_filename): Check for an empty directory table.
1670 (scan_unit_for_symbols): Check for reading off the end of the
1671 unit.
1672 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
1673 non-string form.
1674 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
1675 available.
1676
18393a2e
KLC
16772015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1678
1679 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
1680
055173ca
DD
16812015-01-22 DJ Delorie <dj@redhat.com>
1682
1683 * elf32-m32c.c (m32c_apply_reloc_24): New.
1684 (m32c_elf_howto_table): Use it for R_M32C_24.
1685 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
1686
4e5cb37e
NC
16872015-01-22 Nick Clifton <nickc@redhat.com>
1688
1689 PR binutils/17512
1690 * coffcode.h (handle_COMDAT): When searching for the section
1691 symbol, make sure that there is space left in the symbol table.
1692 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
1693
86eafac0
NC
16942015-01-21 Nick Clifton <nickc@redhat.com>
1695
1696 PR binutils/17512
1697 * coffcode.h (coff_set_arch_mach_hook): Check return value from
1698 bfd_malloc.
1699 (coff_slurp_line_table): Return FALSE if the line number
1700 information was corrupt.
1701 (coff_slurp_symbol_table): Return FALSE if the symbol information
1702 was corrupt.
1703 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
1704 initialise the fields of the dyld_info structure.
1705 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
1706 error message and a return value.
1707 (bfd_mach_o_layout_commands): Change the function to boolean.
1708 Return FALSE if the function fails.
1709 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
1710 fails.
1711 (bfd_mach_o_read_command): Fail if an unrecognised command is
1712 encountered.
1713 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
1714 read fails.
1715 (slurp_symtab): Check the return from bfd_malloc.
1716 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
1717 encountered an error.
1718 (_bfd_XXi_final_link_postscript): Fail if a section could not be
1719 copied.
1720 * peicode.h (pe_bfd_object_p): Fail if the header could not be
1721 swapped in.
1722 * tekhex.c (first_phase): Fail if the section is too big.
1723 * versados.c (struct esdid): Add content_size field.
1724 (process_otr): Use and check the new field.
1725 (versados_get_section_contents): Check that the section exists and
1726 that the requested data is available.
1727
03d5b773
CLT
17282015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
1729
1730 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
1731
1c9177d9
AM
17322015-01-20 Alan Modra <amodra@gmail.com>
1733
1734 PR ld/17615
1735 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
1736 ELF_COMMON_DEF syms.
1737
c4621b33
AM
17382015-01-19 Alan Modra <amodra@gmail.com>
1739
3e2aa5bb 1740 PR ld/17615
c4621b33
AM
1741 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
1742 linker script assignments too.
1743 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
1744 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
1745
0ba38529
AM
17462015-01-19 Alan Modra <amodra@gmail.com>
1747
1748 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
1749 to allow return of first howto.
1750 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
1751 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
1752 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
1753 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
1754 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
1755 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
1756 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
1757 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
1758 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1759 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
1760 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
1761 (spu_elf_reloc_type_lookup): Adjust to suit.
1762
6346d5ca
AM
17632015-01-19 Alan Modra <amodra@gmail.com>
1764
1765 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
1766 (bfd_get_section_limit): ..here.
1767 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
1768 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
1769 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
1770 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
1771 bfd_reloc_outofrange check.
1772 * bfd-in2.h: Regenerate.
1773
1774 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
1775 on zero size relocs.
1776 * ecoff.c (ecoff_reloc_link_order): Likewise.
1777 * elf32-nds32.c (nds32_relocate_contents): Likewise.
1778 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1779
1780 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
1781 (_bfd_clear_contents): Likewise.
1782 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
1783 (mips_elf_perform_relocation): Likewise.
1784
1785 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
1786 from malloc on zero size alloc.
1787 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1788 * elflink.c (elf_reloc_link_order): Likewise.
1789 * linker.c (_bfd_generic_reloc_link_order): Likewise.
1790 * pdp11.c (aout_link_reloc_link_order): Likewise.
1791 * xcofflink.c (xcoff_reloc_link_order): Likewise.
1792
1793 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
1794 bitsize 0, and complain_overflow_dont.
1795 * coff-sparc.c (coff_sparc_howto_table): Likewise.
1796 * elf-hppa.h (elf_hppa_howto_table): Likewise.
1797 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
1798 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
1799 * elf32-arc.c (elf_arc_howto_table): Likewise.
1800 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
1801 * elf32-avr.c (elf_avr_howto_table): Likewise.
1802 * elf32-bfin.c (bfin_howto_table): Likewise.
1803 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
1804 * elf32-cris.c (cris_elf_howto_table): Likewise.
1805 * elf32-crx.c (crx_elf_howto_table): Likewise.
1806 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
1807 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
1808 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
1809 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
1810 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
1811 * elf32-frv.c (elf32_frv_howto_table): Likewise.
1812 * elf32-h8300.c (h8_elf_howto_table): Likewise.
1813 * elf32-i370.c (i370_elf_howto_raw): Likewise.
1814 * elf32-i386.c (elf_howto_table): Likewise.
1815 * elf32-i860.c (elf32_i860_howto_table): Likewise.
1816 * elf32-i960.c (elf32_i960_relocate): Likewise.
1817 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
1818 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
1819 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
1820 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
1821 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
1822 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
1823 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
1824 * elf32-m68k.c (howto_table): Likewise.
1825 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
1826 * elf32-mep.c (mep_elf_howto_table): Likewise.
1827 * elf32-metag.c (elf_metag_howto_table): Likewise.
1828 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
1829 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
1830 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
1831 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
1832 * elf32-mt.c (mt_elf_howto_table): Likewise.
1833 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
1834 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
1835 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
1836 * elf32-pj.c (pj_elf_howto_table): Likewise.
1837 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
1838 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
1839 * elf32-rx.c (rx_elf_howto_table): Likewise.
1840 * elf32-s390.c (elf_howto_table): Likewise.
1841 * elf32-score.c (elf32_score_howto_table): Likewise.
1842 * elf32-score7.c (elf32_score_howto_table): Likewise.
1843 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
1844 * elf32-spu.c (elf_howto_table): Likewise.
1845 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
1846 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
1847 * elf32-v850.c (v850_elf_howto_table): Likewise.
1848 * elf32-vax.c (howto_table): Likewise.
1849 * elf32-visium.c (visium_elf_howto_table): Likewise.
1850 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
1851 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
1852 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
1853 * elf32-xtensa.c (elf_howto_table): Likewise.
1854 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
1855 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
1856 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
1857 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
1858 * elf64-s390.c (elf_howto_table): Likewise.
1859 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
1860 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
1861 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
1862 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
1863 (elfNN_aarch64_howto_none): Likewise.
1864 * elfxx-ia64.c (ia64_howto_table): Likewise.
1865 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
1866 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
1867 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
1868
6333bc0d
L
18692015-01-15 H.J. Lu <hongjiu.lu@intel.com>
1870
1871 PR ld/17847
1872 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
1873 about -fPIC if the symbol is undefined when building executable.
1874
cd21f5da
NC
18752015-01-15 Nick Clifton <nickc@redhat.com>
1876
1877 PR binutils/17512
1878 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
1879 error message. Never return an invalid howto pointer.
1880 * elf32-cr16.c (cr16_info_to_howto): Likewise.
1881 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1882 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1883 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1884 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1885 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
1886 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1887 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1888 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1889 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
1890 * elf32-vax.c (rtype_to_howto): Likewise.
1891 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1892 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
1893 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
1894 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1895 (sh_elf_reloc): Check that the reloc is in range.
1896 * reloc.c (bfd_perform_relocation): Check that the section is big
1897 enough for the entire reloc.
1898 (bfd_generic_get_relocated_section_contents): Report unexpected
1899 return values from perform_reloc.
1900
2d071cfc
NC
19012015-01-15 Nick Clifton <nickc@redhat.com>
1902
1903 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
1904 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
1905 relaxation.
1906
ca55926c
AM
19072015-01-15 Alan Modra <amodra@gmail.com>
1908
1909 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
1910 any output section matching a linker created dynobj section.
1911
8539e4e8
AM
19122015-01-15 Alan Modra <amodra@gmail.com>
1913
1914 PR 17842
1915 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
1916 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
1917 Don't assign symtab file position unless symbols will be output.
1918 Merge blocks with condition in common. Don't call
1919 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
1920 unless other symbols are output. Move assignment of symtab_shndx
1921 file position. Localize variable.
1922
52db4ec2
JW
19232015-01-14 Jiong Wang <jiong.wang@arm.com>
1924
1925 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
1926 trying to defer them to runtime.
1927
0941db69
JW
19282015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1929
1930 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
1931 to check if a symbol should be bound symbolically.
1932
0172429c
JW
19332015-01-13 Jiong Wang <jiong.wang@arm.com>
1934
1935 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
1936 for TLSLE_MOVW_TPREL_G2.
1937
bab91cce
JW
19382015-01-13 Jiong Wang <jiong.wang@arm.com>
1939
1940 PR ld/17415
1941 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
1942 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
1943 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
1944 bit mask.
1945
3c758495
TG
19462015-01-12 Terry Guo <terry.guo@arm.com>
1947
1948 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
1949 function.
1950 (_bfd_elf_gc_mark_extra_sections): Use it.
1951
9d1d54d5
L
19522015-01-11 H.J. Lu <hongjiu.lu@intel.com>
1953
1954 PR ld/17827
1955 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
1956 only discard space for pc-relative relocs symbols which turn
1957 out to need copy relocs.
1958
c6e8e93a
NC
19592015-01-09 Nick Clifton <nickc@redhat.com>
1960
1961 * tekhex.c (getvalue): Fix thinko in test for correct extraction
1962 of value.
1963 (getsym): Return false if there was not enough data to extract the
1964 symbol.
1965
400cf8cb
AG
19662015-01-09 Anthony Green <green@moxielogic.com>
1967
1968 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
1969
23d4663e
NC
19702015-01-08 Nick Clifton <nickc@redhat.com>
1971
1972 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
1973 16-bit absolute BR instructions to 10-bit pc-relative JMP
1974 instructions.
1975
063bb025
NC
19762015-01-08 Nick Clifton <nickc@redhat.com>
1977
1978 PR binutils/17512
1979 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
1980 to load the line table.
1981 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
1982 maxpagesize of 1.
1983 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
1984 the Data Directory Size is too large.
1985
6f25f223
L
19862015-01-06 H.J. Lu <hongjiu.lu@intel.com>
1987
1988 PR binutils/17512
1989 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
1990 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1991
85880250
NC
19922015-01-06 Nick Clifton <nickc@redhat.com>
1993
1994 PR binutils/17512
e7287c7f
NC
1995 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
1996 string table.
1997
ec93045b
NC
1998 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
1999 (bfd_perform_relocation): Include the size of the reloc in the
2000 test for an out of range relocation.
2001 (bfd_generic_get_relocated_section_contents): Remove reloc range
2002 test.
2003
85880250
NC
2004 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2005 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2006 avoid reading off the end of the buffer.
2007 (getsym): Likewise.
2008 (first_phase): Likewise.
2009 (pass_over): Pass an end pointer to the invoked function.
2010
533d0af0
L
20112015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2012
2013 PR binutils/17512
2014 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2015 input.
2016 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2017
896ca098
NC
20182015-01-05 Nick Clifton <nickc@redhat.com>
2019
2020 PR binutils/17512
2021 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2022 is at least big enough for the header to be read.
2023 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2024 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2025 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2026 unrecognized commands.
2027 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2028 when indexing into the string table.
2029
b90efa5b 20302015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 2031
b90efa5b 2032 Update year range in copyright notice of all files.
ee3b52e9 2033
b90efa5b 2034For older changes see ChangeLog-2014
56882138 2035\f
b90efa5b 2036Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
2037
2038Copying and distribution of this file, with or without modification,
2039are permitted in any medium without royalty provided the copyright
2040notice and this notice are preserved.
2041
56882138
AM
2042Local Variables:
2043mode: change-log
2044left-margin: 8
2045fill-column: 74
2046version-control: never
2047End: