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