8a52ebe7c4d94affdd62dacec9ae3a2cc0caf053
[binutils-gdb.git] / bfd / ChangeLog
1 2014-11-28 Alan Modra <amodra@gmail.com>
2
3 * elf.c (_bfd_elf_slurp_version_tables): Exit loops when vn_next/
4 vna_next/vd_next/vda_next is zero. Correct counts.
5
6 2014-11-27 Nick Clifton <nickc@redhat.com>
7
8 PR binutils/17512
9 * ecoff.c (_bfd_ecoff_slurp_symbol_table): Warn about and correct
10 a discrepancy between the isymMax and ifdMax values in the
11 symbolic header.
12 * elf.c (_bfd_elf_print_private_bfd_data): Fix the range check
13 scanning the external dynamic entries.
14
15 2014-11-26 Nick Clifton <nickc@redhat.com>
16
17 PR binutils/17512
18 * coff-h8300.c (rtype2howto): Replace abort with returning a NULL
19 value.
20 * coff-h8500.c (rtype2howto): Likewise.
21 * coff-tic30.c (rtype2howto): Likewise.
22 * coff-z80.c (rtype2howto): Likewise.
23 * coff-z8k.c (rtype2howto): Likewise.
24 * coff-ia64.c (RTYPE2HOWTO): Always return a valid howto.
25 * coff-m68k.c (m68k_rtype2howto): Return a NULL howto if none
26 could be found.
27 * coff-mcore.c (RTYPE2HOWTO): Add range checking.
28 * coff-w65.c (rtype2howto): Likewise.
29 * coff-we32k.c (RTYPE2HOWTO): Likewise.
30 * pe-mips.c (RTYPE2HOWTO): Likewise.
31 * coff-x86_64.c (coff_amd64_reloc): Likewise. Replace abort with
32 an error return.
33 * coffcode.h (coff_slurp_reloc_table): Allow the rel parameter to
34 be unused.
35 * coffgen.c (make_a_section_from_file): Check the length of a
36 section name before testing to see if it is a debug section name.
37 (coff_object_p): Zero out any uninitialised bytes in the opt
38 header.
39 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Test for the raw
40 source being empty when there are values to be processed.
41 (_bfd_ecoff_slurp_symbol_table): Add range check.
42 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Likewise.
43 (bfd_mach_o_mangle_sections): Move test for too many sections to
44 before the allocation of the section table.
45 (bfd_mach_o_read_symtab_strtab): If the read fails, free the
46 memory and nullify the symbol pointer.
47 * reloc.c (bfd_generic_get_relocated_section_contents): Add
48 handling of a bfd_reloc_notsupported return value.
49 * versados.c (EDATA): Add range checking.
50 (get_record): Likewise.
51 (process_otr): Check for contents being available before updating
52 them.
53 (versados_canonicalize_reloc): Add range check.
54
55 2014-11-26 Alan Modra <amodra@gmail.com>
56
57 * elf.c (_bfd_elf_slurp_version_tables): Delay allocation of
58 internal verref buffer. Error for zero sh_info. Print errors.
59 Check for zero vd_ndx. Use bfd_zalloc for vd_auxptr buffer.
60
61 2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
62
63 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use
64 NAME##_get_symbol_version_string.
65 (bfd_get_symbol_version_string): New.
66 * aout-adobe.c (aout_32_get_symbol_version_string): Define using
67 _bfd_nosymbols define.
68 * aout-target.h (MY_get_symbol_version_string): Likewise.
69 * aout-tic30.c (MY_get_symbol_version_string): Likewise.
70 * binary.c (binary_get_symbol_version_string): Likewise.
71 * bout.c (aout_32_get_symbol_version_string): Likewise.
72 * coff-rs6000.c (_bfd_xcoff_get_symbol_version_string): Likewise.
73 * i386msdos.c (msdos_get_symbol_version_string): Likewise.
74 * i386os9k.c (aout_32_get_symbol_version_string): Likewise.
75 * ieee.c (ieee_get_symbol_version_string): Likewise.
76 * ihex.c (ihex_get_symbol_version_string): Likewise.
77 * libecoff.h (_bfd_ecoff_get_symbol_version_string): Likewise.
78 * mach-o-target.c (bfd_mach_o_get_symbol_version_string): Likewise.
79 * mmo.c (mmo_get_symbol_version_string): Likewise.
80 * nlm-target.h (nlm_get_symbol_version_string): Likewise.
81 * oasys.c (oasys_get_symbol_version_string): Likewise.
82 * pef.c (bfd_pef_get_symbol_version_string): Likewise.
83 * plugin.c (bfd_plugin_get_symbol_version_string): Likewise.
84 * ppcboot.c (ppcboot_get_symbol_version_string): Likewise.
85 * som.c (som_get_symbol_version_string): Likewise.
86 * srec.c (srec_get_symbol_version_string): Likewise.
87 * tekhex.c (tekhex_get_symbol_version_string): Likewise.
88 * versados.c (versados_get_symbol_version_string): Likewise.
89 * vms-alpha.c (alpha_vms_get_symbol_version_string): Likewise.
90 * xsym.c (bfd_sym_get_symbol_version_string): Likewise.
91
92 * coff64-rs6000.c (rs6000_xcoff64_vec): Use
93 coff_get_symbol_version_string.
94 (rs6000_xcoff64_aix_vec): Likewise.
95
96 * elf-bfd.h (bfd_elf_get_symbol_version_string): Renamed to ...
97 (_bfd_elf_get_symbol_version_string): This.
98 * elf.c: Likewise.
99 (bfd_elf_print_symbol): Updated.
100 * elfxx-target.h (bfd_elfNN_get_symbol_version_string): Define.
101
102 * libbfd-in.h (_bfd_nosymbols_get_symbol_version_string): Define.
103 * libcoff-in.h (coff_get_symbol_version_string): Likewise.
104 * bfd-in2.h: Regenerated.
105 * libbfd.h: Likewise.
106 * libcoff.h: Likewise.
107
108 2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
109
110 PR binutils/16496
111 * elf-bfd.h (bfd_elf_get_symbol_version_string): New.
112 * elf.c (bfd_elf_get_symbol_version_string): New. Extracted
113 from bfd_elf_print_symbol.
114 (bfd_elf_print_symbol): Use it.
115
116 2014-11-25 H.J. Lu <hongjiu.lu@intel.com>
117
118 * elf32-i386.c (elf_i386_got_plt_entry): New.
119 (elf_i386_pic_got_plt_entry): Likewise.
120 (elf_i386_link_hash_entry): Add plt_got.
121 (elf_i386_link_hash_table): Likewise.
122 (elf_i386_link_hash_newfunc): Initialize plt_got.offset to -1.
123 (elf_i386_get_local_sym_hash): Likewise.
124 (elf_i386_check_relocs): Create the GOT PLT if there are both
125 PLT and GOT references when the regular PLT is used.
126 (elf_i386_allocate_dynrelocs): Use the GOT PLT if there are
127 both PLT and GOT references unless pointer equality is needed.
128 (elf_i386_relocate_section): Also check the GOT PLT when
129 resolving R_386_PLT32.
130 (elf_i386_finish_dynamic_symbol): Use the GOT PLT if it is
131 available.
132
133 * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add plt_got.
134 (elf_x86_64_link_hash_table): Likewise.
135 (elf_x86_64_link_hash_newfunc): Initialize plt_got.offset to -1.
136 (elf_x86_64_get_local_sym_hash): Likewise.
137 (elf_x86_64_check_relocs): Create the GOT PLT if there are both
138 PLT and GOT references when the regular PLT is used.
139 (elf_x86_64_allocate_dynrelocs): Use the GOT PLT if there are
140 both PLT and GOT references unless pointer equality is needed.
141 (elf_x86_64_relocate_section): Also check the GOT PLT when
142 resolving R_X86_64_PLT32.
143 (elf_x86_64_finish_dynamic_symbol): Use the GOT PLT if it is
144 available.
145
146 2014-11-24 H.J. Lu <hongjiu.lu@intel.com>
147
148 * configure: Regenerated.
149
150 2014-11-24 Tejas Belagod <tejas.belagod@arm.com>
151
152 * elfnn-aarch64.c (elf_aarch64_compare_mapping): New.
153 (erratum_835769_scan): Sort map list.
154
155 2014-11-24 Alan Modra <amodra@gmail.com>
156
157 * elf64-ppc.c (plt_stub_pad): Correct.
158
159 2014-11-23 H.J. Lu <hongjiu.lu@intel.com>
160
161 * elf64-x86-64.c (elf_x86_64_check_relocs): Assert size of
162 elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
163 (elf_x86_64_allocate_dynrelocs): Don't assert size of
164 elf_x86_64_bnd_plt2_entry and elf_x86_64_legacy_plt2_entry.
165
166 2014-11-22 H.J. Lu <hongjiu.lu@intel.com>
167
168 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
169 branch displacement overflow in PLT entry.
170
171 2014-11-21 Nick Clifton <nickc@redhat.com>
172
173 PR binutils/17512
174 * coffgen.c (coff_get_normalized_symtab): Check for an excessive
175 number of auxillary entries.
176 * ieee.c (next_byte): Convert to a function. Return FALSE if the
177 next byte is beyond the end of the buffer.
178 (parse_int): Test the return value of next_byte.
179 (parse_expression): Convert to boolean. Return FALSE if the
180 parsing failed. Test the return value of next_byte.
181 (ieee_seek): Convert to a function. Return FALSE if the seek goes
182 beyond the end of the buffer.
183 (ieee_slurp_external_symbols): Test the return value of ieee_seek
184 and next_byte.
185 (ieee_slurp_sections): Convert to boolean. Return FALSE if the
186 operation failed. Test the return value of ieee_seek and
187 next_byte.
188 (ieee_archive_p): Test the return value of ieee_seek and
189 next_byte.
190 (do_one): Likewise.
191 (ieee_slurp_section_data): Likewise.
192 (ieee_object_p): Likewise. Store the size of the buffer in the
193 total_amt field in the header.
194 * libieee.h (common_header_type): Add amt field.
195 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Check that the
196 reloc's value is within range.
197 (bfd_mach_o_read_symtab_symbols): Nullify the symbols field if the
198 operation fails.
199 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Replace abort with
200 an error message.
201 (pex64_dump_xdata): Check for buffer overflows.
202 * versados.c (process_otr): Check that the section exists before
203 taking its size.
204 (versados_object_p): Make sure that enough data was read for the
205 header to be checked.
206 * vms-alpha.c (vms_get_remaining_object_record): Change
207 read_so_far parameter to an unsigned int. Check that the amount
208 read is in range.
209
210 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
211
212 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Optimize
213 PC-relative offset overflow check.
214
215 2014-11-21 Alexander Cherepanov <cherepan@mccme.ru>
216
217 PR binutils/17512
218 * coffgen.c (_bfd_coff_read_string_table): Test allocation of
219 string table before clearing the first few bytes.
220
221 2014-11-21 Terry Guo <terry.guo@arm.com>
222
223 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support FPv5.
224
225 2014-11-20 Alan Modra <amodra@gmail.com>
226
227 * elf64-ppc.c (group_sections): Init stub14_group_size from
228 --stub-group-size parameter divided by 1024.
229
230 2014-11-20 Alan Modra <amodra@gmail.com>
231
232 * elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
233 alignment calculation.
234
235 2014-11-20 Terry Guo <terry.guo@arm.com>
236
237 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd
238 hasn't attribute section.
239
240 2014-11-20 Alan Modra <amodra@gmail.com>
241
242 * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
243
244 2014-11-18 H.J. Lu <hongjiu.lu@intel.com>
245
246 PR ld/17618
247 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
248 PC-relative offset overflow in PLT entry.
249
250 2014-11-18 Nick Clifton <nickc@redhat.com>
251
252 PR binutils/17512
253 * peXXIgen.c (pe_print_pdata): Fail if the section's virtual size
254 is larger than its real size.
255 (rsrc_print_section): Fix off-by-one error checking for overflow.
256 * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind
257 sections.
258
259 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
260
261 * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
262 for -z bndplt.
263
264 2014-11-14 Nick Clifton <nickc@redhat.com>
265
266 PR binutils/17597
267 * opncls.c (bfd_get_debug_link_info): Avoid reading off the end of
268 the section.
269 (bfd_get_alt_debug_link_info): Likewise.
270
271 2014-11-14 Nick Clifton <nickc@redhat.com>
272
273 PR binutils/17512
274 * ieee.c (ieee_archive_p) Skip processing if no bytes are read at
275 all.
276 (ieee_object_p): Likewise.
277
278 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
279
280 * coffcode.h (coff_slurp_line_table): Add cast to unsigned int.
281
282 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
283
284 * coffcode.h (coff_pointerize_aux_hook): Fix a typo.
285
286 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
287
288 PR gas/17598
289 * elf64-x86-64.c (elf_x86_64_check_relocs): Treat
290 R_X86_64_GOTPLT64 the same as R_X86_64_GOT64.
291 (elf_x86_64_relocate_section): Likewise.
292
293 2014-11-13 Nick Clifton <nickc@redhat.com>
294
295 PR binutils/17512
296 * coffcode.h (coff_ptr_struct): Add is_sym field.
297 (coff_new_section_hook): Set the is_sym field.
298 (coff_pointerize_aux_hook): Check the is_sym field.
299 (coff_print_aux): Likewise.
300 (coff_compute_section_file_positions): Likewise.
301 (coff_write_object_contents): Likewise.
302 (coff_slurp_line_table): Likewise.
303 (coff_slurp_symbol_table): Likewise.
304 (CALC_ADDEND): Likewise.
305 * coffgen.c (coff_renumber_symbols): Likewise.
306 (coff_mangle_symbols): Likewise.
307 (coff_fix_symbol_name): Likewise.
308 (coff_write_symbol): Likewise.
309 (coff_write_alien_symbol): Likewise.
310 (coff_write_native_symbol): Likewise.
311 (coff_write_symbols): Likewise.
312 (coff_write_linenumbers): Likewise.
313 (coff_pointerize_aux): Likewise.
314 (coff_get_normalized_symtab): Likewise.
315 (coff_get_symbol_info): Likewise.
316 (bfd_coff_get_syment): Likewise.
317 (bfd_coff_get_auxent): Likewise.
318 (coff_print_symbol): Likewise.
319 (coff_find_nearest_line_with_names): Likewise.
320 (bfd_coff_set_symbol_class): Likewise.
321 (coff_make_empty_symbol): Set the is_sym field.
322 (coff_bfd_make_debug_symbol): Likewise.
323 * peicode.h (pe_ILF_make_a_symbol): Likewise.
324 * libcoff.h: Regenerate.
325 * libcoff-in.h: Regenerate.
326
327 2014-11-12 Nick Clifton <nickc@redhat.com>
328
329 PR binutils/17512
330 * coffcode.h (coff_slurp_line_table): Set the line number of
331 corrupt entries to -1.
332 (coff_slurp_symbol_table): Alway initialise the value of the
333 symbol.
334 * coffgen.c (coff_print_symbol): Check that the combined pointer
335 is valid.
336 (coff_print_symbol): Do not print negative line numbers.
337 * peXXigen.c (pe_print_idata): Add range checking displaying
338 member names.
339
340 2014-11-12 Alan Modra <amodra@gmail.com>
341
342 PR binutils/17512
343 * coffcode.h (coff_slurp_line_table): Drop line number info
344 not preceded by a valid function entry. Revert last change.
345
346 2014-11-11 Nick Clifton <nickc@redhat.com>
347
348 PR binutils/17512
349 * coffcode.h (coff_slurp_line_table): Initialise the parts of the
350 line number cache that would not be initialised by the copy from
351 the new line number table.
352 (coff_classify_symbol): Allow for _bfd_coff_internal_syment_name
353 returning NULL.
354 * coffgen.c (coff_get_normalized_symbols): Get the external
355 symbols before allocating space for the internal symbols, in case
356 the get fails.
357 * elf.c (_bfd_elf_slurp_version_tables): Only allocate a verref
358 array if one is needed. Likewise with the verdef array.
359 * peXXigen.c (_bfd_XXi_swap_sym_in): Replace abort()'s with error
360 messages.
361 (_bfd_XXi_swap_aux_in): Make sure that all fields of the aux
362 structure are initialised.
363 (pe_print_edata): Avoid reading off the end of the data buffer.
364
365 2014-11-11 Alan Modra <amodra@gmail.com>
366
367 PR binutils/17512
368 * coffcode.h (coff_slurp_line_table): Use updated lineno_count
369 when building func_table.
370
371 2014-11-11 Alan Modra <amodra@gmail.com>
372
373 PR binutils/17512
374 * coffcode.h (coff_slurp_line_table): Don't bfd_zalloc, just
375 memset the particular bits we need. Update src after hitting loop
376 "continue". Don't count lineno omitted due to invalid symbols in
377 nbr_func, and update lineno_count. Init entire terminating
378 lineno. Don't both allocating terminator in n_lineno_cache.
379 Redirect sym->lineno pointer to where n_lineno_cache will be
380 copied, and free n_lineno_cache.
381 * pe-mips.c (NUM_HOWTOS): Typo fix.
382
383 2014-11-11 Alan Modra <amodra@gmail.com>
384
385 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust section
386 size check to account for possible zero terminator.
387
388 2014-11-10 James Cowgill <James.Cowgill@imgtec.com>
389
390 * elfxx-mips.c (_bfd_mips_elf_section_processing): don't force small
391 data sections to be PROGBITS
392
393 2014-11-10 Nick Clifton <nickc@redhat.com>
394
395 PR binutils/17521
396 * coff-i386.c (NUM_HOWTOS): New define.
397 (RTYPE2HOWTO): Use it.
398 (coff_i386_rtype_to_howto): Likewise.
399 (coff_i386_reloc_name_lookup): Likewise.
400 (CALC_ADDEND): Check that reloc r_type field is valid.
401 * coff-x86_64.c (NUM_HOWTOS): New define.
402 (RTYPE2HOWTO): Use it.
403 (coff_amd64_rtype_to_howto): Likewise.
404 (coff_amd64_reloc_name_lookup): Likewise.
405 (CALC_ADDEND): Check that reloc r_type field is valid.
406 * coffcode.h (coff_slurp_line_table): Check for symbol table
407 indexing underflow.
408 (coff_slurp_symbol_table): Use zalloc to ensure that all table
409 entries are initialised.
410 * coffgen.c (_bfd_coff_read_string_table): Initialise unused bits
411 in the string table. Also ensure that the table is 0 terminated.
412 (coff_get_normalized_symtab): Check for symbol table indexing
413 underflow.
414 * opncls.c (bfd_alloc): Catch the case where a small negative size
415 can result in only 1 byte being allocated.
416 (bfd_alloc2): Use bfd_alloc.
417 * pe-mips.c (NUM_HOWTOS): New define.
418 (coff_mips_reloc_name_lookup): Use it.
419 (CALC_ADDEND): Check that reloc r_type field is valid.
420 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Initialise unused entries
421 in the DataDirectory.
422 (pe_print_idata): Avoid reading beyond the end of the data block
423 wen printing strings.
424 (pe_print_edata): Likewise.
425 Check for table indexing underflow.
426 * peicode.h (pe_mkobject): Initialise the pe_opthdr field.
427 (pe_bfd_object_p): Allocate and initialize enough space to hold a
428 PEAOUTHDR, even if the opt_hdr field specified less.
429
430 2014-11-08 Alan Modra <amodra@gmail.com>
431
432 * peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
433
434 2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
435
436 * peXXigen.c (pe_print_idata): Cast to unsigned long in range
437 checks.
438
439 2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
440
441 PR ld/17482
442 * elf64-x86-64.c (elf_x86_64_relocate_section): Update comments
443 for IE->LE transition.
444
445 2014-11-07 Alan Modra <amodra@gmail.com>
446
447 * tekhex.c (tekhex_set_arch_mach): Ignore unknown arch errors.
448
449 2014-11-07 Alan Modra <amodra@gmail.com>
450
451 * tekhex.c (CHUNK_SPAN): Define.
452 (struct data_struct <chunk_init>): Use one byte per span, update
453 all code accessing this field.
454 (find_chunk): Add create param, don't create new entry unless set.
455 (insert_byte): Don't save zeros.
456 (first_phase): Set section SEC_CODE or SEC_DATA flag depending
457 on symbol type. Create an alternate section if both types of
458 symbol are given. Attach type '2' and '6' symbols to absolute
459 section.
460 (move_section_contents): Fix caching of chunk. Don't create chunk
461 when reading, or for writing zeros.
462 (tekhex_set_section_contents): Don't create initial chunks.
463 (tekhex_write_object_contents): Use CHUNK_SPAN.
464
465 2014-11-07 Alan Modra <amodra@gmail.com>
466
467 * aoutx.h (aout_get_external_symbols): Tidy allocation of symbol buffer.
468
469 2014-11-07 Alan Modra <amodra@gmail.com>
470
471 * archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check.
472 * coffcode.h (coff_set_alignment_hook): Likewise.
473 (coff_slurp_line_table): Likewise.
474 * coffgen.c (coff_get_normalized_symtab): Likewise.
475 (_bfd_coff_get_external_symbols): Likewise.
476 * elf.c (bfd_elf_get_str_section): Likewise.
477 * tekhex.c (first_phase): Likewise.
478
479 2014-11-06 Nick Clifton <nickc@redhat.com>
480
481 * aoutx.h (slurp_symbol_table): Revert previous delta.
482 (slurp_reloc_table): Likewise.
483 * compress.c (bfd_get_full_section_contents): Remove file size
484 test.
485 * coffgen.c (coff_get_normalized_symtab): Allow zero-sized symtabs
486 and do not complain about linker generated files.
487
488 2014-11-06 Will Newton <will.newton@linaro.org>
489
490 * elf-attrs.c (_bfd_elf_parse_attributes): Handle zero
491 length sections and sub-sections.
492
493 2014-11-04 Nick Clifton <nickc@redhat.com>
494
495 PR binutils/17512
496 * coffcode.h (handle_COMDAT): Replace abort with BFD_ASSERT.
497 Replace another abort with an error message.
498 (coff_slurp_line_table): Add more range checking.
499 * peXXigen.c (pe_print_debugdata): Add range checking.
500
501 2014-11-05 James Cowgill <james.cowgill@imgtec.com>
502
503 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault
504 when creating a dso with discarded dynsym section.
505
506 2014-11-05 Matthew Fortune <matthew.fortune@imgtec.com>
507
508 * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
509 and E_MIPS_ARCH_64R6 support.
510
511 2014-11-05 Nick Clifton <nickc@redhat.com>
512
513 PR binutils/17512
514 * coffcode.h (coff_set_alignment_hook): Warn if the file lies
515 about the number of relocations it contains.
516 (coff_sort_func_alent): Return 0 if the pointers are NULL.
517 (coff_slurp_line_table): Add more range checks. Do not free new
518 tables created when sorting line numbers.
519 * peXXigen.c (pe_print_idata): Add range checks.
520 (pe_print_edata): Likewise.
521 (rsrc_print_resource_entries): Likewise. Avoid printing control
522 characters. Terminate priniting if corruption is detected.
523 (rsrc_print_resource_directory): Terminate printing if an unknown
524 directory type is encountered.
525 (pe_print_debugdata): Fix off-by-one error.
526 (rsrc_count_entries): Add range checking.
527 (rsrc_parse_entry): Likewise.
528
529 2014-11-04 Nick Clifton <nickc@redhat.com>
530
531 PR binutils/17512
532 * compress.c (bfd_get_full_section_contents): Improve test for
533 linker created objects.
534
535 PR binutils/17533
536 * archive.c (_bfd_slurp_extended_name_table): Handle archives with
537 corrupt extended name tables.
538
539 2014-11-04 Alan Modra <amodra@gmail.com>
540
541 * elf32-spu.c (ovl_mgr_stat): New function.
542 (spu_elf_open_builtin_lib): Pass to bfd_openr_iovec.
543
544 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
545
546 * elf32-avr.c (elf32_avr_relax_delete_bytes): During linker
547 relaxation, reduce the size of symbols that span the deleted
548 bytes.
549
550 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
551
552 * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols
553 located at the very end of the section.
554
555 2014-11-03 Nick Clifton <nickc@redhat.com>
556
557 PR binutils/17512
558 * aoutx.h (slurp_symbol_table): Check that computed table size is
559 not bigger than the file from which is it being read.
560 (slurp_reloc_table): Likewise.
561 * coffcode.h (coff_slurp_line_table): Remove unneeded local
562 'warned'. Do not try to print the details of a symbol with an
563 invalid index.
564 * coffgen.c (make_a_sectiobn_from_file): Check computed string
565 index against length of string table.
566 (bfd_coff_internal_syment_name): Check read in string offset
567 against length of string table.
568 (build_debug_section): Return a pointer to the section used.
569 (_bfd_coff_read_string_table): Store the length of the string
570 table in the coff_tdata structure.
571 (bfd_coff_free_symbols): Set the length of the string table to
572 zero when it is freed.
573 (coff_get_normalized_symtab): Check offsets against string table
574 or data table lengths as appropriate.
575 * cofflink.c (_bfd_coff_link_input_bfd): Check offset against
576 length of string table.
577 * compress.c (bfd_get_full_section_contents): Check computed size
578 against the size of the file.
579 * libcoff-in.h (obj_coff_strings_len): Define.
580 (struct coff_tdata): Add strings_len field.
581 * libcoff.h: Regenerate.
582 * peXXigen.c (pe_print_debugdata): Do not attempt to print the
583 data if the debug section is too small.
584 * xcofflink.c (xcoff_link_input_bfd): Check offset against
585 length of string table.
586
587 2014-11-03 Nick Clifton <nickc@redhat.com>
588
589 * po/fi.po: Updated Finnish translation.
590
591 2014-10-31 Andrew Pinski <apinski@cavium.com>
592 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
593
594 * archures.c: Add octeon3 for mips target.
595 * bfd-in2.h: Regenerate.
596 * bfd/cpu-mips.c: Define I_mipsocteon3.
597 nfo_struct): Add octeon3 support.
598 * bfd/elfxx-mips.c: (_bfd_elf_mips_mach): Add support for
599 octeon3.
600 (mips_set_isa_flags): Add support for octeon3.
601 (bfd_mips_isa_ext): Add bfd_mach_mips_octeon3.
602 (mips_mach_extensions): Make bfd_mach_mips_octeon3 an
603 extension of bfd_mach_mips_octeon2.
604 (print_mips_isa_ext): Print the value of Octeon3.
605
606 2014-10-31 Nick Clifton <nickc@redhat.com>
607
608 PR binutils/17512
609 * coffgen.c (_bfd_coff_get_external_symbols): Do not try to load a
610 symbol table bigger than the file.
611 * elf.c (bfd_elf_get_str_section): Do not try to load a string
612 table bigger than the file.
613 * tekhex.c (first_phase): Check that the section range is sane.
614
615 2014-10-30 Nick Clifton <nickc@redhat.com>
616
617 PR binutils/17512
618 * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
619 * coffgen.c (coff_get_normalized_symtab): Prevent buffer overrun.
620
621 2014-10-29 Nick Clifton <nickc@redhat.com>
622
623 * elf.c (bfd_section_from_shdr): Fix heap use after free memory
624 leak.
625
626 2014-10-29 Dennis Brueni <dbrueni@slickedit.com>
627
628 * elf.c (elfcore_write_lwpstatus): Fix typo in call to memcpy.
629
630 2014-10-28 Nick Clifton <nickc@redhat.com>
631
632 PR binutils/17512
633 * elf.c (bfd_section_from_shdr): Allocate and free the recursion
634 detection table on a per-bfd basis.
635 * peXXigen.c (pe_print_edata): Handle binaries with a truncated
636 export table.
637
638 2014-10-28 Andreas Schwab <schwab@suse.de>
639 Nick Clifton <nickc@redhat.com>
640
641 PR binutils/17510
642 * srec.c (srec_bad_byte): Increase size of buf to allow for
643 negative values.
644 (srec_scan): Use an unsigned char buffer to hold header bytes.
645
646 2014-10-27 Nick Clifton <nickc@redhat.com>
647
648 PR binutils/17512
649 * elf.c (bfd_section_from_shdr): Detect and warn about ELF
650 binaries with a group of sections linked by the string table
651 indicies.
652 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
653 with an invalid value for NumberOfRvaAndSizes.
654 (pe_print_edata): Detect out of range rvas and entry counts for
655 the Export Address table, Name Pointer table and Ordinal table.
656
657 PR binutils/17510
658 * elf.c (setup_group): Improve handling of corrupt group
659 sections.
660
661 2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
662
663 * bfd-in.h (bfd_elf64_aarch64_set_options): Add a parameter.
664 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
665 * elfnn-aarch64.c (aarch64_erratum_835769_stub): New.
666 (elf_aarch64_stub_type): Add new type
667 aarch64_stub_erratum_835769_veneer.
668 (elf_aarch64_stub_hash_entry): New fields for erratum 835769.
669 (aarch64_erratum_835769_fix): New data struct to record erratum
670 835769.
671 (elf_aarch64_link_hash_table: Global flags for 835769.
672 (aarch64_build_one_stub): Add case for 835769.
673 (aarch64_size_one_stub): Likewise.
674 (aarch64_mem_op_p, aarch64_mlxl_p,
675 aarch64_erratum_sequence,erratum_835769_scan):
676 New. Decode and scan functions for erratum 835769.
677 (elf_aarch64_create_or_find_stub_sec): New.
678 (elfNN_aarch64_size_stubs): Look for erratum 835769 and record
679 them.
680 (bfd_elfNN_aarch64_set_options: Set global flag for 835769.
681 (erratum_835769_branch_to_stub_data,
682 make_branch_to_erratum_835769_stub):New. Connect up all the
683 erratum stubs to occurances by branches.
684 (elfNN_aarch64_write_section): New hook.
685 (aarch64_map_one_stub): Output erratum stub symbol.
686 (elfNN_aarch64_size_dynamic_sections): Init mapping symbol
687 information for erratum 835769.
688 (elf_backend_write_section): Define.
689
690 2014-10-23 Victor Kamensky <victor.kamensky@linaro.org>
691
692 * elf32-arm.c (read_code32): New function to read 32 bit
693 arm instruction.
694 (read_code16): New function to read 16 bit thumb instrution.
695 (elf32_arm_plt0_size, elf32_arm_plt_size): Use read_code32
696 and read_code16 to read instructions.
697
698 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
699
700 * elfxx-mips.c (print_mips_ases): Print unknown ASEs.
701 (print_mips_isa_ext): Print the value of an unknown extension.
702
703 2014-10-21 Alan Modra <amodra@gmail.com>
704
705 * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
706 entries that aren't a multiple of 8 rather than failing assertion.
707
708 2014-10-21 Alan Modra <amodra@gmail.com>
709
710 * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
711 to thread_starter.
712
713 2014-10-18 Alan Modra <amodra@gmail.com>
714
715 * elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
716 section for function symbols defined in .opd is discarded, let
717 the symbol appear to be undefined.
718 (opd_entry_value): Ensure the result section is that for the
719 function code section in the same object as the OPD entry.
720
721 2014-10-16 Alan Modra <amodra@gmail.com>
722
723 PR 17492
724 * elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
725 on ELF output bfd.
726 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
727 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
728 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
729 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
730 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
731 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
732 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
733 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
734 * elf-s390-common.c (elf_s390_add_symbol_hook): Likewise. Handle
735 STB_GNU_UNIQUE too.
736
737 2014-10-16 Alan Modra <amodra@gmail.com>
738
739 * elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing
740 even when output is not ppc64 ELF. Remove redundant tests on
741 type of input bfd.
742
743 2014-10-15 Alan Modra <amodra@gmail.com>
744
745 PR 17481
746 * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr"
747 param, group "section" and "offset" params. Zero discriminator.
748 * bfd.c (bfd_find_nearest_line): Implement with new
749 _bfd_find_nearest_line.
750 (bfd_find_nearest_line_discriminator): Likewise.
751 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't
752 define.
753 * coff-rs6000.c (xcoff_find_nearest_line,
754 xcoff_find_nearest_line_discriminator): Delete.
755 (_bfd_xcoff_find_nearest_line): Don't define.
756 (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line.
757 * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't
758 define.
759 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust.
760 * coffgen.c (coff_find_nearest_line_with_names): Reorder params,
761 adjust _bfd_dwarf2_find_nearest_line call.
762 (coff_find_nearest_line): Add "discriminator_ptr" param, reorder
763 others. Set discriminator. Adjust call.
764 (coff_find_nearest_line_discriminator): Delete.
765 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params.
766 * dwarf2.c (find_line): Rename to..
767 (_bfd_dwarf2_find_nearest_line): ..this, reordering params.
768 Simplify setting of do_line. Delete old function.
769 (_bfd_dwarf2_find_line): Delete.
770 * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add
771 discriminator_ptr and set it.
772 * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype.
773 (_bfd_elf_find_nearest_line_discriminator): Delete.
774 (_bfd_elf_find_line_discriminator): Delete.
775 (_bfd_generic_find_nearest_line_discriminator): Don't define.
776 * elf.c (elf_find_function): Reorder params.
777 (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr.
778 Adjust calls.
779 (_bfd_elf_find_nearest_line_discriminator): Delete.
780 (_bfd_elf_find_line): Adjust call.
781 * elf32-arm.c (arm_elf_find_function): Reorder params.
782 (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr.
783 Adjust calls.
784 * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly.
785 * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params.
786 (elfNN_aarch64_find_nearest_line): Reorder params, add
787 discriminator_ptr. Adjust calls.
788 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.
789 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype.
790 * libaout.h (NAME (aout, find_nearest_line)): Update prototype.
791 * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update.
792 (_bfd_dwarf1_find_nearest_line): Likewise.
793 (_bfd_dwarf2_find_nearest_line): Likewise.
794 (_bfd_dwarf2_find_line): Delete.
795 (_bfd_generic_find_nearest_line_discriminator): Delete.
796 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete.
797 * libcoff-in.h (coff_find_nearest_line): Update prototype.
798 (coff_find_nearest_line_discriminator): Delete.
799 (coff_find_nearest_line_with_names): Update prototype.
800 * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype.
801 * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add
802 discriminator_ptr. Adjust calls.
803 * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype.
804 * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add
805 discriminator_ptr and set.
806 * som.c (som_find_nearest_line): Similarly.
807 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for
808 _bfd_find_nearest_line_discriminator.
809 (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype.
810 (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete.
811 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to..
812 (_bfd_vms_find_nearest_line): ..this. Reorder params, add
813 "discriminator" and set.
814 (_bfd_vms_find_nearest_line_discriminator): Delete.
815 (_bfd_generic_find_nearest_line_discriminator): Don't define.
816 (alpha_vms_find_nearest_line): Update define.
817 * bfd-in2.h: Regenerate.
818 * libbfd.h: Regenerate.
819 * libcoff.h: Regenerate.
820
821 2014-10-15 Alan Modra <amodra@gmail.com>
822
823 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line.
824 * aout-adobe.c (aout_32_find_line): Define.
825 (aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup,
826 aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define.
827 * aout-target.h (MY_find_line): Define.
828 * aout-tic30.c (MY_find_line): Define.
829 * binary.c (binary_find_line): Define.
830 * bout.c (aout_32_find_line): Define.
831 * coff-rs6000.c (_bfd_xcoff_find_line): Define.
832 * coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line.
833 (rs6000_xcoff64_aix_vec): Likewise.
834 * elf-bfd.h (_bfd_generic_find_line): Don't define.
835 * elfxx-target.h (bfd_elfNN_find_line): Define.
836 * i386msdos.c (msdos_find_line): Define.
837 * i386os9k.c (aout_32_find_line): Define.
838 * ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func.
839 (ieee_find_nearest_line, ieee_find_line,
840 ieee_find_inliner_info): Define.
841 * ihex.c (ihex_find_line): Define.
842 * libbfd-in.h (_bfd_nosymbols_find_line): Define.
843 (_bfd_generic_find_line): Don't define.
844 * libbfd.c (_bfd_generic_find_line): Delete.
845 * libcoff-in.h (coff_find_line): Define.
846 * libecoff.h (_bfd_ecoff_find_line): Define.
847 * mach-o.h (bfd_mach_o_find_line): Define.
848 * mmo.c (mmo_find_line): Define.
849 * nlm-target.h (nlm_find_line): Define.
850 * oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete.
851 (oasys_find_nearest_line, oasys_find_line,
852 oasys_find_inliner_info): Define.
853 * pef.c (bfd_pef_find_line): Define.
854 * plugin.c (bfd_plugin_find_line): Define.
855 * ppcboot.c (ppcboot_find_line): Define.
856 * som.c (som_find_line): Define.
857 * srec.c (srec_find_line): Define.
858 * tekhex.c (tekhex_find_line): Define.
859 * versados.c (versados_find_line): Define.
860 * vms-alpha.c (alpha_vms_find_line): Define.
861 * xsym.c (bfd_sym_find_line): Define.
862 * bfd-in2.h: Regenerate.
863 * libbfd.h: Regenerate.
864 * libcoff.h: Regenerate.
865
866 2014-10-15 Tristan Gingold <gingold@adacore.com>
867
868 * version.m4: Bump version to 2.25.51
869 * configure: Regenerate.
870
871 2014-10-14 H.J. Lu <hongjiu.lu@intel.com>
872
873 * elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
874 offset is less than 2.
875 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
876
877 2014-10-14 Alan Modra <amodra@gmail.com>
878
879 PR 17453
880 * libbfd.c (COERCE16, COERCE32, COERCE64): Use unsigned types.
881 (EIGHT_GAZILLION): Delete.
882
883 2014-10-13 Alan Modra <amodra@gmail.com>
884
885 PR 17467
886 * elf-eh-frame.c (ENSURE_NO_RELOCS): Don't stop at first NONE reloc.
887 (_bfd_elf_parse_eh_frame): When relocatable output, don't set
888 flags enabling conversion of CIEs and FDEs to use relative encoding.
889 (find_merged_cie): Similarly.
890 (_bfd_elf_write_section_eh_frame): Don't edit FDEs when
891 relocatable, except for CIE pointer.
892 * elflink.c (bfd_elf_reloc_symbol_deleted_p): Return true for
893 relocs against symbols in dropped comdat group sections.
894 (bfd_elf_discard_info): Do some eh_frame optimisation when
895 relocatable.
896
897 2014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
898
899 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Handle
900 the hwcaps2 object attribute.
901
902 2014-10-04 Alan Modra <amodra@gmail.com>
903
904 PR 17447
905 * elf-bfd.h (struct eh_cie_fde): Comment re NULL u.fde.cie_inf.
906 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Mark zero address
907 range FDEs for discarding.
908 (vma_compare): Sort on range after address.
909 (_bfd_elf_gc_mark_fdes): Test for NULL u.fde.cie_inf.
910 (_bfd_elf_discard_section_eh_frame): Likewise. Write "FDE" in
911 error message rather than "fde".
912 (_bfd_elf_write_section_eh_frame_hdr): Write "PC" and "FDE" in
913 error message.
914
915 2014-09-29 H.J. Lu <hongjiu.lu@intel.com>
916
917 PR ld/17440
918 * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build
919 for OLD_FREEBSD_ABI_LABEL.
920
921 2014-09-24 Markus Trippelsdorf <markus@trippelsdorf.de>
922
923 PR 17422
924 * plugin.c (try_claim): New function. Moved from
925 bfd_plugin_object_p.
926 (try_load_plugin): Pass through bfd. Add test.
927 (load_plugin): Pass through bfd.
928 (bfd_plugin_object_p): Move logic to try_claim.
929
930 2014-09-23 Sterling Augustine <augustine.sterling@gmail.com>
931
932 * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section
933 call relaxation use furthermost addresses where call source and
934 destination can be to check whether it's in the range of a direct
935 call.
936
937 2014-09-22 Alan Modra <amodra@gmail.com>
938
939 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Don't return
940 false for overflow or overlapping FDEs. Give more detail in
941 error messages.
942
943 2014-09-22 Andrew Bennett <andrew.bennett@imgtec.com>
944
945 * elfxx-mips.c (mips_elf_calculate_relocation): Don't sign extend
946 the addend if relocations are RELA.
947
948 2014-09-22 Kuan-Lin Chen <kuanlinchentw@gmail.com>
949
950 * elf32-nds32.c (nds32_elf_ex9_build_hash_table,
951 nds32_elf_ex9_relocation_check): Synchronize the argument type.
952
953 2014-09-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
954
955 * elf32-s390.c: Don't replace R_390_TLS_LE32 with R_390_TLS_TPOFF
956 for PIE.
957 * elf64-s390.c: Don't replace R_390_TLS_LE64 with R_390_TLS_TPOFF
958 for PIE.
959
960 2014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>
961
962 PR gdb/17407
963 * elfcode.h (bfd_from_remote_memory): Use SIZE for HIGH_OFFSET.
964
965 2014-09-16 Terry Guo <terry.guo@arm.com>
966
967 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Return false if
968 failed to merge.
969
970 2014-09-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
971
972 * bfd-in2.h: Regenerate.
973 * elf32-nds32.c (nds32_elf_mkobject): Hook bfd_elf32_mkobject.
974 (nds32_elf_relax_section): Code refactoring.
975 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2,
976 nds32_elf_relax_longcall3, nds32_elf_relax_longcall4,
977 nds32_elf_relax_longcall5, nds32_elf_relax_longcall6): Relax call
978 pattern. The first three is moved from nds32_elf_relax_section,
979 and the last three is new function.
980 (nds32_elf_relax_longjump1, nds32_elf_relax_longjump2,
981 nds32_elf_relax_longjump3, nds32_elf_relax_longjump4,
982 nds32_elf_relax_longjump5, nds32_elf_relax_longjump6,
983 nds32_elf_relax_longjump7): Relax condition branch pattern. The first
984 three is moved from nds32_elf_relax_section, and the last four
985 is new function.
986 (nds32_elf_relax_loadstore, nds32_elf_relax_lo12): Relax load-store
987 pattern and address setting pattern.
988 (nds32_elf_relax_piclo12, nds32_elf_relax_ptr,
989 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff,
990 nds32_elf_relax_gotoff_suff): Relax pic pattern.
991 (nds32_elf_relax_letlslo12, nds32_elf_relax_letlsadd,
992 nds32_elf_relax_letlsls): Relax TLS pattern.
993 (nds32_relax_adjust_label): Adjust alignment and nop.
994 (nds32_elf_pick_relax): Choose relaxation optimization.
995 (nds32_elf_get_relocated_section_contents): New hook.
996 (nds32_elf_order_insn_times, nds32_elf_ex9_build_itable): Release ex9
997 table 234th entry.
998 * elf32-nds32.h: Declare.
999 * libbfd.h: Regenerate.
1000 * reloc.c: Add nds32 new relocations.
1001
1002 2014-09-15 Chen Gang <gang.chen.5i5j@gmail.com>
1003
1004 * dwarf2.c (find_abstract_instance_name): Use 'form' instead of
1005 'name' for the typo issue, which related with commit
1006 60d77146a249ae9b51d7ce98930cdbedb2cfa352.
1007
1008 2014-09-15 Andrew Bennett <andrew.bennett@imgtec.com>
1009 Matthew Fortune <matthew.fortune@imgtec.com>
1010
1011 * aoutx.h (NAME (aout, machine_type)): Add mips32r6 and mips64r6.
1012 * archures.c (bfd_architecture): Likewise.
1013 * bfd-in2.h (bfd_architecture): Likewise.
1014 (bfd_reloc_code_real): Add relocs BFD_RELOC_MIPS_21_PCREL_S2,
1015 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
1016 BFD_RELOC_MIPS_19_PCREL_S2.
1017 * cpu-mips.c (arch_info_struct): Add mips32r6 and mips64r6.
1018 * elf32-mips.c: Define relocs R_MIPS_PC21_S2, R_MIPS_PC26_S2
1019 R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
1020 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
1021 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
1022 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
1023 BFD_RELOC_LO16_PCREL.
1024 * elf64-mips.c: Define REL, and RELA relocations R_MIPS_PC21_S2,
1025 R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16
1026 and R_MIPS_PCLO16.
1027 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
1028 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
1029 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
1030 BFD_RELOC_LO16_PCREL.
1031 * elfn32-mips.c: Likewise.
1032 * elfxx-mips.c (MIPSR6_P): New define.
1033 (mipsr6_exec_plt_entry): New array.
1034 (hi16_reloc_p): Add support for R_MIPS_PCHI16.
1035 (lo16_reloc_p): Add support for R_MIPS_PCLO16.
1036 (aligned_pcrel_reloc_p): New function.
1037 (mips_elf_relocation_needs_la25_stub): Add support for relocs:
1038 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
1039 (mips_elf_calculate_relocation): Add support for relocs:
1040 R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2,
1041 R_MIPS_PCHI16 and R_MIPS_PCLO16.
1042 (_bfd_elf_mips_mach): Add support for mips32r6 and mips64r6.
1043 (mips_elf_add_lo16_rel_addend): Add support for R_MIPS_PCHI16.
1044 (_bfd_mips_elf_check_relocs): Add support for relocs:
1045 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
1046 (_bfd_mips_elf_relocate_section): Add a check for unaligned
1047 pc relative relocs.
1048 (_bfd_mips_elf_finish_dynamic_symbol): Add support for MIPS r6
1049 plt entry.
1050 (mips_set_isa_flags): Add support for mips32r6 and mips64r6.
1051 (_bfd_mips_elf_print_private_bfd_data): Likewise.
1052 (mips_32bit_flags_p): Add support for mips32r6.
1053 * libbfd.h (bfd_reloc_code_real_names): Add entries for
1054 BFD_RELOC_MIPS_21_PCREL_S2, BFD_RELOC_MIPS_26_PCREL_S2,
1055 BFD_RELOC_MIPS_18_PCREL_S3 and BFD_RELOC_MIPS_19_PCREL_S2.
1056 * reloc.c: Document relocs BFD_RELOC_MIPS_21_PCREL_S2,
1057 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
1058 BFD_RELOC_MIPS_19_PCREL_S2.
1059 * config.bfd: Add mips*-img-elf* target triple.
1060
1061 2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
1062
1063 * config.bfd: Add mips*-img-elf* target triple.
1064
1065 2014-09-12 Alan Modra <amodra@gmail.com>
1066
1067 * elf-bfd.h (struct eh_frame_array_ent): Add "range".
1068 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Stash address
1069 range of FDEs to hdr_info->array.
1070 (_bfd_elf_write_section_eh_frame_hdr): Report overflow in
1071 .eh_frame_hdr entries, and overlapping FDEs.
1072
1073 2014-09-10 Alan Modra <amodra@gmail.com>
1074
1075 * elf.c (assign_file_positions_except_relocs): Move section header
1076 placement to..
1077 (_bfd_elf_assign_file_positions_for_relocs): ..here. Make static.
1078 * elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
1079 * elflink.c (bfd_elf_final_link): Don't call above function.
1080
1081 2014-08-30 Alan Modra <amodra@gmail.com>
1082
1083 * elf32-ppc.c (ppc_elf_relax_section): Fix off by one error.
1084
1085 2014-08-29 Alan Modra <amodra@gmail.com>
1086
1087 * elf64-ppc.c (ppc64_elf_relocate_section): Report a different
1088 error for calls via a toc adjusting stub without a nop.
1089
1090 2014-08-29 Alan Modra <amodra@gmail.com>
1091
1092 * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
1093 error. Remove redundant bfd_set_error.
1094
1095 2014-08-29 Alan Modra <amodra@gmail.com>
1096
1097 * srec.c (srec_scan): Revert last change. Report an error for
1098 S-records with less than the miniumum byte count.
1099
1100 2014-08-28 H.J. Lu <hongjiu.lu@intel.com>
1101
1102 * srec.c (srec_scan): Return error for 0 size.
1103
1104 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
1105
1106 PR ld/17306
1107 * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
1108 to check discarded input section.
1109 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
1110
1111 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
1112
1113 PR ld/17313
1114 * elflink.c (elf_link_add_object_symbols): Don't attach dynamic
1115 sections to input from ld --just-symbols.
1116
1117 2014-08-26 DJ Delorie <dj@redhat.com>
1118
1119 * elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for
1120 relaxation type.
1121
1122 2014-08-26 Jiong Wang <jiong.wang@arm.com>
1123
1124 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Initialize non_got_ref
1125 properly for MOVW_G0/1/2_NC and MOVW_G3. Reject them when linking
1126 shared library.
1127 (elfNN_aarch64_gc_sweep_hook): Add check on these relocs.
1128
1129 2014-08-26 Nick Clifton <nickc@redhat.com>
1130
1131 * config.bfd: Fix typo in or1knd selection.
1132
1133 2014-08-22 Kai Tietz <ktietz@redhat.com>
1134
1135 PR binutils/11822
1136 * coffcode.h (coff_compute_section_file_positions): Keep
1137 FileAlignment valid as set.
1138
1139 2014-08-22 Alan Modra <amodra@gmail.com>
1140
1141 * elf-eh-frame.c (struct cie): Delete "output_sec" field.
1142 (cie_eq, cie_compute_hash): Use output_section from cie_inf instead.
1143
1144 2014-08-22 Alan Modra <amodra@gmail.com>
1145
1146 * elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and
1147 parsed_eh_frames.
1148 (_bfd_elf_begin_eh_frame_parsing): Delete.
1149 (_bfd_elf_end_eh_frame_parsing): Delete.
1150 * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete.
1151 (_bfd_elf_end_eh_frame_parsing): Delete.
1152 (_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame. Test
1153 !info->relocatable in place of merge_cies.
1154 * elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust.
1155 * elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8.
1156 (ppc64_elf_size_stubs): Likewise pad stub FDE.
1157 (ppc64_elf_build_stubs): Move code setting glink .eh_frame to..
1158 (ppc64_elf_size_stubs): ..here and..
1159 (ppc64_elf_finish_dynamic_sections): ..here.
1160
1161 2014-08-21 Maciej W. Rozycki <macro@codesourcery.com>
1162
1163 * elf64-ppc.h (ppc64_elf_set_toc): Fix indentation.
1164
1165 2014-08-21 Tony Wang <tony.wang@arm.com>
1166
1167 * elf32-arm.c (elf32_arm_final_link_relocate): Implement
1168 the veneer routine for R_ARM_THM_JUMP19.
1169 (arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19
1170 (elf32_arm_size_stub): Ditto.
1171
1172 2014-08-20 Roland McGrath <mcgrathr@google.com>
1173
1174 PR ld/17277
1175 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
1176 all reloc types with pc_relative set in the howto, not just for
1177 R_ARM_REL32 and R_ARM_REL32_NOI.
1178 (allocate_dynrelocs_for_symbol): Update comment.
1179 (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
1180 set in the howto, set call_reloc_p and may_need_local_target_p but
1181 not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
1182 (elf32_arm_check_relocs): Likewise.
1183
1184 2014-08-20 Will Newton <will.newton@linaro.org>
1185
1186 * config.bfd: Default armeb-*-eabi* to big endian.
1187
1188 2014-08-19 Alan Modra <amodra@gmail.com>
1189
1190 * configure: Regenerate.
1191
1192 2014-08-18 Alan Modra <amodra@gmail.com>
1193
1194 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
1195 use dynrelocs for ifunc.
1196 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
1197
1198 2014-08-18 Alan Modra <amodra@gmail.com>
1199
1200 PR 17287
1201 * elflink.c (on_needed_list): Only consider libraries that have
1202 been loaded.
1203
1204 2014-08-18 Alan Modra <amodra@gmail.com>
1205
1206 * elflink.c (bfd_elf_discard_info): Return int error status.
1207 * stabs.c (_bfd_discard_section_stabs): Comment typo fix.
1208 * bfd-in.h (bfd_elf_discard_info): Updata prototype.
1209 * bfd-in2.h: Regenerate.
1210
1211 2014-08-14 Alan Modra <amodra@gmail.com>
1212
1213 * peXXigen.c (pe_print_reloc): Protect against access past end
1214 of .reloc section.
1215
1216 2014-08-14 Alan Modra <amodra@gmail.com>
1217
1218 PR 16563
1219 * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
1220 in the order they are mapped to output sections.
1221
1222 2014-08-14 Alan Modra <amodra@gmail.com>
1223
1224 * configure.ac: Delete redundant plugin related checks.
1225 * configure: Regenerate.
1226
1227 2014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
1228
1229 * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
1230 allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
1231 and SYMBOLIC_BIND.
1232
1233 2014-08-12 Alan Modra <amodra@gmail.com>
1234
1235 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
1236 here when not calling the generic add_symbol function. Formatting.
1237 Correct handling of indirect symbols. Update notice call.
1238 * elflink.c (_bfd_elf_notice_as_needed): Update notice call.
1239 * linker.c (_bfd_generic_link_add_one_symbol): Create indirect
1240 symbols early. Update notice call. Add comments regarding weak
1241 symbols vs. indirect.
1242
1243 2014-08-12 Alan Modra <amodra@gmail.com>
1244
1245 PR ld/16746
1246 * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle
1247 !lto_plugin_active.
1248
1249 2014-08-07 Chen Gang <gang.chen.5i5j@gmail.com>
1250
1251 * coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
1252 zero terminated.
1253
1254 2014-08-07 H.J. Lu <hongjiu.lu@intel.com>
1255 Alan Modra <amodra@gmail.com>
1256
1257 PR ld/16746
1258 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
1259 warning for references in LTO IR to warning symbols.
1260
1261 2014-08-07 Alan Modra <amodra@gmail.com>
1262
1263 * linker.c (WARN, CWARN): Collapse these states to WARN.
1264 (_bfd_generic_link_add_one_symbol): Use old CWARN case for
1265 new WARN.
1266
1267 2014-08-05 Doug Evans <dje@google.com>
1268
1269 * bfd-in2.h: Regenerate.
1270 * libcoff.h: Regenerate.
1271
1272 2014-08-05 Maciej W. Rozycki <macro@codesourcery.com>
1273
1274 * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
1275 rawsize if changing size.
1276
1277 2014-08-05 Alan Modra <amodra@gmail.com>
1278
1279 PR ld/17226
1280 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
1281
1282 2014-08-05 Alan Modra <amodra@gmail.com>
1283
1284 * linker.c (generic_link_check_archive_element): Move handling
1285 of command link -u symbols with a common symbol def to the
1286 code handling non-common symbols so that archive element symbols
1287 are loaded. Use generic_link_add_object_symbols.
1288
1289 2014-08-05 Alan Modra <amodra@gmail.com>
1290
1291 PR 13557
1292 * linker.c (struct archive_list, struct archive_hash_entry,
1293 struct archive_hash_table, archive_hash_newfunc,
1294 archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
1295 archive_hash_table_free): Delete.
1296 (_bfd_generic_link_add_archive_symbols): Add h and name params to
1297 checkfn. Rewrite using a straight-forward scan over archive map.
1298 (generic_link_check_archive_element_no_collect,
1299 generic_link_check_archive_element_collect,
1300 generic_link_check_archive_element): Add h and name params.
1301 * aoutx.h (aout_link_check_archive_element): Likewise.
1302 * pdp11.c (aout_link_check_archive_element): Likewise.
1303 * xcofflink.c (xcoff_link_check_archive_element): Likewise.
1304 * cofflink.c (coff_link_check_archive_element): Likewise. Don't
1305 scan symbols, simply add archive element whenever h is undefined.
1306 (coff_link_check_ar_symbols): Delete.
1307 * ecoff.c (read_ext_syms_and_strs): Delete.
1308 (reread_ext_syms_and_strs): Delete.
1309 (ecoff_link_check_archive_element): Add h and name param. Don't
1310 scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
1311 * elflink.c (elf_link_is_defined_archive_symbol): Don't test
1312 archive_pass.
1313 (elf_link_add_archive_symbols): Delete "defined" array, merge
1314 functionality into "included". Make "included" a char array. Don't
1315 set or test archive_pass.
1316 * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
1317 * libbfd.h: Regenerate.
1318
1319 2014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com>
1320
1321 PR 10373
1322 * elf32-sh.c (sh_elf_relax_section): Add jmp to bra relaxing.
1323
1324 2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
1325
1326 * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
1327 (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
1328 (bfd_mips_elf_swap_abiflags_v0_in): New function.
1329 (bfd_mips_elf_swap_abiflags_v0_out): Likewise.
1330 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
1331 (_bfd_mips_elf_fake_sections): Likewise.
1332 (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
1333 (_bfd_mips_elf_additional_program_headers): Account for new
1334 PT_MIPS_ABIFLAGS program header.
1335 (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
1336 associate with .MIPS.abiflags.
1337 (_bfd_mips_elf_gc_mark_extra_sections): New function.
1338 (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
1339 (infer_mips_abiflags): Likewise.
1340 (_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
1341 (mips_32bit_flags_p): Moved higher.
1342 (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
1343 checking for FP ABIs.
1344 (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
1345 checks. Check EF_MIPS_FP64 flag consistency.
1346 (print_mips_ases, print_mips_isa_ext): New static function.
1347 (print_mips_fp_abi_value, get_mips_reg_size): Likewise.
1348 (_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
1349 (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
1350 Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
1351 * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
1352 * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1353 * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1354 * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1355
1356 2014-07-28 Alan Modra <amodra@gmail.com>
1357
1358 PR 13227
1359 * archive.c (_bfd_compute_and_write_armap): Warn on adding
1360 __gnu_lto_slim to armap.
1361 * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
1362 __gnu_lto_slim to linker hash table.
1363
1364 2014-07-27 Anthony Green <green@moxielogic.org>
1365
1366 * config.bfd: Add moxie-*-moxiebox*.
1367
1368 2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
1369
1370 Add or reactivate or1k-*-rtems*
1371 * config.bfd (or1k-*-rtems*): Reactivate.
1372
1373 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1374
1375 * elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
1376 ELFOSABI_GNU input.
1377 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1378 (elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
1379
1380 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1381
1382 PR binutils/17154
1383 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
1384 and R_*_IRELATIVE relocation offset with PLT entry.
1385 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1386 (elf_x86_64_plt_sym_val_offset_plt_bnd): New.
1387 (elf_x86_64_get_synthetic_symtab): Use it.
1388
1389 2014-07-15 H.J. Lu <hongjiu.lu@intel.com>
1390
1391 PR ld/17057
1392 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
1393 next_tls_desc_index with elf.srelplt->reloc_count.
1394
1395 2014-07-15 Alan Modra <amodra@gmail.com>
1396
1397 * cache.c (cache_bread_1): Don't return -1 when fread returns
1398 a positive value.
1399
1400 2014-07-15 Alan Modra <amodra@gmail.com>
1401
1402 * elflink.c (elf_merge_st_other): Update comments. Simplify
1403 visibility handling. Make isym const. Move code modifying
1404 isym->st_other for --exclude-libs to..
1405 (elf_link_add_object_symbols): ..here.
1406
1407 2014-07-11 Maks Naumov <maksqwe1@ukr.net>
1408
1409 PR 17141
1410 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
1411
1412 2014-07-08 Nick Clifton <nickc@redhat.com>
1413
1414 PR ld/17110
1415 * elf32-sh.c (sh_elf_osec_to_segment): Do not look for output
1416 segments in input bfds.
1417
1418 2014-07-08 Will Newton <will.newton@linaro.org>
1419
1420 * elf32-arm.c (ELF_MAXPAGESIZE): Increase the default
1421 value to 64kB and remove custom setting for NaCl.
1422
1423 2014-07-08 Alan Modra <amodra@gmail.com>
1424
1425 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): Copy st_other
1426 bits from source to dest.
1427 * linker.c (_bfd_generic_copy_link_hash_symbol_type): Update comment.
1428 * targets.c (struct bfd_target <_bfd_copy_link_hash_symbol_type>):
1429 Likewise.
1430 * bfd-in2.h: Regenerate.
1431
1432 2014-07-08 Jiong Wang <jiong.wang@arm.com>
1433
1434 * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.
1435 (elfNN_aarch64_relocate_section): Remove duplicated addend adjustment
1436 when info->relocatable be true.
1437
1438 2014-07-07 Barney Stratford <barney_stratford@fastmail.fm>
1439
1440 * elf32-avr.c: Handle R_AVR_PORT5 and R_AVR_PORT6.
1441 * reloc.c: Add BFD_RELOC_AVR_PORT5 and BFD_RELOC_AVR_PORT6.
1442 * bfd-in2.h: Regenerate.
1443 * libbfd.h: Regenerate.
1444
1445 2014-07-04 Alan Modra <amodra@gmail.com>
1446
1447 * Makefile.am: Update "configure.in" comments.
1448 * PORTING: Likewise.
1449 * aoutx.h: Likewise.
1450 * configure.host: Likewise.
1451 * doc/bfdint.texi: Likewise.
1452 * targets.c: Likewise.
1453 * warning.m4: Likewise.
1454 * Makefile.in: Regenerate.
1455
1456 2014-07-04 Alan Modra <amodra@gmail.com>
1457
1458 * configure.ac: Rename from configure.in.
1459 * Makefile.in: Regenerate.
1460 * config.in: Regenerate.
1461 * doc/Makefile.in: Regenerate.
1462
1463 2014-07-04 Alan Modra <amodra@gmail.com>
1464
1465 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in.
1466 * Makefile.in: Regenerate.
1467
1468 2014-07-04 Alan Modra <amodra@gmail.com>
1469
1470 * version.m4: New file.
1471 * configure.in: Include version.m4.
1472 (AC_INIT): Update.
1473 * Makefile.am (RELEASE): Delete.
1474 (bfdver.h): Depend on development.sh, use instead of RELEASE.
1475 * Makefile.in: Regenerate.
1476 * doc/Makefile.in: Regenerate.
1477
1478 2014-07-02 Alan Modra <amodra@gmail.com>
1479
1480 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Clear
1481 pointer_equality_needed when !readonly_dynrelocs.
1482 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1483
1484 2014-07-02 Alan Modra <amodra@gmail.com>
1485
1486 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
1487 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1488
1489 2014-07-01 Alan Modra <amodra@gmail.com>
1490
1491 * bfd.c (struct bfd): Reorganise for better packing. Delete
1492 "ifd" field. Make "format", "direction" and "flags" bitfields.
1493 (HAS_LOAD_PAGE): Delete, renumber following flags.
1494 * bfd-in2.h: Regenerate.
1495 * coff-tic4x.c: Remove HAS_LOAD_PAGE from extra flags in target vecs.
1496
1497 2014-07-01 Alan Modra <amodra@gmail.com>
1498
1499 * elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
1500 (struct ppc_link_hash_table): Increase size of stub_count array.
1501 (build_global_entry_stubs): Emit symbol on global entry stub.
1502 (ppc64_elf_build_stubs): NULL check htab->brlt. Add global entry
1503 stub stats.
1504
1505 2014-07-01 Alan Modra <amodra@gmail.com>
1506
1507 * elf64-ppc.c (abiversion, set_abiversion): Move earlier.
1508 (ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
1509 (ppc64_elf_set_toc): Set ".TOC." symbol value when using
1510 generic linker.
1511 (ppc64_elf_relocate_section): Disable ELFv2 function entry
1512 optimisation when --traditional-format.
1513
1514 2014-07-01 Barney Stratford <barney_stratford@fastmail.fm>
1515 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1516 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1517 Soundararajan <Sounderarajan.D@atmel.com>
1518
1519 * archures.c: Add avrtiny architecture for avr target.
1520 * cpu-avr.c (arch_info_struct): Add avrtiny arch info.
1521 * elf32-avr.c (elf_avr_howto_table): New relocation R_AVR_LDS_STS_16
1522 added for 16 bit LDS/STS instruction of avrtiny arch.
1523 (avr_reloc_map): Reloc R_AVR_LDS_STS_16 is mapped to
1524 BFD_RELOC_AVR_LDS_STS_16.
1525 (bfd_elf_avr_final_write_processing): Select machine number
1526 avrtiny arch.
1527 (elf32_avr_object_p): Set machine number for avrtiny arch.
1528 * reloc.c: Add documentation for BFD_RELOC_AVR_LDS_STS_16 reloc.
1529 * bfd-in2.h: Regenerate.
1530 * libbfd.h: Regenerate.
1531
1532 2014-06-26 Nick Clifton <nickc@redhat.com>
1533
1534 PR binutils/16949
1535 * dwarf2.c (is_str_attr): New function.
1536 (find_abstract_instance_name): Use it to determine when an
1537 attribute has a string value.
1538
1539 2014-06-24 Alan Modra <amodra@gmail.com>
1540
1541 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Arrange to keep
1542 .sdata/.sdata2 when _SDA_BASE_/_SDA2_BASE_ should be output
1543 for --emit-relocs.
1544
1545 2014-06-21 Philippe De Muyter <phdm@macqel.be>
1546
1547 * targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
1548 a number of targets.
1549
1550 2014-06-20 Kyle McMartin <kyle@redhat.com>
1551
1552 * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
1553 emitting initial-exec relocs when not linking an executable.
1554
1555 2014-06-16 Will Newton <will.newton@linaro.org>
1556
1557 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
1558 htab->next_tls_desc_index in the non-IPLT case.
1559 Calculate GOT offset correctly for the non-IPLT case.
1560 (allocate_dynrelocs_for_symbol): Don't increment
1561 htab->next_tls_desc_index here.
1562
1563 2014-06-16 Alan Modra <amodra@gmail.com>
1564
1565 * elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
1566 created sections.
1567
1568 2014-06-13 Omair Javaid <omair.javaid@linaro.org>
1569
1570 * elfxx-aarch64.c (stdarg.h): Include.
1571 (string.h): Include.
1572 (_bfd_aarch64_elf_grok_prstatus): Updated.
1573 (_bfd_aarch64_elf_grok_psinfo): New function.
1574 (_bfd_aarch64_elf_write_core_note): New function.
1575 * elfxx-aarch64.h (elf_backend_grok_psinfo): Define.
1576 (elf_backend_write_core_note): Define.
1577
1578 2014-06-13 Alan Modra <amodra@gmail.com>
1579
1580 * archive.c: Include bfdlink.h.
1581 (_bfd_archive_close_and_cleanup): Call linker hash_table_free.
1582 * bfd.c (struct bfd): Add is_linker_output field.
1583 * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype.
1584 * linker.c (_bfd_link_hash_table_init): Set up hash_table_free,
1585 link.hash and is_linker_output.
1586 (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table*
1587 param with bfd*. Assert is_linker_output and link.hash, and
1588 clear them before exit.
1589 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace
1590 bfd_link_hash_table* param with bfd*. Hack is_linker_output
1591 and link.hash so we can free two linker hash tables.
1592 (elf32_mn10300_link_hash_table_create): Create static_hash_table
1593 first. Clean up on errors. Set hash_table_free pointer.
1594 * elf32-arm.c (elf32_arm_link_hash_table_free): Replace
1595 bfd_link_hash_table* param with bfd*.
1596 (elf32_arm_link_hash_table_create): Clean up on errors. Set
1597 hash_table_free pointer.
1598 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c,
1599 * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c,
1600 * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c,
1601 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c,
1602 * xcofflink.c: Similarly.
1603 * simple.c (bfd_simple_get_relocated_section_contents): Save and
1604 clear link.next before creating linker hash table. Clean up on
1605 errors, and restore link.next on exit.
1606 * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete.
1607 * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete.
1608 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete.
1609 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete.
1610 * hash.c (bfd_hash_table_init_n): Free table on error.
1611 * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto.
1612 * bfd-in2.h: Regenerate.
1613 * libbfd.h: Regenerate.
1614 * libcoff.h: Regenerate.
1615
1616 2014-06-13 Alan Modra <amodra@gmail.com>
1617
1618 PR 17047
1619 * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
1620 (struct bfd_target <_bfd_link_hash_table_free>): Delete.
1621 * bfd.c (bfd_link_hash_table_free): Don't define.
1622 * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
1623 * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
1624 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
1625 * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
1626 * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
1627 * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1628 * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
1629 * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
1630 * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
1631 * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
1632 * xsym.c: Don't define various link_hash_table_free defines, and
1633 remove from bfd_target vars. Temporarily reference some of the
1634 target link_hash_table_free functions to avoid warnings.
1635 * bfd-in2.h: Regenerate.
1636 * libbfd.h: Regenerate.
1637
1638 2014-06-13 Alan Modra <amodra@gmail.com>
1639
1640 * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
1641 * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c,
1642 * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c,
1643 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c:
1644 Move link_hash_table_free functions before their corresponding
1645 link_hash_table_create functions.
1646
1647 2014-06-13 Alan Modra <amodra@gmail.com>
1648
1649 * bfd.c (struct bfd): Replace link_next with a union.
1650 * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
1651 * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
1652 * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
1653 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
1654 * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
1655 * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
1656 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
1657 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
1658 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1659 * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
1660 * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1661 * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
1662 * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
1663 * bfd-in2.h: Regenerate.
1664
1665 2014-06-11 Alan Modra <amodra@gmail.com>
1666
1667 * linker.c (unwrap_hash_lookup): Add missing parens.
1668
1669 2014-06-11 Kai Tietz <ktietz@redhat.com>
1670
1671 * libcoff-in.h (coff_tdata): Make relocbase member unsigned.
1672 * libcoff.h: Regenerated.
1673
1674 2014-06-10 Alan Modra <amodra@gmail.com>
1675
1676 PR ld/16910
1677 * linker.c (unwrap_hash_lookup): New function.
1678 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
1679 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1680 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1681 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1682 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1683 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1684 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1685 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1686
1687 2014-06-07 Alan Modra <amodra@gmail.com>
1688
1689 * elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
1690 insn as a bitfield; Use complain_overflow_bitfield.
1691 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1692
1693 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1694
1695 * development.sh: New file.
1696 * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
1697 Make -Werror the default with GCC only if DEVELOPMENT is true.
1698 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
1699 $(srcdir)/development.sh.
1700 * Makefile.in, configure: Regenerate.
1701
1702 2014-06-04 Will Newton <will.newton@linaro.org>
1703
1704 * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
1705 being non-NULL into an assert.
1706 (elfNN_aarch64_tls_relax): Remove unused code.
1707
1708 2014-06-03 DJ Delorie <dj@redhat.com>
1709
1710 * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
1711
1712 2014-06-03 Nick Clifton <nickc@redhat.com>
1713
1714 PR ld/16807
1715 * peXXigen.c (rsrc_process_section): Page align the new contents
1716 befgore writing out.
1717
1718 2014-06-03 Alan Modra <amodra@gmail.com>
1719
1720 * elf64-ppc.c (ADDIS_R12_R2): Define.
1721 (build_plt_stub): Support fusion on ELFv2 stub.
1722 (ppc_build_one_stub): Likewise for plt branch stubs.
1723
1724 2014-05-28 Alan Modra <amodra@gmail.com>
1725
1726 * elf32-rx.c (rx_table_map): Delete set but not used variables.
1727
1728 2014-05-28 Tristan Gingold <gingold@adacore.com>
1729
1730 * dwarf2.c (lookup_address_in_function_table): Add best_fit_len
1731 to keep the length of the best fit range.
1732 (lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
1733 Likewise.
1734
1735 2014-05-27 DJ Delorie <dj@redhat.com>
1736
1737 * elf32-rx.c (get_symbol_value_maybe): New.
1738 (rx_elf_relocate_section): If we find a reloc against
1739 $tableentry$default$<name>, redirect it to the appropriate
1740 $tableentry$<n>$.
1741 (RX_Table_Info): New.
1742 (rx_table_find): New. Check all tables and SEC_KEEP all sections
1743 with table parts in them.
1744 (rx_check_directives): New.
1745 (rx_table_map_2): New.
1746 (rx_table_map): New.
1747 (rx_additional_link_map_text): New. Called to dump tables to the
1748 map file.
1749 * elf32-rx.h: New.
1750
1751 2014-05-20 DJ Delorie <dj@redhat.com>
1752
1753 * elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.
1754
1755 2014-05-20 Alan Modra <amodra@gmail.com>
1756
1757 PR 16952
1758 * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
1759 Remove redundant setting of htab->elf.dynobj. Don't align.
1760 Define .sdata symbols using _bfd_elf_define_linkage_sym.
1761 (ppc_elf_create_glink): Call ppc_elf_create_linker_section.
1762 (create_sdata_sym): Delete.
1763 (elf_allocate_pointer_linker_section): Rename from
1764 elf_create_pointer_linker_section. Align section.
1765 (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
1766 directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_
1767 and _SDA2_BASE_.
1768 (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
1769 Remove unnecessary tests on _SDA_BASE_ sym.
1770 (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
1771 (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
1772 * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
1773 (ppc_elf_maybe_strip_sdata_syms): Declare.
1774
1775 2014-05-16 Ryan Mansfield <rmansfield@qnx.com>
1776
1777 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
1778
1779 2014-05-16 Jon Turney <jon.turney@dronecode.org.uk>
1780
1781 * peXXigen.c (pe_print_debugdata): Don't interpret debug directory
1782 in a section with no contents.
1783 (is_vma_in_section, find_section_by_vma): New functions.
1784 (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
1785 offsets in the debug directory.
1786 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1787 Byte-swap GUID from little-endian to big-endian order for
1788 consistent and conventional display.
1789
1790 2014-05-16 Kaushik Phata <Kaushik.Phatak@kpit.com>
1791
1792 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
1793 64-bit doubles objects mix with 32-bit doubles objects.
1794 (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
1795
1796 2014-05-08 Hans-Peter Nilsson <hp@bitrange.com>
1797
1798 * mmo.c: Update URLs in documentation comments.
1799
1800 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
1801 David Weatherford <weath@cadence.com>
1802 Max Filippov <jcmvbkbc@gmail.com>
1803
1804 * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
1805 signed.
1806
1807 2014-05-07 Andreas Tobler <andreast@fgznet.ch>
1808
1809 * config.bfd: Add proper arm config for *-*-freebsd*.
1810
1811 2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
1812
1813 * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
1814 mips32r5 and mips64r5.
1815 * archures.c (bfd_architecture): Likewise.
1816 * bfd-in2.h (bfd_architecture): Likewise.
1817 * cpu-mips.c (arch_info_struct): Likewise.
1818 * elfxx-mips.c (mips_set_isa_flags): Likewise.
1819
1820 2014-05-06 Richard Sandiford <rdsandiford@googlemail.com>
1821
1822 * elfxx-mips.h (elfxx-mips.h): Declare.
1823 * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
1824 Tag_GNU_MIPS_ABI_FP mismatches.
1825 (_bfd_mips_fp_abi_string): New function.
1826
1827 2014-05-02 Alan Modra <amodra@gmail.com>
1828
1829 * targets.c: Sort bfd_target vectors somewhat alphabetically.
1830 * configure.in: Likewise.
1831 * configure: Regenerate.
1832
1833 2014-05-02 Alan Modra <amodra@gmail.com>
1834
1835 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
1836 * aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
1837 * cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
1838 * coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
1839 * coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
1840 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
1841 * coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
1842 * coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
1843 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
1844 * coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
1845 * demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
1846 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1847 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1848 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1849 * elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
1850 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
1851 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1852 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1853 * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
1854 * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1855 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
1856 * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
1857 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
1858 * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
1859 * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
1860 * elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1861 * elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
1862 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
1863 * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
1864 * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1865 * epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
1866 * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
1867 * i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
1868 * i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
1869 * irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
1870 * m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
1871 * makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
1872 * nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
1873 * ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
1874 * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
1875 * pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
1876 * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
1877 * pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
1878 * sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
1879 * sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
1880 * vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
1881 * vms-alpha.c, * vms-lib.c: Rename bfd targets to
1882 <cpu>_<format>_<other>_<endian>_vec. Adjust associated MY macros
1883 on aout targets.
1884 * configure: Regenerate.
1885
1886 2014-05-01 Hans-Peter Nilsson <hp@bitrange.com>
1887
1888 * mmo.c (mmo File layout documentation): Add note about low bits
1889 of address.
1890 (mmo_write_chunk): When handling data remainder, assert that
1891 previous remaining data is flushed.
1892 (mmo_write_loc_chunk): Only look for trailing and leading zeros
1893 when dealing with an aligned VMA and for aligned lengths. Don't skip
1894 the last 32-bit-word of zeros.
1895 (mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
1896 (mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
1897 emitting data, not after updating it.
1898 <case LOP_LOC>: Call mmo_decide_section with aligned vma.
1899
1900 2014-04-30 Nick Clifton <nickc@redhat.com>
1901
1902 * compress.c (bfd_is_section_compressed): When checking the
1903 .debug_str section, also check the fifth byte in the section is
1904 not part of a string.
1905
1906 2014-04-30 Alan Modra <amodra@gmail.com>
1907
1908 * elf-eh-frame.c (struct cie.personality): Replace val with sym.
1909 (find_merged_cie): Identify personality functions by (bfd_id,index)
1910 pair when a local sym is used.
1911
1912 2014-04-29 Christian Svensson <blue@cmd.nu>
1913
1914 * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
1915 into .rela.got if it contained TLS relocations as well.
1916
1917 2014-04-28 Nick Clifton <nickc@redhat.com>
1918
1919 PR ld/16821
1920 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
1921 time warning.
1922
1923 2014-04-26 Alan Modra <amodra@gmail.com>
1924
1925 * po/SRC-POTFILES.in: Regenerate.
1926 * configure: Regenerate.
1927
1928 2014-04-25 Nick Clifton <nickc@redhat.com>
1929
1930 PR ld/16821
1931 * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on
1932 a 342-bit host. This time for older versions of gcc.
1933
1934 2014-04-24 Nick Clifton <nickc@redhat.com>
1935
1936 * peXXigen.c (rsrc_print_section): Fix compile time warning for
1937 32-bit hosts.
1938
1939 2014-04-24 Alan Modra <amodra@gmail.com>
1940
1941 PR 16867
1942 * dwarf2.c: Formatting.
1943 (struct dwarf2_debug): Make adjusted_section_count signed.
1944 (unset_sections): Make i signed.
1945 (set_debug_vma): New function.
1946 (place_sections): Handle separate debug object file. Set VMA
1947 on debug sections, even if they have an output section. Also
1948 set VMA on zero size sections, and non-load but alloc sections.
1949 Set adjusted_section_count to -1 when no section adjustment.
1950 Malloc adjusted_sections. Don't double last_vma. Transfer
1951 alloc section VMAs to separate debug file.
1952 (_bfd_dwarf2_cleanup_debug_info): Free adjusted_sections.
1953 (_bfd_dwarf2_slurp_debug_info): Add do_place parameter. Drop
1954 test on symbols being the same before using old stash. Read
1955 and use separate debug file symbols. Call place_sections.
1956 (find_line): Don't call place_sections here.
1957 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Update proto.
1958 * libbfd.h: Regenerate.
1959 * mach-o.c (bfd_mach_o_find_nearest_line): Adjust
1960 _bfd_dwarf2_slurp_debug_info call.
1961 * simple.c (simple_save_output_info): Clarify comment.
1962
1963 2014-04-24 Nick Clifton <nickc@redhat.com>
1964
1965 PR ld/16807
1966 * peXXigen.c (struct rsrc_regions): New structure.
1967 (rsrc_print_resource_directory): Use new structure. Include
1968 offset of directory in listing.
1969 (rsrc_print_resource_entry): Likewise.
1970 (rsrc_print_section): Likewise.
1971 (rsrc_count_entries): Do not increment sizeof_strings or
1972 sizeof_leaves.
1973 (rsrc_count_directory): Do not increment sizeof_tables.
1974 (rsrc_compute_region_sizes): New function.
1975 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
1976 (rsrc_process_section): Compute size of regions after merging
1977 entries.
1978
1979 2014-04-23 Alan Modra <amodra@gmail.com>
1980
1981 PR ld/16787
1982 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
1983 (place_sections): Do not modify VMA of sections when called from
1984 linker after sections have been placed in output sections. Short
1985 circuit single section case.
1986 (save_section_vma, section_vma_same): New functions.
1987 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
1988 change.
1989 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
1990 when non-relocatable.
1991
1992 2014-04-22 Nick Clifton <nickc@redhat.com>
1993
1994 PR ld/16821
1995 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
1996
1997 2014-04-22 Christian Svensson <blue@cmd.nu>
1998
1999 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
2000 * archures.c: Likewise.
2001 * coffcode.h: Likewise.
2002 * config.bfd: Likewise.
2003 * configure.in: Likewise.
2004 * reloc.c: Likewise.
2005 * targets.c: Likewise.
2006 * cpu-or1k.c: New file.
2007 * elf32-or1k.c: New file.
2008 * coff-or32.c: Delete.
2009 * cpu-openrisc.c: Delete.
2010 * cpu-or32.c: Delete.
2011 * elf32-openrisc.c: Delete.
2012 * elf32-or32.c: Delete.
2013 * Makefile.in: Regenerate.
2014 * bfd-in2.h: Regenerate.
2015 * configure: Regenerate.
2016 * libbfd.h: Regenerate.
2017
2018 2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
2019
2020 PR ld/16821
2021 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
2022
2023 2014-04-22 Will Newton <will.newton@linaro.org>
2024
2025 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
2026 function. (elf_backend_section_flags): Remove define.
2027
2028 2014-04-21 Richard Henderson <rth@redhat.com>
2029
2030 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
2031 parameter; honor it and disable got merging when false.
2032 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
2033 the first pass of relaxation.
2034 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
2035 the end of the LITERAL+LITUSE chain.
2036 (elf64_alpha_relax_section): Only process LITERAL relocs during the
2037 second pass of relaxation.
2038
2039 * configure.ac (use_secureplt): Enable by default.
2040 * configure: Rebuild.
2041
2042 2014-04-18 Tristan Gingold <gingold@adacore.com>
2043
2044 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
2045 bind_content, weak_bind_content, lazy_bind_content,
2046 export_content.
2047 (bfd_mach_o_load_command): Add comments, add next field.
2048 (mach_o_data_struct): Replace commands field by first_command
2049 and last_command.
2050 * mach-o.c (bfd_mach_o_append_command): New function.
2051 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
2052 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
2053 copy fields.
2054 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
2055 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
2056 (bfd_mach_o_write_thread): Use macro instead of literal.
2057 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
2058 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
2059 functions.
2060 (bfd_mach_o_write_symtab_content): New function (extracted
2061 from bfd_mach_o_write_symtab).
2062 (bfd_mach_o_write_symtab): Split.
2063 (bfd_mach_o_count_indirect_symbols): Move
2064 (bfd_mach_o_build_dysymtab): Remove layout code.
2065 (bfd_mach_o_write_contents): Rewritten to build commands in order.
2066 (bfd_mach_o_count_sections_for_seg): Remove.
2067 (bfd_mach_o_build_obj_seg_command): New function (extracted from
2068 bfd_mach_o_build_seg_command).
2069 (bfd_mach_o_build_exec_seg_command): New function.
2070 (bfd_mach_o_build_dysymtab_command): Remove.
2071 (bfd_mach_o_layout_commands): New function.
2072 (bfd_mach_o_init_segment): New function.
2073 (bfd_mach_o_build_commands): Major rework to handle non-object
2074 files.
2075 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
2076 function.
2077 (bfd_mach_o_read_dyld_info): Clear content fields.
2078 (bfd_mach_o_read_segment): Adjust call.
2079 (bfd_mach_o_flatten_sections): Adjust as now load commands are
2080 chained.
2081 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
2082 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
2083 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
2084 Likewise.
2085
2086 2014-04-18 Tristan Gingold <gingold@adacore.com>
2087
2088 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
2089 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
2090 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
2091 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
2092
2093 2014-04-18 Tristan Gingold <gingold@adacore.com>
2094
2095 * mach-o.h (bfd_mach_o_dylinker_command)
2096 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
2097 name_len field.
2098 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
2099 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
2100
2101 2014-04-18 Tristan Gingold <gingold@adacore.com>
2102
2103 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
2104 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
2105 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
2106 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
2107 each targets declared.
2108 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
2109 * mach-o-i386.c (TARGET_PAGESIZE): Define.
2110
2111 2014-04-18 Tristan Gingold <gingold@adacore.com>
2112
2113 * mach-o.c (bfd_mach_o_write_thread)
2114 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
2115 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
2116 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
2117 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
2118 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
2119 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
2120 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
2121 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
2122 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
2123 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
2124 (bfd_mach_o_read_command): Now return a boolean status.
2125 Adjust return statements.
2126 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
2127 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
2128
2129 2014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
2130
2131 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
2132 field. Add assigned_low_gotno and assigned_high_gotno fields.
2133 (mips_elf_create_local_got_entry): Update out-of-space condition.
2134 Set index of new GOT entry to assigned_low_gotno if required by
2135 the current relocation, else set it to assigned_high_gotno.
2136 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
2137 with assigned_low_gotno.
2138 (mips_elf_multi_got): Initialize assigned_low_gotno and
2139 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
2140 in place of assigned_gotno when handling global GOT entries.
2141 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
2142 assigned_high_gotno.
2143 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
2144 gap in the middle of local GOT space.
2145
2146 2014-04-17 Alan Modra <amodra@gmail.com>
2147
2148 PR 16846
2149 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
2150 current bfd is a plugin. Don't always set type_change_ok
2151 when old bfd is a plugin.
2152
2153 2014-04-16 Tristan Gingold <gingold@adacore.com>
2154
2155 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
2156 flag.
2157
2158 2014-04-16 Alan Modra <amodra@gmail.com>
2159
2160 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
2161 with "ba 0" rather than zeros.
2162
2163 2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
2164
2165 * (elfNN_aarch64_tls_relax): Fix instruction mask.
2166
2167 2014-04-14 Alan Modra <amodra@gmail.com>
2168
2169 * elf32-ppc.c (BA): Define
2170 (ppc_elf_link_hash_table_create): Correct default_params.
2171 (write_glink_stub): Pad small plt call stub with "ba 0" rather
2172 than "nop" for ppc476_workaround.
2173 (ppc_elf_finish_dynamic_sections): Likewise for branch table
2174 and __glink_PLTresolve. Ensure plt call stub at end of page
2175 doesn't allow fall-thru prefetch.
2176
2177 2014-04-11 Nick Clifton <nickc@redhat.com>
2178
2179 PR ld/16821
2180 * peXXigen.c (abs_finder): New function.
2181 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
2182 than 1^32 try to convert them into section relative values
2183 instead.
2184
2185 2014-04-11 Nick Clifton <nickc@redhat.com>
2186
2187 * bfd-in2.h: Regenerate.
2188 * libbfd.h: Regenerate.
2189
2190 2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
2191
2192 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
2193 when building function stubs.
2194
2195 2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2196
2197 * elf32-avr.c: Add DIFF relocations for AVR.
2198 (avr_final_link_relocate): Handle the DIFF relocs.
2199 (bfd_elf_avr_diff_reloc): New.
2200 (elf32_avr_is_diff_reloc): New.
2201 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
2202 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
2203 bytes.
2204
2205 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
2206
2207 2014-04-09 Alan Modra <amodra@gmail.com>
2208
2209 * libcoff.h: Regenerate.
2210
2211 2014-04-09 Alan Modra <amodra@gmail.com>
2212
2213 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
2214 of safe ppc476 insns at end of page. Also remove non-branch insns.
2215 Expand comments.
2216
2217 2014-04-08 Jon Turney <jon.turney@dronecode.org.uk>
2218
2219 * peXXigen.c (pe_print_debugdata): New function: Displays the
2220 contents of the debug directory and decodes codeview entries.
2221 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2222 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
2223 Add functions for reading and writing debugdir and codeview
2224 records.
2225 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2226 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
2227 * libcoff-in.h (pe_tdata): Add build-id data.
2228 * libcoff.h: Regenerate.
2229 * coffcode.h (coff_write_object_contents): Run build_id
2230 after_write_object_contents hook.
2231
2232 2014-04-05 Alan Modra <amodra@gmail.com>
2233
2234 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
2235 merging non-default sym.
2236
2237 2014-04-04 Tristan Gingold <gingold@adacore.com>
2238
2239 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
2240 configured for.
2241
2242 2014-04-04 Tristan Gingold <gingold@adacore.com>
2243
2244 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
2245 thinko on names length.
2246
2247 2014-04-04 Tristan Gingold <gingold@adacore.com>
2248
2249 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
2250 of output_section.
2251 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
2252
2253 2014-04-04 Tristan Gingold <gingold@adacore.com>
2254
2255 * bfd.c (bfd_get_arch_size): Default is taken from arch.
2256
2257 2014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
2258
2259 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
2260 section before dereferencing.
2261 (pe_print_idata, pe_print_edata, pe_print_reloc)
2262 (rsrc_print_section): Don't bother interpreting the contents
2263 of sections which have no contents.
2264
2265 2014-04-03 Maria Guseva <m.guseva@samsung.com>
2266
2267 PR ld/16803
2268 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
2269 file position.
2270
2271 2014-04-03 Tristan Gingold <gingold@adacore.com>
2272
2273 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
2274 output_section.
2275 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
2276 Fix style.
2277 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
2278
2279 2014-04-03 Alan Modra <amodra@gmail.com>
2280
2281 * elf-bfd.h (struct elf_backend_data
2282 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
2283 with "bfd_size_type size".
2284 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2285 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2286 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
2287 * elfcode.h (bfd_from_remote_memory): Likewise.
2288 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
2289 * bfd-in2.h: Regenerate.
2290
2291 2014-04-02 Tristan Gingold <gingold@adacore.com>
2292
2293 * mach-o.h (bfd_mach_o_twolevel_hints_command)
2294 (bfd_mach_o_prebind_cksum_command): New types.
2295 (bfd_mach_o_prebound_dylib_command): Rewrite.
2296 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
2297 fields.
2298 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
2299 command.
2300 (bfd_mach_o_read_prebind_cksum): New function.
2301 (bfd_mach_o_read_twolevel_hints): Ditto.
2302 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
2303 commands.
2304
2305 2014-04-02 Alan Modra <amodra@gmail.com>
2306
2307 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
2308 Consolidate code handling possible section headers past end of
2309 segment. Don't use p_align for page size guess, instead use
2310 minpagesize. Take note of ld.so clearing section headers when
2311 p_memsz > p_filesz. Handle file header specifying no section
2312 headers. Handle zero p_align throughout. Default loadbase to
2313 zero. Add comments. Rename contents_size to high_offset, and
2314 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
2315 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
2316 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
2317 Likewise.
2318 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2319 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2320 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
2321 * bfd-in2.h: Regnerate.
2322
2323 2014-04-01 Tristan Gingold <gingold@adacore.com>
2324
2325 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
2326 when num == 0.
2327
2328 2014-03-27 Yury Gribov <y.gribov@samsung.com>
2329 Pavel Fedin <p.fedin@samsung.com>
2330
2331 * elf32-arm.c: Add support for limited pretty-printing of PLT
2332 entries on eabi and nacl targets.
2333 (elf32_arm_get_synthetic_symtab): Add new callback.
2334 (elf32_arm_nacl_plt_sym_val): Likewise.
2335 (elf32_arm_plt0_size): Add helper function.
2336 (elf32_arm_plt_size): Likewise.
2337
2338 2014-03-27 Tristan Gingold <gingold@adacore.com>
2339
2340 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
2341 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
2342
2343 2014-03-27 Tristan Gingold <gingold@adacore.com>
2344
2345 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
2346 * mach-o.c (bfd_mach_o_write_symtab)
2347 (bfd_mach_o_write_contents)
2348 (bfd_mach_o_set_section_flags_from_bfd)
2349 (bfd_mach_o_build_seg_command): Fix indentation.
2350 (bfd_mach_o_get_base_address): New function.
2351
2352 2014-03-26 Nick Clifton <nickc@redhat.com>
2353
2354 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
2355 relocations in discarded sections.
2356
2357 2014-03-26 Tristan Gingold <gingold@adacore.com>
2358
2359 * mach-o.c (bfd_mach_o_convert_architecture): Add
2360 BFD_MACH_O_CPU_TYPE_ARM64.
2361
2362 2014-03-26 Alan Modra <amodra@gmail.com>
2363
2364 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
2365 needed plt entries when taking the address of functions for
2366 abiversion == 0 (ie. unknown) as well as abiversion == 2.
2367 Move opd setup and abiversion checks to..
2368 (ppc64_elf_before_check_relocs): ..here. Renamed from
2369 ppc64_elf_process_dot_syms. Set output abiversion from input and
2370 input abiversion from output, if either is not set.
2371 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
2372 (elf_backend_check_directives): Update.
2373
2374 2014-03-25 Will Newton <will.newton@linaro.org>
2375
2376 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
2377 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
2378 of input sections rather than output sections.
2379
2380 2014-03-20 Will Newton <will.newton@linaro.org>
2381
2382 PR ld/16715
2383 * elf32-arm.c (elf32_arm_check_relocs): Set
2384 pointer_equality_needed for absolute references within
2385 executable links.
2386 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
2387 unless pointer_equality_needed is set.
2388
2389 2014-03-19 Nick Clifton <nickc@redhat.com>
2390
2391 * peXXigen.c (rsrc_process_section): Add code to scan input
2392 sections and record their lengths. Use these lengths to find the
2393 start of each merged .rsrc section.
2394
2395 2014-03-17 Tristan Gingold <gingold@adacore.com>
2396
2397 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
2398 (bfd_mach_o_read_command): Ditto.
2399
2400 2014-03-14 Meador Inge <meadori@codesourcery.com>
2401
2402 * configure.in: Add strnlen to AC_CHECK_DECLS.
2403 * config.in: Regenerate.
2404 * configure: Regenerate.
2405 * sysdep.h (strnlen): Add prototype.
2406
2407 2014-03-14 Alan Modra <amodra@gmail.com>
2408
2409 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
2410 handling for VLE_SDA21 relocs.
2411
2412 2014-03-13 Tristan Gingold <gingold@adacore.com>
2413
2414 * peicode.h (pe_ILF_object_p): Adjust, as the version number
2415 has been read.
2416 (pe_bfd_object_p): Also read version number to detect ILF.
2417 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
2418 (x86_64pe_bigobj_vec): Define
2419 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
2420 (bfd_coff_max_nscns): New macro.
2421 (coff_compute_section_file_positions): Use unsigned int for
2422 target_index. Compare with bfd_coff_max_nscns.
2423 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
2424 Set a value for _bfd_coff_max_nscns.
2425 (header_bigobj_classid): New constant.
2426 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
2427 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
2428 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
2429 functions.
2430 (bigobj_swap_table): New table.
2431 * libcoff.h: Regenerate.
2432 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
2433 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
2434 _bfd_coff_max_nscns.
2435 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2436 * coff-rs6000.c (bfd_xcoff_backend_data)
2437 (bfd_pmac_xcoff_backend_data): Likewise.
2438 * coff64-rs6000.c (bfd_xcoff_backend_data)
2439 (bfd_xcoff_aix5_backend_data): Likewise.
2440 * targets.c (x86_64pe_bigobj_vec): Declare.
2441 * configure.in (x86_64pe_bigobj_vec): New vector.
2442 * configure: Regenerate.
2443 * config.bfd: Add bigobj object format for Windows targets.
2444
2445 2014-03-12 Nick Clifton <nickc@redhat.com>
2446
2447 PR ld/16671
2448 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
2449 before testing for vxworks.
2450
2451 2014-03-12 Alan Modra <amodra@gmail.com>
2452
2453 * Makefile.in: Regenerate.
2454
2455 2014-03-12 Alan Modra <amodra@gmail.com>
2456
2457 PR 16690
2458 * elf.c (copy_elf_program_header): Ignore first section lma if
2459 non-alloc.
2460
2461 2014-03-11 Alan Modra <amodra@gmail.com>
2462
2463 PR 16686
2464 * coff-rs6000.c: Include stdint.h.
2465 * coff64-rs6000.c: Likewise.
2466
2467 2014-03-10 Tristan Gingold <gingold@adacore.com>
2468
2469 * ticoff.h: Removed.
2470
2471 2014-03-08 Alan Modra <amodra@gmail.com>
2472
2473 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
2474 many relocations. Correct bitsize and rightshift too for a number
2475 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
2476 Correct dst_mask on R_PPC_VLE_SDA21_LO.
2477 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
2478 (ppc_elf_relocate_section): Modify overflow test for 16-bit
2479 fields in instructions to signed/unsigned according to whether
2480 the field takes a signed or unsigned value. Tidy vle split16 code.
2481 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
2482
2483 2014-03-08 Alan Modra <amodra@gmail.com>
2484
2485 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
2486 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
2487 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
2488 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
2489 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
2490 fields in instructions to signed/unsigned according to whether
2491 the field takes a signed or unsigned value.
2492
2493 2014-03-07 Pedro Alves <palves@redhat.com>
2494
2495 PR gdb/16696
2496 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
2497 through ptr_to_uint instead of through long.
2498
2499 2014-03-06 Nick Clifton <nickc@redhat.com>
2500
2501 PR 16664
2502 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
2503 attribute section names.
2504
2505 2014-03-05 Alan Modra <amodra@gmail.com>
2506
2507 Update copyright years.
2508
2509 2014-03-05 Alan Modra <amodra@gmail.com>
2510
2511 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
2512 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
2513 (ppc64_elf_check_relocs): Likewise.
2514 (ppc64_elf_relocate_section): Likewise.
2515 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
2516 * bfd-in2.h: Regenerate.
2517 * libbfd.h: Regenerate.
2518
2519 2014-03-04 Heiher <r@hev.cc>
2520
2521 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
2522 Loongson-3A.
2523 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
2524 extension of bfd_mach_mipsisa64r2.
2525
2526 2014-03-04 Nick Clifton <nickc@redhat.com>
2527
2528 PR ld/16017
2529 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
2530 (elf32_thumb2_plt_entry): New array.
2531 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
2532 using thumb2 based PLT.
2533 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
2534 entries.
2535 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
2536 PLT entries.
2537 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
2538 based PLT 0-entry.
2539 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
2540 Thumb2 based PLT 0-entry.
2541 (elf32_arm_output_arch_local_syms): Handle creation of local
2542 symbols for Thumb2 based PLT entries.
2543
2544 2014-02-28 Alan Modra <amodra@gmail.com>
2545
2546 PR ld/16643
2547 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
2548 the same conditions we called check_relocs.
2549
2550 2014-02-27 Yuri Gribov <y.gribov@samsung.com>
2551
2552 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
2553 * bfd-in2.h: Regenerate.
2554 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
2555 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
2556 using long PLT entries.
2557 (bfd_elf32_arm_use_long_plt): New function.
2558 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
2559
2560 2014-02-27 Alan Modra <amodra@gmail.com>
2561
2562 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
2563 params for targets that don't use ppc32elf.em.
2564
2565 2014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
2566
2567 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
2568 of GOTOFF relocations.
2569
2570 2014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
2571 H.J. Lu <hongjiu.lu@intel.com>
2572
2573 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
2574 (elf_x86_64_legacy_plt_entry): Likewise.
2575 (elf_x86_64_bnd_plt_entry): Likewise.
2576 (elf_x86_64_legacy_plt2_entry): Likewise.
2577 (elf_x86_64_bnd_plt2_entry): Likewise.
2578 (elf_x86_64_bnd_arch_bed): Likewise.
2579 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
2580 (elf_x86_64_link_hash_table): Add plt_bnd.
2581 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
2582 plt_bnd.
2583 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
2584 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
2585 in 64-bit mode.
2586 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
2587 symbols. Resolve call to the second PLT if it is created.
2588 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
2589 (elf_x86_64_relocate_section): Resolve PLT references to the
2590 second PLT if it is created.
2591 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
2592 second PLT entry for BND relocation.
2593 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
2594 the second PLT is created.
2595 (elf_x86_64_get_synthetic_symtab): New.
2596 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
2597
2598 2014-02-19 Alan Modra <amodra@gmail.com>
2599
2600 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
2601 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
2602 provision of out-of-line register save/restore routines.
2603
2604 2014-02-18 Jack Carter <jack.carter@imgtec.com>
2605
2606 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
2607 PT_DYNAMIC segment flags.
2608
2609 2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2610
2611 PR binutils/16595
2612 * simple.c (struct saved_offsets): New.
2613 (simple_save_output_info): Use it for ptr.
2614 (simple_restore_output_info): Use it for ptr. Check section_count.
2615 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
2616
2617 2014-02-17 Alan Modra <amodra@gmail.com>
2618
2619 * elf64-ppc.h (struct ppc64_elf_params): Define.
2620 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2621 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2622 ppc64_elf_build_stubs): Update prototype.
2623 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
2624 fields now in params. Adjust code throughout file.
2625 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
2626 Save params pointer in htab.
2627 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2628 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2629 ppc64_elf_build_stubs): Remove parameters now in "params".
2630
2631 2014-02-17 Alan Modra <amodra@gmail.com>
2632
2633 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
2634 patched for ppc476 workaround. Reapply branch taken/not taken
2635 relocs.
2636
2637 2014-02-12 Alan Modra <amodra@gmail.com>
2638
2639 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
2640 stubs for calls to __tls_get_addr that we know will later be
2641 optimised away.
2642
2643 2014-02-12 Alan Modra <amodra@gmail.com>
2644
2645 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
2646 for ld -r, when code sections are sufficiently aligned.
2647 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
2648 pagesize_p2.
2649
2650 2014-02-12 Alan Modra <amodra@gmail.com>
2651
2652 PR gold/15530
2653 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2654 --export-dynamic and --dynamic-list marking of symbols.
2655 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
2656 cheap tests first.
2657
2658 2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
2659
2660 PR gold/16530
2661 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
2662 executables if it matches dynamic_list.
2663
2664 2014-02-10 Alan Modra <amodra@gmail.com>
2665
2666 * po/SRC-POTFILES.in: Regenerate.
2667 * po/bfd.pot: Regenerate.
2668
2669 2014-02-09 Alan Modra <amodra@gmail.com>
2670
2671 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
2672 * elfxx-target.h (elf_backend_caches_rawsize): Define.
2673 (elfNN_bed): Init new field.
2674 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
2675 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
2676 (ppc_elf_relax_section): Don't reallocate section here, write
2677 stubs, or write out relocs for ld -r here..
2678 (ppc_elf_relocate_section): ..instead write stubs here, and use
2679 existing code to write out relocs for ld -r. Fix offset
2680 adjustment on reloc for little-endian.
2681 (elf_backend_caches_rawsize): Define.
2682
2683 2014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2684
2685 PR build/16550
2686 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
2687
2688 2014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2689
2690 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
2691 return paths. Three times.
2692 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
2693 return paths.
2694 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
2695 (ppc64_elf_edit_toc): Free USED in return path.
2696
2697 2014-02-03 Sandra Loosemore <sandra@codesourcery.com>
2698
2699 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
2700 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
2701 * libbfd.h: Regenerated.
2702 * bfd-in2.h: Regenerated.
2703 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
2704 (nios2_reloc_map): Likewise.
2705 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
2706 Fixed all references.
2707 (nios2_elf32_relocate_section): Add new relocations.
2708 (nios2_elf32_check_relocs): Likewise.
2709 (nios2_elf32_gc_sweep_hook): Likewise.
2710
2711 2014-02-03 Alan Modra <amodra@gmail.com>
2712
2713 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
2714 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
2715 (ppc_elf_link_params): New function.
2716 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
2717 workaround.
2718 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
2719 parameters. Use htab->params instead.
2720 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
2721 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
2722 64 bytes for ppc476 workaround.
2723 (struct ppc_elf_relax_info): New.
2724 (ppc_elf_relax_section): Exclude linker created sections and
2725 those too small to hold one instruction. Don't add another
2726 branch around trampolines on later relax passes. Don't
2727 generate trampolines for undefined symbols when !relocatable,
2728 nor for plugin symbols. Allocate space for ppc476 workaround
2729 patch area. Free fixups on error return path.
2730 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
2731 * elf32-ppc.h (struct ppc_elf_params): New.
2732 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
2733 (ppc_elf_link_params): Declare.
2734 * section.c (SEC_INFO_TYPE_TARGET): Define.
2735 * bfd-in2.h: Regenerate.
2736
2737 2014-02-02 Sandra Loosemore <sandra@codesourcery.com>
2738
2739 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
2740 h_gp_got field.
2741 (nios2_elf32_relocate_section): Use got_base to adjust
2742 GOT-pointer-relative relocations relative to _gp_got.
2743 (create_got_section): Create _gp_got symbol.
2744 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
2745 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
2746
2747 2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
2748
2749 * bfd-in2.h: Update from reloc.c.
2750 * elf32-nios2.c: Include elf32-nios2.h.
2751 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
2752 (nios2_reloc_map): Likewise.
2753 (enum elf32_nios2_stub_type): Declare.
2754 (struct elf32_nios2_stub_hash_entry): Declare.
2755 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
2756 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
2757 (struct elf32_nios2_link_hash_table): Add new fields bstab,
2758 stub_bfd, add_stub_section, layout_sections_again, stub_group,
2759 bfd_count, top_index, input_list, all_local_syms.
2760 (nios2_call26_stub_entry): New.
2761 (nios2_elf32_install_imm16): Move up in file.
2762 (nios2_elf32_install_data): Move up in file.
2763 (hiadj): Move up in file.
2764 (stub_hash_newfunc): New.
2765 (link_hash_newfunc): Initialize hsh_cache field.
2766 (STUB_SUFFIX): New.
2767 (nios2_stub_name): New.
2768 (nios2_get_stub_entry): New.
2769 (nios2_add_stub): New.
2770 (nios2_elf32_setup_section_lists): New.
2771 (nios2_elf32_next_input_section): New.
2772 (CALL26_SEGMENT): New.
2773 (MAX_STUB_SECTION_SIZE): New.
2774 (group_sections): New.
2775 (nios2_type_of_stub): New.
2776 (nios2_build_one_stub): New.
2777 (nios2_size_one_stub): New.
2778 (get_local_syms): New.
2779 (nios2_elf32_size_stubs): New.
2780 (nios2_elf32_build_stubs): New.
2781 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
2782 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
2783 trampolines for R_NIOS2_CALL26 stubs.
2784 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
2785 (nios2_elf32_gc_sweep_hook): Likewise.
2786 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
2787 (nios2_elf32_link_hash_table_free): New.
2788 (bfd_elf32_bfd_link_hash_table_free): Define.
2789 * elf32-nios2.h: New file.
2790 * libbfd.h: Update from reloc.c.
2791 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
2792
2793 2014-01-29 Nick Clifton <nickc@redhat.com>
2794
2795 PR binutils/16318
2796 * elf32-metag.c (elf_metag_post_process_headers): Call
2797 _bfd_elf_post_process_headers.
2798 * elf32-sh64.c (sh64_elf_copy_private_data): Call
2799 _bfd_elf_copy_private_data.
2800 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
2801
2802 2014-01-29 Nick Clifton <nickc@redhat.com>
2803
2804 * bfd-in.h (bfd_set_section_vma): Delete.
2805 (bfd_set_section_alignment): Delete.
2806 (bfd_set_section_userdata): Delete.
2807 (bfd_set_cacheable): Delete.
2808 * bfd.c (bfd_set_cacheable): New static inline function.
2809 * section.c (bfd_set_section_userdata): Likewise.
2810 (bfd_set_section_vma): Likewise.
2811 (bfd_set_section_alignment): Likewise.
2812 * bfd-in2.h: Regenerate.
2813
2814 2014-01-28 Nick Clifton <nickc@redhat.com>
2815
2816 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
2817 attributes select the CU containing the abbreviation, which may not
2818 be the current CU.
2819
2820 2014-01-24 Alan Modra <amodra@gmail.com>
2821
2822 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
2823 to get_relocs for ELFv2.
2824
2825 2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
2826
2827 PR ld/16498
2828 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
2829 if TLS sections are not adjacent.
2830
2831 2014-01-22 Alan Modra <amodra@gmail.com>
2832
2833 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
2834
2835 2014-01-22 Alan Modra <amodra@gmail.com>
2836
2837 * elf64-ppc.c (STK_LINKER): Comment typo fix.
2838
2839 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2840
2841 PR ld/16467
2842 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
2843 regular default symbol definition and the versioned dynamic
2844 symbol definition mismatch, skip the default symbol definition
2845 if one of them is IFUNC.
2846
2847 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2848
2849 PR ld/2404
2850 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
2851 info->export_dynamic nor h->ref_dynamic for type mismatch when
2852 adding the default version.
2853
2854 2014-01-16 Alan Modra <amodra@gmail.com>
2855
2856 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
2857 mips_elf_traverse_got_arg* rather than mips_got_info*.
2858 Adjust caller. Alloc on output_bfd rather than symbol section
2859 owner.
2860
2861 2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
2862
2863 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2864 change.
2865 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2866
2867 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2868
2869 PR ld/16428
2870 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
2871 against __ehdr_start.
2872 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2873
2874 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2875
2876 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2877 change.
2878 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2879
2880 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2881
2882 PR ld/16428
2883 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
2884 count if there are any non pc-relative relocs.
2885 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2886
2887 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
2888 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2889
2890 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
2891 offset while calculating relocation address.
2892 (elfNN_aarch64_create_small_pltn_entry): Likewise.
2893 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2894
2895 2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
2896
2897 PR ld/16202
2898 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
2899 R_ARM_ABS8 and R_ARM_ABS16.
2900
2901 2014-01-13 Alan Modra <amodra@gmail.com>
2902
2903 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
2904 error when shared and force a plt call otherwise.
2905 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
2906 plt_type == PLT_NEW.
2907 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
2908 the appropriate call stub.
2909
2910 2014-01-10 Alan Modra <amodra@gmail.com>
2911
2912 PR ld/14207
2913 PR ld/16322
2914 PR binutils/16323
2915 * elf.c (assign_file_positions_for_load_sections): Revert last change.
2916 (assign_file_positions_for_non_load_sections): When setting up
2917 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
2918 header that completely covers the relro region.
2919
2920 2014-01-09 Tristan Gingold <gingold@adacore.com>
2921
2922 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
2923 table macros and add macros to initializa the structure.
2924
2925 2014-01-08 H.J. Lu <hongjiu.lu@intel.com>
2926
2927 PR ld/14207
2928 PR ld/16322
2929 PR binutils/16323
2930 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
2931 size for PT_GNU_RELRO segment.
2932 (assign_file_positions_for_load_sections): If PT_LOAD segment
2933 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
2934
2935 2014-01-07 Tom Tromey <tromey@redhat.com>
2936
2937 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
2938 wrappers.
2939
2940 2014-01-03 Nick Clifton <nickc@redhat.com>
2941
2942 PR binutils/16199
2943 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
2944 zero.
2945
2946 2014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
2947
2948 PR binutils/14289
2949 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
2950
2951 2014-01-02 Nick Clifton <nickc@redhat.com>
2952
2953 PR binutils/11983
2954 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
2955 filename in the bfd's filename field.
2956 * elfcode.h (bfd_from_remote_memory): Likewise.
2957 * ieee.c (ieee_object_p): Likewise.
2958 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
2959 * oasys.c (oasys_openr_next_archived_file): Likewise.
2960 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
2961 * opncls.c (bfd_fopen): Likewise.
2962 (bfd_openstreamr): Likewise.
2963 (bfd_openr_iovec): Likewise.
2964 (bfd_openw): Likewise.
2965 (bfd_create): Likewise.
2966 (_bfd_delete_bfd): Free filename.
2967
2968 For older changes see ChangeLog-2013
2969 \f
2970 Copyright (C) 2014 Free Software Foundation, Inc.
2971
2972 Copying and distribution of this file, with or without modification,
2973 are permitted in any medium without royalty provided the copyright
2974 notice and this notice are preserved.
2975
2976 Local Variables:
2977 mode: change-log
2978 left-margin: 8
2979 fill-column: 74
2980 version-control: never
2981 End: