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