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