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