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