* elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-03-12 Alan Modra <amodra@bigpond.net.au>
2
3 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
4 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
5 SHN_BAD on error.
6 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
7 _bfd_elf_section_from_bfd_section, not -1.
8 (swap_out_syms): Likewise.
9 * elflink.c (elf_link_add_object_symbols): Likewise.
10 (bfd_elf_get_bfd_needed_list): Likewise.
11 (bfd_elf_match_symbols_in_sections): Likewise.
12 (elf_link_add_object_symbols): Don't bother testing for symbols
13 using normal sections before calling bfd_section_from_elf_index.
14 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
15 (bfd_elf_reloc_symbol_deleted_p): Likewise.
16 * elfcode.h (elf_slurp_symbol_table): Likewise.
17 * elf32-spu.c (get_sym_h): Likewise.
18 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
19 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
20 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
21
22 2008-03-11 Alan Modra <amodra@bigpond.net.au>
23
24 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
25 to those in process_stubs for overlay symbols.
26
27 2008-03-09 Paul Brook <paul@codesourcery.com>
28
29 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
30 Tag_VFP_arch values.
31
32 2008-03-08 Paul Brook <paul@codesourcery.com>
33
34 * elf32-arm.c (insert_thumb_branch): Rewrite.
35 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
36
37 2008-03-07 Paul Brook <paul@codesourcery.com>
38
39 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
40 MOVT relocations.
41 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
42 extension.
43 (elf32_arm_relocate_section): Handle MOVW and MOVT
44 relocations. Improve safety check for other weird relocations.
45 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
46 relocations.
47
48 2008-03-03 Bob Wilson <bob.wilson@acm.org>
49
50 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
51 only compute its value once.
52
53 2008-03-03 Alan Modra <amodra@bigpond.net.au>
54
55 * elf32-spu.c (struct got_entry): Add "addend" field.
56 (count_stub, build_stub): Use a new stub if relocation addend
57 differs from existing stubs for this symbol.
58 (process_stubs): Deal with addends.
59 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
60
61 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
62
63 PR ld/5789
64 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
65 for hidden and local symbols.
66
67 2008-03-03 Alan Modra <amodra@bigpond.net.au>
68
69 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
70 undefined symbols with internal or hidden visibility.
71 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
72 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
73 return immediately on dynamic reloc error.
74
75 2008-03-01 Alan Modra <amodra@bigpond.net.au>
76
77 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
78 if emitrelocations.
79 (get_relocs): New function, split out from..
80 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
81 emitrelocations. Remove indx temp.
82 (ppc_size_one_stub): Count new stub relocs.
83 (ppc64_elf_size_stubs): Count new glink reloc.
84 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
85 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
86 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
87 glink code.
88
89 2008-02-28 Alan Modra <amodra@bigpond.net.au>
90
91 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
92 the "->start" pointer reaches to function origin, so that we
93 can handle functions split over more than two sections.
94 (build_call_tree): Likewise.
95 (pasted_function): Don't attempt to set fun->start back to the
96 function origin, just go back one section.
97
98 2008-02-27 Catherine Moore <clm@codesourcery.com>
99
100 * elf.c ( _bfd_elf_print_private_bfd_data): Call
101 elf_backend_get_target_dtag if defined.
102 * elf32-mips.c (elf_backend_get_target_dtag): Define.
103 * elf64-mips.c: Likewise.
104 * elfn32-mips.c: Likewise.
105 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
106 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
107 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
108 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
109 (elf_backend_data): Add elf_backend_get_target_dtag.
110
111 2008-02-26 Alan Modra <amodra@bigpond.net.au>
112
113 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
114 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
115 and assume branch relocs are not dynamic when non-shared.
116 (readonly_dynrelocs): New function, split out from..
117 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
118 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
119 clear non_got_ref..
120 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
121 Do allow dynamic relocs on undefined symbols.
122 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
123 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
124 check_relocs.
125 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
126 plt symbols needing pointer_equality_needed.
127
128 2008-02-23 Alan Modra <amodra@bigpond.net.au>
129
130 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
131
132 2008-02-23 Alan Modra <amodra@bigpond.net.au>
133
134 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
135 pointer_equality_needed.
136 (ppc_elf_check_relocs): Split out non-branch relocs from others
137 that might emit dynamic relocs. Set pointer_equality_needed
138 for their symbols. Don't set non_got_ref on branch reloc symbols.
139 (ppc_elf_hash_symbol): New function.
140 (elf_backend_hash_symbol): Define.
141 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
142 Error if pointer_equality_needed on weak plt symbol.
143
144 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
145
146 PR ld/5788
147 * elflink.c (elf_create_symbuf): Correct buffer size and
148 position.
149
150 2008-02-22 Nick Clifton <nickc@redhat.com>
151
152 PR 868
153 * dwarf2.c: Revert previous patch. All of the allocate memory is
154 on an obstack which will be freed at some other time.
155
156 2008-02-20 Nick Clifton <nickc@redhat.com>
157
158 PR 868
159 * libbfd.c (bfd_realloc_or_free): New function. Performs like
160 bfd_realloc, but if the (re)allocation fails, the pointer is
161 freed.
162 * libbfd-in.h: Prototype.
163 * libbfd.h: Regenerate.
164 * bfdio.c (bfd_bwrite): Use the new function.
165 (bfd_seek): Likewise.
166 * bfdwin.c:(bfd_get_file_window): Likewise.
167 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
168 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
169 * elf32-xtensa.c (vsprintf_msg): Likewise.
170 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
171 * stabs.c (_bfd_link_seciton_stabs): Likewise.
172 * vms-misc.c (_bfd_vms_get_record): Likewise.
173 * vms-tir.c (check_section): Likewise.
174 * vms.c (vms_new_section_hook): Likewise.
175 * elf32-arm.c (elf32_arm_section_map_add): Check that the
176 allocation of sec_data->map succeeded before using it.
177 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
178 symshndxbuf until it is known that the reallocation succeeded.
179
180 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
181 Nick Clifton <nickc@redhat.com>
182
183 PR 868
184 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
185 out of memory.
186 (decode_line_info): Free the line_info_table before returning a
187 failure result.
188 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
189 Free the line table. Free the function table. Free the variable
190 table.
191
192 2008-02-17 Mark Kettenis <kettenis@gnu.org>
193
194 * elf.c (swap_out_syms): Avoid preprocessing directive within
195 macro arg.
196
197 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
198
199 * elf.c (assign_file_positions_for_load_sections): Set the type of
200 PT_NOTE sections to SHT_NOTE.
201
202 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
203
204 * simple.c (bfd_simple_get_relocated_section_contents): Set
205 link_info.output_bfd.
206
207 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
208
209 * dwarf2.c (find_line): Don't trust debug information after an
210 unparseable compilation unit.
211
212 2008-02-15 Alan Modra <amodra@bigpond.net.au>
213
214 PR 5765
215 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
216 * bfd-in2.h: Regenerate.
217
218 2008-02-15 Alan Modra <amodra@bigpond.net.au>
219
220 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
221 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
222 tdata.
223 * elf32-hppa.c (elf32_hppa_mkobject): New function.
224 (bfd_elf32_mkobject): Define.
225 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
226 (is_ppc_elf): ..this new macro.
227 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
228 (is_ppc64_elf): ..this new macro.
229
230 2008-02-15 Alan Modra <amodra@bigpond.net.au>
231
232 * elflink.c: Replace all accesses to hash->creator field with
233 output_bfd->xvec.
234 * cofflink.c: Likewise.
235 * coff-h8300.c: Likewise.
236 * ecoff.c: Likewise.
237 * elf32-m68hc1x.c: Likewise.
238 * elf32-ppc.c: Likewise.
239 * elf64-alpha.c: Likewise.
240 * elf64-ppc.c: Likewise.
241 * elf64-sparc.c: Likewise.
242 * elfxx-mips.c: Likewise.
243 * i386linux.c: Likewise.
244 * m68klinux.c: Likewise.
245 * sparclinux.c: Likewise.
246 * sunos.c: Likewise.
247 * xcofflink.c: Likewise.
248 * linker.c: Likewise.
249 (_bfd_link_hash_table_init): Don't store creator.
250
251 2008-02-14 Peter Jones <pjones@redhat.com>
252
253 * efi-rtdrv-ia32.c: New file.
254 * efi-bsdrv-ia32.c: New file.
255 * efi-rtdrv-ia64.c: New file.
256 * efi-bsdrv-ia64.c: New file.
257 * efi-rtdrv-x86_64.c: New file.
258 * efi-bsdrv-x86_64.c: New file.
259 * peicode.h (pe_bfd_object_p): Add support for boot service and
260 runtime service drivers.
261 * libpei.h: Add macros for EFI formats, and rename the efi application
262 format macros to disambiguate.
263 * targets.c: Add bfd_target _vec externs.
264 (_bfd_tar): Add EFI _vec entries.
265 * config.bfd: Add EFI vectors into the selection routines.
266 * configure.in: add EFI _vec entries.
267 * configure: Regenerate.
268 * Makefile.am: Add EFI files.
269 * Makefile.in: Regenerate.
270
271 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
272
273 * dwarf1.c (struct dwarf1_debug): Add syms member.
274 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
275 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
276 section contents, check for out of memory.
277
278 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
279 (parse_die): Change data pointers to bfd_byte.
280 (parse_line_table, parse_functions_in_unit): Likewise.
281
282 2008-02-14 Alan Modra <amodra@bigpond.net.au>
283
284 * elflink.c (compute_bucket_count): Warning fixes.
285
286 2008-02-12 DJ Delorie <dj@redhat.com>
287
288 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
289 relocation pointing to local symbol in merged section.
290
291 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
292 (iq2000_elf_relocate_section): Call it.
293
294 2008-02-12 Nick Clifton <nickc@redhat.com>
295
296 PR ld/5692
297 * elf-bfd.h (enum elf_object_id): New enum, used to identify
298 target specific extensions to the elf_obj_tdata structure.
299 (struct elf_obj_tdata): New field 'object_id'.
300 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
301 macros for accessing fields in the elf_obj_tdata structure.
302 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
303 (bfd_elf_allocate_object): New function.
304 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
305 and implement by calling bfd_elf_allocate_object.
306 (bfd_elf_allocate_object): New function: Allocates an
307 elf_obj_tdata structure, possibly with a target specific
308 extension.
309 * elfxx-target.h (bfd_elfNN_mkobject): Use
310 bfd_elf_make_generic_object as the default value.
311 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
312 for consistency with other, similar structures.
313 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
314 ELF bfd.
315 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
316 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
317 the bfd being processed.
318 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
319 (bfd_elf32_arm_set_target_relocs): Likewise.
320 (bfd_elf32_arm_final_link_relocate): Likewise.
321 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
322 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
323 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
324 (bfd_elf32_arm_check_relocs): Likewise.
325 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
326 (bfd_elf32_arm_size_dynamic_sections): Likewise.
327 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
328 (bfd_elf32_arm_init_maps): Likewise.
329 (bfd_elf32_arm_final_link_relocate): Likewise.
330 (bfd_elf32_arm_relocate_section): Likewise.
331 (bfd_elf32_arm_gc_sweep_hook): Likewise.
332 (bfd_elf32_arm_check_relocs): Likewise.
333 (bfd_elf32_arm_size_dynamic_sections): Likewise.
334 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
335 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
336 ELF bfd.
337 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
338 being processed.
339 (elf_i386_size_dynamic_sections): Likewise.
340 (elf_i386_relocate_section): Likewise.
341 (elf_i386_check_relocs): Use elf_symtab_hdr.
342 (elf_i386_gc_sweep_hook): Likewise.
343 (elf_i386_size_dynamic_sections): Likewise.
344 (elf_i386_relocate_section): Likewise.
345 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
346 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
347 verify that the bfd before accessing target specific fields.
348 (ppc_elf_check_relocs): Likewise.
349 (elf_finish_pointer_linker_section): Likewise.
350 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
351 (ppc_elf_check_relocs): Likewise.
352 (ppc_elf_gc_sweep_hook): Likewise.
353 (ppc_elf_tls_optimize): Likewise.
354 (ppc_elf_size_dynamic_sections): Likewise.
355 (ppc_elf_relax_section): Likewise.
356 (ppc_elf_relocate_section): Likewise.
357 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
358 reminding programmers to keep this structure in sync with the one
359 defined in elf64-s390.c.
360 (elf_s390_mkobject): Call bfd_elf_allocate_object.
361 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
362 ELF bfd.
363 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
364 being processed.
365 (elf_s390_size_dynamic_sections): Likewise.
366 (elf_s390_relocate_section): Likewise.
367 (elf_s390_check_relocs): Use elf_symtab_hdr.
368 (elf_s390_gc_sweep_hook): Likewise.
369 (elf_s390_size_dynamic_sections): Likewise.
370 (elf_s390_relocate_section): Likewise.
371 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
372 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
373 ELF bfd.
374 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
375 bfd being processed.
376 (sh_elf_relocate_section): Likewise.
377 (sh_elf_check_relocs): Likewise.
378 (sh_elf_copy_private_data): Likewise.
379 (sh_elf_relax_section): Use elf_symtab_hdr.
380 (sh_elf_size_dynamic_sections): Likewise.
381 (sh_elf_relocate_section): Likewise.
382 (sh_elf_get_relocated_section_contents): Likewise.
383 (sh_elf_gc_sweep_hook): Likewise.
384 (sh_elf_check_relocs): Likewise.
385 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
386 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
387 Alpha ELF bfd.
388 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
389 the bfd being processed.
390 (elf64_alpha_create_dynamic_section): Likewise.
391 (elf64_alpha_check_relocs): Likewise.
392 (elf64_alpha_size_got_sections): Likewise.
393 (elf64_alpha_relax_section): Likewise.
394 (elf64_alpha_relocate_section): Likewise.
395 (elf64_alpha_final_link): Likewise.
396 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
397 (elf64_alpha_relax_section): Likewise.
398 (elf64_alpha_relocate_section_r): Likewise.
399 (elf64_alpha_relocate_section): Likewise.
400 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
401 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
402 being processed.
403 (opd_entry_value): Likewise.
404 (allocate_dynrelocs): Likewise.
405 (ppc64_elf_relocate_section): Likewise.
406 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
407 (opd_entry_value): Likewise.
408 (ppc64_elf_gc_sweep_hook): Likewise.
409 (get_sym_h): Likewise.
410 (ppc64_elf_edit_opd): Likewise.
411 (ppc64_elf_tls_optimize): Likewise.
412 (ppc64_elf_edit_toc): Likewise.
413 (ppc64_elf_size_dynamic_sections): Likewise.
414 (toc_adjusting_stub_needed): Likewise.
415 (ppc64_elf_size_stubs): Likewise.
416 (ppc64_elf_relocate_section): Likewise.
417 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
418 reminding programmers to keep this structure in sync with the one
419 defined in elf32-s390.c.
420 (elf_s390_mkobject): Call bfd_elf_allocate_object.
421 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
422 ELF bfd.
423 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
424 being processed.
425 (elf_s390_size_dynamic_sections): Likewise.
426 (elf_s390_relocate_section): Likewise.
427 (elf_s390_check_relocs): Use elf_symtab_hdr.
428 (elf_s390_gc_sweep_hook): Likewise.
429 (elf_s390_size_dynamic_sections): Likewise.
430 (elf_s390_relocate_section): Likewise.
431 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
432 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
433 x86_64 ELF bfd.
434 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
435 being processed.
436 (elf64_x86_64_size_dynamic_sections): Likewise.
437 (elf64_x86_64_relocate_section): Likewise.
438 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
439 (elf64_x86_64_gc_sweep_hook): Likewise.
440 (elf64_x86_64_size_dynamic_sections): Likewise.
441 (elf64_x86_64_relocate_section): Likewise.
442 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
443 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
444 ELF bfd.
445 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
446 bfd being processed.
447 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
448 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
449 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
450 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
451 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
452 (_bfd_sparc_elf_relocate_section): Likewise.
453
454 2008-02-12 Alan Modra <amodra@bigpond.net.au>
455
456 PR 5303, 5755
457 * arange-set.c: Delete.
458 * arange-set.h: Delete.
459 * dwarf2.c: Revert 2007-09-21 changes.
460 * Makefile.am: Likewise.
461 * Makefile.in: Regenerate.
462 * po/SRC-POTFILES.in: Regenerate.
463
464 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
465
466 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
467 if necessary.
468 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
469 mismatches are detected.
470
471 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
472 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
473
474 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
475
476 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
477 was reached.
478 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
479
480 2008-02-07 Alan Modra <amodra@bigpond.net.au>
481
482 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
483 of _ovly_buf_table size.
484 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
485 Adjust initialisations relating to _ovly_buf_table.
486
487 2008-02-04 Bob Wilson <bob.wilson@acm.org>
488
489 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
490 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
491 relocations against dynamic symbols.
492 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
493 .xt.lit section.
494
495 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
496 H.J. Lu <hongjiu.lu@intel.com>
497
498 PR 5715
499 * warning.m4: Enable -Wno-format by default when using gcc on
500 mingw.
501 * configure: Regenerated.
502
503 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
504
505 * archures.c: Update copyright.
506 (bfd_mach_mips_octeon): New macro.
507 * bfd-in2.h: Regenerate.
508 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
509 (mips_set_isa_flags): Likewise.
510 (mips_mach_extensions): Add Octeon.
511 * cpu-mips.c: Update copyright.
512 (I_mipsocteon): New enum constant.
513 (arch_info_struct): Add Octeon.
514
515 2008-02-04 Alan Modra <amodra@bigpond.net.au>
516
517 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
518 Return error status on unexpected relocation errors.
519
520 2008-02-04 Alan Modra <amodra@bigpond.net.au>
521
522 PR ld/5692
523 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
524 on non-ELF input.
525 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
526 processing on non-ELF input.
527
528 2008-01-31 Marc Gauthier <marc@tensilica.com>
529
530 * config.bfd (xtensa*-*-*): Recognize processor variants.
531
532 2008-01-31 Nick Clifton <nickc@redhat.com>
533
534 PR ld/5692
535 * elf.c (bfd_elf_get_elf_syms): Check the return value of
536 get_elf_backend_data.
537
538 2008-01-28 Fabian Groffen <grobian@gentoo.org>
539
540 * config.bfd (x86_64-*-solaris2): Add support for this target.
541
542 2008-01-28 Alan Modra <amodra@bigpond.net.au>
543
544 Rewrite SPU overlay handling code. Put overlay calls stubs in the
545 overlays where possible. Use a faster call stub, or optionally at
546 compile time, a more compact stub. Double size of _ovly_buf_table
547 so that low bit of _ovly_table.buf can be used as a "present" bit.
548 Reserve an extra _ovly_table entry for index zero.
549 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
550 add new ones.
551 (struct got_entry): New.
552 (struct spu_stub_hash_entry): Delete.
553 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
554 (spu_elf_link_hash_table_create): Adjust for struct changes.
555 (spu_stub_name): Delete.
556 (spu_elf_find_overlays): Don't track sections from overlay regions.
557 Instead set ovl_buf number in spu elf section data. Error if
558 overlays in one region don't start at the same address. Adjust
559 for struct _spu_elf_section_data changes.
560 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
561 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
562 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
563 (enum _insn_type): New.
564 (count_stub, build_stub): New functions.
565 (allocate_spuear_stubs): Use count_stub.
566 (build_spuear_stubs): Use build_stub.
567 (populate_stubs, sort_stubs): Delete.
568 (process_stubs): New function.
569 (write_one_stub): Delete.
570 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
571 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
572 (maybe_insert_function, check_function_ranges): Likewise.
573 (find_function, pasted_function, build_call_tree): Likewise.
574 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
575 (spu_elf_modify_program_headers): Likewise.
576 (interesting_section): Detect stub sections differently. Delete
577 htab param, adjust all callers.
578 (spu_elf_relocate_section): Rewrite stub handling.
579 (spu_elf_output_symbol_hook): Likewise.
580 (bfd_elf32_bfd_link_hash_table_free): Delete.
581 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
582 output-only fields into a union. Add ovl_buf.
583 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
584
585 2008-01-25 DJ Delorie <dj@redhat.com>
586
587 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
588
589 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
590
591 * bfd-in.h: Add mingw I64 support.
592 * bfd-in2.h: Regenerated.
593 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
594
595 2008-01-21 Alan Modra <amodra@bigpond.net.au>
596
597 PR 4453
598 * format.c (bfd_check_format_matches): Don't accept archives as
599 fully matching unless they have a map.
600
601 2008-01-21 Alan Modra <amodra@bigpond.net.au>
602
603 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
604
605 2008-01-21 Alan Modra <amodra@bigpond.net.au>
606
607 * ecoff.c (_bfd_ecoff_archive_p): Delete.
608 * libecoff.h (_bfd_ecoff_archive_p): Delete.
609 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
610 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
611 (ecoff_biglittle_vec): Likewise.
612
613 2008-01-19 Alan Modra <amodra@bigpond.net.au>
614
615 PR 5646
616 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
617 non-NULL before dereferencing.
618
619 2008-01-15 Alan Modra <amodra@bigpond.net.au>
620
621 PR 5604
622 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
623 names from others.
624 (_bfd_elf_gc_keep): Declare.
625 * elfxx-target.h (elf_backend_gc_keep): Define.
626 (elfNN_bed): Init new field.
627 * elflink.c (_bfd_elf_gc_keep): New function.
628 (bfd_elf_gc_sections): Call gc_keep.
629 * elf64-ppc.c (elf_backend_gc_keep): Define.
630 (struct _ppc64_elf_section_data): Move .opd related fields to
631 a struct so they don't occupy the same storage. Adjust accesses
632 throughout file.
633 (ppc64_elf_gc_keep): New function, split out from..
634 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
635 to mark .opd section, just set gc_mark.
636 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
637 unless we are changing .opd. Test non-NULL opd->adjust at all
638 accesses throughout file.
639 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
640
641 2008-01-15 Alan Modra <amodra@bigpond.net.au>
642
643 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
644 * bfd-in2.h: Regenerate.
645
646 2008-01-11 Tristan Gingold <gingold@adacore.com>
647 Eric Botcazou <ebotcazou@adacore.com>
648
649 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
650 relocatable.
651 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
652 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
653 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
654 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
655 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
656 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
657 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
658 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
659 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
660 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
661 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
662 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
663 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
664 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
665 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
666 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
667 or executable output with relocations.
668
669 2008-01-09 Nick Clifton <nickc@redhat.com>
670
671 PR gas/5552
672 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
673 to FALSE for all relocs.
674
675 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
676
677 PR ld/5526
678 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
679 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
680 (eh_frame_sec_info): Add a cies field.
681 (eh_frame_hdr_info): Add a merge_cies field.
682 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
683 union.
684 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
685 of hdr_info->cies.
686 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
687 cie structures in all cases and use it instead of extended_cies.
688 If merging, store the cie array in sec_info->cies and point each
689 CIE's eh_fde_cie at the associated element. Do not try to
690 calculate the value of the personality routine here; record the
691 offset of the relocation instead. Do not merge CIEs here.
692 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
693 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
694 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
695 (find_merged_cie): New function.
696 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
697
698 2008-01-07 Nick Clifton <nickc@redhat.com>
699
700 PR binutils/5535
701 * vms.c (vms_close_and_cleanup): Check for the presence of a
702 vms_private_data_struct before examining any of its fields.
703
704 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
705
706 PR ld/5522
707 * elflink.c (elf_link_input_bfd): Don't write out a section if
708 its output section is marked with SEC_NEVER_LOAD.
709
710 For older changes see ChangeLog-2007
711 \f
712 Local Variables:
713 mode: change-log
714 left-margin: 8
715 fill-column: 74
716 version-control: never
717 End:
This page took 0.045682 seconds and 4 git commands to generate.