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