7cbad1a5d9aa4198cfa4675e470a320eee460d4e
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2008-04-08  Alan Modra  <amodra@bigpond.net.au>
2
3         * elf32-spu.c (spu_elf_build_stubs): Correct error message.
4         (mark_functions_via_relocs): Remove premature init of symtab_hdr.
5         (collect_overlays): Commment typo fix.
6
7 2008-04-08  Kees Cook  <kees@canonical.com>
8
9         * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
10         in EXEC_P bfds.
11
12 2008-04-08  Alan Modra  <amodra@bigpond.net.au>
13
14         * elf32-spu.c: Include libiberty.h.
15         (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
16         non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
17         spu_elf_relink, auto_overlay fields.
18         (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
19         (needs_ovl_stub): Flip test so that call to non-function warning
20         is emitted during relocate_section rather than earlier.
21         (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
22         auto_overlay if no section exceeds local store.
23         (struct call_info): Add count, max_depth, is_pasted fields.
24         (struct function_info): Add rodata, last_caller, call_count,
25         depth, new visit flags.
26         (insert_callee): Increment call count.
27         (copy_callee): New function.
28         (mark_functions_via_relocs): Investigate all reloc types to count
29         possible function pointer stubs for --auto-overlay.  Track
30         last_caller and increment function call_count.
31         (pasted_function): Insert a "call" into call info for pasted section.
32         (remove_cycles): Track max depth of calls.  Don't emit call graph
33         pruning warning for --auto-overlay.
34         (build_call_tree): Don't transfer_calls for --auto-overlay.
35         Adjust remove_cycles call.
36         (sort_calls, sort_lib, sort_bfds): New functions.
37         (struct _mos_param, struct _uos_param, struct _cl_param): New.
38         (mark_overlay_section, unmark_overlay_section): New functions.
39         (collect_lib_sectios, auto_ovl_lib_functions): New functions.
40         (collect_overlays, find_pasted_call): New functions.
41         (sum_stack): Deal with is_pasted "calls".  Exit before printing
42         when --auto-overlay.
43         (spu_elf_auto_overlay): New function.
44         (spu_elf_final_link): Call spu_elf_auto_overlay.
45         * elf32-spu.h (spu_elf_check_vma): Update prototype.
46
47 2008-04-07  Alan Modra  <amodra@bigpond.net.au>
48
49         * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
50         is defined in overlay section before creating a stub.
51         (build_spuear_stubs): Likewise.
52         (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
53
54 2008-04-02  Alan Modra  <amodra@bigpond.net.au>
55
56         * elf32-spu.c (insert_callee): Reorder call list so most recent
57         call is always first.
58         (interesting_section): Move.
59         (mark_functions_via_relocs): Fold interesting_section and
60         reloc_count tests in callers to here.  Simplify output section
61         owner test.
62         (discover_functions): Set "gaps" when no symbols and some
63         "interesting_section".  Run pasted_function loop for no symbol
64         bfds.
65         (for_each_node, transfer_calls): New functions.
66         (mark_non_root): Adjust to suit for_each_node.
67         (call_graph_traverse): Likewise.  Fix memory leak.  Rename to..
68         (remove_cycles): ..this.
69         (build_call_tree): Use for_each_node and transfer_calls.
70         (struct _sum_stack_param): New.
71         (sum_stack): Adjust to suit for_each_node.  Return error on
72         malloc failure.  Move code to print root node cumulative stack from..
73         (spu_elf_stack_analysis): ..here.  Use for_each_node.
74
75 2008-03-31  Cary Coutant  <ccoutant@google.com>
76
77         PR 6006
78         * archive.c (_bfd_slurp_extended_name_table): Change
79         ARFMAG[0] to ARFMAG[1].
80         (_bfd_construct_extended_name_table): Likewise.
81
82 2008-03-31  Daniel Jacobowitz  <dan@codesourcery.com>
83
84         * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
85         (_bfd_mips_elf_check_relocs): Update comments.  Always call
86         mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
87
88 2008-03-27  Cary Coutant  <ccoutant@google.com>
89
90         Add support for thin archives.
91         * archive.c (_bfd_find_nested_archive): New function.
92         (get_extended_arelt_filename): Add origin parameter.
93         (_bfd_generic_read_ar_hdr_mag): Deal with extended name
94         combined with a file offset.
95         (append_relative_path): New function.
96         (_bfd_get_elt_at_filepos): Deal with external members and
97         nested archives.
98         (bfd_generic_openr_next_archived_file): Thin archives.
99         (bfd_generic_archive_p): Recognize new magic string.
100         (adjust_relative_path): New function.
101         (_bfd_construct_extended_name_table): Construct extended
102         names for thin archive members.
103         (_bfd_write_archive_contents): Emit new magic string, skip
104         copying files for thin archives.
105         * bfd-in.h (bfd_is_thin_archive): New macro.
106         * bfd.c (struct bfd): New fields for thin archives.
107         * libbfd-in.h (struct areltdata): New field for thin archives.
108         * opncls.c (bfd_close): Delete BFDs for nested archives.
109
110 2008-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
111
112         * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
113         _bfd_final_link_relocate that also handles R_pcrel24 relocs.
114         (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
115
116 2008-03-25  Nathan Sidwell  <nathan@codesourcery.com>
117
118         * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
119         in vxworks tls_vars sections.
120         (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
121         * elf32-i386.c (allocate_dynrelocs,
122         elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
123         * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
124         ppc_elf_relocate_section): Likewise.
125         * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
126         sh_elf_relocate_section): Likewise.
127         * elfxx-sparc.c (allocate_dynrelocs,
128         _bfd_sparc_elf_size_dynamic_sections,
129         _bfd_sparc_elf_relocate_section): Likewise.
130
131 2008-03-21  Adam Nemet  <anemet@caviumnetworks.com>
132
133         * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
134         print the values from the dynamic section.
135
136 2008-03-20  Richard Sandiford  <rsandifo@nildram.co.uk>
137
138         * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
139         (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
140
141 2008-03-20  Alan Modra  <amodra@bigpond.net.au>
142
143         * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
144         (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
145         (process_stubs, discover_functions, build_call_tree): Likewise.
146         (spu_elf_stack_analysis): Likewise.
147         (spu_elf_check_vma): Likewise.  Move.
148         (struct call_info): Make "is_tail" a bitfield.
149         (insert_callee): Clear fun->start and set fun->is_func if we find
150         a non-tail call.
151         * elf32-spu.h (spu_elf_create_sections): Update prototype.
152         (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
153
154 2008-03-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
155
156         * aclocal.m4: Regenerate.
157         * configure: Likewise.
158         * Makefile.in: Likewise.
159
160 2008-03-16  H.J. Lu  <hongjiu.lu@intel.com>
161
162         PR ld/5789
163         PR ld/5943
164         * elf32-i386.c  (elf_i386_relocate_section): Issue an error
165         for R_386_GOTOFF relocaton against undefined hidden/internal
166         symbols when building a shared object.
167
168         * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
169         error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
170         relocaton against undefined hidden/internal symbols when
171         building a shared object.
172         (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
173         is referenced locally, but isn't defined in a regular file.
174
175 2008-03-15  H.J. Lu  <hongjiu.lu@intel.com>
176
177         * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
178         HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
179         BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
180         HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
181         * bfd.c: Here.
182
183         * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
184         mtime_set, no_export, output_has_begun and has_armap to bit
185         field.
186
187         * bfd-in2.h: Regenerated.
188
189 2008-03-14  Daniel Jacobowitz  <dan@codesourcery.com>
190
191         * cache.c (close_one): Remove mtime hack.
192
193 2008-03-14  H.J. Lu  <hongjiu.lu@intel.com>
194
195         PR ld/5913
196         * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
197         (elfNN_ia64_dtprel_base): Likewise.
198         (elfNN_ia64_relocate_section): Go to missing_tls_sec if
199         tls_sec is NULL before calling elfNN_ia64_tprel_base or
200         elfNN_ia64_dtprel_base.  Report unsupported TLS relocations.
201
202 2008-03-14  Alan Modra  <amodra@bigpond.net.au>
203
204         * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
205         common code to..
206         (maybe_needs_stub): ..here, a new function that also omits stubs
207         for .eh_frame, and..
208         (needs_ovl_stub): ..here.  Create stubs for labels in code section
209         referenced by switch jump table.
210         (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
211         (enum _insn_type): Delete.
212         (enum _stub_type): New.
213         (count_stub, build_stub): Adjust.
214         (allocate_spuear_stubs, build_spuear_stubs): Adjust.
215
216 2008-03-13  Alan Modra  <amodra@bigpond.net.au>
217
218         * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
219         (_bfd_elf_assign_file_position_for_section): Simplify align.
220         (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
221         for sh_addralign.
222         (elf_fake_sections, swap_out_syms): Likewise.
223         * elflink.c (bfd_elf_final_link): Likewise.
224
225 2008-03-13  Alan Modra  <amodra@bigpond.net.au>
226
227         * Makefile.am: Run "make dep-am".
228         * Makefile.in: Regenerate.
229         * po/SRC-POTFILES.in: Regenerate.
230
231 2008-03-12  Bernd Schmidt  <bernd.schmidt@analog.com>
232
233         From Jie Zhang <jie.zhang@analog.com>
234         * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
235         gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
236         gotoff, call and sym not bitfields.
237         (bfinfdpic_gc_sweep_hook): New function; update the relocation
238         information for the relocations of the section being removed.
239         (bfinfdpic_check_relocs): Accumulate the number of relocations
240         which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
241         fdgoffhilo, gotoff, call and sym fields.
242         (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
243
244 2008-03-12  Alan Modra  <amodra@bigpond.net.au>
245
246         PR 5900
247         * elf-bfd.h: Include elf/internal.h after elf/external.h.
248         * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
249         (elf_swap_symbol_out): Adjust SHN_XINDEX test.
250         (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
251         seen in external structs.
252         (valid_section_index_p): Delete.
253         (elf_object_p): Don't increment section numbers over reserved range.
254         Simplify test for valid sh_link, sh_info and e_shstrndx fields.
255         (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
256         seen in external structs.  Don't increment section numbers over
257         reserved range.
258         * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
259         (bfd_section_from_shdr): Likewise.
260         (group_signature): Range check before accessing elf_elfsections.
261         (_bfd_elf_setup_sections): Likewise.
262         (bfd_section_from_shdr): Likewise.
263         (bfd_section_from_shdr): Don't increment section number over
264         reserved sections.
265         (assign_file_positions_for_non_load_sections): Likewise.
266         (assign_file_positions_except_relocs): Likewise.
267         (_bfd_elf_write_object_contents): Likewise.
268         (assign_section_numbers): Likewise.  Adjust for changed SHN_*.
269         (prep_headers): Delete unused variable.
270         * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
271         for changed SHN_* values.
272         (check_dynsym, elf_link_input_bfd): Likewise.
273         (bfd_elf_final_link): Likewise.  Don't skip over reserved section
274         range.
275         (elf_fixup_link_order): Check that sh_link field is valid.
276         * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
277         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
278         accesssing elf_elfsections.
279         * elf32-avr.c (elf32_avr_size_stubs): Likewise.
280         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
281         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
282         * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
283         SHN_* defines.  Test for SHN_BAD return from
284         _bfd_elf_section_from_bfd_section
285
286 2008-03-12  Alan Modra  <amodra@bigpond.net.au>
287
288         * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
289         * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
290         SHN_BAD on error.
291         (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
292         _bfd_elf_section_from_bfd_section, not -1.
293         (swap_out_syms): Likewise.
294         * elflink.c (elf_link_add_object_symbols): Likewise.
295         (bfd_elf_get_bfd_needed_list): Likewise.
296         (bfd_elf_match_symbols_in_sections): Likewise.
297         (elf_link_add_object_symbols): Don't bother testing for symbols
298         using normal sections before calling bfd_section_from_elf_index.
299         (elf_link_input_bfd, bfd_elf_final_link): Likewise.
300         (bfd_elf_reloc_symbol_deleted_p): Likewise.
301         * elfcode.h (elf_slurp_symbol_table): Likewise.
302         * elf32-spu.c (get_sym_h): Likewise.
303         * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
304         * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
305         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
306
307 2008-03-11  Alan Modra  <amodra@bigpond.net.au>
308
309         * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
310         to those in process_stubs for overlay symbols.
311
312 2008-03-09  Paul Brook  <paul@codesourcery.com>
313
314         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
315         Tag_VFP_arch values.
316
317 2008-03-08  Paul Brook  <paul@codesourcery.com>
318
319         * elf32-arm.c (insert_thumb_branch): Rewrite.
320         (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
321
322 2008-03-07  Paul Brook  <paul@codesourcery.com>
323
324         * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
325         MOVT relocations.
326         (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
327         extension.
328         (elf32_arm_relocate_section): Handle MOVW and MOVT
329         relocations.  Improve safety check for other weird relocations.
330         (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
331         relocations.
332
333 2008-03-03  Bob Wilson  <bob.wilson@acm.org>
334
335         * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
336         only compute its value once.
337
338 2008-03-03  Alan Modra  <amodra@bigpond.net.au>
339
340         * elf32-spu.c (struct got_entry): Add "addend" field.
341         (count_stub, build_stub): Use a new stub if relocation addend
342         differs from existing stubs for this symbol.
343         (process_stubs): Deal with addends.
344         (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
345
346 2008-03-02  H.J. Lu  <hongjiu.lu@intel.com>
347
348         PR ld/5789
349         * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
350         for hidden and local symbols.
351
352 2008-03-03  Alan Modra  <amodra@bigpond.net.au>
353
354         * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
355         undefined symbols with internal or hidden visibility.
356         (ppc_elf_relocate_section): Likewise.  Use SYMBOL_CALLS_LOCAL
357         rather than SYMBOL_REFERENCES_LOCAL on branches.  Don't
358         return immediately on dynamic reloc error.
359
360 2008-03-01  Alan Modra  <amodra@bigpond.net.au>
361
362         * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
363         if emitrelocations.
364         (get_relocs): New function, split out from..
365         (ppc_build_one_stub): ..here.  Add relocs on plt_branch stubs if
366         emitrelocations.  Remove indx temp.
367         (ppc_size_one_stub): Count new stub relocs.
368         (ppc64_elf_size_stubs): Count new glink reloc.
369         (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
370         (ppc64_elf_finish_dynamic_sections): Output glink relocs.
371         * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
372         glink code.
373
374 2008-02-28  Alan Modra  <amodra@bigpond.net.au>
375
376         * elf32-spu.c (mark_functions_via_relocs): Don't assume that
377         the "->start" pointer reaches to function origin, so that we
378         can handle functions split over more than two sections.
379         (build_call_tree): Likewise.
380         (pasted_function): Don't attempt to set fun->start back to the
381         function origin, just go back one section.
382
383 2008-02-27  Catherine Moore  <clm@codesourcery.com>
384
385         * elf.c ( _bfd_elf_print_private_bfd_data): Call
386         elf_backend_get_target_dtag if defined.
387         * elf32-mips.c (elf_backend_get_target_dtag): Define.
388         * elf64-mips.c: Likewise.
389         * elfn32-mips.c: Likewise.
390         * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
391         * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
392         * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
393         * elfxx-target.h (elf_backend_get_target_dtag): Add default.
394         (elf_backend_data): Add elf_backend_get_target_dtag.
395
396 2008-02-26  Alan Modra  <amodra@bigpond.net.au>
397
398         * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
399         for R_PPC_REL32 syms.  Don't set non_got_ref on branch reloc syms,
400         and assume branch relocs are not dynamic when non-shared.
401         (readonly_dynrelocs): New function, split out from..
402         (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
403         (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
404         clear non_got_ref..
405         (allocate_dynrelocs): ..and don't set u.def for undefined weak.
406         Do allow dynamic relocs on undefined symbols.
407         (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
408         (ppc_elf_relocate_section): Mirror dynamic reloc changes in
409         check_relocs.
410         (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
411         plt symbols needing pointer_equality_needed.
412
413 2008-02-23  Alan Modra  <amodra@bigpond.net.au>
414
415         * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
416
417 2008-02-23  Alan Modra  <amodra@bigpond.net.au>
418
419         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
420         pointer_equality_needed.
421         (ppc_elf_check_relocs): Split out non-branch relocs from others
422         that might emit dynamic relocs.  Set pointer_equality_needed
423         for their symbols.  Don't set non_got_ref on branch reloc symbols.
424         (ppc_elf_hash_symbol): New function.
425         (elf_backend_hash_symbol): Define.
426         (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
427         Error if pointer_equality_needed on weak plt symbol.
428
429 2008-02-22  H.J. Lu  <hongjiu.lu@intel.com>
430
431         PR ld/5788
432         * elflink.c (elf_create_symbuf): Correct buffer size and
433         position.
434
435 2008-02-22  Nick Clifton  <nickc@redhat.com>
436
437         PR 868
438         * dwarf2.c: Revert previous patch.  All of the allocate memory is
439         on an obstack which will be freed at some other time.
440
441 2008-02-20  Nick Clifton  <nickc@redhat.com>
442
443         PR 868
444         * libbfd.c (bfd_realloc_or_free): New function.  Performs like
445         bfd_realloc, but if the (re)allocation fails, the pointer is
446         freed.
447         * libbfd-in.h: Prototype.
448         * libbfd.h: Regenerate.
449         * bfdio.c (bfd_bwrite): Use the new function.
450         (bfd_seek): Likewise.
451         * bfdwin.c:(bfd_get_file_window): Likewise.
452         * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
453         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
454         * elf32-xtensa.c (vsprintf_msg): Likewise.
455         * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
456         * stabs.c (_bfd_link_seciton_stabs): Likewise.
457         * vms-misc.c (_bfd_vms_get_record): Likewise.
458         * vms-tir.c (check_section): Likewise.
459         * vms.c (vms_new_section_hook): Likewise.
460         * elf32-arm.c (elf32_arm_section_map_add): Check that the
461         allocation of sec_data->map succeeded before using it.
462         * elflink.c (elf_link_output_sym): Do not overwrite finfo->
463         symshndxbuf until it is known that the reallocation succeeded.
464
465 2008-02-20  Diogo de Carvalho Kraemer  <diogo@kraemer.eng.br>
466             Nick Clifton  <nickc@redhat.com>
467
468         PR 868
469         * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
470         out of memory.
471         (decode_line_info): Free the line_info_table before returning a
472         failure result.
473         (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
474         Free the line table.  Free the function table.  Free the variable
475         table.
476
477 2008-02-17  Mark Kettenis  <kettenis@gnu.org>
478
479         * elf.c (swap_out_syms): Avoid preprocessing directive within
480         macro arg.
481
482 2008-02-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
483
484         * elf.c (assign_file_positions_for_load_sections): Set the type of
485         PT_NOTE sections to SHT_NOTE.
486
487 2008-02-17  Ulrich Weigand  <uweigand@de.ibm.com>
488
489         * simple.c (bfd_simple_get_relocated_section_contents): Set
490         link_info.output_bfd.
491
492 2008-02-16  Nathan Sidwell  <nathan@codesourcery.com>
493
494         * dwarf2.c (find_line): Don't trust debug information after an
495         unparseable compilation unit.
496
497 2008-02-15  Alan Modra  <amodra@bigpond.net.au>
498
499         PR 5765
500         * section.c (SEC_LINK_DUPLICATES): Correct.  Renumber following flags.
501         * bfd-in2.h: Regenerate.
502
503 2008-02-15  Alan Modra  <amodra@bigpond.net.au>
504
505         * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
506         * elf.c (bfd_elf_allocate_object): Don't check for already allocated
507         tdata.
508         * elf32-hppa.c (elf32_hppa_mkobject): New function.
509         (bfd_elf32_mkobject): Define.
510         * elf32-ppc.c (is_ppc_elf_target): Delete.  Replace all uses with..
511         (is_ppc_elf): ..this new macro.
512         * elf64-ppc.c (is_ppc64_elf_target): Delete.  Replace all uses with..
513         (is_ppc64_elf): ..this new macro.
514
515 2008-02-15  Alan Modra  <amodra@bigpond.net.au>
516
517         * elflink.c: Replace all accesses to hash->creator field with
518         output_bfd->xvec.
519         * cofflink.c: Likewise.
520         * coff-h8300.c: Likewise.
521         * ecoff.c: Likewise.
522         * elf32-m68hc1x.c: Likewise.
523         * elf32-ppc.c: Likewise.
524         * elf64-alpha.c: Likewise.
525         * elf64-ppc.c: Likewise.
526         * elf64-sparc.c: Likewise.
527         * elfxx-mips.c: Likewise.
528         * i386linux.c: Likewise.
529         * m68klinux.c: Likewise.
530         * sparclinux.c: Likewise.
531         * sunos.c: Likewise.
532         * xcofflink.c: Likewise.
533         * linker.c: Likewise.
534         (_bfd_link_hash_table_init): Don't store creator.
535
536 2008-02-14  Peter Jones  <pjones@redhat.com>
537
538         * efi-rtdrv-ia32.c: New file.
539         * efi-bsdrv-ia32.c: New file.
540         * efi-rtdrv-ia64.c: New file.
541         * efi-bsdrv-ia64.c: New file.
542         * efi-rtdrv-x86_64.c: New file.
543         * efi-bsdrv-x86_64.c: New file.
544         * peicode.h (pe_bfd_object_p): Add support for boot service and
545         runtime service drivers.
546         * libpei.h: Add macros for EFI formats, and rename the efi application
547         format macros to disambiguate.
548         * targets.c: Add bfd_target _vec externs.
549         (_bfd_tar): Add EFI _vec entries.
550         * config.bfd: Add EFI vectors into the selection routines.
551         * configure.in: add EFI _vec entries.
552         * configure: Regenerate.
553         * Makefile.am: Add EFI files.
554         * Makefile.in: Regenerate.
555
556 2008-02-14  Nathan Sidwell  <nathan@codesourcery.com>
557
558         * dwarf1.c (struct dwarf1_debug): Add syms member.
559         (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
560         (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
561         section contents, check for out of memory.
562
563         * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
564         (parse_die): Change data pointers to bfd_byte.
565         (parse_line_table, parse_functions_in_unit): Likewise.
566
567 2008-02-14  Alan Modra  <amodra@bigpond.net.au>
568
569         * elflink.c (compute_bucket_count): Warning fixes.
570
571 2008-02-12  DJ Delorie  <dj@redhat.com>
572
573         * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
574         relocation pointing to local symbol in merged section.
575
576         * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
577         (iq2000_elf_relocate_section): Call it.
578
579 2008-02-12  Nick Clifton  <nickc@redhat.com>
580
581         PR ld/5692
582         * elf-bfd.h (enum elf_object_id): New enum, used to identify
583         target specific extensions to the elf_obj_tdata structure.
584         (struct elf_obj_tdata): New field 'object_id'.
585         (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
586         macros for accessing fields in the elf_obj_tdata structure.
587         (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
588         (bfd_elf_allocate_object): New function.
589         * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
590         and implement by calling bfd_elf_allocate_object.
591         (bfd_elf_allocate_object): New function: Allocates an
592         elf_obj_tdata structure, possibly with a target specific
593         extension.
594         * elfxx-target.h (bfd_elfNN_mkobject): Use
595         bfd_elf_make_generic_object as the default value.
596         * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
597         for consistency with other, similar structures.
598         (is_arm_elf): New macro.  Checks a BFD to make sure that is an ARM
599         ELF bfd.
600         (elf32_arm_mkobject): Call bfd_elf_allocate_object.
601         (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
602         the bfd being processed.
603         (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
604         (bfd_elf32_arm_set_target_relocs): Likewise.
605         (bfd_elf32_arm_final_link_relocate): Likewise.
606         (bfd_elf32_arm_copy_private_bfd_data): Likewise.
607         (bfd_elf32_arm_merge_eabi_attributes): Likewise.
608         (bfd_elf32_arm_merge_private_bfd_data): Likewise.
609         (bfd_elf32_arm_check_relocs): Likewise.
610         (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
611         (bfd_elf32_arm_size_dynamic_sections): Likewise.
612         (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
613         (bfd_elf32_arm_init_maps): Likewise.
614         (bfd_elf32_arm_final_link_relocate): Likewise.
615         (bfd_elf32_arm_relocate_section): Likewise.
616         (bfd_elf32_arm_gc_sweep_hook): Likewise.
617         (bfd_elf32_arm_check_relocs): Likewise.
618         (bfd_elf32_arm_size_dynamic_sections): Likewise.
619         * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
620         (is_i386_elf): New macro.  Checks a BFD to make sure that is an x86
621         ELF bfd.
622         (elf_i386_check_relocs): Use is_i386_elf macro to check    the bfd
623         being processed.
624         (elf_i386_size_dynamic_sections): Likewise.
625         (elf_i386_relocate_section): Likewise.
626         (elf_i386_check_relocs): Use elf_symtab_hdr.
627         (elf_i386_gc_sweep_hook): Likewise.
628         (elf_i386_size_dynamic_sections): Likewise.
629         (elf_i386_relocate_section): Likewise.
630         * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
631         (elf_create_pointer_linker_section): Use is_ppc_elf_target to
632         verify that the bfd before accessing target specific fields.
633         (ppc_elf_check_relocs): Likewise.
634         (elf_finish_pointer_linker_section): Likewise.
635         (elf_create_pointer_linker_section): Use elf_symtab_hdr.
636         (ppc_elf_check_relocs): Likewise.
637         (ppc_elf_gc_sweep_hook): Likewise.
638         (ppc_elf_tls_optimize): Likewise.
639         (ppc_elf_size_dynamic_sections): Likewise.
640         (ppc_elf_relax_section): Likewise.
641         (ppc_elf_relocate_section): Likewise.
642         * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
643         reminding programmers to keep this structure in sync with the one
644         defined in elf64-s390.c.
645         (elf_s390_mkobject): Call bfd_elf_allocate_object.
646         (is_s390_elf): New macro.  Checks a BFD to make sure that is an s390
647         ELF bfd.
648         (elf_s390_check_relocs): Use is_s390_elf macro to check    the bfd
649         being processed.
650         (elf_s390_size_dynamic_sections): Likewise.
651         (elf_s390_relocate_section): Likewise.
652         (elf_s390_check_relocs): Use elf_symtab_hdr.
653         (elf_s390_gc_sweep_hook): Likewise.
654         (elf_s390_size_dynamic_sections): Likewise.
655         (elf_s390_relocate_section): Likewise.
656         * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
657         (is_sh_elf): New macro.  Checks a BFD to make sure that is an SH
658         ELF bfd.
659         (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
660         bfd being processed.
661         (sh_elf_relocate_section): Likewise.
662         (sh_elf_check_relocs): Likewise.
663         (sh_elf_copy_private_data): Likewise.
664         (sh_elf_relax_section): Use elf_symtab_hdr.
665         (sh_elf_size_dynamic_sections): Likewise.
666         (sh_elf_relocate_section): Likewise.
667         (sh_elf_get_relocated_section_contents): Likewise.
668         (sh_elf_gc_sweep_hook): Likewise.
669         (sh_elf_check_relocs): Likewise.
670         * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
671         (is_alpha_elf): New macro.  Checks a BFD to make sure that is an
672         Alpha ELF bfd.
673         (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
674         the bfd being processed.
675         (elf64_alpha_create_dynamic_section): Likewise.
676         (elf64_alpha_check_relocs): Likewise.
677         (elf64_alpha_size_got_sections): Likewise.
678         (elf64_alpha_relax_section): Likewise.
679         (elf64_alpha_relocate_section): Likewise.
680         (elf64_alpha_final_link): Likewise.
681         (elf64_alpha_check_relocs): Use elf_symtab_hdr.
682         (elf64_alpha_relax_section): Likewise.
683         (elf64_alpha_relocate_section_r): Likewise.
684         (elf64_alpha_relocate_section): Likewise.
685         * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
686         (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
687         being processed.
688         (opd_entry_value): Likewise.
689         (allocate_dynrelocs): Likewise.
690         (ppc64_elf_relocate_section): Likewise.
691         (ppc64_elf_check_relocs): Use elf_symtab_hdr.
692         (opd_entry_value): Likewise.
693         (ppc64_elf_gc_sweep_hook): Likewise.
694         (get_sym_h): Likewise.
695         (ppc64_elf_edit_opd): Likewise.
696         (ppc64_elf_tls_optimize): Likewise.
697         (ppc64_elf_edit_toc): Likewise.
698         (ppc64_elf_size_dynamic_sections): Likewise.
699         (toc_adjusting_stub_needed): Likewise.
700         (ppc64_elf_size_stubs): Likewise.
701         (ppc64_elf_relocate_section): Likewise.
702         * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
703         reminding programmers to keep this structure in sync with the one
704         defined in elf32-s390.c.
705         (elf_s390_mkobject): Call bfd_elf_allocate_object.
706         (is_s390_elf): New macro.  Checks a BFD to make sure that is an s390
707         ELF bfd.
708         (elf_s390_check_relocs): Use is_s390_elf macro to check    the bfd
709         being processed.
710         (elf_s390_size_dynamic_sections): Likewise.
711         (elf_s390_relocate_section): Likewise.
712         (elf_s390_check_relocs): Use elf_symtab_hdr.
713         (elf_s390_gc_sweep_hook): Likewise.
714         (elf_s390_size_dynamic_sections): Likewise.
715         (elf_s390_relocate_section): Likewise.
716         * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
717         (is_x86_64_elf): New macro.  Checks a BFD to make sure that is an
718         x86_64 ELF bfd.
719         (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
720         being processed.
721         (elf64_x86_64_size_dynamic_sections): Likewise.
722         (elf64_x86_64_relocate_section): Likewise.
723         (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
724         (elf64_x86_64_gc_sweep_hook): Likewise.
725         (elf64_x86_64_size_dynamic_sections): Likewise.
726         (elf64_x86_64_relocate_section): Likewise.
727         * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
728         (is_sparc_elf): New macro.  Checks a BFD to make sure that is a Sparc
729         ELF bfd.
730         (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
731         bfd being processed.
732         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
733         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
734         (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
735         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
736         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
737         (_bfd_sparc_elf_relocate_section): Likewise.
738
739 2008-02-12  Alan Modra  <amodra@bigpond.net.au>
740
741         PR 5303, 5755
742         * arange-set.c: Delete.
743         * arange-set.h: Delete.
744         * dwarf2.c: Revert 2007-09-21 changes.
745         * Makefile.am: Likewise.
746         * Makefile.in: Regenerate.
747         * po/SRC-POTFILES.in: Regenerate.
748
749 2008-02-11  Bernd Schmidt  <bernd.schmidt@analog.com>
750
751         * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
752         if necessary.
753         (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
754         mismatches are detected.
755
756         * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
757         emit invalid relocs or rofixup entries for deleted .eh_frame entries.
758
759 2008-02-11  Daniel Jacobowitz  <dan@codesourcery.com>
760
761         * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
762         was reached.
763         * srec.c (srec_scan): Calculate the checksum.  Complain on mismatch.
764
765 2008-02-07  Alan Modra  <amodra@bigpond.net.au>
766
767         * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
768         of _ovly_buf_table size.
769         (spu_elf_build_stubs): Use low bit of .size as "present" bit.
770         Adjust initialisations relating to _ovly_buf_table.
771
772 2008-02-04  Bob Wilson  <bob.wilson@acm.org>
773
774         * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
775         relocation, do not continue processing it.  Ignore R_XTENSA_ASM_EXPAND
776         relocations against dynamic symbols.
777         (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
778         .xt.lit section.
779
780 2008-02-04  Kai Tietz  <kai.tietz@onevision.com>
781             H.J. Lu  <hongjiu.lu@intel.com>
782
783         PR 5715
784         * warning.m4: Enable -Wno-format by default when using gcc on
785         mingw.
786         * configure: Regenerated.
787
788 2008-02-04  Adam Nemet  <anemet@caviumnetworks.com>
789
790         * archures.c: Update copyright.
791         (bfd_mach_mips_octeon): New macro.
792         * bfd-in2.h: Regenerate.
793         * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
794         (mips_set_isa_flags): Likewise.
795         (mips_mach_extensions): Add Octeon.
796         * cpu-mips.c: Update copyright.
797         (I_mipsocteon): New enum constant.
798         (arch_info_struct): Add Octeon.
799
800 2008-02-04  Alan Modra  <amodra@bigpond.net.au>
801
802         * elf32-spu.c (spu_elf_relocate_section): Correct return type.
803         Return error status on unexpected relocation errors.
804
805 2008-02-04  Alan Modra  <amodra@bigpond.net.au>
806
807         PR ld/5692
808         * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31.  Instead abort
809         on non-ELF input.
810         * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
811         processing on non-ELF input.
812
813 2008-01-31  Marc Gauthier  <marc@tensilica.com>
814
815         * config.bfd (xtensa*-*-*): Recognize processor variants.
816
817 2008-01-31  Nick Clifton  <nickc@redhat.com>
818
819         PR ld/5692
820         * elf.c (bfd_elf_get_elf_syms): Check the return value of
821         get_elf_backend_data.
822
823 2008-01-28  Fabian Groffen  <grobian@gentoo.org>
824
825         * config.bfd (x86_64-*-solaris2): Add support for this target.
826
827 2008-01-28  Alan Modra  <amodra@bigpond.net.au>
828
829         Rewrite SPU overlay handling code.  Put overlay calls stubs in the
830         overlays where possible.  Use a faster call stub, or optionally at
831         compile time, a more compact stub.  Double size of _ovly_buf_table
832         so that low bit of _ovly_table.buf can be used as a "present" bit.
833         Reserve an extra _ovly_table entry for index zero.
834         * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
835         add new ones.
836         (struct got_entry): New.
837         (struct spu_stub_hash_entry): Delete.
838         (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
839         (spu_elf_link_hash_table_create): Adjust for struct changes.
840         (spu_stub_name): Delete.
841         (spu_elf_find_overlays): Don't track sections from overlay regions.
842         Instead set ovl_buf number in spu elf section data.  Error if
843         overlays in one region don't start at the same address.  Adjust
844         for struct _spu_elf_section_data changes.
845         (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
846         (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
847         (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
848         (enum _insn_type): New.
849         (count_stub, build_stub): New functions.
850         (allocate_spuear_stubs): Use count_stub.
851         (build_spuear_stubs): Use build_stub.
852         (populate_stubs, sort_stubs): Delete.
853         (process_stubs): New function.
854         (write_one_stub): Delete.
855         (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
856         (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
857         (maybe_insert_function, check_function_ranges): Likewise.
858         (find_function, pasted_function, build_call_tree): Likewise.
859         (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
860         (spu_elf_modify_program_headers): Likewise.
861         (interesting_section): Detect stub sections differently.  Delete
862         htab param, adjust all callers.
863         (spu_elf_relocate_section): Rewrite stub handling.
864         (spu_elf_output_symbol_hook): Likewise.
865         (bfd_elf32_bfd_link_hash_table_free): Delete.
866         * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
867         output-only fields into a union.  Add ovl_buf.
868         (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
869
870 2008-01-25  DJ Delorie  <dj@redhat.com>
871
872         * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
873
874 2008-01-25  Kai Tietz  <kai.tietz@onevision.com>
875
876         * bfd-in.h: Add mingw I64 support.
877         * bfd-in2.h: Regenerated.
878         * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
879
880 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
881
882         PR 4453
883         * format.c (bfd_check_format_matches): Don't accept archives as
884         fully matching unless they have a map.
885
886 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
887
888         * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
889
890 2008-01-21  Alan Modra  <amodra@bigpond.net.au>
891
892         * ecoff.c (_bfd_ecoff_archive_p): Delete.
893         * libecoff.h (_bfd_ecoff_archive_p): Delete.
894         * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
895         * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
896         (ecoff_biglittle_vec): Likewise.
897
898 2008-01-19  Alan Modra  <amodra@bigpond.net.au>
899
900         PR 5646
901         * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
902         non-NULL before dereferencing.
903
904 2008-01-15  Alan Modra  <amodra@bigpond.net.au>
905
906         PR 5604
907         * elf-bfd.h (struct elf_backend_data): Add gc_keep.  Remove param
908         names from others.
909         (_bfd_elf_gc_keep): Declare.
910         * elfxx-target.h (elf_backend_gc_keep): Define.
911         (elfNN_bed): Init new field.
912         * elflink.c (_bfd_elf_gc_keep): New function.
913         (bfd_elf_gc_sections): Call gc_keep.
914         * elf64-ppc.c (elf_backend_gc_keep): Define.
915         (struct _ppc64_elf_section_data): Move .opd related fields to
916         a struct so they don't occupy the same storage.  Adjust accesses
917         throughout file.
918         (ppc64_elf_gc_keep): New function, split out from..
919         (ppc64_elf_gc_mark_hook): ..here.  Don't call _bfd_elf_gc_mark
920         to mark .opd section, just set gc_mark.
921         (ppc64_elf_edit_opd): Remove no_opd_opt parm.  Don't set opd->adjust
922         unless we are changing .opd.  Test non-NULL opd->adjust at all
923         accesses throughout file.
924         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
925
926 2008-01-15  Alan Modra  <amodra@bigpond.net.au>
927
928         * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
929         * bfd-in2.h: Regenerate.
930
931 2008-01-11  Tristan Gingold  <gingold@adacore.com>
932             Eric Botcazou  <ebotcazou@adacore.com>
933
934         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
935         relocatable.
936         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
937         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
938         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
939         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
940         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
941         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
942         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
943         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
944         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
945         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
946         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
947         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
948         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
949         * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
950         * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
951         * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
952         or executable output with relocations.
953
954 2008-01-09  Nick Clifton  <nickc@redhat.com>
955
956         PR gas/5552
957         * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
958         to FALSE for all relocs.
959
960 2008-01-09  Richard Sandiford  <rsandifo@nildram.co.uk>
961
962         PR ld/5526
963         * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
964         fields.  Rename u.cie.u.merged to u.cie.u.merged_with.
965         (eh_frame_sec_info): Add a cies field.
966         (eh_frame_hdr_info): Add a merge_cies field.
967         * elf-eh-frame.c (cie): Add a reloc_index member to the personality
968         union.
969         (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
970         of hdr_info->cies.
971         (_bfd_elf_parse_eh_frame): Remove tmp_cie.  Ccreate an array of
972         cie structures in all cases and use it instead of extended_cies.
973         If merging, store the cie array in sec_info->cies and point each
974         CIE's eh_fde_cie at the associated element.  Do not try to
975         calculate the value of the personality routine here; record the
976         offset of the relocation instead.  Do not merge CIEs here.
977         (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
978         (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
979         (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
980         (find_merged_cie): New function.
981         (_bfd_elf_gc_mark_fdes): Use it.  Free sec_info->cies.
982
983 2008-01-07  Nick Clifton  <nickc@redhat.com>
984
985         PR binutils/5535
986         * vms.c (vms_close_and_cleanup): Check for the presence of a
987         vms_private_data_struct before examining any of its fields.
988
989 2008-01-07  H.J. Lu  <hongjiu.lu@intel.com>
990
991         PR ld/5522
992         * elflink.c (elf_link_input_bfd): Don't write out a section if
993         its output section is marked with SEC_NEVER_LOAD.
994
995 For older changes see ChangeLog-2007
996 \f
997 Local Variables:
998 mode: change-log
999 left-margin: 8
1000 fill-column: 74
1001 version-control: never
1002 End: