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