1 2009-09-21 Alan Modra <amodra@bigpond.net.au>
3 * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
4 (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
5 (MR_0_3, MR_3_0): Define.
6 (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
7 (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
8 (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
9 table. Check for presense of __tls_get_addr_opt
10 (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
11 (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
12 (write_glink_stub): Add param p.
13 (ppc_elf_relocate_section): Adjust write_glink_stub call.
14 (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
16 * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
17 * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
18 (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
19 table. Check for presense of __tls_get_addr_opt.
20 (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
21 (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
22 BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
23 LD_R2_0R1, MTLR_R11): Define.
24 (build_tls_get_addr_stub): New function.
25 (ppc_build_one_stub): Call it.
26 (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
27 (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
28 __tls_get_addr plt call.
29 * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
31 2009-09-19 Richard Sandiford <rdsandiford@googlemail.com>
33 * elf-bfd.h (eh_cie_fde): Add personality_offset and
34 make_per_encoding_relative to the CIE structure. Add a padding field.
35 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
36 rather than 0xf0 when masking out the base address encoding
37 Record the offset of personality data from the start of the CIE.
38 Remove a repeated elf_backend_can_make_relative_eh_frame check.
39 (find_merged_cie): Take an info argument. If the personality
40 binds locally, try converting an absolute personality into
42 (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
43 when masking out the base address encoding. Update the call to
45 (_bfd_elf_eh_frame_section_offset): Discard relocations against
46 the personality data if we are converting into PC-relative form.
47 (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
48 when masking out the base address encoding. Handle
49 make_per_encoding_relative.
51 2009-09-18 Alan Modra <amodra@bigpond.net.au>
54 * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
55 R_PPC_EMB_SDA2I16 complain_overflow_signed.
56 (create_sdata_sym): Pass info rather than htab.
57 Update all callers. Ensure symbols are hidden.
58 (ppc_elf_check_relocs): Allow SDAREL16 when shared.
59 (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
60 _GLOBAL_OFFSET_TABLE_.
61 (elf_finish_pointer_linker_section): Don't assume that sdata base
62 symbol is always at 0x8000 offset. Don't subtract the addend here.
63 (is_static_defined): New function.
64 (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
65 is statically defined. Clear addend for EMB_SDAI16 and EMB_SDA2I16
66 relocs. Downgrade error on unexpected section for EMB_SDA2REL
67 reloc symbols to a warning.
69 2009-09-18 Nick Clifton <nickc@redhat.com>
71 * po/es.po: Updated Spanish translation.
72 * po/vi.po: Updated Vietnamese translation.
74 2009-09-18 Alan Modra <amodra@bigpond.net.au>
76 * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
77 functions. Use throughout.
78 (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
80 (lookup_fdh): Rename from get_fdh. Follow indirect sym links.
81 (add_symbol_adjust): Simplify.
82 (defined_code_entry, defined_func_desc): New functions.
83 (ppc64_elf_gc_keep): Follow indirect sym links. Use defined_code_entry.
84 (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
85 defined_code_entry to follow indirect sym links.
86 (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
87 (ppc_type_of_stub): Follow indirect sym links.
88 (toc_adjusting_stub_needed): Likewise.
89 (ppc_build_one_stub): Likewise. Make undefined dot-symbols weak
90 rather than defining them at stub.
91 (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
94 2009-09-16 Tristan Gingold <gingold@adacore.com>
96 * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
98 * mach-o.c (bfd_mach_o_cpu_name): Reindent.
99 (bfd_mach_o_filetype_name): Complete with new constants. Reindent.
100 (bfd_mach_o_print_private_header): Use fputs instead of fprintf
101 when possible to avoid warnings.
102 (bfd_mach_o_print_section_map): Ditto.
103 (bfd_mach_o_section_get_entry_size): New function.
104 (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
106 (bfd_mach_o_print_dysymtab): Print address of indirect symbols.
108 2009-09-14 Nick Clifton <nickc@redhat.com>
110 * po/fi.po: Updated Finnish translation.
112 2009-09-11 Nick Clifton <nickc@redhat.com>
114 * po/bfd.pot: Updated by the Translation project.
116 2009-09-11 Philippe De Muyter <phdm@macqel.be>
118 * binary.c (binary_object_p): Remove bfd_external_binary_architecture
119 hack. objcopy `-B' (`--binary-architecture') option is now handled
122 2009-09-11 Nick Clifton <nickc@redhat.com>
124 * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
127 2009-09-11 Jie Zhang <jie.zhang@analog.com>
129 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
130 NULL if `ht' is NULL.
132 2009-09-09 Martin Thuresson <martin@mtme.org>
134 Update soruces to compile cleanly with -Wc++-compat:
135 * aoutx.h: Add casts.
136 * archive.c: Add casts.
137 * archive64.c: Add casts.
138 * archures.c: Add casts.
139 * bfd-in2.h: Regenerated.
140 * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
141 * bfdio.c: Add casts.
142 * binary.c: Add casts.
143 * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
144 parameter to use enum value instead of int.
145 * coffcode.h: Add casts.
146 * coffgen.c: Add casts.
147 * cofflink.c: Add casts.
148 * compress.c: Add casts.
149 * dwarf1.c: Add casts.
150 * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
151 bfd_ptr. Update code to use new name.
152 * elf-attrs.c: Add casts.
153 * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
154 anonymous struct. (union gotplt_union, struct
155 elf_link_virtual_table_entry): Move to top level.
156 * elf-eh-frame.c: Add casts.
157 * elf-strtab.c: Add casts.
158 * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
159 argument name from typename to type_name.
160 * elf32-i386.c: Add casts.
161 * elf64-x86-64.c: Add casts.
162 * elfcode.h: Add casts.
163 * elfcore.h: Add casts.
164 * elflink.c: Add casts.
165 * format.c: Add casts.
168 * libaout.h (enum aout_subformat, enum aout_magic): Move to top
170 * libbfd.c: Add casts.
171 * linker.c: Add casts.
172 * merge.c: Add casts.
173 * opncls.c: Add casts.
174 * peXXigen.c: Add casts.
175 * peicode.h: Add casts.
176 * reloc.c: Add casts.
177 * section.c: Add casts.
178 * simple.c: Add casts.
180 * stabs.c: Add casts.
182 * targets.c: Add casts.
183 * tekhex.c: Add casts.
184 * verilog.c: Add casts.
186 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
188 * configure: Regenerate.
190 2009-09-09 Daniel Jacobowitz <dan@codesourcery.com>
192 * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
193 for the mode of target PLT entries.
194 (allocate_dynrelocs): Only adjust symbol type if setting its
197 2009-09-09 Paolo Bonzini <bonzini@gnu.org>
199 * configure: Regenerate.
201 2009-09-09 Nick Clifton <nickc@redhat.com>
204 * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
205 section headers containing sh_link values of SHN_BEFORE or
207 * elfcode.h (elf_object_p): Likewise.
209 2009-09-09 Tristan Gingold <gingold@adacore.com>
211 Handle DYLD_INFO introduced by Darwin10.
212 * mach-o.h (bfd_mach_o_load_command_type): Add
213 BFD_MACH_O_LC_DYLD_INFO.
214 (bfd_mach_o_dyld_info_command): New type.
215 (bfd_mach_o_load_command): Add dyld_info field.
216 * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
217 (bfd_mach_o_scan_read_dyld_info): New function.
218 (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
219 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
220 (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
221 (bfd_mach_o_print_dyld_info): New function.
223 2009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
225 * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
226 linkonce or linker script discarded section.
228 2009-09-09 Alan Modra <amodra@bigpond.net.au>
230 * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
232 2009-09-07 Andreas Schwab <schwab@linux-m68k.org>
234 * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
235 range call the bfd error hander and use R_68K_NONE instead.
237 2009-09-07 Tristan Gingold <gingold@adacore.com>
239 * po/SRC-POTFILES.in: Regenerate.
240 * po/bfd.pot: Regenerate.
242 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
243 BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
244 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
245 st_mtim.tv_nsec to gas/configure.in
246 (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
247 * configure: Regenerate.
248 * config.in: Regenerate.
249 * vmsutil.c: Moved to gas/config/te-vms.c
250 * vmsutil.h: Removed.
251 * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
252 (BFD32_BACKENDS): Remove vmsutil.lo
253 * Makefile.in: Regenerate.
255 2009-09-05 Eli Zaretskii <eliz@gnu.org>
257 * coffcode.h: Include libiberty.h.
259 2009-09-05 Martin Thuresson <martin@mtme.org>
261 * coff-arm.c (coff_arm_relocate_section)
262 (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
263 Change member name class to symbol_class.
264 * coff-i960.c (coff_i960_relocate_section) Rename variable
265 class to class_val. Change member name class to symbol_class.
266 * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
267 (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
268 * coff-stgo32.c (adjust_aux_in_post)
269 (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
271 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
272 (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
273 * coffcode.h (coff_pointerize_aux_hook): Rename variable class
275 * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
276 variables named class to n_sclass. (coff_write_symbols): Rename
277 variable class to sym_class. (bfd_coff_set_symbol_class): Rename
278 argument class to symbol_class.
279 * cofflink.c (_bfd_coff_link_hash_newfunc)
280 (coff_link_add_symbols, _bfd_coff_link_input_bfd)
281 (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
282 Update code to use renamed members.
283 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
284 argument class to in_class.
285 * libcoff-in.h (struct coff_link_hash_entry, struct
286 coff_debug_merge_type) Renamed members class to symbol_class and
288 * libcoff.h Regenerated.
289 * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
290 Rename argument class to in_class.
291 * pef.c (bfd_pef_parse_imported_symbol): Update code to use
293 * pef.h (struct bfd_pef_imported_symbol): Changed name of
294 member class to symbol_class.
296 2009-09-04 H.J. Lu <hongjiu.lu@intel.com>
298 * configure: Regenerated.
300 2009-09-04 Tristan Gingold <gingold@adacore.com>
302 * configure.in: Bump version to 2.20.51
304 2009-09-04 Alan Modra <amodra@bigpond.net.au>
306 * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
308 2009-09-04 Jie Zhang <jie.zhang@analog.com>
310 * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
312 (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
313 for empty .rela.bss and .rel.plt sections.
315 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
317 * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
318 R_MIPS_JALR unless symbol resolves locally.
320 2009-09-03 Adam Nemet <anemet@caviumnetworks.com>
322 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
323 has_static_relocs for R_MIPS_JALR.
325 2009-09-03 Maciej W. Rozycki <macro@codesourcery.com>
327 * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
328 R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
331 2009-09-01 H.J. Lu <hongjiu.lu@intel.com>
333 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
336 2009-09-01 Tristan Gingold <gingold@adacore.com>
338 * makefile.vms: Ported to Itanium VMS. Remove useless variable and
339 dependencies. Reindent.
340 * configure.com: Ported to Itanium VMS. Now generates a build.com
341 to build without make. Add messages but make edit silent.
342 * hosts/alphavms.h: Add a prototype for stpcpy.
343 * vms.c: Add a missing include for Alpha VMS.
344 * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
346 2009-08-31 Jan Beulich <jbeulich@novell.com>
348 * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
349 * elf.c (bfd_elf_get_default_section_type): New.
350 (elf_fake_sections): Use bfd_elf_get_default_section_type.
352 2009-08-30 H.J. Lu <hongjiu.lu@intel.com>
354 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
356 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
358 2009-08-30 Alan Modra <amodra@bigpond.net.au>
361 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
362 (bfd_emul_get_commonpagesize): Likewise.
364 2009-08-29 Martin Thuresson <martin@mtme.org>
366 * elf32-arm.c (struct stub_def): Rename member template to
367 template_sequence. (arm_build_one_stub,
368 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
369 Rename variable template to template_sequence.
370 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
371 Rename variable template to template_val.
372 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
374 * coffgen.c (coff_make_empty_symbol)
375 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
376 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
378 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
380 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
382 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
383 * ieee.c (ieee_make_empty_symbol): Rename variable new to
385 * linker.c (bfd_new_link_order): Rename variable new to
387 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
389 * oasys.c (oasys_make_empty_symbol): Rename variable new to
391 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
392 new to new_symbol_type.
393 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
395 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
397 (read_hdr, rs6000coff_core_p)
398 (rs6000coff_core_file_matches_executable_p)
399 (rs6000coff_core_file_failing_command)
400 (rs6000coff_core_file_failing_signal): Updated function to use new
402 * som.c (som_make_empty_symbol): Rename variable new to
404 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
406 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
407 variable new to new_symbol.
409 2009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
411 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
412 bfdlibdir and bfdincludedir.
413 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
414 [INSTALL_LIBBFD]: ... here, ...
415 [INSTALL_LIBBFD]: ... and empty overrides here.
416 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
417 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
418 * Makefile.in: Regenerate.
419 * configure: Regenerate.
421 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
423 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
424 relocations. Rewrite output of dynamic TLS relocations.
425 (DTP_OFFSET, TP_OFFSET): New constants.
426 (dtpoff_base): Update.
427 (tpoff): Rename to tpoff_base, update.
428 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
429 New functions. Move code from elf_m68k_relocate_section here.
430 (elf_m68k_relocate_section): Update.
431 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
433 2009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
435 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
437 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
438 Handle non_got_ref field.
439 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
441 2009-08-26 Alan Modra <amodra@bigpond.net.au>
444 * linker.c (bfd_find_version_for_sym): Revert warning.
446 2009-08-26 Alan Modra <amodra@bigpond.net.au>
449 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
450 other wildcard match. Warn on multiple wildcard matches.
452 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
454 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
456 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
457 only in this condition.
458 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
459 to build but not install libbfd.la in this condition.
460 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
461 (install_libbfd, install_libbfd): Remove.
462 * Makefile.in: Regenerate.
463 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
464 (INCLUDES): ... this.
466 * doc/Makefile.in: Regenerate.
468 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
470 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
471 dependency tracking to work for them.
472 (targets.lo, archures.lo, dwarf.lo): Rewrite to
473 use automake dependency tracking mechanism.
474 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
475 (mkdep section): Remove.
476 (BUILT_SOURCES): New, list $(BUILD_HFILES).
477 * Makefile.in: Regenerate.
478 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
480 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
481 (install-pdf, install-pdf-recursive, install-html)
482 (install-html-recursive): Remove.
483 * Makefile.in: Regenerate.
485 * Makefile.in: Regenerate.
486 * aclocal.m4: Likewise.
487 * config.in: Likewise.
488 * configure: Likewise.
490 2009-08-21 Daniel Gutson <dgutson@codesourcery.com>
492 * elf32-arm.c (arch_has_thumb2_nop): New function.
493 (arch_has_arm_nop): New function.
494 (elf32_arm_final_link_relocate): NOP opcodes changed.
496 2009-08-16 Doug Evans <dje@google.com>
498 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
499 at least don't leak memory.
501 2009-08-13 DJ Delorie <dj@redhat.com>
503 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
506 2009-08-12 Nick Clifton <nickc@redhat.com>
508 * po/fi.po: Updated Finnish translation.
510 2009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
512 Merge some FRV FDPIC changes into the Blackfin code.
513 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
514 summary reloc information.
515 (bfinfdpic_dynamic_got_plt_info): New.
516 (_bfin_create_got_section): Create the PLT section here.
517 (elf32_bfinfdpic_create_dynamic_sections): Not here.
518 (_bfinfdpic_count_nontls_entries): Move out of...
519 (_bfinfdpic_count_got_plt_entries): ... here.
520 (_bfinfdpic_count_relocs_fixups): Likewise.
521 (_bfinfdpic_reset_got_plt_entries): New.
522 (_bfinfdpic_size_got_plt): Move out of...
523 (elf32_bfinfdpic_size_dynamic_sections): ... here.
524 (bfinfdpic_relocate_section): Be careful not to call
525 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
526 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
528 (elf_backend_discard_info): Define for FD-PIC.
530 2009-08-11 Alan Modra <amodra@bigpond.net.au>
532 * elflink.c: Add FIXMEs for some places that require octets_per_byte
534 * elf-eh-frame.c: Likewise.
537 2009-08-11 Alan Modra <amodra@bigpond.net.au>
539 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
540 to x86 and x86_64 configurations.
541 * configure: Regenerate.
543 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
545 Stop using bfd_usrdata in libbfd.
546 * coff-stgo32.c (bfd_coff_go32stub): Remove.
547 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
548 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
549 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
550 filehdr_dst->u.go32.stub. New comment with the reason.
551 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
552 Substitute the removed macro bfd_coff_go32stub.
553 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
554 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
555 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
556 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
557 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
559 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
560 * libcoff-in.h (coff_data_type): New field go32stub.
561 * libcoff.h: Regenerated.
563 2009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
565 Fix go32 stub preservation by objcopy.
566 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
567 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
570 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
572 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
574 (elf32_arm_final_link_relocate): Treat local undefined symbols the
575 same as global undefined symbols.
576 (elf32_arm_relocate_section): Give an error for local undefined
577 non-weak symbols, unless the reloc will not use the symbol.
579 2009-08-10 Nathan Sidwell <nathan@codesourcery.com>
581 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
582 (ppc_elf_relax_section): Use symbol index to distinguish
585 2009-08-10 Alan Modra <amodra@bigpond.net.au>
587 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
589 2009-08-10 Alan Modra <amodra@bigpond.net.au>
591 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
592 info for STT_GNU_IFUNC.
593 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
594 on got refs in case the symbol turns out to be ifunc.
595 (ppc_elf_gc_sweep_hook): Similarly.
596 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
597 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
598 (ppc_elf_size_dynamic_sections): Likewise.
599 (ppc_elf_relocate_section): Likewise.
601 2009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
603 From Mike Frysinger <michael.frysinger@analog.com>
604 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
605 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
606 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
607 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
608 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
609 Adjust to match the renamed reloc definitions.
611 2009-08-08 Alan Modra <amodra@bigpond.net.au>
614 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
615 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
617 2009-08-07 Tom Tromey <tromey@redhat.com>
619 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
622 2009-08-06 Michael Eager <eager@eagercon.com>
624 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
625 * Makefile.in: Regenerate.
626 * archures.c: Add bfd_arch_microblaze.
627 * bfd-in2.h: Regenerate.
628 * config.bfd: Add microblaze target.
629 * configure.in: Add bfd_elf32_microblaze_vec target.
630 * configure: Regenerate.
631 * cpu-microblaze.c: New.
632 * elf32-microblaze.c: New.
633 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
634 * libbfd.h: Regenerate.
635 * reloc.c: Add MICROBLAZE relocations.
636 * section.c: Add struct relax_table and relax_count to section.
637 * targets.c: Add bfd_elf32_microblaze_vec.
639 2009-08-06 Jakub Jelinek <jakub@redhat.com>
640 Alan Modra <amodra@bigpond.net.au>
643 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
645 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
646 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
648 2009-08-06 Nathan Sidwell <nathan@codesourcery.com>
650 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
651 at least once when fixing cortex-a8.
653 2009-08-05 Chao-ying Fu <fu@mips.com>
655 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
656 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
657 for CPUs. It is true for RM9000.
658 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
660 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
661 to guard the transformation.
663 2009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
665 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
666 (spu_elf_size_sections): Declare prototype.
667 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
668 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
669 (spu_elf_emit_fixup): New function.
670 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
671 (spu_elf_size_sections): New function.
673 2009-08-05 Nathan Sidwell <nathan@codesourcery.com>
675 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
676 (arm_build_one_stub): Build a8 veneers as a separate pass.
677 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
678 parameters. Use them to check if we create a different a8 fixup
679 than the previous pass.
680 (elf32_arm_size_stubs): Move scope of stub_changed and
681 prev_num_a8_fixes into main loop.
682 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
684 2009-08-04 Alan Modra <amodra@bigpond.net.au>
686 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
687 which find_plt_ent is called. Delete redundant code.
689 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
692 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
693 invalid string offset.
695 2009-08-03 H.J. Lu <hongjiu.lu@intel.com>
698 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
699 to htab->init_got_offset and plt to htab->init_plt_offset
700 when discarding space for dynamic relocations.
702 2009-08-03 Alan Modra <amodra@bigpond.net.au>
704 * elf32-ppc.c (struct plt_entry): Revise comments.
705 (ppc_elf_check_relocs): Don't create needless plt_entry info
706 for non-pie executables. Don't test info->pie when info->shared
707 already covers that case.
708 (ppc_elf_gc_sweep_hook): Adjust for above change.
709 (add_stub_sym): Don't test info->pie when info->shared tested.
710 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
711 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
712 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
713 (ppc_elf_relocate_section): Likewise.
715 2009-08-03 Alan Modra <amodra@bigpond.net.au>
717 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
718 for local ifunc symbols in non-pie executables, regardless of
719 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
720 code so that it's obvious that we only do anything special for
722 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
723 (allocate_dynrelocs): Correct comment for syms defined in plt.
724 Don't specially allocate ifunc dyn relocs.
725 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
726 (ppc_elf_relocate_section): Set "relocation" value for ifunc
727 syms in non-pie executables. No specially allocated dyn relocs
728 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
729 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
730 a non-pie executable.
732 2009-08-02 H.J. Lu <hongjiu.lu@intel.com>
733 Jakub Jelinek <jakub@redhat.com>
736 * elf32-i386.c (elf_i386_tls_transition): Check executable
737 instead of shared for TLS when building PIE.
738 (elf_i386_check_relocs): Likewise.
739 (elf_i386_allocate_dynrelocs): Likewise.
740 (elf_i386_relocate_section): Likewise.
742 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
743 instead of shared for TLS when building PIE.
744 (elf64_x86_64_check_relocs): Likewise.
745 (elf64_x86_64_allocate_dynrelocs): Likewise.
746 (elf64_x86_64_relocate_section): Likewise.
748 2009-07-31 Anthony Green <green@moxielogic.com>
750 * config.bfd (targ_cpu): Add moxie-uclinux support.
752 2009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
754 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
756 2009-07-30 Alan Modra <amodra@bigpond.net.au>
758 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
759 used by indirect function support. Count dynamic relocs for
761 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
762 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
763 in iplt and their relocs in reliplt. Don't make ifunc syms
764 dynamic. Allocate got entry relocs for non-dynamic ifunc in
765 reliplt. Handle other dynamic relocs for ifunc.
766 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
767 ifunc in reliplt, likewise relocs for got against local ifunc.
768 Typo fix on reliplt size adjust.
769 (ppc_elf_relocate_section): Don't use plt scheme of allocating
770 relocs 1-1 with entries for iplt, instead just add using
771 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
772 Error on invalid ifunc dyn relocs.
773 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
775 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
776 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
777 (ppc64_elf_reloc_type_lookup): Handle new relocs.
778 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
779 (allocate_dynrelocs): As for elf32-ppc.c above.
780 (ppc64_elf_size_dynamic_sections): Likewise.
781 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
782 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
783 (ppc_size_one_stub): Similarly.
784 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
786 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
788 2009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
790 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
791 change. Add note to head comment.
793 2009-07-28 Jan Beulich <jbeulich@novell.com>
795 * archive.c (get_extended_arelt_filename): Remove redundant
796 range check on index.
798 2009-07-27 Doug Kwan <dougkwan@google.com>
800 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
802 2009-07-27 H.J. Lu <hongjiu.lu@intel.com>
804 * archures.c bfd_*_arch): Sorted.
805 (bfd_archures_list): Likewise.
807 2009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
809 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
810 to R_cr16_NUM32 relocation.
812 2009-07-26 Michael Eager <eager@eagercon.com>
814 * archures.c: Add bfd_mach_ppc_405
817 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
819 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
820 * cpu-l1om.c (bfd_l1om_arch): Likewise.
822 2009-07-25 H.J. Lu <hongjiu.lu@intel.com>
824 * archures.c (bfd_architecture): Add bfd_arch_l1om.
825 (bfd_l1om_arch): New.
826 (bfd_archures_list): Add &bfd_l1om_arch.
827 * bfd-in2.h: Regenerated.
829 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
830 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
831 if bfd_elf64_x86_64_freebsd_vec is supported.
832 (targ_selvecs): Likewise.
834 * configure.in: Support bfd_elf64_l1om_vec and
835 bfd_elf64_l1om_freebsd_vec.
836 * configure: Regenerated.
840 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
841 (bfd_elf64_l1om_vec): Likewise.
842 (bfd_elf64_l1om_freebsd_vec): Likewise.
844 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
845 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
846 * Makefile.in: Regenerated.
848 * targets.c (bfd_elf64_l1om_vec): New.
849 (bfd_elf64_l1om_freebsd_vec): Likewise.
850 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
851 bfd_elf64_l1om_freebsd_vec.
853 2009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
854 Alan Modra <amodra@bigpond.net.au>
856 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
857 * bfd-in2.h: Regenerate.
858 * libbfd.h: Regenerate.
859 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
860 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
861 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
863 2009-07-23 H.J. Lu <hongjiu.lu@intel.com>
866 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
867 instead of shared for R_X86_64_TPOFF32.
868 (elf64_x86_64_relocate_section): Likewise.
870 2009-07-23 Ulrich Drepper <drepper@redhat.com>
872 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
873 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
874 with the BSF_GNU_UNIQUE flag bit set.
875 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
876 for symbols with STB_GNU_UNIQUE binding.
877 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
878 with the STB_GNU_UNIQUE binding.
879 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
880 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
881 symbols with the unique_global field set.
882 (elf_link_output_extsym): Set unique_global field for symbols with
883 the STB_GNU_UNIQUE binding.
884 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
885 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
887 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
889 * bfd-in2.h: Regenerate.
891 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
893 * elflink.c (elf_link_output_extsym): Revert the last change.
895 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
898 * elflink.c (elf_link_output_extsym): Special case ifunc syms
899 when ref_regular, not def_regular.
901 2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
904 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
905 from a DSO into a normal FUNC symbol.
906 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
907 a normal FUNC symbol.
909 2009-07-17 Chao-ying Fu <fu@mips.com>
911 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
912 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
913 interlocking, the last PLT entry needs a nop in the branch delay slot.
914 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
915 output the last two PLT entries in reverse order.
917 2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
919 * elf32-i386.c (elf_i386_relocate_section): Don't get local
920 STT_GNU_IFUNC symbol for relocatable link.
921 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
923 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
925 * bfdio.c (bfd_iovec): Add comments for bmmap.
926 * bfd-in2.h: Regenerated.
928 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
930 * Makefile.am: Run "make dep-am".
931 * Makefile.in: Regenerated.
933 2009-07-10 Doug Kwan <dougkwan@google.com>
935 * elf32-arm.c (stub_hash_newfunc): Initialize fields
936 target_addend and orig_insn.
938 2009-07-10 Tom Tromey <tromey@redhat.com>
940 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
941 (elf-eh-frame.lo): Likewise.
942 (elf32-bfin.lo): Likewise.
943 (elf32-frv.lo): Likewise.
944 (elf32-xc16x.lo): Likewise.
945 * Makefile.in: Rebuild.
946 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
947 * elf-eh-frame.c: Likewise.
948 * elf32-bfin.c: Likewise.
949 * elf32-frv.c: Likewise.
950 * elf32-xc16x.c: Likewise.
952 2009-07-10 Julian Brown <julian@codesourcery.com>
954 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
955 symbol a stub entry is derived from, not the entry for the stub
956 itself, in call to elf32_arm_final_link_relocate.
958 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
960 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
961 when reporting addends.
963 2009-07-10 Alan Modra <amodra@bigpond.net.au>
965 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
966 data even when no stubs.
967 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
969 2009-07-10 Alan Modra <amodra@bigpond.net.au>
971 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
972 (ppc_elf_get_synthetic_symtab): Report addend.
974 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
975 (ppc_elf_create_glink): New function.
976 (ppc_elf_create_dynamic_sections): Use it.
977 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
978 (update_local_sym_info): Allocate space for local_plt array.
979 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
981 (is_branch_reloc): New function.
982 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
983 (ppc_elf_gc_sweep_hook): Likewise.
984 (ppc_elf_adjust_dynamic_symbol): Likewise.
985 (allocate_dynrelocs): Likewise.
986 (ppc_elf_size_dynamic_sections): Likewise.
987 (ppc_elf_relocate_section): Likewise.
988 (branch_reloc_hash_match): Use is_branch_reloc.
989 (ppc_elf_tls_optimize): Adjust for local_plt.
990 (write_glink_stub): New function, extracted from..
991 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
992 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
993 branch table when dynamic.
994 (elf_backend_post_process_headers): Define.
995 * elf64-ppc.c (elf_backend_post_process_headers): Define.
996 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
997 (ppc64_elf_get_synthetic_symtab): Report addend.
998 (struct ppc_stub_hash_entry): Add plt_ent.
1000 (struct ppc_link_hash_table): Add iplt and reliplt.
1001 (create_linkage_sections): Make .iplt and .rela.iplt sections.
1002 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1003 (update_local_sym_info): Allocate space for local_plt array.
1004 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
1006 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1007 and don't change hash flags here.
1008 (is_branch_reloc): New function.
1009 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1010 (ppc64_elf_gc_sweep_hook): Likewise.
1011 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1012 (allocate_dynrelocs): Likewise.
1013 (ppc64_elf_size_dynamic_sections): Likewise.
1014 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1015 (ppc64_elf_size_stubs): Likewise.
1016 (ppc64_elf_relocate_section): Likewise.
1017 (get_sym_h): Adjust for local_plt.
1018 (branch_reloc_hash_match): Use is_branch_reloc.
1019 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1020 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1022 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1024 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1026 2009-07-10 Alan Modra <amodra@bigpond.net.au>
1028 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1029 and ref_regular_nonweak comment.
1030 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1031 when def_regular, not ref_regular.
1032 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1033 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1034 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1036 2009-07-09 Alan Modra <amodra@bigpond.net.au>
1038 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1039 of malloc'd struct call_info.
1040 (pasted_function): Likewise, priority too.
1042 2009-07-07 Alan Modra <amodra@bigpond.net.au>
1044 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1045 alignment when packing sections into overlays.
1047 2009-07-03 Cary Coutant <ccoutant@google.com>
1049 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1051 2009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
1053 * coffcode.h (sec_to_styp_flags): Partially revert (functional
1054 changes only) earlier patch:-
1056 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
1058 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1059 give .debug and .reloc data characteristics.
1060 (DOT_RELOC): New define for .reloc section string.
1061 (coff_write_object_contents): Use DOT_RELOC instead of string.
1063 2009-07-02 Tom Tromey <tromey@redhat.com>
1065 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1066 * bfdwin.c (bfd_free_window): Cast to unsigned long.
1068 2009-07-01 Nick Clifton <nickc@redhat.com>
1070 * elf-m10300.c: Remove trailing white space.
1071 * reloc.c: Likewise.
1073 2009-07-01 Douglas B Rupp <rupp@gnat.com>
1075 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
1076 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
1077 * configure.in: Use them.
1078 * configure: Regenerate.
1079 * config.in: Regenerate.
1080 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
1081 #define _BSD_SOURCE. Add comments.
1082 (vms_file_stats_name): Calculate creation date based on available
1083 runtime data. Return 1 for version instead of 0.
1085 2009-07-01 Nick Clifton <nickc@redhat.com>
1088 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1089 to R_ARM_THM_PC8 relocation.
1091 2009-06-29 Nick Clifton <nickc@redhat.com>
1093 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1094 different uses of the relocations addend when a symbol is in a
1097 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
1100 * elf.c (bfd_section_from_shdr): Don't change sh_link for
1101 SHT_REL/SHT_RELA sections on executable nor shared library.
1102 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1103 as a normal section.
1105 2009-06-25 Nick Clifton <nickc@redhat.com>
1107 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1108 symbols with SEC_MERGE flag.
1110 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
1112 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1113 give .debug and .reloc data characteristics.
1114 (DOT_RELOC): New define for .reloc section string.
1115 (coff_write_object_contents): Use DOT_RELOC instead of string.
1117 2009-06-25 Tristan Gingold <gingold@adacore.com>
1119 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1120 (bfd_mach_o_canonicalize_dynamic_symtab)
1121 (bfd_mach_o_get_synthetic_symtab): Defines.
1122 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1123 (TARGET_NAME): Use Mach-O specific functions for dynamic.
1125 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1126 for scattered relocations.
1127 (bfd_mach_o_i386_print_thread): New function.
1128 (bfd_mach_o_print_thread): Define.
1130 * mach-o.c (text_section_names_xlat): Add an entry for __const.
1131 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1132 New functions extracted from ...
1133 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
1134 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1135 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1136 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1137 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
1138 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1140 (bfd_mach_o_scan_read_dylib): Ditto.
1141 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
1143 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
1144 decode isym and flags on little endian targets. Set dysymtab field.
1145 (bfd_mach_o_scan_start_address): Adjust for enum names.
1146 (bfd_mach_o_lookup_section): Do not look for segments anymore.
1147 (bfd_mach_o_print_section): Display bfd section name.
1148 (bfd_mach_o_print_segment): Display none if no name.
1149 (bfd_mach_o_print_dysymtab): Display next index for local, external
1150 and undefined symbols.
1151 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1152 Display dylinker name. Display thread and unixthread commands content.
1153 (bfd_mach_o_print_thread): New macro.
1155 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1156 (bfd_mach_o_ppc_thread_flavour): Ditto.
1157 (bfd_mach_o_i386_thread_flavour): Ditto.
1158 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1159 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1160 BFD_MACH_O_THREAD_STATE_NONE.
1161 (bfd_mach_o_segment_command): Remove segment field.
1162 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1163 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1164 (bfd_mach_o_prebound_dylib_command): Ditto.
1165 (bfd_mach_o_dylib_command): Ditto.
1166 (bfd_mach_o_prebound_dylib_command): Remove section field.
1167 (mach_o_data_struct): Add dysymtab field.
1168 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1169 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1170 (bfd_mach_o_build_commands): Remove parameter names and attributes.
1171 (bfd_mach_o_get_dynamic_reloc_upper_bound)
1172 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1174 2009-06-25 Rafael Avila de Espindola <espindola@google.com>
1176 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1177 field of struct dirent.
1179 2009-06-23 Tristan Gingold <gingold@adacore.com>
1181 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1182 of this macro. Fix indentation.
1184 2009-06-22 Christophe Lyon <christophe.lyon@st.com>
1186 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1187 destination for defined dynamic symbols when deciding whether to
1188 insert a stub or not.
1189 (allocate_dynrelocs): Make sure functions are not marked as Thumb
1190 when actually accessed through a PLT, even when generating a
1193 2009-06-22 Tristan Gingold <gingold@adacore.com>
1195 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1198 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1200 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1201 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1203 2009-06-22 Alan Modra <amodra@bigpond.net.au>
1205 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1207 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1209 * elflink.c (elf_link_add_object_symbols): Avoid warning
1210 from -Wjump-misses-init in gcc 4.5.0.
1212 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1214 * elf32-i386.c (elf_i386_check_relocs): Properly check local
1216 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1218 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1220 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1221 r_symndx. Report local symbol name on error.
1222 (elf_i386_check_relocs): Updated. Report local symbol name on
1224 (elf_i386_gc_sweep_hook): Updated.
1225 (elf_i386_relocate_section): Likewise.
1227 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1228 r_symndx. Report local symbol name on error.
1229 (elf64_x86_64_check_relocs): Updated. Report local symbol name
1231 (elf64_x86_64_gc_sweep_hook): Updated.
1232 (elf64_x86_64_relocate_section): Likewise.
1234 2009-06-19 Tristan Gingold <gingold@adacore.com>
1236 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1238 2009-06-19 Tristan Gingold <gingold@adacore.com>
1240 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1241 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1242 (bfd_mach_o_valid): Ditto.
1243 (bfd_mach_o_wide_p): Ditto.
1244 (bfd_mach_o_canonicalize_reloc): Ditto.
1245 (bfd_mach_o_build_commands): Ditto.
1246 (bfd_mach_o_scan_read_thread): Ditto.
1247 (bfd_mach_o_flatten_sections): Ditto.
1248 (bfd_mach_o_scan_start_address): Ditto.
1249 (bfd_mach_o_lookup_section): Ditto.
1250 (bfd_mach_o_core_fetch_environment): Ditto.
1251 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
1252 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1253 (bfd_mach_o_scan_write_symtab): Ditto.
1254 Use macros instead of hard-coded values.
1255 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1256 Use bfd_mach_o_get_data instead of direct access. Use macros
1257 instead of hard-coded values.
1258 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1259 Remove sym argument and get section from mdata.
1260 Move code into the else branch.
1261 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1262 Remove sym argument and get section from mdata. Adjust code.
1263 (bfd_mach_o_scan_read_dylib): Move assertion into the created
1264 switch (which replaces consecutive if statements).
1265 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
1266 module table, table of content, indirect symbols and external
1268 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
1270 (bfd_mach_o_scan_read_linkedit): New function.
1271 (bfd_mach_o_scan_read_str): Ditto.
1272 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1274 (bfd_mach_o_get_symtab_upper_bound): Remove check as
1275 bfd_mach_o_count_symbols never returns an error.
1276 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1277 symtab field (there might be only one symtab).
1278 (bfd_mach_o_scan_read_command): Handle reexported dylib.
1279 Handle sub frameworks, sub umbrella, sub library and sub client.
1280 Read code signature and segment split info commands.
1281 (bfd_mach_o_scan): Reindent.
1282 (bfd_mach_o_xlat_name): New type.
1283 (bfd_mach_o_print_flags): New function.
1284 (bfd_mach_o_get_name): Ditto.
1285 (bfd_mach_o_cpu_name): New variable.
1286 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1287 (bfd_mach_o_section_type_name)
1288 (bfd_mach_o_section_attribute_name)
1289 (bfd_mach_o_load_command_name): New variables.
1290 (bfd_mach_o_print_private_header): New function.
1291 (bfd_mach_o_print_section_map): New function extracted from
1292 bfd_mach_o_print_private_bfd_data.
1293 (bfd_mach_o_print_section): Ditto. Print more infos.
1294 (bfd_mach_o_print_segment): Ditto.
1295 (bfd_mach_o_print_dysymtab): Ditto.
1296 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
1297 load weak dylib, reexport dylib and id dylib.
1298 Handle code signature and segment_split info.
1299 Handle sub frameworks, sub umbrella, sub library and sub client.
1300 (bfd_mach_o_section_get_nbr_indirect): New function.
1302 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
1303 (bfd_mach_o_header_flags): New enum to define header flags.
1304 (bfd_mach_o_section_attribute): New enum to replace ...
1305 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1306 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1307 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1308 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1309 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1310 these removed macros.
1311 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1312 (bfd_mach_o_dylib_module): New type.
1313 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1315 (bfd_mach_o_dylib_table_of_content): New type.
1316 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1317 (bfd_mach_o_dylib_reference): New type.
1318 (BFD_MACH_O_REFERENCE_SIZE): New macro.
1319 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1320 modules, toc, references and indirect syms.
1321 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1322 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1323 unused). Add comment.
1324 (bfd_mach_o_dylib_command): Ditto.
1325 (bfd_mach_o_prebound_dylib_command): Ditto.
1326 (bfd_mach_o_linkedit_command): New type.
1327 (bfd_mach_o_str_command): New type.
1328 (bfd_mach_o_load_command): Add linkedit and str fields.
1329 (mach_o_data_struct): Add symtab field.
1330 (bfd_get_mach_o_data): Renamed to ...
1331 (bfd_mach_o_get_data): ... this new macro.
1332 (bfd_mach_o_scan_read_symtab_symbol,
1333 bfd_mach_o_scan_read_symtab_strtab,
1334 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1336 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1337 instead of direct access.
1339 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1341 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1342 R_PPC_PLTREL24 relocs.
1343 (ppc_elf_relocate_section): Likewise.
1345 2009-06-19 Alan Modra <amodra@bigpond.net.au>
1347 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1348 pointer to sym hash. Update all uses.
1349 (update_plt_info): Likewise. Don't check addend here.
1351 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1353 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1354 bfd_sym_from_r_symndx.
1355 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1357 2009-06-18 Alan Modra <amodra@bigpond.net.au>
1359 * elf-bfd.h (struct sym_sec_cache): Delete.
1360 (struct sym_cache): New.
1361 (bfd_section_from_r_symndx): Delete prototype.
1362 (bfd_sym_from_r_symndx): Define prototype.
1363 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1364 (bfd_sym_from_r_symndx): ..new function.
1365 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1366 bfd_section_from_r_symndx to new struct and function.
1367 * elf32-bfin.c: Likewise.
1368 * elf32-hppa.c: Likewise.
1369 * elf32-i386.c: Likewise.
1370 * elf32-m32r.c: Likewise.
1371 * elf32-m68hc1x.c: Likewise.
1372 * elf32-m68hc1x.h: Likewise.
1373 * elf32-m68k.c: Likewise.
1374 * elf32-ppc.c: Likewise.
1375 * elf32-s390.c: Likewise.
1376 * elf32-sh.c: Likewise.
1377 * elf64-ppc.c: Likewise.
1378 * elf64-s390.c: Likewise.
1379 * elf64-x86-64.c: Likewise.
1380 * elfxx-sparc.c: Likewise.
1381 * elfxx-sparc.h: Likewise.
1383 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1385 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
1386 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1388 2009-06-18 Nick Clifton <nickc@redhat.com>
1390 * elflink.c (elf_link_sort_relocs): Return early if there are no
1393 2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
1395 Merge cegcc and mingw32ce target name changes from
1398 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
1400 * config.bfd: Add arm*-*-cegcc* target.
1402 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
1404 * config.bfd: Add arm-*-mingw32ce* target.
1406 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1408 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
1409 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
1410 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
1411 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1413 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1415 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
1416 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
1417 * elf32-i386.c (elf_i386_check_relocs): Use it.
1418 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1420 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1422 * elf-bfd.h (elf_dyn_relocs): New.
1424 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
1425 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
1427 (elf_i386_copy_indirect_symbol): Likewise.
1428 (elf_i386_check_relocs): Likewise.
1429 (elf_i386_gc_sweep_hook): Likewise.
1430 (elf_i386_allocate_dynrelocs): Likewise.
1431 (elf_i386_readonly_dynrelocs): Likewise.
1432 (elf_i386_size_dynamic_sections): Likewise.
1434 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
1435 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
1436 with elf_dyn_relocs.
1437 (elf64_x86_64_copy_indirect_symbol): Updated.
1438 (elf64_x86_64_check_relocs): Likewise.
1439 (elf64_x86_64_gc_sweep_hook): Likewise.
1440 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1441 (elf64_x86_64_allocate_dynrelocs): Likewise.
1442 (elf64_x86_64_readonly_dynrelocs): Likewise.
1443 (elf64_x86_64_size_dynamic_sections): Likewise.
1445 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
1447 * elf32-arm.c (create_got_section): Get existing .rela.got
1449 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1450 * elf32-lm32.c (create_got_section): Likewise.
1451 * elf32-m32r.c (create_got_section): Likewise.
1452 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1453 * elf32-s390.c (create_got_section): Likewise.
1454 * elf32-sh.c (create_got_section): Likewise.
1455 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1456 * elf64-s390.c (create_got_section): Likewise.
1457 * elfxx-sparc.c (create_got_section): Likewise.
1459 * elflink.c (_bfd_elf_create_got_section): Properly initialize
1462 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1464 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
1466 * elf32-i386.c (elf_i386_local_hash): Removed.
1467 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1468 (elf_i386_get_local_sym_hash): Likewise.
1470 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
1471 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
1472 (elf64_x86_64_get_local_sym_hash): Likewise.
1473 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
1474 (get_local_sym_hash): Likewise.
1476 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1478 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
1479 rel_got_sec and plt_sec.
1480 (elfNN_ia64_relax_section): Updated.
1481 (elfNN_ia64_create_dynamic_sections): Likewise.
1482 (get_got): Likewise.
1483 (allocate_dynrel_entries): Likewise.
1484 (elfNN_ia64_size_dynamic_sections): Likewise.
1485 (set_got_entry): Likewise.
1486 (elfNN_ia64_choose_gp): Likewise.
1487 (elfNN_ia64_relocate_section): Likewise.
1488 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1489 (elfNN_ia64_finish_dynamic_sections): Likewise.
1491 2009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
1493 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1496 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1498 * configure.in (elf): Add elf-ifunc.lo.
1500 * configure: Regenerated.
1501 * Makefile.in: Likewise.
1503 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1504 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1506 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1507 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1509 (elf_i386_link_hash_table_create): Likewise.
1510 (elf_i386_create_dynamic_sections): Likewise.
1511 (elf_i386_check_relocs): Likewise.
1512 (elf_i386_allocate_dynrelocs): Likewise.
1513 (elf_i386_size_dynamic_sections): Likewise.
1514 (elf_i386_relocate_section): Likewise.
1515 (elf_i386_finish_dynamic_symbol): Likewise.
1516 (elf_i386_finish_dynamic_sections): Likewise.
1517 (elf_i386_create_got_section): Removed.
1519 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1520 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1522 (elf64_x86_64_compute_jump_table_size): Updated.
1523 (elf64_x86_64_link_hash_table_create): Likewise.
1524 (elf64_x86_64_create_dynamic_sections): Likewise.
1525 (elf64_x86_64_check_relocs): Likewise.
1526 (elf64_x86_64_allocate_dynrelocs): Likewise.
1527 (elf64_x86_64_size_dynamic_sections): Likewise.
1528 (elf64_x86_64_relocate_section): Likewise.
1529 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1530 (elf64_x86_64_finish_dynamic_sections): Likewise.
1531 (elf64_x86_64_create_got_section): Removed.
1533 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1534 for pointer alignment. Set up section pointers.
1535 (_bfd_elf_create_dynamic_sections): Likewise.
1536 (_bfd_elf_create_ifunc_sections): Moved to ...
1537 * elf-ifunc.c: Here. New.
1539 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1540 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1543 2009-06-16 Doug Kwan <dougkwan@google.com>
1545 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1546 to bfd_signed_vma. Cast constant operands which are used in
1547 offset related expressions to bfd_signed_vma type as appropriate.
1549 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1551 * elf32-vax.c (elf_vax_plt_sym_val): New function.
1552 (elf_backend_plt_sym_val): Define.
1554 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1556 * elf32-vax.c (elf_vax_reloc_type_class): New function.
1557 (elf_backend_reloc_type_class): Define.
1559 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1561 * elf32-vax.c (elf_vax_relocate_section): For symbol references
1562 from an executable to a shared library treat R_VAX_PC32
1563 relocations as R_VAX_PLT32 ones.
1565 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1567 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1568 symbols in GOT space calculation.
1569 (elf_vax_relocate_section): Adjust accordingly.
1571 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1573 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1576 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1578 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1580 (elf_vax_relocate_section): Likewise.
1582 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1584 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1585 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1587 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1589 * elf32-i386.c (elf_i386_check_relocs): Reformat.
1590 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1592 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1594 * Makefile.am: Run "make dep-am".
1595 * Makefile.in: Regenerated.
1597 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1599 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1600 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1602 2009-06-15 Nick Clifton <nickc@redhat.com>
1604 * po/ru.po: New Russian translation.
1605 * configure.in (ALL_LINGUAS): Add ru.
1606 * configure: Regenerate.
1608 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1610 * elf32-i386.c: Remove duplicated comments.
1612 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1615 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1616 dynamic IFUNC pointer in non-shared object. Use .got.plt
1617 for IFUNC definition in PIE.
1618 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1621 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1622 dynamic IFUNC pointer in non-shared object. Use .got.plt
1623 for IFUNC definition in PIE.
1624 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1627 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1629 * elf32-i386.c (elf_i386_check_relocs): Properly report
1630 local symbol for unhandled relocation against STT_GNU_IFUNC
1632 (elf_i386_relocate_section): Likewise.
1633 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1634 (elf64_x86_64_relocate_section): Likewise.
1636 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1639 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1640 (elf_i386_link_hash_table): Add loc_hash_table and
1642 (elf_i386_local_hash): New.
1643 (elf_i386_local_htab_hash): Likewise.
1644 (elf_i386_local_htab_eq): Likewise.
1645 (elf_i386_get_local_sym_hash): Likewise.
1646 (elf_i386_link_hash_table_free): Likewise.
1647 (elf_i386_allocate_local_dynrelocs): Likewise.
1648 (elf_i386_finish_local_dynamic_symbol): Likewise.
1649 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1650 (elf_i386_link_hash_table_create): Create loc_hash_table and
1652 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1653 (elf_i386_size_dynamic_sections): Likewise.
1654 (elf_i386_relocate_section): Likewise.
1655 (elf_i386_finish_dynamic_sections): Likewise.
1656 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1659 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1660 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1662 (elf64_x86_64_local_hash): New.
1663 (elf64_x86_64_local_htab_hash): Likewise.
1664 (elf64_x86_64_local_htab_eq): Likewise.
1665 (elf64_x86_64_get_local_sym_hash): Likewise.
1666 (elf64_x86_64_link_hash_table_free): Likewise.
1667 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1668 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1669 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1670 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1671 and loc_hash_memory.
1672 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1674 (elf64_x86_64_size_dynamic_sections): Likewise.
1675 (elf64_x86_64_relocate_section): Likewise.
1676 (elf64_x86_64_finish_dynamic_sections): Likewise.
1677 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1680 2009-06-10 Philip Blundell <philb@gnu.org>
1682 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1683 elf_sec->this_hdr == NULL.
1685 2009-06-12 Tristan Gingold <gingold@adacore.com>
1687 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1688 * bfd-in2.h: Regenerated.
1689 * libbfd.h: Regenerated.
1691 * mach-o.c (FILE_ALIGN): New macro.
1692 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1693 (bfd_mach_o_print_symbol): Ditto.
1694 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1695 (bfd_mach_o_get_reloc_upper_bound): New function.
1696 (bfd_mach_o_canonicalize_reloc): Ditto.
1697 (bfd_mach_o_scan_write_relocs): Ditto.
1698 (bfd_mach_o_scan_write_section_32): Remove offset argument.
1699 (bfd_mach_o_scan_write_section_64): Ditto.
1700 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
1701 written for load command. Do not compute section file offset.
1702 (bfd_mach_o_scan_write_segment_64): Ditto.
1703 (bfd_mach_o_scan_write_symtab): Compute file offset first.
1704 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
1706 (bfd_mach_o_mangle_symbols): ... this new function.
1707 (bfd_mach_o_write_contents): Be sure to have load commands built.
1708 Call bfd_mach_o_mangle_symbols.
1709 (bfd_mach_o_build_commands): Adjust for filelen field.
1710 Use FILE_ALIGN macro. Clear section file offset if section is empty.
1711 Do not set symtab file offset anymore here.
1712 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1713 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1714 Set reloc_count and rel_filepos section fields.
1715 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1717 (bfd_mach_o_scan_read_section_64): Ditto.
1718 (bfd_mach_o_scan_read_section): Ditto.
1719 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1720 bfd_mach_o_asymbol. Use unsigned int for file offset type.
1721 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1722 Handle weak-ref symbols.
1723 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1724 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1725 (bfd_mach_o_scan): Remove assignment to removed field.
1726 (bfd_mach_o_mkobject_init): Ditto.
1727 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1728 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1729 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1730 (bfd_mach_o_swap_reloc_in): Ditto.
1731 (bfd_mach_o_swap_reloc_out): Ditto.
1733 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1734 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1735 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1736 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1737 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1738 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1739 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1740 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1741 (BFD_MACH_O_N_WEAK_DEF): New macros.
1743 (bfd_mach_o_section_type): Add new enumeration values.
1744 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1745 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1746 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1747 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1749 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1750 (BFD_MACH_O_GENERIC_RELOC_PAIR)
1751 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1752 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1753 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1754 (BFD_MACH_O_RELENT_SIZE): Ditto.
1755 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1756 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1757 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1758 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1759 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1760 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1761 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1762 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1763 (bfd_mach_o_reloc_info): New struct.
1764 (bfd_mach_o_asymbol): New struct.
1765 (bfd_mach_o_symtab_command): The symbols field is now of type
1767 (bfd_mach_o_load_command): The offset and len fields are now of type
1769 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1770 Add a filelen field. Add comments.
1771 (bfd_mach_o_backend_data): New struct.
1772 (bfd_mach_o_get_backend_data): New macro.
1773 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1775 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1776 (bfd_mach_o_get_reloc_upper_bound): New prototype.
1777 (bfd_mach_o_canonicalize_reloc): Ditto.
1779 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1780 duplicated macro. Now defined to _bfd_generic_is_local_label.
1781 (TARGET_NAME_BACKEND): New macro...
1782 (TARGET_NAME_BACKEND): ... used to name a new variable.
1783 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1784 Mach-O backend data.
1786 * mach-o-i386.c (i386_howto_table): New variable.
1787 (bfd_mach_o_i386_swap_reloc_in): New function.
1788 (bfd_mach_o_i386_swap_reloc_out): Ditto.
1789 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1790 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1791 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1792 (bfd_mach_o_bfd_reloc_type_lookup)
1793 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1795 2009-06-11 Eric Paris <eparis@redhat.com>
1796 Nick Clifton <nickc@redhat.com>
1798 * opncls.c (_maybe_make_executable): New function. Gives execute
1799 permission to an executable bfd that was opened for writing
1800 provided that it is a regular file. Replaces common code found in...
1801 (bfd_close): here and ...
1802 (bfd_close_all_done): here.
1804 2009-06-11 Anthony Green <green@moxielogic.com>
1806 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1807 * bfd-in2.h: Rebuilt.
1808 * libbfd.h: Rebuilt.
1809 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1811 (moxie_reloc_map): Ditto.
1812 Clean up copyright notice.
1814 2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1816 * bfd-in2.h: bfd_mmap prototype.
1817 * bfdio.c (bfd_mmap): New function.
1818 * libbfd.h (bfd_iovec): Add bmmap.
1819 * cache.c (cache_bmmap): New function.
1820 (cache_iovec): Initialize bmmap member.
1821 * opencls.c (opncls_bmmap): New function.
1822 (opncls_iovec): Initialize bmmap member.
1824 2009-06-09 Tristan Gingold <gingold@adacore.com>
1826 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1827 and stabstr_segment fields.
1828 (mach_o_be_vec, mach_o_le_vec): Removed
1829 (bfd_mach_o_version): New prototype.
1831 * mach-o.c (bfd_mach_o_version): Make this function public.
1832 (mach_o_wide_p): New function.
1833 (bfd_mach_o_wide_p): Ditto.
1834 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1836 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1837 Search in the list only if the name starts with a dot.
1838 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1839 test. Check bfd_seek status.
1840 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1841 (bfd_mach_o_scan_write_section_32): Ditto.
1842 (bfd_mach_o_scan_write_section_64): Ditto.
1843 (bfd_mach_o_scan_write_section): Removed.
1844 (bfd_mach_o_scan_write_segment): Split into ...
1845 (bfd_mach_o_scan_write_segment_32): ... this and ...
1846 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
1847 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1848 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
1849 symbol table. Now returns a boolean.
1850 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
1851 Adjust for status type.
1852 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1853 test. Write symbol table. Numbers the sections.
1854 (bfd_mach_o_read_header): Check bfd_seek status.
1855 Use mach_o_wide_p instead of hard-coded test.
1856 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1857 (bfd_mach_o_scan_read_section_64): Ditto.
1858 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
1859 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
1860 handled common symbols.
1861 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1862 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1863 (bfd_mach_o_scan_read_dylinker): Ditto.
1864 (bfd_mach_o_scan_read_dylib): Ditto.
1865 (bfd_mach_o_scan_read_thread): Ditto.
1866 (bfd_mach_o_scan_read_symtab): Ditto.
1867 Do not create a section for the stabs.
1868 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1869 (bfd_mach_o_scan_read_segment): Ditto.
1870 (bfd_mach_o_scan_read_command): Ditto.
1871 (bfd_mach_o_scan_start_address): Ditto.
1872 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1873 (bfd_mach_o_archive_p): Check bfd_seek status.
1874 (bfd_mach_o_core_fetch_environment): Ditto.
1876 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1878 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1880 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1881 (elf_i386_link_hash_table_create): Initialize irelifunc.
1882 (elf_i386_check_relocs): Updated. Set up irelifunc for
1884 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1885 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1887 (elf_i386_relocate_section): Likewise.
1889 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1890 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1891 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1893 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1894 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1896 (elf64_x86_64_relocate_section): Likewise.
1898 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1900 (_bfd_elf_create_ifunc_sections): This.
1902 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
1904 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1907 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1909 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1910 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1911 building shared object. Check info->executable instead of
1912 !info->shared when setting non_got_ref.
1913 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1914 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1915 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1917 (elf_i386_relocate_section): Output dynamic relocation for
1918 R_386_32 against STT_GNU_IFUNC symbol to get the real
1919 function address when building shared object.
1920 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1921 relocation for STT_GNU_IFUNC symbol in shared object.
1923 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1924 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1925 symbol when building shared object. Check info->executable
1926 instead of !info->shared when setting non_got_ref.
1927 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1928 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1929 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1931 (elf64_x86_64_relocate_section): Output dynamic relocation
1932 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1933 function address when building shared object.
1934 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1935 relocation for STT_GNU_IFUNC symbol in shared object.
1937 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1939 * Makefile.am: Run "make dep-am".
1940 (BFD32_BACKENDS): Add mach-o-i386.lo.
1941 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1942 * Makefile.in: Regenerate.
1944 2009-06-06 Alan Modra <amodra@bigpond.net.au>
1946 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1947 when looking for soft-icache stubs.
1949 2009-06-05 Tristan Gingold <gingold@adacore.com>
1951 * mach-o.h: Update copyright year.
1952 (bfd_mach_o_mach_header_magic): New enum.
1953 (bfd_mach_o_cpu_subtype): Now an enum.
1954 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1955 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1956 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1957 (bfd_mach_o_load_command): Field type_required is now a boolean.
1958 Reindent prototypes.
1959 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1960 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1961 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1962 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1963 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1964 (bfd_mach_o_canonicalize_symtab): Ditto.
1965 (bfd_mach_o_get_symbol_info): Ditto.
1966 (bfd_mach_o_print_symbol): Ditto.
1967 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1968 (bfd_mach_o_make_empty_symbol): Ditto.
1969 (bfd_mach_o_write_contents): Ditto.
1971 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1972 bfd_mach_o_mkobject): Defines.
1973 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1974 Do not check with target vector but with flavour.
1975 (struct mach_o_section_name_xlat): New declaration.
1976 (dwarf_section_names_xlat): Ditto.
1977 (text_section_names_xlat): Ditto.
1978 (data_section_names_xlat): Ditto.
1979 (struct mach_o_segment_name_xlat): Ditto.
1980 (segsec_names_xlat): Ditto.
1981 (bfd_mach_o_convert_section_name_to_bfd): New function.
1982 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1983 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1984 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1985 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1986 Accept any input and output flavour. Do not share private data
1988 (bfd_mach_o_count_symbols): Add a comment.
1989 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1990 (bfd_mach_o_canonicalize_symtab): Ditto.
1991 (bfd_mach_o_get_symbol_info): Ditto.
1992 (bfd_mach_o_print_symbol): Ditto.
1993 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1994 Use constants instead of hard-coded values.
1995 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1997 (bfd_mach_o_scan_write_section_64): Ditto.
1998 (bfd_mach_o_scan_write_segment): Ditto.
1999 Do not copy sections anymore.
2000 (bfd_mach_o_write_contents): Make it public.
2001 Remove dead code. Rewrite typeflag assignment.
2002 (bfd_mach_o_build_commands): New function.
2003 (bfd_mach_o_set_section_contents): Ditto.
2004 (bfd_mach_o_make_empty_symbol): Make it public.
2005 (bfd_mach_o_read_header): Make it static.
2006 Convert to bfd_boolean.
2007 Use constants instead of hard-coded values.
2008 (bfd_mach_o_make_bfd_section): Call
2009 bfd_mach_o_convert_section_name_to_bfd to create name.
2010 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2012 (bfd_mach_o_scan_read_section_64): Ditto.
2013 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2014 a segment anymore. Use constants instead of hard-coded values.
2015 (bfd_mach_o_scan_read_command): Fix style.
2016 (bfd_mach_o_scan): Use constants instead of hard-coded values.
2017 Get rid of BFD_IO_FUNCS.
2018 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2019 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2020 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2021 (bfd_mach_o_object_p): Removed.
2022 (bfd_mach_o_gen_core_p): New function, replaces ...
2023 (bfd_mach_o_core_p): ... deleted.
2024 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2026 * mach-o-i386.c: New file.
2027 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2028 * configure.in (TDEFINES): Add mach_o_i386_vec.
2029 * configure: Regenerated.
2030 * targets.c: Add mach_o_i386_vec.
2032 * mach-o.c: Update copyright years.
2033 (BFD_IO_FUNCS): Remove (was not used).
2034 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2035 bfd_mach_o_slurp_extended_name_table,
2036 bfd_mach_o_construct_extended_name_table,
2037 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2038 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2039 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2040 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2041 bfd_mach_o_get_section_contents_in_window,
2042 bfd_mach_o_bfd_is_local_label_name,
2043 bfd_mach_o_bfd_is_target_special_symbol,
2044 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2045 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2046 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2047 bfd_mach_o_minisymbol_to_symbol,
2048 bfd_mach_o_bfd_get_relocated_section_contents,
2049 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2050 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2051 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2052 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2053 bfd_mach_o_bfd_merge_private_bfd_data,
2054 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2055 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2056 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2057 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2058 bfd_mach_o_bfd_copy_private_header_data,
2059 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2060 * mach-o-target.c: ... here.
2061 Update copyright years.
2063 2009-06-04 Alan Modra <amodra@bigpond.net.au>
2065 * dep-in.sed: Don't use \n in replacement part of s command.
2066 * Makefile.am (DEP1): LC_ALL for uniq.
2068 * Makefile.in: Regenerate.
2070 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2072 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2073 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2074 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2076 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2078 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2079 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2080 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2081 against STT_GNU_IFUNC symbols for static executables.
2082 (elf_i386_finish_dynamic_symbol): Load GOT entry with
2083 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2085 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2086 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2087 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2088 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2090 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
2092 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2093 symbols to be left unimported when linking statically.
2094 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2095 code when linking statically.
2097 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
2099 * elf32-i386.c (elf_i386_check_relocs): Increment
2100 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2101 against STT_GNU_IFUNC symbol.
2102 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2103 local STT_GNU_IFUNC definition is used.
2104 (elf_i386_relocate_section): Handle got.offset != -1 for
2105 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2108 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2109 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2110 relocations against STT_GNU_IFUNC symbol.
2111 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2112 local STT_GNU_IFUNC definition is used.
2113 (elf64_x86_64_relocate_section): Handle got.offset != -1
2114 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2115 STT_GNU_IFUNC symbol.
2117 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2120 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2121 (elf_i386_reloc_type_lookup): Likewise.
2122 (R_386_tls): Removed.
2123 (R_386_irelative): New.
2124 (R_386_vt_offset): Updated.
2125 (elf_i386_rtype_to_howto): Likewise.
2126 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2127 (elf_i386_link_hash_table_create): Initialize igotplt,
2129 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2130 (elf_i386_adjust_dynamic_symbol): Likewise.
2131 (elf_i386_allocate_dynrelocs): Likewise.
2132 (elf_i386_relocate_section): Likewise.
2133 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2135 (elf_i386_finish_dynamic_symbol): When building a static
2136 executable, use .iplt, .igot.plt and .rel.iplt sections for
2137 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
2138 locally defined STT_GNU_IFUNC symbol.
2140 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2141 (x86_64_reloc_map): Likewise.
2142 (R_X86_64_standard): Updated.
2143 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2144 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2146 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2147 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2148 (elf64_x86_64_allocate_dynrelocs): Likewise.
2149 (elf64_x86_64_relocate_section): Likewise.
2150 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2152 (elf64_x86_64_finish_dynamic_symbol): When building a static
2153 executable, use .iplt, .igot.plt and .rela.iplt sections for
2154 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
2155 for locally defined STT_GNU_IFUNC symbol.
2157 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2158 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2160 * bfd-in2.h: Regenerated.
2161 * libbfd.h: Likewise.
2163 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2165 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2166 (_bfd_elf_make_ifunc_reloc_section): Removed.
2167 (_bfd_elf_is_ifunc_symbol): Likewise.
2168 (_bfd_elf_create_static_ifunc_sections): New.
2170 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2172 (elf_link_add_object_symbols): Here.
2173 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2174 STT_GNU_IFUNC symbol.
2175 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2176 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2177 (IFUNC_INFIX): Removed.
2178 (get_ifunc_reloc_section_name): Likewise.
2179 (_bfd_elf_make_ifunc_reloc_section): Likewise.
2180 (_bfd_elf_is_ifunc_symbol): Likewise.
2181 (_bfd_elf_create_static_ifunc_sections): New.
2183 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
2185 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2186 (create_got_section): Likewise.
2187 (allocate_dynrelocs): Likewise.
2188 (readonly_dynrelocs): Likewise.
2189 (set_tls_module_base): Likewise.
2190 (dtpoff_base): Likewise.
2192 (elf_i386_link_hash_table_create): Updated.
2193 (elf_i386_create_dynamic_sections): Likewise.
2194 (elf_i386_check_relocs): Likewise.
2195 (elf_i386_size_dynamic_sections): Likewise.
2196 (elf_i386_relocate_section): Likewise.
2198 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2199 (create_got_section): Likewise.
2200 (allocate_dynrelocs): Likewise.
2201 (readonly_dynrelocs): Likewise.
2202 (set_tls_module_base): Likewise.
2203 (dtpoff_base): Likewise.
2205 (elf64_x86_64_link_hash_table_create): Updated.
2206 (elf64_x86_64_create_dynamic_sections): Likewise.
2207 (elf64_x86_64_check_relocs): Likewise.
2208 (elf64_x86_64_size_dynamic_sections): Likewise.
2209 (elf64_x86_64_relocate_section): Likewise.
2211 2009-05-28 Nick Clifton <nickc@redhat.com>
2213 * targets.c (_bfd_target_vector): Only include plugin target in
2214 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2216 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2218 * elf32-spu.c (struct call_info): New member broken_cycle.
2219 (remove_cycle): Instead of physically removing call_info structures
2220 to break call graph cycles, mark them using the broken_cycle flag.
2221 (mark_overlay_section): Respect broken_cycle flag.
2222 (unmark_overlay_section): Likewise.
2223 (collect_lib_sections): Likewise.
2224 (collect_overlays): Likewise.
2225 (sum_stack): Likewise.
2227 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2229 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2230 (mark_functions_via_relocs): Initialize callee->count to 1.
2231 (pasted_function): Likewise.
2232 (spu_elf_auto_overlay): Honor call counts when determining number
2233 of stubs required in software i-cache mode.
2235 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2237 * plugin.c (program_name): Remove.
2238 (plugin_program_name): New.
2239 (bfd_plugin_set_program_name): New.
2240 (try_load_plugin): Use plugin_program_name.
2241 * plugin.h (bfd_plugin_set_program_name): New.
2243 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
2245 * aclocal.m4: Include ../config/plugins.m4.
2246 * configure.in: Use AC_PLUGINS.
2247 * configure: Regenerate.
2248 * Makefile.in: Regenerate.
2249 * doc/Makefile.in: Regenerate.
2251 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
2253 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2255 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2256 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2257 * elf32-avr.c (elf32_avr_relax_section): Likewise.
2258 * elf32-frv.c (elf32_avr_relax_section): Likewise.
2259 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2260 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2261 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2262 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2263 * reloc.c (bfd_generic_relax_section): Likewise.
2264 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2265 * vms.c (vms_bfd_relax_section): Likewise.
2267 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
2269 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2271 * elf32-i386.c (is_indirect_symbol): Renamed to ...
2272 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2274 * elf32-i386.c (allocate_dynrelocs): Updated.
2275 (elf_i386_relocate_section): Likewise.
2276 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2277 (elf64_x86_64_relocate_section): Likewise.
2279 * elf64-x86-64.c (is_indirect_symbol): Removed.
2281 2009-05-26 Nick Clifton <nickc@redhat.com>
2283 * po/id.po: Updated Indonesian translation.
2285 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
2287 * Makefile.am: Run "make dep-am".
2290 (ALL_MACHINES): Add cpu-plugin.lo.
2291 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2292 (BFD32_BACKENDS): Add plugin.lo.
2293 (BFD32_BACKENDS_CFILES): Add plugin.c.
2294 (libbfd_la_LIBADD): Add LIBDL
2295 * archures.c (bfd_architecture): Add bfd_arch_plugin.
2296 (bfd_plugin_arch): Declare.
2297 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2298 * bfd.c (bfd): Add plugin_data.
2299 * config.bfd: Handle the plugin target.
2300 * configure.in: Check for --enable-plugins.
2301 (LT_INIT): Use the dlopen option.
2302 * cpu-plugin.c: New.
2305 * targets.c (plugin_vec): Declare.
2306 (_bfd_target_vector): Add plugin_vec.
2307 * Makefile.in: Regenerate.
2308 * bfd-in2.h: Regenerate.
2309 * configure: Regenerate.
2311 2009-05-26 Alan Modra <amodra@bigpond.net.au>
2313 * dep-in.sed: Don't modify .o to .lo here. Output one filename
2314 per line with all lines having continuation backslash. Prefix
2315 first line with "A", following lines with "B".
2316 * Makefile.am (DEP): Don't use dep.sed here.
2317 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
2318 dep.sed here on dependencies, sort and uniq.
2319 * Makefile.in: Regenerate.
2321 2009-05-25 Tristan Gingold <gingold@adacore.com>
2323 * makefile.vms: Add verilog.obj to object list OBJS.
2325 2009-05-24 Alan Modra <amodra@bigpond.net.au>
2327 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
2328 for BFD_IN_MEMORY is cleared.
2329 (bfd_bwrite): Zero excess memory allocated.
2331 2009-05-22 Julian Brown <julian@codesourcery.com>
2333 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2335 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2336 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2337 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2338 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2339 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2340 (a8_erratum_fix, a8_erratum_reloc): New structs.
2341 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2342 num_a8_erratum_fixes, fix_cortex_a8 fields.
2343 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2344 (elf32_arm_add_stub): Split into two parts, creating...
2345 (elf32_arm_create_or_find_stub_sec): New function.
2346 (elf32_arm_final_link_relocate): Add forward declaration.
2347 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2348 relocations, multiple relocations per stub.
2349 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2350 (arm_size_one_stub): Use find_stub_size_and_template.
2351 (a8_reloc_compare): New.
2352 (find_thumb_glue): Add forward declaration.
2353 (cortex_a8_erratum_scan): New.
2354 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2355 (bfd_elf32_arm_set_cortex_a8_fix): New.
2356 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2357 (arm_map_one_stub): Add THUMB32_TYPE support.
2358 (a8_branch_to_stub_data): New.
2359 (make_branch_to_a8_stub): New.
2360 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2361 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2362 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2363 Cortex-A8 erratum workaround.
2364 * bfd-in2.h: Regenerate.
2366 2009-05-22 Alan Modra <amodra@bigpond.net.au>
2368 * Makefile.am: Run "make dep-am".
2369 * Makefile.in: Regenerate.
2370 * po/SRC-POTFILES.in: Regenerate.
2372 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2374 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
2377 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2379 * elf-bfd.h (struct elf_backend_data
2380 <elf_backend_link_output_symbol_hook>): Return an int.
2381 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
2382 symbols on deleted .opd entries.
2383 * elflink.c (elf_link_output_sym): Return without outputting sym
2384 if output_symbol_hook returns 2.
2385 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
2386 Abort if we must not discard sym.
2387 (elf_link_input_bfd): Similarly, don't set finfo->indices for
2389 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
2390 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
2391 elf_backend_link_output_symbol_hook return type change.
2392 * elf32-arm.c (output_arch_syminfo): Likewise.
2393 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
2394 (elf32_arm_output_arch_local_syms): Likewise.
2395 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
2396 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
2397 (bfd_score_elf_link_output_symbol_hook): Likewise.
2398 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2399 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
2400 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
2401 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
2402 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
2403 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
2404 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
2405 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
2406 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2407 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2408 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
2410 2009-05-21 Alan Modra <amodra@bigpond.net.au>
2412 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
2413 out of range .opd symbols.
2415 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
2417 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
2418 fprintf_vma directly.
2419 * peXXigen.c (pe_print_edata): Likewise.
2420 (pe_print_pdata): Likewise.
2421 (_bfd_XX_print_ce_compressed_pdata): Likewise.
2422 (_bfd_XX_print_private_bfd_data_common): Likewise.
2424 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
2426 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
2428 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
2429 Paul Brook <paul@codesourcery.com>
2431 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
2432 fix discarded sections.
2434 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2436 * elf32-spu.c (mark_overlay_section): Move .init and .fini
2437 sections into the software icache.
2439 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2441 * elf32-spu.c (build_stub): Always build "compact" sofware
2444 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2446 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
2447 (spu_elf_setup): Initialize it.
2448 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
2449 Update to new-sytle cache manager data structures.
2450 (spu_elf_build_stubs): Generate new-style cache manager data
2451 structures and symbols.
2452 (spu_elf_auto_overlay): Update size computation.
2454 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2456 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
2457 segments first amongst the program headers.
2459 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2461 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
2462 into addresses for relocation types that look at high bits. Remove
2463 special handling of relocation overflow warnings.
2465 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2467 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
2468 control flow graph between fragments of a function.
2470 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
2472 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
2473 generate only a 16-byte .toe section.
2474 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
2476 2009-05-14 Alan Modra <amodra@bigpond.net.au>
2478 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
2479 (spu_elf_place_overlay_data): ..here. New function.
2480 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
2482 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
2484 * elf32-arm.c: Move sysdep.h to start of file.
2486 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
2488 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2490 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
2491 __icache_tag_array and __icache_tag_array_size.
2493 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
2495 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2497 (bfinfdpic_link_omit_section_dynsym): Likewise.
2498 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2500 2009-05-05 Paul Brook <paul@codesourcery.com>
2502 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2503 * bfd-in2.h: Regenerate.
2504 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2505 (_arm_elf_section_data): Add text and exidx fields.
2506 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2507 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2508 copy_exidx_entry): New functions.
2509 (elf32_arm_write_section): Fixup .ARM.exidx contents.
2511 2009-05-05 Christophe lyon <christophe.lyon@st.com>
2513 * elf32-arm.c (DEF_STUBS): New helper define.
2514 (DEF_STUB): Likewise.
2515 (stub_def): New type.
2516 (stub_definitions): New array, containing stub template pointers
2518 (arm_size_one_stub): Make use of stub_definitions.
2520 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
2522 * elflink.c (find_version_for_sym): Remove from here, ...
2523 * linker.c (bfd_find_version_for_sym): ... rename, replace
2524 here, make public and update all callers.
2525 * bfd-in2.h: Regenerate.
2527 2009-04-30 Nick Clifton <nickc@redhat.com>
2529 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2531 (struct elf_obj_data): Add has_ifunc_symbols boolean.
2532 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2533 into a STT_GNU_IFUNC symbol type.
2534 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2536 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2537 the binary contains ifunc symbols.
2538 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2539 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2540 * elf32-i386.c (is_indirect_function): New function.
2541 (elf_i386_check_relocs): Create an ifunc output section.
2542 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2543 section if necessary.
2544 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2546 (elf_i386_add_symbol_hook): New function. Set the
2547 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2548 symbol is encountered.
2549 (elf_backend_post_process_headers): Define.
2550 (elf_backend_add_symbol_hook): Define.
2551 (elf_i386_post_process_headers): Rename to
2552 elf_i388_fbsd_post_process_headers.
2553 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2554 (is_indirect_function): New function.
2555 (elf64_x86_64_check_relocs): Create an ifunc output section.
2556 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2557 section if necessary.
2558 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2559 symbol if necessary.
2560 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2561 elf_obj_data structure if an ifunc symbol is encountered.
2562 (elf_backend_post_process_headers): Define.
2563 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2564 if we have ifunc symbols to handle.
2565 (get_ifunc_reloc_section_name): New function. Computes the name
2566 for an ifunc section.
2567 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
2568 section to hold ifunc relocs.
2569 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2570 (bfd_print_symbol_vandf): Handle ifunc symbols.
2571 (bfd_decode_symclass): Likewise.
2572 * bfd-in2.h: Regenerate.
2574 2009-04-30 Joseph Myers <joseph@codesourcery.com>
2576 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2577 MOVW and MOVT relocations in a shared library link.
2579 2009-04-27 Anthony Green <green@moxielogic.com>
2581 * verilog.c: New file.
2582 * Makefile.am (BFD32_LIBS): Add verilog.c.
2583 (BFD32_LIBS_CFILES): Add verilog.c.
2584 (verilog.lo): New build rule.
2585 * Makefile.in: Rebuilt.
2586 * targets.c: Add verilog support.
2587 * bfd.c (tdata union): Add Verilog private data field.
2588 * bfd-in2.h: Regenerate.
2590 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
2592 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2595 2009-04-23 Matthias Klose <doko@ubuntu.com>
2597 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
2599 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
2602 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2603 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2604 (elf32_arm_size_stubs): Likewise.
2605 (record_thumb_to_arm_glue): Deleted unused function.
2606 (bfd_elf32_arm_process_before_allocation): No longer handle
2607 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2608 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2609 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2611 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
2613 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2614 (elf32_arm_write_section): Declare early.
2615 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2616 (arm_allocate_glue_section_space): Exclude empty sections.
2617 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2618 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2620 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2621 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2622 (elf32_arm_size_dynamic_sections): Allocate interworking
2624 (bfd_elf32_bfd_final_link): Define.
2626 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2628 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
2630 * coffcode.h (coff_compute_section_file_positions): Clear
2631 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2633 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2634 force_minimum_alignment.
2636 * libcoff.h: Regenerated.
2638 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2639 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2641 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2642 nor target_subsystem.
2644 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2645 force_minimum_alignment nor target_subsystem.
2647 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
2649 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2650 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2651 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2652 include in coff-x86_64.c of headers.
2653 (PDATA_ROW_SIZE): New define.
2654 (pex_regs[]): New static array.
2655 (pex64_get_runtime_function): New static function.
2656 (pex64_get_unwind_info): Likewise.
2657 (pex64_get_scope_entry): Likewise.
2658 (pex64_xdata_print_uwd_codes): Likewise.
2659 (pex64_get_section_by_rva): Likewise.
2660 (pex64_dump_xdata): Likewise.
2661 (pex64_bfd_print_pdata): Likewise.
2662 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2663 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2664 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2666 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
2667 Alan Modra <amodra@bigpond.net.au>
2668 Dave Korn <dave.korn.cygwin@gmail.com>
2670 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2671 long names and non-NUL-terminated strings.
2673 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2675 * bfd-in2.h: Regenerated.
2677 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2679 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2680 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2682 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2685 * coffcode.h (bfd_pei_p): New.
2687 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2688 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2689 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2690 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
2691 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2692 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2694 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2695 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2696 bfd_efi_rtdrv_x86_64_vec,
2697 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
2698 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2699 * targets.c: Likewise.
2701 * configure: Regenerated.
2702 * libcoff.h: Likewise.
2703 * Makefile.in: Likewise.
2705 * efi-app-ia32.c: Removed.
2706 * efi-app-x86_64.c: Likewise.
2707 * efi-bsdrv-ia32.c: Likewise.
2708 * efi-bsdrv-ia64.c: Likewise.
2709 * efi-bsdrv-x86_64.c: Likewise.
2710 * efi-rtdrv-ia32.c: Likewise.
2711 * efi-rtdrv-ia64.c: Likewise.
2712 * efi-rtdrv-x86_64.c: Likewise.
2713 * efi-rtdrv-ia32.c: Likewise.
2715 * efi-app-ia64.c: Moved to ...
2717 (TARGET_SYM): Set to bfd_pei_ia64_vec.
2718 (TARGET_NAME): Set to pei-ia64.
2720 * libpei.h (bfd_target_pei_p): Removed.
2721 (bfd_target_pei_arch): Likewise.
2722 (bfd_target_efi_app_p): Likewise.
2723 (bfd_target_efi_app_arch): Likewise.
2724 (bfd_target_efi_bsdrv_p): Likewise.
2725 (bfd_target_efi_bsdrv_arch): Likewise.
2726 (bfd_target_efi_rtdrv_p): Likewise.
2727 (bfd_target_efi_rtdrv_arch): Likewise.
2728 (bfd_pe_executable_p): Likewise.
2730 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2731 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2732 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2733 and efi-rtdrv-ia32.c.
2734 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2735 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2736 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2737 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2738 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2739 efi-rtdrv-x86_64.c. Add pei-ia64.c.
2740 (efi-app-ia64.lo): Removed.
2741 (efi-bsdrv-ia32.lo): Likewise.
2742 (efi-rtdrv-ia32.lo): Likewise.
2743 (efi-app-ia64.lo): Likewise.
2744 (efi-bsdrv-ia64.lo): Likewise.
2745 (efi-rtdrv-ia64.lo): Likewise.
2746 (efi-app-x86_64.lo): Likewise.
2747 (efi-bsdrv-x86_64.lo): Likewise.
2748 (efi-rtdrv-x86_64.lo): Likewise.
2751 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2753 (arch_type): Removed.
2754 (pe_arch): Likewise.
2755 (pe_bfd_object_p): Just return coff_object_p.
2757 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2758 bfd_pe_executable_p with bfd_pei_p.
2760 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
2762 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2763 PLT entries to an undefined symbol when generating a shared
2766 2009-04-17 Nick Clifton <nickc@redhat.com>
2769 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2771 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
2773 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2774 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2775 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2776 * binary.c (binary_bfd_define_common_symbol): Likewise.
2777 * bout.c (b_out_bfd_define_common_symbol): Likewise.
2778 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2779 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2780 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2781 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2782 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2783 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2784 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2785 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2786 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2787 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2788 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2789 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2790 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2791 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2792 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2793 * som.c (som_bfd_define_common_symbol): Likewise.
2794 * srec.c (srec_bfd_define_common_symbol): Likewise.
2795 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2796 * versados.c (versados_bfd_define_common_symbol): Likewise.
2797 * vms.c (vms_bfd_define_common_symbol): Likewise.
2798 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2799 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2800 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2801 (pmac_xcoff_vec): Likewise.
2802 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2803 (aix5coff64_vec): Likewise.
2804 * linker.c (bfd_generic_define_common_symbol): New function.
2805 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2806 (_bfd_define_common_symbol): New field.
2807 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2808 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2809 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2811 * bfd-in2.h: Regenerate.
2812 * libbfd.h: Likewise.
2813 * libcoff.h: Likewise.
2815 2009-04-15 Anthony Green <green@moxielogic.com>
2817 * targets.c: Add moxie support.
2818 * Makefile.am: Ditto.
2819 * Makefile.in: Rebuilt.
2820 * cpu-moxie.c, elf32-moxie.c: New files.
2821 * archures.c: Add moxie support.
2822 * configure.in: Add moxie support.
2823 * configure: Rebuilt.
2824 * config.bfd, archures.c: Add moxie support.
2825 * bfd-in2.h: Rebuilt.
2827 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
2829 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2830 branch to an undef weak symbol into a jump to next instruction if
2831 a PLT entry will be created.
2833 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
2835 * coffgen.c (make_a_section_from_file): Set the backend long
2836 section names enable if long section names found on input.
2837 * coffcode.h: Extend long section names documentation to match.
2839 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
2841 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2844 2009-04-07 DJ Delorie <dj@redhat.com>
2846 * archures.c: Add bfd_mach_mep_c5.
2847 * bfd-in2.h: Likewise.
2848 * cpu-mep.c: Add bfd_c5_arch.
2849 * elf32-mep.c: Support it.
2851 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
2853 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2854 info->callbacks->einfo.
2855 * linker.c (_bfd_generic_section_already_linked): Likewise.
2857 2009-04-06 DJ Delorie <dj@redhat.com>
2859 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2861 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
2863 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2864 _bfd_pex64_print_pdata only if PE is defined.
2866 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2867 (_bfd_pex64_print_pdata): This.
2869 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2870 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2873 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
2875 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2876 _bfd_pep_print_x64_pdata.
2877 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2878 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2880 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2882 * elf32-xtensa.c (relax_property_section): Always set r_offset
2885 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
2887 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2888 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2890 (elf32_arm_stub_type): New enum values for the two new stubs.
2891 (arm_type_of_stub): Make use of the two new stubs.
2892 (arm_size_one_stub): Handle the two new stubs.
2894 2009-04-01 Matt Thomas <matt@netbsd.org>
2896 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2897 hidden symbols into the GOT or PLT.GOT.
2898 (elf_vax_relocate_section): Do not emit a PCREL reloc
2899 into a shared object if it is against a hidden symbol.
2901 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2903 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2904 and know_contains_shared_object_p.
2905 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2906 Cache the result in the archive_info table.
2907 (xcoff_auto_export_p): Add an "info" parameter and update the
2908 call to xcoff_archive_contains_shared_object_p.
2909 (xcoff_mark_auto_exports): Update accordingly.
2910 (xcoff_post_gc_symbol): Likewise.
2912 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2914 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2917 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2919 * coff-rs6000.c (member_layout): New structure.
2920 (archive_iterator): Likewise.
2921 (member_layout_init): New function.
2922 (archive_iterator_begin): Likewise.
2923 (archive_iterator_next): Likewise.
2924 (xcoff_write_armap_old): Use the new iterator functions.
2925 (do_shared_object_padding): Delete.
2926 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2927 handling of arch_info.
2928 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2929 first loop rather than the second. Allocate a member header if
2930 there isn't one, then work out the stat information and length
2931 in the first loop too. Use the new iterators for the second loop.
2932 (xcoff_write_archive_contents_big): Likewise.
2934 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2936 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2937 (bfd_xcoff_set_archive_import_path): Likewise.
2938 * bfd-in2.h: Regenerate.
2939 * xcofflink.c: Include libiberty.h.
2940 (xcoff_archive_info): New structure.
2941 (xcoff_archive_info_hash): New function.
2942 (xcoff_archive_info_eq): Likewise.
2943 (xcoff_get_archive_info): Likewise.
2944 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2945 (bfd_xcoff_split_import_path): New function.
2946 (bfd_xcoff_set_archive_import_path): Likewise.
2947 (xcoff_set_import_path): Move earlier in file.
2948 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2949 object to the the directory part of the bfd's filename. Get the
2950 import path and filename of an archive object from the archive's
2951 xcoff_tdata, initializing it if necessary. Update use of
2953 (bfd_link_input_bfd): Update use of import_file_id.
2954 (xcoff_write_global_symbol): Likewise.
2956 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2958 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2960 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2962 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2963 a .loader section for relocatable links.
2964 (xcoff_need_ldrel_p): New function.
2965 (xcoff_mark): Use it.
2966 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2968 (xcoff_build_ldsym): New function, split out from...
2969 (xcoff_build_ldsyms): ...here. Rename to...
2970 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2971 call xcoff_build_ldsym, if there's a loader section.
2972 (xcoff_build_loader_section): New function, extracted verbatim from...
2973 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2974 there's a loader section. Only add an __rtinit loader symbol
2975 if there's a loader section. Update after above name change.
2976 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2977 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2978 and xcoff_create_ldrel.
2979 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2980 (xcoff_reloc_link_order): Likewise, but only call it if there's
2981 a loader section. Use xcoff_symbol_section.
2982 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2983 if there's a loader section.
2985 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2987 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2989 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
2991 * elf32-arm.c (group_sections): Rewrite loops for better
2994 2009-03-30 DJ Delorie <dj@redhat.com>
2996 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2997 relocs when doing a relocatable link.
2999 2009-03-28 Mark Mitchell <mark@codesourcery.com>
3001 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3002 "ERROR:", in error messages.
3003 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3004 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3005 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3006 (elf32_arm_merge_eabi_attributes): Likewise.
3007 (elf32_arm_merge_private_bfd_data): Likewise.
3009 2009-03-27 Nick Clifton <nickc@redhat.com>
3011 * section.c (bfd_get_section_contents): Detect and handle the case
3012 where a section has the SEC_IN_MEMORY flag set but no actual
3015 2009-03-26 Alan Modra <amodra@bigpond.net.au>
3018 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3019 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
3020 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3021 if we don't find matching PT_LOAD when copying.
3023 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3025 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3026 the reloc descriptions.
3028 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
3030 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3031 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3032 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3034 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
3036 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3037 (bfd_i386_arch_intel_syntax): Likewise.
3038 (i8086_arch): Likewise.
3039 (bfd_x86_64_arch): Likewise.
3041 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
3043 * elf32-cris.c (cris_elf_relocate_section): <case
3044 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3045 symbols for non-allocated sections. Don't check whether to
3046 generate R_CRIS_DTPMOD for non-allocated sections.
3047 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3048 handle relocation GC:ing if applied to non-allocated section.
3049 (cris_elf_check_relocs): Similar.
3051 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3052 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3053 when emitting a known TP offset in the GOT.
3055 2009-03-23 Alan Modra <amodra@bigpond.net.au>
3057 * elf64-ppc.c (synthetic_opd): Delete.
3058 (compare_symbols): Look for .opd name rather than section match.
3059 (ppc64_elf_get_synthetic_symtab): Likewise.
3061 2009-03-21 Alan Modra <amodra@bigpond.net.au>
3063 * elf32-ppc.c (is_pic_glink_stub): Delete.
3064 (is_nonpic_glink_stub): New function.
3065 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3067 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3069 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3070 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3072 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
3073 macros for visibilty and locality checks.
3074 (elf_s390_adjust_dynamic_symbol): Likewise.
3075 (allocate_dynrelocs): Likewise.
3076 (elf_s390_relocate_section): Likewise.
3077 (elf_s390_finish_dynamic_symbol): Likewise.
3078 * elf64-s390.c (elf_s390_check_relocs): Likewise.
3079 (elf_s390_adjust_dynamic_symbol): Likewise.
3080 (allocate_dynrelocs): Likewise.
3081 (elf_s390_relocate_section): Likewise.
3082 (elf_s390_finish_dynamic_symbol): Likewise.
3084 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
3086 * bfd-in2.h: Regenerated.
3087 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3088 for debugging sections and map memory read/write dependent on
3090 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3091 without memory read flags set.
3092 * section.c: Add SEC_COFF_NOREAD to section flags.
3094 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
3096 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3099 2009-03-19 Alan Modra <amodra@bigpond.net.au>
3101 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3102 "no overlays" return. If there are overlays, create overlay
3103 manager entry symbols here, so that..
3104 (spu_elf_build_stubs): ..we don't need to set them up here.
3105 Simplify entry symbol tests.
3106 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3108 2009-03-18 Mark Kettenis <kettenis@gnu.org>
3110 * elf.c (elfcore_grok_openbsd_procinfo)
3111 (elfcore_grok_openbsd_note): New functions.
3112 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3114 2009-03-18 Alan Modra <amodra@bigpond.net.au>
3116 * vms-hdr.c: Don't include alloca.h.
3117 * elf32-m68hc1x.c: Include alloca-conf.h.
3119 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
3121 * Makefile.am: Run "make dep-am".
3122 * Makefile.in: Regenerate.
3124 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
3126 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3128 2009-03-17 Alan Modra <amodra@bigpond.net.au>
3130 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3132 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3133 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3134 ovly_return fields with ovly_entry[2]. Adjust all users.
3135 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3137 (spu_elf_build_stubs): Likewise.
3138 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
3139 ovly_flavour changes. Update all callers.
3140 (ovl_stub_size_log2): New function.
3141 (build_stub): Handle compact icache stubs. Use different manager
3142 entry point for stubs in non-icache area.
3143 (spu_elf_size_stubs): Don't allocate space for indirect branch
3145 (spu_elf_build_stubs): And don't built them.
3147 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
3149 * dwarf2.c (read_section): Always use rawsize, if available.
3151 2009-03-16 Alan Modra <amodra@bigpond.net.au>
3153 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3154 of rawsize and size for buffer.
3156 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
3158 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3159 parameter just because fixed sections fit into local store.
3160 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
3161 generating overlays if fixed sections plus reserved stack
3162 and heap space fit into local store.
3164 2009-03-15 Alan Modra <amodra@bigpond.net.au>
3166 * elf32-spu.c (build_stub): Correct icache set_id.
3167 (spu_elf_relocate_section): Likewise.
3169 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3171 * xcofflink.c (xcoff_link_check_archive_element): Only free the
3172 symbol table if it was created by the current call.
3174 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3176 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3177 class XMC_DS rather than XMC_UA.
3179 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3181 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3182 bfd_boolean export_defineds parameter with an unsigned int
3183 auto_export_flags parameter.
3184 * bfd-in2.h: Regenerate.
3185 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3186 split out from xcoff_build_ldsyms.
3187 (xcoff_covered_by_expall_p): New function.
3188 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3189 but with extra code to handle -bexpfull and -bexpall.
3190 (xcoff_mark_auto_exports): New function.
3191 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3192 a function should be automatically exported.
3193 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3194 parameter with an auto_export_flags parameter. Update ldinfo
3195 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
3198 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3200 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3201 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3202 init and fini functions. Do garbage collection for objects
3203 without an entry point too.
3205 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3207 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3208 check whether a symbol has csect information.
3209 (coff_print_aux): Likewise.
3210 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3211 information for C_AIX_WEAKEXT too.
3212 (_bfd_xcoff_swap_aux_out): Likewise.
3213 (xcoff_reloc_type_br): Handle defweak symbols too.
3214 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3215 information for C_AIX_WEAKEXT too.
3216 (_bfd_xcoff64_swap_aux_out): Likewise.
3217 (xcoff64_reloc_type_br): Handle defweak symbols too.
3218 * coffgen.c (coff_print_symbol): Handle auxillary function
3219 information for C_AIX_WEAKEXT too.
3220 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3221 instead of BSF_GLOBAL if the L_WEAK flag is set.
3222 (xcoff_dynamic_definition_p): New function.
3223 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3224 defines h. Don't change h if ldsym isn't the definition. Otherwise,
3225 always take the symbol class from the ldsym. Use weak bfd symbol
3226 types for weak ldsyms.
3227 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3228 Fix the check for whether a definition is from a shared object.
3229 Allow redefinitions of weak symbols.
3230 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3231 (xcoff_keep_symbol_p): Likewise.
3232 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3233 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3234 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3235 but mark them as L_WEAK.
3236 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3237 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3239 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3241 * xcofflink.c (xcoff_mark): When walking the relocations,
3242 only mark the target symbol or the target section, not both.
3243 (xcoff_final_definition_p): New function.
3244 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3245 symbol is a valid definition of the associated output symbol.
3246 Use XCOFF_ALLOCATED to stop the same hash table entry having
3248 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3250 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3252 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3254 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3257 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3259 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3260 * libcoff.h: Regenerate.
3261 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3262 line-number counts in the bfd's lineno_counts field.
3263 Don't keep per-csect line-number counts.
3264 (xcoff_sweep): Don't update per-csect line-number counts.
3265 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3266 entries in each output section.
3267 (xcoff_link_input_bfd): Get the number of line numbers from
3268 the bfd's lineno_counts field, rather than recalculating it
3269 from scratch. Fix the range check when updating C_BINCL and
3271 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3272 here. Don't expect csects to have line-number counts.
3274 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3276 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3277 * libcoff.h: Regenerate.
3278 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3279 "skip" logic from xcoff_link_input_bfd.
3280 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3281 objects in a dynamic link, rather than checking whether csectpp
3282 is null. Always allocate debug_index for other objects,
3283 and always go through the loop. Update the type of debug_index
3284 after the change above. Read the auxillary csect information
3285 and use xcoff_keep_symbol_p to decide whether a symbol should
3286 be kept. Set its debug_index to -2 if not.
3287 (xcoff_link_input_bfd): Update the type of debug_index after
3288 the change above and always expect it to be nonnull. Use it to
3289 test whether a symbol should be stripped, rather than making the
3290 decision here. Postpone all symbol creation to the second pass.
3292 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3294 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3295 creating a descriptor.
3296 (xcoff_sweep): Don't mark toc_section unless it's needed.
3297 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3298 when marking every bfd.
3299 (xcoff_link_input_bfd): Skip all TOC anchors.
3300 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3301 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3302 to -1; call xcoff_find_tc0 instead.
3304 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3306 * libcoff-in.h (xcoff_section_tdata): Update commentary.
3307 * libcoff.h: Regenerate.
3308 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3309 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3310 the previous symbol's csect. Treat last_symndx as an inclusive value
3311 and simplify its handling.
3312 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
3313 symbols with the right csect. Don't mark rsec when processing
3314 relocations against undefined or absolute sections.
3315 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3316 of bfd_und_section_ptr.
3317 (xcoff_link_input_bfd): Likewise.
3319 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3321 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3322 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3323 flag is set. Assert that all undefined symbols are either
3324 imported or defined by a dynamic object.
3325 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3326 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3327 handling to all relocations. Only set XCOFF_CALLED for function
3329 (xcoff_find_function): New function, split out from...
3330 (bfd_xcoff_export_symbol) ...here.
3331 (xcoff_set_import_path): New function, split out from...
3332 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
3333 meaning of XCOFF_CALLED.
3334 (xcoff_mark_symbol): If we mark an undefined and unimported
3335 symbol, find some way of defining it. If the symbol is a function
3336 descriptor, fill in its definition automatically. If the symbol
3337 is a function, mark its descriptor and allocate room for global
3338 linkage code. Otherwise mark the symbol as implicitly imported.
3339 Move the code for creating function descriptors from...
3340 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
3341 check for symbols that were implicitly defined.
3342 (xcoff_mark): Don't count any dynamic relocations against
3344 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3345 in the xcoff link info.
3346 (xcoff_link_input_bfd): Remove handling of undefined and
3349 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3351 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3352 if the target is absolute. Fix comment typo.
3353 (xcoff_ppc_relocate_section): Remove FIXME.
3354 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3355 if the target is absolute.
3357 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3359 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3360 R_POS and R_NEG relocations against absolute symbols to the
3363 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3365 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3366 to 2 for bfd_mach_ppc_620.
3368 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3370 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3371 * configure.in: Likewise.
3372 * configure: Regenerate.
3374 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
3377 * elf.c (assign_section_numbers): Generate symbol table if there
3378 is any relocation in output.
3379 (_bfd_elf_compute_section_file_positions): Likewise.
3381 2009-03-13 Nick Clifton <nickc@redhat.com>
3384 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
3385 * elflink.c (elf_link_read_relocs_from_section): Use
3386 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
3387 relocs but no symbol table.
3388 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
3390 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
3393 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
3394 to check ___tls_get_addr.
3396 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
3397 strncmp to check __tls_get_addr.
3399 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
3401 * dwarf2.c (read_section): Always check the offset, even when the
3402 section has been read before.
3404 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
3406 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
3409 2009-03-11 Chris Demetriou <cgd@google.com>
3411 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
3412 * bfd-in2.h: Regenerate.
3413 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
3414 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
3416 (bsd_write_armap): Likewise.
3417 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
3418 flag is set, do nothing.
3419 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
3422 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
3424 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
3425 used to update stack pointer.
3427 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3430 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
3431 for unknown symbols in absolute section.
3433 2009-03-06 Nick Clifton <nickc@redhat.com>
3435 * po/es.po: Updated Spanish translation.
3437 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
3439 * elf32-arm.c (group_sections): Take next section size into
3440 account before accepting to group it.
3442 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
3444 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
3446 (elf32_arm_final_link_relocate): Likewise.
3448 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
3451 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
3453 2009-03-04 Alan Modra <amodra@bigpond.net.au>
3455 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
3456 * section.c (struct bfd_section): Add has_tls_get_addr_call.
3457 (BFD_FAKE_SECTION): Init new flag.
3458 * ecoff.c (bfd_debug_section): Likewise.
3459 * bfd-in2.h: Regenerate.
3460 * libbfd.h: Regenerate.
3461 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
3462 (ppc_elf_reloc_type_lookup): Handle new relocs.
3463 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
3464 without marker relocs.
3465 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3466 if section has no old-style calls.
3467 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
3468 Don't try to optimize new-style __tls_get_addr call when handling
3469 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3471 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
3472 (ppc64_elf_reloc_type_lookup): Handle new relocs.
3473 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
3474 without marker relocs.
3475 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
3476 if section has no old-style calls. Set toc_ref for new relocs as
3478 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
3479 Don't try to optimize new-style __tls_get_addr call when handling
3480 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
3483 2009-03-04 Alan Modra <amodra@bigpond.net.au>
3486 * configure.in: Test for ld --as-needed support. Link shared
3487 libbfd against libm.
3488 * configure: Regenerate.
3490 2009-03-03 Alan Modra <amodra@bigpond.net.au>
3492 * Makefile.am: Run "make dep-am".
3493 * Makefile.in: Regenerate.
3495 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
3497 * elf32-score7.c: New file.
3498 * elf32-score.h: New file.
3499 * elf32-score.c: Add code to support score 7. Set score7 as the
3501 * cpu-score.c: Add score7 architecure.
3502 (compatibile): New function.
3503 * Makefile.am: Add rules for building elf32-score7 object.
3504 * Makefile.in: Regenerate.
3505 * configure.in: Add elf32-score7 object to score vectors.
3506 * configure: Regenerate.
3507 * reloc.c: Add score7 relocs.
3508 * archures.c: Add score3 and score7 machine numbers.
3509 * bfd-in2.h: Regenerate.
3510 * libbfd.h: Regenerate.
3512 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3514 * configure: Regenerate.
3516 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3518 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3519 (elf32_hppa_check_relocs): Use it.
3521 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3523 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3524 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3525 (elf_hppa_is_dynamic_loader_symbol): Likewise.
3526 (elf_hppa_record_segment_addrs): Likewise.
3527 (elf_hppa_final_link): Likewise.
3528 (elf_hppa_relocate_insn): Likewise.
3529 (elf_hppa_final_link_relocate): Likewise.
3530 (elf64_hppa_relocate_section): Likewise.
3531 * elf64-hppa.c: Insert above.
3533 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3535 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3536 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3537 (elf_hppa_relocate_section): Likewise.
3538 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3539 from struct elf_link_hash_entry. Add count field.
3540 (struct elf64_hppa_dyn_hash_table): Delete.
3541 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3542 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3543 (hppa_elf_hash_entry, eh_name): Define.
3544 (elf64_hppa_new_dyn_hash_entry): Delete.
3545 (elf64_hppa_dyn_hash_lookup): Delete.
3546 (elf64_hppa_dyn_hash_traverse): Delete.
3547 (get_dyn_name): Delete.
3548 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3549 of struct elf64_hppa_dyn_hash_entry *.
3550 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3551 allocate_global_data_plt, allocate_global_data_stub,
3552 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3554 (hppa64_link_hash_newfunc): New.
3555 (elf64_hppa_hash_table_create): Rework.
3556 (count_dyn_reloc): Likewise.
3557 (hppa64_elf_local_refcounts): New.
3558 (elf64_hppa_check_relocs): Rework using standard technique for recording
3559 local DLT, PLT and OPD reference counts.
3560 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3561 elf_link_hash_entry *.
3562 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3563 allocate_global_data_plt, allocate_global_data_stub,
3564 allocate_global_data_opd, allocate_dynrel_entries,
3565 elf64_hppa_adjust_dynamic_symbol,
3566 elf64_hppa_mark_milli_and_exported_functions): Likewise.
3567 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3568 Use hppa_link_hash_table. Rework.
3569 (elf64_hppa_link_output_symbol_hook): Rework.
3570 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3571 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3572 elf64_hppa_finish_dynamic_sections): Likewise.
3574 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
3576 * elf32-arm.c (stub_reloc_type): Removed.
3577 (insn_sequence): Renamed reloc_type field to r_type.
3578 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3579 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3580 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3581 (elf32_arm_stub_type): Add new enum entries for the new stubs.
3582 (arm_stub_is_thumb): Catch new stubs.
3583 (arm_type_of_stub): Handle new stubs.
3584 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3585 (bfd_elf32_arm_process_before_allocation): Remove useless
3588 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
3590 * elf.c (elf_find_function): Use is_function_type to check
3593 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3595 * xtensa-modules.c: Revert to previous version 1.11 due
3596 to inadvertant commit.
3598 2009-02-24 Sterling Augustine <sterling@tensilica.com>
3600 * elf32-xtensa.c (text_action_add): Separate test for action
3601 type. Break if saved action is ta_widen_insn at same offset.
3603 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3605 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3606 to elf32_arm_stub_long_branch_any_arm_pic.
3607 (elf32_arm_stub_long_branch_any_thumb_pic): New.
3608 (enum elf32_arm_stub_type, arm_type_of_stub)
3609 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3612 2009-02-24 Joseph Myers <joseph@codesourcery.com>
3614 * elf32-arm.c (PREV_SEC): Update comment.
3615 (group_sections): Rename argument to stubs_always_after_branch.
3616 Reverse the list and place stubs at the end of input sections.
3618 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3620 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3622 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3624 (arm_size_one_stub): Remove unnecessary break.
3625 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3627 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
3629 * elf32-arm.c (stub_insn_type): New type.
3630 (stub_reloc_type): Likewise.
3631 (insn_sequence): Likewise.
3632 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3633 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3634 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3635 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3636 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3637 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3638 (elf32_arm_stub_hash_entry): Add new helper fields.
3639 (stub_hash_newfunc): Initialize these new fields.
3640 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3641 to take endianness into account.
3642 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3643 (arm_map_one_stub): Code is now more generic, thanks to
3646 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
3648 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3650 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3651 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3652 BLX is not available. Fix typo in warning message. Add comments
3653 and improve formatting.
3654 (arm_build_one_stub): Adjust to new
3655 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3656 (arm_map_one_stub): Likewise.
3658 2009-02-23 Tristan Gingold <gingold@adacore.com>
3659 Eric Botcazou <ebotcazou@adacore.com>
3660 Douglas B Rupp <rupp@gnat.com>
3662 * vms.h: Update copyright year, fix comments, reorder declarations.
3663 (_bfd_save_vms_section): Remove the prototype.
3664 (EGPS_S_V_NO_SHIFT): New constant.
3665 (bfd_vms_set_section_flags): New prototype.
3666 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3668 (EGSY_S_W_FLAGS): Ditto.
3669 (EGSY_S_V_QUAD_VAL): Ditto.
3670 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3671 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3672 EGST_S_B_NAMLNG): Ditto.
3673 (ESRF_S_B_NAMLNG): Ditto.
3674 (ETIR_S_C_HEADER_SIZE): Ditto.
3675 (EGPS_S_V_ALLOC_64BIT): Ditto.
3676 (DST_S_C_EPILOG): Ditto.
3677 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3678 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3679 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3680 (DST_S_L_PCLINE_UNSLONG): Ditto.
3681 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3682 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3683 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3684 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3685 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3686 (DST_S_B_SRC_UNSBYTE): Ditto.
3687 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3689 (vms_section, vms_reloc): Remove types.
3690 (hdr_struc): Replaced by ...
3691 (hdr_struct): ... new type.
3692 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3693 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3694 (EMH_DATE_LENGTH): Ditto.
3695 (eom_struc): Replaced by ...
3696 (eom_struct): ... new type.
3697 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3698 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3699 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3700 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3701 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3702 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3703 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3704 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3705 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3706 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3707 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3708 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3709 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3710 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3711 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3712 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3713 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3714 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3715 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3716 (enum file_type_enum): New type.
3717 (struct location_struct): Removed.
3718 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3719 (struct funcinfo, struct module): Ditto.
3720 (struct vms_private_data_struct): Update fields.
3721 (struct vms_section_data_struct): New type.
3723 * vms.c: Update copyright year, fix comments,
3724 Fix includes for DECC, add prototypes.
3725 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3727 Use flavour to set is_vax, location_stack is removed.
3728 (struct pair): Declare.
3729 (fill_section_ptr): Initialize variables at declaration.
3730 Add guard to set SECTION_SYM flag, handlde und section.
3731 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3732 (_bfd_vms_slurp_object_records): New function, replaces previous
3734 (vms_slurp_module): New function.
3735 (vms_slurp_image): Ditto.
3736 (vms_object_p): Complete rewrite.
3737 (vms_mkobject): Use is_vax field to slect architecture.
3738 (free_reloc_stream): New function.
3739 (vms_convert_to_var): Ditto.
3740 (vms_convert_to_var_1): Ditto.
3741 (vms_convert_to_var_unix_filename): Ditto.
3742 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3744 (vms_new_section_hook): Set alignment to 0, allocate private data.
3745 (vms_get_section_contents): Load content.
3746 (vms_get_symbol_info): Handle undefined section.
3747 (vms_find_nearest_line): Handle.
3748 (alloc_reloc_stream): New function.
3749 (vms_slurp_reloc_table): Ditto.
3750 (vms_get_reloc_upper_bound): Make it real.
3751 (vms_canonicalize_reloc): Do the real work.
3752 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3754 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3755 (vms_set_arch_mach): Check arch.
3756 (vms_set_section_contents): Copy the content after allocation.
3757 (vms_alpha_vec): Update object flags.
3759 * vms-tir.c: Update copyright year, fix comments,
3760 add prototypes for new functions.
3761 (dst_define_location): New function.
3762 (dst_restore_location): New function.
3763 (dst_retrieve_location): New function.
3764 (dst_check_allocation): New function.
3765 (image_dump): Call dst_check_allocation.
3766 (image_write_b): Ditto.
3767 (image_write_w): Ditto.
3768 (image_write_l): Ditto.
3769 (image_write_q): Ditto.
3770 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3771 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3773 Call error handler instead of abort if name is not known.
3774 (etir_sta): Add quarter_relocs argument and set it.
3777 (etir_opr): Ditto, return FALSE in case of error.
3778 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3779 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3780 (etir_stc): Add quarter_relocs argument and set it, fix cast.
3781 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3782 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3783 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3784 Return FALSE in case of error.
3785 (tir_sta): Change sign of psect.
3787 (tir_cmd): Fix cast. Makes tir_table static const.
3788 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3789 add argument to explain.
3790 (analyze_etir): Initialize maxptr, add quarter_relocs
3791 declaration, move some declarations into inner scopes.
3792 Handle quarter_relocs and STO_IMM.
3793 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3794 (_bfd_vms_slurp_relocs): New function.
3795 (_bfd_vms_decode_relocs): New function.
3796 (sto_imm): Rewritten.
3797 (start_first_etbt_record): New function.
3798 (start_another_etbt_record): Ditto.
3799 (etir_output_check): Ditto.
3800 (defer_reloc_p): Ditto.
3801 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3802 a for-loop. Correctly deals with contents, deals with .vmsdebug,
3803 rewritte relocations handling.
3804 (_bfd_vms_write_tbt): Removed.
3805 (_bfd_vms_write_dbg): Ditto.
3807 * vms-misc.c: Update copyright year, Fix comments.
3808 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3809 (maybe_adjust_record_pointer_for_object): New function.
3810 (_bfd_vms_get_first_record): New function, replaces ...
3811 (_bfd_vms_get_record): .. removed.
3812 (_bfd_vms_get_object_record): New function.
3813 (_bfd_vms_get_object_record): New function.
3814 (vms_get_remaining_object_record): New function, replaces ...
3815 (_bfd_vms_get_next_record): ... removed.
3816 (add_new_contents): Removed.
3817 (_bfd_save_vms_section): Removed.
3818 (_bfd_get_vms_section): Removed.
3819 (_bfd_vms_output_flush): Write in VAR format.
3820 (new_symbol): Don't make UND section.
3822 * vms-hdr.c: Update copyright year, update list of record handled.
3823 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3824 (_bfd_vms_write_hdr): Strip vms and unix patches,
3825 add comments, truncate module name at 31 characters,
3826 use constants instead of hard-coded value,
3827 write BFD version instead of a fixed string.
3828 (_bfd_vms_slurp_ihd): New function.
3829 (_bfd_vms_slurp_isd): Ditto.
3830 (_bfd_vms_slurp_ihs): Ditto.
3831 (new_module): Ditto.
3832 (parse_module): Ditto
3833 (build_module_list): Ditto.
3834 (module_find_nearest_line): Ditto.
3835 (_bfd_vms_find_nearest_dst_line): Ditto.
3836 (vms_slurp_debug): Ditto.
3837 (_bfd_vms_slurp_dbg): Ditto.
3838 (_bfd_vms_slurp_tbt): Ditto.
3839 (_bfd_vms_write_dbg): Ditto.
3840 (_bfd_vms_write_tbt): Ditto.
3842 * vms-gsd.c: Update copyright year, update list of records handled.
3843 (EVAX_LITERALS_NAME): New macro.
3844 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3845 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3846 (register_universal_symbol): New function and prototype.
3847 (_bfd_vms_slurp_gsd): Fix indentations and casts,
3848 improve debug messages,
3849 use constants instead of hard-coded value,
3850 fix missing endianness conversion,
3851 handle global symbol (SYMG).
3852 (bfd_vms_set_section_flags): New function.
3853 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3854 handle section literals,
3856 handle section bfd and vms flags,
3857 don't output LIB$INITIALIZE symbol,
3858 fix handling of weak symbols,
3859 fix evax vs vax procedure descriptor,
3860 handle absolute symbols.
3862 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3863 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3865 * makefile.vms (DEFS): Fix flags for VMS.
3867 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3869 * bfd-in2.h: Regenerated.
3870 * libbfd.h: Regenerated.
3872 2009-02-20 Cary Coutant <ccoutant@google.com>
3874 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3877 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3880 * coffcode.h (coff_write_object_contents): Don't let the string
3881 table offset overflow the s_name field when using long section names.
3883 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3885 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3886 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3887 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3888 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3889 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3890 (bfd_pmac_xcoff_backend_data): Likewise.
3891 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3892 (bfd_xcoff_aix5_backend_data): Likewise.
3893 (xcoff64_write_object_contents): Delete unused long_section_names
3895 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3896 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3898 * coffcode.h (documentation): Update to describe long section names.
3899 (COFFLONGSECTIONCATHELPER): New helper macro.
3900 (BLANKOR1TOODD): Likewise.
3901 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3902 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3903 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3904 (bfd_coff_set_long_section_names_allowed): New function.
3905 (bfd_coff_set_long_section_names_disallowed): Likewise.
3906 (struct bfd_coff_backend_data): Add new backend hook function
3907 pointer _bfd_coff_set_long_section_names.
3908 (bfd_coff_set_long_section_names): New backend hook.
3909 (coff_write_object_contents): Only generate long section names if
3910 bfd_coff_long_section_names() indicates they are currently enabled.
3911 (bfd_coff_std_swap_table): Make non-const, and initialise long
3912 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3913 (ticoff0_swap_table): Likewise to both.
3914 (ticoff1_swap_table): Again, likewise to both.
3915 * coffgen.c (make_a_section_from_file): Allow long section names
3916 as inputs even if not currently allowed for outputs.
3917 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3918 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3919 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3920 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3921 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3922 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3923 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3924 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3925 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3926 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3927 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3928 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3929 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3930 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3931 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3932 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3933 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3934 * libcoff-in.h: Update copyright year to cause updated copyright
3935 year in generated libcoff.h, and fix typo.
3936 * libcoff.h: Regenerated.
3937 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3938 (_bfd_ecoff_no_long_sections): Add prototype.
3939 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3940 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3941 defined by an including .c file.
3942 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3943 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3944 (ticoff1_swap_table): Likewise to both.
3946 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
3948 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3949 stub. Catch default case error.
3950 (arm_map_one_stub): Add missing Thumb mapping symbol.
3952 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3955 * elf32-avr.c: Handle case where no local symbos exist correctly.
3957 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
3960 * elf32-arm.c (arm_long_branch_stub,
3961 arm_thumb_v4t_long_branch_stub,
3962 arm_thumb_thumb_long_branch_stub,
3963 arm_thumb_arm_v4t_long_branch_stub,
3964 arm_thumb_arm_v4t_short_branch_stub,
3965 arm_pic_long_branch_stub):
3966 Renamed to elf32_arm_stub_long_branch_any_any,
3967 elf32_arm_stub_long_branch_v4t_arm_thumb,
3968 elf32_arm_stub_long_branch_thumb_only,
3969 elf32_arm_stub_long_branch_v4t_thumb_arm,
3970 elf32_arm_stub_short_branch_v4t_thumb_arm,
3971 elf32_arm_stub_long_branch_any_any_pic.
3972 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3973 arm_thumb_thumb_stub_long_branch,
3974 arm_thumb_arm_v4t_stub_long_branch,
3975 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3976 Renamed to arm_stub_long_branch_any_any,
3977 arm_stub_long_branch_v4t_arm_thumb,
3978 arm_stub_long_branch_thumb_only,
3979 arm_stub_long_branch_v4t_thumb_arm,
3980 arm_stub_short_branch_v4t_thumb_arm,
3981 arm_stub_long_branch_any_any_pic.
3983 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3985 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3986 in branch offset check.
3988 2009-02-15 Alan Modra <amodra@bigpond.net.au>
3990 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3991 add toc.symndx and toc.add.
3992 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3994 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3996 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3997 (branch_reloc_hash_match): New function, extracted from..
3998 (ppc64_elf_tls_optimize): ..here.
3999 (ppc64_elf_relocate_section): Properly set addends when optimizing
4000 tls sequences. Avoid unnecessary reading and writing of insns.
4001 Only redo reloc when symbol changed. Bypass symbol checks when
4003 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4004 (branch_reloc_hash_match): New function, extracted from..
4005 (ppc_elf_tls_optimize): ..here.
4006 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4007 Don't clear addend on zapped __tls_get_addr reloc.
4009 2009-02-12 Nick Clifton <nickc@redhat.com>
4012 * elflink.c (bfd_elf_final_link): When counting the relocations,
4013 if the header size has not been set yet then assume that it will
4014 match the output section's reloc type.
4016 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
4018 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4021 2009-02-09 Alan Modra <amodra@bigpond.net.au>
4023 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4024 (find_function): Likewise.
4025 (pasted_function): Don't error if no prior function found.
4026 (discover_functions): Revert 2008-12-10 change. Extend first
4027 function range to start of section.
4029 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4031 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
4033 * elf64-hppa.h: Likewise.
4035 2009-02-06 Joseph Myers <joseph@codesourcery.com>
4037 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4040 2009-02-04 Alan Modra <amodra@bigpond.net.au>
4042 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4043 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4045 2009-02-03 Sandip Matte <sandip@rmicorp.com>
4047 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4048 * archures.c (bfd_mach_mips_xlr): Define.
4049 * bfd-in2.h: Regenerate.
4050 * cpu-mips.c (I_xlr): Define.
4051 (arch_info_struct): Add XLR entry.
4052 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4053 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4054 (mips_mach_extensions): Add XLR entry.
4056 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
4058 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4060 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
4062 * configure.in: AC_SUBST pdfdir.
4063 * Makefile.am: Add install-pdf, install-pdf-am
4064 and install-pdf-recursive targets. Define pdfdir.
4065 * doc/Makefile.am: Define pdf__strip_dir. Add
4066 install-pdf and install-pdf-am targets.
4067 * po/Make-in: Add install-pdf target.
4068 * configure: Regenerate.
4069 * Makefile.in: Regenerate
4070 * doc/Makefile.in: Regenerate.
4072 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
4074 * bfd-in2.h: Regenerate.
4075 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
4076 fields from n_entries to n_slots where appropriate, update comments.
4077 (HOWTO): Add TLS relocations.
4078 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4079 (enum elf_m68k_got_offset_size): New enum.
4080 (struct elf_m68k_got_entry.type): Move field to ...
4081 (struct elf_m68k_got_entry_key): ... here. Update all uses.
4082 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4084 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4086 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4087 fields into n_entries array. Update comments.
4088 (elf_m68k_init_got): Simplify, update all uses.
4089 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4090 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4091 GOT entries; update name, update all uses.
4092 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4093 (elf_m68k_get_got_entry): Update.
4094 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4096 (elf_m68k_remove_got_entry_type): Simplify.
4097 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4098 (elf_m68k_can_merge_gots): Update.
4099 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4100 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4101 GOT entries, simplify.
4102 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4103 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4104 field, remove obsoleted local_n_entries field.
4105 (elf_m68k_partition_multi_got_2): New static function.
4106 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4108 (elf_m68k_remove_got_entry_type): Update.
4109 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4110 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
4111 update of sgot->size and srelgot->size.
4112 (elf_m68k_gc_sweep_hook): Update.
4113 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4114 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4116 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4117 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4119 2009-02-02 DJ Delorie <dj@redhat.com>
4121 * elf32-mep.c (config_names): Regenerate configuration.
4123 2009-02-02 Alan Modra <amodra@bigpond.net.au>
4125 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4126 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4127 * elf.c (bfd_elf_get_str_section): Make static.
4128 (bfd_elf_find_section): Delete.
4129 * libbfd.h: Regenerate.
4131 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4133 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4134 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4136 2009-01-31 Alan Modra <amodra@bigpond.net.au>
4138 * elflink.c (on_needed_list): New function.
4139 (elf_link_add_object_symbols): Link in --as-needed libs if they
4140 satisfy undefined symbols in other libs.
4142 2009-01-30 Julian Brown <julian@codesourcery.com>
4144 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4145 EXEC_P or DYNAMIC flags, and skip sections which are being linked
4146 with --just-symbols (-R).
4148 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
4150 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4151 high_pc in order to properly sign-extend VMAs.
4153 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
4154 Mark Shinwell <shinwell@codesourcery.com>
4155 Catherine Moore <clm@codesourcery.com>
4157 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4159 2009-01-28 Catherine Moore <clm@codesourcery.com>
4161 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4162 SEC_LOAD for dynamic relocation sections.
4164 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4166 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4167 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4168 the size of local TLS data.
4170 2009-01-27 Andreas Schwab <schwab@suse.de>
4172 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4173 architectures in the archive.
4175 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
4177 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4178 <R_CRIS_32_DTPREL>: Correct relocation value.
4180 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4181 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4182 symbols with non-default visibility.
4184 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
4186 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4187 describing the trampolines.
4188 (ppc_elf_relocate_section): Update relocs to describe the
4191 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4193 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4194 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4195 and R_PARISC_PCREL12F relocations.
4197 2009-01-24 Alan Modra <amodra@bigpond.net.au>
4200 * elflink.c (find_version_for_sym): New function split out from,
4201 but without export_dynamic test, ..
4202 (_bfd_elf_link_assign_sym_version): ..here.
4203 (_bfd_elf_export_symbol): Use it.
4205 2009-01-23 Alan Modra <amodra@bigpond.net.au>
4207 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4208 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4209 * elflink.c: ..here, somewhat modified.
4210 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4211 _bfd_elf_link_find_version_dependencies,
4212 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4213 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4214 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4216 * elflink.c: ..and make static here.
4217 (_bfd_elf_link_find_version_dependencies): Adjust for removal
4218 of output_bfd from struct elf_find_verdep_info.
4219 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4220 struct elf_info_failed.
4221 (bfd_elf_size_dynamic_sections): Adjust.
4223 2009-01-22 Alan Modra <amodra@bigpond.net.au>
4226 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4227 after comp_unit_find_line call.
4229 2009-01-21 Nick Clifton <nickc@redhat.com>
4232 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4233 tm_gmtoff field in struct tm.
4235 2009-01-21 Alan Modra <amodra@bigpond.net.au>
4237 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4238 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4239 sections in soft-icache lines unless non_ia_text. Don't add
4240 rodata if doing so would exceed line size.
4242 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
4244 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4245 types than bfd_link_hash_indirect, before early return, call
4246 _bfd_elf_link_hash_copy_indirect.
4248 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4250 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4251 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4252 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4253 (elf_backend_obj_attrs_order): New define.
4254 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4255 (elfNN_bed): Add elf_backend_obj_attrs_order.
4257 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4259 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4260 (obj_attr_size): Likewise.
4261 (write_obj_attribute): Likewise.
4262 (_bfd_elf_copy_obj_attributes): Likewise.
4263 (_bfd_elf_parse_attributes): Likewise.
4264 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4265 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4266 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4267 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4268 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4271 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
4273 * elf-attrs.c (is_default_attr): Support defaultless attributes.
4274 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4275 (bfd_elf_add_obj_attr_string): Likewise.
4276 (bfd_elf_add_obj_attr_int_string): Likewise.
4277 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4278 * elf-bfd.h (struct obj_attribute): Document new flag bit.
4279 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4280 Tag_nodefaults has no default value.
4281 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4282 comment to reflect the new state.
4284 2009-01-19 Alan Modra <amodra@bigpond.net.au>
4287 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4288 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4289 (adjust_z_magix): Delete dead code handling QMAGIC.
4291 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
4293 * coffcode.h (styp_to_sec_flags): Correct interpretation of
4294 IMAGE_SCN_MEM_DISCARDABLE.
4296 2009-01-16 Alan Modra <amodra@bigpond.net.au>
4298 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4299 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4300 * configure.in (commonbfdlib): Delete.
4301 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4302 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
4303 is available, not just for linux.
4304 * po/SRC-POTFILES.in: Regenerate.
4305 * Makefile.in: Regenerate.
4306 * configure: Regenerate.
4308 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4309 Julian Brown <julian@codesourcery.com>
4311 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4312 ARM attributes in ABI 2.07.
4313 * elf32-arm.c (get_secondary_compatible_arch): New function.
4314 (set_secondary_compatible_arch): New function.
4315 (tag_cpu_arch_combine): New function.
4316 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4317 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4318 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4319 make it fit with order_01243.
4320 Add support for Tag_also_compatible_with,
4321 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4322 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4323 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4324 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4325 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4326 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4327 Rework the way unknown attributes are handled.
4328 Defer errors until all attributes have been processed.
4330 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
4332 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4333 bfd_elf_add_obj_attr_int_string.
4334 Read Tag_compatibility from its new location in the attribute array,
4335 rather than the attribute list.
4336 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4337 bfd_elf_add_obj_attr_int_string.
4338 (_bfd_elf_parse_attributes): Likewise.
4339 (_bfd_elf_merge_object_attributes): There's now only one
4340 Tag_compatibility, and it's in the array, not the list.
4341 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4343 (bfd_elf_add_obj_attr_compat): Rename to
4344 bfd_elf_add_obj_attr_int_string.
4345 (bfd_elf_add_proc_attr_compat): Rename to
4346 bfd_elf_add_proc_attr_int_string.
4347 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4350 2009-01-15 Douglas B Rupp <rupp@gnat.com>
4352 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4353 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4354 (vmsutil.lo): Add dependency rule.
4355 * Makefile.in: Regenerate.
4356 * config.bfd (ia64*-*-*vms*): Add case.
4357 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4358 * configure: Regenerate.
4359 * vmsutil.c: New file.
4360 * vmsutil.h: New file.
4361 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4363 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4364 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4365 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4366 elfNN_vms_object_p): New functions
4367 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4369 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4372 * elflink.c (elf_gc_sweep): Exclude the group section if the
4373 first member of the section group is excluded.
4375 2009-01-14 Alan Modra <amodra@bigpond.net.au>
4378 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
4379 saved filename, use bfd_alloc rather than bfd_malloc for it.
4381 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4383 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
4385 2009-01-13 Alan Modra <amodra@bigpond.net.au>
4387 * elf32-spu.c (remove_cycles): Always set call->max_depth.
4389 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4391 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
4393 2009-01-12 Alan Modra <amodra@bigpond.net.au>
4395 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
4397 (struct got_entry): Add br_addr.
4398 (struct call_info): Add priority.
4399 (struct function_info): Add lr_store and sp_adjust.
4400 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
4401 (spu_elf_find_overlays): For soft-icache, mark any section within cache
4402 area as an overlay, and check that no other overlays exist. Look up
4403 icache overlay manager entry sym.
4404 (BRA_STUBS, BRA, BRASL): Define.
4405 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
4406 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
4408 (count_stub, build_stub): Support soft-icache.
4409 (build_spuear_stubs, process_stubs): Adjust build_stub call.
4410 (spu_elf_size_stubs): Size soft-icache stubs.
4411 (overlay_index): New function.
4412 (spu_elf_build_stubs): Make static. Support soft-icache.
4413 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
4414 (find_function_stack_adjust): Save lr store and stack adjust insn
4416 (maybe_insert_function): Adjust find_function_stack_adjust call.
4417 (mark_functions_via_relocs): Retrieve priority.
4418 (remove_cycles): Only warn about pruned arcs when stack_analysis.
4419 (sort_calls): Sort by priority first.
4420 (mark_overlay_section): Ignore .ovl.init.
4421 (sum_stack): Only print when stack_analysis.
4422 (print_one_overlay_section): New function, extracted from..
4423 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
4424 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
4425 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
4426 analysis. Call spu_elf_build_stubs.
4427 (spu_elf_relocate_section): For soft-icache encode overlay index
4429 (spu_elf_output_symbol_hook): Support soft-icache.
4430 (spu_elf_modify_program_headers: Likewise.
4432 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
4433 num_regions to num_lines. Add line_size and max_branch.
4434 (enum _ovly_flavour): Add ovly_soft_icache.
4435 (spu_elf_build_stubs): Delete.
4437 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
4439 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
4440 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
4442 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
4444 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
4445 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
4446 the program, the known offset starts at the negative size of the
4448 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
4451 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
4453 * config.bfd: Add lm32-*-rtems*.
4455 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
4457 * coff-ppc.c: Add 2009 to Copyright.
4458 * elf32-cris.c: Likewise.
4459 * elflink.c: Likewise.
4461 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
4463 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
4464 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
4466 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4469 * elflink.c (elf_merge_st_other): New.
4470 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
4471 hide them if needed.
4472 (elf_link_add_object_symbols): Updated.
4474 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
4477 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
4478 ref_dynamic and dynamic_def fields when setting def_regular
4481 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
4484 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
4487 For older changes see ChangeLog-2008
4493 version-control: never