1 2009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
3 * Makefile.am: Run "make dep-am".
4 (BFD32_BACKENDS): Add mach-o-i386.lo.
5 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
6 * Makefile.in: Regenerate.
8 2009-06-06 Alan Modra <amodra@bigpond.net.au>
10 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
11 when looking for soft-icache stubs.
13 2009-06-05 Tristan Gingold <gingold@adacore.com>
15 * mach-o.h: Update copyright year.
16 (bfd_mach_o_mach_header_magic): New enum.
17 (bfd_mach_o_cpu_subtype): Now an enum.
18 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
19 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
20 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
21 (bfd_mach_o_load_command): Field type_required is now a boolean.
23 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
24 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
25 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
26 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
27 (bfd_mach_o_get_symtab_upper_bound): Ditto.
28 (bfd_mach_o_canonicalize_symtab): Ditto.
29 (bfd_mach_o_get_symbol_info): Ditto.
30 (bfd_mach_o_print_symbol): Ditto.
31 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
32 (bfd_mach_o_make_empty_symbol): Ditto.
33 (bfd_mach_o_write_contents): Ditto.
35 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
36 bfd_mach_o_mkobject): Defines.
37 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
38 Do not check with target vector but with flavour.
39 (struct mach_o_section_name_xlat): New declaration.
40 (dwarf_section_names_xlat): Ditto.
41 (text_section_names_xlat): Ditto.
42 (data_section_names_xlat): Ditto.
43 (struct mach_o_segment_name_xlat): Ditto.
44 (segsec_names_xlat): Ditto.
45 (bfd_mach_o_convert_section_name_to_bfd): New function.
46 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
47 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
48 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
49 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
50 Accept any input and output flavour. Do not share private data
52 (bfd_mach_o_count_symbols): Add a comment.
53 (bfd_mach_o_get_symtab_upper_bound): Make it public.
54 (bfd_mach_o_canonicalize_symtab): Ditto.
55 (bfd_mach_o_get_symbol_info): Ditto.
56 (bfd_mach_o_print_symbol): Ditto.
57 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
58 Use constants instead of hard-coded values.
59 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
61 (bfd_mach_o_scan_write_section_64): Ditto.
62 (bfd_mach_o_scan_write_segment): Ditto.
63 Do not copy sections anymore.
64 (bfd_mach_o_write_contents): Make it public.
65 Remove dead code. Rewrite typeflag assignment.
66 (bfd_mach_o_build_commands): New function.
67 (bfd_mach_o_set_section_contents): Ditto.
68 (bfd_mach_o_make_empty_symbol): Make it public.
69 (bfd_mach_o_read_header): Make it static.
70 Convert to bfd_boolean.
71 Use constants instead of hard-coded values.
72 (bfd_mach_o_make_bfd_section): Call
73 bfd_mach_o_convert_section_name_to_bfd to create name.
74 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
76 (bfd_mach_o_scan_read_section_64): Ditto.
77 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
78 a segment anymore. Use constants instead of hard-coded values.
79 (bfd_mach_o_scan_read_command): Fix style.
80 (bfd_mach_o_scan): Use constants instead of hard-coded values.
81 Get rid of BFD_IO_FUNCS.
82 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
83 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
84 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
85 (bfd_mach_o_object_p): Removed.
86 (bfd_mach_o_gen_core_p): New function, replaces ...
87 (bfd_mach_o_core_p): ... deleted.
88 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
90 * mach-o-i386.c: New file.
91 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
92 * configure.in (TDEFINES): Add mach_o_i386_vec.
93 * configure: Regenerated.
94 * targets.c: Add mach_o_i386_vec.
96 * mach-o.c: Update copyright years.
97 (BFD_IO_FUNCS): Remove (was not used).
98 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
99 bfd_mach_o_slurp_extended_name_table,
100 bfd_mach_o_construct_extended_name_table,
101 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
102 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
103 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
104 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
105 bfd_mach_o_get_section_contents_in_window,
106 bfd_mach_o_bfd_is_local_label_name,
107 bfd_mach_o_bfd_is_target_special_symbol,
108 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
109 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
110 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
111 bfd_mach_o_minisymbol_to_symbol,
112 bfd_mach_o_bfd_get_relocated_section_contents,
113 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
114 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
115 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
116 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
117 bfd_mach_o_bfd_merge_private_bfd_data,
118 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
119 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
120 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
121 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
122 bfd_mach_o_bfd_copy_private_header_data,
123 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
124 * mach-o-target.c: ... here.
125 Update copyright years.
127 2009-06-04 Alan Modra <amodra@bigpond.net.au>
129 * dep-in.sed: Don't use \n in replacement part of s command.
130 * Makefile.am (DEP1): LC_ALL for uniq.
132 * Makefile.in: Regenerate.
134 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
136 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
137 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
138 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
140 2009-06-03 H.J. Lu <hongjiu.lu@intel.com>
142 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
143 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
144 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
145 against STT_GNU_IFUNC symbols for static executables.
146 (elf_i386_finish_dynamic_symbol): Load GOT entry with
147 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
149 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
150 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
151 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
152 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
154 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
156 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
157 symbols to be left unimported when linking statically.
158 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
159 code when linking statically.
161 2009-06-02 H.J. Lu <hongjiu.lu@intel.com>
163 * elf32-i386.c (elf_i386_check_relocs): Increment
164 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
165 against STT_GNU_IFUNC symbol.
166 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
167 local STT_GNU_IFUNC definition is used.
168 (elf_i386_relocate_section): Handle got.offset != -1 for
169 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
172 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
173 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
174 relocations against STT_GNU_IFUNC symbol.
175 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
176 local STT_GNU_IFUNC definition is used.
177 (elf64_x86_64_relocate_section): Handle got.offset != -1
178 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
179 STT_GNU_IFUNC symbol.
181 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
184 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
185 (elf_i386_reloc_type_lookup): Likewise.
186 (R_386_tls): Removed.
187 (R_386_irelative): New.
188 (R_386_vt_offset): Updated.
189 (elf_i386_rtype_to_howto): Likewise.
190 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
191 (elf_i386_link_hash_table_create): Initialize igotplt,
193 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
194 (elf_i386_adjust_dynamic_symbol): Likewise.
195 (elf_i386_allocate_dynrelocs): Likewise.
196 (elf_i386_relocate_section): Likewise.
197 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
199 (elf_i386_finish_dynamic_symbol): When building a static
200 executable, use .iplt, .igot.plt and .rel.iplt sections for
201 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
202 locally defined STT_GNU_IFUNC symbol.
204 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
205 (x86_64_reloc_map): Likewise.
206 (R_X86_64_standard): Updated.
207 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
208 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
210 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
211 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
212 (elf64_x86_64_allocate_dynrelocs): Likewise.
213 (elf64_x86_64_relocate_section): Likewise.
214 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
216 (elf64_x86_64_finish_dynamic_symbol): When building a static
217 executable, use .iplt, .igot.plt and .rela.iplt sections for
218 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
219 for locally defined STT_GNU_IFUNC symbol.
221 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
222 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
224 * bfd-in2.h: Regenerated.
225 * libbfd.h: Likewise.
227 2009-06-01 H.J. Lu <hongjiu.lu@intel.com>
229 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
230 (_bfd_elf_make_ifunc_reloc_section): Removed.
231 (_bfd_elf_is_ifunc_symbol): Likewise.
232 (_bfd_elf_create_static_ifunc_sections): New.
234 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
236 (elf_link_add_object_symbols): Here.
237 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
238 STT_GNU_IFUNC symbol.
239 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
240 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
241 (IFUNC_INFIX): Removed.
242 (get_ifunc_reloc_section_name): Likewise.
243 (_bfd_elf_make_ifunc_reloc_section): Likewise.
244 (_bfd_elf_is_ifunc_symbol): Likewise.
245 (_bfd_elf_create_static_ifunc_sections): New.
247 2009-05-29 H.J. Lu <hongjiu.lu@intel.com>
249 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
250 (create_got_section): Likewise.
251 (allocate_dynrelocs): Likewise.
252 (readonly_dynrelocs): Likewise.
253 (set_tls_module_base): Likewise.
254 (dtpoff_base): Likewise.
256 (elf_i386_link_hash_table_create): Updated.
257 (elf_i386_create_dynamic_sections): Likewise.
258 (elf_i386_check_relocs): Likewise.
259 (elf_i386_size_dynamic_sections): Likewise.
260 (elf_i386_relocate_section): Likewise.
262 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
263 (create_got_section): Likewise.
264 (allocate_dynrelocs): Likewise.
265 (readonly_dynrelocs): Likewise.
266 (set_tls_module_base): Likewise.
267 (dtpoff_base): Likewise.
269 (elf64_x86_64_link_hash_table_create): Updated.
270 (elf64_x86_64_create_dynamic_sections): Likewise.
271 (elf64_x86_64_check_relocs): Likewise.
272 (elf64_x86_64_size_dynamic_sections): Likewise.
273 (elf64_x86_64_relocate_section): Likewise.
275 2009-05-28 Nick Clifton <nickc@redhat.com>
277 * targets.c (_bfd_target_vector): Only include plugin target in
278 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
280 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
282 * elf32-spu.c (struct call_info): New member broken_cycle.
283 (remove_cycle): Instead of physically removing call_info structures
284 to break call graph cycles, mark them using the broken_cycle flag.
285 (mark_overlay_section): Respect broken_cycle flag.
286 (unmark_overlay_section): Likewise.
287 (collect_lib_sections): Likewise.
288 (collect_overlays): Likewise.
289 (sum_stack): Likewise.
291 2009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
293 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
294 (mark_functions_via_relocs): Initialize callee->count to 1.
295 (pasted_function): Likewise.
296 (spu_elf_auto_overlay): Honor call counts when determining number
297 of stubs required in software i-cache mode.
299 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
301 * plugin.c (program_name): Remove.
302 (plugin_program_name): New.
303 (bfd_plugin_set_program_name): New.
304 (try_load_plugin): Use plugin_program_name.
305 * plugin.h (bfd_plugin_set_program_name): New.
307 2009-05-27 Rafael Avila de Espindola <espindola@google.com>
309 * aclocal.m4: Include ../config/plugins.m4.
310 * configure.in: Use AC_PLUGINS.
311 * configure: Regenerate.
312 * Makefile.in: Regenerate.
313 * doc/Makefile.in: Regenerate.
315 2009-05-27 Nathan Sidwell <nathan@codesourcery.com>
317 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
319 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
320 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
321 * elf32-avr.c (elf32_avr_relax_section): Likewise.
322 * elf32-frv.c (elf32_avr_relax_section): Likewise.
323 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
324 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
325 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
326 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
327 * reloc.c (bfd_generic_relax_section): Likewise.
328 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
329 * vms.c (vms_bfd_relax_section): Likewise.
331 2009-05-26 H.J. Lu <hongjiu.lu@intel.com>
333 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
335 * elf32-i386.c (is_indirect_symbol): Renamed to ...
336 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
338 * elf32-i386.c (allocate_dynrelocs): Updated.
339 (elf_i386_relocate_section): Likewise.
340 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
341 (elf64_x86_64_relocate_section): Likewise.
343 * elf64-x86-64.c (is_indirect_symbol): Removed.
345 2009-05-26 Nick Clifton <nickc@redhat.com>
347 * po/id.po: Updated Indonesian translation.
349 2009-05-26 Rafael Avila de Espindola <espindola@google.com>
351 * Makefile.am: Run "make dep-am".
354 (ALL_MACHINES): Add cpu-plugin.lo.
355 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
356 (BFD32_BACKENDS): Add plugin.lo.
357 (BFD32_BACKENDS_CFILES): Add plugin.c.
358 (libbfd_la_LIBADD): Add LIBDL
359 * archures.c (bfd_architecture): Add bfd_arch_plugin.
360 (bfd_plugin_arch): Declare.
361 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
362 * bfd.c (bfd): Add plugin_data.
363 * config.bfd: Handle the plugin target.
364 * configure.in: Check for --enable-plugins.
365 (LT_INIT): Use the dlopen option.
369 * targets.c (plugin_vec): Declare.
370 (_bfd_target_vector): Add plugin_vec.
371 * Makefile.in: Regenerate.
372 * bfd-in2.h: Regenerate.
373 * configure: Regenerate.
375 2009-05-26 Alan Modra <amodra@bigpond.net.au>
377 * dep-in.sed: Don't modify .o to .lo here. Output one filename
378 per line with all lines having continuation backslash. Prefix
379 first line with "A", following lines with "B".
380 * Makefile.am (DEP): Don't use dep.sed here.
381 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
382 dep.sed here on dependencies, sort and uniq.
383 * Makefile.in: Regenerate.
385 2009-05-25 Tristan Gingold <gingold@adacore.com>
387 * makefile.vms: Add verilog.obj to object list OBJS.
389 2009-05-24 Alan Modra <amodra@bigpond.net.au>
391 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
392 for BFD_IN_MEMORY is cleared.
393 (bfd_bwrite): Zero excess memory allocated.
395 2009-05-22 Julian Brown <julian@codesourcery.com>
397 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
399 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
400 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
401 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
402 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
403 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
404 (a8_erratum_fix, a8_erratum_reloc): New structs.
405 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
406 num_a8_erratum_fixes, fix_cortex_a8 fields.
407 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
408 (elf32_arm_add_stub): Split into two parts, creating...
409 (elf32_arm_create_or_find_stub_sec): New function.
410 (elf32_arm_final_link_relocate): Add forward declaration.
411 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
412 relocations, multiple relocations per stub.
413 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
414 (arm_size_one_stub): Use find_stub_size_and_template.
415 (a8_reloc_compare): New.
416 (find_thumb_glue): Add forward declaration.
417 (cortex_a8_erratum_scan): New.
418 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
419 (bfd_elf32_arm_set_cortex_a8_fix): New.
420 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
421 (arm_map_one_stub): Add THUMB32_TYPE support.
422 (a8_branch_to_stub_data): New.
423 (make_branch_to_a8_stub): New.
424 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
425 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
426 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
427 Cortex-A8 erratum workaround.
428 * bfd-in2.h: Regenerate.
430 2009-05-22 Alan Modra <amodra@bigpond.net.au>
432 * Makefile.am: Run "make dep-am".
433 * Makefile.in: Regenerate.
434 * po/SRC-POTFILES.in: Regenerate.
436 2009-05-21 Alan Modra <amodra@bigpond.net.au>
438 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
441 2009-05-21 Alan Modra <amodra@bigpond.net.au>
443 * elf-bfd.h (struct elf_backend_data
444 <elf_backend_link_output_symbol_hook>): Return an int.
445 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
446 symbols on deleted .opd entries.
447 * elflink.c (elf_link_output_sym): Return without outputting sym
448 if output_symbol_hook returns 2.
449 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
450 Abort if we must not discard sym.
451 (elf_link_input_bfd): Similarly, don't set finfo->indices for
453 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
454 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
455 elf_backend_link_output_symbol_hook return type change.
456 * elf32-arm.c (output_arch_syminfo): Likewise.
457 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
458 (elf32_arm_output_arch_local_syms): Likewise.
459 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
460 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
461 (bfd_score_elf_link_output_symbol_hook): Likewise.
462 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
463 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
464 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
465 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
466 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
467 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
468 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
469 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
470 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
471 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
472 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
474 2009-05-21 Alan Modra <amodra@bigpond.net.au>
476 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
477 out of range .opd symbols.
479 2009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
481 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
482 fprintf_vma directly.
483 * peXXigen.c (pe_print_edata): Likewise.
484 (pe_print_pdata): Likewise.
485 (_bfd_XX_print_ce_compressed_pdata): Likewise.
486 (_bfd_XX_print_private_bfd_data_common): Likewise.
488 2009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
490 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
492 2009-05-15 Andrew Stubbs <ams@codesourcery.com>
493 Paul Brook <paul@codesourcery.com>
495 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
496 fix discarded sections.
498 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
500 * elf32-spu.c (mark_overlay_section): Move .init and .fini
501 sections into the software icache.
503 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
505 * elf32-spu.c (build_stub): Always build "compact" sofware
508 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
510 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
511 (spu_elf_setup): Initialize it.
512 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
513 Update to new-sytle cache manager data structures.
514 (spu_elf_build_stubs): Generate new-style cache manager data
515 structures and symbols.
516 (spu_elf_auto_overlay): Update size computation.
518 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
520 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
521 segments first amongst the program headers.
523 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
525 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
526 into addresses for relocation types that look at high bits. Remove
527 special handling of relocation overflow warnings.
529 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
531 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
532 control flow graph between fragments of a function.
534 2009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
536 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
537 generate only a 16-byte .toe section.
538 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
540 2009-05-14 Alan Modra <amodra@bigpond.net.au>
542 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
543 (spu_elf_place_overlay_data): ..here. New function.
544 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
546 2009-05-13 Andrew Jenner <andrew@codesourcery.com>
548 * elf32-arm.c: Move sysdep.h to start of file.
550 2009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
552 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
554 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
555 __icache_tag_array and __icache_tag_array_size.
557 2009-05-11 Masaki Muranaka <monaka@monami-software.com>
559 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
561 (bfinfdpic_link_omit_section_dynsym): Likewise.
562 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
564 2009-05-05 Paul Brook <paul@codesourcery.com>
566 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
567 * bfd-in2.h: Regenerate.
568 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
569 (_arm_elf_section_data): Add text and exidx fields.
570 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
571 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
572 copy_exidx_entry): New functions.
573 (elf32_arm_write_section): Fixup .ARM.exidx contents.
575 2009-05-05 Christophe lyon <christophe.lyon@st.com>
577 * elf32-arm.c (DEF_STUBS): New helper define.
578 (DEF_STUB): Likewise.
579 (stub_def): New type.
580 (stub_definitions): New array, containing stub template pointers
582 (arm_size_one_stub): Make use of stub_definitions.
584 2009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
586 * elflink.c (find_version_for_sym): Remove from here, ...
587 * linker.c (bfd_find_version_for_sym): ... rename, replace
588 here, make public and update all callers.
589 * bfd-in2.h: Regenerate.
591 2009-04-30 Nick Clifton <nickc@redhat.com>
593 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
595 (struct elf_obj_data): Add has_ifunc_symbols boolean.
596 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
597 into a STT_GNU_IFUNC symbol type.
598 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
600 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
601 the binary contains ifunc symbols.
602 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
603 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
604 * elf32-i386.c (is_indirect_function): New function.
605 (elf_i386_check_relocs): Create an ifunc output section.
606 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
607 section if necessary.
608 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
610 (elf_i386_add_symbol_hook): New function. Set the
611 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
612 symbol is encountered.
613 (elf_backend_post_process_headers): Define.
614 (elf_backend_add_symbol_hook): Define.
615 (elf_i386_post_process_headers): Rename to
616 elf_i388_fbsd_post_process_headers.
617 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
618 (is_indirect_function): New function.
619 (elf64_x86_64_check_relocs): Create an ifunc output section.
620 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
621 section if necessary.
622 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
624 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
625 elf_obj_data structure if an ifunc symbol is encountered.
626 (elf_backend_post_process_headers): Define.
627 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
628 if we have ifunc symbols to handle.
629 (get_ifunc_reloc_section_name): New function. Computes the name
630 for an ifunc section.
631 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
632 section to hold ifunc relocs.
633 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
634 (bfd_print_symbol_vandf): Handle ifunc symbols.
635 (bfd_decode_symclass): Likewise.
636 * bfd-in2.h: Regenerate.
638 2009-04-30 Joseph Myers <joseph@codesourcery.com>
640 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
641 MOVW and MOVT relocations in a shared library link.
643 2009-04-27 Anthony Green <green@moxielogic.com>
645 * verilog.c: New file.
646 * Makefile.am (BFD32_LIBS): Add verilog.c.
647 (BFD32_LIBS_CFILES): Add verilog.c.
648 (verilog.lo): New build rule.
649 * Makefile.in: Rebuilt.
650 * targets.c: Add verilog support.
651 * bfd.c (tdata union): Add Verilog private data field.
652 * bfd-in2.h: Regenerate.
654 2009-04-27 H.J. Lu <hongjiu.lu@intel.com>
656 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
659 2009-04-23 Matthias Klose <doko@ubuntu.com>
661 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
663 2009-04-22 Christophe Lyon <christophe.lyon@st.com>
666 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
667 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
668 (elf32_arm_size_stubs): Likewise.
669 (record_thumb_to_arm_glue): Deleted unused function.
670 (bfd_elf32_arm_process_before_allocation): No longer handle
671 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
672 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
673 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
675 2009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
677 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
678 (elf32_arm_write_section): Declare early.
679 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
680 (arm_allocate_glue_section_space): Exclude empty sections.
681 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
682 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
684 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
685 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
686 (elf32_arm_size_dynamic_sections): Allocate interworking
688 (bfd_elf32_bfd_final_link): Define.
690 2009-04-21 H.J. Lu <hongjiu.lu@intel.com>
692 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
694 * coffcode.h (coff_compute_section_file_positions): Clear
695 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
697 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
698 force_minimum_alignment.
700 * libcoff.h: Regenerated.
702 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
703 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
705 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
706 nor target_subsystem.
708 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
709 force_minimum_alignment nor target_subsystem.
711 2009-04-21 Kai Tietz <kai.tietz@onevision.com>
713 * coff-x86_64.c (PEI_HEADERS): Protect includes.
714 (bfd_pe_print_pdata): Remove #ifdef PE variation.
715 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
716 include in coff-x86_64.c of headers.
717 (PDATA_ROW_SIZE): New define.
718 (pex_regs[]): New static array.
719 (pex64_get_runtime_function): New static function.
720 (pex64_get_unwind_info): Likewise.
721 (pex64_get_scope_entry): Likewise.
722 (pex64_xdata_print_uwd_codes): Likewise.
723 (pex64_get_section_by_rva): Likewise.
724 (pex64_dump_xdata): Likewise.
725 (pex64_bfd_print_pdata): Likewise.
726 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
727 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
728 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
730 2009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
731 Alan Modra <amodra@bigpond.net.au>
732 Dave Korn <dave.korn.cygwin@gmail.com>
734 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
735 long names and non-NUL-terminated strings.
737 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
739 * bfd-in2.h: Regenerated.
741 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
743 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
744 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
746 2009-04-17 H.J. Lu <hongjiu.lu@intel.com>
749 * coffcode.h (bfd_pei_p): New.
751 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
752 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
753 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
754 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
755 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
756 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
758 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
759 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
760 bfd_efi_rtdrv_x86_64_vec,
761 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
762 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
763 * targets.c: Likewise.
765 * configure: Regenerated.
766 * libcoff.h: Likewise.
767 * Makefile.in: Likewise.
769 * efi-app-ia32.c: Removed.
770 * efi-app-x86_64.c: Likewise.
771 * efi-bsdrv-ia32.c: Likewise.
772 * efi-bsdrv-ia64.c: Likewise.
773 * efi-bsdrv-x86_64.c: Likewise.
774 * efi-rtdrv-ia32.c: Likewise.
775 * efi-rtdrv-ia64.c: Likewise.
776 * efi-rtdrv-x86_64.c: Likewise.
777 * efi-rtdrv-ia32.c: Likewise.
779 * efi-app-ia64.c: Moved to ...
781 (TARGET_SYM): Set to bfd_pei_ia64_vec.
782 (TARGET_NAME): Set to pei-ia64.
784 * libpei.h (bfd_target_pei_p): Removed.
785 (bfd_target_pei_arch): Likewise.
786 (bfd_target_efi_app_p): Likewise.
787 (bfd_target_efi_app_arch): Likewise.
788 (bfd_target_efi_bsdrv_p): Likewise.
789 (bfd_target_efi_bsdrv_arch): Likewise.
790 (bfd_target_efi_rtdrv_p): Likewise.
791 (bfd_target_efi_rtdrv_arch): Likewise.
792 (bfd_pe_executable_p): Likewise.
794 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
795 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
796 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
797 and efi-rtdrv-ia32.c.
798 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
799 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
800 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
801 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
802 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
803 efi-rtdrv-x86_64.c. Add pei-ia64.c.
804 (efi-app-ia64.lo): Removed.
805 (efi-bsdrv-ia32.lo): Likewise.
806 (efi-rtdrv-ia32.lo): Likewise.
807 (efi-app-ia64.lo): Likewise.
808 (efi-bsdrv-ia64.lo): Likewise.
809 (efi-rtdrv-ia64.lo): Likewise.
810 (efi-app-x86_64.lo): Likewise.
811 (efi-bsdrv-x86_64.lo): Likewise.
812 (efi-rtdrv-x86_64.lo): Likewise.
815 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
817 (arch_type): Removed.
819 (pe_bfd_object_p): Just return coff_object_p.
821 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
822 bfd_pe_executable_p with bfd_pei_p.
824 2009-04-17 Christophe Lyon <christophe.lyon@st.com>
826 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
827 PLT entries to an undefined symbol when generating a shared
830 2009-04-17 Nick Clifton <nickc@redhat.com>
833 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
835 2009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
837 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
838 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
839 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
840 * binary.c (binary_bfd_define_common_symbol): Likewise.
841 * bout.c (b_out_bfd_define_common_symbol): Likewise.
842 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
843 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
844 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
845 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
846 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
847 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
848 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
849 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
850 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
851 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
852 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
853 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
854 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
855 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
856 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
857 * som.c (som_bfd_define_common_symbol): Likewise.
858 * srec.c (srec_bfd_define_common_symbol): Likewise.
859 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
860 * versados.c (versados_bfd_define_common_symbol): Likewise.
861 * vms.c (vms_bfd_define_common_symbol): Likewise.
862 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
863 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
864 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
865 (pmac_xcoff_vec): Likewise.
866 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
867 (aix5coff64_vec): Likewise.
868 * linker.c (bfd_generic_define_common_symbol): New function.
869 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
870 (_bfd_define_common_symbol): New field.
871 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
872 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
873 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
875 * bfd-in2.h: Regenerate.
876 * libbfd.h: Likewise.
877 * libcoff.h: Likewise.
879 2009-04-15 Anthony Green <green@moxielogic.com>
881 * targets.c: Add moxie support.
882 * Makefile.am: Ditto.
883 * Makefile.in: Rebuilt.
884 * cpu-moxie.c, elf32-moxie.c: New files.
885 * archures.c: Add moxie support.
886 * configure.in: Add moxie support.
887 * configure: Rebuilt.
888 * config.bfd, archures.c: Add moxie support.
889 * bfd-in2.h: Rebuilt.
891 2009-04-15 Christophe Lyon <christophe.lyon@st.com>
893 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
894 branch to an undef weak symbol into a jump to next instruction if
895 a PLT entry will be created.
897 2009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
899 * coffgen.c (make_a_section_from_file): Set the backend long
900 section names enable if long section names found on input.
901 * coffcode.h: Extend long section names documentation to match.
903 2009-04-08 H.J. Lu <hongjiu.lu@intel.com>
905 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
908 2009-04-07 DJ Delorie <dj@redhat.com>
910 * archures.c: Add bfd_mach_mep_c5.
911 * bfd-in2.h: Likewise.
912 * cpu-mep.c: Add bfd_c5_arch.
913 * elf32-mep.c: Support it.
915 2009-04-07 H.J. Lu <hongjiu.lu@intel.com>
917 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
918 info->callbacks->einfo.
919 * linker.c (_bfd_generic_section_already_linked): Likewise.
921 2009-04-06 DJ Delorie <dj@redhat.com>
923 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
925 2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
927 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
928 _bfd_pex64_print_pdata only if PE is defined.
930 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
931 (_bfd_pex64_print_pdata): This.
933 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
934 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
937 2009-04-05 Kai Tietz <kai.tietz@onevision.com>
939 * coff-x86_64.c (bfd_pe_print_pdata): Define as
940 _bfd_pep_print_x64_pdata.
941 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
942 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
944 2009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
946 * elf32-xtensa.c (relax_property_section): Always set r_offset
949 2009-04-02 Christophe Lyon <christophe.lyon@st.com>
951 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
952 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
954 (elf32_arm_stub_type): New enum values for the two new stubs.
955 (arm_type_of_stub): Make use of the two new stubs.
956 (arm_size_one_stub): Handle the two new stubs.
958 2009-04-01 Matt Thomas <matt@netbsd.org>
960 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
961 hidden symbols into the GOT or PLT.GOT.
962 (elf_vax_relocate_section): Do not emit a PCREL reloc
963 into a shared object if it is against a hidden symbol.
965 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
967 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
968 and know_contains_shared_object_p.
969 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
970 Cache the result in the archive_info table.
971 (xcoff_auto_export_p): Add an "info" parameter and update the
972 call to xcoff_archive_contains_shared_object_p.
973 (xcoff_mark_auto_exports): Update accordingly.
974 (xcoff_post_gc_symbol): Likewise.
976 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
978 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
981 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
983 * coff-rs6000.c (member_layout): New structure.
984 (archive_iterator): Likewise.
985 (member_layout_init): New function.
986 (archive_iterator_begin): Likewise.
987 (archive_iterator_next): Likewise.
988 (xcoff_write_armap_old): Use the new iterator functions.
989 (do_shared_object_padding): Delete.
990 (xcoff_write_armap_big): Use the new iterator functions. Simplify
991 handling of arch_info.
992 (xcoff_write_archive_contents_old): Allocate arelt_data in the
993 first loop rather than the second. Allocate a member header if
994 there isn't one, then work out the stat information and length
995 in the first loop too. Use the new iterators for the second loop.
996 (xcoff_write_archive_contents_big): Likewise.
998 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1000 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
1001 (bfd_xcoff_set_archive_import_path): Likewise.
1002 * bfd-in2.h: Regenerate.
1003 * xcofflink.c: Include libiberty.h.
1004 (xcoff_archive_info): New structure.
1005 (xcoff_archive_info_hash): New function.
1006 (xcoff_archive_info_eq): Likewise.
1007 (xcoff_get_archive_info): Likewise.
1008 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
1009 (bfd_xcoff_split_import_path): New function.
1010 (bfd_xcoff_set_archive_import_path): Likewise.
1011 (xcoff_set_import_path): Move earlier in file.
1012 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
1013 object to the the directory part of the bfd's filename. Get the
1014 import path and filename of an archive object from the archive's
1015 xcoff_tdata, initializing it if necessary. Update use of
1017 (bfd_link_input_bfd): Update use of import_file_id.
1018 (xcoff_write_global_symbol): Likewise.
1020 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1022 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
1024 2009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1026 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
1027 a .loader section for relocatable links.
1028 (xcoff_need_ldrel_p): New function.
1029 (xcoff_mark): Use it.
1030 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
1032 (xcoff_build_ldsym): New function, split out from...
1033 (xcoff_build_ldsyms): ...here. Rename to...
1034 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
1035 call xcoff_build_ldsym, if there's a loader section.
1036 (xcoff_build_loader_section): New function, extracted verbatim from...
1037 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
1038 there's a loader section. Only add an __rtinit loader symbol
1039 if there's a loader section. Update after above name change.
1040 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
1041 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
1042 and xcoff_create_ldrel.
1043 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
1044 (xcoff_reloc_link_order): Likewise, but only call it if there's
1045 a loader section. Use xcoff_symbol_section.
1046 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
1047 if there's a loader section.
1049 2009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
1051 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
1053 2009-04-01 Christophe Lyon <christophe.lyon@st.com>
1055 * elf32-arm.c (group_sections): Rewrite loops for better
1058 2009-03-30 DJ Delorie <dj@redhat.com>
1060 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
1061 relocs when doing a relocatable link.
1063 2009-03-28 Mark Mitchell <mark@codesourcery.com>
1065 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
1066 "ERROR:", in error messages.
1067 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
1068 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
1069 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
1070 (elf32_arm_merge_eabi_attributes): Likewise.
1071 (elf32_arm_merge_private_bfd_data): Likewise.
1073 2009-03-27 Nick Clifton <nickc@redhat.com>
1075 * section.c (bfd_get_section_contents): Detect and handle the case
1076 where a section has the SEC_IN_MEMORY flag set but no actual
1079 2009-03-26 Alan Modra <amodra@bigpond.net.au>
1082 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
1083 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
1084 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
1085 if we don't find matching PT_LOAD when copying.
1087 2009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1089 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
1090 the reloc descriptions.
1092 2009-03-25 Hans-Peter Nilsson <hp@axis.com>
1094 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1095 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
1096 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
1098 2009-03-24 H.J. Lu <hongjiu.lu@intel.com>
1100 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
1101 (bfd_i386_arch_intel_syntax): Likewise.
1102 (i8086_arch): Likewise.
1103 (bfd_x86_64_arch): Likewise.
1105 2009-03-24 Hans-Peter Nilsson <hp@axis.com>
1107 * elf32-cris.c (cris_elf_relocate_section): <case
1108 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
1109 symbols for non-allocated sections. Don't check whether to
1110 generate R_CRIS_DTPMOD for non-allocated sections.
1111 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
1112 handle relocation GC:ing if applied to non-allocated section.
1113 (cris_elf_check_relocs): Similar.
1115 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1116 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
1117 when emitting a known TP offset in the GOT.
1119 2009-03-23 Alan Modra <amodra@bigpond.net.au>
1121 * elf64-ppc.c (synthetic_opd): Delete.
1122 (compare_symbols): Look for .opd name rather than section match.
1123 (ppc64_elf_get_synthetic_symtab): Likewise.
1125 2009-03-21 Alan Modra <amodra@bigpond.net.au>
1127 * elf32-ppc.c (is_pic_glink_stub): Delete.
1128 (is_nonpic_glink_stub): New function.
1129 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
1131 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
1133 2009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1134 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1136 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
1137 macros for visibilty and locality checks.
1138 (elf_s390_adjust_dynamic_symbol): Likewise.
1139 (allocate_dynrelocs): Likewise.
1140 (elf_s390_relocate_section): Likewise.
1141 (elf_s390_finish_dynamic_symbol): Likewise.
1142 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1143 (elf_s390_adjust_dynamic_symbol): Likewise.
1144 (allocate_dynrelocs): Likewise.
1145 (elf_s390_relocate_section): Likewise.
1146 (elf_s390_finish_dynamic_symbol): Likewise.
1148 2009-03-19 Kai Tietz <kai.tietz@onevision.com>
1150 * bfd-in2.h: Regenerated.
1151 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
1152 for debugging sections and map memory read/write dependent on
1154 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
1155 without memory read flags set.
1156 * section.c: Add SEC_COFF_NOREAD to section flags.
1158 2009-03-19 Andreas Schwab <schwab@linux-m68k.org>
1160 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
1163 2009-03-19 Alan Modra <amodra@bigpond.net.au>
1165 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
1166 "no overlays" return. If there are overlays, create overlay
1167 manager entry symbols here, so that..
1168 (spu_elf_build_stubs): ..we don't need to set them up here.
1169 Simplify entry symbol tests.
1170 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
1172 2009-03-18 Mark Kettenis <kettenis@gnu.org>
1174 * elf.c (elfcore_grok_openbsd_procinfo)
1175 (elfcore_grok_openbsd_note): New functions.
1176 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
1178 2009-03-18 Alan Modra <amodra@bigpond.net.au>
1180 * vms-hdr.c: Don't include alloca.h.
1181 * elf32-m68hc1x.c: Include alloca-conf.h.
1183 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
1185 * Makefile.am: Run "make dep-am".
1186 * Makefile.in: Regenerate.
1188 2009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
1190 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
1192 2009-03-17 Alan Modra <amodra@bigpond.net.au>
1194 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
1196 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
1197 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
1198 ovly_return fields with ovly_entry[2]. Adjust all users.
1199 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
1201 (spu_elf_build_stubs): Likewise.
1202 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
1203 ovly_flavour changes. Update all callers.
1204 (ovl_stub_size_log2): New function.
1205 (build_stub): Handle compact icache stubs. Use different manager
1206 entry point for stubs in non-icache area.
1207 (spu_elf_size_stubs): Don't allocate space for indirect branch
1209 (spu_elf_build_stubs): And don't built them.
1211 2009-03-16 Andrew Stubbs <ams@codesourcery.com>
1213 * dwarf2.c (read_section): Always use rawsize, if available.
1215 2009-03-16 Alan Modra <amodra@bigpond.net.au>
1217 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
1218 of rawsize and size for buffer.
1220 2009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1222 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
1223 parameter just because fixed sections fit into local store.
1224 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
1225 generating overlays if fixed sections plus reserved stack
1226 and heap space fit into local store.
1228 2009-03-15 Alan Modra <amodra@bigpond.net.au>
1230 * elf32-spu.c (build_stub): Correct icache set_id.
1231 (spu_elf_relocate_section): Likewise.
1233 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1235 * xcofflink.c (xcoff_link_check_archive_element): Only free the
1236 symbol table if it was created by the current call.
1238 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1240 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
1241 class XMC_DS rather than XMC_UA.
1243 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1245 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
1246 bfd_boolean export_defineds parameter with an unsigned int
1247 auto_export_flags parameter.
1248 * bfd-in2.h: Regenerate.
1249 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
1250 split out from xcoff_build_ldsyms.
1251 (xcoff_covered_by_expall_p): New function.
1252 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
1253 but with extra code to handle -bexpfull and -bexpall.
1254 (xcoff_mark_auto_exports): New function.
1255 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
1256 a function should be automatically exported.
1257 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
1258 parameter with an auto_export_flags parameter. Update ldinfo
1259 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
1262 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1264 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
1265 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
1266 init and fini functions. Do garbage collection for objects
1267 without an entry point too.
1269 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1271 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
1272 check whether a symbol has csect information.
1273 (coff_print_aux): Likewise.
1274 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
1275 information for C_AIX_WEAKEXT too.
1276 (_bfd_xcoff_swap_aux_out): Likewise.
1277 (xcoff_reloc_type_br): Handle defweak symbols too.
1278 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
1279 information for C_AIX_WEAKEXT too.
1280 (_bfd_xcoff64_swap_aux_out): Likewise.
1281 (xcoff64_reloc_type_br): Handle defweak symbols too.
1282 * coffgen.c (coff_print_symbol): Handle auxillary function
1283 information for C_AIX_WEAKEXT too.
1284 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
1285 instead of BSF_GLOBAL if the L_WEAK flag is set.
1286 (xcoff_dynamic_definition_p): New function.
1287 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
1288 defines h. Don't change h if ldsym isn't the definition. Otherwise,
1289 always take the symbol class from the ldsym. Use weak bfd symbol
1290 types for weak ldsyms.
1291 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
1292 Fix the check for whether a definition is from a shared object.
1293 Allow redefinitions of weak symbols.
1294 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
1295 (xcoff_keep_symbol_p): Likewise.
1296 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
1297 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
1298 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
1299 but mark them as L_WEAK.
1300 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
1301 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
1303 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1305 * xcofflink.c (xcoff_mark): When walking the relocations,
1306 only mark the target symbol or the target section, not both.
1307 (xcoff_final_definition_p): New function.
1308 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
1309 symbol is a valid definition of the associated output symbol.
1310 Use XCOFF_ALLOCATED to stop the same hash table entry having
1312 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
1314 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
1316 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1318 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
1321 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1323 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
1324 * libcoff.h: Regenerate.
1325 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
1326 line-number counts in the bfd's lineno_counts field.
1327 Don't keep per-csect line-number counts.
1328 (xcoff_sweep): Don't update per-csect line-number counts.
1329 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
1330 entries in each output section.
1331 (xcoff_link_input_bfd): Get the number of line numbers from
1332 the bfd's lineno_counts field, rather than recalculating it
1333 from scratch. Fix the range check when updating C_BINCL and
1335 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
1336 here. Don't expect csects to have line-number counts.
1338 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1340 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
1341 * libcoff.h: Regenerate.
1342 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
1343 "skip" logic from xcoff_link_input_bfd.
1344 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
1345 objects in a dynamic link, rather than checking whether csectpp
1346 is null. Always allocate debug_index for other objects,
1347 and always go through the loop. Update the type of debug_index
1348 after the change above. Read the auxillary csect information
1349 and use xcoff_keep_symbol_p to decide whether a symbol should
1350 be kept. Set its debug_index to -2 if not.
1351 (xcoff_link_input_bfd): Update the type of debug_index after
1352 the change above and always expect it to be nonnull. Use it to
1353 test whether a symbol should be stripped, rather than making the
1354 decision here. Postpone all symbol creation to the second pass.
1356 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1358 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
1359 creating a descriptor.
1360 (xcoff_sweep): Don't mark toc_section unless it's needed.
1361 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
1362 when marking every bfd.
1363 (xcoff_link_input_bfd): Skip all TOC anchors.
1364 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
1365 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
1366 to -1; call xcoff_find_tc0 instead.
1368 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1370 * libcoff-in.h (xcoff_section_tdata): Update commentary.
1371 * libcoff.h: Regenerate.
1372 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
1373 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
1374 the previous symbol's csect. Treat last_symndx as an inclusive value
1375 and simplify its handling.
1376 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
1377 symbols with the right csect. Don't mark rsec when processing
1378 relocations against undefined or absolute sections.
1379 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
1380 of bfd_und_section_ptr.
1381 (xcoff_link_input_bfd): Likewise.
1383 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1385 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
1386 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
1387 flag is set. Assert that all undefined symbols are either
1388 imported or defined by a dynamic object.
1389 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1390 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
1391 handling to all relocations. Only set XCOFF_CALLED for function
1393 (xcoff_find_function): New function, split out from...
1394 (bfd_xcoff_export_symbol) ...here.
1395 (xcoff_set_import_path): New function, split out from...
1396 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
1397 meaning of XCOFF_CALLED.
1398 (xcoff_mark_symbol): If we mark an undefined and unimported
1399 symbol, find some way of defining it. If the symbol is a function
1400 descriptor, fill in its definition automatically. If the symbol
1401 is a function, mark its descriptor and allocate room for global
1402 linkage code. Otherwise mark the symbol as implicitly imported.
1403 Move the code for creating function descriptors from...
1404 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
1405 check for symbols that were implicitly defined.
1406 (xcoff_mark): Don't count any dynamic relocations against
1408 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
1409 in the xcoff link info.
1410 (xcoff_link_input_bfd): Remove handling of undefined and
1413 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1415 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
1416 if the target is absolute. Fix comment typo.
1417 (xcoff_ppc_relocate_section): Remove FIXME.
1418 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
1419 if the target is absolute.
1421 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1423 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
1424 R_POS and R_NEG relocations against absolute symbols to the
1427 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1429 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
1430 to 2 for bfd_mach_ppc_620.
1432 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1434 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
1435 * configure.in: Likewise.
1436 * configure: Regenerate.
1438 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
1441 * elf.c (assign_section_numbers): Generate symbol table if there
1442 is any relocation in output.
1443 (_bfd_elf_compute_section_file_positions): Likewise.
1445 2009-03-13 Nick Clifton <nickc@redhat.com>
1448 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
1449 * elflink.c (elf_link_read_relocs_from_section): Use
1450 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
1451 relocs but no symbol table.
1452 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1454 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
1457 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
1458 to check ___tls_get_addr.
1460 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
1461 strncmp to check __tls_get_addr.
1463 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
1465 * dwarf2.c (read_section): Always check the offset, even when the
1466 section has been read before.
1468 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
1470 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
1473 2009-03-11 Chris Demetriou <cgd@google.com>
1475 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
1476 * bfd-in2.h: Regenerate.
1477 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
1478 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
1480 (bsd_write_armap): Likewise.
1481 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
1482 flag is set, do nothing.
1483 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
1486 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
1488 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
1489 used to update stack pointer.
1491 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1494 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
1495 for unknown symbols in absolute section.
1497 2009-03-06 Nick Clifton <nickc@redhat.com>
1499 * po/es.po: Updated Spanish translation.
1501 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1503 * elf32-arm.c (group_sections): Take next section size into
1504 account before accepting to group it.
1506 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
1508 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1510 (elf32_arm_final_link_relocate): Likewise.
1512 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
1515 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1517 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1519 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1520 * section.c (struct bfd_section): Add has_tls_get_addr_call.
1521 (BFD_FAKE_SECTION): Init new flag.
1522 * ecoff.c (bfd_debug_section): Likewise.
1523 * bfd-in2.h: Regenerate.
1524 * libbfd.h: Regenerate.
1525 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1526 (ppc_elf_reloc_type_lookup): Handle new relocs.
1527 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1528 without marker relocs.
1529 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1530 if section has no old-style calls.
1531 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1532 Don't try to optimize new-style __tls_get_addr call when handling
1533 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1535 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1536 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1537 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1538 without marker relocs.
1539 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1540 if section has no old-style calls. Set toc_ref for new relocs as
1542 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1543 Don't try to optimize new-style __tls_get_addr call when handling
1544 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1547 2009-03-04 Alan Modra <amodra@bigpond.net.au>
1550 * configure.in: Test for ld --as-needed support. Link shared
1551 libbfd against libm.
1552 * configure: Regenerate.
1554 2009-03-03 Alan Modra <amodra@bigpond.net.au>
1556 * Makefile.am: Run "make dep-am".
1557 * Makefile.in: Regenerate.
1559 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
1561 * elf32-score7.c: New file.
1562 * elf32-score.h: New file.
1563 * elf32-score.c: Add code to support score 7. Set score7 as the
1565 * cpu-score.c: Add score7 architecure.
1566 (compatibile): New function.
1567 * Makefile.am: Add rules for building elf32-score7 object.
1568 * Makefile.in: Regenerate.
1569 * configure.in: Add elf32-score7 object to score vectors.
1570 * configure: Regenerate.
1571 * reloc.c: Add score7 relocs.
1572 * archures.c: Add score3 and score7 machine numbers.
1573 * bfd-in2.h: Regenerate.
1574 * libbfd.h: Regenerate.
1576 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1578 * configure: Regenerate.
1580 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1582 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1583 (elf32_hppa_check_relocs): Use it.
1585 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1587 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1588 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1589 (elf_hppa_is_dynamic_loader_symbol): Likewise.
1590 (elf_hppa_record_segment_addrs): Likewise.
1591 (elf_hppa_final_link): Likewise.
1592 (elf_hppa_relocate_insn): Likewise.
1593 (elf_hppa_final_link_relocate): Likewise.
1594 (elf64_hppa_relocate_section): Likewise.
1595 * elf64-hppa.c: Insert above.
1597 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1599 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1600 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1601 (elf_hppa_relocate_section): Likewise.
1602 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1603 from struct elf_link_hash_entry. Add count field.
1604 (struct elf64_hppa_dyn_hash_table): Delete.
1605 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1606 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1607 (hppa_elf_hash_entry, eh_name): Define.
1608 (elf64_hppa_new_dyn_hash_entry): Delete.
1609 (elf64_hppa_dyn_hash_lookup): Delete.
1610 (elf64_hppa_dyn_hash_traverse): Delete.
1611 (get_dyn_name): Delete.
1612 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1613 of struct elf64_hppa_dyn_hash_entry *.
1614 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1615 allocate_global_data_plt, allocate_global_data_stub,
1616 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1618 (hppa64_link_hash_newfunc): New.
1619 (elf64_hppa_hash_table_create): Rework.
1620 (count_dyn_reloc): Likewise.
1621 (hppa64_elf_local_refcounts): New.
1622 (elf64_hppa_check_relocs): Rework using standard technique for recording
1623 local DLT, PLT and OPD reference counts.
1624 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
1625 elf_link_hash_entry *.
1626 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
1627 allocate_global_data_plt, allocate_global_data_stub,
1628 allocate_global_data_opd, allocate_dynrel_entries,
1629 elf64_hppa_adjust_dynamic_symbol,
1630 elf64_hppa_mark_milli_and_exported_functions): Likewise.
1631 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
1632 Use hppa_link_hash_table. Rework.
1633 (elf64_hppa_link_output_symbol_hook): Rework.
1634 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
1635 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
1636 elf64_hppa_finish_dynamic_sections): Likewise.
1638 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
1640 * elf32-arm.c (stub_reloc_type): Removed.
1641 (insn_sequence): Renamed reloc_type field to r_type.
1642 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
1643 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
1644 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
1645 (elf32_arm_stub_type): Add new enum entries for the new stubs.
1646 (arm_stub_is_thumb): Catch new stubs.
1647 (arm_type_of_stub): Handle new stubs.
1648 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
1649 (bfd_elf32_arm_process_before_allocation): Remove useless
1652 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
1654 * elf.c (elf_find_function): Use is_function_type to check
1657 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1659 * xtensa-modules.c: Revert to previous version 1.11 due
1660 to inadvertant commit.
1662 2009-02-24 Sterling Augustine <sterling@tensilica.com>
1664 * elf32-xtensa.c (text_action_add): Separate test for action
1665 type. Break if saved action is ta_widen_insn at same offset.
1667 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1669 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
1670 to elf32_arm_stub_long_branch_any_arm_pic.
1671 (elf32_arm_stub_long_branch_any_thumb_pic): New.
1672 (enum elf32_arm_stub_type, arm_type_of_stub)
1673 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
1676 2009-02-24 Joseph Myers <joseph@codesourcery.com>
1678 * elf32-arm.c (PREV_SEC): Update comment.
1679 (group_sections): Rename argument to stubs_always_after_branch.
1680 Reverse the list and place stubs at the end of input sections.
1682 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
1684 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
1686 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
1688 (arm_size_one_stub): Remove unnecessary break.
1689 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
1691 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1693 * elf32-arm.c (stub_insn_type): New type.
1694 (stub_reloc_type): Likewise.
1695 (insn_sequence): Likewise.
1696 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
1697 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
1698 (elf32_arm_stub_long_branch_thumb_only): Likewise.
1699 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1700 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
1701 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
1702 (elf32_arm_stub_hash_entry): Add new helper fields.
1703 (stub_hash_newfunc): Initialize these new fields.
1704 (arm_build_one_stub): Encode Arm and Thumb instructions separately
1705 to take endianness into account.
1706 (arm_size_one_stub): Compute size of stubs using insn_sequence.
1707 (arm_map_one_stub): Code is now more generic, thanks to
1710 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
1712 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1714 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1715 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1716 BLX is not available. Fix typo in warning message. Add comments
1717 and improve formatting.
1718 (arm_build_one_stub): Adjust to new
1719 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1720 (arm_map_one_stub): Likewise.
1722 2009-02-23 Tristan Gingold <gingold@adacore.com>
1723 Eric Botcazou <ebotcazou@adacore.com>
1724 Douglas B Rupp <rupp@gnat.com>
1726 * vms.h: Update copyright year, fix comments, reorder declarations.
1727 (_bfd_save_vms_section): Remove the prototype.
1728 (EGPS_S_V_NO_SHIFT): New constant.
1729 (bfd_vms_set_section_flags): New prototype.
1730 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1732 (EGSY_S_W_FLAGS): Ditto.
1733 (EGSY_S_V_QUAD_VAL): Ditto.
1734 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1735 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1736 EGST_S_B_NAMLNG): Ditto.
1737 (ESRF_S_B_NAMLNG): Ditto.
1738 (ETIR_S_C_HEADER_SIZE): Ditto.
1739 (EGPS_S_V_ALLOC_64BIT): Ditto.
1740 (DST_S_C_EPILOG): Ditto.
1741 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1742 (DST_S_C_SRC_INCRLNUM_B): Ditto.
1743 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1744 (DST_S_L_PCLINE_UNSLONG): Ditto.
1745 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1746 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1747 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1748 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1749 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1750 (DST_S_B_SRC_UNSBYTE): Ditto.
1751 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1753 (vms_section, vms_reloc): Remove types.
1754 (hdr_struc): Replaced by ...
1755 (hdr_struct): ... new type.
1756 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1757 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1758 (EMH_DATE_LENGTH): Ditto.
1759 (eom_struc): Replaced by ...
1760 (eom_struct): ... new type.
1761 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1762 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1763 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1764 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1765 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1766 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1767 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1768 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1769 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1770 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1771 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1772 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1773 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1774 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1775 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1776 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1777 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1778 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1779 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1780 (enum file_type_enum): New type.
1781 (struct location_struct): Removed.
1782 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1783 (struct funcinfo, struct module): Ditto.
1784 (struct vms_private_data_struct): Update fields.
1785 (struct vms_section_data_struct): New type.
1787 * vms.c: Update copyright year, fix comments,
1788 Fix includes for DECC, add prototypes.
1789 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1791 Use flavour to set is_vax, location_stack is removed.
1792 (struct pair): Declare.
1793 (fill_section_ptr): Initialize variables at declaration.
1794 Add guard to set SECTION_SYM flag, handlde und section.
1795 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1796 (_bfd_vms_slurp_object_records): New function, replaces previous
1798 (vms_slurp_module): New function.
1799 (vms_slurp_image): Ditto.
1800 (vms_object_p): Complete rewrite.
1801 (vms_mkobject): Use is_vax field to slect architecture.
1802 (free_reloc_stream): New function.
1803 (vms_convert_to_var): Ditto.
1804 (vms_convert_to_var_1): Ditto.
1805 (vms_convert_to_var_unix_filename): Ditto.
1806 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1808 (vms_new_section_hook): Set alignment to 0, allocate private data.
1809 (vms_get_section_contents): Load content.
1810 (vms_get_symbol_info): Handle undefined section.
1811 (vms_find_nearest_line): Handle.
1812 (alloc_reloc_stream): New function.
1813 (vms_slurp_reloc_table): Ditto.
1814 (vms_get_reloc_upper_bound): Make it real.
1815 (vms_canonicalize_reloc): Do the real work.
1816 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1818 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1819 (vms_set_arch_mach): Check arch.
1820 (vms_set_section_contents): Copy the content after allocation.
1821 (vms_alpha_vec): Update object flags.
1823 * vms-tir.c: Update copyright year, fix comments,
1824 add prototypes for new functions.
1825 (dst_define_location): New function.
1826 (dst_restore_location): New function.
1827 (dst_retrieve_location): New function.
1828 (dst_check_allocation): New function.
1829 (image_dump): Call dst_check_allocation.
1830 (image_write_b): Ditto.
1831 (image_write_w): Ditto.
1832 (image_write_l): Ditto.
1833 (image_write_q): Ditto.
1834 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1835 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1837 Call error handler instead of abort if name is not known.
1838 (etir_sta): Add quarter_relocs argument and set it.
1841 (etir_opr): Ditto, return FALSE in case of error.
1842 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1843 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1844 (etir_stc): Add quarter_relocs argument and set it, fix cast.
1845 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1846 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1847 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1848 Return FALSE in case of error.
1849 (tir_sta): Change sign of psect.
1851 (tir_cmd): Fix cast. Makes tir_table static const.
1852 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1853 add argument to explain.
1854 (analyze_etir): Initialize maxptr, add quarter_relocs
1855 declaration, move some declarations into inner scopes.
1856 Handle quarter_relocs and STO_IMM.
1857 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1858 (_bfd_vms_slurp_relocs): New function.
1859 (_bfd_vms_decode_relocs): New function.
1860 (sto_imm): Rewritten.
1861 (start_first_etbt_record): New function.
1862 (start_another_etbt_record): Ditto.
1863 (etir_output_check): Ditto.
1864 (defer_reloc_p): Ditto.
1865 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1866 a for-loop. Correctly deals with contents, deals with .vmsdebug,
1867 rewritte relocations handling.
1868 (_bfd_vms_write_tbt): Removed.
1869 (_bfd_vms_write_dbg): Ditto.
1871 * vms-misc.c: Update copyright year, Fix comments.
1872 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1873 (maybe_adjust_record_pointer_for_object): New function.
1874 (_bfd_vms_get_first_record): New function, replaces ...
1875 (_bfd_vms_get_record): .. removed.
1876 (_bfd_vms_get_object_record): New function.
1877 (_bfd_vms_get_object_record): New function.
1878 (vms_get_remaining_object_record): New function, replaces ...
1879 (_bfd_vms_get_next_record): ... removed.
1880 (add_new_contents): Removed.
1881 (_bfd_save_vms_section): Removed.
1882 (_bfd_get_vms_section): Removed.
1883 (_bfd_vms_output_flush): Write in VAR format.
1884 (new_symbol): Don't make UND section.
1886 * vms-hdr.c: Update copyright year, update list of record handled.
1887 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1888 (_bfd_vms_write_hdr): Strip vms and unix patches,
1889 add comments, truncate module name at 31 characters,
1890 use constants instead of hard-coded value,
1891 write BFD version instead of a fixed string.
1892 (_bfd_vms_slurp_ihd): New function.
1893 (_bfd_vms_slurp_isd): Ditto.
1894 (_bfd_vms_slurp_ihs): Ditto.
1895 (new_module): Ditto.
1896 (parse_module): Ditto
1897 (build_module_list): Ditto.
1898 (module_find_nearest_line): Ditto.
1899 (_bfd_vms_find_nearest_dst_line): Ditto.
1900 (vms_slurp_debug): Ditto.
1901 (_bfd_vms_slurp_dbg): Ditto.
1902 (_bfd_vms_slurp_tbt): Ditto.
1903 (_bfd_vms_write_dbg): Ditto.
1904 (_bfd_vms_write_tbt): Ditto.
1906 * vms-gsd.c: Update copyright year, update list of records handled.
1907 (EVAX_LITERALS_NAME): New macro.
1908 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1909 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1910 (register_universal_symbol): New function and prototype.
1911 (_bfd_vms_slurp_gsd): Fix indentations and casts,
1912 improve debug messages,
1913 use constants instead of hard-coded value,
1914 fix missing endianness conversion,
1915 handle global symbol (SYMG).
1916 (bfd_vms_set_section_flags): New function.
1917 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1918 handle section literals,
1920 handle section bfd and vms flags,
1921 don't output LIB$INITIALIZE symbol,
1922 fix handling of weak symbols,
1923 fix evax vs vax procedure descriptor,
1924 handle absolute symbols.
1926 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1927 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1929 * makefile.vms (DEFS): Fix flags for VMS.
1931 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1933 * bfd-in2.h: Regenerated.
1934 * libbfd.h: Regenerated.
1936 2009-02-20 Cary Coutant <ccoutant@google.com>
1938 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1941 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1944 * coffcode.h (coff_write_object_contents): Don't let the string
1945 table offset overflow the s_name field when using long section names.
1947 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1949 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
1950 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1951 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1952 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
1953 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1954 (bfd_pmac_xcoff_backend_data): Likewise.
1955 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
1956 (bfd_xcoff_aix5_backend_data): Likewise.
1957 (xcoff64_write_object_contents): Delete unused long_section_names
1959 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
1960 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1962 * coffcode.h (documentation): Update to describe long section names.
1963 (COFFLONGSECTIONCATHELPER): New helper macro.
1964 (BLANKOR1TOODD): Likewise.
1965 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
1966 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
1967 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
1968 (bfd_coff_set_long_section_names_allowed): New function.
1969 (bfd_coff_set_long_section_names_disallowed): Likewise.
1970 (struct bfd_coff_backend_data): Add new backend hook function
1971 pointer _bfd_coff_set_long_section_names.
1972 (bfd_coff_set_long_section_names): New backend hook.
1973 (coff_write_object_contents): Only generate long section names if
1974 bfd_coff_long_section_names() indicates they are currently enabled.
1975 (bfd_coff_std_swap_table): Make non-const, and initialise long
1976 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1977 (ticoff0_swap_table): Likewise to both.
1978 (ticoff1_swap_table): Again, likewise to both.
1979 * coffgen.c (make_a_section_from_file): Allow long section names
1980 as inputs even if not currently allowed for outputs.
1981 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
1982 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
1983 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1984 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1985 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1986 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1987 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1988 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1989 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1990 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1991 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
1992 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
1993 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
1994 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
1995 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
1996 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
1997 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1998 * libcoff-in.h: Update copyright year to cause updated copyright
1999 year in generated libcoff.h, and fix typo.
2000 * libcoff.h: Regenerated.
2001 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
2002 (_bfd_ecoff_no_long_sections): Add prototype.
2003 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
2004 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
2005 defined by an including .c file.
2006 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
2007 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
2008 (ticoff1_swap_table): Likewise to both.
2010 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
2012 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
2013 stub. Catch default case error.
2014 (arm_map_one_stub): Add missing Thumb mapping symbol.
2016 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
2019 * elf32-avr.c: Handle case where no local symbos exist correctly.
2021 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
2024 * elf32-arm.c (arm_long_branch_stub,
2025 arm_thumb_v4t_long_branch_stub,
2026 arm_thumb_thumb_long_branch_stub,
2027 arm_thumb_arm_v4t_long_branch_stub,
2028 arm_thumb_arm_v4t_short_branch_stub,
2029 arm_pic_long_branch_stub):
2030 Renamed to elf32_arm_stub_long_branch_any_any,
2031 elf32_arm_stub_long_branch_v4t_arm_thumb,
2032 elf32_arm_stub_long_branch_thumb_only,
2033 elf32_arm_stub_long_branch_v4t_thumb_arm,
2034 elf32_arm_stub_short_branch_v4t_thumb_arm,
2035 elf32_arm_stub_long_branch_any_any_pic.
2036 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
2037 arm_thumb_thumb_stub_long_branch,
2038 arm_thumb_arm_v4t_stub_long_branch,
2039 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
2040 Renamed to arm_stub_long_branch_any_any,
2041 arm_stub_long_branch_v4t_arm_thumb,
2042 arm_stub_long_branch_thumb_only,
2043 arm_stub_long_branch_v4t_thumb_arm,
2044 arm_stub_short_branch_v4t_thumb_arm,
2045 arm_stub_long_branch_any_any_pic.
2047 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2049 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
2050 in branch offset check.
2052 2009-02-15 Alan Modra <amodra@bigpond.net.au>
2054 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
2055 add toc.symndx and toc.add.
2056 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
2058 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
2060 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
2061 (branch_reloc_hash_match): New function, extracted from..
2062 (ppc64_elf_tls_optimize): ..here.
2063 (ppc64_elf_relocate_section): Properly set addends when optimizing
2064 tls sequences. Avoid unnecessary reading and writing of insns.
2065 Only redo reloc when symbol changed. Bypass symbol checks when
2067 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
2068 (branch_reloc_hash_match): New function, extracted from..
2069 (ppc_elf_tls_optimize): ..here.
2070 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
2071 Don't clear addend on zapped __tls_get_addr reloc.
2073 2009-02-12 Nick Clifton <nickc@redhat.com>
2076 * elflink.c (bfd_elf_final_link): When counting the relocations,
2077 if the header size has not been set yet then assume that it will
2078 match the output section's reloc type.
2080 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
2082 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
2085 2009-02-09 Alan Modra <amodra@bigpond.net.au>
2087 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
2088 (find_function): Likewise.
2089 (pasted_function): Don't error if no prior function found.
2090 (discover_functions): Revert 2008-12-10 change. Extend first
2091 function range to start of section.
2093 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2095 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
2097 * elf64-hppa.h: Likewise.
2099 2009-02-06 Joseph Myers <joseph@codesourcery.com>
2101 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
2104 2009-02-04 Alan Modra <amodra@bigpond.net.au>
2106 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
2107 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
2109 2009-02-03 Sandip Matte <sandip@rmicorp.com>
2111 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
2112 * archures.c (bfd_mach_mips_xlr): Define.
2113 * bfd-in2.h: Regenerate.
2114 * cpu-mips.c (I_xlr): Define.
2115 (arch_info_struct): Add XLR entry.
2116 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
2117 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
2118 (mips_mach_extensions): Add XLR entry.
2120 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
2122 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
2124 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
2126 * configure.in: AC_SUBST pdfdir.
2127 * Makefile.am: Add install-pdf, install-pdf-am
2128 and install-pdf-recursive targets. Define pdfdir.
2129 * doc/Makefile.am: Define pdf__strip_dir. Add
2130 install-pdf and install-pdf-am targets.
2131 * po/Make-in: Add install-pdf target.
2132 * configure: Regenerate.
2133 * Makefile.in: Regenerate
2134 * doc/Makefile.in: Regenerate.
2136 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
2138 * bfd-in2.h: Regenerate.
2139 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
2140 fields from n_entries to n_slots where appropriate, update comments.
2141 (HOWTO): Add TLS relocations.
2142 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
2143 (enum elf_m68k_got_offset_size): New enum.
2144 (struct elf_m68k_got_entry.type): Move field to ...
2145 (struct elf_m68k_got_entry_key): ... here. Update all uses.
2146 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
2148 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
2150 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
2151 fields into n_entries array. Update comments.
2152 (elf_m68k_init_got): Simplify, update all uses.
2153 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
2154 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
2155 GOT entries; update name, update all uses.
2156 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
2157 (elf_m68k_get_got_entry): Update.
2158 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
2160 (elf_m68k_remove_got_entry_type): Simplify.
2161 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
2162 (elf_m68k_can_merge_gots): Update.
2163 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
2164 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
2165 GOT entries, simplify.
2166 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
2167 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
2168 field, remove obsoleted local_n_entries field.
2169 (elf_m68k_partition_multi_got_2): New static function.
2170 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
2172 (elf_m68k_remove_got_entry_type): Update.
2173 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2174 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
2175 update of sgot->size and srelgot->size.
2176 (elf_m68k_gc_sweep_hook): Update.
2177 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2178 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
2180 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2181 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2183 2009-02-02 DJ Delorie <dj@redhat.com>
2185 * elf32-mep.c (config_names): Regenerate configuration.
2187 2009-02-02 Alan Modra <amodra@bigpond.net.au>
2189 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
2190 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
2191 * elf.c (bfd_elf_get_str_section): Make static.
2192 (bfd_elf_find_section): Delete.
2193 * libbfd.h: Regenerate.
2195 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2197 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
2198 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2200 2009-01-31 Alan Modra <amodra@bigpond.net.au>
2202 * elflink.c (on_needed_list): New function.
2203 (elf_link_add_object_symbols): Link in --as-needed libs if they
2204 satisfy undefined symbols in other libs.
2206 2009-01-30 Julian Brown <julian@codesourcery.com>
2208 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
2209 EXEC_P or DYNAMIC flags, and skip sections which are being linked
2210 with --just-symbols (-R).
2212 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
2214 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
2215 high_pc in order to properly sign-extend VMAs.
2217 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
2218 Mark Shinwell <shinwell@codesourcery.com>
2219 Catherine Moore <clm@codesourcery.com>
2221 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2223 2009-01-28 Catherine Moore <clm@codesourcery.com>
2225 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
2226 SEC_LOAD for dynamic relocation sections.
2228 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2230 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
2231 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
2232 the size of local TLS data.
2234 2009-01-27 Andreas Schwab <schwab@suse.de>
2236 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
2237 architectures in the archive.
2239 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
2241 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
2242 <R_CRIS_32_DTPREL>: Correct relocation value.
2244 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
2245 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
2246 symbols with non-default visibility.
2248 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
2250 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
2251 describing the trampolines.
2252 (ppc_elf_relocate_section): Update relocs to describe the
2255 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2257 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
2258 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
2259 and R_PARISC_PCREL12F relocations.
2261 2009-01-24 Alan Modra <amodra@bigpond.net.au>
2264 * elflink.c (find_version_for_sym): New function split out from,
2265 but without export_dynamic test, ..
2266 (_bfd_elf_link_assign_sym_version): ..here.
2267 (_bfd_elf_export_symbol): Use it.
2269 2009-01-23 Alan Modra <amodra@bigpond.net.au>
2271 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
2272 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
2273 * elflink.c: ..here, somewhat modified.
2274 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
2275 _bfd_elf_link_find_version_dependencies,
2276 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
2277 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2278 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
2280 * elflink.c: ..and make static here.
2281 (_bfd_elf_link_find_version_dependencies): Adjust for removal
2282 of output_bfd from struct elf_find_verdep_info.
2283 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
2284 struct elf_info_failed.
2285 (bfd_elf_size_dynamic_sections): Adjust.
2287 2009-01-22 Alan Modra <amodra@bigpond.net.au>
2290 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
2291 after comp_unit_find_line call.
2293 2009-01-21 Nick Clifton <nickc@redhat.com>
2296 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
2297 tm_gmtoff field in struct tm.
2299 2009-01-21 Alan Modra <amodra@bigpond.net.au>
2301 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
2302 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
2303 sections in soft-icache lines unless non_ia_text. Don't add
2304 rodata if doing so would exceed line size.
2306 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
2308 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
2309 types than bfd_link_hash_indirect, before early return, call
2310 _bfd_elf_link_hash_copy_indirect.
2312 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2314 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
2315 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
2316 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
2317 (elf_backend_obj_attrs_order): New define.
2318 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
2319 (elfNN_bed): Add elf_backend_obj_attrs_order.
2321 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2323 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
2324 (obj_attr_size): Likewise.
2325 (write_obj_attribute): Likewise.
2326 (_bfd_elf_copy_obj_attributes): Likewise.
2327 (_bfd_elf_parse_attributes): Likewise.
2328 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
2329 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
2330 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
2331 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
2332 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
2335 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
2337 * elf-attrs.c (is_default_attr): Support defaultless attributes.
2338 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
2339 (bfd_elf_add_obj_attr_string): Likewise.
2340 (bfd_elf_add_obj_attr_int_string): Likewise.
2341 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
2342 * elf-bfd.h (struct obj_attribute): Document new flag bit.
2343 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
2344 Tag_nodefaults has no default value.
2345 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
2346 comment to reflect the new state.
2348 2009-01-19 Alan Modra <amodra@bigpond.net.au>
2351 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
2352 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
2353 (adjust_z_magix): Delete dead code handling QMAGIC.
2355 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
2357 * coffcode.h (styp_to_sec_flags): Correct interpretation of
2358 IMAGE_SCN_MEM_DISCARDABLE.
2360 2009-01-16 Alan Modra <amodra@bigpond.net.au>
2362 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
2363 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
2364 * configure.in (commonbfdlib): Delete.
2365 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
2366 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
2367 is available, not just for linux.
2368 * po/SRC-POTFILES.in: Regenerate.
2369 * Makefile.in: Regenerate.
2370 * configure: Regenerate.
2372 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2373 Julian Brown <julian@codesourcery.com>
2375 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
2376 ARM attributes in ABI 2.07.
2377 * elf32-arm.c (get_secondary_compatible_arch): New function.
2378 (set_secondary_compatible_arch): New function.
2379 (tag_cpu_arch_combine): New function.
2380 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
2381 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
2382 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
2383 make it fit with order_01243.
2384 Add support for Tag_also_compatible_with,
2385 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
2386 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
2387 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
2388 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
2389 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
2390 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
2391 Rework the way unknown attributes are handled.
2392 Defer errors until all attributes have been processed.
2394 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
2396 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
2397 bfd_elf_add_obj_attr_int_string.
2398 Read Tag_compatibility from its new location in the attribute array,
2399 rather than the attribute list.
2400 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
2401 bfd_elf_add_obj_attr_int_string.
2402 (_bfd_elf_parse_attributes): Likewise.
2403 (_bfd_elf_merge_object_attributes): There's now only one
2404 Tag_compatibility, and it's in the array, not the list.
2405 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
2407 (bfd_elf_add_obj_attr_compat): Rename to
2408 bfd_elf_add_obj_attr_int_string.
2409 (bfd_elf_add_proc_attr_compat): Rename to
2410 bfd_elf_add_proc_attr_int_string.
2411 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
2414 2009-01-15 Douglas B Rupp <rupp@gnat.com>
2416 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
2417 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
2418 (vmsutil.lo): Add dependency rule.
2419 * Makefile.in: Regenerate.
2420 * config.bfd (ia64*-*-*vms*): Add case.
2421 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
2422 * configure: Regenerate.
2423 * vmsutil.c: New file.
2424 * vmsutil.h: New file.
2425 * elf-bfd.h (struct bfd_elf_special_section): Change type of
2427 * elfxx-ia64.c (elfNN_vms_post_process_headers,
2428 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
2429 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
2430 elfNN_vms_object_p): New functions
2431 * targets.c (bfd_elf64_ia64_vms_vec): New target.
2433 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
2436 * elflink.c (elf_gc_sweep): Exclude the group section if the
2437 first member of the section group is excluded.
2439 2009-01-14 Alan Modra <amodra@bigpond.net.au>
2442 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
2443 saved filename, use bfd_alloc rather than bfd_malloc for it.
2445 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2447 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2449 2009-01-13 Alan Modra <amodra@bigpond.net.au>
2451 * elf32-spu.c (remove_cycles): Always set call->max_depth.
2453 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2455 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2457 2009-01-12 Alan Modra <amodra@bigpond.net.au>
2459 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
2461 (struct got_entry): Add br_addr.
2462 (struct call_info): Add priority.
2463 (struct function_info): Add lr_store and sp_adjust.
2464 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
2465 (spu_elf_find_overlays): For soft-icache, mark any section within cache
2466 area as an overlay, and check that no other overlays exist. Look up
2467 icache overlay manager entry sym.
2468 (BRA_STUBS, BRA, BRASL): Define.
2469 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
2470 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
2472 (count_stub, build_stub): Support soft-icache.
2473 (build_spuear_stubs, process_stubs): Adjust build_stub call.
2474 (spu_elf_size_stubs): Size soft-icache stubs.
2475 (overlay_index): New function.
2476 (spu_elf_build_stubs): Make static. Support soft-icache.
2477 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
2478 (find_function_stack_adjust): Save lr store and stack adjust insn
2480 (maybe_insert_function): Adjust find_function_stack_adjust call.
2481 (mark_functions_via_relocs): Retrieve priority.
2482 (remove_cycles): Only warn about pruned arcs when stack_analysis.
2483 (sort_calls): Sort by priority first.
2484 (mark_overlay_section): Ignore .ovl.init.
2485 (sum_stack): Only print when stack_analysis.
2486 (print_one_overlay_section): New function, extracted from..
2487 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
2488 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
2489 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
2490 analysis. Call spu_elf_build_stubs.
2491 (spu_elf_relocate_section): For soft-icache encode overlay index
2493 (spu_elf_output_symbol_hook): Support soft-icache.
2494 (spu_elf_modify_program_headers: Likewise.
2496 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
2497 num_regions to num_lines. Add line_size and max_branch.
2498 (enum _ovly_flavour): Add ovly_soft_icache.
2499 (spu_elf_build_stubs): Delete.
2501 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2503 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
2504 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2506 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
2508 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2509 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2510 the program, the known offset starts at the negative size of the
2512 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2515 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
2517 * config.bfd: Add lm32-*-rtems*.
2519 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
2521 * coff-ppc.c: Add 2009 to Copyright.
2522 * elf32-cris.c: Likewise.
2523 * elflink.c: Likewise.
2525 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
2527 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2528 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2530 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2533 * elflink.c (elf_merge_st_other): New.
2534 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2535 hide them if needed.
2536 (elf_link_add_object_symbols): Updated.
2538 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2541 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2542 ref_dynamic and dynamic_def fields when setting def_regular
2545 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
2548 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2551 For older changes see ChangeLog-2008
2557 version-control: never