1 2012-12-21 H.J. Lu <hongjiu.lu@intel.com>
3 * elf64-x86-64.c (elf_x86_64_relocate_section): Check
4 R_X86_64_standard instead of R_X86_64_max for unrecognized
7 2012-12-21 H.J. Lu <hongjiu.lu@intel.com>
10 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Properly
11 adjust h->plt.refcount.
12 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
14 2012-12-19 H.J. Lu <hongjiu.lu@intel.com>
16 * elf32-i386.c (elf_i386_relocate_section): Replace
17 bfd_elf32_swap_reloc_out with elf_append_rel.
18 (elf_i386_finish_dynamic_symbol): Likewise.
20 * elflink.c (elf_append_rel): Call swap_reloc_out instead of
23 2012-12-18 H.J. Lu <hongjiu.lu@intel.com>
25 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Reindent.
27 2012-12-18 Edgar E. Iglesias <edgar.iglesias@gmail.com>
30 * elf32-microblaze.c (calc_fixup): Add end range.
32 2012-12-18 Alan Modra <amodra@gmail.com>
34 * elf.c (swap_out_syms): Set shndx to SHN_ABS when not one of
35 the special MAP_* values.
37 2012-12-17 Roland McGrath <mcgrathr@google.com>
38 Alan Modra <amodra@gmail.com>
40 * elf32-arm.c (elf32_arm_size_stubs): Skip input BFDs that are
43 2012-12-17 Nick Clifton <nickc@redhat.com>
45 * MAINTAINERS: Add copyright notice.
46 * Makefile.am: Likewise.
50 * acinclude.m4: Likewise.
52 * config.bfd: Likewise.
53 * configure.com: Likewise.
54 * configure.host: Likewise.
55 * configure.in: Likewise.
56 * makefile.vms: Likewise.
57 * warning.m4: Likewise.
58 * elf64-hppa.c: Fix copyright notice.
59 * Makefile.in: Regenerate.
61 2012-12-16 H.J. Lu <hongjiu.lu@intel.com>
63 * elf32-i386.c (elf_i386_check_relocs): Don't check IFUNC
65 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
67 2012-12-16 H.J. Lu <hongjiu.lu@intel.com>
70 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Also check
71 local IFUNC references.
72 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
74 2012-12-14 Tom Tromey <tromey@redhat.com>
76 * elf.c (elfcore_grok_note) <NT_FILE>: New case.
78 2012-12-13 H.J. Lu <hongjiu.lu@intel.com>
81 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Check local
83 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
85 2012-12-10 Edgar E. Iglesias <edgar.iglesias@gmail.com>
87 * reloc.c (MICROBLAZE): Document new relocations
88 * bfd-in2.h: Regenerated
89 * libbfd.h: Regenerated
90 * elf32-microblaze.c (microblaze_elf_howto_raw): Add TLS relocations
91 (microblaze_elf_reloc_type_lookup): Likewise
92 (elf32_mb_link_hash_entry): define TLS reference types
93 (elf32_mb_link_hash_table): add TLS Local dynamic GOT entry
94 #define has_tls_reloc if section has TLS relocs
95 (dtprel_base), (check_unique_offset): New
96 (microblaze_elf_output_dynamic_relocation): output simple
97 dynamic relocation into SRELOC.
98 (microblaze_elf_relocate_section): Accommodate TLS relocations.
99 (microblaze_elf_check_relocs): Likewise
100 (update_local_sym_info): New
101 (microblaze_elf_copy_indirect_symbol): Add tls_mask.
102 (allocate_dynrelocs): Handle TLS symbol
103 (microblaze_elf_size_dynamic_sections): Set size and offset
104 (microblaze_elf_finish_dynamic_symbol): Use
105 microblaze_elf_output_dynamic_relocation
107 2012-12-09 H.J. Lu <hongjiu.lu@intel.com>
110 * archive.c (bsd_write_armap): Properly check indicies bigger
113 2012-12-07 Alan Modra <amodra@gmail.com>
116 * elf.c (_bfd_elf_map_sections_to_segments): Include elf header
117 size when determining phdr_in_segment.
119 2012-12-06 Yufeng Zhang <yufeng.zhang@arm.com>
121 * elf64-aarch64.c (elf64_aarch64_grok_prstatus): New function.
122 (elf_backend_grok_prstatus): Define to elf64_aarch64_grok_prstatus.
124 2012-12-06 Alan Modra <amodra@gmail.com>
126 * elfxx-mips.c (allocate_dynrelocs): Correct test for symbol
127 defined in a regular file to include common symbols.
129 2012-12-05 Leif Ekblad <leif@rdos.net>
131 * config.bfd: Add x86_64-*-rdos.
133 2012-12-05 Alan Modra <amodra@gmail.com>
135 * elf64-ppc.c (build_plt_stub): Fix off by one error in branch
138 2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
141 * elfxx-mips.c (mips_elf_link_hash_table): Update comment for
143 (_bfd_mips_elf_create_dynamic_sections): Always create a
144 .rld_map section if no __rld_obj_head symbol has been seen.
146 2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
148 * elf32-mips.c (mips_elf32_object_p): Return right away when the
149 ABI is not compatible.
150 * elfn32-mips.c (mips_elf_n32_object_p): Likewise.
152 2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
154 * elf32-tilepro.c (tilepro_elf_mkobject): New function.
155 (bfd_elf32_mkobject): New macro.
157 2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
159 * elf32-mips.c (bfd_elf32_mkobject): New macro.
160 * elf64-mips.c (bfd_elf64_mkobject): Likewise.
161 * elfn32-mips.c (bfd_elf32_mkobject): Likewise.
162 * elfxx-mips.h (_bfd_mips_elf_mkobject): New prototype.
163 * elfxx-mips.c (mips_elf_obj_tdata): New struct.
164 (mips_elf_tdata): New macro.
165 (_bfd_mips_elf_mkobject): New function.
166 (mips_elf_merge_obj_attributes): Report the originating input BFD
167 on attribute conflicts.
169 2012-12-03 Maciej W. Rozycki <macro@codesourcery.com>
171 * elfxx-mips.c (mips_elf_merge_obj_attributes): Correct messages
172 for the -mdouble-float and -msingle-float cases throughout; make
173 all the messages report the output file consistently on the
176 2012-11-29 Roland McGrath <mcgrathr@google.com>
178 * elf-nacl.c (segment_eligible_for_headers): Disallow writable segments.
180 2012-11-26 Roland McGrath <mcgrathr@google.com>
182 * elf-nacl.c (nacl_modify_segment_map): Don't crash when INFO is null.
184 2012-11-21 H.J. Lu <hongjiu.lu@intel.com>
187 * elf.c (copy_elf_program_header): When rewriting program
188 header, set the output maxpagesize to the maximum alignment
189 of input PT_LOAD segments.
191 2012-11-21 Roland McGrath <mcgrathr@google.com>
193 * elf-nacl.c (segment_nonexecutable_and_has_contents): Renamed to ...
194 (segment_eligible_for_headers): ... this. Take new arguments
195 MAXPAGESIZE and SIZEOF_HEADERS. Return false if the first section's
196 start address doesn't leave space for the headers.
197 (nacl_modify_segment_map): Update caller.
199 2012-11-20 H.J. Lu <hongjiu.lu@intel.com>
202 * elf-bfd.h (elf_link_hash_entry): Remove ref_dynamic_nonweak
204 (elf_link_add_object_symbols): Don't set nor check
207 2012-11-20 Alan Modra <amodra@gmail.com>
209 * elf32-rx.c (rx_elf_print_private_bfd_data): Warning fix.
211 2012-11-16 Joey Ye <joey.ye@arm.com>
213 * elf32-arm.c (elf32_arm_final_link_relocate
214 <case R_ARM_THM_ALU_PREL_11_0, case R_ARM_THM_PC12>): Align address of
215 the place being relocated.
216 (elf32_arm_final_link_relocate, case R_ARM_THM_PC8): Align address
217 of the place being relocated and truncate addend.
220 2012-11-14 Roland McGrath <mcgrathr@google.com>
222 * elf32-arm.c (elf32_arm_nacl_plt0_entry): Use bic rather than bfc
223 instruction for data sandboxing.
225 2012-11-14 Tristan Gingold <gingold@adacore.com>
227 * mach-o.c (bfd_mach_o_read_main)
228 (bfd_mach_o_read_source_version): New functions.
229 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_DATA_IN_CODE,
230 BFD_MACH_O_LC_DYLIB_CODE_SIGN_DRS, BFD_MACH_O_LC_MAIN,
231 BFD_MACH_O_LC_SOURCE_VERSION.
232 * mach-o.h (bfd_mach_o_main_command)
233 (bfd_mach_o_source_version_command): New types.
234 (bfd_mach_o_load_command): Add fields for these new types.
236 2012-11-14 Tristan Gingold <gingold@adacore.com>
238 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Add a special
239 handling for non-scattered pairs. Update comments.
241 2012-11-13 Joe Seymour <jseymour@codesourcery.com>
243 * elf.c (rewrite_elf_program_header): Allocate elf_segment_map
244 with bfd_zalloc, instead of bfd_alloc.
246 2012-11-09 Nick Clifton <nickc@redhat.com>
248 * Makefile.am (ALL_MACHINES): Add cpu-v850-rh850.lo.
249 (ALL_MACHINES_CFILES): Add cpu-v850-rh850.c.
250 * archures.c (bfd_arch_info): Add bfd_v850_rh850_arch.
251 * config.bfd: Likewise.
252 * configure.in: Add bfd_elf32_v850_rh850_vec.
253 * cpu-v850.c: Update printed description.
254 * cpu-v850_rh850.c: New file.
255 * elf32-v850.c (v850_elf_check_relocs): Add support for RH850 ABI
257 (v850_elf_perform_relocation): Likewise.
258 (v850_elf_final_link_relocate): Likewise.
259 (v850_elf_relocate_section): Likewise.
260 (v850_elf_relax_section): Likewise.
261 (v800_elf_howto_table): New.
262 (v850_elf_object_p): Add support for RH850 ABI values.
263 (v850_elf_final_write_processing): Likewise.
264 (v850_elf_merge_private_bfd_data): Likewise.
265 (v850_elf_print_private_bfd_data): Likewise.
266 (v800_elf_reloc_map): New.
267 (v800_elf_reloc_type_lookup): New.
268 (v800_elf_reloc_name_lookup): New.
269 (v800_elf_info_to_howto): New.
270 (bfd_elf32_v850_rh850_vec): New.
271 (bfd_arch_v850_rh850): New.
272 * targets.c (_bfd_targets): Add bfd_elf32_v850_rh850_vec.
273 * Makefile.in: Regenerate.
274 * bfd-in2.h: Regenerate.
275 * configure: Regenerate.
277 * elf32-rx.c (describe_flags): New function. Returns a buffer
278 containing a description of the E_FLAG_RX_... values set.
279 (rx_elf_merge_private_bfd_data): Use it.
280 (rx_elf_print_private_bfd_data): Likewise.
281 (elf32_rx_machine): Skip EF_RX_CPU_RX check.
282 (elf32_rx_special_sections): Define.
283 (elf_backend_special_sections): Define.
285 2012-11-09 Edgar E. Iglesias <edgar.iglesias@gmail.com>
287 * config.bfd: Add microblazeel-*-*
288 * configure.in: Likewise.
289 * configure: Regenerate.
290 * elf32-microblaze.c (microblaze_elf_relocate_section): Add endian awareness.
291 (microblaze_elf_merge_private_bfd_data): New.
292 (microblaze_bfd_write_imm_value_32): New.
293 (microblaze_bfd_write_imm_value_64): New.
294 (microblaze_elf_relax_section): Add endian awareness.
295 (microblaze_elf_add_symbol_hook): Define TARGET_LITTLE_NAME,
296 TARGET_LITTLE_SYM and bfd_elf32_bfd_merge_private_bfd_data.
297 * targets.c: Add bfd target bfd_elf32_microblazeel_vec.
299 2012-11-09 H.J. Lu <hongjiu.lu@intel.com>
301 * aout-tic30.c (MY_final_link_callback): Remove trailing
303 * coff-h8500.c (extra_case): Likewise.
304 (bfd_coff_reloc16_get_value): Likewise.
305 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Likewise.
306 * elf.c (_bfd_elf_slurp_version_tables): Likewise.
307 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
308 * elf32-v850.c (v850_elf_perform_relocation): Likewise.
309 * opncls.c (bfd_calc_gnu_debuglink_crc32): Likewise.
310 * plugin.c (add_symbols): Likewise.
311 * reloc.c (bfd_check_overflow): Likewise.
312 * vms-lib.c (_bfd_vms_lib_archive_p): Likewise.
314 2012-11-08 Tom Tromey <tromey@redhat.com>
316 * elf.c (elfcore_grok_note) <NT_SIGINFO>: New case; make
319 2012-11-08 Alan Modra <amodra@gmail.com>
321 * aclocal.m4: Regenerate.
322 * Makefile.in: Regenerate.
323 * po/SRC-POTFILES.in: Regenerate.
325 2012-11-07 H.J. Lu <hongjiu.lu@intel.com>
327 * section.c (bfd_get_section_contents): Replace memcpy
330 2012-11-07 Hans-Peter Nilsson <hp@axis.com>
333 * aout-target.h (MY_close_and_cleanup): Make local function
334 instead of alias of MY_bfd_free_cached_info. Also call
335 _bfd_generic_close_and_cleanup.
337 2012-11-06 H.J. Lu <hongjiu.lu@intel.com>
340 * bfdio.c (bfd_iovec): Change return type of bclose to
342 (memory_bclose): Change return type to bfd_boolean.
343 * cache.c (cache_bclose): Likewise.
344 * opncls.c (opncls_bclose): Likewise. Return TRUE on success.
345 * vms-lib.c (vms_lib_bclose): Likewise. Return TRUE.
346 * libbfd.h: Regenerated.
348 2012-11-06 Tristan Gingold <gingold@adacore.com>
350 * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
351 Define as coff_find_nearest_line_discriminator.
353 2012-11-06 Alan Modra <amodra@gmail.com>
356 * opncls.c (opncls_iovec): Forward declare.
357 (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
360 2012-11-06 Alan Modra <amodra@gmail.com>
362 * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call
363 _bfd_generic_close_and_cleanup for mach_o_fat archives.
365 2012-11-06 Alan Modra <amodra@gmail.com>
367 * coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
368 tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
369 tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
371 * coff-ppc.c (TARGET_LITTLE_SYM): Likewise.
372 (TARGET_BIG_SYM): Likewise.
374 2012-11-06 Alan Modra <amodra@gmail.com>
376 * elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
377 (ppc64_elf_size_stubs): Lookup ".TOC.".
378 (ppc64_elf_relocate_section): Resolve special symbol ".TOC.".
380 2012-11-06 Alan Modra <amodra@gmail.com>
382 * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP.
384 2012-11-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
387 * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for
389 * elf64-s390.c (elf_s390_relocate_section): Likewise.
391 2012-11-05 Alan Modra <amodra@gmail.com>
393 * configure.in: Apply 2012-09-10 change to config.in here.
395 2012-11-05 Alan Modra <amodra@gmail.com>
397 * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside
398 loop. Really mark toc entry referring to another toc entry
399 only if the first is used.
401 2012-10-30 H.J. Lu <hongjiu.lu@intel.com>
403 * configure.in: Also handle --enable-64-bit-bfd when setting
404 CORE_HEADER for 'i[3-7]86-*-linux-*'.
406 2012-10-30 Steve McIntyre <steve.mcintyre@linaro.org>
408 * elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
409 display the new ARM hard-float/soft-float ABI flags for EABI_VER5
410 (elf32_arm_post_process_headers): Add the hard-float/soft-float
411 ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
413 2012-10-30 Yao Qi <yao@codesourcery.com>
414 H.J. Lu <hongjiu.lu@intel.com>
416 * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
417 'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
418 * configure: Regenerated.
420 * elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
421 'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
422 'prstatus64_t' respectively.
424 * hosts/x86-64linux.h (a8_uint64_t): New.
425 (user_regsx32_struct): Renamed to ...
426 (user_regs64_struct): This. Replace uint64_t with a8_uint64_t.
427 (elf_gregx32_t): Renamed to ...
428 (elf_greg64_t): This. Replace uint64_t with a8_uint64_t.
429 (ELF_NGREGX32): Removed.
431 (elf_gregx32_t): Removed.
433 (struct prstatus64_timeval): New.
434 (elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
435 (elf_prstatus64): New.
436 (elf_prpsinfo64): New.
437 (prstatus64_t, prpsinfo64_t): New typedef.
439 2012-10-29 Sean Keys <skeys@ipdatasys.com>
441 * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
444 2012-10-29 Alan Modra <amodra@gmail.com>
446 * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
447 R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
448 R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
449 R_PPC_VLE_SDAREL_HA16A reloc howtos.
451 2012-10-26 Nick Clifton <nickc@redhat.com>
453 * po/uk.po: Updated Ukranian translation.
455 2012-10-26 Alan Modra <amodra@gmail.com>
458 * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS
459 bfd_reloc values. Map to corresponding D-form relocs.
460 (is_insn_ds_form, is_insn_qs_form): New functions.
461 (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form
462 fields using D-form reloc.
464 2012-10-25 H.J. Lu <hongjiu.lu@intel.com>
466 * elf32-i386.c (elf_i386_size_dynamic_sections): Replace
467 _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
468 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
470 2012-10-24 H.J. Lu <hongjiu.lu@intel.com>
472 * compress.c (bfd_is_section_compressed): Don't decompress the
475 2012-10-23 Nathan Sidwell <nathan@codesourcery.com>
477 * bfd-in.h (bfd_elf_stack_segment_size): Declare.
478 * bfd-in2.h: Rebuilt.
479 * elfxx-target.h (elf_backend_stack_align): New.
481 * elf-bfd.h (struct elf_backend_data): Add stack_align field.
482 * elf.c (bfd_elf_map_sections_to_segments): Pay attention to
483 stack_align and stacksize for PT_GNU_STACK segment.
484 (assign_file_positions_for_non_load_sections): Set p_memsz for
485 PT_GNU_STACK segment.
486 (copy_elf_program_header): Copy PT_GNU_STACK size.
487 * elflink.c (bfd_elf_stack_segment_size): New function, taken from
489 (bfd_elf_size_dynamic_sections): Determine
490 PT_GNU_STACK requirements after calling backend. Pay attention to
492 * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
493 bfd_elf_stack_segment_size.
494 (elf32_bfinfdpic_modify_program_headers): Delete.
495 (elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
497 (elf_backend_stack_align): Override.
498 (elf_backend_modify_program_headers): Don't override.
499 * elf32-frv.c (frvfdpic_always_size_sections): Call
500 bfd_elf_stack_segment_size.
501 (elf32_frvfdpic_modify_program_headers): Delete.
502 (elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
504 (elf_backend_stack_align): Override.
505 (elf_backend_modify_program_headers): Don't override.
506 * elf32-lm32.c (lm32_elf_always_size_sections): Leave
507 PT_GNU_STACK creation to underlying elf support. Check
508 __stacksize here for backwards compatibility, and set it if
510 (lm32_elf_modify_segment_map): Delete.
511 (lm32_elf_modify_program_headers): Delete.
512 (elf_backend_stack_align): Override.
513 (elf_backend_modify_segment_map): Don't override.
514 (elf_backend_modify_program_headers): Don't override.
515 * elf32-sh.c (sh_elf_always_size_sections): Call
516 bfd_elf_stack_segment_size.
517 (sh_elf_modify_program_headers): Delete.
518 (sh_elf_copy_private_data): Don't copy PT_GNU_STACK
520 (elf_backend_stack_align): Override.
521 (elf_backend_modify_program_headers): Don't override.
522 * elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
523 bfd_elf_stack_segment_size.
524 (elf32_tic6x_modify_program_headers): Delete.
525 (elf32_tic6x_copy_private_data): Delete.
526 (elf_backend_stack_align): Override.
527 (bfd_elf32_bfd_copy_private_bfd_data): Don't override.
528 (elf_backend_modify_program_headers): Don't override.
530 2012-10-22 Alan Modra <amodra@gmail.com>
532 * cache.c (cache_bmmap): Don't use void* arithmetic.
534 2012-10-21 Alan Modra <amodra@gmail.com>
536 * compress.c (bfd_cache_section_contents): New function.
537 * bfd-in2.h: Regenerate.
539 2012-10-21 Hans-Peter Nilsson <hp@bitrange.com>
541 * linker.c (_bfd_generic_link_output_symbols): Handle a
542 no-longer-global symbol entered through a plugin.
544 2012-10-20 Alan Modra <amodra@gmail.com>
546 * compress.c: Reinstate 2012-10-19 change.
547 (bfd_get_full_section_contents): Don't free unless we alloc.
548 Use proper decompress size. Delete some vars, rename others.
550 2012-10-19 Tom Tromey <tromey@redhat.com>
552 * compress.c: Revert previous patch.
554 2012-10-19 Tom Tromey <tromey@redhat.com>
556 * compress.c (bfd_get_full_section_contents): Don't cache
557 decompressed contents.
559 2012-10-18 Kai Tietz <ktietz@redhat.com>
562 * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
563 Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
564 * coff-x86_64.c: Likewise.
565 * coffcode.h (DOT_ZDEBUG): New define.
566 (sec_to_styp_flags): Check for .zdebug.
567 (styp_to_sec_flags): Likewise.
568 * coffgen.c (make_a_section): Handle .debug_* section
569 compression/decompression flags.
570 * cofflink.c (mark_relocs): Ignore relocations
571 for a section, which isn't marked as used.
572 (_bfd_coff_link_input_bfd): Add support of compressed
574 * compress.c (decompress_contents): Loop as long
575 as there is input available and there is room for
577 * bfd/pe-arm.c: Add .zdebug_ partial match entry.
578 * pe-i386.c: Likewise.
579 * pe-x86_64.c: Likewise.
580 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
581 data-directories as this might destroy content.
583 * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
584 define as coff_find_nearest_line_discriminator.
585 * libcoff-in.h (coff_find_nearest_line_discriminator): New
586 * libcoff.h: Regenerated.
587 * coff-x86_64.c: Likewise.
588 * coffgen.c (coff_find_nearest_line_discriminator): New function.
591 2012-10-16 Joel Brobecker <brobecker@adacore.com>
593 * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
594 field to _bfd_archive_close_and_cleanup.
595 (aix5coff64_vec): Likewise.
597 2012-10-16 Joel Brobecker <brobecker@adacore.com>
599 * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
600 field to _bfd_archive_close_and_cleanup.
601 (pmac_xcoff_vec): Likewise.
603 2012-10-16 Sofiane Naci <sofiane.naci@arm.com>
605 * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
606 R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
607 R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
608 R_AARCH64_TLSLE_ADD_TPREL_HI12.
609 (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
610 R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
611 (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
612 AARCH64_TLSLE_*_TPREL_* relocations.
614 2012-10-16 Alan Modra <amodra@gmail.com>
616 * elf32-xtensa.c (free_section_cache): Renamed from
617 clear_section_cache. Don't zero cache.
618 (section_cache_section): Remove ineffectual zero of cache.
619 Call init_section_cache instead.
621 2012-10-15 Doug Evans <dje@google.com>
623 * elf.c (special_sections_d): Add comment.
625 2012-10-13 H.J. Lu <hongjiu.lu@intel.com>
627 * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
628 * configure.in (lt_cv_dlopen_libs): AC_SUBST.
629 * Makefile.in: Regenerated.
630 * configure: Likewise.
632 2012-10-08 Alan Modra <amodra@gmail.com>
635 * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
638 2012-09-20 Walter Lee <walt@tilera.com>
640 * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
641 relocations with value of hgot.
642 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
644 2012-09-19 Steve Ellcey <sellcey@mips.com>
646 * config.bfd: Add mips*-mti-elf* target.
648 2012-09-18 H.J. Lu <hongjiu.lu@intel.com>
651 * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
652 if the old symbol is weak.
654 * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
655 _bfd_elf_merge_symbol call.
657 * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
658 if the old symbol is weak.
659 (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
661 (elf_link_add_object_symbols): Don't update symbol type from a
662 weak definition. Update symbol type from a common symbol when
663 overriding a weak symbol.
665 2012-09-17 H.J. Lu <hongjiu.lu@intel.com>
667 * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
669 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
671 2012-09-17 H.J. Lu <hongjiu.lu@intel.com>
673 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
675 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
677 2012-09-17 Walter Lee <walt@tilera.com>
679 * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
681 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
683 2012-09-17 Walter Lee <walt@tilera.com>
685 * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
686 of got relocations for when .got.plt section is merged with .got.
687 * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
689 2012-09-14 David Edelsohn <dje.gcc@gmail.com>
691 * configure: Regenerate.
693 2012-09-13 Anthony Green <green@moxielogic.com>
695 * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
697 (bfd_elf32_moxie_vec): Remove.
698 * config.bfd, configure.in: Add bi-endian support for moxie.
699 * configure: Rebuilt.
700 * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
701 (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
703 2012-09-12 Doug Kwan <dougkwan@google.com>
705 * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
706 relocation for stub lookup.
708 2012-09-12 Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
710 * bfd-in2.h: Regenerated.
712 (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
713 (elf64_aarch64_reloc_map): Add reloc entry.
714 (aarch64_resolve_relocation): Likewise.
715 (bfd_elf_aarch64_put_addend): Likewise.
716 (aarch64_reloc_got_type): Likewise.
717 (elf64_aarch64_final_link_relocate): Likewise.
718 (lf64_aarch64_check_relocs): Likewise.
719 (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
721 * libbfd.h: Regenerated.
722 * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
724 2012-09-10 Matthias Klose <doko@ubuntu.com>
726 * config.in: Disable sanity check for kfreebsd.
728 2012-09-10 H.J. Lu <hongjiu.lu@intel.com>
730 * configure: Regenerated.
732 2012-09-04 Sergey A. Guriev <sergey.a.guriev@intel.com>
734 * cpu-ia64-opc.c (ins_cnt6a): New function.
738 (elf64_ia64_operands): Add new operand types.
740 2012-09-04 H.J. Lu <hongjiu.lu@intel.com>
743 * elf.c (ignore_section_sym): Also ignore section symbols without
746 2012-09-03 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
748 * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
749 local and global ifunc symbols.
750 * elf64-s390.c (elf_s390_relocate_section): Likewise.
752 2012-09-02 H.J. Lu <hongjiu.lu@intel.com>
754 * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
757 * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
760 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
761 hdynamic instead of "_DYNAMIC".
762 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
763 * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
764 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
765 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
766 * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
767 * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
768 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
769 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
770 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
771 * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
772 * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
773 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
774 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
775 * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
776 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
777 * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
778 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
779 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
780 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
781 * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
782 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
783 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
784 * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
786 * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
787 hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
788 _PROCEDURE_LINKAGE_TABLE_.
789 * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
790 * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
792 2012-08-31 H.J. Lu <hongjiu.lu@intel.com>
794 * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
796 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
798 2012-08-31 H.J. Lu <hongjiu.lu@intel.com>
800 * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
801 (elf_i386_size_dynamic_sections): Use it on input sections.
802 (elf_i386_relocate_section): Don't convert
803 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
804 for local symbols here.
806 * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
807 (elf_x86_64_size_dynamic_sections): Use it on input sections.
808 (elf_x86_64_relocate_section): Don't convert
809 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
810 for local symbols here.
812 2012-08-30 H.J. Lu <hongjiu.lu@intel.com>
814 * elf32-i386.c (elf_i386_relocate_section): Convert
815 "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
818 * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
819 "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
822 2012-08-31 Alan Modra <amodra@gmail.com>
825 * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
826 by a linker script in .opd to corresponding input .opd section.
828 2012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
830 * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
832 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
834 2012-08-28 Maciej W. Rozycki <macro@codesourcery.com>
836 * elflink.c (_bfd_elf_merge_symbol): Also override the version
837 a dynamic symbol defaulted to if preempted with a hidden or
840 2012-08-28 Walter Lee <walt@tilera.com>
842 * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
844 (tilepro_plt_entry_build): Account for new header size.
845 (tilepro_elf_finish_dynamic_sections): Ditto.
846 (tilepro_elf_plt_sym_val): Ditto.
847 * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
849 (tilegx_elf_finish_dynamic_sections): Account for new padding.
851 2012-08-27 Walter Lee <walt@tilera.com>
853 * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
854 BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
855 BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
856 BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
857 BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
858 BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
859 BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
860 BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
861 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
862 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
863 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
864 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
865 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
866 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
867 * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
868 (tilegx_reloc_map): Ditto.
869 (reloc_to_create_func): Ditto.
870 (tilegx_elf_check_relocs): Ditto.
871 (tilegx_elf_gc_sweep_hook): Ditto.
872 (tilegx_elf_relocate_section): Ditto.
873 * libbfd.h: Regenerate.
874 * bfd-in2.h: Regenerate.
876 2012-08-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
878 * elf32-arm.c (v8): New array.
879 (tag_cpu_arch_combine): Add support for ARMv8 attributes.
880 (elf32_arm_merge_eabi_attributes): Likewise.
881 (VFP_VERSION_COUNT): New define.
883 2012-08-20 Tom Tromey <tromey@redhat.com>
885 * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
887 * opncls.c (_bfd_delete_bfd): Free arelt_data.
888 * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
890 * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
891 * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
893 (xcoff_write_archive_contents_old): Likewise.
894 (xcoff_write_archive_contents_big): Likewise.
895 * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
897 * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
899 (_bfd_get_elt_at_filepos): Likewise. Clear n_nfd->arelt_data on
901 (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
902 (do_slurp_coff_armap): Likewise.
903 (_bfd_slurp_extended_name_table): Likewise.
904 (bfd_slurp_bsd_armap_f2): Likewise. Don't leak 'mapdata'.
906 2012-08-17 Nick Clifton <nickc@redhat.com>
908 * po/vi.po: Updated Vietnamese translation.
910 2012-08-17 Yuri Chornoivan <yurchor@ukr.net>
912 * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
913 * elfxx-mips.c, * vms-alpha.c: Typo fixes.
915 2012-08-17 Alan Modra <amodra@gmail.com>
918 * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
919 Instead malloc areltdata.
921 2012-08-16 Tom Tromey <tromey@redhat.com>
924 * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
925 'member' BFD. Don't try to free 'ared'.
927 2012-08-14 Nick Clifton <nickc@redhat.com>
929 * po/uk.po: Updated Ukranian translation.
931 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
933 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
934 the options section in the output rather than input BFD to
935 decide if to add a DT_MIPS_OPTIONS tag.
937 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
939 * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
942 2012-08-13 Ian Bolton <ian.bolton@arm.com>
943 Laurent Desnogues <laurent.desnogues@arm.com>
944 Jim MacArthur <jim.macarthur@arm.com>
945 Marcus Shawcroft <marcus.shawcroft@arm.com>
946 Nigel Stephens <nigel.stephens@arm.com>
947 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
948 Richard Earnshaw <rearnsha@arm.com>
949 Sofiane Naci <sofiane.naci@arm.com>
950 Tejas Belagod <tejas.belagod@arm.com>
951 Yufeng Zhang <yufeng.zhang@arm.com>
953 * Makefile.am: Add AArch64 files.
954 * Makefile.in: Regenerate.
955 * archures.c (bfd_aarch64_arch): New declaration.
956 (bfd_archures_list): Use bfd_archures_list.
957 * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
958 (bfd_aarch64_process_before_allocation): New declaration.
959 (bfd_elf64_aarch64_process_before_allocation): New declaration.
960 (bfd_elf64_aarch64_set_options): New declaration.
961 (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
962 (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
963 (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
964 (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
965 (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
966 (bfd_is_aarch64_special_symbol_name): New declaration.
967 (bfd_aarch64_merge_machines): New declaration.
968 (bfd_aarch64_update_notes): New declaration.
969 (int bfd_aarch64_get_mach_from_notes): New declaration.
970 (elf64_aarch64_setup_section_lists): New declaration.
971 (elf64_aarch64_next_input_section): New declaration.
972 (elf64_aarch64_size_stubs): New declaration.
973 (elf64_aarch64_build_stubs): New declaration.
974 * config.bfd: Add AArch64.
975 * configure.in: Add AArch64.
976 * configure: Regenerate.
977 * cpu-aarch64.c: New file.
978 * elf-bfd.h: Add AArch64.
979 * bfd-in2.h: Regenerate.
980 * libbfd.h: Regenerate.
981 * elf64-aarch64.c: New file.
982 * reloc.c: Add AArch64 relocations.
983 * targets.c: Add AArch64.
984 * po/SRC-POTFILES.in: Regenerate.
986 2012-08-13 Maciej W. Rozycki <macro@codesourcery.com>
988 * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
989 of protected symbols.
991 2012-08-10 Alan Modra <amodra@gmail.com>
994 * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
995 (setup_group): Adjust uses.
996 (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
999 2012-08-09 Nick Clifton <nickc@redhat.com>
1001 * po/vi.po: Updated Vietnamese translation.
1003 2012-08-09 Maciej W. Rozycki <macro@codesourcery.com>
1005 * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
1006 Remove macros, folding them into...
1007 (LA25_LUI_MICROMIPS): ... this new macro.
1008 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
1009 (LA25_J_MICROMIPS): ... this new macro.
1010 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
1012 (LA25_ADDIU_MICROMIPS): ... this new macro.
1013 (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
1014 (mips_elf_create_la25_stub): Use them.
1015 (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
1016 (_bfd_mips_elf_relax_section): Likewise.
1018 2012-08-09 Alan Modra <amodra@gmail.com>
1019 Tom Tromey <tromey@redhat.com>
1021 * archive.c (SECTION Archives): Update documentation.
1022 (_bfd_delete_archive_data): Remove.
1023 (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
1024 (archive_close_worker, _bfd_archive_close_and_cleanup): New
1026 * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
1027 (_bfd_delete_archive_data): Don't declare.
1028 (_bfd_archive_close_and_cleanup): Declare.
1029 (_bfd_generic_close_and_cleanup): Redefine.
1030 * libbfd.h: Rebuild.
1031 * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
1032 (bfd_close): Don't close nested thin archives here.
1034 2012-08-07 Tom Tromey <tromey@redhat.com>
1036 * archive.c (_bfd_delete_archive_data): New function.
1037 * libbfd-in.h (_bfd_delete_archive_data): Declare.
1038 * libbfd.h: Rebuild.
1039 * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
1041 2012-08-07 Nick Clifton <nickc@redhat.com>
1043 * po/uk.po: Updated Ukranian translation.
1045 2012-08-06 Maciej W. Rozycki <macro@codesourcery.com>
1047 * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
1048 symbols special case.
1050 2012-08-05 Maciej W. Rozycki <macro@linux-mips.org>
1052 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
1053 PLT slots for local symbols.
1055 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
1057 * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
1058 field initializers throughout.
1059 * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
1061 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
1063 * elfxx-mips.c (mips_elf_perform_relocation): Update the
1064 cross-mode jump message.
1066 2012-08-03 Maciej W. Rozycki <macro@codesourcery.com>
1068 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
1069 comment on DT_MIPS_RLD_MAP.
1071 2012-08-03 Tom Tromey <tromey@redhat.com>
1073 * opncls.c (_bfd_delete_bfd): Now static.
1074 * libbfd-in.h (_bfd_delete_bfd): Don't declare.
1075 * libbfd.h: Rebuild.
1077 2012-08-02 Sean Keys <skeys@ipdatasys.com>
1079 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
1080 conditional statment to allow suppression of mismatched bank
1083 2012-08-01 Alan Modra <amodra@gmail.com>
1085 * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
1086 (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
1088 (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
1090 2012-07-30 Nick Clifton <nickc@redhat.com>
1092 * po/bfd.pot: Updated template.
1093 * po/es.po: Updated Spanish translation.
1094 * po/fi.po: Updated Finnish translation.
1095 * po/fr.po: Updated French translation.
1096 * po/ru.po: Updated Russian translation.
1097 * po/uk.po: Updated Ukranian translation.
1099 2012-07-27 Mike Frysinger <vapier@gentoo.org>
1101 * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
1102 (AM_INIT_AUTOMAKE): Remove args.
1103 * configure: Regenerate.
1105 2012-07-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1107 * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
1108 arch depending on the target size.
1110 2012-07-27 Tristan Gingold <gingold@adacore.com>
1112 * configure.in: Bump version to 2.23.51
1113 * configure: Regenerate.
1115 2012-07-26 Teresa Johnson <tejohnson@google.com>
1117 * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
1120 2012-07-26 Meador Inge <meadori@codesourcery.com>
1121 Nick Clifton <nickc@redhat.com>
1124 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
1125 if a required section is missing from the linker script.
1127 2012-07-24 Jan Waclawek <konfera@efton.sk>
1129 * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
1130 _bfd_elf_link_read_relocs with keep_memory as TRUE.
1132 2012-07-24 Teresa Johnson <tejohnson@google.com>
1134 * bfd.c (bfd_find_nearest_line_discriminator): New macro.
1135 * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
1136 * coff64-rs6000.c: Likewise.
1137 * dwarf2.c (struct line_info): Add discriminator field.
1138 (add_line_info): Fill in new discriminator field.
1139 (decode_line_info): Record discriminator information instead
1141 (lookup_address_in_line_info_table): Return discriminator field if
1143 (comp_unit_find_nearest_line): Add discriminator argument.
1144 (find_line): Likewise.
1145 (_bfd_dwarf2_find_nearest_line): Likewise.
1146 (_bfd_dwarf2_find_line): Likewise.
1147 * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
1148 (_bfd_elf_find_line_discriminator): Likewise.
1149 (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
1150 * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
1151 that invokes _bfd_elf_find_nearest_line_discriminator with correct
1153 (_bfd_elf_find_nearest_line_discriminator): New.
1154 (_bfd_elf_find_line): Change to a wrapper
1155 that invokes _bfd_elf_find_line_discriminator with correct
1157 (_bfd_elf_find_line_discriminator): New.
1158 * coffgen.c (coff_find_nearest_line_with_names): Handle
1159 new discriminator argument.
1160 * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
1161 * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
1162 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
1163 * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
1164 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
1166 (_bfd_dwarf2_find_line): Likewise.
1167 (_bfd_generic_find_nearest_line_discriminator): New.
1168 * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
1169 * bfd-in2.h: Regenerated.
1170 * libbfd.h: Likewise.
1171 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
1172 _bfd_find_nearest_line_discriminator with
1173 _bfd_generic_find_nearest_line_discriminator.
1174 (bfd_target): Add _bfd_find_nearest_line_discriminator.
1176 2012-07-24 Sean Keys <skeys@ipdatasys.com>
1178 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
1179 that enables the linker to offset addresses, when linking against
1180 symbols from the XGATE processor and vice versa.
1182 2012-07-23 Nick Clifton <nickc@redhat.com>
1184 * cisco-core.c (cisco_core_file_failing_command): Make static.
1185 (cisco_core_file_failing_signal): Make static.
1187 2012-07-18 H.J. Lu <hongjiu.lu@intel.com>
1189 * bfd-in2.h: Regenerated.
1191 2012-07-18 Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
1194 * section.c: Fix a typo in comments.
1196 2012-07-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1198 * elf64-s390.c: Include elf-s390-common.c.
1199 (R_390_IRELATIVE): New reloc.
1200 (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
1201 (RELA_ENTRY_SIZE): New macro.
1202 (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
1203 *ifunc_resolver_section.
1204 (struct plt_entry): New struct.
1205 (struct elf_s390_obj_tdata): New field local_plt.
1206 (elf_s390_local_plt): New macro.
1207 (struct elf_s390_link_hash_table): New field irelifunc.
1209 (link_hash_newfunc): Initialize new fields.
1210 (elf_s390_check_relocs): Handle IFUNC symbols.
1211 (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
1213 (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
1215 (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
1216 (elf_s390_relocate_section): Likewise.
1217 (elf_s390_finish_dynamic_symbol): Likewise.
1218 (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
1219 (elf_s390_finish_ifunc_symbol): New function.
1220 (elf_s390_gc_sweep_hook): Handle local plt entries.
1221 (elf_backend_add_symbol_hook): Define.
1222 * elf32-s390.c: See elf64-s390.c changes.
1223 * elf-s390-common.c: New file.
1224 * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
1225 * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
1226 BFD_RELOC_390_IRELATIVE.
1227 * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
1229 2012-07-13 Nick Clifton <nickc@redhat.com>
1231 * aix386-core.c: Remove use of PTR and PARAMS macros.
1232 * archive.c: Likewise.
1233 * cache.c: Likewise.
1234 * cisco-core.c: Likewise.
1235 * coff-alpha.c: Likewise.
1236 * coff-apollo.c: Likewise.
1237 * coff-aux.c: Likewise.
1238 * coff-h8300.c: Likewise.
1239 * coff-h8500.c: Likewise.
1240 * coff-i386.c: Likewise.
1241 * coff-i960.c: Likewise.
1242 * coff-ia64.c: Likewise.
1243 * coff-m68k.c: Likewise.
1244 * coff-m88k.c: Likewise.
1245 * coff-mcore.c: Likewise.
1246 * coff-mips.c: Likewise.
1247 * coff-or32.c: Likewise.
1248 * coff-ppc.c: Likewise.
1249 * coff-rs6000.c: Likewise.
1250 * coff-sh.c: Likewise.
1251 * coff-sparc.c: Likewise.
1252 * coff-stgo32.c: Likewise.
1253 * coff-tic30.c: Likewise.
1254 * coff-tic4x.c: Likewise.
1255 * coff-tic54x.c: Likewise.
1256 * coff-tic80.c: Likewise.
1257 * coff-w65.c: Likewise.
1258 * cofflink.c: Likewise.
1259 * cpu-arc.c: Likewise.
1260 * cpu-cris.c: Likewise.
1261 * cpu-h8500.c: Likewise.
1262 * cpu-i960.c: Likewise.
1263 * cpu-msp430.c: Likewise.
1264 * cpu-ns32k.c: Likewise.
1265 * cpu-powerpc.c: Likewise.
1266 * cpu-rs6000.c: Likewise.
1267 * cpu-tic4x.c: Likewise.
1268 * cpu-w65.c: Likewise.
1269 * ecoff.c: Likewise.
1270 * ecofflink.c: Likewise.
1271 * elf-m10200.c: Likewise.
1272 * elf32-bfin.c: Likewise.
1273 * elf32-cris.c: Likewise.
1274 * elf32-crx.c: Likewise.
1275 * elf32-fr30.c: Likewise.
1276 * elf32-frv.c: Likewise.
1277 * elf32-h8300.c: Likewise.
1278 * elf32-i960.c: Likewise.
1279 * elf32-m32c.c: Likewise.
1280 * elf32-m68hc11.c: Likewise.
1281 * elf32-m68hc12.c: Likewise.
1282 * elf32-m68hc1x.c: Likewise.
1283 * elf32-m68k.c: Likewise.
1284 * elf32-mcore.c: Likewise.
1285 * elf32-rl78.c: Likewise.
1286 * elf32-rx.c: Likewise.
1287 * elf32-s390.c: Likewise.
1288 * elf32-vax.c: Likewise.
1289 * elf64-alpha.c: Likewise.
1290 * elf64-mmix.c: Likewise.
1291 * elf64-s390.c: Likewise.
1292 * elf64-sparc.c: Likewise.
1293 * elfnn-ia64.c: Likewise.
1294 * elfxx-mips.c: Likewise.
1295 * elfxx-sparc.c: Likewise.
1297 * hp300hpux.c: Likewise.
1298 * hppabsd-core.c: Likewise.
1299 * hpux-core.c: Likewise.
1300 * i386dynix.c: Likewise.
1301 * i386linux.c: Likewise.
1302 * i386lynx.c: Likewise.
1303 * i386mach3.c: Likewise.
1304 * i386msdos.c: Likewise.
1305 * i386os9k.c: Likewise.
1306 * irix-core.c: Likewise.
1307 * lynx-core.c: Likewise.
1308 * m68klinux.c: Likewise.
1309 * mach-o.h: Likewise.
1310 * mipsbsd.c: Likewise.
1311 * netbsd-core.c: Likewise.
1312 * nlm32-i386.c: Likewise.
1313 * osf-core.c: Likewise.
1314 * pc532-mach.c: Likewise.
1316 * ppcboot.c: Likewise.
1317 * ptrace-core.c: Likewise.
1318 * reloc16.c: Likewise.
1319 * sco5-core.c: Likewise.
1321 * sparclinux.c: Likewise.
1322 * sparclynx.c: Likewise.
1323 * ticoff.h: Likewise.
1324 * trad-core.c: Likewise.
1325 * vms-lib.c: Likewise.
1328 2012-07-09 Alan Modra <amodra@gmail.com>
1331 * elflink.c (elf_sort_symbol): Sort by size too.
1332 (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
1333 Do not depend on ordering of symbol aliases. Match largest size.
1335 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
1337 * elf.c (assign_section_numbers): Check if number of sections
1339 * elfcode.h (elf_object_p): Likewise.
1341 2012-07-03 Nick Clifton <nickc@redhat.com>
1343 * archive.c (bsd_write_armap): Catch attempts to create an archive
1344 with indicies bigger than 4Gb.
1345 (coff_write_armap): Likewise.
1347 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
1350 * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
1353 2012-07-03 H.J. Lu <hongjiu.lu@intel.com>
1356 * elflink.c (_bfd_elf_update_dynamic_flags): New.
1357 (_bfd_elf_merge_symbol): Update both real and indirect symbol
1359 (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
1360 the indirect symbol is defined in a shared library.
1361 (elf_link_add_object_symbols): Likewise. If the indirect
1362 symbol has been forced local, don't make the real symbol
1364 (elf_link_check_versioned_symbol): Check indirect symbol.
1365 (elf_link_output_extsym): Use real symbol definition when
1366 reporting indirect symbol error. Check version info for
1367 dynamic versioned symbol.
1369 2012-07-03 Alan Modra <amodra@gmail.com>
1372 * elf.c (assign_file_positions_for_load_sections): Remove assertions
1373 that only PT_LOAD headers include file header and section headers.
1374 (assign_file_positions_for_non_load_sections): Similarly don't
1375 assert PT_GNU_RELRO header does not include file and section headers.
1376 Compare first section vma rather than PT_LOAD p_vaddr against
1377 relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
1378 abort with assertion.
1380 2012-07-02 Alan Modra <amodra@gmail.com>
1382 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
1383 "anyway" variant when creating .plt.
1384 (m32c_elf_relax_plt_section): Remove redundant test and unused param.
1385 (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
1386 m32c_elf_relax_plt_section.
1387 * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
1388 when creating .got and .got.plt.
1389 (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
1390 bfd_get_linker_section.
1391 * sunos.c: Similarly throughout.
1393 2012-07-01 Andreas Schwab <schwab@linux-m68k.org>
1395 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
1398 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
1400 * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
1401 on unresolvable relocation.
1403 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
1405 * archive.c (_bfd_compute_and_write_armap): Simplify global
1408 2012-06-29 Nick Clifton <nickc@redhat.com>
1411 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
1412 for locally bound symbols.
1414 2012-06-29 Alan Modra <amodra@gmail.com>
1416 * section.c (bfd_get_linker_section): New function.
1417 * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
1418 the above throughout rather than bfd_get_section_by_name. Use
1419 bfd_make_section_anyway rather than bfd_make_section when creating
1421 * elf32-bfin.c: Likewise.
1422 * elf32-cr16.c: Likewise.
1423 * elf32-cris.c: Likewise.
1424 * elf32-frv.c: Likewise.
1425 * elf32-hppa.c: Likewise.
1426 * elf32-i370.c: Likewise.
1427 * elf32-i386.c: Likewise.
1428 * elf32-lm32.c: Likewise.
1429 * elf32-m32c.c: Likewise.
1430 * elf32-m32r.c: Likewise.
1431 * elf32-m68k.c: Likewise.
1432 * elf32-microblaze.c: Likewise.
1433 * elf32-ppc.c: Likewise.
1434 * elf32-rl78.c: Likewise.
1435 * elf32-s390.c: Likewise.
1436 * elf32-score.c: Likewise.
1437 * elf32-score7.c: Likewise.
1438 * elf32-sh.c: Likewise.
1439 * elf32-tic6x.c: Likewise.
1440 * elf32-tilepro.c: Likewise.
1441 * elf32-vax.c: Likewise.
1442 * elf32-xstormy16.c: Likewise.
1443 * elf32-xtensa.c: Likewise.
1444 * elf64-alpha.c: Likewise.
1445 * elf64-hppa.c: Likewise.
1446 * elf64-ia64-vms.c: Likewise.
1447 * elf64-ppc.c: Likewise.
1448 * elf64-s390.c: Likewise.
1449 * elf64-sh64.c: Likewise.
1450 * elf64-sparc.c: Likewise.
1451 * elf64-x86-64.c: Likewise.
1452 * elfnn-ia64.c: Likewise.
1453 * elfxx-mips.c: Likewise.
1454 * elfxx-sparc.c: Likewise.
1455 * elfxx-tilegx.c: Likewise.
1456 * elflink.c: Likewise.
1457 * elf-vxworks.c: Likewise.
1458 * elf-m10300.c: Likewise. Also make use of htab plt, got and
1460 * bfd-in2.h: Regenerate.
1461 * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
1462 calling create_rofixup_section.
1463 * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
1465 2012-06-29 Alan Modra <amodra@gmail.com>
1467 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
1468 section for bss type sections, except for .rela.bss.
1469 * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1470 * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
1471 * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
1472 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
1473 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
1475 2012-06-28 Roland McGrath <mcgrathr@google.com>
1477 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
1478 displacement calculation in nacl_p case.
1480 2012-06-28 Nick Clifton <nickc@redhat.com>
1482 * po/uk.po: New Ukranian translation.
1483 * configure.in (ALL_LINGUAS): Add uk.
1484 * configure: Regenerate.
1486 2012-06-26 Alan Modra <amodra@gmail.com>
1488 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
1489 file has multiple .got/.toc sections and all don't fit in
1492 2012-06-22 Roland McGrath <mcgrathr@google.com>
1494 * elf.c (assign_file_positions_for_non_load_sections): Define
1495 __ehdr_start symbol if it's referenced and there's a PT_LOAD
1496 segment that covers both the file and program headers.
1498 2012-06-22 Andreas Schwab <schwab@linux-m68k.org>
1500 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
1501 _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
1503 2012-06-22 Alan Modra <amodra@gmail.com>
1505 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
1506 save/restore functions when relocatable. Make "funcs" static.
1508 2012-06-18 Hans-Peter Nilsson <hp@axis.com>
1510 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
1511 of merged .got and .got.plt entries.
1513 2012-06-18 John Szakmeister <john@szakmeister.net>
1515 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
1517 2012-06-17 Hans-Peter Nilsson <hp@axis.com>
1519 * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
1520 <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
1521 thread common symbols.
1523 2012-06-13 Nick Clifton <nickc@redhat.com>
1525 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
1526 (elf32_arm_object_p): If the machine number could not be deduced
1527 from the notes, call bfd_arm_get_mach_from_attributes to get the
1528 number from the attributes.
1530 2012-06-12 H.J. Lu <hongjiu.lu@intel.com>
1533 * elf.c (assign_file_positions_for_non_load_sections): Abort if
1534 PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
1536 2012-06-12 Alan Modra <amodra@gmail.com>
1539 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
1540 sections at end of PT_LOAD segment when searching for segment
1541 that contains end of relro extent.
1543 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
1545 * elf.c (assign_file_positions_for_non_load_sections): Reindent.
1547 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
1549 * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
1551 2012-06-06 Alan Modra <amodra@gmail.com>
1553 * elflink.c (elf_link_input_bfd): Provide a file symbol for
1554 each input file with local syms, if the input lacks such.
1555 (bfd_elf_final_link): Add a file symbol to mark end of locals
1556 for which we can associate with input files.
1557 (struct elf_final_link_info): Add filesym_count field.
1558 (struct elf_outext_info): Add need_second_pass and second_pass.
1559 (elf_link_output_extsym): Detect symbols defined in the output
1560 file, emit them on second pass over locals.
1562 2012-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1564 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1565 of target_read_memory as bfd_size_type.
1566 * bfd-in2.h: Regenerate.
1567 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1568 argument of target_read_memory as bfd_size_type.
1569 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1570 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1571 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1572 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1574 2012-06-03 Alan Modra <amodra@gmail.com>
1577 * elf.c (elf_find_function): Cache last function sym info.
1578 (_bfd_elf_maybe_function_sym): Return function size, pass in
1579 section of interest.
1580 * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
1581 (_bfd_elf_maybe_function_sym): Likewise.
1582 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1583 (opd_entry_value): Add in_code_sec param. Revert caching code.
1584 Return -1 if in_code_sec and function found in wrong section.
1587 2012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
1589 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1590 of target_read_memory as size_t.
1591 * bfd-in2.h: Regenerate.
1592 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1593 argument of target_read_memory as size_t.
1594 (_bfd_elf32_bfd_from_remote_memory): Likewise.
1595 (_bfd_elf64_bfd_from_remote_memory): Likewise.
1596 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1597 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1599 2012-06-01 Alan Modra <amodra@gmail.com>
1602 * elf64-ppc.c (opd_entry_value): Rewrite cache code.
1604 2012-05-29 Tom Tromey <tromey@redhat.com>
1606 * opncls.c (bfd_fopen): Always close fd on failure.
1607 (bfd_fdopenr): Likewise.
1609 2012-05-27 Alan Modra <amodra@gmail.com>
1612 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
1613 a dynamic library finds a new instance with non-default
1614 visibility in a regular object, correctly handle symbols
1615 already on the undefs list and undo dynamic symbol state when
1616 the new symbol is hidden or internal.
1618 2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
1620 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
1621 dynamic_sec_flags to create PLT .eh_frame section.
1622 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1624 2012-05-25 Alan Modra <amodra@gmail.com>
1627 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
1628 (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
1629 * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
1630 * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
1631 size dynamic sections before stripping eh_frame_hdr.
1632 (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
1633 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
1634 if no other .eh_frame sections exist.
1635 * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
1636 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
1637 or alloc plt_eh_frame here..
1638 (elf_i386_size_dynamic_sections): ..do it here instead. Don't
1639 specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
1640 (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
1641 before writing plt offset.
1642 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
1643 or alloc plt_eh_frame here..
1644 (elf_x86_64_size_dynamic_sections): ..do it here instead.
1645 (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
1646 before writing plt offset.
1648 2012-05-24 Alan Modra <amodra@gmail.com>
1651 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
1652 size to output section alignment.
1653 (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
1655 2012-05-23 Alan Modra <amodra@gmail.com>
1657 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
1658 BFDs with multiple .eh_frame sections.
1660 2012-05-23 Alan Modra <amodra@gmail.com>
1663 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
1665 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1668 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
1670 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1672 2012-05-22 Alan Modra <amodra@gmail.com>
1674 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
1675 first one is zero size or discarded.
1676 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
1677 glink_eh_frame contents here..
1678 (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
1681 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1684 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
1685 eh_frame section if there is an input .eh_frame section.
1686 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1688 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
1691 * elf32-i386.c (elf_i386_create_dynamic_sections): Always
1692 create PLT eh_frame section with SEC_LINKER_CREATED.
1693 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1695 2012-05-22 Alan Modra <amodra@gmail.com>
1697 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
1698 sections attached to a BFD.
1699 * section.c (bfd_get_section_by_name): Rewrite description.
1700 (bfd_get_next_section_by_name): New function.
1701 * bfd-in2.h: Regenerate.
1703 2012-05-21 Andreas Schwab <schwab@linux-m68k.org>
1705 * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
1706 (elf_m68k_grok_psinfo): New function.
1707 (elf_backend_grok_prstatus): Define.
1708 (elf_backend_grok_psinfo): Define.
1710 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1712 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
1713 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
1714 backend's GOT header size instead of hardcoding it.
1716 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1718 * elf32-vax.c (elf_vax_relocate_section)
1719 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
1721 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1723 * elf32-vax.c (elf_vax_relocate_section)
1724 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
1725 its name as the check for text sections.
1727 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
1729 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
1730 the third reloc offset is the same as the first.
1732 2012-05-19 Alan Modra <amodra@gmail.com>
1734 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
1735 (has_tls_reloc, has_tls_get_addr_call): Move back to..
1736 * elf32-ppc.c: ..here.
1737 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
1738 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
1740 2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
1742 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
1743 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
1744 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1746 2012-05-18 Roland McGrath <mcgrathr@google.com>
1748 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
1749 not to clobber the ar_fmag field stored in ARED->arch_header.
1751 2012-05-18 Pedro Alves <palves@redhat.com>
1753 * mach-o.h: Don't include sysdep.h.
1755 2012-05-18 Nick Clifton <nickc@redhat.com>
1758 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
1759 complaining about config.h not having been included.
1760 * bfd-in2.h: Regenerate.
1762 2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
1764 * aclocal.m4: Regenerate.
1765 * Makefile.in: Regenerate.
1767 2012-05-17 Daniel Richard G. <skunk@iskunk.org>
1768 Nick Clifton <nickc@redhat.com>
1771 * configure.in: Add check that sysdep.h has been included before
1772 any system header files.
1773 * configure: Regenerate.
1774 * config.in: Regenerate.
1775 * aclocal.m4: Regenerate.
1776 * bfd-in.h: Generate an error if included before config.h.
1777 * sysdep.h: Likewise.
1778 * bfd-in2.h: Regenerate.
1779 * compress.c: Remove #include "config.h".
1780 * plugin.c: Likewise.
1781 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
1782 * elf64-hppa.c: Likewise.
1784 * xsymc.c: Likewise.
1786 2012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
1787 Alan Modra <amodra@gmail.com>
1789 * elf.c (ignore_section_sym): Correct comment. Don't return
1790 true for absolute section.
1791 (elf_map_symbols): Move stray comment. Adjust for above change.
1792 Don't discard global section symbols.
1794 2012-05-17 Alan Modra <amodra@gmail.com>
1796 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
1797 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
1798 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
1801 2012-05-17 Alan Modra <amodra@gmail.com>
1803 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
1804 is_ppc_vle): Move to..
1805 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
1807 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
1809 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
1810 bfd_get_section_lma, bfd_get_section_alignment,
1811 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
1812 in order to use the `bfd' argument.
1813 * bfd-in2.h: Regenerate.
1814 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
1815 as the first argument for `bfd_get_section_alignment'.
1816 * elf32-arm.c (create_ifunc_sections): Likewise, for
1817 `bfd_set_section_alignment'.
1818 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
1819 `bfd_get_section_name'.
1820 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1821 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1822 (ppc_elf_relocate_section): Likewise.
1823 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
1824 `bfd_get_section_vma'.
1825 * elf64-ppc.c (create_linkage_sections): Likewise, for
1826 `bfd_set_section_alignment'.
1828 2012-05-16 Georg-Johann Lay <avr@gjlay.de>
1831 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
1832 * bfd-in2.h: Regenerate.
1833 * libbfd.h: Regenerate.
1834 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
1836 (avr_reloc_map): Likewise.
1838 2012-05-16 Daniel Richard G. <skunk@iskunk.org>
1841 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
1842 * bfd/aout-ns32k.c: Likewise.
1843 * bfd/aout-sparcle.c: Likewise.
1844 * bfd/aout0.c: Likewise.
1845 * bfd/bfd-in2.h: Likewise.
1846 * bfd/coff-stgo32.c: Likewise.
1847 * bfd/cpu-lm32.c: Likewise.
1848 * bfd/cpu-microblaze.c: Likewise.
1849 * bfd/cpu-score.c: Likewise.
1850 * bfd/cpu-tilegx.c: Likewise.
1851 * bfd/cpu-tilepro.c: Likewise.
1852 * bfd/elf32-lm32.c: Likewise.
1853 * bfd/elf32-microblaze.c: Likewise.
1854 * bfd/elf32-score7.c: Likewise.
1855 * bfd/elf32-tilepro.c: Likewise.
1856 * bfd/elfxx-tilegx.c: Likewise.
1857 * bfd/mach-o.h: Likewise.
1858 * bfd/nlm32-ppc.c: Likewise.
1859 * bfd/ns32knetbsd.c: Likewise.
1860 * bfd/pef.h: Likewise.
1861 * bfd/plugin.c: Likewise.
1862 * bfd/stab-syms.c: Likewise.
1863 * bfd/sunos.c: Likewise.
1864 * bfd/syms.c: Likewise.
1865 * bfd/xsym.h: Likewise.
1867 2012-05-16 Alan Modra <amodra@gmail.com>
1869 * elflink.c: Rename flaginfo to flinfo throughout, except..
1870 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1871 Formatting, style. Simplify flag match.
1873 2012-05-16 Alan Modra <amodra@gmail.com>
1875 * dwarf2.c: Formatting.
1876 (arange_add): Pass in unit rather than bfd. Update callers.
1877 Ignore empty ranges. Don't ask for cleared memory.
1878 (parse_comp_unit): Only set unit->base_address if processing
1879 DW_TAG_compile_unit.
1880 (find_debug_info): Optimise section lookup.
1881 (place_sections): Use bfd_alloc for stash->adjusted_sections.
1882 (find_line): Match previously parsed comp unit addresses as we
1883 do for newly parsed comp units.
1885 2012-05-16 Alan Modra <amodra@gmail.com>
1887 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
1888 stops at end of ar_size field.
1890 2012-05-16 Alan Modra <amodra@gmail.com>
1894 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1895 out of range. As a special case, fix sh_info for zero sh_size.
1896 Do the same for .symtab.
1898 2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
1899 Stephane Carrez <stcarrez@nerim.fr>
1901 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1902 * config.bfd: Likewise.
1903 * cpu-m9s12x.c: New.
1904 * cpu-m9s12xg.c: New.
1905 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1906 Add option to offset S12 addresses into XGATE memory space.
1907 Fix carry bug in IMM16 (IMM8 low/high) relocate.
1908 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1909 (ALL_MACHINES_CFILES): Likewise.
1910 * reloc.c: Add S12X relocs.
1911 * Makefile.in: Regenerate.
1912 * bfd-in2.h: Regenerate.
1913 * libbfd.h: Regenerate.
1915 2012-05-14 James Lemke <jwlemke@codesourcery.com>
1916 Catherine Moore <clm@codesourcery.com>
1918 * bfd.c (bfd_lookup_section_flags): Add section parm.
1919 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1920 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1921 (bfd_elf_lookup_section_flags): Add section parm.
1922 * elf32-ppc.c (is_ppc_vle): New function.
1923 (ppc_elf_modify_segment_map): New function.
1924 (elf_backend_modify_segment_map): Define.
1925 (has_vle_insns): New define.
1926 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1927 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1928 Move in logic to omit / include a section.
1929 * libbfd-in.h (bfd_link_info): Add section parm.
1930 (bfd_generic_lookup_section_flags): Likewise.
1931 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1932 * section.c (bfd_section): Move out section_flag_info.
1933 (BFD_FAKE_SECTION): Remove flag_info initializer.
1934 * targets.c (_bfd_lookup_section_flags): Add section parm.
1936 2012-05-14 Catherine Moore <clm@codesourcery.com>
1938 * archures.c (bfd_mach_ppc_vle): New.
1939 * bfd-in2.h: Regenerated.
1940 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1941 * elf32-ppc.c (split16_format_type): New enumeration.
1942 (ppc_elf_vle_split16): New function.
1943 (HOWTO): Add entries for R_PPC_VLE relocations.
1944 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1945 (ppc_elf_section_flags): New function.
1946 (ppc_elf_lookup_section_flags): New function.
1947 (ppc_elf_section_processing): New function.
1948 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1949 (ppc_elf_relocation_section): Likewise.
1950 (elf_backend_lookup_section_flags_hook): Define.
1951 (elf_backend_section_flags): Define.
1952 (elf_backend_section_processing): Define.
1953 * elf32-ppc.h (ppc_elf_section_processing): Declare.
1954 * libbfd.h: Regenerated.
1955 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1956 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1957 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1958 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1959 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1960 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1961 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1962 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1963 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1965 2012-05-11 Georg-Johann Lay <avr@gjlay.de>
1968 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1969 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1970 * bfd-in2.h: Regenerate.
1971 * libbfd.h: Regenerate.
1972 * elf32-avr.c (elf_avr_howto_table): Add entries for
1973 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1974 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1977 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1979 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1980 addend overflow check.
1982 2012-05-10 DJ Delorie <dj@redhat.com>
1984 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1986 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1988 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1989 hex number in x32 addend overflow check.
1991 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
1993 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1994 R_X86_64_RELATIVE64.
1996 2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
1998 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1999 overflow for R_X86_64_RELATIVE64.
2001 2012-05-08 Ben Cheng <bccheng@google.com>
2003 * elf.c: Preserve the original p_align and p_flags if they are
2006 2012-05-07 Alan Modra <amodra@gmail.com>
2008 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
2009 RELOC_AGAINST_DISCARDED_SECTION invocation.
2011 2012-05-07 Hans-Peter Nilsson <hp@axis.com>
2013 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
2014 local variable i_ instead of assuming and using a variable i.
2016 2012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
2018 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
2020 * elfxx-mips.c (mips_reloc_against_discarded_section): New
2022 (_bfd_mips_elf_relocate_section): Call it, in place of
2023 RELOC_AGAINST_DISCARDED_SECTION.
2024 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
2025 to RELOC_AGAINST_DISCARDED_SECTION.
2026 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2027 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
2028 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2029 * elf32-bfin.c (bfin_relocate_section): Likewise.
2030 (bfinfdpic_relocate_section): Likewise.
2031 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
2032 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2033 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2034 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2035 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2036 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
2037 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2038 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2039 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2040 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2041 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2042 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2043 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2044 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2045 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2046 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
2047 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
2048 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2049 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2050 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2051 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2052 * elf32-mep.c (mep_elf_relocate_section): Likewise.
2053 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
2054 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2055 * elf32-mt.c (mt_elf_relocate_section): Likewise.
2056 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2057 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2058 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
2059 * elf32-rx.c (rx_elf_relocate_section): Likewise.
2060 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2061 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
2062 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
2063 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2064 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2065 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
2066 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
2067 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2068 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2069 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
2070 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2071 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2072 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
2073 (elf64_alpha_relocate_section): Likewise.
2074 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2075 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2076 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2077 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2078 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2079 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2080 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
2081 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2082 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
2084 2012-05-05 Alan Modra <amodra@gmail.com>
2088 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
2090 2012-05-05 Alan Modra <amodra@gmail.com>
2092 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
2093 bfd_und_section and bfd_ind_section with their _ptr variants, or
2094 use corresponding bfd_is_* macros.
2095 * aout-ns32k.c: Likewise.
2096 * aout-tic30.c: Likewise.
2097 * coff-arm.c: Likewise.
2098 * coff-tic54x.c: Likewise.
2099 * cpu-ns32k.c: Likewise.
2100 * elf-attrs.c: Likewise.
2101 * elfcode.h: Likewise.
2102 * peicode.h: Likewise.
2103 * reloc.c: Likewise.
2104 * riscix.c: Likewise.
2105 * versados.c: Likewise.
2106 * section.c: Likewise.
2107 (bfd_abs_section, bfd_ind_section, bfd_com_section,
2108 bfd_ind_section): Delete.
2109 (std_section): New array replacing above.
2110 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
2111 bfd_ind_section_ptr, STD_SECTION): Update.
2112 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
2113 * bfd-in2.h: Regenerate.
2115 2012-05-03 Sean Keys <skeys@ipdatasys.com>
2117 * cpu-xgate.c: New file. Added XGATE support.
2118 * archures.c (bfd_architecture): Add XGATE architecture.
2119 (bfd_archures_list): Add reference to XGATE architecture info.
2120 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
2121 * reloc.c: Add various XGATE relocation enums.
2122 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
2124 * Makefile.am: Add support for XGATE elf.
2125 * configure.in: Ditto.
2126 * config.bfd: Ditto.
2127 * Makefile.in: Regenerate.
2131 Added files for XGATE relocations.
2132 * elf32-xgate.c: Created minimal relocation file.
2133 * elf32-xgate.h: Created minimal header file for elf32-xgate.
2135 2012-05-03 Tristan Gingold <gingold@adacore.com>
2137 * dwarf2.c (decode_line_info): Ignore
2138 DW_LNE_HP_source_file_correlation.
2140 2012-05-01 Nick Clifton <nickc@redhat.com>
2143 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
2145 * coff-ppc.c: Likewise.
2146 * cofflink.c: Likewise.
2147 * elf32-arm.c: Likewise.
2148 * elf64-sparc.c: Likewise.
2149 * elflink.c: Likewise.
2150 * pdp11.c: Likewise.
2151 * rescoff.c: Likewise.
2153 2012-04-26 Mark Wielaard <mjw@redhat.com>
2155 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
2156 possibly being relative to DW_AT_low_pc.
2157 (parse_comp_unit): Likewise.
2159 2012-04-26 Andreas Schwab <schwab@linux-m68k.org>
2161 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
2162 also when generating PIE.
2163 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
2164 by relocations as dynamic.
2166 2012-04-26 Hans-Peter Nilsson <hp@axis.com>
2168 Provide a way for programs to recognize BFD_ASSERT calls.
2169 * bfd.c (bfd_assert_handler_type): New API type.
2170 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
2171 (_bfd_assert_handler): New variable.
2172 (_bfd_default_assert_handler): New function.
2173 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
2174 * libbfd-in.h (_bfd_assert_handler): Declare.
2175 * libbfd.h, bfd-in2.h: Regenerate.
2177 2012-04-24 Hans-Peter Nilsson <hp@axis.com>
2180 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
2181 symbol, where PLT refcount is set to -1.
2183 2012-04-24 Alan Modra <amodra@gmail.com>
2186 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
2187 _bfd_generic_link_just_syms.
2188 * elflink.c (_bfd_elf_link_just_syms): Delete.
2189 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
2191 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
2192 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
2193 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
2194 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
2195 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
2196 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
2197 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
2198 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
2199 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
2200 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
2201 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
2202 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
2203 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
2204 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
2205 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
2206 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
2207 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
2208 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
2209 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
2210 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
2211 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
2212 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
2213 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
2214 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
2215 * reloc.c: Update all references.
2216 * bfd-in2.h: Regenerate.
2218 2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2220 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
2221 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
2223 2012-04-19 Thomas Schwinge <thomas@codesourcery.com>
2225 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
2227 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
2230 2012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2232 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
2233 relocations when LE conversion happens on the IE tls symbol.
2235 2012-04-17 Roland McGrath <mcgrathr@google.com>
2237 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
2238 so that 32-byte boundary is a proper instruction boundary.
2240 2012-04-17 Tristan Gingold <gingold@adacore.com>
2242 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
2243 member of an object archive.<
2245 2012-04-17 Tristan Gingold <gingold@adacore.com>
2247 * vms-lib.c (MAX_EKEYLEN): Define.
2248 (MAX_KEYLEN): Fix value.
2249 (vms_write_index): Add comments and fix indentation.
2250 Adjust comparaison. Add assertions. Free kbn_blk.
2251 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
2252 Compense MAX_KEYLEN adjustment.
2254 2012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
2256 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
2257 (_bfd_mips_elf_check_relocs): Update accordingly.
2259 2012-04-13 Alan Modra <amodra@gmail.com>
2262 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
2265 2012-04-12 David S. Miller <davem@davemloft.net>
2267 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
2268 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
2269 * libbfd.h: Regenerate.
2270 * bfd-in2.h: Likewise.
2271 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
2272 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
2273 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
2274 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
2275 (_bfd_sparc_elf_check_relocs): Likewise.
2276 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2277 (_bfd_sparc_elf_relocate_section): Likewise.
2279 2012-04-12 Roland McGrath <mcgrathr@google.com>
2281 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
2283 (struct elf32_arm_link_hash_table): New member `nacl_p'.
2284 (elf32_arm_link_hash_table_create): Initialize it.
2285 (elf32_arm_nacl_link_hash_table_create): New function.
2286 (arm_movw_immediate, arm_movt_immediate): New functions.
2287 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
2288 (elf32_arm_finish_dynamic_sections): Likewise.
2289 (elf32_arm_output_plt_map_1): Likewise.
2290 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
2291 New backend vector stanza.
2292 (elf32_arm_nacl_modify_segment_map): New function.
2293 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
2294 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
2295 * configure.in: Likewise.
2296 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
2297 (bfd_elf32_littlearm_nacl_vec): Likewise.
2298 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
2299 (bfd_elf32_bigarm_symbian_vec): Likewise.
2300 (bfd_elf32_littlearm_symbian_vec): Likewise.
2301 (bfd_elf32_bigarm_vxworks_vec): Likewise.
2302 (bfd_elf32_littlearm_vxworks_vec): Likewise.
2303 * configure: Regenerated.
2305 2012-04-12 Tristan Gingold <gingold@adacore.com>
2307 * elflink.c (elf_link_output_extsym): Add a guard.
2308 (bfd_elf_final_link): Remove assertion.
2309 (bfd_elf_final_link): Add a guard.
2310 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
2311 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
2312 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
2313 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
2315 (elfNN-ia64-vms target): Move to ...
2316 * elf64-ia64-vms.c: New file.
2317 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
2318 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
2319 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
2320 * configure: Regenerate.
2321 * Makefile.in: Regenerate.
2323 2012-04-11 Nick Clifton <nickc@redhat.com>
2326 * elf64-ppc.c (opd_entry_value): When dealing with sections
2327 without relocs, keep the last section loaded in order to avoid
2328 unnecessary reloads.
2330 2012-04-09 Roland McGrath <mcgrathr@google.com>
2332 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
2333 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
2334 (nacl_modify_program_headers): Likewise.
2336 2012-04-03 Roland McGrath <mcgrathr@google.com>
2338 * elf-nacl.c: New file.
2339 * elf-nacl.h: New file.
2340 * elf32-i386.c (elf_backend_modify_segment_map): Define for
2341 bfd_elf32_i386_nacl_vec.
2342 (elf_backend_modify_program_headers): Likewise.
2343 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
2344 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
2345 (elf_backend_modify_program_headers): Likewise.
2346 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
2347 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
2348 * Makefile.in: Regenerated.
2349 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
2350 (bfd_elf32_x86_64_nacl_vec): Likewise.
2351 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
2352 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
2353 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
2354 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
2355 (bfd_elf32_i386_nacl_vec): Likewise.
2356 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
2357 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
2358 * configure: Regenerated.
2360 2012-03-31 Andreas Schwab <schwab@linux-m68k.org>
2362 * elf32-m68k.c (elf_m68k_relocate_section): Allow
2363 R_68K_TLS_LE{8,16,32} for PIE.
2365 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2367 * elf64-s390.c: Fix several comments regarding PLT entry
2369 * elf32-s390.c: Likewise.
2371 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2373 * elf64-s390.c: Use the section pointer shortcuts in
2374 elf_link_hash_table and remove them from the target specific
2376 * elf32-s390.c: Likewise.
2378 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2380 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
2382 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
2383 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
2384 (elf_s390_finish_dynamic_sections): Likewise.
2385 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
2386 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
2387 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
2388 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
2389 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
2391 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2393 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
2394 Rename all occurrences in the file to elf_dyn_relocs.
2395 * elf64-s390.c: Likewise.
2397 2012-03-30 Alan Modra <amodra@gmail.com>
2399 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
2402 2012-03-29 Alan Modra <amodra@gmail.com>
2404 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
2405 * bfd-in2.h: Regenerate.
2407 2012-03-23 Alan Modra <amodra@gmail.com>
2409 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
2410 on empty alloc sections.
2412 2012-03-23 Alan Modra <amodra@gmail.com>
2414 * linker.c (_bfd_nearby_section): New function, split out from..
2416 * bfd-in.h (_bfd_nearby_section): Declare.
2417 * bfd-in2.h: Regenerate.
2418 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
2419 data_index_section with ld -q or ld -r output relocs against
2420 stripped output sections. Instead use _bfd_nearby_section.
2422 2012-03-23 Alan Modra <amodra@gmail.com>
2425 * elf64-ppc.c (opd_entry_value): Read full symbol table when
2426 sym hashes unavailable.
2428 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
2430 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
2431 for non-C6X objects.
2433 2012-03-20 Kai Tietz <ktietz@redhat.com>
2436 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
2437 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
2438 Add windows.h header include if HAVE_WINDOWS_H is defined.
2439 (dlerror): New static function if windows variant is used instead
2441 (dlclose): Likewise.
2444 * configure: Regenerated.
2445 * config.in: Regenerated.
2447 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
2450 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
2451 for R_386_GOTOFF relocation against protected function if
2452 SYMBOLIC_BIND is true.
2454 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
2455 error for R_X86_64_GOTOFF64 relocation against protected function
2456 when building executable or SYMBOLIC_BIND is true.
2458 2012-03-16 Roland McGrath <mcgrathr@google.com>
2460 * config.bfd: Handle x86_64-*-nacl*.
2461 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
2462 (bfd_elf32_x86_64_nacl_vec): Likewise.
2463 * targets.c: Support them.
2464 * configure.in: Likewise.
2465 * configure: Regenerated.
2467 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2469 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
2470 (elf32_arm_attributes_forbid_div): Likewise.
2471 (elf32_arm_merge_eabi_attributes): Correct handling of
2474 2012-03-15 Roland McGrath <mcgrathr@google.com>
2476 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
2477 elf_x86_64_backend_data parameters for plt_eh_frame.
2479 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
2480 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
2481 (elf_x86_64_arch_bed): New variable.
2482 (elf_backend_arch_data): New macro.
2483 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
2484 (elf_x86_64_allocate_dynrelocs): Likewise.
2485 (elf_x86_64_relocate_section): Likewise.
2486 (elf_x86_64_plt_sym_val): Likewise.
2487 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
2488 parameters for PLT details.
2489 (elf_x86_64_finish_dynamic_sections): Likewise.
2491 2012-03-14 Roland McGrath <mcgrathr@google.com>
2493 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
2494 to the full size, padding out with nop instructions.
2496 2012-03-12 Alan Modra <amodra@gmail.com>
2498 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
2499 on zero size dynbss symbol.
2500 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
2501 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
2502 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
2503 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
2504 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
2505 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
2506 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
2507 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
2508 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2509 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
2510 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2511 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
2512 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
2513 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
2514 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
2515 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2516 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2517 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
2518 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2519 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
2520 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
2522 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
2524 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2525 * bfd-in2.h: Regenerate.
2526 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
2527 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2529 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
2532 * elf32-i386.c (elf_i386_relocate_section): Restore
2535 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
2538 2012-03-08 Tristan Gingold <gingold@adacore.com>
2540 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
2541 keylen according to archive kind. Set nextvbn and nextrfa lhd
2542 fields. Add comments.
2544 2012-03-07 Nick Clifton <nickc@redhat.com>
2546 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
2548 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
2549 (elf_mn10300_tdata): Define.
2550 (elf_mn10300_local_got_tls_type): Define.
2551 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
2552 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
2553 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
2554 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
2555 (mn10300_reloc_map): Likewise.
2556 (elf_mn10300_tls_transition): New function.
2557 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
2558 (mn10300_elf_check_relocs): Add TLS support.
2559 (mn10300_elf_final_link_relocate): Likewise.
2560 (mn10300_elf_relocate_section): Likewise.
2561 (mn10300_elf_relax_section): Likewise.
2562 (elf32_mn10300_link_hash_newfunc): Initialise new field.
2563 (_bfd_mn10300_copy_indirect_symbol): New function.
2564 (elf32_mn10300_link_hash_table_create): Initialise new fields.
2565 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
2566 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2567 (_bfd_mn10300_elf_reloc_type_class): Allocate an
2568 elf_mn10300_obj_tdata structure.
2569 (elf_backend_copy_indirect_symbol): Define.
2570 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
2571 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
2572 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
2573 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
2574 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
2575 alongside other MN10300 relocations.
2576 * bfd-in2.h: Regenerate.
2577 * libbfd.h: Regenerate.
2579 2012-03-06 Jakub Jelinek <jakub@redhat.com>
2581 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
2582 set relocate to TRUE.
2584 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2587 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
2588 overflows for R_SPARC_UA32 in .stab sections.
2590 2012-03-01 Alan Modra <amodra@gmail.com>
2592 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
2594 2012-02-27 Alan Modra <amodra@gmail.com>
2596 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
2597 before calling elf specific function.
2598 (sh_elf_osec_readonly_p): Test for error return from above.
2600 2012-02-27 Alan Modra <amodra@gmail.com>
2602 * elf32-spu.c (build_stub): Fix malloc under-allocation.
2604 2012-02-25 Walter Lee <walt@tilera.com>
2605 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
2606 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
2607 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
2608 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
2609 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
2610 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
2611 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
2612 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
2613 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
2614 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
2615 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
2616 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
2617 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
2618 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
2619 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
2620 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
2621 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
2622 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
2623 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
2624 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
2625 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
2626 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
2627 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
2628 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
2629 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
2630 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
2631 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
2632 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
2633 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
2634 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
2635 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
2636 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
2637 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
2638 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
2639 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
2640 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
2641 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
2642 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
2643 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
2644 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
2645 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
2646 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
2647 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
2648 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
2649 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
2650 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
2651 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
2652 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
2653 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
2654 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
2655 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
2657 (tilepro_reloc_map): Ditto.
2658 (tilepro_info_to_howto_rela): Ditto.
2659 (reloc_to_create_func): Ditto.
2660 (tilepro_tls_translate_to_le): New.
2661 (tilepro_tls_translate_to_ie): New.
2662 (tilepro_elf_tls_transition): New.
2663 (tilepro_elf_check_relocs): Handle new tls relocations.
2664 (tilepro_elf_gc_sweep_hook): Ditto.
2665 (allocate_dynrelocs): Ditto.
2666 (tilepro_elf_relocate_section): Ditto.
2667 (tilepro_replace_insn): New.
2668 (insn_mask_X1): New.
2669 (insn_mask_X0_no_dest_no_srca): New
2670 (insn_mask_X1_no_dest_no_srca): New
2671 (insn_mask_Y0_no_dest_no_srca): New
2672 (insn_mask_Y1_no_dest_no_srca): New
2675 (insn_tls_le_move_X1): New
2676 (insn_tls_le_move_zero_X0X1): New
2677 (insn_tls_ie_lw_X1): New
2678 (insn_tls_ie_add_X0X1): New
2679 (insn_tls_ie_add_Y0Y1): New
2680 (insn_tls_gd_add_X0X1): New
2681 (insn_tls_gd_add_Y0Y1): New
2682 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
2684 (tilegx_reloc_map): Ditto.
2685 (tilegx_info_to_howto_rela): Ditto.
2686 (reloc_to_create_func): Ditto.
2687 (tilegx_elf_link_hash_table): New field disable_le_transition.
2688 (tilegx_tls_translate_to_le): New.
2689 (tilegx_tls_translate_to_ie): New.
2690 (tilegx_elf_tls_transition): New.
2691 (tilegx_elf_check_relocs): Handle new tls relocations.
2692 (tilegx_elf_gc_sweep_hook): Ditto.
2693 (allocate_dynrelocs): Ditto.
2694 (tilegx_elf_relocate_section): Ditto.
2695 (tilegx_copy_bits): New.
2696 (tilegx_replace_insn): New.
2697 (insn_mask_X1): New.
2698 (insn_mask_X0_no_dest_no_srca): New.
2699 (insn_mask_X1_no_dest_no_srca): New.
2700 (insn_mask_Y0_no_dest_no_srca): New.
2701 (insn_mask_Y1_no_dest_no_srca): New.
2702 (insn_mask_X0_no_operand): New.
2703 (insn_mask_X1_no_operand): New.
2704 (insn_mask_Y0_no_operand): New.
2705 (insn_mask_Y1_no_operand): New.
2706 (insn_tls_ie_ld_X1): New.
2707 (insn_tls_ie_ld4s_X1): New.
2708 (insn_tls_ie_add_X0X1): New.
2709 (insn_tls_ie_add_Y0Y1): New.
2710 (insn_tls_ie_addx_X0X1): New.
2711 (insn_tls_ie_addx_Y0Y1): New.
2712 (insn_tls_gd_add_X0X1): New.
2713 (insn_tls_gd_add_Y0Y1): New.
2714 (insn_move_X0X1): New.
2715 (insn_move_Y0Y1): New.
2716 (insn_add_X0X1): New.
2717 (insn_add_Y0Y1): New.
2718 (insn_addx_X0X1): New.
2719 (insn_addx_Y0Y1): New.
2720 * libbfd.h: Regenerate.
2721 * bfd-in2.h: Regenerate.
2723 2012-02-25 Walter Lee <walt@tilera.com>
2725 * config.bfd (tilegx-*-*): rename little endian vector; add big
2727 (tilegxbe-*-*): New case.
2728 * configure.in (bfd_elf32_tilegx_vec): Rename...
2729 (bfd_elf32_tilegx_le_vec): ... to this.
2730 (bfd_elf32_tilegx_be_vec): New vector.
2731 (bfd_elf64_tilegx_vec): Rename...
2732 (bfd_elf64_tilegx_le_vec): ... to this.
2733 (bfd_elf64_tilegx_be_vec): New vector.
2734 * configure: Regenerate.
2735 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
2736 (TARGET_LITTLE_NAME): Ditto.
2737 (TARGET_BIG_SYM): Define.
2738 (TARGET_BIG_NAME): Define.
2739 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
2740 (TARGET_LITTLE_NAME): Ditto.
2741 (TARGET_BIG_SYM): Define.
2742 (TARGET_BIG_NAME): Define.
2743 * targets.c (bfd_elf32_tilegx_vec): Rename...
2744 (bfd_elf32_tilegx_le_vec): ... to this.
2745 (bfd_elf32_tilegx_be_vec): Declare.
2746 (bfd_elf64_tilegx_vec): Rename...
2747 (bfd_elf64_tilegx_le_vec): ... to this.
2748 (bfd_elf64_tilegx_be_vec): Declare.
2749 (_bfd_target_vector): Add / rename above vectors.
2750 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
2751 * bfd-in2.h: Regenerate.
2752 * cpu-tilegx.c (bfd_tilegx32_arch): define.
2753 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
2755 2012-02-24 Nick Clifton <nickc@redhat.com>
2758 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
2759 error message instead of aborting, when an outofrange reloc is
2762 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
2764 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
2765 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
2766 bit-fields when target and host differ in endian-ness. When
2767 PAIRs are non-scattered find the 'symbol' from the preceding
2768 reloc. Add FIXME re. reloc symbols on section boundaries.
2769 (bfd_mach_o_swap_out_non_scattered_reloc): New.
2770 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
2772 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
2774 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
2776 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
2777 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2779 2012-02-17 Tristan Gingold <gingold@adacore.com>
2781 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
2782 * libbfd.h: Regenerated.
2783 * bfd-in2.h: Likewise.
2784 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
2785 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
2786 (bfd_mach_o_i386_swap_reloc_out): Likewise.
2788 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2790 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
2791 GD->LE and LD->LE optimizations.
2793 2012-02-16 Alan Modra <amodra@gmail.com>
2796 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
2798 2012-02-13 Richard Henderson <rth@redhat.com>
2801 * linker.c (fix_syms): Force symbols outside any section into
2802 bfd_abs_section_ptr.
2804 2012-02-13 Alan Modra <amodra@gmail.com>
2806 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
2807 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
2808 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
2809 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
2811 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2812 Nick Clifton <nickc@redhat.com>
2814 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
2817 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2819 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
2820 vma additions in their logical, rather than physical order.
2822 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
2824 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
2826 * mach-o-x86-64.c (text_section_names_xlat): New.
2827 (mach_o_x86_64_segsec_names_xlat): New.
2828 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
2829 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
2831 2012-02-10 Tristan Gingold <gingold@adacore.com>
2833 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
2834 to avoid infinite loop. Add comments.
2836 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
2839 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
2841 (bfd_arch_i386_short_nop_fill): New.
2842 (bfd_arch_i386_long_nop_fill): Likewise.
2843 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
2844 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
2845 bfd_arch_info initializers.
2847 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
2848 (bfd_arch_i386_short_nop_fill): This.
2849 Update bfd_arch_info initializers.
2850 * cpu-l1om.c: Likewise.
2852 2012-02-08 Alan Modra <amodra@gmail.com>
2854 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2855 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2856 the correct h->u.weakdef.
2858 2012-02-07 Alan Modra <amodra@gmail.com>
2860 * elf.c (elf_find_function): Don't use internal_elf_sym.
2861 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
2862 parameter with asymbol.
2863 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2864 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2865 (struct elf_backend_data <maybe_function_sym>): Likewise.
2867 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
2870 * elf32-avr.c (elf32_avr_relax_section): Correct the
2871 condition that qualifies the candidates for relaxation.
2873 2012-02-02 Tristan Gingold <gingold@adacore.com>
2875 * bfdio.c (real_fopen): Remove unused vms_modes variable.
2877 2012-02-02 Tristan Gingold <gingold@adacore.com>
2879 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2882 2012-02-02 Tristan Gingold <gingold@adacore.com>
2884 * archive.c (bfd_slurp_armap): Fix thinko in cast.
2886 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
2889 * archures.c (bfd_arch_info): Add fill.
2890 (bfd_default_arch_struct): Add bfd_arch_default_fill.
2891 (bfd_arch_default_fill): New.
2893 * configure.in: Set bfd version to 2.22.52.
2894 * configure: Regenerated.
2896 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2898 * cpu-arc.c: Likewise.
2899 * cpu-arm.c: Likewise.
2900 * cpu-avr.c: Likewise.
2901 * cpu-bfin.c: Likewise.
2902 * cpu-cr16.c: Likewise.
2903 * cpu-cr16c.c: Likewise.
2904 * cpu-cris.c: Likewise.
2905 * cpu-crx.c: Likewise.
2906 * cpu-d10v.c: Likewise.
2907 * cpu-d30v.c: Likewise.
2908 * cpu-dlx.c: Likewise.
2909 * cpu-epiphany.c: Likewise.
2910 * cpu-fr30.c: Likewise.
2911 * cpu-frv.c: Likewise.
2912 * cpu-h8300.c: Likewise.
2913 * cpu-h8500.c: Likewise.
2914 * cpu-hppa.c: Likewise.
2915 * cpu-i370.c: Likewise.
2916 * cpu-i860.c: Likewise.
2917 * cpu-i960.c: Likewise.
2918 * cpu-ia64.c: Likewise.
2919 * cpu-ip2k.c: Likewise.
2920 * cpu-iq2000.c: Likewise.
2921 * cpu-lm32.c: Likewise.
2922 * cpu-m10200.c: Likewise.
2923 * cpu-m10300.c: Likewise.
2924 * cpu-m32c.c: Likewise.
2925 * cpu-m32r.c: Likewise.
2926 * cpu-m68hc11.c: Likewise.
2927 * cpu-m68hc12.c: Likewise.
2928 * cpu-m68k.c: Likewise.
2929 * cpu-m88k.c: Likewise.
2930 * cpu-mcore.c: Likewise.
2931 * cpu-mep.c: Likewise.
2932 * cpu-microblaze.c: Likewise.
2933 * cpu-mips.c: Likewise.
2934 * cpu-mmix.c: Likewise.
2935 * cpu-moxie.c: Likewise.
2936 * cpu-msp430.c: Likewise.
2937 * cpu-mt.c: Likewise.
2938 * cpu-ns32k.c: Likewise.
2939 * cpu-openrisc.c: Likewise.
2940 * cpu-or32.c: Likewise.
2941 * cpu-pdp11.c: Likewise.
2942 * cpu-pj.c: Likewise.
2943 * cpu-plugin.c: Likewise.
2944 * cpu-powerpc.c: Likewise.
2945 * cpu-rl78.c: Likewise.
2946 * cpu-rs6000.c: Likewise.
2947 * cpu-rx.c: Likewise.
2948 * cpu-s390.c: Likewise.
2949 * cpu-score.c: Likewise.
2950 * cpu-sh.c: Likewise.
2951 * cpu-sparc.c: Likewise.
2952 * cpu-spu.c: Likewise.
2953 * cpu-tic30.c: Likewise.
2954 * cpu-tic4x.c: Likewise.
2955 * cpu-tic54x.c: Likewise.
2956 * cpu-tic6x.c: Likewise.
2957 * cpu-tic80.c: Likewise.
2958 * cpu-tilegx.c: Likewise.
2959 * cpu-tilepro.c: Likewise.
2960 * cpu-v850.c: Likewise.
2961 * cpu-vax.c: Likewise.
2962 * cpu-w65.c: Likewise.
2963 * cpu-we32k.c: Likewise.
2964 * cpu-xc16x.c: Likewise.
2965 * cpu-xstormy16.c: Likewise.
2966 * cpu-xtensa.c: Likewise.
2967 * cpu-z80.c: Likewise.
2968 * cpu-z8k.c: Likewise.
2970 * cpu-i386.c: Include "libiberty.h".
2971 (bfd_arch_i386_fill): New.
2972 Add bfd_arch_i386_fill to bfd_arch_info initializer.
2974 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
2975 * cpu-l1om.c: Likewise.
2977 * linker.c (default_data_link_order): Call abfd->arch_info->fill
2980 * bfd-in2.h: Regenerated.
2982 2012-01-27 Michael Eager <eager@eagercon.com>
2984 * elf32-microblaze.c (create_got_section):
2985 Reuse existing .rela.got section.
2987 2012-01-23 Alan Modra <amodra@gmail.com>
2989 * elf-bfd.h: Formatting.
2990 (struct elf_backend_data): Add "maybe_function_sym".
2991 (_bfd_elf_maybe_function_sym): Declare.
2992 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2993 (elfNN_bed): Init new field.
2994 * elf.c (elf_find_function): Use maybe_function_sym.
2995 (_bfd_elf_maybe_function_sym): New function.
2996 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2997 (ppc64_elf_maybe_function_sym): New function.
2999 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
3002 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
3003 pad the size field in an archive header.
3004 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
3005 function for the archive size field.
3006 (bfd_generic_openr_next_archived_file): Likewise.
3007 (do_slurp_coff_armap): Likewise.
3008 (_bfd_write_archive_contents): Likewise.
3009 (_bfd_bsd44_write_ar_hdr): Use the new function.
3010 (bfd_ar_hdr_from_filesystem): Likewise.
3011 (_bfd_write_archive_contents): Likewise.
3012 (bsd_write_armap): Likewise.
3013 (coff_write_armap): Likewise.
3014 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
3015 * bfdio.c (bfd_bread): Use correct type for archive element
3017 * ar.c (open_inarch): Likewise.
3018 (extract_file): Likewise.
3019 * libbfd-in.h (struct areltdata): Use correct types for
3020 parsed_size and extra_size fields.
3021 Prototype _bfd_ar_sizepad function.
3022 * libbfd.h: Regenerate.
3024 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
3026 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
3027 Return NULL if core file generation is unsupported.
3028 (elfcore_write_prstatus): Likewise.
3029 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
3030 (elf_backend_write_core_note): Define.
3032 2012-01-19 Tristan Gingold <gingold@adacore.com>
3034 * pef.c: Add a comment.
3037 2012-01-17 Alan Modra <amodra@gmail.com>
3039 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
3040 trailing garbage in the note.
3041 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
3043 2012-01-16 Daniel Green <venix1@gmail.com>
3046 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
3047 h->root.type not h->type.
3048 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
3050 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
3052 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
3055 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
3057 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
3058 position from here... to (bfd_mach_o_build_seg_command): Here.
3060 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
3062 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
3063 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
3064 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
3065 file. (bfd_mach_o_section): Add indirect_syms field.
3067 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
3069 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
3070 vmsize from filesize. Don't compute offsets or file sizes for
3073 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
3075 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
3076 command type independent.
3078 2012-01-11 Alan Modra <amodra@gmail.com>
3080 * elf64-ppc.c: Define more insns used in plt call stubs.
3081 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
3082 (ppc64_elf_relocate_section): Likewise.
3083 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
3084 (struct ppc_link_hash_table): Increase size of stub_count array.
3085 Add plt_stub_align and plt_thread_safe.
3086 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
3087 (plt_stub_size, plt_stub_pad): New functions.
3088 (build_plt_stub): Emit barriers for power7 thread safety. Don't
3089 emit needless save of r2.
3090 (build_tls_get_addr_stub): Adjust params.
3091 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
3092 plt stubs. Adjust build_*plt_stub calls.
3093 (ppc_size_one_stub): Similarly.
3094 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
3095 params. Choose default for plt_thread_safe based on existence of
3096 calls to thread creation functions. Modify plt_call to
3097 plt_call_r2save when no tocsave reloc found. Align tail of stub
3099 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
3100 output of stub statistics.
3101 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
3102 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
3104 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
3107 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
3108 check on R_X86_64_PCXX.
3110 2012-01-10 Tristan Gingold <gingold@adacore.com>
3112 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
3115 2012-01-10 Tristan Gingold <gingold@adacore.com>
3117 * bfdio.c (bfd_tell): Handle nested archives.
3119 * cache.c (bfd_cache_lookup_worker): Ditto.
3120 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
3122 (bfd_generic_openr_next_archived_file): Likewise.
3124 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
3126 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
3127 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
3128 (bfd_mach_o_primary_symbol_sort_key): Likewise.
3129 (bfd_mach_o_cf_symbols): Likewise.
3130 (bfd_mach_o_sort_symbol_table): Remove.
3131 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
3132 for indirect and dysymtab counts. Do the symbol sorting here.
3133 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
3134 Make the indirect symbols a TODO.
3135 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
3136 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
3138 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
3139 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
3140 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
3141 (IS_MACHO_INDIRECT): Remove.
3142 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
3144 2012-01-06 Nick Clifton <nickc@redhat.com>
3147 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
3148 'flaginfo' to avoid conflicts with AIX system headers.
3150 2012-01-06 Tristan Gingold <gingold@adacore.com>
3152 * bfdio.c (bfd_bread): Use arelt_size macro.
3154 2012-01-06 Tristan Gingold <gingold@adacore.com>
3156 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
3158 2012-01-05 Nick Clifton <nickc@redhat.com>
3161 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
3164 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
3166 Fix zero registers core files when built by gcc-4.7.
3167 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
3168 size. Call elfcore_write_note for the local variables. Remove the
3169 final elfcore_write_note call. Add NOTREACHED comments.
3171 2012-01-04 Tristan Gingold <gingold@adacore.com>
3173 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
3174 (bfd_mach_o_generic_stat_arch_elt): Adjust.
3176 2012-01-04 Tristan Gingold <gingold@adacore.com>
3178 * mach-o.c (bfd_mach_o_fat_member_init): New function.
3179 (bfd_mach_o_openr_next_archived_file): Reindent.
3180 Adjust to call bfd_mach_o_fat_member_init.
3181 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
3183 2012-01-04 Tristan Gingold <gingold@adacore.com>
3185 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
3186 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
3187 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
3188 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
3189 BFD_RELOC_MACH_O_X86_64_BRANCH32,
3190 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
3191 BFD_RELOC_MACH_O_X86_64_GOT.
3193 2012-01-04 Tristan Gingold <gingold@adacore.com>
3195 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
3196 (bfd_mach_o_load_command): Add fvmlib field.
3198 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
3199 (bfd_mach_o_read_command): Handle fvmlib.
3201 2012-01-04 Tristan Gingold <gingold@adacore.com>
3203 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
3204 Decode msubtype for ARM.
3206 2012-01-04 Tristan Gingold <gingold@adacore.com>
3208 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
3210 2012-01-04 Tristan Gingold <gingold@adacore.com>
3212 * mach-o.h: Reindent header.
3213 (bfd_mach_o_encryption_info_command): New structure.
3214 (bfd_mach_o_load_command): Add encryption_info field.
3216 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
3217 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
3218 (bfd_mach_o_read_command): Adjust error message.
3220 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
3222 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
3223 which reads DWARF2 and stores in stash from find_line.
3224 (find_line) Call _bfd_dwarf2_slurp_debug_info.
3225 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
3226 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
3227 * mach-o.c (dsym_subdir): The name of subdir where debug
3228 information may be stored.
3229 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
3231 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
3232 corresponding to the executable.
3233 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
3234 specified binary file.
3235 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
3237 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
3238 executables, dylibs, and bundles.
3239 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
3240 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
3242 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
3244 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
3246 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
3247 (bfd_mach_o_cf_symbols): Likewise.
3249 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
3251 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
3253 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
3255 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
3256 as the value of an indirect symbol. Keep the string table index in
3257 non-indirect syms for reference.
3258 (bfd_mach_o_write_dysymtab): New.
3259 (bfd_mach_o_primary_symbol_sort_key): New.
3260 (bfd_mach_o_cf_symbols): New.
3261 (bfd_mach_o_sort_symbol_table): New.
3262 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
3263 If we are emitting a dysymtab, process indirect symbols and count the
3264 number of each other kind.
3265 (bfd_mach_o_mangle_sections): New.
3266 (bfd_mach_o_write_contents): Split out some pre-requisite code into
3267 the command builder. Write dysymtab if the command is present.
3268 (bfd_mach_o_count_sections_for_seg): New.
3269 (bfd_mach_o_build_seg_command): New.
3270 (bfd_mach_o_build_dysymtab_command): New.
3271 (bfd_mach_o_build_commands): Reorganize to support the fact that some
3272 commands are optional and should not be emitted if there are no
3273 sections or symbols.
3274 (bfd_mach_o_set_section_contents): Amend comment.
3275 * mach-o.h: Amend and add to comments.
3276 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
3277 pointer to the indirects, when present.
3278 (bfd_mach_o_should_emit_dysymtab): New macro.
3279 (IS_MACHO_INDIRECT): Likewise.
3281 For older changes see ChangeLog-2011
3283 Copyright (C) 2012 Free Software Foundation, Inc.
3285 Copying and distribution of this file, with or without modification,
3286 are permitted in any medium without royalty provided the copyright
3287 notice and this notice are preserved.
3293 version-control: never