OSDN Git Service

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