* dwarf1.c (struct dwarf1_debug): Add syms member.
[binutils.git] / bfd / ChangeLog
blob29af7d3cf8cb35f5a988f06f73c1d4f6a576f46c
1 2008-02-14  Nathan Sidwell  <nathan@codesourcery.com>
3         * dwarf1.c (struct dwarf1_debug): Add syms member.
4         (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
5         (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
6         section contents, check for out of memory.
8         * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
9         (parse_die): Change data pointers to bfd_byte.
10         (parse_line_table, parse_functions_in_unit): Likewise.
12 2008-02-14  Alan Modra  <amodra@bigpond.net.au>
14         * elflink.c (compute_bucket_count): Warning fixes.
16 2008-02-12  DJ Delorie  <dj@redhat.com>
18         * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
19         relocation pointing to local symbol in merged section.
21         * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
22         (iq2000_elf_relocate_section): Call it.
24 2008-02-12  Nick Clifton  <nickc@redhat.com>
26         PR ld/5692
27         * elf-bfd.h (enum elf_object_id): New enum, used to identify
28         target specific extensions to the elf_obj_tdata structure.
29         (struct elf_obj_tdata): New field 'object_id'.
30         (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
31         macros for accessing fields in the elf_obj_tdata structure.
32         (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
33         (bfd_elf_allocate_object): New function.
34         * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
35         and implement by calling bfd_elf_allocate_object.
36         (bfd_elf_allocate_object): New function: Allocates an
37         elf_obj_tdata structure, possibly with a target specific
38         extension.
39         * elfxx-target.h (bfd_elfNN_mkobject): Use
40         bfd_elf_make_generic_object as the default value.
41         * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
42         for consistency with other, similar structures.
43         (is_arm_elf): New macro.  Checks a BFD to make sure that is an ARM
44         ELF bfd.
45         (elf32_arm_mkobject): Call bfd_elf_allocate_object.
46         (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
47         the bfd being processed.
48         (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
49         (bfd_elf32_arm_set_target_relocs): Likewise.
50         (bfd_elf32_arm_final_link_relocate): Likewise.
51         (bfd_elf32_arm_copy_private_bfd_data): Likewise.
52         (bfd_elf32_arm_merge_eabi_attributes): Likewise.
53         (bfd_elf32_arm_merge_private_bfd_data): Likewise.
54         (bfd_elf32_arm_check_relocs): Likewise.
55         (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
56         (bfd_elf32_arm_size_dynamic_sections): Likewise.
57         (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
58         (bfd_elf32_arm_init_maps): Likewise.
59         (bfd_elf32_arm_final_link_relocate): Likewise.
60         (bfd_elf32_arm_relocate_section): Likewise.
61         (bfd_elf32_arm_gc_sweep_hook): Likewise.
62         (bfd_elf32_arm_check_relocs): Likewise.
63         (bfd_elf32_arm_size_dynamic_sections): Likewise.
64         * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
65         (is_i386_elf): New macro.  Checks a BFD to make sure that is an x86
66         ELF bfd.
67         (elf_i386_check_relocs): Use is_i386_elf macro to check    the bfd
68         being processed.
69         (elf_i386_size_dynamic_sections): Likewise.
70         (elf_i386_relocate_section): Likewise.
71         (elf_i386_check_relocs): Use elf_symtab_hdr.
72         (elf_i386_gc_sweep_hook): Likewise.
73         (elf_i386_size_dynamic_sections): Likewise.
74         (elf_i386_relocate_section): Likewise.
75         * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
76         (elf_create_pointer_linker_section): Use is_ppc_elf_target to
77         verify that the bfd before accessing target specific fields.
78         (ppc_elf_check_relocs): Likewise.
79         (elf_finish_pointer_linker_section): Likewise.
80         (elf_create_pointer_linker_section): Use elf_symtab_hdr.
81         (ppc_elf_check_relocs): Likewise.
82         (ppc_elf_gc_sweep_hook): Likewise.
83         (ppc_elf_tls_optimize): Likewise.
84         (ppc_elf_size_dynamic_sections): Likewise.
85         (ppc_elf_relax_section): Likewise.
86         (ppc_elf_relocate_section): Likewise.
87         * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
88         reminding programmers to keep this structure in sync with the one
89         defined in elf64-s390.c.
90         (elf_s390_mkobject): Call bfd_elf_allocate_object.
91         (is_s390_elf): New macro.  Checks a BFD to make sure that is an s390
92         ELF bfd.
93         (elf_s390_check_relocs): Use is_s390_elf macro to check    the bfd
94         being processed.
95         (elf_s390_size_dynamic_sections): Likewise.
96         (elf_s390_relocate_section): Likewise.
97         (elf_s390_check_relocs): Use elf_symtab_hdr.
98         (elf_s390_gc_sweep_hook): Likewise.
99         (elf_s390_size_dynamic_sections): Likewise.
100         (elf_s390_relocate_section): Likewise.   
101         * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
102         (is_sh_elf): New macro.  Checks a BFD to make sure that is an SH
103         ELF bfd.
104         (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
105         bfd being processed.
106         (sh_elf_relocate_section): Likewise.
107         (sh_elf_check_relocs): Likewise.
108         (sh_elf_copy_private_data): Likewise.
109         (sh_elf_relax_section): Use elf_symtab_hdr.
110         (sh_elf_size_dynamic_sections): Likewise.
111         (sh_elf_relocate_section): Likewise.
112         (sh_elf_get_relocated_section_contents): Likewise.
113         (sh_elf_gc_sweep_hook): Likewise.
114         (sh_elf_check_relocs): Likewise.
115         * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
116         (is_alpha_elf): New macro.  Checks a BFD to make sure that is an
117         Alpha ELF bfd.
118         (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
119         the bfd being processed.
120         (elf64_alpha_create_dynamic_section): Likewise.
121         (elf64_alpha_check_relocs): Likewise.
122         (elf64_alpha_size_got_sections): Likewise.
123         (elf64_alpha_relax_section): Likewise.
124         (elf64_alpha_relocate_section): Likewise.
125         (elf64_alpha_final_link): Likewise.
126         (elf64_alpha_check_relocs): Use elf_symtab_hdr.
127         (elf64_alpha_relax_section): Likewise.
128         (elf64_alpha_relocate_section_r): Likewise.
129         (elf64_alpha_relocate_section): Likewise.
130         * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
131         (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
132         being processed.
133         (opd_entry_value): Likewise.
134         (allocate_dynrelocs): Likewise.
135         (ppc64_elf_relocate_section): Likewise.
136         (ppc64_elf_check_relocs): Use elf_symtab_hdr.
137         (opd_entry_value): Likewise.
138         (ppc64_elf_gc_sweep_hook): Likewise.
139         (get_sym_h): Likewise.
140         (ppc64_elf_edit_opd): Likewise.
141         (ppc64_elf_tls_optimize): Likewise.
142         (ppc64_elf_edit_toc): Likewise.
143         (ppc64_elf_size_dynamic_sections): Likewise.
144         (toc_adjusting_stub_needed): Likewise.
145         (ppc64_elf_size_stubs): Likewise.
146         (ppc64_elf_relocate_section): Likewise.
147         * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
148         reminding programmers to keep this structure in sync with the one
149         defined in elf32-s390.c.
150         (elf_s390_mkobject): Call bfd_elf_allocate_object.
151         (is_s390_elf): New macro.  Checks a BFD to make sure that is an s390
152         ELF bfd.
153         (elf_s390_check_relocs): Use is_s390_elf macro to check    the bfd
154         being processed.
155         (elf_s390_size_dynamic_sections): Likewise.
156         (elf_s390_relocate_section): Likewise.   
157         (elf_s390_check_relocs): Use elf_symtab_hdr.
158         (elf_s390_gc_sweep_hook): Likewise.
159         (elf_s390_size_dynamic_sections): Likewise.
160         (elf_s390_relocate_section): Likewise.
161         * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
162         (is_x86_64_elf): New macro.  Checks a BFD to make sure that is an
163         x86_64 ELF bfd.
164         (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
165         being processed.
166         (elf64_x86_64_size_dynamic_sections): Likewise.
167         (elf64_x86_64_relocate_section): Likewise.
168         (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
169         (elf64_x86_64_gc_sweep_hook): Likewise.
170         (elf64_x86_64_size_dynamic_sections): Likewise.
171         (elf64_x86_64_relocate_section): Likewise.
172         * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
173         (is_sparc_elf): New macro.  Checks a BFD to make sure that is a Sparc
174         ELF bfd.
175         (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
176         bfd being processed.
177         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
178         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
179         (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
180         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
181         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
182         (_bfd_sparc_elf_relocate_section): Likewise. 
184 2008-02-12  Alan Modra  <amodra@bigpond.net.au>
186         PR 5303, 5755
187         * arange-set.c: Delete.
188         * arange-set.h: Delete.
189         * dwarf2.c: Revert 2007-09-21 changes.
190         * Makefile.am: Likewise.
191         * Makefile.in: Regenerate.
192         * po/SRC-POTFILES.in: Regenerate.
194 2008-02-11  Bernd Schmidt  <bernd.schmidt@analog.com>
196         * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
197         if necessary.
198         (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
199         mismatches are detected.
201         * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
202         emit invalid relocs or rofixup entries for deleted .eh_frame entries.
204 2008-02-11  Daniel Jacobowitz  <dan@codesourcery.com>
206         * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
207         was reached.
208         * srec.c (srec_scan): Calculate the checksum.  Complain on mismatch.
210 2008-02-07  Alan Modra  <amodra@bigpond.net.au>
212         * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
213         of _ovly_buf_table size.
214         (spu_elf_build_stubs): Use low bit of .size as "present" bit.
215         Adjust initialisations relating to _ovly_buf_table.
217 2008-02-04  Bob Wilson  <bob.wilson@acm.org>
218         
219         * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
220         relocation, do not continue processing it.  Ignore R_XTENSA_ASM_EXPAND
221         relocations against dynamic symbols.
222         (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
223         .xt.lit section.
224         
225 2008-02-04  Kai Tietz  <kai.tietz@onevision.com>
226             H.J. Lu  <hongjiu.lu@intel.com>
228         PR 5715
229         * warning.m4: Enable -Wno-format by default when using gcc on
230         mingw.
231         * configure: Regenerated.
233 2008-02-04  Adam Nemet  <anemet@caviumnetworks.com>
235         * archures.c: Update copyright.
236         (bfd_mach_mips_octeon): New macro.
237         * bfd-in2.h: Regenerate.
238         * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
239         (mips_set_isa_flags): Likewise.
240         (mips_mach_extensions): Add Octeon.
241         * cpu-mips.c: Update copyright.
242         (I_mipsocteon): New enum constant.
243         (arch_info_struct): Add Octeon.
245 2008-02-04  Alan Modra  <amodra@bigpond.net.au>
247         * elf32-spu.c (spu_elf_relocate_section): Correct return type.
248         Return error status on unexpected relocation errors.
250 2008-02-04  Alan Modra  <amodra@bigpond.net.au>
252         PR ld/5692
253         * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31.  Instead abort
254         on non-ELF input.
255         * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
256         processing on non-ELF input.
258 2008-01-31  Marc Gauthier  <marc@tensilica.com>
260         * config.bfd (xtensa*-*-*): Recognize processor variants.
262 2008-01-31  Nick Clifton  <nickc@redhat.com>
264         PR ld/5692
265         * elf.c (bfd_elf_get_elf_syms): Check the return value of
266         get_elf_backend_data.
268 2008-01-28  Fabian Groffen  <grobian@gentoo.org>
270         * config.bfd (x86_64-*-solaris2): Add support for this target.
272 2008-01-28  Alan Modra  <amodra@bigpond.net.au>
274         Rewrite SPU overlay handling code.  Put overlay calls stubs in the
275         overlays where possible.  Use a faster call stub, or optionally at
276         compile time, a more compact stub.  Double size of _ovly_buf_table
277         so that low bit of _ovly_table.buf can be used as a "present" bit.
278         Reserve an extra _ovly_table entry for index zero.
279         * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
280         add new ones.
281         (struct got_entry): New.
282         (struct spu_stub_hash_entry): Delete.
283         (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
284         (spu_elf_link_hash_table_create): Adjust for struct changes.
285         (spu_stub_name): Delete.
286         (spu_elf_find_overlays): Don't track sections from overlay regions.
287         Instead set ovl_buf number in spu elf section data.  Error if
288         overlays in one region don't start at the same address.  Adjust
289         for struct _spu_elf_section_data changes.
290         (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
291         (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
292         (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
293         (enum _insn_type): New.
294         (count_stub, build_stub): New functions.
295         (allocate_spuear_stubs): Use count_stub.
296         (build_spuear_stubs): Use build_stub.
297         (populate_stubs, sort_stubs): Delete.
298         (process_stubs): New function.
299         (write_one_stub): Delete.
300         (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
301         (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
302         (maybe_insert_function, check_function_ranges): Likewise.
303         (find_function, pasted_function, build_call_tree): Likewise.
304         (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
305         (spu_elf_modify_program_headers): Likewise.
306         (interesting_section): Detect stub sections differently.  Delete
307         htab param, adjust all callers.
308         (spu_elf_relocate_section): Rewrite stub handling.
309         (spu_elf_output_symbol_hook): Likewise.
310         (bfd_elf32_bfd_link_hash_table_free): Delete.
311         * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
312         output-only fields into a union.  Add ovl_buf.
313         (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
315 2008-01-25  DJ Delorie  <dj@redhat.com>
317         * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
319 2008-01-25  Kai Tietz  <kai.tietz@onevision.com>
321         * bfd-in.h: Add mingw I64 support.
322         * bfd-in2.h: Regenerated.
323         * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
325 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
327         PR 4453
328         * format.c (bfd_check_format_matches): Don't accept archives as
329         fully matching unless they have a map.
331 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
333         * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
335 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
337         * ecoff.c (_bfd_ecoff_archive_p): Delete.
338         * libecoff.h (_bfd_ecoff_archive_p): Delete.
339         * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
340         * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
341         (ecoff_biglittle_vec): Likewise.
343 2008-01-19  Alan Modra  <amodra@bigpond.net.au>
345         PR 5646
346         * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
347         non-NULL before dereferencing.
349 2008-01-15  Alan Modra  <amodra@bigpond.net.au>
351         PR 5604
352         * elf-bfd.h (struct elf_backend_data): Add gc_keep.  Remove param
353         names from others.
354         (_bfd_elf_gc_keep): Declare.
355         * elfxx-target.h (elf_backend_gc_keep): Define.
356         (elfNN_bed): Init new field.
357         * elflink.c (_bfd_elf_gc_keep): New function.
358         (bfd_elf_gc_sections): Call gc_keep.
359         * elf64-ppc.c (elf_backend_gc_keep): Define.
360         (struct _ppc64_elf_section_data): Move .opd related fields to
361         a struct so they don't occupy the same storage.  Adjust accesses
362         throughout file.
363         (ppc64_elf_gc_keep): New function, split out from..
364         (ppc64_elf_gc_mark_hook): ..here.  Don't call _bfd_elf_gc_mark
365         to mark .opd section, just set gc_mark.
366         (ppc64_elf_edit_opd): Remove no_opd_opt parm.  Don't set opd->adjust
367         unless we are changing .opd.  Test non-NULL opd->adjust at all
368         accesses throughout file.
369         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
371 2008-01-15  Alan Modra  <amodra@bigpond.net.au>
373         * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
374         * bfd-in2.h: Regenerate.
376 2008-01-11  Tristan Gingold  <gingold@adacore.com>
377             Eric Botcazou  <ebotcazou@adacore.com>
379         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
380         relocatable.
381         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
382         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
383         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
384         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
385         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
386         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
387         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
388         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
389         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
390         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
391         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
392         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
393         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
394         * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
395         * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
396         * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
397         or executable output with relocations.
399 2008-01-09  Nick Clifton  <nickc@redhat.com>
401         PR gas/5552
402         * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
403         to FALSE for all relocs.
405 2008-01-09  Richard Sandiford  <rsandifo@nildram.co.uk>
407         PR ld/5526
408         * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
409         fields.  Rename u.cie.u.merged to u.cie.u.merged_with.
410         (eh_frame_sec_info): Add a cies field.
411         (eh_frame_hdr_info): Add a merge_cies field.
412         * elf-eh-frame.c (cie): Add a reloc_index member to the personality
413         union.
414         (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
415         of hdr_info->cies.
416         (_bfd_elf_parse_eh_frame): Remove tmp_cie.  Ccreate an array of
417         cie structures in all cases and use it instead of extended_cies.
418         If merging, store the cie array in sec_info->cies and point each
419         CIE's eh_fde_cie at the associated element.  Do not try to
420         calculate the value of the personality routine here; record the
421         offset of the relocation instead.  Do not merge CIEs here.
422         (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
423         (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
424         (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
425         (find_merged_cie): New function.
426         (_bfd_elf_gc_mark_fdes): Use it.  Free sec_info->cies.
428 2008-01-07  Nick Clifton  <nickc@redhat.com>
430         PR binutils/5535
431         * vms.c (vms_close_and_cleanup): Check for the presence of a
432         vms_private_data_struct before examining any of its fields.
434 2008-01-07  H.J. Lu  <hongjiu.lu@intel.com>
436         PR ld/5522
437         * elflink.c (elf_link_input_bfd): Don't write out a section if
438         its output section is marked with SEC_NEVER_LOAD.
440 For older changes see ChangeLog-2007
442 Local Variables:
443 mode: change-log
444 left-margin: 8
445 fill-column: 74
446 version-control: never
447 End: