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