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