Pass ptid to aarch64_linux_get_debug_reg_capacity
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
328e7bfd
DC
12015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
2
3 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
4
92a9c616
RS
52015-07-05 Richard Sandiford <richard.sandiford@arm.com>
6
7 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
8 plus addend rather than the original st_value when looking up
9 entries in opd->adjust.
10
0f088b2a
KT
112015-07-03 Kai Tietz <ktietz@redhat.com>
12 Nick Clifton <nickc@redhat.com>
13
14 PR ld/11539
15 * coffcode.h (coff_bfd_gc_sections): Define default
16 to bfd_coff_gc_sections function.
17 (coff_gc_mark_hook_fn): New type.
18 * coffgen.c (init_reloc_cookie): Copy and adjust coff
19 related code about gc-sections from elflink.c to here.
20 (fini_reloc_cookie): Likewise.
21 (init_reloc_cookie_rels): Likewise.
22 (fini_reloc_cookie_rels): Likewise.
23 (init_reloc_cookie_for_section): Likewise.
24 (fini_reloc_cookie_for_section): Likewise.
25 (_bfd_coff_gc_mark_hook): Likewise.
26 (_bfd_coff_gc_mark_rsec): Likewise.
27 (_bfd_coff_gc_mark_reloc): Likewise.
28 (_bfd_coff_gc_mark): Likewise.
29 (_bfd_coff_gc_mark_extra_sections): Likewise.
30 (coff_gc_sweep_symbol_info): Likewise.
31 (coff_gc_sweep_symbol): Likewise.
32 (gc_sweep_hook_fn): Likewise.
33 (coff_gc_sweep): Likewise.
34 (bfd_coff_gc_sections): Likewise.
35 (_bfd_coff_gc_keep): Likewise.
36 * libcoff-in.h (coff_reloc_cookie): New struct.
37 (bfd_coff_gc_sections): New prototype.
38 * libcoff.h: Regenerate.
39
8c163c5a
SL
402015-07-01 Sandra Loosemore <sandra@codesourcery.com>
41 Cesar Philippidis <cesar@codesourcery.com>
42
43 * bfd-in2.h: Regenerated.
44 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
45 (elf_nios2_r1_howto_table_rel): This.
46 (elf_nios2_r2_howto_table_rel): New.
47 (BFD_IS_R2): New.
48 (lookup_howto): Add ABFD parameter. Adjust to look up in either
49 the R1 or R2 relocation table, as determined by ABFD.
50 (nios2_reloc_map): Add R2 relocations.
51 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
52 Pass it the ABFD parameter.
53 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
54 return an R1 or R2 relocation.
55 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
56 Pass it the ABFD parameter.
57 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
58 boundary.
59 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
60 * libbfd.h: Regenerated.
61 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
62 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
63 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
64 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
65 (BFD_RELOC_NIOS2_R2_T2I4): New.
66 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
67 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
68 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
69 (BFD_RELOC_NIOS2_R2_X2L5): New.
70 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
71 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
72 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
73 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
74
965b1d80
SL
752015-07-01 Sandra Loosemore <sandra@codesourcery.com>
76 Cesar Philippidis <cesar@codesourcery.com>
77
78 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
79 * bfd-in2.h: Regenerated.
80 * cpu-nios2.c (nios2_compatible): New.
81 (N): Use nios2_compatible instead of bfd_default_compatible.
82 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
83 (arch_info_struct): New.
84 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
85 * elf32-nios2.c (is_nios2_elf): New.
86 (nios2_elf32_merge_private_bfd_data): New.
87 (nios2_elf32_object_p): New.
88 (bfd_elf32_bfd_merge_private_bfd_data): Define.
89 (elf_backend_object_p): Define.
90
dfc87947
L
912015-07-01 H.J. Lu <hongjiu.lu@intel.com>
92
93 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
94
5ee4a1ca
NC
952015-06-30 Nick Clifton <nickc@redhat.com>
96
97 PR binutils/18570
98 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
99 (write_obj_attribute): Likewise.
100 (elf_new_obj_attr): Likewise.
101 (bfd_elf_get_obj_attr_int): Likewise.
102 (bfd_elf_add_obj_attr_int): Likewise.
103 (bfd_elf_add_obj_attr_string): Likewise.
104 (bfd_elf_add_obj_attr_int_string): Likewise.
105 (gnu_obj_attrs_arg_type): Likewise.
106 (_bfd_elf_obj_attrs_arg_type): Likewise.
107 (_bfd_elf_parse_attributes): Likewise.
108 (_bfd_elf_merge_unknown_attribute_list): Likewise.
109 * elf-bfd.h (struct obj_attribute_list): Likewise.
110 Update prototypes.
111
ee0c0c50
L
1122015-06-28 H.J. Lu <hongjiu.lu@intel.com>
113
114 * bfd-in.h (compressed_debug_section_type): Remove
115 COMPRESS_DEBUG_ZLIB.
116 * bfd-in2.h : Regenerated.
117
a5499fa4
MF
1182015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
119
120 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
121 instead of !shared to indicate an application vs shared library.
122 (_bfd_mips_elf_size_dynamic_sections): Likewise.
123 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
124 (_bfd_mips_elf_get_target_dtag): Likewise.
125
3f307074
DD
1262015-06-25 DJ Delorie <dj@redhat.com>
127
128 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
129 REL loads to match RELA stores.
130
946748d5
L
1312015-06-25 H.J. Lu <hongjiu.lu@intel.com>
132
133 * elf.c (_bfd_elf_compute_section_file_positions): Don't
134 initialize sh_size for .shstrtab here.
135
ef10c3ac
L
1362015-06-25 H.J. Lu <hongjiu.lu@intel.com>
137
138 PR gas/18451
139 * elf-bfd.h (elf_sym_strtab): New.
140 (elf_link_hash_table): Add strtabcount, strtabsize and
141 strtab.
142 (_bfd_elf_stringtab_init): Removed.
143 * elf.c (_bfd_elf_stringtab_init): Removed.
144 (_bfd_elf_compute_section_file_positions): Replace
145 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
146 _bfd_stringtab_size with
147 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
148 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
149 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
150 st_name.
151 (swap_out_syms): Likewise.
152 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
153 with elf_strtab_hash. Remove symbuf, symbuf_count,
154 symbuf_size and shndxbuf_size.
155 (elf_link_flush_output_syms): Removed.
156 (elf_link_output_sym): Renamed to ...
157 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
158 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
159 swap out symbols.
160 (elf_link_swap_symbols_out): New.
161 (elf_link_output_extsym): Replace elf_link_output_sym with
162 elf_link_output_symstrtab.
163 (elf_link_input_bfd): Likewise.
164 (elf_final_link_free): Replace _bfd_stringtab_free with
165 _bfd_elf_strtab_free. Remove symbuf.
166 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
167 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
168 symbuf_size nor shndxbuf_size. Initialize strtabsize and
169 strtab. Initialize symshndxbuf to -1 when number of sections
170 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
171 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
172 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
173 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
174 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
175 _bfd_elf_strtab_emit.
176
7cc152be
L
1772015-06-24 H.J. Lu <hongjiu.lu@intel.com>
178
179 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
180 GCC warning.
181
7c1e8d3e
L
1822015-06-24 H.J. Lu <hongjiu.lu@intel.com>
183
184 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
185 space for the first .plt entry.
186 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
187 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
188 there are PLT relocations.
189 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
190 allocate space for the first .plt entry.
191 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
192 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
193 there are PLT relocations.
194
59cab532
L
1952015-06-24 H.J. Lu <hongjiu.lu@intel.com>
196
197 PR ld/18591
198 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
199 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
200 overflow.
201
c2170589
JW
2022015-06-23 Jiong Wang <jiong.wang@arm.com>
203
204 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
205 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
206 relocations against read-only sections.
207
75c11999
NC
2082015-06-18 Nick Clifton <nickc@redhat.com>
209
210 PR 18481
211 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
212
56f40832
JT
2132015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
214
215 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
216 * bfd-in2.h : Regenerate.
217
1d5c94cb
AM
2182015-06-16 Alan Modra <amodra@gmail.com>
219
220 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
221 dynamic relocs.
222
c74f7d1c
JT
2232015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
224
225 * elf-bfd.h : Remove struct elf_build_id.
226 * bfd.c : Add struct bfd_build_id.
227 * bfd-in2.h: Regenerate.
228 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
229 * libpei.h: Add protoype and macros for
230 bfd_XXi_slurp_codeview_record.
231 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
232 * peicode.h (pe_bfd_read_buildid): Add.
233 (pe_bfd_object_p): Use pe_bfd_read_buildid().
234
87f5fbcc
RL
2352015-06-15 Renlin Li <renlin.li@arm.com>
236
237 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
238 * bfd-in2.h: Regenerate.
239 * libbfd.h: Regenerate.
240 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
241 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
242
3a062fa1
AM
2432015-06-15 Alan Modra <amodra@gmail.com>
244
245 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
246 2014-03-26 change. Call _bfd_clear_contents for relocs against
247 local and global symbols defined in discarded input sections.
248
1ade7175
NC
2492015-06-05 Nick Clifton <nickc@redhat.com>
250
251 * elf32-msp430.c (rl78_sym_diff_handler): New function.
252 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
253 (msp430x_howto_table): Likewise.
254
f8b44781
AM
2552015-06-05 Alan Modra <amodra@gmail.com>
256
257 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
258 relocs with insns moved by --ppc476-workaround. Correct
259 output of REL16 relocs.
260
7018c030
JW
2612015-06-01 Jiong Wang <jiong.wang@arm.com>
262
263 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
264 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
265 (elfNN_aarch64_final_link_relocate): Ditto.
266 (elfNN_aarch64_gc_swap_hook): Ditto.
267 (elfNN_aarch64_check_relocs): Ditto.
268 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
269
3d715ce4
JW
2702015-06-01 Jiong Wang <jiong.wang@arm.com>
271
272 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
273 * bfd-in2.h: Regenerate.
274 * libbfd.h: Regenerate.
275 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
276 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
277
36e6c140
JW
2782015-06-01 Jiong Wang <jiong.wang@arm.com>
279
280 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
281 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
282 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
283 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
284
99ad26cb
JW
2852015-06-01 Jiong Wang <jiong.wang@arm.com>
286
287 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
288 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
289 (elfNN_aarch64_final_link_relocate): Ditto.
290 (elfNN_aarch64_gc_swap_hook): Ditto.
291 (elfNN_aarch64_check_relocs): Ditto.
292 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
293
a921b5bd
JW
2942015-06-01 Jiong Wang <jiong.wang@arm.com>
295
296 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
297 * bfd-in2.h: Regenerate.
298 * libbfd.h: Regenerate.
299 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
300 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
301
2f0c68f2
CM
3022015-05-28 Catherine Moore <clm@codesourcery.com>
303 Bernd Schmidt <bernds@codesourcery.com>
304 Paul Brook <paul@codesourcery.com>
305
306 bfd/
307 * bfd-in2.h: Regenerated.
308 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
309 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
310 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
311 eh_frame_hdr_info.
312 (compact_eh_frame_hdr_info): Declare.
313 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
314 fields and compact-eh fields.
315 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
316 (bfd_elf_section_data): Add eh_frame_entry_field.
317 (elf_section_eh_frame_entry): Define.
318 (bfd_elf_parse_eh_frame_entries): Declare.
319 (_bfd_elf_parse_eh_frame_entry): Declare.
320 (_bfd_elf_end_eh_frame_parsing): Declare.
321 (_bfd_elf_write_section_eh_frame_entry): Declare.
322 (_bfd_elf_eh_frame_entry_present): Declare.
323 (_bfd_elf_section_for_symbol): Declare.
324 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
325 (bfd_elf_record_eh_frame_entry): New function.
326 (_bfd_elf_parse_eh_frame_entry): New function.
327 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
328 (cmp_eh_frame_hdr): New function.
329 (add_eh_frame_hdr_terminator): New function.
330 (_bfd_elf_end_eh_frame_parsing): New function.
331 (find_merged_cie): Update hdr_info field references.
332 (_bfd_elf_discard_section_eh_frame): Likewise.
333 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
334 (_bfd_elf_eh_frame_entry_present): New function.
335 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
336 (_bfd_elf_write_section_eh_frame_entry): New function.
337 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
338 (_bfd_elf_fixup_eh_frame_hdr): New function.
339 (write_compact_eh_frame_hdr): New function.
340 (write_dwarf_eh_frame_hdr): New function.
341 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
342 * elflink.c (_bfd_elf_section_for_symbol): New function.
343 (elf_section_ignore_discarded_relocs): Add Compact EH support.
344 (elf_link_input_bfd): Likewise.
345 (bfd_elf_final_link): Likewise.
346 (_bfd_elf_gc_mark): Likewise.
347 (bfd_elf_parse_eh_frame_entries): New function.
348 (bfd_elf_gc_sections): Add Compact EH support.
349 (bfd_elf_discard_info): Likewise.
350 * elfxx-mips.c: Include dwarf2.h.
351 (_bfd_mips_elf_compact_eh_encoding): New function.
352 (_bfd_mips_elf_cant_unwind_opcode): New function.
353 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
354 (_bfd_mips_elf_cant_unwind_opcode): Declare.
355 (elf_backend_compact_eh_encoding): Define.
356 (elf_backend_cant_unwind_opcode): Define.
357 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
358 (elf_backend_cant_unwind_opcode): Provide default.
359 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
360 elf_backend_cant_unwind_opcode.
361 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
362
8ded2ddc
L
3632015-05-27 H.J. Lu <hongjiu.lu@intel.com>
364
365 PR binutils/18458
366 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
367 for now binding only if pointer equality isn't needed.
368 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
369 binding only if pointer equality isn't needed.
370 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
371 section for now binding only if pointer equality isn't needed.
372 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
373 binding only if pointer equality isn't needed.
374
fca6ae69
L
3752015-05-26 H.J. Lu <hongjiu.lu@intel.com>
376
377 PR binutils/18437
378 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
379 in .rel.plt/.rela.plt.
380 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
381
ce336788
JW
3822015-05-19 Jiong Wang <jiong.wang@arm.com>
383
384 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
385 relocation case labels alphabetically.
386 (elfNN_aarch64_final_link_relocate): Ditto.
387 (elfNN_aarch64_tls_relax): Ditto.
388 (elfNN_aarch64_relocate_section): Ditto.
389 (elfNN_aarch64_gc_sweep_hook): Ditto.
390 (elfNN_aarch64_check_relocs): Ditto.
391 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
392 (_bfd_aarch64_elf_resolve_relocation): Ditto.
393
80de0c6d
JW
3942015-05-18 Jiong Wang <jiong.wang@arm.com>
395
396 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
397 comments.
398
25070364
L
3992015-05-16 H.J. Lu <hongjiu.lu@intel.com>
400
401 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
402 for now binding.
403 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
404 binding.
405 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
406 section for now binding.
407 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
408 binding.
409
dab394de
L
4102015-05-14 H.J. Lu <hongjiu.lu@intel.com>
411
412 * bfd.c (bfd_update_compression_header): Also write the zlib
413 header if the SHF_COMPRESSED bit cleared..
414 (bfd_check_compression_header): Return the uncompressed size.
415 * compress.c (decompress_contents): Don't skip the zlib header.
416 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
417 which doesn't have the zlib header.
418 (bfd_init_section_decompress_status): Likewise.
419 (bfd_get_full_section_contents): Updated.
420 (bfd_is_section_compressed): Likewise.
421 (bfd_is_section_compressed_with_header): Return the uncompressed
422 size.
423 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
424 * bfd-in2.h: Regenerated.
425
fdc3b1b1
JW
4262015-05-14 Jiong Wang <jiong.wang@arm.com>
427
428 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
429 check restrictions.
430
e6c9a083
MF
4312015-05-14 Max Filippov <jcmvbkbc@gmail.com>
432
433 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
434 as GOT reference when plt.refcount is not positive.
435
a3747075
L
4362015-05-12 H.J. Lu <hongjiu.lu@intel.com>
437
438 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
439 for the first .plt entry only if needed.
440 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
441
bf64a951
L
4422015-05-11 H.J. Lu <hongjiu.lu@intel.com>
443
444 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
445 (ALL_MACHINES_CFILES): Likewise.
446 * archures.c (bfd_mach_iamcu): New.
447 (bfd_mach_i386_iamcu): Likewise.
448 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
449 (bfd_iamcu_arch): Likewise.
450 (bfd_archures_list): Add &bfd_iamcu_arch.
451 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
452 i386_elf32_vec.
453 (targ_archs): Add bfd_iamcu_arch if needed.
454 * configure.ac: Support iamcu_elf32_vec.
455 * cpu-iamcu.c: New file.
456 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
457 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
458 * targets.c (iamcu_elf32_vec): New.
459 (_bfd_target_vector): Add iamcu_elf32_vec.
460 * Makefile.in: Regenerated.
461 * bfd-in2.h: Likewise.
462 * configure: Likewise.
463
22abe556
L
4642015-05-11 H.J. Lu <hongjiu.lu@intel.com>
465
466 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
467
4b71eec6
L
4682015-05-10 H.J. Lu <hongjiu.lu@intel.com>
469
470 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
471 and output_bfd with abfd.
472 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
473
9ac47a43
TS
4742015-05-06 Toni Spets <toni.spets@iki.fi>
475
476 PR ld/18372
477 * peXXigen.c (rsrc_process_section): Skip discarded resource
478 sections.
479
b633b725
L
4802015-05-01 H.J. Lu <hongjiu.lu@intel.com>
481
482 * config.bfd: Support i[3-7]86-*-elf*.
483
914082d1
L
4842015-04-30 H.J. Lu <hongjiu.lu@intel.com>
485
486 * elf32-i386.c (elf_backend_post_process_headers): Undef for
487 Solaris 2.
488
153a2776
NC
4892015-04-30 Nick Clifton <nickc@redhat.com>
490
491 PR 18317
492 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
493 mep_reloc.
494 (mep_reloc): Delete unused function.
495
a93d5cb1
NC
4962015-04-29 Nick Clifton <nickc@redhat.com>
497
498 PR 17099
499 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
500 relocs.
501
643f7afb
AK
5022015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
503
504 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
505 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
506 elf_s390_merge_obj_attributes.
507 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
508
b53b1bed
JW
5092015-04-24 Jiong Wang <jiong.wang@arm.com>
510
511 PR ld/18270
512 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
513 GOT_NORMAL for both sgot/srelgot section.
514 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
515 and generate necessary runtime relocation for GOT entry.
516
69b52ab8
L
5172015-04-24 H.J. Lu <hongjiu.lu@intel.com>
518
519 PR binutils/18209
520 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
521
dcbd20eb
JW
5222015-04-24 Jiong Wang <jiong.wang@arm.com>
523
524 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
525 PC-relative relocation for external symbol.
526
de13ef81
NC
5272015-04-24 Nick Clifton <nickc@redhat.com>
528
529 PR 18313
530 * compress.c (decompress_contents): Zero initialse the z_stream
531 structure.
532
b1fa9dd6
NC
5332015-04-24 Nick Clifton <nickc@redhat.com>
534
535 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
536 local labels to include local labels with a numeric suffix and
537 fake symbols.
538
9361e630
L
5392015-04-24 H.J. Lu <hongjiu.lu@intel.com>
540
541 PR binutils/18316
542 * section.c (SEC_MEP_VLIW): New.
543 * bfd-in2.h: Regenerated.
544
3e19fb8f
L
5452015-04-23 H.J. Lu <hongjiu.lu@intel.com>
546
547 PR ld/18277
548 * compress.c (bfd_compress_section_contents): Remove the
549 write_compress argument.
550 (bfd_init_section_compress_status): Updated.
551 (bfd_compress_section): Likewise.
552 * elf.c (_bfd_elf_set_reloc_sh_name): New.
553 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
554 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
555 _bfd_elf_set_reloc_sh_name.
556 (elf_fake_sections): Don't rename DWARF debug section for
557 linker output if it will be compressed. Instead, set
558 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
559 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
560 sh_name != (unsigned int) -1. Don't finalize nor assign
561 shstrtab section here. Delay setting output section names to
562 _bfd_elf_write_object_contents.
563 (_bfd_elf_compute_section_file_positions): Update comments on
564 sh_offset for shstrtab section.
565 (assign_file_positions_for_non_load_sections): Set sh_offset to
566 -1 for shstrtab section.
567 (assign_file_positions_except_relocs): Likewise.
568 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
569 when compressing DWARF debug sections. Place shstrtab section
570 after DWARF debug sections have been compressed.
571 (_bfd_elf_write_object_contents): Setting sh_name for output
572 sections.
573
f6fe1ccd
L
5742015-04-23 H.J. Lu <hongjiu.lu@intel.com>
575
576 PR binutils/18209
577 * bfd.c (bfd): Add is_linker_input.
578 * elf.c (convert_debug_to_zdebug): New.
579 (convert_zdebug_to_debug): Likewise.
580 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
581 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
582 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
583 instead of a pointer to section.
584 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
585 is set.
586 * section.c (SEC_ELF_RENAME): New.
587 * bfd-in2.h: Regenerated.
588
a27e685f
AM
5892015-04-23 Alan Modra <amodra@gmail.com>
590
591 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
592 (ppc64_elf_next_toc_section): Align multi-got toc base.
593 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
594
d5597ebc
L
5952015-04-22 H.J. Lu <hongjiu.lu@intel.com>
596
597 PR ld/18289
598 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
599 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
600 (elf_i386_create_dynamic_sections): Always allow copy relocs for
601 building executables.
602 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
603 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
604 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
605 PIE and R_386_GOTOFF.
606 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
607
e9702963
L
6082015-04-20 H.J. Lu <hongjiu.lu@intel.com>
609
610 * elf.c (assign_section_numbers): Always set up sh_name.
611
e06efbf1
L
6122015-04-20 H.J. Lu <hongjiu.lu@intel.com>
613
614 * elf.c (assign_file_positions_for_non_load_sections): Iterate
615 sections by pointer.
616 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
617
0ce398f1
L
6182015-04-14 H.J. Lu <hongjiu.lu@intel.com>
619
620 * bfd-in.h (compressed_debug_section_type): New.
621 * compress.c (bfd_compress_section_contents): Add an argument
622 for linker write compression and always generate .zdebug_*
623 section when linking.
624 (bfd_init_section_compress_status): Pass FALSE to
625 bfd_compress_section_contents.
626 (bfd_compress_section): New function.
627 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
628 on DWARF debug sections if COMPRESS_DEBUG is set and rename
629 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
630 (assign_file_positions_for_non_load_sections): Set sh_offset
631 to -1 if SEC_ELF_COMPRESS is set.
632 (assign_file_positions_except_relocs): Likwise.
633 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
634 (_bfd_elf_assign_file_positions_for_non_load): This. Change
635 return time to bfd_boolean. Compress the section if
636 SEC_ELF_COMPRESS is set.
637 (_bfd_elf_write_object_contents): Updated.
638 (_bfd_elf_set_section_contents): Write section contents to
639 the buffer if SEC_ELF_COMPRESS is set.
640 * merge.c: Include "elf-bfd.h".
641 (sec_merge_emit): Add arguments for contents and offset. Write
642 to contents with offset if contents isn't NULL.
643 (_bfd_write_merged_section): Write section contents to the
644 buffer if SEC_ELF_COMPRESS is set. Pass contents and
645 output_offset to sec_merge_emit.
646 * elflink.c (bfd_elf_final_link): Allocate the buffer for
647 output section contents if SEC_ELF_COMPRESS is set.
648 * section.c (SEC_ELF_COMPRESS): New.
649 * bfd-in2.h: Regenerated.
650
95b57ade
AM
6512015-04-15 Alan Modra <amodra@gmail.com>
652
653 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
654
6ff71e76
NC
6552015-04-14 Nick Clifton <nickc@redhat.com>
656
657 * elf32-rl78.c (RL78_OP_REL): New macro.
658 (rl78_elf_howto_table): Use it for complex relocs.
659 (get_symbol_value): Handle the cases when the info or status
660 arguments are NULL.
661 (get_romstart): Cache the status returned by get_symbol_value.
662 (get_ramstart): Likewise.
663 (RL78_STACK_PUSH): Generate an error message if the stack
664 overflows.
665 (RL78_STACK_POP): Likewise for underflows.
666 (rl78_compute_complex_reloc): New function. Contains the basic
667 processing code for all RL78 complex relocs.
668 (rl78_special_reloc): New function. Provides special reloc
669 handling for complex relocs.
670 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
671 (rl78_offset_for_reloc): Likewise.
672
889c2a67
L
6732015-04-14 H.J. Lu <hongjiu.lu@intel.com>
674
675 PR ld/pr17709
676 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
677 info->extern_protected_data when warning copy relocs against
678 protected symbols.
679 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
680 when checking protected non-function symbols.
681
97de3545
JB
6822015-04-13 John Baldwin <jhb@FreeBSD.org>
683
684 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
685 FreeBSD.
686 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
687
f0bf6bfd
L
6882015-04-13 H.J. Lu <hongjiu.lu@intel.com>
689
690 PR ld/18250
691 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
692 if the object has been claimed by plugin.
693
e3c0e327
L
6942015-04-11 H.J. Lu <hongjiu.lu@intel.com>
695
696 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
697 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
698 protected data symbol when building shared library.
699 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
700 R_X86_64_GOTOFF64 against undefined symbol and replace
701 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
702 R_X86_64_GOTOFF64 against protected data symbol when building
703 shared library.
704
3d949995
L
7052015-04-10 H.J. Lu <hongjiu.lu@intel.com>
706
707 PR ld/pr17709
708 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
709 against protected data symbol when building shared library.
710 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
711 R_X86_64_GOTOFF64 against protected data symbol when building
712 shared library.
713
f7483970
L
7142015-04-10 H.J. Lu <hongjiu.lu@intel.com>
715
716 PR ld/pr15228
717 PR ld/pr17709
718 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
719 * elf32-i386.c (elf_backend_extern_protected_data): New.
720 Defined to 1.
721 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
722 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
723 copy relocs against protected symbols if extern_protected_data
724 is true.
725 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
726 non-function symbols if extern_protected_data is true.
727 * elfxx-target.h (elf_backend_extern_protected_data): New.
728 Default to 0.
729 (elfNN_bed): Initialize extern_protected_data with
730 elf_backend_extern_protected_data.
731
030aeb75
L
7322015-04-10 H.J. Lu <hongjiu.lu@intel.com>
733
734 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
735 and free with bfd_alloc and bfd_release on compressed buffer.
736 Release buffer if compressed section isn't smaller.
737
d07a1b05
AM
7382015-04-10 Alan Modra <amodra@gmail.com>
739
740 PR ld/18222
741 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
742 on adding a protected visibility variable to .dynbss.
743
8d2ea2a8
AM
7442015-04-10 Alan Modra <amodra@gmail.com>
745
746 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
747 PR ld/pr15228
748 PR ld/pr17709
749 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
750 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
751 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
752 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
753 extern_protected_data test.
754 (_bfd_elf_symbol_refs_local_p): Likewise.
755 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
756 (elfNN_bed): Delete elf_backend_extern_protected_data init.
757
18ece1de
L
7582015-04-09 H.J. Lu <hongjiu.lu@intel.com>
759
760 * compress.c (bfd_compress_section_contents): Update comments.
761 (bfd_init_section_decompress_status): Likewise.
762 (bfd_init_section_compress_status): Likewise.
763
cd6faa73
L
7642015-04-09 H.J. Lu <hongjiu.lu@intel.com>
765
766 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
767 object_flags.
768 (TARGET_LITTLE_SYM): Likewise.
769
19424843
MF
7702015-04-09 Max Filippov <jcmvbkbc@gmail.com>
771
772 * elf32-xtensa.c (splay-tree.h): include header.
773 (text_action_struct): drop next pointer.
774 (text_action_list_struct): drop head pointer, add count and
775 tree fields.
776 (find_fill_action): instead of linear search in text_action_list
777 search in the tree.
778 (text_action_compare, action_first, action_next): new functions.
779 (text_action_add, text_action_add_literal): instead of linear
780 search and insertion insert new node into the tree.
781 (removed_by_actions): pass additional parameter: action_list,
782 use it to traverse the tree.
783 (offset_with_removed_text): pass additional action_list parameter
784 to removed_by_actions.
785 (map_action_fn_context): new typedef.
786 (map_action_fn_context_struct): new structure.
787 (map_action_fn): new function.
788 (map_removal_by_action): use splay_tree_foreach to build map.
789 (find_insn_action): replace linear search in text_action_list
790 with series of splay_tree_lookups.
791 (print_action, print_action_list_fn): new functions.
792 (print_action_list): use splay_tree_foreach.
793 (init_xtensa_relax_info): drop action_list.head initialization.
794 Initialize the tree.
795 (compute_text_actions): use non-zero action_list_count instead of
796 non-NULL action list.
797 (xlate_map_context): new typedef.
798 (xlate_map_context_struct): new structure.
799 (xlate_map_fn): new function.
800 (build_xlate_map): use splay_tree_foreach to build map.
801 (action_remove_bytes_fn): new function.
802 (relax_section): use zero action_list_count instead of NULL
803 action list. Use splay_tree_foreach to count final section size.
804 Drop unused variable 'removed'.
805
8062015-04-09 Max Filippov <jcmvbkbc@gmail.com>
807
808 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
809 (removed_literal_map_entry_struct): new structure.
810 (removed_literal_list_struct): add new fields: n_map and map.
811 (map_removed_literal, removed_literal_compare): new functions.
812 (find_removed_literal): build index array for literals ordered
813 by VMA, use binary search to find removed literal.
814
8152015-04-09 Max Filippov <jcmvbkbc@gmail.com>
816
817 * elf32-xtensa.c (removal_by_action_entry_struct,
818 removal_by_action_map_struct): new structures.
819 (removal_by_action_entry, removal_by_action_map): new typedefs.
820 (text_action_list_struct): add new field: map.
821 (map_removal_by_action, removed_by_actions_map,
822 offset_with_removed_text_map): new functions.
823 (relax_section): replace offset_with_removed_text with
824 offset_with_removed_text_map.
825 (translate_reloc, relax_property_section, relax_section_symbols):
826 replace removed_by_actions with removed_by_actions_map.
827
8282015-04-09 Max Filippov <jcmvbkbc@gmail.com>
829
830 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
831 reloc_range): new typedef.
832 (reloc_range_list_struct, reloc_range_list_entry_struct,
833 reloc_range_struct): new structures.
834 (reloc_range_compare, build_reloc_ranges,
835 reloc_range_list_append, reloc_range_list_remove,
836 reloc_range_list_update_range, free_reloc_range_list): new
837 functions.
838 (compute_text_actions): precompute relocation opcodes before the
839 loop. Add relevant_relocs variable, initialize it before the
840 loop, pass it to the check_section_ebb_pcrels_fit.
841 (check_section_ebb_pcrels_fit): add new parameter:
842 relevant_relocs. Update address range in the relevant_relocs if
843 it's non-NULL and iterate only over relevant relocations.
844
3525236c
NC
8452015-04-09 Nick Clifton <nickc@redhat.com>
846
847 * elf32-rx.c (describe_flags): Report the settings of the string
848 insn using bits.
849 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
850 using bits.
851
51509926
L
8522015-04-08 H.J. Lu <hongjiu.lu@intel.com>
853
854 * compress.c (bfd_compress_section_contents): Work around a GCC
855 uninitialized warning bug fixed in GCC 4.7.
856
151411f8
L
8572015-04-08 H.J. Lu <hongjiu.lu@intel.com>
858
859 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
860 bit.
861 * bfd.c (bfd::flags): Increase size to 18 bits.
862 (BFD_COMPRESS_GABI): New.
863 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
864 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
865 (bfd_update_compression_header): New fuction.
866 (bfd_check_compression_header): Likewise.
867 (bfd_get_compression_header_size): Likewise.
868 (bfd_is_section_compressed_with_header): Likewise.
869 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
870 (bfd_compress_section_contents): Return the uncompressed size if
871 the full section contents is compressed successfully. Support
872 converting from/to .zdebug* sections.
873 (bfd_get_full_section_contents): Call
874 bfd_get_compression_header_size to get compression header size.
875 (bfd_is_section_compressed): Renamed to ...
876 (bfd_is_section_compressed_with_header): This. Add a pointer
877 argument to return compression header size.
878 (bfd_is_section_compressed): Use it.
879 (bfd_init_section_decompress_status): Call
880 bfd_get_compression_header_size to get compression header size.
881 Return FALSE if uncompressed section size is 0.
882 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
883 from/to .zdebug* sections.
884 * bfd-in2.h: Regenerated.
885
87070c08
AM
8862015-04-07 Alan Modra <amodra@gmail.com>
887
888 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
889 mapped to output .got section.
890
d3e454b9
AM
8912015-04-07 Alan Modra <amodra@gmail.com>
892
893 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
894 and has_addr16_lo. Make has_sda_refs a bitfield.
895 (ppc_elf_check_relocs): Set new flags.
896 (ppc_elf_link_hash_table_create): Update default_params.
897 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
898 where we won't be making .dynbss entries or editing code. Set
899 params->pic_fixup when we'll edit code for protected var access.
900 (allocate_dynrelocs): Allocate got entry for edited code and
901 discard dyn_relocs.
902 (struct ppc_elf_relax_info): Add picfixup_size.
903 (ppc_elf_relax_section): Rename struct one_fixup to struct
904 one_branch_fixup. Rename fixups to branch_fixups. Size space for
905 pic fixups.
906 (ppc_elf_relocate_section): Edit non-PIC accessing protected
907 visibility variables to PIC. Don't emit dyn_relocs for code
908 we've edited.
909 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
910
ffa54770
NC
9112015-04-07 Nick Clifton <nickc@redhat.com>
912
913 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
914 local labels as local.
915
4aa90cc0
L
9162015-04-06 H.J. Lu <hongjiu.lu@intel.com>
917
918 * compress.c (get_uncompressed_size): Removed.
919 (bfd_compress_section_contents): Use bfd_putb64 to write
920 uncompressed section size.
921 (bfd_init_section_decompress_status): Replace
922 get_uncompressed_size with bfd_getb64.
923
68f5ff89
L
9242015-04-04 H.J. Lu <hongjiu.lu@intel.com>
925
926 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
927 SHF_COMPRESSED bit if not decompress.
928
8bed4e0f
L
9292015-04-04 H.J. Lu <hongjiu.lu@intel.com>
930
931 * compress.c (get_uncompressed_size): New. Extracted from ...
932 (bfd_init_section_decompress_status): This. Use it.
933
15c7659f
AT
9342015-04-02 Andrew Turner <andrew@freebsd.org>
935
936 * config.bfd: Add aarch64-*-freebsd* target triple.
937
39f3de7c
L
9382015-04-02 H.J. Lu <hongjiu.lu@intel.com>
939
940 * configure: Regenerated.
941
4106101c
MS
9422015-04-01 Tejas Belagod <tejas.belagod@arm.com>
943 Marcus Shawcroft <marcus.shawcroft@arm.com>
944 Jiong Wang <jiong.wang@arm.com>
945
946 * bfd-in.h (bfd_elf64_aarch64_set_options)
947 (bfd_elf32_aarch64_set_options): Add parameter.
948 * bfd-in2.h: Regenerated.
949 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
950 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
951 (_bfd_aarch64_erratum_843419_stub_name)
952 (_bfd_aarch64_erratum_843419_fixup)
953 (_bfd_aarch64_erratum_843419_scan)
954 (_bfd_aarch64_erratum_843419_branch_to_stub)
955 (_bfd_aarch64_erratum_843419_p): Define.
956 (enum elf_aarch64_stub_type): Define
957 aarch64_stub_erratum_843419_veneer.
958 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
959 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
960 and fix_erratum_843419_adr.
961 (stub_hash_newfunc): Initialize adrp_offset;
962 (_bfd_aarch64_add_stub_entry_after): Define.
963 (aarch64_map_one_stub, aarch64_build_one_stub)
964 (aarch64_size_one_stub): Handle
965 aarch64_stub_erratum_843419_veneer.
966 (_bfd_aarch64_resize_stubs): Round stub section size.
967 (elfNN_aarch64_size_stubs): Add scan for 843419.
968 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
969 fix_erratum_843419 and fix_erratum_843419_adr.
970 (struct erratum_835769_branch_to_stub_data): Add info.
971 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
972 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
973 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
974 (_bfd_aarch64_sign_extend): Define.
975 (reencode_adr_imm): Remove static. Rename to:
976 (_bfd_aarch64_reencode_adr_imm): Define.
977 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
978 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
979 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
980 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
981 Define.
982
afa59b79
L
9832015-04-01 H.J. Lu <hongjiu.lu@intel.com>
984
985 * configure: Regenerated.
986
6036f486
ES
9872015-03-31 Ed Schouten <ed@nuxi.nl>
988
989 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
990 for x86_64-*-cloudabi*.
991 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
992 * configure: Regenerated.
993 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
994 (TARGET_LITTLE_NAME): Likewise.
995 (ELF_OSABI): Likewise.
996 (elf64_bed): Likewise.
997 * targets.c (x86_64_elf64_cloudabi_vec): New.
998 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
999
9ae46699
L
10002015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 * configure.ac: Revert the AM_ZLIB change.
1003 * Makefile.in: Regenerated.
1004 * aclocal.m4: Likewise.
1005 * configure: Likewise.
1006 * doc/Makefile.in: Likewise.
1007
bd53a53a
L
10082015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 PR ld/18169
1011 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1012 (_bfd_elf_get_reloc_section): New.
1013 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1014 (assign_section_numbers): Call get_reloc_section to look up the
1015 section the relocs apply.
1016 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1017 (elfNN_bed): Initialize get_reloc_section with
1018 elf_backend_get_reloc_section.
1019
243340ad
L
10202015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1021
1022 * Makefile.am (ZLIB): New.
1023 (ZLIBINC): Likewise.
1024 (AM_CFLAGS): Add $(ZLIBINC).
1025 (libbfd_la_LIBADD): Add $(ZLIB).
1026 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1027 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
1028 (bfd_compress_section_contents): Likewise.
1029 (bfd_get_full_section_contents): Likewise.
1030 (bfd_init_section_decompress_status): Likewise.
1031 (bfd_init_section_compress_status): Likewise.
b51724e8 1032 * configure.ac (AM_ZLIB): Removed.
243340ad
L
1033 (zlibdir): New. AC_SUBST.
1034 (zlibinc): Likewise.
1035 Add --with-system-zlib.
1036 * Makefile.in: Regenerated.
1037 * acinclude.m4: Likewise.
1038 * config.in: Likewise.
1039 * configure: Likewise.
1040 * doc/Makefile.in: Likewise.
1041
b8417128
AM
10422015-03-27 Alan Modra <amodra@gmail.com>
1043
1044 PR ld/15228
1045 PR ld/18167
1046 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1047 protected_def when symbol section is read-only. Adjust all calls.
1048 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1049
93ca8569
TB
10502015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1051
1052 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1053 _bfd_final_link_relocate with aarch64_relocate.
1054
b19a8f85
L
10552015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1056
1057 PR ld/18160
1058 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1059 (bfd_elf_gc_sections): Likewise.
1060
61865519
MS
10612015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1062
1063 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1064 size for initial branch.
1065 (elfNN_aarch64_build_stubs): Write initial branch.
1066 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1067 mapping symbol on initial branch.
1068
d9ced15d 10692015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
1070
1071 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1072 Update erratum count.
1073
d422d1c4
SKS
10742015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1075
1076 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1077 first matching debug section.
1078
8d001214
L
10792015-03-24 H.J. Lu <hongjiu.lu@intel.com>
1080
1081 PR gas/18087
1082 * compress.c (bfd_compress_section_contents): Don't write the
1083 zlib header and set contents as well as compress_status if
1084 compression didn't make the section smaller.
1085 (bfd_init_section_compress_status): Don't check compression
1086 size here.
1087
fc42baf3
NC
10882015-03-24 Nick Clifton <nickc@redhat.com>
1089
1090 PR binutils/17512
1091 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
1092 range auxillary sections.
1093
fc6d53be
MS
10942015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1095
1096 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1097 code into:
1098 (_bfd_aarch64_get_stub_for_link_section): Define.
1099
30068a6d
MS
11002015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1101
1102 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1103 update of section_group[].stub_sec.
1104
5421cc6e
MS
11052015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1106
1107 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1108 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1109 Delete fixes, fix_table_size and associated code. Call
1110 _bfd_aarch64_add_stub_entry_in_group. Rename to...
1111 (bfd_aarch64_erratum_835769_scan): Define.
1112 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1113 erratum_835769_fix_table_size, i and associated code. Relocate
1114 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
1115 correction. Delete construction of stub entry from
1116 erratum_835769_fixes array.
1117
e572930b
MS
11182015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1119
1120 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1121 _bfd_aarch64_add_stub_entry_in_group.
1122
8131c122
AM
11232015-03-24 Alan Modra <amodra@gmail.com>
1124
1125 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1126 stubs, even those for undefined weak symbols. Otherwise, don't
1127 report relocation overflow on branches to undefined strong
1128 symbols. Fix memory leak.
1129 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1130 overflow on branches to undefined strong symbols.
1131
c53ed7cf
KS
11322015-03-23 Keith Seitz <keiths@redhat.com>
1133
1134 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1135 missing ';'.
1136
94a75bde
MS
11372015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1138
1139 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1140 construction into...
1141 (_bfd_aarch64_erratum_835769_stub_name): Define.
1142
13f622ec
MS
11432015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1144
1145 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1146 stub resize code into...
1147 (bfd_aarch64_resize_stubs): Define.
1148
66585675
MS
11492015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1150
1151 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1152 creation code into...
1153 (bfd_aarch64_create_stub_section): Define.
1154
ef857521
MS
11552015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1156
1157 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1158 from elf_aarch64_create_or_find_stub_sec.
1159 (_bfd_aarch64_add_stub_entry_in_group): Rename from
1160 elfNN_aarch64_add_stub. Call
1161 _bfd_aarch64_create_or_find_stub_sec.
1162 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1163 _bfd_aarch64_add_stub_entry_in_group.
1164
2144188d
MS
11652015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1166
1167 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
1168 sense of boolean return.
1169 (elfNN_aarch64_size_stubs): Adjust for above.
1170
4c77202d
MS
11712015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1172
1173 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1174 Remove unused parameter.
1175 (elfNN_aarch64_size_stubs): Adjust for above.
1176
9b9971aa
MS
11772015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1178
1179 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1180
e2cdef47
MS
11812015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1182
1183 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1184 (num_aarch64_erratum_835769_fixes): Remove.
1185 (elfNN_aarch64_size_stubs): Remove assignments to above.
1186
3d14faea
MS
11872015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1188
23956543
MS
1189 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1190 to rt2.
3d14faea
MS
1191 (aarch64_erratum_seqeunce): Rename rtn to rt2.
1192
f872121a
MS
11932015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1194
1195 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1196
1740ba0c
NC
11972015-03-19 Nick Clifton <nickc@redhat.com>
1198
1199 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
1200 the RL78 core based upon the flags.
1201 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1202 flags.
1203 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1204 (elf32_rl78_machine): Always return bfd_mach_rl78.
1205
e2575e05
NC
12062015-03-19 Nick Clifton <nickc@redhat.com>
1207
1208 PR 18078
1209 * compress.c (bfd_compress_section_contents): Do not define this
1210 function if it is not used.
1211
0b0732e1
L
12122015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1213
1214 * compress.c (bfd_compress_section_contents): Make it static.
1215 * bfd/bfd-in2.h: Regenerated.
1216
27aaeda0
NC
12172015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1218
1219 PR ld/16598
1220 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1221 suitable for the AMD64.
1222
273a4985
JT
12232015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1224 Nick Clifton <nickc@redhat.com>
1225
1226 PR binutils/18087
1227 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1228 debug section's name if the section was actually compressed.
1229 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1230 * compress.c (bfd_init_section_compress_status): Do not compress
1231 the section if doing so would make it bigger. In such cases leave
1232 the section alone and return COMPRESS_SECTION_NONE.
1233
c4b0b099
AM
12342015-03-17 Alan Modra <amodra@gmail.com>
1235
1236 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1237 on nothing to do, before malloc of returned symbol array.
1238
9c761a55
NC
12392015-03-16 Nick Clifton <nickc@redhat.com>
1240
1241 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1242 stored in the elf_section_data structure then load them as
1243 necessary.
1244
b9005ba7
AK
12452015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1246
1247 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1248 relocs against code sections.
1249 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1250 * elf64-s390.c: Likewise.
1251
1079403c
AM
12522015-03-11 Alan Modra <amodra@gmail.com>
1253
1254 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1255 reverse order. Account for larger size of __tls_get_addr_opt stub.
1256
a5721edd
JW
12572015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1258
1259 PR ld/16572
1260 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1261 ELF_ARM_HASENTRY.
1262 (elf32_arm_print_private_bfd_data): Likewise.
1263
65164438
NC
12642015-03-06 Nick Clifton <nickc@redhat.com>
1265
1266 PR binutils/17765
1267 * elflink.c (put_value): Like previous delta, but for the 32-bit
1268 case.
1269
41cd1ad1
NC
12702015-03-05 Nick Clifton <nickc@redhat.com>
1271
1272 PR binutils/17765
1273 * elflink.c (put_value): Avoid using an undefined shift
1274 operation.
1275
ca3fe95e
L
12762015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1277
1278 PR ld/pr15228
1279 PR ld/pr17709
1280 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1281 * elf32-i386.c (elf_backend_extern_protected_data): New.
1282 Defined to 1.
1283 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1284 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1285 copy relocs against protected symbols if extern_protected_data
1286 is true.
1287 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1288 non-function symbols if extern_protected_data is true.
1289 * elfxx-target.h (elf_backend_extern_protected_data): New.
1290 Default to 0.
1291 (elfNN_bed): Initialize extern_protected_data with
1292 elf_backend_extern_protected_data.
1293
425bd9e1
NC
12942015-03-05 Nick Clifton <nickc@redhat.com>
1295
1296 PR binutils/18025
1297 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1298 lookup fails, check for an address bias in the dwarf info, and if
1299 one exists, retry the lookup with the biased value.
1300 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1301 Determines if a bias exists bewteen the addresses of functions
1302 based on DWARF information vs symbol table information.
1303 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1304 * libbfd.h: Regenerate.
1305
8ef229f3
MS
13062015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1307
1308 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1309 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1310 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1311
8e2fe09f
MS
13122015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1313
1314 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1315 (aarch64_size_one_stub): Likewise.
1316 (aarch64_map_one_stub): Likewise.
1317
df88b702
AA
13182015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1319
1320 * cpu-s390.c (N): New macro.
1321 (bfd_s390_31_arch): New. Define only if default target word size
1322 is 64 bits. Otherwise define...
1323 (bfd_390_64_arch): ...this. Make static.
1324 (bfd_s390_arch): Define according to the default target word size.
1325 Let the 'next' field point to the alternate arch.
1326
e09ab7ac
RS
13272015-03-04 Richard Sandiford <richard.sandiford@arm.com>
1328
1329 PR gas/17843
1330 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1331 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1332 to be used with MOVK rather than MOVZ.
1333
71eef2bd
DD
13342015-03-03 DJ Delorie <dj@redhat.com>
1335
1336 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
1337 there's a symbol.
1338
f01f1741
AM
13392015-02-28 Alan Modra <amodra@gmail.com>
1340
1341 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
1342 not PLT_NEW.
1343
c1d11331
L
13442015-02-27 H.J. Lu <hongjiu.lu@intel.com>
1345
1346 * elf32-i386.c (need_convert_mov_to_lea): New.
1347 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
1348 (elf_i386_convert_mov_to_lea): Return TRUE if
1349 need_convert_mov_to_lea is unset.
1350 * elf64-x86-64.c (need_convert_mov_to_lea): New.
1351 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
1352 (elf_x86_64_convert_mov_to_lea): Return TRUE if
1353 need_convert_mov_to_lea is unset.
1354
cdb602b1
NC
13552015-02-27 Nick Clifton <nickc@redhat.com>
1356
1357 PR binutils/17910
1358 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
1359 string length overflow when the string table length is actually
1360 set.
1361
96c20bc1
MS
13622015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
1363
1364 * bfd/bfd-in2.h: Regenerate.
1365 * bfd/libbfd.h: Regenerate.
1366
1ada945d
MS
13672015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1368
1369 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
1370 TLSDESC_LD_PREL19 field width and masks.
1371 (aarch64_tls_transition_without_check)
1372 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1373 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1374 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1375 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
1376 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1377 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1378
389b8029
MS
13792015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1380
73920eed
MS
1381 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
1382 tests.
389b8029
MS
1383 (aarch64_tls_transition_without_check)
1384 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1385 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1386 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1387 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
1388 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1389 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1390 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1391
3c12b054
MS
13922015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1393
1394 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
1395 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
1396 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1397 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1398 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1399 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
1400 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1401 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1402 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1403
043bf05a
MS
14042015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1405
1406 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
1407 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
1408 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
1409 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
1410 (elfNN_aarch64_check_relocs): Handle
1411 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
1412
1413 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1414 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1415
7366006f
MS
14162015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1417
1418 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
1419
07875fbc
MS
14202015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1421
1422 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
1423 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
1424 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
1425 width.
1426
49d8f92c
MS
14272015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1428
1429 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
1430 field width.
1431
c86934ce
NC
14322015-02-26 Nick Clifton <nickc@redhat.com>
1433
1434 PR binutils/17512
1435 * coffcode.h (coff_compute_section_file_positions): Report
1436 negative page sizes.
1437 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
1438 (assign_file_positions_for_non_load_sections): Replace assertion
1439 with an error message.
1440 (rewrite_elf_program_header): Handle excessive segment
1441 alignments.
1442 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
1443 (bfd_mach_o_read_section_64): Likewise.
1444 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
1445 print a bfd name, not %A.
1446
bd4d2eaa
AM
14472015-02-26 Alan Modra <amodra@gmail.com>
1448
1449 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
1450 thread-safe stubs for iplt.
1451 (build_tls_get_addr_stub): Restore r2 immediately after call.
1452
99654aaf
TG
14532015-02-26 Terry Guo <terry.guo@arm.com>
1454
1455 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
1456 merge Tag_ABI_HardFP_use.
1457
a127494f
AM
14582015-02-26 Alan Modra <amodra@gmail.com>
1459
1460 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
1461 Use text relocs rather than giving an error on trying to use
1462 .dynbss for protected shared lib vars.
1463 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1464
bac13f5a
AB
14652015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1466
1467 * elf32-avr.c (struct elf_avr_section_data): New structure.
1468 (struct avr_relax_info): New structure.
1469 (elf_avr_new_section_hook): New function.
1470 (struct elf_avr_section_data): Add relax_info.
1471 (get_avr_relax_info): New function.
1472 (init_avr_relax_info): New function.
1473 (elf32_avr_relax_delete_bytes): Find next property record before
1474 deleting bytes. When deleting don't move bytes beyond the next
1475 property record.
1476 (avr_elf32_assign_records_to_section): New function.
1477 (avr_property_record_compare): New function.
1478 (avr_load_all_property_sections): New function.
1479 (elf32_avr_relax_section): Load property data. After relaxing the
1480 section, move any .align directives that have enough deleted bytes
1481 before them.
1482 (bfd_elf32_new_section_hook): Define.
1483
137c83d6
AB
14842015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1485
1486 * elf32-avr.h (struct avr_property_header): New strucure.
1487 (avr_elf32_load_property_records): Declare.
1488 (avr_elf32_property_record_name): Declare.
1489 * elf32-avr.c: Add bfd_stdint.h include.
1490 (retrieve_local_syms): New function.
1491 (get_elf_r_symndx_section): New function.
1492 (get_elf_r_symndx_offset): New function.
1493 (internal_reloc_compare): New function.
1494 (struct avr_find_section_data): New structure.
1495 (avr_is_section_for_address): New function.
1496 (avr_find_section_for_address): New function.
1497 (avr_elf32_load_records_from_section): New function.
1498 (avr_elf32_load_property_records): New function.
1499 (avr_elf32_property_record_name): New function.
1500
fdd410ac
AB
15012015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1502
1503 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
1504 (AVR_PROPERTY_RECORDS_VERSION): Define.
1505 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
1506 (struct avr_property_record): New structure.
1507
685080f2
NC
15082015-02-24 Nick Clifton <nickc@redhat.com>
1509
1510 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
1511 style note entry.
1512 (v850_elf_make_note_section): New function. Creates a note
1513 section.
1514 (v850_elf_create_sections): New function. Create a note section
1515 if one is not already present.
1516 (v850_elf_set_note): New function. Adds a note to a bfd.
1517 (v850_elf_copy_private_bfd_data): New function. Copies V850
1518 notes.
1519 (v850_elf_merge_notes): New function. Merges V850 notes.
1520 (print_v850_note): New function. Displays a V850 note.
1521 (v850_elf_print_notes): New function. Displays all notes attached
1522 to a bfd.
1523 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
1524 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
1525 (v850_elf_fake_sections): Set the type of the V850 note section.
1526 * bfd-in.h (v850_elf_create_sections): Add prototype.
1527 (v850_elf_set_note): Add prototype.
1528 * bfd-in2.h: Regenerate.
1529
31593e1b
NC
15302015-02-24 Nick Clifton <nickc@redhat.com>
1531
1532 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
1533 * configure: Regenerate.
1534 * config.in: Regenerate.
1535 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
1536 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
1537 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
1538 is defined.
1539
3ad797fd
NC
15402015-02-24 Nick Clifton <nickc@redhat.com>
1541
1542 * pdp11.c (set_section_contents): Pad the .text and .data sections
1543 to their aligned sizes.
1544
5518c738
YS
15452015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
1546
1547 * config.bfd: Add h8300-*-linux.
1548 * configure.ac: Add h8300_elf32_linux_vec.
1549 * configure: Regenerate.
1550 * elf32-h8300.c: Likewise.
1551 * targets.c(_bfd_target_vector): Likewise.
1552
cb967f0d
NC
15532015-02-23 Nick Clifton <nickc@redhat.com>
1554
1555 PR 17914
1556 * cpu-w65.c: Correct typos in license notice.
1557
0f8f0c57
NC
1558 PR 17940
1559 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
1560 symbols at end of sections. Adjust function sizes.
1561
4ef9f41a
AA
15622015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
1563
1564 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
1565 (elfcore_write_s390_vxrs_high): Likewise.
1566 * elf.c (elfcore_grok_s390_vxrs_low): New function.
1567 (elfcore_grok_s390_vxrs_high): New function.
1568 (elfcore_grok_note): Call them.
1569 (elfcore_write_s390_vxrs_low): New function.
1570 (elfcore_write_s390_vxrs_high): New function.
1571 (elfcore_write_register_note): Call them.
1572
837914ee
BD
15732015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
1574
1575 PR 17995
1576 * verilog.c (verilog_write_record): Correct buffer size.
1577
cf18fda4
AM
15782015-02-19 Alan Modra <amodra@gmail.com>
1579
1580 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
1581
d983c8c5
AM
15822015-02-19 Alan Modra <amodra@gmail.com>
1583
1584 PR ld/4317
1585 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
1586 (elf_link_output_extsym): Drop local and global undefined syms.
1587 Tidy. Expand comment.
1588
2ec55de3
AM
15892015-02-17 Alan Modra <amodra@gmail.com>
1590
1591 PR ld/17975
1592 * elflink.c (struct elf_outext_info): Remove need_second_pass
1593 and second_pass.
1594 (elf_link_output_extsym): Delete code handling second forced
1595 local pass. Move code emitting NULL STT_FILE symbol later, so
1596 that it can be omitted if forced local is stripped. Don't
1597 emit the NULL STT_FILE if no file symbols have been output.
1598 (bfd_elf_final_link): Remove second forced local pass.
1599 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
1600 (ppc_elf_size_dynamic_sections): Likewise.
1601 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1602 (build_global_entry_stubs): Likewise.
1603 (ppc64_elf_build_stubs): Likewise.
1604
6dfb72b9
L
16052015-02-16 H.J. Lu <hongjiu.lu@intel.com>
1606
1607 PR ld/17975
1608 * elflink.c (elf_link_output_extsym): Only check filesym_count
1609 when outputting a NULL FILE symbol. Set second_pass_sym to
1610 h->forced_local && !h->root.linker_def.
1611
576fa883
L
16122015-02-15 H.J. Lu <hongjiu.lu@intel.com>
1613
1614 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
1615 on _TLS_MODULE_BASE_.
1616 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
1617
62f8d217
AM
16182015-02-15 Alan Modra <amodra@gmail.com>
1619
1620 * dwarf2.c (read_rangelist): Correct buffer overflow check
1621 Whitespace throughout file.
1622
ce875075
AM
16232015-02-14 Alan Modra <amodra@gmail.com>
1624
1625 PR ld/17973
1626 * bfd.c (struct bfd): Add lto_output.
1627 * linker.c (_bfd_handle_already_linked): Explicitly test for
1628 objects added by the lto plugin.
1629 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
1630 no_export flags from archive.
1631 * archive.c (open_nested_file): New function, setting lto_output
1632 and no_export, extracted from..
1633 (find_nested_archive): ..here. Flip params. Rename from
1634 _bfd_find_nested_archive.
1635 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
1636 (_bfd_look_for_bfd_in_cache): Copy no_export.
1637 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
1638 my_archive->no_export test.
1639 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
1640 Don't use the file name when adding lto_output STT_FILE sym.
1641 * bfd-in2.h: Regenerate.
1642
451dfd38
AM
16432015-02-13 Alan Modra <amodra@gmail.com>
1644
1645 PR binutils/17512
1646 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
1647 now redundant assert.
1648
dbb3fbbb
NC
16492015-02-12 Nick Clifton <nickc@redhat.com>
1650
1651 PR binutils/17512
1652 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1653 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
1654 (read_indirect_string, read_alt_indirect_string)
1655 (read_alt_indirect_ref, read_address, read_abbrevs)
1656 (read_attribute_value, read_attribute, decode_line_info)
1657 (find_abstract_instance_name, read_rangelist)
1658 (scan_unit_for_symbols, parse_comp_unit)
1659 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
1660 end pointers to reading functions and check for offsets taking
1661 pointers out of range. Replace calls to read_*_leb128 with calls
1662 to safe_read_leb128.
1663
1664 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
1665 offset.
1666 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
1667 computed file_name address being before the start of the string
1668 table.
1669
b9dc5a87
L
16702015-02-11 H.J. Lu <hongjiu.lu@intel.com>
1671
1672 PR ld/17878
1673 * bfd.c (bfd_plugin_format): New.
1674 (bfd): Add plugin_format and plugin_dummy_bfd.
1675 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
1676 argument to return TRUE if any plugin is found. Set plugin_format.
1677 (has_plugin): New.
1678 (bfd_plugin_target_p): New.
1679 (bfd_plugin_specified_p): Likewise.
1680 (bfd_plugin_target_p): Likewise.
1681 (register_ld_plugin_object_p): Likewise.
1682 (bfd_plugin_set_plugin): Set has_plugin.
1683 (load_plugin): Cache try_load_plugin result.
1684 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
1685 plugin_format.
1686 * plugin.h (bfd_plugin_target_p): New.
1687 (bfd_plugin_specified_p): Likewise.
1688 (register_ld_plugin_object_p): Likewise.
1689 * bfd-in2.h: Regenerated.
1690
55172d69
PA
16912015-02-11 Pedro Alves <palves@redhat.com>
1692
1693 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
1694 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
1695 * libbfd.h: Regenerate.
1696 * libcoff.h: Regenerate.
1697
1698 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
1699 * mach-o.h [__cplusplus]: Wrap in extern "C".
1700 * som.h [__cplusplus]: Wrap in extern "C".
1701
77ef8654
NC
17022015-02-10 Nick Clifton <nickc@redhat.com>
1703
1704 PR binutils/17512
1705 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
1706 hold the flag bits.
1707 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
1708 size and number of relocs.
1709 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
1710 codeview record.
1711 * versados.c (process_otr): Check the esdid value before using it
1712 to access the EDATA.
1713
35181b3e
EM
17142015-02-09 Ed Maste <emaste@freebsd.org>
1715
1716 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
1717 uninitialized and unused variable.
1718 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1719
989f9879
AM
17202015-02-09 Alan Modra <amodra@gmail.com>
1721
1722 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
1723 tls_sec.
1724 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1725 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
1726
ca4be51c
AM
17272015-02-09 Alan Modra <amodra@gmail.com>
1728
1729 * elflink.c: Whitespace, formatting fixes.
1730 (elf_link_input_bfd): Clarify comment.
1731 (elf_link_output_extsym): Exclude symbols in linker created
1732 sections when testing for plugin symbols.
1733
1952c5cd
L
17342015-02-07 H.J. Lu <hongjiu.lu@intel.com>
1735
1736 PR ld/17935
1737 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1738 warning for relocation in readonly section for -z text.
1739 (elf_i386_size_dynamic_sections): Likewise.
1740 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1741 (elf_x86_64_size_dynamic_sections): Likewise.
1742
9e2dec47
L
17432015-02-06 H.J. Lu <hongjiu.lu@intel.com>
1744
1745 PR ld/12365
1746 PR ld/14272
1747 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1748 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
1749 referenced from a non-IR file.
1750
5929c344
NC
17512015-02-06 Nick Clifton <nickc@redhat.com>
1752
1753 PR binutils/17512
1754 * peXXigen.c (rsrc_print_resource_entries): Add range check for
1755 addresses that wrap around the address space.
1756 (rsrc_parse_entry): Likewise.
1757
60f79275
L
17582015-02-03 H.J. Lu <hongjiu.lu@intel.com>
1759
1760 PR ld/12365
1761 PR ld/14272
1762 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1763 undefined if it is referenced from a non-IR file.
1764
64d29018
NC
17652015-02-03 Nick Clifton <nickc@redhat.com>
1766
1767 PR binutils/17512
1768 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1769 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1770 index or an out of range fdr index.
1771 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1772 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1773 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1774 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1775 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1776 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
1777 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1778 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1779 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1780 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1781 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1782 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
1783 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1784 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1785 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1786 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1787 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1788 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
1789 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
1790 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
1791 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
1792 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
1793 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
1794 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
1795 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
1796 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
1797 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
1798 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
1799 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
1800 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
1801 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
1802 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
1803 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
1804 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
1805 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
1806 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
1807 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
1808 * elf32-vax.c (rtype_to_howto): Likewise.
1809 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
1810 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
1811 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
1812 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
1813 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
1814 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
1815 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
1816 of range symbol indicies.
1817 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
1818 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
1819 (bfd_mach_o_build_dysymtab): Likewise.
1820 (bfd_mach_o_write_symtab_content): Set the string table size to
1821 zero upon error.
1822 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
1823 read fails.
1824 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
1825 fields.
1826 * tekhex.c (first_phase): Check for src pointer reaching end of
1827 buffer.
1828
3a635617
WN
18292015-02-03 Will Newton <will.newton@linaro.org>
1830
46b87d49
WN
1831 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
1832 Set st_value to zero for undefined symbols if the reference
1833 is weak or pointer_equality_needed is FALSE.
1834
3a635617
WN
1835 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
1836 comment discussing why we clear st_value for some symbols.
1837
0c4bd9d9
KLC
18382015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1839
1840 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
1841 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
1842
b86ac8e3
AM
18432015-01-29 Alan Modra <amodra@gmail.com>
1844
1845 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
1846 optimization. Tidy mask for GOT_TLSGD optimization.
1847 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
1848 location of nop zapping high insn too.
1849
dbd1e97e
AM
18502015-01-28 Alan Modra <amodra@gmail.com>
1851
1852 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
1853 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
1854 in .toc indicate xlc compiled code that might require a rw .toc.
1855
3f8107ab
AM
18562015-01-28 James Bowman <james.bowman@ftdichip.com>
1857
1858 * Makefile.am: Add FT32 files.
1859 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
1860 (bfd_mach_ft32): Define.
1861 (bfd_ft32_arch): Declare.
1862 (bfd_archures_list): Add bfd_ft32_arch.
1863 * config.bfd: Handle FT32.
1864 * configure.ac: Likewise.
1865 * cpu-ft32.c: New file.
1866 * elf32-ft32.c: New file.
1867 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
1868 BFD_RELOC_FT32_18): Define.
1869 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
1870 * bfd-in2.h: Regenerate.
1871 * libbfd.h: Regenerate.
1872 * Makefile.in: Regenerate.
1873 * configure: Regenerate.
1874 * po/SRC-POTFILES.in: Regenerate.
1875
37e3922e
NC
18762015-01-27 Nick Clifton <nickc@redhat.com>
1877
1878 PR binutils/17512
1879 * pdp11.c (aout_get_external_symbols): Return false if there are
1880 no symbols.
1881
877a8638
NC
1882 * dwarf2.c (concat_filename): Check for an empty directory table.
1883 (scan_unit_for_symbols): Check for reading off the end of the
1884 unit.
1885 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
1886 non-string form.
1887 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
1888 available.
1889
18393a2e
KLC
18902015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
1891
1892 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
1893
055173ca
DD
18942015-01-22 DJ Delorie <dj@redhat.com>
1895
1896 * elf32-m32c.c (m32c_apply_reloc_24): New.
1897 (m32c_elf_howto_table): Use it for R_M32C_24.
1898 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
1899
4e5cb37e
NC
19002015-01-22 Nick Clifton <nickc@redhat.com>
1901
1902 PR binutils/17512
1903 * coffcode.h (handle_COMDAT): When searching for the section
1904 symbol, make sure that there is space left in the symbol table.
1905 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
1906
86eafac0
NC
19072015-01-21 Nick Clifton <nickc@redhat.com>
1908
1909 PR binutils/17512
1910 * coffcode.h (coff_set_arch_mach_hook): Check return value from
1911 bfd_malloc.
1912 (coff_slurp_line_table): Return FALSE if the line number
1913 information was corrupt.
1914 (coff_slurp_symbol_table): Return FALSE if the symbol information
1915 was corrupt.
1916 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
1917 initialise the fields of the dyld_info structure.
1918 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
1919 error message and a return value.
1920 (bfd_mach_o_layout_commands): Change the function to boolean.
1921 Return FALSE if the function fails.
1922 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
1923 fails.
1924 (bfd_mach_o_read_command): Fail if an unrecognised command is
1925 encountered.
1926 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
1927 read fails.
1928 (slurp_symtab): Check the return from bfd_malloc.
1929 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
1930 encountered an error.
1931 (_bfd_XXi_final_link_postscript): Fail if a section could not be
1932 copied.
1933 * peicode.h (pe_bfd_object_p): Fail if the header could not be
1934 swapped in.
1935 * tekhex.c (first_phase): Fail if the section is too big.
1936 * versados.c (struct esdid): Add content_size field.
1937 (process_otr): Use and check the new field.
1938 (versados_get_section_contents): Check that the section exists and
1939 that the requested data is available.
1940
03d5b773
CLT
19412015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
1942
1943 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
1944
1c9177d9
AM
19452015-01-20 Alan Modra <amodra@gmail.com>
1946
1947 PR ld/17615
1948 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
1949 ELF_COMMON_DEF syms.
1950
c4621b33
AM
19512015-01-19 Alan Modra <amodra@gmail.com>
1952
3e2aa5bb 1953 PR ld/17615
c4621b33
AM
1954 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
1955 linker script assignments too.
1956 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
1957 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
1958
0ba38529
AM
19592015-01-19 Alan Modra <amodra@gmail.com>
1960
1961 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
1962 to allow return of first howto.
1963 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
1964 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
1965 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
1966 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
1967 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
1968 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
1969 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
1970 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
1971 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
1972 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
1973 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
1974 (spu_elf_reloc_type_lookup): Adjust to suit.
1975
6346d5ca
AM
19762015-01-19 Alan Modra <amodra@gmail.com>
1977
1978 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
1979 (bfd_get_section_limit): ..here.
1980 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
1981 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
1982 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
1983 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
1984 bfd_reloc_outofrange check.
1985 * bfd-in2.h: Regenerate.
1986
1987 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
1988 on zero size relocs.
1989 * ecoff.c (ecoff_reloc_link_order): Likewise.
1990 * elf32-nds32.c (nds32_relocate_contents): Likewise.
1991 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
1992
1993 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
1994 (_bfd_clear_contents): Likewise.
1995 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
1996 (mips_elf_perform_relocation): Likewise.
1997
1998 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
1999 from malloc on zero size alloc.
2000 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2001 * elflink.c (elf_reloc_link_order): Likewise.
2002 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2003 * pdp11.c (aout_link_reloc_link_order): Likewise.
2004 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2005
2006 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2007 bitsize 0, and complain_overflow_dont.
2008 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2009 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2010 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2011 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2012 * elf32-arc.c (elf_arc_howto_table): Likewise.
2013 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2014 * elf32-avr.c (elf_avr_howto_table): Likewise.
2015 * elf32-bfin.c (bfin_howto_table): Likewise.
2016 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2017 * elf32-cris.c (cris_elf_howto_table): Likewise.
2018 * elf32-crx.c (crx_elf_howto_table): Likewise.
2019 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2020 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2021 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2022 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2023 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2024 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2025 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2026 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2027 * elf32-i386.c (elf_howto_table): Likewise.
2028 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2029 * elf32-i960.c (elf32_i960_relocate): Likewise.
2030 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2031 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2032 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2033 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2034 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2035 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2036 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2037 * elf32-m68k.c (howto_table): Likewise.
2038 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2039 * elf32-mep.c (mep_elf_howto_table): Likewise.
2040 * elf32-metag.c (elf_metag_howto_table): Likewise.
2041 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2042 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2043 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2044 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2045 * elf32-mt.c (mt_elf_howto_table): Likewise.
2046 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2047 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2048 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2049 * elf32-pj.c (pj_elf_howto_table): Likewise.
2050 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2051 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2052 * elf32-rx.c (rx_elf_howto_table): Likewise.
2053 * elf32-s390.c (elf_howto_table): Likewise.
2054 * elf32-score.c (elf32_score_howto_table): Likewise.
2055 * elf32-score7.c (elf32_score_howto_table): Likewise.
2056 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2057 * elf32-spu.c (elf_howto_table): Likewise.
2058 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2059 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2060 * elf32-v850.c (v850_elf_howto_table): Likewise.
2061 * elf32-vax.c (howto_table): Likewise.
2062 * elf32-visium.c (visium_elf_howto_table): Likewise.
2063 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2064 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
2065 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2066 * elf32-xtensa.c (elf_howto_table): Likewise.
2067 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2068 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2069 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
2070 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2071 * elf64-s390.c (elf_howto_table): Likewise.
2072 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
2073 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2074 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2075 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2076 (elfNN_aarch64_howto_none): Likewise.
2077 * elfxx-ia64.c (ia64_howto_table): Likewise.
2078 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2079 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2080 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2081
6333bc0d
L
20822015-01-15 H.J. Lu <hongjiu.lu@intel.com>
2083
2084 PR ld/17847
2085 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2086 about -fPIC if the symbol is undefined when building executable.
2087
cd21f5da
NC
20882015-01-15 Nick Clifton <nickc@redhat.com>
2089
2090 PR binutils/17512
2091 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2092 error message. Never return an invalid howto pointer.
2093 * elf32-cr16.c (cr16_info_to_howto): Likewise.
2094 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2095 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2096 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2097 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2098 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2099 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2100 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2101 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2102 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2103 * elf32-vax.c (rtype_to_howto): Likewise.
2104 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2105 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2106 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2107 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2108 (sh_elf_reloc): Check that the reloc is in range.
2109 * reloc.c (bfd_perform_relocation): Check that the section is big
2110 enough for the entire reloc.
2111 (bfd_generic_get_relocated_section_contents): Report unexpected
2112 return values from perform_reloc.
2113
2d071cfc
NC
21142015-01-15 Nick Clifton <nickc@redhat.com>
2115
2116 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2117 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
2118 relaxation.
2119
ca55926c
AM
21202015-01-15 Alan Modra <amodra@gmail.com>
2121
2122 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2123 any output section matching a linker created dynobj section.
2124
8539e4e8
AM
21252015-01-15 Alan Modra <amodra@gmail.com>
2126
2127 PR 17842
2128 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2129 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
2130 Don't assign symtab file position unless symbols will be output.
2131 Merge blocks with condition in common. Don't call
2132 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2133 unless other symbols are output. Move assignment of symtab_shndx
2134 file position. Localize variable.
2135
52db4ec2
JW
21362015-01-14 Jiong Wang <jiong.wang@arm.com>
2137
2138 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2139 trying to defer them to runtime.
2140
0941db69
JW
21412015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2142
2143 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2144 to check if a symbol should be bound symbolically.
2145
0172429c
JW
21462015-01-13 Jiong Wang <jiong.wang@arm.com>
2147
2148 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2149 for TLSLE_MOVW_TPREL_G2.
2150
bab91cce
JW
21512015-01-13 Jiong Wang <jiong.wang@arm.com>
2152
2153 PR ld/17415
2154 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2155 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2156 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2157 bit mask.
2158
3c758495
TG
21592015-01-12 Terry Guo <terry.guo@arm.com>
2160
2161 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2162 function.
2163 (_bfd_elf_gc_mark_extra_sections): Use it.
2164
9d1d54d5
L
21652015-01-11 H.J. Lu <hongjiu.lu@intel.com>
2166
2167 PR ld/17827
2168 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2169 only discard space for pc-relative relocs symbols which turn
2170 out to need copy relocs.
2171
c6e8e93a
NC
21722015-01-09 Nick Clifton <nickc@redhat.com>
2173
2174 * tekhex.c (getvalue): Fix thinko in test for correct extraction
2175 of value.
2176 (getsym): Return false if there was not enough data to extract the
2177 symbol.
2178
400cf8cb
AG
21792015-01-09 Anthony Green <green@moxielogic.com>
2180
2181 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2182
23d4663e
NC
21832015-01-08 Nick Clifton <nickc@redhat.com>
2184
2185 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2186 16-bit absolute BR instructions to 10-bit pc-relative JMP
2187 instructions.
2188
063bb025
NC
21892015-01-08 Nick Clifton <nickc@redhat.com>
2190
2191 PR binutils/17512
2192 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
2193 to load the line table.
2194 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2195 maxpagesize of 1.
2196 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2197 the Data Directory Size is too large.
2198
6f25f223
L
21992015-01-06 H.J. Lu <hongjiu.lu@intel.com>
2200
2201 PR binutils/17512
2202 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2203 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2204
85880250
NC
22052015-01-06 Nick Clifton <nickc@redhat.com>
2206
2207 PR binutils/17512
e7287c7f
NC
2208 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2209 string table.
2210
ec93045b
NC
2211 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2212 (bfd_perform_relocation): Include the size of the reloc in the
2213 test for an out of range relocation.
2214 (bfd_generic_get_relocated_section_contents): Remove reloc range
2215 test.
2216
85880250
NC
2217 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2218 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2219 avoid reading off the end of the buffer.
2220 (getsym): Likewise.
2221 (first_phase): Likewise.
2222 (pass_over): Pass an end pointer to the invoked function.
2223
533d0af0
L
22242015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2225
2226 PR binutils/17512
2227 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2228 input.
2229 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2230
896ca098
NC
22312015-01-05 Nick Clifton <nickc@redhat.com>
2232
2233 PR binutils/17512
2234 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2235 is at least big enough for the header to be read.
2236 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2237 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2238 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2239 unrecognized commands.
2240 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2241 when indexing into the string table.
2242
b90efa5b 22432015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 2244
b90efa5b 2245 Update year range in copyright notice of all files.
ee3b52e9 2246
b90efa5b 2247For older changes see ChangeLog-2014
56882138 2248\f
b90efa5b 2249Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
2250
2251Copying and distribution of this file, with or without modification,
2252are permitted in any medium without royalty provided the copyright
2253notice and this notice are preserved.
2254
56882138
AM
2255Local Variables:
2256mode: change-log
2257left-margin: 8
2258fill-column: 74
2259version-control: never
2260End:
This page took 1.125037 seconds and 4 git commands to generate.