1 2009-09-11 Nick Clifton <nickc@redhat.com>
3 * po/bfd.pot: Updated by the Translation project.
5 2009-09-11 Philippe De Muyter <phdm@macqel.be>
7 * binary.c (binary_object_p): Remove bfd_external_binary_architecture
8 hack. objcopy `-B' (`--binary-architecture') option is now handled
11 2009-09-11 Nick Clifton <nickc@redhat.com>
13 * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
16 2009-09-11 Jie Zhang <jie.zhang@analog.com>
18 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
21 2009-09-09 Martin Thuresson <martin@mtme.org>
23 Update soruces to compile cleanly with -Wc++-compat:
25 * archive.c: Add casts.
26 * archive64.c: Add casts.
27 * archures.c: Add casts.
28 * bfd-in2.h: Regenerated.
29 * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
31 * binary.c: Add casts.
32 * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
33 parameter to use enum value instead of int.
34 * coffcode.h: Add casts.
35 * coffgen.c: Add casts.
36 * cofflink.c: Add casts.
37 * compress.c: Add casts.
38 * dwarf1.c: Add casts.
39 * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
40 bfd_ptr. Update code to use new name.
41 * elf-attrs.c: Add casts.
42 * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
43 anonymous struct. (union gotplt_union, struct
44 elf_link_virtual_table_entry): Move to top level.
45 * elf-eh-frame.c: Add casts.
46 * elf-strtab.c: Add casts.
47 * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
48 argument name from typename to type_name.
49 * elf32-i386.c: Add casts.
50 * elf64-x86-64.c: Add casts.
51 * elfcode.h: Add casts.
52 * elfcore.h: Add casts.
53 * elflink.c: Add casts.
54 * format.c: Add casts.
57 * libaout.h (enum aout_subformat, enum aout_magic): Move to top
59 * libbfd.c: Add casts.
60 * linker.c: Add casts.
62 * opncls.c: Add casts.
63 * peXXigen.c: Add casts.
64 * peicode.h: Add casts.
66 * section.c: Add casts.
67 * simple.c: Add casts.
71 * targets.c: Add casts.
72 * tekhex.c: Add casts.
73 * verilog.c: Add casts.
75 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
77 * configure: Regenerate.
79 2009-09-09 Daniel Jacobowitz <dan@codesourcery.com>
81 * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
82 for the mode of target PLT entries.
83 (allocate_dynrelocs): Only adjust symbol type if setting its
86 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
88 * configure: Regenerate.
90 2009-09-09 Nick Clifton <nickc@redhat.com>
93 * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
94 section headers containing sh_link values of SHN_BEFORE or
96 * elfcode.h (elf_object_p): Likewise.
98 2009-09-09 Tristan Gingold <gingold@adacore.com>
100 Handle DYLD_INFO introduced by Darwin10.
101 * mach-o.h (bfd_mach_o_load_command_type): Add
102 BFD_MACH_O_LC_DYLD_INFO.
103 (bfd_mach_o_dyld_info_command): New type.
104 (bfd_mach_o_load_command): Add dyld_info field.
105 * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
106 (bfd_mach_o_scan_read_dyld_info): New function.
107 (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
108 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
109 (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
110 (bfd_mach_o_print_dyld_info): New function.
112 2009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
114 * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
115 linkonce or linker script discarded section.
117 2009-09-09 Alan Modra <amodra@bigpond.net.au>
119 * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
121 2009-09-07 Andreas Schwab <schwab@linux-m68k.org>
123 * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
124 range call the bfd error hander and use R_68K_NONE instead.
126 2009-09-07 Tristan Gingold <gingold@adacore.com>
128 * po/SRC-POTFILES.in: Regenerate.
129 * po/bfd.pot: Regenerate.
131 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
132 BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
133 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
134 st_mtim.tv_nsec to gas/configure.in
135 (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
136 * configure: Regenerate.
137 * config.in: Regenerate.
138 * vmsutil.c: Moved to gas/config/te-vms.c
139 * vmsutil.h: Removed.
140 * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
141 (BFD32_BACKENDS): Remove vmsutil.lo
142 * Makefile.in: Regenerate.
144 2009-09-05 Eli Zaretskii <eliz@gnu.org>
146 * coffcode.h: Include libiberty.h.
148 2009-09-05 Martin Thuresson <martin@mtme.org>
150 * coff-arm.c (coff_arm_relocate_section)
151 (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
152 Change member name class to symbol_class.
153 * coff-i960.c (coff_i960_relocate_section) Rename variable
154 class to class_val. Change member name class to symbol_class.
155 * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
156 (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
157 * coff-stgo32.c (adjust_aux_in_post)
158 (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
160 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
161 (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
162 * coffcode.h (coff_pointerize_aux_hook): Rename variable class
164 * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
165 variables named class to n_sclass. (coff_write_symbols): Rename
166 variable class to sym_class. (bfd_coff_set_symbol_class): Rename
167 argument class to symbol_class.
168 * cofflink.c (_bfd_coff_link_hash_newfunc)
169 (coff_link_add_symbols, _bfd_coff_link_input_bfd)
170 (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
171 Update code to use renamed members.
172 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
173 argument class to in_class.
174 * libcoff-in.h (struct coff_link_hash_entry, struct
175 coff_debug_merge_type) Renamed members class to symbol_class and
177 * libcoff.h Regenerated.
178 * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
179 Rename argument class to in_class.
180 * pef.c (bfd_pef_parse_imported_symbol): Update code to use
182 * pef.h (struct bfd_pef_imported_symbol): Changed name of
183 member class to symbol_class.
185 2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
187 * configure: Regenerated.
189 2009-09-04 Tristan Gingold <gingold@adacore.com>
191 * configure.in: Bump version to 2.20.51
193 2009-09-04 Alan Modra <amodra@bigpond.net.au>
195 * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
197 2009-09-04 Jie Zhang <jie.zhang@analog.com>
199 * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
201 (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
202 for empty .rela.bss and .rel.plt sections.
204 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
206 * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
207 R_MIPS_JALR unless symbol resolves locally.
209 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
211 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
212 has_static_relocs for R_MIPS_JALR.
214 2009-09-03 Maciej W. Rozycki <macro@codesourcery.com>
216 * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
217 R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
220 2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
222 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
225 2009-09-01 Tristan Gingold <gingold@adacore.com>
227 * makefile.vms: Ported to Itanium VMS. Remove useless variable and
228 dependencies. Reindent.
229 * configure.com: Ported to Itanium VMS. Now generates a build.com
230 to build without make. Add messages but make edit silent.
231 * hosts/alphavms.h: Add a prototype for stpcpy.
232 * vms.c: Add a missing include for Alpha VMS.
233 * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
235 2009-08-31 Jan Beulich <jbeulich@novell.com>
237 * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
238 * elf.c (bfd_elf_get_default_section_type): New.
239 (elf_fake_sections): Use bfd_elf_get_default_section_type.
241 2009-08-30 H.J. Lu <hongjiu.lu@intel.com>
243 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
245 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
247 2009-08-30 Alan Modra <amodra@bigpond.net.au>
250 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
251 (bfd_emul_get_commonpagesize): Likewise.
253 2009-08-29 Martin Thuresson <martin@mtme.org>
255 * elf32-arm.c (struct stub_def): Rename member template to
256 template_sequence. (arm_build_one_stub,
257 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
258 Rename variable template to template_sequence.
259 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
260 Rename variable template to template_val.
261 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
263 * coffgen.c (coff_make_empty_symbol)
264 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
265 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
267 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
269 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
271 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
272 * ieee.c (ieee_make_empty_symbol): Rename variable new to
274 * linker.c (bfd_new_link_order): Rename variable new to
276 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
278 * oasys.c (oasys_make_empty_symbol): Rename variable new to
280 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
281 new to new_symbol_type.
282 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
284 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
286 (read_hdr, rs6000coff_core_p)
287 (rs6000coff_core_file_matches_executable_p)
288 (rs6000coff_core_file_failing_command)
289 (rs6000coff_core_file_failing_signal): Updated function to use new
291 * som.c (som_make_empty_symbol): Rename variable new to
293 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
295 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
296 variable new to new_symbol.
298 2009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
300 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
301 bfdlibdir and bfdincludedir.
302 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
303 [INSTALL_LIBBFD]: ... here, ...
304 [INSTALL_LIBBFD]: ... and empty overrides here.
305 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
306 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
307 * Makefile.in: Regenerate.
308 * configure: Regenerate.
310 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
312 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
313 relocations. Rewrite output of dynamic TLS relocations.
314 (DTP_OFFSET, TP_OFFSET): New constants.
315 (dtpoff_base): Update.
316 (tpoff): Rename to tpoff_base, update.
317 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
318 New functions. Move code from elf_m68k_relocate_section here.
319 (elf_m68k_relocate_section): Update.
320 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
322 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
324 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
326 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
327 Handle non_got_ref field.
328 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
330 2009-08-26 Alan Modra <amodra@bigpond.net.au>
333 * linker.c (bfd_find_version_for_sym): Revert warning.
335 2009-08-26 Alan Modra <amodra@bigpond.net.au>
338 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
339 other wildcard match. Warn on multiple wildcard matches.
341 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
343 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
345 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
346 only in this condition.
347 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
348 to build but not install libbfd.la in this condition.
349 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
350 (install_libbfd, install_libbfd): Remove.
351 * Makefile.in: Regenerate.
352 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
353 (INCLUDES): ... this.
355 * doc/Makefile.in: Regenerate.
357 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
359 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
360 dependency tracking to work for them.
361 (targets.lo, archures.lo, dwarf.lo): Rewrite to
362 use automake dependency tracking mechanism.
363 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
364 (mkdep section): Remove.
365 (BUILT_SOURCES): New, list $(BUILD_HFILES).
366 * Makefile.in: Regenerate.
367 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
369 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
370 (install-pdf, install-pdf-recursive, install-html)
371 (install-html-recursive): Remove.
372 * Makefile.in: Regenerate.
374 * Makefile.in: Regenerate.
375 * aclocal.m4: Likewise.
376 * config.in: Likewise.
377 * configure: Likewise.
379 2009-08-21 Daniel Gutson <dgutson@codesourcery.com>
381 * elf32-arm.c (arch_has_thumb2_nop): New function.
382 (arch_has_arm_nop): New function.
383 (elf32_arm_final_link_relocate): NOP opcodes changed.
385 2009-08-16 Doug Evans <dje@google.com>
387 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
388 at least don't leak memory.
390 2009-08-13 DJ Delorie <dj@redhat.com>
392 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
395 2009-08-12 Nick Clifton <nickc@redhat.com>
397 * po/fi.po: Updated Finnish translation.
399 2009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
401 Merge some FRV FDPIC changes into the Blackfin code.
402 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
403 summary reloc information.
404 (bfinfdpic_dynamic_got_plt_info): New.
405 (_bfin_create_got_section): Create the PLT section here.
406 (elf32_bfinfdpic_create_dynamic_sections): Not here.
407 (_bfinfdpic_count_nontls_entries): Move out of...
408 (_bfinfdpic_count_got_plt_entries): ... here.
409 (_bfinfdpic_count_relocs_fixups): Likewise.
410 (_bfinfdpic_reset_got_plt_entries): New.
411 (_bfinfdpic_size_got_plt): Move out of...
412 (elf32_bfinfdpic_size_dynamic_sections): ... here.
413 (bfinfdpic_relocate_section): Be careful not to call
414 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
415 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
417 (elf_backend_discard_info): Define for FD-PIC.
419 2009-08-11 Alan Modra <amodra@bigpond.net.au>
421 * elflink.c: Add FIXMEs for some places that require octets_per_byte
423 * elf-eh-frame.c: Likewise.
426 2009-08-11 Alan Modra <amodra@bigpond.net.au>
428 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
429 to x86 and x86_64 configurations.
430 * configure: Regenerate.
432 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
434 Stop using bfd_usrdata in libbfd.
435 * coff-stgo32.c (bfd_coff_go32stub): Remove.
436 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
437 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
438 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
439 filehdr_dst->u.go32.stub. New comment with the reason.
440 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
441 Substitute the removed macro bfd_coff_go32stub.
442 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
443 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
444 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
445 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
446 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
448 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
449 * libcoff-in.h (coff_data_type): New field go32stub.
450 * libcoff.h: Regenerated.
452 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
454 Fix go32 stub preservation by objcopy.
455 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
456 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
459 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
461 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
463 (elf32_arm_final_link_relocate): Treat local undefined symbols the
464 same as global undefined symbols.
465 (elf32_arm_relocate_section): Give an error for local undefined
466 non-weak symbols, unless the reloc will not use the symbol.
468 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
470 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
471 (ppc_elf_relax_section): Use symbol index to distinguish
474 2009-08-10 Alan Modra <amodra@bigpond.net.au>
476 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
478 2009-08-10 Alan Modra <amodra@bigpond.net.au>
480 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
481 info for STT_GNU_IFUNC.
482 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
483 on got refs in case the symbol turns out to be ifunc.
484 (ppc_elf_gc_sweep_hook): Similarly.
485 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
486 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
487 (ppc_elf_size_dynamic_sections): Likewise.
488 (ppc_elf_relocate_section): Likewise.
490 2009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
492 From Mike Frysinger <michael.frysinger@analog.com>
493 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
494 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
495 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
496 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
497 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
498 Adjust to match the renamed reloc definitions.
500 2009-08-08 Alan Modra <amodra@bigpond.net.au>
503 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
504 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
506 2009-08-07 Tom Tromey <tromey@redhat.com>
508 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
511 2009-08-06 Michael Eager <eager@eagercon.com>
513 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
514 * Makefile.in: Regenerate.
515 * archures.c: Add bfd_arch_microblaze.
516 * bfd-in2.h: Regenerate.
517 * config.bfd: Add microblaze target.
518 * configure.in: Add bfd_elf32_microblaze_vec target.
519 * configure: Regenerate.
520 * cpu-microblaze.c: New.
521 * elf32-microblaze.c: New.
522 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
523 * libbfd.h: Regenerate.
524 * reloc.c: Add MICROBLAZE relocations.
525 * section.c: Add struct relax_table and relax_count to section.
526 * targets.c: Add bfd_elf32_microblaze_vec.
528 2009-08-06 Jakub Jelinek <jakub@redhat.com>
529 Alan Modra <amodra@bigpond.net.au>
532 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
534 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
535 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
537 2009-08-06 Nathan Sidwell <nathan@codesourcery.com>
539 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
540 at least once when fixing cortex-a8.
542 2009-08-05 Chao-ying Fu <fu@mips.com>
544 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
545 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
546 for CPUs. It is true for RM9000.
547 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
549 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
550 to guard the transformation.
552 2009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
554 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
555 (spu_elf_size_sections): Declare prototype.
556 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
557 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
558 (spu_elf_emit_fixup): New function.
559 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
560 (spu_elf_size_sections): New function.
562 2009-08-05 Nathan Sidwell <nathan@codesourcery.com>
564 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
565 (arm_build_one_stub): Build a8 veneers as a separate pass.
566 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
567 parameters. Use them to check if we create a different a8 fixup
568 than the previous pass.
569 (elf32_arm_size_stubs): Move scope of stub_changed and
570 prev_num_a8_fixes into main loop.
571 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
573 2009-08-04 Alan Modra <amodra@bigpond.net.au>
575 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
576 which find_plt_ent is called. Delete redundant code.
578 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
581 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
582 invalid string offset.
584 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
587 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
588 to htab->init_got_offset and plt to htab->init_plt_offset
589 when discarding space for dynamic relocations.
591 2009-08-03 Alan Modra <amodra@bigpond.net.au>
593 * elf32-ppc.c (struct plt_entry): Revise comments.
594 (ppc_elf_check_relocs): Don't create needless plt_entry info
595 for non-pie executables. Don't test info->pie when info->shared
596 already covers that case.
597 (ppc_elf_gc_sweep_hook): Adjust for above change.
598 (add_stub_sym): Don't test info->pie when info->shared tested.
599 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
600 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
601 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
602 (ppc_elf_relocate_section): Likewise.
604 2009-08-03 Alan Modra <amodra@bigpond.net.au>
606 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
607 for local ifunc symbols in non-pie executables, regardless of
608 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
609 code so that it's obvious that we only do anything special for
611 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
612 (allocate_dynrelocs): Correct comment for syms defined in plt.
613 Don't specially allocate ifunc dyn relocs.
614 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
615 (ppc_elf_relocate_section): Set "relocation" value for ifunc
616 syms in non-pie executables. No specially allocated dyn relocs
617 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
618 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
619 a non-pie executable.
621 2009-08-02 H.J. Lu <hongjiu.lu@intel.com>
622 Jakub Jelinek <jakub@redhat.com>
625 * elf32-i386.c (elf_i386_tls_transition): Check executable
626 instead of shared for TLS when building PIE.
627 (elf_i386_check_relocs): Likewise.
628 (elf_i386_allocate_dynrelocs): Likewise.
629 (elf_i386_relocate_section): Likewise.
631 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
632 instead of shared for TLS when building PIE.
633 (elf64_x86_64_check_relocs): Likewise.
634 (elf64_x86_64_allocate_dynrelocs): Likewise.
635 (elf64_x86_64_relocate_section): Likewise.
637 2009-07-31 Anthony Green <green@moxielogic.com>
639 * config.bfd (targ_cpu): Add moxie-uclinux support.
641 2009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
643 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
645 2009-07-30 Alan Modra <amodra@bigpond.net.au>
647 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
648 used by indirect function support. Count dynamic relocs for
650 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
651 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
652 in iplt and their relocs in reliplt. Don't make ifunc syms
653 dynamic. Allocate got entry relocs for non-dynamic ifunc in
654 reliplt. Handle other dynamic relocs for ifunc.
655 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
656 ifunc in reliplt, likewise relocs for got against local ifunc.
657 Typo fix on reliplt size adjust.
658 (ppc_elf_relocate_section): Don't use plt scheme of allocating
659 relocs 1-1 with entries for iplt, instead just add using
660 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
661 Error on invalid ifunc dyn relocs.
662 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
664 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
665 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
666 (ppc64_elf_reloc_type_lookup): Handle new relocs.
667 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
668 (allocate_dynrelocs): As for elf32-ppc.c above.
669 (ppc64_elf_size_dynamic_sections): Likewise.
670 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
671 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
672 (ppc_size_one_stub): Similarly.
673 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
675 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
677 2009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
679 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
680 change. Add note to head comment.
682 2009-07-28 Jan Beulich <jbeulich@novell.com>
684 * archive.c (get_extended_arelt_filename): Remove redundant
685 range check on index.
687 2009-07-27 Doug Kwan <dougkwan@google.com>
689 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
691 2009-07-27 H.J. Lu <hongjiu.lu@intel.com>
693 * archures.c bfd_*_arch): Sorted.
694 (bfd_archures_list): Likewise.
696 2009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
698 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
699 to R_cr16_NUM32 relocation.
701 2009-07-26 Michael Eager <eager@eagercon.com>
703 * archures.c: Add bfd_mach_ppc_405
706 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
708 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
709 * cpu-l1om.c (bfd_l1om_arch): Likewise.
711 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
713 * archures.c (bfd_architecture): Add bfd_arch_l1om.
714 (bfd_l1om_arch): New.
715 (bfd_archures_list): Add &bfd_l1om_arch.
716 * bfd-in2.h: Regenerated.
718 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
719 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
720 if bfd_elf64_x86_64_freebsd_vec is supported.
721 (targ_selvecs): Likewise.
723 * configure.in: Support bfd_elf64_l1om_vec and
724 bfd_elf64_l1om_freebsd_vec.
725 * configure: Regenerated.
729 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
730 (bfd_elf64_l1om_vec): Likewise.
731 (bfd_elf64_l1om_freebsd_vec): Likewise.
733 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
734 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
735 * Makefile.in: Regenerated.
737 * targets.c (bfd_elf64_l1om_vec): New.
738 (bfd_elf64_l1om_freebsd_vec): Likewise.
739 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
740 bfd_elf64_l1om_freebsd_vec.
742 2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
743 Alan Modra <amodra@bigpond.net.au>
745 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
746 * bfd-in2.h: Regenerate.
747 * libbfd.h: Regenerate.
748 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
749 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
750 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
752 2009-07-23 H.J. Lu <hongjiu.lu@intel.com>
755 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
756 instead of shared for R_X86_64_TPOFF32.
757 (elf64_x86_64_relocate_section): Likewise.
759 2009-07-23 Ulrich Drepper <drepper@redhat.com>
761 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
762 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
763 with the BSF_GNU_UNIQUE flag bit set.
764 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
765 for symbols with STB_GNU_UNIQUE binding.
766 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
767 with the STB_GNU_UNIQUE binding.
768 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
769 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
770 symbols with the unique_global field set.
771 (elf_link_output_extsym): Set unique_global field for symbols with
772 the STB_GNU_UNIQUE binding.
773 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
774 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
776 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
778 * bfd-in2.h: Regenerate.
780 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
782 * elflink.c (elf_link_output_extsym): Revert the last change.
784 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
787 * elflink.c (elf_link_output_extsym): Special case ifunc syms
788 when ref_regular, not def_regular.
790 2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
793 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
794 from a DSO into a normal FUNC symbol.
795 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
796 a normal FUNC symbol.
798 2009-07-17 Chao-ying Fu <fu@mips.com>
800 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
801 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
802 interlocking, the last PLT entry needs a nop in the branch delay slot.
803 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
804 output the last two PLT entries in reverse order.
806 2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
808 * elf32-i386.c (elf_i386_relocate_section): Don't get local
809 STT_GNU_IFUNC symbol for relocatable link.
810 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
812 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
814 * bfdio.c (bfd_iovec): Add comments for bmmap.
815 * bfd-in2.h: Regenerated.
817 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
819 * Makefile.am: Run "make dep-am".
820 * Makefile.in: Regenerated.
822 2009-07-10 Doug Kwan <dougkwan@google.com>
824 * elf32-arm.c (stub_hash_newfunc): Initialize fields
825 target_addend and orig_insn.
827 2009-07-10 Tom Tromey <tromey@redhat.com>
829 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
830 (elf-eh-frame.lo): Likewise.
831 (elf32-bfin.lo): Likewise.
832 (elf32-frv.lo): Likewise.
833 (elf32-xc16x.lo): Likewise.
834 * Makefile.in: Rebuild.
835 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
836 * elf-eh-frame.c: Likewise.
837 * elf32-bfin.c: Likewise.
838 * elf32-frv.c: Likewise.
839 * elf32-xc16x.c: Likewise.
841 2009-07-10 Julian Brown <julian@codesourcery.com>
843 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
844 symbol a stub entry is derived from, not the entry for the stub
845 itself, in call to elf32_arm_final_link_relocate.
847 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
849 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
850 when reporting addends.
852 2009-07-10 Alan Modra <amodra@bigpond.net.au>
854 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
855 data even when no stubs.
856 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
858 2009-07-10 Alan Modra <amodra@bigpond.net.au>
860 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
861 (ppc_elf_get_synthetic_symtab): Report addend.
863 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
864 (ppc_elf_create_glink): New function.
865 (ppc_elf_create_dynamic_sections): Use it.
866 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
867 (update_local_sym_info): Allocate space for local_plt array.
868 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
870 (is_branch_reloc): New function.
871 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
872 (ppc_elf_gc_sweep_hook): Likewise.
873 (ppc_elf_adjust_dynamic_symbol): Likewise.
874 (allocate_dynrelocs): Likewise.
875 (ppc_elf_size_dynamic_sections): Likewise.
876 (ppc_elf_relocate_section): Likewise.
877 (branch_reloc_hash_match): Use is_branch_reloc.
878 (ppc_elf_tls_optimize): Adjust for local_plt.
879 (write_glink_stub): New function, extracted from..
880 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
881 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
882 branch table when dynamic.
883 (elf_backend_post_process_headers): Define.
884 * elf64-ppc.c (elf_backend_post_process_headers): Define.
885 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
886 (ppc64_elf_get_synthetic_symtab): Report addend.
887 (struct ppc_stub_hash_entry): Add plt_ent.
889 (struct ppc_link_hash_table): Add iplt and reliplt.
890 (create_linkage_sections): Make .iplt and .rela.iplt sections.
891 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
892 (update_local_sym_info): Allocate space for local_plt array.
893 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
895 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
896 and don't change hash flags here.
897 (is_branch_reloc): New function.
898 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
899 (ppc64_elf_gc_sweep_hook): Likewise.
900 (ppc64_elf_adjust_dynamic_symbol): Likewise.
901 (allocate_dynrelocs): Likewise.
902 (ppc64_elf_size_dynamic_sections): Likewise.
903 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
904 (ppc64_elf_size_stubs): Likewise.
905 (ppc64_elf_relocate_section): Likewise.
906 (get_sym_h): Adjust for local_plt.
907 (branch_reloc_hash_match): Use is_branch_reloc.
908 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
909 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
911 2009-07-10 Alan Modra <amodra@bigpond.net.au>
913 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
915 2009-07-10 Alan Modra <amodra@bigpond.net.au>
917 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
918 and ref_regular_nonweak comment.
919 * elflink.c (elf_link_output_extsym): Special case ifunc syms
920 when def_regular, not ref_regular.
921 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
922 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
923 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
925 2009-07-09 Alan Modra <amodra@bigpond.net.au>
927 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
928 of malloc'd struct call_info.
929 (pasted_function): Likewise, priority too.
931 2009-07-07 Alan Modra <amodra@bigpond.net.au>
933 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
934 alignment when packing sections into overlays.
936 2009-07-03 Cary Coutant <ccoutant@google.com>
938 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
940 2009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
942 * coffcode.h (sec_to_styp_flags): Partially revert (functional
943 changes only) earlier patch:-
945 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
947 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
948 give .debug and .reloc data characteristics.
949 (DOT_RELOC): New define for .reloc section string.
950 (coff_write_object_contents): Use DOT_RELOC instead of string.
952 2009-07-02 Tom Tromey <tromey@redhat.com>
954 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
955 * bfdwin.c (bfd_free_window): Cast to unsigned long.
957 2009-07-01 Nick Clifton <nickc@redhat.com>
959 * elf-m10300.c: Remove trailing white space.
962 2009-07-01 Douglas B Rupp <rupp@gnat.com>
964 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
965 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
966 * configure.in: Use them.
967 * configure: Regenerate.
968 * config.in: Regenerate.
969 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
970 #define _BSD_SOURCE. Add comments.
971 (vms_file_stats_name): Calculate creation date based on available
972 runtime data. Return 1 for version instead of 0.
974 2009-07-01 Nick Clifton <nickc@redhat.com>
977 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
978 to R_ARM_THM_PC8 relocation.
980 2009-06-29 Nick Clifton <nickc@redhat.com>
982 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
983 different uses of the relocations addend when a symbol is in a
986 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
989 * elf.c (bfd_section_from_shdr): Don't change sh_link for
990 SHT_REL/SHT_RELA sections on executable nor shared library.
991 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
994 2009-06-25 Nick Clifton <nickc@redhat.com>
996 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
997 symbols with SEC_MERGE flag.
999 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
1001 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1002 give .debug and .reloc data characteristics.
1003 (DOT_RELOC): New define for .reloc section string.
1004 (coff_write_object_contents): Use DOT_RELOC instead of string.
1006 2009-06-25 Tristan Gingold <gingold@adacore.com>
1008 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1009 (bfd_mach_o_canonicalize_dynamic_symtab)
1010 (bfd_mach_o_get_synthetic_symtab): Defines.
1011 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1012 (TARGET_NAME): Use Mach-O specific functions for dynamic.
1014 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1015 for scattered relocations.
1016 (bfd_mach_o_i386_print_thread): New function.
1017 (bfd_mach_o_print_thread): Define.
1019 * mach-o.c (text_section_names_xlat): Add an entry for __const.
1020 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1021 New functions extracted from ...
1022 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
1023 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1024 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1025 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1026 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
1027 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1029 (bfd_mach_o_scan_read_dylib): Ditto.
1030 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
1032 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
1033 decode isym and flags on little endian targets. Set dysymtab field.
1034 (bfd_mach_o_scan_start_address): Adjust for enum names.
1035 (bfd_mach_o_lookup_section): Do not look for segments anymore.
1036 (bfd_mach_o_print_section): Display bfd section name.
1037 (bfd_mach_o_print_segment): Display none if no name.
1038 (bfd_mach_o_print_dysymtab): Display next index for local, external
1039 and undefined symbols.
1040 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1041 Display dylinker name. Display thread and unixthread commands content.
1042 (bfd_mach_o_print_thread): New macro.
1044 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1045 (bfd_mach_o_ppc_thread_flavour): Ditto.
1046 (bfd_mach_o_i386_thread_flavour): Ditto.
1047 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1048 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1049 BFD_MACH_O_THREAD_STATE_NONE.
1050 (bfd_mach_o_segment_command): Remove segment field.
1051 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1052 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1053 (bfd_mach_o_prebound_dylib_command): Ditto.
1054 (bfd_mach_o_dylib_command): Ditto.
1055 (bfd_mach_o_prebound_dylib_command): Remove section field.
1056 (mach_o_data_struct): Add dysymtab field.
1057 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1058 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1059 (bfd_mach_o_build_commands): Remove parameter names and attributes.
1060 (bfd_mach_o_get_dynamic_reloc_upper_bound)
1061 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1063 2009-06-25 Rafael Avila de Espindola <espindola@google.com>
1065 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1066 field of struct dirent.
1068 2009-06-23 Tristan Gingold <gingold@adacore.com>
1070 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1071 of this macro. Fix indentation.
1073 2009-06-22 Christophe Lyon <christophe.lyon@st.com>
1075 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1076 destination for defined dynamic symbols when deciding whether to
1077 insert a stub or not.
1078 (allocate_dynrelocs): Make sure functions are not marked as Thumb
1079 when actually accessed through a PLT, even when generating a
1082 2009-06-22 Tristan Gingold <gingold@adacore.com>
1084 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1087 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1089 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1090 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1092 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1094 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1096 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1098 * elflink.c (elf_link_add_object_symbols): Avoid warning
1099 from -Wjump-misses-init in gcc 4.5.0.
1101 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1103 * elf32-i386.c (elf_i386_check_relocs): Properly check local
1105 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1107 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1109 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1110 r_symndx. Report local symbol name on error.
1111 (elf_i386_check_relocs): Updated. Report local symbol name on
1113 (elf_i386_gc_sweep_hook): Updated.
1114 (elf_i386_relocate_section): Likewise.
1116 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1117 r_symndx. Report local symbol name on error.
1118 (elf64_x86_64_check_relocs): Updated. Report local symbol name
1120 (elf64_x86_64_gc_sweep_hook): Updated.
1121 (elf64_x86_64_relocate_section): Likewise.
1123 2009-06-19 Tristan Gingold <gingold@adacore.com>
1125 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1127 2009-06-19 Tristan Gingold <gingold@adacore.com>
1129 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1130 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1131 (bfd_mach_o_valid): Ditto.
1132 (bfd_mach_o_wide_p): Ditto.
1133 (bfd_mach_o_canonicalize_reloc): Ditto.
1134 (bfd_mach_o_build_commands): Ditto.
1135 (bfd_mach_o_scan_read_thread): Ditto.
1136 (bfd_mach_o_flatten_sections): Ditto.
1137 (bfd_mach_o_scan_start_address): Ditto.
1138 (bfd_mach_o_lookup_section): Ditto.
1139 (bfd_mach_o_core_fetch_environment): Ditto.
1140 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
1141 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1142 (bfd_mach_o_scan_write_symtab): Ditto.
1143 Use macros instead of hard-coded values.
1144 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1145 Use bfd_mach_o_get_data instead of direct access. Use macros
1146 instead of hard-coded values.
1147 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1148 Remove sym argument and get section from mdata.
1149 Move code into the else branch.
1150 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1151 Remove sym argument and get section from mdata. Adjust code.
1152 (bfd_mach_o_scan_read_dylib): Move assertion into the created
1153 switch (which replaces consecutive if statements).
1154 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
1155 module table, table of content, indirect symbols and external
1157 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
1159 (bfd_mach_o_scan_read_linkedit): New function.
1160 (bfd_mach_o_scan_read_str): Ditto.
1161 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1163 (bfd_mach_o_get_symtab_upper_bound): Remove check as
1164 bfd_mach_o_count_symbols never returns an error.
1165 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1166 symtab field (there might be only one symtab).
1167 (bfd_mach_o_scan_read_command): Handle reexported dylib.
1168 Handle sub frameworks, sub umbrella, sub library and sub client.
1169 Read code signature and segment split info commands.
1170 (bfd_mach_o_scan): Reindent.
1171 (bfd_mach_o_xlat_name): New type.
1172 (bfd_mach_o_print_flags): New function.
1173 (bfd_mach_o_get_name): Ditto.
1174 (bfd_mach_o_cpu_name): New variable.
1175 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1176 (bfd_mach_o_section_type_name)
1177 (bfd_mach_o_section_attribute_name)
1178 (bfd_mach_o_load_command_name): New variables.
1179 (bfd_mach_o_print_private_header): New function.
1180 (bfd_mach_o_print_section_map): New function extracted from
1181 bfd_mach_o_print_private_bfd_data.
1182 (bfd_mach_o_print_section): Ditto. Print more infos.
1183 (bfd_mach_o_print_segment): Ditto.
1184 (bfd_mach_o_print_dysymtab): Ditto.
1185 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
1186 load weak dylib, reexport dylib and id dylib.
1187 Handle code signature and segment_split info.
1188 Handle sub frameworks, sub umbrella, sub library and sub client.
1189 (bfd_mach_o_section_get_nbr_indirect): New function.
1191 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
1192 (bfd_mach_o_header_flags): New enum to define header flags.
1193 (bfd_mach_o_section_attribute): New enum to replace ...
1194 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1195 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1196 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1197 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1198 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1199 these removed macros.
1200 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1201 (bfd_mach_o_dylib_module): New type.
1202 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1204 (bfd_mach_o_dylib_table_of_content): New type.
1205 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1206 (bfd_mach_o_dylib_reference): New type.
1207 (BFD_MACH_O_REFERENCE_SIZE): New macro.
1208 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1209 modules, toc, references and indirect syms.
1210 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1211 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1212 unused). Add comment.
1213 (bfd_mach_o_dylib_command): Ditto.
1214 (bfd_mach_o_prebound_dylib_command): Ditto.
1215 (bfd_mach_o_linkedit_command): New type.
1216 (bfd_mach_o_str_command): New type.
1217 (bfd_mach_o_load_command): Add linkedit and str fields.
1218 (mach_o_data_struct): Add symtab field.
1219 (bfd_get_mach_o_data): Renamed to ...
1220 (bfd_mach_o_get_data): ... this new macro.
1221 (bfd_mach_o_scan_read_symtab_symbol,
1222 bfd_mach_o_scan_read_symtab_strtab,
1223 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1225 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1226 instead of direct access.
1228 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1230 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1231 R_PPC_PLTREL24 relocs.
1232 (ppc_elf_relocate_section): Likewise.
1234 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1236 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1237 pointer to sym hash. Update all uses.
1238 (update_plt_info): Likewise. Don't check addend here.
1240 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1242 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1243 bfd_sym_from_r_symndx.
1244 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1246 2009-06-18 Alan Modra <amodra@bigpond.net.au>
1248 * elf-bfd.h (struct sym_sec_cache): Delete.
1249 (struct sym_cache): New.
1250 (bfd_section_from_r_symndx): Delete prototype.
1251 (bfd_sym_from_r_symndx): Define prototype.
1252 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1253 (bfd_sym_from_r_symndx): ..new function.
1254 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1255 bfd_section_from_r_symndx to new struct and function.
1256 * elf32-bfin.c: Likewise.
1257 * elf32-hppa.c: Likewise.
1258 * elf32-i386.c: Likewise.
1259 * elf32-m32r.c: Likewise.
1260 * elf32-m68hc1x.c: Likewise.
1261 * elf32-m68hc1x.h: Likewise.
1262 * elf32-m68k.c: Likewise.
1263 * elf32-ppc.c: Likewise.
1264 * elf32-s390.c: Likewise.
1265 * elf32-sh.c: Likewise.
1266 * elf64-ppc.c: Likewise.
1267 * elf64-s390.c: Likewise.
1268 * elf64-x86-64.c: Likewise.
1269 * elfxx-sparc.c: Likewise.
1270 * elfxx-sparc.h: Likewise.
1272 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1274 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1275 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1277 2009-06-18 Nick Clifton <nickc@redhat.com>
1279 * elflink.c (elf_link_sort_relocs): Return early if there are no
1282 2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
1284 Merge cegcc and mingw32ce target name changes from
1287 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
1289 * config.bfd: Add arm*-*-cegcc* target.
1291 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
1293 * config.bfd: Add arm-*-mingw32ce* target.
1295 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1297 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1298 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1299 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1300 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1302 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1304 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1305 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1306 * elf32-i386.c (elf_i386_check_relocs): Use it.
1307 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1309 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1311 * elf-bfd.h (elf_dyn_relocs): New.
1313 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1314 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1316 (elf_i386_copy_indirect_symbol): Likewise.
1317 (elf_i386_check_relocs): Likewise.
1318 (elf_i386_gc_sweep_hook): Likewise.
1319 (elf_i386_allocate_dynrelocs): Likewise.
1320 (elf_i386_readonly_dynrelocs): Likewise.
1321 (elf_i386_size_dynamic_sections): Likewise.
1323 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1324 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1325 with elf_dyn_relocs.
1326 (elf64_x86_64_copy_indirect_symbol): Updated.
1327 (elf64_x86_64_check_relocs): Likewise.
1328 (elf64_x86_64_gc_sweep_hook): Likewise.
1329 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1330 (elf64_x86_64_allocate_dynrelocs): Likewise.
1331 (elf64_x86_64_readonly_dynrelocs): Likewise.
1332 (elf64_x86_64_size_dynamic_sections): Likewise.
1334 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1336 * elf32-arm.c (create_got_section): Get existing .rela.got
1338 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1339 * elf32-lm32.c (create_got_section): Likewise.
1340 * elf32-m32r.c (create_got_section): Likewise.
1341 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1342 * elf32-s390.c (create_got_section): Likewise.
1343 * elf32-sh.c (create_got_section): Likewise.
1344 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1345 * elf64-s390.c (create_got_section): Likewise.
1346 * elfxx-sparc.c (create_got_section): Likewise.
1348 * elflink.c (_bfd_elf_create_got_section): Properly initialize
1351 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1355 * elf32-i386.c (elf_i386_local_hash): Removed.
1356 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1357 (elf_i386_get_local_sym_hash): Likewise.
1359 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1360 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1361 (elf64_x86_64_get_local_sym_hash): Likewise.
1362 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1363 (get_local_sym_hash): Likewise.
1365 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1367 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1368 rel_got_sec and plt_sec.
1369 (elfNN_ia64_relax_section): Updated.
1370 (elfNN_ia64_create_dynamic_sections): Likewise.
1371 (get_got): Likewise.
1372 (allocate_dynrel_entries): Likewise.
1373 (elfNN_ia64_size_dynamic_sections): Likewise.
1374 (set_got_entry): Likewise.
1375 (elfNN_ia64_choose_gp): Likewise.
1376 (elfNN_ia64_relocate_section): Likewise.
1377 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1378 (elfNN_ia64_finish_dynamic_sections): Likewise.
1380 2009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
1382 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1385 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1387 * configure.in (elf): Add elf-ifunc.lo.
1389 * configure: Regenerated.
1390 * Makefile.in: Likewise.
1392 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1393 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1395 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1396 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1398 (elf_i386_link_hash_table_create): Likewise.
1399 (elf_i386_create_dynamic_sections): Likewise.
1400 (elf_i386_check_relocs): Likewise.
1401 (elf_i386_allocate_dynrelocs): Likewise.
1402 (elf_i386_size_dynamic_sections): Likewise.
1403 (elf_i386_relocate_section): Likewise.
1404 (elf_i386_finish_dynamic_symbol): Likewise.
1405 (elf_i386_finish_dynamic_sections): Likewise.
1406 (elf_i386_create_got_section): Removed.
1408 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1409 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1411 (elf64_x86_64_compute_jump_table_size): Updated.
1412 (elf64_x86_64_link_hash_table_create): Likewise.
1413 (elf64_x86_64_create_dynamic_sections): Likewise.
1414 (elf64_x86_64_check_relocs): Likewise.
1415 (elf64_x86_64_allocate_dynrelocs): Likewise.
1416 (elf64_x86_64_size_dynamic_sections): Likewise.
1417 (elf64_x86_64_relocate_section): Likewise.
1418 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1419 (elf64_x86_64_finish_dynamic_sections): Likewise.
1420 (elf64_x86_64_create_got_section): Removed.
1422 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1423 for pointer alignment. Set up section pointers.
1424 (_bfd_elf_create_dynamic_sections): Likewise.
1425 (_bfd_elf_create_ifunc_sections): Moved to ...
1426 * elf-ifunc.c: Here. New.
1428 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1429 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1432 2009-06-16 Doug Kwan <dougkwan@google.com>
1434 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1435 to bfd_signed_vma. Cast constant operands which are used in
1436 offset related expressions to bfd_signed_vma type as appropriate.
1438 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1440 * elf32-vax.c (elf_vax_plt_sym_val): New function.
1441 (elf_backend_plt_sym_val): Define.
1443 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1445 * elf32-vax.c (elf_vax_reloc_type_class): New function.
1446 (elf_backend_reloc_type_class): Define.
1448 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1450 * elf32-vax.c (elf_vax_relocate_section): For symbol references
1451 from an executable to a shared library treat R_VAX_PC32
1452 relocations as R_VAX_PLT32 ones.
1454 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1456 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1457 symbols in GOT space calculation.
1458 (elf_vax_relocate_section): Adjust accordingly.
1460 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1462 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1465 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1467 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1469 (elf_vax_relocate_section): Likewise.
1471 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1473 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1474 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1476 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1478 * elf32-i386.c (elf_i386_check_relocs): Reformat.
1479 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1481 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1483 * Makefile.am: Run "make dep-am".
1484 * Makefile.in: Regenerated.
1486 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1488 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1489 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1491 2009-06-15 Nick Clifton <nickc@redhat.com>
1493 * po/ru.po: New Russian translation.
1494 * configure.in (ALL_LINGUAS): Add ru.
1495 * configure: Regenerate.
1497 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1499 * elf32-i386.c: Remove duplicated comments.
1501 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1504 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1505 dynamic IFUNC pointer in non-shared object. Use .got.plt
1506 for IFUNC definition in PIE.
1507 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1510 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1511 dynamic IFUNC pointer in non-shared object. Use .got.plt
1512 for IFUNC definition in PIE.
1513 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1516 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1518 * elf32-i386.c (elf_i386_check_relocs): Properly report
1519 local symbol for unhandled relocation against STT_GNU_IFUNC
1521 (elf_i386_relocate_section): Likewise.
1522 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1523 (elf64_x86_64_relocate_section): Likewise.
1525 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1528 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1529 (elf_i386_link_hash_table): Add loc_hash_table and
1531 (elf_i386_local_hash): New.
1532 (elf_i386_local_htab_hash): Likewise.
1533 (elf_i386_local_htab_eq): Likewise.
1534 (elf_i386_get_local_sym_hash): Likewise.
1535 (elf_i386_link_hash_table_free): Likewise.
1536 (elf_i386_allocate_local_dynrelocs): Likewise.
1537 (elf_i386_finish_local_dynamic_symbol): Likewise.
1538 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1539 (elf_i386_link_hash_table_create): Create loc_hash_table and
1541 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1542 (elf_i386_size_dynamic_sections): Likewise.
1543 (elf_i386_relocate_section): Likewise.
1544 (elf_i386_finish_dynamic_sections): Likewise.
1545 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1548 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1549 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1551 (elf64_x86_64_local_hash): New.
1552 (elf64_x86_64_local_htab_hash): Likewise.
1553 (elf64_x86_64_local_htab_eq): Likewise.
1554 (elf64_x86_64_get_local_sym_hash): Likewise.
1555 (elf64_x86_64_link_hash_table_free): Likewise.
1556 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1557 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1558 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1559 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1560 and loc_hash_memory.
1561 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1563 (elf64_x86_64_size_dynamic_sections): Likewise.
1564 (elf64_x86_64_relocate_section): Likewise.
1565 (elf64_x86_64_finish_dynamic_sections): Likewise.
1566 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1569 2009-06-10 Philip Blundell <philb@gnu.org>
1571 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1572 elf_sec->this_hdr == NULL.
1574 2009-06-12 Tristan Gingold <gingold@adacore.com>
1576 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1577 * bfd-in2.h: Regenerated.
1578 * libbfd.h: Regenerated.
1580 * mach-o.c (FILE_ALIGN): New macro.
1581 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1582 (bfd_mach_o_print_symbol): Ditto.
1583 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1584 (bfd_mach_o_get_reloc_upper_bound): New function.
1585 (bfd_mach_o_canonicalize_reloc): Ditto.
1586 (bfd_mach_o_scan_write_relocs): Ditto.
1587 (bfd_mach_o_scan_write_section_32): Remove offset argument.
1588 (bfd_mach_o_scan_write_section_64): Ditto.
1589 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
1590 written for load command. Do not compute section file offset.
1591 (bfd_mach_o_scan_write_segment_64): Ditto.
1592 (bfd_mach_o_scan_write_symtab): Compute file offset first.
1593 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
1595 (bfd_mach_o_mangle_symbols): ... this new function.
1596 (bfd_mach_o_write_contents): Be sure to have load commands built.
1597 Call bfd_mach_o_mangle_symbols.
1598 (bfd_mach_o_build_commands): Adjust for filelen field.
1599 Use FILE_ALIGN macro. Clear section file offset if section is empty.
1600 Do not set symtab file offset anymore here.
1601 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1602 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1603 Set reloc_count and rel_filepos section fields.
1604 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1606 (bfd_mach_o_scan_read_section_64): Ditto.
1607 (bfd_mach_o_scan_read_section): Ditto.
1608 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1609 bfd_mach_o_asymbol. Use unsigned int for file offset type.
1610 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1611 Handle weak-ref symbols.
1612 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1613 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1614 (bfd_mach_o_scan): Remove assignment to removed field.
1615 (bfd_mach_o_mkobject_init): Ditto.
1616 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1617 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1618 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1619 (bfd_mach_o_swap_reloc_in): Ditto.
1620 (bfd_mach_o_swap_reloc_out): Ditto.
1622 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1623 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1624 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1625 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1626 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1627 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1628 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1629 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1630 (BFD_MACH_O_N_WEAK_DEF): New macros.
1632 (bfd_mach_o_section_type): Add new enumeration values.
1633 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1634 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1635 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1636 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1638 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1639 (BFD_MACH_O_GENERIC_RELOC_PAIR)
1640 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1641 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1642 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1643 (BFD_MACH_O_RELENT_SIZE): Ditto.
1644 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1645 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1646 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1647 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1648 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1649 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1650 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1651 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1652 (bfd_mach_o_reloc_info): New struct.
1653 (bfd_mach_o_asymbol): New struct.
1654 (bfd_mach_o_symtab_command): The symbols field is now of type
1656 (bfd_mach_o_load_command): The offset and len fields are now of type
1658 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1659 Add a filelen field. Add comments.
1660 (bfd_mach_o_backend_data): New struct.
1661 (bfd_mach_o_get_backend_data): New macro.
1662 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1664 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1665 (bfd_mach_o_get_reloc_upper_bound): New prototype.
1666 (bfd_mach_o_canonicalize_reloc): Ditto.
1668 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1669 duplicated macro. Now defined to _bfd_generic_is_local_label.
1670 (TARGET_NAME_BACKEND): New macro...
1671 (TARGET_NAME_BACKEND): ... used to name a new variable.
1672 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1673 Mach-O backend data.
1675 * mach-o-i386.c (i386_howto_table): New variable.
1676 (bfd_mach_o_i386_swap_reloc_in): New function.
1677 (bfd_mach_o_i386_swap_reloc_out): Ditto.
1678 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1679 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1680 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1681 (bfd_mach_o_bfd_reloc_type_lookup)
1682 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1684 2009-06-11 Eric Paris <eparis@redhat.com>
1685 Nick Clifton <nickc@redhat.com>
1687 * opncls.c (_maybe_make_executable): New function. Gives execute
1688 permission to an executable bfd that was opened for writing
1689 provided that it is a regular file. Replaces common code found in...
1690 (bfd_close): here and ...
1691 (bfd_close_all_done): here.
1693 2009-06-11 Anthony Green <green@moxielogic.com>
1695 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1696 * bfd-in2.h: Rebuilt.
1697 * libbfd.h: Rebuilt.
1698 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1700 (moxie_reloc_map): Ditto.
1701 Clean up copyright notice.
1703 2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1705 * bfd-in2.h: bfd_mmap prototype.
1706 * bfdio.c (bfd_mmap): New function.
1707 * libbfd.h (bfd_iovec): Add bmmap.
1708 * cache.c (cache_bmmap): New function.
1709 (cache_iovec): Initialize bmmap member.
1710 * opencls.c (opncls_bmmap): New function.
1711 (opncls_iovec): Initialize bmmap member.
1713 2009-06-09 Tristan Gingold <gingold@adacore.com>
1715 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1716 and stabstr_segment fields.
1717 (mach_o_be_vec, mach_o_le_vec): Removed
1718 (bfd_mach_o_version): New prototype.
1720 * mach-o.c (bfd_mach_o_version): Make this function public.
1721 (mach_o_wide_p): New function.
1722 (bfd_mach_o_wide_p): Ditto.
1723 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1725 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1726 Search in the list only if the name starts with a dot.
1727 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1728 test. Check bfd_seek status.
1729 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1730 (bfd_mach_o_scan_write_section_32): Ditto.
1731 (bfd_mach_o_scan_write_section_64): Ditto.
1732 (bfd_mach_o_scan_write_section): Removed.
1733 (bfd_mach_o_scan_write_segment): Split into ...
1734 (bfd_mach_o_scan_write_segment_32): ... this and ...
1735 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
1736 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1737 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
1738 symbol table. Now returns a boolean.
1739 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
1740 Adjust for status type.
1741 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1742 test. Write symbol table. Numbers the sections.
1743 (bfd_mach_o_read_header): Check bfd_seek status.
1744 Use mach_o_wide_p instead of hard-coded test.
1745 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1746 (bfd_mach_o_scan_read_section_64): Ditto.
1747 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
1748 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
1749 handled common symbols.
1750 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1751 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1752 (bfd_mach_o_scan_read_dylinker): Ditto.
1753 (bfd_mach_o_scan_read_dylib): Ditto.
1754 (bfd_mach_o_scan_read_thread): Ditto.
1755 (bfd_mach_o_scan_read_symtab): Ditto.
1756 Do not create a section for the stabs.
1757 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1758 (bfd_mach_o_scan_read_segment): Ditto.
1759 (bfd_mach_o_scan_read_command): Ditto.
1760 (bfd_mach_o_scan_start_address): Ditto.
1761 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1762 (bfd_mach_o_archive_p): Check bfd_seek status.
1763 (bfd_mach_o_core_fetch_environment): Ditto.
1765 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1767 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1769 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1770 (elf_i386_link_hash_table_create): Initialize irelifunc.
1771 (elf_i386_check_relocs): Updated. Set up irelifunc for
1773 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1774 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1776 (elf_i386_relocate_section): Likewise.
1778 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1779 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1780 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1782 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1783 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1785 (elf64_x86_64_relocate_section): Likewise.
1787 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1789 (_bfd_elf_create_ifunc_sections): This.
1791 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
1793 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1796 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1798 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1799 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1800 building shared object. Check info->executable instead of
1801 !info->shared when setting non_got_ref.
1802 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1803 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1804 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1806 (elf_i386_relocate_section): Output dynamic relocation for
1807 R_386_32 against STT_GNU_IFUNC symbol to get the real
1808 function address when building shared object.
1809 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1810 relocation for STT_GNU_IFUNC symbol in shared object.
1812 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1813 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1814 symbol when building shared object. Check info->executable
1815 instead of !info->shared when setting non_got_ref.
1816 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1817 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1818 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1820 (elf64_x86_64_relocate_section): Output dynamic relocation
1821 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1822 function address when building shared object.
1823 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1824 relocation for STT_GNU_IFUNC symbol in shared object.
1826 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1828 * Makefile.am: Run "make dep-am".
1829 (BFD32_BACKENDS): Add mach-o-i386.lo.
1830 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1831 * Makefile.in: Regenerate.
1833 2009-06-06 Alan Modra <amodra@bigpond.net.au>
1835 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1836 when looking for soft-icache stubs.
1838 2009-06-05 Tristan Gingold <gingold@adacore.com>
1840 * mach-o.h: Update copyright year.
1841 (bfd_mach_o_mach_header_magic): New enum.
1842 (bfd_mach_o_cpu_subtype): Now an enum.
1843 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1844 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1845 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1846 (bfd_mach_o_load_command): Field type_required is now a boolean.
1847 Reindent prototypes.
1848 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1849 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1850 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1851 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1852 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1853 (bfd_mach_o_canonicalize_symtab): Ditto.
1854 (bfd_mach_o_get_symbol_info): Ditto.
1855 (bfd_mach_o_print_symbol): Ditto.
1856 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1857 (bfd_mach_o_make_empty_symbol): Ditto.
1858 (bfd_mach_o_write_contents): Ditto.
1860 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1861 bfd_mach_o_mkobject): Defines.
1862 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1863 Do not check with target vector but with flavour.
1864 (struct mach_o_section_name_xlat): New declaration.
1865 (dwarf_section_names_xlat): Ditto.
1866 (text_section_names_xlat): Ditto.
1867 (data_section_names_xlat): Ditto.
1868 (struct mach_o_segment_name_xlat): Ditto.
1869 (segsec_names_xlat): Ditto.
1870 (bfd_mach_o_convert_section_name_to_bfd): New function.
1871 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1872 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1873 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1874 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1875 Accept any input and output flavour. Do not share private data
1877 (bfd_mach_o_count_symbols): Add a comment.
1878 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1879 (bfd_mach_o_canonicalize_symtab): Ditto.
1880 (bfd_mach_o_get_symbol_info): Ditto.
1881 (bfd_mach_o_print_symbol): Ditto.
1882 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1883 Use constants instead of hard-coded values.
1884 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1886 (bfd_mach_o_scan_write_section_64): Ditto.
1887 (bfd_mach_o_scan_write_segment): Ditto.
1888 Do not copy sections anymore.
1889 (bfd_mach_o_write_contents): Make it public.
1890 Remove dead code. Rewrite typeflag assignment.
1891 (bfd_mach_o_build_commands): New function.
1892 (bfd_mach_o_set_section_contents): Ditto.
1893 (bfd_mach_o_make_empty_symbol): Make it public.
1894 (bfd_mach_o_read_header): Make it static.
1895 Convert to bfd_boolean.
1896 Use constants instead of hard-coded values.
1897 (bfd_mach_o_make_bfd_section): Call
1898 bfd_mach_o_convert_section_name_to_bfd to create name.
1899 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1901 (bfd_mach_o_scan_read_section_64): Ditto.
1902 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1903 a segment anymore. Use constants instead of hard-coded values.
1904 (bfd_mach_o_scan_read_command): Fix style.
1905 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1906 Get rid of BFD_IO_FUNCS.
1907 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1908 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1909 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1910 (bfd_mach_o_object_p): Removed.
1911 (bfd_mach_o_gen_core_p): New function, replaces ...
1912 (bfd_mach_o_core_p): ... deleted.
1913 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1915 * mach-o-i386.c: New file.
1916 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1917 * configure.in (TDEFINES): Add mach_o_i386_vec.
1918 * configure: Regenerated.
1919 * targets.c: Add mach_o_i386_vec.
1921 * mach-o.c: Update copyright years.
1922 (BFD_IO_FUNCS): Remove (was not used).
1923 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1924 bfd_mach_o_slurp_extended_name_table,
1925 bfd_mach_o_construct_extended_name_table,
1926 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1927 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1928 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1929 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1930 bfd_mach_o_get_section_contents_in_window,
1931 bfd_mach_o_bfd_is_local_label_name,
1932 bfd_mach_o_bfd_is_target_special_symbol,
1933 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1934 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1935 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1936 bfd_mach_o_minisymbol_to_symbol,
1937 bfd_mach_o_bfd_get_relocated_section_contents,
1938 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1939 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1940 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1941 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1942 bfd_mach_o_bfd_merge_private_bfd_data,
1943 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1944 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1945 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1946 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1947 bfd_mach_o_bfd_copy_private_header_data,
1948 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1949 * mach-o-target.c: ... here.
1950 Update copyright years.
1952 2009-06-04 Alan Modra <amodra@bigpond.net.au>
1954 * dep-in.sed: Don't use \n in replacement part of s command.
1955 * Makefile.am (DEP1): LC_ALL for uniq.
1957 * Makefile.in: Regenerate.
1959 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1961 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1962 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1963 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1965 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1967 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1968 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1969 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1970 against STT_GNU_IFUNC symbols for static executables.
1971 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1972 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1974 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1975 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1976 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1977 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1979 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1981 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1982 symbols to be left unimported when linking statically.
1983 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1984 code when linking statically.
1986 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1988 * elf32-i386.c (elf_i386_check_relocs): Increment
1989 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1990 against STT_GNU_IFUNC symbol.
1991 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1992 local STT_GNU_IFUNC definition is used.
1993 (elf_i386_relocate_section): Handle got.offset != -1 for
1994 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1997 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1998 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1999 relocations against STT_GNU_IFUNC symbol.
2000 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2001 local STT_GNU_IFUNC definition is used.
2002 (elf64_x86_64_relocate_section): Handle got.offset != -1
2003 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2004 STT_GNU_IFUNC symbol.
2006 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2009 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2010 (elf_i386_reloc_type_lookup): Likewise.
2011 (R_386_tls): Removed.
2012 (R_386_irelative): New.
2013 (R_386_vt_offset): Updated.
2014 (elf_i386_rtype_to_howto): Likewise.
2015 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2016 (elf_i386_link_hash_table_create): Initialize igotplt,
2018 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2019 (elf_i386_adjust_dynamic_symbol): Likewise.
2020 (elf_i386_allocate_dynrelocs): Likewise.
2021 (elf_i386_relocate_section): Likewise.
2022 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2024 (elf_i386_finish_dynamic_symbol): When building a static
2025 executable, use .iplt, .igot.plt and .rel.iplt sections for
2026 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
2027 locally defined STT_GNU_IFUNC symbol.
2029 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2030 (x86_64_reloc_map): Likewise.
2031 (R_X86_64_standard): Updated.
2032 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2033 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2035 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2036 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2037 (elf64_x86_64_allocate_dynrelocs): Likewise.
2038 (elf64_x86_64_relocate_section): Likewise.
2039 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2041 (elf64_x86_64_finish_dynamic_symbol): When building a static
2042 executable, use .iplt, .igot.plt and .rela.iplt sections for
2043 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
2044 for locally defined STT_GNU_IFUNC symbol.
2046 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2047 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2049 * bfd-in2.h: Regenerated.
2050 * libbfd.h: Likewise.
2052 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2054 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2055 (_bfd_elf_make_ifunc_reloc_section): Removed.
2056 (_bfd_elf_is_ifunc_symbol): Likewise.
2057 (_bfd_elf_create_static_ifunc_sections): New.
2059 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2061 (elf_link_add_object_symbols): Here.
2062 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2063 STT_GNU_IFUNC symbol.
2064 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2065 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2066 (IFUNC_INFIX): Removed.
2067 (get_ifunc_reloc_section_name): Likewise.
2068 (_bfd_elf_make_ifunc_reloc_section): Likewise.
2069 (_bfd_elf_is_ifunc_symbol): Likewise.
2070 (_bfd_elf_create_static_ifunc_sections): New.
2072 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
2074 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2075 (create_got_section): Likewise.
2076 (allocate_dynrelocs): Likewise.
2077 (readonly_dynrelocs): Likewise.
2078 (set_tls_module_base): Likewise.
2079 (dtpoff_base): Likewise.
2081 (elf_i386_link_hash_table_create): Updated.
2082 (elf_i386_create_dynamic_sections): Likewise.
2083 (elf_i386_check_relocs): Likewise.
2084 (elf_i386_size_dynamic_sections): Likewise.
2085 (elf_i386_relocate_section): Likewise.
2087 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2088 (create_got_section): Likewise.
2089 (allocate_dynrelocs): Likewise.
2090 (readonly_dynrelocs): Likewise.
2091 (set_tls_module_base): Likewise.
2092 (dtpoff_base): Likewise.
2094 (elf64_x86_64_link_hash_table_create): Updated.
2095 (elf64_x86_64_create_dynamic_sections): Likewise.
2096 (elf64_x86_64_check_relocs): Likewise.
2097 (elf64_x86_64_size_dynamic_sections): Likewise.
2098 (elf64_x86_64_relocate_section): Likewise.
2100 2009-05-28 Nick Clifton <nickc@redhat.com>
2102 * targets.c (_bfd_target_vector): Only include plugin target in
2103 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2105 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2107 * elf32-spu.c (struct call_info): New member broken_cycle.
2108 (remove_cycle): Instead of physically removing call_info structures
2109 to break call graph cycles, mark them using the broken_cycle flag.
2110 (mark_overlay_section): Respect broken_cycle flag.
2111 (unmark_overlay_section): Likewise.
2112 (collect_lib_sections): Likewise.
2113 (collect_overlays): Likewise.
2114 (sum_stack): Likewise.
2116 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2118 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2119 (mark_functions_via_relocs): Initialize callee->count to 1.
2120 (pasted_function): Likewise.
2121 (spu_elf_auto_overlay): Honor call counts when determining number
2122 of stubs required in software i-cache mode.
2124 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2126 * plugin.c (program_name): Remove.
2127 (plugin_program_name): New.
2128 (bfd_plugin_set_program_name): New.
2129 (try_load_plugin): Use plugin_program_name.
2130 * plugin.h (bfd_plugin_set_program_name): New.
2132 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2134 * aclocal.m4: Include ../config/plugins.m4.
2135 * configure.in: Use AC_PLUGINS.
2136 * configure: Regenerate.
2137 * Makefile.in: Regenerate.
2138 * doc/Makefile.in: Regenerate.
2140 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
2142 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2144 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2145 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2146 * elf32-avr.c (elf32_avr_relax_section): Likewise.
2147 * elf32-frv.c (elf32_avr_relax_section): Likewise.
2148 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2149 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2150 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2151 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2152 * reloc.c (bfd_generic_relax_section): Likewise.
2153 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2154 * vms.c (vms_bfd_relax_section): Likewise.
2156 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
2158 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2160 * elf32-i386.c (is_indirect_symbol): Renamed to ...
2161 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2163 * elf32-i386.c (allocate_dynrelocs): Updated.
2164 (elf_i386_relocate_section): Likewise.
2165 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2166 (elf64_x86_64_relocate_section): Likewise.
2168 * elf64-x86-64.c (is_indirect_symbol): Removed.
2170 2009-05-26 Nick Clifton <nickc@redhat.com>
2172 * po/id.po: Updated Indonesian translation.
2174 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
2176 * Makefile.am: Run "make dep-am".
2179 (ALL_MACHINES): Add cpu-plugin.lo.
2180 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2181 (BFD32_BACKENDS): Add plugin.lo.
2182 (BFD32_BACKENDS_CFILES): Add plugin.c.
2183 (libbfd_la_LIBADD): Add LIBDL
2184 * archures.c (bfd_architecture): Add bfd_arch_plugin.
2185 (bfd_plugin_arch): Declare.
2186 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2187 * bfd.c (bfd): Add plugin_data.
2188 * config.bfd: Handle the plugin target.
2189 * configure.in: Check for --enable-plugins.
2190 (LT_INIT): Use the dlopen option.
2191 * cpu-plugin.c: New.
2194 * targets.c (plugin_vec): Declare.
2195 (_bfd_target_vector): Add plugin_vec.
2196 * Makefile.in: Regenerate.
2197 * bfd-in2.h: Regenerate.
2198 * configure: Regenerate.
2200 2009-05-26 Alan Modra <amodra@bigpond.net.au>
2202 * dep-in.sed: Don't modify .o to .lo here. Output one filename
2203 per line with all lines having continuation backslash. Prefix
2204 first line with "A", following lines with "B".
2205 * Makefile.am (DEP): Don't use dep.sed here.
2206 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
2207 dep.sed here on dependencies, sort and uniq.
2208 * Makefile.in: Regenerate.
2210 2009-05-25 Tristan Gingold <gingold@adacore.com>
2212 * makefile.vms: Add verilog.obj to object list OBJS.
2214 2009-05-24 Alan Modra <amodra@bigpond.net.au>
2216 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
2217 for BFD_IN_MEMORY is cleared.
2218 (bfd_bwrite): Zero excess memory allocated.
2220 2009-05-22 Julian Brown <julian@codesourcery.com>
2222 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2224 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2225 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2226 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2227 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2228 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2229 (a8_erratum_fix, a8_erratum_reloc): New structs.
2230 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2231 num_a8_erratum_fixes, fix_cortex_a8 fields.
2232 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2233 (elf32_arm_add_stub): Split into two parts, creating...
2234 (elf32_arm_create_or_find_stub_sec): New function.
2235 (elf32_arm_final_link_relocate): Add forward declaration.
2236 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2237 relocations, multiple relocations per stub.
2238 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2239 (arm_size_one_stub): Use find_stub_size_and_template.
2240 (a8_reloc_compare): New.
2241 (find_thumb_glue): Add forward declaration.
2242 (cortex_a8_erratum_scan): New.
2243 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2244 (bfd_elf32_arm_set_cortex_a8_fix): New.
2245 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2246 (arm_map_one_stub): Add THUMB32_TYPE support.
2247 (a8_branch_to_stub_data): New.
2248 (make_branch_to_a8_stub): New.
2249 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2250 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2251 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2252 Cortex-A8 erratum workaround.
2253 * bfd-in2.h: Regenerate.
2255 2009-05-22 Alan Modra <amodra@bigpond.net.au>
2257 * Makefile.am: Run "make dep-am".
2258 * Makefile.in: Regenerate.
2259 * po/SRC-POTFILES.in: Regenerate.
2261 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2263 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2266 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2268 * elf-bfd.h (struct elf_backend_data
2269 <elf_backend_link_output_symbol_hook>): Return an int.
2270 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2271 symbols on deleted .opd entries.
2272 * elflink.c (elf_link_output_sym): Return without outputting sym
2273 if output_symbol_hook returns 2.
2274 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2275 Abort if we must not discard sym.
2276 (elf_link_input_bfd): Similarly, don't set finfo->indices for
2278 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2279 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2280 elf_backend_link_output_symbol_hook return type change.
2281 * elf32-arm.c (output_arch_syminfo): Likewise.
2282 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2283 (elf32_arm_output_arch_local_syms): Likewise.
2284 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2285 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2286 (bfd_score_elf_link_output_symbol_hook): Likewise.
2287 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2288 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2289 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2290 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2291 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2292 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2293 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2294 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2295 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2296 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2297 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2299 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2301 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2302 out of range .opd symbols.
2304 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
2306 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
2307 fprintf_vma directly.
2308 * peXXigen.c (pe_print_edata): Likewise.
2309 (pe_print_pdata): Likewise.
2310 (_bfd_XX_print_ce_compressed_pdata): Likewise.
2311 (_bfd_XX_print_private_bfd_data_common): Likewise.
2313 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
2315 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
2317 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
2318 Paul Brook <paul@codesourcery.com>
2320 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2321 fix discarded sections.
2323 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2325 * elf32-spu.c (mark_overlay_section): Move .init and .fini
2326 sections into the software icache.
2328 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2330 * elf32-spu.c (build_stub): Always build "compact" sofware
2333 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2335 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2336 (spu_elf_setup): Initialize it.
2337 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2338 Update to new-sytle cache manager data structures.
2339 (spu_elf_build_stubs): Generate new-style cache manager data
2340 structures and symbols.
2341 (spu_elf_auto_overlay): Update size computation.
2343 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2345 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2346 segments first amongst the program headers.
2348 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2350 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2351 into addresses for relocation types that look at high bits. Remove
2352 special handling of relocation overflow warnings.
2354 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2356 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2357 control flow graph between fragments of a function.
2359 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2361 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2362 generate only a 16-byte .toe section.
2363 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2365 2009-05-14 Alan Modra <amodra@bigpond.net.au>
2367 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2368 (spu_elf_place_overlay_data): ..here. New function.
2369 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2371 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
2373 * elf32-arm.c: Move sysdep.h to start of file.
2375 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
2377 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2379 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
2380 __icache_tag_array and __icache_tag_array_size.
2382 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
2384 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2386 (bfinfdpic_link_omit_section_dynsym): Likewise.
2387 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2389 2009-05-05 Paul Brook <paul@codesourcery.com>
2391 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2392 * bfd-in2.h: Regenerate.
2393 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2394 (_arm_elf_section_data): Add text and exidx fields.
2395 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2396 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2397 copy_exidx_entry): New functions.
2398 (elf32_arm_write_section): Fixup .ARM.exidx contents.
2400 2009-05-05 Christophe lyon <christophe.lyon@st.com>
2402 * elf32-arm.c (DEF_STUBS): New helper define.
2403 (DEF_STUB): Likewise.
2404 (stub_def): New type.
2405 (stub_definitions): New array, containing stub template pointers
2407 (arm_size_one_stub): Make use of stub_definitions.
2409 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
2411 * elflink.c (find_version_for_sym): Remove from here, ...
2412 * linker.c (bfd_find_version_for_sym): ... rename, replace
2413 here, make public and update all callers.
2414 * bfd-in2.h: Regenerate.
2416 2009-04-30 Nick Clifton <nickc@redhat.com>
2418 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2420 (struct elf_obj_data): Add has_ifunc_symbols boolean.
2421 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2422 into a STT_GNU_IFUNC symbol type.
2423 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2425 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2426 the binary contains ifunc symbols.
2427 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2428 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2429 * elf32-i386.c (is_indirect_function): New function.
2430 (elf_i386_check_relocs): Create an ifunc output section.
2431 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2432 section if necessary.
2433 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2435 (elf_i386_add_symbol_hook): New function. Set the
2436 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2437 symbol is encountered.
2438 (elf_backend_post_process_headers): Define.
2439 (elf_backend_add_symbol_hook): Define.
2440 (elf_i386_post_process_headers): Rename to
2441 elf_i388_fbsd_post_process_headers.
2442 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2443 (is_indirect_function): New function.
2444 (elf64_x86_64_check_relocs): Create an ifunc output section.
2445 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2446 section if necessary.
2447 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2448 symbol if necessary.
2449 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2450 elf_obj_data structure if an ifunc symbol is encountered.
2451 (elf_backend_post_process_headers): Define.
2452 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2453 if we have ifunc symbols to handle.
2454 (get_ifunc_reloc_section_name): New function. Computes the name
2455 for an ifunc section.
2456 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
2457 section to hold ifunc relocs.
2458 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2459 (bfd_print_symbol_vandf): Handle ifunc symbols.
2460 (bfd_decode_symclass): Likewise.
2461 * bfd-in2.h: Regenerate.
2463 2009-04-30 Joseph Myers <joseph@codesourcery.com>
2465 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2466 MOVW and MOVT relocations in a shared library link.
2468 2009-04-27 Anthony Green <green@moxielogic.com>
2470 * verilog.c: New file.
2471 * Makefile.am (BFD32_LIBS): Add verilog.c.
2472 (BFD32_LIBS_CFILES): Add verilog.c.
2473 (verilog.lo): New build rule.
2474 * Makefile.in: Rebuilt.
2475 * targets.c: Add verilog support.
2476 * bfd.c (tdata union): Add Verilog private data field.
2477 * bfd-in2.h: Regenerate.
2479 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
2481 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2484 2009-04-23 Matthias Klose <doko@ubuntu.com>
2486 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
2488 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
2491 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2492 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2493 (elf32_arm_size_stubs): Likewise.
2494 (record_thumb_to_arm_glue): Deleted unused function.
2495 (bfd_elf32_arm_process_before_allocation): No longer handle
2496 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2497 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2498 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2500 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
2502 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2503 (elf32_arm_write_section): Declare early.
2504 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2505 (arm_allocate_glue_section_space): Exclude empty sections.
2506 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2507 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2509 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2510 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2511 (elf32_arm_size_dynamic_sections): Allocate interworking
2513 (bfd_elf32_bfd_final_link): Define.
2515 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2517 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
2519 * coffcode.h (coff_compute_section_file_positions): Clear
2520 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2522 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2523 force_minimum_alignment.
2525 * libcoff.h: Regenerated.
2527 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2528 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2530 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2531 nor target_subsystem.
2533 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2534 force_minimum_alignment nor target_subsystem.
2536 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
2538 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2539 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2540 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2541 include in coff-x86_64.c of headers.
2542 (PDATA_ROW_SIZE): New define.
2543 (pex_regs[]): New static array.
2544 (pex64_get_runtime_function): New static function.
2545 (pex64_get_unwind_info): Likewise.
2546 (pex64_get_scope_entry): Likewise.
2547 (pex64_xdata_print_uwd_codes): Likewise.
2548 (pex64_get_section_by_rva): Likewise.
2549 (pex64_dump_xdata): Likewise.
2550 (pex64_bfd_print_pdata): Likewise.
2551 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2552 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2553 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2555 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
2556 Alan Modra <amodra@bigpond.net.au>
2557 Dave Korn <dave.korn.cygwin@gmail.com>
2559 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2560 long names and non-NUL-terminated strings.
2562 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2564 * bfd-in2.h: Regenerated.
2566 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2568 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2569 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2571 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2574 * coffcode.h (bfd_pei_p): New.
2576 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2577 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2578 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2579 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
2580 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2581 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2583 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2584 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2585 bfd_efi_rtdrv_x86_64_vec,
2586 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
2587 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2588 * targets.c: Likewise.
2590 * configure: Regenerated.
2591 * libcoff.h: Likewise.
2592 * Makefile.in: Likewise.
2594 * efi-app-ia32.c: Removed.
2595 * efi-app-x86_64.c: Likewise.
2596 * efi-bsdrv-ia32.c: Likewise.
2597 * efi-bsdrv-ia64.c: Likewise.
2598 * efi-bsdrv-x86_64.c: Likewise.
2599 * efi-rtdrv-ia32.c: Likewise.
2600 * efi-rtdrv-ia64.c: Likewise.
2601 * efi-rtdrv-x86_64.c: Likewise.
2602 * efi-rtdrv-ia32.c: Likewise.
2604 * efi-app-ia64.c: Moved to ...
2606 (TARGET_SYM): Set to bfd_pei_ia64_vec.
2607 (TARGET_NAME): Set to pei-ia64.
2609 * libpei.h (bfd_target_pei_p): Removed.
2610 (bfd_target_pei_arch): Likewise.
2611 (bfd_target_efi_app_p): Likewise.
2612 (bfd_target_efi_app_arch): Likewise.
2613 (bfd_target_efi_bsdrv_p): Likewise.
2614 (bfd_target_efi_bsdrv_arch): Likewise.
2615 (bfd_target_efi_rtdrv_p): Likewise.
2616 (bfd_target_efi_rtdrv_arch): Likewise.
2617 (bfd_pe_executable_p): Likewise.
2619 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2620 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2621 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2622 and efi-rtdrv-ia32.c.
2623 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2624 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2625 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2626 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2627 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2628 efi-rtdrv-x86_64.c. Add pei-ia64.c.
2629 (efi-app-ia64.lo): Removed.
2630 (efi-bsdrv-ia32.lo): Likewise.
2631 (efi-rtdrv-ia32.lo): Likewise.
2632 (efi-app-ia64.lo): Likewise.
2633 (efi-bsdrv-ia64.lo): Likewise.
2634 (efi-rtdrv-ia64.lo): Likewise.
2635 (efi-app-x86_64.lo): Likewise.
2636 (efi-bsdrv-x86_64.lo): Likewise.
2637 (efi-rtdrv-x86_64.lo): Likewise.
2640 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2642 (arch_type): Removed.
2643 (pe_arch): Likewise.
2644 (pe_bfd_object_p): Just return coff_object_p.
2646 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2647 bfd_pe_executable_p with bfd_pei_p.
2649 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
2651 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2652 PLT entries to an undefined symbol when generating a shared
2655 2009-04-17 Nick Clifton <nickc@redhat.com>
2658 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2660 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
2662 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2663 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2664 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2665 * binary.c (binary_bfd_define_common_symbol): Likewise.
2666 * bout.c (b_out_bfd_define_common_symbol): Likewise.
2667 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2668 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2669 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2670 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2671 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2672 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2673 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2674 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2675 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2676 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2677 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2678 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2679 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2680 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2681 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2682 * som.c (som_bfd_define_common_symbol): Likewise.
2683 * srec.c (srec_bfd_define_common_symbol): Likewise.
2684 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2685 * versados.c (versados_bfd_define_common_symbol): Likewise.
2686 * vms.c (vms_bfd_define_common_symbol): Likewise.
2687 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2688 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2689 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2690 (pmac_xcoff_vec): Likewise.
2691 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2692 (aix5coff64_vec): Likewise.
2693 * linker.c (bfd_generic_define_common_symbol): New function.
2694 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2695 (_bfd_define_common_symbol): New field.
2696 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2697 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2698 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2700 * bfd-in2.h: Regenerate.
2701 * libbfd.h: Likewise.
2702 * libcoff.h: Likewise.
2704 2009-04-15 Anthony Green <green@moxielogic.com>
2706 * targets.c: Add moxie support.
2707 * Makefile.am: Ditto.
2708 * Makefile.in: Rebuilt.
2709 * cpu-moxie.c, elf32-moxie.c: New files.
2710 * archures.c: Add moxie support.
2711 * configure.in: Add moxie support.
2712 * configure: Rebuilt.
2713 * config.bfd, archures.c: Add moxie support.
2714 * bfd-in2.h: Rebuilt.
2716 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
2718 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2719 branch to an undef weak symbol into a jump to next instruction if
2720 a PLT entry will be created.
2722 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
2724 * coffgen.c (make_a_section_from_file): Set the backend long
2725 section names enable if long section names found on input.
2726 * coffcode.h: Extend long section names documentation to match.
2728 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
2730 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2733 2009-04-07 DJ Delorie <dj@redhat.com>
2735 * archures.c: Add bfd_mach_mep_c5.
2736 * bfd-in2.h: Likewise.
2737 * cpu-mep.c: Add bfd_c5_arch.
2738 * elf32-mep.c: Support it.
2740 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
2742 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2743 info->callbacks->einfo.
2744 * linker.c (_bfd_generic_section_already_linked): Likewise.
2746 2009-04-06 DJ Delorie <dj@redhat.com>
2748 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2750 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
2752 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2753 _bfd_pex64_print_pdata only if PE is defined.
2755 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2756 (_bfd_pex64_print_pdata): This.
2758 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2759 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2762 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
2764 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2765 _bfd_pep_print_x64_pdata.
2766 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2767 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2769 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2771 * elf32-xtensa.c (relax_property_section): Always set r_offset
2774 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
2776 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2777 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2779 (elf32_arm_stub_type): New enum values for the two new stubs.
2780 (arm_type_of_stub): Make use of the two new stubs.
2781 (arm_size_one_stub): Handle the two new stubs.
2783 2009-04-01 Matt Thomas <matt@netbsd.org>
2785 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2786 hidden symbols into the GOT or PLT.GOT.
2787 (elf_vax_relocate_section): Do not emit a PCREL reloc
2788 into a shared object if it is against a hidden symbol.
2790 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2792 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2793 and know_contains_shared_object_p.
2794 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2795 Cache the result in the archive_info table.
2796 (xcoff_auto_export_p): Add an "info" parameter and update the
2797 call to xcoff_archive_contains_shared_object_p.
2798 (xcoff_mark_auto_exports): Update accordingly.
2799 (xcoff_post_gc_symbol): Likewise.
2801 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2803 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2806 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2808 * coff-rs6000.c (member_layout): New structure.
2809 (archive_iterator): Likewise.
2810 (member_layout_init): New function.
2811 (archive_iterator_begin): Likewise.
2812 (archive_iterator_next): Likewise.
2813 (xcoff_write_armap_old): Use the new iterator functions.
2814 (do_shared_object_padding): Delete.
2815 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2816 handling of arch_info.
2817 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2818 first loop rather than the second. Allocate a member header if
2819 there isn't one, then work out the stat information and length
2820 in the first loop too. Use the new iterators for the second loop.
2821 (xcoff_write_archive_contents_big): Likewise.
2823 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2825 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2826 (bfd_xcoff_set_archive_import_path): Likewise.
2827 * bfd-in2.h: Regenerate.
2828 * xcofflink.c: Include libiberty.h.
2829 (xcoff_archive_info): New structure.
2830 (xcoff_archive_info_hash): New function.
2831 (xcoff_archive_info_eq): Likewise.
2832 (xcoff_get_archive_info): Likewise.
2833 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2834 (bfd_xcoff_split_import_path): New function.
2835 (bfd_xcoff_set_archive_import_path): Likewise.
2836 (xcoff_set_import_path): Move earlier in file.
2837 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2838 object to the the directory part of the bfd's filename. Get the
2839 import path and filename of an archive object from the archive's
2840 xcoff_tdata, initializing it if necessary. Update use of
2842 (bfd_link_input_bfd): Update use of import_file_id.
2843 (xcoff_write_global_symbol): Likewise.
2845 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2847 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2849 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2851 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2852 a .loader section for relocatable links.
2853 (xcoff_need_ldrel_p): New function.
2854 (xcoff_mark): Use it.
2855 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2857 (xcoff_build_ldsym): New function, split out from...
2858 (xcoff_build_ldsyms): ...here. Rename to...
2859 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2860 call xcoff_build_ldsym, if there's a loader section.
2861 (xcoff_build_loader_section): New function, extracted verbatim from...
2862 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2863 there's a loader section. Only add an __rtinit loader symbol
2864 if there's a loader section. Update after above name change.
2865 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2866 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2867 and xcoff_create_ldrel.
2868 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2869 (xcoff_reloc_link_order): Likewise, but only call it if there's
2870 a loader section. Use xcoff_symbol_section.
2871 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2872 if there's a loader section.
2874 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2876 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2878 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
2880 * elf32-arm.c (group_sections): Rewrite loops for better
2883 2009-03-30 DJ Delorie <dj@redhat.com>
2885 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2886 relocs when doing a relocatable link.
2888 2009-03-28 Mark Mitchell <mark@codesourcery.com>
2890 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2891 "ERROR:", in error messages.
2892 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2893 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2894 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2895 (elf32_arm_merge_eabi_attributes): Likewise.
2896 (elf32_arm_merge_private_bfd_data): Likewise.
2898 2009-03-27 Nick Clifton <nickc@redhat.com>
2900 * section.c (bfd_get_section_contents): Detect and handle the case
2901 where a section has the SEC_IN_MEMORY flag set but no actual
2904 2009-03-26 Alan Modra <amodra@bigpond.net.au>
2907 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2908 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2909 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2910 if we don't find matching PT_LOAD when copying.
2912 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2914 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2915 the reloc descriptions.
2917 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
2919 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2920 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2921 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2923 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2925 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2926 (bfd_i386_arch_intel_syntax): Likewise.
2927 (i8086_arch): Likewise.
2928 (bfd_x86_64_arch): Likewise.
2930 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
2932 * elf32-cris.c (cris_elf_relocate_section): <case
2933 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2934 symbols for non-allocated sections. Don't check whether to
2935 generate R_CRIS_DTPMOD for non-allocated sections.
2936 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2937 handle relocation GC:ing if applied to non-allocated section.
2938 (cris_elf_check_relocs): Similar.
2940 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2941 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2942 when emitting a known TP offset in the GOT.
2944 2009-03-23 Alan Modra <amodra@bigpond.net.au>
2946 * elf64-ppc.c (synthetic_opd): Delete.
2947 (compare_symbols): Look for .opd name rather than section match.
2948 (ppc64_elf_get_synthetic_symtab): Likewise.
2950 2009-03-21 Alan Modra <amodra@bigpond.net.au>
2952 * elf32-ppc.c (is_pic_glink_stub): Delete.
2953 (is_nonpic_glink_stub): New function.
2954 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2956 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2958 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2959 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2961 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
2962 macros for visibilty and locality checks.
2963 (elf_s390_adjust_dynamic_symbol): Likewise.
2964 (allocate_dynrelocs): Likewise.
2965 (elf_s390_relocate_section): Likewise.
2966 (elf_s390_finish_dynamic_symbol): Likewise.
2967 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2968 (elf_s390_adjust_dynamic_symbol): Likewise.
2969 (allocate_dynrelocs): Likewise.
2970 (elf_s390_relocate_section): Likewise.
2971 (elf_s390_finish_dynamic_symbol): Likewise.
2973 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
2975 * bfd-in2.h: Regenerated.
2976 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2977 for debugging sections and map memory read/write dependent on
2979 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2980 without memory read flags set.
2981 * section.c: Add SEC_COFF_NOREAD to section flags.
2983 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2985 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2988 2009-03-19 Alan Modra <amodra@bigpond.net.au>
2990 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2991 "no overlays" return. If there are overlays, create overlay
2992 manager entry symbols here, so that..
2993 (spu_elf_build_stubs): ..we don't need to set them up here.
2994 Simplify entry symbol tests.
2995 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2997 2009-03-18 Mark Kettenis <kettenis@gnu.org>
2999 * elf.c (elfcore_grok_openbsd_procinfo)
3000 (elfcore_grok_openbsd_note): New functions.
3001 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3003 2009-03-18 Alan Modra <amodra@bigpond.net.au>
3005 * vms-hdr.c: Don't include alloca.h.
3006 * elf32-m68hc1x.c: Include alloca-conf.h.
3008 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
3010 * Makefile.am: Run "make dep-am".
3011 * Makefile.in: Regenerate.
3013 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
3015 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3017 2009-03-17 Alan Modra <amodra@bigpond.net.au>
3019 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3021 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3022 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3023 ovly_return fields with ovly_entry[2]. Adjust all users.
3024 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3026 (spu_elf_build_stubs): Likewise.
3027 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
3028 ovly_flavour changes. Update all callers.
3029 (ovl_stub_size_log2): New function.
3030 (build_stub): Handle compact icache stubs. Use different manager
3031 entry point for stubs in non-icache area.
3032 (spu_elf_size_stubs): Don't allocate space for indirect branch
3034 (spu_elf_build_stubs): And don't built them.
3036 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
3038 * dwarf2.c (read_section): Always use rawsize, if available.
3040 2009-03-16 Alan Modra <amodra@bigpond.net.au>
3042 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3043 of rawsize and size for buffer.
3045 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
3047 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3048 parameter just because fixed sections fit into local store.
3049 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
3050 generating overlays if fixed sections plus reserved stack
3051 and heap space fit into local store.
3053 2009-03-15 Alan Modra <amodra@bigpond.net.au>
3055 * elf32-spu.c (build_stub): Correct icache set_id.
3056 (spu_elf_relocate_section): Likewise.
3058 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3060 * xcofflink.c (xcoff_link_check_archive_element): Only free the
3061 symbol table if it was created by the current call.
3063 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3065 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3066 class XMC_DS rather than XMC_UA.
3068 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3070 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3071 bfd_boolean export_defineds parameter with an unsigned int
3072 auto_export_flags parameter.
3073 * bfd-in2.h: Regenerate.
3074 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3075 split out from xcoff_build_ldsyms.
3076 (xcoff_covered_by_expall_p): New function.
3077 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3078 but with extra code to handle -bexpfull and -bexpall.
3079 (xcoff_mark_auto_exports): New function.
3080 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3081 a function should be automatically exported.
3082 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3083 parameter with an auto_export_flags parameter. Update ldinfo
3084 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
3087 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3089 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3090 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3091 init and fini functions. Do garbage collection for objects
3092 without an entry point too.
3094 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3096 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3097 check whether a symbol has csect information.
3098 (coff_print_aux): Likewise.
3099 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3100 information for C_AIX_WEAKEXT too.
3101 (_bfd_xcoff_swap_aux_out): Likewise.
3102 (xcoff_reloc_type_br): Handle defweak symbols too.
3103 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3104 information for C_AIX_WEAKEXT too.
3105 (_bfd_xcoff64_swap_aux_out): Likewise.
3106 (xcoff64_reloc_type_br): Handle defweak symbols too.
3107 * coffgen.c (coff_print_symbol): Handle auxillary function
3108 information for C_AIX_WEAKEXT too.
3109 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3110 instead of BSF_GLOBAL if the L_WEAK flag is set.
3111 (xcoff_dynamic_definition_p): New function.
3112 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3113 defines h. Don't change h if ldsym isn't the definition. Otherwise,
3114 always take the symbol class from the ldsym. Use weak bfd symbol
3115 types for weak ldsyms.
3116 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3117 Fix the check for whether a definition is from a shared object.
3118 Allow redefinitions of weak symbols.
3119 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3120 (xcoff_keep_symbol_p): Likewise.
3121 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3122 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3123 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3124 but mark them as L_WEAK.
3125 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3126 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3128 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3130 * xcofflink.c (xcoff_mark): When walking the relocations,
3131 only mark the target symbol or the target section, not both.
3132 (xcoff_final_definition_p): New function.
3133 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3134 symbol is a valid definition of the associated output symbol.
3135 Use XCOFF_ALLOCATED to stop the same hash table entry having
3137 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3139 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3141 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3143 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3146 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3148 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3149 * libcoff.h: Regenerate.
3150 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3151 line-number counts in the bfd's lineno_counts field.
3152 Don't keep per-csect line-number counts.
3153 (xcoff_sweep): Don't update per-csect line-number counts.
3154 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3155 entries in each output section.
3156 (xcoff_link_input_bfd): Get the number of line numbers from
3157 the bfd's lineno_counts field, rather than recalculating it
3158 from scratch. Fix the range check when updating C_BINCL and
3160 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3161 here. Don't expect csects to have line-number counts.
3163 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3165 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3166 * libcoff.h: Regenerate.
3167 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3168 "skip" logic from xcoff_link_input_bfd.
3169 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3170 objects in a dynamic link, rather than checking whether csectpp
3171 is null. Always allocate debug_index for other objects,
3172 and always go through the loop. Update the type of debug_index
3173 after the change above. Read the auxillary csect information
3174 and use xcoff_keep_symbol_p to decide whether a symbol should
3175 be kept. Set its debug_index to -2 if not.
3176 (xcoff_link_input_bfd): Update the type of debug_index after
3177 the change above and always expect it to be nonnull. Use it to
3178 test whether a symbol should be stripped, rather than making the
3179 decision here. Postpone all symbol creation to the second pass.
3181 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3183 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3184 creating a descriptor.
3185 (xcoff_sweep): Don't mark toc_section unless it's needed.
3186 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3187 when marking every bfd.
3188 (xcoff_link_input_bfd): Skip all TOC anchors.
3189 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3190 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3191 to -1; call xcoff_find_tc0 instead.
3193 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3195 * libcoff-in.h (xcoff_section_tdata): Update commentary.
3196 * libcoff.h: Regenerate.
3197 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3198 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3199 the previous symbol's csect. Treat last_symndx as an inclusive value
3200 and simplify its handling.
3201 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
3202 symbols with the right csect. Don't mark rsec when processing
3203 relocations against undefined or absolute sections.
3204 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3205 of bfd_und_section_ptr.
3206 (xcoff_link_input_bfd): Likewise.
3208 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3210 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3211 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3212 flag is set. Assert that all undefined symbols are either
3213 imported or defined by a dynamic object.
3214 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3215 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3216 handling to all relocations. Only set XCOFF_CALLED for function
3218 (xcoff_find_function): New function, split out from...
3219 (bfd_xcoff_export_symbol) ...here.
3220 (xcoff_set_import_path): New function, split out from...
3221 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
3222 meaning of XCOFF_CALLED.
3223 (xcoff_mark_symbol): If we mark an undefined and unimported
3224 symbol, find some way of defining it. If the symbol is a function
3225 descriptor, fill in its definition automatically. If the symbol
3226 is a function, mark its descriptor and allocate room for global
3227 linkage code. Otherwise mark the symbol as implicitly imported.
3228 Move the code for creating function descriptors from...
3229 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
3230 check for symbols that were implicitly defined.
3231 (xcoff_mark): Don't count any dynamic relocations against
3233 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3234 in the xcoff link info.
3235 (xcoff_link_input_bfd): Remove handling of undefined and
3238 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3240 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3241 if the target is absolute. Fix comment typo.
3242 (xcoff_ppc_relocate_section): Remove FIXME.
3243 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3244 if the target is absolute.
3246 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3248 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3249 R_POS and R_NEG relocations against absolute symbols to the
3252 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3254 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3255 to 2 for bfd_mach_ppc_620.
3257 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3259 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3260 * configure.in: Likewise.
3261 * configure: Regenerate.
3263 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
3266 * elf.c (assign_section_numbers): Generate symbol table if there
3267 is any relocation in output.
3268 (_bfd_elf_compute_section_file_positions): Likewise.
3270 2009-03-13 Nick Clifton <nickc@redhat.com>
3273 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3274 * elflink.c (elf_link_read_relocs_from_section): Use
3275 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
3276 relocs but no symbol table.
3277 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3279 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
3282 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3283 to check ___tls_get_addr.
3285 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3286 strncmp to check __tls_get_addr.
3288 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
3290 * dwarf2.c (read_section): Always check the offset, even when the
3291 section has been read before.
3293 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
3295 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3298 2009-03-11 Chris Demetriou <cgd@google.com>
3300 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3301 * bfd-in2.h: Regenerate.
3302 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3303 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3305 (bsd_write_armap): Likewise.
3306 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3307 flag is set, do nothing.
3308 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3311 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
3313 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3314 used to update stack pointer.
3316 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3319 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3320 for unknown symbols in absolute section.
3322 2009-03-06 Nick Clifton <nickc@redhat.com>
3324 * po/es.po: Updated Spanish translation.
3326 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
3328 * elf32-arm.c (group_sections): Take next section size into
3329 account before accepting to group it.
3331 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
3333 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3335 (elf32_arm_final_link_relocate): Likewise.
3337 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
3340 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3342 2009-03-04 Alan Modra <amodra@bigpond.net.au>
3344 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3345 * section.c (struct bfd_section): Add has_tls_get_addr_call.
3346 (BFD_FAKE_SECTION): Init new flag.
3347 * ecoff.c (bfd_debug_section): Likewise.
3348 * bfd-in2.h: Regenerate.
3349 * libbfd.h: Regenerate.
3350 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3351 (ppc_elf_reloc_type_lookup): Handle new relocs.
3352 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3353 without marker relocs.
3354 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3355 if section has no old-style calls.
3356 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3357 Don't try to optimize new-style __tls_get_addr call when handling
3358 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3360 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3361 (ppc64_elf_reloc_type_lookup): Handle new relocs.
3362 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3363 without marker relocs.
3364 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3365 if section has no old-style calls. Set toc_ref for new relocs as
3367 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3368 Don't try to optimize new-style __tls_get_addr call when handling
3369 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3372 2009-03-04 Alan Modra <amodra@bigpond.net.au>
3375 * configure.in: Test for ld --as-needed support. Link shared
3376 libbfd against libm.
3377 * configure: Regenerate.
3379 2009-03-03 Alan Modra <amodra@bigpond.net.au>
3381 * Makefile.am: Run "make dep-am".
3382 * Makefile.in: Regenerate.
3384 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
3386 * elf32-score7.c: New file.
3387 * elf32-score.h: New file.
3388 * elf32-score.c: Add code to support score 7. Set score7 as the
3390 * cpu-score.c: Add score7 architecure.
3391 (compatibile): New function.
3392 * Makefile.am: Add rules for building elf32-score7 object.
3393 * Makefile.in: Regenerate.
3394 * configure.in: Add elf32-score7 object to score vectors.
3395 * configure: Regenerate.
3396 * reloc.c: Add score7 relocs.
3397 * archures.c: Add score3 and score7 machine numbers.
3398 * bfd-in2.h: Regenerate.
3399 * libbfd.h: Regenerate.
3401 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3403 * configure: Regenerate.
3405 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3407 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3408 (elf32_hppa_check_relocs): Use it.
3410 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3412 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3413 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3414 (elf_hppa_is_dynamic_loader_symbol): Likewise.
3415 (elf_hppa_record_segment_addrs): Likewise.
3416 (elf_hppa_final_link): Likewise.
3417 (elf_hppa_relocate_insn): Likewise.
3418 (elf_hppa_final_link_relocate): Likewise.
3419 (elf64_hppa_relocate_section): Likewise.
3420 * elf64-hppa.c: Insert above.
3422 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3424 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3425 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3426 (elf_hppa_relocate_section): Likewise.
3427 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3428 from struct elf_link_hash_entry. Add count field.
3429 (struct elf64_hppa_dyn_hash_table): Delete.
3430 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3431 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3432 (hppa_elf_hash_entry, eh_name): Define.
3433 (elf64_hppa_new_dyn_hash_entry): Delete.
3434 (elf64_hppa_dyn_hash_lookup): Delete.
3435 (elf64_hppa_dyn_hash_traverse): Delete.
3436 (get_dyn_name): Delete.
3437 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3438 of struct elf64_hppa_dyn_hash_entry *.
3439 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3440 allocate_global_data_plt, allocate_global_data_stub,
3441 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3443 (hppa64_link_hash_newfunc): New.
3444 (elf64_hppa_hash_table_create): Rework.
3445 (count_dyn_reloc): Likewise.
3446 (hppa64_elf_local_refcounts): New.
3447 (elf64_hppa_check_relocs): Rework using standard technique for recording
3448 local DLT, PLT and OPD reference counts.
3449 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3450 elf_link_hash_entry *.
3451 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3452 allocate_global_data_plt, allocate_global_data_stub,
3453 allocate_global_data_opd, allocate_dynrel_entries,
3454 elf64_hppa_adjust_dynamic_symbol,
3455 elf64_hppa_mark_milli_and_exported_functions): Likewise.
3456 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3457 Use hppa_link_hash_table. Rework.
3458 (elf64_hppa_link_output_symbol_hook): Rework.
3459 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3460 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3461 elf64_hppa_finish_dynamic_sections): Likewise.
3463 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
3465 * elf32-arm.c (stub_reloc_type): Removed.
3466 (insn_sequence): Renamed reloc_type field to r_type.
3467 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3468 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3469 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3470 (elf32_arm_stub_type): Add new enum entries for the new stubs.
3471 (arm_stub_is_thumb): Catch new stubs.
3472 (arm_type_of_stub): Handle new stubs.
3473 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3474 (bfd_elf32_arm_process_before_allocation): Remove useless
3477 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
3479 * elf.c (elf_find_function): Use is_function_type to check
3482 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3484 * xtensa-modules.c: Revert to previous version 1.11 due
3485 to inadvertant commit.
3487 2009-02-24 Sterling Augustine <sterling@tensilica.com>
3489 * elf32-xtensa.c (text_action_add): Separate test for action
3490 type. Break if saved action is ta_widen_insn at same offset.
3492 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3494 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3495 to elf32_arm_stub_long_branch_any_arm_pic.
3496 (elf32_arm_stub_long_branch_any_thumb_pic): New.
3497 (enum elf32_arm_stub_type, arm_type_of_stub)
3498 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3501 2009-02-24 Joseph Myers <joseph@codesourcery.com>
3503 * elf32-arm.c (PREV_SEC): Update comment.
3504 (group_sections): Rename argument to stubs_always_after_branch.
3505 Reverse the list and place stubs at the end of input sections.
3507 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3509 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3511 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3513 (arm_size_one_stub): Remove unnecessary break.
3514 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3516 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
3518 * elf32-arm.c (stub_insn_type): New type.
3519 (stub_reloc_type): Likewise.
3520 (insn_sequence): Likewise.
3521 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3522 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3523 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3524 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3525 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3526 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3527 (elf32_arm_stub_hash_entry): Add new helper fields.
3528 (stub_hash_newfunc): Initialize these new fields.
3529 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3530 to take endianness into account.
3531 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3532 (arm_map_one_stub): Code is now more generic, thanks to
3535 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
3537 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3539 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3540 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3541 BLX is not available. Fix typo in warning message. Add comments
3542 and improve formatting.
3543 (arm_build_one_stub): Adjust to new
3544 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3545 (arm_map_one_stub): Likewise.
3547 2009-02-23 Tristan Gingold <gingold@adacore.com>
3548 Eric Botcazou <ebotcazou@adacore.com>
3549 Douglas B Rupp <rupp@gnat.com>
3551 * vms.h: Update copyright year, fix comments, reorder declarations.
3552 (_bfd_save_vms_section): Remove the prototype.
3553 (EGPS_S_V_NO_SHIFT): New constant.
3554 (bfd_vms_set_section_flags): New prototype.
3555 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3557 (EGSY_S_W_FLAGS): Ditto.
3558 (EGSY_S_V_QUAD_VAL): Ditto.
3559 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3560 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3561 EGST_S_B_NAMLNG): Ditto.
3562 (ESRF_S_B_NAMLNG): Ditto.
3563 (ETIR_S_C_HEADER_SIZE): Ditto.
3564 (EGPS_S_V_ALLOC_64BIT): Ditto.
3565 (DST_S_C_EPILOG): Ditto.
3566 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3567 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3568 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3569 (DST_S_L_PCLINE_UNSLONG): Ditto.
3570 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3571 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3572 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3573 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3574 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3575 (DST_S_B_SRC_UNSBYTE): Ditto.
3576 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3578 (vms_section, vms_reloc): Remove types.
3579 (hdr_struc): Replaced by ...
3580 (hdr_struct): ... new type.
3581 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3582 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3583 (EMH_DATE_LENGTH): Ditto.
3584 (eom_struc): Replaced by ...
3585 (eom_struct): ... new type.
3586 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3587 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3588 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3589 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3590 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3591 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3592 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3593 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3594 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3595 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3596 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3597 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3598 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3599 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3600 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3601 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3602 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3603 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3604 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3605 (enum file_type_enum): New type.
3606 (struct location_struct): Removed.
3607 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3608 (struct funcinfo, struct module): Ditto.
3609 (struct vms_private_data_struct): Update fields.
3610 (struct vms_section_data_struct): New type.
3612 * vms.c: Update copyright year, fix comments,
3613 Fix includes for DECC, add prototypes.
3614 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3616 Use flavour to set is_vax, location_stack is removed.
3617 (struct pair): Declare.
3618 (fill_section_ptr): Initialize variables at declaration.
3619 Add guard to set SECTION_SYM flag, handlde und section.
3620 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3621 (_bfd_vms_slurp_object_records): New function, replaces previous
3623 (vms_slurp_module): New function.
3624 (vms_slurp_image): Ditto.
3625 (vms_object_p): Complete rewrite.
3626 (vms_mkobject): Use is_vax field to slect architecture.
3627 (free_reloc_stream): New function.
3628 (vms_convert_to_var): Ditto.
3629 (vms_convert_to_var_1): Ditto.
3630 (vms_convert_to_var_unix_filename): Ditto.
3631 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3633 (vms_new_section_hook): Set alignment to 0, allocate private data.
3634 (vms_get_section_contents): Load content.
3635 (vms_get_symbol_info): Handle undefined section.
3636 (vms_find_nearest_line): Handle.
3637 (alloc_reloc_stream): New function.
3638 (vms_slurp_reloc_table): Ditto.
3639 (vms_get_reloc_upper_bound): Make it real.
3640 (vms_canonicalize_reloc): Do the real work.
3641 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3643 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3644 (vms_set_arch_mach): Check arch.
3645 (vms_set_section_contents): Copy the content after allocation.
3646 (vms_alpha_vec): Update object flags.
3648 * vms-tir.c: Update copyright year, fix comments,
3649 add prototypes for new functions.
3650 (dst_define_location): New function.
3651 (dst_restore_location): New function.
3652 (dst_retrieve_location): New function.
3653 (dst_check_allocation): New function.
3654 (image_dump): Call dst_check_allocation.
3655 (image_write_b): Ditto.
3656 (image_write_w): Ditto.
3657 (image_write_l): Ditto.
3658 (image_write_q): Ditto.
3659 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3660 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3662 Call error handler instead of abort if name is not known.
3663 (etir_sta): Add quarter_relocs argument and set it.
3666 (etir_opr): Ditto, return FALSE in case of error.
3667 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3668 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3669 (etir_stc): Add quarter_relocs argument and set it, fix cast.
3670 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3671 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3672 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3673 Return FALSE in case of error.
3674 (tir_sta): Change sign of psect.
3676 (tir_cmd): Fix cast. Makes tir_table static const.
3677 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3678 add argument to explain.
3679 (analyze_etir): Initialize maxptr, add quarter_relocs
3680 declaration, move some declarations into inner scopes.
3681 Handle quarter_relocs and STO_IMM.
3682 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3683 (_bfd_vms_slurp_relocs): New function.
3684 (_bfd_vms_decode_relocs): New function.
3685 (sto_imm): Rewritten.
3686 (start_first_etbt_record): New function.
3687 (start_another_etbt_record): Ditto.
3688 (etir_output_check): Ditto.
3689 (defer_reloc_p): Ditto.
3690 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3691 a for-loop. Correctly deals with contents, deals with .vmsdebug,
3692 rewritte relocations handling.
3693 (_bfd_vms_write_tbt): Removed.
3694 (_bfd_vms_write_dbg): Ditto.
3696 * vms-misc.c: Update copyright year, Fix comments.
3697 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3698 (maybe_adjust_record_pointer_for_object): New function.
3699 (_bfd_vms_get_first_record): New function, replaces ...
3700 (_bfd_vms_get_record): .. removed.
3701 (_bfd_vms_get_object_record): New function.
3702 (_bfd_vms_get_object_record): New function.
3703 (vms_get_remaining_object_record): New function, replaces ...
3704 (_bfd_vms_get_next_record): ... removed.
3705 (add_new_contents): Removed.
3706 (_bfd_save_vms_section): Removed.
3707 (_bfd_get_vms_section): Removed.
3708 (_bfd_vms_output_flush): Write in VAR format.
3709 (new_symbol): Don't make UND section.
3711 * vms-hdr.c: Update copyright year, update list of record handled.
3712 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3713 (_bfd_vms_write_hdr): Strip vms and unix patches,
3714 add comments, truncate module name at 31 characters,
3715 use constants instead of hard-coded value,
3716 write BFD version instead of a fixed string.
3717 (_bfd_vms_slurp_ihd): New function.
3718 (_bfd_vms_slurp_isd): Ditto.
3719 (_bfd_vms_slurp_ihs): Ditto.
3720 (new_module): Ditto.
3721 (parse_module): Ditto
3722 (build_module_list): Ditto.
3723 (module_find_nearest_line): Ditto.
3724 (_bfd_vms_find_nearest_dst_line): Ditto.
3725 (vms_slurp_debug): Ditto.
3726 (_bfd_vms_slurp_dbg): Ditto.
3727 (_bfd_vms_slurp_tbt): Ditto.
3728 (_bfd_vms_write_dbg): Ditto.
3729 (_bfd_vms_write_tbt): Ditto.
3731 * vms-gsd.c: Update copyright year, update list of records handled.
3732 (EVAX_LITERALS_NAME): New macro.
3733 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3734 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3735 (register_universal_symbol): New function and prototype.
3736 (_bfd_vms_slurp_gsd): Fix indentations and casts,
3737 improve debug messages,
3738 use constants instead of hard-coded value,
3739 fix missing endianness conversion,
3740 handle global symbol (SYMG).
3741 (bfd_vms_set_section_flags): New function.
3742 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3743 handle section literals,
3745 handle section bfd and vms flags,
3746 don't output LIB$INITIALIZE symbol,
3747 fix handling of weak symbols,
3748 fix evax vs vax procedure descriptor,
3749 handle absolute symbols.
3751 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3752 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3754 * makefile.vms (DEFS): Fix flags for VMS.
3756 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3758 * bfd-in2.h: Regenerated.
3759 * libbfd.h: Regenerated.
3761 2009-02-20 Cary Coutant <ccoutant@google.com>
3763 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3766 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3769 * coffcode.h (coff_write_object_contents): Don't let the string
3770 table offset overflow the s_name field when using long section names.
3772 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3774 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3775 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3776 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3777 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3778 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3779 (bfd_pmac_xcoff_backend_data): Likewise.
3780 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3781 (bfd_xcoff_aix5_backend_data): Likewise.
3782 (xcoff64_write_object_contents): Delete unused long_section_names
3784 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3785 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3787 * coffcode.h (documentation): Update to describe long section names.
3788 (COFFLONGSECTIONCATHELPER): New helper macro.
3789 (BLANKOR1TOODD): Likewise.
3790 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3791 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3792 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3793 (bfd_coff_set_long_section_names_allowed): New function.
3794 (bfd_coff_set_long_section_names_disallowed): Likewise.
3795 (struct bfd_coff_backend_data): Add new backend hook function
3796 pointer _bfd_coff_set_long_section_names.
3797 (bfd_coff_set_long_section_names): New backend hook.
3798 (coff_write_object_contents): Only generate long section names if
3799 bfd_coff_long_section_names() indicates they are currently enabled.
3800 (bfd_coff_std_swap_table): Make non-const, and initialise long
3801 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3802 (ticoff0_swap_table): Likewise to both.
3803 (ticoff1_swap_table): Again, likewise to both.
3804 * coffgen.c (make_a_section_from_file): Allow long section names
3805 as inputs even if not currently allowed for outputs.
3806 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3807 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3808 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3809 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3810 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3811 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3812 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3813 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3814 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3815 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3816 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3817 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3818 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3819 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3820 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3821 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3822 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3823 * libcoff-in.h: Update copyright year to cause updated copyright
3824 year in generated libcoff.h, and fix typo.
3825 * libcoff.h: Regenerated.
3826 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3827 (_bfd_ecoff_no_long_sections): Add prototype.
3828 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3829 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3830 defined by an including .c file.
3831 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3832 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3833 (ticoff1_swap_table): Likewise to both.
3835 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
3837 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3838 stub. Catch default case error.
3839 (arm_map_one_stub): Add missing Thumb mapping symbol.
3841 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3844 * elf32-avr.c: Handle case where no local symbos exist correctly.
3846 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
3849 * elf32-arm.c (arm_long_branch_stub,
3850 arm_thumb_v4t_long_branch_stub,
3851 arm_thumb_thumb_long_branch_stub,
3852 arm_thumb_arm_v4t_long_branch_stub,
3853 arm_thumb_arm_v4t_short_branch_stub,
3854 arm_pic_long_branch_stub):
3855 Renamed to elf32_arm_stub_long_branch_any_any,
3856 elf32_arm_stub_long_branch_v4t_arm_thumb,
3857 elf32_arm_stub_long_branch_thumb_only,
3858 elf32_arm_stub_long_branch_v4t_thumb_arm,
3859 elf32_arm_stub_short_branch_v4t_thumb_arm,
3860 elf32_arm_stub_long_branch_any_any_pic.
3861 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3862 arm_thumb_thumb_stub_long_branch,
3863 arm_thumb_arm_v4t_stub_long_branch,
3864 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3865 Renamed to arm_stub_long_branch_any_any,
3866 arm_stub_long_branch_v4t_arm_thumb,
3867 arm_stub_long_branch_thumb_only,
3868 arm_stub_long_branch_v4t_thumb_arm,
3869 arm_stub_short_branch_v4t_thumb_arm,
3870 arm_stub_long_branch_any_any_pic.
3872 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3874 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3875 in branch offset check.
3877 2009-02-15 Alan Modra <amodra@bigpond.net.au>
3879 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3880 add toc.symndx and toc.add.
3881 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3883 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3885 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3886 (branch_reloc_hash_match): New function, extracted from..
3887 (ppc64_elf_tls_optimize): ..here.
3888 (ppc64_elf_relocate_section): Properly set addends when optimizing
3889 tls sequences. Avoid unnecessary reading and writing of insns.
3890 Only redo reloc when symbol changed. Bypass symbol checks when
3892 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3893 (branch_reloc_hash_match): New function, extracted from..
3894 (ppc_elf_tls_optimize): ..here.
3895 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3896 Don't clear addend on zapped __tls_get_addr reloc.
3898 2009-02-12 Nick Clifton <nickc@redhat.com>
3901 * elflink.c (bfd_elf_final_link): When counting the relocations,
3902 if the header size has not been set yet then assume that it will
3903 match the output section's reloc type.
3905 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3907 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3910 2009-02-09 Alan Modra <amodra@bigpond.net.au>
3912 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3913 (find_function): Likewise.
3914 (pasted_function): Don't error if no prior function found.
3915 (discover_functions): Revert 2008-12-10 change. Extend first
3916 function range to start of section.
3918 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3920 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3922 * elf64-hppa.h: Likewise.
3924 2009-02-06 Joseph Myers <joseph@codesourcery.com>
3926 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3929 2009-02-04 Alan Modra <amodra@bigpond.net.au>
3931 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3932 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3934 2009-02-03 Sandip Matte <sandip@rmicorp.com>
3936 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3937 * archures.c (bfd_mach_mips_xlr): Define.
3938 * bfd-in2.h: Regenerate.
3939 * cpu-mips.c (I_xlr): Define.
3940 (arch_info_struct): Add XLR entry.
3941 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3942 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3943 (mips_mach_extensions): Add XLR entry.
3945 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3947 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3949 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3951 * configure.in: AC_SUBST pdfdir.
3952 * Makefile.am: Add install-pdf, install-pdf-am
3953 and install-pdf-recursive targets. Define pdfdir.
3954 * doc/Makefile.am: Define pdf__strip_dir. Add
3955 install-pdf and install-pdf-am targets.
3956 * po/Make-in: Add install-pdf target.
3957 * configure: Regenerate.
3958 * Makefile.in: Regenerate
3959 * doc/Makefile.in: Regenerate.
3961 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3963 * bfd-in2.h: Regenerate.
3964 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3965 fields from n_entries to n_slots where appropriate, update comments.
3966 (HOWTO): Add TLS relocations.
3967 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3968 (enum elf_m68k_got_offset_size): New enum.
3969 (struct elf_m68k_got_entry.type): Move field to ...
3970 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3971 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3973 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3975 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3976 fields into n_entries array. Update comments.
3977 (elf_m68k_init_got): Simplify, update all uses.
3978 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3979 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3980 GOT entries; update name, update all uses.
3981 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3982 (elf_m68k_get_got_entry): Update.
3983 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3985 (elf_m68k_remove_got_entry_type): Simplify.
3986 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3987 (elf_m68k_can_merge_gots): Update.
3988 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3989 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3990 GOT entries, simplify.
3991 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3992 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3993 field, remove obsoleted local_n_entries field.
3994 (elf_m68k_partition_multi_got_2): New static function.
3995 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3997 (elf_m68k_remove_got_entry_type): Update.
3998 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3999 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
4000 update of sgot->size and srelgot->size.
4001 (elf_m68k_gc_sweep_hook): Update.
4002 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4003 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4005 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4006 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4008 2009-02-02 DJ Delorie <dj@redhat.com>
4010 * elf32-mep.c (config_names): Regenerate configuration.
4012 2009-02-02 Alan Modra <amodra@bigpond.net.au>
4014 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4015 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4016 * elf.c (bfd_elf_get_str_section): Make static.
4017 (bfd_elf_find_section): Delete.
4018 * libbfd.h: Regenerate.
4020 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4022 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4023 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4025 2009-01-31 Alan Modra <amodra@bigpond.net.au>
4027 * elflink.c (on_needed_list): New function.
4028 (elf_link_add_object_symbols): Link in --as-needed libs if they
4029 satisfy undefined symbols in other libs.
4031 2009-01-30 Julian Brown <julian@codesourcery.com>
4033 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4034 EXEC_P or DYNAMIC flags, and skip sections which are being linked
4035 with --just-symbols (-R).
4037 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
4039 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4040 high_pc in order to properly sign-extend VMAs.
4042 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4043 Mark Shinwell <shinwell@codesourcery.com>
4044 Catherine Moore <clm@codesourcery.com>
4046 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4048 2009-01-28 Catherine Moore <clm@codesourcery.com>
4050 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4051 SEC_LOAD for dynamic relocation sections.
4053 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4055 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4056 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4057 the size of local TLS data.
4059 2009-01-27 Andreas Schwab <schwab@suse.de>
4061 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4062 architectures in the archive.
4064 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4066 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4067 <R_CRIS_32_DTPREL>: Correct relocation value.
4069 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4070 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4071 symbols with non-default visibility.
4073 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
4075 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4076 describing the trampolines.
4077 (ppc_elf_relocate_section): Update relocs to describe the
4080 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4082 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4083 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4084 and R_PARISC_PCREL12F relocations.
4086 2009-01-24 Alan Modra <amodra@bigpond.net.au>
4089 * elflink.c (find_version_for_sym): New function split out from,
4090 but without export_dynamic test, ..
4091 (_bfd_elf_link_assign_sym_version): ..here.
4092 (_bfd_elf_export_symbol): Use it.
4094 2009-01-23 Alan Modra <amodra@bigpond.net.au>
4096 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4097 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4098 * elflink.c: ..here, somewhat modified.
4099 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4100 _bfd_elf_link_find_version_dependencies,
4101 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4102 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4103 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4105 * elflink.c: ..and make static here.
4106 (_bfd_elf_link_find_version_dependencies): Adjust for removal
4107 of output_bfd from struct elf_find_verdep_info.
4108 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4109 struct elf_info_failed.
4110 (bfd_elf_size_dynamic_sections): Adjust.
4112 2009-01-22 Alan Modra <amodra@bigpond.net.au>
4115 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4116 after comp_unit_find_line call.
4118 2009-01-21 Nick Clifton <nickc@redhat.com>
4121 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4122 tm_gmtoff field in struct tm.
4124 2009-01-21 Alan Modra <amodra@bigpond.net.au>
4126 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4127 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4128 sections in soft-icache lines unless non_ia_text. Don't add
4129 rodata if doing so would exceed line size.
4131 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
4133 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4134 types than bfd_link_hash_indirect, before early return, call
4135 _bfd_elf_link_hash_copy_indirect.
4137 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4139 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4140 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4141 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4142 (elf_backend_obj_attrs_order): New define.
4143 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4144 (elfNN_bed): Add elf_backend_obj_attrs_order.
4146 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4148 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4149 (obj_attr_size): Likewise.
4150 (write_obj_attribute): Likewise.
4151 (_bfd_elf_copy_obj_attributes): Likewise.
4152 (_bfd_elf_parse_attributes): Likewise.
4153 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4154 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4155 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4156 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4157 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4160 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4162 * elf-attrs.c (is_default_attr): Support defaultless attributes.
4163 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4164 (bfd_elf_add_obj_attr_string): Likewise.
4165 (bfd_elf_add_obj_attr_int_string): Likewise.
4166 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4167 * elf-bfd.h (struct obj_attribute): Document new flag bit.
4168 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4169 Tag_nodefaults has no default value.
4170 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4171 comment to reflect the new state.
4173 2009-01-19 Alan Modra <amodra@bigpond.net.au>
4176 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4177 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4178 (adjust_z_magix): Delete dead code handling QMAGIC.
4180 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
4182 * coffcode.h (styp_to_sec_flags): Correct interpretation of
4183 IMAGE_SCN_MEM_DISCARDABLE.
4185 2009-01-16 Alan Modra <amodra@bigpond.net.au>
4187 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4188 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4189 * configure.in (commonbfdlib): Delete.
4190 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4191 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
4192 is available, not just for linux.
4193 * po/SRC-POTFILES.in: Regenerate.
4194 * Makefile.in: Regenerate.
4195 * configure: Regenerate.
4197 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4198 Julian Brown <julian@codesourcery.com>
4200 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4201 ARM attributes in ABI 2.07.
4202 * elf32-arm.c (get_secondary_compatible_arch): New function.
4203 (set_secondary_compatible_arch): New function.
4204 (tag_cpu_arch_combine): New function.
4205 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4206 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4207 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4208 make it fit with order_01243.
4209 Add support for Tag_also_compatible_with,
4210 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4211 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4212 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4213 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4214 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4215 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4216 Rework the way unknown attributes are handled.
4217 Defer errors until all attributes have been processed.
4219 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4221 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4222 bfd_elf_add_obj_attr_int_string.
4223 Read Tag_compatibility from its new location in the attribute array,
4224 rather than the attribute list.
4225 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4226 bfd_elf_add_obj_attr_int_string.
4227 (_bfd_elf_parse_attributes): Likewise.
4228 (_bfd_elf_merge_object_attributes): There's now only one
4229 Tag_compatibility, and it's in the array, not the list.
4230 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4232 (bfd_elf_add_obj_attr_compat): Rename to
4233 bfd_elf_add_obj_attr_int_string.
4234 (bfd_elf_add_proc_attr_compat): Rename to
4235 bfd_elf_add_proc_attr_int_string.
4236 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4239 2009-01-15 Douglas B Rupp <rupp@gnat.com>
4241 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4242 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4243 (vmsutil.lo): Add dependency rule.
4244 * Makefile.in: Regenerate.
4245 * config.bfd (ia64*-*-*vms*): Add case.
4246 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4247 * configure: Regenerate.
4248 * vmsutil.c: New file.
4249 * vmsutil.h: New file.
4250 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4252 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4253 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4254 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4255 elfNN_vms_object_p): New functions
4256 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4258 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4261 * elflink.c (elf_gc_sweep): Exclude the group section if the
4262 first member of the section group is excluded.
4264 2009-01-14 Alan Modra <amodra@bigpond.net.au>
4267 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4268 saved filename, use bfd_alloc rather than bfd_malloc for it.
4270 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4272 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4274 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4276 * elf32-spu.c (remove_cycles): Always set call->max_depth.
4278 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4280 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4282 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4284 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4286 (struct got_entry): Add br_addr.
4287 (struct call_info): Add priority.
4288 (struct function_info): Add lr_store and sp_adjust.
4289 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4290 (spu_elf_find_overlays): For soft-icache, mark any section within cache
4291 area as an overlay, and check that no other overlays exist. Look up
4292 icache overlay manager entry sym.
4293 (BRA_STUBS, BRA, BRASL): Define.
4294 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4295 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
4297 (count_stub, build_stub): Support soft-icache.
4298 (build_spuear_stubs, process_stubs): Adjust build_stub call.
4299 (spu_elf_size_stubs): Size soft-icache stubs.
4300 (overlay_index): New function.
4301 (spu_elf_build_stubs): Make static. Support soft-icache.
4302 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4303 (find_function_stack_adjust): Save lr store and stack adjust insn
4305 (maybe_insert_function): Adjust find_function_stack_adjust call.
4306 (mark_functions_via_relocs): Retrieve priority.
4307 (remove_cycles): Only warn about pruned arcs when stack_analysis.
4308 (sort_calls): Sort by priority first.
4309 (mark_overlay_section): Ignore .ovl.init.
4310 (sum_stack): Only print when stack_analysis.
4311 (print_one_overlay_section): New function, extracted from..
4312 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
4313 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4314 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4315 analysis. Call spu_elf_build_stubs.
4316 (spu_elf_relocate_section): For soft-icache encode overlay index
4318 (spu_elf_output_symbol_hook): Support soft-icache.
4319 (spu_elf_modify_program_headers: Likewise.
4321 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
4322 num_regions to num_lines. Add line_size and max_branch.
4323 (enum _ovly_flavour): Add ovly_soft_icache.
4324 (spu_elf_build_stubs): Delete.
4326 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
4328 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4329 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4331 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
4333 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
4334 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
4335 the program, the known offset starts at the negative size of the
4337 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
4340 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
4342 * config.bfd: Add lm32-*-rtems*.
4344 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
4346 * coff-ppc.c: Add 2009 to Copyright.
4347 * elf32-cris.c: Likewise.
4348 * elflink.c: Likewise.
4350 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
4352 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4353 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
4355 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4358 * elflink.c (elf_merge_st_other): New.
4359 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4360 hide them if needed.
4361 (elf_link_add_object_symbols): Updated.
4363 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4366 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4367 ref_dynamic and dynamic_def fields when setting def_regular
4370 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
4373 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4376 For older changes see ChangeLog-2008
4382 version-control: never