OSDN Git Service

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