bfd/
[binutils.git] / bfd / ChangeLog
blob765bb967437bb1b3ce697a66784391cf9da6c776
1 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
4         IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
6 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8         PR binutils/10074
9         * coffcode.h (bfd_pei_p): New.
11         * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
12         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
13         bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
14         bfd_efi_rtdrv_ia64_vec.  Replace bfd_efi_app_ia32_vec,
15         bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
16         i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
18         * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
19         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
20         bfd_efi_rtdrv_x86_64_vec,
21         bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec.  Replace
22         bfd_efi_ia64_vec with bfd_pei_ia64_vec.
23         * targets.c: Likewise.
25         * configure: Regenerated.
26         * libcoff.h: Likewise.
27         * Makefile.in: Likewise.
29         * efi-app-ia32.c: Removed.
30         * efi-app-x86_64.c: Likewise.
31         * efi-bsdrv-ia32.c: Likewise.
32         * efi-bsdrv-ia64.c: Likewise.
33         * efi-bsdrv-x86_64.c: Likewise.
34         * efi-rtdrv-ia32.c: Likewise.
35         * efi-rtdrv-ia64.c: Likewise.
36         * efi-rtdrv-x86_64.c: Likewise.
37         * efi-rtdrv-ia32.c: Likewise.
39         * efi-app-ia64.c: Moved to ...
40         * pei-ia64.c: This.
41         (TARGET_SYM): Set to bfd_pei_ia64_vec.
42         (TARGET_NAME): Set to pei-ia64.
44         * libpei.h (bfd_target_pei_p): Removed.
45         (bfd_target_pei_arch): Likewise.
46         (bfd_target_efi_app_p): Likewise.
47         (bfd_target_efi_app_arch): Likewise.
48         (bfd_target_efi_bsdrv_p): Likewise.
49         (bfd_target_efi_bsdrv_arch): Likewise.
50         (bfd_target_efi_rtdrv_p): Likewise.
51         (bfd_target_efi_rtdrv_arch): Likewise.
52         (bfd_pe_executable_p): Likewise.
54         * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
55         efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
56         (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
57         and efi-rtdrv-ia32.c.
58         (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
59         efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
60         efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
61         (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
62         efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
63         efi-rtdrv-x86_64.c. Add pei-ia64.c.
64         (efi-app-ia64.lo): Removed.
65         (efi-bsdrv-ia32.lo): Likewise.
66         (efi-rtdrv-ia32.lo): Likewise.
67         (efi-app-ia64.lo): Likewise.
68         (efi-bsdrv-ia64.lo): Likewise.
69         (efi-rtdrv-ia64.lo): Likewise.
70         (efi-app-x86_64.lo): Likewise.
71         (efi-bsdrv-x86_64.lo): Likewise.
72         (efi-rtdrv-x86_64.lo): Likewise.
73         (pei-ia64.lo): New.
75         * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
76         with bfd_pei_p.
77         (arch_type): Removed.
78         (pe_arch): Likewise.
79         (pe_bfd_object_p): Just return coff_object_p.
81         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
82         bfd_pe_executable_p with bfd_pei_p.
84 2009-04-17  Christophe Lyon  <christophe.lyon@st.com>
86         * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
87         PLT entries to an undefined symbol when generating a shared
88         library.
90 2009-04-17  Nick Clifton  <nickc@redhat.com>
92         PR 9909
93         * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
95 2009-04-16  Richard Sandiford  <r.sandiford@uk.ibm.com>
97         * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
98         * aout-target.h (MY_bfd_define_common_symbol): Likewise.
99         * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
100         * binary.c (binary_bfd_define_common_symbol): Likewise.
101         * bout.c (b_out_bfd_define_common_symbol): Likewise.
102         * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
103         * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
104         * coffcode.h (coff_bfd_define_common_symbol): Likewise.
105         * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
106         * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
107         * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
108         * ieee.c (ieee_bfd_define_common_symbol): Likewise.
109         * ihex.c (ihex_bfd_define_common_symbol): Likewise.
110         * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
111         * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
112         * mmo.c (mmo_bfd_define_common_symbol): Likewise.
113         * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
114         * oasys.c (oasys_bfd_define_common_symbol): Likewise.
115         * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
116         * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
117         * som.c (som_bfd_define_common_symbol): Likewise.
118         * srec.c (srec_bfd_define_common_symbol): Likewise.
119         * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
120         * versados.c (versados_bfd_define_common_symbol): Likewise.
121         * vms.c (vms_bfd_define_common_symbol): Likewise.
122         * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
123         * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
124         * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
125         (pmac_xcoff_vec): Likewise.
126         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
127         (aix5coff64_vec): Likewise.
128         * linker.c (bfd_generic_define_common_symbol): New function.
129         * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
130         (_bfd_define_common_symbol): New field.
131         * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
132         * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
133         (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
134         symbols here.
135         * bfd-in2.h: Regenerate.
136         * libbfd.h: Likewise.
137         * libcoff.h: Likewise.
139 2009-04-15  Anthony Green  <green@moxielogic.com>
141         * targets.c: Add moxie support.
142         * Makefile.am: Ditto.
143         * Makefile.in: Rebuilt.
144         * cpu-moxie.c, elf32-moxie.c: New files.
145         * archures.c: Add moxie support.
146         * configure.in: Add moxie support.
147         * configure: Rebuilt.
148         * config.bfd, archures.c: Add moxie support.
149         * bfd-in2.h: Rebuilt.
151 2009-04-15  Christophe Lyon  <christophe.lyon@st.com>
153         * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
154         branch to an undef weak symbol into a jump to next instruction if
155         a PLT entry will be created.
157 2009-04-14  Dave Korn  <dave.korn.cygwin@gmail.com>
159         * coffgen.c (make_a_section_from_file):  Set the backend long
160         section names enable if long section names found on input.
161         * coffcode.h:  Extend long section names documentation to match.
163 2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
165         * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
166         machine code.
168 2009-04-07  DJ Delorie  <dj@redhat.com>
170         * archures.c: Add bfd_mach_mep_c5.
171         * bfd-in2.h: Likewise.
172         * cpu-mep.c: Add bfd_c5_arch.
173         * elf32-mep.c: Support it.
175 2009-04-07  H.J. Lu  <hongjiu.lu@intel.com>
177         * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
178         info->callbacks->einfo.
179         * linker.c (_bfd_generic_section_already_linked): Likewise.
181 2009-04-06  DJ Delorie  <dj@redhat.com>
183         * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
185 2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>
187         * coff-x86_64.c (bfd_pe_print_pdata): Defined to
188         _bfd_pex64_print_pdata only if PE is defined.
190         * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
191         (_bfd_pex64_print_pdata): This.
193         * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
194         (_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
195         is defined.
197 2009-04-05  Kai Tietz  <kai.tietz@onevision.com>
199         * coff-x86_64.c (bfd_pe_print_pdata): Define as
200         _bfd_pep_print_x64_pdata.
201         * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
202         * peXXigen.c (_bfd_pep_print_x64_pdata): New.
204 2009-04-02  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
206         * elf32-xtensa.c (relax_property_section): Always set r_offset 
207         to zero.
209 2009-04-02  Christophe Lyon  <christophe.lyon@st.com>
211         * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
212         elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
213         branch stubs.
214         (elf32_arm_stub_type): New enum values for the two new stubs.
215         (arm_type_of_stub): Make use of the two new stubs.
216         (arm_size_one_stub): Handle the two new stubs.
218 2009-04-01  Matt Thomas  <matt@netbsd.org>
220         * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
221         hidden symbols into the GOT or PLT.GOT.
222         (elf_vax_relocate_section): Do not emit a PCREL reloc 
223         into a shared object if it is against a hidden symbol.
225 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
227         * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
228         and know_contains_shared_object_p.
229         (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
230         Cache the result in the archive_info table.
231         (xcoff_auto_export_p): Add an "info" parameter and update the
232         call to xcoff_archive_contains_shared_object_p.
233         (xcoff_mark_auto_exports): Update accordingly.
234         (xcoff_post_gc_symbol): Likewise.
236 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
238         * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
239         rather than C_EXT.
241 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
243         * coff-rs6000.c (member_layout): New structure.
244         (archive_iterator): Likewise.
245         (member_layout_init): New function.
246         (archive_iterator_begin): Likewise.
247         (archive_iterator_next): Likewise.
248         (xcoff_write_armap_old): Use the new iterator functions.
249         (do_shared_object_padding): Delete.
250         (xcoff_write_armap_big): Use the new iterator functions.  Simplify
251         handling of arch_info.
252         (xcoff_write_archive_contents_old): Allocate arelt_data in the
253         first loop rather than the second.  Allocate a member header if
254         there isn't one, then work out the stat information and length
255         in the first loop too.  Use the new iterators for the second loop.
256         (xcoff_write_archive_contents_big): Likewise.
258 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
260         * bfd-in.h (bfd_xcoff_split_import_path): Declare.
261         (bfd_xcoff_set_archive_import_path): Likewise.
262         * bfd-in2.h: Regenerate.
263         * xcofflink.c: Include libiberty.h.
264         (xcoff_archive_info): New structure.
265         (xcoff_archive_info_hash): New function.
266         (xcoff_archive_info_eq): Likewise.
267         (xcoff_get_archive_info): Likewise.
268         (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
269         (bfd_xcoff_split_import_path): New function.
270         (bfd_xcoff_set_archive_import_path): Likewise.
271         (xcoff_set_import_path): Move earlier in file.
272         (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
273         object to the the directory part of the bfd's filename.  Get the
274         import path and filename of an archive object from the archive's
275         xcoff_tdata, initializing it if necessary.  Update use of
276         import_file_id.
277         (bfd_link_input_bfd): Update use of import_file_id.
278         (xcoff_write_global_symbol): Likewise.
280 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
282         * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
284 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
286         * xcofflink.c (xcoff_link_create_extra_sections): Don't create
287         a .loader section for relocatable links.
288         (xcoff_need_ldrel_p): New function.
289         (xcoff_mark): Use it.
290         (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
291         a loader section.
292         (xcoff_build_ldsym): New function, split out from...
293         (xcoff_build_ldsyms): ...here.  Rename to...
294         (xcoff_post_gc_symbol): ...this.  Only export symbols, and only
295         call xcoff_build_ldsym, if there's a loader section.
296         (xcoff_build_loader_section): New function, extracted verbatim from...
297         (bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
298         there's a loader section.  Only add an __rtinit loader symbol
299         if there's a loader section.  Update after above name change.
300         (xcoff_symbol_section, xcoff_create_ldrel): New functions.
301         (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
302         and xcoff_create_ldrel.
303         (xcoff_write_global_symbol): Use xcoff_create_ldrel.
304         (xcoff_reloc_link_order): Likewise, but only call it if there's
305         a loader section.  Use xcoff_symbol_section.
306         (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
307         if there's a loader section.
309 2009-04-01  Richard Sandiford  <rdsandiford@googlemail.com>
311         * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
313 2009-04-01  Christophe Lyon  <christophe.lyon@st.com>
315         * elf32-arm.c (group_sections): Rewrite loops for better
316         readability.
318 2009-03-30  DJ Delorie  <dj@redhat.com>
320         * elflink.c (elf_link_input_bfd): Don't try to resolve complex
321         relocs when doing a relocatable link.
323 2009-03-28  Mark Mitchell  <mark@codesourcery.com>
325         * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
326         "ERROR:", in error messages.
327         * cpu-arm.c (bfd_arm_merge_machines): Likewise.
328         * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
329         * elf32-arm.c (tag_cpu_arch_combine): Likewise.
330         (elf32_arm_merge_eabi_attributes): Likewise.
331         (elf32_arm_merge_private_bfd_data): Likewise.
333 2009-03-27  Nick Clifton  <nickc@redhat.com>
335         * section.c (bfd_get_section_contents): Detect and handle the case
336         where a section has the SEC_IN_MEMORY flag set but no actual
337         contents allocated.
339 2009-03-26  Alan Modra  <amodra@bigpond.net.au>
341         PR 6494
342         * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
343         p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
344         (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
345         if we don't find matching PT_LOAD when copying.
347 2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
349         * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
350         the reloc descriptions.
352 2009-03-25  Hans-Peter Nilsson  <hp@axis.com>
354         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
355         <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
356         <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
358 2009-03-24  H.J. Lu  <hongjiu.lu@intel.com>
360         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
361         (bfd_i386_arch_intel_syntax): Likewise.
362         (i8086_arch): Likewise.
363         (bfd_x86_64_arch): Likewise.
365 2009-03-24  Hans-Peter Nilsson  <hp@axis.com>
367         * elf32-cris.c (cris_elf_relocate_section): <case
368         R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
369         symbols for non-allocated sections.  Don't check whether to
370         generate R_CRIS_DTPMOD for non-allocated sections.
371         (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
372         handle relocation GC:ing if applied to non-allocated section.
373         (cris_elf_check_relocs): Similar.
375         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
376         <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
377         when emitting a known TP offset in the GOT.
379 2009-03-23  Alan Modra  <amodra@bigpond.net.au>
381         * elf64-ppc.c (synthetic_opd): Delete.
382         (compare_symbols): Look for .opd name rather than section match.
383         (ppc64_elf_get_synthetic_symtab): Likewise.
385 2009-03-21  Alan Modra  <amodra@bigpond.net.au>
387         * elf32-ppc.c (is_pic_glink_stub): Delete.
388         (is_nonpic_glink_stub): New function.
389         (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
390         than first pic one.
391         (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
393 2009-03-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
394             Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
396         * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
397         macros for visibilty and locality checks.
398         (elf_s390_adjust_dynamic_symbol): Likewise.
399         (allocate_dynrelocs): Likewise.
400         (elf_s390_relocate_section): Likewise.
401         (elf_s390_finish_dynamic_symbol): Likewise.
402         * elf64-s390.c (elf_s390_check_relocs): Likewise.
403         (elf_s390_adjust_dynamic_symbol): Likewise.
404         (allocate_dynrelocs): Likewise.
405         (elf_s390_relocate_section): Likewise.
406         (elf_s390_finish_dynamic_symbol): Likewise.
408 2009-03-19  Kai Tietz  <kai.tietz@onevision.com>
410         * bfd-in2.h: Regenerated.
411         * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
412         for debugging sections and map memory read/write dependent on
413         SEC_COFF_NOREAD.
414         (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
415         without memory read flags set.
416         * section.c: Add SEC_COFF_NOREAD to section flags.
418 2009-03-19  Andreas Schwab  <schwab@linux-m68k.org>
420         * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
421         for format string.
423 2009-03-19  Alan Modra  <amodra@bigpond.net.au>
425         * elf32-spu.c (spu_elf_find_overlays): Separate error return from
426         "no overlays" return.  If there are overlays, create overlay
427         manager entry symbols here, so that..
428         (spu_elf_build_stubs): ..we don't need to set them up here.
429         Simplify entry symbol tests.
430         * elf32-spu.h (spu_elf_find_overlays): Update prototype.
432 2009-03-18  Mark Kettenis  <kettenis@gnu.org>
434         * elf.c (elfcore_grok_openbsd_procinfo)
435         (elfcore_grok_openbsd_note): New functions.
436         (elf_parse_notes): Handle notes from OpenBSD ELF core files.
438 2009-03-18  Alan Modra  <amodra@bigpond.net.au>
440         * vms-hdr.c: Don't include alloca.h.
441         * elf32-m68hc1x.c: Include alloca-conf.h.
442         * xsym.c: Likewise.
443         * elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
444         * som.c: Likewise.
445         * Makefile.am: Run "make dep-am".
446         * Makefile.in: Regenerate.
448 2009-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
450         * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
452 2009-03-17  Alan Modra  <amodra@bigpond.net.au>
454         * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
455         Add compact_stub.
456         (emum _ovly_flavour): Delete ovly_compact, ovly_none.
457         * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
458         ovly_return fields with ovly_entry[2].  Adjust all users.
459         (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
460         when soft-icache.
461         (spu_elf_build_stubs): Likewise.
462         (ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
463         ovly_flavour changes.  Update all callers.
464         (ovl_stub_size_log2): New function.
465         (build_stub): Handle compact icache stubs.  Use different manager
466         entry point for stubs in non-icache area.
467         (spu_elf_size_stubs): Don't allocate space for indirect branch
468         descriptors.
469         (spu_elf_build_stubs): And don't built them.
471 2009-03-16  Andrew Stubbs  <ams@codesourcery.com>
473         * dwarf2.c (read_section): Always use rawsize, if available.
475 2009-03-16  Alan Modra  <amodra@bigpond.net.au>
477         * simple.c (bfd_simple_get_relocated_section_contents): Use larger
478         of rawsize and size for buffer.
480 2009-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
482         * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
483         parameter just because fixed sections fit into local store.
484         (spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
485         generating overlays if fixed sections plus reserved stack
486         and heap space fit into local store.
488 2009-03-15  Alan Modra  <amodra@bigpond.net.au>
490         * elf32-spu.c (build_stub): Correct icache set_id.
491         (spu_elf_relocate_section): Likewise.
493 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
495         * xcofflink.c (xcoff_link_check_archive_element): Only free the
496         symbol table if it was created by the current call.
498 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
500         * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
501         class XMC_DS rather than XMC_UA.
503 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
505         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
506         bfd_boolean export_defineds parameter with an unsigned int
507         auto_export_flags parameter.
508         * bfd-in2.h: Regenerate.
509         * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
510         split out from xcoff_build_ldsyms.
511         (xcoff_covered_by_expall_p): New function.
512         (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
513         but with extra code to handle -bexpfull and -bexpall.
514         (xcoff_mark_auto_exports): New function.
515         (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
516         a function should be automatically exported.
517         (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
518         parameter with an auto_export_flags parameter.  Update ldinfo
519         accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
520         exported symbols.
522 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
524         * xcofflink.c (xcoff_mark_symbol_by_name): New function.
525         (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
526         init and fini functions.  Do garbage collection for objects
527         without an entry point too.
529 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
531         * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
532         check whether a symbol has csect information.
533         (coff_print_aux): Likewise.
534         * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
535         information for C_AIX_WEAKEXT too.
536         (_bfd_xcoff_swap_aux_out): Likewise.
537         (xcoff_reloc_type_br): Handle defweak symbols too.
538         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
539         information for C_AIX_WEAKEXT too.
540         (_bfd_xcoff64_swap_aux_out): Likewise.
541         (xcoff64_reloc_type_br): Handle defweak symbols too.
542         * coffgen.c (coff_print_symbol): Handle auxillary function
543         information for C_AIX_WEAKEXT too.
544         * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
545         instead of BSF_GLOBAL if the L_WEAK flag is set.
546         (xcoff_dynamic_definition_p): New function.
547         (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
548         defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
549         always take the symbol class from the ldsym.  Use weak bfd symbol
550         types for weak ldsyms.
551         (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
552         Fix the check for whether a definition is from a shared object.
553         Allow redefinitions of weak symbols.
554         (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
555         (xcoff_keep_symbol_p): Likewise.
556         (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
557         (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
558         Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
559         but mark them as L_WEAK.
560         (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
561         instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
563 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
565         * xcofflink.c (xcoff_mark): When walking the relocations,
566         only mark the target symbol or the target section, not both.
567         (xcoff_final_definition_p): New function.
568         (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
569         symbol is a valid definition of the associated output symbol.
570         Use XCOFF_ALLOCATED to stop the same hash table entry having
571         two output symbols.
572         (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
573         keeping a symbol.
574         (xcoff_link_input_bfd): Use xcoff_final_definition_p.
576 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
578         * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
579         symbols as XMC_XO.
581 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
583         * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
584         * libcoff.h: Regenerate.
585         * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
586         line-number counts in the bfd's lineno_counts field.
587         Don't keep per-csect line-number counts.
588         (xcoff_sweep): Don't update per-csect line-number counts.
589         (bfd_xcoff_size_dynamic_sections): Count the number of line-number
590         entries in each output section.
591         (xcoff_link_input_bfd): Get the number of line numbers from
592         the bfd's lineno_counts field, rather than recalculating it
593         from scratch.  Fix the range check when updating C_BINCL and
594         C_EINCL symbols.
595         (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
596         here.  Don't expect csects to have line-number counts.
598 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
600         * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
601         * libcoff.h: Regenerate.
602         * xcofflink.c (xcoff_keep_symbol_p): New function, using the
603         "skip" logic from xcoff_link_input_bfd.
604         (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
605         objects in a dynamic link, rather than checking whether csectpp
606         is null.  Always allocate debug_index for other objects,
607         and always go through the loop.  Update the type of debug_index
608         after the change above.  Read the auxillary csect information
609         and use xcoff_keep_symbol_p to decide whether a symbol should
610         be kept.  Set its debug_index to -2 if not.
611         (xcoff_link_input_bfd): Update the type of debug_index after
612         the change above and always expect it to be nonnull.  Use it to
613         test whether a symbol should be stripped, rather than making the
614         decision here.  Postpone all symbol creation to the second pass.
616 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
618         * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
619         creating a descriptor.
620         (xcoff_sweep): Don't mark toc_section unless it's needed.
621         (bfd_xcoff_size_dynamic_sections): Skip the toc_section
622         when marking every bfd.
623         (xcoff_link_input_bfd): Skip all TOC anchors.
624         (xcoff_toc_section_p, xcoff_find_tc0): New functions.
625         (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
626         to -1; call xcoff_find_tc0 instead.
628 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
630         * libcoff-in.h (xcoff_section_tdata): Update commentary.
631         * libcoff.h: Regenerate.
632         * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
633         symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
634         the previous symbol's csect.  Treat last_symndx as an inclusive value
635         and simplify its handling.
636         (xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
637         symbols with the right csect.  Don't mark rsec when processing
638         relocations against undefined or absolute sections.
639         (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
640         of bfd_und_section_ptr.
641         (xcoff_link_input_bfd): Likewise.
643 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
645         * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
646         against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
647         flag is set.  Assert that all undefined symbols are either
648         imported or defined by a dynamic object.
649         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
650         * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
651         handling to all relocations.  Only set XCOFF_CALLED for function
652         symbols.
653         (xcoff_find_function): New function, split out from...
654         (bfd_xcoff_export_symbol) ...here.
655         (xcoff_set_import_path): New function, split out from...
656         (bfd_xcoff_import_symbol): ...here.  Remove assertion for old
657         meaning of XCOFF_CALLED.
658         (xcoff_mark_symbol): If we mark an undefined and unimported
659         symbol, find some way of defining it.  If the symbol is a function
660         descriptor, fill in its definition automatically.  If the symbol
661         is a function, mark its descriptor and allocate room for global
662         linkage code.  Otherwise mark the symbol as implicitly imported.
663         Move the code for creating function descriptors from...
664         (xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
665         check for symbols that were implicitly defined.
666         (xcoff_mark): Don't count any dynamic relocations against
667         function symbols.
668         (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
669         in the xcoff link info.
670         (xcoff_link_input_bfd): Remove handling of undefined and
671         unexported symbols.
673 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
675         * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
676         if the target is absolute.  Fix comment typo.
677         (xcoff_ppc_relocate_section): Remove FIXME.
678         * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
679         if the target is absolute.
681 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
683         * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
684         R_POS and R_NEG relocations against absolute symbols to the
685         .loader section.
687 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
689         * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
690         to 2 for bfd_mach_ppc_620.
692 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
694         * config.bfd: Treat AIX 6+ in the same way as AIX 5.
695         * configure.in: Likewise.
696         * configure: Regenerate.
698 2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>
700         PR binutils/9945
701         * elf.c (assign_section_numbers): Generate symbol table if there
702         is any relocation in output.
703         (_bfd_elf_compute_section_file_positions): Likewise.
705 2009-03-13  Nick Clifton  <nickc@redhat.com>
707         PR 9934
708         * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
709         * elflink.c (elf_link_read_relocs_from_section): Use
710         NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
711         relocs but no symbol table.
712         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
714 2009-03-12  H.J. Lu  <hongjiu.lu@intel.com>
716         PR ld/9938
717         * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
718         to check ___tls_get_addr.
720         * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
721         strncmp to check __tls_get_addr.
723 2009-03-12  Andrew Stubbs  <ams@codesourcery.com>
725         * dwarf2.c (read_section): Always check the offset, even when the
726         section has been read before.
728 2009-03-11  H.J. Lu  <hongjiu.lu@intel.com>
730         * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
731         comments.
733 2009-03-11  Chris Demetriou  <cgd@google.com>
735         * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
736         * bfd-in2.h: Regenerate.
737         * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
738         flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
739         mode.
740         (bsd_write_armap): Likewise.
741         (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
742         flag is set, do nothing.
743         (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
744         for timestamp.
746 2009-03-11  Ulrich Weigand  <uweigand@de.ibm.com>
748         * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
749         used to update stack pointer.
751 2009-03-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
753         PR binutils/9921
754         * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
755         for unknown symbols in absolute section.
757 2009-03-06  Nick Clifton  <nickc@redhat.com>
759         * po/es.po: Updated Spanish translation.
761 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
763         * elf32-arm.c (group_sections): Take next section size into
764         account before accepting to group it.
766 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
768         * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
769         PLT entries.
770         (elf32_arm_final_link_relocate): Likewise.
772 2009-03-05  Moritz Kroll  <Moritz.Kroll@gmx.de>
774         PR 9923
775         * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
777 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
779         * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
780         * section.c (struct bfd_section): Add has_tls_get_addr_call.
781         (BFD_FAKE_SECTION): Init new flag.
782         * ecoff.c (bfd_debug_section): Likewise.
783         * bfd-in2.h: Regenerate.
784         * libbfd.h: Regenerate.
785         * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
786         (ppc_elf_reloc_type_lookup): Handle new relocs.
787         (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
788         without marker relocs.
789         (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
790         if section has no old-style calls.
791         (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
792         Don't try to optimize new-style __tls_get_addr call when handling
793         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
794         relocs.
795         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
796         (ppc64_elf_reloc_type_lookup): Handle new relocs.
797         (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
798         without marker relocs.
799         (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
800         if section has no old-style calls.  Set toc_ref for new relocs as
801         appropriate.
802         (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
803         Don't try to optimize new-style __tls_get_addr call when handling
804         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
805         relocs.
807 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
809         PR 6768
810         * configure.in: Test for ld --as-needed support.  Link shared
811         libbfd against libm.
812         * configure: Regenerate.
814 2009-03-03  Alan Modra  <amodra@bigpond.net.au>
816         * Makefile.am: Run "make dep-am".
817         * Makefile.in: Regenerate.
819 2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
821         * elf32-score7.c: New file.
822         * elf32-score.h: New file.
823         * elf32-score.c: Add code to support score 7.  Set score7 as the
824         default.
825         * cpu-score.c: Add score7 architecure.
826         (compatibile): New function.
827         * Makefile.am: Add rules for building elf32-score7 object.
828         * Makefile.in: Regenerate.
829         * configure.in: Add elf32-score7 object to score vectors.
830         * configure: Regenerate.
831         * reloc.c: Add score7 relocs.
832         * archures.c: Add score3 and score7 machine numbers.
833         * bfd-in2.h: Regenerate.
834         * libbfd.h: Regenerate.
836 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
838         * configure: Regenerate.
840 2009-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
842         * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
843         (elf32_hppa_check_relocs): Use it.
845         * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
846         elf64-hppa.c.
847         (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
848         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
849         (elf_hppa_is_dynamic_loader_symbol): Likewise.
850         (elf_hppa_record_segment_addrs): Likewise.
851         (elf_hppa_final_link): Likewise.
852         (elf_hppa_relocate_insn): Likewise.
853         (elf_hppa_final_link_relocate): Likewise.
854         (elf64_hppa_relocate_section): Likewise.
855         * elf64-hppa.c: Insert above.
857 2009-02-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
859         * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
860         (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
861         (elf_hppa_relocate_section): Likewise.
862         * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
863         from struct elf_link_hash_entry.  Add count field.
864         (struct elf64_hppa_dyn_hash_table): Delete.
865         (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
866         (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
867         (hppa_elf_hash_entry, eh_name): Define.
868         (elf64_hppa_new_dyn_hash_entry): Delete.
869         (elf64_hppa_dyn_hash_lookup): Delete.
870         (elf64_hppa_dyn_hash_traverse): Delete.
871         (get_dyn_name): Delete.
872         (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
873         of struct elf64_hppa_dyn_hash_entry *.
874         (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
875         allocate_global_data_plt, allocate_global_data_stub,
876         allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
877         Likewise.
878         (hppa64_link_hash_newfunc): New.
879         (elf64_hppa_hash_table_create): Rework.
880         (count_dyn_reloc): Likewise.
881         (hppa64_elf_local_refcounts): New.
882         (elf64_hppa_check_relocs): Rework using standard technique for recording
883         local DLT, PLT and OPD reference counts.
884         (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
885         elf_link_hash_entry *.
886         (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
887         allocate_global_data_plt, allocate_global_data_stub,
888         allocate_global_data_opd, allocate_dynrel_entries,
889         elf64_hppa_adjust_dynamic_symbol,
890         elf64_hppa_mark_milli_and_exported_functions): Likewise.
891         (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
892         Use hppa_link_hash_table.  Rework.
893         (elf64_hppa_link_output_symbol_hook): Rework.
894         (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
895         elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
896         elf64_hppa_finish_dynamic_sections): Likewise.
898 2009-02-26  Christophe Lyon  <christophe.lyon@st.com>
900         * elf32-arm.c (stub_reloc_type): Removed.
901         (insn_sequence): Renamed reloc_type field to r_type.
902         (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
903         (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
904         (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
905         (elf32_arm_stub_type): Add new enum entries for the new stubs.
906         (arm_stub_is_thumb): Catch new stubs.
907         (arm_type_of_stub): Handle new stubs.
908         (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
909         (bfd_elf32_arm_process_before_allocation): Remove useless
910         condition.
912 2009-02-25  H.J. Lu  <hongjiu.lu@intel.com>
914         * elf.c (elf_find_function): Use is_function_type to check
915         function symbol.
917 2009-02-24  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
919         * xtensa-modules.c: Revert to previous version 1.11 due
920         to inadvertant commit.
922 2009-02-24  Sterling Augustine  <sterling@tensilica.com>
924         * elf32-xtensa.c (text_action_add): Separate test for action
925         type.  Break if saved action is ta_widen_insn at same offset.
927 2009-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
929         * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
930         to elf32_arm_stub_long_branch_any_arm_pic.
931         (elf32_arm_stub_long_branch_any_thumb_pic): New.
932         (enum elf32_arm_stub_type, arm_type_of_stub)
933         (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
934         separately.
936 2009-02-24  Joseph Myers  <joseph@codesourcery.com>
938         * elf32-arm.c (PREV_SEC): Update comment.
939         (group_sections): Rename argument to stubs_always_after_branch.
940         Reverse the list and place stubs at the end of input sections.
941         Undefine NEXT_SEC.
942         (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
944 2009-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
946         * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
947         Fix formatting.
948         (arm_size_one_stub): Remove unnecessary break.
949         (arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
951 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
953         * elf32-arm.c (stub_insn_type): New type.
954         (stub_reloc_type): Likewise.
955         (insn_sequence): Likewise.
956         (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
957         (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
958         (elf32_arm_stub_long_branch_thumb_only): Likewise.
959         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
960         (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
961         (elf32_arm_stub_long_branch_any_any_pic): Likewise.
962         (elf32_arm_stub_hash_entry): Add new helper fields.
963         (stub_hash_newfunc): Initialize these new fields.
964         (arm_build_one_stub): Encode Arm and Thumb instructions separately
965         to take endianness into account.
966         (arm_size_one_stub): Compute size of stubs using insn_sequence.
967         (arm_map_one_stub): Code is now more generic, thanks to
968         insn_sequence.
970 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
972         * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
973         code.
974         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
975         (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
976         BLX is not available. Fix typo in warning message. Add comments
977         and improve formatting.
978         (arm_build_one_stub): Adjust to new
979         elf32_arm_stub_long_branch_v4t_thumb_arm stub.
980         (arm_map_one_stub): Likewise.
982 2009-02-23  Tristan Gingold  <gingold@adacore.com>
983             Eric Botcazou  <ebotcazou@adacore.com>
984             Douglas B Rupp  <rupp@gnat.com>
986         * vms.h: Update copyright year, fix comments, reorder declarations.
987         (_bfd_save_vms_section): Remove the prototype.
988         (EGPS_S_V_NO_SHIFT): New constant.
989         (bfd_vms_set_section_flags): New prototype.
990         (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
991         constants.
992         (EGSY_S_W_FLAGS): Ditto.
993         (EGSY_S_V_QUAD_VAL): Ditto.
994         (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
995         (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
996         EGST_S_B_NAMLNG): Ditto.
997         (ESRF_S_B_NAMLNG): Ditto.
998         (ETIR_S_C_HEADER_SIZE): Ditto.
999         (EGPS_S_V_ALLOC_64BIT): Ditto.
1000         (DST_S_C_EPILOG): Ditto.
1001         (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1002         (DST_S_C_SRC_INCRLNUM_B): Ditto.
1003         (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1004         (DST_S_L_PCLINE_UNSLONG): Ditto.
1005         (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1006         (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1007         (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1008         (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1009         (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1010         (DST_S_B_SRC_UNSBYTE): Ditto.
1011         (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1012         Add prototypes.
1013         (vms_section, vms_reloc): Remove types.
1014         (hdr_struc): Replaced by ...
1015         (hdr_struct): ... new type.
1016         (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1017         (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1018         (EMH_DATE_LENGTH): Ditto.
1019         (eom_struc): Replaced by ...
1020         (eom_struct): ... new type.
1021         (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1022         (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1023         (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1024         (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1025         (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1026         (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1027         (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1028         (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1029         (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1030         (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1031         (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1032         (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1033         (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1034         (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1035         (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1036         (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1037         (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1038         (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1039         (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1040         (enum file_type_enum): New type.
1041         (struct location_struct): Removed.
1042         (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1043         (struct funcinfo, struct module): Ditto.
1044         (struct vms_private_data_struct): Update fields.
1045         (struct vms_section_data_struct): New type.
1047         * vms.c: Update copyright year, fix comments,
1048         Fix includes for DECC, add prototypes.
1049         (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1050         some initializers.
1051         Use flavour to set is_vax, location_stack is removed.
1052         (struct pair): Declare.
1053         (fill_section_ptr): Initialize variables at declaration.
1054         Add guard to set SECTION_SYM flag, handlde und section.
1055         (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1056         (_bfd_vms_slurp_object_records): New function, replaces previous
1057         vms_object_p.
1058         (vms_slurp_module): New function.
1059         (vms_slurp_image): Ditto.
1060         (vms_object_p): Complete rewrite.
1061         (vms_mkobject): Use is_vax field to slect architecture.
1062         (free_reloc_stream): New function.
1063         (vms_convert_to_var): Ditto.
1064         (vms_convert_to_var_1): Ditto.
1065         (vms_convert_to_var_unix_filename): Ditto.
1066         (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1067         VAR format on VMS.
1068         (vms_new_section_hook): Set alignment to 0, allocate private data.
1069         (vms_get_section_contents): Load content.
1070         (vms_get_symbol_info): Handle undefined section.
1071         (vms_find_nearest_line): Handle.
1072         (alloc_reloc_stream): New function.
1073         (vms_slurp_reloc_table): Ditto.
1074         (vms_get_reloc_upper_bound): Make it real.
1075         (vms_canonicalize_reloc): Do the real work.
1076         (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1077         ALPHA_R_BOH.
1078         (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1079         (vms_set_arch_mach): Check arch.
1080         (vms_set_section_contents): Copy the content after allocation.
1081         (vms_alpha_vec): Update object flags.
1083         * vms-tir.c: Update copyright year, fix comments,
1084         add prototypes for new functions.
1085         (dst_define_location): New function.
1086         (dst_restore_location): New function.
1087         (dst_retrieve_location): New function.
1088         (dst_check_allocation): New function.
1089         (image_dump): Call dst_check_allocation.
1090         (image_write_b): Ditto.
1091         (image_write_w): Ditto.
1092         (image_write_l): Ditto.
1093         (image_write_q): Ditto.
1094         (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1095         STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1096         CTL_STKDL.
1097         Call error handler instead of abort if name is not known.
1098         (etir_sta): Add quarter_relocs argument and set it.
1099         Fix cast.
1100         (etir_sto): Ditto.
1101         (etir_opr): Ditto, return FALSE in case of error.
1102         (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1103         Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1104         (etir_stc): Add quarter_relocs argument and set it, fix cast.
1105         Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1106         Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1107         Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1108         Return FALSE in case of error.
1109         (tir_sta): Change sign of psect.
1110         (tir_ctl): Ditto.
1111         (tir_cmd): Fix cast. Makes tir_table static const.
1112         (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1113         add argument to explain.
1114         (analyze_etir): Initialize maxptr, add quarter_relocs
1115         declaration, move some declarations into inner scopes.
1116         Handle quarter_relocs and STO_IMM.
1117         (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1118         (_bfd_vms_slurp_relocs): New function.
1119         (_bfd_vms_decode_relocs): New function.
1120         (sto_imm): Rewritten.
1121         (start_first_etbt_record): New function.
1122         (start_another_etbt_record): Ditto.
1123         (etir_output_check): Ditto.
1124         (defer_reloc_p): Ditto.
1125         (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1126         a for-loop.  Correctly deals with contents, deals with .vmsdebug,
1127         rewritte relocations handling.
1128         (_bfd_vms_write_tbt): Removed.
1129         (_bfd_vms_write_dbg): Ditto.
1131         * vms-misc.c: Update copyright year, Fix comments.
1132         (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1133         (maybe_adjust_record_pointer_for_object): New function.
1134         (_bfd_vms_get_first_record): New function, replaces ...
1135         (_bfd_vms_get_record): ..  removed.
1136         (_bfd_vms_get_object_record): New function.
1137         (_bfd_vms_get_object_record): New function.
1138         (vms_get_remaining_object_record): New function, replaces ...
1139         (_bfd_vms_get_next_record): ... removed.
1140         (add_new_contents): Removed.
1141         (_bfd_save_vms_section): Removed.
1142         (_bfd_get_vms_section): Removed.
1143         (_bfd_vms_output_flush): Write in VAR format.
1144         (new_symbol): Don't make UND section.
1146         * vms-hdr.c: Update copyright year, update list of record handled.
1147         (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1148         (_bfd_vms_write_hdr): Strip vms and unix patches,
1149         add comments, truncate module name at 31 characters,
1150         use constants instead of hard-coded value,
1151         write BFD version instead of a fixed string.
1152         (_bfd_vms_slurp_ihd): New function.
1153         (_bfd_vms_slurp_isd): Ditto.
1154         (_bfd_vms_slurp_ihs): Ditto.
1155         (new_module): Ditto.
1156         (parse_module): Ditto
1157         (build_module_list): Ditto.
1158         (module_find_nearest_line): Ditto.
1159         (_bfd_vms_find_nearest_dst_line): Ditto.
1160         (vms_slurp_debug): Ditto.
1161         (_bfd_vms_slurp_dbg): Ditto.
1162         (_bfd_vms_slurp_tbt): Ditto.
1163         (_bfd_vms_write_dbg): Ditto.
1164         (_bfd_vms_write_tbt): Ditto.
1166         * vms-gsd.c: Update copyright year, update list of records handled.
1167         (EVAX_LITERALS_NAME): New macro.
1168         (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1169         (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1170         (register_universal_symbol): New function and prototype.
1171         (_bfd_vms_slurp_gsd): Fix indentations and casts,
1172         improve debug messages,
1173         use constants instead of hard-coded value,
1174         fix missing endianness conversion,
1175         handle global symbol (SYMG).
1176         (bfd_vms_set_section_flags): New function.
1177         (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1178         handle section literals,
1179         fix indentation,
1180         handle section bfd and vms flags,
1181         don't output LIB$INITIALIZE symbol,
1182         fix handling of weak symbols,
1183         fix evax vs vax procedure descriptor,
1184         handle absolute symbols.
1186         * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1187         BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1189         * makefile.vms (DEFS): Fix flags for VMS.
1191         * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1193         * bfd-in2.h: Regenerated.
1194         * libbfd.h: Regenerated.
1196 2009-02-20  Cary Coutant  <ccoutant@google.com>
1198         * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1199         in struct stat.
1201 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
1203         PR gas/7059
1204         * coffcode.h (coff_write_object_contents):  Don't let the string
1205         table offset overflow the s_name field when using long section names.
1207 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
1209         * coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
1210         control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1211         * coff-mips.c (mips_ecoff_backend_data):  Likewise.
1212         * coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
1213         control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1214         (bfd_pmac_xcoff_backend_data):  Likewise.
1215         * coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
1216         (bfd_xcoff_aix5_backend_data):  Likewise.
1217         (xcoff64_write_object_contents):  Delete unused long_section_names
1218         local variable.
1219         * coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
1220         name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1221         struct non-const.
1222         * coffcode.h (documentation):  Update to describe long section names.
1223         (COFFLONGSECTIONCATHELPER):  New helper macro.
1224         (BLANKOR1TOODD):  Likewise.
1225         (COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
1226         (COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
1227         (COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
1228         (bfd_coff_set_long_section_names_allowed):  New function.
1229         (bfd_coff_set_long_section_names_disallowed):  Likewise.
1230         (struct bfd_coff_backend_data):  Add new backend hook function
1231         pointer _bfd_coff_set_long_section_names.
1232         (bfd_coff_set_long_section_names):  New backend hook.
1233         (coff_write_object_contents):  Only generate long section names if
1234         bfd_coff_long_section_names() indicates they are currently enabled.
1235         (bfd_coff_std_swap_table):  Make non-const, and initialise long
1236         section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1237         (ticoff0_swap_table):  Likewise to both.
1238         (ticoff1_swap_table):  Again, likewise to both.
1239         * coffgen.c (make_a_section_from_file):  Allow long section names
1240         as inputs even if not currently allowed for outputs.
1241         * ecoff.c (_bfd_ecoff_no_long_sections):  New function.
1242         * efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
1243         * efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1244         * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1245         * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
1246         * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1247         * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1248         * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
1249         * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1250         * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1251         * pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
1252         * pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
1253         * pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
1254         * pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
1255         * pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
1256         * pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
1257         * pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1258         * libcoff-in.h:  Update copyright year to cause updated copyright
1259         year in generated libcoff.h, and fix typo.
1260         * libcoff.h:  Regenerated.
1261         * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
1262         (_bfd_ecoff_no_long_sections):  Add prototype.
1263         * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
1264         * pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
1265         defined by an including .c file.
1266         * ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
1267         long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1268         (ticoff1_swap_table):  Likewise to both.
1270 2009-02-18  Christophe Lyon  <christophe.lyon@st.com>
1272         * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
1273         stub. Catch default case error.
1274         (arm_map_one_stub): Add missing Thumb mapping symbol.
1276 2009-02-18  Bjoern Haase  <bjoern.m.haase@web.de>
1278         PR 9841
1279         * elf32-avr.c: Handle case where no local symbos exist correctly.
1281 2009-02-16  Christophe Lyon  <christophe.lyon@st.com>
1283         bfd/
1284         * elf32-arm.c (arm_long_branch_stub,
1285         arm_thumb_v4t_long_branch_stub,
1286         arm_thumb_thumb_long_branch_stub,
1287         arm_thumb_arm_v4t_long_branch_stub,
1288         arm_thumb_arm_v4t_short_branch_stub,
1289         arm_pic_long_branch_stub):
1290         Renamed to elf32_arm_stub_long_branch_any_any,
1291         elf32_arm_stub_long_branch_v4t_arm_thumb,
1292         elf32_arm_stub_long_branch_thumb_only,
1293         elf32_arm_stub_long_branch_v4t_thumb_arm,
1294         elf32_arm_stub_short_branch_v4t_thumb_arm,
1295         elf32_arm_stub_long_branch_any_any_pic.
1296         (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
1297         arm_thumb_thumb_stub_long_branch,
1298         arm_thumb_arm_v4t_stub_long_branch,
1299         arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
1300         Renamed to arm_stub_long_branch_any_any,
1301         arm_stub_long_branch_v4t_arm_thumb,
1302         arm_stub_long_branch_thumb_only,
1303         arm_stub_long_branch_v4t_thumb_arm,
1304         arm_stub_short_branch_v4t_thumb_arm,
1305         arm_stub_long_branch_any_any_pic.
1307 2009-02-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1309         * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
1310         in branch offset check.
1312 2009-02-15  Alan Modra  <amodra@bigpond.net.au>
1314         * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
1315         add toc.symndx and toc.add.
1316         (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
1317         Set up toc.add.
1318         (get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
1319         callers.
1320         (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
1321         (branch_reloc_hash_match): New function, extracted from..
1322         (ppc64_elf_tls_optimize): ..here.
1323         (ppc64_elf_relocate_section): Properly set addends when optimizing
1324         tls sequences.  Avoid unnecessary reading and writing of insns.
1325         Only redo reloc when symbol changed.  Bypass symbol checks when
1326         using tlsld_got.
1327         * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
1328         (branch_reloc_hash_match): New function, extracted from..
1329         (ppc_elf_tls_optimize): ..here.
1330         (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
1331         Don't clear addend on zapped __tls_get_addr reloc.
1333 2009-02-12  Nick Clifton  <nickc@redhat.com>
1335         PR 9827
1336         * elflink.c (bfd_elf_final_link): When counting the relocations,
1337         if the header size has not been set yet then assume that it will
1338         match the output section's reloc type.
1340 2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
1342         * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
1343         relocatable link.
1345 2009-02-09  Alan Modra  <amodra@bigpond.net.au>
1347         * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
1348         (find_function): Likewise.
1349         (pasted_function): Don't error if no prior function found.
1350         (discover_functions): Revert 2008-12-10 change.  Extend first
1351         function range to start of section.
1353 2009-02-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1355         * elf64-hppa.c: Remove PARAMS macro.  Replace PTR with void *.  Convert
1356         functions to C90.
1357         * elf64-hppa.h: Likewise.
1359 2009-02-06  Joseph Myers  <joseph@codesourcery.com>
1361         * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1362         .sbss handling.
1364 2009-02-04  Alan Modra  <amodra@bigpond.net.au>
1366         * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
1367         Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
1369 2009-02-03  Sandip Matte  <sandip@rmicorp.com>
1371         * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
1372         * archures.c (bfd_mach_mips_xlr): Define.
1373         * bfd-in2.h: Regenerate.
1374         * cpu-mips.c (I_xlr): Define.
1375         (arch_info_struct): Add XLR entry.
1376         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
1377         (mips_set_isa_flags): Handle bfd_mach_mips_xlr
1378         (mips_mach_extensions): Add XLR entry.
1380 2009-02-03  Eric B. Weddington  <eric.weddington@atmel.com>
1382         * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
1384 2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>
1386         * configure.in: AC_SUBST pdfdir.
1387         * Makefile.am: Add install-pdf, install-pdf-am
1388         and install-pdf-recursive targets. Define pdfdir.
1389         * doc/Makefile.am: Define pdf__strip_dir. Add
1390         install-pdf and install-pdf-am targets.
1391         * po/Make-in: Add install-pdf target.
1392         * configure: Regenerate.
1393         * Makefile.in: Regenerate
1394         * doc/Makefile.in: Regenerate.
1396 2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
1398         * bfd-in2.h: Regenerate.
1399         * elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
1400         fields from n_entries to n_slots where appropriate, update comments.
1401         (HOWTO): Add TLS relocations.
1402         (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
1403         (enum elf_m68k_got_offset_size): New enum.
1404         (struct elf_m68k_got_entry.type): Move field to ...
1405         (struct elf_m68k_got_entry_key): ... here.  Update all uses.
1406         (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
1407         functions.
1408         (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
1409         functions.
1410         (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
1411         fields into n_entries array.  Update comments.
1412         (elf_m68k_init_got): Simplify, update all uses.
1413         (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
1414         (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
1415         GOT entries; update name, update all uses.
1416         (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
1417         (elf_m68k_get_got_entry): Update.
1418         (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
1419         simplify.
1420         (elf_m68k_remove_got_entry_type): Simplify.
1421         (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
1422         (elf_m68k_can_merge_gots): Update.
1423         (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
1424         (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
1425         GOT entries, simplify.
1426         (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
1427         (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
1428         field, remove obsoleted local_n_entries field.
1429         (elf_m68k_partition_multi_got_2): New static function.
1430         (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
1431         update.
1432         (elf_m68k_remove_got_entry_type): Update.
1433         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1434         (elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
1435         update of sgot->size and srelgot->size.
1436         (elf_m68k_gc_sweep_hook): Update.
1437         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
1438         (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
1439         TLS relocations.
1440         * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
1441         * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
1443 2009-02-02  DJ Delorie  <dj@redhat.com>
1445         * elf32-mep.c (config_names): Regenerate configuration.
1447 2009-02-02  Alan Modra  <amodra@bigpond.net.au>
1449         * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
1450         (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
1451         * elf.c (bfd_elf_get_str_section): Make static.
1452         (bfd_elf_find_section): Delete.
1453         * libbfd.h: Regenerate.
1455 2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1457         * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
1458         (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
1460 2009-01-31  Alan Modra  <amodra@bigpond.net.au>
1462         * elflink.c (on_needed_list): New function.
1463         (elf_link_add_object_symbols): Link in --as-needed libs if they
1464         satisfy undefined symbols in other libs.
1466 2009-01-30  Julian Brown  <julian@codesourcery.com>
1468         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
1469         EXEC_P or DYNAMIC flags, and skip sections which are being linked
1470         with --just-symbols (-R).
1472 2009-01-29  Adam Nemet  <anemet@caviumnetworks.com>
1474         * dwarf2.c (read_rangelist): Use read_address to read low_pc and
1475         high_pc in order to properly sign-extend VMAs.
1477 2009-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
1478             Mark Shinwell  <shinwell@codesourcery.com>
1479             Catherine Moore  <clm@codesourcery.com>
1481         * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
1483 2009-01-28  Catherine Moore <clm@codesourcery.com>
1485         * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
1486         SEC_LOAD for dynamic relocation sections.
1488 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
1490         * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
1491         (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
1492         the size of local TLS data.
1494 2009-01-27  Andreas Schwab  <schwab@suse.de>
1496         * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
1497         architectures in the archive.
1499 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
1501         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
1502         <R_CRIS_32_DTPREL>: Correct relocation value.
1504         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
1505         <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
1506         symbols with non-default visibility.
1508 2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
1510         * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
1511         describing the trampolines.
1512         (ppc_elf_relocate_section): Update relocs to describe the
1513         trampolines.
1515 2009-01-25  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1517         * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
1518         branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
1519         and R_PARISC_PCREL12F relocations.
1521 2009-01-24  Alan Modra  <amodra@bigpond.net.au>
1523         PR 6022
1524         * elflink.c (find_version_for_sym): New function split out from,
1525         but without export_dynamic test, ..
1526         (_bfd_elf_link_assign_sym_version): ..here.
1527         (_bfd_elf_export_symbol): Use it.
1529 2009-01-23  Alan Modra  <amodra@bigpond.net.au>
1531         * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
1532         (struct elf_info_failed, struct elf_find_verdep_info): Move to..
1533         * elflink.c: ..here, somewhat modified.
1534         * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
1535         _bfd_elf_link_find_version_dependencies,
1536         _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
1537         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1538         _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
1539         declare..
1540         * elflink.c: ..and make static here.
1541         (_bfd_elf_link_find_version_dependencies): Adjust for removal
1542         of output_bfd from struct elf_find_verdep_info.
1543         (_bfd_elf_link_assign_sym_version): Similarly adjust to use
1544         struct elf_info_failed.
1545         (bfd_elf_size_dynamic_sections): Adjust.
1547 2009-01-22  Alan Modra  <amodra@bigpond.net.au>
1549         PR 6832
1550         * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
1551         after comp_unit_find_line call.
1553 2009-01-21  Nick Clifton  <nickc@redhat.com>
1555         PR 9769
1556         * vmsutil.c (vms_file_stats_name): Remove use of unsupported
1557         tm_gmtoff field in struct tm.
1559 2009-01-21  Alan Modra  <amodra@bigpond.net.au>
1561         * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
1562         * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
1563         sections in soft-icache lines unless non_ia_text.  Don't add
1564         rodata if doing so would exceed line size.
1566 2009-01-19  Hans-Peter Nilsson  <hp@axis.com>
1568         * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
1569         types than bfd_link_hash_indirect, before early return, call
1570         _bfd_elf_link_hash_copy_indirect.
1572 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
1574         * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
1575         * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
1576         * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
1577         (elf_backend_obj_attrs_order): New define.
1578         * elfxx-target.h (elf_backend_obj_attrs_order): New define.
1579         (elfNN_bed): Add elf_backend_obj_attrs_order.
1581 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
1583         * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
1584         (obj_attr_size): Likewise.
1585         (write_obj_attribute): Likewise.
1586         (_bfd_elf_copy_obj_attributes): Likewise.
1587         (_bfd_elf_parse_attributes): Likewise.
1588         * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
1589         (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
1590         (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
1591         (ATTR_TYPE_HAS_NO_DEFAULT): New define.
1592         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
1593         with macros.
1595 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
1597         * elf-attrs.c (is_default_attr): Support defaultless attributes.
1598         (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
1599         (bfd_elf_add_obj_attr_string): Likewise.
1600         (bfd_elf_add_obj_attr_int_string): Likewise.
1601         (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
1602         * elf-bfd.h (struct obj_attribute): Document new flag bit.
1603         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
1604         Tag_nodefaults has no default value.
1605         (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
1606         comment to reflect the new state.
1608 2009-01-19  Alan Modra  <amodra@bigpond.net.au>
1610         PR 9695
1611         * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
1612         (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
1613         (adjust_z_magix): Delete dead code handling QMAGIC.
1615 2009-01-16  Kai Tietz  <kai.tietz@onevision.com>
1617         * coffcode.h (styp_to_sec_flags): Correct interpretation of
1618         IMAGE_SCN_MEM_DISCARDABLE.
1620 2009-01-16  Alan Modra  <amodra@bigpond.net.au>
1622         * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
1623         SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
1624         * configure.in (commonbfdlib): Delete.
1625         (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
1626         (SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
1627         is available, not just for linux.
1628         * po/SRC-POTFILES.in: Regenerate.
1629         * Makefile.in: Regenerate.
1630         * configure: Regenerate.
1632 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
1633             Julian Brown   <julian@codesourcery.com>
1635         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
1636         ARM attributes in ABI 2.07.
1637         * elf32-arm.c (get_secondary_compatible_arch): New function.
1638         (set_secondary_compatible_arch): New function.
1639         (tag_cpu_arch_combine): New function.
1640         (elf32_arm_copy_one_eabi_other_attribute): Delete function.
1641         (elf32_arm_copy_eabi_other_attribute_list): Delete function.
1642         (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
1643         make it fit with order_01243.
1644         Add support for Tag_also_compatible_with,
1645         Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
1646         Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
1647         Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
1648         Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
1649         Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
1650         Tag_VFP_arch and Tag_ABI_FP_16bit_format.
1651         Rework the way unknown attributes are handled.
1652         Defer errors until all attributes have been processed.
1654 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
1656         * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
1657         bfd_elf_add_obj_attr_int_string.
1658         Read Tag_compatibility from its new location in the attribute array,
1659         rather than the attribute list.
1660         (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
1661         bfd_elf_add_obj_attr_int_string.
1662         (_bfd_elf_parse_attributes): Likewise.
1663         (_bfd_elf_merge_object_attributes): There's now only one
1664         Tag_compatibility, and it's in the array, not the list.
1665         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
1666         Tag_compatibility.
1667         (bfd_elf_add_obj_attr_compat): Rename to
1668         bfd_elf_add_obj_attr_int_string.
1669         (bfd_elf_add_proc_attr_compat): Rename to
1670         bfd_elf_add_proc_attr_int_string.
1671         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
1672         Tag_compatibility.
1674 2009-01-15  Douglas B Rupp  <rupp@gnat.com>
1676         * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
1677         (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
1678         (vmsutil.lo): Add dependency rule.
1679         * Makefile.in: Regenerate.
1680         * config.bfd (ia64*-*-*vms*): Add case.
1681         * configure.in (bfd_elf64_ia64_vms_vec): Add case.
1682         * configure: Regenerate.
1683         * vmsutil.c: New file.
1684         * vmsutil.h: New file.
1685         * elf-bfd.h (struct bfd_elf_special_section): Change type of
1686         attr to bfd_vma.
1687         * elfxx-ia64.c (elfNN_vms_post_process_headers,
1688         elfNN_vms_section_processing, elfNN_vms_final_write_processing,
1689         elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
1690         elfNN_vms_object_p): New functions
1691         * targets.c (bfd_elf64_ia64_vms_vec): New target.
1693 2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>
1695         PR ld/9727
1696         * elflink.c (elf_gc_sweep): Exclude the group section if the
1697         first member of the section group is excluded.
1699 2009-01-14  Alan Modra  <amodra@bigpond.net.au>
1701         PR 9735
1702         * syms.c (_bfd_stab_section_find_nearest_line): Don't free
1703         saved filename, use bfd_alloc rather than bfd_malloc for it.
1705 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
1707         * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
1709 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
1711         * elf32-spu.c (remove_cycles): Always set call->max_depth.
1713 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
1715         * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
1717 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
1719         * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
1720         num_lines_log2.
1721         (struct got_entry): Add br_addr.
1722         (struct call_info): Add priority.
1723         (struct function_info): Add lr_store and sp_adjust.
1724         (spu_elf_setup): Init line_size_log2 and num_lines_log2.
1725         (spu_elf_find_overlays): For soft-icache, mark any section within cache
1726         area as an overlay, and check that no other overlays exist.  Look up
1727         icache overlay manager entry sym.
1728         (BRA_STUBS, BRA, BRASL): Define.
1729         (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
1730         (needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
1731         in branch insn.
1732         (count_stub, build_stub): Support soft-icache.
1733         (build_spuear_stubs, process_stubs): Adjust build_stub call.
1734         (spu_elf_size_stubs): Size soft-icache stubs.
1735         (overlay_index): New function.
1736         (spu_elf_build_stubs): Make static.  Support soft-icache.
1737         (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
1738         (find_function_stack_adjust): Save lr store and stack adjust insn
1739         offsets.
1740         (maybe_insert_function): Adjust find_function_stack_adjust call.
1741         (mark_functions_via_relocs): Retrieve priority.
1742         (remove_cycles): Only warn about pruned arcs when stack_analysis.
1743         (sort_calls): Sort by priority first.
1744         (mark_overlay_section): Ignore .ovl.init.
1745         (sum_stack): Only print when stack_analysis.
1746         (print_one_overlay_section): New function, extracted from..
1747         (spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
1748         (spu_elf_stack_analysis): Only print when htab->stack_analysis.
1749         (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
1750         analysis.  Call spu_elf_build_stubs.
1751         (spu_elf_relocate_section): For soft-icache encode overlay index
1752         into addresses.
1753         (spu_elf_output_symbol_hook): Support soft-icache.
1754         (spu_elf_modify_program_headers: Likewise.
1756         * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
1757         num_regions to num_lines.  Add line_size and max_branch.
1758         (enum _ovly_flavour): Add ovly_soft_icache.
1759         (spu_elf_build_stubs): Delete.
1761 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
1763         * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
1764         relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
1766 2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
1768         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1769         <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
1770         the program, the known offset starts at the negative size of the
1771         TLS section.
1772         <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
1773         Similar.
1775 2009-01-05  Joel Sherrill <joel.sherrill@oarcorp.com>
1777         * config.bfd: Add lm32-*-rtems*.
1779 2009-01-03  H.J. Lu  <hongjiu.lu@intel.com>
1781         * coff-ppc.c: Add 2009 to Copyright.
1782         * elf32-cris.c: Likewise.
1783         * elflink.c: Likewise.
1785 2009-01-03  Hans-Peter Nilsson  <hp@axis.com>
1787         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
1788         gotplt_index to rela_plt_index.  Adjust for R_CRIS_DTPMOD entry.
1790 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
1792         PR ld/9679
1793         * elflink.c (elf_merge_st_other): New.
1794         (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
1795         hide them if needed.
1796         (elf_link_add_object_symbols): Updated.
1798 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
1800         PR ld/9676
1801         * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
1802         ref_dynamic and dynamic_def fields when setting def_regular
1803         to 1.
1805 2009-01-02  Curtis Mackie  <curtmackevo@gmail.com>
1807         PR 9682
1808         * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
1809         literal.
1811 For older changes see ChangeLog-2008
1813 Local Variables:
1814 mode: change-log
1815 left-margin: 8
1816 fill-column: 74
1817 version-control: never
1818 End: