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