1 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
4 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
5 (elf_i386_reloc_type_lookup): Likewise.
7 (R_386_irelative): New.
8 (R_386_vt_offset): Updated.
9 (elf_i386_rtype_to_howto): Likewise.
10 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
11 (elf_i386_link_hash_table_create): Initialize igotplt,
13 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
14 (elf_i386_adjust_dynamic_symbol): Likewise.
15 (elf_i386_allocate_dynrelocs): Likewise.
16 (elf_i386_relocate_section): Likewise.
17 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
19 (elf_i386_finish_dynamic_symbol): When building a static
20 executable, use .iplt, .igot.plt and .rel.iplt sections for
21 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
22 locally defined STT_GNU_IFUNC symbol.
24 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
25 (x86_64_reloc_map): Likewise.
26 (R_X86_64_standard): Updated.
27 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
28 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
30 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
31 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
32 (elf64_x86_64_allocate_dynrelocs): Likewise.
33 (elf64_x86_64_relocate_section): Likewise.
34 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
36 (elf64_x86_64_finish_dynamic_symbol): When building a static
37 executable, use .iplt, .igot.plt and .rela.iplt sections for
38 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
39 for locally defined STT_GNU_IFUNC symbol.
41 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
42 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
44 * bfd-in2.h: Regenerated.
47 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
49 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
50 (_bfd_elf_make_ifunc_reloc_section): Removed.
51 (_bfd_elf_is_ifunc_symbol): Likewise.
52 (_bfd_elf_create_static_ifunc_sections): New.
54 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
56 (elf_link_add_object_symbols): Here.
57 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
59 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
60 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
61 (IFUNC_INFIX): Removed.
62 (get_ifunc_reloc_section_name): Likewise.
63 (_bfd_elf_make_ifunc_reloc_section): Likewise.
64 (_bfd_elf_is_ifunc_symbol): Likewise.
65 (_bfd_elf_create_static_ifunc_sections): New.
67 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
69 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
70 (create_got_section): Likewise.
71 (allocate_dynrelocs): Likewise.
72 (readonly_dynrelocs): Likewise.
73 (set_tls_module_base): Likewise.
74 (dtpoff_base): Likewise.
76 (elf_i386_link_hash_table_create): Updated.
77 (elf_i386_create_dynamic_sections): Likewise.
78 (elf_i386_check_relocs): Likewise.
79 (elf_i386_size_dynamic_sections): Likewise.
80 (elf_i386_relocate_section): Likewise.
82 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
83 (create_got_section): Likewise.
84 (allocate_dynrelocs): Likewise.
85 (readonly_dynrelocs): Likewise.
86 (set_tls_module_base): Likewise.
87 (dtpoff_base): Likewise.
89 (elf64_x86_64_link_hash_table_create): Updated.
90 (elf64_x86_64_create_dynamic_sections): Likewise.
91 (elf64_x86_64_check_relocs): Likewise.
92 (elf64_x86_64_size_dynamic_sections): Likewise.
93 (elf64_x86_64_relocate_section): Likewise.
95 2009-05-28 Nick Clifton <nickc@redhat.com>
97 * targets.c (_bfd_target_vector): Only include plugin target in
98 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
100 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
102 * elf32-spu.c (struct call_info): New member broken_cycle.
103 (remove_cycle): Instead of physically removing call_info structures
104 to break call graph cycles, mark them using the broken_cycle flag.
105 (mark_overlay_section): Respect broken_cycle flag.
106 (unmark_overlay_section): Likewise.
107 (collect_lib_sections): Likewise.
108 (collect_overlays): Likewise.
109 (sum_stack): Likewise.
111 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
113 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
114 (mark_functions_via_relocs): Initialize callee->count to 1.
115 (pasted_function): Likewise.
116 (spu_elf_auto_overlay): Honor call counts when determining number
117 of stubs required in software i-cache mode.
119 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
121 * plugin.c (program_name): Remove.
122 (plugin_program_name): New.
123 (bfd_plugin_set_program_name): New.
124 (try_load_plugin): Use plugin_program_name.
125 * plugin.h (bfd_plugin_set_program_name): New.
127 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
129 * aclocal.m4: Include ../config/plugins.m4.
130 * configure.in: Use AC_PLUGINS.
131 * configure: Regenerate.
132 * Makefile.in: Regenerate.
133 * doc/Makefile.in: Regenerate.
135 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
137 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
139 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
140 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
141 * elf32-avr.c (elf32_avr_relax_section): Likewise.
142 * elf32-frv.c (elf32_avr_relax_section): Likewise.
143 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
144 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
145 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
146 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
147 * reloc.c (bfd_generic_relax_section): Likewise.
148 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
149 * vms.c (vms_bfd_relax_section): Likewise.
151 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
153 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
155 * elf32-i386.c (is_indirect_symbol): Renamed to ...
156 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
158 * elf32-i386.c (allocate_dynrelocs): Updated.
159 (elf_i386_relocate_section): Likewise.
160 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
161 (elf64_x86_64_relocate_section): Likewise.
163 * elf64-x86-64.c (is_indirect_symbol): Removed.
165 2009-05-26 Nick Clifton <nickc@redhat.com>
167 * po/id.po: Updated Indonesian translation.
169 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
171 * Makefile.am: Run "make dep-am".
174 (ALL_MACHINES): Add cpu-plugin.lo.
175 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
176 (BFD32_BACKENDS): Add plugin.lo.
177 (BFD32_BACKENDS_CFILES): Add plugin.c.
178 (libbfd_la_LIBADD): Add LIBDL
179 * archures.c (bfd_architecture): Add bfd_arch_plugin.
180 (bfd_plugin_arch): Declare.
181 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
182 * bfd.c (bfd): Add plugin_data.
183 * config.bfd: Handle the plugin target.
184 * configure.in: Check for --enable-plugins.
185 (LT_INIT): Use the dlopen option.
189 * targets.c (plugin_vec): Declare.
190 (_bfd_target_vector): Add plugin_vec.
191 * Makefile.in: Regenerate.
192 * bfd-in2.h: Regenerate.
193 * configure: Regenerate.
195 2009-05-26 Alan Modra <amodra@bigpond.net.au>
197 * dep-in.sed: Don't modify .o to .lo here. Output one filename
198 per line with all lines having continuation backslash. Prefix
199 first line with "A", following lines with "B".
200 * Makefile.am (DEP): Don't use dep.sed here.
201 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
202 dep.sed here on dependencies, sort and uniq.
203 * Makefile.in: Regenerate.
205 2009-05-25 Tristan Gingold <gingold@adacore.com>
207 * makefile.vms: Add verilog.obj to object list OBJS.
209 2009-05-24 Alan Modra <amodra@bigpond.net.au>
211 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
212 for BFD_IN_MEMORY is cleared.
213 (bfd_bwrite): Zero excess memory allocated.
215 2009-05-22 Julian Brown <julian@codesourcery.com>
217 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
219 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
220 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
221 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
222 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
223 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
224 (a8_erratum_fix, a8_erratum_reloc): New structs.
225 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
226 num_a8_erratum_fixes, fix_cortex_a8 fields.
227 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
228 (elf32_arm_add_stub): Split into two parts, creating...
229 (elf32_arm_create_or_find_stub_sec): New function.
230 (elf32_arm_final_link_relocate): Add forward declaration.
231 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
232 relocations, multiple relocations per stub.
233 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
234 (arm_size_one_stub): Use find_stub_size_and_template.
235 (a8_reloc_compare): New.
236 (find_thumb_glue): Add forward declaration.
237 (cortex_a8_erratum_scan): New.
238 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
239 (bfd_elf32_arm_set_cortex_a8_fix): New.
240 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
241 (arm_map_one_stub): Add THUMB32_TYPE support.
242 (a8_branch_to_stub_data): New.
243 (make_branch_to_a8_stub): New.
244 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
245 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
246 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
247 Cortex-A8 erratum workaround.
248 * bfd-in2.h: Regenerate.
250 2009-05-22 Alan Modra <amodra@bigpond.net.au>
252 * Makefile.am: Run "make dep-am".
253 * Makefile.in: Regenerate.
254 * po/SRC-POTFILES.in: Regenerate.
256 2009-05-21 Alan Modra <amodra@bigpond.net.au>
258 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
261 2009-05-21 Alan Modra <amodra@bigpond.net.au>
263 * elf-bfd.h (struct elf_backend_data
264 <elf_backend_link_output_symbol_hook>): Return an int.
265 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
266 symbols on deleted .opd entries.
267 * elflink.c (elf_link_output_sym): Return without outputting sym
268 if output_symbol_hook returns 2.
269 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
270 Abort if we must not discard sym.
271 (elf_link_input_bfd): Similarly, don't set finfo->indices for
273 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
274 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
275 elf_backend_link_output_symbol_hook return type change.
276 * elf32-arm.c (output_arch_syminfo): Likewise.
277 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
278 (elf32_arm_output_arch_local_syms): Likewise.
279 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
280 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
281 (bfd_score_elf_link_output_symbol_hook): Likewise.
282 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
283 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
284 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
285 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
286 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
287 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
288 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
289 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
290 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
291 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
292 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
294 2009-05-21 Alan Modra <amodra@bigpond.net.au>
296 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
297 out of range .opd symbols.
299 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
301 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
302 fprintf_vma directly.
303 * peXXigen.c (pe_print_edata): Likewise.
304 (pe_print_pdata): Likewise.
305 (_bfd_XX_print_ce_compressed_pdata): Likewise.
306 (_bfd_XX_print_private_bfd_data_common): Likewise.
308 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
310 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
312 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
313 Paul Brook <paul@codesourcery.com>
315 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
316 fix discarded sections.
318 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
320 * elf32-spu.c (mark_overlay_section): Move .init and .fini
321 sections into the software icache.
323 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
325 * elf32-spu.c (build_stub): Always build "compact" sofware
328 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
330 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
331 (spu_elf_setup): Initialize it.
332 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
333 Update to new-sytle cache manager data structures.
334 (spu_elf_build_stubs): Generate new-style cache manager data
335 structures and symbols.
336 (spu_elf_auto_overlay): Update size computation.
338 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
340 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
341 segments first amongst the program headers.
343 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
345 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
346 into addresses for relocation types that look at high bits. Remove
347 special handling of relocation overflow warnings.
349 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
351 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
352 control flow graph between fragments of a function.
354 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
356 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
357 generate only a 16-byte .toe section.
358 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
360 2009-05-14 Alan Modra <amodra@bigpond.net.au>
362 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
363 (spu_elf_place_overlay_data): ..here. New function.
364 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
366 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
368 * elf32-arm.c: Move sysdep.h to start of file.
370 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
372 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
374 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
375 __icache_tag_array and __icache_tag_array_size.
377 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
379 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
381 (bfinfdpic_link_omit_section_dynsym): Likewise.
382 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
384 2009-05-05 Paul Brook <paul@codesourcery.com>
386 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
387 * bfd-in2.h: Regenerate.
388 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
389 (_arm_elf_section_data): Add text and exidx fields.
390 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
391 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
392 copy_exidx_entry): New functions.
393 (elf32_arm_write_section): Fixup .ARM.exidx contents.
395 2009-05-05 Christophe lyon <christophe.lyon@st.com>
397 * elf32-arm.c (DEF_STUBS): New helper define.
398 (DEF_STUB): Likewise.
399 (stub_def): New type.
400 (stub_definitions): New array, containing stub template pointers
402 (arm_size_one_stub): Make use of stub_definitions.
404 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
406 * elflink.c (find_version_for_sym): Remove from here, ...
407 * linker.c (bfd_find_version_for_sym): ... rename, replace
408 here, make public and update all callers.
409 * bfd-in2.h: Regenerate.
411 2009-04-30 Nick Clifton <nickc@redhat.com>
413 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
415 (struct elf_obj_data): Add has_ifunc_symbols boolean.
416 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
417 into a STT_GNU_IFUNC symbol type.
418 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
420 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
421 the binary contains ifunc symbols.
422 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
423 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
424 * elf32-i386.c (is_indirect_function): New function.
425 (elf_i386_check_relocs): Create an ifunc output section.
426 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
427 section if necessary.
428 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
430 (elf_i386_add_symbol_hook): New function. Set the
431 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
432 symbol is encountered.
433 (elf_backend_post_process_headers): Define.
434 (elf_backend_add_symbol_hook): Define.
435 (elf_i386_post_process_headers): Rename to
436 elf_i388_fbsd_post_process_headers.
437 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
438 (is_indirect_function): New function.
439 (elf64_x86_64_check_relocs): Create an ifunc output section.
440 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
441 section if necessary.
442 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
444 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
445 elf_obj_data structure if an ifunc symbol is encountered.
446 (elf_backend_post_process_headers): Define.
447 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
448 if we have ifunc symbols to handle.
449 (get_ifunc_reloc_section_name): New function. Computes the name
450 for an ifunc section.
451 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
452 section to hold ifunc relocs.
453 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
454 (bfd_print_symbol_vandf): Handle ifunc symbols.
455 (bfd_decode_symclass): Likewise.
456 * bfd-in2.h: Regenerate.
458 2009-04-30 Joseph Myers <joseph@codesourcery.com>
460 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
461 MOVW and MOVT relocations in a shared library link.
463 2009-04-27 Anthony Green <green@moxielogic.com>
465 * verilog.c: New file.
466 * Makefile.am (BFD32_LIBS): Add verilog.c.
467 (BFD32_LIBS_CFILES): Add verilog.c.
468 (verilog.lo): New build rule.
469 * Makefile.in: Rebuilt.
470 * targets.c: Add verilog support.
471 * bfd.c (tdata union): Add Verilog private data field.
472 * bfd-in2.h: Regenerate.
474 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
476 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
479 2009-04-23 Matthias Klose <doko@ubuntu.com>
481 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
483 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
486 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
487 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
488 (elf32_arm_size_stubs): Likewise.
489 (record_thumb_to_arm_glue): Deleted unused function.
490 (bfd_elf32_arm_process_before_allocation): No longer handle
491 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
492 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
493 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
495 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
497 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
498 (elf32_arm_write_section): Declare early.
499 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
500 (arm_allocate_glue_section_space): Exclude empty sections.
501 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
502 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
504 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
505 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
506 (elf32_arm_size_dynamic_sections): Allocate interworking
508 (bfd_elf32_bfd_final_link): Define.
510 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
512 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
514 * coffcode.h (coff_compute_section_file_positions): Clear
515 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
517 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
518 force_minimum_alignment.
520 * libcoff.h: Regenerated.
522 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
523 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
525 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
526 nor target_subsystem.
528 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
529 force_minimum_alignment nor target_subsystem.
531 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
533 * coff-x86_64.c (PEI_HEADERS): Protect includes.
534 (bfd_pe_print_pdata): Remove #ifdef PE variation.
535 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
536 include in coff-x86_64.c of headers.
537 (PDATA_ROW_SIZE): New define.
538 (pex_regs[]): New static array.
539 (pex64_get_runtime_function): New static function.
540 (pex64_get_unwind_info): Likewise.
541 (pex64_get_scope_entry): Likewise.
542 (pex64_xdata_print_uwd_codes): Likewise.
543 (pex64_get_section_by_rva): Likewise.
544 (pex64_dump_xdata): Likewise.
545 (pex64_bfd_print_pdata): Likewise.
546 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
547 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
548 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
550 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
551 Alan Modra <amodra@bigpond.net.au>
552 Dave Korn <dave.korn.cygwin@gmail.com>
554 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
555 long names and non-NUL-terminated strings.
557 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
559 * bfd-in2.h: Regenerated.
561 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
563 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
564 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
566 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
569 * coffcode.h (bfd_pei_p): New.
571 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
572 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
573 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
574 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
575 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
576 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
578 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
579 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
580 bfd_efi_rtdrv_x86_64_vec,
581 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
582 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
583 * targets.c: Likewise.
585 * configure: Regenerated.
586 * libcoff.h: Likewise.
587 * Makefile.in: Likewise.
589 * efi-app-ia32.c: Removed.
590 * efi-app-x86_64.c: Likewise.
591 * efi-bsdrv-ia32.c: Likewise.
592 * efi-bsdrv-ia64.c: Likewise.
593 * efi-bsdrv-x86_64.c: Likewise.
594 * efi-rtdrv-ia32.c: Likewise.
595 * efi-rtdrv-ia64.c: Likewise.
596 * efi-rtdrv-x86_64.c: Likewise.
597 * efi-rtdrv-ia32.c: Likewise.
599 * efi-app-ia64.c: Moved to ...
601 (TARGET_SYM): Set to bfd_pei_ia64_vec.
602 (TARGET_NAME): Set to pei-ia64.
604 * libpei.h (bfd_target_pei_p): Removed.
605 (bfd_target_pei_arch): Likewise.
606 (bfd_target_efi_app_p): Likewise.
607 (bfd_target_efi_app_arch): Likewise.
608 (bfd_target_efi_bsdrv_p): Likewise.
609 (bfd_target_efi_bsdrv_arch): Likewise.
610 (bfd_target_efi_rtdrv_p): Likewise.
611 (bfd_target_efi_rtdrv_arch): Likewise.
612 (bfd_pe_executable_p): Likewise.
614 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
615 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
616 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
617 and efi-rtdrv-ia32.c.
618 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
619 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
620 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
621 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
622 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
623 efi-rtdrv-x86_64.c. Add pei-ia64.c.
624 (efi-app-ia64.lo): Removed.
625 (efi-bsdrv-ia32.lo): Likewise.
626 (efi-rtdrv-ia32.lo): Likewise.
627 (efi-app-ia64.lo): Likewise.
628 (efi-bsdrv-ia64.lo): Likewise.
629 (efi-rtdrv-ia64.lo): Likewise.
630 (efi-app-x86_64.lo): Likewise.
631 (efi-bsdrv-x86_64.lo): Likewise.
632 (efi-rtdrv-x86_64.lo): Likewise.
635 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
637 (arch_type): Removed.
639 (pe_bfd_object_p): Just return coff_object_p.
641 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
642 bfd_pe_executable_p with bfd_pei_p.
644 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
646 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
647 PLT entries to an undefined symbol when generating a shared
650 2009-04-17 Nick Clifton <nickc@redhat.com>
653 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
655 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
657 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
658 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
659 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
660 * binary.c (binary_bfd_define_common_symbol): Likewise.
661 * bout.c (b_out_bfd_define_common_symbol): Likewise.
662 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
663 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
664 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
665 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
666 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
667 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
668 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
669 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
670 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
671 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
672 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
673 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
674 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
675 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
676 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
677 * som.c (som_bfd_define_common_symbol): Likewise.
678 * srec.c (srec_bfd_define_common_symbol): Likewise.
679 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
680 * versados.c (versados_bfd_define_common_symbol): Likewise.
681 * vms.c (vms_bfd_define_common_symbol): Likewise.
682 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
683 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
684 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
685 (pmac_xcoff_vec): Likewise.
686 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
687 (aix5coff64_vec): Likewise.
688 * linker.c (bfd_generic_define_common_symbol): New function.
689 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
690 (_bfd_define_common_symbol): New field.
691 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
692 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
693 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
695 * bfd-in2.h: Regenerate.
696 * libbfd.h: Likewise.
697 * libcoff.h: Likewise.
699 2009-04-15 Anthony Green <green@moxielogic.com>
701 * targets.c: Add moxie support.
702 * Makefile.am: Ditto.
703 * Makefile.in: Rebuilt.
704 * cpu-moxie.c, elf32-moxie.c: New files.
705 * archures.c: Add moxie support.
706 * configure.in: Add moxie support.
707 * configure: Rebuilt.
708 * config.bfd, archures.c: Add moxie support.
709 * bfd-in2.h: Rebuilt.
711 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
713 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
714 branch to an undef weak symbol into a jump to next instruction if
715 a PLT entry will be created.
717 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
719 * coffgen.c (make_a_section_from_file): Set the backend long
720 section names enable if long section names found on input.
721 * coffcode.h: Extend long section names documentation to match.
723 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
725 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
728 2009-04-07 DJ Delorie <dj@redhat.com>
730 * archures.c: Add bfd_mach_mep_c5.
731 * bfd-in2.h: Likewise.
732 * cpu-mep.c: Add bfd_c5_arch.
733 * elf32-mep.c: Support it.
735 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
737 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
738 info->callbacks->einfo.
739 * linker.c (_bfd_generic_section_already_linked): Likewise.
741 2009-04-06 DJ Delorie <dj@redhat.com>
743 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
745 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
747 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
748 _bfd_pex64_print_pdata only if PE is defined.
750 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
751 (_bfd_pex64_print_pdata): This.
753 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
754 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
757 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
759 * coff-x86_64.c (bfd_pe_print_pdata): Define as
760 _bfd_pep_print_x64_pdata.
761 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
762 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
764 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
766 * elf32-xtensa.c (relax_property_section): Always set r_offset
769 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
771 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
772 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
774 (elf32_arm_stub_type): New enum values for the two new stubs.
775 (arm_type_of_stub): Make use of the two new stubs.
776 (arm_size_one_stub): Handle the two new stubs.
778 2009-04-01 Matt Thomas <matt@netbsd.org>
780 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
781 hidden symbols into the GOT or PLT.GOT.
782 (elf_vax_relocate_section): Do not emit a PCREL reloc
783 into a shared object if it is against a hidden symbol.
785 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
787 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
788 and know_contains_shared_object_p.
789 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
790 Cache the result in the archive_info table.
791 (xcoff_auto_export_p): Add an "info" parameter and update the
792 call to xcoff_archive_contains_shared_object_p.
793 (xcoff_mark_auto_exports): Update accordingly.
794 (xcoff_post_gc_symbol): Likewise.
796 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
798 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
801 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
803 * coff-rs6000.c (member_layout): New structure.
804 (archive_iterator): Likewise.
805 (member_layout_init): New function.
806 (archive_iterator_begin): Likewise.
807 (archive_iterator_next): Likewise.
808 (xcoff_write_armap_old): Use the new iterator functions.
809 (do_shared_object_padding): Delete.
810 (xcoff_write_armap_big): Use the new iterator functions. Simplify
811 handling of arch_info.
812 (xcoff_write_archive_contents_old): Allocate arelt_data in the
813 first loop rather than the second. Allocate a member header if
814 there isn't one, then work out the stat information and length
815 in the first loop too. Use the new iterators for the second loop.
816 (xcoff_write_archive_contents_big): Likewise.
818 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
820 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
821 (bfd_xcoff_set_archive_import_path): Likewise.
822 * bfd-in2.h: Regenerate.
823 * xcofflink.c: Include libiberty.h.
824 (xcoff_archive_info): New structure.
825 (xcoff_archive_info_hash): New function.
826 (xcoff_archive_info_eq): Likewise.
827 (xcoff_get_archive_info): Likewise.
828 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
829 (bfd_xcoff_split_import_path): New function.
830 (bfd_xcoff_set_archive_import_path): Likewise.
831 (xcoff_set_import_path): Move earlier in file.
832 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
833 object to the the directory part of the bfd's filename. Get the
834 import path and filename of an archive object from the archive's
835 xcoff_tdata, initializing it if necessary. Update use of
837 (bfd_link_input_bfd): Update use of import_file_id.
838 (xcoff_write_global_symbol): Likewise.
840 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
842 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
844 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
846 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
847 a .loader section for relocatable links.
848 (xcoff_need_ldrel_p): New function.
849 (xcoff_mark): Use it.
850 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
852 (xcoff_build_ldsym): New function, split out from...
853 (xcoff_build_ldsyms): ...here. Rename to...
854 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
855 call xcoff_build_ldsym, if there's a loader section.
856 (xcoff_build_loader_section): New function, extracted verbatim from...
857 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
858 there's a loader section. Only add an __rtinit loader symbol
859 if there's a loader section. Update after above name change.
860 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
861 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
862 and xcoff_create_ldrel.
863 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
864 (xcoff_reloc_link_order): Likewise, but only call it if there's
865 a loader section. Use xcoff_symbol_section.
866 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
867 if there's a loader section.
869 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
871 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
873 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
875 * elf32-arm.c (group_sections): Rewrite loops for better
878 2009-03-30 DJ Delorie <dj@redhat.com>
880 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
881 relocs when doing a relocatable link.
883 2009-03-28 Mark Mitchell <mark@codesourcery.com>
885 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
886 "ERROR:", in error messages.
887 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
888 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
889 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
890 (elf32_arm_merge_eabi_attributes): Likewise.
891 (elf32_arm_merge_private_bfd_data): Likewise.
893 2009-03-27 Nick Clifton <nickc@redhat.com>
895 * section.c (bfd_get_section_contents): Detect and handle the case
896 where a section has the SEC_IN_MEMORY flag set but no actual
899 2009-03-26 Alan Modra <amodra@bigpond.net.au>
902 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
903 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
904 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
905 if we don't find matching PT_LOAD when copying.
907 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
909 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
910 the reloc descriptions.
912 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
914 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
915 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
916 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
918 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
920 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
921 (bfd_i386_arch_intel_syntax): Likewise.
922 (i8086_arch): Likewise.
923 (bfd_x86_64_arch): Likewise.
925 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
927 * elf32-cris.c (cris_elf_relocate_section): <case
928 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
929 symbols for non-allocated sections. Don't check whether to
930 generate R_CRIS_DTPMOD for non-allocated sections.
931 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
932 handle relocation GC:ing if applied to non-allocated section.
933 (cris_elf_check_relocs): Similar.
935 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
936 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
937 when emitting a known TP offset in the GOT.
939 2009-03-23 Alan Modra <amodra@bigpond.net.au>
941 * elf64-ppc.c (synthetic_opd): Delete.
942 (compare_symbols): Look for .opd name rather than section match.
943 (ppc64_elf_get_synthetic_symtab): Likewise.
945 2009-03-21 Alan Modra <amodra@bigpond.net.au>
947 * elf32-ppc.c (is_pic_glink_stub): Delete.
948 (is_nonpic_glink_stub): New function.
949 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
951 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
953 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
954 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
956 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
957 macros for visibilty and locality checks.
958 (elf_s390_adjust_dynamic_symbol): Likewise.
959 (allocate_dynrelocs): Likewise.
960 (elf_s390_relocate_section): Likewise.
961 (elf_s390_finish_dynamic_symbol): Likewise.
962 * elf64-s390.c (elf_s390_check_relocs): Likewise.
963 (elf_s390_adjust_dynamic_symbol): Likewise.
964 (allocate_dynrelocs): Likewise.
965 (elf_s390_relocate_section): Likewise.
966 (elf_s390_finish_dynamic_symbol): Likewise.
968 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
970 * bfd-in2.h: Regenerated.
971 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
972 for debugging sections and map memory read/write dependent on
974 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
975 without memory read flags set.
976 * section.c: Add SEC_COFF_NOREAD to section flags.
978 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
980 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
983 2009-03-19 Alan Modra <amodra@bigpond.net.au>
985 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
986 "no overlays" return. If there are overlays, create overlay
987 manager entry symbols here, so that..
988 (spu_elf_build_stubs): ..we don't need to set them up here.
989 Simplify entry symbol tests.
990 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
992 2009-03-18 Mark Kettenis <kettenis@gnu.org>
994 * elf.c (elfcore_grok_openbsd_procinfo)
995 (elfcore_grok_openbsd_note): New functions.
996 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
998 2009-03-18 Alan Modra <amodra@bigpond.net.au>
1000 * vms-hdr.c: Don't include alloca.h.
1001 * elf32-m68hc1x.c: Include alloca-conf.h.
1003 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
1005 * Makefile.am: Run "make dep-am".
1006 * Makefile.in: Regenerate.
1008 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
1010 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
1012 2009-03-17 Alan Modra <amodra@bigpond.net.au>
1014 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
1016 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
1017 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
1018 ovly_return fields with ovly_entry[2]. Adjust all users.
1019 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
1021 (spu_elf_build_stubs): Likewise.
1022 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
1023 ovly_flavour changes. Update all callers.
1024 (ovl_stub_size_log2): New function.
1025 (build_stub): Handle compact icache stubs. Use different manager
1026 entry point for stubs in non-icache area.
1027 (spu_elf_size_stubs): Don't allocate space for indirect branch
1029 (spu_elf_build_stubs): And don't built them.
1031 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
1033 * dwarf2.c (read_section): Always use rawsize, if available.
1035 2009-03-16 Alan Modra <amodra@bigpond.net.au>
1037 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
1038 of rawsize and size for buffer.
1040 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1042 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
1043 parameter just because fixed sections fit into local store.
1044 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
1045 generating overlays if fixed sections plus reserved stack
1046 and heap space fit into local store.
1048 2009-03-15 Alan Modra <amodra@bigpond.net.au>
1050 * elf32-spu.c (build_stub): Correct icache set_id.
1051 (spu_elf_relocate_section): Likewise.
1053 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1055 * xcofflink.c (xcoff_link_check_archive_element): Only free the
1056 symbol table if it was created by the current call.
1058 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1060 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
1061 class XMC_DS rather than XMC_UA.
1063 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1065 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
1066 bfd_boolean export_defineds parameter with an unsigned int
1067 auto_export_flags parameter.
1068 * bfd-in2.h: Regenerate.
1069 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
1070 split out from xcoff_build_ldsyms.
1071 (xcoff_covered_by_expall_p): New function.
1072 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
1073 but with extra code to handle -bexpfull and -bexpall.
1074 (xcoff_mark_auto_exports): New function.
1075 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
1076 a function should be automatically exported.
1077 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
1078 parameter with an auto_export_flags parameter. Update ldinfo
1079 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
1082 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1084 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
1085 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
1086 init and fini functions. Do garbage collection for objects
1087 without an entry point too.
1089 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1091 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
1092 check whether a symbol has csect information.
1093 (coff_print_aux): Likewise.
1094 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
1095 information for C_AIX_WEAKEXT too.
1096 (_bfd_xcoff_swap_aux_out): Likewise.
1097 (xcoff_reloc_type_br): Handle defweak symbols too.
1098 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
1099 information for C_AIX_WEAKEXT too.
1100 (_bfd_xcoff64_swap_aux_out): Likewise.
1101 (xcoff64_reloc_type_br): Handle defweak symbols too.
1102 * coffgen.c (coff_print_symbol): Handle auxillary function
1103 information for C_AIX_WEAKEXT too.
1104 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
1105 instead of BSF_GLOBAL if the L_WEAK flag is set.
1106 (xcoff_dynamic_definition_p): New function.
1107 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
1108 defines h. Don't change h if ldsym isn't the definition. Otherwise,
1109 always take the symbol class from the ldsym. Use weak bfd symbol
1110 types for weak ldsyms.
1111 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
1112 Fix the check for whether a definition is from a shared object.
1113 Allow redefinitions of weak symbols.
1114 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
1115 (xcoff_keep_symbol_p): Likewise.
1116 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
1117 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
1118 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
1119 but mark them as L_WEAK.
1120 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
1121 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
1123 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1125 * xcofflink.c (xcoff_mark): When walking the relocations,
1126 only mark the target symbol or the target section, not both.
1127 (xcoff_final_definition_p): New function.
1128 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
1129 symbol is a valid definition of the associated output symbol.
1130 Use XCOFF_ALLOCATED to stop the same hash table entry having
1132 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
1134 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
1136 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1138 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
1141 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1143 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
1144 * libcoff.h: Regenerate.
1145 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
1146 line-number counts in the bfd's lineno_counts field.
1147 Don't keep per-csect line-number counts.
1148 (xcoff_sweep): Don't update per-csect line-number counts.
1149 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
1150 entries in each output section.
1151 (xcoff_link_input_bfd): Get the number of line numbers from
1152 the bfd's lineno_counts field, rather than recalculating it
1153 from scratch. Fix the range check when updating C_BINCL and
1155 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
1156 here. Don't expect csects to have line-number counts.
1158 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1160 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
1161 * libcoff.h: Regenerate.
1162 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
1163 "skip" logic from xcoff_link_input_bfd.
1164 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
1165 objects in a dynamic link, rather than checking whether csectpp
1166 is null. Always allocate debug_index for other objects,
1167 and always go through the loop. Update the type of debug_index
1168 after the change above. Read the auxillary csect information
1169 and use xcoff_keep_symbol_p to decide whether a symbol should
1170 be kept. Set its debug_index to -2 if not.
1171 (xcoff_link_input_bfd): Update the type of debug_index after
1172 the change above and always expect it to be nonnull. Use it to
1173 test whether a symbol should be stripped, rather than making the
1174 decision here. Postpone all symbol creation to the second pass.
1176 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1178 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
1179 creating a descriptor.
1180 (xcoff_sweep): Don't mark toc_section unless it's needed.
1181 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
1182 when marking every bfd.
1183 (xcoff_link_input_bfd): Skip all TOC anchors.
1184 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
1185 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
1186 to -1; call xcoff_find_tc0 instead.
1188 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1190 * libcoff-in.h (xcoff_section_tdata): Update commentary.
1191 * libcoff.h: Regenerate.
1192 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
1193 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
1194 the previous symbol's csect. Treat last_symndx as an inclusive value
1195 and simplify its handling.
1196 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
1197 symbols with the right csect. Don't mark rsec when processing
1198 relocations against undefined or absolute sections.
1199 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
1200 of bfd_und_section_ptr.
1201 (xcoff_link_input_bfd): Likewise.
1203 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1205 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
1206 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
1207 flag is set. Assert that all undefined symbols are either
1208 imported or defined by a dynamic object.
1209 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1210 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
1211 handling to all relocations. Only set XCOFF_CALLED for function
1213 (xcoff_find_function): New function, split out from...
1214 (bfd_xcoff_export_symbol) ...here.
1215 (xcoff_set_import_path): New function, split out from...
1216 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
1217 meaning of XCOFF_CALLED.
1218 (xcoff_mark_symbol): If we mark an undefined and unimported
1219 symbol, find some way of defining it. If the symbol is a function
1220 descriptor, fill in its definition automatically. If the symbol
1221 is a function, mark its descriptor and allocate room for global
1222 linkage code. Otherwise mark the symbol as implicitly imported.
1223 Move the code for creating function descriptors from...
1224 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
1225 check for symbols that were implicitly defined.
1226 (xcoff_mark): Don't count any dynamic relocations against
1228 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
1229 in the xcoff link info.
1230 (xcoff_link_input_bfd): Remove handling of undefined and
1233 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1235 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
1236 if the target is absolute. Fix comment typo.
1237 (xcoff_ppc_relocate_section): Remove FIXME.
1238 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
1239 if the target is absolute.
1241 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1243 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
1244 R_POS and R_NEG relocations against absolute symbols to the
1247 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1249 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
1250 to 2 for bfd_mach_ppc_620.
1252 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1254 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
1255 * configure.in: Likewise.
1256 * configure: Regenerate.
1258 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
1261 * elf.c (assign_section_numbers): Generate symbol table if there
1262 is any relocation in output.
1263 (_bfd_elf_compute_section_file_positions): Likewise.
1265 2009-03-13 Nick Clifton <nickc@redhat.com>
1268 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
1269 * elflink.c (elf_link_read_relocs_from_section): Use
1270 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
1271 relocs but no symbol table.
1272 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1274 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
1277 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
1278 to check ___tls_get_addr.
1280 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
1281 strncmp to check __tls_get_addr.
1283 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
1285 * dwarf2.c (read_section): Always check the offset, even when the
1286 section has been read before.
1288 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
1290 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
1293 2009-03-11 Chris Demetriou <cgd@google.com>
1295 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
1296 * bfd-in2.h: Regenerate.
1297 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
1298 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
1300 (bsd_write_armap): Likewise.
1301 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
1302 flag is set, do nothing.
1303 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
1306 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
1308 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
1309 used to update stack pointer.
1311 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1314 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
1315 for unknown symbols in absolute section.
1317 2009-03-06 Nick Clifton <nickc@redhat.com>
1319 * po/es.po: Updated Spanish translation.
1321 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1323 * elf32-arm.c (group_sections): Take next section size into
1324 account before accepting to group it.
1326 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1328 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1330 (elf32_arm_final_link_relocate): Likewise.
1332 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
1335 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1337 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1339 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1340 * section.c (struct bfd_section): Add has_tls_get_addr_call.
1341 (BFD_FAKE_SECTION): Init new flag.
1342 * ecoff.c (bfd_debug_section): Likewise.
1343 * bfd-in2.h: Regenerate.
1344 * libbfd.h: Regenerate.
1345 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1346 (ppc_elf_reloc_type_lookup): Handle new relocs.
1347 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1348 without marker relocs.
1349 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1350 if section has no old-style calls.
1351 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1352 Don't try to optimize new-style __tls_get_addr call when handling
1353 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1355 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1356 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1357 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1358 without marker relocs.
1359 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1360 if section has no old-style calls. Set toc_ref for new relocs as
1362 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1363 Don't try to optimize new-style __tls_get_addr call when handling
1364 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1367 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1370 * configure.in: Test for ld --as-needed support. Link shared
1371 libbfd against libm.
1372 * configure: Regenerate.
1374 2009-03-03 Alan Modra <amodra@bigpond.net.au>
1376 * Makefile.am: Run "make dep-am".
1377 * Makefile.in: Regenerate.
1379 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
1381 * elf32-score7.c: New file.
1382 * elf32-score.h: New file.
1383 * elf32-score.c: Add code to support score 7. Set score7 as the
1385 * cpu-score.c: Add score7 architecure.
1386 (compatibile): New function.
1387 * Makefile.am: Add rules for building elf32-score7 object.
1388 * Makefile.in: Regenerate.
1389 * configure.in: Add elf32-score7 object to score vectors.
1390 * configure: Regenerate.
1391 * reloc.c: Add score7 relocs.
1392 * archures.c: Add score3 and score7 machine numbers.
1393 * bfd-in2.h: Regenerate.
1394 * libbfd.h: Regenerate.
1396 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1398 * configure: Regenerate.
1400 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1402 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1403 (elf32_hppa_check_relocs): Use it.
1405 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1407 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1408 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1409 (elf_hppa_is_dynamic_loader_symbol): Likewise.
1410 (elf_hppa_record_segment_addrs): Likewise.
1411 (elf_hppa_final_link): Likewise.
1412 (elf_hppa_relocate_insn): Likewise.
1413 (elf_hppa_final_link_relocate): Likewise.
1414 (elf64_hppa_relocate_section): Likewise.
1415 * elf64-hppa.c: Insert above.
1417 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1419 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1420 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1421 (elf_hppa_relocate_section): Likewise.
1422 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1423 from struct elf_link_hash_entry. Add count field.
1424 (struct elf64_hppa_dyn_hash_table): Delete.
1425 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1426 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1427 (hppa_elf_hash_entry, eh_name): Define.
1428 (elf64_hppa_new_dyn_hash_entry): Delete.
1429 (elf64_hppa_dyn_hash_lookup): Delete.
1430 (elf64_hppa_dyn_hash_traverse): Delete.
1431 (get_dyn_name): Delete.
1432 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1433 of struct elf64_hppa_dyn_hash_entry *.
1434 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1435 allocate_global_data_plt, allocate_global_data_stub,
1436 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1438 (hppa64_link_hash_newfunc): New.
1439 (elf64_hppa_hash_table_create): Rework.
1440 (count_dyn_reloc): Likewise.
1441 (hppa64_elf_local_refcounts): New.
1442 (elf64_hppa_check_relocs): Rework using standard technique for recording
1443 local DLT, PLT and OPD reference counts.
1444 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
1445 elf_link_hash_entry *.
1446 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
1447 allocate_global_data_plt, allocate_global_data_stub,
1448 allocate_global_data_opd, allocate_dynrel_entries,
1449 elf64_hppa_adjust_dynamic_symbol,
1450 elf64_hppa_mark_milli_and_exported_functions): Likewise.
1451 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
1452 Use hppa_link_hash_table. Rework.
1453 (elf64_hppa_link_output_symbol_hook): Rework.
1454 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
1455 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
1456 elf64_hppa_finish_dynamic_sections): Likewise.
1458 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
1460 * elf32-arm.c (stub_reloc_type): Removed.
1461 (insn_sequence): Renamed reloc_type field to r_type.
1462 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
1463 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
1464 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
1465 (elf32_arm_stub_type): Add new enum entries for the new stubs.
1466 (arm_stub_is_thumb): Catch new stubs.
1467 (arm_type_of_stub): Handle new stubs.
1468 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
1469 (bfd_elf32_arm_process_before_allocation): Remove useless
1472 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
1474 * elf.c (elf_find_function): Use is_function_type to check
1477 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1479 * xtensa-modules.c: Revert to previous version 1.11 due
1480 to inadvertant commit.
1482 2009-02-24 Sterling Augustine <sterling@tensilica.com>
1484 * elf32-xtensa.c (text_action_add): Separate test for action
1485 type. Break if saved action is ta_widen_insn at same offset.
1487 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1489 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
1490 to elf32_arm_stub_long_branch_any_arm_pic.
1491 (elf32_arm_stub_long_branch_any_thumb_pic): New.
1492 (enum elf32_arm_stub_type, arm_type_of_stub)
1493 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
1496 2009-02-24 Joseph Myers <joseph@codesourcery.com>
1498 * elf32-arm.c (PREV_SEC): Update comment.
1499 (group_sections): Rename argument to stubs_always_after_branch.
1500 Reverse the list and place stubs at the end of input sections.
1502 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
1504 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
1506 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
1508 (arm_size_one_stub): Remove unnecessary break.
1509 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
1511 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1513 * elf32-arm.c (stub_insn_type): New type.
1514 (stub_reloc_type): Likewise.
1515 (insn_sequence): Likewise.
1516 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
1517 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
1518 (elf32_arm_stub_long_branch_thumb_only): Likewise.
1519 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1520 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
1521 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
1522 (elf32_arm_stub_hash_entry): Add new helper fields.
1523 (stub_hash_newfunc): Initialize these new fields.
1524 (arm_build_one_stub): Encode Arm and Thumb instructions separately
1525 to take endianness into account.
1526 (arm_size_one_stub): Compute size of stubs using insn_sequence.
1527 (arm_map_one_stub): Code is now more generic, thanks to
1530 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1532 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1534 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1535 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1536 BLX is not available. Fix typo in warning message. Add comments
1537 and improve formatting.
1538 (arm_build_one_stub): Adjust to new
1539 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1540 (arm_map_one_stub): Likewise.
1542 2009-02-23 Tristan Gingold <gingold@adacore.com>
1543 Eric Botcazou <ebotcazou@adacore.com>
1544 Douglas B Rupp <rupp@gnat.com>
1546 * vms.h: Update copyright year, fix comments, reorder declarations.
1547 (_bfd_save_vms_section): Remove the prototype.
1548 (EGPS_S_V_NO_SHIFT): New constant.
1549 (bfd_vms_set_section_flags): New prototype.
1550 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1552 (EGSY_S_W_FLAGS): Ditto.
1553 (EGSY_S_V_QUAD_VAL): Ditto.
1554 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1555 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1556 EGST_S_B_NAMLNG): Ditto.
1557 (ESRF_S_B_NAMLNG): Ditto.
1558 (ETIR_S_C_HEADER_SIZE): Ditto.
1559 (EGPS_S_V_ALLOC_64BIT): Ditto.
1560 (DST_S_C_EPILOG): Ditto.
1561 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1562 (DST_S_C_SRC_INCRLNUM_B): Ditto.
1563 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1564 (DST_S_L_PCLINE_UNSLONG): Ditto.
1565 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1566 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1567 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1568 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1569 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1570 (DST_S_B_SRC_UNSBYTE): Ditto.
1571 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1573 (vms_section, vms_reloc): Remove types.
1574 (hdr_struc): Replaced by ...
1575 (hdr_struct): ... new type.
1576 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1577 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1578 (EMH_DATE_LENGTH): Ditto.
1579 (eom_struc): Replaced by ...
1580 (eom_struct): ... new type.
1581 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1582 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1583 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1584 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1585 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1586 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1587 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1588 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1589 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1590 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1591 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1592 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1593 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1594 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1595 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1596 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1597 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1598 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1599 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1600 (enum file_type_enum): New type.
1601 (struct location_struct): Removed.
1602 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1603 (struct funcinfo, struct module): Ditto.
1604 (struct vms_private_data_struct): Update fields.
1605 (struct vms_section_data_struct): New type.
1607 * vms.c: Update copyright year, fix comments,
1608 Fix includes for DECC, add prototypes.
1609 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1611 Use flavour to set is_vax, location_stack is removed.
1612 (struct pair): Declare.
1613 (fill_section_ptr): Initialize variables at declaration.
1614 Add guard to set SECTION_SYM flag, handlde und section.
1615 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1616 (_bfd_vms_slurp_object_records): New function, replaces previous
1618 (vms_slurp_module): New function.
1619 (vms_slurp_image): Ditto.
1620 (vms_object_p): Complete rewrite.
1621 (vms_mkobject): Use is_vax field to slect architecture.
1622 (free_reloc_stream): New function.
1623 (vms_convert_to_var): Ditto.
1624 (vms_convert_to_var_1): Ditto.
1625 (vms_convert_to_var_unix_filename): Ditto.
1626 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1628 (vms_new_section_hook): Set alignment to 0, allocate private data.
1629 (vms_get_section_contents): Load content.
1630 (vms_get_symbol_info): Handle undefined section.
1631 (vms_find_nearest_line): Handle.
1632 (alloc_reloc_stream): New function.
1633 (vms_slurp_reloc_table): Ditto.
1634 (vms_get_reloc_upper_bound): Make it real.
1635 (vms_canonicalize_reloc): Do the real work.
1636 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1638 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1639 (vms_set_arch_mach): Check arch.
1640 (vms_set_section_contents): Copy the content after allocation.
1641 (vms_alpha_vec): Update object flags.
1643 * vms-tir.c: Update copyright year, fix comments,
1644 add prototypes for new functions.
1645 (dst_define_location): New function.
1646 (dst_restore_location): New function.
1647 (dst_retrieve_location): New function.
1648 (dst_check_allocation): New function.
1649 (image_dump): Call dst_check_allocation.
1650 (image_write_b): Ditto.
1651 (image_write_w): Ditto.
1652 (image_write_l): Ditto.
1653 (image_write_q): Ditto.
1654 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1655 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1657 Call error handler instead of abort if name is not known.
1658 (etir_sta): Add quarter_relocs argument and set it.
1661 (etir_opr): Ditto, return FALSE in case of error.
1662 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1663 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1664 (etir_stc): Add quarter_relocs argument and set it, fix cast.
1665 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1666 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1667 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1668 Return FALSE in case of error.
1669 (tir_sta): Change sign of psect.
1671 (tir_cmd): Fix cast. Makes tir_table static const.
1672 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1673 add argument to explain.
1674 (analyze_etir): Initialize maxptr, add quarter_relocs
1675 declaration, move some declarations into inner scopes.
1676 Handle quarter_relocs and STO_IMM.
1677 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1678 (_bfd_vms_slurp_relocs): New function.
1679 (_bfd_vms_decode_relocs): New function.
1680 (sto_imm): Rewritten.
1681 (start_first_etbt_record): New function.
1682 (start_another_etbt_record): Ditto.
1683 (etir_output_check): Ditto.
1684 (defer_reloc_p): Ditto.
1685 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1686 a for-loop. Correctly deals with contents, deals with .vmsdebug,
1687 rewritte relocations handling.
1688 (_bfd_vms_write_tbt): Removed.
1689 (_bfd_vms_write_dbg): Ditto.
1691 * vms-misc.c: Update copyright year, Fix comments.
1692 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1693 (maybe_adjust_record_pointer_for_object): New function.
1694 (_bfd_vms_get_first_record): New function, replaces ...
1695 (_bfd_vms_get_record): .. removed.
1696 (_bfd_vms_get_object_record): New function.
1697 (_bfd_vms_get_object_record): New function.
1698 (vms_get_remaining_object_record): New function, replaces ...
1699 (_bfd_vms_get_next_record): ... removed.
1700 (add_new_contents): Removed.
1701 (_bfd_save_vms_section): Removed.
1702 (_bfd_get_vms_section): Removed.
1703 (_bfd_vms_output_flush): Write in VAR format.
1704 (new_symbol): Don't make UND section.
1706 * vms-hdr.c: Update copyright year, update list of record handled.
1707 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1708 (_bfd_vms_write_hdr): Strip vms and unix patches,
1709 add comments, truncate module name at 31 characters,
1710 use constants instead of hard-coded value,
1711 write BFD version instead of a fixed string.
1712 (_bfd_vms_slurp_ihd): New function.
1713 (_bfd_vms_slurp_isd): Ditto.
1714 (_bfd_vms_slurp_ihs): Ditto.
1715 (new_module): Ditto.
1716 (parse_module): Ditto
1717 (build_module_list): Ditto.
1718 (module_find_nearest_line): Ditto.
1719 (_bfd_vms_find_nearest_dst_line): Ditto.
1720 (vms_slurp_debug): Ditto.
1721 (_bfd_vms_slurp_dbg): Ditto.
1722 (_bfd_vms_slurp_tbt): Ditto.
1723 (_bfd_vms_write_dbg): Ditto.
1724 (_bfd_vms_write_tbt): Ditto.
1726 * vms-gsd.c: Update copyright year, update list of records handled.
1727 (EVAX_LITERALS_NAME): New macro.
1728 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1729 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1730 (register_universal_symbol): New function and prototype.
1731 (_bfd_vms_slurp_gsd): Fix indentations and casts,
1732 improve debug messages,
1733 use constants instead of hard-coded value,
1734 fix missing endianness conversion,
1735 handle global symbol (SYMG).
1736 (bfd_vms_set_section_flags): New function.
1737 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1738 handle section literals,
1740 handle section bfd and vms flags,
1741 don't output LIB$INITIALIZE symbol,
1742 fix handling of weak symbols,
1743 fix evax vs vax procedure descriptor,
1744 handle absolute symbols.
1746 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1747 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1749 * makefile.vms (DEFS): Fix flags for VMS.
1751 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1753 * bfd-in2.h: Regenerated.
1754 * libbfd.h: Regenerated.
1756 2009-02-20 Cary Coutant <ccoutant@google.com>
1758 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1761 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1764 * coffcode.h (coff_write_object_contents): Don't let the string
1765 table offset overflow the s_name field when using long section names.
1767 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1769 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
1770 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1771 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1772 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
1773 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1774 (bfd_pmac_xcoff_backend_data): Likewise.
1775 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
1776 (bfd_xcoff_aix5_backend_data): Likewise.
1777 (xcoff64_write_object_contents): Delete unused long_section_names
1779 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
1780 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1782 * coffcode.h (documentation): Update to describe long section names.
1783 (COFFLONGSECTIONCATHELPER): New helper macro.
1784 (BLANKOR1TOODD): Likewise.
1785 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
1786 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
1787 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
1788 (bfd_coff_set_long_section_names_allowed): New function.
1789 (bfd_coff_set_long_section_names_disallowed): Likewise.
1790 (struct bfd_coff_backend_data): Add new backend hook function
1791 pointer _bfd_coff_set_long_section_names.
1792 (bfd_coff_set_long_section_names): New backend hook.
1793 (coff_write_object_contents): Only generate long section names if
1794 bfd_coff_long_section_names() indicates they are currently enabled.
1795 (bfd_coff_std_swap_table): Make non-const, and initialise long
1796 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1797 (ticoff0_swap_table): Likewise to both.
1798 (ticoff1_swap_table): Again, likewise to both.
1799 * coffgen.c (make_a_section_from_file): Allow long section names
1800 as inputs even if not currently allowed for outputs.
1801 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
1802 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
1803 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1804 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1805 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1806 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1807 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1808 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1809 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1810 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1811 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
1812 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
1813 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
1814 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
1815 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
1816 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
1817 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1818 * libcoff-in.h: Update copyright year to cause updated copyright
1819 year in generated libcoff.h, and fix typo.
1820 * libcoff.h: Regenerated.
1821 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
1822 (_bfd_ecoff_no_long_sections): Add prototype.
1823 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
1824 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
1825 defined by an including .c file.
1826 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
1827 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1828 (ticoff1_swap_table): Likewise to both.
1830 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
1832 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
1833 stub. Catch default case error.
1834 (arm_map_one_stub): Add missing Thumb mapping symbol.
1836 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
1839 * elf32-avr.c: Handle case where no local symbos exist correctly.
1841 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
1844 * elf32-arm.c (arm_long_branch_stub,
1845 arm_thumb_v4t_long_branch_stub,
1846 arm_thumb_thumb_long_branch_stub,
1847 arm_thumb_arm_v4t_long_branch_stub,
1848 arm_thumb_arm_v4t_short_branch_stub,
1849 arm_pic_long_branch_stub):
1850 Renamed to elf32_arm_stub_long_branch_any_any,
1851 elf32_arm_stub_long_branch_v4t_arm_thumb,
1852 elf32_arm_stub_long_branch_thumb_only,
1853 elf32_arm_stub_long_branch_v4t_thumb_arm,
1854 elf32_arm_stub_short_branch_v4t_thumb_arm,
1855 elf32_arm_stub_long_branch_any_any_pic.
1856 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
1857 arm_thumb_thumb_stub_long_branch,
1858 arm_thumb_arm_v4t_stub_long_branch,
1859 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
1860 Renamed to arm_stub_long_branch_any_any,
1861 arm_stub_long_branch_v4t_arm_thumb,
1862 arm_stub_long_branch_thumb_only,
1863 arm_stub_long_branch_v4t_thumb_arm,
1864 arm_stub_short_branch_v4t_thumb_arm,
1865 arm_stub_long_branch_any_any_pic.
1867 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1869 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
1870 in branch offset check.
1872 2009-02-15 Alan Modra <amodra@bigpond.net.au>
1874 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
1875 add toc.symndx and toc.add.
1876 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
1878 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
1880 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
1881 (branch_reloc_hash_match): New function, extracted from..
1882 (ppc64_elf_tls_optimize): ..here.
1883 (ppc64_elf_relocate_section): Properly set addends when optimizing
1884 tls sequences. Avoid unnecessary reading and writing of insns.
1885 Only redo reloc when symbol changed. Bypass symbol checks when
1887 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
1888 (branch_reloc_hash_match): New function, extracted from..
1889 (ppc_elf_tls_optimize): ..here.
1890 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
1891 Don't clear addend on zapped __tls_get_addr reloc.
1893 2009-02-12 Nick Clifton <nickc@redhat.com>
1896 * elflink.c (bfd_elf_final_link): When counting the relocations,
1897 if the header size has not been set yet then assume that it will
1898 match the output section's reloc type.
1900 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
1902 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
1905 2009-02-09 Alan Modra <amodra@bigpond.net.au>
1907 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
1908 (find_function): Likewise.
1909 (pasted_function): Don't error if no prior function found.
1910 (discover_functions): Revert 2008-12-10 change. Extend first
1911 function range to start of section.
1913 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1915 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
1917 * elf64-hppa.h: Likewise.
1919 2009-02-06 Joseph Myers <joseph@codesourcery.com>
1921 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1924 2009-02-04 Alan Modra <amodra@bigpond.net.au>
1926 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
1927 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
1929 2009-02-03 Sandip Matte <sandip@rmicorp.com>
1931 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
1932 * archures.c (bfd_mach_mips_xlr): Define.
1933 * bfd-in2.h: Regenerate.
1934 * cpu-mips.c (I_xlr): Define.
1935 (arch_info_struct): Add XLR entry.
1936 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
1937 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
1938 (mips_mach_extensions): Add XLR entry.
1940 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
1942 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
1944 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
1946 * configure.in: AC_SUBST pdfdir.
1947 * Makefile.am: Add install-pdf, install-pdf-am
1948 and install-pdf-recursive targets. Define pdfdir.
1949 * doc/Makefile.am: Define pdf__strip_dir. Add
1950 install-pdf and install-pdf-am targets.
1951 * po/Make-in: Add install-pdf target.
1952 * configure: Regenerate.
1953 * Makefile.in: Regenerate
1954 * doc/Makefile.in: Regenerate.
1956 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
1958 * bfd-in2.h: Regenerate.
1959 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
1960 fields from n_entries to n_slots where appropriate, update comments.
1961 (HOWTO): Add TLS relocations.
1962 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
1963 (enum elf_m68k_got_offset_size): New enum.
1964 (struct elf_m68k_got_entry.type): Move field to ...
1965 (struct elf_m68k_got_entry_key): ... here. Update all uses.
1966 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
1968 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
1970 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
1971 fields into n_entries array. Update comments.
1972 (elf_m68k_init_got): Simplify, update all uses.
1973 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
1974 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
1975 GOT entries; update name, update all uses.
1976 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
1977 (elf_m68k_get_got_entry): Update.
1978 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
1980 (elf_m68k_remove_got_entry_type): Simplify.
1981 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
1982 (elf_m68k_can_merge_gots): Update.
1983 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
1984 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
1985 GOT entries, simplify.
1986 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
1987 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
1988 field, remove obsoleted local_n_entries field.
1989 (elf_m68k_partition_multi_got_2): New static function.
1990 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
1992 (elf_m68k_remove_got_entry_type): Update.
1993 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1994 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
1995 update of sgot->size and srelgot->size.
1996 (elf_m68k_gc_sweep_hook): Update.
1997 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1998 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
2000 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2001 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2003 2009-02-02 DJ Delorie <dj@redhat.com>
2005 * elf32-mep.c (config_names): Regenerate configuration.
2007 2009-02-02 Alan Modra <amodra@bigpond.net.au>
2009 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
2010 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
2011 * elf.c (bfd_elf_get_str_section): Make static.
2012 (bfd_elf_find_section): Delete.
2013 * libbfd.h: Regenerate.
2015 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2017 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
2018 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2020 2009-01-31 Alan Modra <amodra@bigpond.net.au>
2022 * elflink.c (on_needed_list): New function.
2023 (elf_link_add_object_symbols): Link in --as-needed libs if they
2024 satisfy undefined symbols in other libs.
2026 2009-01-30 Julian Brown <julian@codesourcery.com>
2028 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
2029 EXEC_P or DYNAMIC flags, and skip sections which are being linked
2030 with --just-symbols (-R).
2032 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
2034 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
2035 high_pc in order to properly sign-extend VMAs.
2037 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2038 Mark Shinwell <shinwell@codesourcery.com>
2039 Catherine Moore <clm@codesourcery.com>
2041 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2043 2009-01-28 Catherine Moore <clm@codesourcery.com>
2045 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
2046 SEC_LOAD for dynamic relocation sections.
2048 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2050 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
2051 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
2052 the size of local TLS data.
2054 2009-01-27 Andreas Schwab <schwab@suse.de>
2056 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
2057 architectures in the archive.
2059 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2061 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
2062 <R_CRIS_32_DTPREL>: Correct relocation value.
2064 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
2065 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
2066 symbols with non-default visibility.
2068 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
2070 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
2071 describing the trampolines.
2072 (ppc_elf_relocate_section): Update relocs to describe the
2075 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2077 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
2078 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
2079 and R_PARISC_PCREL12F relocations.
2081 2009-01-24 Alan Modra <amodra@bigpond.net.au>
2084 * elflink.c (find_version_for_sym): New function split out from,
2085 but without export_dynamic test, ..
2086 (_bfd_elf_link_assign_sym_version): ..here.
2087 (_bfd_elf_export_symbol): Use it.
2089 2009-01-23 Alan Modra <amodra@bigpond.net.au>
2091 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
2092 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
2093 * elflink.c: ..here, somewhat modified.
2094 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
2095 _bfd_elf_link_find_version_dependencies,
2096 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
2097 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2098 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
2100 * elflink.c: ..and make static here.
2101 (_bfd_elf_link_find_version_dependencies): Adjust for removal
2102 of output_bfd from struct elf_find_verdep_info.
2103 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
2104 struct elf_info_failed.
2105 (bfd_elf_size_dynamic_sections): Adjust.
2107 2009-01-22 Alan Modra <amodra@bigpond.net.au>
2110 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
2111 after comp_unit_find_line call.
2113 2009-01-21 Nick Clifton <nickc@redhat.com>
2116 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
2117 tm_gmtoff field in struct tm.
2119 2009-01-21 Alan Modra <amodra@bigpond.net.au>
2121 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
2122 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
2123 sections in soft-icache lines unless non_ia_text. Don't add
2124 rodata if doing so would exceed line size.
2126 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
2128 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
2129 types than bfd_link_hash_indirect, before early return, call
2130 _bfd_elf_link_hash_copy_indirect.
2132 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2134 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
2135 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
2136 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
2137 (elf_backend_obj_attrs_order): New define.
2138 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
2139 (elfNN_bed): Add elf_backend_obj_attrs_order.
2141 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2143 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
2144 (obj_attr_size): Likewise.
2145 (write_obj_attribute): Likewise.
2146 (_bfd_elf_copy_obj_attributes): Likewise.
2147 (_bfd_elf_parse_attributes): Likewise.
2148 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
2149 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
2150 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
2151 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
2152 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
2155 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2157 * elf-attrs.c (is_default_attr): Support defaultless attributes.
2158 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
2159 (bfd_elf_add_obj_attr_string): Likewise.
2160 (bfd_elf_add_obj_attr_int_string): Likewise.
2161 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
2162 * elf-bfd.h (struct obj_attribute): Document new flag bit.
2163 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
2164 Tag_nodefaults has no default value.
2165 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
2166 comment to reflect the new state.
2168 2009-01-19 Alan Modra <amodra@bigpond.net.au>
2171 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
2172 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
2173 (adjust_z_magix): Delete dead code handling QMAGIC.
2175 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
2177 * coffcode.h (styp_to_sec_flags): Correct interpretation of
2178 IMAGE_SCN_MEM_DISCARDABLE.
2180 2009-01-16 Alan Modra <amodra@bigpond.net.au>
2182 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
2183 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
2184 * configure.in (commonbfdlib): Delete.
2185 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
2186 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
2187 is available, not just for linux.
2188 * po/SRC-POTFILES.in: Regenerate.
2189 * Makefile.in: Regenerate.
2190 * configure: Regenerate.
2192 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2193 Julian Brown <julian@codesourcery.com>
2195 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
2196 ARM attributes in ABI 2.07.
2197 * elf32-arm.c (get_secondary_compatible_arch): New function.
2198 (set_secondary_compatible_arch): New function.
2199 (tag_cpu_arch_combine): New function.
2200 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
2201 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
2202 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
2203 make it fit with order_01243.
2204 Add support for Tag_also_compatible_with,
2205 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
2206 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
2207 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
2208 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
2209 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
2210 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
2211 Rework the way unknown attributes are handled.
2212 Defer errors until all attributes have been processed.
2214 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2216 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
2217 bfd_elf_add_obj_attr_int_string.
2218 Read Tag_compatibility from its new location in the attribute array,
2219 rather than the attribute list.
2220 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
2221 bfd_elf_add_obj_attr_int_string.
2222 (_bfd_elf_parse_attributes): Likewise.
2223 (_bfd_elf_merge_object_attributes): There's now only one
2224 Tag_compatibility, and it's in the array, not the list.
2225 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
2227 (bfd_elf_add_obj_attr_compat): Rename to
2228 bfd_elf_add_obj_attr_int_string.
2229 (bfd_elf_add_proc_attr_compat): Rename to
2230 bfd_elf_add_proc_attr_int_string.
2231 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
2234 2009-01-15 Douglas B Rupp <rupp@gnat.com>
2236 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
2237 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
2238 (vmsutil.lo): Add dependency rule.
2239 * Makefile.in: Regenerate.
2240 * config.bfd (ia64*-*-*vms*): Add case.
2241 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
2242 * configure: Regenerate.
2243 * vmsutil.c: New file.
2244 * vmsutil.h: New file.
2245 * elf-bfd.h (struct bfd_elf_special_section): Change type of
2247 * elfxx-ia64.c (elfNN_vms_post_process_headers,
2248 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
2249 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
2250 elfNN_vms_object_p): New functions
2251 * targets.c (bfd_elf64_ia64_vms_vec): New target.
2253 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
2256 * elflink.c (elf_gc_sweep): Exclude the group section if the
2257 first member of the section group is excluded.
2259 2009-01-14 Alan Modra <amodra@bigpond.net.au>
2262 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
2263 saved filename, use bfd_alloc rather than bfd_malloc for it.
2265 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2267 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2269 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2271 * elf32-spu.c (remove_cycles): Always set call->max_depth.
2273 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2275 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2277 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2279 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
2281 (struct got_entry): Add br_addr.
2282 (struct call_info): Add priority.
2283 (struct function_info): Add lr_store and sp_adjust.
2284 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
2285 (spu_elf_find_overlays): For soft-icache, mark any section within cache
2286 area as an overlay, and check that no other overlays exist. Look up
2287 icache overlay manager entry sym.
2288 (BRA_STUBS, BRA, BRASL): Define.
2289 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
2290 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
2292 (count_stub, build_stub): Support soft-icache.
2293 (build_spuear_stubs, process_stubs): Adjust build_stub call.
2294 (spu_elf_size_stubs): Size soft-icache stubs.
2295 (overlay_index): New function.
2296 (spu_elf_build_stubs): Make static. Support soft-icache.
2297 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
2298 (find_function_stack_adjust): Save lr store and stack adjust insn
2300 (maybe_insert_function): Adjust find_function_stack_adjust call.
2301 (mark_functions_via_relocs): Retrieve priority.
2302 (remove_cycles): Only warn about pruned arcs when stack_analysis.
2303 (sort_calls): Sort by priority first.
2304 (mark_overlay_section): Ignore .ovl.init.
2305 (sum_stack): Only print when stack_analysis.
2306 (print_one_overlay_section): New function, extracted from..
2307 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
2308 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
2309 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
2310 analysis. Call spu_elf_build_stubs.
2311 (spu_elf_relocate_section): For soft-icache encode overlay index
2313 (spu_elf_output_symbol_hook): Support soft-icache.
2314 (spu_elf_modify_program_headers: Likewise.
2316 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
2317 num_regions to num_lines. Add line_size and max_branch.
2318 (enum _ovly_flavour): Add ovly_soft_icache.
2319 (spu_elf_build_stubs): Delete.
2321 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2323 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
2324 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2326 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
2328 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2329 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2330 the program, the known offset starts at the negative size of the
2332 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2335 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
2337 * config.bfd: Add lm32-*-rtems*.
2339 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
2341 * coff-ppc.c: Add 2009 to Copyright.
2342 * elf32-cris.c: Likewise.
2343 * elflink.c: Likewise.
2345 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
2347 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2348 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2350 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2353 * elflink.c (elf_merge_st_other): New.
2354 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2355 hide them if needed.
2356 (elf_link_add_object_symbols): Updated.
2358 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2361 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2362 ref_dynamic and dynamic_def fields when setting def_regular
2365 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
2368 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2371 For older changes see ChangeLog-2008
2377 version-control: never