2010-03-02 Christophe Lyon <christophe.lyon@st.com>
[external/binutils.git] / bfd / ChangeLog
1 2010-03-02  Christophe Lyon  <christophe.lyon@st.com>
2         Alan Modra  <amodra@gmail.com>
3
4         * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
5         destination mode of the a8 stub.
6         (elf32_arm_link_hash_table): Add top_id field.
7         (elf32_arm_link_hash_table_create): Initialize top_id.
8         (arm_type_of_stub): Update prototype, st_type can now be updated
9         by this function. Actual destination address in case of PLT is
10         computed here, to help factorizing code.
11         (elf32_arm_stub_name): Update prototype, use stub_type additional
12         parameter to build stub name.
13         (elf32_arm_get_stub_entry): Update prototype, use stub_type
14         additional parameter to build stub entry.
15         (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
16         put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
17         Call elf32_arm_final_link_relocate to process all in-stub
18         relocations.
19         (elf32_arm_setup_section_lists): Update top_id.
20         (cortex_a8_erratum_scan): Record stub destination mode.
21         (elf32_arm_size_stubs): Update call to arm_type_of_stub according
22         to new prototype.
23         (elf32_arm_final_link_relocate): Enable processing of in-stub
24         REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
25         needed, enabling code factorization.
26         (elf32_arm_final_link): Process stub sections.
27         (elf32_arm_output_map_sym): Add entry to code/data map.
28
29 2010-03-01  David S. Miller  <davem@davemloft.net>
30
31         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
32         h->def_regular, set h->ref_regular.
33         (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
34         and dynamic relocations if h->ref_regular.
35
36         * elfxx-sparc.c (struct elf_reloc_map): Delete.
37         (sparc_reloc_map): Delete.
38         (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
39         relocation type in switch statements.
40
41 2010-02-25  Alan Modra  <amodra@gmail.com>
42
43         PR ld/11304
44         * elf.c (_bfd_elf_init_private_section_data): Rename need_group
45         to final_link and invert.  For final link allow some flags to
46         differ.  Don't specially allow flags to be all zero.
47
48 2010-02-24  Alan Modra  <amodra@gmail.com>
49
50         PR binutils/10858
51         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
52         SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
53         table.
54
55 2010-02-23  Andrew Zabolotny  <anpaza@mail.ru>
56
57         PR binutils/11297
58         * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
59         (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
60
61 2010-02-22  Alan Modra  <amodra@gmail.com>
62
63         * reloc.c (bfd_check_overflow): When forming addrmask, shift
64         fieldmask left by rightshift.
65         (_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
66         overflow checks.
67
68 2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>
69
70         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
71         STT_GNU_IFUNC on large common symbol.
72
73 2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>
74
75         * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
76         has_ifunc_symbols if the symbol comes from a shared library.
77         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
78         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
79         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
80         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
81         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
82
83 2010-02-19  Alan Modra  <amodra@gmail.com>
84
85         * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
86         (_bfd_elf_copy_private_header_data): ..here.
87         * elflink.c (_bfd_elf_size_group_sections): New function.
88         (bfd_elf_size_dynamic_sections): Call it.
89         * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
90         (_bfd_elf_fixup_group_sections): Declare.
91
92 2010-02-18  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
93
94         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
95         merging Tag_DIV_use, Tag_MPextension_use, and
96         Tag_MPextension_use_legacy tags.
97
98 2010-02-18  Alan Modra  <amodra@gmail.com>
99
100         * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
101         commit.  Don't write zeros for removed group members.
102         (_bfd_elf_copy_private_header_data): Adjust size of group section
103         when group members are removed by objcopy.
104
105 2010-02-15  Dave Korn  <dave.korn.cygwin@gmail.com>
106
107         PR binutils/11280
108         * configure.host (*-*-solaris2.11):  Add host define to select
109         valid default code page for windres/windmc on solaris.
110
111 2010-02-15  Nick Clifton  <nickc@redhat.com>
112
113         * po/vi.po: Updated Vietnamese translation.
114
115 2010-02-12  Daniel Gutson  <dgutson@codesourcery.com>
116
117         * elf32-arm.c (elf32_arm_output_arch_local_syms): add
118         missing mapping symbol to data only sections.
119
120 2010-02-11  David S. Miller  <davem@davemloft.net>
121
122         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
123         and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
124         symbols.
125         (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
126         these relocs on global symbols.
127         (gdopoff): New.
128         (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
129         local symbol references which are not STT_GNU_IFUNC.  Handle
130         relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
131         and deal with negative vs. non-negative values properly.
132
133 2010-02-09  Tristan Gingold  <gingold@adacore.com>
134
135         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
136         non-external relocation.
137
138 2010-02-09  Alan Modra  <amodra@gmail.com>
139
140         * elf64-ppc.c (merge_got_entries): Move earlier in file.
141         (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
142         (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
143         (ppc64_elf_layout_multitoc): Don't resize if we have already
144         merged got entries.
145
146 2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>
147
148         * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
149         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
150         elfcore_write_s390_prefix): New.
151         * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
152         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
153         elfcore_write_s390_prefix): New.
154         (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
155         NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
156         (elfcore_write_register_note): Handle .reg-s390-timer, 
157         .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
158         .reg-s390-prefix section.
159
160 2010-02-09  Alan Modra  <amodra@gmail.com>
161
162         * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
163         unsigned char.  Update variables and code using them throughout file.
164         (struct ppc_link_hash_entry): Likewise for tls_mask.
165
166         * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
167
168         * elf64-ppc.c (has_small_toc_reloc): Don't define.
169         (makes_toc_func_call, call_check_in_progress): Shuffle flags.
170         (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
171         code setting the flag.
172         (ppc64_elf_next_toc_section): Group big-toc sections in
173         0x80008000 chunks.
174
175 2010-02-08  David S. Miller  <davem@davemloft.net>
176
177         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
178         srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
179
180         * elfxx-sparc.c (create_got_section): Delete.
181         (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
182         section creator does that work for us.  Use ->elf.foo instead of
183         ->foo where applicable.
184         (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
185         where applicable.
186         (allocate_dynrelocs): Likewise.
187         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
188         (_bfd_sparc_elf_relocate_section): Likewise.
189         (sparc_vxworks_build_plt_entry): Likewise.
190         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
191         (sparc_finish_dyn): Likewise.
192         (sparc_vxworks_finish_exec_plt): Likewise.
193         (sparc_vxworks_finish_shared_plt): Likewise.
194         (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
195
196         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
197         macros for visibilty and locality checks.
198         (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
199         (allocate_dynrelocs): Likewise.
200         (_bfd_sparc_elf_relocate_section): Likewise.
201         (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
202
203         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
204         but never used local var 'dynobj'.
205
206         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
207         nocopyreloc.
208
209         * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
210         (BFD_RELOC_SPARC_IRELATIVE): Likewise.
211         * bfd-in2.h: Regenerate.
212         * libbfd.h: Regenerate.
213
214         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
215         and loc_hash_memory.
216         (_bfd_sparc_elf_link_hash_table_free): Declare.
217         * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
218         (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
219         bfd_elf32_bfd_link_hash_table_free): Define.
220         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
221         has_ifunc_symbols if STT_GNU_IFUNC.
222         (bfd_elf64_bfd_link_hash_table_free): Define.
223         (elf_backend_post_process_headers): Define always.
224         * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
225         (sparc_reloc_map): Add entries for new IFUNC relocs.
226         (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
227         (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
228         (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
229         elf_sparc_get_local_sym_hash): New.
230         (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
231         from here...
232         (_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
233         local hash table.
234         (_bfd_sparc_elf_link_hash_table_free): New.
235         (create_ifunc_sections): New.
236         (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
237         and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
238         cons up a fake local hash table entry for it.  Unconditionally add
239         a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
240         dyn relocs for ifunc.
241         (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
242         (allocate_dynrelocs):  Unconditionally emit a PLT entry when
243         STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
244         (allocate_local_dynrelocs): New function.
245         (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
246         table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
247         like splt.
248         (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
249         (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
250         plt in iplt/irelplt.
251
252 2010-02-08  Richard Sandiford  <r.sandiford@uk.ibm.com>
253
254         * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
255         max_contents_size, only consider sections whose contents must
256         be swapped in.
257
258 2010-02-09  Alan Modra  <amodra@gmail.com>
259
260         * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
261         (ppc64_elf_size_dynamic_sections): ..and here..
262         (merge_got_entries): ..rather than here.
263
264 2010-02-09  Alan Modra  <amodra@gmail.com>
265
266         * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
267         (has_small_toc_reloc): Define.
268         (ppc64_elf_check_relocs): Set the above flags.
269         (ppc64_elf_edit_opd): Delete obfd param.
270         (ppc64_elf_tls_optimize): Likewise.
271         (ppc64_elf_edit_toc): Likewise.
272         (ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
273         * elf64-ppc.h: Update prototypes.
274
275 2010-02-08  Alan Modra  <amodra@gmail.com>
276
277         * section.c (struct bfd_section): Delete has_tls_reloc,
278         has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
279         Add sec_flg0 thru sec_flg5.
280         (BFD_FAKE_SECTION): Update for changed flags.
281         * ecoff.c (bfd_debug_section): Likewise.
282         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
283         * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
284         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
285         * elf32-xtensa.c (reloc_done): Define.
286         * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
287         * bfd-in2.h: Regenerate.
288
289 2010-02-08  Tristan Gingold  <gingold@adacore.com>
290
291         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
292         for non-scattered relocations.
293
294 2010-02-08  Nathan Sidwell  <nathan@codesourcery.com>
295
296         * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
297         apuinfo sections, only scan input sections once and reuse the
298         buffer.
299
300 2010-02-08  Philipp Tomsich  <philipp.tomsich@theobroma-systems.com>
301
302         * archures.c (bfd_mach_ppc_titan): Define.
303         * bfd-in2.h: Regenerate.
304         * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
305
306 2010-02-08  Alan Modra  <amodra@gmail.com>
307
308         * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
309
310 2010-02-05  Sterling Augustine  <sterling@tensilica.com>
311
312         * elf.c (assign_file_positions_for_load_sections) Update lma of
313         section if necessary.  Fixes Bugzilla 11219.
314
315 2010-02-05  H.J. Lu  <hongjiu.lu@intel.com>
316
317         * elf32-i386.c: Remove trailing white spaces.
318         * elf64-x86-64.c: Likewise.
319
320 2010-02-03  Nick Clifton  <nickc@redhat.com>
321
322         * elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
323         entries for other architectures.
324         (struct elf_link_hash_table): Add hash_table_id field.
325         (elf_hash_table_id): New accessor macro.
326         * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
327         parameter.
328         * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
329         returning cast pointer.
330         (elf32_mn10300_link_hash_table_create): Identify new table as
331         containing MN10300 extensions.
332         (mn10300_elf_relax_section): Check pointer returned by
333         elf32_mn10300_hash_table.
334         * elf32-arm.c: Likewise, except using ARM extensions.
335         * elf32-avr.c: Likewise, except using AVR extensions.
336         * elf32-bfin.c: Likewise, except using BFIN extensions.
337         * elf32-cris.c: Likewise, except using CRIS extensions.
338         * elf32-frv.c: Likewise, except using FRV extensions.
339         * elf32-hppa.c: Likewise, except using HPPA32 extensions.
340         * elf32-i386.c: Likewise, except using I386 extensions.
341         * elf32-lm32.c: Likewise, except using LM32 extensions.
342         * elf32-m32r.c: Likewise, except using M32RM extensions.
343         * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
344         * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
345         * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
346         * elf32-m68k.c: Likewise, except using M68K extensions.
347         * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
348         * elf32-ppc.c: Likewise, except using PPC32 extensions.
349         * elf32-s390.c: Likewise, except using S390 extensions.
350         * elf32-sh.c: Likewise, except using SH extensions.
351         * elf32-spu.c: Likewise, except using SPU extensions.
352         * elf32-xtensa.c: Likewise, except using XTENSA extensions.
353         * elf64-alpha.c: Likewise, except using ALPHA extensions.
354         * elf64-hppa.c: Likewise, except using HPPA64 extensions.
355         * elf64-ppc.c: Likewise, except using PPC64 extensions.
356         * elf64-s390.c: Likewise, except using S390 extensions.
357         * elf64-x86-64.c: Likewise, except using X86_64 extensions.
358         * elfxx-ia64.c: Likewise, except using IA64 extensions.
359         * elfxx-mips.c: Likewise, except using MIPS extensions.
360         * elfxx-sparc.c: Likewise, except using SPARC extensions.
361         * elfxx-sparc.h: Likewise, except using SPARC extensions.
362         * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
363         redundant structure.
364         (elf32_cr16_hash_table): Delete unused macro.
365         (elf32_cr16_link_hash_traverse): Delete unused macro.
366         * elf32-score.c: Likewise.
367         * elf32-score7.c: Likewise.
368         * elf32-vax.c: Likewise.
369         * elf64-sh64.c: Likewise.
370
371 2010-02-03  Alan Modra  <amodra@gmail.com>
372
373         * elf64-ppc.c (struct plt_entry): Move earlier in file.
374         (struct got_entry): Likewise.  Add is_indirect and got.ent fields.
375         (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
376         Update all uses.
377         (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
378         Remove no_multi_toc.
379         (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
380         when allocating a new struct got_entry.
381         (allocate_got): New function, extracted from..
382         (allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
383         (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
384         .reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
385         (ppc64_elf_setup_section_lists): Remove output_bfd param and
386         no_multi_toc, add add_stub_section and layout_sections_again.  Stash
387         new params in htab.  Extract some code to..
388         (ppc64_elf_start_multitoc_partition): ..here.  New function.
389         (ppc64_elf_next_toc_section): Check for linker script errors.  Handle
390         second pass toc scan.
391         (merge_got_entries, merge_global_got, reallocate_got): New functions.
392         (ppc64_elf_reinit_toc): Rename to..
393         (ppc64_elf_finish_multitoc_partition): ..this.
394         (ppc64_elf_layout_multitoc): New function.
395         (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
396         layout_sections_again params.
397         (ppc64_elf_relocate_section): Handle indirect got entries.
398         * elf64-ppc.h: Update prototypes.  Declare new functions.
399
400 2010-02-02  H.J. Lu  <hongjiu.lu@intel.com>
401
402         * elf-bfd.h (elfcore_write_xstatereg): New.
403
404         * elf.c (elfcore_grok_xstatereg): New.
405         (elfcore_write_xstatereg): Likewise.
406         (elfcore_grok_note): Handle NT_X86_XSTATE.
407         (elfcore_write_register_note): Handle .reg-xstate section.
408
409 2010-02-01  Tristan Gingold  <gingold@adacore.com>
410
411         * som.c (som_write_ar_hdr): Define this macro.
412
413 2010-01-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
414
415         * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
416         R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
417         linkage table pointer to use the global table pointer if not doing
418         a shared link.
419
420 2010-01-29  Joel Brobecker  <brobecker@adacore.com>
421
422         * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
423         if it has already been set.
424
425 2010-01-27  Tristan Gingold  <gingold@adacore.com>
426
427         * vms.h: Remove trailing spaces.
428         (struct hdr_struct): Remove unused hdr_c_cpr field.
429         (enum file_format_enum): Add comments.
430         * vms.c (vms_bfd_print_private_bfd_data): New function that
431         replaces the macro.
432         Remove trailing spaces.
433         * vms-misc.c: Improve comments.
434         (_bfd_vms_get_object_record): Also handle files without pads.
435         * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
436         * vms-gsd.c (struct flagdescstruct): Make name field const.
437         (gsyflagdesc): Fix typo.
438
439 2010-01-27  Alan Modra  <amodra@gmail.com>
440
441         PR ld/11217
442         * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
443         (ppc64_elf_setup_section_lists): Init them.
444         (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
445         and .toc on the same input file.
446         (ppc64_elf_relocate_section): Correct GOT entry offset.
447
448 2010-01-26  Tristan Gingold  <gingold@adacore.com>
449
450         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
451         (bfd_target): Add _bfd_write_ar_hdr_fn field.
452         * archive.c (is_bsd44_extended_name): New macro.
453         (_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
454         (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
455         name.
456         (_bfd_archive_bsd44_construct_extended_name_table): New function.
457         (_bfd_generic_write_ar_hdr): Ditto.
458         (_bfd_bsd44_write_ar_hdr): Ditto.
459         (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
460         (bsd_write_armap): Adjust firstreal computation.
461         * libbfd-in.h (struct areltdata): Add extra_size field.
462         (_bfd_generic_write_ar_hdr): Add prototype.
463         (_bfd_bsd44_write_ar_hdr): Ditto.
464         (_bfd_write_ar_hdr): Define.
465         (_bfd_noarchive_write_ar_hdr): Ditto.
466         (_bfd_archive_bsd_write_ar_hdr): Ditto.
467         (_bfd_archive_coff_write_ar_hdr): Ditto.
468         (_bfd_archive_bsd44_slurp_armap): Ditto.
469         (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
470         (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
471         (_bfd_archive_bsd44_truncate_arname): Ditto.
472         (_bfd_archive_bsd44_write_armap): Ditto.
473         (_bfd_archive_bsd44_read_ar_hdr): Ditto.
474         (_bfd_archive_bsd44_write_ar_hdr): Ditto.
475         (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
476         (_bfd_archive_bsd44_get_elt_at_index): Ditto.
477         (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
478         (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
479         * libbfd.h: Regenerate.
480         * oasys.c (oasys_write_ar_hdr): Define.
481         * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
482         * ieee.c (ieee_write_ar_hdr): Define.
483         * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
484         * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
485         (bfd_pmac_xcoff_backend_data): Ditto.
486         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
487         (bfd_xcoff_aix5_backend_data): Ditto.
488         * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
489         * aout-target.h (MY_write_ar_hdr): Define it if not defined.
490         * aout-tic30.c (MY_write_ar_hdr): Ditto.
491         * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
492         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
493         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
494         (bfd_mach_o_construct_extended_name_table)
495         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
496         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
497         (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
498         * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
499         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
500         (bfd_mach_o_construct_extended_name_table)
501         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
502         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
503         (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
504         * bfd-in2.h: Regenerate.
505
506 2010-01-26  Alan Modra  <amodra@gmail.com>
507             H.J. Lu  <hongjiu.lu@intel.com>
508
509         PR ld/11218
510         * elflink.c (elf_link_output_extsym): Do not ignore undefined
511         symbols with ref_regular set when gc_sections is active.
512
513 2010-01-25  Alan Modra  <amodra@gmail.com>
514
515         PR ld/11217
516         * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
517         with relocations against undefined weak symbols.
518         (ppc64_elf_relocate_section): Don't optimize calls to undefined
519         weak functions if the symbol is dynamic.
520         (ppc64_elf_relocate_section): Edit tprel tls sequences.
521         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
522         (_bfd_elf_ppc_at_tprel_transform): New function.
523         * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
524         * bfd-in2.h: Regenerate.
525
526 2010-01-23  Richard Sandiford  <r.sandiford@uk.ibm.com>
527
528         * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
529         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
530         * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
531         bitsize to 1.
532         (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
533
534 2010-01-21  Nick Clifton  <nickc@redhat.com>
535
536         * elflink.c (elf_link_add_object_symbols): Look up name of
537         undefined symbol both before and after versioning has been
538         applied.  Do not bother with symbols that are weakly undefined.
539
540 2010-01-21  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
541
542         * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
543         (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
544
545 2010-01-19  Cary Coutant  <ccoutant@google.com>
546
547         * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
548
549 2010-01-19  Daisuke Hatayama  <d.hatayama@jp.fujitsu.com>
550             Alan Modra <amodra@gmail.com>
551
552         * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
553         (elf_object_p): Read e_phnum extension.
554         (elf_write_shdrs_and_ehdr): Write e_phnum extension.
555         * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
556         that we can read last program header.
557
558 2010-01-19  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
559
560         * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
561         R_ARM_THM_CALL entry.
562         (elf32_arm_final_link_relocate): Correct calculation of
563         reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
564         or R_ARM_THM_JUMP24 relocation.
565
566 2010-01-18  Alan Modra  <amodra@gmail.com>
567
568         PR 11168
569         * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
570         block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
571         than 32k sections.
572
573 2010-01-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
574
575         Fix compilation warning on gcc-3.4.
576         * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
577         parameter index to sec_index according to the function definition.
578
579 2010-01-13  Chao-ying Fu  <fu@mips.com>
580
581         * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
582         It is true for all CPUs.
583         (jal_reloc_p): New function.
584         (mips_elf_calculate_relocation): Rename require_jalxp to
585         cross_mode_jump_p.
586         Update comment for CROSS_MODE_JUMP_P.
587         Set up cross_mode_jump_p based on the mode change.
588         (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
589         Update comment for CROSS_MODE_JUMP_P.
590         Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
591         Use !cross_mode_jump_p to guard conversion.
592         Convert "jr t9" to "b", if possible.
593         (_bfd_mips_elf_relocate_section): Rename require_jalx to
594         cross_mode_jump_p.
595         Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
596         Pass cross_mode_jump_p to call mips_elf_perform_relocation.
597
598 2010-01-13  Nick Clifton  <nickc@redhat.com>
599
600         * cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
601         "m32c" returns the m32c arch_info_struct and not the m16c
602         arch_info_struct.
603         (arch_info_struct): Use the new scan function.
604         (bfd_m32c_arch): Likewise.
605
606 2010-01-13  Tristan Gingold  <gingold@adacore.com>
607
608         * config.bfd: Remove duplicated target vector for i386-*-darwin.
609         Appends new arch instead of overriding.
610         Use mach_o_x86_64_vec for x86_64-*-darwin.
611         * configure.in: Add mach_o_x86_64_vec.
612         * configure: Regenerate.
613         * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
614         * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
615         (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
616         * Makefile.in: Regenerate.
617         * mach-o-x86-64.c: New file.
618
619 2010-01-13  Tristan Gingold  <gingold@adacore.com>
620
621         * reloc.c: Add MACH_O_X86_64 relocations.
622         * bfd-in2.h: Regenerate.
623         * libbfd.h: Regenerate.
624
625 2010-01-13  Tristan Gingold  <gingold@adacore.com>
626
627         * archive.c (normalize): Use lbasename.
628         (bfd_bsd_truncate_arname): Ditto.
629         (bfd_gnu_truncate_arname): Ditto.
630
631 2010-01-12  Tristan Gingold  <gingold@adacore.com>
632
633         * makefile.vms (CFLAGS): Turns warnings into informational messages.
634
635 2010-01-11  Tristan Gingold  <gingold@adacore.com>
636
637         * mach-o.h: Add x86-64 relocation types.
638
639 2010-01-11  Tristan Gingold  <gingold@adacore.com>
640
641         * mach-o.h (bfd_mach_o_backend_data): Add arch field.
642         (bfd_mach_o_set_arch_mach): New prototype.
643         * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
644         (bfd_mach_o_set_arch_mach): New function.
645         (bfd_mach_o_gen_mkobject): New function.
646         Set TARGET_ARCHITECTURE for the generic back-ends.
647         * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
648         Check that TARGET_ARCHITECTURE is defined.
649         Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
650         * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
651
652 2010-01-11  Tristan Gingold  <gingold@adacore.com>
653
654         * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
655
656 2010-01-11  Nick Clifton  <nickc@redhat.com>
657
658         * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
659         handling of R_V850_HI16_S relocation.
660
661 2010-01-11  Alan Modra  <amodra@gmail.com>
662
663         PR 11103
664         * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
665
666 2010-01-11  Alan Modra  <amodra@gmail.com>
667
668         PR 6832
669         * dwarf2.c (struct comp_unit): Add sec_info_ptr.
670         (find_abstract_instance_name): Use it.
671         (parse_comp_unit): Set it.
672
673 2010-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
674
675         * Makefile.in: Regenerate.
676         * configure: Regenerate.
677
678 2010-01-08  Tristan Gingold  <gingold@adacore.com>
679
680         * archive.c: Remove bfd_special_undocumented_glue.
681
682 2010-01-08  Alan Modra  <amodra@gmail.com>
683
684         PR ld/11133
685         * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
686         * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
687         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
688
689 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
690
691         PR ld/11138
692         * elflink.c (elf_link_check_versioned_symbol): Don't abort if
693         a symbol referenced by DSO is is defined in a non-shared object
694         and forced local.
695
696 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
697
698         PR ld/11133
699         * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
700         undefined __start_XXX/__stop_XXX in all input files and set
701         SEC_KEEP.
702
703 2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>
704
705         PR ld/11143
706         * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
707
708 2010-01-04  Daniel Gutson  <dgutson@codesourcery.com>
709
710         * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
711         before including procfs.h.
712         (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
713         * configure.in: Added autoconf probe for the pr_fpreg member.
714         * configure: Regenerated.
715         * config.in: Regenerated.
716         * elf.c: Define _STRUCTURE_PROC before including procfs.h.
717
718 2010-01-04  Joel Brobecker  <brobecker@adacore.com>
719
720         Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
721         * dwarf2.c (concat_filename): Rename dirname with dir_name
722         to void shadowing the dirname function.
723         Rename subdirname with subdir_name to stay consistent with
724         the new dir_name variable name.
725
726 2010-01-04  Edmar Wienskoski  <edmar@freescale.com>
727
728         * archures.c: Add bfd_mach_ppc_e500mc64.
729         * bfd-in2.h: Regenerate.
730         * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
731         bfd_mach_ppc_e500mc64.
732
733 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
734
735         Fix -Wshadow warnings (seen on ppc-aix)
736         * xcofflink.c: Replace finfo by flinfo throughout.
737
738 For older changes see ChangeLog-2009
739 \f
740 Local Variables:
741 mode: change-log
742 left-margin: 8
743 fill-column: 74
744 version-control: never
745 End: