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