1 2009-07-23 Ulrich Drepper <drepper@redhat.com>
3 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
4 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
5 with the BSF_GNU_UNIQUE flag bit set.
6 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
7 for symbols with STB_GNU_UNIQUE binding.
8 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
9 with the STB_GNU_UNIQUE binding.
10 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
11 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
12 symbols with the unique_global field set.
13 (elf_link_output_extsym): Set unique_global field for symbols with
14 the STB_GNU_UNIQUE binding.
15 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
16 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
18 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
20 * bfd-in2.h: Regenerate.
22 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
24 * elflink.c (elf_link_output_extsym): Revert the last change.
26 2009-07-22 H.J. Lu <hongjiu.lu@intel.com>
29 * elflink.c (elf_link_output_extsym): Special case ifunc syms
30 when ref_regular, not def_regular.
32 2009-07-21 H.J. Lu <hongjiu.lu@intel.com>
35 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
36 from a DSO into a normal FUNC symbol.
37 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
40 2009-07-17 Chao-ying Fu <fu@mips.com>
42 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
43 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
44 interlocking, the last PLT entry needs a nop in the branch delay slot.
45 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
46 output the last two PLT entries in reverse order.
48 2009-07-16 H.J. Lu <hongjiu.lu@intel.com>
50 * elf32-i386.c (elf_i386_relocate_section): Don't get local
51 STT_GNU_IFUNC symbol for relocatable link.
52 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
54 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
56 * bfdio.c (bfd_iovec): Add comments for bmmap.
57 * bfd-in2.h: Regenerated.
59 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
61 * Makefile.am: Run "make dep-am".
62 * Makefile.in: Regenerated.
64 2009-07-10 Doug Kwan <dougkwan@google.com>
66 * elf32-arm.c (stub_hash_newfunc): Initialize fields
67 target_addend and orig_insn.
69 2009-07-10 Tom Tromey <tromey@redhat.com>
71 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
72 (elf-eh-frame.lo): Likewise.
73 (elf32-bfin.lo): Likewise.
74 (elf32-frv.lo): Likewise.
75 (elf32-xc16x.lo): Likewise.
76 * Makefile.in: Rebuild.
77 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
78 * elf-eh-frame.c: Likewise.
79 * elf32-bfin.c: Likewise.
80 * elf32-frv.c: Likewise.
81 * elf32-xc16x.c: Likewise.
83 2009-07-10 Julian Brown <julian@codesourcery.com>
85 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
86 symbol a stub entry is derived from, not the entry for the stub
87 itself, in call to elf32_arm_final_link_relocate.
89 2009-07-10 H.J. Lu <hongjiu.lu@intel.com>
91 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
92 when reporting addends.
94 2009-07-10 Alan Modra <amodra@bigpond.net.au>
96 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
97 data even when no stubs.
98 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
100 2009-07-10 Alan Modra <amodra@bigpond.net.au>
102 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
103 (ppc_elf_get_synthetic_symtab): Report addend.
105 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
106 (ppc_elf_create_glink): New function.
107 (ppc_elf_create_dynamic_sections): Use it.
108 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
109 (update_local_sym_info): Allocate space for local_plt array.
110 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
112 (is_branch_reloc): New function.
113 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
114 (ppc_elf_gc_sweep_hook): Likewise.
115 (ppc_elf_adjust_dynamic_symbol): Likewise.
116 (allocate_dynrelocs): Likewise.
117 (ppc_elf_size_dynamic_sections): Likewise.
118 (ppc_elf_relocate_section): Likewise.
119 (branch_reloc_hash_match): Use is_branch_reloc.
120 (ppc_elf_tls_optimize): Adjust for local_plt.
121 (write_glink_stub): New function, extracted from..
122 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
123 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
124 branch table when dynamic.
125 (elf_backend_post_process_headers): Define.
126 * elf64-ppc.c (elf_backend_post_process_headers): Define.
127 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
128 (ppc64_elf_get_synthetic_symtab): Report addend.
129 (struct ppc_stub_hash_entry): Add plt_ent.
131 (struct ppc_link_hash_table): Add iplt and reliplt.
132 (create_linkage_sections): Make .iplt and .rela.iplt sections.
133 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
134 (update_local_sym_info): Allocate space for local_plt array.
135 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
137 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
138 and don't change hash flags here.
139 (is_branch_reloc): New function.
140 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
141 (ppc64_elf_gc_sweep_hook): Likewise.
142 (ppc64_elf_adjust_dynamic_symbol): Likewise.
143 (allocate_dynrelocs): Likewise.
144 (ppc64_elf_size_dynamic_sections): Likewise.
145 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
146 (ppc64_elf_size_stubs): Likewise.
147 (ppc64_elf_relocate_section): Likewise.
148 (get_sym_h): Adjust for local_plt.
149 (branch_reloc_hash_match): Use is_branch_reloc.
150 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
151 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
153 2009-07-10 Alan Modra <amodra@bigpond.net.au>
155 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
157 2009-07-10 Alan Modra <amodra@bigpond.net.au>
159 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
160 and ref_regular_nonweak comment.
161 * elflink.c (elf_link_output_extsym): Special case ifunc syms
162 when def_regular, not ref_regular.
163 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
164 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
165 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
167 2009-07-09 Alan Modra <amodra@bigpond.net.au>
169 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
170 of malloc'd struct call_info.
171 (pasted_function): Likewise, priority too.
173 2009-07-07 Alan Modra <amodra@bigpond.net.au>
175 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
176 alignment when packing sections into overlays.
178 2009-07-03 Cary Coutant <ccoutant@google.com>
180 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
182 2009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
184 * coffcode.h (sec_to_styp_flags): Partially revert (functional
185 changes only) earlier patch:-
187 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
189 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
190 give .debug and .reloc data characteristics.
191 (DOT_RELOC): New define for .reloc section string.
192 (coff_write_object_contents): Use DOT_RELOC instead of string.
194 2009-07-02 Tom Tromey <tromey@redhat.com>
196 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
197 * bfdwin.c (bfd_free_window): Cast to unsigned long.
199 2009-07-01 Nick Clifton <nickc@redhat.com>
201 * elf-m10300.c: Remove trailing white space.
204 2009-07-01 Douglas B Rupp <rupp@gnat.com>
206 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
207 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
208 * configure.in: Use them.
209 * configure: Regenerate.
210 * config.in: Regnerate.
211 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
212 #define _BSD_SOURCE. Add comments.
213 (vms_file_stats_name): Calculate creation date based on available
214 runtime data. Return 1 for version instead of 0.
216 2009-07-01 Nick Clifton <nickc@redhat.com>
219 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
220 to R_ARM_THM_PC8 relocation.
222 2009-06-29 Nick Clifton <nickc@redhat.com>
224 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
225 different uses of the relocations addend when a symbol is in a
228 2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
231 * elf.c (bfd_section_from_shdr): Don't change sh_link for
232 SHT_REL/SHT_RELA sections on executable nor shared library.
233 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
236 2009-06-25 Nick Clifton <nickc@redhat.com>
238 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
239 symbols with SEC_MERGE flag.
241 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
243 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
244 give .debug and .reloc data characteristics.
245 (DOT_RELOC): New define for .reloc section string.
246 (coff_write_object_contents): Use DOT_RELOC instead of string.
248 2009-06-25 Tristan Gingold <gingold@adacore.com>
250 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
251 (bfd_mach_o_canonicalize_dynamic_symtab)
252 (bfd_mach_o_get_synthetic_symtab): Defines.
253 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
254 (TARGET_NAME): Use Mach-O specific functions for dynamic.
256 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
257 for scattered relocations.
258 (bfd_mach_o_i386_print_thread): New function.
259 (bfd_mach_o_print_thread): Define.
261 * mach-o.c (text_section_names_xlat): Add an entry for __const.
262 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
263 New functions extracted from ...
264 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
265 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
266 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
267 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
268 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
269 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
271 (bfd_mach_o_scan_read_dylib): Ditto.
272 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
274 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
275 decode isym and flags on little endian targets. Set dysymtab field.
276 (bfd_mach_o_scan_start_address): Adjust for enum names.
277 (bfd_mach_o_lookup_section): Do not look for segments anymore.
278 (bfd_mach_o_print_section): Display bfd section name.
279 (bfd_mach_o_print_segment): Display none if no name.
280 (bfd_mach_o_print_dysymtab): Display next index for local, external
281 and undefined symbols.
282 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
283 Display dylinker name. Display thread and unixthread commands content.
284 (bfd_mach_o_print_thread): New macro.
286 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
287 (bfd_mach_o_ppc_thread_flavour): Ditto.
288 (bfd_mach_o_i386_thread_flavour): Ditto.
289 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
290 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
291 BFD_MACH_O_THREAD_STATE_NONE.
292 (bfd_mach_o_segment_command): Remove segment field.
293 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
294 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
295 (bfd_mach_o_prebound_dylib_command): Ditto.
296 (bfd_mach_o_dylib_command): Ditto.
297 (bfd_mach_o_prebound_dylib_command): Remove section field.
298 (mach_o_data_struct): Add dysymtab field.
299 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
300 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
301 (bfd_mach_o_build_commands): Remove parameter names and attributes.
302 (bfd_mach_o_get_dynamic_reloc_upper_bound)
303 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
305 2009-06-25 Rafael Avila de Espindola <espindola@google.com>
307 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
308 field of struct dirent.
310 2009-06-23 Tristan Gingold <gingold@adacore.com>
312 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
313 of this macro. Fix indentation.
315 2009-06-22 Christophe Lyon <christophe.lyon@st.com>
317 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
318 destination for defined dynamic symbols when deciding whether to
319 insert a stub or not.
320 (allocate_dynrelocs): Make sure functions are not marked as Thumb
321 when actually accessed through a PLT, even when generating a
324 2009-06-22 Tristan Gingold <gingold@adacore.com>
326 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
329 2009-06-22 Alan Modra <amodra@bigpond.net.au>
331 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
332 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
334 2009-06-22 Alan Modra <amodra@bigpond.net.au>
336 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
338 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
340 * elflink.c (elf_link_add_object_symbols): Avoid warning
341 from -Wjump-misses-init in gcc 4.5.0.
343 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
345 * elf32-i386.c (elf_i386_check_relocs): Properly check local
347 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
349 2009-06-19 H.J. Lu <hongjiu.lu@intel.com>
351 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
352 r_symndx. Report local symbol name on error.
353 (elf_i386_check_relocs): Updated. Report local symbol name on
355 (elf_i386_gc_sweep_hook): Updated.
356 (elf_i386_relocate_section): Likewise.
358 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
359 r_symndx. Report local symbol name on error.
360 (elf64_x86_64_check_relocs): Updated. Report local symbol name
362 (elf64_x86_64_gc_sweep_hook): Updated.
363 (elf64_x86_64_relocate_section): Likewise.
365 2009-06-19 Tristan Gingold <gingold@adacore.com>
367 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
369 2009-06-19 Tristan Gingold <gingold@adacore.com>
371 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
372 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
373 (bfd_mach_o_valid): Ditto.
374 (bfd_mach_o_wide_p): Ditto.
375 (bfd_mach_o_canonicalize_reloc): Ditto.
376 (bfd_mach_o_build_commands): Ditto.
377 (bfd_mach_o_scan_read_thread): Ditto.
378 (bfd_mach_o_flatten_sections): Ditto.
379 (bfd_mach_o_scan_start_address): Ditto.
380 (bfd_mach_o_lookup_section): Ditto.
381 (bfd_mach_o_core_fetch_environment): Ditto.
382 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
383 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
384 (bfd_mach_o_scan_write_symtab): Ditto.
385 Use macros instead of hard-coded values.
386 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
387 Use bfd_mach_o_get_data instead of direct access. Use macros
388 instead of hard-coded values.
389 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
390 Remove sym argument and get section from mdata.
391 Move code into the else branch.
392 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
393 Remove sym argument and get section from mdata. Adjust code.
394 (bfd_mach_o_scan_read_dylib): Move assertion into the created
395 switch (which replaces consecutive if statements).
396 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
397 module table, table of content, indirect symbols and external
399 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
401 (bfd_mach_o_scan_read_linkedit): New function.
402 (bfd_mach_o_scan_read_str): Ditto.
403 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
405 (bfd_mach_o_get_symtab_upper_bound): Remove check as
406 bfd_mach_o_count_symbols never returns an error.
407 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
408 symtab field (there might be only one symtab).
409 (bfd_mach_o_scan_read_command): Handle reexported dylib.
410 Handle sub frameworks, sub umbrella, sub library and sub client.
411 Read code signature and segment split info commands.
412 (bfd_mach_o_scan): Reindent.
413 (bfd_mach_o_xlat_name): New type.
414 (bfd_mach_o_print_flags): New function.
415 (bfd_mach_o_get_name): Ditto.
416 (bfd_mach_o_cpu_name): New variable.
417 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
418 (bfd_mach_o_section_type_name)
419 (bfd_mach_o_section_attribute_name)
420 (bfd_mach_o_load_command_name): New variables.
421 (bfd_mach_o_print_private_header): New function.
422 (bfd_mach_o_print_section_map): New function extracted from
423 bfd_mach_o_print_private_bfd_data.
424 (bfd_mach_o_print_section): Ditto. Print more infos.
425 (bfd_mach_o_print_segment): Ditto.
426 (bfd_mach_o_print_dysymtab): Ditto.
427 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
428 load weak dylib, reexport dylib and id dylib.
429 Handle code signature and segment_split info.
430 Handle sub frameworks, sub umbrella, sub library and sub client.
431 (bfd_mach_o_section_get_nbr_indirect): New function.
433 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
434 (bfd_mach_o_header_flags): New enum to define header flags.
435 (bfd_mach_o_section_attribute): New enum to replace ...
436 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
437 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
438 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
439 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
440 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
441 these removed macros.
442 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
443 (bfd_mach_o_dylib_module): New type.
444 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
446 (bfd_mach_o_dylib_table_of_content): New type.
447 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
448 (bfd_mach_o_dylib_reference): New type.
449 (BFD_MACH_O_REFERENCE_SIZE): New macro.
450 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
451 modules, toc, references and indirect syms.
452 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
453 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
454 unused). Add comment.
455 (bfd_mach_o_dylib_command): Ditto.
456 (bfd_mach_o_prebound_dylib_command): Ditto.
457 (bfd_mach_o_linkedit_command): New type.
458 (bfd_mach_o_str_command): New type.
459 (bfd_mach_o_load_command): Add linkedit and str fields.
460 (mach_o_data_struct): Add symtab field.
461 (bfd_get_mach_o_data): Renamed to ...
462 (bfd_mach_o_get_data): ... this new macro.
463 (bfd_mach_o_scan_read_symtab_symbol,
464 bfd_mach_o_scan_read_symtab_strtab,
465 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
467 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
468 instead of direct access.
470 2009-06-19 Alan Modra <amodra@bigpond.net.au>
472 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
473 R_PPC_PLTREL24 relocs.
474 (ppc_elf_relocate_section): Likewise.
476 2009-06-19 Alan Modra <amodra@bigpond.net.au>
478 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
479 pointer to sym hash. Update all uses.
480 (update_plt_info): Likewise. Don't check addend here.
482 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
484 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
485 bfd_sym_from_r_symndx.
486 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
488 2009-06-18 Alan Modra <amodra@bigpond.net.au>
490 * elf-bfd.h (struct sym_sec_cache): Delete.
491 (struct sym_cache): New.
492 (bfd_section_from_r_symndx): Delete prototype.
493 (bfd_sym_from_r_symndx): Define prototype.
494 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
495 (bfd_sym_from_r_symndx): ..new function.
496 * elf32-arm.c: Update all uses of struct sym_sec_cache and
497 bfd_section_from_r_symndx to new struct and function.
498 * elf32-bfin.c: Likewise.
499 * elf32-hppa.c: Likewise.
500 * elf32-i386.c: Likewise.
501 * elf32-m32r.c: Likewise.
502 * elf32-m68hc1x.c: Likewise.
503 * elf32-m68hc1x.h: Likewise.
504 * elf32-m68k.c: Likewise.
505 * elf32-ppc.c: Likewise.
506 * elf32-s390.c: Likewise.
507 * elf32-sh.c: Likewise.
508 * elf64-ppc.c: Likewise.
509 * elf64-s390.c: Likewise.
510 * elf64-x86-64.c: Likewise.
511 * elfxx-sparc.c: Likewise.
512 * elfxx-sparc.h: Likewise.
514 2009-06-18 H.J. Lu <hongjiu.lu@intel.com>
516 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
517 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
519 2009-06-18 Nick Clifton <nickc@redhat.com>
521 * elflink.c (elf_link_sort_relocs): Return early if there are no
524 2009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
526 Merge cegcc and mingw32ce target name changes from
529 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
531 * config.bfd: Add arm*-*-cegcc* target.
533 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
535 * config.bfd: Add arm-*-mingw32ce* target.
537 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
539 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
540 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
541 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
542 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
544 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
546 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
547 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
548 * elf32-i386.c (elf_i386_check_relocs): Use it.
549 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
551 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
553 * elf-bfd.h (elf_dyn_relocs): New.
555 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
556 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
558 (elf_i386_copy_indirect_symbol): Likewise.
559 (elf_i386_check_relocs): Likewise.
560 (elf_i386_gc_sweep_hook): Likewise.
561 (elf_i386_allocate_dynrelocs): Likewise.
562 (elf_i386_readonly_dynrelocs): Likewise.
563 (elf_i386_size_dynamic_sections): Likewise.
565 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
566 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
568 (elf64_x86_64_copy_indirect_symbol): Updated.
569 (elf64_x86_64_check_relocs): Likewise.
570 (elf64_x86_64_gc_sweep_hook): Likewise.
571 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
572 (elf64_x86_64_allocate_dynrelocs): Likewise.
573 (elf64_x86_64_readonly_dynrelocs): Likewise.
574 (elf64_x86_64_size_dynamic_sections): Likewise.
576 2009-06-17 H.J. Lu <hongjiu.lu@intel.com>
578 * elf32-arm.c (create_got_section): Get existing .rela.got
580 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
581 * elf32-lm32.c (create_got_section): Likewise.
582 * elf32-m32r.c (create_got_section): Likewise.
583 * elf32-ppc.c (ppc_elf_create_got): Likewise.
584 * elf32-s390.c (create_got_section): Likewise.
585 * elf32-sh.c (create_got_section): Likewise.
586 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
587 * elf64-s390.c (create_got_section): Likewise.
588 * elfxx-sparc.c (create_got_section): Likewise.
590 * elflink.c (_bfd_elf_create_got_section): Properly initialize
593 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
595 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
597 * elf32-i386.c (elf_i386_local_hash): Removed.
598 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
599 (elf_i386_get_local_sym_hash): Likewise.
601 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
602 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
603 (elf64_x86_64_get_local_sym_hash): Likewise.
604 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
605 (get_local_sym_hash): Likewise.
607 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
609 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
610 rel_got_sec and plt_sec.
611 (elfNN_ia64_relax_section): Updated.
612 (elfNN_ia64_create_dynamic_sections): Likewise.
614 (allocate_dynrel_entries): Likewise.
615 (elfNN_ia64_size_dynamic_sections): Likewise.
616 (set_got_entry): Likewise.
617 (elfNN_ia64_choose_gp): Likewise.
618 (elfNN_ia64_relocate_section): Likewise.
619 (elfNN_ia64_finish_dynamic_symbol): Likewise.
620 (elfNN_ia64_finish_dynamic_sections): Likewise.
622 2009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
624 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
627 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
629 * configure.in (elf): Add elf-ifunc.lo.
631 * configure: Regenerated.
632 * Makefile.in: Likewise.
634 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
635 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
637 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
638 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
640 (elf_i386_link_hash_table_create): Likewise.
641 (elf_i386_create_dynamic_sections): Likewise.
642 (elf_i386_check_relocs): Likewise.
643 (elf_i386_allocate_dynrelocs): Likewise.
644 (elf_i386_size_dynamic_sections): Likewise.
645 (elf_i386_relocate_section): Likewise.
646 (elf_i386_finish_dynamic_symbol): Likewise.
647 (elf_i386_finish_dynamic_sections): Likewise.
648 (elf_i386_create_got_section): Removed.
650 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
651 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
653 (elf64_x86_64_compute_jump_table_size): Updated.
654 (elf64_x86_64_link_hash_table_create): Likewise.
655 (elf64_x86_64_create_dynamic_sections): Likewise.
656 (elf64_x86_64_check_relocs): Likewise.
657 (elf64_x86_64_allocate_dynrelocs): Likewise.
658 (elf64_x86_64_size_dynamic_sections): Likewise.
659 (elf64_x86_64_relocate_section): Likewise.
660 (elf64_x86_64_finish_dynamic_symbol): Likewise.
661 (elf64_x86_64_finish_dynamic_sections): Likewise.
662 (elf64_x86_64_create_got_section): Removed.
664 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
665 for pointer alignment. Set up section pointers.
666 (_bfd_elf_create_dynamic_sections): Likewise.
667 (_bfd_elf_create_ifunc_sections): Moved to ...
668 * elf-ifunc.c: Here. New.
670 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
671 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
674 2009-06-16 Doug Kwan <dougkwan@google.com>
676 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
677 to bfd_signed_vma. Cast constant operands which are used in
678 offset related expressions to bfd_signed_vma type as appropriate.
680 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
682 * elf32-vax.c (elf_vax_plt_sym_val): New function.
683 (elf_backend_plt_sym_val): Define.
685 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
687 * elf32-vax.c (elf_vax_reloc_type_class): New function.
688 (elf_backend_reloc_type_class): Define.
690 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
692 * elf32-vax.c (elf_vax_relocate_section): For symbol references
693 from an executable to a shared library treat R_VAX_PC32
694 relocations as R_VAX_PLT32 ones.
696 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
698 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
699 symbols in GOT space calculation.
700 (elf_vax_relocate_section): Adjust accordingly.
702 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
704 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
707 2009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
709 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
711 (elf_vax_relocate_section): Likewise.
713 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
715 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
716 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
718 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
720 * elf32-i386.c (elf_i386_check_relocs): Reformat.
721 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
723 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
725 * Makefile.am: Run "make dep-am".
726 * Makefile.in: Regenerated.
728 2009-06-15 H.J. Lu <hongjiu.lu@intel.com>
730 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
731 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
733 2009-06-15 Nick Clifton <nickc@redhat.com>
735 * po/ru.po: New Russian translation.
736 * configure.in (ALL_LINGUAS): Add ru.
737 * configure: Regenerate.
739 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
741 * elf32-i386.c: Remove duplicated comments.
743 2009-06-14 H.J. Lu <hongjiu.lu@intel.com>
746 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
747 dynamic IFUNC pointer in non-shared object. Use .got.plt
748 for IFUNC definition in PIE.
749 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
752 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
753 dynamic IFUNC pointer in non-shared object. Use .got.plt
754 for IFUNC definition in PIE.
755 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
758 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
760 * elf32-i386.c (elf_i386_check_relocs): Properly report
761 local symbol for unhandled relocation against STT_GNU_IFUNC
763 (elf_i386_relocate_section): Likewise.
764 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
765 (elf64_x86_64_relocate_section): Likewise.
767 2009-06-13 H.J. Lu <hongjiu.lu@intel.com>
770 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
771 (elf_i386_link_hash_table): Add loc_hash_table and
773 (elf_i386_local_hash): New.
774 (elf_i386_local_htab_hash): Likewise.
775 (elf_i386_local_htab_eq): Likewise.
776 (elf_i386_get_local_sym_hash): Likewise.
777 (elf_i386_link_hash_table_free): Likewise.
778 (elf_i386_allocate_local_dynrelocs): Likewise.
779 (elf_i386_finish_local_dynamic_symbol): Likewise.
780 (bfd_elf64_bfd_link_hash_table_free): Likewise.
781 (elf_i386_link_hash_table_create): Create loc_hash_table and
783 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
784 (elf_i386_size_dynamic_sections): Likewise.
785 (elf_i386_relocate_section): Likewise.
786 (elf_i386_finish_dynamic_sections): Likewise.
787 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
790 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
791 (elf64_x86_64_link_hash_table): Add loc_hash_table and
793 (elf64_x86_64_local_hash): New.
794 (elf64_x86_64_local_htab_hash): Likewise.
795 (elf64_x86_64_local_htab_eq): Likewise.
796 (elf64_x86_64_get_local_sym_hash): Likewise.
797 (elf64_x86_64_link_hash_table_free): Likewise.
798 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
799 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
800 (bfd_elf64_bfd_link_hash_table_free): Likewise.
801 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
803 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
805 (elf64_x86_64_size_dynamic_sections): Likewise.
806 (elf64_x86_64_relocate_section): Likewise.
807 (elf64_x86_64_finish_dynamic_sections): Likewise.
808 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
811 2009-06-10 Philip Blundell <philb@gnu.org>
813 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
814 elf_sec->this_hdr == NULL.
816 2009-06-12 Tristan Gingold <gingold@adacore.com>
818 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
819 * bfd-in2.h: Regenerated.
820 * libbfd.h: Regenerated.
822 * mach-o.c (FILE_ALIGN): New macro.
823 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
824 (bfd_mach_o_print_symbol): Ditto.
825 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
826 (bfd_mach_o_get_reloc_upper_bound): New function.
827 (bfd_mach_o_canonicalize_reloc): Ditto.
828 (bfd_mach_o_scan_write_relocs): Ditto.
829 (bfd_mach_o_scan_write_section_32): Remove offset argument.
830 (bfd_mach_o_scan_write_section_64): Ditto.
831 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
832 written for load command. Do not compute section file offset.
833 (bfd_mach_o_scan_write_segment_64): Ditto.
834 (bfd_mach_o_scan_write_symtab): Compute file offset first.
835 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
837 (bfd_mach_o_mangle_symbols): ... this new function.
838 (bfd_mach_o_write_contents): Be sure to have load commands built.
839 Call bfd_mach_o_mangle_symbols.
840 (bfd_mach_o_build_commands): Adjust for filelen field.
841 Use FILE_ALIGN macro. Clear section file offset if section is empty.
842 Do not set symtab file offset anymore here.
843 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
844 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
845 Set reloc_count and rel_filepos section fields.
846 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
848 (bfd_mach_o_scan_read_section_64): Ditto.
849 (bfd_mach_o_scan_read_section): Ditto.
850 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
851 bfd_mach_o_asymbol. Use unsigned int for file offset type.
852 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
853 Handle weak-ref symbols.
854 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
855 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
856 (bfd_mach_o_scan): Remove assignment to removed field.
857 (bfd_mach_o_mkobject_init): Ditto.
858 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
859 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
860 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
861 (bfd_mach_o_swap_reloc_in): Ditto.
862 (bfd_mach_o_swap_reloc_out): Ditto.
864 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
865 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
866 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
867 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
868 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
869 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
870 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
871 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
872 (BFD_MACH_O_N_WEAK_DEF): New macros.
874 (bfd_mach_o_section_type): Add new enumeration values.
875 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
876 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
877 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
878 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
880 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
881 (BFD_MACH_O_GENERIC_RELOC_PAIR)
882 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
883 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
884 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
885 (BFD_MACH_O_RELENT_SIZE): Ditto.
886 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
887 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
888 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
889 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
890 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
891 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
892 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
893 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
894 (bfd_mach_o_reloc_info): New struct.
895 (bfd_mach_o_asymbol): New struct.
896 (bfd_mach_o_symtab_command): The symbols field is now of type
898 (bfd_mach_o_load_command): The offset and len fields are now of type
900 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
901 Add a filelen field. Add comments.
902 (bfd_mach_o_backend_data): New struct.
903 (bfd_mach_o_get_backend_data): New macro.
904 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
906 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
907 (bfd_mach_o_get_reloc_upper_bound): New prototype.
908 (bfd_mach_o_canonicalize_reloc): Ditto.
910 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
911 duplicated macro. Now defined to _bfd_generic_is_local_label.
912 (TARGET_NAME_BACKEND): New macro...
913 (TARGET_NAME_BACKEND): ... used to name a new variable.
914 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
917 * mach-o-i386.c (i386_howto_table): New variable.
918 (bfd_mach_o_i386_swap_reloc_in): New function.
919 (bfd_mach_o_i386_swap_reloc_out): Ditto.
920 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
921 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
922 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
923 (bfd_mach_o_bfd_reloc_type_lookup)
924 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
926 2009-06-11 Eric Paris <eparis@redhat.com>
927 Nick Clifton <nickc@redhat.com>
929 * opncls.c (_maybe_make_executable): New function. Gives execute
930 permission to an executable bfd that was opened for writing
931 provided that it is a regular file. Replaces common code found in...
932 (bfd_close): here and ...
933 (bfd_close_all_done): here.
935 2009-06-11 Anthony Green <green@moxielogic.com>
937 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
938 * bfd-in2.h: Rebuilt.
940 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
942 (moxie_reloc_map): Ditto.
943 Clean up copyright notice.
945 2009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
947 * bfd-in2.h: bfd_mmap prototype.
948 * bfdio.c (bfd_mmap): New function.
949 * libbfd.h (bfd_iovec): Add bmmap.
950 * cache.c (cache_bmmap): New function.
951 (cache_iovec): Initialize bmmap member.
952 * opencls.c (opncls_bmmap): New function.
953 (opncls_iovec): Initialize bmmap member.
955 2009-06-09 Tristan Gingold <gingold@adacore.com>
957 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
958 and stabstr_segment fields.
959 (mach_o_be_vec, mach_o_le_vec): Removed
960 (bfd_mach_o_version): New prototype.
962 * mach-o.c (bfd_mach_o_version): Make this function public.
963 (mach_o_wide_p): New function.
964 (bfd_mach_o_wide_p): Ditto.
965 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
967 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
968 Search in the list only if the name starts with a dot.
969 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
970 test. Check bfd_seek status.
971 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
972 (bfd_mach_o_scan_write_section_32): Ditto.
973 (bfd_mach_o_scan_write_section_64): Ditto.
974 (bfd_mach_o_scan_write_section): Removed.
975 (bfd_mach_o_scan_write_segment): Split into ...
976 (bfd_mach_o_scan_write_segment_32): ... this and ...
977 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
978 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
979 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
980 symbol table. Now returns a boolean.
981 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
982 Adjust for status type.
983 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
984 test. Write symbol table. Numbers the sections.
985 (bfd_mach_o_read_header): Check bfd_seek status.
986 Use mach_o_wide_p instead of hard-coded test.
987 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
988 (bfd_mach_o_scan_read_section_64): Ditto.
989 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
990 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
991 handled common symbols.
992 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
993 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
994 (bfd_mach_o_scan_read_dylinker): Ditto.
995 (bfd_mach_o_scan_read_dylib): Ditto.
996 (bfd_mach_o_scan_read_thread): Ditto.
997 (bfd_mach_o_scan_read_symtab): Ditto.
998 Do not create a section for the stabs.
999 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1000 (bfd_mach_o_scan_read_segment): Ditto.
1001 (bfd_mach_o_scan_read_command): Ditto.
1002 (bfd_mach_o_scan_start_address): Ditto.
1003 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1004 (bfd_mach_o_archive_p): Check bfd_seek status.
1005 (bfd_mach_o_core_fetch_environment): Ditto.
1007 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1009 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1011 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1012 (elf_i386_link_hash_table_create): Initialize irelifunc.
1013 (elf_i386_check_relocs): Updated. Set up irelifunc for
1015 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1016 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1018 (elf_i386_relocate_section): Likewise.
1020 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1021 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1022 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1024 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1025 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1027 (elf64_x86_64_relocate_section): Likewise.
1029 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1031 (_bfd_elf_create_ifunc_sections): This.
1033 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
1035 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1038 2009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1040 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1041 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1042 building shared object. Check info->executable instead of
1043 !info->shared when setting non_got_ref.
1044 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1045 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1046 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1048 (elf_i386_relocate_section): Output dynamic relocation for
1049 R_386_32 against STT_GNU_IFUNC symbol to get the real
1050 function address when building shared object.
1051 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1052 relocation for STT_GNU_IFUNC symbol in shared object.
1054 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1055 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1056 symbol when building shared object. Check info->executable
1057 instead of !info->shared when setting non_got_ref.
1058 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1059 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1060 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1062 (elf64_x86_64_relocate_section): Output dynamic relocation
1063 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1064 function address when building shared object.
1065 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1066 relocation for STT_GNU_IFUNC symbol in shared object.
1068 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1070 * Makefile.am: Run "make dep-am".
1071 (BFD32_BACKENDS): Add mach-o-i386.lo.
1072 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1073 * Makefile.in: Regenerate.
1075 2009-06-06 Alan Modra <amodra@bigpond.net.au>
1077 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1078 when looking for soft-icache stubs.
1080 2009-06-05 Tristan Gingold <gingold@adacore.com>
1082 * mach-o.h: Update copyright year.
1083 (bfd_mach_o_mach_header_magic): New enum.
1084 (bfd_mach_o_cpu_subtype): Now an enum.
1085 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1086 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1087 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1088 (bfd_mach_o_load_command): Field type_required is now a boolean.
1089 Reindent prototypes.
1090 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1091 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1092 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1093 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1094 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1095 (bfd_mach_o_canonicalize_symtab): Ditto.
1096 (bfd_mach_o_get_symbol_info): Ditto.
1097 (bfd_mach_o_print_symbol): Ditto.
1098 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1099 (bfd_mach_o_make_empty_symbol): Ditto.
1100 (bfd_mach_o_write_contents): Ditto.
1102 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1103 bfd_mach_o_mkobject): Defines.
1104 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1105 Do not check with target vector but with flavour.
1106 (struct mach_o_section_name_xlat): New declaration.
1107 (dwarf_section_names_xlat): Ditto.
1108 (text_section_names_xlat): Ditto.
1109 (data_section_names_xlat): Ditto.
1110 (struct mach_o_segment_name_xlat): Ditto.
1111 (segsec_names_xlat): Ditto.
1112 (bfd_mach_o_convert_section_name_to_bfd): New function.
1113 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1114 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1115 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1116 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1117 Accept any input and output flavour. Do not share private data
1119 (bfd_mach_o_count_symbols): Add a comment.
1120 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1121 (bfd_mach_o_canonicalize_symtab): Ditto.
1122 (bfd_mach_o_get_symbol_info): Ditto.
1123 (bfd_mach_o_print_symbol): Ditto.
1124 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1125 Use constants instead of hard-coded values.
1126 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1128 (bfd_mach_o_scan_write_section_64): Ditto.
1129 (bfd_mach_o_scan_write_segment): Ditto.
1130 Do not copy sections anymore.
1131 (bfd_mach_o_write_contents): Make it public.
1132 Remove dead code. Rewrite typeflag assignment.
1133 (bfd_mach_o_build_commands): New function.
1134 (bfd_mach_o_set_section_contents): Ditto.
1135 (bfd_mach_o_make_empty_symbol): Make it public.
1136 (bfd_mach_o_read_header): Make it static.
1137 Convert to bfd_boolean.
1138 Use constants instead of hard-coded values.
1139 (bfd_mach_o_make_bfd_section): Call
1140 bfd_mach_o_convert_section_name_to_bfd to create name.
1141 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1143 (bfd_mach_o_scan_read_section_64): Ditto.
1144 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1145 a segment anymore. Use constants instead of hard-coded values.
1146 (bfd_mach_o_scan_read_command): Fix style.
1147 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1148 Get rid of BFD_IO_FUNCS.
1149 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1150 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1151 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1152 (bfd_mach_o_object_p): Removed.
1153 (bfd_mach_o_gen_core_p): New function, replaces ...
1154 (bfd_mach_o_core_p): ... deleted.
1155 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1157 * mach-o-i386.c: New file.
1158 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1159 * configure.in (TDEFINES): Add mach_o_i386_vec.
1160 * configure: Regenerated.
1161 * targets.c: Add mach_o_i386_vec.
1163 * mach-o.c: Update copyright years.
1164 (BFD_IO_FUNCS): Remove (was not used).
1165 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1166 bfd_mach_o_slurp_extended_name_table,
1167 bfd_mach_o_construct_extended_name_table,
1168 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1169 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1170 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1171 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1172 bfd_mach_o_get_section_contents_in_window,
1173 bfd_mach_o_bfd_is_local_label_name,
1174 bfd_mach_o_bfd_is_target_special_symbol,
1175 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1176 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1177 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1178 bfd_mach_o_minisymbol_to_symbol,
1179 bfd_mach_o_bfd_get_relocated_section_contents,
1180 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1181 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1182 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1183 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1184 bfd_mach_o_bfd_merge_private_bfd_data,
1185 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1186 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1187 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1188 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1189 bfd_mach_o_bfd_copy_private_header_data,
1190 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1191 * mach-o-target.c: ... here.
1192 Update copyright years.
1194 2009-06-04 Alan Modra <amodra@bigpond.net.au>
1196 * dep-in.sed: Don't use \n in replacement part of s command.
1197 * Makefile.am (DEP1): LC_ALL for uniq.
1199 * Makefile.in: Regenerate.
1201 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1203 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1204 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1205 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1207 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1209 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1210 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1211 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1212 against STT_GNU_IFUNC symbols for static executables.
1213 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1214 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1216 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1217 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1218 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1219 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1221 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1223 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1224 symbols to be left unimported when linking statically.
1225 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1226 code when linking statically.
1228 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1230 * elf32-i386.c (elf_i386_check_relocs): Increment
1231 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1232 against STT_GNU_IFUNC symbol.
1233 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1234 local STT_GNU_IFUNC definition is used.
1235 (elf_i386_relocate_section): Handle got.offset != -1 for
1236 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1239 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1240 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1241 relocations against STT_GNU_IFUNC symbol.
1242 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
1243 local STT_GNU_IFUNC definition is used.
1244 (elf64_x86_64_relocate_section): Handle got.offset != -1
1245 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
1246 STT_GNU_IFUNC symbol.
1248 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1251 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
1252 (elf_i386_reloc_type_lookup): Likewise.
1253 (R_386_tls): Removed.
1254 (R_386_irelative): New.
1255 (R_386_vt_offset): Updated.
1256 (elf_i386_rtype_to_howto): Likewise.
1257 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
1258 (elf_i386_link_hash_table_create): Initialize igotplt,
1260 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
1261 (elf_i386_adjust_dynamic_symbol): Likewise.
1262 (elf_i386_allocate_dynrelocs): Likewise.
1263 (elf_i386_relocate_section): Likewise.
1264 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
1266 (elf_i386_finish_dynamic_symbol): When building a static
1267 executable, use .iplt, .igot.plt and .rel.iplt sections for
1268 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
1269 locally defined STT_GNU_IFUNC symbol.
1271 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
1272 (x86_64_reloc_map): Likewise.
1273 (R_X86_64_standard): Updated.
1274 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
1275 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
1277 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
1278 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1279 (elf64_x86_64_allocate_dynrelocs): Likewise.
1280 (elf64_x86_64_relocate_section): Likewise.
1281 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
1283 (elf64_x86_64_finish_dynamic_symbol): When building a static
1284 executable, use .iplt, .igot.plt and .rela.iplt sections for
1285 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
1286 for locally defined STT_GNU_IFUNC symbol.
1288 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
1289 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
1291 * bfd-in2.h: Regenerated.
1292 * libbfd.h: Likewise.
1294 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1296 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
1297 (_bfd_elf_make_ifunc_reloc_section): Removed.
1298 (_bfd_elf_is_ifunc_symbol): Likewise.
1299 (_bfd_elf_create_static_ifunc_sections): New.
1301 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
1303 (elf_link_add_object_symbols): Here.
1304 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
1305 STT_GNU_IFUNC symbol.
1306 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
1307 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
1308 (IFUNC_INFIX): Removed.
1309 (get_ifunc_reloc_section_name): Likewise.
1310 (_bfd_elf_make_ifunc_reloc_section): Likewise.
1311 (_bfd_elf_is_ifunc_symbol): Likewise.
1312 (_bfd_elf_create_static_ifunc_sections): New.
1314 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
1316 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
1317 (create_got_section): Likewise.
1318 (allocate_dynrelocs): Likewise.
1319 (readonly_dynrelocs): Likewise.
1320 (set_tls_module_base): Likewise.
1321 (dtpoff_base): Likewise.
1323 (elf_i386_link_hash_table_create): Updated.
1324 (elf_i386_create_dynamic_sections): Likewise.
1325 (elf_i386_check_relocs): Likewise.
1326 (elf_i386_size_dynamic_sections): Likewise.
1327 (elf_i386_relocate_section): Likewise.
1329 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
1330 (create_got_section): Likewise.
1331 (allocate_dynrelocs): Likewise.
1332 (readonly_dynrelocs): Likewise.
1333 (set_tls_module_base): Likewise.
1334 (dtpoff_base): Likewise.
1336 (elf64_x86_64_link_hash_table_create): Updated.
1337 (elf64_x86_64_create_dynamic_sections): Likewise.
1338 (elf64_x86_64_check_relocs): Likewise.
1339 (elf64_x86_64_size_dynamic_sections): Likewise.
1340 (elf64_x86_64_relocate_section): Likewise.
1342 2009-05-28 Nick Clifton <nickc@redhat.com>
1344 * targets.c (_bfd_target_vector): Only include plugin target in
1345 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
1347 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1349 * elf32-spu.c (struct call_info): New member broken_cycle.
1350 (remove_cycle): Instead of physically removing call_info structures
1351 to break call graph cycles, mark them using the broken_cycle flag.
1352 (mark_overlay_section): Respect broken_cycle flag.
1353 (unmark_overlay_section): Likewise.
1354 (collect_lib_sections): Likewise.
1355 (collect_overlays): Likewise.
1356 (sum_stack): Likewise.
1358 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1360 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
1361 (mark_functions_via_relocs): Initialize callee->count to 1.
1362 (pasted_function): Likewise.
1363 (spu_elf_auto_overlay): Honor call counts when determining number
1364 of stubs required in software i-cache mode.
1366 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
1368 * plugin.c (program_name): Remove.
1369 (plugin_program_name): New.
1370 (bfd_plugin_set_program_name): New.
1371 (try_load_plugin): Use plugin_program_name.
1372 * plugin.h (bfd_plugin_set_program_name): New.
1374 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
1376 * aclocal.m4: Include ../config/plugins.m4.
1377 * configure.in: Use AC_PLUGINS.
1378 * configure: Regenerate.
1379 * Makefile.in: Regenerate.
1380 * doc/Makefile.in: Regenerate.
1382 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
1384 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
1386 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
1387 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
1388 * elf32-avr.c (elf32_avr_relax_section): Likewise.
1389 * elf32-frv.c (elf32_avr_relax_section): Likewise.
1390 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
1391 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1392 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1393 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
1394 * reloc.c (bfd_generic_relax_section): Likewise.
1395 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
1396 * vms.c (vms_bfd_relax_section): Likewise.
1398 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
1400 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
1402 * elf32-i386.c (is_indirect_symbol): Renamed to ...
1403 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
1405 * elf32-i386.c (allocate_dynrelocs): Updated.
1406 (elf_i386_relocate_section): Likewise.
1407 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1408 (elf64_x86_64_relocate_section): Likewise.
1410 * elf64-x86-64.c (is_indirect_symbol): Removed.
1412 2009-05-26 Nick Clifton <nickc@redhat.com>
1414 * po/id.po: Updated Indonesian translation.
1416 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
1418 * Makefile.am: Run "make dep-am".
1421 (ALL_MACHINES): Add cpu-plugin.lo.
1422 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
1423 (BFD32_BACKENDS): Add plugin.lo.
1424 (BFD32_BACKENDS_CFILES): Add plugin.c.
1425 (libbfd_la_LIBADD): Add LIBDL
1426 * archures.c (bfd_architecture): Add bfd_arch_plugin.
1427 (bfd_plugin_arch): Declare.
1428 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
1429 * bfd.c (bfd): Add plugin_data.
1430 * config.bfd: Handle the plugin target.
1431 * configure.in: Check for --enable-plugins.
1432 (LT_INIT): Use the dlopen option.
1433 * cpu-plugin.c: New.
1436 * targets.c (plugin_vec): Declare.
1437 (_bfd_target_vector): Add plugin_vec.
1438 * Makefile.in: Regenerate.
1439 * bfd-in2.h: Regenerate.
1440 * configure: Regenerate.
1442 2009-05-26 Alan Modra <amodra@bigpond.net.au>
1444 * dep-in.sed: Don't modify .o to .lo here. Output one filename
1445 per line with all lines having continuation backslash. Prefix
1446 first line with "A", following lines with "B".
1447 * Makefile.am (DEP): Don't use dep.sed here.
1448 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
1449 dep.sed here on dependencies, sort and uniq.
1450 * Makefile.in: Regenerate.
1452 2009-05-25 Tristan Gingold <gingold@adacore.com>
1454 * makefile.vms: Add verilog.obj to object list OBJS.
1456 2009-05-24 Alan Modra <amodra@bigpond.net.au>
1458 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
1459 for BFD_IN_MEMORY is cleared.
1460 (bfd_bwrite): Zero excess memory allocated.
1462 2009-05-22 Julian Brown <julian@codesourcery.com>
1464 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
1466 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
1467 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
1468 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
1469 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
1470 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
1471 (a8_erratum_fix, a8_erratum_reloc): New structs.
1472 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
1473 num_a8_erratum_fixes, fix_cortex_a8 fields.
1474 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
1475 (elf32_arm_add_stub): Split into two parts, creating...
1476 (elf32_arm_create_or_find_stub_sec): New function.
1477 (elf32_arm_final_link_relocate): Add forward declaration.
1478 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
1479 relocations, multiple relocations per stub.
1480 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
1481 (arm_size_one_stub): Use find_stub_size_and_template.
1482 (a8_reloc_compare): New.
1483 (find_thumb_glue): Add forward declaration.
1484 (cortex_a8_erratum_scan): New.
1485 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
1486 (bfd_elf32_arm_set_cortex_a8_fix): New.
1487 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
1488 (arm_map_one_stub): Add THUMB32_TYPE support.
1489 (a8_branch_to_stub_data): New.
1490 (make_branch_to_a8_stub): New.
1491 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
1492 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
1493 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
1494 Cortex-A8 erratum workaround.
1495 * bfd-in2.h: Regenerate.
1497 2009-05-22 Alan Modra <amodra@bigpond.net.au>
1499 * Makefile.am: Run "make dep-am".
1500 * Makefile.in: Regenerate.
1501 * po/SRC-POTFILES.in: Regenerate.
1503 2009-05-21 Alan Modra <amodra@bigpond.net.au>
1505 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
1508 2009-05-21 Alan Modra <amodra@bigpond.net.au>
1510 * elf-bfd.h (struct elf_backend_data
1511 <elf_backend_link_output_symbol_hook>): Return an int.
1512 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
1513 symbols on deleted .opd entries.
1514 * elflink.c (elf_link_output_sym): Return without outputting sym
1515 if output_symbol_hook returns 2.
1516 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
1517 Abort if we must not discard sym.
1518 (elf_link_input_bfd): Similarly, don't set finfo->indices for
1520 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
1521 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
1522 elf_backend_link_output_symbol_hook return type change.
1523 * elf32-arm.c (output_arch_syminfo): Likewise.
1524 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
1525 (elf32_arm_output_arch_local_syms): Likewise.
1526 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
1527 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
1528 (bfd_score_elf_link_output_symbol_hook): Likewise.
1529 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1530 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1531 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
1532 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
1533 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
1534 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
1535 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
1536 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
1537 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1538 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1539 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1541 2009-05-21 Alan Modra <amodra@bigpond.net.au>
1543 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
1544 out of range .opd symbols.
1546 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
1548 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
1549 fprintf_vma directly.
1550 * peXXigen.c (pe_print_edata): Likewise.
1551 (pe_print_pdata): Likewise.
1552 (_bfd_XX_print_ce_compressed_pdata): Likewise.
1553 (_bfd_XX_print_private_bfd_data_common): Likewise.
1555 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
1557 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
1559 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
1560 Paul Brook <paul@codesourcery.com>
1562 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
1563 fix discarded sections.
1565 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1567 * elf32-spu.c (mark_overlay_section): Move .init and .fini
1568 sections into the software icache.
1570 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1572 * elf32-spu.c (build_stub): Always build "compact" sofware
1575 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1577 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
1578 (spu_elf_setup): Initialize it.
1579 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
1580 Update to new-sytle cache manager data structures.
1581 (spu_elf_build_stubs): Generate new-style cache manager data
1582 structures and symbols.
1583 (spu_elf_auto_overlay): Update size computation.
1585 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1587 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
1588 segments first amongst the program headers.
1590 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1592 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
1593 into addresses for relocation types that look at high bits. Remove
1594 special handling of relocation overflow warnings.
1596 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1598 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
1599 control flow graph between fragments of a function.
1601 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1603 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
1604 generate only a 16-byte .toe section.
1605 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
1607 2009-05-14 Alan Modra <amodra@bigpond.net.au>
1609 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
1610 (spu_elf_place_overlay_data): ..here. New function.
1611 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
1613 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
1615 * elf32-arm.c: Move sysdep.h to start of file.
1617 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
1619 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
1621 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
1622 __icache_tag_array and __icache_tag_array_size.
1624 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
1626 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
1628 (bfinfdpic_link_omit_section_dynsym): Likewise.
1629 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
1631 2009-05-05 Paul Brook <paul@codesourcery.com>
1633 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
1634 * bfd-in2.h: Regenerate.
1635 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
1636 (_arm_elf_section_data): Add text and exidx fields.
1637 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
1638 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
1639 copy_exidx_entry): New functions.
1640 (elf32_arm_write_section): Fixup .ARM.exidx contents.
1642 2009-05-05 Christophe lyon <christophe.lyon@st.com>
1644 * elf32-arm.c (DEF_STUBS): New helper define.
1645 (DEF_STUB): Likewise.
1646 (stub_def): New type.
1647 (stub_definitions): New array, containing stub template pointers
1649 (arm_size_one_stub): Make use of stub_definitions.
1651 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
1653 * elflink.c (find_version_for_sym): Remove from here, ...
1654 * linker.c (bfd_find_version_for_sym): ... rename, replace
1655 here, make public and update all callers.
1656 * bfd-in2.h: Regenerate.
1658 2009-04-30 Nick Clifton <nickc@redhat.com>
1660 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
1662 (struct elf_obj_data): Add has_ifunc_symbols boolean.
1663 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
1664 into a STT_GNU_IFUNC symbol type.
1665 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
1667 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
1668 the binary contains ifunc symbols.
1669 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
1670 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
1671 * elf32-i386.c (is_indirect_function): New function.
1672 (elf_i386_check_relocs): Create an ifunc output section.
1673 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1674 section if necessary.
1675 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
1677 (elf_i386_add_symbol_hook): New function. Set the
1678 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
1679 symbol is encountered.
1680 (elf_backend_post_process_headers): Define.
1681 (elf_backend_add_symbol_hook): Define.
1682 (elf_i386_post_process_headers): Rename to
1683 elf_i388_fbsd_post_process_headers.
1684 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
1685 (is_indirect_function): New function.
1686 (elf64_x86_64_check_relocs): Create an ifunc output section.
1687 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
1688 section if necessary.
1689 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
1690 symbol if necessary.
1691 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
1692 elf_obj_data structure if an ifunc symbol is encountered.
1693 (elf_backend_post_process_headers): Define.
1694 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
1695 if we have ifunc symbols to handle.
1696 (get_ifunc_reloc_section_name): New function. Computes the name
1697 for an ifunc section.
1698 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
1699 section to hold ifunc relocs.
1700 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
1701 (bfd_print_symbol_vandf): Handle ifunc symbols.
1702 (bfd_decode_symclass): Likewise.
1703 * bfd-in2.h: Regenerate.
1705 2009-04-30 Joseph Myers <joseph@codesourcery.com>
1707 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
1708 MOVW and MOVT relocations in a shared library link.
1710 2009-04-27 Anthony Green <green@moxielogic.com>
1712 * verilog.c: New file.
1713 * Makefile.am (BFD32_LIBS): Add verilog.c.
1714 (BFD32_LIBS_CFILES): Add verilog.c.
1715 (verilog.lo): New build rule.
1716 * Makefile.in: Rebuilt.
1717 * targets.c: Add verilog support.
1718 * bfd.c (tdata union): Add Verilog private data field.
1719 * bfd-in2.h: Regenerate.
1721 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
1723 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
1726 2009-04-23 Matthias Klose <doko@ubuntu.com>
1728 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
1730 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
1733 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
1734 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1735 (elf32_arm_size_stubs): Likewise.
1736 (record_thumb_to_arm_glue): Deleted unused function.
1737 (bfd_elf32_arm_process_before_allocation): No longer handle
1738 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
1739 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
1740 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
1742 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
1744 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
1745 (elf32_arm_write_section): Declare early.
1746 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
1747 (arm_allocate_glue_section_space): Exclude empty sections.
1748 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
1749 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
1751 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
1752 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
1753 (elf32_arm_size_dynamic_sections): Allocate interworking
1755 (bfd_elf32_bfd_final_link): Define.
1757 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
1759 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
1761 * coffcode.h (coff_compute_section_file_positions): Clear
1762 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
1764 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
1765 force_minimum_alignment.
1767 * libcoff.h: Regenerated.
1769 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
1770 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
1772 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
1773 nor target_subsystem.
1775 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
1776 force_minimum_alignment nor target_subsystem.
1778 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
1780 * coff-x86_64.c (PEI_HEADERS): Protect includes.
1781 (bfd_pe_print_pdata): Remove #ifdef PE variation.
1782 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
1783 include in coff-x86_64.c of headers.
1784 (PDATA_ROW_SIZE): New define.
1785 (pex_regs[]): New static array.
1786 (pex64_get_runtime_function): New static function.
1787 (pex64_get_unwind_info): Likewise.
1788 (pex64_get_scope_entry): Likewise.
1789 (pex64_xdata_print_uwd_codes): Likewise.
1790 (pex64_get_section_by_rva): Likewise.
1791 (pex64_dump_xdata): Likewise.
1792 (pex64_bfd_print_pdata): Likewise.
1793 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
1794 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
1795 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
1797 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
1798 Alan Modra <amodra@bigpond.net.au>
1799 Dave Korn <dave.korn.cygwin@gmail.com>
1801 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
1802 long names and non-NUL-terminated strings.
1804 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1806 * bfd-in2.h: Regenerated.
1808 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1810 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
1811 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
1813 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
1816 * coffcode.h (bfd_pei_p): New.
1818 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
1819 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1820 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
1821 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
1822 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
1823 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
1825 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
1826 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
1827 bfd_efi_rtdrv_x86_64_vec,
1828 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
1829 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
1830 * targets.c: Likewise.
1832 * configure: Regenerated.
1833 * libcoff.h: Likewise.
1834 * Makefile.in: Likewise.
1836 * efi-app-ia32.c: Removed.
1837 * efi-app-x86_64.c: Likewise.
1838 * efi-bsdrv-ia32.c: Likewise.
1839 * efi-bsdrv-ia64.c: Likewise.
1840 * efi-bsdrv-x86_64.c: Likewise.
1841 * efi-rtdrv-ia32.c: Likewise.
1842 * efi-rtdrv-ia64.c: Likewise.
1843 * efi-rtdrv-x86_64.c: Likewise.
1844 * efi-rtdrv-ia32.c: Likewise.
1846 * efi-app-ia64.c: Moved to ...
1848 (TARGET_SYM): Set to bfd_pei_ia64_vec.
1849 (TARGET_NAME): Set to pei-ia64.
1851 * libpei.h (bfd_target_pei_p): Removed.
1852 (bfd_target_pei_arch): Likewise.
1853 (bfd_target_efi_app_p): Likewise.
1854 (bfd_target_efi_app_arch): Likewise.
1855 (bfd_target_efi_bsdrv_p): Likewise.
1856 (bfd_target_efi_bsdrv_arch): Likewise.
1857 (bfd_target_efi_rtdrv_p): Likewise.
1858 (bfd_target_efi_rtdrv_arch): Likewise.
1859 (bfd_pe_executable_p): Likewise.
1861 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
1862 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
1863 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
1864 and efi-rtdrv-ia32.c.
1865 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
1866 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
1867 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
1868 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
1869 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
1870 efi-rtdrv-x86_64.c. Add pei-ia64.c.
1871 (efi-app-ia64.lo): Removed.
1872 (efi-bsdrv-ia32.lo): Likewise.
1873 (efi-rtdrv-ia32.lo): Likewise.
1874 (efi-app-ia64.lo): Likewise.
1875 (efi-bsdrv-ia64.lo): Likewise.
1876 (efi-rtdrv-ia64.lo): Likewise.
1877 (efi-app-x86_64.lo): Likewise.
1878 (efi-bsdrv-x86_64.lo): Likewise.
1879 (efi-rtdrv-x86_64.lo): Likewise.
1882 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
1884 (arch_type): Removed.
1885 (pe_arch): Likewise.
1886 (pe_bfd_object_p): Just return coff_object_p.
1888 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
1889 bfd_pe_executable_p with bfd_pei_p.
1891 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
1893 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
1894 PLT entries to an undefined symbol when generating a shared
1897 2009-04-17 Nick Clifton <nickc@redhat.com>
1900 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
1902 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
1904 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
1905 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
1906 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
1907 * binary.c (binary_bfd_define_common_symbol): Likewise.
1908 * bout.c (b_out_bfd_define_common_symbol): Likewise.
1909 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1910 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
1911 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
1912 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
1913 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
1914 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
1915 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
1916 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
1917 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
1918 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
1919 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
1920 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
1921 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
1922 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
1923 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
1924 * som.c (som_bfd_define_common_symbol): Likewise.
1925 * srec.c (srec_bfd_define_common_symbol): Likewise.
1926 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
1927 * versados.c (versados_bfd_define_common_symbol): Likewise.
1928 * vms.c (vms_bfd_define_common_symbol): Likewise.
1929 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
1930 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
1931 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
1932 (pmac_xcoff_vec): Likewise.
1933 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1934 (aix5coff64_vec): Likewise.
1935 * linker.c (bfd_generic_define_common_symbol): New function.
1936 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
1937 (_bfd_define_common_symbol): New field.
1938 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
1939 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
1940 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
1942 * bfd-in2.h: Regenerate.
1943 * libbfd.h: Likewise.
1944 * libcoff.h: Likewise.
1946 2009-04-15 Anthony Green <green@moxielogic.com>
1948 * targets.c: Add moxie support.
1949 * Makefile.am: Ditto.
1950 * Makefile.in: Rebuilt.
1951 * cpu-moxie.c, elf32-moxie.c: New files.
1952 * archures.c: Add moxie support.
1953 * configure.in: Add moxie support.
1954 * configure: Rebuilt.
1955 * config.bfd, archures.c: Add moxie support.
1956 * bfd-in2.h: Rebuilt.
1958 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
1960 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
1961 branch to an undef weak symbol into a jump to next instruction if
1962 a PLT entry will be created.
1964 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
1966 * coffgen.c (make_a_section_from_file): Set the backend long
1967 section names enable if long section names found on input.
1968 * coffcode.h: Extend long section names documentation to match.
1970 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
1972 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
1975 2009-04-07 DJ Delorie <dj@redhat.com>
1977 * archures.c: Add bfd_mach_mep_c5.
1978 * bfd-in2.h: Likewise.
1979 * cpu-mep.c: Add bfd_c5_arch.
1980 * elf32-mep.c: Support it.
1982 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
1984 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
1985 info->callbacks->einfo.
1986 * linker.c (_bfd_generic_section_already_linked): Likewise.
1988 2009-04-06 DJ Delorie <dj@redhat.com>
1990 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
1992 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
1994 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
1995 _bfd_pex64_print_pdata only if PE is defined.
1997 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
1998 (_bfd_pex64_print_pdata): This.
2000 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2001 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2004 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
2006 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2007 _bfd_pep_print_x64_pdata.
2008 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2009 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2011 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2013 * elf32-xtensa.c (relax_property_section): Always set r_offset
2016 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
2018 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2019 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2021 (elf32_arm_stub_type): New enum values for the two new stubs.
2022 (arm_type_of_stub): Make use of the two new stubs.
2023 (arm_size_one_stub): Handle the two new stubs.
2025 2009-04-01 Matt Thomas <matt@netbsd.org>
2027 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2028 hidden symbols into the GOT or PLT.GOT.
2029 (elf_vax_relocate_section): Do not emit a PCREL reloc
2030 into a shared object if it is against a hidden symbol.
2032 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2034 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2035 and know_contains_shared_object_p.
2036 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2037 Cache the result in the archive_info table.
2038 (xcoff_auto_export_p): Add an "info" parameter and update the
2039 call to xcoff_archive_contains_shared_object_p.
2040 (xcoff_mark_auto_exports): Update accordingly.
2041 (xcoff_post_gc_symbol): Likewise.
2043 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2045 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2048 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2050 * coff-rs6000.c (member_layout): New structure.
2051 (archive_iterator): Likewise.
2052 (member_layout_init): New function.
2053 (archive_iterator_begin): Likewise.
2054 (archive_iterator_next): Likewise.
2055 (xcoff_write_armap_old): Use the new iterator functions.
2056 (do_shared_object_padding): Delete.
2057 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2058 handling of arch_info.
2059 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2060 first loop rather than the second. Allocate a member header if
2061 there isn't one, then work out the stat information and length
2062 in the first loop too. Use the new iterators for the second loop.
2063 (xcoff_write_archive_contents_big): Likewise.
2065 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2067 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2068 (bfd_xcoff_set_archive_import_path): Likewise.
2069 * bfd-in2.h: Regenerate.
2070 * xcofflink.c: Include libiberty.h.
2071 (xcoff_archive_info): New structure.
2072 (xcoff_archive_info_hash): New function.
2073 (xcoff_archive_info_eq): Likewise.
2074 (xcoff_get_archive_info): Likewise.
2075 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2076 (bfd_xcoff_split_import_path): New function.
2077 (bfd_xcoff_set_archive_import_path): Likewise.
2078 (xcoff_set_import_path): Move earlier in file.
2079 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2080 object to the the directory part of the bfd's filename. Get the
2081 import path and filename of an archive object from the archive's
2082 xcoff_tdata, initializing it if necessary. Update use of
2084 (bfd_link_input_bfd): Update use of import_file_id.
2085 (xcoff_write_global_symbol): Likewise.
2087 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2089 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2091 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2093 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2094 a .loader section for relocatable links.
2095 (xcoff_need_ldrel_p): New function.
2096 (xcoff_mark): Use it.
2097 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2099 (xcoff_build_ldsym): New function, split out from...
2100 (xcoff_build_ldsyms): ...here. Rename to...
2101 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2102 call xcoff_build_ldsym, if there's a loader section.
2103 (xcoff_build_loader_section): New function, extracted verbatim from...
2104 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2105 there's a loader section. Only add an __rtinit loader symbol
2106 if there's a loader section. Update after above name change.
2107 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2108 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2109 and xcoff_create_ldrel.
2110 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2111 (xcoff_reloc_link_order): Likewise, but only call it if there's
2112 a loader section. Use xcoff_symbol_section.
2113 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2114 if there's a loader section.
2116 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2118 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2120 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
2122 * elf32-arm.c (group_sections): Rewrite loops for better
2125 2009-03-30 DJ Delorie <dj@redhat.com>
2127 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2128 relocs when doing a relocatable link.
2130 2009-03-28 Mark Mitchell <mark@codesourcery.com>
2132 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2133 "ERROR:", in error messages.
2134 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2135 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2136 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2137 (elf32_arm_merge_eabi_attributes): Likewise.
2138 (elf32_arm_merge_private_bfd_data): Likewise.
2140 2009-03-27 Nick Clifton <nickc@redhat.com>
2142 * section.c (bfd_get_section_contents): Detect and handle the case
2143 where a section has the SEC_IN_MEMORY flag set but no actual
2146 2009-03-26 Alan Modra <amodra@bigpond.net.au>
2149 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2150 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2151 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2152 if we don't find matching PT_LOAD when copying.
2154 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2156 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2157 the reloc descriptions.
2159 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
2161 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2162 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2163 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2165 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2167 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2168 (bfd_i386_arch_intel_syntax): Likewise.
2169 (i8086_arch): Likewise.
2170 (bfd_x86_64_arch): Likewise.
2172 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
2174 * elf32-cris.c (cris_elf_relocate_section): <case
2175 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2176 symbols for non-allocated sections. Don't check whether to
2177 generate R_CRIS_DTPMOD for non-allocated sections.
2178 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2179 handle relocation GC:ing if applied to non-allocated section.
2180 (cris_elf_check_relocs): Similar.
2182 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2183 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2184 when emitting a known TP offset in the GOT.
2186 2009-03-23 Alan Modra <amodra@bigpond.net.au>
2188 * elf64-ppc.c (synthetic_opd): Delete.
2189 (compare_symbols): Look for .opd name rather than section match.
2190 (ppc64_elf_get_synthetic_symtab): Likewise.
2192 2009-03-21 Alan Modra <amodra@bigpond.net.au>
2194 * elf32-ppc.c (is_pic_glink_stub): Delete.
2195 (is_nonpic_glink_stub): New function.
2196 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2198 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2200 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2201 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2203 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
2204 macros for visibilty and locality checks.
2205 (elf_s390_adjust_dynamic_symbol): Likewise.
2206 (allocate_dynrelocs): Likewise.
2207 (elf_s390_relocate_section): Likewise.
2208 (elf_s390_finish_dynamic_symbol): Likewise.
2209 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2210 (elf_s390_adjust_dynamic_symbol): Likewise.
2211 (allocate_dynrelocs): Likewise.
2212 (elf_s390_relocate_section): Likewise.
2213 (elf_s390_finish_dynamic_symbol): Likewise.
2215 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
2217 * bfd-in2.h: Regenerated.
2218 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2219 for debugging sections and map memory read/write dependent on
2221 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2222 without memory read flags set.
2223 * section.c: Add SEC_COFF_NOREAD to section flags.
2225 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2227 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2230 2009-03-19 Alan Modra <amodra@bigpond.net.au>
2232 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2233 "no overlays" return. If there are overlays, create overlay
2234 manager entry symbols here, so that..
2235 (spu_elf_build_stubs): ..we don't need to set them up here.
2236 Simplify entry symbol tests.
2237 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2239 2009-03-18 Mark Kettenis <kettenis@gnu.org>
2241 * elf.c (elfcore_grok_openbsd_procinfo)
2242 (elfcore_grok_openbsd_note): New functions.
2243 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
2245 2009-03-18 Alan Modra <amodra@bigpond.net.au>
2247 * vms-hdr.c: Don't include alloca.h.
2248 * elf32-m68hc1x.c: Include alloca-conf.h.
2250 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
2252 * Makefile.am: Run "make dep-am".
2253 * Makefile.in: Regenerate.
2255 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2257 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2259 2009-03-17 Alan Modra <amodra@bigpond.net.au>
2261 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
2263 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
2264 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
2265 ovly_return fields with ovly_entry[2]. Adjust all users.
2266 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
2268 (spu_elf_build_stubs): Likewise.
2269 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
2270 ovly_flavour changes. Update all callers.
2271 (ovl_stub_size_log2): New function.
2272 (build_stub): Handle compact icache stubs. Use different manager
2273 entry point for stubs in non-icache area.
2274 (spu_elf_size_stubs): Don't allocate space for indirect branch
2276 (spu_elf_build_stubs): And don't built them.
2278 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
2280 * dwarf2.c (read_section): Always use rawsize, if available.
2282 2009-03-16 Alan Modra <amodra@bigpond.net.au>
2284 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
2285 of rawsize and size for buffer.
2287 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2289 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
2290 parameter just because fixed sections fit into local store.
2291 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
2292 generating overlays if fixed sections plus reserved stack
2293 and heap space fit into local store.
2295 2009-03-15 Alan Modra <amodra@bigpond.net.au>
2297 * elf32-spu.c (build_stub): Correct icache set_id.
2298 (spu_elf_relocate_section): Likewise.
2300 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2302 * xcofflink.c (xcoff_link_check_archive_element): Only free the
2303 symbol table if it was created by the current call.
2305 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2307 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
2308 class XMC_DS rather than XMC_UA.
2310 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2312 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
2313 bfd_boolean export_defineds parameter with an unsigned int
2314 auto_export_flags parameter.
2315 * bfd-in2.h: Regenerate.
2316 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
2317 split out from xcoff_build_ldsyms.
2318 (xcoff_covered_by_expall_p): New function.
2319 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
2320 but with extra code to handle -bexpfull and -bexpall.
2321 (xcoff_mark_auto_exports): New function.
2322 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
2323 a function should be automatically exported.
2324 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
2325 parameter with an auto_export_flags parameter. Update ldinfo
2326 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
2329 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2331 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
2332 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
2333 init and fini functions. Do garbage collection for objects
2334 without an entry point too.
2336 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2338 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
2339 check whether a symbol has csect information.
2340 (coff_print_aux): Likewise.
2341 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
2342 information for C_AIX_WEAKEXT too.
2343 (_bfd_xcoff_swap_aux_out): Likewise.
2344 (xcoff_reloc_type_br): Handle defweak symbols too.
2345 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
2346 information for C_AIX_WEAKEXT too.
2347 (_bfd_xcoff64_swap_aux_out): Likewise.
2348 (xcoff64_reloc_type_br): Handle defweak symbols too.
2349 * coffgen.c (coff_print_symbol): Handle auxillary function
2350 information for C_AIX_WEAKEXT too.
2351 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
2352 instead of BSF_GLOBAL if the L_WEAK flag is set.
2353 (xcoff_dynamic_definition_p): New function.
2354 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
2355 defines h. Don't change h if ldsym isn't the definition. Otherwise,
2356 always take the symbol class from the ldsym. Use weak bfd symbol
2357 types for weak ldsyms.
2358 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
2359 Fix the check for whether a definition is from a shared object.
2360 Allow redefinitions of weak symbols.
2361 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
2362 (xcoff_keep_symbol_p): Likewise.
2363 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
2364 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
2365 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
2366 but mark them as L_WEAK.
2367 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
2368 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2370 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2372 * xcofflink.c (xcoff_mark): When walking the relocations,
2373 only mark the target symbol or the target section, not both.
2374 (xcoff_final_definition_p): New function.
2375 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
2376 symbol is a valid definition of the associated output symbol.
2377 Use XCOFF_ALLOCATED to stop the same hash table entry having
2379 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
2381 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
2383 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2385 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
2388 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2390 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
2391 * libcoff.h: Regenerate.
2392 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
2393 line-number counts in the bfd's lineno_counts field.
2394 Don't keep per-csect line-number counts.
2395 (xcoff_sweep): Don't update per-csect line-number counts.
2396 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
2397 entries in each output section.
2398 (xcoff_link_input_bfd): Get the number of line numbers from
2399 the bfd's lineno_counts field, rather than recalculating it
2400 from scratch. Fix the range check when updating C_BINCL and
2402 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
2403 here. Don't expect csects to have line-number counts.
2405 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2407 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
2408 * libcoff.h: Regenerate.
2409 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
2410 "skip" logic from xcoff_link_input_bfd.
2411 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
2412 objects in a dynamic link, rather than checking whether csectpp
2413 is null. Always allocate debug_index for other objects,
2414 and always go through the loop. Update the type of debug_index
2415 after the change above. Read the auxillary csect information
2416 and use xcoff_keep_symbol_p to decide whether a symbol should
2417 be kept. Set its debug_index to -2 if not.
2418 (xcoff_link_input_bfd): Update the type of debug_index after
2419 the change above and always expect it to be nonnull. Use it to
2420 test whether a symbol should be stripped, rather than making the
2421 decision here. Postpone all symbol creation to the second pass.
2423 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2425 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
2426 creating a descriptor.
2427 (xcoff_sweep): Don't mark toc_section unless it's needed.
2428 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
2429 when marking every bfd.
2430 (xcoff_link_input_bfd): Skip all TOC anchors.
2431 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
2432 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
2433 to -1; call xcoff_find_tc0 instead.
2435 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2437 * libcoff-in.h (xcoff_section_tdata): Update commentary.
2438 * libcoff.h: Regenerate.
2439 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
2440 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
2441 the previous symbol's csect. Treat last_symndx as an inclusive value
2442 and simplify its handling.
2443 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
2444 symbols with the right csect. Don't mark rsec when processing
2445 relocations against undefined or absolute sections.
2446 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
2447 of bfd_und_section_ptr.
2448 (xcoff_link_input_bfd): Likewise.
2450 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2452 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
2453 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
2454 flag is set. Assert that all undefined symbols are either
2455 imported or defined by a dynamic object.
2456 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2457 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
2458 handling to all relocations. Only set XCOFF_CALLED for function
2460 (xcoff_find_function): New function, split out from...
2461 (bfd_xcoff_export_symbol) ...here.
2462 (xcoff_set_import_path): New function, split out from...
2463 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
2464 meaning of XCOFF_CALLED.
2465 (xcoff_mark_symbol): If we mark an undefined and unimported
2466 symbol, find some way of defining it. If the symbol is a function
2467 descriptor, fill in its definition automatically. If the symbol
2468 is a function, mark its descriptor and allocate room for global
2469 linkage code. Otherwise mark the symbol as implicitly imported.
2470 Move the code for creating function descriptors from...
2471 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
2472 check for symbols that were implicitly defined.
2473 (xcoff_mark): Don't count any dynamic relocations against
2475 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
2476 in the xcoff link info.
2477 (xcoff_link_input_bfd): Remove handling of undefined and
2480 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2482 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
2483 if the target is absolute. Fix comment typo.
2484 (xcoff_ppc_relocate_section): Remove FIXME.
2485 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
2486 if the target is absolute.
2488 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2490 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
2491 R_POS and R_NEG relocations against absolute symbols to the
2494 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2496 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
2497 to 2 for bfd_mach_ppc_620.
2499 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2501 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
2502 * configure.in: Likewise.
2503 * configure: Regenerate.
2505 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
2508 * elf.c (assign_section_numbers): Generate symbol table if there
2509 is any relocation in output.
2510 (_bfd_elf_compute_section_file_positions): Likewise.
2512 2009-03-13 Nick Clifton <nickc@redhat.com>
2515 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
2516 * elflink.c (elf_link_read_relocs_from_section): Use
2517 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
2518 relocs but no symbol table.
2519 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2521 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
2524 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
2525 to check ___tls_get_addr.
2527 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
2528 strncmp to check __tls_get_addr.
2530 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
2532 * dwarf2.c (read_section): Always check the offset, even when the
2533 section has been read before.
2535 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
2537 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
2540 2009-03-11 Chris Demetriou <cgd@google.com>
2542 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
2543 * bfd-in2.h: Regenerate.
2544 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
2545 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
2547 (bsd_write_armap): Likewise.
2548 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
2549 flag is set, do nothing.
2550 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
2553 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
2555 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
2556 used to update stack pointer.
2558 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2561 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
2562 for unknown symbols in absolute section.
2564 2009-03-06 Nick Clifton <nickc@redhat.com>
2566 * po/es.po: Updated Spanish translation.
2568 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
2570 * elf32-arm.c (group_sections): Take next section size into
2571 account before accepting to group it.
2573 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
2575 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
2577 (elf32_arm_final_link_relocate): Likewise.
2579 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
2582 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2584 2009-03-04 Alan Modra <amodra@bigpond.net.au>
2586 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
2587 * section.c (struct bfd_section): Add has_tls_get_addr_call.
2588 (BFD_FAKE_SECTION): Init new flag.
2589 * ecoff.c (bfd_debug_section): Likewise.
2590 * bfd-in2.h: Regenerate.
2591 * libbfd.h: Regenerate.
2592 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
2593 (ppc_elf_reloc_type_lookup): Handle new relocs.
2594 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
2595 without marker relocs.
2596 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2597 if section has no old-style calls.
2598 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
2599 Don't try to optimize new-style __tls_get_addr call when handling
2600 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2602 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
2603 (ppc64_elf_reloc_type_lookup): Handle new relocs.
2604 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
2605 without marker relocs.
2606 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2607 if section has no old-style calls. Set toc_ref for new relocs as
2609 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
2610 Don't try to optimize new-style __tls_get_addr call when handling
2611 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2614 2009-03-04 Alan Modra <amodra@bigpond.net.au>
2617 * configure.in: Test for ld --as-needed support. Link shared
2618 libbfd against libm.
2619 * configure: Regenerate.
2621 2009-03-03 Alan Modra <amodra@bigpond.net.au>
2623 * Makefile.am: Run "make dep-am".
2624 * Makefile.in: Regenerate.
2626 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
2628 * elf32-score7.c: New file.
2629 * elf32-score.h: New file.
2630 * elf32-score.c: Add code to support score 7. Set score7 as the
2632 * cpu-score.c: Add score7 architecure.
2633 (compatibile): New function.
2634 * Makefile.am: Add rules for building elf32-score7 object.
2635 * Makefile.in: Regenerate.
2636 * configure.in: Add elf32-score7 object to score vectors.
2637 * configure: Regenerate.
2638 * reloc.c: Add score7 relocs.
2639 * archures.c: Add score3 and score7 machine numbers.
2640 * bfd-in2.h: Regenerate.
2641 * libbfd.h: Regenerate.
2643 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2645 * configure: Regenerate.
2647 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2649 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
2650 (elf32_hppa_check_relocs): Use it.
2652 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
2654 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2655 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2656 (elf_hppa_is_dynamic_loader_symbol): Likewise.
2657 (elf_hppa_record_segment_addrs): Likewise.
2658 (elf_hppa_final_link): Likewise.
2659 (elf_hppa_relocate_insn): Likewise.
2660 (elf_hppa_final_link_relocate): Likewise.
2661 (elf64_hppa_relocate_section): Likewise.
2662 * elf64-hppa.c: Insert above.
2664 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2666 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
2667 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
2668 (elf_hppa_relocate_section): Likewise.
2669 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
2670 from struct elf_link_hash_entry. Add count field.
2671 (struct elf64_hppa_dyn_hash_table): Delete.
2672 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
2673 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
2674 (hppa_elf_hash_entry, eh_name): Define.
2675 (elf64_hppa_new_dyn_hash_entry): Delete.
2676 (elf64_hppa_dyn_hash_lookup): Delete.
2677 (elf64_hppa_dyn_hash_traverse): Delete.
2678 (get_dyn_name): Delete.
2679 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
2680 of struct elf64_hppa_dyn_hash_entry *.
2681 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
2682 allocate_global_data_plt, allocate_global_data_stub,
2683 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
2685 (hppa64_link_hash_newfunc): New.
2686 (elf64_hppa_hash_table_create): Rework.
2687 (count_dyn_reloc): Likewise.
2688 (hppa64_elf_local_refcounts): New.
2689 (elf64_hppa_check_relocs): Rework using standard technique for recording
2690 local DLT, PLT and OPD reference counts.
2691 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
2692 elf_link_hash_entry *.
2693 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
2694 allocate_global_data_plt, allocate_global_data_stub,
2695 allocate_global_data_opd, allocate_dynrel_entries,
2696 elf64_hppa_adjust_dynamic_symbol,
2697 elf64_hppa_mark_milli_and_exported_functions): Likewise.
2698 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
2699 Use hppa_link_hash_table. Rework.
2700 (elf64_hppa_link_output_symbol_hook): Rework.
2701 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
2702 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
2703 elf64_hppa_finish_dynamic_sections): Likewise.
2705 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
2707 * elf32-arm.c (stub_reloc_type): Removed.
2708 (insn_sequence): Renamed reloc_type field to r_type.
2709 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
2710 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
2711 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
2712 (elf32_arm_stub_type): Add new enum entries for the new stubs.
2713 (arm_stub_is_thumb): Catch new stubs.
2714 (arm_type_of_stub): Handle new stubs.
2715 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
2716 (bfd_elf32_arm_process_before_allocation): Remove useless
2719 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
2721 * elf.c (elf_find_function): Use is_function_type to check
2724 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2726 * xtensa-modules.c: Revert to previous version 1.11 due
2727 to inadvertant commit.
2729 2009-02-24 Sterling Augustine <sterling@tensilica.com>
2731 * elf32-xtensa.c (text_action_add): Separate test for action
2732 type. Break if saved action is ta_widen_insn at same offset.
2734 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
2736 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
2737 to elf32_arm_stub_long_branch_any_arm_pic.
2738 (elf32_arm_stub_long_branch_any_thumb_pic): New.
2739 (enum elf32_arm_stub_type, arm_type_of_stub)
2740 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
2743 2009-02-24 Joseph Myers <joseph@codesourcery.com>
2745 * elf32-arm.c (PREV_SEC): Update comment.
2746 (group_sections): Rename argument to stubs_always_after_branch.
2747 Reverse the list and place stubs at the end of input sections.
2749 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
2751 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
2753 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
2755 (arm_size_one_stub): Remove unnecessary break.
2756 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
2758 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
2760 * elf32-arm.c (stub_insn_type): New type.
2761 (stub_reloc_type): Likewise.
2762 (insn_sequence): Likewise.
2763 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
2764 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
2765 (elf32_arm_stub_long_branch_thumb_only): Likewise.
2766 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2767 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
2768 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
2769 (elf32_arm_stub_hash_entry): Add new helper fields.
2770 (stub_hash_newfunc): Initialize these new fields.
2771 (arm_build_one_stub): Encode Arm and Thumb instructions separately
2772 to take endianness into account.
2773 (arm_size_one_stub): Compute size of stubs using insn_sequence.
2774 (arm_map_one_stub): Code is now more generic, thanks to
2777 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
2779 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
2781 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
2782 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
2783 BLX is not available. Fix typo in warning message. Add comments
2784 and improve formatting.
2785 (arm_build_one_stub): Adjust to new
2786 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
2787 (arm_map_one_stub): Likewise.
2789 2009-02-23 Tristan Gingold <gingold@adacore.com>
2790 Eric Botcazou <ebotcazou@adacore.com>
2791 Douglas B Rupp <rupp@gnat.com>
2793 * vms.h: Update copyright year, fix comments, reorder declarations.
2794 (_bfd_save_vms_section): Remove the prototype.
2795 (EGPS_S_V_NO_SHIFT): New constant.
2796 (bfd_vms_set_section_flags): New prototype.
2797 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
2799 (EGSY_S_W_FLAGS): Ditto.
2800 (EGSY_S_V_QUAD_VAL): Ditto.
2801 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
2802 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
2803 EGST_S_B_NAMLNG): Ditto.
2804 (ESRF_S_B_NAMLNG): Ditto.
2805 (ETIR_S_C_HEADER_SIZE): Ditto.
2806 (EGPS_S_V_ALLOC_64BIT): Ditto.
2807 (DST_S_C_EPILOG): Ditto.
2808 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
2809 (DST_S_C_SRC_INCRLNUM_B): Ditto.
2810 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
2811 (DST_S_L_PCLINE_UNSLONG): Ditto.
2812 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
2813 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
2814 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
2815 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
2816 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
2817 (DST_S_B_SRC_UNSBYTE): Ditto.
2818 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
2820 (vms_section, vms_reloc): Remove types.
2821 (hdr_struc): Replaced by ...
2822 (hdr_struct): ... new type.
2823 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
2824 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
2825 (EMH_DATE_LENGTH): Ditto.
2826 (eom_struc): Replaced by ...
2827 (eom_struct): ... new type.
2828 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
2829 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
2830 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
2831 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
2832 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
2833 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
2834 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
2835 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
2836 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
2837 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
2838 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
2839 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
2840 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
2841 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
2842 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
2843 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
2844 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
2845 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
2846 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
2847 (enum file_type_enum): New type.
2848 (struct location_struct): Removed.
2849 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
2850 (struct funcinfo, struct module): Ditto.
2851 (struct vms_private_data_struct): Update fields.
2852 (struct vms_section_data_struct): New type.
2854 * vms.c: Update copyright year, fix comments,
2855 Fix includes for DECC, add prototypes.
2856 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
2858 Use flavour to set is_vax, location_stack is removed.
2859 (struct pair): Declare.
2860 (fill_section_ptr): Initialize variables at declaration.
2861 Add guard to set SECTION_SYM flag, handlde und section.
2862 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
2863 (_bfd_vms_slurp_object_records): New function, replaces previous
2865 (vms_slurp_module): New function.
2866 (vms_slurp_image): Ditto.
2867 (vms_object_p): Complete rewrite.
2868 (vms_mkobject): Use is_vax field to slect architecture.
2869 (free_reloc_stream): New function.
2870 (vms_convert_to_var): Ditto.
2871 (vms_convert_to_var_1): Ditto.
2872 (vms_convert_to_var_unix_filename): Ditto.
2873 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
2875 (vms_new_section_hook): Set alignment to 0, allocate private data.
2876 (vms_get_section_contents): Load content.
2877 (vms_get_symbol_info): Handle undefined section.
2878 (vms_find_nearest_line): Handle.
2879 (alloc_reloc_stream): New function.
2880 (vms_slurp_reloc_table): Ditto.
2881 (vms_get_reloc_upper_bound): Make it real.
2882 (vms_canonicalize_reloc): Do the real work.
2883 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
2885 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
2886 (vms_set_arch_mach): Check arch.
2887 (vms_set_section_contents): Copy the content after allocation.
2888 (vms_alpha_vec): Update object flags.
2890 * vms-tir.c: Update copyright year, fix comments,
2891 add prototypes for new functions.
2892 (dst_define_location): New function.
2893 (dst_restore_location): New function.
2894 (dst_retrieve_location): New function.
2895 (dst_check_allocation): New function.
2896 (image_dump): Call dst_check_allocation.
2897 (image_write_b): Ditto.
2898 (image_write_w): Ditto.
2899 (image_write_l): Ditto.
2900 (image_write_q): Ditto.
2901 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
2902 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
2904 Call error handler instead of abort if name is not known.
2905 (etir_sta): Add quarter_relocs argument and set it.
2908 (etir_opr): Ditto, return FALSE in case of error.
2909 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
2910 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
2911 (etir_stc): Add quarter_relocs argument and set it, fix cast.
2912 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
2913 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
2914 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
2915 Return FALSE in case of error.
2916 (tir_sta): Change sign of psect.
2918 (tir_cmd): Fix cast. Makes tir_table static const.
2919 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
2920 add argument to explain.
2921 (analyze_etir): Initialize maxptr, add quarter_relocs
2922 declaration, move some declarations into inner scopes.
2923 Handle quarter_relocs and STO_IMM.
2924 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
2925 (_bfd_vms_slurp_relocs): New function.
2926 (_bfd_vms_decode_relocs): New function.
2927 (sto_imm): Rewritten.
2928 (start_first_etbt_record): New function.
2929 (start_another_etbt_record): Ditto.
2930 (etir_output_check): Ditto.
2931 (defer_reloc_p): Ditto.
2932 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
2933 a for-loop. Correctly deals with contents, deals with .vmsdebug,
2934 rewritte relocations handling.
2935 (_bfd_vms_write_tbt): Removed.
2936 (_bfd_vms_write_dbg): Ditto.
2938 * vms-misc.c: Update copyright year, Fix comments.
2939 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
2940 (maybe_adjust_record_pointer_for_object): New function.
2941 (_bfd_vms_get_first_record): New function, replaces ...
2942 (_bfd_vms_get_record): .. removed.
2943 (_bfd_vms_get_object_record): New function.
2944 (_bfd_vms_get_object_record): New function.
2945 (vms_get_remaining_object_record): New function, replaces ...
2946 (_bfd_vms_get_next_record): ... removed.
2947 (add_new_contents): Removed.
2948 (_bfd_save_vms_section): Removed.
2949 (_bfd_get_vms_section): Removed.
2950 (_bfd_vms_output_flush): Write in VAR format.
2951 (new_symbol): Don't make UND section.
2953 * vms-hdr.c: Update copyright year, update list of record handled.
2954 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
2955 (_bfd_vms_write_hdr): Strip vms and unix patches,
2956 add comments, truncate module name at 31 characters,
2957 use constants instead of hard-coded value,
2958 write BFD version instead of a fixed string.
2959 (_bfd_vms_slurp_ihd): New function.
2960 (_bfd_vms_slurp_isd): Ditto.
2961 (_bfd_vms_slurp_ihs): Ditto.
2962 (new_module): Ditto.
2963 (parse_module): Ditto
2964 (build_module_list): Ditto.
2965 (module_find_nearest_line): Ditto.
2966 (_bfd_vms_find_nearest_dst_line): Ditto.
2967 (vms_slurp_debug): Ditto.
2968 (_bfd_vms_slurp_dbg): Ditto.
2969 (_bfd_vms_slurp_tbt): Ditto.
2970 (_bfd_vms_write_dbg): Ditto.
2971 (_bfd_vms_write_tbt): Ditto.
2973 * vms-gsd.c: Update copyright year, update list of records handled.
2974 (EVAX_LITERALS_NAME): New macro.
2975 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
2976 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
2977 (register_universal_symbol): New function and prototype.
2978 (_bfd_vms_slurp_gsd): Fix indentations and casts,
2979 improve debug messages,
2980 use constants instead of hard-coded value,
2981 fix missing endianness conversion,
2982 handle global symbol (SYMG).
2983 (bfd_vms_set_section_flags): New function.
2984 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
2985 handle section literals,
2987 handle section bfd and vms flags,
2988 don't output LIB$INITIALIZE symbol,
2989 fix handling of weak symbols,
2990 fix evax vs vax procedure descriptor,
2991 handle absolute symbols.
2993 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
2994 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
2996 * makefile.vms (DEFS): Fix flags for VMS.
2998 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3000 * bfd-in2.h: Regenerated.
3001 * libbfd.h: Regenerated.
3003 2009-02-20 Cary Coutant <ccoutant@google.com>
3005 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3008 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3011 * coffcode.h (coff_write_object_contents): Don't let the string
3012 table offset overflow the s_name field when using long section names.
3014 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3016 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3017 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3018 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3019 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3020 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3021 (bfd_pmac_xcoff_backend_data): Likewise.
3022 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3023 (bfd_xcoff_aix5_backend_data): Likewise.
3024 (xcoff64_write_object_contents): Delete unused long_section_names
3026 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3027 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3029 * coffcode.h (documentation): Update to describe long section names.
3030 (COFFLONGSECTIONCATHELPER): New helper macro.
3031 (BLANKOR1TOODD): Likewise.
3032 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3033 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3034 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3035 (bfd_coff_set_long_section_names_allowed): New function.
3036 (bfd_coff_set_long_section_names_disallowed): Likewise.
3037 (struct bfd_coff_backend_data): Add new backend hook function
3038 pointer _bfd_coff_set_long_section_names.
3039 (bfd_coff_set_long_section_names): New backend hook.
3040 (coff_write_object_contents): Only generate long section names if
3041 bfd_coff_long_section_names() indicates they are currently enabled.
3042 (bfd_coff_std_swap_table): Make non-const, and initialise long
3043 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3044 (ticoff0_swap_table): Likewise to both.
3045 (ticoff1_swap_table): Again, likewise to both.
3046 * coffgen.c (make_a_section_from_file): Allow long section names
3047 as inputs even if not currently allowed for outputs.
3048 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3049 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3050 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3051 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3052 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3053 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3054 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3055 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3056 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3057 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3058 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3059 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3060 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3061 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3062 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3063 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3064 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3065 * libcoff-in.h: Update copyright year to cause updated copyright
3066 year in generated libcoff.h, and fix typo.
3067 * libcoff.h: Regenerated.
3068 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3069 (_bfd_ecoff_no_long_sections): Add prototype.
3070 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3071 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3072 defined by an including .c file.
3073 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3074 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3075 (ticoff1_swap_table): Likewise to both.
3077 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
3079 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3080 stub. Catch default case error.
3081 (arm_map_one_stub): Add missing Thumb mapping symbol.
3083 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3086 * elf32-avr.c: Handle case where no local symbos exist correctly.
3088 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
3091 * elf32-arm.c (arm_long_branch_stub,
3092 arm_thumb_v4t_long_branch_stub,
3093 arm_thumb_thumb_long_branch_stub,
3094 arm_thumb_arm_v4t_long_branch_stub,
3095 arm_thumb_arm_v4t_short_branch_stub,
3096 arm_pic_long_branch_stub):
3097 Renamed to elf32_arm_stub_long_branch_any_any,
3098 elf32_arm_stub_long_branch_v4t_arm_thumb,
3099 elf32_arm_stub_long_branch_thumb_only,
3100 elf32_arm_stub_long_branch_v4t_thumb_arm,
3101 elf32_arm_stub_short_branch_v4t_thumb_arm,
3102 elf32_arm_stub_long_branch_any_any_pic.
3103 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3104 arm_thumb_thumb_stub_long_branch,
3105 arm_thumb_arm_v4t_stub_long_branch,
3106 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3107 Renamed to arm_stub_long_branch_any_any,
3108 arm_stub_long_branch_v4t_arm_thumb,
3109 arm_stub_long_branch_thumb_only,
3110 arm_stub_long_branch_v4t_thumb_arm,
3111 arm_stub_short_branch_v4t_thumb_arm,
3112 arm_stub_long_branch_any_any_pic.
3114 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3116 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3117 in branch offset check.
3119 2009-02-15 Alan Modra <amodra@bigpond.net.au>
3121 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3122 add toc.symndx and toc.add.
3123 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3125 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3127 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3128 (branch_reloc_hash_match): New function, extracted from..
3129 (ppc64_elf_tls_optimize): ..here.
3130 (ppc64_elf_relocate_section): Properly set addends when optimizing
3131 tls sequences. Avoid unnecessary reading and writing of insns.
3132 Only redo reloc when symbol changed. Bypass symbol checks when
3134 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3135 (branch_reloc_hash_match): New function, extracted from..
3136 (ppc_elf_tls_optimize): ..here.
3137 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3138 Don't clear addend on zapped __tls_get_addr reloc.
3140 2009-02-12 Nick Clifton <nickc@redhat.com>
3143 * elflink.c (bfd_elf_final_link): When counting the relocations,
3144 if the header size has not been set yet then assume that it will
3145 match the output section's reloc type.
3147 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3149 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3152 2009-02-09 Alan Modra <amodra@bigpond.net.au>
3154 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3155 (find_function): Likewise.
3156 (pasted_function): Don't error if no prior function found.
3157 (discover_functions): Revert 2008-12-10 change. Extend first
3158 function range to start of section.
3160 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3162 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3164 * elf64-hppa.h: Likewise.
3166 2009-02-06 Joseph Myers <joseph@codesourcery.com>
3168 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3171 2009-02-04 Alan Modra <amodra@bigpond.net.au>
3173 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3174 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3176 2009-02-03 Sandip Matte <sandip@rmicorp.com>
3178 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3179 * archures.c (bfd_mach_mips_xlr): Define.
3180 * bfd-in2.h: Regenerate.
3181 * cpu-mips.c (I_xlr): Define.
3182 (arch_info_struct): Add XLR entry.
3183 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3184 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3185 (mips_mach_extensions): Add XLR entry.
3187 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3189 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3191 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3193 * configure.in: AC_SUBST pdfdir.
3194 * Makefile.am: Add install-pdf, install-pdf-am
3195 and install-pdf-recursive targets. Define pdfdir.
3196 * doc/Makefile.am: Define pdf__strip_dir. Add
3197 install-pdf and install-pdf-am targets.
3198 * po/Make-in: Add install-pdf target.
3199 * configure: Regenerate.
3200 * Makefile.in: Regenerate
3201 * doc/Makefile.in: Regenerate.
3203 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3205 * bfd-in2.h: Regenerate.
3206 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3207 fields from n_entries to n_slots where appropriate, update comments.
3208 (HOWTO): Add TLS relocations.
3209 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3210 (enum elf_m68k_got_offset_size): New enum.
3211 (struct elf_m68k_got_entry.type): Move field to ...
3212 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3213 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3215 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3217 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3218 fields into n_entries array. Update comments.
3219 (elf_m68k_init_got): Simplify, update all uses.
3220 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3221 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3222 GOT entries; update name, update all uses.
3223 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3224 (elf_m68k_get_got_entry): Update.
3225 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3227 (elf_m68k_remove_got_entry_type): Simplify.
3228 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3229 (elf_m68k_can_merge_gots): Update.
3230 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3231 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3232 GOT entries, simplify.
3233 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3234 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3235 field, remove obsoleted local_n_entries field.
3236 (elf_m68k_partition_multi_got_2): New static function.
3237 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3239 (elf_m68k_remove_got_entry_type): Update.
3240 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3241 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
3242 update of sgot->size and srelgot->size.
3243 (elf_m68k_gc_sweep_hook): Update.
3244 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3245 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
3247 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
3248 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
3250 2009-02-02 DJ Delorie <dj@redhat.com>
3252 * elf32-mep.c (config_names): Regenerate configuration.
3254 2009-02-02 Alan Modra <amodra@bigpond.net.au>
3256 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
3257 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
3258 * elf.c (bfd_elf_get_str_section): Make static.
3259 (bfd_elf_find_section): Delete.
3260 * libbfd.h: Regenerate.
3262 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3264 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
3265 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
3267 2009-01-31 Alan Modra <amodra@bigpond.net.au>
3269 * elflink.c (on_needed_list): New function.
3270 (elf_link_add_object_symbols): Link in --as-needed libs if they
3271 satisfy undefined symbols in other libs.
3273 2009-01-30 Julian Brown <julian@codesourcery.com>
3275 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
3276 EXEC_P or DYNAMIC flags, and skip sections which are being linked
3277 with --just-symbols (-R).
3279 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
3281 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
3282 high_pc in order to properly sign-extend VMAs.
3284 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
3285 Mark Shinwell <shinwell@codesourcery.com>
3286 Catherine Moore <clm@codesourcery.com>
3288 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
3290 2009-01-28 Catherine Moore <clm@codesourcery.com>
3292 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
3293 SEC_LOAD for dynamic relocation sections.
3295 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
3297 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
3298 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
3299 the size of local TLS data.
3301 2009-01-27 Andreas Schwab <schwab@suse.de>
3303 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
3304 architectures in the archive.
3306 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
3308 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
3309 <R_CRIS_32_DTPREL>: Correct relocation value.
3311 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
3312 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
3313 symbols with non-default visibility.
3315 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
3317 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
3318 describing the trampolines.
3319 (ppc_elf_relocate_section): Update relocs to describe the
3322 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3324 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
3325 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
3326 and R_PARISC_PCREL12F relocations.
3328 2009-01-24 Alan Modra <amodra@bigpond.net.au>
3331 * elflink.c (find_version_for_sym): New function split out from,
3332 but without export_dynamic test, ..
3333 (_bfd_elf_link_assign_sym_version): ..here.
3334 (_bfd_elf_export_symbol): Use it.
3336 2009-01-23 Alan Modra <amodra@bigpond.net.au>
3338 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
3339 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
3340 * elflink.c: ..here, somewhat modified.
3341 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
3342 _bfd_elf_link_find_version_dependencies,
3343 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
3344 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3345 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
3347 * elflink.c: ..and make static here.
3348 (_bfd_elf_link_find_version_dependencies): Adjust for removal
3349 of output_bfd from struct elf_find_verdep_info.
3350 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
3351 struct elf_info_failed.
3352 (bfd_elf_size_dynamic_sections): Adjust.
3354 2009-01-22 Alan Modra <amodra@bigpond.net.au>
3357 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
3358 after comp_unit_find_line call.
3360 2009-01-21 Nick Clifton <nickc@redhat.com>
3363 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
3364 tm_gmtoff field in struct tm.
3366 2009-01-21 Alan Modra <amodra@bigpond.net.au>
3368 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
3369 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
3370 sections in soft-icache lines unless non_ia_text. Don't add
3371 rodata if doing so would exceed line size.
3373 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
3375 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
3376 types than bfd_link_hash_indirect, before early return, call
3377 _bfd_elf_link_hash_copy_indirect.
3379 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
3381 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
3382 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
3383 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
3384 (elf_backend_obj_attrs_order): New define.
3385 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
3386 (elfNN_bed): Add elf_backend_obj_attrs_order.
3388 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
3390 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
3391 (obj_attr_size): Likewise.
3392 (write_obj_attribute): Likewise.
3393 (_bfd_elf_copy_obj_attributes): Likewise.
3394 (_bfd_elf_parse_attributes): Likewise.
3395 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
3396 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
3397 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
3398 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
3399 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
3402 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
3404 * elf-attrs.c (is_default_attr): Support defaultless attributes.
3405 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
3406 (bfd_elf_add_obj_attr_string): Likewise.
3407 (bfd_elf_add_obj_attr_int_string): Likewise.
3408 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
3409 * elf-bfd.h (struct obj_attribute): Document new flag bit.
3410 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
3411 Tag_nodefaults has no default value.
3412 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
3413 comment to reflect the new state.
3415 2009-01-19 Alan Modra <amodra@bigpond.net.au>
3418 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
3419 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
3420 (adjust_z_magix): Delete dead code handling QMAGIC.
3422 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
3424 * coffcode.h (styp_to_sec_flags): Correct interpretation of
3425 IMAGE_SCN_MEM_DISCARDABLE.
3427 2009-01-16 Alan Modra <amodra@bigpond.net.au>
3429 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
3430 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
3431 * configure.in (commonbfdlib): Delete.
3432 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
3433 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
3434 is available, not just for linux.
3435 * po/SRC-POTFILES.in: Regenerate.
3436 * Makefile.in: Regenerate.
3437 * configure: Regenerate.
3439 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
3440 Julian Brown <julian@codesourcery.com>
3442 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
3443 ARM attributes in ABI 2.07.
3444 * elf32-arm.c (get_secondary_compatible_arch): New function.
3445 (set_secondary_compatible_arch): New function.
3446 (tag_cpu_arch_combine): New function.
3447 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
3448 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
3449 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
3450 make it fit with order_01243.
3451 Add support for Tag_also_compatible_with,
3452 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
3453 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
3454 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
3455 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
3456 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
3457 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
3458 Rework the way unknown attributes are handled.
3459 Defer errors until all attributes have been processed.
3461 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
3463 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
3464 bfd_elf_add_obj_attr_int_string.
3465 Read Tag_compatibility from its new location in the attribute array,
3466 rather than the attribute list.
3467 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
3468 bfd_elf_add_obj_attr_int_string.
3469 (_bfd_elf_parse_attributes): Likewise.
3470 (_bfd_elf_merge_object_attributes): There's now only one
3471 Tag_compatibility, and it's in the array, not the list.
3472 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
3474 (bfd_elf_add_obj_attr_compat): Rename to
3475 bfd_elf_add_obj_attr_int_string.
3476 (bfd_elf_add_proc_attr_compat): Rename to
3477 bfd_elf_add_proc_attr_int_string.
3478 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
3481 2009-01-15 Douglas B Rupp <rupp@gnat.com>
3483 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
3484 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
3485 (vmsutil.lo): Add dependency rule.
3486 * Makefile.in: Regenerate.
3487 * config.bfd (ia64*-*-*vms*): Add case.
3488 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
3489 * configure: Regenerate.
3490 * vmsutil.c: New file.
3491 * vmsutil.h: New file.
3492 * elf-bfd.h (struct bfd_elf_special_section): Change type of
3494 * elfxx-ia64.c (elfNN_vms_post_process_headers,
3495 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
3496 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
3497 elfNN_vms_object_p): New functions
3498 * targets.c (bfd_elf64_ia64_vms_vec): New target.
3500 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
3503 * elflink.c (elf_gc_sweep): Exclude the group section if the
3504 first member of the section group is excluded.
3506 2009-01-14 Alan Modra <amodra@bigpond.net.au>
3509 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
3510 saved filename, use bfd_alloc rather than bfd_malloc for it.
3512 2009-01-13 Alan Modra <amodra@bigpond.net.au>
3514 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
3516 2009-01-13 Alan Modra <amodra@bigpond.net.au>
3518 * elf32-spu.c (remove_cycles): Always set call->max_depth.
3520 2009-01-12 Alan Modra <amodra@bigpond.net.au>
3522 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
3524 2009-01-12 Alan Modra <amodra@bigpond.net.au>
3526 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
3528 (struct got_entry): Add br_addr.
3529 (struct call_info): Add priority.
3530 (struct function_info): Add lr_store and sp_adjust.
3531 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
3532 (spu_elf_find_overlays): For soft-icache, mark any section within cache
3533 area as an overlay, and check that no other overlays exist. Look up
3534 icache overlay manager entry sym.
3535 (BRA_STUBS, BRA, BRASL): Define.
3536 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
3537 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
3539 (count_stub, build_stub): Support soft-icache.
3540 (build_spuear_stubs, process_stubs): Adjust build_stub call.
3541 (spu_elf_size_stubs): Size soft-icache stubs.
3542 (overlay_index): New function.
3543 (spu_elf_build_stubs): Make static. Support soft-icache.
3544 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
3545 (find_function_stack_adjust): Save lr store and stack adjust insn
3547 (maybe_insert_function): Adjust find_function_stack_adjust call.
3548 (mark_functions_via_relocs): Retrieve priority.
3549 (remove_cycles): Only warn about pruned arcs when stack_analysis.
3550 (sort_calls): Sort by priority first.
3551 (mark_overlay_section): Ignore .ovl.init.
3552 (sum_stack): Only print when stack_analysis.
3553 (print_one_overlay_section): New function, extracted from..
3554 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
3555 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
3556 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
3557 analysis. Call spu_elf_build_stubs.
3558 (spu_elf_relocate_section): For soft-icache encode overlay index
3560 (spu_elf_output_symbol_hook): Support soft-icache.
3561 (spu_elf_modify_program_headers: Likewise.
3563 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
3564 num_regions to num_lines. Add line_size and max_branch.
3565 (enum _ovly_flavour): Add ovly_soft_icache.
3566 (spu_elf_build_stubs): Delete.
3568 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3570 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
3571 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
3573 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
3575 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3576 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
3577 the program, the known offset starts at the negative size of the
3579 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
3582 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
3584 * config.bfd: Add lm32-*-rtems*.
3586 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
3588 * coff-ppc.c: Add 2009 to Copyright.
3589 * elf32-cris.c: Likewise.
3590 * elflink.c: Likewise.
3592 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
3594 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
3595 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
3597 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3600 * elflink.c (elf_merge_st_other): New.
3601 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
3602 hide them if needed.
3603 (elf_link_add_object_symbols): Updated.
3605 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3608 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
3609 ref_dynamic and dynamic_def fields when setting def_regular
3612 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
3615 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
3618 For older changes see ChangeLog-2008
3624 version-control: never