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