bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
2
3 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
4 for all relocation types. Allow any type of relocation to refer to
5 __gnu_local_gp.
6
7 2008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
8
9 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
10 (mips_elf_calculate_relocation): Likewise.
11 (_bfd_mips_elf_add_symbol_hook): Likewise.
12 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
13 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
14
15 2008-07-10 Andreas Schwab <schwab@suse.de>
16
17 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
18 paren.
19
20 2008-07-09 Craig Silverstein <csilvers@google.com>
21
22 * Makefile.am (BFD32_LIBS): Add compress.lo.
23 (BFD32_LIBS_CFILES): Add compress.c.
24 (BFD_H_FILES): Likewise.
25 * Makefile.in: Regenerate.
26 * bfd-in2.h: Regenerate.
27 * config.in: Add HAVE_ZLIB_H
28 * configure.in: Add test for libz and zlib.h
29 * configure: Regenerate.
30 * dwarf2.c (read_section): New function.
31 (read_indirect_string): Call new function read_section.
32 (read_abbrevs): Likewise.
33 (decode_line_info): Likewise.
34 (read_debug_ranges): Likewise.
35 (find_line): Call new function read_section when just one
36 .zdebug_info section is found, otherwise read and compress
37 multiple sections.
38 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
39 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
40 (special_sections_z): New struct.
41 (special_sections): Refer to special_sections_z.
42 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
43 sections named .zdebug_*.
44 (_bfd_mips_elf_fake_sections): Likewise.
45 * compress.c: New file.
46 (bfd_uncompress_section_contents): New function.
47
48 2008-07-07 Christophe Lyon <christophe.lyon@st.com>
49
50 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
51 the presence of a PLT.
52
53 2008-07-07 Alan Modra <amodra@bigpond.net.au>
54
55 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
56
57 2008-07-02 Alan Modra <amodra@bigpond.net.au>
58
59 * elf32-ppc.c (is_pic_glink_stub): New function.
60 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
61 multiple shared/pie stubs per plt entry.
62
63 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
64
65 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
66 bed->s->int_rels_per_ext_rel.
67
68 2008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
69
70 * syms.c (BSF_SYNTHETIC): New flag.
71 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
72 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
73 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
74 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
75 for synthetic symbols.
76 * bfd-in2.h: Regenerate.
77
78 2008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
79
80 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
81 Expand comments.
82 (arm_map_one_stub): Use | 1 when setting the low bit.
83
84 2008-06-29 Andreas Schwab <schwab@suse.de>
85
86 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
87 addend on _GLOBAL_OFFSET_TABLE_.
88
89 2008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
90
91 * elf32-arm.c (STUB_ENTRY_NAME): Define.
92 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
93 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
94 R_ARM_ABS32.
95 (struct elf32_arm_stub_hash_entry): Add output_name.
96 (arm_build_one_stub): Move offsets into the offset argument
97 of _bfd_final_link_relocate. Correct offset for
98 arm_thumb_arm_v4t_stub_long_branch.
99 (elf32_arm_size_stubs): Set stub_entry->output_name.
100 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
101 Update all callers.
102 (elf32_arm_output_stub_sym): New.
103 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
104
105 2008-06-20 Alan Modra <amodra@bigpond.net.au>
106
107 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
108 non-branch insns.
109
110 2008-06-20 Alan Modra <amodra@bigpond.net.au>
111
112 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
113 (allocate_spuear_stubs, build_spuear_stubs): Return value from
114 count_stub/build_stub.
115 (spu_elf_build_stubs): Correct location of stub reloc error message.
116
117 2008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
118
119 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
120
121 2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
122
123 * configure: Regenerate.
124
125 2008-06-17 Alan Modra <amodra@bigpond.net.au>
126
127 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
128 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
129 (spu_elf_auto_overlay): Use it.
130 (RECURSE_UNMARK): Define as 0.
131 (unmark_overlay_section): Heed RECURSE_UNMARK.
132 * elf32-spu.h (spu_elf_check_vma): Update prototype.
133
134 2008-06-12 DJ Delorie <dj@redhat.com>
135
136 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
137
138 2008-06-09 Paul Brook <paul@codesourcery.com>
139
140 bfd/
141 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
142 libraries.
143
144 2008-06-09 Christophe Lyon <christophe.lyon@st.com>
145
146 * elf32-arm.c (arm_stub_is_thumb): Define.
147 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
148
149 2008-06-07 Alan Modra <amodra@bigpond.net.au>
150
151 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
152 to stack calculation.
153
154 2008-06-06 Paul Brook <paul@codesourcery.com>
155
156 bfd/
157 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
158
159 2008-06-06 Alan Modra <amodra@bigpond.net.au>
160
161 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
162 file names be unique. Specify archive:path in overlay script.
163
164 2008-06-05 Alan Modra <amodra@bigpond.net.au>
165
166 PR ld/6590
167 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
168
169 2008-06-04 Alan Modra <amodra@bigpond.net.au>
170
171 * elf.c (ignore_section_sym): Don't test section sym value here.
172 (elf_map_symbols): Instead check zero value here as was done prior
173 to 2006-05-26 change.
174
175 2008-06-04 Nick Clifton <nickc@redhat.com>
176
177 PR ld/6019
178 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
179 there are no local symbols.
180
181 2008-06-04 Alan Modra <amodra@bigpond.net.au>
182
183 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
184 (process_stubs): Likewise.
185 (discover_functions): Don't used cached symbols.
186 (maybe_insert_function): Correct condition under which function
187 array is realloc'd.
188 (mark_functions_via_relocs): Delete unused variable.
189
190 2008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
191 Nick Clifton <nickc@redhat.com>
192
193 PR ld/6511
194 * elf64-hppa.c (allocate_global_data_opd): Default to using the
195 dynamic symbol table for local function names in shared libraries.
196
197 2008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
198
199 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
200 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
201
202 2008-05-28 Alan Modra <amodra@bigpond.net.au>
203
204 * elf32-spu.c (spu_elf_object_p): New function.
205 (elf_backend_object_p): Define.
206 (build_stub): Correct second word of 8 byte overlay stubs.
207 (spu_elf_relocate_section): Formatting.
208
209 2008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
210
211 * elf.c (elfcore_write_register_note): New function.
212 * elf-bfd.h (elfcore_write_register_note): New prototype.
213
214 2008-05-22 Christophe Lyon <christophe.lyon@st.com>
215
216 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
217 (elf32_arm_stub_add_mapping_symbol): Remove.
218 (elf32_arm_add_stub): Don't generate mapping symbols. Change
219 prototype.
220 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
221 prototype. Don't generate thumb to arm glue for calls.
222 (arm_map_one_stub): Define.
223 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
224 long calls stubs.
225
226 2008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
227
228 Add multi-GOT support for m68k.
229 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
230 glist): New fields.
231 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
232 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
233 struct elf_m68k_multi_got): New data structures.
234 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
235 allow_multigot_p, multi_got_): New fields.
236 (elf_m68k_multi_got): New macro.
237 (elf_m68k_link_hash_newfunc): Initialize new fields of
238 struct elf_m68k_link_hash_entry.
239 (elf_m68k_link_hash_table_create): Initialize new fields of
240 struct elf_m68k_link_hash_table.
241 (elf_m68k_link_hash_table_free): New static function implementing hook.
242 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
243 static functions for struct elf_m68k_got.
244 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
245 elf_m68k_got_entry_eq): New static functions for
246 struct elf_m68k_got_entry.
247 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
248 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
249 (enum elf_m68k_get_entry_howto): New enum.
250 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
251 elf_m68k_remove_got_entry_type): New static functions for
252 struct elf_m68k_got_entry.
253 (elf_m68k_add_entry_to_got): New static function.
254 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
255 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
256 functions for struct elf_m68k_bfd2got_entry.
257 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
258 elf_m68k_can_merge_gots): New traversal.
259 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
260 elf_m68k_merge_gots): Ditto.
261 (struct elf_m68k_finalize_got_offsets_arg,
262 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
263 (struct elf_m68k_partition_multi_got_arg,
264 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
265 elf_m68k_partition_multi_got): Ditto.
266 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
267 functions.
268 (elf_m68k_copy_indirect_symbol): New static function implementing
269 a hook.
270 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
271 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
272 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
273 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
274 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
275 of a global symbol.
276 (bfd_elf_m68k_set_target_options): New function.
277 (bfd_elf32_bfd_link_hash_table_free): Define hook.
278 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
279 to skip generic calculation of GOT offsets.
280 (elf_backend_copy_indirect_symbol): Define hook.
281 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
282 * bfd-in2.h: Regenerate.
283
284 2008-05-21 André Johansen <andrejoh@gmail.com>
285
286 PR 868
287 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
288 for filenames in function tables and variable tables.
289
290 2008-05-19 Alan Modra <amodra@bigpond.net.au>
291
292 PR 2995, PR 6473
293 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
294 vma when all p_paddr fields are zero and there is more than
295 one PT_LOAD header.
296
297 2008-05-15 Christophe Lyon <christophe.lyon@st.com>
298
299 Add long call support for ARM.
300 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
301 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
302 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
303 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
304 (THM_MAX_FWD_BRANCH_OFFSET): Define.
305 (THM_MAX_BWD_BRANCH_OFFSET): Define.
306 (arm_long_branch_stub): Define.
307 (arm_pic_long_branch_stub): Define.
308 (arm_thumb_v4t_long_branch_stub): Define.
309 (arm_thumb_thumb_long_branch_stub): Define.
310 (arm_thumb_arm_v4t_long_branch_stub): Define.
311 (STUB_SUFFIX): Define.
312 (elf32_arm_stub_type): Define.
313 (elf32_arm_stub_hash_entry): Define.
314 (elf32_arm_link_hash_entry): Add stub_cache field.
315 (arm_stub_hash_lookup): Define.
316 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
317 add_stub_section, layout_sections_again, stub_group, bfd_count,
318 top_index, input_list fields.
319 (elf32_arm_link_hash_newfunc): Init new field.
320 (stub_hash_newfunc): New function.
321 (elf32_arm_link_hash_table_create): Init stub_hash_table.
322 (elf32_arm_hash_table_free): New function.
323 (arm_type_of_stub): New function.
324 (elf32_arm_stub_name): New function.
325 (elf32_arm_get_stub_entry): New function.
326 (elf32_arm_stub_add_mapping_symbol): New function.
327 (elf32_arm_add_stub): New function.
328 (arm_build_one_stub): New function.
329 (arm_size_one_stub): New function.
330 (elf32_arm_setup_section_lists): New function.
331 (elf32_arm_next_input_section): New function.
332 (group_sections): New function.
333 (elf32_arm_size_stubs): New function.
334 (elf32_arm_build_stubs): New function.
335 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
336 (bfd_elf32_arm_process_before_allocation): No longer handle
337 R_ARM_CALL and R_ARM_THM_CALL.
338 (using_thumb_only): New function.
339 (elf32_arm_final_link_relocate): Redirect calls to stub if range
340 exceeds encoding capabilities.
341 (bfd_elf32_bfd_link_hash_table_free): Define.
342 * bfd-in.h (R_ARM_max): Fix value to 130.
343 (elf32_arm_setup_section_lists): Protype.
344 (elf32_arm_next_input_section): Protype.
345 (elf32_arm_size_stubs): Protype.
346 (elf32_arm_build_stubs): Protype.
347 * bfd-in2.h: Regenerate.
348
349 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
350
351 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
352 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
353
354 2008-05-14 Alan Modra <amodra@bigpond.net.au>
355
356 * Makefile.am: Run "make dep-am".
357 * Makefile.in: Regenerate.
358
359 2008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
360 Alan Modra <amodra@bigpond.net.au>
361
362 * elf32-ppc.c (section_covers_vma): New function.
363 (ppc_elf_get_synthetic_symtab): New function.
364 (bfd_elf32_get_synthetic_symtab): Define.
365 * elf64-ppc.c (section_covers_vma): New function.
366 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
367 table entries, and __glink_PLTresolve on resolver stub.
368 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
369
370 2008-05-12 Alan Modra <amodra@bigpond.net.au>
371
372 PR 6443
373 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
374 (must_be_dyn_reloc): New function.
375 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
376 in pies.
377 (ppc_elf_tls_optimize): Optimise pies.
378 (ppc_elf_relocate_section): Use a section symbol rather than no
379 symbol if possible for LD->IE TLS sequence, but don't error if
380 we must use no symbol.
381 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
382 (must_be_dyn_reloc): Likewise.
383 (ppc64_elf_check_relocs): Likewise.
384 (ppc64_elf_tls_optimize): Likewise.
385 (ppc64_elf_relocate_section): Likewise.
386
387 2008-05-12 Alan Modra <amodra@bigpond.net.au>
388
389 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
390
391 2008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
392
393 * elfcore.h (elf_core_file_p): Warn about core truncation.
394
395 2008-05-07 Bob Wilson <bob.wilson@acm.org>
396
397 * elf32-xtensa.c (xtensa_property_section_name): New.
398 (xtensa_make_property_section): New.
399 (xtensa_get_property_section): Make static. Do not create a new
400 section if it does not exist.
401
402 2008-05-08 Alan Modra <amodra@bigpond.net.au>
403
404 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
405 (spu_elf_relocate_section): Handle relocations against symbols
406 defined in ._ea specially.
407
408 2008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
409
410 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
411 ARRAY_SIZE.
412 (elf32_arm_symbian_plt_sym_val): New.
413 (elf_backend_plt_sym_val): Define.
414
415 2008-05-03 Alan Modra <amodra@bigpond.net.au>
416
417 PR 2995, PR 6473
418 * elf.c (rewrite_elf_program_header): Rather than clearing
419 p_paddr_valid at end, don't set it in the first place. Delete
420 comment no longer relevant. When not p_paddr_valid, don't set
421 paddr from vaddr, and don't set p_vaddr_offset.
422
423 2008-05-01 Cary Coutant <ccoutant@google.com>
424
425 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
426 corrupt string table.
427
428 2008-05-01 Joel Brobecker <brobecker@adacore.com>
429
430 * cache.c (cache_bread_1): Renames cache_bread.
431 (cache_bread): New function.
432
433 2008-05-01 Alan Modra <amodra@bigpond.net.au>
434
435 PR 2995, PR 6473
436 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
437 (assign_file_positions_for_load_sections): Combine nested "if".
438 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
439 when all header p_paddr fields are zero.
440
441 2008-04-30 Edmar Wienskoski <edmar@freescale.com>
442
443 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
444
445 2008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
446
447 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
448 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
449 even if they are not loaded.
450 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
451 first.
452
453 2008-04-25 Jay Foad <jay.foad@gmail.com>
454
455 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
456 undefined weak symbols.
457
458 2008-04-25 Nick Clifton <nickc@redhat.com>
459
460 * po/vi.po: Updated Vietnamese translation.
461
462 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
463
464 * aclocal.m4: Regenerate.
465 * configure: Regenerate.
466
467 2008-04-21 Cary Coutant <ccoutant@google.com>
468
469 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
470 ARFMAG.
471
472 2008-04-21 Nathan Sidwell <nathan@codesourcery.com>
473
474 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
475 set the value of undefined symbols in shared objects.
476 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
477 undefined symbols unless pointer equality is needed.
478
479 2008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
480
481 * aix5ppc-core.c: Define macros for the default architecture and
482 machine for matching core files.
483 (xcoff64_core_p): Set the architecture and machine to the default
484 values defined in the macros mentioned above.
485 * rs6000-core.c: Define macros to determine whether or not the
486 core file header uses the core_dumpxx header format.
487 (rs6000coff_core_p): Don't match core files that use the
488 core_dumpxx header format.
489
490 2008-04-16 Pedro Alves <pedro@codesourcery.com>
491
492 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
493
494 2008-04-16 David S. Miller <davem@davemloft.net>
495
496 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
497 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
498 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
499 * libbfd.h: Regnerate.
500 * bfd-in2.h: Regenerate.
501 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
502 GOTDATA relocations.
503 (sparc_reloc_map): Likewise.
504 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
505 R_SPARC_GOT*.
506 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
507 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
508 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
509 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
510 Simply ignore R_SPARC_GOTDATA_OP relocations.
511
512 2008-04-14 Aurelien Jarno <aurelien@aurel32.net>
513
514 * configure.in: Link with the PIC version of libiberty on
515 Linux/MIPS hosts.
516 * configure: Regenerate.
517
518 2008-04-14 Edmar Wienskoski <edmar@freescale.com>
519
520 * archures.c: Add bfd_mach_ppc_e500mc.
521 * bfd-in2.h: Regenerate.
522
523 2008-04-08 Alan Modra <amodra@bigpond.net.au>
524
525 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
526 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
527 (collect_overlays): Commment typo fix.
528
529 2008-04-08 Kees Cook <kees@canonical.com>
530
531 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
532 in EXEC_P bfds.
533
534 2008-04-08 Alan Modra <amodra@bigpond.net.au>
535
536 * elf32-spu.c: Include libiberty.h.
537 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
538 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
539 spu_elf_relink, auto_overlay fields.
540 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
541 (needs_ovl_stub): Flip test so that call to non-function warning
542 is emitted during relocate_section rather than earlier.
543 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
544 auto_overlay if no section exceeds local store.
545 (struct call_info): Add count, max_depth, is_pasted fields.
546 (struct function_info): Add rodata, last_caller, call_count,
547 depth, new visit flags.
548 (insert_callee): Increment call count.
549 (copy_callee): New function.
550 (mark_functions_via_relocs): Investigate all reloc types to count
551 possible function pointer stubs for --auto-overlay. Track
552 last_caller and increment function call_count.
553 (pasted_function): Insert a "call" into call info for pasted section.
554 (remove_cycles): Track max depth of calls. Don't emit call graph
555 pruning warning for --auto-overlay.
556 (build_call_tree): Don't transfer_calls for --auto-overlay.
557 Adjust remove_cycles call.
558 (sort_calls, sort_lib, sort_bfds): New functions.
559 (struct _mos_param, struct _uos_param, struct _cl_param): New.
560 (mark_overlay_section, unmark_overlay_section): New functions.
561 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
562 (collect_overlays, find_pasted_call): New functions.
563 (sum_stack): Deal with is_pasted "calls". Exit before printing
564 when --auto-overlay.
565 (spu_elf_auto_overlay): New function.
566 (spu_elf_final_link): Call spu_elf_auto_overlay.
567 * elf32-spu.h (spu_elf_check_vma): Update prototype.
568
569 2008-04-07 Alan Modra <amodra@bigpond.net.au>
570
571 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
572 is defined in overlay section before creating a stub.
573 (build_spuear_stubs): Likewise.
574 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
575
576 2008-04-02 Alan Modra <amodra@bigpond.net.au>
577
578 * elf32-spu.c (insert_callee): Reorder call list so most recent
579 call is always first.
580 (interesting_section): Move.
581 (mark_functions_via_relocs): Fold interesting_section and
582 reloc_count tests in callers to here. Simplify output section
583 owner test.
584 (discover_functions): Set "gaps" when no symbols and some
585 "interesting_section". Run pasted_function loop for no symbol
586 bfds.
587 (for_each_node, transfer_calls): New functions.
588 (mark_non_root): Adjust to suit for_each_node.
589 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
590 (remove_cycles): ..this.
591 (build_call_tree): Use for_each_node and transfer_calls.
592 (struct _sum_stack_param): New.
593 (sum_stack): Adjust to suit for_each_node. Return error on
594 malloc failure. Move code to print root node cumulative stack from..
595 (spu_elf_stack_analysis): ..here. Use for_each_node.
596
597 2008-03-31 Cary Coutant <ccoutant@google.com>
598
599 PR 6006
600 * archive.c (_bfd_slurp_extended_name_table): Change
601 ARFMAG[0] to ARFMAG[1].
602 (_bfd_construct_extended_name_table): Likewise.
603
604 2008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
605
606 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
607 (_bfd_mips_elf_check_relocs): Update comments. Always call
608 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
609
610 2008-03-27 Cary Coutant <ccoutant@google.com>
611
612 Add support for thin archives.
613 * archive.c (_bfd_find_nested_archive): New function.
614 (get_extended_arelt_filename): Add origin parameter.
615 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
616 combined with a file offset.
617 (append_relative_path): New function.
618 (_bfd_get_elt_at_filepos): Deal with external members and
619 nested archives.
620 (bfd_generic_openr_next_archived_file): Thin archives.
621 (bfd_generic_archive_p): Recognize new magic string.
622 (adjust_relative_path): New function.
623 (_bfd_construct_extended_name_table): Construct extended
624 names for thin archive members.
625 (_bfd_write_archive_contents): Emit new magic string, skip
626 copying files for thin archives.
627 * bfd-in.h (bfd_is_thin_archive): New macro.
628 * bfd.c (struct bfd): New fields for thin archives.
629 * libbfd-in.h (struct areltdata): New field for thin archives.
630 * opncls.c (bfd_close): Delete BFDs for nested archives.
631
632 2008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
633
634 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
635 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
636 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
637
638 2008-03-25 Nathan Sidwell <nathan@codesourcery.com>
639
640 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
641 in vxworks tls_vars sections.
642 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
643 * elf32-i386.c (allocate_dynrelocs,
644 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
645 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
646 ppc_elf_relocate_section): Likewise.
647 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
648 sh_elf_relocate_section): Likewise.
649 * elfxx-sparc.c (allocate_dynrelocs,
650 _bfd_sparc_elf_size_dynamic_sections,
651 _bfd_sparc_elf_relocate_section): Likewise.
652
653 2008-03-21 Adam Nemet <anemet@caviumnetworks.com>
654
655 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
656 print the values from the dynamic section.
657
658 2008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
659
660 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
661 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
662
663 2008-03-20 Alan Modra <amodra@bigpond.net.au>
664
665 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
666 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
667 (process_stubs, discover_functions, build_call_tree): Likewise.
668 (spu_elf_stack_analysis): Likewise.
669 (spu_elf_check_vma): Likewise. Move.
670 (struct call_info): Make "is_tail" a bitfield.
671 (insert_callee): Clear fun->start and set fun->is_func if we find
672 a non-tail call.
673 * elf32-spu.h (spu_elf_create_sections): Update prototype.
674 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
675
676 2008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
677
678 * aclocal.m4: Regenerate.
679 * configure: Likewise.
680 * Makefile.in: Likewise.
681
682 2008-03-16 H.J. Lu <hongjiu.lu@intel.com>
683
684 PR ld/5789
685 PR ld/5943
686 * elf32-i386.c (elf_i386_relocate_section): Issue an error
687 for R_386_GOTOFF relocaton against undefined hidden/internal
688 symbols when building a shared object.
689
690 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
691 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
692 relocaton against undefined hidden/internal symbols when
693 building a shared object.
694 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
695 is referenced locally, but isn't defined in a regular file.
696
697 2008-03-15 H.J. Lu <hongjiu.lu@intel.com>
698
699 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
700 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
701 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
702 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
703 * bfd.c: Here.
704
705 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
706 mtime_set, no_export, output_has_begun and has_armap to bit
707 field.
708
709 * bfd-in2.h: Regenerated.
710
711 2008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
712
713 * cache.c (close_one): Remove mtime hack.
714
715 2008-03-14 H.J. Lu <hongjiu.lu@intel.com>
716
717 PR ld/5913
718 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
719 (elfNN_ia64_dtprel_base): Likewise.
720 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
721 tls_sec is NULL before calling elfNN_ia64_tprel_base or
722 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
723
724 2008-03-14 Alan Modra <amodra@bigpond.net.au>
725
726 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
727 common code to..
728 (maybe_needs_stub): ..here, a new function that also omits stubs
729 for .eh_frame, and..
730 (needs_ovl_stub): ..here. Create stubs for labels in code section
731 referenced by switch jump table.
732 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
733 (enum _insn_type): Delete.
734 (enum _stub_type): New.
735 (count_stub, build_stub): Adjust.
736 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
737
738 2008-03-13 Alan Modra <amodra@bigpond.net.au>
739
740 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
741 (_bfd_elf_assign_file_position_for_section): Simplify align.
742 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
743 for sh_addralign.
744 (elf_fake_sections, swap_out_syms): Likewise.
745 * elflink.c (bfd_elf_final_link): Likewise.
746
747 2008-03-13 Alan Modra <amodra@bigpond.net.au>
748
749 * Makefile.am: Run "make dep-am".
750 * Makefile.in: Regenerate.
751 * po/SRC-POTFILES.in: Regenerate.
752
753 2008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
754
755 From Jie Zhang <jie.zhang@analog.com>
756 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
757 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
758 gotoff, call and sym not bitfields.
759 (bfinfdpic_gc_sweep_hook): New function; update the relocation
760 information for the relocations of the section being removed.
761 (bfinfdpic_check_relocs): Accumulate the number of relocations
762 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
763 fdgoffhilo, gotoff, call and sym fields.
764 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
765
766 2008-03-12 Alan Modra <amodra@bigpond.net.au>
767
768 PR 5900
769 * elf-bfd.h: Include elf/internal.h after elf/external.h.
770 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
771 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
772 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
773 seen in external structs.
774 (valid_section_index_p): Delete.
775 (elf_object_p): Don't increment section numbers over reserved range.
776 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
777 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
778 seen in external structs. Don't increment section numbers over
779 reserved range.
780 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
781 (bfd_section_from_shdr): Likewise.
782 (group_signature): Range check before accessing elf_elfsections.
783 (_bfd_elf_setup_sections): Likewise.
784 (bfd_section_from_shdr): Likewise.
785 (bfd_section_from_shdr): Don't increment section number over
786 reserved sections.
787 (assign_file_positions_for_non_load_sections): Likewise.
788 (assign_file_positions_except_relocs): Likewise.
789 (_bfd_elf_write_object_contents): Likewise.
790 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
791 (prep_headers): Delete unused variable.
792 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
793 for changed SHN_* values.
794 (check_dynsym, elf_link_input_bfd): Likewise.
795 (bfd_elf_final_link): Likewise. Don't skip over reserved section
796 range.
797 (elf_fixup_link_order): Check that sh_link field is valid.
798 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
799 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
800 accesssing elf_elfsections.
801 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
802 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
803 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
804 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
805 SHN_* defines. Test for SHN_BAD return from
806 _bfd_elf_section_from_bfd_section
807
808 2008-03-12 Alan Modra <amodra@bigpond.net.au>
809
810 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
811 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
812 SHN_BAD on error.
813 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
814 _bfd_elf_section_from_bfd_section, not -1.
815 (swap_out_syms): Likewise.
816 * elflink.c (elf_link_add_object_symbols): Likewise.
817 (bfd_elf_get_bfd_needed_list): Likewise.
818 (bfd_elf_match_symbols_in_sections): Likewise.
819 (elf_link_add_object_symbols): Don't bother testing for symbols
820 using normal sections before calling bfd_section_from_elf_index.
821 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
822 (bfd_elf_reloc_symbol_deleted_p): Likewise.
823 * elfcode.h (elf_slurp_symbol_table): Likewise.
824 * elf32-spu.c (get_sym_h): Likewise.
825 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
826 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
827 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
828
829 2008-03-11 Alan Modra <amodra@bigpond.net.au>
830
831 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
832 to those in process_stubs for overlay symbols.
833
834 2008-03-09 Paul Brook <paul@codesourcery.com>
835
836 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
837 Tag_VFP_arch values.
838
839 2008-03-08 Paul Brook <paul@codesourcery.com>
840
841 * elf32-arm.c (insert_thumb_branch): Rewrite.
842 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
843
844 2008-03-07 Paul Brook <paul@codesourcery.com>
845
846 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
847 MOVT relocations.
848 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
849 extension.
850 (elf32_arm_relocate_section): Handle MOVW and MOVT
851 relocations. Improve safety check for other weird relocations.
852 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
853 relocations.
854
855 2008-03-03 Bob Wilson <bob.wilson@acm.org>
856
857 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
858 only compute its value once.
859
860 2008-03-03 Alan Modra <amodra@bigpond.net.au>
861
862 * elf32-spu.c (struct got_entry): Add "addend" field.
863 (count_stub, build_stub): Use a new stub if relocation addend
864 differs from existing stubs for this symbol.
865 (process_stubs): Deal with addends.
866 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
867
868 2008-03-02 H.J. Lu <hongjiu.lu@intel.com>
869
870 PR ld/5789
871 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
872 for hidden and local symbols.
873
874 2008-03-03 Alan Modra <amodra@bigpond.net.au>
875
876 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
877 undefined symbols with internal or hidden visibility.
878 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
879 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
880 return immediately on dynamic reloc error.
881
882 2008-03-01 Alan Modra <amodra@bigpond.net.au>
883
884 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
885 if emitrelocations.
886 (get_relocs): New function, split out from..
887 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
888 emitrelocations. Remove indx temp.
889 (ppc_size_one_stub): Count new stub relocs.
890 (ppc64_elf_size_stubs): Count new glink reloc.
891 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
892 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
893 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
894 glink code.
895
896 2008-02-28 Alan Modra <amodra@bigpond.net.au>
897
898 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
899 the "->start" pointer reaches to function origin, so that we
900 can handle functions split over more than two sections.
901 (build_call_tree): Likewise.
902 (pasted_function): Don't attempt to set fun->start back to the
903 function origin, just go back one section.
904
905 2008-02-27 Catherine Moore <clm@codesourcery.com>
906
907 * elf.c ( _bfd_elf_print_private_bfd_data): Call
908 elf_backend_get_target_dtag if defined.
909 * elf32-mips.c (elf_backend_get_target_dtag): Define.
910 * elf64-mips.c: Likewise.
911 * elfn32-mips.c: Likewise.
912 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
913 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
914 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
915 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
916 (elf_backend_data): Add elf_backend_get_target_dtag.
917
918 2008-02-26 Alan Modra <amodra@bigpond.net.au>
919
920 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
921 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
922 and assume branch relocs are not dynamic when non-shared.
923 (readonly_dynrelocs): New function, split out from..
924 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
925 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
926 clear non_got_ref..
927 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
928 Do allow dynamic relocs on undefined symbols.
929 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
930 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
931 check_relocs.
932 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
933 plt symbols needing pointer_equality_needed.
934
935 2008-02-23 Alan Modra <amodra@bigpond.net.au>
936
937 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
938
939 2008-02-23 Alan Modra <amodra@bigpond.net.au>
940
941 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
942 pointer_equality_needed.
943 (ppc_elf_check_relocs): Split out non-branch relocs from others
944 that might emit dynamic relocs. Set pointer_equality_needed
945 for their symbols. Don't set non_got_ref on branch reloc symbols.
946 (ppc_elf_hash_symbol): New function.
947 (elf_backend_hash_symbol): Define.
948 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
949 Error if pointer_equality_needed on weak plt symbol.
950
951 2008-02-22 H.J. Lu <hongjiu.lu@intel.com>
952
953 PR ld/5788
954 * elflink.c (elf_create_symbuf): Correct buffer size and
955 position.
956
957 2008-02-22 Nick Clifton <nickc@redhat.com>
958
959 PR 868
960 * dwarf2.c: Revert previous patch. All of the allocate memory is
961 on an obstack which will be freed at some other time.
962
963 2008-02-20 Nick Clifton <nickc@redhat.com>
964
965 PR 868
966 * libbfd.c (bfd_realloc_or_free): New function. Performs like
967 bfd_realloc, but if the (re)allocation fails, the pointer is
968 freed.
969 * libbfd-in.h: Prototype.
970 * libbfd.h: Regenerate.
971 * bfdio.c (bfd_bwrite): Use the new function.
972 (bfd_seek): Likewise.
973 * bfdwin.c:(bfd_get_file_window): Likewise.
974 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
975 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
976 * elf32-xtensa.c (vsprintf_msg): Likewise.
977 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
978 * stabs.c (_bfd_link_seciton_stabs): Likewise.
979 * vms-misc.c (_bfd_vms_get_record): Likewise.
980 * vms-tir.c (check_section): Likewise.
981 * vms.c (vms_new_section_hook): Likewise.
982 * elf32-arm.c (elf32_arm_section_map_add): Check that the
983 allocation of sec_data->map succeeded before using it.
984 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
985 symshndxbuf until it is known that the reallocation succeeded.
986
987 2008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
988 Nick Clifton <nickc@redhat.com>
989
990 PR 868
991 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
992 out of memory.
993 (decode_line_info): Free the line_info_table before returning a
994 failure result.
995 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
996 Free the line table. Free the function table. Free the variable
997 table.
998
999 2008-02-17 Mark Kettenis <kettenis@gnu.org>
1000
1001 * elf.c (swap_out_syms): Avoid preprocessing directive within
1002 macro arg.
1003
1004 2008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1005
1006 * elf.c (assign_file_positions_for_load_sections): Set the type of
1007 PT_NOTE sections to SHT_NOTE.
1008
1009 2008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
1010
1011 * simple.c (bfd_simple_get_relocated_section_contents): Set
1012 link_info.output_bfd.
1013
1014 2008-02-16 Nathan Sidwell <nathan@codesourcery.com>
1015
1016 * dwarf2.c (find_line): Don't trust debug information after an
1017 unparseable compilation unit.
1018
1019 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1020
1021 PR 5765
1022 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
1023 * bfd-in2.h: Regenerate.
1024
1025 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1026
1027 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
1028 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
1029 tdata.
1030 * elf32-hppa.c (elf32_hppa_mkobject): New function.
1031 (bfd_elf32_mkobject): Define.
1032 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
1033 (is_ppc_elf): ..this new macro.
1034 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
1035 (is_ppc64_elf): ..this new macro.
1036
1037 2008-02-15 Alan Modra <amodra@bigpond.net.au>
1038
1039 * elflink.c: Replace all accesses to hash->creator field with
1040 output_bfd->xvec.
1041 * cofflink.c: Likewise.
1042 * coff-h8300.c: Likewise.
1043 * ecoff.c: Likewise.
1044 * elf32-m68hc1x.c: Likewise.
1045 * elf32-ppc.c: Likewise.
1046 * elf64-alpha.c: Likewise.
1047 * elf64-ppc.c: Likewise.
1048 * elf64-sparc.c: Likewise.
1049 * elfxx-mips.c: Likewise.
1050 * i386linux.c: Likewise.
1051 * m68klinux.c: Likewise.
1052 * sparclinux.c: Likewise.
1053 * sunos.c: Likewise.
1054 * xcofflink.c: Likewise.
1055 * linker.c: Likewise.
1056 (_bfd_link_hash_table_init): Don't store creator.
1057
1058 2008-02-14 Peter Jones <pjones@redhat.com>
1059
1060 * efi-rtdrv-ia32.c: New file.
1061 * efi-bsdrv-ia32.c: New file.
1062 * efi-rtdrv-ia64.c: New file.
1063 * efi-bsdrv-ia64.c: New file.
1064 * efi-rtdrv-x86_64.c: New file.
1065 * efi-bsdrv-x86_64.c: New file.
1066 * peicode.h (pe_bfd_object_p): Add support for boot service and
1067 runtime service drivers.
1068 * libpei.h: Add macros for EFI formats, and rename the efi application
1069 format macros to disambiguate.
1070 * targets.c: Add bfd_target _vec externs.
1071 (_bfd_tar): Add EFI _vec entries.
1072 * config.bfd: Add EFI vectors into the selection routines.
1073 * configure.in: add EFI _vec entries.
1074 * configure: Regenerate.
1075 * Makefile.am: Add EFI files.
1076 * Makefile.in: Regenerate.
1077
1078 2008-02-14 Nathan Sidwell <nathan@codesourcery.com>
1079
1080 * dwarf1.c (struct dwarf1_debug): Add syms member.
1081 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
1082 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
1083 section contents, check for out of memory.
1084
1085 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
1086 (parse_die): Change data pointers to bfd_byte.
1087 (parse_line_table, parse_functions_in_unit): Likewise.
1088
1089 2008-02-14 Alan Modra <amodra@bigpond.net.au>
1090
1091 * elflink.c (compute_bucket_count): Warning fixes.
1092
1093 2008-02-12 DJ Delorie <dj@redhat.com>
1094
1095 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
1096 relocation pointing to local symbol in merged section.
1097
1098 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
1099 (iq2000_elf_relocate_section): Call it.
1100
1101 2008-02-12 Nick Clifton <nickc@redhat.com>
1102
1103 PR ld/5692
1104 * elf-bfd.h (enum elf_object_id): New enum, used to identify
1105 target specific extensions to the elf_obj_tdata structure.
1106 (struct elf_obj_tdata): New field 'object_id'.
1107 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
1108 macros for accessing fields in the elf_obj_tdata structure.
1109 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
1110 (bfd_elf_allocate_object): New function.
1111 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
1112 and implement by calling bfd_elf_allocate_object.
1113 (bfd_elf_allocate_object): New function: Allocates an
1114 elf_obj_tdata structure, possibly with a target specific
1115 extension.
1116 * elfxx-target.h (bfd_elfNN_mkobject): Use
1117 bfd_elf_make_generic_object as the default value.
1118 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
1119 for consistency with other, similar structures.
1120 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
1121 ELF bfd.
1122 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
1123 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
1124 the bfd being processed.
1125 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1126 (bfd_elf32_arm_set_target_relocs): Likewise.
1127 (bfd_elf32_arm_final_link_relocate): Likewise.
1128 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
1129 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
1130 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
1131 (bfd_elf32_arm_check_relocs): Likewise.
1132 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
1133 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1134 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
1135 (bfd_elf32_arm_init_maps): Likewise.
1136 (bfd_elf32_arm_final_link_relocate): Likewise.
1137 (bfd_elf32_arm_relocate_section): Likewise.
1138 (bfd_elf32_arm_gc_sweep_hook): Likewise.
1139 (bfd_elf32_arm_check_relocs): Likewise.
1140 (bfd_elf32_arm_size_dynamic_sections): Likewise.
1141 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
1142 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
1143 ELF bfd.
1144 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
1145 being processed.
1146 (elf_i386_size_dynamic_sections): Likewise.
1147 (elf_i386_relocate_section): Likewise.
1148 (elf_i386_check_relocs): Use elf_symtab_hdr.
1149 (elf_i386_gc_sweep_hook): Likewise.
1150 (elf_i386_size_dynamic_sections): Likewise.
1151 (elf_i386_relocate_section): Likewise.
1152 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
1153 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
1154 verify that the bfd before accessing target specific fields.
1155 (ppc_elf_check_relocs): Likewise.
1156 (elf_finish_pointer_linker_section): Likewise.
1157 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
1158 (ppc_elf_check_relocs): Likewise.
1159 (ppc_elf_gc_sweep_hook): Likewise.
1160 (ppc_elf_tls_optimize): Likewise.
1161 (ppc_elf_size_dynamic_sections): Likewise.
1162 (ppc_elf_relax_section): Likewise.
1163 (ppc_elf_relocate_section): Likewise.
1164 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
1165 reminding programmers to keep this structure in sync with the one
1166 defined in elf64-s390.c.
1167 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1168 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1169 ELF bfd.
1170 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1171 being processed.
1172 (elf_s390_size_dynamic_sections): Likewise.
1173 (elf_s390_relocate_section): Likewise.
1174 (elf_s390_check_relocs): Use elf_symtab_hdr.
1175 (elf_s390_gc_sweep_hook): Likewise.
1176 (elf_s390_size_dynamic_sections): Likewise.
1177 (elf_s390_relocate_section): Likewise.
1178 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
1179 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
1180 ELF bfd.
1181 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
1182 bfd being processed.
1183 (sh_elf_relocate_section): Likewise.
1184 (sh_elf_check_relocs): Likewise.
1185 (sh_elf_copy_private_data): Likewise.
1186 (sh_elf_relax_section): Use elf_symtab_hdr.
1187 (sh_elf_size_dynamic_sections): Likewise.
1188 (sh_elf_relocate_section): Likewise.
1189 (sh_elf_get_relocated_section_contents): Likewise.
1190 (sh_elf_gc_sweep_hook): Likewise.
1191 (sh_elf_check_relocs): Likewise.
1192 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
1193 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
1194 Alpha ELF bfd.
1195 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
1196 the bfd being processed.
1197 (elf64_alpha_create_dynamic_section): Likewise.
1198 (elf64_alpha_check_relocs): Likewise.
1199 (elf64_alpha_size_got_sections): Likewise.
1200 (elf64_alpha_relax_section): Likewise.
1201 (elf64_alpha_relocate_section): Likewise.
1202 (elf64_alpha_final_link): Likewise.
1203 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
1204 (elf64_alpha_relax_section): Likewise.
1205 (elf64_alpha_relocate_section_r): Likewise.
1206 (elf64_alpha_relocate_section): Likewise.
1207 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
1208 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
1209 being processed.
1210 (opd_entry_value): Likewise.
1211 (allocate_dynrelocs): Likewise.
1212 (ppc64_elf_relocate_section): Likewise.
1213 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
1214 (opd_entry_value): Likewise.
1215 (ppc64_elf_gc_sweep_hook): Likewise.
1216 (get_sym_h): Likewise.
1217 (ppc64_elf_edit_opd): Likewise.
1218 (ppc64_elf_tls_optimize): Likewise.
1219 (ppc64_elf_edit_toc): Likewise.
1220 (ppc64_elf_size_dynamic_sections): Likewise.
1221 (toc_adjusting_stub_needed): Likewise.
1222 (ppc64_elf_size_stubs): Likewise.
1223 (ppc64_elf_relocate_section): Likewise.
1224 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
1225 reminding programmers to keep this structure in sync with the one
1226 defined in elf32-s390.c.
1227 (elf_s390_mkobject): Call bfd_elf_allocate_object.
1228 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
1229 ELF bfd.
1230 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
1231 being processed.
1232 (elf_s390_size_dynamic_sections): Likewise.
1233 (elf_s390_relocate_section): Likewise.
1234 (elf_s390_check_relocs): Use elf_symtab_hdr.
1235 (elf_s390_gc_sweep_hook): Likewise.
1236 (elf_s390_size_dynamic_sections): Likewise.
1237 (elf_s390_relocate_section): Likewise.
1238 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
1239 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
1240 x86_64 ELF bfd.
1241 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
1242 being processed.
1243 (elf64_x86_64_size_dynamic_sections): Likewise.
1244 (elf64_x86_64_relocate_section): Likewise.
1245 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
1246 (elf64_x86_64_gc_sweep_hook): Likewise.
1247 (elf64_x86_64_size_dynamic_sections): Likewise.
1248 (elf64_x86_64_relocate_section): Likewise.
1249 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
1250 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
1251 ELF bfd.
1252 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
1253 bfd being processed.
1254 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1255 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1256 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
1257 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1258 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1259 (_bfd_sparc_elf_relocate_section): Likewise.
1260
1261 2008-02-12 Alan Modra <amodra@bigpond.net.au>
1262
1263 PR 5303, 5755
1264 * arange-set.c: Delete.
1265 * arange-set.h: Delete.
1266 * dwarf2.c: Revert 2007-09-21 changes.
1267 * Makefile.am: Likewise.
1268 * Makefile.in: Regenerate.
1269 * po/SRC-POTFILES.in: Regenerate.
1270
1271 2008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
1272
1273 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
1274 if necessary.
1275 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
1276 mismatches are detected.
1277
1278 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
1279 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
1280
1281 2008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
1282
1283 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
1284 was reached.
1285 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
1286
1287 2008-02-07 Alan Modra <amodra@bigpond.net.au>
1288
1289 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
1290 of _ovly_buf_table size.
1291 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
1292 Adjust initialisations relating to _ovly_buf_table.
1293
1294 2008-02-04 Bob Wilson <bob.wilson@acm.org>
1295
1296 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
1297 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
1298 relocations against dynamic symbols.
1299 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
1300 .xt.lit section.
1301
1302 2008-02-04 Kai Tietz <kai.tietz@onevision.com>
1303 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 PR 5715
1306 * warning.m4: Enable -Wno-format by default when using gcc on
1307 mingw.
1308 * configure: Regenerated.
1309
1310 2008-02-04 Adam Nemet <anemet@caviumnetworks.com>
1311
1312 * archures.c: Update copyright.
1313 (bfd_mach_mips_octeon): New macro.
1314 * bfd-in2.h: Regenerate.
1315 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
1316 (mips_set_isa_flags): Likewise.
1317 (mips_mach_extensions): Add Octeon.
1318 * cpu-mips.c: Update copyright.
1319 (I_mipsocteon): New enum constant.
1320 (arch_info_struct): Add Octeon.
1321
1322 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1323
1324 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
1325 Return error status on unexpected relocation errors.
1326
1327 2008-02-04 Alan Modra <amodra@bigpond.net.au>
1328
1329 PR ld/5692
1330 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
1331 on non-ELF input.
1332 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
1333 processing on non-ELF input.
1334
1335 2008-01-31 Marc Gauthier <marc@tensilica.com>
1336
1337 * config.bfd (xtensa*-*-*): Recognize processor variants.
1338
1339 2008-01-31 Nick Clifton <nickc@redhat.com>
1340
1341 PR ld/5692
1342 * elf.c (bfd_elf_get_elf_syms): Check the return value of
1343 get_elf_backend_data.
1344
1345 2008-01-28 Fabian Groffen <grobian@gentoo.org>
1346
1347 * config.bfd (x86_64-*-solaris2): Add support for this target.
1348
1349 2008-01-28 Alan Modra <amodra@bigpond.net.au>
1350
1351 Rewrite SPU overlay handling code. Put overlay calls stubs in the
1352 overlays where possible. Use a faster call stub, or optionally at
1353 compile time, a more compact stub. Double size of _ovly_buf_table
1354 so that low bit of _ovly_table.buf can be used as a "present" bit.
1355 Reserve an extra _ovly_table entry for index zero.
1356 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
1357 add new ones.
1358 (struct got_entry): New.
1359 (struct spu_stub_hash_entry): Delete.
1360 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
1361 (spu_elf_link_hash_table_create): Adjust for struct changes.
1362 (spu_stub_name): Delete.
1363 (spu_elf_find_overlays): Don't track sections from overlay regions.
1364 Instead set ovl_buf number in spu elf section data. Error if
1365 overlays in one region don't start at the same address. Adjust
1366 for struct _spu_elf_section_data changes.
1367 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
1368 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
1369 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
1370 (enum _insn_type): New.
1371 (count_stub, build_stub): New functions.
1372 (allocate_spuear_stubs): Use count_stub.
1373 (build_spuear_stubs): Use build_stub.
1374 (populate_stubs, sort_stubs): Delete.
1375 (process_stubs): New function.
1376 (write_one_stub): Delete.
1377 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
1378 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
1379 (maybe_insert_function, check_function_ranges): Likewise.
1380 (find_function, pasted_function, build_call_tree): Likewise.
1381 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
1382 (spu_elf_modify_program_headers): Likewise.
1383 (interesting_section): Detect stub sections differently. Delete
1384 htab param, adjust all callers.
1385 (spu_elf_relocate_section): Rewrite stub handling.
1386 (spu_elf_output_symbol_hook): Likewise.
1387 (bfd_elf32_bfd_link_hash_table_free): Delete.
1388 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
1389 output-only fields into a union. Add ovl_buf.
1390 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
1391
1392 2008-01-25 DJ Delorie <dj@redhat.com>
1393
1394 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
1395
1396 2008-01-25 Kai Tietz <kai.tietz@onevision.com>
1397
1398 * bfd-in.h: Add mingw I64 support.
1399 * bfd-in2.h: Regenerated.
1400 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
1401
1402 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1403
1404 PR 4453
1405 * format.c (bfd_check_format_matches): Don't accept archives as
1406 fully matching unless they have a map.
1407
1408 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1409
1410 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
1411
1412 2008-01-21 Alan Modra <amodra@bigpond.net.au>
1413
1414 * ecoff.c (_bfd_ecoff_archive_p): Delete.
1415 * libecoff.h (_bfd_ecoff_archive_p): Delete.
1416 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
1417 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
1418 (ecoff_biglittle_vec): Likewise.
1419
1420 2008-01-19 Alan Modra <amodra@bigpond.net.au>
1421
1422 PR 5646
1423 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
1424 non-NULL before dereferencing.
1425
1426 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1427
1428 PR 5604
1429 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
1430 names from others.
1431 (_bfd_elf_gc_keep): Declare.
1432 * elfxx-target.h (elf_backend_gc_keep): Define.
1433 (elfNN_bed): Init new field.
1434 * elflink.c (_bfd_elf_gc_keep): New function.
1435 (bfd_elf_gc_sections): Call gc_keep.
1436 * elf64-ppc.c (elf_backend_gc_keep): Define.
1437 (struct _ppc64_elf_section_data): Move .opd related fields to
1438 a struct so they don't occupy the same storage. Adjust accesses
1439 throughout file.
1440 (ppc64_elf_gc_keep): New function, split out from..
1441 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
1442 to mark .opd section, just set gc_mark.
1443 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
1444 unless we are changing .opd. Test non-NULL opd->adjust at all
1445 accesses throughout file.
1446 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1447
1448 2008-01-15 Alan Modra <amodra@bigpond.net.au>
1449
1450 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
1451 * bfd-in2.h: Regenerate.
1452
1453 2008-01-11 Tristan Gingold <gingold@adacore.com>
1454 Eric Botcazou <ebotcazou@adacore.com>
1455
1456 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
1457 relocatable.
1458 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1459 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1460 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1461 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1462 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1463 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1464 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1465 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1466 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1467 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1468 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1469 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1470 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
1471 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
1472 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1473 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
1474 or executable output with relocations.
1475
1476 2008-01-09 Nick Clifton <nickc@redhat.com>
1477
1478 PR gas/5552
1479 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
1480 to FALSE for all relocs.
1481
1482 2008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
1483
1484 PR ld/5526
1485 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
1486 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
1487 (eh_frame_sec_info): Add a cies field.
1488 (eh_frame_hdr_info): Add a merge_cies field.
1489 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
1490 union.
1491 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
1492 of hdr_info->cies.
1493 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
1494 cie structures in all cases and use it instead of extended_cies.
1495 If merging, store the cie array in sec_info->cies and point each
1496 CIE's eh_fde_cie at the associated element. Do not try to
1497 calculate the value of the personality routine here; record the
1498 offset of the relocation instead. Do not merge CIEs here.
1499 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
1500 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
1501 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
1502 (find_merged_cie): New function.
1503 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
1504
1505 2008-01-07 Nick Clifton <nickc@redhat.com>
1506
1507 PR binutils/5535
1508 * vms.c (vms_close_and_cleanup): Check for the presence of a
1509 vms_private_data_struct before examining any of its fields.
1510
1511 2008-01-07 H.J. Lu <hongjiu.lu@intel.com>
1512
1513 PR ld/5522
1514 * elflink.c (elf_link_input_bfd): Don't write out a section if
1515 its output section is marked with SEC_NEVER_LOAD.
1516
1517 For older changes see ChangeLog-2007
1518 \f
1519 Local Variables:
1520 mode: change-log
1521 left-margin: 8
1522 fill-column: 74
1523 version-control: never
1524 End:
This page took 0.059783 seconds and 5 git commands to generate.