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