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