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