opcodes/
[binutils.git] / bfd / ChangeLog
blobde0deb0be28a87e4d7dc4f1f760f1a3db212d97f
1 2007-10-16  Bob Wilson  <bob.wilson@acm.org>
3         * elf32-xtensa.c (relax_section): Check for a reference to a discarded
4         DWARF section and anticipate its replacement with the kept section.
5         
6 2007-10-16  Bob Wilson  <bob.wilson@acm.org>
8         * elf32-xtensa.c (elf_xtensa_discard_info_for_section): Remove
9         unnecessary size variables.  Set sec->rawsize.
10         (relax_section, relax_property_section): Likewise.
11         
12 2007-10-16  Bob Wilson  <bob.wilson@acm.org>
14         * section.c (struct bfd_section): Clarify comment for rawsize field.
15         * bfd-in2.h: Regenerate.
16         
17 2007-10-16  Bob Wilson  <bob.wilson@acm.org>
19         * elflink.c (_bfd_elf_check_kept_section): Use the section rawsize
20         values if they are set.
21         
22 2007-10-16  Nick Clifton  <nickc@redhat.com>
24         PR 5146
25         * configure.in (AC_CHECK_HEADERS): Add alloca.h
26         * configure: Regenerate.
27         * config.in: Regenerate.
28         * som.c: Replace alloca-conf.h inclusion with code recommended in
29         autoconf documentation.
30         * elf64-hppa.c: Likewise.
32 2007-10-16  Nick Clifton  <nickc@redhat.com>
34         * configure.in (--enable-elf-stt-common): New configure
35         option.  If enabled then the tools can generate symbols with
36         the ELF STT_COMMON type.
37         * config.in: Regenerate.
38         * configure: Regenerate.
39         * elf.c (swap_out_syms): If USE_STT_COMMON is defined then set
40         the type of emitted common symbols to STT_COMMON.
41         * elfcode.h (elf_slurp_symbol_table): Accept STT_COMMON symbol
42         types.
43         
44 2007-10-15  Alan Modra  <amodra@bigpond.net.au>
46         * coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
47         Return status.  Adjust callers.
48         * coff-mcore.c (mcore_emit_base_file_entry): Likewise.
49         * coff-ppc.c (write_base_file_entry): New function.
50         (coff_ppc_relocate_section): Use it.
51         * elf32-arm.c (find_thumb_glue): Check asprintf return status.
52         (find_arm_glue): Likewise.
53         * vms-misc.c (_bfd_vms_output_flush): Check fwrite return value.
55 2007-10-12  Nick Clifton  <nickc@redhat.com>
57         PR 5160
58         * elflink.c (eval_symbol): Remove bufsz variable and use
59         sizeof(symbuf) where necessary.
61 2007-10-12  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
63         * elf32-cr16.c (elf32_cr16_relax_section): Fix condition check typo.
65 2007-10-12  Daniel Jacobowitz  <dan@codesourcery.com>
67         * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
68         local symbols specially.
69         (mips_elf_set_global_got_offset): Skip forced local symbols.
71 2007-10-12  Alan Modra  <amodra@bigpond.net.au>
73         * elf.c (elfcore_grok_prxfpreg): Fix comment typo.
75 2007-10-10  H.J. Lu  <hongjiu.lu@intel.com>
77         * elf.c (get_program_header_size): Always add a PT_GNU_RELRO
78         segment for -z relro.
79         (_bfd_elf_map_sections_to_segments): Make a PT_GNU_RELRO
80         segment only when needed.
82 2007-10-05  Bob Wilson  <bob.wilson@acm.org>
83         
84         * elf32-xtensa.c (relax_section): Call pin_internal_relocs when
85         changing a relocation's offset.  Adjust call to translate_reloc.  Do
86         not add a fix record for a DIFF reloc.  For other relocs, only add a
87         fix record if the translated target is in a different object file;
88         otherwise, just update the relocation.  Call pin_internal_relocs when
89         updating a reloc but not when adding a fix record.
90         (translate_reloc): Get the target section from a new argument, not
91         from the relocation.  Change check for relaxable sections to an
92         assertion.  Compute separate offset adjustments for the base symbol
93         and the addend, and set the new relocation's addend correctly.  Return
94         the new target section.
95         
96 2007-10-05  Bob Wilson  <bob.wilson@acm.org>
97         
98         * elf32-xtensa.c (elf_xtensa_relocate_section): Remove updates of
99         r_type and howto after calling do_fix_for_relocateable_link and
100         do_fix_for_final_link.
101         
102 2007-10-05  Bob Wilson  <bob.wilson@acm.org>
103         
104         * elf32-xtensa.c (removed_by_actions): New.
105         (offset_with_removed_text): Reimplement using removed_by_actions.
106         (offset_with_removed_text_before_fill): Delete.
107         (relax_property_section): Use removed_by_actions.  Rearrange logic.
108         (relax_section_symbols): Likewise.
109         
110 2007-10-04  Bob Wilson  <bob.wilson@acm.org>
112         * elf32-xtensa.c (reloc_bfd_fix_struct): Delete target_abfd field.
113         (reloc_bfd_fix_init): Remove target_abfd argument.
114         (relax_section, move_literal): Adjust calls to reloc_bfd_fix_init.
116 2007-10-04  Nick Clifton  <nickc@redhat.com>
118         PR linker/5099
119         * elf64-x86-64.c (elf64_x86_64_check_relocs): Add missing
120         apostrophe to error message.
122 2007-10-01  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
124         * elf32-cr16.c: Fixed DISP8, DISP20 and IMM20 relocations at
125         final relocation phase.
126         Added the below relaxations: IMM32 -> IMM20/IM16 -> IMM4.
127         * reloc.c: Added 3 new relocations: R_CR16_SWITCH8,
128         R_CR16_SWITCH16, R_CR16_SWITCH32.
129         * libbfd.h: Regenerate.
130         * bfd-in2.h: Regenerate.
132 2007-09-30  Alan Modra  <amodra@bigpond.net.au>
134         * elflink.c: Formatting.
136 2007-09-29  Alan Modra  <amodra@bigpond.net.au>
138         * elflink.c (resolve_symbol): Handle symbols in SEC_MERGE
139         sections.  Don't test symbol st_shndx.  Don't bother with
140         bfd_link_hash_common symbols.  Print longs rather than ints
141         in debug messages.
142         (eval_symbol): Replace "sym" and "advanced" params with "symp".
143         Replace "addr" and "section_offset" params with "dot".  Don't
144         cast bfd_vma values to signed, cast them to bfd_signed_vma.
145         (bfd_elf_perform_complex_relocation): Delete "output_bfd", "info",
146         "local_syms" and "local_sections" params.  Add "relocation".
147         Delete code calculating relocation value.
148         (evaluate_complex_relocation_symbols): Delete function.  Fold into..
149         (elf_link_input_bfd): ..existing code examining relocs.
150         * elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
151         * elf32-mep.c (mep_elf_check_relocs): Delete function.
152         (mep_elf_gc_sweep_hook, mep_elf_gc_mark_hook): Likewise.
153         (mep_elf_object_p): Don't set elf_bad_symtab.
154         (elf_backend_check_relocs): Don't define.
155         (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): Likewise.
156         (elf_backend_can_gc_sections, USE_RELA): Likwise.
157         (mep_elf_relocate_section): Move bfd_elf_perform_complex_relocation
158         call after we have calculated reloc value.  Delete local sym
159         debug code.  Use RELOC_FOR_GLOBAL_SYMBOL.  Delete addend
160         adjusting code..
161         (elf_backend_rela_normal): ..instead define this.
163 2007-09-28  Alan Modra  <amodra@bigpond.net.au>
165         * elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
166         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
167         * elf32-avr.c (elf32_avr_check_relocs): Likewise.
168         * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
169         * elf32-cris.c (cris_elf_check_relocs): Likewise.
170         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
171         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
172         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
173         * elf32-frv.c (_frvfdpic_check_discarded_relocs): Likewise.
174         (elf32_frv_check_relocs): Likewise.
175         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
176         * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
177         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
178         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
179         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
180         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
181         * elf32-mt.c (mt_elf_check_relocs): Likewise.
182         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
183         * elf32-sh.c (sh_elf_check_relocs): Likewise.
184         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
185         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
186         * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
187         (score_elf_local_relocation_p): Likewise.
188         (_bfd_score_elf_relocate_section): Likewise.
189         (score_elf_final_link_relocate): Likewise.
191 2007-09-26  Jan Beulich  <jbeulich@novell.com>
193         * elf32-i386.c (elf_i386_check_relocs): Revert NULL pointer
194         check for R_386_GNU_VTINHERIT.
195         * elf-m10300.c (mn10300_elf_check_relocs): Check for NULL
196         pointer for R_xxx_GNU_VTENTRY.
197         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
198         * elf32-bfin.c (bfin_check_relocs): Likewise.
199         (bfinfdpic_check_relocs): Likewise.
200         * elf32-cris.c (cris_elf_check_relocs): Likewise.
201         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
202         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
203         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
204         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
205         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
206         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
207         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
208         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
209         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
210         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
211         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
212         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
213         * elf32-s390.c (elf_s390_check_relocs): Likewise.
214         * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
215         * elf32-sh.c (sh_elf_check_relocs): Likewise.
216         * elf32-v850.c (v850_elf_check_relocs): Likewise.
217         * elf32-vax.c (elf_vax_check_relocs): Likewise.
218         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
219         * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
220         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
221         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
222         * elf64-s390.c (elf_s390_check_relocs): Likewise.
223         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
224         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
225         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
226         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
228 2007-09-26  Alan Modra  <amodra@bigpond.net.au>
230         * elflink.c (set_symbol_value): Add isymbuf and locsymcount
231         params.  Change symidx to a size_t.  Don't access past end
232         of symbol buffer.
233         (resolve_symbol): Add isymbuf param and use instead of
234         finfo->internal_syms.
235         (eval_symbol, evaluate_complex_relocation_symbols): Likewise.
236         (elf_link_input_bfd): Don't read symbols specially for
237         evaluate_complex_relocation_symbols.
239 2007-09-26  Tristan Gingold  <gingold@adacore.com>
241         * som.c (som_get_reloc_upper_bound): If there are no relocs return
242         enough space to hold a NULL pointer.
244 2007-09-26  Alan Modra  <amodra@bigpond.net.au>
246         * elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size.
248 2007-09-25  Alan Modra  <amodra@bigpond.net.au>
250         * elf32-spu.c (struct spu_link_hash_table): Add ovly_load_r_symndx.
251         (spu_elf_size_stubs): Count stub relocs.
252         (write_one_stub): Emit relocs on overlay call stubs.
254         * elf32-spu.c (struct spu_link_hash_table): Add "stubs".
255         (spu_elf_link_hash_table_create): Init new field.
256         (spu_elf_size_stubs): Store sorted stub syms in new htab field
257         rather than local var.
258         (spu_elf_build_stubs): Iterate over htab stubs rather than
259         hash traversal.
260         (struct stubarr): Delete.
261         (allocate_spuear_stubs, populate_stubs, write_one_stub): Adjust.
263 2007-09-24  Daniel Jacobowitz  <dan@codesourcery.com>
265         * elf.c (assign_file_positions_for_load_sections): Trust
266         p_align_valid.
267         (copy_elf_program_header): Copy PT_NULL segments.
269 2007-09-24  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
271         * elf32-spu.c (is_indirect_branch): New function.
272         (find_function_stack_adjust): End scan on hitting indirect branch.
273         (sum_stack): Cast %v arg to correct type.
275 2007-09-21  H.J. Lu  <hongjiu.lu@intel.com>
277         * Makefile.am: Run "make dep-am".
278         * Makefile.in: Regenerated.
280 2007-09-21  Doug Kwan  <dougkwan@google.com>
282         * Makefile.am (BFD32_LIBS): Add arange-set.lo.
283         (BFD32_LIBS_CFILES): Add arange-set.c.
284         (SOURCE_HFILES): Add arange-set.h
285         (dwarf2.lo): Add dependency upon arange-set.h.
286         (arange-set.lo): New target.
287         * Makefile.in: Regenerate.
288         * arange-set.c: New file.
289         * arange-set.h: New file.
290         * dwarf2.c: Include arange-set.h.  
291         (struct dwarf2_debug) Add new fields comp_unit_count and
292         comp_unit_arange_set.
293         (struct comp_unit) Replace field arange with a new field arange_set.
294         (dwarf2_arange_set_allocate, dwarf2_arange_set_deallocate,
295         dwarf2_combine_arange_value, dwarf2_arange_set_new,
296         dwarf2_arange_set_with_value_new, dwarf2_comp_unit_arange_add): New
297         functions to utilize arange set in dwarf2.c.
298         (arange_add): Formatting change for a line longer than 80 characters.
299         (decode_line_info): Replace call target arange_add with
300         dwarf2_comp_unit_arange_add.
301         (read_rangelist_insert_arange_list,
302         read_rangelist_comp_unit_arange_add): New functions used as callbacks
303         for read_rangelist.
304         (read_rangelist): Change interface to accept a callback and data to
305         allow caller to select the action peformed on a new range list read.
306         (scan_unit_for_symbols): Use new interface of read_rangelist.
307         (parse_comp_unit): Create an arange set for each new comp unit.  Use new
308         interface of read_rangelist.  Replace call to arange_add with that to
309         dwarf2_comp_unit_arange_add.
310         (comp_unit_contains_address): Replace sequential search with a call to
311         arange_set_lookup_address, which can handles large set efficiently.
312         (stash_copy_local_aranges, stash_maybe_enable_arange_set,
313         stash_find_nearest_line_fast): New functions maintaining and using a
314         valued global arange set for all compilation units to speed up
315         bfd_dwarf2_find_nearest_line.
316         (find_line): Use global arange set.  Replace sequential search over all
317         compilation units with a call to stash_find_nearest_line_fast.  Add
318         book keeping to count number of compilation units.  Replace empty
319         arange list test with a call to arange_set_empty_p.
321 2007-09-21  Olivier Hainque  <hainque@adacore.com>
322             Tristan Gingold  <gingold@adacore.com>
323         
324         * syms.c (_bfd_stab_section_find_nearest_line): Look at the 
325         specific SOM sections for stabs if the regular ones are not found.
326         * som.h (struct somdata): Add a line_info field, to be used by
327         som_find_nearest_line.
328         * som.c (som_find_nearest_line): Implement using the bfd stabs
329         function above.
331 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
333         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make sure .got
334         will be output.
336 2007-09-19  Alan Modra  <amodra@bigpond.net.au>
337             Doug Kwan  <dougkwan@google.com>
339         * bfd-in.h (bfd_hash_insert): Declare.
340         * bfd-in2.h: Regenerate.
341         * hash.c (bfd_hash_insert): New function.  Split out from..
342         (bfd_hash_lookup): ..here.
343         * merge.c (sec_merge_hash_lookup): Use bfd_hash_insert.
345 2007-09-18  Alan Modra  <amodra@bigpond.net.au>
347         * elf.c (bfd_section_from_shdr): Check bfd_alloc return.
348         (elfcore_write_note): Check realloc return.
349         * elflink.c (_bfd_elf_link_find_version_dependencies): Check
350         bfd_zalloc return.
351         (_bfd_elf_link_assign_sym_version): Check bfd_malloc return.
352         (elf_link_add_object_symbols): Likewise.
353         (struct hash_codes_info): New.
354         (elf_collect_hash_codes): Return bfd_malloc error.
355         (struct collect_gnu_hash_codes): Add "error".
356         (elf_collect_gnu_hash_codes): Return bfd_malloc error.
357         (bfd_elf_size_dynamic_sections): Check return status of
358         _bfd_elf_link_find_version_dependencies.
359         (bfd_elf_size_dynsym_hash_dynstr): Adjust for elf_collect_hash_codes
360         and elf_collect_gnu_hash_codes changes.
361         (elf_sym_name_compare): Formatting.
362         (elf_fixup_link_order): Use bfd_malloc, not xmalloc.
364 2007-09-17  H.J. Lu  <hongjiu.lu@intel.com>
366         PR binutils/3281
367         PR binutils/5037
368         * elf-bfd.h (elf_obj_tdata): Remove relro.
370         * elf.c (get_program_header_size): Check info->relro instead
371         of elf_tdata (abfd)->relro.
372         (_bfd_elf_map_sections_to_segments): Likewise.
373         (assign_file_positions_for_load_sections): Don't set
374         PT_GNU_RELRO segment alignment here.
375         (assign_file_positions_for_non_load_sections): Properly set up
376         PT_GNU_RELRO segment for copying executable/shared library.
377         (rewrite_elf_program_header): Remove PT_GNU_RELRO segment.
378         (copy_elf_program_header): Set p_size and p_size_valid fields for
379         PT_GNU_RELRO segment. 
381 2007-09-17  Nick Clifton  <nickc@redhat.com>
383         * po/fi.po: New Finnish translation.
384         * po/es.po: Updated Spanish translation.
385         * configure.in (ALL_LINGUAS): Add fi.
386         * configure: Regenerate.
387         * po/bfd.pot: Regenerate.
389 2007-09-15  Nick Clifton  <nickc@redhat.com>
391         * bfd.c (_bfd_default_error_handler): fflush stdout.
393 2007-09-14  Alan Modra  <amodra@bigpond.net.au>
395         * opncls.c (find_separate_debug_file): Ensure bfd_set_error has
396         been called on all error return paths.
397         (bfd_fill_in_gnu_debuglink_section): Use bfd_malloc, not malloc.
398         Clear padding after filename
400 2007-09-14  Alan Modra  <amodra@bigpond.net.au>
402         * format.c (bfd_check_format_matches): Record matching targets even
403         when "matching" is NULL to allow bfd_associated_vector matches.
404         Consolidate error return code.  Consolidate ok return code.  Always
405         restore original target and format on error.
407 2007-09-14  Alan Modra  <amodra@bigpond.net.au>
409         * configure.in: Delete BFD_HOST_LONG_LONG and bfd checks for
410         long long.  Partly revert 2007-07-12 change, so that
411         BFD_HOST_64BIT_LONG and BFD_HOST_64BIT_LONG_LONG are set
412         independent of "void *" size.
413         * configure: Regenerate.
414         * config.in: Regenerate.
415         * Makefile.in: Regenerate.
417 2007-09-12  Alan Modra  <amodra@bigpond.net.au>
419         * elf-bfd.h (struct elf_backend_data): Delete elf_backend_sprintf_vma
420         and elf_backend_fprintf_vma.
421         (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
422         * elf.c (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
423         * elfxx-target.h (elf_backend_sprintf_vma): Don't define.
424         (elf_backend_fprintf_vma): Likewise.
425         (elfNN_bed): Don't init removed fields.
426         * bfd.c (is32bit): New function.
427         (bfd_sprintf_vma, bfd_fprintf_vma): Use the above.
429 2007-09-11  Nathan Sidwell  <nathan@codesourcery.com>
431         * archures.c: Add bfd_mach_mcf_isa_c_nodiv,
432         bfd_mach_mcf_isa_c_nodiv_mac & bfd_mach_mcf_isa_c_nodiv_emac.
433         * ieee.c (ieee_write_processor): Update coldfire architecture
434         list.
435         * bfd-in2.h: Rebuilt.
436         * cpu-m68k.c (arch_info_struct): Add isa_c nodiv architectures.
437         (m68k_arch_features): Likewise.
438         * elf32-m68k.c (elf32_m68k_object_p): Add EF_M68K_CF_ISA_C_NODIV.
439         (elf32_m68k_print_private_bfd_data): Likewise.
441 2007-09-11  Jan Beulich  <jbeulich@novell.com>
443         * elf64-i386.c (elf64_i386_tls_transition): Remove redundant 'const'.
444         * elf64-x86_64.c (elf64_x86_64_tls_transition): Likewise.
446 2007-09-08  Alan Modra  <amodra@bigpond.net.au>
448         * elf64-ppc.c (func_desc_adjust): When resolving undefined
449         references to dot-symbols, transfer def_regular and
450         def_dynamic from the descriptor symbol.
452 2007-09-08  Alan Modra  <amodra@bigpond.net.au>
454         * config.bfd: Set want64 for spu-*-elf.
456 2007-09-08  Alan Modra  <amodra@bigpond.net.au>
458         PR ld/2864, ld/5006
459         * elf.c (special_sections): Comment typo.
460         (elf_fake_sections): Force SHT_PROGBITS for sections that are
461         SHT_NOBITS if BFD section flags say they have contents.
463 2007-09-04  Michael Snyder  <msnyder@access-company.com>
465         * elf32-bfin.c (howto_table): Cut and paste error?  
466         Name field of reloc is wrong.
468 2007-09-04  Alan Modra  <amodra@bigpond.net.au>
470         * elf32-spu.c (elf_howto_table): Formatting.
472 2007-09-02  H.J. Lu  <hongjiu.lu@intel.com>
474         PR ld/4986
475         * dwarf2.c (new_line_sorts_after): Undo the last change.
476         (add_line_info): Only keep the last entry with the same address
477         and end sequence.
479 2007-08-31  H.J. Lu  <hongjiu.lu@intel.com>
481         PR ld/4986
482         * dwarf2.c (new_line_sorts_after): Also compare line number.
484 2007-08-31  Jesse Michael  <jmichael@suse.de>
486         * mach-o.c (bfd_mach_o_make_bfd_section): Fix test for non
487         zerofill sections.
489 2007-08-28  David Heine  <dlheine@tensilica.com>
491         * elf32-xtensa.c (compute_ebb_actions): Update removed_bytes when
492         narrowing instructions.
494 2007-08-28  Mark Shinwell  <shinwell@codesourcery.com>
495             Joseph Myers  <joseph@codesourcery.com>
497         * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma,
498         then on type.
500 2007-08-28  Robert Sebastian Gerus  <arachnist@gmail.com>
502         * config.bfd: Add support for i[3-7]86-*-dragonfly*.
503         * configure.in: Likewise.
504         * configure: Regenerate.
506 2007-08-25  Ulrich Weigand  <uweigand@de.ibm.com>
507             Alan Modra  <amodra@bigpond.net.au>
509         * elf.c (elfcore_grok_spu_note): New function.
510         (elf_parse_notes): Call it.
512 2007-08-24  H.J. Lu  <hongjiu.lu@intel.com>
514         * elf64-x86-64.c (elf64_x86_64_relocate_section): Adjust
515         indentation.
517 2007-08-24  Pedro Alves  <pedro_alves@portugalmail.pt>
519         * elf.c (elfcore_grok_win32pstatus): Remove HAVE_WIN32_PSTATUS_T
520         guard.  Make it host independent.
521         (elfcore_grok_note): Remove HAVE_WIN32_PSTATUS_T guard around
522         NT_WIN32PSTATUS.
524 2007-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
526         * elf-bfd.h (struct elf_obj_tdata): New BUILD_ID_SIZE, BUILD_ID.
527         * elf.c (elfcore_read_notes): Split to ...
528         (elf_read_notes) ... here ...
529         (elf_parse_notes): ... and here.  Check `bfd_get_format (abfd)' with
530         the former subfunctions called only for BFD_CORE.
531         Call ELFOBJ_GROK_GNU_NOTE for BFD_OBJECT files with the owner "GNU".
532         (_bfd_elf_make_section_from_shdr): Call ELF_PARSE_NOTES for SHT_NOTEs.
533         (bfd_section_from_phdr): Update the call for renamed ELFCORE_READ_NOTES.
534         (elfobj_grok_gnu_build_id, elfobj_grok_gnu_note): New functions.
535         Code advisory: Roland McGrath
537 2007-08-24  Daniel Jacobowitz  <dan@codesourcery.com>
539         * elf64-mips.c (elf_backend_sign_extend_vma): Define.
541 2007-08-24  Alan Modra  <amodra@bigpond.net.au>
543         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Warning fix.
545 2007-08-23  H.J. Lu  <hongjiu.lu@intel.com>
547         * Makefile.am: Run "make dep-am".
548         * Makefile.in: Regenerated.
550 2007-08-23  H.J. Lu  <hongjiu.lu@intel.com>
552         * elf32-i386.c: Include "bfd_stdint.h".
553         (elf_i386_rtype_to_howto): New function.
554         (elf_i386_info_to_howto_rel): Use it.
555         (x86_64_opcode16): New union type.
556         (elf_i386_check_tls_transition): New function.
557         (elf_i386_tls_transition): Updated to check transition and
558         issue an error if a transition isn't supported.
559         (elf_i386_check_relocs): Return FALSE if
560         elf_i386_tls_transition returns FALSE.
561         (elf_i386_gc_sweep_hook): Likewise.
562         (elf_i386_relocate_section): Likewise. Remove BFD_ASSERT
563         on TLS transitions.
565         * elf64-x86-64.c: Include "bfd_stdint.h".
566         (x86_64_opcode16): New union type.
567         (x86_64_opcode32): Likewise.
568         (elf64_x86_64_check_tls_transition): New function.
569         (elf64_x86_64_tls_transition): Updated to check transition and
570         issue an error if a transition isn't supported.
571         (elf64_x86_64_check_relocs): Return FALSE if
572         elf64_x86_64_tls_transition returns FALSE.
573         (elf64_x86_64_gc_sweep_hook): Likewise.
574         (elf64_x86_64_relocate_section): Likewise. Remove BFD_ASSERT
575         on TLS transitions.
577 2007-08-22  H.J. Lu  <hongjiu.lu@intel.com>
579         * elfxx-ia64.c: Convert to ISO C90 prototypes.
580         (elfNN_hpux_backend_section_from_bfd_section): Make it static.
582 2007-08-22  H.J. Lu  <hongjiu.lu@intel.com>
584         * elf64-x86-64.c: Remove trailing whitespace.
585         * elfxx-ia64.c: Likewise.
587 2007-08-21  H.J. Lu  <hongjiu.lu@intel.com>
589         * elf32-i386.c (elf_i386_tls_transition): Accept a pointer
590         to ELF hash entry instead of an integer for local test.
591         (elf_i386_check_relocs): Updated.
592         (elf_i386_gc_sweep_hook): Likewise.
593         (elf_i386_relocate_section): Likewise.
595         * elf64-x86-64.c  (elf64_x86_64_tls_transition): Accept a
596         pointer to ELF hash entry instead of an integer for local
597         test.
598         (elf64_x86_64_check_relocs): Updated.
599         (elf64_x86_64_gc_sweep_hook): Likewise.
600         (elf64_x86_64_relocate_section): Likewise.
602 2007-08-20  H.J. Lu  <hongjiu.lu@intel.com>
604         * elf32-i386.c (elf_i386_tls_transition): Break long line.
605         * elf64-x86-64.c (elf64_x86_64_tls_transition): Likewise.
607 2007-08-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
609         * elfxx-target.h [ELF_COMMONPAGESIZE && ELF_MAXPAGESIZE]
610         (ELF_MINPAGESIZE): Fixed its size guess.  Sanity checked its size.
611         (ELF_COMMONPAGESIZE, ELF_MAXPAGESIZE): Sanity checked their size.
613 2007-08-20  Nick Clifton  <nickc@redhat.com>
615         * elflink.c (elf_fixup_link_order): Rewrite conversion of
616         s->alignment_power into an offset mask in order to avoid a gcc
617         error message.
619 2007-08-17  Jakub Jelinek  <jakub@redhat.com>
621         * config.bfd: Handle sparcv*-*-linux-* the same as sparc-*-linux-*.
622         Change sparc64-*-linux-* to sparc64*-*-linux-*.
624 2007-08-17  Alan Modra  <amodra@bigpond.net.au>
626         * po/Make-in: Add --msgid-bugs-address to xgettext invocation.
628 2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
630         * elf.c: Revert last change.
632 2007-08-16  H.J. Lu  <hongjiu.lu@intel.com>
634         * elf.c (get_segment_type): Change PT_GNU_STACK to PT_GNU_ATTR.
635         (bfd_section_from_phdr): Likewise.
636         (get_program_header_size): Likewise. Add a PT_GNU_ATTR segment
637         if there is an attribute section.
638         (_bfd_elf_map_sections_to_segments): Likewise.
639         (IS_SECTION_IN_INPUT_SEGMENT): Likewise.
641 2007-08-14  H.J. Lu  <hongjiu.lu@intel.com>
643         PR ld/4918
644         * elf32-i386.c (elf_i386_relocate_section): Allow R_386_PC32
645         on ___tls_get_addr for GD->LE/LD->LE transitions when not
646         building shared library.
648         * elf64-x86-64.c (elf64_x86_64_relocate_section): Allow
649         R_X86_64_PC32 on __tls_get_addr for GD->LE/LD->LE transitions
650         when not building shared library.
652 2007-08-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
654         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): LOADBASE is now
655         initialized only on the first PT_LOAD.  New variable LOADBASE_SET.
656         Removed PF_R checking for IA-64 vDSOs as redundant now.
657         Code advisory: Roland McGrath
659 2007-08-13  Richard Sandiford  <richard@codesourcery.com>
661         * elfxx-mips.c (mips_elf_link_hash_table): Add computed_got_sizes.
662         (mips_elf_record_global_got_symbol): Increment local_gotno for
663         each forced-local symbol.
664         (_bfd_mips_elf_check_relocs): Pass forced-local call symbols to
665         mips_elf_record_global_got_symbol for VxWorks too.
666         (_bfd_mips_elf_always_size_sections): Set computed_got_sizes
667         to true after computing the GOT size.
668         (_bfd_mips_elf_hide_symbol): Increase local_gotno whenever
669         got.offset == 1.  Only adjust global_gotno if computed_got_sizes.
670         For VxWorks, add a local entry when hiding a symbol that needs a
671         plt but has not been marked as needing a global got entry.
672         (_bfd_mips_elf_link_hash_table_create): Set computed_got_sizes to
673         false.
675 2007-08-12  Daniel Jacobowitz  <dan@codesourcery.com>
677         * coffgen.c (coff_get_normalized_symtab): Correct cast.
679 2007-08-13  Alan Modra  <amodra@bigpond.net.au>
681         * elf.c (elf_modify_segment_map): Add remove_empty_load param.
682         Don't remove empty PT_LOAD header if false.
683         (_bfd_elf_map_sections_to_segments): If user phdrs, pass false
684         to elf_modify_segment_map.
685         (assign_file_positions_for_load_sections): Pass false to
686         elf_modify_segment_map.
688 2007-08-13  Alan Modra  <amodra@bigpond.net.au>
690         * elf64-ppc.c (ADDI_R12_R12, LD_R11_0R2, LD_R2_0R2): Define.
691         Update stub comments.
692         (build_plt_stub): Build two variants, one without "addis".
693         (ppc_build_one_stub): Build stubs without "addis" if possible.
694         (ppc_size_one_stub): Size new stubs.
696 2007-08-11  Richard Sandiford  <richard@codesourcery.com>
698         * config.bfd (sh-*-vxworks): Define targ_underscore to "yes".
700 2007-08-09  Michael Snyder  <msnyder@access-company.com>
702         * aoutx.h (aout_get_external_symbols): Return if count is zero.
704 2007-08-09  H.J. Lu  <hongjiu.lu@intel.com>
706         PR ld/4909
707         * elf.c (print_segment_map): New function.
708         (assign_file_positions_for_load_sections): Call print_segment_map
709         when a section can't be allocated in segment.
711 2007-08-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
713         * opncls.c (bfd_openr_iovec): Fix the OPEN parameter macro expansion.
715 2007-08-07  Nick Clifton  <nickc@redhat.com>
717         * po/bfd.pot: Updated template.
718         * po/BLD-POTFILES.in: Regenerate.
720 2007-08-07  Alan Modra  <amodra@bigpond.net.au>
722         * elf.c: (_bfd_elf_make_section_from_phdr): Properly handle
723         bss segments.
725 2007-08-06  Daniel Jacobowitz  <dan@codesourcery.com>
727         * Makefile.am (BUILD_HFILES): Clean bfd_stdint.h.
728         * Makefile.in: Regenerated.
730 2007-08-06  Daniel Jacobowitz  <dan@codesourcery.com>
732         * configure.in: Update version to 2.18.50.
733         * configure: Regenerated.
735 2007-08-06  Paul Brook  <paul@codesourcery.com>
737         * elf32-arm.c (elf32_arm_link_hash_entry): Add
738         plt_maybe_thumb_refcount.
739         (elf32_arm_link_hash_newfunc): Set plt_maybe_thumb_refcount.
740         (elf32_arm_copy_indirect_symbol): Ditto.
741         (elf32_arm_adjust_dynamic_symbol): Ditto.
742         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_THM_JUMP24.
743         (arm_add_to_rel): Ditto.
744         (elf32_arm_final_link_relocate): Merge R_ARM_THM_JUMP24 with
745         R_ARM_THM_CALL.  Handle R_ARM_THM_JUMP19 against a PLT stub.
746         (elf32_arm_gc_sweep_hook): Call check_use_blx.  Update plt counts
747         for R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19.
748         (elf32_arm_check_relocs): Update plt counts for R_ARM_THM_JUMP24
749         and R_ARM_THM_JUMP19.  
750         (allocate_dynrelocs): Use plt_maybe_thumb_refcount.
751         (elf32_arm_finish_dynamic_symbol): Ditto.
752         (elf32_arm_output_plt_map): Ditto.
754 2007-08-06  Daniel Jacobowitz  <dan@codesourcery.com>
756         * elf.c (rewrite_elf_program_header): Handle sections not sorted
757         by address.
758         (copy_elf_program_header): Likewise.
760 2007-08-04  H.J. Lu  <hongjiu.lu@intel.com>
762         * elf-bfd.h (xvec_get_elf_backend_data): Add const.
764         * elfcode.h (elf_object_p): Use xvec_get_elf_backend_data.
765         * elfcore.h (elf_core_file_p): Likewise.
767 2007-08-02  H.J. Lu  <hongjiu.lu@intel.com>
769         * coffcode.h (ALIGN_SET): Removed.
770         (ELIFALIGN_SET): Likewise.
771         (coff_set_alignment_hook): Handle IMAGE_SCN_ALIGN_128BYTES,
772         IMAGE_SCN_ALIGN_256BYTES, IMAGE_SCN_ALIGN_512BYTES,
773         IMAGE_SCN_ALIGN_1024BYTES, IMAGE_SCN_ALIGN_2048BYTES,
774         IMAGE_SCN_ALIGN_4096BYTES and IMAGE_SCN_ALIGN_8192BYTES.
776 2007-08-01  Michael Snyder  <msnyder@access-company.com>
778         * vms-tir.c (new_section): Fix cut and paste error.
780         * aoutx.h (aout_link_add_symbols): Return if count is zero.
782         * elf.c (bfd_elf_print_symbol): Macro dereferences pointer, so
783         pointer must be non-null.
785 2007-08-01  Tristan Gingold  <gingold@adacore.com>
787         * coffcode.h (coff_sort_func_alent): New function.
788         (coff_slurp_line_table): Sort line table if not already sorted.
790 2007-08-01  Jakub Jelinek  <jakub@redhat.com>
792         * elf.c (_bfd_elf_map_sections_to_segments): Work around buggy
793         GCC 3.4.x warning.
795 2007-08-01  Alan Modra  <amodra@bigpond.net.au>
797         * aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown
798         r_type.
799         (swap_std_reloc_in): Likewise.
800         (aout_link_input_section_std): Likewise.  Return with an error
801         on unexpected relocation type.
802         (aout_link_input_section_ext): Likewise.
804 2007-08-01  Alan Modra  <amodra@bigpond.net.au>
806         PR4694
807         * aoutx.h (final_link): Write a zero in first word of
808         stringtab if no symbols rather than corrupting last byte
809         of text/data.
811 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
813         * elf.c (get_program_header_size): Adjacent loadable .note*
814         sections need just one PT_NOTE segment.
815         (_bfd_elf_map_sections_to_segments): Likewise.
817 2007-07-30  Michael Snyder  <msnyder@access-company.com>
819         * coffgen.c (_bfd_coff_read_internal_relocs): Revert change of
820         2007-07-26.  Buffer still in use, can't be freed.
822 2007-07-27  Michael Snyder  <msnyder@access-company.com>
824         * cofflink.c (coff_link_add_symbols): Return if count is zero.
826         * coff-i386.c (coff_i386_rtype_to_howto): Off by one error.
828         * aoutx.h (slurp_symbol_table): Return if count == 0.
830         * coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero.
832         * elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
834 2007-07-27  H.J. Lu  <hongjiu.lu@intel.com>
836         * config.bfd (x86_64-*-mingw*): Don't include x86_64coff_vec.
838 2007-07-26  Michael Snyder  <msnyder@access-company.com>
840         * coff-i386.c (coff_i386_rtype_to_howto): Guard against null.
842         * linker.c (bfd_section_already_linked_table_insert): Change 
843         return type from void to boolean.  Return FALSE on failure.
844         (_bfd_generic_section_already_linked): Test return value of
845         bfd_section_already_linked_table_insert, call fatal on error.
847         * elflink.c (_bfd_elf_section_already_linked): Test return value
848         of bfd_section_already_linked_table_insert, call fatal on error.
850         * libbfd-in.h (bfd_section_already_linked_table_insert): Update
851         return type to bfd_boolean.
853         * libbfd.h: Regenerate.
855 2007-07-26  Adam Nemet  <anemet@caviumnetworks.com>
857         * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap,
858         bfd_slurp_armap): Improve function comment.
860 2007-07-26  Michael Snyder  <msnyder@access-company.com>
862         * linker.c (already_linked_newfunc): Check for NULL return from
863         bfd_hash_allocate.
865         * coffgen.c (fixup_symbol_value): Guard against null; 
866         bfd_is_com_section will dereference the section pointer.
868         * syms.c (bfd_decode_symclass): Guard against NULL, since 
869         bfd_is_com_section dereferences the pointer.
871         * srec.c (srec_scan): Check for EOF (critical because return value
872         will be used as array index).
874         * coffgen.c (_bfd_coff_read_internal_relocs): If internal_relocs
875         are not to be cached, free the temporary buffer.
877         * aoutx.h (slurp_reloc_table): Return TRUE if reloc_size == zero
878         or count == zero.
880         * tekhex.c (first_phase): Check return value for null.
882         * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless 
883         pointer increment.
885 2007-07-26  Alan Modra  <amodra@bigpond.net.au>
887         * elflink.c (_bfd_elf_fix_symbol_flags): Remove unnecessary
888         check on dynobj.  Remove bed shadow.
890         * srec.c (srec_get_section_contents): Return immediately on
891         count zero.  Check that offset and count are within section.
892         * libbfd.c (_bfd_generic_get_section_contents): Check that
893         offset + count does not overflow.
895         * srec.c (srec_canonicalize_symtab): Don't alloc when symcount
896         is zero.  Correct return value on error.
897         * mmo.c (mmo_canonicalize_symtab): Likewise.
898         * binary.c (binary_canonicalize_symtab) Correct return on error.
900 2007-07-26  Thiemo Seufer  <ths@mips.com>
902         * bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
904 2007-07-26  Alan Modra  <amodra@bigpond.net.au>
906         * reloc.c (bfd_generic_get_relocated_section_contents): Avoid
907         bfd_canonicalize_reloc call when bfd_get_reloc_upper_bound
908         says there are no relocs.
910 2007-07-26  Doug Kwan  <dougkwan@google.com>
912         Speed up bfd_dwarf2_find_line.
913         * dwarf2.c (struct dwarf2_debug): Add new fields to support function
914         and variable info hash tables. Add last_comp_unit, info_hash_count,
915         funcinfo_hash_table, varinfo_hash_table, hash_units_head.
916         (struct comp_unit): Add prev_unit, cached.
917         (struct info_list_node, struct info_hash_entry,
918         struct info_hash_table): New.
919         (info_hash_table_newfunc, create_info_hash_table,
920         insert_info_hash_table, lookup_info_hash_table): New functions
921         implementing function and variable info hash tables.
922         (scan_unit_for_symbols): Add checks to make sure hash tables are
923         consistent with compilation units.
924         (comp_unit_maybe_decode_line_info): New function.
925         (comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
926         (reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info,
927         info_hash_lookup_funcinfo, info_hash_lookup_varinfo,
928         stash_maybe_update_info_hash_table, stash_verify_info_hash_table,
929         stash_maybe_enable_info_hash_tables, stash_find_line_fast): New
930         functions. Make use of info hash tables to speed up
931         bfd_dwarf2_find_line.
932         (find_line): Use hash table for faster lookup if it is turned on.
933         Also add code to maintain bi-directional link in comp units.
935 2007-07-25  Michael Snyder  <msnyder@access-company.com>
937         * coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
938         if size == 0; return and avoid possible null pointer issues.
940 2007-07-25  Alan Modra  <amodra@bigpond.net.au>
942         * linker.c (generic_link_add_symbol_list): Warning fix.
944 2007-07-24  Michael Snyder  <msnyder@access-company.com>
946         * opncls.c (bfd_make_writable): Check return from bfd_malloc.
948         * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
949         on bfd_malloc error rather than goto error_return.
951 2007-07-24  Alan Modra  <amodra@bigpond.net.au>
953         * elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
954         _bfd_elf_merge_sections, _bfd_elf_link_hash_newfunc,
955         _bfd_elf_link_hash_copy_indirect, _bfd_elf_link_hash_hide_symbol,
956         _bfd_elf_link_hash_table_init, _bfd_elf_link_hash_table_create,
957         bfd_elf_set_dt_needed_name, bfd_elf_get_dyn_lib_class,
958         bfd_elf_set_dyn_lib_class, bfd_elf_get_needed_list,
959         bfd_elf_get_runpath_list, bfd_elf_get_dt_soname,
960         bfd_elf_get_bfd_needed_list, struct elf_symbuf_symbol,
961         struct elf_symbuf_head, struct elf_symbol, elf_sort_elf_symbol,
962         elf_sym_name_compare, elf_create_symbuf,
963         bfd_elf_match_symbols_in_sections,
964         _bfd_elf_match_sections_by_type): Move to here..
965         * elf.c: ..from here.
967 2007-07-23  Richard Sandiford  <richard@codesourcery.com>
969         * elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
970         of weakdef->root.type if weakdef has no regular definition.
972 2007-07-22  Adam Nemet  <anemet@caviumnetworks.com>
974         * elfxx-mips.c (struct mips_elf_link_hash_table): Add new field
975         small_data_overflow_reported.
976         (_bfd_mips_elf_link_hash_table_create): Initialize it.
977         (_bfd_mips_elf_relocate_section) <bfd_reloc_overflow>: Report
978         small-data section overflow.
980 2007-07-19  Doug Kwan  <dougkwan@google.com>
982         PR binutils/4797
983         * dwarf2.c: (find_line) Do not dereference functionname_ptr if
984         do_line is true.
986 2007-07-18  Bob Wilson  <bob.wilson@acm.org>
988         * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
989         non-ELF sections.
991 2007-07-18  Bob Wilson  <bob.wilson@acm.org>
993         * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section
994         vma and size for dynamic tags from the output sections.
996 2007-07-18  Alan Modra  <amodra@bigpond.net.au>
998         * elf-bfd.h (struct sym_sec_cache): Delete "sec".  Add "shndx".
999         * elf.c (bfd_section_from_r_symndx): Don't cache bfd section of
1000         symbol.  Instead cache ELF section index.  Remove redundant
1001         checks of st_shndx.
1003 2007-07-15  Mike Frysinger  <vapier@gentoo.org>
1005         * trad-core.c (NBPG): If not defined, set to getpagesize().
1007 2007-07-13  Roland McGrath  <roland@redhat.com>
1009         * elf-bfd.h (struct elf_obj_tdata): Revert last change.
1010         Add after_write_object_contents, after_write_object_contents_info.
1011         * elf.c (_bfd_elf_write_object_contents): Revert last change.
1012         Instead, call after_write_object_contents if set.
1014 2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
1016         * bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New.
1017         (BFD_HOSTPTR_T): Host pointer type for casting a
1018         pointer to an integer type.
1019         (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
1020         (sprintf_vma, fprintf_vma): Add support for long long prints.
1021         * bfd-in2.h: Regenerate.
1022         * configure.in: (BFD_HOST_64BIT_LONG_LONG): New.
1023         (BFD_HOSTPTR_T): Host pointer type for casting a
1024         pointer to an integer type. Default is "unsigned long".
1025         (AC_CHECK_SIZEOF(void *)): New.
1026         (host64): Set it if the pointer size is 8.
1027         * configure: Regenerate.
1028         * config.in: Add macro SIZEOF_VOID_P.
1029         * coffcode.h: Replace host ptr type assuming "long" with
1030         bfd_hostptr_t type.
1031         * coffgen.c: Likewise.
1032         * elf-eh-frame.c: Likewise.
1033         * peicode.h: Likewise.
1035 2007-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1037         * Makefile.in: Regenerated.
1039 2007-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1041         PR binutils/4756
1042         * simple.c (bfd_simple_get_relocated_section_content): Don't
1043         apply relocation on executable and shared library.
1045 2007-07-10  Nathan Sidwell  <nathan@codesourcery.com>
1047         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
1048         copy relocs on vxworks.
1050 2007-07-10  Alan Modra  <amodra@bigpond.net.au>
1052         * elf32-arm.c (elf32_arm_size_info): Init checksum_contents field.
1053         * elf64-alpha.c (alpha_elf_size_info): Likewise.
1054         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1055         * elf64-mips.c (mips_elf64_size_info): Likewise.
1056         * elf64-s390.c (s390_elf64_size_info): Likewise.
1057         * elf64-sparc.c (elf64_sparc_size_info): Likewise.
1059 2007-07-09  H.J. Lu  <hongjiu.lu@intel.com>
1061         * elflink.c (bfd_elf_record_link_assignment): Handle indirect
1062         symbol.
1063         (_bfd_elf_merge_symbol): Properly update normal symbol when
1064         overriding the versioned symbol from a dynamic library.
1066 2007-07-09  Roland McGrath  <roland@redhat.com>
1068         * elf-bfd.h (struct elf_obj_tdata): Add members
1069         emit_note_gnu_build_id and note_gnu_build_id_sec.
1070         * elf.c (_bfd_id_note_section_size): New global function.
1071         (read_hex, _bfd_elf_write_build_id_section): New static functions.
1072         (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section
1073         if emit_note_gnu_build_id is set.
1074         * Makefile.am (elf.lo): Update dependencies.
1076         * elf-bfd.h (struct elf_size_info): Add checksum_contents hook.
1077         (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare.
1078         * elfcode.h (elf_checksum_contents): New macro and function.
1079         (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook.
1081 2007-07-06  Michael Snyder  <msnyder@access-company.com>
1083         * elflink.c (elf_link_add_object_symbols): Return via
1084         error_free_vers on "notice" failure.
1086 2007-07-04  H.J. Lu  <hongjiu.lu@intel.com>
1088         * peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
1089         if arch is unknown.
1091 2007-07-04  Nick Clifton  <nickc@redhat.com>
1093         Import this patch from an internal tree:
1095         2001-07-17  Richard Henderson  <rth@redhat.com>
1097         * elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly
1098         compensate for high bit set in R_MEP_LOW16.
1100 2007-07-03  Joseph Myers  <joseph@codesourcery.com>
1102         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
1103         input attributes if value has been copied.
1105 2007-07-03  Nick Clifton  <nickc@redhat.com>
1107         * COPYING: Replace with GPLv3 text.
1108         * aix386-core.c: Update copyright notice to refer to GPLv3.
1109         * aix5ppc-core.c, aout0.c, aout32.c, aout64.c, aout-adobe.c,
1110         aout-arm.c, aout-cris.c, aoutf1.h, aout-ns32k.c, aout-sparcle.c,
1111         aout-target.h, aout-tic30.c, aoutx.h, archive64.c, archive.c,
1112         archures.c, armnetbsd.c, bfd.c, bfd-in.h, bfdio.c, bfdwin.c,
1113         binary.c, bout.c, cache.c, cf-i386lynx.c, cf-sparclynx.c,
1114         cisco-core.c, coff64-rs6000.c, coff-alpha.c, coff-apollo.c,
1115         coff-arm.c, coff-aux.c, coffcode.h, coffgen.c, coff-go32.c,
1116         coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c, coff-i960.c,
1117         coff-ia64.c, cofflink.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1118         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1119         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1120         coff-svm68k.c, coffswap.h, coff-tic30.c, coff-tic4x.c,
1121         coff-tic54x.c, coff-tic80.c, coff-u68k.c, coff-w65.c,
1122         coff-we32k.c, coff-x86_64.c, coff-z80.c, coff-z8k.c, corefile.c,
1123         cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c, cpu-bfin.c,
1124         cpu-cr16.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1125         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1126         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1127         cpu-i960.c, cpu-ia64.c, cpu-ia64-opc.c, cpu-ip2k.c, cpu-iq2000.c,
1128         cpu-m10200.c, cpu-m10300.c, cpu-m32c.c, cpu-m32r.c, cpu-m68hc11.c,
1129         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1130         cpu-mep.c, cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-mt.c,
1131         cpu-ns32k.c, cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c,
1132         cpu-powerpc.c, cpu-rs6000.c, cpu-s390.c, cpu-score.c, cpu-sh.c,
1133         cpu-sparc.c, cpu-spu.c, cpu-tic30.c, cpu-tic4x.c, cpu-tic54x.c,
1134         cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c, cpu-we32k.c,
1135         cpu-xc16x.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z80.c, cpu-z8k.c,
1136         demo64.c, doc/chew.c, dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c,
1137         ecoffswap.h, efi-app-ia32.c, efi-app-ia64.c, efi-app-x86_64.c,
1138         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1139         elf32-avr.h, elf32-bfin.c, elf32.c, elf32-cr16.c, elf32-cr16c.c,
1140         elf32-cris.c, elf32-crx.c, elf32-d10v.c, elf32-d30v.c,
1141         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1142         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1143         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1144         elf32-iq2000.c, elf32-m32c.c, elf32-m32r.c, elf32-m68hc11.c,
1145         elf32-m68hc12.c, elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c,
1146         elf32-m88k.c, elf32-mcore.c, elf32-mep.c, elf32-mips.c,
1147         elf32-msp430.c, elf32-mt.c, elf32-openrisc.c, elf32-or32.c,
1148         elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c, elf32-score.c,
1149         elf32-sh64.c, elf32-sh64-com.c, elf32-sh64.h, elf32-sh.c,
1150         elf32-sh-symbian.c, elf32-sparc.c, elf32-spu.c, elf32-spu.h,
1151         elf32-v850.c, elf32-vax.c, elf32-xc16x.c, elf32-xstormy16.c,
1152         elf32-xtensa.c, elf64-alpha.c, elf64.c, elf64-gen.c, elf64-hppa.c,
1153         elf64-hppa.h, elf64-mips.c, elf64-mmix.c, elf64-ppc.c,
1154         elf64-ppc.h, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
1155         elf64-x86-64.c, elf-attrs.c, elf-bfd.h, elf.c, elfcode.h,
1156         elfcore.h, elf-eh-frame.c, elf-hppa.h, elflink.c, elf-m10200.c,
1157         elf-m10300.c, elfn32-mips.c, elf-strtab.c, elf-vxworks.c,
1158         elf-vxworks.h, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1159         elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h, epoc-pe-arm.c,
1160         epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c, genlink.h,
1161         hash.c, host-aout.c, hosts/alphavms.h, hp300bsd.c, hp300hpux.c,
1162         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1163         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1164         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1165         libaout.h, libbfd.c, libbfd-in.h, libcoff-in.h, libecoff.h,
1166         libhppa.h, libieee.h, libnlm.h, liboasys.h, libpei.h, libxcoff.h,
1167         linker.c, lynx-core.c, m68k4knetbsd.c, m68klinux.c, m68knetbsd.c,
1168         m88kmach3.c, m88kopenbsd.c, mach-o.c, mach-o.h, mach-o-target.c,
1169         mep-relocs.pl, merge.c, mipsbsd.c, mmo.c, netbsd-core.c, netbsd.h,
1170         newsos3.c, nlm32-alpha.c, nlm32.c, nlm32-i386.c, nlm32-ppc.c,
1171         nlm32-sparc.c, nlm64.c, nlm.c, nlmcode.h, nlmswap.h, nlm-target.h,
1172         ns32k.h, ns32knetbsd.c, oasys.c, opncls.c, osf-core.c,
1173         pc532-mach.c, pdp11.c, pe-arm.c, pe-arm-wince.c, pef.c, pef.h,
1174         pef-traceback.h, pe-i386.c, pei-arm.c, pei-arm-wince.c, peicode.h,
1175         pei-i386.c, pei-mcore.c, pei-mips.c, pei-ppc.c, pei-sh.c,
1176         pei-x86_64.c, pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c,
1177         pe-x86_64.c, peXXigen.c, ppcboot.c, ptrace-core.c, reloc16.c,
1178         reloc.c, riscix.c, rs6000-core.c, sco5-core.c, section.c,
1179         simple.c, som.c, som.h, sparclinux.c, sparclynx.c, sparcnetbsd.c,
1180         srec.c, stabs.c, stab-syms.c, stamp-h.in, sunos.c, syms.c,
1181         sysdep.h, targets.c, targmatch.sed, tekhex.c, ticoff.h,
1182         trad-core.c, vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c,
1183         vms.c, vms-gsd.c, vms.h, vms-hdr.c, vms-misc.c, vms-tir.c,
1184         xcofflink.c, xcoff-target.h, xsym.c, xsym.h, xtensa-isa.c,
1185         xtensa-modules.c: Likewise.
1186         * elf32-sh-relocs.h: Add copyright notice.
1187         * hosts/alphalinux.h, hosts/decstation.h, hosts/delta68.h,
1188         hosts/dpx2.h, hosts/hp300bsd.h, hosts/i386bsd.h,
1189         hosts/i386linux.h, hosts/i386mach3.h, hosts/i386sco.h,
1190         hosts/i860mach3.h, hosts/m68kaux.h, hosts/m68klinux.h,
1191         hosts/m88kmach3.h, hosts/mipsbsd.h, hosts/mipsmach3.h,
1192         hosts/news.h, hosts/news-mips.h, hosts/pc532mach.h,
1193         hosts/riscos.h, hosts/symmetry.h, hosts/tahoe.h, hosts/vaxbsd.h,
1194         hosts/vaxlinux.h, hosts/vaxult2.h, hosts/vaxult.h: Likewise.
1195         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
1197 2007-07-02  Joseph Myers  <joseph@codesourcery.com>
1199         * elfxx-mips.c (mips_elf_calculate_relocation): Handle
1200         R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
1201         * elf64-mips.c (mips_elf64_howto_table_rela): Support
1202         R_MIPS_TLS_DTPREL64.
1204 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
1206         * Makefile.am: Run "make dep-am".
1207         * Makefile.in: Regenerate.
1208         * aclocal.m4: Regenerate.
1209         * config.in: Regenerate.
1210         * po/SRC-POTFILES.in: Regenerate.
1211         * po/bfd.pot: Regenerate.
1213 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
1215         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
1216         symsec != NULL tests.
1218 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
1220         PR 4712
1221         * elf.c (assign_file_positions_for_load_sections): Adjust lma
1222         by p_vaddr_offset.
1224 2007-06-30  H.J. Lu  <hongjiu.lu@intel.com>
1226         * aclocal.m4: Regenerated.
1227         * Makefile.in: Likewise.
1229 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
1231         * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
1232         (ppc_elf_merge_private_bfd_data): Call it.
1234 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
1236         * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
1237         (_bfd_mips_elf_merge_private_bfd_data): Call it.
1239 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
1241         * elf-attrs.c: New.
1242         * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
1243         (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
1244         (elf-attrs.lo): Generate dependencies.
1245         * Makefile.in: Regenerate.
1246         * configure.in (elf): Add elf-attrs.lo.
1247         * configure: Regenerate.
1248         * elf-bfd.h (struct elf_backend_data): Add entries for object
1249         attributes.
1250         (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
1251         OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
1252         Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
1253         New.
1254         (struct elf_obj_tdata): Add entries for object attributes.
1255         (elf_known_obj_attributes, elf_other_obj_attributes,
1256         elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
1257         New.
1258         (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
1259         bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
1260         bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
1261         bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
1262         bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
1263         _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
1264         _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
1265         * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
1266         (bfd_section_from_shdr): Handle attributes sections.
1267         * elflink.c (bfd_elf_final_link): Handle attributes sections.
1268         * elfxx-target.h (elf_backend_obj_attrs_vendor,
1269         elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
1270         elf_backend_obj_attrs_section_type): New.
1271         (elfNN_bed): Update.
1272         * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
1273         aeabi_attribute_list): Remove.
1274         (struct elf32_arm_obj_tdata): Remove object attributes fields.
1275         (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
1276         elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
1277         Update for new object attributes interfaces.
1278         (uleb128_size, is_default_attr, eabi_attr_size,
1279         elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
1280         elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
1281         elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
1282         elf32_arm_add_eabi_attr_int, attr_strdup,
1283         elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
1284         copy_eabi_attributes, elf32_arm_parse_attributes): Remove.  Moved
1285         to generic code in elf-attrs.c.
1286         (elf32_arm_obj_attrs_arg_type): New.
1287         (elf32_arm_fake_sections): Do not handle .ARM.attributes.
1288         (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
1289         (bfd_elf32_bfd_final_link): Remove.
1290         (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
1291         elf_backend_obj_attrs_arg_type,
1292         elf_backend_obj_attrs_section_type): New.
1293         * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
1294         attributes.
1295         * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
1296         * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
1297         * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
1298         * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
1299         * elf32-sh.c (sh_elf_copy_private_data): Likewise.
1300         * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
1302 2007-06-29  Paul Brook  <paul@codesourcery.com>
1304         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
1305         call veneers for call relocations against undefined symbols.
1306         (elf32_arm_final_link_relocate): Turn call to undefined symbol
1307         into a jump to the next instruction.
1309 2007-06-29  Michael Snyder  <msnyder@access-company.com>
1311         * bfd.c (bfd_demangle): Plug memory leak (Coverity).
1313 2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
1315         * Makefile.am: Add cr16 related entry
1316         * Makefile.in: Regenerate
1317         * archures.c: Add bfd_cr16_arch
1318         * bfd-in2.h: Regenerate
1319         * config.bfd: Add cr16-elf
1320         * configure.in: Add bfd_elf32_cr16_vec
1321         * configure: Regenerate.
1322         * targets.c: Added cr16 related information
1323         * cpu-cr16.c: New file.
1324         * elf32-cr16.c: New file.
1325         * reloc.c: Added cr16 relocs.
1327 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
1329         * elflink.c (_bfd_elf_link_assign_sym_version): Improve error
1330         message for undefined version nodes.
1331         (elf_gc_sweep): Don't warn when zero size sections are
1332         removed.
1334 2007-06-29  Nathan Froyd  <froydnj@codesourcery.com>
1336         * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
1337         types.
1339 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
1341         * elf32-spu.c (spu_elf_fake_sections): New function.
1342         (elf_backend_fake_sections): Define.
1344 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
1346         * elf.c (assign_file_positions_for_load_sections): Use elf
1347         section header sh_size rather than bfd section size, simplifying
1348         .tbss handling.
1350 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
1352         PR ld/4701
1353         * elf.c (assign_file_positions_for_load_sections): Ensure bss
1354         segments meet gABI alignment requirements.  Don't allocate
1355         file space for bss sections in a segment also containing file
1356         or program headers.
1358 2007-06-27  Alan Modra  <amodra@bigpond.net.au>
1360         * bfd.c (struct bfd): Rename "next" to "archive_next".
1361         * archive.c: Rename uses throughout file.
1362         * archive64.c: Likewise.
1363         * coff-rs6000.c: Likewise.
1364         * ecoff.c: Likewise.
1365         * som.c: Likewise.
1366         * bfd-in2.h: Regenerate.
1368         * elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
1369         input bfds.
1370         * elf32-spu.c (spu_elf_create_sections): Likewise.
1372 2007-06-26  H.J. Lu  <hongjiu.lu@intel.com>
1374         * dwarf2.c (find_line): New.  Contains the duplicated code from:
1375         (_bfd_dwarf2_find_nearest_line): Use it.
1376         (_bfd_dwarf2_find_line): Use it.
1378 2007-06-26  Joseph Myers  <joseph@codesourcery.com>
1380         * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
1382 2007-06-25  Richard Sandiford  <richard@codesourcery.com>
1384         * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
1385         to be used for calls from MIPS16 code.
1387 2007-06-23  Andreas Schwab  <schwab@suse.de>
1389         * configure.in (--with-separate-debug-dir): New option.
1390         * configure: Regenerate.
1391         * Makefile.am (dwarf2.lo): Add rule to pass DEBUGDIR.
1392         * Makefile.in: Regenerate.
1393         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Pass DEBUGDIR to
1394         bfd_follow_gnu_debuglink.
1395         (_bfd_dwarf2_find_line): Likewise.
1397 2007-06-22  Nick Clifton  <nickc@redhat.com>
1399         * dwarf2.c: Add support for reading in debug information via a
1400         .gnu_debuglink section:
1401         (struct dwarf2_debug): Add bfd field to record the bfd containing
1402         the debug info.
1403         (parse_comp_unit): Remove ABFD parameter.  Instead use the bfd
1404         field in the dwarf2_debug structure.
1405         (_bfd_dwarf2_find_nearest_line): If a debug info section could not
1406         be found in the current bfd call bfd_follow_gnu_debuglink to see
1407         if another file contains the debug information.  If it does, open
1408         it and continue.
1409         (_bfd_dwarf2_find_line): Likewise.
1411 2007-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1413         PR ld/4590
1414         * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
1415         when removing duplicated entries.
1416         (get_dyn_sym_info): Initialize the got_offset field to -1.
1417         Update call to sort_dyn_sym_info.
1418         (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
1419         array of addend and remove duplicates.
1421 2007-06-18  H.J. Lu  <hongjiu.lu@intel.com>
1423         * libpei.h (_bfd_XXi_final_link_postscript): Remove
1424         duplication.
1425         (bfd_target_pei_p): New.
1426         (bfd_target_pei_arch): New
1427         (bfd_target_efi_p): Likewise.
1428         (bfd_target_efi_arch): New
1429         (bfd_pe_executable_p): Use bfd_target_pei_p and
1430         bfd_target_efi_p.
1432         * peicode.h (arch_type): New enum.
1433         (pe_arch): New function.
1434         (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
1435         if there is an EFI/PE target.
1437 2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>
1439         * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
1441         * acinclude.m4: Don't include m4 files. Remove libtool
1442         kludge.
1444         * Makefile.in: Regenerated.
1445         * aclocal.m4: Likewise.
1446         * configure: Likewise.
1448 2007-06-11  Sterling Augustine  <sterling@tensilica.com>
1449             Bob Wilson  <bob.wilson@acm.org>
1451         * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
1452         XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
1453         (extend_ebb_bounds_backward, compute_text_actions): Likewise.
1454         (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
1455         (xtensa_get_property_predef_flags): Likewise.
1456         (compute_removed_literals): Pass new arguments to is_removable_literal.
1457         (is_removable_literal): Add sec, prop_table and ptblsize arguments.
1458         Do not remove literal if the NO_TRANSFORM property flag is set.
1460 2007-05-31  Richard Sandiford  <rsandifo@nildram.co.uk>
1462         * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
1463         type (3) single-GOT entry, read tls_type from the hash table entry
1464         rather than the GOT entry.
1466 2007-06-01  Alan Modra  <amodra@bigpond.net.au>
1468         * simple.c (bfd_simple_get_relocated_section_contents): Init
1469         input_bfds_tail.
1471 2007-05-30  Alan Modra  <amodra@bigpond.net.au>
1473         * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
1474         created by objcopy --only-keep-debug.
1475         (_bfd_elf_init_private_section_data): Only change elf_section_type
1476         if it is SHT_NULL.
1478         * elf.c (assign_file_positions_for_load_sections): Correct sh_type
1479         to SHT_NOBITS earlier.  Base actions in rest of function on sh_type
1480         and sh_flags instead of bfd section flags.  Delete voff and code
1481         keeping nobits segments aligned.
1483 2007-05-25  Eric Christopher  <echristo@apple.com>
1485         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
1486         Check that sym_sec isn't NULL before accessing.
1488 2007-05-24  Steve Ellcey  <sje@cup.hp.com>
1490         * Makefile.in: Regnerate.
1491         * configure: Regenerate.
1492         * aclocal.m4: Regenerate.
1493         * doc/Makefile.in: Regenerate.
1495 2007-05-22  Paul Brook  <paul@codesourcery.com>
1497         * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
1498         with sec and sec_shndx.
1499         (elf32_arm_ouput_plt_map_sym): Use them.
1500         (elf32_arm_output_arch_local_syms): Output mapping symbols for
1501         interworking glue.
1503 2007-05-18  Paul Brook  <paul@codesourcery.com>
1505         * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
1506         (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
1507         (record_arm_to_thumb_glue): Add v5t non-pic glue.
1508         (elf32_arm_create_thumb_stub): Ditto.
1510 2007-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1511             Alan Modra  <amodra@bigpond.net.au>
1513         * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
1514         section to the minimum alignment.
1516 2007-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1517             Alan Modra  <amodra@bigpond.net.au>
1519         PR ld/4504
1520         * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
1521         * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
1523         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
1524         _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
1525         bss section.
1526         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1527         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1528         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1529         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1530         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1531         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1532         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1533         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1534         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1535         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1536         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1537         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1538         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1539         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1540         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1541         * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
1542         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1544 2007-05-15  Richard Sandiford  <richard@codesourcery.com>
1546         * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
1547         input_section argument.  Create .rela.dyn relocations against
1548         symbol 0 rather than the section symbol.
1549         (mips_elf_local_got_index): Remove input_section argument.
1550         Update call to mips_elf_create_local_got_entry.
1551         (mips_elf_got_page, mips_elf_got16_entry): Likewise.
1552         (mips_elf_calculate_relocation): Update calls to
1553         mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
1555 2007-05-15  Mark Shinwell  <shinwell@codesourcery.com>
1557         * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
1558         handle the Thumb-2 JUMP19 relocation.
1560 2007-05-15  Alan Modra  <amodra@bigpond.net.au>
1562         PR 4479
1563         * elf.c (elf_fake_sections): Don't allow backend to change
1564         SHT_NOBITS if called for strip/objcopy --only-keep-debug.
1565         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
1566         fix from here.
1568 2007-05-14  Alan Modra  <amodra@bigpond.net.au>
1570         * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1571         invalid shstrndx.
1572         (bfd_elf_get_str_section): Likewise.
1574 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
1576         PR 4497
1577         * elf-eh-frame.c (struct cie): Add "local_personality".  Make
1578         "personality" a union.
1579         (cie_eq): Compare local_personality too.  Adjust personality
1580         comparison.
1581         (_bfd_elf_discard_section_eh_frame): Check binding on personality
1582         reloc sym to allow for bad symtab.  Use stashed local syms rather
1583         than reading personality local sym.  Handle discarded sections.
1585 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
1587         * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
1589 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
1591         * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
1592         (enum ppc_elf_plt_type): Move from..
1593         * elf32-ppc.c: ..here.
1594         (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
1595         (struct ppc_elf_link_hash_table): Reorder.  Add old_bfd.  Delete
1596         can_use_new_plt.  Make is_vxworks a bitfield.
1597         (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
1598         (ppc_elf_check_relocs): Update setting of reloc flags.  Set old_bfd.
1599         (ppc_elf_select_plt_layout): Modify parameters.  Use bfd reloc
1600         flags to better detect object files needing old bss-style plt.
1601         Allow secure plt to be used without rel16 relocs being detected.
1602         Warn if secure plt request cannot be allowed.
1604 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
1606         * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
1607         * elf-bfd.h (struct elf_backend_data): Change return type of
1608         elf_backend_relocate_section to int.
1609         * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
1610         R_SPU_PPU64.
1611         (spu_elf_bfd_to_reloc_type): Convert new relocs.
1612         (spu_elf_count_relocs): New function.
1613         (elf_backend_count_relocs): Define.
1614         (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
1615         R_SPU_PPU64 relocs.
1616         * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
1617         returns 2.
1618         * bfd-in2.h: Regenerate.
1619         * libbfd.h: Regenerate.
1621 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
1623         * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
1624         for R_ARM_ABS12 relocs.
1625         (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
1626         non-shared VxWorks PLT entries.
1628 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
1630         PR 4454
1631         * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
1632         (_bfd_elf_discard_section_eh_frame): Handle local syms on
1633         personality relocation.
1635 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
1637         * elf.c (assign_file_positions_for_load_sections): Use p_memsz
1638         rather than p_filesz to calculate the LMA of the end of a segment.
1640 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1642         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
1643         processing if symbol is defined in the executable.
1645 2007-05-10  Alexandre Oliva  <aoliva@redhat.com>
1647         * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
1648         (frvfdpic_elf_discard_info): New.
1649         (elf_backend_discard_info): Define for FDPIC.
1651 2007-05-09  Mark Shinwell  <shinwell@codesourcery.com>
1653         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
1654         attempt to scan if the bfd doesn't correspond to an ELF image.
1655         (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1657 2007-05-08  Alexandre Oliva  <aoliva@redhat.com>
1659         * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
1660         for which _bfd_elf_section_offset returns -1.
1662 2007-05-08  Alan Modra  <amodra@bigpond.net.au>
1664         * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
1665         (mark_functions_via_relocs): Likewise.
1667 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
1669         * elflink.c (bfd_elf_final_link): Correct reloc handling for
1670         elf_backend_count_relocs.
1671         (bfd_elf_discard_info): Print an error if we can't read syms.
1673 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
1675         * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
1676         invalid reloc code.
1677         (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
1678         (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
1679         define.
1681 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
1683         * elf.c (assign_file_positions_for_load_sections): Don't check
1684         core segment.
1686 2007-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1688         * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
1689         and .rel.dyn aren't present.
1691 2007-05-04  Nick Clifton  <nickc@redhat.com>
1693         * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
1694         sections are present examine the indirect sections in an attempt
1695         to compute the correct relocation size.  If there is any
1696         ambiguity, produce an error and refuse to sort.
1698 2007-05-03  Sandra Loosemore  <sandra@codesourcery.com>
1700         * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
1702 2007-05-03  Vincent Riviere  <vincent.riviere@freesbee.fr>
1703             Nick Clifton  <nickc@redhat.com>
1705         PR gas/3041
1706         * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
1707         in the same way as relocs against external symbols.
1709 2007-05-02  Alan Modra  <amodra@bigpond.net.au>
1711         * elf.c (assign_file_positions_for_load_sections): Set sh_offset
1712         here.  Set sh_type to SHT_NOBITS if we won't be allocating
1713         file space.  Don't bump p_memsz for non-alloc sections.  Adjust
1714         section-in-segment check.
1715         (assign_file_positions_for_non_load_sections): Don't set sh_offset
1716         here for sections that have already been handled above.
1718 2007-04-30  Alan Modra  <amodra@bigpond.net.au>
1720         * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
1721         and emit_stack_syms bitfields.
1722         (get_sym_h): Read all symbols if stack analysis will be done.
1723         (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
1724         params, and stash in hash table.
1725         (is_hint): Split off from..
1726         (is_branch): ..here.  Adjust callers.
1727         (spu_elf_size_stubs): Add stack_analysis param.  Arrange to read
1728         and keep all syms.
1729         (write_one_stub): Fix mem leak.
1730         (find_function_stack_adjust): New function.
1731         (sort_syms_syms, sort_syms_psecs): New vars.
1732         (sort_syms): New function.
1733         (struct call_info, struct function_info): New.
1734         (struct spu_elf_stack_info): New.
1735         (alloc_stack_info, maybe_insert_function, func_name): New functions.
1736         (is_nop, insns_at_end, check_function_ranges): Likewise.
1737         (find_function, insert_callee, mark_functions_via_relocs): Likewise.
1738         (pasted_function, interesting_section, discover_functions): Likewise.
1739         (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
1740         (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
1741         (bfd_elf32_bfd_final_link): Define.
1742         * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
1743         (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
1745 2007-04-28  Sergey Rogozhkin  <rogozhkin@niisi.msk.ru>
1747         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
1748         memory which we might not own.
1750 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
1752         * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
1753         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
1754         (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
1756 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
1758         * elf32-xtensa.c (xtensa_read_table_entries): Step through table
1759         contents and relocs in parallel.
1761 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
1763         * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
1765 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
1767         * cpu-rs6000.c: Write Mimi's name in ASCII.
1768         * coff-rs6000.c: Likewise.
1769         * rs6000-core.c: Likewise.
1771 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
1773         * sysdep.h: Include config.h first.
1774         Many files: Include sysdep.h before bfd.h.
1775         * Makefile.am: Run "make dep-am".
1776         * Makefile.in: Regenerate.
1778 2007-04-25  Alan Modra  <amodra@bigpond.net.au>
1780         * sysdep.h: Revert last change.
1782 2007-04-24  Nick Clifton  <nickc@redhat.com>
1784         * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
1785         * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
1787 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
1789         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
1790         eh_frame_hdr table won't be created.
1792 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
1794         * acinclude.m4: Include config/stdint.m4.
1795         * configure.in: Invoke GCC_HEADER_STDINT.
1796         * sysdep.h: Don't include ansidecl.h here.
1797         * configure: Regenerate.
1798         * config.in: Regenerate.
1799         * Makefile.in: Regenerate.
1801 2007-04-23  Nathan Sidwell  <nathan@codesourcery.com>
1803         * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
1804         bfd_mach_mcf_isa_c_emac): New.
1805         * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
1806         elf_isac_plt_entry, elf_isac_plt_info): New.
1807         (elf32_m68k_object_p): Add ISA_C.
1808         (elf32_m68k_print_private_bfd_data): Print ISA_C.
1809         (elf32_m68k_get_plt_info): Detect ISA_C.
1810         * cpu-m68k.c (arch_info): Add ISAC.
1811         (m68k_arch_features): Likewise,
1812         (bfd_m68k_compatible): ISAs B & C are not compatible.
1814 2007-04-21  Nick Clifton  <nickc@redhat.com>
1816         * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
1817         (ecoff_link_add_archive_symbols): Likewise.
1818         * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
1819         relent.howto.
1820         * ieee.c (parse_int): Initialise x.
1821         (must_parse_int): Initialise result.
1822         (ieee_slurp_external_symbols): Initialise value.
1824 2007-04-21  Alan Modra  <amodra@bigpond.net.au>
1826         * config.bfd (spu-*-elf): Delete targ_selvecs.
1828 2007-04-19  Nick Clifton  <nickc@redhat.com>
1830         * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
1832 2007-04-19  Alan Modra  <amodra@bigpond.net.au>
1834         * bfd.c (bfd_demangle): New function.
1835         * Makefile.am: Run "make dep-am".
1836         * Makefile.in: Regenerate.
1837         * bfd-in2.h: Regenerate.
1839 2007-04-18  Matthias Klose  <doko@ubuntu.com>
1841         * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
1842         (bfdver.h): Use the date in non-release builds for the soversion.
1843         * Makefile.in: Regenerate.
1845 2007-04-17  Paul Brook  <paul@codesourcery.com>
1847         * elf.c (_bfd_elf_is_function_type): New function.
1848         * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
1849         (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
1850         is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
1851         * elf-bfd.h (elf_backend_data): Add is_function_type.
1852         (_bfd_elf_is_function_type): Add prototype.
1853         * elfxx-target.h (elf_backend_is_function_type): Add default
1854         definition.
1855         (elfNN_bed): Add elf_backend_is_function_type.
1856         * elf32-arm.c (elf32_arm_is_function_type): New function.
1857         (elf_backend_is_function_type): Define.
1859 2007-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
1861         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
1862         DT_MIPS_RLD_MAP before DT_DEBUG again.
1864 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
1866         * Makefile.am: Add ACLOCAL_AMFLAGS.
1867         * configure.in: Change macro call order.
1868         * Makefile.in: Regnerate.
1869         * doc/Makefile.in: Regenerate.
1870         * configure: Regenerate.
1872 2007-04-14  Jakub Jelinek  <jakub@redhat.com>
1874         * elflink.c (bfd_elf_final_link): Don't free symbuf for
1875         non-elf input bfds.
1876         (bfd_elf_size_dynamic_sections): Don't access elf_section_data
1877         for non-elf input bfds.
1879 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
1881         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
1882         DT_MIPS_RTLD_MAP for PIEs.
1884 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
1886         * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
1887         when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
1888         in a read-only section.
1889         (_bfd_mips_elf_check_relocs): Likewise.
1891 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
1893         * elf32-xtensa.c (xtensa_is_insntable_section): New.
1894         (xtensa_is_proptable_section): New.
1895         (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
1896         tables with 12-byte entries, as well as tables with 8-byte entries.
1897         Sort the relocations before examining them.
1898         (relax_property_section): Use xtensa_is_proptable_section and
1899         xtensa_is_littable_section.  Rewrite code for combining table entries
1900         to be more robust in case of unexpected relocations.  Do not set offset
1901         of unused relocations to less than zero.
1902         (xtensa_is_property_section): Use other functions instead of
1903         duplicating section name comparisons.
1904         (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
1905         (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
1907 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
1909         * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
1910         from Xtensa property sections.
1912 2007-04-12  Alan Modra  <amodra@bigpond.net.au>
1914         * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
1915         is non-NULL before dereferencing.
1917 2007-04-11  Nathan Sidwell  <nathan@codesourcery.com>
1919         * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
1920         relocs too.
1922 2007-04-10  Richard Henderson  <rth@redhat.com>
1924         * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
1925         (elf64_alpha_size_got_sections): Remove unused something_changed local.
1926         (elf64_alpha_size_plt_section): Return void.
1927         (elf64_alpha_size_rela_got_section): Likewise.
1928         (elf64_alpha_relax_section): Only regenerate got+plt if the
1929         relax_trip counter has changed.
1931 2007-04-09  Daniel Jacobowitz  <dan@codesourcery.com>
1933         * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
1934         * doc/Makefile.am (DOCFILES): Add bfdver.texi.
1935         (bfdver.texi): New rule.
1936         * Makefile.in, doc/Makefile.in: Regenerated.
1938 2007-04-03  Matt Thomas  <matt@netbsd.org>
1940         * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
1941         in a shared object if it is not in a CODE section or if it is against
1942         a section symbol.  This allows DWARF2 to use pcrel format.
1944 2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
1946         PR ld/4304
1947         * elflink.c (bfd_elf_final_link): Call einfo callback in
1948         bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
1949         warning.
1951 2007-04-05  Alan Modra  <amodra@bigpond.net.au>
1953         * elf32-spu.c (spu_elf_output_symbol_hook): New function.
1954         (elf_backend_link_output_symbol_hook): Define.
1956 2007-04-02  Nick Clifton  <nickc@redhat.com>
1958         PR binutils/4292
1959         * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
1960         targets as 64-bit values, even if running on a 64-bit host.
1961         * coffgen.c (coff_print_symbol): Likewise.
1963 2007-03-29  Nick Clifton  <nickc@redhat.com>
1965         PR binutils/4110
1966         * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
1967         (setup_group): Use it.  Report corrupt group section headers.
1968         (bfd_section_from_shdr): Use new macro.  Replace constant 4 with
1969         GRP_ENTRY_SIZE.  Cope with NULLs in the group section table.
1970         (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
1972 2007-03-29  Alan Modra  <amodra@bigpond.net.au>
1974         PR ld/4267
1975         * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
1976         for rel->r_info values.
1977         (bfd_elf_perform_complex_relocation): Likewise.
1978         * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
1979         unused entries.  Don't clear plt.plist in loop.
1981 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
1983         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
1984         * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
1985         Merge into...
1986         (sparc_elf_append_rela): ...this new function.
1987         (SPARC_ELF_APPEND_RELA): Delete.
1988         (_bfd_sparc_elf_link_hash_table_create): Don't initialize
1989         the deleted append_rela field.
1990         (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
1991         instead of SPARC_ELF_APPEND_RELA.
1992         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.  Use the
1993         elf_size_info structure to find the size of a RELA entry and
1994         the associated swap-out function.
1995         (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
1996         (sparc_finish_dyn): ...this new function.
1997         (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
1999 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
2000             Phil Edwards  <phil@codesourcery.com>
2002         * doc/bfd.texinfo: Put the contents after the title page rather
2003         than at the end of the document.
2005 2007-03-27  Andreas Schwab  <schwab@suse.de>
2007         * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
2009 2007-03-26  H.J. Lu  <hongjiu.lu@intel.com>
2011         * configure: Regenerated.
2013 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
2015         * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
2016         (allocate_spuear_stubs): New function.
2017         (spu_elf_size_stubs): Call allocate_spuear_stubs.
2019 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
2021         * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
2022         * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
2023         (MY (bfd_reloc_name_lookup)): New function.
2024         * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
2025         * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
2026         (MY_bfd_reloc_name_lookup): Define.
2027         * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
2028         (MY_bfd_reloc_name_lookup): Define.
2029         * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
2030         (NAME (aout, reloc_name_lookup)): New function.
2031         * bout.c (b_out_bfd_reloc_name_lookup): New function.
2032         * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
2033         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2034         * coff-arm.c (coff_arm_reloc_name_lookup): New function.
2035         (coff_bfd_reloc_name_lookup): Define.
2036         * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
2037         (coff_i386_reloc_name_lookup): New function.
2038         * coff-i860.c (coff_i860_reloc_name_lookup): New function.
2039         (coff_bfd_reloc_name_lookup): Define.
2040         * coff-i960.c (coff_i960_reloc_name_lookup): New function.
2041         (coff_bfd_reloc_name_lookup): Define.
2042         * coff-m68k.c (m68k_reloc_name_lookup): New function.
2043         (coff_bfd_reloc_name_lookup): Define.
2044         * coff-maxq.c (maxq_reloc_name_lookup): New function.
2045         (coff_bfd_reloc_name_lookup): Define.
2046         * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
2047         (coff_bfd_reloc_name_lookup): Define.
2048         * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
2049         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2050         * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
2051         (coff_bfd_reloc_name_lookup): Define.
2052         * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2053         (_bfd_xcoff_reloc_name_lookup): New function.
2054         (rs6000coff_vec, pmac_xcoff_vec): Init new field.
2055         * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
2056         (sh_coff_reloc_name_lookup): New function.
2057         * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
2058         (coff_bfd_reloc_name_lookup): Define.
2059         * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
2060         (tic30_coff_reloc_name_lookup): New function.
2061         * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
2062         (tic4x_coff_reloc_name_lookup): New function.
2063         * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
2064         (tic54x_coff_reloc_name_lookup): New function.
2065         * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
2066         (coff_amd64_reloc_name_lookup): New function.
2067         * coff-z80.c (coff_z80_reloc_name_lookup): New function.
2068         (coff_bfd_reloc_name_lookup): Define.
2069         * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
2070         (coff_bfd_reloc_name_lookup): Define.
2071         * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2072         (xcoff64_reloc_name_lookup): New function.
2073         (rs6000coff64_vec, aix5coff64_vec): Init new field.
2074         * coffcode.h (coff_bfd_reloc_name_lookup): Define.
2075         * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
2076         * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2077         * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2078         * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2079         * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
2080         (bfd_elf32_bfd_reloc_name_lookup): Define.
2081         * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2082         * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
2083         (bfd_elf32_bfd_reloc_name_lookup): Define.
2084         * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
2085         (bfd_elf32_bfd_reloc_name_lookup): Define.
2086         * elf32-cris.c (cris_reloc_name_lookup): New function.
2087         (bfd_elf32_bfd_reloc_name_lookup): Define.
2088         * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
2089         (bfd_elf32_bfd_reloc_name_lookup): Define.
2090         * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2091         * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2092         * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
2093         (bfd_elf32_bfd_reloc_name_lookup): Define.
2094         * elf32-fr30.c (fr30_reloc_name_lookup): New function.
2095         (bfd_elf32_bfd_reloc_name_lookup): Define.
2096         * elf32-frv.c (frv_reloc_name_lookup): New function.
2097         (bfd_elf32_bfd_reloc_name_lookup): Define.
2098         * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2099         * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
2100         (bfd_elf32_bfd_reloc_name_lookup): Define.
2101         * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2102         * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
2103         (bfd_elf32_bfd_reloc_name_lookup): Define.
2104         * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
2105         (bfd_elf32_bfd_reloc_name_lookup): Define.
2106         * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
2107         (bfd_elf32_bfd_reloc_name_lookup): Define.
2108         * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
2109         (bfd_elf32_bfd_reloc_name_lookup): Define.
2110         * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
2111         (bfd_elf32_bfd_reloc_name_lookup): Define.
2112         * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
2113         (bfd_elf32_bfd_reloc_name_lookup): Define.
2114         * elf32-m32c.c (m32c_reloc_name_lookup): New function.
2115         (bfd_elf32_bfd_reloc_name_lookup): Define.
2116         * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2117         * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2118         * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2119         * elf32-m68k.c (reloc_name_lookup): New function.
2120         (bfd_elf32_bfd_reloc_name_lookup): Define.
2121         * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2122         * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
2123         (bfd_elf32_bfd_reloc_name_lookup): Define.
2124         * elf32-mep.c (mep_reloc_name_lookup): New function.
2125         (bfd_elf32_bfd_reloc_name_lookup): Define.
2126         * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2127         (mips_vxworks_bfd_reloc_name_lookup): Likewise.
2128         (bfd_elf32_bfd_reloc_name_lookup): Define.
2129         * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2130         * elf32-mt.c (mt_reloc_name_lookup): New function.
2131         (bfd_elf32_bfd_reloc_name_lookup): Define.
2132         * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
2133         (bfd_elf32_bfd_reloc_name_lookup): Define.
2134         * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2135         * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
2136         (bfd_elf32_bfd_reloc_name_lookup): Define.
2137         * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
2138         (bfd_elf32_bfd_reloc_name_lookup): Define.
2139         * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
2140         (bfd_elf32_bfd_reloc_name_lookup): Define.
2141         * elf32-score.c (elf32_score_reloc_name_lookup): New function.
2142         (bfd_elf32_bfd_reloc_name_lookup): Define.
2143         * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
2144         (bfd_elf32_bfd_reloc_name_lookup): Define.
2145         * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2146         * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
2147         (bfd_elf32_bfd_reloc_name_lookup): Define.
2148         * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
2149         (bfd_elf32_bfd_reloc_name_lookup): Define.
2150         * elf32-vax.c (reloc_name_lookup): New function.
2151         (bfd_elf32_bfd_reloc_name_lookup): Define.
2152         * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
2153         (bfd_elf32_bfd_reloc_name_lookup): Define.
2154         * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
2155         (bfd_elf32_bfd_reloc_name_lookup): Define.
2156         * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
2157         (bfd_elf32_bfd_reloc_name_lookup): Define.
2158         * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
2159         (bfd_elf64_bfd_reloc_name_lookup): Define.
2160         * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2161         * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2162         * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2163         * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2164         * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
2165         (bfd_elf64_bfd_reloc_name_lookup): Define.
2166         * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
2167         (bfd_elf64_bfd_reloc_name_lookup): Define.
2168         * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
2169         (bfd_elf64_bfd_reloc_name_lookup): Define.
2170         * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2171         * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
2172         (bfd_elf64_bfd_reloc_name_lookup): Define.
2173         * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2174         * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
2175         (bfd_elfNN_bfd_reloc_name_lookup): Define.
2176         * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
2177         * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
2178         * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
2179         * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
2180         * ieee.c (ieee_bfd_reloc_name_lookup): Define.
2181         * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
2182         * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
2183         * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
2184         (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
2185         (MY(reloc_name_lookup)): New function.
2186         * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
2187         * oasys.c (oasys_bfd_reloc_name_lookup): Define.
2188         * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
2189         * pe-mips.c (coff_mips_reloc_name_lookup): New function.
2190         (coff_bfd_reloc_name_lookup): Define.
2191         * reloc.c (bfd_reloc_name_lookup): New function.
2192         * riscix.c (riscix_reloc_name_lookup): New function.
2193         (MY_bfd_reloc_name_lookup): Define.
2194         * som.c (som_bfd_reloc_name_lookup): New function.
2195         * targets.c (struct bfd_target): Add reloc_name_lookup.
2196         (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
2197         * versados.c (versados_bfd_reloc_name_lookup): Define.
2198         * vms.c (vms_bfd_reloc_name_lookup): New function.
2199         * bfd-in2.h: Regenerate.
2200         * libbfd.h: Regenerate.
2202 2007-03-26  Thiemo Seufer  <ths@mips.com>
2204         PR ld/4208
2205         * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
2206         matching relocation is found.
2207         (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
2209 2007-03-23  H.J. Lu  <hongjiu.lu@intel.com>
2211         * configure: Regenerated.
2213 2007-03-23  Joseph Myers  <joseph@codesourcery.com>
2215         * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
2216         * configure: Regenerate.
2218 2007-03-23  Alan Modra  <amodra@bigpond.net.au>
2220         * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
2221         Remove input_sec param.  Adjust all calls.
2222         (write_one_stub): Adjust stub symbol.
2223         (needs_ovl_stub): New function, extracted from..
2224         (spu_elf_size_stubs): ..here.
2225         (spu_elf_relocate_section): Use needs_ovl_stub.
2227 2007-03-22  Joseph Myers  <joseph@codesourcery.com>
2229         * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
2230         if nonempty.
2231         * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
2232         * Makefile.in, configure, doc/Makefile.in: Regenerate.
2234 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2236         PR ld/4210
2237         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
2238         address and virtual size of the last section for the image
2239         size.
2241 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2243         PR ld/4007
2244         * elf.c (assign_file_positions_for_load_sections): Check if
2245         all sections are in the segment.
2247 2007-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2249         PR ld/4208
2250         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
2251         matching LO16 relocation for HI16 relocation.
2253 2007-03-20  Paul Brook  <paul@codesourcery.com>
2255         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2256         * bfd-in2.h: Regenerate.
2257         * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
2258         (record_arm_to_thumb_glue): Use globals->pic_veneer.
2259         (elf32_arm_create_thumb_stub): Ditto.
2260         (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
2262 2007-03-18  Mark Shinwell  <shinwell@codesourcery.com>
2264         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
2265         argument and extra last argument.
2266         * bfd-in2.h: Regenerate.
2267         * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
2268         member.
2269         (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
2270         extra last argument.  Set no_enum_size_warning appropriately.
2271         (elf32_arm_merge_eabi_attributes): Improve enum sizes
2272         diagnostic, suppressing it when no_enum_size_warning dictates.
2274 2007-03-20  Nick Clifton  <nickc@redhat.com>
2276         PR binutils/3535
2277         * elf.c (copy_private_bfd_data): Widen the scope of Solaris
2278         specific conditions that need the program headers to be
2279         rewritten.
2281 2007-03-19  H.J. Lu  <hongjiu.lu@intel.com>
2283         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
2284         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2285         SizeOfInitializedData, SizeOfUninitializedData,
2286         AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
2287         extra PE a.out header.
2288         (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
2289         (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
2290         defined.
2291         (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
2292         defined.
2293         (_bfd_XX_print_private_bfd_data_common): Also print Magic,
2294         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2295         SizeOfInitializedData, SizeOfUninitializedData,
2296         AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
2297         extra PE a.out header.
2299 2007-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2301         * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
2302         only if BFD64 is defined.
2304 2007-03-17  Alan Modra  <amodra@bigpond.net.au>
2306         * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
2307         on setjmp calls.
2309 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
2311         * doc/Makefile.in: Regenerated.
2313 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
2315         * Makefile.am (bfdver.h): Substitute report_bugs_to.  Also
2316         create doc/bfdver.texi.
2317         * Makefile.in: Regenerated.
2319         * configure.in (--with-bugurl): New option.
2320         * configure: Regenerated.
2322         * version.h (REPORT_BUGS_TO): New.
2324 2007-03-13  H.J. Lu  <hongjiu.lu@intel.com>
2326         PR binutils/3826
2327         * elf-bfd.h (elf_backend_data): Add elf_osabi.
2328         (_bfd_elf_set_osabi): New.
2330         * elf.c (_bfd_elf_set_osabi): New.
2332         * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
2333         (elf_backend_post_process_headers): Defined with
2334         _bfd_elf_set_osabi.
2335         (ELF_OSABI): Properly defined for each target.
2337         * elf32-i370.c (i370_elf_post_process_headers): Removed.
2338         (ELF_OSABI): Defined.
2339         (elf_backend_post_process_headers): Defined with
2340         _bfd_elf_set_osabi.
2342         * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2343         freebsd.
2344         (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
2346         * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
2347         (ELF_OSABI): Defined.
2348         (elf_backend_post_process_headers): Defined with
2349         _bfd_elf_set_osabi.
2351         * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2352         freebsd.
2353         (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
2354         elf_osabi.
2356         * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
2357         with elf_osabi.
2358         (ELF_OSABI): Properly defined for each target.
2359         (elf_backend_post_process_headers): Defined with
2360         _bfd_elf_set_osabi for Linux.
2362         * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
2363         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2364         (elf_backend_post_process_headers): Defined with
2365         _bfd_elf_set_osabi.
2367         * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
2368         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2369         (elf_backend_post_process_headers): Defined with
2370         _bfd_elf_set_osabi.
2372         * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
2373         with any ELF target of the compatible machine for which we do not
2374         have a specific backend.
2376         * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
2377         with elf_osabi.
2379         * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
2380         (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
2382 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
2384         * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
2385         V850_OTHER_* bits.
2387 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
2389         * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
2390         (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
2391         Run "make dep-am".
2392         * Makefile.in: Regenerate.
2393         * po/SRC-POTFILES.in: Regenerate.
2395 2007-03-07  H.J. Lu  <hongjiu.lu@intel.com>
2397         * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
2398         (x86_64-*-kfreebsd*-gnu): Likewise.
2399         (x86_64-*-netbsd*): Likewise.
2400         (x86_64-*-openbsd*): Likewise.
2401         (x86_64-*-linux-*): Likewise.
2403         * configure.in: Support bfd_efi_app_x86_64_vec.
2404         * configure: Regenerated.
2406         * efi-app-x86_64.c: New file.
2408         * targets.c (bfd_efi_app_x86_64_vec): New.
2409         (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
2411 2007-03-07  Kai Tietz   <kai.tietz@onevision.com>
2413         * reloc.c (bfd_generic_get_relocated_section_contents): Remove
2414         const for type reloc_howto_type.
2416 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
2418         PR 3958
2419         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
2420         (elf_discarded_section): Move..
2421         * bfd-in.h: ..to here.
2422         * bfd-in2.h: Regenerate.
2423         * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
2424         from discarded sections before relocate_section has done its job.
2425         * reloc.c (bfd_generic_get_relocated_section_contents): Handle
2426         relocs against symbols from discarded sections.
2427         * elf-hppa.h (elf_hppa_howto_table): Set size.  Set dst_mask on
2428         SECREL32.
2429         (elf_hppa_relocate_section): Handle relocatable link after setting
2430         sec, sym, h etc. for final link.  Squash error messages for
2431         relocatable link.  Clear section contents for relocs against
2432         symbols in discarded sections, and zero reloc.  Remove existing
2433         zero r_symndx code.
2434         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2435         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2436         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
2437         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2438         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2439         (bfin_relocate_section): Likewise.
2440         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2441         * elf32-cris.c (cris_elf_relocate_section): Likewise.
2442         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2443         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2444         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2445         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2446         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2447         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2448         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2449         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2450         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2451         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2452         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2453         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
2454         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2455         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2456         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2457         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2458         * elf32-mep.c (mep_elf_relocate_section): Likewise.
2459         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2460         * elf32-mt.c (mt_elf_relocate_section): Likewise.
2461         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2462         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2463         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2464         * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
2465         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2466         * elf32-spu.c (spu_elf_relocate_section): Likewise.
2467         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2468         * elf32-vax.c (elf_vax_relocate_section): Likewise.
2469         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
2470         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2471         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2472         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
2473         (elf64_alpha_relocate_section): Likewise.
2474         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2475         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2476         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2477         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2478         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2479         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2480         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2481         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2483         * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
2484         symbols for relocatable link.  Don't use always-zero st_value.
2485         (elf_backend_rela_normal): Don't define.
2486         * elf32-bfin.c (bfinfdpic_relocate_section): Use
2487         RELOC_FOR_GLOBAL_SYMBOL.
2488         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2489         * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
2490         section symbol adjustments with same for relocatable link.
2491         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2492         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
2493         (elf32_m68hc11_check_relocs): ..to here.
2494         * elf32-score.c (score_elf_final_link_relocate): Remove zero
2495         r_symndx code.
2496         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2498 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
2500         PR 4144
2501         * elf.c (assign_file_positions_for_load_sections): Don't
2502         adjust p_memsz for !SEC_LOAD section vma modulo page size.
2503         Instead, use the same lma based adjustment for SEC_LOAD
2504         sections.
2506 2007-03-01  Bob Wilson  <bob.wilson@acm.org>
2508         * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
2509         (find_relaxable_sections): Do not increment src_count for unknown
2510         opcodes.  Decode only once instead of calling is_l32r_relocation.
2511         (compute_text_actions): Remove unused no_insn_move flag.  Assert that
2512         src_next matches src_count in relax_info.
2514 2007-03-01  Joseph Myers  <joseph@codesourcery.com>
2516         * Makefile.am (bfdver.h): Use "." not " " between version number
2517         and date.
2518         * Makefile.in: Regenerate.
2519         * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
2520         * configure: Regenerate.
2522 2007-02-28  Nathan Sidwell  <nathan@codesourcery.com>
2524         * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
2526 2007-02-27  Alan Modra  <amodra@bigpond.net.au>
2528         * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
2529         * elf32-spu.c (ovl_mgr_pread): Add const to casts.
2531 2007-02-23  Carlos O'Donell  <carlos@codesourcery.com>
2533         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
2534         DWARF even with 64-bit addresses.
2535         (_bfd_dwarf2_find_nearest_line): Likewise.
2537 2007-02-23  Nick Clifton  <nickc@redhat.com>
2539         PR binutils/3535
2540         * elf.c (copy_private_bfd_data): Always rewrite the program
2541         headers when a Solaris interpreter segment is involved.
2543 2007-02-22  Paul Brook  <paul@codesourcery.com>
2545         * elflink.c (gc_mark_hook_fn): Remove.
2546         (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
2547         (bfd_elf_gc_sections): Ditto.  Call gc_mark_extra_sections.
2548         * elf-bfd.h (elf_gc_mark_hook_fn): Define.
2549         (elf_backend_data): Add gc_mark_extra_sections.
2550         * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
2551         definition.
2552         (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
2553         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
2554         (elf_backend_gc_mark_extra_sections): Define.
2556 2007-02-21  Nick Clifton  <nickc@redhat.com>
2558         * elf.c (_bfd_elf_map_sections_to_segments): If the
2559         override_segment_assignment callback is defined then call it.
2561 2007-02-21  Alan Modra  <amodra@bigpond.net.au>
2563         * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
2565 2007-02-19  Thiemo Seufer  <ths@mips.com>
2567         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
2568         translation marker from untranslatable strings.
2570 2007-02-19  Alan Modra  <amodra@bigpond.net.au>
2572         * elf-bfd.h (struct elf_backend_data): Add default_execstack.
2573         * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
2574         * elfxx-target.h (elf_backend_default_execstack): Define to 1.
2575         (elfNN_bed): Init new field.
2576         * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
2578 2007-02-17  Mark Mitchell  <mark@codesourcery.com>
2579             Nathan Sidwell  <nathan@codesourcery.com>
2580             Vladimir Prus  <vladimir@codesourcery.com
2581             Joseph Myers  <joseph@codesourcery.com>
2583         * configure.in (--with-pkgversion): New option.
2584         * configure: Regenerate.
2585         * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
2586         * Makefile.in: Regenerate.
2587         * version.h (BFD_VERSION_STRING): Define using
2588         @bfd_version_package@.
2590 2007-02-16  Carlos O'Donell  <carlos@codesourcery.com>
2592         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
2593         Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
2594         and EF_MIPS_UCODE.
2596 2007-02-15  Alan Modra  <amodra@bigpond.net.au>
2598         * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
2599         declare.
2600         (_bfd_norelocs_canonicalize_reloc): Likewise.
2601         * libbfd.h: Regenerate.
2602         * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
2603         (_bfd_norelocs_canonicalize_reloc): Likewise.
2604         * binary.c (binary_bfd_reloc_type_lookup): Don't define.
2605         (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
2606         (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
2607         * ihex.c: Similarly.
2608         * mach-o-target.c: Similarly.
2609         * mach-o.c: Similarly.
2610         * mmo.c: Similarly.
2611         * pef.c: Similarly.
2612         * ppcboot.c: Similarly.
2613         * srec.c: Similarly.
2614         * xsym.c: Similarly.
2616 2007-02-14  H.J. Lu  <hongjiu.lu@intel.com>
2618         PR ld/3953
2619         * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
2620         when adding default symbol.
2622 2007-02-13  Alan Modra  <amodra@bigpond.net.au>
2624         * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
2625         for branch lookup table.
2627 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
2629         * elf64-ppc.c (create_linkage_sections): Don't create
2630         .rela.rodata.brlt for --emit-relocs.
2631         (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
2632         (ppc_size_one_stub): Count them.  Simplify test of stub type
2633         when counting stub relocs.  Set SEC_RELOC too.
2634         (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
2635         (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
2637 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
2639         * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
2640         with a zero symbol index.
2642 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
2644         * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
2646 2007-02-05  Dave Brolley  <brolley@redhat.com>
2647             Stan Cox  <scox@redhat.com>
2649         PR ld/3972
2650         * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
2652 2007-02-05  Dave Brolley  <brolley@redhat.com>
2653             Richard Sandiford  <rsandifo@redhat.com>
2654             Stan Cox  <scox@redhat.com>
2655             Nick Clifton  <nickc@redhat.com>
2656             DJ Delorie  <dj@redhat.com>
2657             Frank Ch. Eigler  <fche@redhat.com>
2658             Ben Elliston  <bje@redhat.com>
2659             Richard Henderson  <rth@redhat.com>
2661         * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
2662         (ALL_MACHINES_CFILES): Add CPU_MEP.c.
2663         (BFD32_BACKENDS): Add elf32-mep.lo.
2664         (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
2665         (cpu-mep.lo,elf32-mep.lo): New targets.
2666         * archures.c (bfd_arch_mep): New enumerator.
2667         (bfd_mach_mep, bfd_mach_mep_h1): New macros.
2668         (bfd_mep_arch): New external variable.
2669         (bfd_archures_list): Add bfd_mep_arch.
2670         * config.bfd: Support mep-*-elf.
2671         * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
2672         * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
2673         * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
2674         declarations.
2675         (_bfd_target_vector): Add bfd_elf32_mep_vec and
2676         bfd_elf32_mep_little_vec.
2677         * mep-relocs.pl: New file.
2678         * cpu-mep.c: New file.
2679         * elf32-mep.c: New file.
2680         * bfd-in2.h: Regenerate.
2681         * po/POTFILES.in: Regenerate.
2682         * libbfd.h: Regenerate.
2683         * Makefile.in: Regenerate.
2684         * configure: Regenerate.
2686 2007-02-05  Dave Brolley  <brolley@redhat.com>
2688         * elflink.c (evaluate_complex_relocation_symbols): Check for
2689         STT_SRELC for global symbols.
2690         (perform_complex_relocations): Renamed to
2691         perform_complex_relocation and now examines only one relocation.
2692         (elf_link_input_bfd): Don't call perform_complex_relocations.
2693         * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
2694         * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
2695         (OD,OS,OU): #undefs corrected to N, S and U repectively.
2696         (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
2697         (complex_reloc_installation_howto): Removed.
2698         (mep_info_to_howto_rela): Remove special case for r_type==0xff.
2699         (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
2701 2007-02-05  Dave Brolley  <brolley@redhat.com>
2702             Richard Sandiford  <rsandifo@redhat.com>
2703             DJ Delorie  <dj@redhat.com>
2704             Graydon Hoare  <graydon@redhat.com>
2705             Nick Clifton  <nickc@cambridge.redhat.com>
2706             Jeff Holcomb  <jeffh@redhat.com>
2707             Frank Ch. Eigler  <fche@redhat.com>
2709         * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
2710         * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
2711         * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
2712         * elflink.c (set_symbolValue): New static function.
2713         (resolve_symbol): Likewise.
2714         (resolve_section): Likewise.
2715         (undefined_reference): Likewise.
2716         (eval_symbol): Likewise.
2717         (evaluate_complex_relocation_symbols): Likewise.
2718         (put_value): Likewise.
2719         (get_value): Likewise.
2720         (decode_complex_addend):
2721         (bfd_elf_perform_complex_relocation): New function.
2722         (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
2723         * reloc.c (BFD_RELOC_RELC): New relocation number.
2724         * syms.c (BSF_RELC,BSF_SRELC): New macros.
2726 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
2728         * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
2729         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
2730         (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
2731         (elf_xtensa_allocate_got_size): Replace these with...
2732         (elf_xtensa_allocate_dynrelocs): ...this new function.
2733         (elf_xtensa_size_dynamic_sections): Use it.
2735 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
2737         * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
2738         <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
2739         Set src_mask to zero.
2740         <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise.  Also fix dst_mask.
2741         <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
2743 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
2745         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
2746         (elf_xtensa_dynamic_symbol_p): ...this.
2748 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
2750         * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
2751         (struct elf_xtensa_link_hash_table): New.
2752         (elf_xtensa_hash_table): New.
2753         (elf_xtensa_link_hash_table_create): New.
2754         (elf_xtensa_check_relocs): Update plt_reloc_count references.
2755         Update arguments to add_extra_plt_sections.
2756         (elf_xtensa_create_dynamic_sections): Record new sections in the hash
2757         table.  Update for plt_reloc_count and add_extra_plt_sections.
2758         (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
2759         argument with link info.  Update calls to elf_xtensa_get_plt_section
2760         and elf_xtensa_get_gotplt_section.
2761         (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
2762         (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
2763         (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
2764         (relax_property_section): Get sections from the hash table and update
2765         function calls.
2766         (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
2767         dynobj argument with link info.  Get sections for first plt chunk from
2768         the hash table.
2769         (bfd_elf32_bfd_link_hash_table_create): Define.
2771 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
2773         * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
2774         * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
2775         (struct elf_symbol): Change first member into union.
2776         (elf_sort_elf_symbol): Compare pointers to internal syms rather than
2777         internal syms.  Only compare st_shndx fields.
2778         (elf_create_symbuf): New function.
2779         (bfd_elf_match_symbols_in_sections): Use it.  If symbufs are available
2780         for bfds, use a binary search, otherwise don't qsort symbols
2781         unnecessarily only to select which symbols are for the particular
2782         shndx.
2784 2007-02-01  Nick Clifton  <nickc@redhat.com>
2786         PR ld/3852
2787         * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
2788         in the elf_link_hash_table structure.
2790 2007-02-01  Alan Modra  <amodra@bigpond.net.au>
2792         * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
2793         * elfxx-target.h (elf_backend_write_core_note): Define and use.
2794         * elf.c (elfcore_write_prpsinfo): Call the above.  Add support for
2795         32-bit core note on 64-bit target.
2796         (elfcore_write_prstatus): Likewise.
2797         (elfcore_write_lwpstatus): Make note_name const.
2798         (elfcore_write_prfpreg): Likewise.
2799         (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
2800         target.
2801         * elf32-ppc.c (ppc_elf_write_core_note): New function.
2802         (elf_backend_write_core_note): Define.
2803         * elf64-ppc.c (ppc64_elf_write_core_note): New function.
2804         (elf_backend_write_core_note): Define.
2806 2007-01-31  H.J. Lu  <hongjiu.lu@intel.com>
2808         * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
2809         (elf32_bed): Defined for elf32-us-cris.
2811         * elf64-sh64.c (elf64_bed): Defined for Linux.
2812         (INCLUDED_TARGET_FILE): Removed.
2814         * elfxx-target.h (elfNN_bed): Always define. Don't check
2815         INCLUDED_TARGET_FILE.
2817 2007-01-31  DJ Delorie  <dj@redhat.com>
2819         * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
2820         message for dangerous relocs, special case the common user error.
2822 2007-01-30  H.J. Lu  <hongjiu.lu@intel.com>
2824         * elf.c (copy_elf_program_header): Start from the first section
2825         in a segment and stop when all sections in a segment are
2826         accounted for.
2828 2007-01-29  Julian Brown  <julian@codesourcery.com>
2830         * bfd-in2.h: Regenerate.
2831         * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
2832         instruction scanning should be done.
2833         (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
2834         (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
2835         (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
2836         prototype.
2837         * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
2838         argument.
2839         * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
2840         (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
2841         (elf32_vfp11_erratum_type): New enum.
2842         (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
2843         veneers.
2844         (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
2845         (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
2846         vfp11_fix and num_vfp11_fixes fields.
2847         (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
2848         vfp11_erratum_glue_size, num_vfp11_fixes fields.
2849         (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
2850         (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
2851         glue section.
2852         (elf32_arm_section_map_add): Add an code/data mapping symbol entry
2853         to a section's map.
2854         (record_vfp11_erratum_veneer): Create a single veneer, and its
2855         associated symbols.
2856         (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
2857         (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
2858         BFDs.
2859         (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
2860         required.
2861         (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
2862         (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
2863         (bfd_arm_vfp11_write_mask): Update write mask according to coded
2864         register number.
2865         (bfd_arm_vfp11_antidependency): New function.
2866         (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
2867         (elf32_arm_compare_mapping): Declare.
2868         (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
2869         BFD for potential erratum-triggering insns. Record results.
2870         (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
2871         and branches to veneers have been placed in virtual memory after
2872         layout.
2873         (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
2874         hash table.
2875         (elf32_arm_output_symbol_hook): Remove.
2876         (elf32_arm_write_section): Output veneers, and branches to veneers.
2877         Use maps from input sections, not output sections, for code
2878         byte-swapping.
2879         * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
2880         * elf32-score.c (_bfd_score_elf_write_section): Likewise.
2881         * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
2882         * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
2884 2007-01-27  H.J. Lu  <hongjiu.lu@intel.com>
2886         * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
2887         (INCLUDED_TARGET_FILE): Removed.
2889 2007-01-27  Mike Frysinger  <vapier@gentoo.org>
2891         * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
2892         (INCLUDED_TARGET_FILE): Remove.
2894 2007-01-25  DJ Delorie  <dj@redhat.com>
2896         * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
2897         R_M32C_16 or R_M32C_24 relocs.
2899 2007-01-25  Nick Clifton  <nickc@redhat.com>
2901         PR binutils/3874
2902         * elf32-avr.c (avr_link_hash_table): Check to make sure that the
2903         hash table was created by elf32_avr_link_hash_table_create before
2904         using it.
2905         (elf32_avr_link_hash_newfunc): New function.  Just pass the call
2906         through to _bfd_elf_link_hash_newfunc.
2907         (elf32_avr_link_hash_table_create): Use
2908         elf32_avr_link_hash_newfunc instead of
2909         _bfd_elf_link_hash_newfunc.
2910         (elf32_avr_relocate_section): Check for the hash table pointer
2911         being NULL.
2912         (elf32_avr_relax_section, avr_build_one_stub,
2913         elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
2914         elf32_avr_build_stubs): Likewise.
2916 2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
2918         PR ld/3831
2919         * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
2920         argument, Elf_Internal_Sym *.
2922         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
2923         symbol dynamic if info->dynamic_data is TRUE.
2924         (bfd_elf_record_link_assignment): Updated call to
2925         bfd_elf_record_link_assignment.
2926         (_bfd_elf_merge_symbol): Likewise.  Always call
2927         bfd_elf_link_mark_dynamic_symbol.
2929 2007-01-12  H.J. Lu  <hongjiu.lu@intel.com>
2931         * Makefile.am (BFD_LIBS): Removed.
2932         * Makefile.in: Regenerated.
2934 2007-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2936         PR binutils/3631
2937         * Makefile.am (OFILES): Add @bfd64_libs@.
2938         (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
2939         * Makefile.in: Regenerated.
2941         * configure.in (bfd_libs): Replaced by ...
2942         (bfd64_libs): This.
2943         * configure: Regenerated.
2945 2007-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2947         * elf.c (assign_file_positions_for_load_sections): We can
2948         require fewer phdrs than expected.
2950 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
2952         * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
2953         * bfd-in2.h: Regenerate.
2954         * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
2955         bfd_mach_cpu32_fido.
2956         (m68k_arch_features): Use fido_a instead of cpu32.
2957         (bfd_m68k_compatible): Reject the combination of Fido and
2958         ColdFire.  Accept the combination of CPU32 and Fido with a
2959         warning.
2960         * elf32-m68k.c (elf32_m68k_object_p,
2961         elf32_m68k_merge_private_bfd_data,
2962         elf32_m68k_print_private_bfd_data): Treat Fido as an
2963         architecture by itself.
2965 2007-01-08  Kai Tietz   <kai.tietz@onevision.com>
2967         * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
2969 2007-01-05  Jakub Jelinek  <jakub@redhat.com>
2971         * texhex.c (first_phase): Don't fall through into the default
2972         case.
2973         (pass_over): Replace abort () calls with return FALSE.  Fix
2974         buffer overflow.
2976 2007-01-04  Jie Zhang  <jie.zhang@analog.com>
2978         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
2979         SEC_EXCLUDE on zero size .eh_frame.
2981 For older changes see ChangeLog-2006
2983 Local Variables:
2984 mode: change-log
2985 left-margin: 8
2986 fill-column: 74
2987 version-control: never
2988 End: