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