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