]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
Fix compile time warning messages about constant expressions where a value is being...
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
422f1182
L
12015-08-10 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf-bfd.h (elf_symbol_version): New enum.
4 (elf_link_hash_entry): Replace hidden with versioned.
5 * elflink.c (_bfd_elf_merge_symbol): Don't look for symbol
6 version if the symbol is unversioned. Initialize versioned.
7 (_bfd_elf_add_default_symbol): Don't look for symbol version
8 if the symbol is unversioned or hidden. Initialize versioned.
9 (elf_collect_hash_codes): Don't look for symbol version if the
10 symbol is unversioned.
11 (elf_collect_gnu_hash_codes): Likewise.
12 (bfd_elf_gc_mark_dynamic_ref_symbol): Likewise.
13 (_bfd_elf_link_hash_copy_indirect): Check versioned instead of
14 hidden.
15 (elf_link_output_extsym): Likewise.
16
d4ac1f87
L
172015-08-07 H.J. Lu <hongjiu.lu@intel.com>
18
19 PR binutils/18785
20 * elf.c (_bfd_elf_copy_private_bfd_data): When copying the
21 sh_link and sh_info fields in stripped section headers, we also
22 check if the sh_type, sh_flags, /sh_addralign and sh_entsize
23 fields of the output section match the output. Since
24 --only-keep-debug turns all non-debug sections into SHT_NOBITS
25 sections, the output SHT_NOBITS type matches any input type.
26
6e33951e
L
272015-08-07 H.J. Lu <hongjiu.lu@intel.com>
28
29 PR ld/18720
30 * elflink.c (_bfd_elf_merge_symbol): Add a parameter to indicate
31 if the new symbol matches the existing one. The new hidden
32 versioned symbol matches the existing symbol if they have the
33 same symbol version. Update the existing symbol only if they
34 match.
35 (_bfd_elf_add_default_symbol): Update call to
36 _bfd_elf_merge_symbol.
37 (_bfd_elf_link_assign_sym_version): Don't set the hidden field
38 here.
39 (elf_link_add_object_symbols): Override a definition only if the
40 new symbol matches the existing one.
41 (_bfd_elf_link_hash_copy_indirect): Don't copy any references to
42 the hidden versioned symbol.
43 (elf_link_output_extsym): Bind a symbol locally when linking
44 executable if it is locally defined, hidden versioned, not
45 referenced by shared library and not exported. Turn on
422f1182 46 VERSYM_HIDDEN only if the hidden versioned symbol is defined
6e33951e
L
47 locally.
48
63b9bbb7
NC
492015-08-05 Nick Clifton <nickc@redhat.com>
50
51 * elf.c (_bfd_elf_copy_private_bfd_data): Copy the sh_link and
52 sh_info fields of sections whose type has been changed to
53 SHT_NOBITS.
54
7e27a9d5
YK
552015-08-04 Yuriy M. Kaminskiy" <yumkam@gmail.com>
56 Tyler Hicks <tyhicks@canonical.com>
57
58 PR binutils/18750
59 * ihex.c (ihex_scan): Fixes incorrect escape sequence in error message
60 and stack overflow when char is signed and \200-\376 was in place of hex
61 digit; also fixes \377 was handled as EOF instead of "incorrect character".
62 (ihex_read_section): Changed for consistency.
63 (ihex_bad_byte): Prevent (now impossible to trigger) stack
64 overflow and incorrect escape sequence handling.
65 * srec.c (srec_bad_byte): Likewise.
66
cb1c8103
HPN
672015-08-03 Hans-Peter Nilsson <hp@axis.com>
68
69 * elf32-cris.c (cris_elf_relocate_section)
70 (elf_cris_finish_dynamic_symbol, cris_elf_check_relocs)
71 (elf_cris_discard_excess_dso_dynamics): Use SYMBOLIC_BIND, not
4122b413 72 just link_info->symbolic, to check if a symbol should be bound
cb1c8103
HPN
73 symbolically.
74
c6e8a9a8
L
752015-07-30 H.J. Lu <hongjiu.lu@intel.com>
76
77 PR ld/18735
78 * elflink.c (_bfd_elf_add_default_symbol): Add the default
79 symbol if not performing a relocatable link.
80 (elf_link_add_object_symbols): Adjust the default symbol if
81 not performing a relocatable link.
82
e77e648e
L
832015-07-29 H.J. Lu <hongjiu.lu@intel.com>
84
85 * elflink.c (elf_link_add_object_symbols): Remove
86 !info->relocatable check for info->executable. Add
87 !info->relocatable check for !info->executable.
88 (elf_link_output_extsym): Remove
89 !info->relocatable check for info->executable.
90
11509220
HPN
912015-07-29 Hans-Peter Nilsson <hp@bitrange.com>
92
93 * mmo.c (mmo_write_symbols_and_terminator): Skip symbol-type
94 assignment loop for bfd plugin objects.
95
e5654c0f
AM
962015-07-28 Alan Modra <amodra@gmail.com>
97
98 * elf.c (_bfd_elf_map_sections_to_segments): Do not make a new
99 segment for loaded sections after nonloaded sections if the
100 sections are on the same page.
101
d6f1bafa
IB
1022015-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
103
104 * configure.in: Add asprintf and vasprintf to AC_CHECK_DECLS.
105 * config.in, configure: Regenerate.
106
37a42ee9
L
1072015-07-27 H.J. Lu <hongjiu.lu@intel.com>
108
109 * configure: Regenerated.
110
79559014
NC
1112015-07-27 Nick Clifton <nickc@redhat.com>
112
113 * elf32-msp430.c (uses_large_model): New function.
114 (msp430_elf_eh_frame_address_size): New function.
115 (elf_backend_eh_frame_address_size): Define.
116
32f573bc
SN
1172015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
118
119 PR ld/18705
120 * elfnn-aarch64.c (elf_backend_extern_protected_data): Define.
121
b68a20d6
SN
1222015-07-27 Szabolcs Nagy <szabolcs.nagy@arm.com>
123
124 PR ld/18705
125 * elf32-arm.c (elf_backend_extern_protected_data): Define.
126
18d9555c
L
1272015-07-25 H.J. Lu <hongjiu.lu@intel.com>
128
129 PR ld/18718
130 * elflink.c (elf_link_output_extsym): Check symbol version
131 section check only if not linking executable, the symbol is
132 referenced by shared library or not locally defined.
133
a496fbc8
AM
1342015-07-25 Thomas Preud'homme <thomas.preudhomme@arm.com>
135
136 * elf32-arm.c (elf32_arm_final_link_relocate): Use SYMBOLIC_BIND to
137 check if a symbol should be bound symbolically.
138 * elf32-hppa.c (elf32_hppa_check_relocs,
139 elf32_hppa_adjust_dynamic_symbol, elf32_hppa_relocate_section,
140 elf32_hppa_finish_dynamic_symbol): Likewise.
141 * elf32-m68k.c (elf_m68k_check_relocs,
142 elf_m68k_relocate_section): Likewise.
143 * elf32-nios2.c (nios2_elf32_relocate_section,
144 nios2_elf32_check_relocs, allocate_dynrelocs): Likewise.
145 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol,
146 elf32_tic6x_relocate_section): Likewise.
147
91cb26da
AM
1482015-07-24 Alan Modra <amodra@gmail.com>
149
150 * elf.c (_bfd_elf_assign_file_positions_for_non_load): Use .rela
151 prefix for reloc section corresponding to rela section associated
152 with renamed debug section.
153
2fb9328d
AM
1542015-07-24 Alan Modra <amodra@gmail.com>
155
156 * section.c (bfd_get_section_by_name_if): Iterate over entire hash
157 chain.
158
d5cff5df
JM
1592015-07-23 Joseph Myers <joseph@codesourcery.com>
160
161 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections)
162 <DT_MIPS_RLD_MAP_REL>: Add target address to host address
163 difference, not to host pointer.
164
bb854a36
AM
1652015-07-22 Alan Modra <amodra@gmail.com>
166
167 * elf64-ppc.c (opd_entry_value): Remove assertion. Instead,
168 return -1 if symbol referenced is not defined. Tidy.
169
f2d7e0f4
AM
1702015-07-20 Alan Modra <amodra@gmail.com>
171
172 * po/SRC-POTFILES.in: Regenerate.
173
4c0a9a6f
JW
1742015-07-17 Jiong Wang <jiong.wang@arm.com>
175
176 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Sort alphabetically.
177 (IS_AARCH64_TLSDESC_RELOC): Sort alphabetically.
178
77a69ff8
JW
1792015-07-16 Jiong Wang <jiong.wang@arm.com>
180
181 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
182 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
183 (aarch64_reloc_got_type): Ditto.
184 (elfNN_aarch64_final_link_relocate): Ditto.
185 (elfNN_aarch64_relocate_section): Ditto.
186 (elfNN_aarch64_gc_sweep_hook): Ditto.
187 (elfNN_aarch64_check_relocs): Ditto.
188 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
189 (_bfd_aarch64_elf_resolve_relocation): Ditto.
190
6c37fedc
JW
1912015-07-16 Jiong Wang <jiong.wang@arm.com>
192
193 * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADR_PREL21): New entry.
194 * bfd-in2.h: Regenerate.
195 * libbfd.h: Regenerate.
196 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
197 BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
198
88988473
L
1992015-07-10 H.J. Lu <hongjiu.lu@intel.com>
200
201 PR binutils/18656
202 * bfd.c (bfd_convert_section_size): New function.
203 (bfd_convert_section_contents): Likewise.
204 * bfd-in2.h: Regenerated.
205
de231f20
CM
2062015-07-09 Catherine Moore <clm@codesourcery.com>
207
208 * elflink.c (bfd_elf_size_dynamic_sections): Call to
209 _bfd_elf_maybe_strip_eh_frame_hdr should be before
210 bed->elf_backend_size_dynamic_sections.
211
328e7bfd
DC
2122015-07-08 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
213
214 * elf32-avr.c: Add 32 bit PC relative relocation for AVR target.
215
92a9c616
RS
2162015-07-05 Richard Sandiford <richard.sandiford@arm.com>
217
218 * elf64-ppc.c (toc_adjusting_stub_needed): Use the symbol value
219 plus addend rather than the original st_value when looking up
220 entries in opd->adjust.
221
0f088b2a
KT
2222015-07-03 Kai Tietz <ktietz@redhat.com>
223 Nick Clifton <nickc@redhat.com>
224
225 PR ld/11539
226 * coffcode.h (coff_bfd_gc_sections): Define default
227 to bfd_coff_gc_sections function.
228 (coff_gc_mark_hook_fn): New type.
229 * coffgen.c (init_reloc_cookie): Copy and adjust coff
230 related code about gc-sections from elflink.c to here.
231 (fini_reloc_cookie): Likewise.
232 (init_reloc_cookie_rels): Likewise.
233 (fini_reloc_cookie_rels): Likewise.
234 (init_reloc_cookie_for_section): Likewise.
235 (fini_reloc_cookie_for_section): Likewise.
236 (_bfd_coff_gc_mark_hook): Likewise.
237 (_bfd_coff_gc_mark_rsec): Likewise.
238 (_bfd_coff_gc_mark_reloc): Likewise.
239 (_bfd_coff_gc_mark): Likewise.
240 (_bfd_coff_gc_mark_extra_sections): Likewise.
241 (coff_gc_sweep_symbol_info): Likewise.
242 (coff_gc_sweep_symbol): Likewise.
243 (gc_sweep_hook_fn): Likewise.
244 (coff_gc_sweep): Likewise.
245 (bfd_coff_gc_sections): Likewise.
246 (_bfd_coff_gc_keep): Likewise.
247 * libcoff-in.h (coff_reloc_cookie): New struct.
248 (bfd_coff_gc_sections): New prototype.
249 * libcoff.h: Regenerate.
250
8c163c5a
SL
2512015-07-01 Sandra Loosemore <sandra@codesourcery.com>
252 Cesar Philippidis <cesar@codesourcery.com>
253
254 * bfd-in2.h: Regenerated.
255 * elf32-nios2.c (elf_nios2_howto_table_rel): Rename to...
256 (elf_nios2_r1_howto_table_rel): This.
257 (elf_nios2_r2_howto_table_rel): New.
258 (BFD_IS_R2): New.
259 (lookup_howto): Add ABFD parameter. Adjust to look up in either
260 the R1 or R2 relocation table, as determined by ABFD.
261 (nios2_reloc_map): Add R2 relocations.
262 (nios2_elf32_bfd_reloc_type_lookup): Do lookup using lookup_howto.
263 Pass it the ABFD parameter.
264 (nios2_elf32_bfd_reloc_name_lookup): Use ABFD to decide whether to
265 return an R1 or R2 relocation.
266 (nios2_elf32_info_to_howto): Do lookup using lookup_howto.
267 Pass it the ABFD parameter.
268 (nios2_elf32_do_call26_relocate): Check for alignment on a 4-byte
269 boundary.
270 (nios2_elf32_relocate_section): Adjust call to lookup_howto.
271 * libbfd.h: Regenerated.
272 * reloc.c (BFD_RELOC_NIOS2_R2_S12): New.
273 (BFD_RELOC_NIOS2_R2_I10_1_PCREL): New.
274 (BFD_RELOC_NIOS2_R2_T1I7_1_PCREL): New.
275 (BFD_RELOC_NIOS2_R2_T1I7_2): New.
276 (BFD_RELOC_NIOS2_R2_T2I4): New.
277 (BFD_RELOC_NIOS2_R2_T2I4_1): New.
278 (BFD_RELOC_NIOS2_R2_T2I4_2): New.
279 (BFD_RELOC_NIOS2_R2_X1I7_2): New.
280 (BFD_RELOC_NIOS2_R2_X2L5): New.
281 (BFD_RELOC_NIOS2_R2_F1I5_2): New.
282 (BFD_RELOC_NIOS2_R2_L5I4X1): New.
283 (BFD_RELOC_NIOS2_R2_T1X1I6): New.
284 (BFD_RELOC_NIOS2_R2_T1X1I6_2): New.
285
965b1d80
SL
2862015-07-01 Sandra Loosemore <sandra@codesourcery.com>
287 Cesar Philippidis <cesar@codesourcery.com>
288
289 * archures.c (bfd_mach_nios2r1, bfd_mach_nios2r2): New.
290 * bfd-in2.h: Regenerated.
291 * cpu-nios2.c (nios2_compatible): New.
292 (N): Use nios2_compatible instead of bfd_default_compatible.
293 (NIOS2R1_NEXT, NIOS2R2_NEXT): Define.
294 (arch_info_struct): New.
295 (bfd_nios2_arch): Chain to NIOS2R1_NEXT.
296 * elf32-nios2.c (is_nios2_elf): New.
297 (nios2_elf32_merge_private_bfd_data): New.
298 (nios2_elf32_object_p): New.
299 (bfd_elf32_bfd_merge_private_bfd_data): Define.
300 (elf_backend_object_p): Define.
301
dfc87947
L
3022015-07-01 H.J. Lu <hongjiu.lu@intel.com>
303
304 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Refactor.
305
5ee4a1ca
NC
3062015-06-30 Nick Clifton <nickc@redhat.com>
307
308 PR binutils/18570
309 * elf-attrs.c (obj_attr_size): Use an unsigned int type for the tag.
310 (write_obj_attribute): Likewise.
311 (elf_new_obj_attr): Likewise.
312 (bfd_elf_get_obj_attr_int): Likewise.
313 (bfd_elf_add_obj_attr_int): Likewise.
314 (bfd_elf_add_obj_attr_string): Likewise.
315 (bfd_elf_add_obj_attr_int_string): Likewise.
316 (gnu_obj_attrs_arg_type): Likewise.
317 (_bfd_elf_obj_attrs_arg_type): Likewise.
318 (_bfd_elf_parse_attributes): Likewise.
319 (_bfd_elf_merge_unknown_attribute_list): Likewise.
320 * elf-bfd.h (struct obj_attribute_list): Likewise.
321 Update prototypes.
322
ee0c0c50
L
3232015-06-28 H.J. Lu <hongjiu.lu@intel.com>
324
325 * bfd-in.h (compressed_debug_section_type): Remove
326 COMPRESS_DEBUG_ZLIB.
327 * bfd-in2.h : Regenerated.
328
a5499fa4
MF
3292015-06-26 Matthew Fortune <matthew.fortune@imgtec.com>
330
331 * elfxx-mips.c (_bfd_mips_elf_create_dynamic_sections): Use executable
332 instead of !shared to indicate an application vs shared library.
333 (_bfd_mips_elf_size_dynamic_sections): Likewise.
334 (_bfd_mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP_REL.
335 (_bfd_mips_elf_get_target_dtag): Likewise.
336
3f307074
DD
3372015-06-25 DJ Delorie <dj@redhat.com>
338
339 * elf32-msp430.c (msp430_final_link_relocate): Fix comments. Fix
340 REL loads to match RELA stores.
341
946748d5
L
3422015-06-25 H.J. Lu <hongjiu.lu@intel.com>
343
344 * elf.c (_bfd_elf_compute_section_file_positions): Don't
345 initialize sh_size for .shstrtab here.
346
ef10c3ac
L
3472015-06-25 H.J. Lu <hongjiu.lu@intel.com>
348
349 PR gas/18451
350 * elf-bfd.h (elf_sym_strtab): New.
351 (elf_link_hash_table): Add strtabcount, strtabsize and
352 strtab.
353 (_bfd_elf_stringtab_init): Removed.
354 * elf.c (_bfd_elf_stringtab_init): Removed.
355 (_bfd_elf_compute_section_file_positions): Replace
356 bfd_strtab_hash/_bfd_elf_stringtab_init/_bfd_stringtab_free/
357 _bfd_stringtab_size with
358 elf_strtab_hash/_bfd_elf_strtab_init/_bfd_elf_strtab_free/
359 _bfd_elf_strtab_size. Use _bfd_elf_strtab_add,
360 _bfd_elf_strtab_finalize and _bfd_elf_strtab_offset to get
361 st_name.
362 (swap_out_syms): Likewise.
363 * elflink.c (elf_final_link_info): Replace bfd_strtab_hash
364 with elf_strtab_hash. Remove symbuf, symbuf_count,
365 symbuf_size and shndxbuf_size.
366 (elf_link_flush_output_syms): Removed.
367 (elf_link_output_sym): Renamed to ...
368 (elf_link_output_symstrtab): This. Replace _bfd_stringtab_add
369 with _bfd_elf_strtab_add. Don't flush symbols to the file nor
370 swap out symbols.
371 (elf_link_swap_symbols_out): New.
372 (elf_link_output_extsym): Replace elf_link_output_sym with
373 elf_link_output_symstrtab.
374 (elf_link_input_bfd): Likewise.
375 (elf_final_link_free): Replace _bfd_stringtab_free with
376 _bfd_elf_strtab_free. Remove symbuf.
377 (bfd_elf_final_link): Replace _bfd_elf_stringtab_init with
378 _bfd_elf_strtab_init. Don't set symbuf, symbuf_count,
379 symbuf_size nor shndxbuf_size. Initialize strtabsize and
380 strtab. Initialize symshndxbuf to -1 when number of sections
381 >= 64K. Replace elf_link_output_sym/elf_link_output_sym with
382 elf_link_output_symstrtab/elf_link_output_symstrtab. Don't
383 call elf_link_flush_output_syms. Call _bfd_elf_strtab_finalize
384 and elf_link_swap_symbols_out. Replace _bfd_stringtab_size
385 and _bfd_stringtab_emit with _bfd_elf_strtab_size and
386 _bfd_elf_strtab_emit.
387
7cc152be
L
3882015-06-24 H.J. Lu <hongjiu.lu@intel.com>
389
390 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Silence older
391 GCC warning.
392
7c1e8d3e
L
3932015-06-24 H.J. Lu <hongjiu.lu@intel.com>
394
395 * elf32-i386.c (elf_i386_allocate_dynrelocs): Always allocate
396 space for the first .plt entry.
397 (elf_i386_size_dynamic_sections): Always add DT_PLTGOT for .plt
398 section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
399 there are PLT relocations.
400 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Always
401 allocate space for the first .plt entry.
402 (elf_x86_64_size_dynamic_sections): Always add DT_PLTGOT for
403 .plt section. Add DT_PLTRELSZ, DT_PLTREL and DT_JMPREL only if
404 there are PLT relocations.
405
59cab532
L
4062015-06-24 H.J. Lu <hongjiu.lu@intel.com>
407
408 PR ld/18591
409 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Don't convert
410 R_X86_64_GOTPCREL to R_X86_64_PC32 if it will cause relocation
411 overflow.
412
c2170589
JW
4132015-06-23 Jiong Wang <jiong.wang@arm.com>
414
415 * elfnn-aarch64.c (aarch64_readonly_dynrelocs): New function.
416 (elfNN_aarch64_size_dynamic_sections): Traverse hash table to check
417 relocations against read-only sections.
418
75c11999
NC
4192015-06-18 Nick Clifton <nickc@redhat.com>
420
421 PR 18481
422 * elf32-arm.c (R_ARM_TLS_LE32): Set the special function to NULL.
423
56f40832
JT
4242015-06-15 Jon Turney <jon.turney@dronecode.org.uk>
425
426 * bfd.c: Change struct bfd_build_id to use bfd_size_type.
427 * bfd-in2.h : Regenerate.
428
1d5c94cb
AM
4292015-06-16 Alan Modra <amodra@gmail.com>
430
431 * elf32-ppc.c (ppc_elf_relocate_section): Correct binary search of
432 dynamic relocs.
433
c74f7d1c
JT
4342015-06-10 Jon Turney <jon.turney@dronecode.org.uk>
435
436 * elf-bfd.h : Remove struct elf_build_id.
437 * bfd.c : Add struct bfd_build_id.
438 * bfd-in2.h: Regenerate.
439 * elf.c (elfobj_grok_gnu_build_id): Update to use bfd_build_id.
440 * libpei.h: Add protoype and macros for
441 bfd_XXi_slurp_codeview_record.
442 * peXXigen.c (_bfd_XXi_slurp_codeview_record): Make public
443 * peicode.h (pe_bfd_read_buildid): Add.
444 (pe_bfd_object_p): Use pe_bfd_read_buildid().
445
87f5fbcc
RL
4462015-06-15 Renlin Li <renlin.li@arm.com>
447
448 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTOFF_LO15): New entry.
449 * bfd-in2.h: Regenerate.
450 * libbfd.h: Regenerate.
451 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
452 BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.
453
3a062fa1
AM
4542015-06-15 Alan Modra <amodra@gmail.com>
455
456 * cofflink.c (_bfd_coff_generic_relocate_section): Revert
457 2014-03-26 change. Call _bfd_clear_contents for relocs against
458 local and global symbols defined in discarded input sections.
459
1ade7175
NC
4602015-06-05 Nick Clifton <nickc@redhat.com>
461
462 * elf32-msp430.c (rl78_sym_diff_handler): New function.
463 (msp430_howto_table): Use the new function for the SYM_DIFF reloc.
464 (msp430x_howto_table): Likewise.
465
f8b44781
AM
4662015-06-05 Alan Modra <amodra@gmail.com>
467
468 * elf64-ppc.c (ppc_elf_relocate_section): Move dynamic text
469 relocs with insns moved by --ppc476-workaround. Correct
470 output of REL16 relocs.
471
7018c030
JW
4722015-06-01 Jiong Wang <jiong.wang@arm.com>
473
474 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
475 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
476 (elfNN_aarch64_final_link_relocate): Ditto.
477 (elfNN_aarch64_gc_swap_hook): Ditto.
478 (elfNN_aarch64_check_relocs): Ditto.
479 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
480
3d715ce4
JW
4812015-06-01 Jiong Wang <jiong.wang@arm.com>
482
483 * reloc.c (BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14): New entry.
484 * bfd-in2.h: Regenerate.
485 * libbfd.h: Regenerate.
486 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
487 BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14.
488
36e6c140
JW
4892015-06-01 Jiong Wang <jiong.wang@arm.com>
490
491 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Set overflow type to
492 complain_overflow_unsigned for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
493 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Don't use
494 PGOFF for BFD_RELOC_AARCH64_TLSLE_ADD_LO12.
495
99ad26cb
JW
4962015-06-01 Jiong Wang <jiong.wang@arm.com>
497
498 * elfnn-aarch64.c (aarch64_reloc_got_type): Support
499 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
500 (elfNN_aarch64_final_link_relocate): Ditto.
501 (elfNN_aarch64_gc_swap_hook): Ditto.
502 (elfNN_aarch64_check_relocs): Ditto.
503 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
504
a921b5bd
JW
5052015-06-01 Jiong Wang <jiong.wang@arm.com>
506
507 * reloc.c (BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15): New entry.
508 * bfd-in2.h: Regenerate.
509 * libbfd.h: Regenerate.
510 * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
511 BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15.
512
2f0c68f2
CM
5132015-05-28 Catherine Moore <clm@codesourcery.com>
514 Bernd Schmidt <bernds@codesourcery.com>
515 Paul Brook <paul@codesourcery.com>
516
517 bfd/
518 * bfd-in2.h: Regenerated.
519 * elf-bfd.h (DWARF2_EH_HDR, COMPACT_EH_HDR): Define.
520 (COMPACT_EH_CANT_UNWIND_OPCODE): Define.
521 (dwarf_eh_frame_hdr_info): Move dwarf-specific fields from
522 eh_frame_hdr_info.
523 (compact_eh_frame_hdr_info): Declare.
524 (eh_frame_hdr_info): Redeclare with union for dwarf-specific
525 fields and compact-eh fields.
526 (elf_backend_data): Add cant_unwind_opcode and compact_eh_encoding.
527 (bfd_elf_section_data): Add eh_frame_entry_field.
528 (elf_section_eh_frame_entry): Define.
529 (bfd_elf_parse_eh_frame_entries): Declare.
530 (_bfd_elf_parse_eh_frame_entry): Declare.
531 (_bfd_elf_end_eh_frame_parsing): Declare.
532 (_bfd_elf_write_section_eh_frame_entry): Declare.
533 (_bfd_elf_eh_frame_entry_present): Declare.
534 (_bfd_elf_section_for_symbol): Declare.
535 * elf-eh-frame.c (bfd_elf_discard_eh_frame_entry): New function.
536 (bfd_elf_record_eh_frame_entry): New function.
537 (_bfd_elf_parse_eh_frame_entry): New function.
538 (_bfd_elf_parse_eh_frame): Update hdr_info field references.
539 (cmp_eh_frame_hdr): New function.
540 (add_eh_frame_hdr_terminator): New function.
541 (_bfd_elf_end_eh_frame_parsing): New function.
542 (find_merged_cie): Update hdr_info field references.
543 (_bfd_elf_discard_section_eh_frame): Likewise.
544 (_bfd_elf_discard_section_eh_frame_hdr): Add Compact EH support.
545 (_bfd_elf_eh_frame_entry_present): New function.
546 (_bfd_elf_maybe_strip_eh_frame_hdr): Add Compact EH support.
547 (_bfd_elf_write_section_eh_frame_entry): New function.
548 (_bfd_elf_write_section_eh_frame): Update hdr_info field references.
549 (_bfd_elf_fixup_eh_frame_hdr): New function.
550 (write_compact_eh_frame_hdr): New function.
551 (write_dwarf_eh_frame_hdr): New function.
552 (_bfd_elf_write_section_eh_frame_hdr): Add Compact EH support.
553 * elflink.c (_bfd_elf_section_for_symbol): New function.
554 (elf_section_ignore_discarded_relocs): Add Compact EH support.
555 (elf_link_input_bfd): Likewise.
556 (bfd_elf_final_link): Likewise.
557 (_bfd_elf_gc_mark): Likewise.
558 (bfd_elf_parse_eh_frame_entries): New function.
559 (bfd_elf_gc_sections): Add Compact EH support.
560 (bfd_elf_discard_info): Likewise.
561 * elfxx-mips.c: Include dwarf2.h.
562 (_bfd_mips_elf_compact_eh_encoding): New function.
563 (_bfd_mips_elf_cant_unwind_opcode): New function.
564 * elfxx-mips.h (_bfd_mips_elf_compact_eh_encoding): Declare.
565 (_bfd_mips_elf_cant_unwind_opcode): Declare.
566 (elf_backend_compact_eh_encoding): Define.
567 (elf_backend_cant_unwind_opcode): Define.
568 * elfxx-target.h (elf_backend_compact_eh_encoding): Provide default.
569 (elf_backend_cant_unwind_opcode): Provide default.
570 (elf_backend_data elfNN_bed): Add elf_backend_compact_eh_encoding and
571 elf_backend_cant_unwind_opcode.
572 * section.c (SEC_INFO_TYPE_EH_FRAME_ENTRY): Add definition.
573
8ded2ddc
L
5742015-05-27 H.J. Lu <hongjiu.lu@intel.com>
575
576 PR binutils/18458
577 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
578 for now binding only if pointer equality isn't needed.
579 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
580 binding only if pointer equality isn't needed.
581 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
582 section for now binding only if pointer equality isn't needed.
583 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
584 binding only if pointer equality isn't needed.
585
fca6ae69
L
5862015-05-26 H.J. Lu <hongjiu.lu@intel.com>
587
588 PR binutils/18437
589 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip extra relocations
590 in .rel.plt/.rela.plt.
591 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
592
ce336788
JW
5932015-05-19 Jiong Wang <jiong.wang@arm.com>
594
595 * elfnn-aarch64.c (aarch64_tls_transition_without_check): Sort
596 relocation case labels alphabetically.
597 (elfNN_aarch64_final_link_relocate): Ditto.
598 (elfNN_aarch64_tls_relax): Ditto.
599 (elfNN_aarch64_relocate_section): Ditto.
600 (elfNN_aarch64_gc_sweep_hook): Ditto.
601 (elfNN_aarch64_check_relocs): Ditto.
602 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
603 (_bfd_aarch64_elf_resolve_relocation): Ditto.
604
80de0c6d
JW
6052015-05-18 Jiong Wang <jiong.wang@arm.com>
606
607 * elfnn-aarch64.c (elfNN_aarch64_adjust_dynamic_symbol): Rewrite
608 comments.
609
25070364
L
6102015-05-16 H.J. Lu <hongjiu.lu@intel.com>
611
612 * elf32-i386.c (elf_i386_check_relocs): Create .plt.got section
613 for now binding.
614 (elf_i386_allocate_dynrelocs): Use .plt.got section for now
615 binding.
616 * elf64-x86-64.c (elf_x86_64_check_relocs): Create .plt.got
617 section for now binding.
618 (elf_x86_64_allocate_dynrelocs): Use .plt.got section for now
619 binding.
620
dab394de
L
6212015-05-14 H.J. Lu <hongjiu.lu@intel.com>
622
623 * bfd.c (bfd_update_compression_header): Also write the zlib
624 header if the SHF_COMPRESSED bit cleared..
625 (bfd_check_compression_header): Return the uncompressed size.
626 * compress.c (decompress_contents): Don't skip the zlib header.
627 (bfd_compress_section_contents): Properly handle ELFCOMPRESS_ZLIB,
628 which doesn't have the zlib header.
629 (bfd_init_section_decompress_status): Likewise.
630 (bfd_get_full_section_contents): Updated.
631 (bfd_is_section_compressed): Likewise.
632 (bfd_is_section_compressed_with_header): Return the uncompressed
633 size.
634 * elf.c (_bfd_elf_make_section_from_shdr): Updated.
635 * bfd-in2.h: Regenerated.
636
fdc3b1b1
JW
6372015-05-14 Jiong Wang <jiong.wang@arm.com>
638
639 * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Remove overflow
640 check restrictions.
641
e6c9a083
MF
6422015-05-14 Max Filippov <jcmvbkbc@gmail.com>
643
644 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
645 as GOT reference when plt.refcount is not positive.
646
a3747075
L
6472015-05-12 H.J. Lu <hongjiu.lu@intel.com>
648
649 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
650 for the first .plt entry only if needed.
651 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
652
bf64a951
L
6532015-05-11 H.J. Lu <hongjiu.lu@intel.com>
654
655 * Makefile.am (ALL_MACHINES): Add cpu-iamcu.lo.
656 (ALL_MACHINES_CFILES): Likewise.
657 * archures.c (bfd_mach_iamcu): New.
658 (bfd_mach_i386_iamcu): Likewise.
659 (bfd_mach_i386_iamcu_intel_syntax): Likewise.
660 (bfd_iamcu_arch): Likewise.
661 (bfd_archures_list): Add &bfd_iamcu_arch.
662 * config.bfd (targ_selvecs): Add iamcu_elf32_vec to
663 i386_elf32_vec.
664 (targ_archs): Add bfd_iamcu_arch if needed.
665 * configure.ac: Support iamcu_elf32_vec.
666 * cpu-iamcu.c: New file.
667 * elf32-i386.c (elf32_iamcu_elf_object_p): New function.
668 Add support for iamcu_elf32_vec and elf32_iamcu_bed.
669 * targets.c (iamcu_elf32_vec): New.
670 (_bfd_target_vector): Add iamcu_elf32_vec.
671 * Makefile.in: Regenerated.
672 * bfd-in2.h: Likewise.
673 * configure: Likewise.
674
22abe556
L
6752015-05-11 H.J. Lu <hongjiu.lu@intel.com>
676
677 * elfcode.h (elf_object_p): Replace EM_486 with EM_IAMCU.
678
4b71eec6
L
6792015-05-10 H.J. Lu <hongjiu.lu@intel.com>
680
681 * elf32-i386.c (elf_i386_convert_mov_to_lea): Replace input_bfd
682 and output_bfd with abfd.
683 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
684
9ac47a43
TS
6852015-05-06 Toni Spets <toni.spets@iki.fi>
686
687 PR ld/18372
688 * peXXigen.c (rsrc_process_section): Skip discarded resource
689 sections.
690
b633b725
L
6912015-05-01 H.J. Lu <hongjiu.lu@intel.com>
692
693 * config.bfd: Support i[3-7]86-*-elf*.
694
914082d1
L
6952015-04-30 H.J. Lu <hongjiu.lu@intel.com>
696
697 * elf32-i386.c (elf_backend_post_process_headers): Undef for
698 Solaris 2.
699
153a2776
NC
7002015-04-30 Nick Clifton <nickc@redhat.com>
701
702 PR 18317
703 * elf32-mep.c (MEPREL): Use bfd_elf_generic_reloc instead of
704 mep_reloc.
705 (mep_reloc): Delete unused function.
706
a93d5cb1
NC
7072015-04-29 Nick Clifton <nickc@redhat.com>
708
709 PR 17099
710 * coff-i386.c (coff_i386_rtype_to_howto): Allow absolute PCRLONG
711 relocs.
712
643f7afb
AK
7132015-04-27 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
714
715 * elf-s390-common.c (elf_s390_merge_obj_attributes): New function.
716 * elf32-s390.c (elf32_s390_merge_private_bfd_data): Call
717 elf_s390_merge_obj_attributes.
718 * elf64-s390.c (elf64_s390_merge_private_bfd_data): New function.
719
b53b1bed
JW
7202015-04-24 Jiong Wang <jiong.wang@arm.com>
721
722 PR ld/18270
723 * elfnn-aarch64.c (elfNN_aarch64_size_dynamic): Count local symbol for
724 GOT_NORMAL for both sgot/srelgot section.
725 (elfNN_aarch64_final_link_relocate): Relocate against GOT entry address
726 and generate necessary runtime relocation for GOT entry.
727
69b52ab8
L
7282015-04-24 H.J. Lu <hongjiu.lu@intel.com>
729
730 PR binutils/18209
731 * archive.c (_bfd_get_elt_at_filepos): Copy is_linker_input.
732
dcbd20eb
JW
7332015-04-24 Jiong Wang <jiong.wang@arm.com>
734
735 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Reject
736 PC-relative relocation for external symbol.
737
de13ef81
NC
7382015-04-24 Nick Clifton <nickc@redhat.com>
739
740 PR 18313
741 * compress.c (decompress_contents): Zero initialse the z_stream
742 structure.
743
b1fa9dd6
NC
7442015-04-24 Nick Clifton <nickc@redhat.com>
745
746 * elf.c (_bfd_elf_is_local_label_name): Extend test for assembler
747 local labels to include local labels with a numeric suffix and
748 fake symbols.
749
9361e630
L
7502015-04-24 H.J. Lu <hongjiu.lu@intel.com>
751
752 PR binutils/18316
753 * section.c (SEC_MEP_VLIW): New.
754 * bfd-in2.h: Regenerated.
755
3e19fb8f
L
7562015-04-23 H.J. Lu <hongjiu.lu@intel.com>
757
758 PR ld/18277
759 * compress.c (bfd_compress_section_contents): Remove the
760 write_compress argument.
761 (bfd_init_section_compress_status): Updated.
762 (bfd_compress_section): Likewise.
763 * elf.c (_bfd_elf_set_reloc_sh_name): New.
764 (_bfd_elf_init_reloc_shdr): Add delay_st_name_p. Set sh_name
765 to (unsigned int) -1 if delay_st_name_p is TRUE. Use
766 _bfd_elf_set_reloc_sh_name.
767 (elf_fake_sections): Don't rename DWARF debug section for
768 linker output if it will be compressed. Instead, set
769 delay_st_name_p to TRUE and pass it to _bfd_elf_init_reloc_shdr.
770 (assign_section_numbers): Call _bfd_elf_strtab_addref only if
771 sh_name != (unsigned int) -1. Don't finalize nor assign
772 shstrtab section here. Delay setting output section names to
773 _bfd_elf_write_object_contents.
774 (_bfd_elf_compute_section_file_positions): Update comments on
775 sh_offset for shstrtab section.
776 (assign_file_positions_for_non_load_sections): Set sh_offset to
777 -1 for shstrtab section.
778 (assign_file_positions_except_relocs): Likewise.
779 (_bfd_elf_assign_file_positions_for_non_load): Set up sh_name
780 when compressing DWARF debug sections. Place shstrtab section
781 after DWARF debug sections have been compressed.
782 (_bfd_elf_write_object_contents): Setting sh_name for output
783 sections.
784
f6fe1ccd
L
7852015-04-23 H.J. Lu <hongjiu.lu@intel.com>
786
787 PR binutils/18209
788 * bfd.c (bfd): Add is_linker_input.
789 * elf.c (convert_debug_to_zdebug): New.
790 (convert_zdebug_to_debug): Likewise.
791 (_bfd_elf_make_section_from_shdr): Don't convert .debug_* to
792 .zdebug_* here. Use convert_zdebug_to_debug. Set SEC_ELF_RENAME.
793 (_bfd_elf_init_reloc_shdr): Pass a pointer to section name
794 instead of a pointer to section.
795 (elf_fake_sections): Rename the section name if SEC_ELF_RENAME
796 is set.
797 * section.c (SEC_ELF_RENAME): New.
798 * bfd-in2.h: Regenerated.
799
a27e685f
AM
8002015-04-23 Alan Modra <amodra@gmail.com>
801
802 * elf64-ppc.c (TOC_BASE_ALIGN): Define.
803 (ppc64_elf_next_toc_section): Align multi-got toc base.
804 (ppc64_elf_set_toc): Likewise initial toc base and .TOC. symbol.
805
d5597ebc
L
8062015-04-22 H.J. Lu <hongjiu.lu@intel.com>
807
808 PR ld/18289
809 * elf32-i386.c (elf_i386_link_hash_entry): Add gotoff_ref.
810 (elf_i386_link_hash_newfunc): Initialize gotoff_ref to 0.
811 (elf_i386_create_dynamic_sections): Always allow copy relocs for
812 building executables.
813 (elf_i386_copy_indirect_symbol): Also copy gotoff_ref.
814 (elf_i386_check_relocs): Set gotoff_ref for R_386_GOTOFF.
815 (elf_i386_adjust_dynamic_symbol): Also allocate copy relocs for
816 PIE and R_386_GOTOFF.
817 (elf_i386_relocate_section): Allow R_386_GOTOFF in executable.
818
e9702963
L
8192015-04-20 H.J. Lu <hongjiu.lu@intel.com>
820
821 * elf.c (assign_section_numbers): Always set up sh_name.
822
e06efbf1
L
8232015-04-20 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elf.c (assign_file_positions_for_non_load_sections): Iterate
826 sections by pointer.
827 (_bfd_elf_assign_file_positions_for_non_load): Likewise.
828
0ce398f1
L
8292015-04-14 H.J. Lu <hongjiu.lu@intel.com>
830
831 * bfd-in.h (compressed_debug_section_type): New.
832 * compress.c (bfd_compress_section_contents): Add an argument
833 for linker write compression and always generate .zdebug_*
834 section when linking.
835 (bfd_init_section_compress_status): Pass FALSE to
836 bfd_compress_section_contents.
837 (bfd_compress_section): New function.
838 * elf.c (elf_fake_sections): For linking, set SEC_ELF_COMPRESS
839 on DWARF debug sections if COMPRESS_DEBUG is set and rename
840 section if COMPRESS_DEBUG_GABI_ZLIB isn't set.
841 (assign_file_positions_for_non_load_sections): Set sh_offset
842 to -1 if SEC_ELF_COMPRESS is set.
843 (assign_file_positions_except_relocs): Likwise.
844 (_bfd_elf_assign_file_positions_for_relocs): Renamed to ...
845 (_bfd_elf_assign_file_positions_for_non_load): This. Change
846 return time to bfd_boolean. Compress the section if
847 SEC_ELF_COMPRESS is set.
848 (_bfd_elf_write_object_contents): Updated.
849 (_bfd_elf_set_section_contents): Write section contents to
850 the buffer if SEC_ELF_COMPRESS is set.
851 * merge.c: Include "elf-bfd.h".
852 (sec_merge_emit): Add arguments for contents and offset. Write
853 to contents with offset if contents isn't NULL.
854 (_bfd_write_merged_section): Write section contents to the
855 buffer if SEC_ELF_COMPRESS is set. Pass contents and
856 output_offset to sec_merge_emit.
857 * elflink.c (bfd_elf_final_link): Allocate the buffer for
858 output section contents if SEC_ELF_COMPRESS is set.
859 * section.c (SEC_ELF_COMPRESS): New.
860 * bfd-in2.h: Regenerated.
861
95b57ade
AM
8622015-04-15 Alan Modra <amodra@gmail.com>
863
864 * elf32-rl78.c (rl78_elf_relocate_section): Typo fix.
865
6ff71e76
NC
8662015-04-14 Nick Clifton <nickc@redhat.com>
867
868 * elf32-rl78.c (RL78_OP_REL): New macro.
869 (rl78_elf_howto_table): Use it for complex relocs.
870 (get_symbol_value): Handle the cases when the info or status
871 arguments are NULL.
872 (get_romstart): Cache the status returned by get_symbol_value.
873 (get_ramstart): Likewise.
874 (RL78_STACK_PUSH): Generate an error message if the stack
875 overflows.
876 (RL78_STACK_POP): Likewise for underflows.
877 (rl78_compute_complex_reloc): New function. Contains the basic
878 processing code for all RL78 complex relocs.
879 (rl78_special_reloc): New function. Provides special reloc
880 handling for complex relocs.
881 (rl78_elf_relocate_section): Use rl78_compute_complex_reloc.
882 (rl78_offset_for_reloc): Likewise.
883
889c2a67
L
8842015-04-14 H.J. Lu <hongjiu.lu@intel.com>
885
886 PR ld/pr17709
887 * elflink.c (_bfd_elf_adjust_dynamic_copy): Check
888 info->extern_protected_data when warning copy relocs against
889 protected symbols.
890 (_bfd_elf_symbol_refs_local_p): Check info->extern_protected_data
891 when checking protected non-function symbols.
892
97de3545
JB
8932015-04-13 John Baldwin <jhb@FreeBSD.org>
894
895 * elf.c (elfcore_grok_note): Recognize NT_X86_XSTATE on
896 FreeBSD.
897 (elfcore_write_xstatereg): Use correct note name on FreeBSD.
898
f0bf6bfd
L
8992015-04-13 H.J. Lu <hongjiu.lu@intel.com>
900
901 PR ld/18250
902 * elflink.c (elf_link_is_defined_archive_symbol): Return FALSE
903 if the object has been claimed by plugin.
904
e3c0e327
L
9052015-04-11 H.J. Lu <hongjiu.lu@intel.com>
906
907 * elf32-i386.c (elf_i386_relocate_section): Replace SYMBOLIC_BIND
908 with SYMBOL_REFERENCES_LOCAL when checking R_386_GOTOFF against
909 protected data symbol when building shared library.
910 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
911 R_X86_64_GOTOFF64 against undefined symbol and replace
912 SYMBOLIC_BIND with SYMBOL_REFERENCES_LOCAL when checking
913 R_X86_64_GOTOFF64 against protected data symbol when building
914 shared library.
915
3d949995
L
9162015-04-10 H.J. Lu <hongjiu.lu@intel.com>
917
918 PR ld/pr17709
919 * elf32-i386.c (elf_i386_relocate_section): Also check R_386_GOTOFF
920 against protected data symbol when building shared library.
921 * elf64-x86-64.c (elf_x86_64_relocate_section): Also check
922 R_X86_64_GOTOFF64 against protected data symbol when building
923 shared library.
924
f7483970
L
9252015-04-10 H.J. Lu <hongjiu.lu@intel.com>
926
927 PR ld/pr15228
928 PR ld/pr17709
929 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
930 * elf32-i386.c (elf_backend_extern_protected_data): New.
931 Defined to 1.
932 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
933 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
934 copy relocs against protected symbols if extern_protected_data
935 is true.
936 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
937 non-function symbols if extern_protected_data is true.
938 * elfxx-target.h (elf_backend_extern_protected_data): New.
939 Default to 0.
940 (elfNN_bed): Initialize extern_protected_data with
941 elf_backend_extern_protected_data.
942
030aeb75
L
9432015-04-10 H.J. Lu <hongjiu.lu@intel.com>
944
945 * compress.c (bfd_compress_section_contents): Replace bfd_malloc
946 and free with bfd_alloc and bfd_release on compressed buffer.
947 Release buffer if compressed section isn't smaller.
948
d07a1b05
AM
9492015-04-10 Alan Modra <amodra@gmail.com>
950
951 PR ld/18222
952 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't report an error
953 on adding a protected visibility variable to .dynbss.
954
8d2ea2a8
AM
9552015-04-10 Alan Modra <amodra@gmail.com>
956
957 Revert 2015-03-05 H.J. Lu <hongjiu.lu@intel.com>
958 PR ld/pr15228
959 PR ld/pr17709
960 * elf-bfd.h (elf_backend_data): Delete extern_protected_data.
961 * elf32-i386.c (elf_backend_extern_protected_data): Delete.
962 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
963 * elflink.c (_bfd_elf_adjust_dynamic_copy): Remove
964 extern_protected_data test.
965 (_bfd_elf_symbol_refs_local_p): Likewise.
966 * elfxx-target.h (elf_backend_extern_protected_data): Delete.
967 (elfNN_bed): Delete elf_backend_extern_protected_data init.
968
18ece1de
L
9692015-04-09 H.J. Lu <hongjiu.lu@intel.com>
970
971 * compress.c (bfd_compress_section_contents): Update comments.
972 (bfd_init_section_decompress_status): Likewise.
973 (bfd_init_section_compress_status): Likewise.
974
cd6faa73
L
9752015-04-09 H.J. Lu <hongjiu.lu@intel.com>
976
977 * elfxx-target.h (TARGET_BIG_SYM): Add BFD_COMPRESS_GABI to
978 object_flags.
979 (TARGET_LITTLE_SYM): Likewise.
980
19424843
MF
9812015-04-09 Max Filippov <jcmvbkbc@gmail.com>
982
983 * elf32-xtensa.c (splay-tree.h): include header.
984 (text_action_struct): drop next pointer.
985 (text_action_list_struct): drop head pointer, add count and
986 tree fields.
987 (find_fill_action): instead of linear search in text_action_list
988 search in the tree.
989 (text_action_compare, action_first, action_next): new functions.
990 (text_action_add, text_action_add_literal): instead of linear
991 search and insertion insert new node into the tree.
992 (removed_by_actions): pass additional parameter: action_list,
993 use it to traverse the tree.
994 (offset_with_removed_text): pass additional action_list parameter
995 to removed_by_actions.
996 (map_action_fn_context): new typedef.
997 (map_action_fn_context_struct): new structure.
998 (map_action_fn): new function.
999 (map_removal_by_action): use splay_tree_foreach to build map.
1000 (find_insn_action): replace linear search in text_action_list
1001 with series of splay_tree_lookups.
1002 (print_action, print_action_list_fn): new functions.
1003 (print_action_list): use splay_tree_foreach.
1004 (init_xtensa_relax_info): drop action_list.head initialization.
1005 Initialize the tree.
1006 (compute_text_actions): use non-zero action_list_count instead of
1007 non-NULL action list.
1008 (xlate_map_context): new typedef.
1009 (xlate_map_context_struct): new structure.
1010 (xlate_map_fn): new function.
1011 (build_xlate_map): use splay_tree_foreach to build map.
1012 (action_remove_bytes_fn): new function.
1013 (relax_section): use zero action_list_count instead of NULL
1014 action list. Use splay_tree_foreach to count final section size.
1015 Drop unused variable 'removed'.
1016
10172015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1018
1019 * elf32-xtensa.c (removed_literal_map_entry): new typedef.
1020 (removed_literal_map_entry_struct): new structure.
1021 (removed_literal_list_struct): add new fields: n_map and map.
1022 (map_removed_literal, removed_literal_compare): new functions.
1023 (find_removed_literal): build index array for literals ordered
1024 by VMA, use binary search to find removed literal.
1025
10262015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1027
1028 * elf32-xtensa.c (removal_by_action_entry_struct,
1029 removal_by_action_map_struct): new structures.
1030 (removal_by_action_entry, removal_by_action_map): new typedefs.
1031 (text_action_list_struct): add new field: map.
1032 (map_removal_by_action, removed_by_actions_map,
1033 offset_with_removed_text_map): new functions.
1034 (relax_section): replace offset_with_removed_text with
1035 offset_with_removed_text_map.
1036 (translate_reloc, relax_property_section, relax_section_symbols):
1037 replace removed_by_actions with removed_by_actions_map.
1038
10392015-04-09 Max Filippov <jcmvbkbc@gmail.com>
1040
1041 * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry,
1042 reloc_range): new typedef.
1043 (reloc_range_list_struct, reloc_range_list_entry_struct,
1044 reloc_range_struct): new structures.
1045 (reloc_range_compare, build_reloc_ranges,
1046 reloc_range_list_append, reloc_range_list_remove,
1047 reloc_range_list_update_range, free_reloc_range_list): new
1048 functions.
1049 (compute_text_actions): precompute relocation opcodes before the
1050 loop. Add relevant_relocs variable, initialize it before the
1051 loop, pass it to the check_section_ebb_pcrels_fit.
1052 (check_section_ebb_pcrels_fit): add new parameter:
1053 relevant_relocs. Update address range in the relevant_relocs if
1054 it's non-NULL and iterate only over relevant relocations.
1055
3525236c
NC
10562015-04-09 Nick Clifton <nickc@redhat.com>
1057
1058 * elf32-rx.c (describe_flags): Report the settings of the string
1059 insn using bits.
1060 (rx_elf_merge_private_bfd_data): Handle merging of the string insn
1061 using bits.
1062
51509926
L
10632015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1064
1065 * compress.c (bfd_compress_section_contents): Work around a GCC
1066 uninitialized warning bug fixed in GCC 4.7.
1067
151411f8
L
10682015-04-08 H.J. Lu <hongjiu.lu@intel.com>
1069
1070 * archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI
1071 bit.
1072 * bfd.c (bfd::flags): Increase size to 18 bits.
1073 (BFD_COMPRESS_GABI): New.
1074 (BFD_FLAGS_SAVED): Add BFD_COMPRESS_GABI.
1075 (BFD_FLAGS_FOR_BFD_USE_MASK): Likewise.
1076 (bfd_update_compression_header): New fuction.
1077 (bfd_check_compression_header): Likewise.
1078 (bfd_get_compression_header_size): Likewise.
1079 (bfd_is_section_compressed_with_header): Likewise.
1080 * compress.c (MAX_COMPRESSION_HEADER_SIZE): New.
1081 (bfd_compress_section_contents): Return the uncompressed size if
1082 the full section contents is compressed successfully. Support
1083 converting from/to .zdebug* sections.
1084 (bfd_get_full_section_contents): Call
1085 bfd_get_compression_header_size to get compression header size.
1086 (bfd_is_section_compressed): Renamed to ...
1087 (bfd_is_section_compressed_with_header): This. Add a pointer
1088 argument to return compression header size.
1089 (bfd_is_section_compressed): Use it.
1090 (bfd_init_section_decompress_status): Call
1091 bfd_get_compression_header_size to get compression header size.
1092 Return FALSE if uncompressed section size is 0.
1093 * elf.c (_bfd_elf_make_section_from_shdr): Support converting
1094 from/to .zdebug* sections.
1095 * bfd-in2.h: Regenerated.
1096
87070c08
AM
10972015-04-07 Alan Modra <amodra@gmail.com>
1098
1099 * elf.c (_bfd_elf_get_reloc_section): Allow for .got.plt being
1100 mapped to output .got section.
1101
d3e454b9
AM
11022015-04-07 Alan Modra <amodra@gmail.com>
1103
1104 * elf32-ppc.c (struct ppc_elf_link_hash_entry): Add has_addr16_ha
1105 and has_addr16_lo. Make has_sda_refs a bitfield.
1106 (ppc_elf_check_relocs): Set new flags.
1107 (ppc_elf_link_hash_table_create): Update default_params.
1108 (ppc_elf_adjust_dynamic_symbol): Clear protected_def in cases
1109 where we won't be making .dynbss entries or editing code. Set
1110 params->pic_fixup when we'll edit code for protected var access.
1111 (allocate_dynrelocs): Allocate got entry for edited code and
1112 discard dyn_relocs.
1113 (struct ppc_elf_relax_info): Add picfixup_size.
1114 (ppc_elf_relax_section): Rename struct one_fixup to struct
1115 one_branch_fixup. Rename fixups to branch_fixups. Size space for
1116 pic fixups.
1117 (ppc_elf_relocate_section): Edit non-PIC accessing protected
1118 visibility variables to PIC. Don't emit dyn_relocs for code
1119 we've edited.
1120 * elf32-ppc.h (struct ppc_elf_params): Add pic_fixup.
1121
ffa54770
NC
11222015-04-07 Nick Clifton <nickc@redhat.com>
1123
1124 * elf.c (_bfd_elf_is_local_label_name): Treat assembler generated
1125 local labels as local.
1126
4aa90cc0
L
11272015-04-06 H.J. Lu <hongjiu.lu@intel.com>
1128
1129 * compress.c (get_uncompressed_size): Removed.
1130 (bfd_compress_section_contents): Use bfd_putb64 to write
1131 uncompressed section size.
1132 (bfd_init_section_decompress_status): Replace
1133 get_uncompressed_size with bfd_getb64.
1134
68f5ff89
L
11352015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1136
1137 * elf.c (_bfd_elf_init_private_section_data): Also preserve the
1138 SHF_COMPRESSED bit if not decompress.
1139
8bed4e0f
L
11402015-04-04 H.J. Lu <hongjiu.lu@intel.com>
1141
1142 * compress.c (get_uncompressed_size): New. Extracted from ...
1143 (bfd_init_section_decompress_status): This. Use it.
1144
15c7659f
AT
11452015-04-02 Andrew Turner <andrew@freebsd.org>
1146
1147 * config.bfd: Add aarch64-*-freebsd* target triple.
1148
39f3de7c
L
11492015-04-02 H.J. Lu <hongjiu.lu@intel.com>
1150
1151 * configure: Regenerated.
1152
4106101c
MS
11532015-04-01 Tejas Belagod <tejas.belagod@arm.com>
1154 Marcus Shawcroft <marcus.shawcroft@arm.com>
1155 Jiong Wang <jiong.wang@arm.com>
1156
1157 * bfd-in.h (bfd_elf64_aarch64_set_options)
1158 (bfd_elf32_aarch64_set_options): Add parameter.
1159 * bfd-in2.h: Regenerated.
1160 * elfnn-aarch64.c (aarch64_erratum_843419_stub)
1161 (_bfd_aarch64_adrp_p, _bfd_aarch64_erratum_843419_sequence_p)
1162 (_bfd_aarch64_erratum_843419_stub_name)
1163 (_bfd_aarch64_erratum_843419_fixup)
1164 (_bfd_aarch64_erratum_843419_scan)
1165 (_bfd_aarch64_erratum_843419_branch_to_stub)
1166 (_bfd_aarch64_erratum_843419_p): Define.
1167 (enum elf_aarch64_stub_type): Define
1168 aarch64_stub_erratum_843419_veneer.
1169 (struct elf_aarch64_stub_hash_entry): Define adrp_offset.
1170 (struct elf_aarch64_link_hash_table): Define fix_erratum_843419
1171 and fix_erratum_843419_adr.
1172 (stub_hash_newfunc): Initialize adrp_offset;
1173 (_bfd_aarch64_add_stub_entry_after): Define.
1174 (aarch64_map_one_stub, aarch64_build_one_stub)
1175 (aarch64_size_one_stub): Handle
1176 aarch64_stub_erratum_843419_veneer.
1177 (_bfd_aarch64_resize_stubs): Round stub section size.
1178 (elfNN_aarch64_size_stubs): Add scan for 843419.
1179 (bfd_elfNN_aarch64_set_options): Add parameter. Initialize
1180 fix_erratum_843419 and fix_erratum_843419_adr.
1181 (struct erratum_835769_branch_to_stub_data): Add info.
1182 (elfNN_aarch64_write_section): Initialise info. Handle 843419.
1183 (elfNN_aarch64_size_dynamic_sections): Handle 843419.
1184 * elfxx-aarch64.c (_bfd_aarch64_decode_adrp_imm)
1185 (_bfd_aarch64_sign_extend): Define.
1186 (reencode_adr_imm): Remove static. Rename to:
1187 (_bfd_aarch64_reencode_adr_imm): Define.
1188 (_bfd_aarch64_elf_put_addend): Call _bfd_aarch64_reencode_adr_imm.
1189 * elfxx-aarch64.h (AARCH64_ADR_OP, AARCH64_ADRP_OP)
1190 (AARCH64_ADRP_OP_MASK, _bfd_aarch64_sign_extend)
1191 (_bfd_aarch64_decode_adrp_imm, _bfd_aarch64_reencode_adr_imm):
1192 Define.
1193
afa59b79
L
11942015-04-01 H.J. Lu <hongjiu.lu@intel.com>
1195
1196 * configure: Regenerated.
1197
6036f486
ES
11982015-03-31 Ed Schouten <ed@nuxi.nl>
1199
1200 * config.bfd (targ_defvec): Set to x86_64_elf64_cloudabi_vec
1201 for x86_64-*-cloudabi*.
1202 * configure.ac: Handle x86_64_elf64_cloudabi_vec.
1203 * configure: Regenerated.
1204 * elf64-x86-64.c (TARGET_LITTLE_SYM): Support x86_64-*-cloudabi*.
1205 (TARGET_LITTLE_NAME): Likewise.
1206 (ELF_OSABI): Likewise.
1207 (elf64_bed): Likewise.
1208 * targets.c (x86_64_elf64_cloudabi_vec): New.
1209 (_bfd_target_vector): Add x86_64_elf64_cloudabi_vec.
1210
9ae46699
L
12112015-03-31 H.J. Lu <hongjiu.lu@intel.com>
1212
1213 * configure.ac: Revert the AM_ZLIB change.
1214 * Makefile.in: Regenerated.
1215 * aclocal.m4: Likewise.
1216 * configure: Likewise.
1217 * doc/Makefile.in: Likewise.
1218
bd53a53a
L
12192015-03-30 H.J. Lu <hongjiu.lu@intel.com>
1220
1221 PR ld/18169
1222 * elf-bfd.h (elf_backend_data): Add get_reloc_section.
1223 (_bfd_elf_get_reloc_section): New.
1224 * elf.c (_bfd_elf_get_reloc_section): Likewise.
1225 (assign_section_numbers): Call get_reloc_section to look up the
1226 section the relocs apply.
1227 * elfxx-target.h (elf_backend_get_reloc_section): Likewise.
1228 (elfNN_bed): Initialize get_reloc_section with
1229 elf_backend_get_reloc_section.
1230
243340ad
L
12312015-03-29 H.J. Lu <hongjiu.lu@intel.com>
1232
1233 * Makefile.am (ZLIB): New.
1234 (ZLIBINC): Likewise.
1235 (AM_CFLAGS): Add $(ZLIBINC).
1236 (libbfd_la_LIBADD): Add $(ZLIB).
1237 * compress.c: Don't check HAVE_ZLIB_H to include <zlib.h>.
1238 (decompress_contents): Don't check HAVE_ZLIB_H.
243340ad
L
1239 (bfd_compress_section_contents): Likewise.
1240 (bfd_get_full_section_contents): Likewise.
1241 (bfd_init_section_decompress_status): Likewise.
1242 (bfd_init_section_compress_status): Likewise.
b51724e8 1243 * configure.ac (AM_ZLIB): Removed.
243340ad
L
1244 (zlibdir): New. AC_SUBST.
1245 (zlibinc): Likewise.
1246 Add --with-system-zlib.
1247 * Makefile.in: Regenerated.
1248 * acinclude.m4: Likewise.
1249 * config.in: Likewise.
1250 * configure: Likewise.
1251 * doc/Makefile.in: Likewise.
1252
b8417128
AM
12532015-03-27 Alan Modra <amodra@gmail.com>
1254
1255 PR ld/15228
1256 PR ld/18167
1257 * elflink.c (elf_merge_st_other): Add "sec" parameter. Don't set
1258 protected_def when symbol section is read-only. Adjust all calls.
1259 * elf-bfd.h (struct elf_link_hash_entry): Update protected_def comment.
1260
93ca8569
TB
12612015-03-26 Tejas Belagod <tejas.belagod@arm.com>
1262
1263 * elfnn-aarch64.c (aarch64_build_one_stub): Replace the call to generic
1264 _bfd_final_link_relocate with aarch64_relocate.
1265
b19a8f85
L
12662015-03-26 H.J. Lu <hongjiu.lu@intel.com>
1267
1268 PR ld/18160
1269 * elflink.c (elf_gc_sweep): Skip if relocation is incompatible.
1270 (bfd_elf_gc_sections): Likewise.
1271
61865519
MS
12722015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
1273
1274 * elfnn-aarch64.c (_bfd_aarch64_resize_stubs): Adjust stub section
1275 size for initial branch.
1276 (elfNN_aarch64_build_stubs): Write initial branch.
1277 _bfd_aarch64_decode_(elfNN_aarch64_output_arch_local_syms): Write
1278 mapping symbol on initial branch.
1279
d9ced15d 12802015-03-25 Marcus Shawcroft <marcus.shawcroft@arm.com>
357d1523
MS
1281
1282 * elfnn-aarch64.c (_bfd_aarch64_erratum_835769_scan):
1283 Update erratum count.
1284
d422d1c4
SKS
12852015-03-25 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1286
1287 * elflink.c (_bfd_elf_gc_mark_extra_sections): Don't break on
1288 first matching debug section.
1289
8d001214
L
12902015-03-24 H.J. Lu <hongjiu.lu@intel.com>
1291
1292 PR gas/18087
1293 * compress.c (bfd_compress_section_contents): Don't write the
1294 zlib header and set contents as well as compress_status if
1295 compression didn't make the section smaller.
1296 (bfd_init_section_compress_status): Don't check compression
1297 size here.
1298
fc42baf3
NC
12992015-03-24 Nick Clifton <nickc@redhat.com>
1300
1301 PR binutils/17512
1302 * coffgen.c (coff_get_normalized_symtab): Fix test for out of
1303 range auxillary sections.
1304
fc6d53be
MS
13052015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1306
1307 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
1308 code into:
1309 (_bfd_aarch64_get_stub_for_link_section): Define.
1310
30068a6d
MS
13112015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1312
1313 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Adjust
1314 update of section_group[].stub_sec.
1315
5421cc6e
MS
13162015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1317
1318 * elfnn-aarch64.c (struct aarch64_erratum_835769_fix) Remove.
1319 (erratum_835769_scan) Drop fix_table_size_p and fixes_p arguments.
1320 Delete fixes, fix_table_size and associated code. Call
1321 _bfd_aarch64_add_stub_entry_in_group. Rename to...
1322 (bfd_aarch64_erratum_835769_scan): Define.
1323 (elfNN_aarch64_size_stubs): Delete erratum_835769_fixes,
1324 erratum_835769_fix_table_size, i and associated code. Relocate
1325 call to _bfd_aarch64_erratum_835769_scan. Delete adhoc stub size
1326 correction. Delete construction of stub entry from
1327 erratum_835769_fixes array.
1328
e572930b
MS
13292015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
1330
1331 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Use
1332 _bfd_aarch64_add_stub_entry_in_group.
1333
8131c122
AM
13342015-03-24 Alan Modra <amodra@gmail.com>
1335
1336 * elf64-ppc.c (ppc64_elf_relocate_section): Report overflow to
1337 stubs, even those for undefined weak symbols. Otherwise, don't
1338 report relocation overflow on branches to undefined strong
1339 symbols. Fix memory leak.
1340 * elf32-ppc.c (ppc_elf_relocate_section): Don't report relocation
1341 overflow on branches to undefined strong symbols.
1342
c53ed7cf
KS
13432015-03-23 Keith Seitz <keiths@redhat.com>
1344
1345 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Add
1346 missing ';'.
1347
94a75bde
MS
13482015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1349
1350 * elfnn-aarch64.c (erratum_835769_scan): Factor stub name
1351 construction into...
1352 (_bfd_aarch64_erratum_835769_stub_name): Define.
1353
13f622ec
MS
13542015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1355
1356 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Factor out
1357 stub resize code into...
1358 (bfd_aarch64_resize_stubs): Define.
1359
66585675
MS
13602015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1361
1362 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor stub
1363 creation code into...
1364 (bfd_aarch64_create_stub_section): Define.
1365
ef857521
MS
13662015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1367
1368 * elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Rename
1369 from elf_aarch64_create_or_find_stub_sec.
1370 (_bfd_aarch64_add_stub_entry_in_group): Rename from
1371 elfNN_aarch64_add_stub. Call
1372 _bfd_aarch64_create_or_find_stub_sec.
1373 (elfNN_aarch64_size_stubs, elfNN_aarch64_size_stubs): Call
1374 _bfd_aarch64_add_stub_entry_in_group.
1375
2144188d
MS
13762015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1377
1378 * elfnn-aarch64.c (erratum_835769_scan) Add comment. Reverse
1379 sense of boolean return.
1380 (elfNN_aarch64_size_stubs): Adjust for above.
1381
4c77202d
MS
13822015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1383
1384 * elfnn-aarch64.c (elf_aarch64_create_or_find_stub_sec):
1385 Remove unused parameter.
1386 (elfNN_aarch64_size_stubs): Adjust for above.
1387
9b9971aa
MS
13882015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1389
1390 * elfnn-aarch64.c (elfNN_aarch64_size_stubs): Remove bfd_indx.
1391
e2cdef47
MS
13922015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1393
1394 * elfnn-aarch64.c (aarch64_erratum_835769_fixes)
1395 (num_aarch64_erratum_835769_fixes): Remove.
1396 (elfNN_aarch64_size_stubs): Remove assignments to above.
1397
3d14faea
MS
13982015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1399
23956543
MS
1400 * elfnn-aarch64.c (aarch64_mem_op_p): Update comment. Rename rtn
1401 to rt2.
3d14faea
MS
1402 (aarch64_erratum_seqeunce): Rename rtn to rt2.
1403
f872121a
MS
14042015-03-23 Marcus Shawcroft <marcus.shawcroft@arm.com>
1405
1406 * elfnn-aarch64.c (elfNN_aarch64_write_section): Adjust layout.
1407
1740ba0c
NC
14082015-03-19 Nick Clifton <nickc@redhat.com>
1409
1410 * elf32-rl78.c (rl78_cpu_name): New function. Prints the name of
1411 the RL78 core based upon the flags.
1412 (rl78_elf_merge_private_bfd_data): Handle merging of G13 and G14
1413 flags.
1414 (rl78_elf_print_private_bfd_data): Use rl78_cpu_name.
1415 (elf32_rl78_machine): Always return bfd_mach_rl78.
1416
e2575e05
NC
14172015-03-19 Nick Clifton <nickc@redhat.com>
1418
1419 PR 18078
1420 * compress.c (bfd_compress_section_contents): Do not define this
1421 function if it is not used.
1422
0b0732e1
L
14232015-03-18 H.J. Lu <hongjiu.lu@intel.com>
1424
1425 * compress.c (bfd_compress_section_contents): Make it static.
1426 * bfd/bfd-in2.h: Regenerated.
1427
27aaeda0
NC
14282015-03-18 Eric Youngdale <eyoungdale@ptc.com>
1429
1430 PR ld/16598
1431 * peicode.h (pe_ILF_build_a_bfd): Add support for creating relocs
1432 suitable for the AMD64.
1433
273a4985
JT
14342015-03-18 Jon Turney <jon.turney@dronecode.org.uk>
1435 Nick Clifton <nickc@redhat.com>
1436
1437 PR binutils/18087
1438 * coffgen.c (make_a_section_from_file): Only prepend a z to a
1439 debug section's name if the section was actually compressed.
1440 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
1441 * compress.c (bfd_init_section_compress_status): Do not compress
1442 the section if doing so would make it bigger. In such cases leave
1443 the section alone and return COMPRESS_SECTION_NONE.
1444
c4b0b099
AM
14452015-03-17 Alan Modra <amodra@gmail.com>
1446
1447 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return count of 0
1448 on nothing to do, before malloc of returned symbol array.
1449
9c761a55
NC
14502015-03-16 Nick Clifton <nickc@redhat.com>
1451
1452 * elf32-rx.c (elf32_rx_relax_delete_bytes): If the relocs are not
1453 stored in the elf_section_data structure then load them as
1454 necessary.
1455
b9005ba7
AK
14562015-03-14 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
1457
1458 * elf-s390-common.c (elf_s390_elf_sort_relocs_p): Don't sort
1459 relocs against code sections.
1460 * elf32-s390.c: Define elf_backend_sort_relocs_p.
1461 * elf64-s390.c: Likewise.
1462
1079403c
AM
14632015-03-11 Alan Modra <amodra@gmail.com>
1464
1465 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Examine stubs in
1466 reverse order. Account for larger size of __tls_get_addr_opt stub.
1467
a5721edd
JW
14682015-03-10 Yuri Gribov <y.gribov@samsung.arm>
1469
1470 PR ld/16572
1471 * elf32-arm.c (elf32_arm_final_link_relocate): Remove support for
1472 ELF_ARM_HASENTRY.
1473 (elf32_arm_print_private_bfd_data): Likewise.
1474
65164438
NC
14752015-03-06 Nick Clifton <nickc@redhat.com>
1476
1477 PR binutils/17765
1478 * elflink.c (put_value): Like previous delta, but for the 32-bit
1479 case.
1480
41cd1ad1
NC
14812015-03-05 Nick Clifton <nickc@redhat.com>
1482
1483 PR binutils/17765
1484 * elflink.c (put_value): Avoid using an undefined shift
1485 operation.
1486
ca3fe95e
L
14872015-03-05 H.J. Lu <hongjiu.lu@intel.com>
1488
1489 PR ld/pr15228
1490 PR ld/pr17709
1491 * elf-bfd.h (elf_backend_data): Add extern_protected_data.
1492 * elf32-i386.c (elf_backend_extern_protected_data): New.
1493 Defined to 1.
1494 * elf64-x86-64.c (elf_backend_extern_protected_data): Likewise.
1495 * elflink.c (_bfd_elf_adjust_dynamic_copy): Don't error on
1496 copy relocs against protected symbols if extern_protected_data
1497 is true.
1498 (_bfd_elf_symbol_refs_local_p): Don't return true on protected
1499 non-function symbols if extern_protected_data is true.
1500 * elfxx-target.h (elf_backend_extern_protected_data): New.
1501 Default to 0.
1502 (elfNN_bed): Initialize extern_protected_data with
1503 elf_backend_extern_protected_data.
1504
425bd9e1
NC
15052015-03-05 Nick Clifton <nickc@redhat.com>
1506
1507 PR binutils/18025
1508 * coffgen.c (coff_find_nearest_line_with_names): If the dwarf2
1509 lookup fails, check for an address bias in the dwarf info, and if
1510 one exists, retry the lookup with the biased value.
1511 * dwarf2.c (_bfd_dwarf2_find_symbol_bias): New function.
1512 Determines if a bias exists bewteen the addresses of functions
1513 based on DWARF information vs symbol table information.
1514 * libbfd-in.h (_bfd_dwarf2_find_symbol_bias): Prototype.
1515 * libbfd.h: Regenerate.
1516
8ef229f3
MS
15172015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1518
1519 * elfxx-aarch64.c (decode_add_imm, decode_movw_imm)
1520 (decode_tst_branch_ofs_14, decode_ld_lit_ofs_19)
1521 (decode_cond_branch_ofs_19, decode_branch_ofs_26): Remove.
1522
8e2fe09f
MS
15232015-03-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
1524
1525 * elfnn-aarch64.c (aarch64_build_one_stub): Call abort.
1526 (aarch64_size_one_stub): Likewise.
1527 (aarch64_map_one_stub): Likewise.
1528
df88b702
AA
15292015-03-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
1530
1531 * cpu-s390.c (N): New macro.
1532 (bfd_s390_31_arch): New. Define only if default target word size
1533 is 64 bits. Otherwise define...
1534 (bfd_390_64_arch): ...this. Make static.
1535 (bfd_s390_arch): Define according to the default target word size.
1536 Let the 'next' field point to the alternate arch.
1537
e09ab7ac
RS
15382015-03-04 Richard Sandiford <richard.sandiford@arm.com>
1539
1540 PR gas/17843
1541 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Expect
1542 R_AARCH64_TLSLE_MOVW_TPREL_G0_NC and R_AARCH64_TLSLE_MOVW_TPREL_G1_NC
1543 to be used with MOVK rather than MOVZ.
1544
71eef2bd
DD
15452015-03-03 DJ Delorie <dj@redhat.com>
1546
1547 * elf32-rl78.c (rl78_elf_relax_section): Only relax ADDR16's if
1548 there's a symbol.
1549
f01f1741
AM
15502015-02-28 Alan Modra <amodra@gmail.com>
1551
1552 * elf32-ppc.c (ppc_elf_tls_setup): Set no_tls_get_addr_opt if
1553 not PLT_NEW.
1554
c1d11331
L
15552015-02-27 H.J. Lu <hongjiu.lu@intel.com>
1556
1557 * elf32-i386.c (need_convert_mov_to_lea): New.
1558 (elf_i386_check_relocs): Set need_convert_mov_to_lea if needed.
1559 (elf_i386_convert_mov_to_lea): Return TRUE if
1560 need_convert_mov_to_lea is unset.
1561 * elf64-x86-64.c (need_convert_mov_to_lea): New.
1562 (elf_x86_64_check_relocs): Set need_convert_mov_to_lea if needed.
1563 (elf_x86_64_convert_mov_to_lea): Return TRUE if
1564 need_convert_mov_to_lea is unset.
1565
cdb602b1
NC
15662015-02-27 Nick Clifton <nickc@redhat.com>
1567
1568 PR binutils/17910
1569 * coffgen.c (_bfd_coff_internal_syment_name): Only check for
1570 string length overflow when the string table length is actually
1571 set.
1572
96c20bc1
MS
15732015-02-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
1574
1575 * bfd/bfd-in2.h: Regenerate.
1576 * bfd/libbfd.h: Regenerate.
1577
1ada945d
MS
15782015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1579
1580 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix
1581 TLSDESC_LD_PREL19 field width and masks.
1582 (aarch64_tls_transition_without_check)
1583 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1584 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1585 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1586 BFD_RELOC_AARCH64_TLSDESC_LD_PREL19.
1587 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1588 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1589
389b8029
MS
15902015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1591
73920eed
MS
1592 * elfnn-aarch64.c (IS_AARCH64_TLSDESC_RELOC): Reorder R_TYPE
1593 tests.
389b8029
MS
1594 (aarch64_tls_transition_without_check)
1595 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1596 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1597 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1598 BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21.
1599 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1600 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1601 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1602
3c12b054
MS
16032015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1604
1605 * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC)
1606 (elfNN_aarch64_howto_table, aarch64_tls_transition_without_check)
1607 (aarch64_reloc_got_type, elfNN_aarch64_final_link_relocate)
1608 (elfNN_aarch64_tls_relax, elfNN_aarch64_relocate_section)
1609 (elfNN_aarch64_gc_sweep_hook, elfNN_aarch64_check_relocs): Handle
1610 BFD_RELOC_AARCH64_TLSGD_ADR_PREL21.
1611 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1612 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1613 * reloc.c (BFD_RELOC_AARCH64_TLSGD_ADR_PREL21): Define.
1614
043bf05a
MS
16152015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1616
1617 * elfnn-aarch64.c: (TLSIE_LD_GOTTREL_PREL19): Fix HOWTO bit field width.
1618 (aarch64_tls_transition_without_check, aarch64_reloc_got_type)
1619 (elfNN_aarch64_final_link_relocate, elfNN_aarch64_tls_relax)
1620 (elfNN_aarch64_relocate_section, elfNN_aarch64_gc_sweep_hook)
1621 (elfNN_aarch64_check_relocs): Handle
1622 BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19.
1623
1624 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend)
1625 (_bfd_aarch64_elf_resolve_relocation): Likewise.
1626
7366006f
MS
16272015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1628
1629 * elfnn-aarch64.c: (TLSDESC_CALL): Fix HOWTO bit field width.
1630
07875fbc
MS
16312015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1632
1633 * elfnn-aarch64.c (TLSLE_MOVW_TPREL_G2)
1634 (TLSLE_MOVW_TPREL_G1, TLSLE_MOVW_TPREL_G1_NC)
1635 (TLSLE_MOVW_TPREL_G0, TLSLE_MOVW_TPREL_G0_NC): Fix bit field
1636 width.
1637
49d8f92c
MS
16382015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
1639
1640 * elfnn-aarch64.c: (TLSIE_MOVW_GOTTPREL_G0_NC): Fix HOWTO bit
1641 field width.
1642
c86934ce
NC
16432015-02-26 Nick Clifton <nickc@redhat.com>
1644
1645 PR binutils/17512
1646 * coffcode.h (coff_compute_section_file_positions): Report
1647 negative page sizes.
1648 * elf.c (elf_fake_sections): Handle excessive alignmment powers.
1649 (assign_file_positions_for_non_load_sections): Replace assertion
1650 with an error message.
1651 (rewrite_elf_program_header): Handle excessive segment
1652 alignments.
1653 * mach-o.c (bfd_mach_o_read_section_32): Likewise.
1654 (bfd_mach_o_read_section_64): Likewise.
1655 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Use %B to
1656 print a bfd name, not %A.
1657
bd4d2eaa
AM
16582015-02-26 Alan Modra <amodra@gmail.com>
1659
1660 * elf64-ppc.c (plt_stub_size, build_plt_stub): Don't build
1661 thread-safe stubs for iplt.
1662 (build_tls_get_addr_stub): Restore r2 immediately after call.
1663
99654aaf
TG
16642015-02-26 Terry Guo <terry.guo@arm.com>
1665
1666 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Update how we
1667 merge Tag_ABI_HardFP_use.
1668
a127494f
AM
16692015-02-26 Alan Modra <amodra@gmail.com>
1670
1671 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Heed -z nocopyreloc.
1672 Use text relocs rather than giving an error on trying to use
1673 .dynbss for protected shared lib vars.
1674 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1675
bac13f5a
AB
16762015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1677
1678 * elf32-avr.c (struct elf_avr_section_data): New structure.
1679 (struct avr_relax_info): New structure.
1680 (elf_avr_new_section_hook): New function.
1681 (struct elf_avr_section_data): Add relax_info.
1682 (get_avr_relax_info): New function.
1683 (init_avr_relax_info): New function.
1684 (elf32_avr_relax_delete_bytes): Find next property record before
1685 deleting bytes. When deleting don't move bytes beyond the next
1686 property record.
1687 (avr_elf32_assign_records_to_section): New function.
1688 (avr_property_record_compare): New function.
1689 (avr_load_all_property_sections): New function.
1690 (elf32_avr_relax_section): Load property data. After relaxing the
1691 section, move any .align directives that have enough deleted bytes
1692 before them.
1693 (bfd_elf32_new_section_hook): Define.
1694
137c83d6
AB
16952015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1696
1697 * elf32-avr.h (struct avr_property_header): New strucure.
1698 (avr_elf32_load_property_records): Declare.
1699 (avr_elf32_property_record_name): Declare.
1700 * elf32-avr.c: Add bfd_stdint.h include.
1701 (retrieve_local_syms): New function.
1702 (get_elf_r_symndx_section): New function.
1703 (get_elf_r_symndx_offset): New function.
1704 (internal_reloc_compare): New function.
1705 (struct avr_find_section_data): New structure.
1706 (avr_is_section_for_address): New function.
1707 (avr_find_section_for_address): New function.
1708 (avr_elf32_load_records_from_section): New function.
1709 (avr_elf32_load_property_records): New function.
1710 (avr_elf32_property_record_name): New function.
1711
fdd410ac
AB
17122015-02-25 Andrew Burgess <andrew.burgess@embecosm.com>
1713
1714 * elf32-avr.h (AVR_PROPERTY_RECORD_SECTION_NAME): Define.
1715 (AVR_PROPERTY_RECORDS_VERSION): Define.
1716 (AVR_PROPERTY_SECTION_HEADER_SIZE): Define.
1717 (struct avr_property_record): New structure.
1718
685080f2
NC
17192015-02-24 Nick Clifton <nickc@redhat.com>
1720
1721 * elf32-v850.c (v850_set_note): New function. Creates a Renesas
1722 style note entry.
1723 (v850_elf_make_note_section): New function. Creates a note
1724 section.
1725 (v850_elf_create_sections): New function. Create a note section
1726 if one is not already present.
1727 (v850_elf_set_note): New function. Adds a note to a bfd.
1728 (v850_elf_copy_private_bfd_data): New function. Copies V850
1729 notes.
1730 (v850_elf_merge_notes): New function. Merges V850 notes.
1731 (print_v850_note): New function. Displays a V850 note.
1732 (v850_elf_print_notes): New function. Displays all notes attached
1733 to a bfd.
1734 (v850_elf_merge_private_bfd_data): Call v850_elf_merge_notes.
1735 (v850_elf_print_private_bfd_data): Call v850_elf_print_notes.
1736 (v850_elf_fake_sections): Set the type of the V850 note section.
1737 * bfd-in.h (v850_elf_create_sections): Add prototype.
1738 (v850_elf_set_note): Add prototype.
1739 * bfd-in2.h: Regenerate.
1740
31593e1b
NC
17412015-02-24 Nick Clifton <nickc@redhat.com>
1742
1743 * configure.ac (AC_CHECK_HEADERS): Add wctype.h.
1744 * configure: Regenerate.
1745 * config.in: Regenerate.
1746 * peXXigen.c: Include wctype.h if HAVE_WCTYPE_H is defined.
1747 (u16_mbtowc): Use wint_t types if HAVE_WCTYPE_H is defined.
1748 (rsrc_cmp): Use towlower instead of wcsncasecmp if HAVE_WCTYPE_H
1749 is defined.
1750
3ad797fd
NC
17512015-02-24 Nick Clifton <nickc@redhat.com>
1752
1753 * pdp11.c (set_section_contents): Pad the .text and .data sections
1754 to their aligned sizes.
1755
5518c738
YS
17562015-02-23 Yoshinori Sato <ysato@users.sourceforge.jp>
1757
1758 * config.bfd: Add h8300-*-linux.
1759 * configure.ac: Add h8300_elf32_linux_vec.
1760 * configure: Regenerate.
1761 * elf32-h8300.c: Likewise.
1762 * targets.c(_bfd_target_vector): Likewise.
1763
cb967f0d
NC
17642015-02-23 Nick Clifton <nickc@redhat.com>
1765
1766 PR 17914
1767 * cpu-w65.c: Correct typos in license notice.
1768
0f8f0c57
NC
1769 PR 17940
1770 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust debug
1771 symbols at end of sections. Adjust function sizes.
1772
4ef9f41a
AA
17732015-02-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
1774
1775 * elf-bfd.h (elfcore_write_s390_vxrs_low): Add prototype.
1776 (elfcore_write_s390_vxrs_high): Likewise.
1777 * elf.c (elfcore_grok_s390_vxrs_low): New function.
1778 (elfcore_grok_s390_vxrs_high): New function.
1779 (elfcore_grok_note): Call them.
1780 (elfcore_write_s390_vxrs_low): New function.
1781 (elfcore_write_s390_vxrs_high): New function.
1782 (elfcore_write_register_note): Call them.
1783
837914ee
BD
17842015-02-19 Branko Drevensek <branko.drevensek@gmail.com>
1785
1786 PR 17995
1787 * verilog.c (verilog_write_record): Correct buffer size.
1788
cf18fda4
AM
17892015-02-19 Alan Modra <amodra@gmail.com>
1790
1791 * elflink.c (_bfd_elf_define_linkage_sym): Set 'bed' earlier.
1792
d983c8c5
AM
17932015-02-19 Alan Modra <amodra@gmail.com>
1794
1795 PR ld/4317
1796 * elflink.c (elf_link_input_bfd): Drop undefined local syms.
1797 (elf_link_output_extsym): Drop local and global undefined syms.
1798 Tidy. Expand comment.
1799
2ec55de3
AM
18002015-02-17 Alan Modra <amodra@gmail.com>
1801
1802 PR ld/17975
1803 * elflink.c (struct elf_outext_info): Remove need_second_pass
1804 and second_pass.
1805 (elf_link_output_extsym): Delete code handling second forced
1806 local pass. Move code emitting NULL STT_FILE symbol later, so
1807 that it can be omitted if forced local is stripped. Don't
1808 emit the NULL STT_FILE if no file symbols have been output.
1809 (bfd_elf_final_link): Remove second forced local pass.
1810 * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms.
1811 (ppc_elf_size_dynamic_sections): Likewise.
1812 * elf64-ppc.c (ppc_build_one_stub): Likewise.
1813 (build_global_entry_stubs): Likewise.
1814 (ppc64_elf_build_stubs): Likewise.
1815
6dfb72b9
L
18162015-02-16 H.J. Lu <hongjiu.lu@intel.com>
1817
1818 PR ld/17975
1819 * elflink.c (elf_link_output_extsym): Only check filesym_count
1820 when outputting a NULL FILE symbol. Set second_pass_sym to
1821 h->forced_local && !h->root.linker_def.
1822
576fa883
L
18232015-02-15 H.J. Lu <hongjiu.lu@intel.com>
1824
1825 * elf32-i386.c (elf_i386_always_size_sections): Set root.linker_def
1826 on _TLS_MODULE_BASE_.
1827 * elf64-x86-64.c (elf_x86_64_always_size_sections): Likewise.
1828
62f8d217
AM
18292015-02-15 Alan Modra <amodra@gmail.com>
1830
1831 * dwarf2.c (read_rangelist): Correct buffer overflow check
1832 Whitespace throughout file.
1833
ce875075
AM
18342015-02-14 Alan Modra <amodra@gmail.com>
1835
1836 PR ld/17973
1837 * bfd.c (struct bfd): Add lto_output.
1838 * linker.c (_bfd_handle_already_linked): Explicitly test for
1839 objects added by the lto plugin.
1840 * opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
1841 no_export flags from archive.
1842 * archive.c (open_nested_file): New function, setting lto_output
1843 and no_export, extracted from..
1844 (find_nested_archive): ..here. Flip params. Rename from
1845 _bfd_find_nested_archive.
1846 (_bfd_get_elt_at_filepos): Correct var typo. Use open_nested_file.
1847 (_bfd_look_for_bfd_in_cache): Copy no_export.
1848 * elflink.c (elf_link_add_object_symbols): Remove now unnecessary
1849 my_archive->no_export test.
1850 (elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
1851 Don't use the file name when adding lto_output STT_FILE sym.
1852 * bfd-in2.h: Regenerate.
1853
451dfd38
AM
18542015-02-13 Alan Modra <amodra@gmail.com>
1855
1856 PR binutils/17512
1857 * elf64-ppc.c (opd_entry_value): Tighten offset check. Remove
1858 now redundant assert.
1859
dbb3fbbb
NC
18602015-02-12 Nick Clifton <nickc@redhat.com>
1861
1862 PR binutils/17512
1863 * dwarf.c (read_1_byte, read_1_signed_byte, read_2_bytes)
1864 (read_4_bytes, read_8_bytes, read_n_bytes, read_string)
1865 (read_indirect_string, read_alt_indirect_string)
1866 (read_alt_indirect_ref, read_address, read_abbrevs)
1867 (read_attribute_value, read_attribute, decode_line_info)
1868 (find_abstract_instance_name, read_rangelist)
1869 (scan_unit_for_symbols, parse_comp_unit)
1870 (_bfd_dwarf2_find_nearest_line): Harden DWARF reading code. Pass
1871 end pointers to reading functions and check for offsets taking
1872 pointers out of range. Replace calls to read_*_leb128 with calls
1873 to safe_read_leb128.
1874
1875 (* elf64-ppc.c (opd_entry_value): Add a check for an overlarge
1876 offset.
1877 * syms.c (_bfd_stab_section_find_nearest_line): Add checks for
1878 computed file_name address being before the start of the string
1879 table.
1880
b9dc5a87
L
18812015-02-11 H.J. Lu <hongjiu.lu@intel.com>
1882
1883 PR ld/17878
1884 * bfd.c (bfd_plugin_format): New.
1885 (bfd): Add plugin_format and plugin_dummy_bfd.
1886 * plugin.c (try_load_plugin): Take a pointer to bfd_boolean
1887 argument to return TRUE if any plugin is found. Set plugin_format.
1888 (has_plugin): New.
1889 (bfd_plugin_target_p): New.
1890 (bfd_plugin_specified_p): Likewise.
1891 (bfd_plugin_target_p): Likewise.
1892 (register_ld_plugin_object_p): Likewise.
1893 (bfd_plugin_set_plugin): Set has_plugin.
1894 (load_plugin): Cache try_load_plugin result.
1895 (bfd_plugin_object_p): Try ld_plugin_object_p first. Check
1896 plugin_format.
1897 * plugin.h (bfd_plugin_target_p): New.
1898 (bfd_plugin_specified_p): Likewise.
1899 (register_ld_plugin_object_p): Likewise.
1900 * bfd-in2.h: Regenerated.
1901
55172d69
PA
19022015-02-11 Pedro Alves <palves@redhat.com>
1903
1904 * libbfd-in.h [__cplusplus]: Open extern "C" scope.
1905 * libcoff-in.h [__cplusplus]: Open extern "C" scope.
1906 * libbfd.h: Regenerate.
1907 * libcoff.h: Regenerate.
1908
1909 * elf-bfd.h [__cplusplus]: Wrap in extern "C".
1910 * mach-o.h [__cplusplus]: Wrap in extern "C".
1911 * som.h [__cplusplus]: Wrap in extern "C".
1912
77ef8654
NC
19132015-02-10 Nick Clifton <nickc@redhat.com>
1914
1915 PR binutils/17512
1916 * coffcode.h (styp_to_sec_flags): Use an unsigned long type to
1917 hold the flag bits.
1918 * peXXigen.c (pe_print_reloc): Use unsigned types to hold the
1919 size and number of relocs.
1920 (pe_print_debugdata): Use a 32-bit aligned buffer to store the
1921 codeview record.
1922 * versados.c (process_otr): Check the esdid value before using it
1923 to access the EDATA.
1924
35181b3e
EM
19252015-02-09 Ed Maste <emaste@freebsd.org>
1926
1927 * elf32-i386.c (elf_i386_get_plt_sym_val): Avoid incrementing
1928 uninitialized and unused variable.
1929 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
1930
989f9879
AM
19312015-02-09 Alan Modra <amodra@gmail.com>
1932
1933 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault on NULL
1934 tls_sec.
1935 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1936 * elflink.c (elf_link_output_extsym): Don't assert on NULL tls_sec.
1937
ca4be51c
AM
19382015-02-09 Alan Modra <amodra@gmail.com>
1939
1940 * elflink.c: Whitespace, formatting fixes.
1941 (elf_link_input_bfd): Clarify comment.
1942 (elf_link_output_extsym): Exclude symbols in linker created
1943 sections when testing for plugin symbols.
1944
1952c5cd
L
19452015-02-07 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 PR ld/17935
1948 * elf32-i386.c (elf_i386_readonly_dynrelocs): Also issue a
1949 warning for relocation in readonly section for -z text.
1950 (elf_i386_size_dynamic_sections): Likewise.
1951 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1952 (elf_x86_64_size_dynamic_sections): Likewise.
1953
9e2dec47
L
19542015-02-06 H.J. Lu <hongjiu.lu@intel.com>
1955
1956 PR ld/12365
1957 PR ld/14272
1958 * elflink.c (_bfd_elf_fix_symbol_flags): Revert the last change.
1959 (elf_link_input_bfd): Mark the plugin symbol undefined if it is
1960 referenced from a non-IR file.
1961
5929c344
NC
19622015-02-06 Nick Clifton <nickc@redhat.com>
1963
1964 PR binutils/17512
1965 * peXXigen.c (rsrc_print_resource_entries): Add range check for
1966 addresses that wrap around the address space.
1967 (rsrc_parse_entry): Likewise.
1968
60f79275
L
19692015-02-03 H.J. Lu <hongjiu.lu@intel.com>
1970
1971 PR ld/12365
1972 PR ld/14272
1973 * elflink.c (_bfd_elf_fix_symbol_flags): Mark the plugin symbol
1974 undefined if it is referenced from a non-IR file.
1975
64d29018
NC
19762015-02-03 Nick Clifton <nickc@redhat.com>
1977
1978 PR binutils/17512
1979 * ecoff.c: Use bfd_alloc2 to allocate space for structure arrays.
1980 (_bfd_ecoff_slurp_symbol_table): Check for a negative symbol
1981 index or an out of range fdr index.
1982 * elf-m10300.c (mn10300_info_to_howto): Fix typo in error message.
1983 * elf32-arc.c (arc_info_to_howto_rel): Likewise.
1984 * elf32-avr.c (avr_info_to_howto_rela): Likewise.
1985 * elf32-cr16.c (elf_cr16_info_to_howto): Likewise.
1986 * elf32-cr16c.c (elf_cr16c_info_to_howto_rel): Likewise.
1987 * elf32-cris.c (cris_info_to_howto_rela): Likewise.
1988 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
1989 * elf32-d10v.c (d10v_info_to_howto_rel): Likewise.
1990 * elf32-d30v.c (d30v_info_to_howto_rel): Likewise.
1991 * elf32-epiphany.c (epiphany_info_to_howto_rela): Likewise.
1992 * elf32-fr30.c (fr30_info_to_howto_rela): Likewise.
1993 * elf32-frv.c (frv_info_to_howto_rela): Likewise.
1994 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
1995 * elf32-i960.c (elf32_i960_info_to_howto_rel): Likewise.
1996 * elf32-ip2k.c (ip2k_info_to_howto_rela): Likewise.
1997 * elf32-iq2000.c (iq2000_info_to_howto_rela): Likewise.
1998 * elf32-lm32.c (lm32_info_to_howto_rela): Likewise.
1999 * elf32-m32c.c (m32c_info_to_howto_rela): Likewise.
2000 * elf32-m32r.c (m32r_info_to_howto_rel): Likewise.
2001 * elf32-m68hc11.c (m68hc11_info_to_howto_rel): Likewise.
2002 * elf32-m68hc12.c (m68hc11_info_to_howto_rel): Likewise.
2003 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2004 * elf32-mep.c (mep_info_to_howto_rela): Likewise.
2005 * elf32-metag.c (metag_info_to_howto_rela): Likewise.
2006 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2007 * elf32-moxie.c (moxie_info_to_howto_rela): Likewise.
2008 * elf32-msp430.c (msp430_info_to_howto_rela): Likewise.
2009 * elf32-mt.c (mt_info_to_howto_rela): Likewise.
2010 * elf32-nds32.c (nds32_info_to_howto_rel): Likewise.
2011 * elf32-or1k.c (or1k_info_to_howto_rela): Likewise.
2012 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2013 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2014 * elf32-rl78.c (rl78_info_to_howto_rela): Likewise.
2015 * elf32-rx.c (rx_info_to_howto_rela): Likewise.
2016 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2017 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2018 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
2019 * elf32-vax.c (rtype_to_howto): Likewise.
2020 * elf32-visium.c (visium_info_to_howto_rela): Likewise.
2021 * elf32-xgate.c (xgate_info_to_howto_rel): Likewise.
2022 * elf32-xtensa.c (elf_xtensa_info_to_howto_rela): Likewise.
2023 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2024 * elf64-mmix.c (mmix_info_to_howto_rela): Likewise.
2025 * mach-o.c: Use bfd_alloc2 to allocate space for structure arrays.
2026 (bfd_mach_o_canonicalize_one_reloc): Fix check on out
2027 of range symbol indicies.
2028 (bfd_mach_o_canonicalize_relocs): Check for out of range alloc.
2029 (bfd_mach_o_canonicalize_dynamic_reloc): Likewise.
2030 (bfd_mach_o_build_dysymtab): Likewise.
2031 (bfd_mach_o_write_symtab_content): Set the string table size to
2032 zero upon error.
2033 (bfd_mach_o_read_symtab_symbols): Reset the nsyms value if the
2034 read fails.
2035 * peXXigen.c (pe_print_edata): Check for numeric overflow in edt
2036 fields.
2037 * tekhex.c (first_phase): Check for src pointer reaching end of
2038 buffer.
2039
3a635617
WN
20402015-02-03 Will Newton <will.newton@linaro.org>
2041
46b87d49
WN
2042 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol):
2043 Set st_value to zero for undefined symbols if the reference
2044 is weak or pointer_equality_needed is FALSE.
2045
3a635617
WN
2046 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Improve
2047 comment discussing why we clear st_value for some symbols.
2048
0c4bd9d9
KLC
20492015-02-02 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2050
2051 * elf32-nds32.c (nds32_get_section_contents): Add one more argument.
2052 (nds32_elf_relocate_section): Do not relocate R_NDS32_LONGJUMP7.
2053
b86ac8e3
AM
20542015-01-29 Alan Modra <amodra@gmail.com>
2055
2056 * elf64-ppc.c (ppc64_elf_relocate_section): Correct GOT_TLSLD
2057 optimization. Tidy mask for GOT_TLSGD optimization.
2058 * elf32-ppc.c (ppc_elf_relocate_section): Likewise. Correct
2059 location of nop zapping high insn too.
2060
dbd1e97e
AM
20612015-01-28 Alan Modra <amodra@gmail.com>
2062
2063 * elf64-ppc.h (struct ppc64_elf_params): Add "object_in_toc".
2064 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Assume that global symbols
2065 in .toc indicate xlc compiled code that might require a rw .toc.
2066
3f8107ab
AM
20672015-01-28 James Bowman <james.bowman@ftdichip.com>
2068
2069 * Makefile.am: Add FT32 files.
2070 * archures.c (enum bfd_architecture): Add bfd_arch_ft32.
2071 (bfd_mach_ft32): Define.
2072 (bfd_ft32_arch): Declare.
2073 (bfd_archures_list): Add bfd_ft32_arch.
2074 * config.bfd: Handle FT32.
2075 * configure.ac: Likewise.
2076 * cpu-ft32.c: New file.
2077 * elf32-ft32.c: New file.
2078 * reloc.c (BFD_RELOC_FT32_10, BFD_RELOC_FT32_20, BFD_RELOC_FT32_17,
2079 BFD_RELOC_FT32_18): Define.
2080 * targets.c (_bfd_target_vector): Add ft32_elf32_vec.
2081 * bfd-in2.h: Regenerate.
2082 * libbfd.h: Regenerate.
2083 * Makefile.in: Regenerate.
2084 * configure: Regenerate.
2085 * po/SRC-POTFILES.in: Regenerate.
2086
37e3922e
NC
20872015-01-27 Nick Clifton <nickc@redhat.com>
2088
2089 PR binutils/17512
2090 * pdp11.c (aout_get_external_symbols): Return false if there are
2091 no symbols.
2092
877a8638
NC
2093 * dwarf2.c (concat_filename): Check for an empty directory table.
2094 (scan_unit_for_symbols): Check for reading off the end of the
2095 unit.
2096 (parse_comp_unit): Check for a DW_AT_comp_dir attribute with a
2097 non-string form.
2098 * elf64-ppc.c (opd_entry_value): Fail if there are no relocs
2099 available.
2100
18393a2e
KLC
21012015-01-26 Kuan-Lin Chen <kuanlinchentw@gmail.com>
2102
2103 * elf32-nds32.c (nds32_elf_pick_relax): Fix again setting.
2104
055173ca
DD
21052015-01-22 DJ Delorie <dj@redhat.com>
2106
2107 * elf32-m32c.c (m32c_apply_reloc_24): New.
2108 (m32c_elf_howto_table): Use it for R_M32C_24.
2109 (m32c_elf_relocate_section): Handle R_M32C_24 specially.
2110
4e5cb37e
NC
21112015-01-22 Nick Clifton <nickc@redhat.com>
2112
2113 PR binutils/17512
2114 * coffcode.h (handle_COMDAT): When searching for the section
2115 symbol, make sure that there is space left in the symbol table.
2116 * vms-alpha.c (_bfd_vms_slurp_ehdr): Add range checks.
2117
86eafac0
NC
21182015-01-21 Nick Clifton <nickc@redhat.com>
2119
2120 PR binutils/17512
2121 * coffcode.h (coff_set_arch_mach_hook): Check return value from
2122 bfd_malloc.
2123 (coff_slurp_line_table): Return FALSE if the line number
2124 information was corrupt.
2125 (coff_slurp_symbol_table): Return FALSE if the symbol information
2126 was corrupt.
2127 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always
2128 initialise the fields of the dyld_info structure.
2129 (bfd_mach_o_build_exec_seg_command): Replace assertion with an
2130 error message and a return value.
2131 (bfd_mach_o_layout_commands): Change the function to boolean.
2132 Return FALSE if the function fails.
2133 (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands
2134 fails.
2135 (bfd_mach_o_read_command): Fail if an unrecognised command is
2136 encountered.
2137 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the
2138 read fails.
2139 (slurp_symtab): Check the return from bfd_malloc.
2140 (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy
2141 encountered an error.
2142 (_bfd_XXi_final_link_postscript): Fail if a section could not be
2143 copied.
2144 * peicode.h (pe_bfd_object_p): Fail if the header could not be
2145 swapped in.
2146 * tekhex.c (first_phase): Fail if the section is too big.
2147 * versados.c (struct esdid): Add content_size field.
2148 (process_otr): Use and check the new field.
2149 (versados_get_section_contents): Check that the section exists and
2150 that the requested data is available.
2151
03d5b773
CLT
21522015-01-20 Chung-Lin Tang <cltang@codesourcery.com>
2153
2154 * elf32-nios2.c (elf_backend_default_execstack): Define as 0.
2155
1c9177d9
AM
21562015-01-20 Alan Modra <amodra@gmail.com>
2157
2158 PR ld/17615
2159 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Don't drop
2160 ELF_COMMON_DEF syms.
2161
c4621b33
AM
21622015-01-19 Alan Modra <amodra@gmail.com>
2163
3e2aa5bb 2164 PR ld/17615
c4621b33
AM
2165 * elf-bfd.h (ELF_COMMON_DEF_P): Note that this might be true for
2166 linker script assignments too.
2167 * elflink.c (elf_gc_sweep_symbol): Don't drop ELF_COMMON_DEF syms.
2168 (bfd_elf_gc_mark_dynamic_ref_symbol): Similarly.
2169
0ba38529
AM
21702015-01-19 Alan Modra <amodra@gmail.com>
2171
2172 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Correct loop iteration
2173 to allow return of first howto.
2174 * elf32-fr30.c (fr30_reloc_type_lookup): Likewise.
2175 * elf32-m32c.c (m32c_reloc_type_lookup): Likewise.
2176 * elf32-moxie.c (moxie_reloc_type_lookup): Likewise.
2177 * elf32-or1k.c (or1k_reloc_type_lookup): Likewise.
2178 * elf32-rl78.c (rl78_reloc_type_lookup): Likewise.
2179 * elf32-rx.c (rx_reloc_type_lookup): Likewise.
2180 * elf32-tilepro.c (tilepro_reloc_type_lookup): Likewise.
2181 * elf32-xstormy16.c (xstormy16_reloc_type_lookup): Likewise.
2182 * elfxx-tilegx.c (tilegx_reloc_type_lookup): Likewise.
2183 * elf32-nios2.c (nios2_reloc_map): Add mapping for R_NIOS2_NONE.
2184 * elf32-spu.c (spu_elf_bfd_to_reloc_type): Allow return of R_SPU_NONE.
2185 (spu_elf_reloc_type_lookup): Adjust to suit.
2186
6346d5ca
AM
21872015-01-19 Alan Modra <amodra@gmail.com>
2188
2189 * bfd-in.h (bfd_get_section_limit_octets): New define, extracted from..
2190 (bfd_get_section_limit): ..here.
2191 * reloc.c (bfd_perform_relocation): Correct bfd_reloc_outofrange check.
2192 (bfd_install_relocation, _bfd_final_link_relocate): Add same check here.
2193 * elf32-sh.c (sh_elf_reloc): Correct bfd_reloc_outofrange check.
2194 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Remove duplicated
2195 bfd_reloc_outofrange check.
2196 * bfd-in2.h: Regenerate.
2197
2198 * cpu-ns32k.c (_bfd_do_ns32k_reloc_contents): Return bfd_reloc_ok
2199 on zero size relocs.
2200 * ecoff.c (ecoff_reloc_link_order): Likewise.
2201 * elf32-nds32.c (nds32_relocate_contents): Likewise.
2202 * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
2203
2204 * reloc.c (_bfd_relocate_contents): Don't bomb on zero size relocs.
2205 (_bfd_clear_contents): Likewise.
2206 * elfxx-mips.c (mips_elf_obtain_contents): Likewise.
2207 (mips_elf_perform_relocation): Likewise.
2208
2209 * aoutx.h (aout_link_reloc_link_order): Allow for NULL return
2210 from malloc on zero size alloc.
2211 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2212 * elflink.c (elf_reloc_link_order): Likewise.
2213 * linker.c (_bfd_generic_reloc_link_order): Likewise.
2214 * pdp11.c (aout_link_reloc_link_order): Likewise.
2215 * xcofflink.c (xcoff_reloc_link_order): Likewise.
2216
2217 * aoutx.h (howto_table_ext): Ensure NONE relocs have size 3,
2218 bitsize 0, and complain_overflow_dont.
2219 * coff-sparc.c (coff_sparc_howto_table): Likewise.
2220 * elf-hppa.h (elf_hppa_howto_table): Likewise.
2221 * elf-m10200.c (elf_mn10200_howto_table): Likewise.
2222 * elf-m10300.c (elf_mn10300_howto_table): Likewise.
2223 * elf32-arc.c (elf_arc_howto_table): Likewise.
2224 * elf32-arm.c (elf32_arm_howto_table_1): Likewise.
2225 * elf32-avr.c (elf_avr_howto_table): Likewise.
2226 * elf32-bfin.c (bfin_howto_table): Likewise.
2227 * elf32-cr16.c (cr16_elf_howto_table): Likewise.
2228 * elf32-cris.c (cris_elf_howto_table): Likewise.
2229 * elf32-crx.c (crx_elf_howto_table): Likewise.
2230 * elf32-d10v.c (elf_d10v_howto_table): Likewise.
2231 * elf32-d30v.c (elf_d30v_howto_table): Likewise.
2232 * elf32-dlx.c (dlx_elf_howto_table): Likewise.
2233 * elf32-epiphany.c (epiphany_elf_howto_table): Likewise.
2234 * elf32-fr30.c (fr30_elf_howto_table): Likewise.
2235 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2236 * elf32-h8300.c (h8_elf_howto_table): Likewise.
2237 * elf32-i370.c (i370_elf_howto_raw): Likewise.
2238 * elf32-i386.c (elf_howto_table): Likewise.
2239 * elf32-i860.c (elf32_i860_howto_table): Likewise.
2240 * elf32-i960.c (elf32_i960_relocate): Likewise.
2241 * elf32-ip2k.c (ip2k_elf_howto_table): Likewise.
2242 * elf32-iq2000.c (iq2000_elf_howto_table): Likewise.
2243 * elf32-lm32.c (lm32_elf_howto_table): Likewise.
2244 * elf32-m32c.c (m32c_elf_howto_table): Likewise.
2245 * elf32-m32r.c (m32r_elf_howto_table): Likewise.
2246 * elf32-m68hc11.c (elf_m68hc11_howto_table): Likewise.
2247 * elf32-m68hc12.c (elf_m68hc11_howto_table): Likewise.
2248 * elf32-m68k.c (howto_table): Likewise.
2249 * elf32-mcore.c (mcore_elf_howto_raw): Likewise.
2250 * elf32-mep.c (mep_elf_howto_table): Likewise.
2251 * elf32-metag.c (elf_metag_howto_table): Likewise.
2252 * elf32-microblaze.c (microblaze_elf_howto_raw): Likewise.
2253 * elf32-mips.c (elf_mips_howto_table_rel): Likewise.
2254 * elf32-moxie.c (moxie_elf_howto_table): Likewise.
2255 * elf32-msp430.c (elf_msp430_howto_table): Likewise.
2256 * elf32-mt.c (mt_elf_howto_table): Likewise.
2257 * elf32-nds32.c (nds32_elf_howto_table): Likewise.
2258 * elf32-nios2.c (elf_nios2_howto_table_rel): Likewise.
2259 * elf32-or1k.c (or1k_elf_howto_table): Likewise.
2260 * elf32-pj.c (pj_elf_howto_table): Likewise.
2261 * elf32-ppc.c (ppc_elf_howto_raw): Likewise.
2262 * elf32-rl78.c (rl78_elf_howto_table): Likewise.
2263 * elf32-rx.c (rx_elf_howto_table): Likewise.
2264 * elf32-s390.c (elf_howto_table): Likewise.
2265 * elf32-score.c (elf32_score_howto_table): Likewise.
2266 * elf32-score7.c (elf32_score_howto_table): Likewise.
2267 * elf32-sh-relocs.h (R_SH_NONE): Likewise.
2268 * elf32-spu.c (elf_howto_table): Likewise.
2269 * elf32-tic6x.c (elf32_tic6x_howto_table): Likewise.
2270 * elf32-tilepro.c (tilepro_elf_howto_table): Likewise.
2271 * elf32-v850.c (v850_elf_howto_table): Likewise.
2272 * elf32-vax.c (howto_table): Likewise.
2273 * elf32-visium.c (visium_elf_howto_table): Likewise.
2274 * elf32-xc16x.c (xc16x_elf_howto_table): Likewise.
2275 * elf32-xgate.c (elf_xgate_howto_table): Likewise.
2276 * elf32-xstormy16.c (xstormy16_elf_howto_table): Likewise.
2277 * elf32-xtensa.c (elf_howto_table): Likewise.
2278 * elf64-alpha.c (elf64_alpha_howto_table): Likewise.
2279 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
2280 * elf64-mmix.c (elf_mmix_howto_table): Likewise.
2281 * elf64-ppc.c (ppc64_elf_howto_raw): Likewise.
2282 * elf64-s390.c (elf_howto_table): Likewise.
2283 * elf64-sh64.c (sh_elf64_howto_table): Likewise.
2284 * elf64-x86-64.c (x86_64_elf_howto_table): Likewise.
2285 * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
2286 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise.
2287 (elfNN_aarch64_howto_none): Likewise.
2288 * elfxx-ia64.c (ia64_howto_table): Likewise.
2289 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Likewise.
2290 * elfxx-tilegx.c (tilegx_elf_howto_table): Likewise.
2291 * nlm32-sparc.c (nlm32_sparc_howto_table): Likewise.
2292
6333bc0d
L
22932015-01-15 H.J. Lu <hongjiu.lu@intel.com>
2294
2295 PR ld/17847
2296 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't complain
2297 about -fPIC if the symbol is undefined when building executable.
2298
cd21f5da
NC
22992015-01-15 Nick Clifton <nickc@redhat.com>
2300
2301 PR binutils/17512
2302 * elf-m10300.c (mn10300_info_to_howto): Replace assertion with an
2303 error message. Never return an invalid howto pointer.
2304 * elf32-cr16.c (cr16_info_to_howto): Likewise.
2305 * elf32-crx.c (elf_crx_info_to_howto): Likewise.
2306 * elf32-i370.c (i370_elf_info_to_howto): Likewise.
2307 * elf32-mcore.c (mcore_elf_info_to_howto): Likewise.
2308 * elf32-microblaze.c (microblaze_elf_info_to_howto): Likewise.
2309 * elf32-mips.c (mips_elf32_rtype_to_howto): Likewise.
2310 * elf32-pj.c (pj_elf_info_to_howto): Likewise.
2311 * elf32-ppc.c (ppc_elf_info_to_howto): Likewise.
2312 * elf32-spu.c (spu_elf_info_to_howto): Likewise.
2313 * elf32-v850.c (v850_elf_info_to_howto_rela): Likewise.
2314 * elf32-vax.c (rtype_to_howto): Likewise.
2315 * elf64-alpha.c (elf64_alpha_info_to_howto): Likewise.
2316 * elf64-mips.c (mips_elf64_rtype_to_howto): Likewise.
2317 * elfn32-mips.c (sh_elf_info_to_howto): Likewise.
2318 * elf32-sh.c (sh_elf_info_to_howto): Likewise.
2319 (sh_elf_reloc): Check that the reloc is in range.
2320 * reloc.c (bfd_perform_relocation): Check that the section is big
2321 enough for the entire reloc.
2322 (bfd_generic_get_relocated_section_contents): Report unexpected
2323 return values from perform_reloc.
2324
2d071cfc
NC
23252015-01-15 Nick Clifton <nickc@redhat.com>
2326
2327 * elf32-msp430.c (msp430_elf_relax_section): Skip unhandled
2328 relocs. Include PC-relative adjustment for R_MSP430X_ABS16
2329 relaxation.
2330
ca55926c
AM
23312015-01-15 Alan Modra <amodra@gmail.com>
2332
2333 * elflink.c (_bfd_elf_link_omit_section_dynsym): Return true for
2334 any output section matching a linker created dynobj section.
2335
8539e4e8
AM
23362015-01-15 Alan Modra <amodra@gmail.com>
2337
2338 PR 17842
2339 * elflink.c (elf_link_output_sym): Assert elf_onesymtab set.
2340 (bfd_elf_final_link): Always create a symbol table when emit_relocs.
2341 Don't assign symtab file position unless symbols will be output.
2342 Merge blocks with condition in common. Don't call
2343 elf_backend_output_arch_local_syms or elf_backend_output_arch_syms
2344 unless other symbols are output. Move assignment of symtab_shndx
2345 file position. Localize variable.
2346
52db4ec2
JW
23472015-01-14 Jiong Wang <jiong.wang@arm.com>
2348
2349 * elf32-arm.c (elf32_arm_final_link_relocate): Reject R_ARM_32/_NOI when
2350 trying to defer them to runtime.
2351
0941db69
JW
23522015-01-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2353
2354 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use SYMBOLIC_BIND
2355 to check if a symbol should be bound symbolically.
2356
0172429c
JW
23572015-01-13 Jiong Wang <jiong.wang@arm.com>
2358
2359 * elfnn-aarch64.c: (elfNN_aarch64_howto_table): Enable overflow check
2360 for TLSLE_MOVW_TPREL_G2.
2361
bab91cce
JW
23622015-01-13 Jiong Wang <jiong.wang@arm.com>
2363
2364 PR ld/17415
2365 * elfnn-aarch64.c (elfNN_aarch64_howto_table): Mark
2366 R_AARCH64_TLSLE_ADD_TPREL_HI12 as complain_overflow_unsigned.
2367 * elfxx-aarch64.c (_bfd_aarch64_elf_resolve_relocation): Correct the
2368 bit mask.
2369
3c758495
TG
23702015-01-12 Terry Guo <terry.guo@arm.com>
2371
2372 * elflink.c (_bfd_elf_gc_mark_debug_special_section_group): New
2373 function.
2374 (_bfd_elf_gc_mark_extra_sections): Use it.
2375
9d1d54d5
L
23762015-01-11 H.J. Lu <hongjiu.lu@intel.com>
2377
2378 PR ld/17827
2379 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): For PIE,
2380 only discard space for pc-relative relocs symbols which turn
2381 out to need copy relocs.
2382
c6e8e93a
NC
23832015-01-09 Nick Clifton <nickc@redhat.com>
2384
2385 * tekhex.c (getvalue): Fix thinko in test for correct extraction
2386 of value.
2387 (getsym): Return false if there was not enough data to extract the
2388 symbol.
2389
400cf8cb
AG
23902015-01-09 Anthony Green <green@moxielogic.com>
2391
2392 * elf32-moxie.c (ELF_MACHINE_ALT1): Define.
2393
23d4663e
NC
23942015-01-08 Nick Clifton <nickc@redhat.com>
2395
2396 * elf32-msp430.c (msp430_elf_relax_section): Add relaxation of
2397 16-bit absolute BR instructions to 10-bit pc-relative JMP
2398 instructions.
2399
063bb025
NC
24002015-01-08 Nick Clifton <nickc@redhat.com>
2401
2402 PR binutils/17512
2403 * coffcode.h (coff_slurp_symbol_table): Return false if we failed
2404 to load the line table.
2405 * elf.c (_bfd_elf_map_sections_to_segments): Enforce a minimum
2406 maxpagesize of 1.
2407 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if
2408 the Data Directory Size is too large.
2409
6f25f223
L
24102015-01-06 H.J. Lu <hongjiu.lu@intel.com>
2411
2412 PR binutils/17512
2413 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocation.
2414 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2415
85880250
NC
24162015-01-06 Nick Clifton <nickc@redhat.com>
2417
2418 PR binutils/17512
e7287c7f
NC
2419 * mach-o.c (bfd_mach_o_read_symtab_strtab): Zero terminate the
2420 string table.
2421
ec93045b
NC
2422 * reloc.c (bfd_get_reloc_size): Handle a reloc size of -1.
2423 (bfd_perform_relocation): Include the size of the reloc in the
2424 test for an out of range relocation.
2425 (bfd_generic_get_relocated_section_contents): Remove reloc range
2426 test.
2427
85880250
NC
2428 * coff-i860.c (CALC_ADDEND): Always set an addend value.
2429 * tekhex.c (getvalue): Add an end pointer parameter. Use it to
2430 avoid reading off the end of the buffer.
2431 (getsym): Likewise.
2432 (first_phase): Likewise.
2433 (pass_over): Pass an end pointer to the invoked function.
2434
533d0af0
L
24352015-01-05 H.J. Lu <hongjiu.lu@intel.com>
2436
2437 PR binutils/17512
2438 * elf32-i386.c (elf_i386_get_plt_sym_val): Return NULL on corrupt
2439 input.
2440 * elf64-x86-64.c (elf_x86_64_get_plt_sym_val): Likewise.
2441
896ca098
NC
24422015-01-05 Nick Clifton <nickc@redhat.com>
2443
2444 PR binutils/17512
2445 * archive.c (do_slurp_bsd_armap): Make sure that the parsed sized
2446 is at least big enough for the header to be read.
2447 * elf32-i386.c (elf_i386_get_plt_sym_val): Skip unknown relocs.
2448 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add range checks.
2449 (bfd_mach_o_read_command): Prevetn duplicate error messages about
2450 unrecognized commands.
2451 * syms.c (_bfd_stab_section_find_nearest_line): Add range checks
2452 when indexing into the string table.
2453
b90efa5b 24542015-01-01 Alan Modra <amodra@gmail.com>
ee3b52e9 2455
b90efa5b 2456 Update year range in copyright notice of all files.
ee3b52e9 2457
b90efa5b 2458For older changes see ChangeLog-2014
56882138 2459\f
b90efa5b 2460Copyright (C) 2015 Free Software Foundation, Inc.
752937aa
NC
2461
2462Copying and distribution of this file, with or without modification,
2463are permitted in any medium without royalty provided the copyright
2464notice and this notice are preserved.
2465
56882138
AM
2466Local Variables:
2467mode: change-log
2468left-margin: 8
2469fill-column: 74
2470version-control: never
2471End: