1 2014-11-21 Nick Clifton <nickc@redhat.com>
4 * coffgen.c (coff_get_normalized_symtab): Check for an excessive
5 number of auxillary entries.
6 * ieee.c (next_byte): Convert to a function. Return FALSE if the
7 next byte is beyond the end of the buffer.
8 (parse_int): Test the return value of next_byte.
9 (parse_expression): Convert to boolean. Return FALSE if the
10 parsing failed. Test the return value of next_byte.
11 (ieee_seek): Convert to a function. Return FALSE if the seek goes
12 beyond the end of the buffer.
13 (ieee_slurp_external_symbols): Test the return value of ieee_seek
15 (ieee_slurp_sections): Convert to boolean. Return FALSE if the
16 operation failed. Test the return value of ieee_seek and
18 (ieee_archive_p): Test the return value of ieee_seek and
21 (ieee_slurp_section_data): Likewise.
22 (ieee_object_p): Likewise. Store the size of the buffer in the
23 total_amt field in the header.
24 * libieee.h (common_header_type): Add amt field.
25 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Check that the
26 reloc's value is within range.
27 (bfd_mach_o_read_symtab_symbols): Nullify the symbols field if the
29 * pei-x86_64.c (pex64_xdata_print_uwd_codes): Replace abort with
31 (pex64_dump_xdata): Check for buffer overflows.
32 * versados.c (process_otr): Check that the section exists before
34 (versados_object_p): Make sure that enough data was read for the
36 * vms-alpha.c (vms_get_remaining_object_record): Change
37 read_so_far parameter to an unsigned int. Check that the amount
40 2014-11-21 H.J. Lu <hongjiu.lu@intel.com>
42 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Optimize
43 PC-relative offset overflow check.
45 2014-11-21 Alexander Cherepanov <cherepan@mccme.ru>
48 * coffgen.c (_bfd_coff_read_string_table): Test allocation of
49 string table before clearing the first few bytes.
51 2014-11-21 Terry Guo <terry.guo@arm.com>
53 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support FPv5.
55 2014-11-20 Alan Modra <amodra@gmail.com>
57 * elf64-ppc.c (group_sections): Init stub14_group_size from
58 --stub-group-size parameter divided by 1024.
60 2014-11-20 Alan Modra <amodra@gmail.com>
62 * elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
63 alignment calculation.
65 2014-11-20 Terry Guo <terry.guo@arm.com>
67 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Skip if input bfd
68 hasn't attribute section.
70 2014-11-20 Alan Modra <amodra@gmail.com>
72 * elf64-ppc.c (ppc64_elf_size_stubs): Add __go_go to thread_starters.
74 2014-11-18 H.J. Lu <hongjiu.lu@intel.com>
77 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
78 PC-relative offset overflow in PLT entry.
80 2014-11-18 Nick Clifton <nickc@redhat.com>
83 * peXXIgen.c (pe_print_pdata): Fail if the section's virtual size
84 is larger than its real size.
85 (rsrc_print_section): Fix off-by-one error checking for overflow.
86 * pei-x86_64.c (pex64_bfd_print_pdata): Handle empty unwind
89 2014-11-18 Igor Zamyatin <igor.zamyatin@intel.com>
91 * elf64-x86-64.c (elf_x86_64_check_relocs): Enable MPX PLT only
94 2014-11-14 Nick Clifton <nickc@redhat.com>
97 * opncls.c (bfd_get_debug_link_info): Avoid reading off the end of
99 (bfd_get_alt_debug_link_info): Likewise.
101 2014-11-14 Nick Clifton <nickc@redhat.com>
104 * ieee.c (ieee_archive_p) Skip processing if no bytes are read at
106 (ieee_object_p): Likewise.
108 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
110 * coffcode.h (coff_slurp_line_table): Add cast to unsigned int.
112 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
114 * coffcode.h (coff_pointerize_aux_hook): Fix a typo.
116 2014-11-13 H.J. Lu <hongjiu.lu@intel.com>
119 * elf64-x86-64.c (elf_x86_64_check_relocs): Treat
120 R_X86_64_GOTPLT64 the same as R_X86_64_GOT64.
121 (elf_x86_64_relocate_section): Likewise.
123 2014-11-13 Nick Clifton <nickc@redhat.com>
126 * coffcode.h (coff_ptr_struct): Add is_sym field.
127 (coff_new_section_hook): Set the is_sym field.
128 (coff_pointerize_aux_hook): Check the is_sym field.
129 (coff_print_aux): Likewise.
130 (coff_compute_section_file_positions): Likewise.
131 (coff_write_object_contents): Likewise.
132 (coff_slurp_line_table): Likewise.
133 (coff_slurp_symbol_table): Likewise.
134 (CALC_ADDEND): Likewise.
135 * coffgen.c (coff_renumber_symbols): Likewise.
136 (coff_mangle_symbols): Likewise.
137 (coff_fix_symbol_name): Likewise.
138 (coff_write_symbol): Likewise.
139 (coff_write_alien_symbol): Likewise.
140 (coff_write_native_symbol): Likewise.
141 (coff_write_symbols): Likewise.
142 (coff_write_linenumbers): Likewise.
143 (coff_pointerize_aux): Likewise.
144 (coff_get_normalized_symtab): Likewise.
145 (coff_get_symbol_info): Likewise.
146 (bfd_coff_get_syment): Likewise.
147 (bfd_coff_get_auxent): Likewise.
148 (coff_print_symbol): Likewise.
149 (coff_find_nearest_line_with_names): Likewise.
150 (bfd_coff_set_symbol_class): Likewise.
151 (coff_make_empty_symbol): Set the is_sym field.
152 (coff_bfd_make_debug_symbol): Likewise.
153 * peicode.h (pe_ILF_make_a_symbol): Likewise.
154 * libcoff.h: Regenerate.
155 * libcoff-in.h: Regenerate.
157 2014-11-12 Nick Clifton <nickc@redhat.com>
160 * coffcode.h (coff_slurp_line_table): Set the line number of
161 corrupt entries to -1.
162 (coff_slurp_symbol_table): Alway initialise the value of the
164 * coffgen.c (coff_print_symbol): Check that the combined pointer
166 (coff_print_symbol): Do not print negative line numbers.
167 * peXXigen.c (pe_print_idata): Add range checking displaying
170 2014-11-12 Alan Modra <amodra@gmail.com>
173 * coffcode.h (coff_slurp_line_table): Drop line number info
174 not preceded by a valid function entry. Revert last change.
176 2014-11-11 Nick Clifton <nickc@redhat.com>
179 * coffcode.h (coff_slurp_line_table): Initialise the parts of the
180 line number cache that would not be initialised by the copy from
181 the new line number table.
182 (coff_classify_symbol): Allow for _bfd_coff_internal_syment_name
184 * coffgen.c (coff_get_normalized_symbols): Get the external
185 symbols before allocating space for the internal symbols, in case
187 * elf.c (_bfd_elf_slurp_version_tables): Only allocate a verref
188 array if one is needed. Likewise with the verdef array.
189 * peXXigen.c (_bfd_XXi_swap_sym_in): Replace abort()'s with error
191 (_bfd_XXi_swap_aux_in): Make sure that all fields of the aux
192 structure are initialised.
193 (pe_print_edata): Avoid reading off the end of the data buffer.
195 2014-11-11 Alan Modra <amodra@gmail.com>
198 * coffcode.h (coff_slurp_line_table): Use updated lineno_count
199 when building func_table.
201 2014-11-11 Alan Modra <amodra@gmail.com>
204 * coffcode.h (coff_slurp_line_table): Don't bfd_zalloc, just
205 memset the particular bits we need. Update src after hitting loop
206 "continue". Don't count lineno omitted due to invalid symbols in
207 nbr_func, and update lineno_count. Init entire terminating
208 lineno. Don't both allocating terminator in n_lineno_cache.
209 Redirect sym->lineno pointer to where n_lineno_cache will be
210 copied, and free n_lineno_cache.
211 * pe-mips.c (NUM_HOWTOS): Typo fix.
213 2014-11-11 Alan Modra <amodra@gmail.com>
215 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust section
216 size check to account for possible zero terminator.
218 2014-11-10 James Cowgill <James.Cowgill@imgtec.com>
220 * elfxx-mips.c (_bfd_mips_elf_section_processing): don't force small
221 data sections to be PROGBITS
223 2014-11-10 Nick Clifton <nickc@redhat.com>
226 * coff-i386.c (NUM_HOWTOS): New define.
227 (RTYPE2HOWTO): Use it.
228 (coff_i386_rtype_to_howto): Likewise.
229 (coff_i386_reloc_name_lookup): Likewise.
230 (CALC_ADDEND): Check that reloc r_type field is valid.
231 * coff-x86_64.c (NUM_HOWTOS): New define.
232 (RTYPE2HOWTO): Use it.
233 (coff_amd64_rtype_to_howto): Likewise.
234 (coff_amd64_reloc_name_lookup): Likewise.
235 (CALC_ADDEND): Check that reloc r_type field is valid.
236 * coffcode.h (coff_slurp_line_table): Check for symbol table
238 (coff_slurp_symbol_table): Use zalloc to ensure that all table
239 entries are initialised.
240 * coffgen.c (_bfd_coff_read_string_table): Initialise unused bits
241 in the string table. Also ensure that the table is 0 terminated.
242 (coff_get_normalized_symtab): Check for symbol table indexing
244 * opncls.c (bfd_alloc): Catch the case where a small negative size
245 can result in only 1 byte being allocated.
246 (bfd_alloc2): Use bfd_alloc.
247 * pe-mips.c (NUM_HOWTOS): New define.
248 (coff_mips_reloc_name_lookup): Use it.
249 (CALC_ADDEND): Check that reloc r_type field is valid.
250 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Initialise unused entries
251 in the DataDirectory.
252 (pe_print_idata): Avoid reading beyond the end of the data block
253 wen printing strings.
254 (pe_print_edata): Likewise.
255 Check for table indexing underflow.
256 * peicode.h (pe_mkobject): Initialise the pe_opthdr field.
257 (pe_bfd_object_p): Allocate and initialize enough space to hold a
258 PEAOUTHDR, even if the opt_hdr field specified less.
260 2014-11-08 Alan Modra <amodra@gmail.com>
262 * peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
264 2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
266 * peXXigen.c (pe_print_idata): Cast to unsigned long in range
269 2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
272 * elf64-x86-64.c (elf_x86_64_relocate_section): Update comments
273 for IE->LE transition.
275 2014-11-07 Alan Modra <amodra@gmail.com>
277 * tekhex.c (tekhex_set_arch_mach): Ignore unknown arch errors.
279 2014-11-07 Alan Modra <amodra@gmail.com>
281 * tekhex.c (CHUNK_SPAN): Define.
282 (struct data_struct <chunk_init>): Use one byte per span, update
283 all code accessing this field.
284 (find_chunk): Add create param, don't create new entry unless set.
285 (insert_byte): Don't save zeros.
286 (first_phase): Set section SEC_CODE or SEC_DATA flag depending
287 on symbol type. Create an alternate section if both types of
288 symbol are given. Attach type '2' and '6' symbols to absolute
290 (move_section_contents): Fix caching of chunk. Don't create chunk
291 when reading, or for writing zeros.
292 (tekhex_set_section_contents): Don't create initial chunks.
293 (tekhex_write_object_contents): Use CHUNK_SPAN.
295 2014-11-07 Alan Modra <amodra@gmail.com>
297 * aoutx.h (aout_get_external_symbols): Tidy allocation of symbol buffer.
299 2014-11-07 Alan Modra <amodra@gmail.com>
301 * archive.c (_bfd_slurp_extended_name_table): Revert bfd_get_size check.
302 * coffcode.h (coff_set_alignment_hook): Likewise.
303 (coff_slurp_line_table): Likewise.
304 * coffgen.c (coff_get_normalized_symtab): Likewise.
305 (_bfd_coff_get_external_symbols): Likewise.
306 * elf.c (bfd_elf_get_str_section): Likewise.
307 * tekhex.c (first_phase): Likewise.
309 2014-11-06 Nick Clifton <nickc@redhat.com>
311 * aoutx.h (slurp_symbol_table): Revert previous delta.
312 (slurp_reloc_table): Likewise.
313 * compress.c (bfd_get_full_section_contents): Remove file size
315 * coffgen.c (coff_get_normalized_symtab): Allow zero-sized symtabs
316 and do not complain about linker generated files.
318 2014-11-06 Will Newton <will.newton@linaro.org>
320 * elf-attrs.c (_bfd_elf_parse_attributes): Handle zero
321 length sections and sub-sections.
323 2014-11-04 Nick Clifton <nickc@redhat.com>
326 * coffcode.h (handle_COMDAT): Replace abort with BFD_ASSERT.
327 Replace another abort with an error message.
328 (coff_slurp_line_table): Add more range checking.
329 * peXXigen.c (pe_print_debugdata): Add range checking.
331 2014-11-05 James Cowgill <james.cowgill@imgtec.com>
333 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Fix segfault
334 when creating a dso with discarded dynsym section.
336 2014-11-05 Matthew Fortune <matthew.fortune@imgtec.com>
338 * elfxx-mips.c (update_mips_abiflags_isa): Add E_MIPS_ARCH_32R6
339 and E_MIPS_ARCH_64R6 support.
341 2014-11-05 Nick Clifton <nickc@redhat.com>
344 * coffcode.h (coff_set_alignment_hook): Warn if the file lies
345 about the number of relocations it contains.
346 (coff_sort_func_alent): Return 0 if the pointers are NULL.
347 (coff_slurp_line_table): Add more range checks. Do not free new
348 tables created when sorting line numbers.
349 * peXXigen.c (pe_print_idata): Add range checks.
350 (pe_print_edata): Likewise.
351 (rsrc_print_resource_entries): Likewise. Avoid printing control
352 characters. Terminate priniting if corruption is detected.
353 (rsrc_print_resource_directory): Terminate printing if an unknown
354 directory type is encountered.
355 (pe_print_debugdata): Fix off-by-one error.
356 (rsrc_count_entries): Add range checking.
357 (rsrc_parse_entry): Likewise.
359 2014-11-04 Nick Clifton <nickc@redhat.com>
362 * compress.c (bfd_get_full_section_contents): Improve test for
363 linker created objects.
366 * archive.c (_bfd_slurp_extended_name_table): Handle archives with
367 corrupt extended name tables.
369 2014-11-04 Alan Modra <amodra@gmail.com>
371 * elf32-spu.c (ovl_mgr_stat): New function.
372 (spu_elf_open_builtin_lib): Pass to bfd_openr_iovec.
374 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
376 * elf32-avr.c (elf32_avr_relax_delete_bytes): During linker
377 relaxation, reduce the size of symbols that span the deleted
380 2014-11-03 Andrew Burgess <andrew.burgess@embecosm.com>
382 * elf32-avr.c (elf32_avr_relax_delete_bytes): Modify symbols
383 located at the very end of the section.
385 2014-11-03 Nick Clifton <nickc@redhat.com>
388 * aoutx.h (slurp_symbol_table): Check that computed table size is
389 not bigger than the file from which is it being read.
390 (slurp_reloc_table): Likewise.
391 * coffcode.h (coff_slurp_line_table): Remove unneeded local
392 'warned'. Do not try to print the details of a symbol with an
394 * coffgen.c (make_a_sectiobn_from_file): Check computed string
395 index against length of string table.
396 (bfd_coff_internal_syment_name): Check read in string offset
397 against length of string table.
398 (build_debug_section): Return a pointer to the section used.
399 (_bfd_coff_read_string_table): Store the length of the string
400 table in the coff_tdata structure.
401 (bfd_coff_free_symbols): Set the length of the string table to
402 zero when it is freed.
403 (coff_get_normalized_symtab): Check offsets against string table
404 or data table lengths as appropriate.
405 * cofflink.c (_bfd_coff_link_input_bfd): Check offset against
406 length of string table.
407 * compress.c (bfd_get_full_section_contents): Check computed size
408 against the size of the file.
409 * libcoff-in.h (obj_coff_strings_len): Define.
410 (struct coff_tdata): Add strings_len field.
411 * libcoff.h: Regenerate.
412 * peXXigen.c (pe_print_debugdata): Do not attempt to print the
413 data if the debug section is too small.
414 * xcofflink.c (xcoff_link_input_bfd): Check offset against
415 length of string table.
417 2014-11-03 Nick Clifton <nickc@redhat.com>
419 * po/fi.po: Updated Finnish translation.
421 2014-10-31 Andrew Pinski <apinski@cavium.com>
422 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
424 * archures.c: Add octeon3 for mips target.
425 * bfd-in2.h: Regenerate.
426 * bfd/cpu-mips.c: Define I_mipsocteon3.
427 nfo_struct): Add octeon3 support.
428 * bfd/elfxx-mips.c: (_bfd_elf_mips_mach): Add support for
430 (mips_set_isa_flags): Add support for octeon3.
431 (bfd_mips_isa_ext): Add bfd_mach_mips_octeon3.
432 (mips_mach_extensions): Make bfd_mach_mips_octeon3 an
433 extension of bfd_mach_mips_octeon2.
434 (print_mips_isa_ext): Print the value of Octeon3.
436 2014-10-31 Nick Clifton <nickc@redhat.com>
439 * coffgen.c (_bfd_coff_get_external_symbols): Do not try to load a
440 symbol table bigger than the file.
441 * elf.c (bfd_elf_get_str_section): Do not try to load a string
442 table bigger than the file.
443 * tekhex.c (first_phase): Check that the section range is sane.
445 2014-10-30 Nick Clifton <nickc@redhat.com>
448 * ihex.c (ihex_scan): Fix typo in invocation of ihex_bad_byte.
449 * coffgen.c (coff_get_normalized_symtab): Prevent buffer overrun.
451 2014-10-29 Nick Clifton <nickc@redhat.com>
453 * elf.c (bfd_section_from_shdr): Fix heap use after free memory
456 2014-10-29 Dennis Brueni <dbrueni@slickedit.com>
458 * elf.c (elfcore_write_lwpstatus): Fix typo in call to memcpy.
460 2014-10-28 Nick Clifton <nickc@redhat.com>
463 * elf.c (bfd_section_from_shdr): Allocate and free the recursion
464 detection table on a per-bfd basis.
465 * peXXigen.c (pe_print_edata): Handle binaries with a truncated
468 2014-10-28 Andreas Schwab <schwab@suse.de>
469 Nick Clifton <nickc@redhat.com>
472 * srec.c (srec_bad_byte): Increase size of buf to allow for
474 (srec_scan): Use an unsigned char buffer to hold header bytes.
476 2014-10-27 Nick Clifton <nickc@redhat.com>
479 * elf.c (bfd_section_from_shdr): Detect and warn about ELF
480 binaries with a group of sections linked by the string table
482 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Handle corrupt binaries
483 with an invalid value for NumberOfRvaAndSizes.
484 (pe_print_edata): Detect out of range rvas and entry counts for
485 the Export Address table, Name Pointer table and Ordinal table.
488 * elf.c (setup_group): Improve handling of corrupt group
491 2014-10-24 Tejas Belagod <tejas.belagod@arm.com>
493 * bfd-in.h (bfd_elf64_aarch64_set_options): Add a parameter.
494 * bfd-in2.h (bfd_elf64_aarch64_set_options): Likewise.
495 * elfnn-aarch64.c (aarch64_erratum_835769_stub): New.
496 (elf_aarch64_stub_type): Add new type
497 aarch64_stub_erratum_835769_veneer.
498 (elf_aarch64_stub_hash_entry): New fields for erratum 835769.
499 (aarch64_erratum_835769_fix): New data struct to record erratum
501 (elf_aarch64_link_hash_table: Global flags for 835769.
502 (aarch64_build_one_stub): Add case for 835769.
503 (aarch64_size_one_stub): Likewise.
504 (aarch64_mem_op_p, aarch64_mlxl_p,
505 aarch64_erratum_sequence,erratum_835769_scan):
506 New. Decode and scan functions for erratum 835769.
507 (elf_aarch64_create_or_find_stub_sec): New.
508 (elfNN_aarch64_size_stubs): Look for erratum 835769 and record
510 (bfd_elfNN_aarch64_set_options: Set global flag for 835769.
511 (erratum_835769_branch_to_stub_data,
512 make_branch_to_erratum_835769_stub):New. Connect up all the
513 erratum stubs to occurances by branches.
514 (elfNN_aarch64_write_section): New hook.
515 (aarch64_map_one_stub): Output erratum stub symbol.
516 (elfNN_aarch64_size_dynamic_sections): Init mapping symbol
517 information for erratum 835769.
518 (elf_backend_write_section): Define.
520 2014-10-23 Victor Kamensky <victor.kamensky@linaro.org>
522 * elf32-arm.c (read_code32): New function to read 32 bit
524 (read_code16): New function to read 16 bit thumb instrution.
525 (elf32_arm_plt0_size, elf32_arm_plt_size): Use read_code32
526 and read_code16 to read instructions.
528 2014-10-22 Matthew Fortune <matthew.fortune@imgtec.com>
530 * elfxx-mips.c (print_mips_ases): Print unknown ASEs.
531 (print_mips_isa_ext): Print the value of an unknown extension.
533 2014-10-21 Alan Modra <amodra@gmail.com>
535 * elf64-ppc.c (ppc64_elf_tls_optimize): Ignore relocs against toc
536 entries that aren't a multiple of 8 rather than failing assertion.
538 2014-10-21 Alan Modra <amodra@gmail.com>
540 * elf64-ppc.c (ppc64_elf_size_stubs): Add gcc-4.9 libgomp functions
543 2014-10-18 Alan Modra <amodra@gmail.com>
545 * elf64-ppc.c (ppc64_elf_add_symbol_hook): If function code
546 section for function symbols defined in .opd is discarded, let
547 the symbol appear to be undefined.
548 (opd_entry_value): Ensure the result section is that for the
549 function code section in the same object as the OPD entry.
551 2014-10-16 Alan Modra <amodra@gmail.com>
554 * elf32-arm.c (elf32_arm_add_symbol_hook): Only set has_gnu_symbols
556 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
557 * elf32-m68k.c (elf_m68k_add_symbol_hook): Likewise.
558 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
559 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
560 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
561 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
562 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
563 * elfxx-aarch64.c (_bfd_aarch64_elf_add_symbol_hook): Likewise.
564 * elf-s390-common.c (elf_s390_add_symbol_hook): Likewise. Handle
567 2014-10-16 Alan Modra <amodra@gmail.com>
569 * elf64-ppc.c (ppc64_elf_before_check_relocs): Do .opd processing
570 even when output is not ppc64 ELF. Remove redundant tests on
573 2014-10-15 Alan Modra <amodra@gmail.com>
576 * aoutx.h (NAME (aout, find_nearest_line)): Add "discriminator_ptr"
577 param, group "section" and "offset" params. Zero discriminator.
578 * bfd.c (bfd_find_nearest_line): Implement with new
579 _bfd_find_nearest_line.
580 (bfd_find_nearest_line_discriminator): Likewise.
581 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator): Don't
583 * coff-rs6000.c (xcoff_find_nearest_line,
584 xcoff_find_nearest_line_discriminator): Delete.
585 (_bfd_xcoff_find_nearest_line): Don't define.
586 (_bfd_xcoff_find_nearest_line): Define as coff_find_nearest_line.
587 * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator): Don't
589 * coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Adjust.
590 * coffgen.c (coff_find_nearest_line_with_names): Reorder params,
591 adjust _bfd_dwarf2_find_nearest_line call.
592 (coff_find_nearest_line): Add "discriminator_ptr" param, reorder
593 others. Set discriminator. Adjust call.
594 (coff_find_nearest_line_discriminator): Delete.
595 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Reorder params.
596 * dwarf2.c (find_line): Rename to..
597 (_bfd_dwarf2_find_nearest_line): ..this, reordering params.
598 Simplify setting of do_line. Delete old function.
599 (_bfd_dwarf2_find_line): Delete.
600 * ecoff.c (_bfd_ecoff_find_nearest_line): Reorder params, add
601 discriminator_ptr and set it.
602 * elf-bfd.h (_bfd_elf_find_nearest_line): Update prototype.
603 (_bfd_elf_find_nearest_line_discriminator): Delete.
604 (_bfd_elf_find_line_discriminator): Delete.
605 (_bfd_generic_find_nearest_line_discriminator): Don't define.
606 * elf.c (elf_find_function): Reorder params.
607 (_bfd_elf_find_nearest_line): Reorder params, add discriminator_ptr.
609 (_bfd_elf_find_nearest_line_discriminator): Delete.
610 (_bfd_elf_find_line): Adjust call.
611 * elf32-arm.c (arm_elf_find_function): Reorder params.
612 (elf32_arm_find_nearest_line): Reorder params, add discriminator_ptr.
614 * elf64-alpha.c (elf64_alpha_find_nearest_line): Similarly.
615 * elfnn-aarch64.c (aarch64_elf_find_function): Reorder params.
616 (elfNN_aarch64_find_nearest_line): Reorder params, add
617 discriminator_ptr. Adjust calls.
618 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Similarly.
619 * elfxx-mips.h (_bfd_mips_elf_find_nearest_line): Update prototype.
620 * libaout.h (NAME (aout, find_nearest_line)): Update prototype.
621 * libbfd-in.h (_bfd_nosymbols_find_nearest_line): Update.
622 (_bfd_dwarf1_find_nearest_line): Likewise.
623 (_bfd_dwarf2_find_nearest_line): Likewise.
624 (_bfd_dwarf2_find_line): Delete.
625 (_bfd_generic_find_nearest_line_discriminator): Delete.
626 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): Delete.
627 * libcoff-in.h (coff_find_nearest_line): Update prototype.
628 (coff_find_nearest_line_discriminator): Delete.
629 (coff_find_nearest_line_with_names): Update prototype.
630 * libecoff.h (_bfd_ecoff_find_nearest_line): Update prototype.
631 * mach-o.c (bfd_mach_o_find_nearest_line): Reorder params, add
632 discriminator_ptr. Adjust calls.
633 * mach-o.h (bfd_mach_o_find_nearest_line): Update prototype.
634 * pdp11.c (NAME (aout, find_nearest_line)): Reorder params, add
635 discriminator_ptr and set.
636 * som.c (som_find_nearest_line): Similarly.
637 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Delete entry for
638 _bfd_find_nearest_line_discriminator.
639 (struct bfd_target <_bfd_find_nearest_line>): Adjust prototype.
640 (struct bfd_target <_bfd_find_nearest_line_discriminator>): Delete.
641 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Rename to..
642 (_bfd_vms_find_nearest_line): ..this. Reorder params, add
643 "discriminator" and set.
644 (_bfd_vms_find_nearest_line_discriminator): Delete.
645 (_bfd_generic_find_nearest_line_discriminator): Don't define.
646 (alpha_vms_find_nearest_line): Update define.
647 * bfd-in2.h: Regenerate.
648 * libbfd.h: Regenerate.
649 * libcoff.h: Regenerate.
651 2014-10-15 Alan Modra <amodra@gmail.com>
653 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Use NAME##_find_line.
654 * aout-adobe.c (aout_32_find_line): Define.
655 (aout_32_bfd_make_debug_symbol, aout_32_bfd_reloc_type_lookup,
656 aout_32_bfd_reloc_name_lookup): Define using _bfd_nosymbols define.
657 * aout-target.h (MY_find_line): Define.
658 * aout-tic30.c (MY_find_line): Define.
659 * binary.c (binary_find_line): Define.
660 * bout.c (aout_32_find_line): Define.
661 * coff-rs6000.c (_bfd_xcoff_find_line): Define.
662 * coff64-rs6000.c (rs6000_xcoff64_vec): Use coff_find_line.
663 (rs6000_xcoff64_aix_vec): Likewise.
664 * elf-bfd.h (_bfd_generic_find_line): Don't define.
665 * elfxx-target.h (bfd_elfNN_find_line): Define.
666 * i386msdos.c (msdos_find_line): Define.
667 * i386os9k.c (aout_32_find_line): Define.
668 * ieee.c (ieee_find_nearest_line, ieee_find_inliner_info): Delete func.
669 (ieee_find_nearest_line, ieee_find_line,
670 ieee_find_inliner_info): Define.
671 * ihex.c (ihex_find_line): Define.
672 * libbfd-in.h (_bfd_nosymbols_find_line): Define.
673 (_bfd_generic_find_line): Don't define.
674 * libbfd.c (_bfd_generic_find_line): Delete.
675 * libcoff-in.h (coff_find_line): Define.
676 * libecoff.h (_bfd_ecoff_find_line): Define.
677 * mach-o.h (bfd_mach_o_find_line): Define.
678 * mmo.c (mmo_find_line): Define.
679 * nlm-target.h (nlm_find_line): Define.
680 * oasys.c (oasys_find_nearest_line, oasys_find_inliner_info): Delete.
681 (oasys_find_nearest_line, oasys_find_line,
682 oasys_find_inliner_info): Define.
683 * pef.c (bfd_pef_find_line): Define.
684 * plugin.c (bfd_plugin_find_line): Define.
685 * ppcboot.c (ppcboot_find_line): Define.
686 * som.c (som_find_line): Define.
687 * srec.c (srec_find_line): Define.
688 * tekhex.c (tekhex_find_line): Define.
689 * versados.c (versados_find_line): Define.
690 * vms-alpha.c (alpha_vms_find_line): Define.
691 * xsym.c (bfd_sym_find_line): Define.
692 * bfd-in2.h: Regenerate.
693 * libbfd.h: Regenerate.
694 * libcoff.h: Regenerate.
696 2014-10-15 Tristan Gingold <gingold@adacore.com>
698 * version.m4: Bump version to 2.25.51
699 * configure: Regenerate.
701 2014-10-14 H.J. Lu <hongjiu.lu@intel.com>
703 * elf32-i386.c (elf_i386_convert_mov_to_lea): Skip if relocation
704 offset is less than 2.
705 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
707 2014-10-14 Alan Modra <amodra@gmail.com>
710 * libbfd.c (COERCE16, COERCE32, COERCE64): Use unsigned types.
711 (EIGHT_GAZILLION): Delete.
713 2014-10-13 Alan Modra <amodra@gmail.com>
716 * elf-eh-frame.c (ENSURE_NO_RELOCS): Don't stop at first NONE reloc.
717 (_bfd_elf_parse_eh_frame): When relocatable output, don't set
718 flags enabling conversion of CIEs and FDEs to use relative encoding.
719 (find_merged_cie): Similarly.
720 (_bfd_elf_write_section_eh_frame): Don't edit FDEs when
721 relocatable, except for CIE pointer.
722 * elflink.c (bfd_elf_reloc_symbol_deleted_p): Return true for
723 relocs against symbols in dropped comdat group sections.
724 (bfd_elf_discard_info): Do some eh_frame optimisation when
727 2014-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
729 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): Handle
730 the hwcaps2 object attribute.
732 2014-10-04 Alan Modra <amodra@gmail.com>
735 * elf-bfd.h (struct eh_cie_fde): Comment re NULL u.fde.cie_inf.
736 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Mark zero address
737 range FDEs for discarding.
738 (vma_compare): Sort on range after address.
739 (_bfd_elf_gc_mark_fdes): Test for NULL u.fde.cie_inf.
740 (_bfd_elf_discard_section_eh_frame): Likewise. Write "FDE" in
741 error message rather than "fde".
742 (_bfd_elf_write_section_eh_frame_hdr): Write "PC" and "FDE" in
745 2014-09-29 H.J. Lu <hongjiu.lu@intel.com>
748 * elf32-i386.c (elf_i386_fbsd_post_process_headers): Fix build
749 for OLD_FREEBSD_ABI_LABEL.
751 2014-09-24 Markus Trippelsdorf <markus@trippelsdorf.de>
754 * plugin.c (try_claim): New function. Moved from
756 (try_load_plugin): Pass through bfd. Add test.
757 (load_plugin): Pass through bfd.
758 (bfd_plugin_object_p): Move logic to try_claim.
760 2014-09-23 Sterling Augustine <augustine.sterling@gmail.com>
762 * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section
763 call relaxation use furthermost addresses where call source and
764 destination can be to check whether it's in the range of a direct
767 2014-09-22 Alan Modra <amodra@gmail.com>
769 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): Don't return
770 false for overflow or overlapping FDEs. Give more detail in
773 2014-09-22 Andrew Bennett <andrew.bennett@imgtec.com>
775 * elfxx-mips.c (mips_elf_calculate_relocation): Don't sign extend
776 the addend if relocations are RELA.
778 2014-09-22 Kuan-Lin Chen <kuanlinchentw@gmail.com>
780 * elf32-nds32.c (nds32_elf_ex9_build_hash_table,
781 nds32_elf_ex9_relocation_check): Synchronize the argument type.
783 2014-09-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
785 * elf32-s390.c: Don't replace R_390_TLS_LE32 with R_390_TLS_TPOFF
787 * elf64-s390.c: Don't replace R_390_TLS_LE64 with R_390_TLS_TPOFF
790 2014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>
793 * elfcode.h (bfd_from_remote_memory): Use SIZE for HIGH_OFFSET.
795 2014-09-16 Terry Guo <terry.guo@arm.com>
797 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Return false if
800 2014-09-16 Kuan-Lin Chen <kuanlinchentw@gmail.com>
802 * bfd-in2.h: Regenerate.
803 * elf32-nds32.c (nds32_elf_mkobject): Hook bfd_elf32_mkobject.
804 (nds32_elf_relax_section): Code refactoring.
805 (nds32_elf_relax_longcall1, nds32_elf_relax_longcall2,
806 nds32_elf_relax_longcall3, nds32_elf_relax_longcall4,
807 nds32_elf_relax_longcall5, nds32_elf_relax_longcall6): Relax call
808 pattern. The first three is moved from nds32_elf_relax_section,
809 and the last three is new function.
810 (nds32_elf_relax_longjump1, nds32_elf_relax_longjump2,
811 nds32_elf_relax_longjump3, nds32_elf_relax_longjump4,
812 nds32_elf_relax_longjump5, nds32_elf_relax_longjump6,
813 nds32_elf_relax_longjump7): Relax condition branch pattern. The first
814 three is moved from nds32_elf_relax_section, and the last four
816 (nds32_elf_relax_loadstore, nds32_elf_relax_lo12): Relax load-store
817 pattern and address setting pattern.
818 (nds32_elf_relax_piclo12, nds32_elf_relax_ptr,
819 nds32_elf_relax_pltgot_suff, nds32_elf_relax_got_suff,
820 nds32_elf_relax_gotoff_suff): Relax pic pattern.
821 (nds32_elf_relax_letlslo12, nds32_elf_relax_letlsadd,
822 nds32_elf_relax_letlsls): Relax TLS pattern.
823 (nds32_relax_adjust_label): Adjust alignment and nop.
824 (nds32_elf_pick_relax): Choose relaxation optimization.
825 (nds32_elf_get_relocated_section_contents): New hook.
826 (nds32_elf_order_insn_times, nds32_elf_ex9_build_itable): Release ex9
828 * elf32-nds32.h: Declare.
829 * libbfd.h: Regenerate.
830 * reloc.c: Add nds32 new relocations.
832 2014-09-15 Chen Gang <gang.chen.5i5j@gmail.com>
834 * dwarf2.c (find_abstract_instance_name): Use 'form' instead of
835 'name' for the typo issue, which related with commit
836 60d77146a249ae9b51d7ce98930cdbedb2cfa352.
838 2014-09-15 Andrew Bennett <andrew.bennett@imgtec.com>
839 Matthew Fortune <matthew.fortune@imgtec.com>
841 * aoutx.h (NAME (aout, machine_type)): Add mips32r6 and mips64r6.
842 * archures.c (bfd_architecture): Likewise.
843 * bfd-in2.h (bfd_architecture): Likewise.
844 (bfd_reloc_code_real): Add relocs BFD_RELOC_MIPS_21_PCREL_S2,
845 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
846 BFD_RELOC_MIPS_19_PCREL_S2.
847 * cpu-mips.c (arch_info_struct): Add mips32r6 and mips64r6.
848 * elf32-mips.c: Define relocs R_MIPS_PC21_S2, R_MIPS_PC26_S2
849 R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16 and R_MIPS_PCLO16.
850 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
851 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
852 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
853 BFD_RELOC_LO16_PCREL.
854 * elf64-mips.c: Define REL, and RELA relocations R_MIPS_PC21_S2,
855 R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2, R_MIPS_PCHI16
857 (mips_reloc_map): Add entries for BFD_RELOC_MIPS_21_PCREL_S2,
858 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3,
859 BFD_RELOC_MIPS_19_PCREL_S2, BFD_RELOC_HI16_S_PCREL and
860 BFD_RELOC_LO16_PCREL.
861 * elfn32-mips.c: Likewise.
862 * elfxx-mips.c (MIPSR6_P): New define.
863 (mipsr6_exec_plt_entry): New array.
864 (hi16_reloc_p): Add support for R_MIPS_PCHI16.
865 (lo16_reloc_p): Add support for R_MIPS_PCLO16.
866 (aligned_pcrel_reloc_p): New function.
867 (mips_elf_relocation_needs_la25_stub): Add support for relocs:
868 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
869 (mips_elf_calculate_relocation): Add support for relocs:
870 R_MIPS_PC21_S2, R_MIPS_PC26_S2, R_MIPS_PC18_S3, R_MIPS_PC19_S2,
871 R_MIPS_PCHI16 and R_MIPS_PCLO16.
872 (_bfd_elf_mips_mach): Add support for mips32r6 and mips64r6.
873 (mips_elf_add_lo16_rel_addend): Add support for R_MIPS_PCHI16.
874 (_bfd_mips_elf_check_relocs): Add support for relocs:
875 R_MIPS_PC21_S2 and R_MIPS_PC26_S2.
876 (_bfd_mips_elf_relocate_section): Add a check for unaligned
878 (_bfd_mips_elf_finish_dynamic_symbol): Add support for MIPS r6
880 (mips_set_isa_flags): Add support for mips32r6 and mips64r6.
881 (_bfd_mips_elf_print_private_bfd_data): Likewise.
882 (mips_32bit_flags_p): Add support for mips32r6.
883 * libbfd.h (bfd_reloc_code_real_names): Add entries for
884 BFD_RELOC_MIPS_21_PCREL_S2, BFD_RELOC_MIPS_26_PCREL_S2,
885 BFD_RELOC_MIPS_18_PCREL_S3 and BFD_RELOC_MIPS_19_PCREL_S2.
886 * reloc.c: Document relocs BFD_RELOC_MIPS_21_PCREL_S2,
887 BFD_RELOC_MIPS_26_PCREL_S2, BFD_RELOC_MIPS_18_PCREL_S3 and
888 BFD_RELOC_MIPS_19_PCREL_S2.
889 * config.bfd: Add mips*-img-elf* target triple.
891 2014-09-12 Andrew Bennett <andrew.bennett@imgtec.com>
893 * config.bfd: Add mips*-img-elf* target triple.
895 2014-09-12 Alan Modra <amodra@gmail.com>
897 * elf-bfd.h (struct eh_frame_array_ent): Add "range".
898 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Stash address
899 range of FDEs to hdr_info->array.
900 (_bfd_elf_write_section_eh_frame_hdr): Report overflow in
901 .eh_frame_hdr entries, and overlapping FDEs.
903 2014-09-10 Alan Modra <amodra@gmail.com>
905 * elf.c (assign_file_positions_except_relocs): Move section header
907 (_bfd_elf_assign_file_positions_for_relocs): ..here. Make static.
908 * elf-bfd.h (_bfd_elf_assign_file_positions_for_relocs): Delete.
909 * elflink.c (bfd_elf_final_link): Don't call above function.
911 2014-08-30 Alan Modra <amodra@gmail.com>
913 * elf32-ppc.c (ppc_elf_relax_section): Fix off by one error.
915 2014-08-29 Alan Modra <amodra@gmail.com>
917 * elf64-ppc.c (ppc64_elf_relocate_section): Report a different
918 error for calls via a toc adjusting stub without a nop.
920 2014-08-29 Alan Modra <amodra@gmail.com>
922 * vms-alpha.c (alpha_vma_object_p): Don't return file_truncated
923 error. Remove redundant bfd_set_error.
925 2014-08-29 Alan Modra <amodra@gmail.com>
927 * srec.c (srec_scan): Revert last change. Report an error for
928 S-records with less than the miniumum byte count.
930 2014-08-28 H.J. Lu <hongjiu.lu@intel.com>
932 * srec.c (srec_scan): Return error for 0 size.
934 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
937 * elf32-i386.c (elf_i386_convert_mov_to_lea): Use bfd_is_abs_section
938 to check discarded input section.
939 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
941 2014-08-27 H.J. Lu <hongjiu.lu@intel.com>
944 * elflink.c (elf_link_add_object_symbols): Don't attach dynamic
945 sections to input from ld --just-symbols.
947 2014-08-26 DJ Delorie <dj@redhat.com>
949 * elf32-rl78.c (rl78_elf_relax_section): Disambiguate test for
952 2014-08-26 Jiong Wang <jiong.wang@arm.com>
954 * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Initialize non_got_ref
955 properly for MOVW_G0/1/2_NC and MOVW_G3. Reject them when linking
957 (elfNN_aarch64_gc_sweep_hook): Add check on these relocs.
959 2014-08-26 Nick Clifton <nickc@redhat.com>
961 * config.bfd: Fix typo in or1knd selection.
963 2014-08-22 Kai Tietz <ktietz@redhat.com>
966 * coffcode.h (coff_compute_section_file_positions): Keep
967 FileAlignment valid as set.
969 2014-08-22 Alan Modra <amodra@gmail.com>
971 * elf-eh-frame.c (struct cie): Delete "output_sec" field.
972 (cie_eq, cie_compute_hash): Use output_section from cie_inf instead.
974 2014-08-22 Alan Modra <amodra@gmail.com>
976 * elf-bfd.h (struct eh_frame_hdr_info): Delete merge_cies and
978 (_bfd_elf_begin_eh_frame_parsing): Delete.
979 (_bfd_elf_end_eh_frame_parsing): Delete.
980 * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): Delete.
981 (_bfd_elf_end_eh_frame_parsing): Delete.
982 (_bfd_elf_parse_eh_frame): Don't test parsed_eh_frame. Test
983 !info->relocatable in place of merge_cies.
984 * elflink.c (bfd_elf_gc_sections, bfd_elf_discard_info): Adjust.
985 * elf64-ppc.c (glink_eh_frame_cie): Pad to multiple of 8.
986 (ppc64_elf_size_stubs): Likewise pad stub FDE.
987 (ppc64_elf_build_stubs): Move code setting glink .eh_frame to..
988 (ppc64_elf_size_stubs): ..here and..
989 (ppc64_elf_finish_dynamic_sections): ..here.
991 2014-08-21 Maciej W. Rozycki <macro@codesourcery.com>
993 * elf64-ppc.h (ppc64_elf_set_toc): Fix indentation.
995 2014-08-21 Tony Wang <tony.wang@arm.com>
997 * elf32-arm.c (elf32_arm_final_link_relocate): Implement
998 the veneer routine for R_ARM_THM_JUMP19.
999 (arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19
1000 (elf32_arm_size_stub): Ditto.
1002 2014-08-20 Roland McGrath <mcgrathr@google.com>
1005 * elf32-arm.c (elf32_arm_check_relocs): Increment P->pc_count for
1006 all reloc types with pc_relative set in the howto, not just for
1007 R_ARM_REL32 and R_ARM_REL32_NOI.
1008 (allocate_dynrelocs_for_symbol): Update comment.
1009 (elf32_arm_gc_sweep_hook): For all reloc types with pc_relative
1010 set in the howto, set call_reloc_p and may_need_local_target_p but
1011 not may_become_dynamic_p; not only for R_ARM_REL32 and R_ARM_REL32_NOI.
1012 (elf32_arm_check_relocs): Likewise.
1014 2014-08-20 Will Newton <will.newton@linaro.org>
1016 * config.bfd: Default armeb-*-eabi* to big endian.
1018 2014-08-19 Alan Modra <amodra@gmail.com>
1020 * configure: Regenerate.
1022 2014-08-18 Alan Modra <amodra@gmail.com>
1024 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't attempt to
1025 use dynrelocs for ifunc.
1026 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Similarly.
1028 2014-08-18 Alan Modra <amodra@gmail.com>
1031 * elflink.c (on_needed_list): Only consider libraries that have
1034 2014-08-18 Alan Modra <amodra@gmail.com>
1036 * elflink.c (bfd_elf_discard_info): Return int error status.
1037 * stabs.c (_bfd_discard_section_stabs): Comment typo fix.
1038 * bfd-in.h (bfd_elf_discard_info): Updata prototype.
1039 * bfd-in2.h: Regenerate.
1041 2014-08-14 Alan Modra <amodra@gmail.com>
1043 * peXXigen.c (pe_print_reloc): Protect against access past end
1046 2014-08-14 Alan Modra <amodra@gmail.com>
1049 * elflink.c (bfd_elf_discard_info): Process .eh_frame and .stab
1050 in the order they are mapped to output sections.
1052 2014-08-14 Alan Modra <amodra@gmail.com>
1054 * configure.ac: Delete redundant plugin related checks.
1055 * configure: Regenerate.
1057 2014-08-13 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
1059 * elf32-or1k.c (or1k_elf_relocate_section, or1k_elf_check_relocs,
1060 allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL
1063 2014-08-12 Alan Modra <amodra@gmail.com>
1065 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Only call "notice"
1066 here when not calling the generic add_symbol function. Formatting.
1067 Correct handling of indirect symbols. Update notice call.
1068 * elflink.c (_bfd_elf_notice_as_needed): Update notice call.
1069 * linker.c (_bfd_generic_link_add_one_symbol): Create indirect
1070 symbols early. Update notice call. Add comments regarding weak
1071 symbols vs. indirect.
1073 2014-08-12 Alan Modra <amodra@gmail.com>
1076 * linker.c (_bfd_generic_link_add_one_symbol <WARN>): Handle
1079 2014-08-07 Chen Gang <gang.chen.5i5j@gmail.com>
1081 * coff-ppc.c (coff_ppc_relocate_section): Ensure local symbols are
1084 2014-08-07 H.J. Lu <hongjiu.lu@intel.com>
1085 Alan Modra <amodra@gmail.com>
1088 * linker.c (_bfd_generic_link_add_one_symbol): Don't issue a
1089 warning for references in LTO IR to warning symbols.
1091 2014-08-07 Alan Modra <amodra@gmail.com>
1093 * linker.c (WARN, CWARN): Collapse these states to WARN.
1094 (_bfd_generic_link_add_one_symbol): Use old CWARN case for
1097 2014-08-05 Doug Evans <dje@google.com>
1099 * bfd-in2.h: Regenerate.
1100 * libcoff.h: Regenerate.
1102 2014-08-05 Maciej W. Rozycki <macro@codesourcery.com>
1104 * elfxx-mips.c (_bfd_mips_elf_discard_info): Set section's
1105 rawsize if changing size.
1107 2014-08-05 Alan Modra <amodra@gmail.com>
1110 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Typo fix.
1112 2014-08-05 Alan Modra <amodra@gmail.com>
1114 * linker.c (generic_link_check_archive_element): Move handling
1115 of command link -u symbols with a common symbol def to the
1116 code handling non-common symbols so that archive element symbols
1117 are loaded. Use generic_link_add_object_symbols.
1119 2014-08-05 Alan Modra <amodra@gmail.com>
1122 * linker.c (struct archive_list, struct archive_hash_entry,
1123 struct archive_hash_table, archive_hash_newfunc,
1124 archive_hash_table_init, archive_hash_lookup, archive_hash_allocate,
1125 archive_hash_table_free): Delete.
1126 (_bfd_generic_link_add_archive_symbols): Add h and name params to
1127 checkfn. Rewrite using a straight-forward scan over archive map.
1128 (generic_link_check_archive_element_no_collect,
1129 generic_link_check_archive_element_collect,
1130 generic_link_check_archive_element): Add h and name params.
1131 * aoutx.h (aout_link_check_archive_element): Likewise.
1132 * pdp11.c (aout_link_check_archive_element): Likewise.
1133 * xcofflink.c (xcoff_link_check_archive_element): Likewise.
1134 * cofflink.c (coff_link_check_archive_element): Likewise. Don't
1135 scan symbols, simply add archive element whenever h is undefined.
1136 (coff_link_check_ar_symbols): Delete.
1137 * ecoff.c (read_ext_syms_and_strs): Delete.
1138 (reread_ext_syms_and_strs): Delete.
1139 (ecoff_link_check_archive_element): Add h and name param. Don't
1140 scan symbols, simply add based on h. Use ecoff_link_add_object_symbols.
1141 * elflink.c (elf_link_is_defined_archive_symbol): Don't test
1143 (elf_link_add_archive_symbols): Delete "defined" array, merge
1144 functionality into "included". Make "included" a char array. Don't
1145 set or test archive_pass.
1146 * libbfd-in.h (_bfd_generic_link_add_archive_symbols): Update.
1147 * libbfd.h: Regenerate.
1149 2014-08-01 Takashi Yoshii <yoshii.takashi@renesas.com>
1152 * elf32-sh.c (sh_elf_relax_section): Add jmp to bra relaxing.
1154 2014-07-29 Matthew Fortune <matthew.fortune@imgtec.com>
1156 * elfxx-mips.c (ABI_O32_P, MIPS_ELF_ABIFLAGS_SECTION_NAME_P): New macro.
1157 (mips_elf_obj_tdata): Add abiflags and abiflags_valid fields.
1158 (bfd_mips_elf_swap_abiflags_v0_in): New function.
1159 (bfd_mips_elf_swap_abiflags_v0_out): Likewise.
1160 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_ABIFLAGS.
1161 (_bfd_mips_elf_fake_sections): Likewise.
1162 (_bfd_mips_elf_always_size_sections): Handle .MIPS.abiflags.
1163 (_bfd_mips_elf_additional_program_headers): Account for new
1164 PT_MIPS_ABIFLAGS program header.
1165 (_bfd_mips_elf_modify_segment_map): Create PT_MIPS_ABIFLAGS segment and
1166 associate with .MIPS.abiflags.
1167 (_bfd_mips_elf_gc_mark_extra_sections): New function.
1168 (bfd_mips_isa_ext, update_mips_abiflags_isa): New static function.
1169 (infer_mips_abiflags): Likewise.
1170 (_bfd_mips_elf_final_link): Handle .MIPS.abiflags.
1171 (mips_32bit_flags_p): Moved higher.
1172 (mips_elf_merge_obj_attributes, _bfd_mips_fp_abi_string): Error
1173 checking for FP ABIs.
1174 (_bfd_mips_elf_merge_private_bfd_data): Restructure and add abiflags
1175 checks. Check EF_MIPS_FP64 flag consistency.
1176 (print_mips_ases, print_mips_isa_ext): New static function.
1177 (print_mips_fp_abi_value, get_mips_reg_size): Likewise.
1178 (_bfd_mips_elf_print_private_bfd_data): Display abiflags data.
1179 (_bfd_mips_post_process_headers): Set EI_ABIVERSION = 3 for
1180 Val_GNU_MIPS_ABI_FP_64 or Val_GNU_MIPS_ABI_FP_64A.
1181 * elfxx-mips.h (_bfd_mips_elf_gc_mark_extra_sections): New prototype.
1182 * elf32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1183 * elfn32-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1184 * elf64-mips.c (elf_backend_gc_mark_extra_sections): Implement.
1186 2014-07-28 Alan Modra <amodra@gmail.com>
1189 * archive.c (_bfd_compute_and_write_armap): Warn on adding
1190 __gnu_lto_slim to armap.
1191 * linker.c (_bfd_generic_link_add_one_symbol): Warn on adding
1192 __gnu_lto_slim to linker hash table.
1194 2014-07-27 Anthony Green <green@moxielogic.org>
1196 * config.bfd: Add moxie-*-moxiebox*.
1198 2014-07-21 Joel Sherrill <joel.sherrill@oarcorp.com>
1200 Add or reactivate or1k-*-rtems*
1201 * config.bfd (or1k-*-rtems*): Reactivate.
1203 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1205 * elf32-i386.c (elf_i386_plt_sym_val): Match PLT entry only for
1207 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1208 (elf_x86_64_plt_sym_val_offset_plt_bnd): Likewise.
1210 2014-07-16 H.J. Lu <hongjiu.lu@intel.com>
1213 * elf32-i386.c (elf_i386_plt_sym_val): Only match R_*_JUMP_SLOT
1214 and R_*_IRELATIVE relocation offset with PLT entry.
1215 * elf64-x86-64.c (elf_x86_64_plt_sym_val): Likewise.
1216 (elf_x86_64_plt_sym_val_offset_plt_bnd): New.
1217 (elf_x86_64_get_synthetic_symtab): Use it.
1219 2014-07-15 H.J. Lu <hongjiu.lu@intel.com>
1222 * elf32-i386.c (elf_i386_compute_jump_table_size): Replace
1223 next_tls_desc_index with elf.srelplt->reloc_count.
1225 2014-07-15 Alan Modra <amodra@gmail.com>
1227 * cache.c (cache_bread_1): Don't return -1 when fread returns
1230 2014-07-15 Alan Modra <amodra@gmail.com>
1232 * elflink.c (elf_merge_st_other): Update comments. Simplify
1233 visibility handling. Make isym const. Move code modifying
1234 isym->st_other for --exclude-libs to..
1235 (elf_link_add_object_symbols): ..here.
1237 2014-07-11 Maks Naumov <maksqwe1@ukr.net>
1240 * elf.c (_bfd_elf_strtab_add): Check strtab name for failure.
1242 2014-07-08 Nick Clifton <nickc@redhat.com>
1245 * elf32-sh.c (sh_elf_osec_to_segment): Do not look for output
1246 segments in input bfds.
1248 2014-07-08 Will Newton <will.newton@linaro.org>
1250 * elf32-arm.c (ELF_MAXPAGESIZE): Increase the default
1251 value to 64kB and remove custom setting for NaCl.
1253 2014-07-08 Alan Modra <amodra@gmail.com>
1255 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): Copy st_other
1256 bits from source to dest.
1257 * linker.c (_bfd_generic_copy_link_hash_symbol_type): Update comment.
1258 * targets.c (struct bfd_target <_bfd_copy_link_hash_symbol_type>):
1260 * bfd-in2.h: Regenerate.
1262 2014-07-08 Jiong Wang <jiong.wang@arm.com>
1264 * elfnn-aarch64.c (elf_backend_rela_normal): Set to 1.
1265 (elfNN_aarch64_relocate_section): Remove duplicated addend adjustment
1266 when info->relocatable be true.
1268 2014-07-07 Barney Stratford <barney_stratford@fastmail.fm>
1270 * elf32-avr.c: Handle R_AVR_PORT5 and R_AVR_PORT6.
1271 * reloc.c: Add BFD_RELOC_AVR_PORT5 and BFD_RELOC_AVR_PORT6.
1272 * bfd-in2.h: Regenerate.
1273 * libbfd.h: Regenerate.
1275 2014-07-04 Alan Modra <amodra@gmail.com>
1277 * Makefile.am: Update "configure.in" comments.
1278 * PORTING: Likewise.
1279 * aoutx.h: Likewise.
1280 * configure.host: Likewise.
1281 * doc/bfdint.texi: Likewise.
1282 * targets.c: Likewise.
1283 * warning.m4: Likewise.
1284 * Makefile.in: Regenerate.
1286 2014-07-04 Alan Modra <amodra@gmail.com>
1288 * configure.ac: Rename from configure.in.
1289 * Makefile.in: Regenerate.
1290 * config.in: Regenerate.
1291 * doc/Makefile.in: Regenerate.
1293 2014-07-04 Alan Modra <amodra@gmail.com>
1295 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Remove configure.in.
1296 * Makefile.in: Regenerate.
1298 2014-07-04 Alan Modra <amodra@gmail.com>
1300 * version.m4: New file.
1301 * configure.in: Include version.m4.
1303 * Makefile.am (RELEASE): Delete.
1304 (bfdver.h): Depend on development.sh, use instead of RELEASE.
1305 * Makefile.in: Regenerate.
1306 * doc/Makefile.in: Regenerate.
1308 2014-07-02 Alan Modra <amodra@gmail.com>
1310 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Clear
1311 pointer_equality_needed when !readonly_dynrelocs.
1312 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1314 2014-07-02 Alan Modra <amodra@gmail.com>
1316 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_STATIC_TLS for PIEs too.
1317 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1319 2014-07-01 Alan Modra <amodra@gmail.com>
1321 * bfd.c (struct bfd): Reorganise for better packing. Delete
1322 "ifd" field. Make "format", "direction" and "flags" bitfields.
1323 (HAS_LOAD_PAGE): Delete, renumber following flags.
1324 * bfd-in2.h: Regenerate.
1325 * coff-tic4x.c: Remove HAS_LOAD_PAGE from extra flags in target vecs.
1327 2014-07-01 Alan Modra <amodra@gmail.com>
1329 * elf64-ppc.c (ppc_stub_type): Add ppc_stub_global_entry.
1330 (struct ppc_link_hash_table): Increase size of stub_count array.
1331 (build_global_entry_stubs): Emit symbol on global entry stub.
1332 (ppc64_elf_build_stubs): NULL check htab->brlt. Add global entry
1335 2014-07-01 Alan Modra <amodra@gmail.com>
1337 * elf64-ppc.c (abiversion, set_abiversion): Move earlier.
1338 (ppc64_elf_branch_reloc): Adjust addend for ELFv2 local offset.
1339 (ppc64_elf_set_toc): Set ".TOC." symbol value when using
1341 (ppc64_elf_relocate_section): Disable ELFv2 function entry
1342 optimisation when --traditional-format.
1344 2014-07-01 Barney Stratford <barney_stratford@fastmail.fm>
1345 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
1346 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
1347 Soundararajan <Sounderarajan.D@atmel.com>
1349 * archures.c: Add avrtiny architecture for avr target.
1350 * cpu-avr.c (arch_info_struct): Add avrtiny arch info.
1351 * elf32-avr.c (elf_avr_howto_table): New relocation R_AVR_LDS_STS_16
1352 added for 16 bit LDS/STS instruction of avrtiny arch.
1353 (avr_reloc_map): Reloc R_AVR_LDS_STS_16 is mapped to
1354 BFD_RELOC_AVR_LDS_STS_16.
1355 (bfd_elf_avr_final_write_processing): Select machine number
1357 (elf32_avr_object_p): Set machine number for avrtiny arch.
1358 * reloc.c: Add documentation for BFD_RELOC_AVR_LDS_STS_16 reloc.
1359 * bfd-in2.h: Regenerate.
1360 * libbfd.h: Regenerate.
1362 2014-06-26 Nick Clifton <nickc@redhat.com>
1365 * dwarf2.c (is_str_attr): New function.
1366 (find_abstract_instance_name): Use it to determine when an
1367 attribute has a string value.
1369 2014-06-24 Alan Modra <amodra@gmail.com>
1371 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Arrange to keep
1372 .sdata/.sdata2 when _SDA_BASE_/_SDA2_BASE_ should be output
1375 2014-06-21 Philippe De Muyter <phdm@macqel.be>
1377 * targets.c (_bfd_target_vector): Add missing #ifdef BFD64 for
1378 a number of targets.
1380 2014-06-20 Kyle McMartin <kyle@redhat.com>
1382 * elf32-arm.c (elf32_arm_check_relocs): Set DF_STATIC_TLS when
1383 emitting initial-exec relocs when not linking an executable.
1385 2014-06-16 Will Newton <will.newton@linaro.org>
1387 * elf32-arm.c (elf32_arm_allocate_plt_entry): Increment
1388 htab->next_tls_desc_index in the non-IPLT case.
1389 Calculate GOT offset correctly for the non-IPLT case.
1390 (allocate_dynrelocs_for_symbol): Don't increment
1391 htab->next_tls_desc_index here.
1393 2014-06-16 Alan Modra <amodra@gmail.com>
1395 * elf32-vax.c (elf_vax_size_dynamic_sections): Clear linker
1398 2014-06-13 Omair Javaid <omair.javaid@linaro.org>
1400 * elfxx-aarch64.c (stdarg.h): Include.
1401 (string.h): Include.
1402 (_bfd_aarch64_elf_grok_prstatus): Updated.
1403 (_bfd_aarch64_elf_grok_psinfo): New function.
1404 (_bfd_aarch64_elf_write_core_note): New function.
1405 * elfxx-aarch64.h (elf_backend_grok_psinfo): Define.
1406 (elf_backend_write_core_note): Define.
1408 2014-06-13 Alan Modra <amodra@gmail.com>
1410 * archive.c: Include bfdlink.h.
1411 (_bfd_archive_close_and_cleanup): Call linker hash_table_free.
1412 * bfd.c (struct bfd): Add is_linker_output field.
1413 * elf-bfd.h (_bfd_elf_link_hash_table_free): Update prototype.
1414 * linker.c (_bfd_link_hash_table_init): Set up hash_table_free,
1415 link.hash and is_linker_output.
1416 (_bfd_generic_link_hash_table_free): Replace bfd_link_hash_table*
1417 param with bfd*. Assert is_linker_output and link.hash, and
1418 clear them before exit.
1419 * elf-m10300.c (elf32_mn10300_link_hash_table_free): Replace
1420 bfd_link_hash_table* param with bfd*. Hack is_linker_output
1421 and link.hash so we can free two linker hash tables.
1422 (elf32_mn10300_link_hash_table_create): Create static_hash_table
1423 first. Clean up on errors. Set hash_table_free pointer.
1424 * elf32-arm.c (elf32_arm_link_hash_table_free): Replace
1425 bfd_link_hash_table* param with bfd*.
1426 (elf32_arm_link_hash_table_create): Clean up on errors. Set
1427 hash_table_free pointer.
1428 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc1x.c,
1429 * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c, * elf32-xgate.c,
1430 * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c, * elflink.c,
1431 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c,
1432 * xcofflink.c: Similarly.
1433 * simple.c (bfd_simple_get_relocated_section_contents): Save and
1434 clear link.next before creating linker hash table. Clean up on
1435 errors, and restore link.next on exit.
1436 * elf32-m68hc1x.h (m68hc11_elf_bfd_link_hash_table_free): Delete.
1437 * elf32-xgate.h (xgate_elf_bfd_link_hash_table_free): Delete.
1438 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table_free): Delete.
1439 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Delete.
1440 * hash.c (bfd_hash_table_init_n): Free table on error.
1441 * libbfd-in.h (_bfd_generic_link_hash_table_free): Update proto.
1442 * bfd-in2.h: Regenerate.
1443 * libbfd.h: Regenerate.
1444 * libcoff.h: Regenerate.
1446 2014-06-13 Alan Modra <amodra@gmail.com>
1449 * targets.c (BFD_JUMP_TABLE): Delete NAME##_bfd_link_hash_table_free.
1450 (struct bfd_target <_bfd_link_hash_table_free>): Delete.
1451 * bfd.c (bfd_link_hash_table_free): Don't define.
1452 * aout-adobe.c, * aout-target.h, * aout-tic30.c, * binary.c, * bout.c,
1453 * coff64-rs6000.c, * coffcode.h, * elf-m10300.c, * elf32-arm.c,
1454 * elf32-avr.c, * elf32-hppa.c, * elf32-i386.c, * elf32-m68hc11.c,
1455 * elf32-m68hc12.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nios2.c,
1456 * elf32-sparc.c, * elf32-xgate.c, * elf64-ia64-vms.c, * elf64-ppc.c,
1457 * elf64-sparc.c, * elf64-x86-64.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1458 * elfxx-target.h, * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c,
1459 * libbfd-in.h, * libecoff.h, * mach-o-target.c, * mmo.c,
1460 * nlm-target.h, * oasys.c, * pef.c, * plugin.c, * ppcboot.c, * som.c,
1461 * srec.c, * tekhex.c, * verilog.c, * versados.c, * vms-alpha.c,
1462 * xsym.c: Don't define various link_hash_table_free defines, and
1463 remove from bfd_target vars. Temporarily reference some of the
1464 target link_hash_table_free functions to avoid warnings.
1465 * bfd-in2.h: Regenerate.
1466 * libbfd.h: Regenerate.
1468 2014-06-13 Alan Modra <amodra@gmail.com>
1470 * elf-m10300.c, * elf32-arm.c, * elf32-avr.c, * elf32-hppa.c,
1471 * elf32-i386.c, * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-metag.c,
1472 * elf32-nios2.c, * elf64-ia64-vms.c, * elf64-ppc.c, * elf64-x86-64.c,
1473 * elfnn-aarch64.c, * elfnn-ia64.c, * elfxx-sparc.c, * xcofflink.c:
1474 Move link_hash_table_free functions before their corresponding
1475 link_hash_table_create functions.
1477 2014-06-13 Alan Modra <amodra@gmail.com>
1479 * bfd.c (struct bfd): Replace link_next with a union.
1480 * aoutx.h, * bfd.c, * coff-ppc.c, * coff-rs6000.c, * cofflink.c,
1481 * ecoff.c, * elf-m10300.c, * elf32-arm.c, * elf32-avr.c,
1482 * elf32-hppa.c, * elf32-i386.c, * elf32-lm32.c, * elf32-m32c.c,
1483 * elf32-m32r.c, * elf32-m68hc1x.c, * elf32-metag.c,
1484 * elf32-microblaze.c, * elf32-nds32.c, * elf32-nios2.c,
1485 * elf32-or1k.c, * elf32-ppc.c, * elf32-rl78.c, * elf32-s390.c,
1486 * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-spu.c,
1487 * elf32-tic6x.c, * elf32-tilepro.c, * elf32-xstormy16.c,
1488 * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c,
1489 * elf64-mmix.c, * elf64-ppc.c, * elf64-s390.c, * elf64-x86-64.c,
1490 * elflink.c, * elfnn-aarch64.c, * elfxx-mips.c, * elfxx-sparc.c,
1491 * elfxx-tilegx.c, * linker.c, * pdp11.c, * peXXigen.c, * simple.c,
1492 * sunos.c, * vms-alpha.c, * xcofflink.c: Update for above.
1493 * bfd-in2.h: Regenerate.
1495 2014-06-11 Alan Modra <amodra@gmail.com>
1497 * linker.c (unwrap_hash_lookup): Add missing parens.
1499 2014-06-11 Kai Tietz <ktietz@redhat.com>
1501 * libcoff-in.h (coff_tdata): Make relocbase member unsigned.
1502 * libcoff.h: Regenerated.
1504 2014-06-10 Alan Modra <amodra@gmail.com>
1507 * linker.c (unwrap_hash_lookup): New function.
1508 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Call unwrap_hash_lookup.
1509 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1510 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1511 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1512 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1513 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1514 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1515 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1517 2014-06-07 Alan Modra <amodra@gmail.com>
1519 * elf32-ppc.c (ppc_elf_relocate_section): Treat field of cmpli
1520 insn as a bitfield; Use complain_overflow_bitfield.
1521 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1523 2014-06-05 Joel Brobecker <brobecker@adacore.com>
1525 * development.sh: New file.
1526 * warning.m4 (AM_BINUTILS_WARNINGS): Source bfd/development.sh.
1527 Make -Werror the default with GCC only if DEVELOPMENT is true.
1528 * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add
1529 $(srcdir)/development.sh.
1530 * Makefile.in, configure: Regenerate.
1532 2014-06-04 Will Newton <will.newton@linaro.org>
1534 * elfnn-aarch64.c (tpoff_base): Make test of tls_sec
1535 being non-NULL into an assert.
1536 (elfNN_aarch64_tls_relax): Remove unused code.
1538 2014-06-03 DJ Delorie <dj@redhat.com>
1540 * elf32-rx.c (rx_table_map): Use BFD_VMA_FMT for portability.
1542 2014-06-03 Nick Clifton <nickc@redhat.com>
1545 * peXXigen.c (rsrc_process_section): Page align the new contents
1546 befgore writing out.
1548 2014-06-03 Alan Modra <amodra@gmail.com>
1550 * elf64-ppc.c (ADDIS_R12_R2): Define.
1551 (build_plt_stub): Support fusion on ELFv2 stub.
1552 (ppc_build_one_stub): Likewise for plt branch stubs.
1554 2014-05-28 Alan Modra <amodra@gmail.com>
1556 * elf32-rx.c (rx_table_map): Delete set but not used variables.
1558 2014-05-28 Tristan Gingold <gingold@adacore.com>
1560 * dwarf2.c (lookup_address_in_function_table): Add best_fit_len
1561 to keep the length of the best fit range.
1562 (lookup_symbol_in_function_table, info_hash_lookup_funcinfo):
1565 2014-05-27 DJ Delorie <dj@redhat.com>
1567 * elf32-rx.c (get_symbol_value_maybe): New.
1568 (rx_elf_relocate_section): If we find a reloc against
1569 $tableentry$default$<name>, redirect it to the appropriate
1571 (RX_Table_Info): New.
1572 (rx_table_find): New. Check all tables and SEC_KEEP all sections
1573 with table parts in them.
1574 (rx_check_directives): New.
1575 (rx_table_map_2): New.
1576 (rx_table_map): New.
1577 (rx_additional_link_map_text): New. Called to dump tables to the
1581 2014-05-20 DJ Delorie <dj@redhat.com>
1583 * elf32-msp430.c (msp430_elf_relax_adjust_locals): Avoid overflow.
1585 2014-05-20 Alan Modra <amodra@gmail.com>
1588 * elf32-ppc.c (ppc_elf_create_linker_section): Move earlier.
1589 Remove redundant setting of htab->elf.dynobj. Don't align.
1590 Define .sdata symbols using _bfd_elf_define_linkage_sym.
1591 (ppc_elf_create_glink): Call ppc_elf_create_linker_section.
1592 (create_sdata_sym): Delete.
1593 (elf_allocate_pointer_linker_section): Rename from
1594 elf_create_pointer_linker_section. Align section.
1595 (ppc_elf_check_relocs): Don't call ppc_elf_creat_linker_section
1596 directly here, or create_sdata_sym. Set ref_regular on _SDA_BASE_
1598 (ppc_elf_size_dynamic_sections): Remove ATTRIBUTE_UNUSED on param.
1599 Remove unnecessary tests on _SDA_BASE_ sym.
1600 (maybe_strip_sdasym, ppc_elf_maybe_strip_sdata_syms): New functions.
1601 (ppc_elf_relocate_section): Tighten SDA reloc symbol section checks.
1602 * elf32-ppc.h (ppc_elf_set_sdata_syms): Delete.
1603 (ppc_elf_maybe_strip_sdata_syms): Declare.
1605 2014-05-16 Ryan Mansfield <rmansfield@qnx.com>
1607 * config.bfd: Move QNX target_cflags from arm-*-netbsd* to arm-*-nto*.
1609 2014-05-16 Jon Turney <jon.turney@dronecode.org.uk>
1611 * peXXigen.c (pe_print_debugdata): Don't interpret debug directory
1612 in a section with no contents.
1613 (is_vma_in_section, find_section_by_vma): New functions.
1614 (_bfd_XX_bfd_copy_private_bfd_data_common): Recalculate file
1615 offsets in the debug directory.
1616 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
1617 Byte-swap GUID from little-endian to big-endian order for
1618 consistent and conventional display.
1620 2014-05-16 Kaushik Phata <Kaushik.Phatak@kpit.com>
1622 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if
1623 64-bit doubles objects mix with 32-bit doubles objects.
1624 (rl78_elf_print_private_bfd_data): Describe 64-bit doubles flag.
1626 2014-05-08 Hans-Peter Nilsson <hp@bitrange.com>
1628 * mmo.c: Update URLs in documentation comments.
1630 2014-05-02 Volodymyr Arbatov <arbatov@cadence.com>
1631 David Weatherford <weath@cadence.com>
1632 Max Filippov <jcmvbkbc@gmail.com>
1634 * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as
1637 2014-05-07 Andreas Tobler <andreast@fgznet.ch>
1639 * config.bfd: Add proper arm config for *-*-freebsd*.
1641 2014-05-07 Andrew Bennett <andrew.bennett@imgtec.com>
1643 * aoutx.h (NAME (aout, machine_type)): Add mips32r3, mips64r3,
1644 mips32r5 and mips64r5.
1645 * archures.c (bfd_architecture): Likewise.
1646 * bfd-in2.h (bfd_architecture): Likewise.
1647 * cpu-mips.c (arch_info_struct): Likewise.
1648 * elfxx-mips.c (mips_set_isa_flags): Likewise.
1650 2014-05-06 Richard Sandiford <rdsandiford@googlemail.com>
1652 * elfxx-mips.h (elfxx-mips.h): Declare.
1653 * elfxx-mips.c (mips_elf_merge_obj_attributes): Use it to report
1654 Tag_GNU_MIPS_ABI_FP mismatches.
1655 (_bfd_mips_fp_abi_string): New function.
1657 2014-05-02 Alan Modra <amodra@gmail.com>
1659 * targets.c: Sort bfd_target vectors somewhat alphabetically.
1660 * configure.in: Likewise.
1661 * configure: Regenerate.
1663 2014-05-02 Alan Modra <amodra@gmail.com>
1665 * aix386-core.c, * aout-adobe.c, * aout-arm.c, * aout-ns32k.c,
1666 * aout-sparcle.c, * aout0.c, * aoutx.h, * armnetbsd.c, * bout.c,
1667 * cf-i386lynx.c, * cf-sparclynx.c, * cisco-core.c, * coff-alpha.c,
1668 * coff-apollo.c, * coff-arm.c, * coff-aux.c, * coff-go32.c,
1669 * coff-h8300.c, * coff-h8500.c, * coff-i386.c, * coff-i860.c,
1670 * coff-i960.c, * coff-m68k.c, * coff-m88k.c, * coff-mips.c,
1671 * coff-rs6000.c, * coff-sh.c, * coff-sparc.c, * coff-stgo32.c,
1672 * coff-svm68k.c, * coff-tic80.c, * coff-u68k.c, * coff-w65.c,
1673 * coff-we32k.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c,
1674 * coff64-rs6000.c, * config.bfd, * configure.com, * configure.in,
1675 * demo64.c, * elf-m10200.c, * elf-m10300.c, * elf32-am33lin.c,
1676 * elf32-arc.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1677 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c, * elf32-crx.c,
1678 * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c,
1679 * elf32-fr30.c, * elf32-frv.c, * elf32-gen.c, * elf32-h8300.c,
1680 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c, * elf32-i860.c,
1681 * elf32-i960.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c,
1682 * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c,
1683 * elf32-m68k.c, * elf32-m88k.c, * elf32-mcore.c, * elf32-mep.c,
1684 * elf32-metag.c, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c,
1685 * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c,
1686 * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-rl78.c,
1687 * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-sh-symbian.c,
1688 * elf32-sh.c, * elf32-sh64.c, * elf32-sparc.c, * elf32-spu.c,
1689 * elf32-tic6x.c, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c,
1690 * elf32-vax.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c,
1691 * elf32-xtensa.c, * elf64-alpha.c, * elf64-gen.c, * elf64-hppa.c,
1692 * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-ppc.c,
1693 * elf64-s390.c, * elf64-sh64.c, * elf64-sparc.c, * elf64-tilegx.c,
1694 * elf64-x86-64.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c,
1695 * epoc-pe-arm.c, * epoc-pei-arm.c, * hp300bsd.c, * hp300hpux.c,
1696 * hppabsd-core.c, * hpux-core.c, * i386aout.c, * i386bsd.c,
1697 * i386dynix.c, * i386freebsd.c, * i386linux.c, * i386lynx.c,
1698 * i386mach3.c, * i386msdos.c, * i386netbsd.c, * i386os9k.c,
1699 * irix-core.c, * m68k4knetbsd.c, * m68klinux.c, * m68knetbsd.c,
1700 * m88kmach3.c, * m88kopenbsd.c, * mach-o-i386.c, * mach-o-x86-64.c,
1701 * makefile.vms, * mipsbsd.c, * mmo.c, * netbsd-core.c, * newsos3.c,
1702 * nlm32-alpha.c, * nlm32-i386.c, * nlm32-ppc.c, * nlm32-sparc.c,
1703 * ns32knetbsd.c, * osf-core.c, * pc532-mach.c, * pe-arm-wince.c,
1704 * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-mips.c, * pe-ppc.c,
1705 * pe-sh.c, * pe-x86_64.c, * pei-arm-wince.c, * pei-arm.c,
1706 * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-mips.c, * pei-ppc.c,
1707 * pei-sh.c, * pei-x86_64.c, * ppcboot.c, * ptrace-core.c, * riscix.c,
1708 * sco5-core.c, * som.c, * sparclinux.c, * sparclynx.c,
1709 * sparcnetbsd.c, * sunos.c, * targets.c, * trad-core.c,
1710 * vax1knetbsd.c, * vaxbsd.c, * vaxnetbsd.c, * versados.c,
1711 * vms-alpha.c, * vms-lib.c: Rename bfd targets to
1712 <cpu>_<format>_<other>_<endian>_vec. Adjust associated MY macros
1714 * configure: Regenerate.
1716 2014-05-01 Hans-Peter Nilsson <hp@bitrange.com>
1718 * mmo.c (mmo File layout documentation): Add note about low bits
1720 (mmo_write_chunk): When handling data remainder, assert that
1721 previous remaining data is flushed.
1722 (mmo_write_loc_chunk): Only look for trailing and leading zeros
1723 when dealing with an aligned VMA and for aligned lengths. Don't skip
1724 the last 32-bit-word of zeros.
1725 (mmo_write_loc_chunk): Emit an error if the VMA is not aligned.
1726 (mmo_scan) <case LOP_QUOTE>: Move re-alignment of vma before
1727 emitting data, not after updating it.
1728 <case LOP_LOC>: Call mmo_decide_section with aligned vma.
1730 2014-04-30 Nick Clifton <nickc@redhat.com>
1732 * compress.c (bfd_is_section_compressed): When checking the
1733 .debug_str section, also check the fifth byte in the section is
1734 not part of a string.
1736 2014-04-30 Alan Modra <amodra@gmail.com>
1738 * elf-eh-frame.c (struct cie.personality): Replace val with sym.
1739 (find_merged_cie): Identify personality functions by (bfd_id,index)
1740 pair when a local sym is used.
1742 2014-04-29 Christian Svensson <blue@cmd.nu>
1744 * elf32-or1k.c: Fix a bug where non-TLS relocations would be forced
1745 into .rela.got if it contained TLS relocations as well.
1747 2014-04-28 Nick Clifton <nickc@redhat.com>
1750 * peXXigen.c (_bfd_XXi_swap_sym_out): Rework fix to avoid compile
1753 2014-04-26 Alan Modra <amodra@gmail.com>
1755 * po/SRC-POTFILES.in: Regenerate.
1756 * configure: Regenerate.
1758 2014-04-25 Nick Clifton <nickc@redhat.com>
1761 * peXXigen.c (_bfd_XXi_swap_sym_out): Another fix for building on
1762 a 342-bit host. This time for older versions of gcc.
1764 2014-04-24 Nick Clifton <nickc@redhat.com>
1766 * peXXigen.c (rsrc_print_section): Fix compile time warning for
1769 2014-04-24 Alan Modra <amodra@gmail.com>
1772 * dwarf2.c: Formatting.
1773 (struct dwarf2_debug): Make adjusted_section_count signed.
1774 (unset_sections): Make i signed.
1775 (set_debug_vma): New function.
1776 (place_sections): Handle separate debug object file. Set VMA
1777 on debug sections, even if they have an output section. Also
1778 set VMA on zero size sections, and non-load but alloc sections.
1779 Set adjusted_section_count to -1 when no section adjustment.
1780 Malloc adjusted_sections. Don't double last_vma. Transfer
1781 alloc section VMAs to separate debug file.
1782 (_bfd_dwarf2_cleanup_debug_info): Free adjusted_sections.
1783 (_bfd_dwarf2_slurp_debug_info): Add do_place parameter. Drop
1784 test on symbols being the same before using old stash. Read
1785 and use separate debug file symbols. Call place_sections.
1786 (find_line): Don't call place_sections here.
1787 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Update proto.
1788 * libbfd.h: Regenerate.
1789 * mach-o.c (bfd_mach_o_find_nearest_line): Adjust
1790 _bfd_dwarf2_slurp_debug_info call.
1791 * simple.c (simple_save_output_info): Clarify comment.
1793 2014-04-24 Nick Clifton <nickc@redhat.com>
1796 * peXXigen.c (struct rsrc_regions): New structure.
1797 (rsrc_print_resource_directory): Use new structure. Include
1798 offset of directory in listing.
1799 (rsrc_print_resource_entry): Likewise.
1800 (rsrc_print_section): Likewise.
1801 (rsrc_count_entries): Do not increment sizeof_strings or
1803 (rsrc_count_directory): Do not increment sizeof_tables.
1804 (rsrc_compute_region_sizes): New function.
1805 (rsrc_write_leaf): Maintain 8-byte alignment for resource data.
1806 (rsrc_process_section): Compute size of regions after merging
1809 2014-04-23 Alan Modra <amodra@gmail.com>
1812 * dwarf2.c (struct dwarf2_debug): Add sec_vma field.
1813 (place_sections): Do not modify VMA of sections when called from
1814 linker after sections have been placed in output sections. Short
1815 circuit single section case.
1816 (save_section_vma, section_vma_same): New functions.
1817 (_bfd_dwarf2_slurp_debug_info): Throw away stash if section VMAs
1819 * reloc.c (bfd_perform_relocation): Do not modify reloc addend
1820 when non-relocatable.
1822 2014-04-22 Nick Clifton <nickc@redhat.com>
1825 * peXXigen.c (_bfd_XXi_swap_sym_out): Fix for 32-bit hosts.
1827 2014-04-22 Christian Svensson <blue@cmd.nu>
1829 * Makefile.am: Remove openrisc and or32 support. Add support for or1k.
1830 * archures.c: Likewise.
1831 * coffcode.h: Likewise.
1832 * config.bfd: Likewise.
1833 * configure.in: Likewise.
1834 * reloc.c: Likewise.
1835 * targets.c: Likewise.
1836 * cpu-or1k.c: New file.
1837 * elf32-or1k.c: New file.
1838 * coff-or32.c: Delete.
1839 * cpu-openrisc.c: Delete.
1840 * cpu-or32.c: Delete.
1841 * elf32-openrisc.c: Delete.
1842 * elf32-or32.c: Delete.
1843 * Makefile.in: Regenerate.
1844 * bfd-in2.h: Regenerate.
1845 * configure: Regenerate.
1846 * libbfd.h: Regenerate.
1848 2014-04-22 Yuanhui Zhang <asmwarrior@gmail.com>
1851 * peXXigen.c (abs_finder): Fix for 32-bit host builds.
1853 2014-04-22 Will Newton <will.newton@linaro.org>
1855 * elfnn-aarch64.c (elfNN_aarch64_section_flags): Remove
1856 function. (elf_backend_section_flags): Remove define.
1858 2014-04-21 Richard Henderson <rth@redhat.com>
1860 * elf64-alpha.c (elf64_alpha_size_got_sections): New may_merge
1861 parameter; honor it and disable got merging when false.
1862 (elf64_alpha_relax_got_load): Do not relax to GPREL relocs during
1863 the first pass of relaxation.
1864 (elf64_alpha_relax_with_lituse): Likewise. Move relaxed relocs to
1865 the end of the LITERAL+LITUSE chain.
1866 (elf64_alpha_relax_section): Only process LITERAL relocs during the
1867 second pass of relaxation.
1869 * configure.ac (use_secureplt): Enable by default.
1870 * configure: Rebuild.
1872 2014-04-18 Tristan Gingold <gingold@adacore.com>
1874 * mach-o.h (bfd_mach_o_dyld_info_command): Add rebase_content,
1875 bind_content, weak_bind_content, lazy_bind_content,
1877 (bfd_mach_o_load_command): Add comments, add next field.
1878 (mach_o_data_struct): Replace commands field by first_command
1880 * mach-o.c (bfd_mach_o_append_command): New function.
1881 (bfd_mach_o_bfd_copy_private_symbol_data): Add blank lines.
1882 (bfd_mach_o_bfd_copy_private_section_data): Check flavour,
1884 (bfd_mach_o_bfd_copy_private_header_data): Copy load commands.
1885 (bfd_mach_o_pad4, bfd_mach_o_pad_command): New functions.
1886 (bfd_mach_o_write_thread): Use macro instead of literal.
1887 (bfd_mach_o_write_dylinker, bfd_mach_o_write_dylib)
1888 (bfd_mach_o_write_main, bfd_mach_o_write_dyld_info): New
1890 (bfd_mach_o_write_symtab_content): New function (extracted
1891 from bfd_mach_o_write_symtab).
1892 (bfd_mach_o_write_symtab): Split.
1893 (bfd_mach_o_count_indirect_symbols): Move
1894 (bfd_mach_o_build_dysymtab): Remove layout code.
1895 (bfd_mach_o_write_contents): Rewritten to build commands in order.
1896 (bfd_mach_o_count_sections_for_seg): Remove.
1897 (bfd_mach_o_build_obj_seg_command): New function (extracted from
1898 bfd_mach_o_build_seg_command).
1899 (bfd_mach_o_build_exec_seg_command): New function.
1900 (bfd_mach_o_build_dysymtab_command): Remove.
1901 (bfd_mach_o_layout_commands): New function.
1902 (bfd_mach_o_init_segment): New function.
1903 (bfd_mach_o_build_commands): Major rework to handle non-object
1905 (bfd_mach_o_alloc_and_read, bfd_mach_o_read_dyld_content): New
1907 (bfd_mach_o_read_dyld_info): Clear content fields.
1908 (bfd_mach_o_read_segment): Adjust call.
1909 (bfd_mach_o_flatten_sections): Adjust as now load commands are
1911 (bfd_mach_o_scan_start_address, bfd_mach_o_scan)
1912 (bfd_mach_o_mkobject_init, bfd_mach_o_get_base_address)
1913 (bfd_mach_o_lookup_command, bfd_mach_o_core_fetch_environment):
1916 2014-04-18 Tristan Gingold <gingold@adacore.com>
1918 * mach-o-target.c (bfd_mach_o_bfd_copy_private_header_data):
1919 Define instead of bfd_mach_o_bfd_copy_private_bfd_data.
1920 * mach-o.c (bfd_mach_o_bfd_copy_private_bfd_data): Rename.
1921 * mach-o.h (bfd_mach_o_bfd_copy_private_bfd_data): Likewise.
1923 2014-04-18 Tristan Gingold <gingold@adacore.com>
1925 * mach-o.h (bfd_mach_o_dylinker_command)
1926 (bfd_mach_o_dylib_command, bfd_mach_o_fvmlib_command): Remove
1928 * mach-o.c (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
1929 (bfd_mach_o_read_fvmlib): Adjust after name_len removal.
1931 2014-04-18 Tristan Gingold <gingold@adacore.com>
1933 * mach-o.h (bfd_mach_o_backend_data): Add page_size field.
1934 * mach-o-target.c: Check TARGET_PAGESIZE is defined.
1935 (TARGET_NAME_BACKEND): Add TARGET_PAGESIZE.
1936 * mach-o.c (TARGET_PAGESIZE): Define and undefined for
1937 each targets declared.
1938 * mach-o-x86-64.c (TARGET_PAGESIZE): Define.
1939 * mach-o-i386.c (TARGET_PAGESIZE): Define.
1941 2014-04-18 Tristan Gingold <gingold@adacore.com>
1943 * mach-o.c (bfd_mach_o_write_thread)
1944 (bfd_mach_o_write_section_32, bfd_mach_o_write_section_64)
1945 (bfd_mach_o_write_segment_32, bfd_mach_o_write_segment_64)
1946 (bfd_mach_o_read_dylinker, bfd_mach_o_read_dylib)
1947 (bfd_mach_o_read_prebound_dylib, bfd_mach_o_read_prebind_cksum)
1948 (bfd_mach_o_read_twolevel_hints, bfd_mach_o_read_fvmlib)
1949 (bfd_mach_o_read_thread, bfd_mach_o_read_dysymtab)
1950 (bfd_mach_o_read_symtab, bfd_mach_o_read_uuid)
1951 (bfd_mach_o_read_linkedit, bfd_mach_o_read_str)
1952 (bfd_mach_o_read_dyld_info, bfd_mach_o_read_segment)
1953 (bfd_mach_o_read_segment_32, bfd_mach_o_read_segment_64)
1954 (bfd_mach_o_read_command): Now return a boolean status.
1955 Adjust return statements.
1956 (bfd_mach_o_write_contents, bfd_mach_o_scan): Adjust tests.
1957 (bfd_mach_o_core_file_failing_command): Remove useless initialization.
1959 2014-04-17 Kwok Cheung Yeung <kcy@codesourcery.com>
1961 * elfxx-mips.c (struct mips_got_info): Delete assigned_gotno
1962 field. Add assigned_low_gotno and assigned_high_gotno fields.
1963 (mips_elf_create_local_got_entry): Update out-of-space condition.
1964 Set index of new GOT entry to assigned_low_gotno if required by
1965 the current relocation, else set it to assigned_high_gotno.
1966 (mips_elf_set_global_gotidx): Replace uses of assigned_gotno
1967 with assigned_low_gotno.
1968 (mips_elf_multi_got): Initialize assigned_low_gotno and
1969 assigned_high_gotno in secondary GOTs. Use assigned_low_gotno
1970 in place of assigned_gotno when handling global GOT entries.
1971 (mips_elf_lay_out_got): Initialize assigned_low_gotno and
1972 assigned_high_gotno.
1973 (_bfd_mips_elf_finish_dynamic_sections): Account for a possible
1974 gap in the middle of local GOT space.
1976 2014-04-17 Alan Modra <amodra@gmail.com>
1979 * elflink.c (_bfd_elf_merge_symbol): Ignore TLS mismatch when
1980 current bfd is a plugin. Don't always set type_change_ok
1981 when old bfd is a plugin.
1983 2014-04-16 Tristan Gingold <gingold@adacore.com>
1985 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Adjust cpusubtype
1988 2014-04-16 Alan Modra <amodra@gmail.com>
1990 * elf32-ppc.c (ppc_elf_relocate_section): Fill 476 fixup area
1991 with "ba 0" rather than zeros.
1993 2014-04-15 Marcus Shawcroft <marcus.shawcroft@arm.com>
1995 * (elfNN_aarch64_tls_relax): Fix instruction mask.
1997 2014-04-14 Alan Modra <amodra@gmail.com>
1999 * elf32-ppc.c (BA): Define
2000 (ppc_elf_link_hash_table_create): Correct default_params.
2001 (write_glink_stub): Pad small plt call stub with "ba 0" rather
2002 than "nop" for ppc476_workaround.
2003 (ppc_elf_finish_dynamic_sections): Likewise for branch table
2004 and __glink_PLTresolve. Ensure plt call stub at end of page
2005 doesn't allow fall-thru prefetch.
2007 2014-04-11 Nick Clifton <nickc@redhat.com>
2010 * peXXigen.c (abs_finder): New function.
2011 (_bfd_XXi_swap_sym_out): For absolute symbols with values larger
2012 than 1^32 try to convert them into section relative values
2015 2014-04-11 Nick Clifton <nickc@redhat.com>
2017 * bfd-in2.h: Regenerate.
2018 * libbfd.h: Regenerate.
2020 2014-04-10 Cesar Philippidis <cesar@codesourcery.com>
2022 * elf32-nios2.c (nios2_elf32_build_stubs): Ignore dynobjs
2023 when building function stubs.
2025 2014-04-10 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
2027 * elf32-avr.c: Add DIFF relocations for AVR.
2028 (avr_final_link_relocate): Handle the DIFF relocs.
2029 (bfd_elf_avr_diff_reloc): New.
2030 (elf32_avr_is_diff_reloc): New.
2031 (elf32_avr_adjust_diff_reloc_value): Reduce difference value.
2032 (elf32_avr_relax_delete_bytes): Recompute difference after deleting
2035 * reloc.c: Add BFD_RELOC_AVR_DIFF8/16/32 relocations
2037 2014-04-09 Alan Modra <amodra@gmail.com>
2039 * libcoff.h: Regenerate.
2041 2014-04-09 Alan Modra <amodra@gmail.com>
2043 * elf32-ppc.c (ppc_elf_relocate_section): Remove bctr from list
2044 of safe ppc476 insns at end of page. Also remove non-branch insns.
2047 2014-04-08 Jon Turney <jon.turney@dronecode.org.uk>
2049 * peXXigen.c (pe_print_debugdata): New function: Displays the
2050 contents of the debug directory and decodes codeview entries.
2051 (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2052 (_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
2053 Add functions for reading and writing debugdir and codeview
2055 * libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
2056 (_bfd_XXi_write_codeview_record): Add prototypes and macros.
2057 * libcoff-in.h (pe_tdata): Add build-id data.
2058 * libcoff.h: Regenerate.
2059 * coffcode.h (coff_write_object_contents): Run build_id
2060 after_write_object_contents hook.
2062 2014-04-05 Alan Modra <amodra@gmail.com>
2064 * elflink.c (_bfd_elf_add_default_symbol): Pass poldbfd when
2065 merging non-default sym.
2067 2014-04-04 Tristan Gingold <gingold@adacore.com>
2069 * mach-o.c (bfd_mach_o_header_p): Reject 64 bit target when not
2072 2014-04-04 Tristan Gingold <gingold@adacore.com>
2074 * mach-o.c (bfd_mach_o_convert_section_name_to_mach_o): Fix
2075 thinko on names length.
2077 2014-04-04 Tristan Gingold <gingold@adacore.com>
2079 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_out): Use target index
2081 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Ditto.
2083 2014-04-04 Tristan Gingold <gingold@adacore.com>
2085 * bfd.c (bfd_get_arch_size): Default is taken from arch.
2087 2014-04-03 Jon Turney <jon.turney@dronecode.org.uk>
2089 * peXXigen.c (pe_print_edata): Verify edt.name lies inside
2090 section before dereferencing.
2091 (pe_print_idata, pe_print_edata, pe_print_reloc)
2092 (rsrc_print_section): Don't bother interpreting the contents
2093 of sections which have no contents.
2095 2014-04-03 Maria Guseva <m.guseva@samsung.com>
2098 * elf.c (_bfd_elf_set_section_contents): Use correct type to hold
2101 2014-04-03 Tristan Gingold <gingold@adacore.com>
2103 * mach-o.c (bfd_mach_o_mangle_symbols): Use index from
2105 (bfd_mach_o_build_seg_command): Add comment. Realign segment.
2107 (bfd_mach_o_build_commands, bfd_mach_o_read_thread): Fix style.
2109 2014-04-03 Alan Modra <amodra@gmail.com>
2111 * elf-bfd.h (struct elf_backend_data
2112 <elf_backend_bfd_from_remote_memory>): Replace "size_t size"
2113 with "bfd_size_type size".
2114 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2115 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2116 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
2117 * elfcode.h (bfd_from_remote_memory): Likewise.
2118 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Likewise.
2119 * bfd-in2.h: Regenerate.
2121 2014-04-02 Tristan Gingold <gingold@adacore.com>
2123 * mach-o.h (bfd_mach_o_twolevel_hints_command)
2124 (bfd_mach_o_prebind_cksum_command): New types.
2125 (bfd_mach_o_prebound_dylib_command): Rewrite.
2126 (bfd_mach_o_load_command): Add prebind_cksum and twolevel_hints
2128 * mach-o.c (bfd_mach_o_read_prebound_dylib): Read and decode the
2130 (bfd_mach_o_read_prebind_cksum): New function.
2131 (bfd_mach_o_read_twolevel_hints): Ditto.
2132 (bfd_mach_o_read_command): Handle prebind cksum and twolevel hints
2135 2014-04-02 Alan Modra <amodra@gmail.com>
2137 * elfcode.h (bfd_from_remote_memory): Add "size" parameter.
2138 Consolidate code handling possible section headers past end of
2139 segment. Don't use p_align for page size guess, instead use
2140 minpagesize. Take note of ld.so clearing section headers when
2141 p_memsz > p_filesz. Handle file header specifying no section
2142 headers. Handle zero p_align throughout. Default loadbase to
2143 zero. Add comments. Rename contents_size to high_offset, and
2144 make it a bfd_vma. Delete unnecessary bfd_set_error calls.
2145 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Update prototpe.
2146 * elf-bfd.h (struct elf_backend_data <elf_backend_from_remote_memory>):
2148 (_bfd_elf32_bfd_from_remote_memory): Likewise.
2149 (_bfd_elf64_bfd_from_remote_memory): Likewise.
2150 * elf.c (bfd_elf_bfd_from_remote_memory): Adjust.
2151 * bfd-in2.h: Regnerate.
2153 2014-04-01 Tristan Gingold <gingold@adacore.com>
2155 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Avoid to crash
2158 2014-03-27 Yury Gribov <y.gribov@samsung.com>
2159 Pavel Fedin <p.fedin@samsung.com>
2161 * elf32-arm.c: Add support for limited pretty-printing of PLT
2162 entries on eabi and nacl targets.
2163 (elf32_arm_get_synthetic_symtab): Add new callback.
2164 (elf32_arm_nacl_plt_sym_val): Likewise.
2165 (elf32_arm_plt0_size): Add helper function.
2166 (elf32_arm_plt_size): Likewise.
2168 2014-03-27 Tristan Gingold <gingold@adacore.com>
2170 * mach-o.c (bfd_mach_o_read_dylinker): Remove assert.
2171 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DYLD_ENVIRONMENT.
2173 2014-03-27 Tristan Gingold <gingold@adacore.com>
2175 * mach-o.h (bfd_mach_o_get_base_address): New prototype.
2176 * mach-o.c (bfd_mach_o_write_symtab)
2177 (bfd_mach_o_write_contents)
2178 (bfd_mach_o_set_section_flags_from_bfd)
2179 (bfd_mach_o_build_seg_command): Fix indentation.
2180 (bfd_mach_o_get_base_address): New function.
2182 2014-03-26 Nick Clifton <nickc@redhat.com>
2184 * cofflink.c (_bfd_coff_generic_relocate_section): Skip
2185 relocations in discarded sections.
2187 2014-03-26 Tristan Gingold <gingold@adacore.com>
2189 * mach-o.c (bfd_mach_o_convert_architecture): Add
2190 BFD_MACH_O_CPU_TYPE_ARM64.
2192 2014-03-26 Alan Modra <amodra@gmail.com>
2194 * elf64-ppc.c (ppc64_elf_check_relocs): Account for possibly
2195 needed plt entries when taking the address of functions for
2196 abiversion == 0 (ie. unknown) as well as abiversion == 2.
2197 Move opd setup and abiversion checks to..
2198 (ppc64_elf_before_check_relocs): ..here. Renamed from
2199 ppc64_elf_process_dot_syms. Set output abiversion from input and
2200 input abiversion from output, if either is not set.
2201 (ppc64_elf_merge_private_bfd_data): Don't merge flags here.
2202 (elf_backend_check_directives): Update.
2204 2014-03-25 Will Newton <will.newton@linaro.org>
2206 * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_sections):
2207 Set value of DT_PLTRELSZ and DT_RELASZ based on the size
2208 of input sections rather than output sections.
2210 2014-03-20 Will Newton <will.newton@linaro.org>
2213 * elf32-arm.c (elf32_arm_check_relocs): Set
2214 pointer_equality_needed for absolute references within
2216 (elf32_arm_finish_dynamic_symbol): Set st_value to zero
2217 unless pointer_equality_needed is set.
2219 2014-03-19 Nick Clifton <nickc@redhat.com>
2221 * peXXigen.c (rsrc_process_section): Add code to scan input
2222 sections and record their lengths. Use these lengths to find the
2223 start of each merged .rsrc section.
2225 2014-03-17 Tristan Gingold <gingold@adacore.com>
2227 * mach-o.c (bfd_mach_o_read_dylib): Handle lazy load dylib.
2228 (bfd_mach_o_read_command): Ditto.
2230 2014-03-14 Meador Inge <meadori@codesourcery.com>
2232 * configure.in: Add strnlen to AC_CHECK_DECLS.
2233 * config.in: Regenerate.
2234 * configure: Regenerate.
2235 * sysdep.h (strnlen): Add prototype.
2237 2014-03-14 Alan Modra <amodra@gmail.com>
2239 * elf32-ppc.c (ppc_elf_relocate_section): Correct overflow
2240 handling for VLE_SDA21 relocs.
2242 2014-03-13 Tristan Gingold <gingold@adacore.com>
2244 * peicode.h (pe_ILF_object_p): Adjust, as the version number
2246 (pe_bfd_object_p): Also read version number to detect ILF.
2247 * pe-x86_64.c (COFF_WITH_PE_BIGOBJ): Define.
2248 (x86_64pe_bigobj_vec): Define
2249 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_max_nscns field.
2250 (bfd_coff_max_nscns): New macro.
2251 (coff_compute_section_file_positions): Use unsigned int for
2252 target_index. Compare with bfd_coff_max_nscns.
2253 (bfd_coff_std_swap_table, ticoff0_swap_table, ticoff1_swap_table):
2254 Set a value for _bfd_coff_max_nscns.
2255 (header_bigobj_classid): New constant.
2256 (coff_bigobj_swap_filehdr_in, coff_bigobj_swap_filehdr_out)
2257 (coff_bigobj_swap_sym_in, coff_bigobj_swap_sym_out)
2258 (coff_bigobj_swap_aux_in, coff_bigobj_swap_aux_out): New
2260 (bigobj_swap_table): New table.
2261 * libcoff.h: Regenerate.
2262 * coff-sh.c (bfd_coff_small_swap_table): Likewise.
2263 * coff-alpha.c (alpha_ecoff_backend_data): Add value for
2264 _bfd_coff_max_nscns.
2265 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2266 * coff-rs6000.c (bfd_xcoff_backend_data)
2267 (bfd_pmac_xcoff_backend_data): Likewise.
2268 * coff64-rs6000.c (bfd_xcoff_backend_data)
2269 (bfd_xcoff_aix5_backend_data): Likewise.
2270 * targets.c (x86_64pe_bigobj_vec): Declare.
2271 * configure.in (x86_64pe_bigobj_vec): New vector.
2272 * configure: Regenerate.
2273 * config.bfd: Add bigobj object format for Windows targets.
2275 2014-03-12 Nick Clifton <nickc@redhat.com>
2278 * elf32-arm.c (elf32_arm_add_symbol_hook): Check for ARM format
2279 before testing for vxworks.
2281 2014-03-12 Alan Modra <amodra@gmail.com>
2283 * Makefile.in: Regenerate.
2285 2014-03-12 Alan Modra <amodra@gmail.com>
2288 * elf.c (copy_elf_program_header): Ignore first section lma if
2291 2014-03-11 Alan Modra <amodra@gmail.com>
2294 * coff-rs6000.c: Include stdint.h.
2295 * coff64-rs6000.c: Likewise.
2297 2014-03-10 Tristan Gingold <gingold@adacore.com>
2299 * ticoff.h: Removed.
2301 2014-03-08 Alan Modra <amodra@gmail.com>
2303 * elf32-ppc.c (ppc_elf_howto_raw): Correct overflow check for
2304 many relocations. Correct bitsize and rightshift too for a number
2305 of VLE relocs. Describe R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO.
2306 Correct dst_mask on R_PPC_VLE_SDA21_LO.
2307 (ppc_elf_vle_split16): Tidy, delete unnecessary prototype.
2308 (ppc_elf_relocate_section): Modify overflow test for 16-bit
2309 fields in instructions to signed/unsigned according to whether
2310 the field takes a signed or unsigned value. Tidy vle split16 code.
2311 Correct R_PPC_VLE_SDA21 and R_PPC_VLE_SDA21_LO handling.
2313 2014-03-08 Alan Modra <amodra@gmail.com>
2315 * elf64-ppc.c (ppc64_elf_howto_raw): Use complain_overflow_signed
2316 for R_PPC64_ADDR14, R_PPC64_ADDR14_BRTAKEN, R_PPC64_ADDR14_BRNTAKEN,
2317 R_PPC64_SECTOFF, R_PPC64_ADDR16_DS, R_PPC64_SECTOFF_DS,
2318 R_PPC64_REL16 entries. Use complain_overflow_dont for R_PPC64_TOC.
2319 (ppc64_elf_relocate_section): Modify overflow test for 16-bit
2320 fields in instructions to signed/unsigned according to whether
2321 the field takes a signed or unsigned value.
2323 2014-03-07 Pedro Alves <palves@redhat.com>
2326 * rs6000-core.c (rs6000coff_core_p): Cast pointers to bfd_vma
2327 through ptr_to_uint instead of through long.
2329 2014-03-06 Nick Clifton <nickc@redhat.com>
2332 * elf-attrs.c (_bfd_elf_parse_attributes): Add checks for corrupt
2333 attribute section names.
2335 2014-03-05 Alan Modra <amodra@gmail.com>
2337 Update copyright years.
2339 2014-03-05 Alan Modra <amodra@gmail.com>
2341 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_ADDR64_LOCAL entry.
2342 (ppc64_elf_reloc_type_lookup): Support R_PPC64_ADDR64_LOCAL.
2343 (ppc64_elf_check_relocs): Likewise.
2344 (ppc64_elf_relocate_section): Likewise.
2345 * Add BFD_RELOC_PPC64_ADDR64_LOCAL.
2346 * bfd-in2.h: Regenerate.
2347 * libbfd.h: Regenerate.
2349 2014-03-04 Heiher <r@hev.cc>
2351 * elfxx-mips.c (mips_set_isa_flags): Use E_MIPS_ARCH_64R2 for
2353 (mips_mach_extensions): Make bfd_mach_mips_loongson_3a an
2354 extension of bfd_mach_mipsisa64r2.
2356 2014-03-04 Nick Clifton <nickc@redhat.com>
2359 * elf32-arm.c (elf32_thumb2_plt0_entry): New array.
2360 (elf32_thumb2_plt_entry): New array.
2361 (elf32_arm_create_dynamic_sections): Set PLT entry sizes when
2362 using thumb2 based PLT.
2363 (elf32_arm_populate_plt_entry): Handle generating Thumb2 based PLT
2365 (elf32_arm_final_link_relocate): Do not bias jumps to Thumb based
2367 (elf32_arm_finish_dynamic_sections): Handle creation of Thumb2
2369 (elf32_arm_output_plt_map_1): Handle creation of local symbols for
2370 Thumb2 based PLT 0-entry.
2371 (elf32_arm_output_arch_local_syms): Handle creation of local
2372 symbols for Thumb2 based PLT entries.
2374 2014-02-28 Alan Modra <amodra@gmail.com>
2377 * elflink.c (elf_gc_sweep): Call gc_sweep_hook for exactly
2378 the same conditions we called check_relocs.
2380 2014-02-27 Yuri Gribov <y.gribov@samsung.com>
2382 * bfd-in.h: Add export of bfd_elf32_arm_use_long_plt.
2383 * bfd-in2.h: Regenerate.
2384 * elf32-arm.c (elf32_arm_plt_entry_long): New array.
2385 (elf32_arm_link_hash_table_create): Set plt_entry_size to 16 if
2386 using long PLT entries.
2387 (bfd_elf32_arm_use_long_plt): New function.
2388 (elf32_arm_populate_plt_entry): Add support for long PLT entries.
2390 2014-02-27 Alan Modra <amodra@gmail.com>
2392 * elf32-ppc.c (ppc_elf_link_hash_table_create): Provide default
2393 params for targets that don't use ppc32elf.em.
2395 2014-02-20 Chung-Lin Tang <cltang@codesourcery.com>
2397 * elf32-nios2.c (nios2_elf32_relocate_section): Fix calculation
2398 of GOTOFF relocations.
2400 2014-02-19 Igor Zamyatin <igor.zamyatin@intel.com>
2401 H.J. Lu <hongjiu.lu@intel.com>
2403 * elf64-x86-64.c (elf_x86_64_bnd_plt0_entry): New.
2404 (elf_x86_64_legacy_plt_entry): Likewise.
2405 (elf_x86_64_bnd_plt_entry): Likewise.
2406 (elf_x86_64_legacy_plt2_entry): Likewise.
2407 (elf_x86_64_bnd_plt2_entry): Likewise.
2408 (elf_x86_64_bnd_arch_bed): Likewise.
2409 (elf_x86_64_link_hash_entry): Add has_bnd_reloc and plt_bnd.
2410 (elf_x86_64_link_hash_table): Add plt_bnd.
2411 (elf_x86_64_link_hash_newfunc): Initialize has_bnd_reloc and
2413 (elf_x86_64_copy_indirect_symbol): Also copy has_bnd_reloc.
2414 (elf_x86_64_check_relocs): Create the second PLT for Intel MPX
2416 (elf_x86_64_allocate_dynrelocs): Handle the second PLT for IFUNC
2417 symbols. Resolve call to the second PLT if it is created.
2418 (elf_x86_64_size_dynamic_sections): Keep the second PLT section.
2419 (elf_x86_64_relocate_section): Resolve PLT references to the
2420 second PLT if it is created.
2421 (elf_x86_64_finish_dynamic_symbol): Use BND PLT0 and fill the
2422 second PLT entry for BND relocation.
2423 (elf_x86_64_finish_dynamic_sections): Use MPX backend data if
2424 the second PLT is created.
2425 (elf_x86_64_get_synthetic_symtab): New.
2426 (bfd_elf64_get_synthetic_symtab): Likewise. Undefine for NaCl.
2428 2014-02-19 Alan Modra <amodra@gmail.com>
2430 * elf64-ppc.h (struct ppc64_elf_params): Add save_restore_funcs.
2431 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Use it to control
2432 provision of out-of-line register save/restore routines.
2434 2014-02-18 Jack Carter <jack.carter@imgtec.com>
2436 * elfxx-mips.c(_bfd_mips_elf_modify_segment_map): Deleted hard coding of
2437 PT_DYNAMIC segment flags.
2439 2014-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2442 * simple.c (struct saved_offsets): New.
2443 (simple_save_output_info): Use it for ptr.
2444 (simple_restore_output_info): Use it for ptr. Check section_count.
2445 (bfd_simple_get_relocated_section_contents): Use it for saved_offsets.
2447 2014-02-17 Alan Modra <amodra@gmail.com>
2449 * elf64-ppc.h (struct ppc64_elf_params): Define.
2450 (ppc64_elf_init_stub_bfd, ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2451 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2452 ppc64_elf_build_stubs): Update prototype.
2453 * elf64-ppp.c (struct ppc_link_hash_table): Add params, delete other
2454 fields now in params. Adjust code throughout file.
2455 (ppc64_elf_init_stub_bfd): Delete "abfd" parameter, add "params".
2456 Save params pointer in htab.
2457 (ppc64_elf_edit_opd, ppc64_elf_tls_setup,
2458 ppc64_elf_setup_section_lists, ppc64_elf_size_stubs,
2459 ppc64_elf_build_stubs): Remove parameters now in "params".
2461 2014-02-17 Alan Modra <amodra@gmail.com>
2463 * elf32-ppc.c (ppc_elf_relocate_section): Move relocs on insns
2464 patched for ppc476 workaround. Reapply branch taken/not taken
2467 2014-02-12 Alan Modra <amodra@gmail.com>
2469 * elf32-ppc.c (ppc_elf_relax_section): Don't build long-branch
2470 stubs for calls to __tls_get_addr that we know will later be
2473 2014-02-12 Alan Modra <amodra@gmail.com>
2475 * elf32-ppc.c (ppc_elf_relax_section): Enable ppc476 workaround
2476 for ld -r, when code sections are sufficiently aligned.
2477 * elf32-ppc.h (struct ppc_elf_params): Delete pagesize. Add
2480 2014-02-12 Alan Modra <amodra@gmail.com>
2483 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Support
2484 --export-dynamic and --dynamic-list marking of symbols.
2485 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Reorder
2488 2014-02-10 H.J. Lu <hongjiu.lu@intel.com>
2491 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark symbol in
2492 executables if it matches dynamic_list.
2494 2014-02-10 Alan Modra <amodra@gmail.com>
2496 * po/SRC-POTFILES.in: Regenerate.
2497 * po/bfd.pot: Regenerate.
2499 2014-02-09 Alan Modra <amodra@gmail.com>
2501 * elf-bfd.h (struct elf_backend_data): Add caches_rawsize.
2502 * elfxx-target.h (elf_backend_caches_rawsize): Define.
2503 (elfNN_bed): Init new field.
2504 * elflink.c (elf_link_input_bfd): Handle caches_rawsize.
2505 * elf32-ppc.c (shared_stub_entry): Zero addi offset.
2506 (ppc_elf_relax_section): Don't reallocate section here, write
2507 stubs, or write out relocs for ld -r here..
2508 (ppc_elf_relocate_section): ..instead write stubs here, and use
2509 existing code to write out relocs for ld -r. Fix offset
2510 adjustment on reloc for little-endian.
2511 (elf_backend_caches_rawsize): Define.
2513 2014-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2516 * cache.c (bfd_cache_max_open): Cast RLIM_INFINITY to rlim_t.
2518 2014-02-04 Jan Kratochvil <jan.kratochvil@redhat.com>
2520 * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in
2521 return paths. Three times.
2522 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all
2524 (ppc64_elf_tls_optimize): Free TOC_REF in return path.
2525 (ppc64_elf_edit_toc): Free USED in return path.
2527 2014-02-03 Sandra Loosemore <sandra@codesourcery.com>
2529 * reloc.c (BFD_RELOC_NIOS2_GOT_LO, BFD_RELOC_NIOS2_GOT_HA): New.
2530 (BFD_RELOC_NIOS2_CALL_LO, BFD_RELOC_NIOS2_CALL_HA): New.
2531 * libbfd.h: Regenerated.
2532 * bfd-in2.h: Regenerated.
2533 * elf32-nios2.c (elf_nios2_howto_table_rel): Add new relocations.
2534 (nios2_reloc_map): Likewise.
2535 (GOT_USED, CALL_USED): Renamed from GOT16_USED and CALL16_USED.
2536 Fixed all references.
2537 (nios2_elf32_relocate_section): Add new relocations.
2538 (nios2_elf32_check_relocs): Likewise.
2539 (nios2_elf32_gc_sweep_hook): Likewise.
2541 2014-02-03 Alan Modra <amodra@gmail.com>
2543 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add params.
2544 Delete emit_stub_syms, no_tls_get_addr_opt. Update all uses.
2545 (ppc_elf_link_params): New function.
2546 (ppc_elf_create_glink): Align .glink to 64 bytes for ppc476
2548 (ppc_elf_select_plt_layout): Remove plt_style and emit_stub_syms
2549 parameters. Use htab->params instead.
2550 (ppc_elf_tls_setup): Remove no_tls_get_addr_opt parameter.
2551 (ppc_elf_size_dynamic_sections): Align __glink_PLTresolve to
2552 64 bytes for ppc476 workaround.
2553 (struct ppc_elf_relax_info): New.
2554 (ppc_elf_relax_section): Exclude linker created sections and
2555 those too small to hold one instruction. Don't add another
2556 branch around trampolines on later relax passes. Don't
2557 generate trampolines for undefined symbols when !relocatable,
2558 nor for plugin symbols. Allocate space for ppc476 workaround
2559 patch area. Free fixups on error return path.
2560 (ppc_elf_relocate_section): Handle ppc476 workaround patching.
2561 * elf32-ppc.h (struct ppc_elf_params): New.
2562 (ppc_elf_select_plt_layout, ppc_elf_tls_setup): Update prototype.
2563 (ppc_elf_link_params): Declare.
2564 * section.c (SEC_INFO_TYPE_TARGET): Define.
2565 * bfd-in2.h: Regenerate.
2567 2014-02-02 Sandra Loosemore <sandra@codesourcery.com>
2569 * elf32-nios2.c (struct elf32_nios2_link_hash_table): Add
2571 (nios2_elf32_relocate_section): Use got_base to adjust
2572 GOT-pointer-relative relocations relative to _gp_got.
2573 (create_got_section): Create _gp_got symbol.
2574 (nios2_elf32_finish_dynamic_symbol): Make _gp_got absolute.
2575 (nios2_elf32_size_dynamic_sections): Set _gp_got offset.
2577 2014-01-30 Sandra Loosemore <sandra@codesourcery.com>
2579 * bfd-in2.h: Update from reloc.c.
2580 * elf32-nios2.c: Include elf32-nios2.h.
2581 (elf_nios2_howto_table_rel): Add entry for R_NIOS2_CALL26_NOAT.
2582 (nios2_reloc_map): Likewise.
2583 (enum elf32_nios2_stub_type): Declare.
2584 (struct elf32_nios2_stub_hash_entry): Declare.
2585 (nios2_stub_hash_entry, nios2_stub_hash_lookup): New macros.
2586 (struct elf32_nios2_link_hash_entry): Add hsh_cache field.
2587 (struct elf32_nios2_link_hash_table): Add new fields bstab,
2588 stub_bfd, add_stub_section, layout_sections_again, stub_group,
2589 bfd_count, top_index, input_list, all_local_syms.
2590 (nios2_call26_stub_entry): New.
2591 (nios2_elf32_install_imm16): Move up in file.
2592 (nios2_elf32_install_data): Move up in file.
2593 (hiadj): Move up in file.
2594 (stub_hash_newfunc): New.
2595 (link_hash_newfunc): Initialize hsh_cache field.
2597 (nios2_stub_name): New.
2598 (nios2_get_stub_entry): New.
2599 (nios2_add_stub): New.
2600 (nios2_elf32_setup_section_lists): New.
2601 (nios2_elf32_next_input_section): New.
2602 (CALL26_SEGMENT): New.
2603 (MAX_STUB_SECTION_SIZE): New.
2604 (group_sections): New.
2605 (nios2_type_of_stub): New.
2606 (nios2_build_one_stub): New.
2607 (nios2_size_one_stub): New.
2608 (get_local_syms): New.
2609 (nios2_elf32_size_stubs): New.
2610 (nios2_elf32_build_stubs): New.
2611 (nios2_elf32_do_call26_relocate): Correct CALL26 overflow test.
2612 (nios2_elf32_relocate_section): Handle R_NIOS2_CALL26_NOAT. Add
2613 trampolines for R_NIOS2_CALL26 stubs.
2614 (nios2_elf32_check_relocs): Handle R_NIOS2_CALL26_NOAT.
2615 (nios2_elf32_gc_sweep_hook): Likewise.
2616 (nios2_elf32_link_hash_table_create): Initialize the stub hash table.
2617 (nios2_elf32_link_hash_table_free): New.
2618 (bfd_elf32_bfd_link_hash_table_free): Define.
2619 * elf32-nios2.h: New file.
2620 * libbfd.h: Update from reloc.c.
2621 * reloc.c (BFD_RELOC_NIOS2_CALL26_NOAT): New.
2623 2014-01-29 Nick Clifton <nickc@redhat.com>
2626 * elf32-metag.c (elf_metag_post_process_headers): Call
2627 _bfd_elf_post_process_headers.
2628 * elf32-sh64.c (sh64_elf_copy_private_data): Call
2629 _bfd_elf_copy_private_data.
2630 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
2632 2014-01-29 Nick Clifton <nickc@redhat.com>
2634 * bfd-in.h (bfd_set_section_vma): Delete.
2635 (bfd_set_section_alignment): Delete.
2636 (bfd_set_section_userdata): Delete.
2637 (bfd_set_cacheable): Delete.
2638 * bfd.c (bfd_set_cacheable): New static inline function.
2639 * section.c (bfd_set_section_userdata): Likewise.
2640 (bfd_set_section_vma): Likewise.
2641 (bfd_set_section_alignment): Likewise.
2642 * bfd-in2.h: Regenerate.
2644 2014-01-28 Nick Clifton <nickc@redhat.com>
2646 * dwarf2.c (find_abstract_instance_name): For DW_FORM_ref_addr
2647 attributes select the CU containing the abbreviation, which may not
2650 2014-01-24 Alan Modra <amodra@gmail.com>
2652 * elf64-ppc.c (ppc_build_one_stub): Correct reloc count passed
2653 to get_relocs for ELFv2.
2655 2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
2658 * elf.c (_bfd_elf_map_sections_to_segments): Issue a linker error
2659 if TLS sections are not adjacent.
2661 2014-01-22 Alan Modra <amodra@gmail.com>
2663 * elflink.c (elf_link_add_object_symbols): Call minfo for --as-needed.
2665 2014-01-22 Alan Modra <amodra@gmail.com>
2667 * elf64-ppc.c (STK_LINKER): Comment typo fix.
2669 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2672 * elflink.c (_bfd_elf_merge_symbol): When types of the existing
2673 regular default symbol definition and the versioned dynamic
2674 symbol definition mismatch, skip the default symbol definition
2675 if one of them is IFUNC.
2677 2014-01-21 H.J. Lu <hongjiu.lu@intel.com>
2680 * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared,
2681 info->export_dynamic nor h->ref_dynamic for type mismatch when
2682 adding the default version.
2684 2014-01-16 Alan Modra <amodra@gmail.com>
2686 * elfxx-mips.c (mips_elf_record_got_page_entry): Pass in a
2687 mips_elf_traverse_got_arg* rather than mips_got_info*.
2688 Adjust caller. Alloc on output_bfd rather than symbol section
2691 2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
2693 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2695 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2697 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2700 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't discard relocs
2701 against __ehdr_start.
2702 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2704 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2706 * elf32-i386.c (elf_i386_allocate_dynrelocs): Revert the last
2708 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2710 2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
2713 * elf32-i386.c (elf_i386_allocate_dynrelocs): Don't update reloc
2714 count if there are any non pc-relative relocs.
2715 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs): Likewise.
2717 2014-01-14 Michael Hudson-Doyle <michael.hudson@linaro.org>
2718 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2720 * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use correct
2721 offset while calculating relocation address.
2722 (elfNN_aarch64_create_small_pltn_entry): Likewise.
2723 (elfNN_aarch64_init_small_plt0_entry): Likewise.
2725 2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
2728 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
2729 R_ARM_ABS8 and R_ARM_ABS16.
2731 2014-01-13 Alan Modra <amodra@gmail.com>
2733 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
2734 error when shared and force a plt call otherwise.
2735 (ppc_elf_size_dynamic_sections): Don't emit DT_PPC_GOT unless
2736 plt_type == PLT_NEW.
2737 (ppc_elf_relocate_section): Add missing test to resolve ifuncs to
2738 the appropriate call stub.
2740 2014-01-10 Alan Modra <amodra@gmail.com>
2745 * elf.c (assign_file_positions_for_load_sections): Revert last change.
2746 (assign_file_positions_for_non_load_sections): When setting up
2747 PT_GNU_RELRO header, don't require a corresponding PT_LOAD
2748 header that completely covers the relro region.
2750 2014-01-09 Tristan Gingold <gingold@adacore.com>
2752 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): use jump
2753 table macros and add macros to initializa the structure.
2755 2014-01-08 H.J. Lu <hongjiu.lu@intel.com>
2760 * elf.c (_bfd_elf_map_sections_to_segments): Don't check section
2761 size for PT_GNU_RELRO segment.
2762 (assign_file_positions_for_load_sections): If PT_LOAD segment
2763 doesn't fit PT_GNU_RELRO segment, adjust its p_filesz and p_memsz.
2765 2014-01-07 Tom Tromey <tromey@redhat.com>
2767 * elf32-xtensa.c (vsprint_msg): Don't use old VA_* compatibility
2770 2014-01-03 Nick Clifton <nickc@redhat.com>
2773 * elf.c (vma_page_aligned_bias): Handle a maxpagesize value of
2776 2014-01-02 Yuanhui Zhang <asmwarrior@gmail.com>
2779 * pef.c (bfd_pef_xlib_read_header): Increase buffer size to 80.
2781 2014-01-02 Nick Clifton <nickc@redhat.com>
2784 * archive.c (_bfd_get_elt_at_filepos): Store a copy of the
2785 filename in the bfd's filename field.
2786 * elfcode.h (bfd_from_remote_memory): Likewise.
2787 * ieee.c (ieee_object_p): Likewise.
2788 * mach-o.c (bfd_mach_o_fat_member_init): Likewise.
2789 * oasys.c (oasys_openr_next_archived_file): Likewise.
2790 * vms-lib.c (_bfd_vms_lib_get_module): Likewise.
2791 * opncls.c (bfd_fopen): Likewise.
2792 (bfd_openstreamr): Likewise.
2793 (bfd_openr_iovec): Likewise.
2794 (bfd_openw): Likewise.
2795 (bfd_create): Likewise.
2796 (_bfd_delete_bfd): Free filename.
2798 For older changes see ChangeLog-2013
2800 Copyright (C) 2014 Free Software Foundation, Inc.
2802 Copying and distribution of this file, with or without modification,
2803 are permitted in any medium without royalty provided the copyright
2804 notice and this notice are preserved.
2810 version-control: never