1 2009-12-15 Tristan Gingold <gingold@adacore.com>
3 * mach-o.c (struct mach_o_section_name_xlat): Add flags field.
4 (dwarf_section_names_xlat): Add section flags.
5 (text_section_names_xlat): Ditto.
6 (data_section_names_xlat): Ditto.
7 (bfd_mach_o_convert_section_name_to_bfd): Now return name and section
9 (bfd_mach_o_make_bfd_section): Use section flags when know, otherwise
12 2009-12-14 Doug Kwan <dougkwan@google.com>
14 * opncls.c (bfd_opnr_iovec): Rename parameters to avoid shawdowed
16 * bfd-in2.h: Regnenerate.
18 2009-12-12 Nick Clifton <nickc@redhat.com>
20 * coff-arm.c (coff_arm_rtype_to_howto): Fix shadowed variable
23 2009-12-11 Tristan Gingold <gingold@adacore.com>
25 * som.c (bfd_som_set_subsection_attributes)
26 (bfd_section_from_som_symbol, som_reloc_queue_fix): Fix shadowed
28 * cache.c (close_one): Likewise.
30 2009-12-11 Nick Clifton <nickc@redhat.com>
32 * warning.m4 (GCC_WARN_CFLAGS): Add -Wshadow.
33 * configure: Regenerate.
34 * Makefile.in: Regenerate.
35 * doc/Makefile.in: Regenerate.
36 * aout-arm.c: Fix shadowed variable warnings.
37 * aout-tic30.c: Likewise.
39 * archive.c: Likewise.
40 * coff-alpha.c: Likewise.
41 * coff-i386.c: Likewise.
42 * coff-x86_64.c: Likewise.
43 * coffgen.c: Likewise.
46 * elf-eh-frame.c: Likewise.
47 * elf-m10300.c: Likewise.
49 * elf32-arm.c: Likewise.
50 * elf32-avr.c: Likewise.
51 * elf32-bfin.c: Likewise.
52 * elf32-cr16.c: Likewise.
53 * elf32-i386.c: Likewise.
54 * elf32-ip2k.c: Likewise.
55 * elf32-lm32.c: Likewise.
56 * elf32-m68hc1x.c: Likewise.
57 * elf32-microblaze.c: Likewise.
58 * elf32-ppc.c: Likewise.
59 * elf32-rx.c: Likewise.
60 * elf32-score.c: Likewise.
61 * elf32-score7.c: Likewise.
62 * elf32-sh.c: Likewise.
63 * elf32-spu.c: Likewise.
64 * elf32-v850.c: Likewise.
65 * elf32-xtensa.c: Likewise.
66 * elf64-hppa.c: Likewise.
67 * elf64-ppc.c: Likewise.
68 * elf64-x86-64.c: Likewise.
69 * elflink.c: Likewise.
70 * elfxx-ia64.c: Likewise.
71 * elfxx-mips.c: Likewise.
72 * elfxx-sparc.c: Likewise.
78 * nlm32-sparc.c: Likewise.
82 * peXXigen.c: Likewise.
84 * versados.c: Likewise.
85 * vms-gsd.c: Likewise.
86 * vms-hdr.c: Likewise.
87 * vms-tir.c: Likewise.
89 * xcofflink.c: Likewise.
91 * xtensa-isa.c: Likewise.
93 2009-12-10 Maciej W. Rozycki <macro@codesourcery.com>
95 * elfxx-mips.c (mips_elf_calculate_relocation): Correct handling
98 2009-12-09 Daniel Jacobowitz <dan@codesourcery.com>
100 * elf32-arm.c (elf32_arm_next_input_section): Skip sections without
103 2009-12-08 Alan Modra <amodra@bigpond.net.au>
105 * elf.c (write_zeros): New function.
106 (assign_file_positions_for_load_sections): Allocate file space for
107 NOBITS sections that are followed by PROGBITS sections in a segment.
109 2009-12-03 Tristan Gingold <gingold@adacore.com>
111 * mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for
112 all sections of the __DWARF segment.
114 2009-12-03 Alan Modra <amodra@bigpond.net.au>
117 * elf32-ppc.c (ppc_elf_relocate_section): Delete __tls_get_addr
118 symbol reference from relocs belonging to calls that are
120 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
122 2009-12-02 Jerker Bäck <jerker.back@gmail.com>
125 * coff-i386.h (COFF_PAGE_SIZE): Definition moved to coff/i386.h
127 2009-11-30 Joseph Myers <joseph@codesourcery.com>
129 * configure: Regenerate.
131 2009-11-26 Per Øyvind Karlsen <peroyvind@mandriva.org>
133 * plugin.c (bfd_plugin_bfd_copy_link_hash_symbol_type): Define.
135 2009-11-24 Joel Brobecker <brobecker@adacore.com>
137 * acinclude.m4: Add include of ../config/zlib.m4.
138 * configure.in: AM_ZLIB to check for zlib support.
139 * configure: Regenerate.
141 2009-11-23 Paul Brook <paul@codesourcery.com>
143 * libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add
145 * elf-bfd.h (_bfd_elf_copy_link_hash_symbol_type): Add prototype.
146 * linker.c (_bfd_generic_copy_link_hash_symbol_type): New function.
147 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): New function.
148 * targets.c (BFD_JUMP_TABLE_LINK, struct bfd_target): Add
149 _copy_link_hash_symbol_type.
150 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Add
151 _bfd_generic_copy_link_hash_symbol_type.
152 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add
153 _bfd_generic_copy_link_hash_symbol_type.
154 * aout-adobe.c (aout_32_bfd_copy_link_hash_symbol_type): Define.
155 * aout-target.h (MY_bfd_copy_link_hash_symbol_type): Define.
156 * aout-tic30.c (MY_bfd_copy_link_hash_symbol_type): Define.
157 * binary.c (binary_bfd_copy_link_hash_symbol_type): Define.
158 * bout.c (b_out_bfd_copy_link_hash_symbol_type): Define.
159 * coffcode.h (coff_bfd_copy_link_hash_symbol_type): Define.
160 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define.
161 * i386msdos.c (msdos_bfd_copy_link_hash_symbol_type): Define.
162 * i386os9k.c (os9k_bfd_copy_link_hash_symbol_type): Define.
163 * ieee.c (ieee_bfd_copy_link_hash_symbol_type): Define.
164 * ihex.c (ihex_bfd_copy_link_hash_symbol_type): Define.
165 * libecoff.h (_bfd_ecoff_bfd_copy_link_hash_symbol_type): Define.
166 * mach-o.c (bfd_mach_o_bfd_copy_link_hash_symbol_type): Define.
167 * mmo.c (mmo_bfd_copy_link_hash_symbol_type): Define.
168 * nlm-target.h (nlm_bfd_copy_link_hash_symbol_type): Define.
169 * oasys.c (oasys_bfd_copy_link_hash_symbol_type): Define.
170 * pef.c (bfd_pef_bfd_copy_link_hash_symbol_type): Define.
171 * ppcboot.c (ppcboot_bfd_copy_link_hash_symbol_type): Define.
172 * som.c (som_bfd_copy_link_hash_symbol_type): Define.
173 * srec.c (srec_bfd_copy_link_hash_symbol_type): Define.
174 * tekhex.c (tekhex_bfd_copy_link_hash_symbol_type): Define.
175 * versados.c (versados_bfd_copy_link_hash_symbol_type): Define.
176 * vms.c (vms_bfd_copy_link_hash_symbol_type): Define.
177 * xsym.c (bfd_sym_bfd_copy_link_hash_symbol_type): Define.
178 * bfd-in2.h: Regenerate.
179 * libbfd.h: Regenerate.
181 2009-11-19 Tristan Gingold <gingold@adacore.com>
183 * coff-rs6000.c (rs6000coff_vec): Use generic routines instead of
185 (pmac_xcoff_vec): Ditto.
186 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
187 (aix5coff64_vec): Ditto.
189 2009-11-18 Alan Modra <amodra@bigpond.net.au>
191 * bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
192 * bfd-in2.h: Regenerate.
193 * elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
194 insn optimisation to..
195 * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here. New function.
196 (ppc_elf_relocate_section): Use it.
198 2009-11-18 Alan Modra <amodra@bigpond.net.au>
200 * targets.c: Don't include alloca-conf.h.
201 (bfd_get_target_info): Don't use alloca.
203 2009-11-17 H.J. Lu <hongjiu.lu@intel.com>
206 * elfxx-ia64.c (elfNN_ia64_update_short_info): Also skip ABS
209 2009-11-17 H.J. Lu <hongjiu.lu@intel.com>
212 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Update comments.
213 (elfNN_ia64_update_short_info): Remove "->output_section" from
214 ia64_info->max_short_sec and ia64_info->min_short_sec.
215 (elfNN_ia64_choose_gp): Likewise.
216 (elfNN_ia64_relax_section): Pass tsec->output_section to
217 elfNN_ia64_update_short_info.
219 2009-11-17 H.J. Lu <hongjiu.lu@intel.com>
222 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Add max_short_sec,
223 max_short_offset, min_short_sec and min_short_offset.
224 (elfNN_ia64_update_short_info): New.
225 (elfNN_ia64_relax_section): Update max_short_sec,
226 max_short_offset, min_short_sec and min_short_offset.
227 (elfNN_ia64_choose_gp): Use min_short_sec/max_short_sec if
230 2009-11-17 Paul Brook <paul@codesourcery.com>
231 Daniel Jacobowitz <dan@codesourcery.com>
233 * elf32-arm.c (using_thumb_only, arch_has_arm_nop,
234 arch_has_thumb2_nop): Handle TAG_CPU_ARCH_V7E_M.
235 (tag_cpu_arch_combine): Ditto. Correct MAX_TAG_CPU_ARCH test.
237 2009-11-17 Ulrich Weigand <uweigand@de.ibm.com>
239 * elf32-spu.c (struct spu_link_hash_table): Remove overlay_fixed,
240 reserved, and extra_stack_space members.
241 (spu_elf_auto_overlay): Use auto_overlay_fixed, auto_overlay_reserved,
242 and extra_stack_space members of htab->params instead.
244 2009-11-17 Tristan Gingold <gingold@adacore.com>
246 * targets.c: Include alloca-conf.h
248 2009-11-16 Kai Tietz <kai.tietz@onevision.com>
250 * targets.c (bfd_get_target_info): New function.
251 (_bfd_find_arch_match): New function.
252 * bfd-in2.h: Regenerated.
254 2009-11-12 Nick Clifton <nickc@redhat.com>
256 * po/ru.po: Updates Russian translation.
258 2009-11-11 Nick Clifton <nickc@redhat.com>
260 * po/id.po: Updated Indonesian translation.
262 2009-11-11 Jan Kratochvil <jan.kratochvil@redhat.com>
264 * configure.in: Call ACX_LARGEFILE. Stop calling AC_PLUGINS,
265 AC_SYS_LARGEFILE and checking the Solaris largefile exception.
266 * aclocal.m4: Regenerate.
267 * configure: Regenerate.
269 2009-11-09 H.J. Lu <hongjiu.lu@intel.com>
272 * elflink.c (elf_link_output_extsym): Don't return on
273 STT_GNU_IFUNC symbol when stripping.
275 2009-11-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
277 * elf32-hppa.c (elf32_hppa_final_link): Don't sort unwind information
278 in a relocatable link.
279 * elf64-hppa.c (elf_hppa_final_link): Likewise.
281 2009-11-05 Nick Clifton <nickc@redhat.com>
283 * elflink.c (elf_link_add_object_symbols): Improve error
284 message generated when a symbol is left unresolved because a
285 --no-add-needed command line option has prevented the
286 inclusion of the DSO defining it.
288 2009-11-03 Alan Modra <amodra@bigpond.net.au>
289 Ulrich Weigand <uweigand@de.ibm.com>
291 * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
292 (jump tables or other references to code labels) as well.
294 2009-11-02 Paul Brook <paul@codesourcery.com>
296 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
299 2009-11-02 Alan Modra <amodra@bigpond.net.au>
301 * elflink.c (elf_link_add_object_symbols): Don't force debug
304 2009-10-29 Johan Kristell <johankri@axis.com>
306 * elf32-cris.c (cris_elf_plt_sym_val): New function.
307 (elf_backend_plt_sym_val): Define.
309 2009-10-27 Kai Tietz <kai.tietz@onevision.com>
311 * peXXigen.c (bfdver.h): Add include.
312 (LINKER_VERSION): Do calculation based on BFD_VERSION.
314 2009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
316 * elf32-vax.c (elf_vax_relocate_section): Correct assertion.
318 2009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
320 * elf32-vax.c (elf_vax_plt_entry): Fix formatting.
322 2009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
324 * elf32-vax.c (elf_vax_relocate_section): Fix a typo.
326 2009-10-23 Kai Tietz <kai.tietz@onevision.com>
328 * coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset
329 of R_AMD64_PCRLONG_<X> relocations from addend.
331 2009-10-23 Alan Modra <amodra@bigpond.net.au>
333 * plugin.c: Produce empty object if not BFD_SUPPORTS_PLUGINS.
335 2009-10-20 Alan Modra <amodra@bigpond.net.au>
338 * opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
340 2009-10-19 Hans-Peter Nilsson <hp@axis.com>
342 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
343 Don't subtract the size of the TLS block for non-shared objects
346 2009-10-17 Arnold Metselaar <arnold.metselaar@planet.nl>
348 * coff-z80.c (z80coff_vec): Allow sections to be of type
351 2009-10-16 Alan Modra <amodra@bigpond.net.au>
354 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
355 bim and bim->buffer. bfd_malloc instead.
356 * peicode.h (pe_ILF_build_a_bfd): Similarly.
357 (ILF_DATA_SIZE): Don't include bim.
358 * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
360 2009-10-14 Alan Modra <amodra@bigpond.net.au>
362 * aoutx.h (aout_link_check_ar_symbols): Typo fix.
364 2009-10-13 H.J. Lu <hongjiu.lu@intel.com>
367 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
370 2009-10-13 Alan Modra <amodra@bigpond.net.au>
372 * elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
374 2009-10-12 Roland McGrath <roland@frob.com>
376 * elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol):
377 Fix %s that should be %B in several message formats.
379 2009-10-10 Alan Modra <amodra@bigpond.net.au>
381 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
382 excluded output sections.
384 2009-10-09 Tristan Gingold <gingold@adacore.com>
386 * mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
387 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
389 2009-10-09 Tristan Gingold <gingold@adacore.com>
391 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
392 bfd_mach_o_read_symtab_symbols.
393 (bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
394 (bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
395 (bfd_mach_o_scan_write_section_32): Rename to
396 bfd_mach_o_write_section_32.
397 (bfd_mach_o_scan_write_section_64): Rename to
398 bfd_mach_o_write_section_64.
399 (bfd_mach_o_scan_write_segment_32): Rename to
400 bfd_mach_o_write_segment_32.
401 (bfd_mach_o_scan_write_segment_64): Rename to
402 bfd_mach_o_write_segment_64.
403 (bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
404 (bfd_mach_o_scan_read_section_32): Rename to
405 bfd_mach_o_read_section_32.
406 (bfd_mach_o_scan_read_section_64): Rename to
407 bfd_mach_o_read_section_64.
408 (bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
409 (bfd_mach_o_scan_read_symtab_strtab): Rename to
410 bfd_mach_o_read_symtab_strtab.
411 (bfd_mach_o_scan_read_symtab_symbol): Rename to
412 bfd_mach_o_read_symtab_symbol.
413 (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
414 bfd_mach_o_read_dysymtab_symbol.
415 (bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
416 (bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
417 (bfd_mach_o_scan_read_prebound_dylib): Rename to
418 bfd_mach_o_read_prebound_dylib.
419 (bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
420 (bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
421 (bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
422 (bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
423 (bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
424 (bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
425 (bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
426 (bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
427 (bfd_mach_o_scan_read_segment_32): Rename to
428 bfd_mach_o_read_segment_32.
429 (bfd_mach_o_scan_read_segment_64): Rename to
430 bfd_mach_o_read_segment_64.
431 (bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
432 * mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
433 bfd_mach_o_read_dysymtab_symbol.
435 2009-10-09 Tristan Gingold <gingold@adacore.com>
437 * mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
438 (bfd_mach_o_section_get_nbr_indirect): Ditto.
439 (bfd_mach_o_get_synthetic_symtab): New function.
440 (bfd_mach_o_print_private_header): Print the number of commands
442 * mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
443 * mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
445 2009-10-08 Tristan Gingold <gingold@adacore.com>
447 * config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
449 2009-10-06 H.J. Lu <hongjiu.lu@intel.com>
451 * bfd-in2.h: Regenerated.
453 2009-10-02 Alan Modra <amodra@bigpond.net.au>
455 * aout-cris.c (N_SHARED_LIB): Don't define.
456 * hp300bsd.c (N_SHARED_LIB): Don't define.
457 * i386bsd.c (N_SHARED_LIB): Don't define.
458 * i386linux.c (N_SHARED_LIB): Don't define.
459 * i386lynx.c (N_SHARED_LIB): Don't define.
460 * m68klinux.c (N_SHARED_LIB): Don't define.
461 * m88kmach3.c (N_SHARED_LIB): Don't define.
462 * mipsbsd.c (N_SHARED_LIB): Don't define.
463 * newsos3.c (N_SHARED_LIB): Don't define.
464 * pc532-mach.c (N_SHARED_LIB): Don't define.
465 * pdp11.c (N_SHARED_LIB): Don't define.
466 * sparclinux.c (N_SHARED_LIB): Don't define.
467 * vaxbsd.c (N_SHARED_LIB): Don't define.
469 2009-10-01 Dave Korn <dave.korn.cygwin@gmail.com>
471 * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
472 symbol for a weak undef in the auxbfd, not the input bfd.
474 2009-10-01 Ulrich Weigand <uweigand@de.ibm.com>
476 * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
477 after .toe instead of before .text section. Set the LMA of all
478 overlay sections to their icache IA address.
479 (spu_elf_find_overlays): Determine icache set id without reference
482 2009-09-30 Tristan Gingold <gingold@adacore.com>
484 * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
486 2009-09-29 H.J. Lu <hongjiu.lu@intel.com>
488 * elf64-x86-64.c (elf64_x86_64_append_rela): New.
489 (elf64_x86_64_relocate_section): Use it.
490 (elf64_x86_64_finish_dynamic_symbol): Likewise.
492 2009-09-29 DJ Delorie <dj@redhat.com>
494 * Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
495 (ALL_MACHINES_CFILES): Add cpu-rx.c.
496 (BFD32_BACKENDS): Add elf32-rx.lo.
497 (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
498 * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
500 (bfd_archures_list): Add bfd_rx_arch.
501 * config.bfd: Add entry for rx-*-elf.
502 * configure.in: Add entries for bfd_elf32_rx_le_vec and
504 * reloc.c: Add RX relocations.
505 * targets.c: Add RX target vectors.
506 * Makefile.in: Regenerate.
507 * bfd-in2.h: Regenerate.
508 * configure: Regenerate.
509 * libbfd.h: Regenerate.
510 * cpu-rx.c: New file.
511 * elf32-rx.c: New file.
513 2009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
515 * elf32-cr16.c (elf32_cr16_relocate_section): Removed
516 info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case.
518 2009-09-28 Nick Clifton <nickc@redhat.com>
520 PR 10478: Accepting Solaris binaries.
521 * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
522 section link values in x86 binaries.
523 * elfcode.h (elf_object_p): Likewise.
525 2009-09-28 Philippe De Muyter <phdm@macqel.be>
527 * elf32-m68k.c (elf_m68k_final_write_processing): New function.
528 (elf_backend_final_write_processing): Macro defined as above function.
530 2009-09-25 Martin Thuresson <martint@google.com>
532 Update sources to make alpha and arm targets compile cleanly with
534 * ecoff.c: Add casts.
535 * ecofflink.c: Add casts.
536 * elf64-alpha.c: Add casts.
537 (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
539 (SKIP_HOWTO): Use enum name.
540 * elf32-arm.c: Add casts.
541 (elf32_arm_vxworks_bed): Update code to avoid multiple
543 (struct map_stub): Move to top level.
545 2009-09-24 H.J. Lu <hongjiu.lu@intel.com>
548 * elflink.c (elf_link_output_extsym): Turn off visibility on
550 (bfd_elf_final_link): Turn off visibility on dynamic local
553 2009-09-24 Alan Modra <amodra@bigpond.net.au>
556 * dwarf2.c (lookup_address_in_line_info_table): Remove workaround
557 for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
558 Remove "function" parm, adjust caller.
560 2009-09-23 Matt Rice <ratmice@gmail.com>
562 * bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
564 * elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
565 DT_DEPAUDIT from audit/depaudit arguments.
566 (elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
567 (elf_link_add_object_symbols): Set dt_audit target data when finding a
569 * bfd-in2.h: Regenerate.
570 * bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
572 2009-09-23 Jie Zhang <jie.zhang@analog.com>
574 * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
575 .rel.plt and .plt sections are removed.
576 (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
577 section. Remove the duplicated removing of empty .rel.plt
580 2009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
582 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
583 patch to handle the new personality relaxation.
585 2009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
587 * elf-eh-frame.c (make_pc_relative): New function.
588 (_bfd_elf_write_section_eh_frame): Use it.
590 2009-09-21 Alan Modra <amodra@bigpond.net.au>
592 * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
593 (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
594 (MR_0_3, MR_3_0): Define.
595 (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
596 (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
597 (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
598 table. Check for presense of __tls_get_addr_opt
599 (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
600 (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
601 (write_glink_stub): Add param p.
602 (ppc_elf_relocate_section): Adjust write_glink_stub call.
603 (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
605 * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
606 * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
607 (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
608 table. Check for presense of __tls_get_addr_opt.
609 (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
610 (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
611 BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
612 LD_R2_0R1, MTLR_R11): Define.
613 (build_tls_get_addr_stub): New function.
614 (ppc_build_one_stub): Call it.
615 (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
616 (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
617 __tls_get_addr plt call.
618 * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
620 2009-09-19 Richard Sandiford <rdsandiford@googlemail.com>
622 * elf-bfd.h (eh_cie_fde): Add personality_offset and
623 make_per_encoding_relative to the CIE structure. Add a padding field.
624 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
625 rather than 0xf0 when masking out the base address encoding
626 Record the offset of personality data from the start of the CIE.
627 Remove a repeated elf_backend_can_make_relative_eh_frame check.
628 (find_merged_cie): Take an info argument. If the personality
629 binds locally, try converting an absolute personality into
631 (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
632 when masking out the base address encoding. Update the call to
634 (_bfd_elf_eh_frame_section_offset): Discard relocations against
635 the personality data if we are converting into PC-relative form.
636 (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
637 when masking out the base address encoding. Handle
638 make_per_encoding_relative.
640 2009-09-18 Alan Modra <amodra@bigpond.net.au>
643 * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
644 R_PPC_EMB_SDA2I16 complain_overflow_signed.
645 (create_sdata_sym): Pass info rather than htab.
646 Update all callers. Ensure symbols are hidden.
647 (ppc_elf_check_relocs): Allow SDAREL16 when shared.
648 (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
649 _GLOBAL_OFFSET_TABLE_.
650 (elf_finish_pointer_linker_section): Don't assume that sdata base
651 symbol is always at 0x8000 offset. Don't subtract the addend here.
652 (is_static_defined): New function.
653 (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
654 is statically defined. Clear addend for EMB_SDAI16 and EMB_SDA2I16
655 relocs. Downgrade error on unexpected section for EMB_SDA2REL
656 reloc symbols to a warning.
658 2009-09-18 Nick Clifton <nickc@redhat.com>
660 * po/es.po: Updated Spanish translation.
661 * po/vi.po: Updated Vietnamese translation.
663 2009-09-18 Alan Modra <amodra@bigpond.net.au>
665 * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
666 functions. Use throughout.
667 (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
668 from indirect symbol.
669 (lookup_fdh): Rename from get_fdh. Follow indirect sym links.
670 (add_symbol_adjust): Simplify.
671 (defined_code_entry, defined_func_desc): New functions.
672 (ppc64_elf_gc_keep): Follow indirect sym links. Use defined_code_entry.
673 (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
674 defined_code_entry to follow indirect sym links.
675 (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
676 (ppc_type_of_stub): Follow indirect sym links.
677 (toc_adjusting_stub_needed): Likewise.
678 (ppc_build_one_stub): Likewise. Make undefined dot-symbols weak
679 rather than defining them at stub.
680 (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
683 2009-09-16 Tristan Gingold <gingold@adacore.com>
685 * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
687 * mach-o.c (bfd_mach_o_cpu_name): Reindent.
688 (bfd_mach_o_filetype_name): Complete with new constants. Reindent.
689 (bfd_mach_o_print_private_header): Use fputs instead of fprintf
690 when possible to avoid warnings.
691 (bfd_mach_o_print_section_map): Ditto.
692 (bfd_mach_o_section_get_entry_size): New function.
693 (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
695 (bfd_mach_o_print_dysymtab): Print address of indirect symbols.
697 2009-09-14 Nick Clifton <nickc@redhat.com>
699 * po/fi.po: Updated Finnish translation.
701 2009-09-11 Nick Clifton <nickc@redhat.com>
703 * po/bfd.pot: Updated by the Translation project.
705 2009-09-11 Philippe De Muyter <phdm@macqel.be>
707 * binary.c (binary_object_p): Remove bfd_external_binary_architecture
708 hack. objcopy `-B' (`--binary-architecture') option is now handled
711 2009-09-11 Nick Clifton <nickc@redhat.com>
713 * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
716 2009-09-11 Jie Zhang <jie.zhang@analog.com>
718 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
719 NULL if `ht' is NULL.
721 2009-09-09 Martin Thuresson <martin@mtme.org>
723 Update sources to compile cleanly with -Wc++-compat:
724 * aoutx.h: Add casts.
725 * archive.c: Add casts.
726 * archive64.c: Add casts.
727 * archures.c: Add casts.
728 * bfd-in2.h: Regenerated.
729 * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
730 * bfdio.c: Add casts.
731 * binary.c: Add casts.
732 * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
733 parameter to use enum value instead of int.
734 * coffcode.h: Add casts.
735 * coffgen.c: Add casts.
736 * cofflink.c: Add casts.
737 * compress.c: Add casts.
738 * dwarf1.c: Add casts.
739 * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
740 bfd_ptr. Update code to use new name.
741 * elf-attrs.c: Add casts.
742 * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
743 anonymous struct. (union gotplt_union, struct
744 elf_link_virtual_table_entry): Move to top level.
745 * elf-eh-frame.c: Add casts.
746 * elf-strtab.c: Add casts.
747 * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
748 argument name from typename to type_name.
749 * elf32-i386.c: Add casts.
750 * elf64-x86-64.c: Add casts.
751 * elfcode.h: Add casts.
752 * elfcore.h: Add casts.
753 * elflink.c: Add casts.
754 * format.c: Add casts.
757 * libaout.h (enum aout_subformat, enum aout_magic): Move to top
759 * libbfd.c: Add casts.
760 * linker.c: Add casts.
761 * merge.c: Add casts.
762 * opncls.c: Add casts.
763 * peXXigen.c: Add casts.
764 * peicode.h: Add casts.
765 * reloc.c: Add casts.
766 * section.c: Add casts.
767 * simple.c: Add casts.
769 * stabs.c: Add casts.
771 * targets.c: Add casts.
772 * tekhex.c: Add casts.
773 * verilog.c: Add casts.
775 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
777 * configure: Regenerate.
779 2009-09-09 Daniel Jacobowitz <dan@codesourcery.com>
781 * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
782 for the mode of target PLT entries.
783 (allocate_dynrelocs): Only adjust symbol type if setting its
786 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
788 * configure: Regenerate.
790 2009-09-09 Nick Clifton <nickc@redhat.com>
793 * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
794 section headers containing sh_link values of SHN_BEFORE or
796 * elfcode.h (elf_object_p): Likewise.
798 2009-09-09 Tristan Gingold <gingold@adacore.com>
800 Handle DYLD_INFO introduced by Darwin10.
801 * mach-o.h (bfd_mach_o_load_command_type): Add
802 BFD_MACH_O_LC_DYLD_INFO.
803 (bfd_mach_o_dyld_info_command): New type.
804 (bfd_mach_o_load_command): Add dyld_info field.
805 * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
806 (bfd_mach_o_scan_read_dyld_info): New function.
807 (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
808 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
809 (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
810 (bfd_mach_o_print_dyld_info): New function.
812 2009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
814 * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
815 linkonce or linker script discarded section.
817 2009-09-09 Alan Modra <amodra@bigpond.net.au>
819 * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
821 2009-09-07 Andreas Schwab <schwab@linux-m68k.org>
823 * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
824 range call the bfd error hander and use R_68K_NONE instead.
826 2009-09-07 Tristan Gingold <gingold@adacore.com>
828 * po/SRC-POTFILES.in: Regenerate.
829 * po/bfd.pot: Regenerate.
831 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
832 BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
833 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
834 st_mtim.tv_nsec to gas/configure.in
835 (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
836 * configure: Regenerate.
837 * config.in: Regenerate.
838 * vmsutil.c: Moved to gas/config/te-vms.c
839 * vmsutil.h: Removed.
840 * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
841 (BFD32_BACKENDS): Remove vmsutil.lo
842 * Makefile.in: Regenerate.
844 2009-09-05 Eli Zaretskii <eliz@gnu.org>
846 * coffcode.h: Include libiberty.h.
848 2009-09-05 Martin Thuresson <martin@mtme.org>
850 * coff-arm.c (coff_arm_relocate_section)
851 (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
852 Change member name class to symbol_class.
853 * coff-i960.c (coff_i960_relocate_section) Rename variable
854 class to class_val. Change member name class to symbol_class.
855 * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
856 (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
857 * coff-stgo32.c (adjust_aux_in_post)
858 (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
860 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
861 (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
862 * coffcode.h (coff_pointerize_aux_hook): Rename variable class
864 * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
865 variables named class to n_sclass. (coff_write_symbols): Rename
866 variable class to sym_class. (bfd_coff_set_symbol_class): Rename
867 argument class to symbol_class.
868 * cofflink.c (_bfd_coff_link_hash_newfunc)
869 (coff_link_add_symbols, _bfd_coff_link_input_bfd)
870 (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
871 Update code to use renamed members.
872 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
873 argument class to in_class.
874 * libcoff-in.h (struct coff_link_hash_entry, struct
875 coff_debug_merge_type) Renamed members class to symbol_class and
877 * libcoff.h Regenerated.
878 * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
879 Rename argument class to in_class.
880 * pef.c (bfd_pef_parse_imported_symbol): Update code to use
882 * pef.h (struct bfd_pef_imported_symbol): Changed name of
883 member class to symbol_class.
885 2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
887 * configure: Regenerated.
889 2009-09-04 Tristan Gingold <gingold@adacore.com>
891 * configure.in: Bump version to 2.20.51
893 2009-09-04 Alan Modra <amodra@bigpond.net.au>
895 * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
897 2009-09-04 Jie Zhang <jie.zhang@analog.com>
899 * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
901 (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
902 for empty .rela.bss and .rel.plt sections.
904 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
906 * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
907 R_MIPS_JALR unless symbol resolves locally.
909 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
911 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
912 has_static_relocs for R_MIPS_JALR.
914 2009-09-03 Maciej W. Rozycki <macro@codesourcery.com>
916 * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
917 R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
920 2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
922 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
925 2009-09-01 Tristan Gingold <gingold@adacore.com>
927 * makefile.vms: Ported to Itanium VMS. Remove useless variable and
928 dependencies. Reindent.
929 * configure.com: Ported to Itanium VMS. Now generates a build.com
930 to build without make. Add messages but make edit silent.
931 * hosts/alphavms.h: Add a prototype for stpcpy.
932 * vms.c: Add a missing include for Alpha VMS.
933 * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
935 2009-08-31 Jan Beulich <jbeulich@novell.com>
937 * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
938 * elf.c (bfd_elf_get_default_section_type): New.
939 (elf_fake_sections): Use bfd_elf_get_default_section_type.
941 2009-08-30 H.J. Lu <hongjiu.lu@intel.com>
943 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
945 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
947 2009-08-30 Alan Modra <amodra@bigpond.net.au>
950 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
951 (bfd_emul_get_commonpagesize): Likewise.
953 2009-08-29 Martin Thuresson <martin@mtme.org>
955 * elf32-arm.c (struct stub_def): Rename member template to
956 template_sequence. (arm_build_one_stub,
957 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
958 Rename variable template to template_sequence.
959 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
960 Rename variable template to template_val.
961 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
963 * coffgen.c (coff_make_empty_symbol)
964 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
965 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
967 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
969 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
971 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
972 * ieee.c (ieee_make_empty_symbol): Rename variable new to
974 * linker.c (bfd_new_link_order): Rename variable new to
976 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
978 * oasys.c (oasys_make_empty_symbol): Rename variable new to
980 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
981 new to new_symbol_type.
982 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
984 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
986 (read_hdr, rs6000coff_core_p)
987 (rs6000coff_core_file_matches_executable_p)
988 (rs6000coff_core_file_failing_command)
989 (rs6000coff_core_file_failing_signal): Updated function to use new
991 * som.c (som_make_empty_symbol): Rename variable new to
993 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
995 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
996 variable new to new_symbol.
998 2009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1000 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
1001 bfdlibdir and bfdincludedir.
1002 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
1003 [INSTALL_LIBBFD]: ... here, ...
1004 [INSTALL_LIBBFD]: ... and empty overrides here.
1005 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
1006 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
1007 * Makefile.in: Regenerate.
1008 * configure: Regenerate.
1010 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
1012 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
1013 relocations. Rewrite output of dynamic TLS relocations.
1014 (DTP_OFFSET, TP_OFFSET): New constants.
1015 (dtpoff_base): Update.
1016 (tpoff): Rename to tpoff_base, update.
1017 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
1018 New functions. Move code from elf_m68k_relocate_section here.
1019 (elf_m68k_relocate_section): Update.
1020 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
1022 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
1024 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
1026 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
1027 Handle non_got_ref field.
1028 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
1030 2009-08-26 Alan Modra <amodra@bigpond.net.au>
1033 * linker.c (bfd_find_version_for_sym): Revert warning.
1035 2009-08-26 Alan Modra <amodra@bigpond.net.au>
1038 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
1039 other wildcard match. Warn on multiple wildcard matches.
1041 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1043 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
1045 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
1046 only in this condition.
1047 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
1048 to build but not install libbfd.la in this condition.
1049 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
1050 (install_libbfd, install_libbfd): Remove.
1051 * Makefile.in: Regenerate.
1052 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
1053 (INCLUDES): ... this.
1055 * doc/Makefile.in: Regenerate.
1057 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
1058 no-dist and foreign.
1059 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
1060 dependency tracking to work for them.
1061 (targets.lo, archures.lo, dwarf.lo): Rewrite to
1062 use automake dependency tracking mechanism.
1063 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
1064 (mkdep section): Remove.
1065 (BUILT_SOURCES): New, list $(BUILD_HFILES).
1066 * Makefile.in: Regenerate.
1067 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
1069 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
1070 (install-pdf, install-pdf-recursive, install-html)
1071 (install-html-recursive): Remove.
1072 * Makefile.in: Regenerate.
1074 * Makefile.in: Regenerate.
1075 * aclocal.m4: Likewise.
1076 * config.in: Likewise.
1077 * configure: Likewise.
1079 2009-08-21 Daniel Gutson <dgutson@codesourcery.com>
1081 * elf32-arm.c (arch_has_thumb2_nop): New function.
1082 (arch_has_arm_nop): New function.
1083 (elf32_arm_final_link_relocate): NOP opcodes changed.
1085 2009-08-16 Doug Evans <dje@google.com>
1087 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
1088 at least don't leak memory.
1090 2009-08-13 DJ Delorie <dj@redhat.com>
1092 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
1095 2009-08-12 Nick Clifton <nickc@redhat.com>
1097 * po/fi.po: Updated Finnish translation.
1099 2009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
1101 Merge some FRV FDPIC changes into the Blackfin code.
1102 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
1103 summary reloc information.
1104 (bfinfdpic_dynamic_got_plt_info): New.
1105 (_bfin_create_got_section): Create the PLT section here.
1106 (elf32_bfinfdpic_create_dynamic_sections): Not here.
1107 (_bfinfdpic_count_nontls_entries): Move out of...
1108 (_bfinfdpic_count_got_plt_entries): ... here.
1109 (_bfinfdpic_count_relocs_fixups): Likewise.
1110 (_bfinfdpic_reset_got_plt_entries): New.
1111 (_bfinfdpic_size_got_plt): Move out of...
1112 (elf32_bfinfdpic_size_dynamic_sections): ... here.
1113 (bfinfdpic_relocate_section): Be careful not to call
1114 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
1115 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
1117 (elf_backend_discard_info): Define for FD-PIC.
1119 2009-08-11 Alan Modra <amodra@bigpond.net.au>
1121 * elflink.c: Add FIXMEs for some places that require octets_per_byte
1123 * elf-eh-frame.c: Likewise.
1124 * merge.c: Likewise.
1126 2009-08-11 Alan Modra <amodra@bigpond.net.au>
1128 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
1129 to x86 and x86_64 configurations.
1130 * configure: Regenerate.
1132 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1134 Stop using bfd_usrdata in libbfd.
1135 * coff-stgo32.c (bfd_coff_go32stub): Remove.
1136 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
1137 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
1138 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
1139 filehdr_dst->u.go32.stub. New comment with the reason.
1140 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
1141 Substitute the removed macro bfd_coff_go32stub.
1142 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
1143 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
1144 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
1145 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
1146 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
1148 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
1149 * libcoff-in.h (coff_data_type): New field go32stub.
1150 * libcoff.h: Regenerated.
1152 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1154 Fix go32 stub preservation by objcopy.
1155 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
1156 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
1159 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
1161 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
1163 (elf32_arm_final_link_relocate): Treat local undefined symbols the
1164 same as global undefined symbols.
1165 (elf32_arm_relocate_section): Give an error for local undefined
1166 non-weak symbols, unless the reloc will not use the symbol.
1168 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
1170 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
1171 (ppc_elf_relax_section): Use symbol index to distinguish
1174 2009-08-10 Alan Modra <amodra@bigpond.net.au>
1176 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
1178 2009-08-10 Alan Modra <amodra@bigpond.net.au>
1180 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
1181 info for STT_GNU_IFUNC.
1182 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
1183 on got refs in case the symbol turns out to be ifunc.
1184 (ppc_elf_gc_sweep_hook): Similarly.
1185 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
1186 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
1187 (ppc_elf_size_dynamic_sections): Likewise.
1188 (ppc_elf_relocate_section): Likewise.
1190 2009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
1192 From Mike Frysinger <michael.frysinger@analog.com>
1193 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
1194 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
1195 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
1196 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
1197 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
1198 Adjust to match the renamed reloc definitions.
1200 2009-08-08 Alan Modra <amodra@bigpond.net.au>
1203 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
1204 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
1206 2009-08-07 Tom Tromey <tromey@redhat.com>
1208 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
1211 2009-08-06 Michael Eager <eager@eagercon.com>
1213 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
1214 * Makefile.in: Regenerate.
1215 * archures.c: Add bfd_arch_microblaze.
1216 * bfd-in2.h: Regenerate.
1217 * config.bfd: Add microblaze target.
1218 * configure.in: Add bfd_elf32_microblaze_vec target.
1219 * configure: Regenerate.
1220 * cpu-microblaze.c: New.
1221 * elf32-microblaze.c: New.
1222 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
1223 * libbfd.h: Regenerate.
1224 * reloc.c: Add MICROBLAZE relocations.
1225 * section.c: Add struct relax_table and relax_count to section.
1226 * targets.c: Add bfd_elf32_microblaze_vec.
1228 2009-08-06 Jakub Jelinek <jakub@redhat.com>
1229 Alan Modra <amodra@bigpond.net.au>
1232 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
1234 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
1235 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
1237 2009-08-06 Nathan Sidwell <nathan@codesourcery.com>
1239 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
1240 at least once when fixing cortex-a8.
1242 2009-08-05 Chao-ying Fu <fu@mips.com>
1244 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
1245 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
1246 for CPUs. It is true for RM9000.
1247 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
1249 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
1250 to guard the transformation.
1252 2009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1254 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
1255 (spu_elf_size_sections): Declare prototype.
1256 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
1257 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
1258 (spu_elf_emit_fixup): New function.
1259 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
1260 (spu_elf_size_sections): New function.
1262 2009-08-05 Nathan Sidwell <nathan@codesourcery.com>
1264 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
1265 (arm_build_one_stub): Build a8 veneers as a separate pass.
1266 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
1267 parameters. Use them to check if we create a different a8 fixup
1268 than the previous pass.
1269 (elf32_arm_size_stubs): Move scope of stub_changed and
1270 prev_num_a8_fixes into main loop.
1271 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
1273 2009-08-04 Alan Modra <amodra@bigpond.net.au>
1275 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
1276 which find_plt_ent is called. Delete redundant code.
1278 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
1281 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1282 invalid string offset.
1284 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
1287 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
1288 to htab->init_got_offset and plt to htab->init_plt_offset
1289 when discarding space for dynamic relocations.
1291 2009-08-03 Alan Modra <amodra@bigpond.net.au>
1293 * elf32-ppc.c (struct plt_entry): Revise comments.
1294 (ppc_elf_check_relocs): Don't create needless plt_entry info
1295 for non-pie executables. Don't test info->pie when info->shared
1296 already covers that case.
1297 (ppc_elf_gc_sweep_hook): Adjust for above change.
1298 (add_stub_sym): Don't test info->pie when info->shared tested.
1299 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
1300 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
1301 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
1302 (ppc_elf_relocate_section): Likewise.
1304 2009-08-03 Alan Modra <amodra@bigpond.net.au>
1306 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
1307 for local ifunc symbols in non-pie executables, regardless of
1308 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
1309 code so that it's obvious that we only do anything special for
1311 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
1312 (allocate_dynrelocs): Correct comment for syms defined in plt.
1313 Don't specially allocate ifunc dyn relocs.
1314 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
1315 (ppc_elf_relocate_section): Set "relocation" value for ifunc
1316 syms in non-pie executables. No specially allocated dyn relocs
1317 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
1318 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
1319 a non-pie executable.
1321 2009-08-02 H.J. Lu <hongjiu.lu@intel.com>
1322 Jakub Jelinek <jakub@redhat.com>
1325 * elf32-i386.c (elf_i386_tls_transition): Check executable
1326 instead of shared for TLS when building PIE.
1327 (elf_i386_check_relocs): Likewise.
1328 (elf_i386_allocate_dynrelocs): Likewise.
1329 (elf_i386_relocate_section): Likewise.
1331 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
1332 instead of shared for TLS when building PIE.
1333 (elf64_x86_64_check_relocs): Likewise.
1334 (elf64_x86_64_allocate_dynrelocs): Likewise.
1335 (elf64_x86_64_relocate_section): Likewise.
1337 2009-07-31 Anthony Green <green@moxielogic.com>
1339 * config.bfd (targ_cpu): Add moxie-uclinux support.
1341 2009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
1343 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
1345 2009-07-30 Alan Modra <amodra@bigpond.net.au>
1347 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
1348 used by indirect function support. Count dynamic relocs for
1350 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
1351 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
1352 in iplt and their relocs in reliplt. Don't make ifunc syms
1353 dynamic. Allocate got entry relocs for non-dynamic ifunc in
1354 reliplt. Handle other dynamic relocs for ifunc.
1355 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
1356 ifunc in reliplt, likewise relocs for got against local ifunc.
1357 Typo fix on reliplt size adjust.
1358 (ppc_elf_relocate_section): Don't use plt scheme of allocating
1359 relocs 1-1 with entries for iplt, instead just add using
1360 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
1361 Error on invalid ifunc dyn relocs.
1362 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
1364 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
1365 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
1366 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1367 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
1368 (allocate_dynrelocs): As for elf32-ppc.c above.
1369 (ppc64_elf_size_dynamic_sections): Likewise.
1370 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
1371 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
1372 (ppc_size_one_stub): Similarly.
1373 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
1375 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
1377 2009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1379 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
1380 change. Add note to head comment.
1382 2009-07-28 Jan Beulich <jbeulich@novell.com>
1384 * archive.c (get_extended_arelt_filename): Remove redundant
1385 range check on index.
1387 2009-07-27 Doug Kwan <dougkwan@google.com>
1389 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
1391 2009-07-27 H.J. Lu <hongjiu.lu@intel.com>
1393 * archures.c bfd_*_arch): Sorted.
1394 (bfd_archures_list): Likewise.
1396 2009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1398 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
1399 to R_cr16_NUM32 relocation.
1401 2009-07-26 Michael Eager <eager@eagercon.com>
1403 * archures.c: Add bfd_mach_ppc_405
1406 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1408 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
1409 * cpu-l1om.c (bfd_l1om_arch): Likewise.
1411 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1413 * archures.c (bfd_architecture): Add bfd_arch_l1om.
1414 (bfd_l1om_arch): New.
1415 (bfd_archures_list): Add &bfd_l1om_arch.
1416 * bfd-in2.h: Regenerated.
1418 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
1419 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
1420 if bfd_elf64_x86_64_freebsd_vec is supported.
1421 (targ_selvecs): Likewise.
1423 * configure.in: Support bfd_elf64_l1om_vec and
1424 bfd_elf64_l1om_freebsd_vec.
1425 * configure: Regenerated.
1429 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
1430 (bfd_elf64_l1om_vec): Likewise.
1431 (bfd_elf64_l1om_freebsd_vec): Likewise.
1433 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
1434 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
1435 * Makefile.in: Regenerated.
1437 * targets.c (bfd_elf64_l1om_vec): New.
1438 (bfd_elf64_l1om_freebsd_vec): Likewise.
1439 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
1440 bfd_elf64_l1om_freebsd_vec.
1442 2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1443 Alan Modra <amodra@bigpond.net.au>
1445 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
1446 * bfd-in2.h: Regenerate.
1447 * libbfd.h: Regenerate.
1448 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
1449 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
1450 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
1452 2009-07-23 H.J. Lu <hongjiu.lu@intel.com>
1455 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
1456 instead of shared for R_X86_64_TPOFF32.
1457 (elf64_x86_64_relocate_section): Likewise.
1459 2009-07-23 Ulrich Drepper <drepper@redhat.com>
1461 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1462 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1463 with the BSF_GNU_UNIQUE flag bit set.
1464 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1465 for symbols with STB_GNU_UNIQUE binding.
1466 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1467 with the STB_GNU_UNIQUE binding.
1468 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1469 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
1470 symbols with the unique_global field set.
1471 (elf_link_output_extsym): Set unique_global field for symbols with
1472 the STB_GNU_UNIQUE binding.
1473 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1474 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1476 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1478 * bfd-in2.h: Regenerate.
1480 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1482 * elflink.c (elf_link_output_extsym): Revert the last change.
1484 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1487 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1488 when ref_regular, not def_regular.
1490 2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
1493 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1494 from a DSO into a normal FUNC symbol.
1495 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
1496 a normal FUNC symbol.
1498 2009-07-17 Chao-ying Fu <fu@mips.com>
1500 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1501 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1502 interlocking, the last PLT entry needs a nop in the branch delay slot.
1503 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1504 output the last two PLT entries in reverse order.
1506 2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
1508 * elf32-i386.c (elf_i386_relocate_section): Don't get local
1509 STT_GNU_IFUNC symbol for relocatable link.
1510 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1512 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1514 * bfdio.c (bfd_iovec): Add comments for bmmap.
1515 * bfd-in2.h: Regenerated.
1517 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1519 * Makefile.am: Run "make dep-am".
1520 * Makefile.in: Regenerated.
1522 2009-07-10 Doug Kwan <dougkwan@google.com>
1524 * elf32-arm.c (stub_hash_newfunc): Initialize fields
1525 target_addend and orig_insn.
1527 2009-07-10 Tom Tromey <tromey@redhat.com>
1529 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1530 (elf-eh-frame.lo): Likewise.
1531 (elf32-bfin.lo): Likewise.
1532 (elf32-frv.lo): Likewise.
1533 (elf32-xc16x.lo): Likewise.
1534 * Makefile.in: Rebuild.
1535 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1536 * elf-eh-frame.c: Likewise.
1537 * elf32-bfin.c: Likewise.
1538 * elf32-frv.c: Likewise.
1539 * elf32-xc16x.c: Likewise.
1541 2009-07-10 Julian Brown <julian@codesourcery.com>
1543 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1544 symbol a stub entry is derived from, not the entry for the stub
1545 itself, in call to elf32_arm_final_link_relocate.
1547 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1549 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1550 when reporting addends.
1552 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1554 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1555 data even when no stubs.
1556 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1558 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1560 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1561 (ppc_elf_get_synthetic_symtab): Report addend.
1562 (PLT_IFUNC): Define.
1563 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
1564 (ppc_elf_create_glink): New function.
1565 (ppc_elf_create_dynamic_sections): Use it.
1566 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1567 (update_local_sym_info): Allocate space for local_plt array.
1568 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
1570 (is_branch_reloc): New function.
1571 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1572 (ppc_elf_gc_sweep_hook): Likewise.
1573 (ppc_elf_adjust_dynamic_symbol): Likewise.
1574 (allocate_dynrelocs): Likewise.
1575 (ppc_elf_size_dynamic_sections): Likewise.
1576 (ppc_elf_relocate_section): Likewise.
1577 (branch_reloc_hash_match): Use is_branch_reloc.
1578 (ppc_elf_tls_optimize): Adjust for local_plt.
1579 (write_glink_stub): New function, extracted from..
1580 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
1581 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
1582 branch table when dynamic.
1583 (elf_backend_post_process_headers): Define.
1584 * elf64-ppc.c (elf_backend_post_process_headers): Define.
1585 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1586 (ppc64_elf_get_synthetic_symtab): Report addend.
1587 (struct ppc_stub_hash_entry): Add plt_ent.
1588 (PLT_IFUNC): Define.
1589 (struct ppc_link_hash_table): Add iplt and reliplt.
1590 (create_linkage_sections): Make .iplt and .rela.iplt sections.
1591 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1592 (update_local_sym_info): Allocate space for local_plt array.
1593 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
1595 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1596 and don't change hash flags here.
1597 (is_branch_reloc): New function.
1598 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1599 (ppc64_elf_gc_sweep_hook): Likewise.
1600 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1601 (allocate_dynrelocs): Likewise.
1602 (ppc64_elf_size_dynamic_sections): Likewise.
1603 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1604 (ppc64_elf_size_stubs): Likewise.
1605 (ppc64_elf_relocate_section): Likewise.
1606 (get_sym_h): Adjust for local_plt.
1607 (branch_reloc_hash_match): Use is_branch_reloc.
1608 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1609 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1611 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1613 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1615 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1617 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1618 and ref_regular_nonweak comment.
1619 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1620 when def_regular, not ref_regular.
1621 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1622 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1623 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1625 2009-07-09 Alan Modra <amodra@bigpond.net.au>
1627 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1628 of malloc'd struct call_info.
1629 (pasted_function): Likewise, priority too.
1631 2009-07-07 Alan Modra <amodra@bigpond.net.au>
1633 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1634 alignment when packing sections into overlays.
1636 2009-07-03 Cary Coutant <ccoutant@google.com>
1638 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1640 2009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
1642 * coffcode.h (sec_to_styp_flags): Partially revert (functional
1643 changes only) earlier patch:-
1645 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
1647 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1648 give .debug and .reloc data characteristics.
1649 (DOT_RELOC): New define for .reloc section string.
1650 (coff_write_object_contents): Use DOT_RELOC instead of string.
1652 2009-07-02 Tom Tromey <tromey@redhat.com>
1654 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1655 * bfdwin.c (bfd_free_window): Cast to unsigned long.
1657 2009-07-01 Nick Clifton <nickc@redhat.com>
1659 * elf-m10300.c: Remove trailing white space.
1660 * reloc.c: Likewise.
1662 2009-07-01 Douglas B Rupp <rupp@gnat.com>
1664 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
1665 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
1666 * configure.in: Use them.
1667 * configure: Regenerate.
1668 * config.in: Regenerate.
1669 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
1670 #define _BSD_SOURCE. Add comments.
1671 (vms_file_stats_name): Calculate creation date based on available
1672 runtime data. Return 1 for version instead of 0.
1674 2009-07-01 Nick Clifton <nickc@redhat.com>
1677 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1678 to R_ARM_THM_PC8 relocation.
1680 2009-06-29 Nick Clifton <nickc@redhat.com>
1682 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1683 different uses of the relocations addend when a symbol is in a
1686 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
1689 * elf.c (bfd_section_from_shdr): Don't change sh_link for
1690 SHT_REL/SHT_RELA sections on executable nor shared library.
1691 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1692 as a normal section.
1694 2009-06-25 Nick Clifton <nickc@redhat.com>
1696 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1697 symbols with SEC_MERGE flag.
1699 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
1701 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1702 give .debug and .reloc data characteristics.
1703 (DOT_RELOC): New define for .reloc section string.
1704 (coff_write_object_contents): Use DOT_RELOC instead of string.
1706 2009-06-25 Tristan Gingold <gingold@adacore.com>
1708 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1709 (bfd_mach_o_canonicalize_dynamic_symtab)
1710 (bfd_mach_o_get_synthetic_symtab): Defines.
1711 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1712 (TARGET_NAME): Use Mach-O specific functions for dynamic.
1714 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1715 for scattered relocations.
1716 (bfd_mach_o_i386_print_thread): New function.
1717 (bfd_mach_o_print_thread): Define.
1719 * mach-o.c (text_section_names_xlat): Add an entry for __const.
1720 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1721 New functions extracted from ...
1722 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
1723 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1724 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1725 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1726 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
1727 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1729 (bfd_mach_o_scan_read_dylib): Ditto.
1730 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
1732 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
1733 decode isym and flags on little endian targets. Set dysymtab field.
1734 (bfd_mach_o_scan_start_address): Adjust for enum names.
1735 (bfd_mach_o_lookup_section): Do not look for segments anymore.
1736 (bfd_mach_o_print_section): Display bfd section name.
1737 (bfd_mach_o_print_segment): Display none if no name.
1738 (bfd_mach_o_print_dysymtab): Display next index for local, external
1739 and undefined symbols.
1740 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1741 Display dylinker name. Display thread and unixthread commands content.
1742 (bfd_mach_o_print_thread): New macro.
1744 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1745 (bfd_mach_o_ppc_thread_flavour): Ditto.
1746 (bfd_mach_o_i386_thread_flavour): Ditto.
1747 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1748 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1749 BFD_MACH_O_THREAD_STATE_NONE.
1750 (bfd_mach_o_segment_command): Remove segment field.
1751 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1752 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1753 (bfd_mach_o_prebound_dylib_command): Ditto.
1754 (bfd_mach_o_dylib_command): Ditto.
1755 (bfd_mach_o_prebound_dylib_command): Remove section field.
1756 (mach_o_data_struct): Add dysymtab field.
1757 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1758 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1759 (bfd_mach_o_build_commands): Remove parameter names and attributes.
1760 (bfd_mach_o_get_dynamic_reloc_upper_bound)
1761 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1763 2009-06-25 Rafael Avila de Espindola <espindola@google.com>
1765 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1766 field of struct dirent.
1768 2009-06-23 Tristan Gingold <gingold@adacore.com>
1770 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1771 of this macro. Fix indentation.
1773 2009-06-22 Christophe Lyon <christophe.lyon@st.com>
1775 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1776 destination for defined dynamic symbols when deciding whether to
1777 insert a stub or not.
1778 (allocate_dynrelocs): Make sure functions are not marked as Thumb
1779 when actually accessed through a PLT, even when generating a
1782 2009-06-22 Tristan Gingold <gingold@adacore.com>
1784 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1787 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1789 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1790 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1792 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1794 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1796 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1798 * elflink.c (elf_link_add_object_symbols): Avoid warning
1799 from -Wjump-misses-init in gcc 4.5.0.
1801 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1803 * elf32-i386.c (elf_i386_check_relocs): Properly check local
1805 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1807 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1809 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1810 r_symndx. Report local symbol name on error.
1811 (elf_i386_check_relocs): Updated. Report local symbol name on
1813 (elf_i386_gc_sweep_hook): Updated.
1814 (elf_i386_relocate_section): Likewise.
1816 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1817 r_symndx. Report local symbol name on error.
1818 (elf64_x86_64_check_relocs): Updated. Report local symbol name
1820 (elf64_x86_64_gc_sweep_hook): Updated.
1821 (elf64_x86_64_relocate_section): Likewise.
1823 2009-06-19 Tristan Gingold <gingold@adacore.com>
1825 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1827 2009-06-19 Tristan Gingold <gingold@adacore.com>
1829 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1830 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1831 (bfd_mach_o_valid): Ditto.
1832 (bfd_mach_o_wide_p): Ditto.
1833 (bfd_mach_o_canonicalize_reloc): Ditto.
1834 (bfd_mach_o_build_commands): Ditto.
1835 (bfd_mach_o_scan_read_thread): Ditto.
1836 (bfd_mach_o_flatten_sections): Ditto.
1837 (bfd_mach_o_scan_start_address): Ditto.
1838 (bfd_mach_o_lookup_section): Ditto.
1839 (bfd_mach_o_core_fetch_environment): Ditto.
1840 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
1841 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1842 (bfd_mach_o_scan_write_symtab): Ditto.
1843 Use macros instead of hard-coded values.
1844 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1845 Use bfd_mach_o_get_data instead of direct access. Use macros
1846 instead of hard-coded values.
1847 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1848 Remove sym argument and get section from mdata.
1849 Move code into the else branch.
1850 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1851 Remove sym argument and get section from mdata. Adjust code.
1852 (bfd_mach_o_scan_read_dylib): Move assertion into the created
1853 switch (which replaces consecutive if statements).
1854 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
1855 module table, table of content, indirect symbols and external
1857 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
1859 (bfd_mach_o_scan_read_linkedit): New function.
1860 (bfd_mach_o_scan_read_str): Ditto.
1861 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1863 (bfd_mach_o_get_symtab_upper_bound): Remove check as
1864 bfd_mach_o_count_symbols never returns an error.
1865 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1866 symtab field (there might be only one symtab).
1867 (bfd_mach_o_scan_read_command): Handle reexported dylib.
1868 Handle sub frameworks, sub umbrella, sub library and sub client.
1869 Read code signature and segment split info commands.
1870 (bfd_mach_o_scan): Reindent.
1871 (bfd_mach_o_xlat_name): New type.
1872 (bfd_mach_o_print_flags): New function.
1873 (bfd_mach_o_get_name): Ditto.
1874 (bfd_mach_o_cpu_name): New variable.
1875 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1876 (bfd_mach_o_section_type_name)
1877 (bfd_mach_o_section_attribute_name)
1878 (bfd_mach_o_load_command_name): New variables.
1879 (bfd_mach_o_print_private_header): New function.
1880 (bfd_mach_o_print_section_map): New function extracted from
1881 bfd_mach_o_print_private_bfd_data.
1882 (bfd_mach_o_print_section): Ditto. Print more infos.
1883 (bfd_mach_o_print_segment): Ditto.
1884 (bfd_mach_o_print_dysymtab): Ditto.
1885 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
1886 load weak dylib, reexport dylib and id dylib.
1887 Handle code signature and segment_split info.
1888 Handle sub frameworks, sub umbrella, sub library and sub client.
1889 (bfd_mach_o_section_get_nbr_indirect): New function.
1891 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
1892 (bfd_mach_o_header_flags): New enum to define header flags.
1893 (bfd_mach_o_section_attribute): New enum to replace ...
1894 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1895 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1896 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1897 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1898 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1899 these removed macros.
1900 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1901 (bfd_mach_o_dylib_module): New type.
1902 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1904 (bfd_mach_o_dylib_table_of_content): New type.
1905 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1906 (bfd_mach_o_dylib_reference): New type.
1907 (BFD_MACH_O_REFERENCE_SIZE): New macro.
1908 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1909 modules, toc, references and indirect syms.
1910 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1911 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1912 unused). Add comment.
1913 (bfd_mach_o_dylib_command): Ditto.
1914 (bfd_mach_o_prebound_dylib_command): Ditto.
1915 (bfd_mach_o_linkedit_command): New type.
1916 (bfd_mach_o_str_command): New type.
1917 (bfd_mach_o_load_command): Add linkedit and str fields.
1918 (mach_o_data_struct): Add symtab field.
1919 (bfd_get_mach_o_data): Renamed to ...
1920 (bfd_mach_o_get_data): ... this new macro.
1921 (bfd_mach_o_scan_read_symtab_symbol,
1922 bfd_mach_o_scan_read_symtab_strtab,
1923 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1925 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1926 instead of direct access.
1928 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1930 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1931 R_PPC_PLTREL24 relocs.
1932 (ppc_elf_relocate_section): Likewise.
1934 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1936 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1937 pointer to sym hash. Update all uses.
1938 (update_plt_info): Likewise. Don't check addend here.
1940 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1942 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1943 bfd_sym_from_r_symndx.
1944 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1946 2009-06-18 Alan Modra <amodra@bigpond.net.au>
1948 * elf-bfd.h (struct sym_sec_cache): Delete.
1949 (struct sym_cache): New.
1950 (bfd_section_from_r_symndx): Delete prototype.
1951 (bfd_sym_from_r_symndx): Define prototype.
1952 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1953 (bfd_sym_from_r_symndx): ..new function.
1954 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1955 bfd_section_from_r_symndx to new struct and function.
1956 * elf32-bfin.c: Likewise.
1957 * elf32-hppa.c: Likewise.
1958 * elf32-i386.c: Likewise.
1959 * elf32-m32r.c: Likewise.
1960 * elf32-m68hc1x.c: Likewise.
1961 * elf32-m68hc1x.h: Likewise.
1962 * elf32-m68k.c: Likewise.
1963 * elf32-ppc.c: Likewise.
1964 * elf32-s390.c: Likewise.
1965 * elf32-sh.c: Likewise.
1966 * elf64-ppc.c: Likewise.
1967 * elf64-s390.c: Likewise.
1968 * elf64-x86-64.c: Likewise.
1969 * elfxx-sparc.c: Likewise.
1970 * elfxx-sparc.h: Likewise.
1972 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1974 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1975 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1977 2009-06-18 Nick Clifton <nickc@redhat.com>
1979 * elflink.c (elf_link_sort_relocs): Return early if there are no
1982 2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
1984 Merge cegcc and mingw32ce target name changes from
1987 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
1989 * config.bfd: Add arm*-*-cegcc* target.
1991 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
1993 * config.bfd: Add arm-*-mingw32ce* target.
1995 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1997 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1998 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1999 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
2000 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2002 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2004 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
2005 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
2006 * elf32-i386.c (elf_i386_check_relocs): Use it.
2007 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2009 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2011 * elf-bfd.h (elf_dyn_relocs): New.
2013 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
2014 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
2016 (elf_i386_copy_indirect_symbol): Likewise.
2017 (elf_i386_check_relocs): Likewise.
2018 (elf_i386_gc_sweep_hook): Likewise.
2019 (elf_i386_allocate_dynrelocs): Likewise.
2020 (elf_i386_readonly_dynrelocs): Likewise.
2021 (elf_i386_size_dynamic_sections): Likewise.
2023 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
2024 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
2025 with elf_dyn_relocs.
2026 (elf64_x86_64_copy_indirect_symbol): Updated.
2027 (elf64_x86_64_check_relocs): Likewise.
2028 (elf64_x86_64_gc_sweep_hook): Likewise.
2029 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2030 (elf64_x86_64_allocate_dynrelocs): Likewise.
2031 (elf64_x86_64_readonly_dynrelocs): Likewise.
2032 (elf64_x86_64_size_dynamic_sections): Likewise.
2034 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2036 * elf32-arm.c (create_got_section): Get existing .rela.got
2038 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2039 * elf32-lm32.c (create_got_section): Likewise.
2040 * elf32-m32r.c (create_got_section): Likewise.
2041 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2042 * elf32-s390.c (create_got_section): Likewise.
2043 * elf32-sh.c (create_got_section): Likewise.
2044 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2045 * elf64-s390.c (create_got_section): Likewise.
2046 * elfxx-sparc.c (create_got_section): Likewise.
2048 * elflink.c (_bfd_elf_create_got_section): Properly initialize
2051 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2053 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
2055 * elf32-i386.c (elf_i386_local_hash): Removed.
2056 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2057 (elf_i386_get_local_sym_hash): Likewise.
2059 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
2060 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2061 (elf64_x86_64_get_local_sym_hash): Likewise.
2062 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
2063 (get_local_sym_hash): Likewise.
2065 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2067 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
2068 rel_got_sec and plt_sec.
2069 (elfNN_ia64_relax_section): Updated.
2070 (elfNN_ia64_create_dynamic_sections): Likewise.
2071 (get_got): Likewise.
2072 (allocate_dynrel_entries): Likewise.
2073 (elfNN_ia64_size_dynamic_sections): Likewise.
2074 (set_got_entry): Likewise.
2075 (elfNN_ia64_choose_gp): Likewise.
2076 (elfNN_ia64_relocate_section): Likewise.
2077 (elfNN_ia64_finish_dynamic_symbol): Likewise.
2078 (elfNN_ia64_finish_dynamic_sections): Likewise.
2080 2009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
2082 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
2085 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2087 * configure.in (elf): Add elf-ifunc.lo.
2089 * configure: Regenerated.
2090 * Makefile.in: Likewise.
2092 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
2093 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
2095 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
2096 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2098 (elf_i386_link_hash_table_create): Likewise.
2099 (elf_i386_create_dynamic_sections): Likewise.
2100 (elf_i386_check_relocs): Likewise.
2101 (elf_i386_allocate_dynrelocs): Likewise.
2102 (elf_i386_size_dynamic_sections): Likewise.
2103 (elf_i386_relocate_section): Likewise.
2104 (elf_i386_finish_dynamic_symbol): Likewise.
2105 (elf_i386_finish_dynamic_sections): Likewise.
2106 (elf_i386_create_got_section): Removed.
2108 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
2109 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2111 (elf64_x86_64_compute_jump_table_size): Updated.
2112 (elf64_x86_64_link_hash_table_create): Likewise.
2113 (elf64_x86_64_create_dynamic_sections): Likewise.
2114 (elf64_x86_64_check_relocs): Likewise.
2115 (elf64_x86_64_allocate_dynrelocs): Likewise.
2116 (elf64_x86_64_size_dynamic_sections): Likewise.
2117 (elf64_x86_64_relocate_section): Likewise.
2118 (elf64_x86_64_finish_dynamic_symbol): Likewise.
2119 (elf64_x86_64_finish_dynamic_sections): Likewise.
2120 (elf64_x86_64_create_got_section): Removed.
2122 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
2123 for pointer alignment. Set up section pointers.
2124 (_bfd_elf_create_dynamic_sections): Likewise.
2125 (_bfd_elf_create_ifunc_sections): Moved to ...
2126 * elf-ifunc.c: Here. New.
2128 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
2129 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
2132 2009-06-16 Doug Kwan <dougkwan@google.com>
2134 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
2135 to bfd_signed_vma. Cast constant operands which are used in
2136 offset related expressions to bfd_signed_vma type as appropriate.
2138 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2140 * elf32-vax.c (elf_vax_plt_sym_val): New function.
2141 (elf_backend_plt_sym_val): Define.
2143 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2145 * elf32-vax.c (elf_vax_reloc_type_class): New function.
2146 (elf_backend_reloc_type_class): Define.
2148 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2150 * elf32-vax.c (elf_vax_relocate_section): For symbol references
2151 from an executable to a shared library treat R_VAX_PC32
2152 relocations as R_VAX_PLT32 ones.
2154 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2156 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
2157 symbols in GOT space calculation.
2158 (elf_vax_relocate_section): Adjust accordingly.
2160 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2162 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
2165 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2167 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
2169 (elf_vax_relocate_section): Likewise.
2171 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2173 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
2174 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2176 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2178 * elf32-i386.c (elf_i386_check_relocs): Reformat.
2179 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2181 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2183 * Makefile.am: Run "make dep-am".
2184 * Makefile.in: Regenerated.
2186 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2188 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
2189 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2191 2009-06-15 Nick Clifton <nickc@redhat.com>
2193 * po/ru.po: New Russian translation.
2194 * configure.in (ALL_LINGUAS): Add ru.
2195 * configure: Regenerate.
2197 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
2199 * elf32-i386.c: Remove duplicated comments.
2201 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
2204 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
2205 dynamic IFUNC pointer in non-shared object. Use .got.plt
2206 for IFUNC definition in PIE.
2207 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
2210 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
2211 dynamic IFUNC pointer in non-shared object. Use .got.plt
2212 for IFUNC definition in PIE.
2213 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
2216 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
2218 * elf32-i386.c (elf_i386_check_relocs): Properly report
2219 local symbol for unhandled relocation against STT_GNU_IFUNC
2221 (elf_i386_relocate_section): Likewise.
2222 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2223 (elf64_x86_64_relocate_section): Likewise.
2225 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
2228 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
2229 (elf_i386_link_hash_table): Add loc_hash_table and
2231 (elf_i386_local_hash): New.
2232 (elf_i386_local_htab_hash): Likewise.
2233 (elf_i386_local_htab_eq): Likewise.
2234 (elf_i386_get_local_sym_hash): Likewise.
2235 (elf_i386_link_hash_table_free): Likewise.
2236 (elf_i386_allocate_local_dynrelocs): Likewise.
2237 (elf_i386_finish_local_dynamic_symbol): Likewise.
2238 (bfd_elf64_bfd_link_hash_table_free): Likewise.
2239 (elf_i386_link_hash_table_create): Create loc_hash_table and
2241 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
2242 (elf_i386_size_dynamic_sections): Likewise.
2243 (elf_i386_relocate_section): Likewise.
2244 (elf_i386_finish_dynamic_sections): Likewise.
2245 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
2248 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
2249 (elf64_x86_64_link_hash_table): Add loc_hash_table and
2251 (elf64_x86_64_local_hash): New.
2252 (elf64_x86_64_local_htab_hash): Likewise.
2253 (elf64_x86_64_local_htab_eq): Likewise.
2254 (elf64_x86_64_get_local_sym_hash): Likewise.
2255 (elf64_x86_64_link_hash_table_free): Likewise.
2256 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
2257 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
2258 (bfd_elf64_bfd_link_hash_table_free): Likewise.
2259 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
2260 and loc_hash_memory.
2261 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
2263 (elf64_x86_64_size_dynamic_sections): Likewise.
2264 (elf64_x86_64_relocate_section): Likewise.
2265 (elf64_x86_64_finish_dynamic_sections): Likewise.
2266 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
2269 2009-06-10 Philip Blundell <philb@gnu.org>
2271 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
2272 elf_sec->this_hdr == NULL.
2274 2009-06-12 Tristan Gingold <gingold@adacore.com>
2276 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
2277 * bfd-in2.h: Regenerated.
2278 * libbfd.h: Regenerated.
2280 * mach-o.c (FILE_ALIGN): New macro.
2281 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
2282 (bfd_mach_o_print_symbol): Ditto.
2283 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
2284 (bfd_mach_o_get_reloc_upper_bound): New function.
2285 (bfd_mach_o_canonicalize_reloc): Ditto.
2286 (bfd_mach_o_scan_write_relocs): Ditto.
2287 (bfd_mach_o_scan_write_section_32): Remove offset argument.
2288 (bfd_mach_o_scan_write_section_64): Ditto.
2289 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
2290 written for load command. Do not compute section file offset.
2291 (bfd_mach_o_scan_write_segment_64): Ditto.
2292 (bfd_mach_o_scan_write_symtab): Compute file offset first.
2293 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
2295 (bfd_mach_o_mangle_symbols): ... this new function.
2296 (bfd_mach_o_write_contents): Be sure to have load commands built.
2297 Call bfd_mach_o_mangle_symbols.
2298 (bfd_mach_o_build_commands): Adjust for filelen field.
2299 Use FILE_ALIGN macro. Clear section file offset if section is empty.
2300 Do not set symtab file offset anymore here.
2301 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
2302 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
2303 Set reloc_count and rel_filepos section fields.
2304 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
2306 (bfd_mach_o_scan_read_section_64): Ditto.
2307 (bfd_mach_o_scan_read_section): Ditto.
2308 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
2309 bfd_mach_o_asymbol. Use unsigned int for file offset type.
2310 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
2311 Handle weak-ref symbols.
2312 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
2313 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2314 (bfd_mach_o_scan): Remove assignment to removed field.
2315 (bfd_mach_o_mkobject_init): Ditto.
2316 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
2317 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
2318 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2319 (bfd_mach_o_swap_reloc_in): Ditto.
2320 (bfd_mach_o_swap_reloc_out): Ditto.
2322 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
2323 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
2324 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
2325 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
2326 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
2327 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
2328 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
2329 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
2330 (BFD_MACH_O_N_WEAK_DEF): New macros.
2332 (bfd_mach_o_section_type): Add new enumeration values.
2333 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
2334 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
2335 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
2336 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
2338 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
2339 (BFD_MACH_O_GENERIC_RELOC_PAIR)
2340 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
2341 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
2342 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
2343 (BFD_MACH_O_RELENT_SIZE): Ditto.
2344 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
2345 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
2346 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
2347 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
2348 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
2349 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
2350 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
2351 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
2352 (bfd_mach_o_reloc_info): New struct.
2353 (bfd_mach_o_asymbol): New struct.
2354 (bfd_mach_o_symtab_command): The symbols field is now of type
2356 (bfd_mach_o_load_command): The offset and len fields are now of type
2358 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
2359 Add a filelen field. Add comments.
2360 (bfd_mach_o_backend_data): New struct.
2361 (bfd_mach_o_get_backend_data): New macro.
2362 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
2364 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2365 (bfd_mach_o_get_reloc_upper_bound): New prototype.
2366 (bfd_mach_o_canonicalize_reloc): Ditto.
2368 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
2369 duplicated macro. Now defined to _bfd_generic_is_local_label.
2370 (TARGET_NAME_BACKEND): New macro...
2371 (TARGET_NAME_BACKEND): ... used to name a new variable.
2372 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
2373 Mach-O backend data.
2375 * mach-o-i386.c (i386_howto_table): New variable.
2376 (bfd_mach_o_i386_swap_reloc_in): New function.
2377 (bfd_mach_o_i386_swap_reloc_out): Ditto.
2378 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
2379 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
2380 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
2381 (bfd_mach_o_bfd_reloc_type_lookup)
2382 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2384 2009-06-11 Eric Paris <eparis@redhat.com>
2385 Nick Clifton <nickc@redhat.com>
2387 * opncls.c (_maybe_make_executable): New function. Gives execute
2388 permission to an executable bfd that was opened for writing
2389 provided that it is a regular file. Replaces common code found in...
2390 (bfd_close): here and ...
2391 (bfd_close_all_done): here.
2393 2009-06-11 Anthony Green <green@moxielogic.com>
2395 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
2396 * bfd-in2.h: Rebuilt.
2397 * libbfd.h: Rebuilt.
2398 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
2400 (moxie_reloc_map): Ditto.
2401 Clean up copyright notice.
2403 2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
2405 * bfd-in2.h: bfd_mmap prototype.
2406 * bfdio.c (bfd_mmap): New function.
2407 * libbfd.h (bfd_iovec): Add bmmap.
2408 * cache.c (cache_bmmap): New function.
2409 (cache_iovec): Initialize bmmap member.
2410 * opencls.c (opncls_bmmap): New function.
2411 (opncls_iovec): Initialize bmmap member.
2413 2009-06-09 Tristan Gingold <gingold@adacore.com>
2415 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
2416 and stabstr_segment fields.
2417 (mach_o_be_vec, mach_o_le_vec): Removed
2418 (bfd_mach_o_version): New prototype.
2420 * mach-o.c (bfd_mach_o_version): Make this function public.
2421 (mach_o_wide_p): New function.
2422 (bfd_mach_o_wide_p): Ditto.
2423 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
2425 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
2426 Search in the list only if the name starts with a dot.
2427 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
2428 test. Check bfd_seek status.
2429 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
2430 (bfd_mach_o_scan_write_section_32): Ditto.
2431 (bfd_mach_o_scan_write_section_64): Ditto.
2432 (bfd_mach_o_scan_write_section): Removed.
2433 (bfd_mach_o_scan_write_segment): Split into ...
2434 (bfd_mach_o_scan_write_segment_32): ... this and ...
2435 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
2436 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
2437 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
2438 symbol table. Now returns a boolean.
2439 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
2440 Adjust for status type.
2441 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
2442 test. Write symbol table. Numbers the sections.
2443 (bfd_mach_o_read_header): Check bfd_seek status.
2444 Use mach_o_wide_p instead of hard-coded test.
2445 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
2446 (bfd_mach_o_scan_read_section_64): Ditto.
2447 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
2448 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
2449 handled common symbols.
2450 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
2451 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2452 (bfd_mach_o_scan_read_dylinker): Ditto.
2453 (bfd_mach_o_scan_read_dylib): Ditto.
2454 (bfd_mach_o_scan_read_thread): Ditto.
2455 (bfd_mach_o_scan_read_symtab): Ditto.
2456 Do not create a section for the stabs.
2457 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
2458 (bfd_mach_o_scan_read_segment): Ditto.
2459 (bfd_mach_o_scan_read_command): Ditto.
2460 (bfd_mach_o_scan_start_address): Ditto.
2461 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2462 (bfd_mach_o_archive_p): Check bfd_seek status.
2463 (bfd_mach_o_core_fetch_environment): Ditto.
2465 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2467 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2469 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2470 (elf_i386_link_hash_table_create): Initialize irelifunc.
2471 (elf_i386_check_relocs): Updated. Set up irelifunc for
2473 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2474 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2476 (elf_i386_relocate_section): Likewise.
2478 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2479 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2480 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
2482 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2483 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2485 (elf64_x86_64_relocate_section): Likewise.
2487 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2489 (_bfd_elf_create_ifunc_sections): This.
2491 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2493 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
2496 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2498 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2499 relocation for R_386_32 against STT_GNU_IFUNC symbol when
2500 building shared object. Check info->executable instead of
2501 !info->shared when setting non_got_ref.
2502 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2503 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2504 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2506 (elf_i386_relocate_section): Output dynamic relocation for
2507 R_386_32 against STT_GNU_IFUNC symbol to get the real
2508 function address when building shared object.
2509 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2510 relocation for STT_GNU_IFUNC symbol in shared object.
2512 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2513 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2514 symbol when building shared object. Check info->executable
2515 instead of !info->shared when setting non_got_ref.
2516 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2517 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2518 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2520 (elf64_x86_64_relocate_section): Output dynamic relocation
2521 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2522 function address when building shared object.
2523 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2524 relocation for STT_GNU_IFUNC symbol in shared object.
2526 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2528 * Makefile.am: Run "make dep-am".
2529 (BFD32_BACKENDS): Add mach-o-i386.lo.
2530 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2531 * Makefile.in: Regenerate.
2533 2009-06-06 Alan Modra <amodra@bigpond.net.au>
2535 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
2536 when looking for soft-icache stubs.
2538 2009-06-05 Tristan Gingold <gingold@adacore.com>
2540 * mach-o.h: Update copyright year.
2541 (bfd_mach_o_mach_header_magic): New enum.
2542 (bfd_mach_o_cpu_subtype): Now an enum.
2543 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2544 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2545 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2546 (bfd_mach_o_load_command): Field type_required is now a boolean.
2547 Reindent prototypes.
2548 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2549 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2550 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2551 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2552 (bfd_mach_o_get_symtab_upper_bound): Ditto.
2553 (bfd_mach_o_canonicalize_symtab): Ditto.
2554 (bfd_mach_o_get_symbol_info): Ditto.
2555 (bfd_mach_o_print_symbol): Ditto.
2556 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2557 (bfd_mach_o_make_empty_symbol): Ditto.
2558 (bfd_mach_o_write_contents): Ditto.
2560 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2561 bfd_mach_o_mkobject): Defines.
2562 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2563 Do not check with target vector but with flavour.
2564 (struct mach_o_section_name_xlat): New declaration.
2565 (dwarf_section_names_xlat): Ditto.
2566 (text_section_names_xlat): Ditto.
2567 (data_section_names_xlat): Ditto.
2568 (struct mach_o_segment_name_xlat): Ditto.
2569 (segsec_names_xlat): Ditto.
2570 (bfd_mach_o_convert_section_name_to_bfd): New function.
2571 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2572 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2573 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2574 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2575 Accept any input and output flavour. Do not share private data
2577 (bfd_mach_o_count_symbols): Add a comment.
2578 (bfd_mach_o_get_symtab_upper_bound): Make it public.
2579 (bfd_mach_o_canonicalize_symtab): Ditto.
2580 (bfd_mach_o_get_symbol_info): Ditto.
2581 (bfd_mach_o_print_symbol): Ditto.
2582 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
2583 Use constants instead of hard-coded values.
2584 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2586 (bfd_mach_o_scan_write_section_64): Ditto.
2587 (bfd_mach_o_scan_write_segment): Ditto.
2588 Do not copy sections anymore.
2589 (bfd_mach_o_write_contents): Make it public.
2590 Remove dead code. Rewrite typeflag assignment.
2591 (bfd_mach_o_build_commands): New function.
2592 (bfd_mach_o_set_section_contents): Ditto.
2593 (bfd_mach_o_make_empty_symbol): Make it public.
2594 (bfd_mach_o_read_header): Make it static.
2595 Convert to bfd_boolean.
2596 Use constants instead of hard-coded values.
2597 (bfd_mach_o_make_bfd_section): Call
2598 bfd_mach_o_convert_section_name_to_bfd to create name.
2599 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2601 (bfd_mach_o_scan_read_section_64): Ditto.
2602 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2603 a segment anymore. Use constants instead of hard-coded values.
2604 (bfd_mach_o_scan_read_command): Fix style.
2605 (bfd_mach_o_scan): Use constants instead of hard-coded values.
2606 Get rid of BFD_IO_FUNCS.
2607 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2608 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2609 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2610 (bfd_mach_o_object_p): Removed.
2611 (bfd_mach_o_gen_core_p): New function, replaces ...
2612 (bfd_mach_o_core_p): ... deleted.
2613 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2615 * mach-o-i386.c: New file.
2616 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2617 * configure.in (TDEFINES): Add mach_o_i386_vec.
2618 * configure: Regenerated.
2619 * targets.c: Add mach_o_i386_vec.
2621 * mach-o.c: Update copyright years.
2622 (BFD_IO_FUNCS): Remove (was not used).
2623 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2624 bfd_mach_o_slurp_extended_name_table,
2625 bfd_mach_o_construct_extended_name_table,
2626 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2627 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2628 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2629 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2630 bfd_mach_o_get_section_contents_in_window,
2631 bfd_mach_o_bfd_is_local_label_name,
2632 bfd_mach_o_bfd_is_target_special_symbol,
2633 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2634 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2635 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2636 bfd_mach_o_minisymbol_to_symbol,
2637 bfd_mach_o_bfd_get_relocated_section_contents,
2638 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2639 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2640 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2641 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2642 bfd_mach_o_bfd_merge_private_bfd_data,
2643 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2644 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2645 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2646 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2647 bfd_mach_o_bfd_copy_private_header_data,
2648 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2649 * mach-o-target.c: ... here.
2650 Update copyright years.
2652 2009-06-04 Alan Modra <amodra@bigpond.net.au>
2654 * dep-in.sed: Don't use \n in replacement part of s command.
2655 * Makefile.am (DEP1): LC_ALL for uniq.
2657 * Makefile.in: Regenerate.
2659 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2661 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2662 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2663 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2665 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2667 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2668 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2669 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2670 against STT_GNU_IFUNC symbols for static executables.
2671 (elf_i386_finish_dynamic_symbol): Load GOT entry with
2672 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2674 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2675 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2676 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2677 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2679 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
2681 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2682 symbols to be left unimported when linking statically.
2683 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2684 code when linking statically.
2686 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
2688 * elf32-i386.c (elf_i386_check_relocs): Increment
2689 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2690 against STT_GNU_IFUNC symbol.
2691 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2692 local STT_GNU_IFUNC definition is used.
2693 (elf_i386_relocate_section): Handle got.offset != -1 for
2694 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2697 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2698 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2699 relocations against STT_GNU_IFUNC symbol.
2700 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2701 local STT_GNU_IFUNC definition is used.
2702 (elf64_x86_64_relocate_section): Handle got.offset != -1
2703 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2704 STT_GNU_IFUNC symbol.
2706 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2709 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2710 (elf_i386_reloc_type_lookup): Likewise.
2711 (R_386_tls): Removed.
2712 (R_386_irelative): New.
2713 (R_386_vt_offset): Updated.
2714 (elf_i386_rtype_to_howto): Likewise.
2715 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2716 (elf_i386_link_hash_table_create): Initialize igotplt,
2718 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2719 (elf_i386_adjust_dynamic_symbol): Likewise.
2720 (elf_i386_allocate_dynrelocs): Likewise.
2721 (elf_i386_relocate_section): Likewise.
2722 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2724 (elf_i386_finish_dynamic_symbol): When building a static
2725 executable, use .iplt, .igot.plt and .rel.iplt sections for
2726 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
2727 locally defined STT_GNU_IFUNC symbol.
2729 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2730 (x86_64_reloc_map): Likewise.
2731 (R_X86_64_standard): Updated.
2732 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2733 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2735 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2736 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2737 (elf64_x86_64_allocate_dynrelocs): Likewise.
2738 (elf64_x86_64_relocate_section): Likewise.
2739 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2741 (elf64_x86_64_finish_dynamic_symbol): When building a static
2742 executable, use .iplt, .igot.plt and .rela.iplt sections for
2743 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
2744 for locally defined STT_GNU_IFUNC symbol.
2746 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2747 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2749 * bfd-in2.h: Regenerated.
2750 * libbfd.h: Likewise.
2752 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2754 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2755 (_bfd_elf_make_ifunc_reloc_section): Removed.
2756 (_bfd_elf_is_ifunc_symbol): Likewise.
2757 (_bfd_elf_create_static_ifunc_sections): New.
2759 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2761 (elf_link_add_object_symbols): Here.
2762 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2763 STT_GNU_IFUNC symbol.
2764 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2765 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2766 (IFUNC_INFIX): Removed.
2767 (get_ifunc_reloc_section_name): Likewise.
2768 (_bfd_elf_make_ifunc_reloc_section): Likewise.
2769 (_bfd_elf_is_ifunc_symbol): Likewise.
2770 (_bfd_elf_create_static_ifunc_sections): New.
2772 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
2774 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2775 (create_got_section): Likewise.
2776 (allocate_dynrelocs): Likewise.
2777 (readonly_dynrelocs): Likewise.
2778 (set_tls_module_base): Likewise.
2779 (dtpoff_base): Likewise.
2781 (elf_i386_link_hash_table_create): Updated.
2782 (elf_i386_create_dynamic_sections): Likewise.
2783 (elf_i386_check_relocs): Likewise.
2784 (elf_i386_size_dynamic_sections): Likewise.
2785 (elf_i386_relocate_section): Likewise.
2787 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2788 (create_got_section): Likewise.
2789 (allocate_dynrelocs): Likewise.
2790 (readonly_dynrelocs): Likewise.
2791 (set_tls_module_base): Likewise.
2792 (dtpoff_base): Likewise.
2794 (elf64_x86_64_link_hash_table_create): Updated.
2795 (elf64_x86_64_create_dynamic_sections): Likewise.
2796 (elf64_x86_64_check_relocs): Likewise.
2797 (elf64_x86_64_size_dynamic_sections): Likewise.
2798 (elf64_x86_64_relocate_section): Likewise.
2800 2009-05-28 Nick Clifton <nickc@redhat.com>
2802 * targets.c (_bfd_target_vector): Only include plugin target in
2803 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2805 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2807 * elf32-spu.c (struct call_info): New member broken_cycle.
2808 (remove_cycle): Instead of physically removing call_info structures
2809 to break call graph cycles, mark them using the broken_cycle flag.
2810 (mark_overlay_section): Respect broken_cycle flag.
2811 (unmark_overlay_section): Likewise.
2812 (collect_lib_sections): Likewise.
2813 (collect_overlays): Likewise.
2814 (sum_stack): Likewise.
2816 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2818 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2819 (mark_functions_via_relocs): Initialize callee->count to 1.
2820 (pasted_function): Likewise.
2821 (spu_elf_auto_overlay): Honor call counts when determining number
2822 of stubs required in software i-cache mode.
2824 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2826 * plugin.c (program_name): Remove.
2827 (plugin_program_name): New.
2828 (bfd_plugin_set_program_name): New.
2829 (try_load_plugin): Use plugin_program_name.
2830 * plugin.h (bfd_plugin_set_program_name): New.
2832 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2834 * aclocal.m4: Include ../config/plugins.m4.
2835 * configure.in: Use AC_PLUGINS.
2836 * configure: Regenerate.
2837 * Makefile.in: Regenerate.
2838 * doc/Makefile.in: Regenerate.
2840 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
2842 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2844 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2845 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2846 * elf32-avr.c (elf32_avr_relax_section): Likewise.
2847 * elf32-frv.c (elf32_avr_relax_section): Likewise.
2848 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2849 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2850 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2851 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2852 * reloc.c (bfd_generic_relax_section): Likewise.
2853 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2854 * vms.c (vms_bfd_relax_section): Likewise.
2856 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
2858 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2860 * elf32-i386.c (is_indirect_symbol): Renamed to ...
2861 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2863 * elf32-i386.c (allocate_dynrelocs): Updated.
2864 (elf_i386_relocate_section): Likewise.
2865 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2866 (elf64_x86_64_relocate_section): Likewise.
2868 * elf64-x86-64.c (is_indirect_symbol): Removed.
2870 2009-05-26 Nick Clifton <nickc@redhat.com>
2872 * po/id.po: Updated Indonesian translation.
2874 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
2876 * Makefile.am: Run "make dep-am".
2879 (ALL_MACHINES): Add cpu-plugin.lo.
2880 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2881 (BFD32_BACKENDS): Add plugin.lo.
2882 (BFD32_BACKENDS_CFILES): Add plugin.c.
2883 (libbfd_la_LIBADD): Add LIBDL
2884 * archures.c (bfd_architecture): Add bfd_arch_plugin.
2885 (bfd_plugin_arch): Declare.
2886 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2887 * bfd.c (bfd): Add plugin_data.
2888 * config.bfd: Handle the plugin target.
2889 * configure.in: Check for --enable-plugins.
2890 (LT_INIT): Use the dlopen option.
2891 * cpu-plugin.c: New.
2894 * targets.c (plugin_vec): Declare.
2895 (_bfd_target_vector): Add plugin_vec.
2896 * Makefile.in: Regenerate.
2897 * bfd-in2.h: Regenerate.
2898 * configure: Regenerate.
2900 2009-05-26 Alan Modra <amodra@bigpond.net.au>
2902 * dep-in.sed: Don't modify .o to .lo here. Output one filename
2903 per line with all lines having continuation backslash. Prefix
2904 first line with "A", following lines with "B".
2905 * Makefile.am (DEP): Don't use dep.sed here.
2906 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
2907 dep.sed here on dependencies, sort and uniq.
2908 * Makefile.in: Regenerate.
2910 2009-05-25 Tristan Gingold <gingold@adacore.com>
2912 * makefile.vms: Add verilog.obj to object list OBJS.
2914 2009-05-24 Alan Modra <amodra@bigpond.net.au>
2916 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
2917 for BFD_IN_MEMORY is cleared.
2918 (bfd_bwrite): Zero excess memory allocated.
2920 2009-05-22 Julian Brown <julian@codesourcery.com>
2922 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2924 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2925 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2926 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2927 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2928 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2929 (a8_erratum_fix, a8_erratum_reloc): New structs.
2930 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2931 num_a8_erratum_fixes, fix_cortex_a8 fields.
2932 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2933 (elf32_arm_add_stub): Split into two parts, creating...
2934 (elf32_arm_create_or_find_stub_sec): New function.
2935 (elf32_arm_final_link_relocate): Add forward declaration.
2936 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2937 relocations, multiple relocations per stub.
2938 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2939 (arm_size_one_stub): Use find_stub_size_and_template.
2940 (a8_reloc_compare): New.
2941 (find_thumb_glue): Add forward declaration.
2942 (cortex_a8_erratum_scan): New.
2943 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2944 (bfd_elf32_arm_set_cortex_a8_fix): New.
2945 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2946 (arm_map_one_stub): Add THUMB32_TYPE support.
2947 (a8_branch_to_stub_data): New.
2948 (make_branch_to_a8_stub): New.
2949 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2950 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2951 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2952 Cortex-A8 erratum workaround.
2953 * bfd-in2.h: Regenerate.
2955 2009-05-22 Alan Modra <amodra@bigpond.net.au>
2957 * Makefile.am: Run "make dep-am".
2958 * Makefile.in: Regenerate.
2959 * po/SRC-POTFILES.in: Regenerate.
2961 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2963 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2966 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2968 * elf-bfd.h (struct elf_backend_data
2969 <elf_backend_link_output_symbol_hook>): Return an int.
2970 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2971 symbols on deleted .opd entries.
2972 * elflink.c (elf_link_output_sym): Return without outputting sym
2973 if output_symbol_hook returns 2.
2974 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2975 Abort if we must not discard sym.
2976 (elf_link_input_bfd): Similarly, don't set finfo->indices for
2978 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2979 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2980 elf_backend_link_output_symbol_hook return type change.
2981 * elf32-arm.c (output_arch_syminfo): Likewise.
2982 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2983 (elf32_arm_output_arch_local_syms): Likewise.
2984 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2985 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2986 (bfd_score_elf_link_output_symbol_hook): Likewise.
2987 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2988 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2989 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2990 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2991 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2992 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2993 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2994 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2995 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2996 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2997 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2999 2009-05-21 Alan Modra <amodra@bigpond.net.au>
3001 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
3002 out of range .opd symbols.
3004 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
3006 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
3007 fprintf_vma directly.
3008 * peXXigen.c (pe_print_edata): Likewise.
3009 (pe_print_pdata): Likewise.
3010 (_bfd_XX_print_ce_compressed_pdata): Likewise.
3011 (_bfd_XX_print_private_bfd_data_common): Likewise.
3013 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
3015 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
3017 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
3018 Paul Brook <paul@codesourcery.com>
3020 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
3021 fix discarded sections.
3023 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3025 * elf32-spu.c (mark_overlay_section): Move .init and .fini
3026 sections into the software icache.
3028 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3030 * elf32-spu.c (build_stub): Always build "compact" sofware
3033 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3035 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
3036 (spu_elf_setup): Initialize it.
3037 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
3038 Update to new-sytle cache manager data structures.
3039 (spu_elf_build_stubs): Generate new-style cache manager data
3040 structures and symbols.
3041 (spu_elf_auto_overlay): Update size computation.
3043 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3045 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
3046 segments first amongst the program headers.
3048 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3050 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
3051 into addresses for relocation types that look at high bits. Remove
3052 special handling of relocation overflow warnings.
3054 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3056 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
3057 control flow graph between fragments of a function.
3059 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3061 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
3062 generate only a 16-byte .toe section.
3063 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
3065 2009-05-14 Alan Modra <amodra@bigpond.net.au>
3067 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
3068 (spu_elf_place_overlay_data): ..here. New function.
3069 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
3071 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
3073 * elf32-arm.c: Move sysdep.h to start of file.
3075 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
3077 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
3079 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
3080 __icache_tag_array and __icache_tag_array_size.
3082 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
3084 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
3086 (bfinfdpic_link_omit_section_dynsym): Likewise.
3087 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
3089 2009-05-05 Paul Brook <paul@codesourcery.com>
3091 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
3092 * bfd-in2.h: Regenerate.
3093 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
3094 (_arm_elf_section_data): Add text and exidx fields.
3095 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
3096 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
3097 copy_exidx_entry): New functions.
3098 (elf32_arm_write_section): Fixup .ARM.exidx contents.
3100 2009-05-05 Christophe lyon <christophe.lyon@st.com>
3102 * elf32-arm.c (DEF_STUBS): New helper define.
3103 (DEF_STUB): Likewise.
3104 (stub_def): New type.
3105 (stub_definitions): New array, containing stub template pointers
3107 (arm_size_one_stub): Make use of stub_definitions.
3109 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
3111 * elflink.c (find_version_for_sym): Remove from here, ...
3112 * linker.c (bfd_find_version_for_sym): ... rename, replace
3113 here, make public and update all callers.
3114 * bfd-in2.h: Regenerate.
3116 2009-04-30 Nick Clifton <nickc@redhat.com>
3118 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
3120 (struct elf_obj_data): Add has_ifunc_symbols boolean.
3121 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
3122 into a STT_GNU_IFUNC symbol type.
3123 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
3125 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
3126 the binary contains ifunc symbols.
3127 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
3128 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
3129 * elf32-i386.c (is_indirect_function): New function.
3130 (elf_i386_check_relocs): Create an ifunc output section.
3131 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
3132 section if necessary.
3133 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
3135 (elf_i386_add_symbol_hook): New function. Set the
3136 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
3137 symbol is encountered.
3138 (elf_backend_post_process_headers): Define.
3139 (elf_backend_add_symbol_hook): Define.
3140 (elf_i386_post_process_headers): Rename to
3141 elf_i388_fbsd_post_process_headers.
3142 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
3143 (is_indirect_function): New function.
3144 (elf64_x86_64_check_relocs): Create an ifunc output section.
3145 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
3146 section if necessary.
3147 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
3148 symbol if necessary.
3149 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
3150 elf_obj_data structure if an ifunc symbol is encountered.
3151 (elf_backend_post_process_headers): Define.
3152 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
3153 if we have ifunc symbols to handle.
3154 (get_ifunc_reloc_section_name): New function. Computes the name
3155 for an ifunc section.
3156 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
3157 section to hold ifunc relocs.
3158 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
3159 (bfd_print_symbol_vandf): Handle ifunc symbols.
3160 (bfd_decode_symclass): Likewise.
3161 * bfd-in2.h: Regenerate.
3163 2009-04-30 Joseph Myers <joseph@codesourcery.com>
3165 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
3166 MOVW and MOVT relocations in a shared library link.
3168 2009-04-27 Anthony Green <green@moxielogic.com>
3170 * verilog.c: New file.
3171 * Makefile.am (BFD32_LIBS): Add verilog.c.
3172 (BFD32_LIBS_CFILES): Add verilog.c.
3173 (verilog.lo): New build rule.
3174 * Makefile.in: Rebuilt.
3175 * targets.c: Add verilog support.
3176 * bfd.c (tdata union): Add Verilog private data field.
3177 * bfd-in2.h: Regenerate.
3179 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
3181 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
3184 2009-04-23 Matthias Klose <doko@ubuntu.com>
3186 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
3188 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
3191 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
3192 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3193 (elf32_arm_size_stubs): Likewise.
3194 (record_thumb_to_arm_glue): Deleted unused function.
3195 (bfd_elf32_arm_process_before_allocation): No longer handle
3196 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
3197 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
3198 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3200 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
3202 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
3203 (elf32_arm_write_section): Declare early.
3204 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
3205 (arm_allocate_glue_section_space): Exclude empty sections.
3206 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
3207 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
3209 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
3210 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
3211 (elf32_arm_size_dynamic_sections): Allocate interworking
3213 (bfd_elf32_bfd_final_link): Define.
3215 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
3217 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
3219 * coffcode.h (coff_compute_section_file_positions): Clear
3220 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
3222 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
3223 force_minimum_alignment.
3225 * libcoff.h: Regenerated.
3227 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
3228 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
3230 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
3231 nor target_subsystem.
3233 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
3234 force_minimum_alignment nor target_subsystem.
3236 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
3238 * coff-x86_64.c (PEI_HEADERS): Protect includes.
3239 (bfd_pe_print_pdata): Remove #ifdef PE variation.
3240 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
3241 include in coff-x86_64.c of headers.
3242 (PDATA_ROW_SIZE): New define.
3243 (pex_regs[]): New static array.
3244 (pex64_get_runtime_function): New static function.
3245 (pex64_get_unwind_info): Likewise.
3246 (pex64_get_scope_entry): Likewise.
3247 (pex64_xdata_print_uwd_codes): Likewise.
3248 (pex64_get_section_by_rva): Likewise.
3249 (pex64_dump_xdata): Likewise.
3250 (pex64_bfd_print_pdata): Likewise.
3251 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
3252 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
3253 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
3255 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
3256 Alan Modra <amodra@bigpond.net.au>
3257 Dave Korn <dave.korn.cygwin@gmail.com>
3259 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
3260 long names and non-NUL-terminated strings.
3262 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3264 * bfd-in2.h: Regenerated.
3266 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3268 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
3269 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
3271 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3274 * coffcode.h (bfd_pei_p): New.
3276 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
3277 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3278 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
3279 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
3280 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
3281 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
3283 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
3284 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3285 bfd_efi_rtdrv_x86_64_vec,
3286 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
3287 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
3288 * targets.c: Likewise.
3290 * configure: Regenerated.
3291 * libcoff.h: Likewise.
3292 * Makefile.in: Likewise.
3294 * efi-app-ia32.c: Removed.
3295 * efi-app-x86_64.c: Likewise.
3296 * efi-bsdrv-ia32.c: Likewise.
3297 * efi-bsdrv-ia64.c: Likewise.
3298 * efi-bsdrv-x86_64.c: Likewise.
3299 * efi-rtdrv-ia32.c: Likewise.
3300 * efi-rtdrv-ia64.c: Likewise.
3301 * efi-rtdrv-x86_64.c: Likewise.
3302 * efi-rtdrv-ia32.c: Likewise.
3304 * efi-app-ia64.c: Moved to ...
3306 (TARGET_SYM): Set to bfd_pei_ia64_vec.
3307 (TARGET_NAME): Set to pei-ia64.
3309 * libpei.h (bfd_target_pei_p): Removed.
3310 (bfd_target_pei_arch): Likewise.
3311 (bfd_target_efi_app_p): Likewise.
3312 (bfd_target_efi_app_arch): Likewise.
3313 (bfd_target_efi_bsdrv_p): Likewise.
3314 (bfd_target_efi_bsdrv_arch): Likewise.
3315 (bfd_target_efi_rtdrv_p): Likewise.
3316 (bfd_target_efi_rtdrv_arch): Likewise.
3317 (bfd_pe_executable_p): Likewise.
3319 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
3320 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
3321 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
3322 and efi-rtdrv-ia32.c.
3323 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
3324 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
3325 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
3326 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
3327 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
3328 efi-rtdrv-x86_64.c. Add pei-ia64.c.
3329 (efi-app-ia64.lo): Removed.
3330 (efi-bsdrv-ia32.lo): Likewise.
3331 (efi-rtdrv-ia32.lo): Likewise.
3332 (efi-app-ia64.lo): Likewise.
3333 (efi-bsdrv-ia64.lo): Likewise.
3334 (efi-rtdrv-ia64.lo): Likewise.
3335 (efi-app-x86_64.lo): Likewise.
3336 (efi-bsdrv-x86_64.lo): Likewise.
3337 (efi-rtdrv-x86_64.lo): Likewise.
3340 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
3342 (arch_type): Removed.
3343 (pe_arch): Likewise.
3344 (pe_bfd_object_p): Just return coff_object_p.
3346 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
3347 bfd_pe_executable_p with bfd_pei_p.
3349 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
3351 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
3352 PLT entries to an undefined symbol when generating a shared
3355 2009-04-17 Nick Clifton <nickc@redhat.com>
3358 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
3360 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
3362 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
3363 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
3364 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
3365 * binary.c (binary_bfd_define_common_symbol): Likewise.
3366 * bout.c (b_out_bfd_define_common_symbol): Likewise.
3367 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3368 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3369 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
3370 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
3371 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
3372 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
3373 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
3374 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
3375 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
3376 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
3377 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
3378 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
3379 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
3380 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
3381 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
3382 * som.c (som_bfd_define_common_symbol): Likewise.
3383 * srec.c (srec_bfd_define_common_symbol): Likewise.
3384 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
3385 * versados.c (versados_bfd_define_common_symbol): Likewise.
3386 * vms.c (vms_bfd_define_common_symbol): Likewise.
3387 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
3388 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
3389 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
3390 (pmac_xcoff_vec): Likewise.
3391 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3392 (aix5coff64_vec): Likewise.
3393 * linker.c (bfd_generic_define_common_symbol): New function.
3394 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
3395 (_bfd_define_common_symbol): New field.
3396 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
3397 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
3398 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
3400 * bfd-in2.h: Regenerate.
3401 * libbfd.h: Likewise.
3402 * libcoff.h: Likewise.
3404 2009-04-15 Anthony Green <green@moxielogic.com>
3406 * targets.c: Add moxie support.
3407 * Makefile.am: Ditto.
3408 * Makefile.in: Rebuilt.
3409 * cpu-moxie.c, elf32-moxie.c: New files.
3410 * archures.c: Add moxie support.
3411 * configure.in: Add moxie support.
3412 * configure: Rebuilt.
3413 * config.bfd, archures.c: Add moxie support.
3414 * bfd-in2.h: Rebuilt.
3416 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
3418 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
3419 branch to an undef weak symbol into a jump to next instruction if
3420 a PLT entry will be created.
3422 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
3424 * coffgen.c (make_a_section_from_file): Set the backend long
3425 section names enable if long section names found on input.
3426 * coffcode.h: Extend long section names documentation to match.
3428 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
3430 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
3433 2009-04-07 DJ Delorie <dj@redhat.com>
3435 * archures.c: Add bfd_mach_mep_c5.
3436 * bfd-in2.h: Likewise.
3437 * cpu-mep.c: Add bfd_c5_arch.
3438 * elf32-mep.c: Support it.
3440 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
3442 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
3443 info->callbacks->einfo.
3444 * linker.c (_bfd_generic_section_already_linked): Likewise.
3446 2009-04-06 DJ Delorie <dj@redhat.com>
3448 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
3450 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
3452 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
3453 _bfd_pex64_print_pdata only if PE is defined.
3455 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
3456 (_bfd_pex64_print_pdata): This.
3458 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
3459 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
3462 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
3464 * coff-x86_64.c (bfd_pe_print_pdata): Define as
3465 _bfd_pep_print_x64_pdata.
3466 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3467 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
3469 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3471 * elf32-xtensa.c (relax_property_section): Always set r_offset
3474 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
3476 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3477 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3479 (elf32_arm_stub_type): New enum values for the two new stubs.
3480 (arm_type_of_stub): Make use of the two new stubs.
3481 (arm_size_one_stub): Handle the two new stubs.
3483 2009-04-01 Matt Thomas <matt@netbsd.org>
3485 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3486 hidden symbols into the GOT or PLT.GOT.
3487 (elf_vax_relocate_section): Do not emit a PCREL reloc
3488 into a shared object if it is against a hidden symbol.
3490 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3492 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3493 and know_contains_shared_object_p.
3494 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3495 Cache the result in the archive_info table.
3496 (xcoff_auto_export_p): Add an "info" parameter and update the
3497 call to xcoff_archive_contains_shared_object_p.
3498 (xcoff_mark_auto_exports): Update accordingly.
3499 (xcoff_post_gc_symbol): Likewise.
3501 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3503 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3506 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3508 * coff-rs6000.c (member_layout): New structure.
3509 (archive_iterator): Likewise.
3510 (member_layout_init): New function.
3511 (archive_iterator_begin): Likewise.
3512 (archive_iterator_next): Likewise.
3513 (xcoff_write_armap_old): Use the new iterator functions.
3514 (do_shared_object_padding): Delete.
3515 (xcoff_write_armap_big): Use the new iterator functions. Simplify
3516 handling of arch_info.
3517 (xcoff_write_archive_contents_old): Allocate arelt_data in the
3518 first loop rather than the second. Allocate a member header if
3519 there isn't one, then work out the stat information and length
3520 in the first loop too. Use the new iterators for the second loop.
3521 (xcoff_write_archive_contents_big): Likewise.
3523 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3525 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
3526 (bfd_xcoff_set_archive_import_path): Likewise.
3527 * bfd-in2.h: Regenerate.
3528 * xcofflink.c: Include libiberty.h.
3529 (xcoff_archive_info): New structure.
3530 (xcoff_archive_info_hash): New function.
3531 (xcoff_archive_info_eq): Likewise.
3532 (xcoff_get_archive_info): Likewise.
3533 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3534 (bfd_xcoff_split_import_path): New function.
3535 (bfd_xcoff_set_archive_import_path): Likewise.
3536 (xcoff_set_import_path): Move earlier in file.
3537 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3538 object to the the directory part of the bfd's filename. Get the
3539 import path and filename of an archive object from the archive's
3540 xcoff_tdata, initializing it if necessary. Update use of
3542 (bfd_link_input_bfd): Update use of import_file_id.
3543 (xcoff_write_global_symbol): Likewise.
3545 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3547 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3549 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3551 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
3552 a .loader section for relocatable links.
3553 (xcoff_need_ldrel_p): New function.
3554 (xcoff_mark): Use it.
3555 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3557 (xcoff_build_ldsym): New function, split out from...
3558 (xcoff_build_ldsyms): ...here. Rename to...
3559 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
3560 call xcoff_build_ldsym, if there's a loader section.
3561 (xcoff_build_loader_section): New function, extracted verbatim from...
3562 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
3563 there's a loader section. Only add an __rtinit loader symbol
3564 if there's a loader section. Update after above name change.
3565 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
3566 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3567 and xcoff_create_ldrel.
3568 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
3569 (xcoff_reloc_link_order): Likewise, but only call it if there's
3570 a loader section. Use xcoff_symbol_section.
3571 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3572 if there's a loader section.
3574 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
3576 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3578 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
3580 * elf32-arm.c (group_sections): Rewrite loops for better
3583 2009-03-30 DJ Delorie <dj@redhat.com>
3585 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
3586 relocs when doing a relocatable link.
3588 2009-03-28 Mark Mitchell <mark@codesourcery.com>
3590 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3591 "ERROR:", in error messages.
3592 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3593 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3594 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3595 (elf32_arm_merge_eabi_attributes): Likewise.
3596 (elf32_arm_merge_private_bfd_data): Likewise.
3598 2009-03-27 Nick Clifton <nickc@redhat.com>
3600 * section.c (bfd_get_section_contents): Detect and handle the case
3601 where a section has the SEC_IN_MEMORY flag set but no actual
3604 2009-03-26 Alan Modra <amodra@bigpond.net.au>
3607 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3608 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
3609 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3610 if we don't find matching PT_LOAD when copying.
3612 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3614 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3615 the reloc descriptions.
3617 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
3619 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3620 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3621 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3623 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
3625 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3626 (bfd_i386_arch_intel_syntax): Likewise.
3627 (i8086_arch): Likewise.
3628 (bfd_x86_64_arch): Likewise.
3630 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
3632 * elf32-cris.c (cris_elf_relocate_section): <case
3633 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3634 symbols for non-allocated sections. Don't check whether to
3635 generate R_CRIS_DTPMOD for non-allocated sections.
3636 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3637 handle relocation GC:ing if applied to non-allocated section.
3638 (cris_elf_check_relocs): Similar.
3640 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3641 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3642 when emitting a known TP offset in the GOT.
3644 2009-03-23 Alan Modra <amodra@bigpond.net.au>
3646 * elf64-ppc.c (synthetic_opd): Delete.
3647 (compare_symbols): Look for .opd name rather than section match.
3648 (ppc64_elf_get_synthetic_symtab): Likewise.
3650 2009-03-21 Alan Modra <amodra@bigpond.net.au>
3652 * elf32-ppc.c (is_pic_glink_stub): Delete.
3653 (is_nonpic_glink_stub): New function.
3654 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3656 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3658 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3659 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3661 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
3662 macros for visibilty and locality checks.
3663 (elf_s390_adjust_dynamic_symbol): Likewise.
3664 (allocate_dynrelocs): Likewise.
3665 (elf_s390_relocate_section): Likewise.
3666 (elf_s390_finish_dynamic_symbol): Likewise.
3667 * elf64-s390.c (elf_s390_check_relocs): Likewise.
3668 (elf_s390_adjust_dynamic_symbol): Likewise.
3669 (allocate_dynrelocs): Likewise.
3670 (elf_s390_relocate_section): Likewise.
3671 (elf_s390_finish_dynamic_symbol): Likewise.
3673 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
3675 * bfd-in2.h: Regenerated.
3676 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3677 for debugging sections and map memory read/write dependent on
3679 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3680 without memory read flags set.
3681 * section.c: Add SEC_COFF_NOREAD to section flags.
3683 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
3685 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3688 2009-03-19 Alan Modra <amodra@bigpond.net.au>
3690 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3691 "no overlays" return. If there are overlays, create overlay
3692 manager entry symbols here, so that..
3693 (spu_elf_build_stubs): ..we don't need to set them up here.
3694 Simplify entry symbol tests.
3695 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3697 2009-03-18 Mark Kettenis <kettenis@gnu.org>
3699 * elf.c (elfcore_grok_openbsd_procinfo)
3700 (elfcore_grok_openbsd_note): New functions.
3701 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3703 2009-03-18 Alan Modra <amodra@bigpond.net.au>
3705 * vms-hdr.c: Don't include alloca.h.
3706 * elf32-m68hc1x.c: Include alloca-conf.h.
3708 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
3710 * Makefile.am: Run "make dep-am".
3711 * Makefile.in: Regenerate.
3713 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
3715 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3717 2009-03-17 Alan Modra <amodra@bigpond.net.au>
3719 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3721 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3722 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3723 ovly_return fields with ovly_entry[2]. Adjust all users.
3724 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3726 (spu_elf_build_stubs): Likewise.
3727 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
3728 ovly_flavour changes. Update all callers.
3729 (ovl_stub_size_log2): New function.
3730 (build_stub): Handle compact icache stubs. Use different manager
3731 entry point for stubs in non-icache area.
3732 (spu_elf_size_stubs): Don't allocate space for indirect branch
3734 (spu_elf_build_stubs): And don't built them.
3736 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
3738 * dwarf2.c (read_section): Always use rawsize, if available.
3740 2009-03-16 Alan Modra <amodra@bigpond.net.au>
3742 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3743 of rawsize and size for buffer.
3745 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
3747 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3748 parameter just because fixed sections fit into local store.
3749 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
3750 generating overlays if fixed sections plus reserved stack
3751 and heap space fit into local store.
3753 2009-03-15 Alan Modra <amodra@bigpond.net.au>
3755 * elf32-spu.c (build_stub): Correct icache set_id.
3756 (spu_elf_relocate_section): Likewise.
3758 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3760 * xcofflink.c (xcoff_link_check_archive_element): Only free the
3761 symbol table if it was created by the current call.
3763 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3765 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3766 class XMC_DS rather than XMC_UA.
3768 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3770 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3771 bfd_boolean export_defineds parameter with an unsigned int
3772 auto_export_flags parameter.
3773 * bfd-in2.h: Regenerate.
3774 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3775 split out from xcoff_build_ldsyms.
3776 (xcoff_covered_by_expall_p): New function.
3777 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3778 but with extra code to handle -bexpfull and -bexpall.
3779 (xcoff_mark_auto_exports): New function.
3780 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3781 a function should be automatically exported.
3782 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3783 parameter with an auto_export_flags parameter. Update ldinfo
3784 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
3787 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3789 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3790 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3791 init and fini functions. Do garbage collection for objects
3792 without an entry point too.
3794 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3796 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3797 check whether a symbol has csect information.
3798 (coff_print_aux): Likewise.
3799 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3800 information for C_AIX_WEAKEXT too.
3801 (_bfd_xcoff_swap_aux_out): Likewise.
3802 (xcoff_reloc_type_br): Handle defweak symbols too.
3803 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3804 information for C_AIX_WEAKEXT too.
3805 (_bfd_xcoff64_swap_aux_out): Likewise.
3806 (xcoff64_reloc_type_br): Handle defweak symbols too.
3807 * coffgen.c (coff_print_symbol): Handle auxillary function
3808 information for C_AIX_WEAKEXT too.
3809 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3810 instead of BSF_GLOBAL if the L_WEAK flag is set.
3811 (xcoff_dynamic_definition_p): New function.
3812 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3813 defines h. Don't change h if ldsym isn't the definition. Otherwise,
3814 always take the symbol class from the ldsym. Use weak bfd symbol
3815 types for weak ldsyms.
3816 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3817 Fix the check for whether a definition is from a shared object.
3818 Allow redefinitions of weak symbols.
3819 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3820 (xcoff_keep_symbol_p): Likewise.
3821 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3822 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3823 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3824 but mark them as L_WEAK.
3825 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3826 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3828 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3830 * xcofflink.c (xcoff_mark): When walking the relocations,
3831 only mark the target symbol or the target section, not both.
3832 (xcoff_final_definition_p): New function.
3833 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3834 symbol is a valid definition of the associated output symbol.
3835 Use XCOFF_ALLOCATED to stop the same hash table entry having
3837 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3839 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3841 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3843 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3846 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3848 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3849 * libcoff.h: Regenerate.
3850 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3851 line-number counts in the bfd's lineno_counts field.
3852 Don't keep per-csect line-number counts.
3853 (xcoff_sweep): Don't update per-csect line-number counts.
3854 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3855 entries in each output section.
3856 (xcoff_link_input_bfd): Get the number of line numbers from
3857 the bfd's lineno_counts field, rather than recalculating it
3858 from scratch. Fix the range check when updating C_BINCL and
3860 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3861 here. Don't expect csects to have line-number counts.
3863 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3865 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3866 * libcoff.h: Regenerate.
3867 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3868 "skip" logic from xcoff_link_input_bfd.
3869 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3870 objects in a dynamic link, rather than checking whether csectpp
3871 is null. Always allocate debug_index for other objects,
3872 and always go through the loop. Update the type of debug_index
3873 after the change above. Read the auxillary csect information
3874 and use xcoff_keep_symbol_p to decide whether a symbol should
3875 be kept. Set its debug_index to -2 if not.
3876 (xcoff_link_input_bfd): Update the type of debug_index after
3877 the change above and always expect it to be nonnull. Use it to
3878 test whether a symbol should be stripped, rather than making the
3879 decision here. Postpone all symbol creation to the second pass.
3881 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3883 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3884 creating a descriptor.
3885 (xcoff_sweep): Don't mark toc_section unless it's needed.
3886 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3887 when marking every bfd.
3888 (xcoff_link_input_bfd): Skip all TOC anchors.
3889 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3890 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3891 to -1; call xcoff_find_tc0 instead.
3893 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3895 * libcoff-in.h (xcoff_section_tdata): Update commentary.
3896 * libcoff.h: Regenerate.
3897 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3898 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3899 the previous symbol's csect. Treat last_symndx as an inclusive value
3900 and simplify its handling.
3901 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
3902 symbols with the right csect. Don't mark rsec when processing
3903 relocations against undefined or absolute sections.
3904 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3905 of bfd_und_section_ptr.
3906 (xcoff_link_input_bfd): Likewise.
3908 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3910 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3911 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3912 flag is set. Assert that all undefined symbols are either
3913 imported or defined by a dynamic object.
3914 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3915 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3916 handling to all relocations. Only set XCOFF_CALLED for function
3918 (xcoff_find_function): New function, split out from...
3919 (bfd_xcoff_export_symbol) ...here.
3920 (xcoff_set_import_path): New function, split out from...
3921 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
3922 meaning of XCOFF_CALLED.
3923 (xcoff_mark_symbol): If we mark an undefined and unimported
3924 symbol, find some way of defining it. If the symbol is a function
3925 descriptor, fill in its definition automatically. If the symbol
3926 is a function, mark its descriptor and allocate room for global
3927 linkage code. Otherwise mark the symbol as implicitly imported.
3928 Move the code for creating function descriptors from...
3929 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
3930 check for symbols that were implicitly defined.
3931 (xcoff_mark): Don't count any dynamic relocations against
3933 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3934 in the xcoff link info.
3935 (xcoff_link_input_bfd): Remove handling of undefined and
3938 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3940 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3941 if the target is absolute. Fix comment typo.
3942 (xcoff_ppc_relocate_section): Remove FIXME.
3943 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3944 if the target is absolute.
3946 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3948 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3949 R_POS and R_NEG relocations against absolute symbols to the
3952 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3954 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3955 to 2 for bfd_mach_ppc_620.
3957 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3959 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3960 * configure.in: Likewise.
3961 * configure: Regenerate.
3963 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
3966 * elf.c (assign_section_numbers): Generate symbol table if there
3967 is any relocation in output.
3968 (_bfd_elf_compute_section_file_positions): Likewise.
3970 2009-03-13 Nick Clifton <nickc@redhat.com>
3973 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3974 * elflink.c (elf_link_read_relocs_from_section): Use
3975 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
3976 relocs but no symbol table.
3977 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3979 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
3982 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3983 to check ___tls_get_addr.
3985 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3986 strncmp to check __tls_get_addr.
3988 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
3990 * dwarf2.c (read_section): Always check the offset, even when the
3991 section has been read before.
3993 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
3995 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3998 2009-03-11 Chris Demetriou <cgd@google.com>
4000 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
4001 * bfd-in2.h: Regenerate.
4002 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
4003 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
4005 (bsd_write_armap): Likewise.
4006 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
4007 flag is set, do nothing.
4008 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
4011 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
4013 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
4014 used to update stack pointer.
4016 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4019 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
4020 for unknown symbols in absolute section.
4022 2009-03-06 Nick Clifton <nickc@redhat.com>
4024 * po/es.po: Updated Spanish translation.
4026 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
4028 * elf32-arm.c (group_sections): Take next section size into
4029 account before accepting to group it.
4031 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
4033 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
4035 (elf32_arm_final_link_relocate): Likewise.
4037 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
4040 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
4042 2009-03-04 Alan Modra <amodra@bigpond.net.au>
4044 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
4045 * section.c (struct bfd_section): Add has_tls_get_addr_call.
4046 (BFD_FAKE_SECTION): Init new flag.
4047 * ecoff.c (bfd_debug_section): Likewise.
4048 * bfd-in2.h: Regenerate.
4049 * libbfd.h: Regenerate.
4050 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
4051 (ppc_elf_reloc_type_lookup): Handle new relocs.
4052 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
4053 without marker relocs.
4054 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4055 if section has no old-style calls.
4056 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
4057 Don't try to optimize new-style __tls_get_addr call when handling
4058 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4060 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
4061 (ppc64_elf_reloc_type_lookup): Handle new relocs.
4062 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
4063 without marker relocs.
4064 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4065 if section has no old-style calls. Set toc_ref for new relocs as
4067 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
4068 Don't try to optimize new-style __tls_get_addr call when handling
4069 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4072 2009-03-04 Alan Modra <amodra@bigpond.net.au>
4075 * configure.in: Test for ld --as-needed support. Link shared
4076 libbfd against libm.
4077 * configure: Regenerate.
4079 2009-03-03 Alan Modra <amodra@bigpond.net.au>
4081 * Makefile.am: Run "make dep-am".
4082 * Makefile.in: Regenerate.
4084 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
4086 * elf32-score7.c: New file.
4087 * elf32-score.h: New file.
4088 * elf32-score.c: Add code to support score 7. Set score7 as the
4090 * cpu-score.c: Add score7 architecure.
4091 (compatibile): New function.
4092 * Makefile.am: Add rules for building elf32-score7 object.
4093 * Makefile.in: Regenerate.
4094 * configure.in: Add elf32-score7 object to score vectors.
4095 * configure: Regenerate.
4096 * reloc.c: Add score7 relocs.
4097 * archures.c: Add score3 and score7 machine numbers.
4098 * bfd-in2.h: Regenerate.
4099 * libbfd.h: Regenerate.
4101 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4103 * configure: Regenerate.
4105 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4107 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
4108 (elf32_hppa_check_relocs): Use it.
4110 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
4112 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4113 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4114 (elf_hppa_is_dynamic_loader_symbol): Likewise.
4115 (elf_hppa_record_segment_addrs): Likewise.
4116 (elf_hppa_final_link): Likewise.
4117 (elf_hppa_relocate_insn): Likewise.
4118 (elf_hppa_final_link_relocate): Likewise.
4119 (elf64_hppa_relocate_section): Likewise.
4120 * elf64-hppa.c: Insert above.
4122 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4124 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
4125 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
4126 (elf_hppa_relocate_section): Likewise.
4127 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
4128 from struct elf_link_hash_entry. Add count field.
4129 (struct elf64_hppa_dyn_hash_table): Delete.
4130 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
4131 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
4132 (hppa_elf_hash_entry, eh_name): Define.
4133 (elf64_hppa_new_dyn_hash_entry): Delete.
4134 (elf64_hppa_dyn_hash_lookup): Delete.
4135 (elf64_hppa_dyn_hash_traverse): Delete.
4136 (get_dyn_name): Delete.
4137 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
4138 of struct elf64_hppa_dyn_hash_entry *.
4139 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
4140 allocate_global_data_plt, allocate_global_data_stub,
4141 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
4143 (hppa64_link_hash_newfunc): New.
4144 (elf64_hppa_hash_table_create): Rework.
4145 (count_dyn_reloc): Likewise.
4146 (hppa64_elf_local_refcounts): New.
4147 (elf64_hppa_check_relocs): Rework using standard technique for recording
4148 local DLT, PLT and OPD reference counts.
4149 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
4150 elf_link_hash_entry *.
4151 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
4152 allocate_global_data_plt, allocate_global_data_stub,
4153 allocate_global_data_opd, allocate_dynrel_entries,
4154 elf64_hppa_adjust_dynamic_symbol,
4155 elf64_hppa_mark_milli_and_exported_functions): Likewise.
4156 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
4157 Use hppa_link_hash_table. Rework.
4158 (elf64_hppa_link_output_symbol_hook): Rework.
4159 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
4160 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
4161 elf64_hppa_finish_dynamic_sections): Likewise.
4163 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
4165 * elf32-arm.c (stub_reloc_type): Removed.
4166 (insn_sequence): Renamed reloc_type field to r_type.
4167 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
4168 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
4169 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
4170 (elf32_arm_stub_type): Add new enum entries for the new stubs.
4171 (arm_stub_is_thumb): Catch new stubs.
4172 (arm_type_of_stub): Handle new stubs.
4173 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
4174 (bfd_elf32_arm_process_before_allocation): Remove useless
4177 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
4179 * elf.c (elf_find_function): Use is_function_type to check
4182 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
4184 * xtensa-modules.c: Revert to previous version 1.11 due
4185 to inadvertant commit.
4187 2009-02-24 Sterling Augustine <sterling@tensilica.com>
4189 * elf32-xtensa.c (text_action_add): Separate test for action
4190 type. Break if saved action is ta_widen_insn at same offset.
4192 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4194 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
4195 to elf32_arm_stub_long_branch_any_arm_pic.
4196 (elf32_arm_stub_long_branch_any_thumb_pic): New.
4197 (enum elf32_arm_stub_type, arm_type_of_stub)
4198 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
4201 2009-02-24 Joseph Myers <joseph@codesourcery.com>
4203 * elf32-arm.c (PREV_SEC): Update comment.
4204 (group_sections): Rename argument to stubs_always_after_branch.
4205 Reverse the list and place stubs at the end of input sections.
4207 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
4209 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
4211 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
4213 (arm_size_one_stub): Remove unnecessary break.
4214 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
4216 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
4218 * elf32-arm.c (stub_insn_type): New type.
4219 (stub_reloc_type): Likewise.
4220 (insn_sequence): Likewise.
4221 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
4222 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
4223 (elf32_arm_stub_long_branch_thumb_only): Likewise.
4224 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4225 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
4226 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
4227 (elf32_arm_stub_hash_entry): Add new helper fields.
4228 (stub_hash_newfunc): Initialize these new fields.
4229 (arm_build_one_stub): Encode Arm and Thumb instructions separately
4230 to take endianness into account.
4231 (arm_size_one_stub): Compute size of stubs using insn_sequence.
4232 (arm_map_one_stub): Code is now more generic, thanks to
4235 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
4237 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
4239 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4240 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
4241 BLX is not available. Fix typo in warning message. Add comments
4242 and improve formatting.
4243 (arm_build_one_stub): Adjust to new
4244 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
4245 (arm_map_one_stub): Likewise.
4247 2009-02-23 Tristan Gingold <gingold@adacore.com>
4248 Eric Botcazou <ebotcazou@adacore.com>
4249 Douglas B Rupp <rupp@gnat.com>
4251 * vms.h: Update copyright year, fix comments, reorder declarations.
4252 (_bfd_save_vms_section): Remove the prototype.
4253 (EGPS_S_V_NO_SHIFT): New constant.
4254 (bfd_vms_set_section_flags): New prototype.
4255 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
4257 (EGSY_S_W_FLAGS): Ditto.
4258 (EGSY_S_V_QUAD_VAL): Ditto.
4259 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
4260 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
4261 EGST_S_B_NAMLNG): Ditto.
4262 (ESRF_S_B_NAMLNG): Ditto.
4263 (ETIR_S_C_HEADER_SIZE): Ditto.
4264 (EGPS_S_V_ALLOC_64BIT): Ditto.
4265 (DST_S_C_EPILOG): Ditto.
4266 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
4267 (DST_S_C_SRC_INCRLNUM_B): Ditto.
4268 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
4269 (DST_S_L_PCLINE_UNSLONG): Ditto.
4270 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
4271 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
4272 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
4273 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
4274 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
4275 (DST_S_B_SRC_UNSBYTE): Ditto.
4276 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
4278 (vms_section, vms_reloc): Remove types.
4279 (hdr_struc): Replaced by ...
4280 (hdr_struct): ... new type.
4281 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
4282 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
4283 (EMH_DATE_LENGTH): Ditto.
4284 (eom_struc): Replaced by ...
4285 (eom_struct): ... new type.
4286 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
4287 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
4288 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
4289 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
4290 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
4291 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
4292 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
4293 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
4294 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
4295 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
4296 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
4297 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
4298 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
4299 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
4300 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
4301 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
4302 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
4303 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
4304 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
4305 (enum file_type_enum): New type.
4306 (struct location_struct): Removed.
4307 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
4308 (struct funcinfo, struct module): Ditto.
4309 (struct vms_private_data_struct): Update fields.
4310 (struct vms_section_data_struct): New type.
4312 * vms.c: Update copyright year, fix comments,
4313 Fix includes for DECC, add prototypes.
4314 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
4316 Use flavour to set is_vax, location_stack is removed.
4317 (struct pair): Declare.
4318 (fill_section_ptr): Initialize variables at declaration.
4319 Add guard to set SECTION_SYM flag, handlde und section.
4320 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
4321 (_bfd_vms_slurp_object_records): New function, replaces previous
4323 (vms_slurp_module): New function.
4324 (vms_slurp_image): Ditto.
4325 (vms_object_p): Complete rewrite.
4326 (vms_mkobject): Use is_vax field to slect architecture.
4327 (free_reloc_stream): New function.
4328 (vms_convert_to_var): Ditto.
4329 (vms_convert_to_var_1): Ditto.
4330 (vms_convert_to_var_unix_filename): Ditto.
4331 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
4333 (vms_new_section_hook): Set alignment to 0, allocate private data.
4334 (vms_get_section_contents): Load content.
4335 (vms_get_symbol_info): Handle undefined section.
4336 (vms_find_nearest_line): Handle.
4337 (alloc_reloc_stream): New function.
4338 (vms_slurp_reloc_table): Ditto.
4339 (vms_get_reloc_upper_bound): Make it real.
4340 (vms_canonicalize_reloc): Do the real work.
4341 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
4343 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
4344 (vms_set_arch_mach): Check arch.
4345 (vms_set_section_contents): Copy the content after allocation.
4346 (vms_alpha_vec): Update object flags.
4348 * vms-tir.c: Update copyright year, fix comments,
4349 add prototypes for new functions.
4350 (dst_define_location): New function.
4351 (dst_restore_location): New function.
4352 (dst_retrieve_location): New function.
4353 (dst_check_allocation): New function.
4354 (image_dump): Call dst_check_allocation.
4355 (image_write_b): Ditto.
4356 (image_write_w): Ditto.
4357 (image_write_l): Ditto.
4358 (image_write_q): Ditto.
4359 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
4360 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
4362 Call error handler instead of abort if name is not known.
4363 (etir_sta): Add quarter_relocs argument and set it.
4366 (etir_opr): Ditto, return FALSE in case of error.
4367 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
4368 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
4369 (etir_stc): Add quarter_relocs argument and set it, fix cast.
4370 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
4371 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
4372 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
4373 Return FALSE in case of error.
4374 (tir_sta): Change sign of psect.
4376 (tir_cmd): Fix cast. Makes tir_table static const.
4377 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
4378 add argument to explain.
4379 (analyze_etir): Initialize maxptr, add quarter_relocs
4380 declaration, move some declarations into inner scopes.
4381 Handle quarter_relocs and STO_IMM.
4382 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
4383 (_bfd_vms_slurp_relocs): New function.
4384 (_bfd_vms_decode_relocs): New function.
4385 (sto_imm): Rewritten.
4386 (start_first_etbt_record): New function.
4387 (start_another_etbt_record): Ditto.
4388 (etir_output_check): Ditto.
4389 (defer_reloc_p): Ditto.
4390 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
4391 a for-loop. Correctly deals with contents, deals with .vmsdebug,
4392 rewritte relocations handling.
4393 (_bfd_vms_write_tbt): Removed.
4394 (_bfd_vms_write_dbg): Ditto.
4396 * vms-misc.c: Update copyright year, Fix comments.
4397 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
4398 (maybe_adjust_record_pointer_for_object): New function.
4399 (_bfd_vms_get_first_record): New function, replaces ...
4400 (_bfd_vms_get_record): .. removed.
4401 (_bfd_vms_get_object_record): New function.
4402 (_bfd_vms_get_object_record): New function.
4403 (vms_get_remaining_object_record): New function, replaces ...
4404 (_bfd_vms_get_next_record): ... removed.
4405 (add_new_contents): Removed.
4406 (_bfd_save_vms_section): Removed.
4407 (_bfd_get_vms_section): Removed.
4408 (_bfd_vms_output_flush): Write in VAR format.
4409 (new_symbol): Don't make UND section.
4411 * vms-hdr.c: Update copyright year, update list of record handled.
4412 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
4413 (_bfd_vms_write_hdr): Strip vms and unix patches,
4414 add comments, truncate module name at 31 characters,
4415 use constants instead of hard-coded value,
4416 write BFD version instead of a fixed string.
4417 (_bfd_vms_slurp_ihd): New function.
4418 (_bfd_vms_slurp_isd): Ditto.
4419 (_bfd_vms_slurp_ihs): Ditto.
4420 (new_module): Ditto.
4421 (parse_module): Ditto
4422 (build_module_list): Ditto.
4423 (module_find_nearest_line): Ditto.
4424 (_bfd_vms_find_nearest_dst_line): Ditto.
4425 (vms_slurp_debug): Ditto.
4426 (_bfd_vms_slurp_dbg): Ditto.
4427 (_bfd_vms_slurp_tbt): Ditto.
4428 (_bfd_vms_write_dbg): Ditto.
4429 (_bfd_vms_write_tbt): Ditto.
4431 * vms-gsd.c: Update copyright year, update list of records handled.
4432 (EVAX_LITERALS_NAME): New macro.
4433 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
4434 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
4435 (register_universal_symbol): New function and prototype.
4436 (_bfd_vms_slurp_gsd): Fix indentations and casts,
4437 improve debug messages,
4438 use constants instead of hard-coded value,
4439 fix missing endianness conversion,
4440 handle global symbol (SYMG).
4441 (bfd_vms_set_section_flags): New function.
4442 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
4443 handle section literals,
4445 handle section bfd and vms flags,
4446 don't output LIB$INITIALIZE symbol,
4447 fix handling of weak symbols,
4448 fix evax vs vax procedure descriptor,
4449 handle absolute symbols.
4451 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
4452 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
4454 * makefile.vms (DEFS): Fix flags for VMS.
4456 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
4458 * bfd-in2.h: Regenerated.
4459 * libbfd.h: Regenerated.
4461 2009-02-20 Cary Coutant <ccoutant@google.com>
4463 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4466 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4469 * coffcode.h (coff_write_object_contents): Don't let the string
4470 table offset overflow the s_name field when using long section names.
4472 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4474 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
4475 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4476 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4477 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
4478 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4479 (bfd_pmac_xcoff_backend_data): Likewise.
4480 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
4481 (bfd_xcoff_aix5_backend_data): Likewise.
4482 (xcoff64_write_object_contents): Delete unused long_section_names
4484 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
4485 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4487 * coffcode.h (documentation): Update to describe long section names.
4488 (COFFLONGSECTIONCATHELPER): New helper macro.
4489 (BLANKOR1TOODD): Likewise.
4490 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
4491 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
4492 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
4493 (bfd_coff_set_long_section_names_allowed): New function.
4494 (bfd_coff_set_long_section_names_disallowed): Likewise.
4495 (struct bfd_coff_backend_data): Add new backend hook function
4496 pointer _bfd_coff_set_long_section_names.
4497 (bfd_coff_set_long_section_names): New backend hook.
4498 (coff_write_object_contents): Only generate long section names if
4499 bfd_coff_long_section_names() indicates they are currently enabled.
4500 (bfd_coff_std_swap_table): Make non-const, and initialise long
4501 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4502 (ticoff0_swap_table): Likewise to both.
4503 (ticoff1_swap_table): Again, likewise to both.
4504 * coffgen.c (make_a_section_from_file): Allow long section names
4505 as inputs even if not currently allowed for outputs.
4506 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
4507 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
4508 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4509 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4510 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4511 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4512 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4513 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4514 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4515 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4516 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
4517 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
4518 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
4519 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
4520 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
4521 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
4522 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4523 * libcoff-in.h: Update copyright year to cause updated copyright
4524 year in generated libcoff.h, and fix typo.
4525 * libcoff.h: Regenerated.
4526 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
4527 (_bfd_ecoff_no_long_sections): Add prototype.
4528 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
4529 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
4530 defined by an including .c file.
4531 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
4532 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4533 (ticoff1_swap_table): Likewise to both.
4535 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
4537 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4538 stub. Catch default case error.
4539 (arm_map_one_stub): Add missing Thumb mapping symbol.
4541 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
4544 * elf32-avr.c: Handle case where no local symbos exist correctly.
4546 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
4549 * elf32-arm.c (arm_long_branch_stub,
4550 arm_thumb_v4t_long_branch_stub,
4551 arm_thumb_thumb_long_branch_stub,
4552 arm_thumb_arm_v4t_long_branch_stub,
4553 arm_thumb_arm_v4t_short_branch_stub,
4554 arm_pic_long_branch_stub):
4555 Renamed to elf32_arm_stub_long_branch_any_any,
4556 elf32_arm_stub_long_branch_v4t_arm_thumb,
4557 elf32_arm_stub_long_branch_thumb_only,
4558 elf32_arm_stub_long_branch_v4t_thumb_arm,
4559 elf32_arm_stub_short_branch_v4t_thumb_arm,
4560 elf32_arm_stub_long_branch_any_any_pic.
4561 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4562 arm_thumb_thumb_stub_long_branch,
4563 arm_thumb_arm_v4t_stub_long_branch,
4564 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4565 Renamed to arm_stub_long_branch_any_any,
4566 arm_stub_long_branch_v4t_arm_thumb,
4567 arm_stub_long_branch_thumb_only,
4568 arm_stub_long_branch_v4t_thumb_arm,
4569 arm_stub_short_branch_v4t_thumb_arm,
4570 arm_stub_long_branch_any_any_pic.
4572 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4574 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4575 in branch offset check.
4577 2009-02-15 Alan Modra <amodra@bigpond.net.au>
4579 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4580 add toc.symndx and toc.add.
4581 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4583 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
4585 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4586 (branch_reloc_hash_match): New function, extracted from..
4587 (ppc64_elf_tls_optimize): ..here.
4588 (ppc64_elf_relocate_section): Properly set addends when optimizing
4589 tls sequences. Avoid unnecessary reading and writing of insns.
4590 Only redo reloc when symbol changed. Bypass symbol checks when
4592 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4593 (branch_reloc_hash_match): New function, extracted from..
4594 (ppc_elf_tls_optimize): ..here.
4595 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4596 Don't clear addend on zapped __tls_get_addr reloc.
4598 2009-02-12 Nick Clifton <nickc@redhat.com>
4601 * elflink.c (bfd_elf_final_link): When counting the relocations,
4602 if the header size has not been set yet then assume that it will
4603 match the output section's reloc type.
4605 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
4607 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4610 2009-02-09 Alan Modra <amodra@bigpond.net.au>
4612 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4613 (find_function): Likewise.
4614 (pasted_function): Don't error if no prior function found.
4615 (discover_functions): Revert 2008-12-10 change. Extend first
4616 function range to start of section.
4618 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4620 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
4622 * elf64-hppa.h: Likewise.
4624 2009-02-06 Joseph Myers <joseph@codesourcery.com>
4626 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4629 2009-02-04 Alan Modra <amodra@bigpond.net.au>
4631 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4632 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4634 2009-02-03 Sandip Matte <sandip@rmicorp.com>
4636 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4637 * archures.c (bfd_mach_mips_xlr): Define.
4638 * bfd-in2.h: Regenerate.
4639 * cpu-mips.c (I_xlr): Define.
4640 (arch_info_struct): Add XLR entry.
4641 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4642 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4643 (mips_mach_extensions): Add XLR entry.
4645 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
4647 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4649 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
4651 * configure.in: AC_SUBST pdfdir.
4652 * Makefile.am: Add install-pdf, install-pdf-am
4653 and install-pdf-recursive targets. Define pdfdir.
4654 * doc/Makefile.am: Define pdf__strip_dir. Add
4655 install-pdf and install-pdf-am targets.
4656 * po/Make-in: Add install-pdf target.
4657 * configure: Regenerate.
4658 * Makefile.in: Regenerate
4659 * doc/Makefile.in: Regenerate.
4661 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
4663 * bfd-in2.h: Regenerate.
4664 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
4665 fields from n_entries to n_slots where appropriate, update comments.
4666 (HOWTO): Add TLS relocations.
4667 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4668 (enum elf_m68k_got_offset_size): New enum.
4669 (struct elf_m68k_got_entry.type): Move field to ...
4670 (struct elf_m68k_got_entry_key): ... here. Update all uses.
4671 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4673 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4675 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4676 fields into n_entries array. Update comments.
4677 (elf_m68k_init_got): Simplify, update all uses.
4678 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4679 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4680 GOT entries; update name, update all uses.
4681 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4682 (elf_m68k_get_got_entry): Update.
4683 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4685 (elf_m68k_remove_got_entry_type): Simplify.
4686 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4687 (elf_m68k_can_merge_gots): Update.
4688 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4689 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4690 GOT entries, simplify.
4691 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4692 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4693 field, remove obsoleted local_n_entries field.
4694 (elf_m68k_partition_multi_got_2): New static function.
4695 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4697 (elf_m68k_remove_got_entry_type): Update.
4698 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4699 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
4700 update of sgot->size and srelgot->size.
4701 (elf_m68k_gc_sweep_hook): Update.
4702 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4703 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4705 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4706 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4708 2009-02-02 DJ Delorie <dj@redhat.com>
4710 * elf32-mep.c (config_names): Regenerate configuration.
4712 2009-02-02 Alan Modra <amodra@bigpond.net.au>
4714 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4715 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4716 * elf.c (bfd_elf_get_str_section): Make static.
4717 (bfd_elf_find_section): Delete.
4718 * libbfd.h: Regenerate.
4720 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4722 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4723 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4725 2009-01-31 Alan Modra <amodra@bigpond.net.au>
4727 * elflink.c (on_needed_list): New function.
4728 (elf_link_add_object_symbols): Link in --as-needed libs if they
4729 satisfy undefined symbols in other libs.
4731 2009-01-30 Julian Brown <julian@codesourcery.com>
4733 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4734 EXEC_P or DYNAMIC flags, and skip sections which are being linked
4735 with --just-symbols (-R).
4737 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
4739 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4740 high_pc in order to properly sign-extend VMAs.
4742 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4743 Mark Shinwell <shinwell@codesourcery.com>
4744 Catherine Moore <clm@codesourcery.com>
4746 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4748 2009-01-28 Catherine Moore <clm@codesourcery.com>
4750 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4751 SEC_LOAD for dynamic relocation sections.
4753 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4755 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4756 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4757 the size of local TLS data.
4759 2009-01-27 Andreas Schwab <schwab@suse.de>
4761 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4762 architectures in the archive.
4764 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4766 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4767 <R_CRIS_32_DTPREL>: Correct relocation value.
4769 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4770 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4771 symbols with non-default visibility.
4773 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
4775 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4776 describing the trampolines.
4777 (ppc_elf_relocate_section): Update relocs to describe the
4780 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4782 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4783 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4784 and R_PARISC_PCREL12F relocations.
4786 2009-01-24 Alan Modra <amodra@bigpond.net.au>
4789 * elflink.c (find_version_for_sym): New function split out from,
4790 but without export_dynamic test, ..
4791 (_bfd_elf_link_assign_sym_version): ..here.
4792 (_bfd_elf_export_symbol): Use it.
4794 2009-01-23 Alan Modra <amodra@bigpond.net.au>
4796 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4797 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4798 * elflink.c: ..here, somewhat modified.
4799 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4800 _bfd_elf_link_find_version_dependencies,
4801 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4802 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4803 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4805 * elflink.c: ..and make static here.
4806 (_bfd_elf_link_find_version_dependencies): Adjust for removal
4807 of output_bfd from struct elf_find_verdep_info.
4808 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4809 struct elf_info_failed.
4810 (bfd_elf_size_dynamic_sections): Adjust.
4812 2009-01-22 Alan Modra <amodra@bigpond.net.au>
4815 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4816 after comp_unit_find_line call.
4818 2009-01-21 Nick Clifton <nickc@redhat.com>
4821 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4822 tm_gmtoff field in struct tm.
4824 2009-01-21 Alan Modra <amodra@bigpond.net.au>
4826 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4827 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4828 sections in soft-icache lines unless non_ia_text. Don't add
4829 rodata if doing so would exceed line size.
4831 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
4833 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4834 types than bfd_link_hash_indirect, before early return, call
4835 _bfd_elf_link_hash_copy_indirect.
4837 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4839 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4840 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4841 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4842 (elf_backend_obj_attrs_order): New define.
4843 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4844 (elfNN_bed): Add elf_backend_obj_attrs_order.
4846 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4848 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4849 (obj_attr_size): Likewise.
4850 (write_obj_attribute): Likewise.
4851 (_bfd_elf_copy_obj_attributes): Likewise.
4852 (_bfd_elf_parse_attributes): Likewise.
4853 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4854 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4855 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4856 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4857 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4860 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4862 * elf-attrs.c (is_default_attr): Support defaultless attributes.
4863 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4864 (bfd_elf_add_obj_attr_string): Likewise.
4865 (bfd_elf_add_obj_attr_int_string): Likewise.
4866 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4867 * elf-bfd.h (struct obj_attribute): Document new flag bit.
4868 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4869 Tag_nodefaults has no default value.
4870 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4871 comment to reflect the new state.
4873 2009-01-19 Alan Modra <amodra@bigpond.net.au>
4876 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4877 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4878 (adjust_z_magix): Delete dead code handling QMAGIC.
4880 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
4882 * coffcode.h (styp_to_sec_flags): Correct interpretation of
4883 IMAGE_SCN_MEM_DISCARDABLE.
4885 2009-01-16 Alan Modra <amodra@bigpond.net.au>
4887 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4888 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4889 * configure.in (commonbfdlib): Delete.
4890 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4891 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
4892 is available, not just for linux.
4893 * po/SRC-POTFILES.in: Regenerate.
4894 * Makefile.in: Regenerate.
4895 * configure: Regenerate.
4897 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4898 Julian Brown <julian@codesourcery.com>
4900 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4901 ARM attributes in ABI 2.07.
4902 * elf32-arm.c (get_secondary_compatible_arch): New function.
4903 (set_secondary_compatible_arch): New function.
4904 (tag_cpu_arch_combine): New function.
4905 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4906 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4907 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4908 make it fit with order_01243.
4909 Add support for Tag_also_compatible_with,
4910 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4911 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4912 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4913 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4914 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4915 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4916 Rework the way unknown attributes are handled.
4917 Defer errors until all attributes have been processed.
4919 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4921 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4922 bfd_elf_add_obj_attr_int_string.
4923 Read Tag_compatibility from its new location in the attribute array,
4924 rather than the attribute list.
4925 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4926 bfd_elf_add_obj_attr_int_string.
4927 (_bfd_elf_parse_attributes): Likewise.
4928 (_bfd_elf_merge_object_attributes): There's now only one
4929 Tag_compatibility, and it's in the array, not the list.
4930 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4932 (bfd_elf_add_obj_attr_compat): Rename to
4933 bfd_elf_add_obj_attr_int_string.
4934 (bfd_elf_add_proc_attr_compat): Rename to
4935 bfd_elf_add_proc_attr_int_string.
4936 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4939 2009-01-15 Douglas B Rupp <rupp@gnat.com>
4941 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4942 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4943 (vmsutil.lo): Add dependency rule.
4944 * Makefile.in: Regenerate.
4945 * config.bfd (ia64*-*-*vms*): Add case.
4946 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4947 * configure: Regenerate.
4948 * vmsutil.c: New file.
4949 * vmsutil.h: New file.
4950 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4952 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4953 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4954 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4955 elfNN_vms_object_p): New functions
4956 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4958 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4961 * elflink.c (elf_gc_sweep): Exclude the group section if the
4962 first member of the section group is excluded.
4964 2009-01-14 Alan Modra <amodra@bigpond.net.au>
4967 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4968 saved filename, use bfd_alloc rather than bfd_malloc for it.
4970 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4972 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4974 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4976 * elf32-spu.c (remove_cycles): Always set call->max_depth.
4978 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4980 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4982 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4984 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4986 (struct got_entry): Add br_addr.
4987 (struct call_info): Add priority.
4988 (struct function_info): Add lr_store and sp_adjust.
4989 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4990 (spu_elf_find_overlays): For soft-icache, mark any section within cache
4991 area as an overlay, and check that no other overlays exist. Look up
4992 icache overlay manager entry sym.
4993 (BRA_STUBS, BRA, BRASL): Define.
4994 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4995 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
4997 (count_stub, build_stub): Support soft-icache.
4998 (build_spuear_stubs, process_stubs): Adjust build_stub call.
4999 (spu_elf_size_stubs): Size soft-icache stubs.
5000 (overlay_index): New function.
5001 (spu_elf_build_stubs): Make static. Support soft-icache.
5002 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
5003 (find_function_stack_adjust): Save lr store and stack adjust insn
5005 (maybe_insert_function): Adjust find_function_stack_adjust call.
5006 (mark_functions_via_relocs): Retrieve priority.
5007 (remove_cycles): Only warn about pruned arcs when stack_analysis.
5008 (sort_calls): Sort by priority first.
5009 (mark_overlay_section): Ignore .ovl.init.
5010 (sum_stack): Only print when stack_analysis.
5011 (print_one_overlay_section): New function, extracted from..
5012 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
5013 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
5014 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
5015 analysis. Call spu_elf_build_stubs.
5016 (spu_elf_relocate_section): For soft-icache encode overlay index
5018 (spu_elf_output_symbol_hook): Support soft-icache.
5019 (spu_elf_modify_program_headers: Likewise.
5021 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
5022 num_regions to num_lines. Add line_size and max_branch.
5023 (enum _ovly_flavour): Add ovly_soft_icache.
5024 (spu_elf_build_stubs): Delete.
5026 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
5028 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
5029 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
5031 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
5033 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
5034 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
5035 the program, the known offset starts at the negative size of the
5037 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
5040 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
5042 * config.bfd: Add lm32-*-rtems*.
5044 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
5046 * coff-ppc.c: Add 2009 to Copyright.
5047 * elf32-cris.c: Likewise.
5048 * elflink.c: Likewise.
5050 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
5052 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
5053 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
5055 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
5058 * elflink.c (elf_merge_st_other): New.
5059 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
5060 hide them if needed.
5061 (elf_link_add_object_symbols): Updated.
5063 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
5066 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
5067 ref_dynamic and dynamic_def fields when setting def_regular
5070 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
5073 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
5076 For older changes see ChangeLog-2008
5082 version-control: never