merge from gcc
[binutils.git] / bfd / ChangeLog
blobea2f0a085085714088e5ba2313ddcc0ea8d282ae
1 2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
3         * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
4         h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
5         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
7 2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
9         * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
10         GOT entry for STT_GNU_IFUNC symbol with pointer equality.
11         (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
12         against STT_GNU_IFUNC symbols for static executables.
13         (elf_i386_finish_dynamic_symbol): Load GOT entry with
14         PLT entry for STT_GNU_IFUNC symbol with pointer equality.
16         * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
17         GOT entry for STT_GNU_IFUNC symbol with pointer equality.
18         (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
19         PLT entry for STT_GNU_IFUNC symbol with pointer equality.
21 2009-06-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
23         * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
24         symbols to be left unimported when linking statically.
25         * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
26         code when linking statically.
28 2009-06-02  H.J. Lu  <hongjiu.lu@intel.com>
30         * elf32-i386.c (elf_i386_check_relocs): Increment
31         got.refcount for R_386_GOT32/R_386_GOTOFF relocations
32         against STT_GNU_IFUNC symbol.
33         (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
34         local STT_GNU_IFUNC definition is used.
35         (elf_i386_relocate_section): Handle got.offset != -1 for
36         R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
37         symbol.
39         * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
40         got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
41         relocations against STT_GNU_IFUNC symbol.
42         (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
43         local STT_GNU_IFUNC definition is used.
44         (elf64_x86_64_relocate_section): Handle got.offset != -1
45         for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
46         STT_GNU_IFUNC symbol.
48 2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
50         PR ld/10205
51         * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
52         (elf_i386_reloc_type_lookup): Likewise.
53         (R_386_tls): Removed.
54         (R_386_irelative): New.
55         (R_386_vt_offset): Updated.
56         (elf_i386_rtype_to_howto): Likewise.
57         (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
58         (elf_i386_link_hash_table_create): Initialize igotplt,
59         iplt and irelplt.
60         (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
61         (elf_i386_adjust_dynamic_symbol): Likewise.
62         (elf_i386_allocate_dynrelocs): Likewise.
63         (elf_i386_relocate_section): Likewise.
64         (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
65         sections.
66         (elf_i386_finish_dynamic_symbol): When building a static
67         executable, use .iplt, .igot.plt and .rel.iplt sections for
68         STT_GNU_IFUNC symbols.  Generate R_386_IRELATIVE relocation for
69         locally defined STT_GNU_IFUNC symbol.
71         * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
72         (x86_64_reloc_map): Likewise.
73         (R_X86_64_standard): Updated.
74         (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
75         (elf64_x86_64_link_hash_table_create): Initialize igotplt,
76         iplt and irelplt.
77         (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
78         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
79         (elf64_x86_64_allocate_dynrelocs): Likewise.
80         (elf64_x86_64_relocate_section): Likewise.
81         (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
82         sections.
83         (elf64_x86_64_finish_dynamic_symbol): When building a static
84         executable, use .iplt, .igot.plt and .rela.iplt sections for
85         STT_GNU_IFUNC symbols.  Generate R_X86_64_IRELATIVE relocation
86         for locally defined STT_GNU_IFUNC symbol.
88         * reloc.c (BFD_RELOC_386_IRELATIVE): New.
89         (BFD_RELOC_X86_64_IRELATIVE): Likewise.
91         * bfd-in2.h: Regenerated.
92         * libbfd.h: Likewise.
94 2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
96         * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
97         (_bfd_elf_make_ifunc_reloc_section): Removed.
98         (_bfd_elf_is_ifunc_symbol): Likewise.
99         (_bfd_elf_create_static_ifunc_sections): New.
101         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
102         symbol check to ...
103         (elf_link_add_object_symbols): Here.
104         (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
105         STT_GNU_IFUNC symbol.
106         (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
107         if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
108         (IFUNC_INFIX): Removed.
109         (get_ifunc_reloc_section_name): Likewise.
110         (_bfd_elf_make_ifunc_reloc_section): Likewise.
111         (_bfd_elf_is_ifunc_symbol): Likewise.
112         (_bfd_elf_create_static_ifunc_sections): New.
114 2009-05-29  H.J. Lu  <hongjiu.lu@intel.com>
116         * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
117         (create_got_section): Likewise.
118         (allocate_dynrelocs): Likewise.
119         (readonly_dynrelocs): Likewise.
120         (set_tls_module_base): Likewise.
121         (dtpoff_base): Likewise.
122         (tpoff): Likewise.
123         (elf_i386_link_hash_table_create): Updated.
124         (elf_i386_create_dynamic_sections): Likewise.
125         (elf_i386_check_relocs): Likewise.
126         (elf_i386_size_dynamic_sections): Likewise.
127         (elf_i386_relocate_section): Likewise.
129         * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
130         (create_got_section): Likewise.
131         (allocate_dynrelocs): Likewise.
132         (readonly_dynrelocs): Likewise.
133         (set_tls_module_base): Likewise.
134         (dtpoff_base): Likewise.
135         (tpoff): Likewise.
136         (elf64_x86_64_link_hash_table_create): Updated.
137         (elf64_x86_64_create_dynamic_sections): Likewise.
138         (elf64_x86_64_check_relocs): Likewise.
139         (elf64_x86_64_size_dynamic_sections): Likewise.
140         (elf64_x86_64_relocate_section): Likewise.
142 2009-05-28  Nick Clifton  <nickc@redhat.com>
144         * targets.c (_bfd_target_vector): Only include plugin target in
145         all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
147 2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
149         * elf32-spu.c (struct call_info): New member broken_cycle.
150         (remove_cycle): Instead of physically removing call_info structures
151         to break call graph cycles, mark them using the broken_cycle flag.
152         (mark_overlay_section): Respect broken_cycle flag.
153         (unmark_overlay_section): Likewise.
154         (collect_lib_sections): Likewise.
155         (collect_overlays): Likewise.
156         (sum_stack): Likewise.
158 2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
160         * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
161         (mark_functions_via_relocs): Initialize callee->count to 1.
162         (pasted_function): Likewise.
163         (spu_elf_auto_overlay): Honor call counts when determining number
164         of stubs required in software i-cache mode.
166 2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
168         * plugin.c (program_name): Remove.
169         (plugin_program_name): New.
170         (bfd_plugin_set_program_name): New.
171         (try_load_plugin): Use plugin_program_name.
172         * plugin.h (bfd_plugin_set_program_name): New.
174 2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
176         * aclocal.m4: Include ../config/plugins.m4.
177         * configure.in: Use AC_PLUGINS.
178         * configure: Regenerate.
179         * Makefile.in: Regenerate.
180         * doc/Makefile.in: Regenerate.
182 2009-05-27  Nathan Sidwell  <nathan@codesourcery.com>
184         * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
185         link.
186         * bout.c (b_out_bfd_relax_section): Reject relocatable links.
187         * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
188         * elf32-avr.c (elf32_avr_relax_section): Likewise.
189         * elf32-frv.c (elf32_avr_relax_section): Likewise.
190         * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
191         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
192         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
193         * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
194         * reloc.c (bfd_generic_relax_section): Likewise.
195         * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
196         * vms.c (vms_bfd_relax_section): Likewise.
198 2009-05-26  H.J. Lu  <hongjiu.lu@intel.com>
200         * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
202         * elf32-i386.c (is_indirect_symbol): Renamed to ...
203         * elflink.c (_bfd_elf_is_ifunc_symbol): This.
205         * elf32-i386.c (allocate_dynrelocs): Updated.
206         (elf_i386_relocate_section): Likewise.
207         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
208         (elf64_x86_64_relocate_section): Likewise.
210         * elf64-x86-64.c (is_indirect_symbol): Removed.
212 2009-05-26  Nick Clifton  <nickc@redhat.com>
214         * po/id.po: Updated Indonesian translation.
216 2009-05-26  Rafael Avila de Espindola  <espindola@google.com>
218         * Makefile.am: Run "make dep-am".
219         (AM_CPPFLAGS): New.
220         (LIBDL): New.
221         (ALL_MACHINES): Add cpu-plugin.lo.
222         (ALL_MACHINES_CFILES): Add cpu-plugin.c.
223         (BFD32_BACKENDS): Add plugin.lo.
224         (BFD32_BACKENDS_CFILES): Add plugin.c.
225         (libbfd_la_LIBADD): Add LIBDL
226         * archures.c (bfd_architecture): Add bfd_arch_plugin.
227         (bfd_plugin_arch): Declare.
228         * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
229         * bfd.c (bfd): Add plugin_data.
230         * config.bfd: Handle the plugin target.
231         * configure.in: Check for --enable-plugins.
232         (LT_INIT): Use the dlopen option.
233         * cpu-plugin.c: New.
234         * plugin.c: New.
235         * plugin.h: New.
236         * targets.c (plugin_vec): Declare.
237         (_bfd_target_vector): Add plugin_vec.
238         * Makefile.in: Regenerate.
239         * bfd-in2.h: Regenerate.
240         * configure: Regenerate.
242 2009-05-26  Alan Modra  <amodra@bigpond.net.au>
244         * dep-in.sed: Don't modify .o to .lo here.  Output one filename
245         per line with all lines having continuation backslash.  Prefix
246         first line with "A", following lines with "B".
247         * Makefile.am (DEP): Don't use dep.sed here.
248         (DEP1): Run $MKDEP on single files, modify .o to .lo here.  Use
249         dep.sed here on dependencies, sort and uniq.
250         * Makefile.in: Regenerate.
252 2009-05-25  Tristan Gingold  <gingold@adacore.com>
254         * makefile.vms: Add verilog.obj to object list OBJS.
256 2009-05-24  Alan Modra  <amodra@bigpond.net.au>
258        * bfdio.c (bfd_seek): Formatting.  Ensure newly allocated memory
259        for BFD_IN_MEMORY is cleared.
260        (bfd_bwrite): Zero excess memory allocated.
262 2009-05-22  Julian Brown  <julian@codesourcery.com>
264         * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
265         macros.
266         (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
267         (elf32_arm_stub_a8_veneer_blx): New stub sequences.
268         (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
269         arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
270         (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
271         (a8_erratum_fix, a8_erratum_reloc): New structs.
272         (elf32_arm_link_hash_table): Add a8_erratum_fixes,
273         num_a8_erratum_fixes, fix_cortex_a8 fields.
274         (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
275         (elf32_arm_add_stub): Split into two parts, creating...
276         (elf32_arm_create_or_find_stub_sec): New function.
277         (elf32_arm_final_link_relocate): Add forward declaration.
278         (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
279         relocations, multiple relocations per stub.
280         (find_stub_size_and_template): New (using parts of arm_size_one_stub).
281         (arm_size_one_stub): Use find_stub_size_and_template.
282         (a8_reloc_compare): New.
283         (find_thumb_glue): Add forward declaration.
284         (cortex_a8_erratum_scan): New.
285         (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
286         (bfd_elf32_arm_set_cortex_a8_fix): New.
287         (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
288         (arm_map_one_stub): Add THUMB32_TYPE support.
289         (a8_branch_to_stub_data): New.
290         (make_branch_to_a8_stub): New.
291         (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
292         * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
293         (bfd_elf32_arm_set_target_relocs): Add argument for controlling
294         Cortex-A8 erratum workaround.
295         * bfd-in2.h: Regenerate.
297 2009-05-22  Alan Modra  <amodra@bigpond.net.au>
299         * Makefile.am: Run "make dep-am".
300         * Makefile.in: Regenerate.
301         * po/SRC-POTFILES.in: Regenerate.
303 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
305         * elflink.c (elf_link_input_bfd): Correct *pindex change in last
306         commit.
308 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
310         * elf-bfd.h (struct elf_backend_data
311         <elf_backend_link_output_symbol_hook>): Return an int.
312         * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
313         symbols on deleted .opd entries.
314         * elflink.c (elf_link_output_sym): Return without outputting sym
315         if output_symbol_hook returns 2.
316         (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
317         Abort if we must not discard sym.
318         (elf_link_input_bfd): Similarly, don't set finfo->indices for
319         local syms.
320         (bfd_elf_final_link): Adjust elf_link_output_sym calls.
321         * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
322         elf_backend_link_output_symbol_hook return type change.
323         * elf32-arm.c (output_arch_syminfo): Likewise.
324         (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
325         (elf32_arm_output_arch_local_syms): Likewise.
326         * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
327         * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
328         (bfd_score_elf_link_output_symbol_hook): Likewise.
329         * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
330         * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
331         * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
332         * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
333         * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
334         * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
335         * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
336         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
337         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
338         * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
339         * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
341 2009-05-21  Alan Modra  <amodra@bigpond.net.au>
343         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
344         out of range .opd symbols.
346 2009-05-21  Dave Korn  <dave.korn.cygwin@gmail.com>
348         * coffgen.c (coff_print_symbol):  Use bfd_fprintf_vma, not
349         fprintf_vma directly.
350         * peXXigen.c (pe_print_edata):  Likewise.
351         (pe_print_pdata):  Likewise.
352         (_bfd_XX_print_ce_compressed_pdata):  Likewise.
353         (_bfd_XX_print_private_bfd_data_common):  Likewise.
355 2009-05-19  Dave Korn  <dave.korn.cygwin@gmail.com>
357         * cofflink.c (process_embedded_commands):  Ignore "-aligncomm".
359 2009-05-15  Andrew Stubbs  <ams@codesourcery.com>
360             Paul Brook  <paul@codesourcery.com>
362         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
363         fix discarded sections.
365 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
367         * elf32-spu.c (mark_overlay_section): Move .init and .fini
368         sections into the software icache.
370 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
372         * elf32-spu.c (build_stub): Always build "compact" sofware
373         i-cache stubs.
375 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
377         * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
378         (spu_elf_setup): Initialize it.
379         (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
380         Update to new-sytle cache manager data structures.
381         (spu_elf_build_stubs): Generate new-style cache manager data
382         structures and symbols.
383         (spu_elf_auto_overlay): Update size computation.
385 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
387         * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
388         segments first amongst the program headers.
390 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
392         * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
393         into addresses for relocation types that look at high bits.  Remove
394         special handling of relocation overflow warnings.
396 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
398         * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
399         control flow graph between fragments of a function.
401 2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
403         * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
404         generate only a 16-byte .toe section.
405         (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
407 2009-05-14  Alan Modra  <amodra@bigpond.net.au>
409         * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
410         (spu_elf_place_overlay_data): ..here.  New function.
411         * elf32-spu.h (spu_elf_place_overlay_data): Declare.
413 2009-05-13  Andrew Jenner  <andrew@codesourcery.com>
415         * elf32-arm.c: Move sysdep.h to start of file.
417 2009-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
419         * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
420         start of overlays.
421         (spu_elf_build_stubs): Don't define __icache_tagbase.  Define
422         __icache_tag_array and __icache_tag_array_size.
424 2009-05-11  Masaki Muranaka  <monaka@monami-software.com>
426         * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
427         ATTRIBUTE_UNUSED.
428         (bfinfdpic_link_omit_section_dynsym): Likewise.
429         (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
431 2009-05-05  Paul Brook  <paul@codesourcery.com>
433         * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
434         * bfd-in2.h: Regenerate.
435         * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
436         (_arm_elf_section_data): Add text and exidx fields.
437         (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
438         insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
439         copy_exidx_entry): New functions.
440         (elf32_arm_write_section): Fixup .ARM.exidx contents.
442 2009-05-05  Christophe lyon  <christophe.lyon@st.com>
444         * elf32-arm.c (DEF_STUBS): New helper define.
445         (DEF_STUB): Likewise.
446         (stub_def): New type.
447         (stub_definitions): New array, containing stub template pointers
448         and sizes.
449         (arm_size_one_stub): Make use of stub_definitions.
451 2009-05-04  Dave Korn  <dave.korn.cygwin@gmail.com>
453         * elflink.c (find_version_for_sym):  Remove from here, ...
454         * linker.c (bfd_find_version_for_sym):  ... rename, replace
455         here, make public and update all callers.
456         * bfd-in2.h:  Regenerate.
458 2009-04-30  Nick Clifton  <nickc@redhat.com>
460         * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
461         section pointer.
462         (struct elf_obj_data): Add has_ifunc_symbols boolean.
463         * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
464         into a STT_GNU_IFUNC symbol type.
465         (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
466         type.
467         (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
468         the binary contains ifunc symbols.
469         * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
470         symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
471         * elf32-i386.c (is_indirect_function): New function.
472         (elf_i386_check_relocs): Create an ifunc output section.
473         (allocate_dynrelocs): Create dynamic relocs in the ifunc output
474         section if necessary.
475         (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
476         if necessary.
477         (elf_i386_add_symbol_hook): New function. Set the
478         has_ifunc_symbols field of the elf_obj_data structure if an ifunc
479         symbol is encountered.
480         (elf_backend_post_process_headers): Define.
481         (elf_backend_add_symbol_hook): Define.
482         (elf_i386_post_process_headers): Rename to
483         elf_i388_fbsd_post_process_headers.
484         * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
485         (is_indirect_function): New function.
486         (elf64_x86_64_check_relocs): Create an ifunc output section.
487         (allocate_dynrelocs): Create dynamic relocs in the ifunc output
488         section if necessary.
489         (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
490         symbol if necessary.
491         (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
492         elf_obj_data structure if an ifunc symbol is encountered.
493         (elf_backend_post_process_headers): Define.
494         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
495         if we have ifunc symbols to handle.
496         (get_ifunc_reloc_section_name): New function.  Computes the name
497         for an ifunc section.
498         (_bfd_elf_make_ifunc_reloc_section): New function.  Creates a
499         section to hold ifunc relocs.
500         * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
501         (bfd_print_symbol_vandf): Handle ifunc symbols.
502         (bfd_decode_symclass): Likewise.
503         * bfd-in2.h: Regenerate.
505 2009-04-30  Joseph Myers  <joseph@codesourcery.com>
507         * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
508         MOVW and MOVT relocations in a shared library link.
510 2009-04-27  Anthony Green  <green@moxielogic.com>
512         * verilog.c: New file.
513         * Makefile.am (BFD32_LIBS): Add verilog.c.
514         (BFD32_LIBS_CFILES): Add verilog.c.
515         (verilog.lo): New build rule.
516         * Makefile.in: Rebuilt.
517         * targets.c: Add verilog support.
518         * bfd.c (tdata union): Add Verilog private data field.
519         * bfd-in2.h: Regenerate.
521 2009-04-27  H.J. Lu  <hongjiu.lu@intel.com>
523         * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
524         copy pe_opthdr.
526 2009-04-23  Matthias Klose  <doko@ubuntu.com>
528         * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
530 2009-04-22  Christophe Lyon  <christophe.lyon@st.com>
532         PR9743
533         * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
534         R_ARM_JUMP24 and R_ARM_PLT32 relocations.
535         (elf32_arm_size_stubs): Likewise.
536         (record_thumb_to_arm_glue): Deleted unused function.
537         (bfd_elf32_arm_process_before_allocation): No longer handle
538         R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
539         (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
540         R_ARM_JUMP24 and R_ARM_PLT32 relocations.
542 2009-04-21  Daniel Jacobowitz  <dan@codesourcery.com>
544         * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
545         (elf32_arm_write_section): Declare early.
546         (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
547         (arm_allocate_glue_section_space): Exclude empty sections.
548         (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
549         (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
550         BFD.
551         (elf32_arm_output_glue_section, elf32_arm_final_link): New.
552         (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
553         (elf32_arm_size_dynamic_sections): Allocate interworking
554         sections here.
555         (bfd_elf32_bfd_final_link): Define.
557 2009-04-21  H.J. Lu  <hongjiu.lu@intel.com>
559         * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
560         
561         * coffcode.h (coff_compute_section_file_positions): Clear
562         D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
564         * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
565         force_minimum_alignment.
567         * libcoff.h: Regenerated.
569         * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
570         (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
572         * peicode.h (pe_mkobject): Don't set force_minimum_alignment
573         nor target_subsystem.
575         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
576         force_minimum_alignment nor target_subsystem.
578 2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
580         * coff-x86_64.c (PEI_HEADERS): Protect includes.
581         (bfd_pe_print_pdata): Remove #ifdef PE variation.
582         * pei-x86_64.c (PEI_HEADERS): Define to prevent double
583         include in coff-x86_64.c of headers.
584         (PDATA_ROW_SIZE): New define.
585         (pex_regs[]): New static array.
586         (pex64_get_runtime_function): New static function.
587         (pex64_get_unwind_info): Likewise.
588         (pex64_get_scope_entry): Likewise.
589         (pex64_xdata_print_uwd_codes): Likewise.
590         (pex64_get_section_by_rva): Likewise.
591         (pex64_dump_xdata): Likewise.
592         (pex64_bfd_print_pdata): Likewise.
593         (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
594         * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
595         * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
597 2009-04-19  Peter O'Gorman  <binutils@mlists.thewrittenword.com>
598             Alan Modra  <amodra@bigpond.net.au>
599             Dave Korn  <dave.korn.cygwin@gmail.com>
601         * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
602         long names and non-NUL-terminated strings.
604 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
606         * bfd-in2.h: Regenerated.
608 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
610         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
611         IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
613 2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
615         PR binutils/10074
616         * coffcode.h (bfd_pei_p): New.
618         * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
619         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
620         bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
621         bfd_efi_rtdrv_ia64_vec.  Replace bfd_efi_app_ia32_vec,
622         bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
623         i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
625         * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
626         bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
627         bfd_efi_rtdrv_x86_64_vec,
628         bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec.  Replace
629         bfd_efi_ia64_vec with bfd_pei_ia64_vec.
630         * targets.c: Likewise.
632         * configure: Regenerated.
633         * libcoff.h: Likewise.
634         * Makefile.in: Likewise.
636         * efi-app-ia32.c: Removed.
637         * efi-app-x86_64.c: Likewise.
638         * efi-bsdrv-ia32.c: Likewise.
639         * efi-bsdrv-ia64.c: Likewise.
640         * efi-bsdrv-x86_64.c: Likewise.
641         * efi-rtdrv-ia32.c: Likewise.
642         * efi-rtdrv-ia64.c: Likewise.
643         * efi-rtdrv-x86_64.c: Likewise.
644         * efi-rtdrv-ia32.c: Likewise.
646         * efi-app-ia64.c: Moved to ...
647         * pei-ia64.c: This.
648         (TARGET_SYM): Set to bfd_pei_ia64_vec.
649         (TARGET_NAME): Set to pei-ia64.
651         * libpei.h (bfd_target_pei_p): Removed.
652         (bfd_target_pei_arch): Likewise.
653         (bfd_target_efi_app_p): Likewise.
654         (bfd_target_efi_app_arch): Likewise.
655         (bfd_target_efi_bsdrv_p): Likewise.
656         (bfd_target_efi_bsdrv_arch): Likewise.
657         (bfd_target_efi_rtdrv_p): Likewise.
658         (bfd_target_efi_rtdrv_arch): Likewise.
659         (bfd_pe_executable_p): Likewise.
661         * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
662         efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
663         (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
664         and efi-rtdrv-ia32.c.
665         (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
666         efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
667         efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
668         (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
669         efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
670         efi-rtdrv-x86_64.c. Add pei-ia64.c.
671         (efi-app-ia64.lo): Removed.
672         (efi-bsdrv-ia32.lo): Likewise.
673         (efi-rtdrv-ia32.lo): Likewise.
674         (efi-app-ia64.lo): Likewise.
675         (efi-bsdrv-ia64.lo): Likewise.
676         (efi-rtdrv-ia64.lo): Likewise.
677         (efi-app-x86_64.lo): Likewise.
678         (efi-bsdrv-x86_64.lo): Likewise.
679         (efi-rtdrv-x86_64.lo): Likewise.
680         (pei-ia64.lo): New.
682         * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
683         with bfd_pei_p.
684         (arch_type): Removed.
685         (pe_arch): Likewise.
686         (pe_bfd_object_p): Just return coff_object_p.
688         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
689         bfd_pe_executable_p with bfd_pei_p.
691 2009-04-17  Christophe Lyon  <christophe.lyon@st.com>
693         * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
694         PLT entries to an undefined symbol when generating a shared
695         library.
697 2009-04-17  Nick Clifton  <nickc@redhat.com>
699         PR 9909
700         * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
702 2009-04-16  Richard Sandiford  <r.sandiford@uk.ibm.com>
704         * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
705         * aout-target.h (MY_bfd_define_common_symbol): Likewise.
706         * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
707         * binary.c (binary_bfd_define_common_symbol): Likewise.
708         * bout.c (b_out_bfd_define_common_symbol): Likewise.
709         * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
710         * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
711         * coffcode.h (coff_bfd_define_common_symbol): Likewise.
712         * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
713         * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
714         * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
715         * ieee.c (ieee_bfd_define_common_symbol): Likewise.
716         * ihex.c (ihex_bfd_define_common_symbol): Likewise.
717         * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
718         * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
719         * mmo.c (mmo_bfd_define_common_symbol): Likewise.
720         * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
721         * oasys.c (oasys_bfd_define_common_symbol): Likewise.
722         * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
723         * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
724         * som.c (som_bfd_define_common_symbol): Likewise.
725         * srec.c (srec_bfd_define_common_symbol): Likewise.
726         * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
727         * versados.c (versados_bfd_define_common_symbol): Likewise.
728         * vms.c (vms_bfd_define_common_symbol): Likewise.
729         * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
730         * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
731         * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
732         (pmac_xcoff_vec): Likewise.
733         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
734         (aix5coff64_vec): Likewise.
735         * linker.c (bfd_generic_define_common_symbol): New function.
736         * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
737         (_bfd_define_common_symbol): New field.
738         * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
739         * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
740         (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
741         symbols here.
742         * bfd-in2.h: Regenerate.
743         * libbfd.h: Likewise.
744         * libcoff.h: Likewise.
746 2009-04-15  Anthony Green  <green@moxielogic.com>
748         * targets.c: Add moxie support.
749         * Makefile.am: Ditto.
750         * Makefile.in: Rebuilt.
751         * cpu-moxie.c, elf32-moxie.c: New files.
752         * archures.c: Add moxie support.
753         * configure.in: Add moxie support.
754         * configure: Rebuilt.
755         * config.bfd, archures.c: Add moxie support.
756         * bfd-in2.h: Rebuilt.
758 2009-04-15  Christophe Lyon  <christophe.lyon@st.com>
760         * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
761         branch to an undef weak symbol into a jump to next instruction if
762         a PLT entry will be created.
764 2009-04-14  Dave Korn  <dave.korn.cygwin@gmail.com>
766         * coffgen.c (make_a_section_from_file):  Set the backend long
767         section names enable if long section names found on input.
768         * coffcode.h:  Extend long section names documentation to match.
770 2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
772         * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
773         machine code.
775 2009-04-07  DJ Delorie  <dj@redhat.com>
777         * archures.c: Add bfd_mach_mep_c5.
778         * bfd-in2.h: Likewise.
779         * cpu-mep.c: Add bfd_c5_arch.
780         * elf32-mep.c: Support it.
782 2009-04-07  H.J. Lu  <hongjiu.lu@intel.com>
784         * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
785         info->callbacks->einfo.
786         * linker.c (_bfd_generic_section_already_linked): Likewise.
788 2009-04-06  DJ Delorie  <dj@redhat.com>
790         * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
792 2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>
794         * coff-x86_64.c (bfd_pe_print_pdata): Defined to
795         _bfd_pex64_print_pdata only if PE is defined.
797         * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
798         (_bfd_pex64_print_pdata): This.
800         * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
801         (_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
802         is defined.
804 2009-04-05  Kai Tietz  <kai.tietz@onevision.com>
806         * coff-x86_64.c (bfd_pe_print_pdata): Define as
807         _bfd_pep_print_x64_pdata.
808         * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
809         * peXXigen.c (_bfd_pep_print_x64_pdata): New.
811 2009-04-02  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
813         * elf32-xtensa.c (relax_property_section): Always set r_offset 
814         to zero.
816 2009-04-02  Christophe Lyon  <christophe.lyon@st.com>
818         * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
819         elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
820         branch stubs.
821         (elf32_arm_stub_type): New enum values for the two new stubs.
822         (arm_type_of_stub): Make use of the two new stubs.
823         (arm_size_one_stub): Handle the two new stubs.
825 2009-04-01  Matt Thomas  <matt@netbsd.org>
827         * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
828         hidden symbols into the GOT or PLT.GOT.
829         (elf_vax_relocate_section): Do not emit a PCREL reloc 
830         into a shared object if it is against a hidden symbol.
832 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
834         * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
835         and know_contains_shared_object_p.
836         (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
837         Cache the result in the archive_info table.
838         (xcoff_auto_export_p): Add an "info" parameter and update the
839         call to xcoff_archive_contains_shared_object_p.
840         (xcoff_mark_auto_exports): Update accordingly.
841         (xcoff_post_gc_symbol): Likewise.
843 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
845         * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
846         rather than C_EXT.
848 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
850         * coff-rs6000.c (member_layout): New structure.
851         (archive_iterator): Likewise.
852         (member_layout_init): New function.
853         (archive_iterator_begin): Likewise.
854         (archive_iterator_next): Likewise.
855         (xcoff_write_armap_old): Use the new iterator functions.
856         (do_shared_object_padding): Delete.
857         (xcoff_write_armap_big): Use the new iterator functions.  Simplify
858         handling of arch_info.
859         (xcoff_write_archive_contents_old): Allocate arelt_data in the
860         first loop rather than the second.  Allocate a member header if
861         there isn't one, then work out the stat information and length
862         in the first loop too.  Use the new iterators for the second loop.
863         (xcoff_write_archive_contents_big): Likewise.
865 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
867         * bfd-in.h (bfd_xcoff_split_import_path): Declare.
868         (bfd_xcoff_set_archive_import_path): Likewise.
869         * bfd-in2.h: Regenerate.
870         * xcofflink.c: Include libiberty.h.
871         (xcoff_archive_info): New structure.
872         (xcoff_archive_info_hash): New function.
873         (xcoff_archive_info_eq): Likewise.
874         (xcoff_get_archive_info): Likewise.
875         (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
876         (bfd_xcoff_split_import_path): New function.
877         (bfd_xcoff_set_archive_import_path): Likewise.
878         (xcoff_set_import_path): Move earlier in file.
879         (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
880         object to the the directory part of the bfd's filename.  Get the
881         import path and filename of an archive object from the archive's
882         xcoff_tdata, initializing it if necessary.  Update use of
883         import_file_id.
884         (bfd_link_input_bfd): Update use of import_file_id.
885         (xcoff_write_global_symbol): Likewise.
887 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
889         * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
891 2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
893         * xcofflink.c (xcoff_link_create_extra_sections): Don't create
894         a .loader section for relocatable links.
895         (xcoff_need_ldrel_p): New function.
896         (xcoff_mark): Use it.
897         (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
898         a loader section.
899         (xcoff_build_ldsym): New function, split out from...
900         (xcoff_build_ldsyms): ...here.  Rename to...
901         (xcoff_post_gc_symbol): ...this.  Only export symbols, and only
902         call xcoff_build_ldsym, if there's a loader section.
903         (xcoff_build_loader_section): New function, extracted verbatim from...
904         (bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
905         there's a loader section.  Only add an __rtinit loader symbol
906         if there's a loader section.  Update after above name change.
907         (xcoff_symbol_section, xcoff_create_ldrel): New functions.
908         (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
909         and xcoff_create_ldrel.
910         (xcoff_write_global_symbol): Use xcoff_create_ldrel.
911         (xcoff_reloc_link_order): Likewise, but only call it if there's
912         a loader section.  Use xcoff_symbol_section.
913         (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
914         if there's a loader section.
916 2009-04-01  Richard Sandiford  <rdsandiford@googlemail.com>
918         * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
920 2009-04-01  Christophe Lyon  <christophe.lyon@st.com>
922         * elf32-arm.c (group_sections): Rewrite loops for better
923         readability.
925 2009-03-30  DJ Delorie  <dj@redhat.com>
927         * elflink.c (elf_link_input_bfd): Don't try to resolve complex
928         relocs when doing a relocatable link.
930 2009-03-28  Mark Mitchell  <mark@codesourcery.com>
932         * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
933         "ERROR:", in error messages.
934         * cpu-arm.c (bfd_arm_merge_machines): Likewise.
935         * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
936         * elf32-arm.c (tag_cpu_arch_combine): Likewise.
937         (elf32_arm_merge_eabi_attributes): Likewise.
938         (elf32_arm_merge_private_bfd_data): Likewise.
940 2009-03-27  Nick Clifton  <nickc@redhat.com>
942         * section.c (bfd_get_section_contents): Detect and handle the case
943         where a section has the SEC_IN_MEMORY flag set but no actual
944         contents allocated.
946 2009-03-26  Alan Modra  <amodra@bigpond.net.au>
948         PR 6494
949         * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
950         p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
951         (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
952         if we don't find matching PT_LOAD when copying.
954 2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
956         * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
957         the reloc descriptions.
959 2009-03-25  Hans-Peter Nilsson  <hp@axis.com>
961         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
962         <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
963         <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
965 2009-03-24  H.J. Lu  <hongjiu.lu@intel.com>
967         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
968         (bfd_i386_arch_intel_syntax): Likewise.
969         (i8086_arch): Likewise.
970         (bfd_x86_64_arch): Likewise.
972 2009-03-24  Hans-Peter Nilsson  <hp@axis.com>
974         * elf32-cris.c (cris_elf_relocate_section): <case
975         R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
976         symbols for non-allocated sections.  Don't check whether to
977         generate R_CRIS_DTPMOD for non-allocated sections.
978         (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
979         handle relocation GC:ing if applied to non-allocated section.
980         (cris_elf_check_relocs): Similar.
982         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
983         <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
984         when emitting a known TP offset in the GOT.
986 2009-03-23  Alan Modra  <amodra@bigpond.net.au>
988         * elf64-ppc.c (synthetic_opd): Delete.
989         (compare_symbols): Look for .opd name rather than section match.
990         (ppc64_elf_get_synthetic_symtab): Likewise.
992 2009-03-21  Alan Modra  <amodra@bigpond.net.au>
994         * elf32-ppc.c (is_pic_glink_stub): Delete.
995         (is_nonpic_glink_stub): New function.
996         (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
997         than first pic one.
998         (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
1000 2009-03-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1001             Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1003         * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
1004         macros for visibilty and locality checks.
1005         (elf_s390_adjust_dynamic_symbol): Likewise.
1006         (allocate_dynrelocs): Likewise.
1007         (elf_s390_relocate_section): Likewise.
1008         (elf_s390_finish_dynamic_symbol): Likewise.
1009         * elf64-s390.c (elf_s390_check_relocs): Likewise.
1010         (elf_s390_adjust_dynamic_symbol): Likewise.
1011         (allocate_dynrelocs): Likewise.
1012         (elf_s390_relocate_section): Likewise.
1013         (elf_s390_finish_dynamic_symbol): Likewise.
1015 2009-03-19  Kai Tietz  <kai.tietz@onevision.com>
1017         * bfd-in2.h: Regenerated.
1018         * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
1019         for debugging sections and map memory read/write dependent on
1020         SEC_COFF_NOREAD.
1021         (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
1022         without memory read flags set.
1023         * section.c: Add SEC_COFF_NOREAD to section flags.
1025 2009-03-19  Andreas Schwab  <schwab@linux-m68k.org>
1027         * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
1028         for format string.
1030 2009-03-19  Alan Modra  <amodra@bigpond.net.au>
1032         * elf32-spu.c (spu_elf_find_overlays): Separate error return from
1033         "no overlays" return.  If there are overlays, create overlay
1034         manager entry symbols here, so that..
1035         (spu_elf_build_stubs): ..we don't need to set them up here.
1036         Simplify entry symbol tests.
1037         * elf32-spu.h (spu_elf_find_overlays): Update prototype.
1039 2009-03-18  Mark Kettenis  <kettenis@gnu.org>
1041         * elf.c (elfcore_grok_openbsd_procinfo)
1042         (elfcore_grok_openbsd_note): New functions.
1043         (elf_parse_notes): Handle notes from OpenBSD ELF core files.
1045 2009-03-18  Alan Modra  <amodra@bigpond.net.au>
1047         * vms-hdr.c: Don't include alloca.h.
1048         * elf32-m68hc1x.c: Include alloca-conf.h.
1049         * xsym.c: Likewise.
1050         * elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
1051         * som.c: Likewise.
1052         * Makefile.am: Run "make dep-am".
1053         * Makefile.in: Regenerate.
1055 2009-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
1057         * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
1059 2009-03-17  Alan Modra  <amodra@bigpond.net.au>
1061         * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
1062         Add compact_stub.
1063         (emum _ovly_flavour): Delete ovly_compact, ovly_none.
1064         * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
1065         ovly_return fields with ovly_entry[2].  Adjust all users.
1066         (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
1067         when soft-icache.
1068         (spu_elf_build_stubs): Likewise.
1069         (ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
1070         ovly_flavour changes.  Update all callers.
1071         (ovl_stub_size_log2): New function.
1072         (build_stub): Handle compact icache stubs.  Use different manager
1073         entry point for stubs in non-icache area.
1074         (spu_elf_size_stubs): Don't allocate space for indirect branch
1075         descriptors.
1076         (spu_elf_build_stubs): And don't built them.
1078 2009-03-16  Andrew Stubbs  <ams@codesourcery.com>
1080         * dwarf2.c (read_section): Always use rawsize, if available.
1082 2009-03-16  Alan Modra  <amodra@bigpond.net.au>
1084         * simple.c (bfd_simple_get_relocated_section_contents): Use larger
1085         of rawsize and size for buffer.
1087 2009-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
1089         * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
1090         parameter just because fixed sections fit into local store.
1091         (spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
1092         generating overlays if fixed sections plus reserved stack
1093         and heap space fit into local store.
1095 2009-03-15  Alan Modra  <amodra@bigpond.net.au>
1097         * elf32-spu.c (build_stub): Correct icache set_id.
1098         (spu_elf_relocate_section): Likewise.
1100 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1102         * xcofflink.c (xcoff_link_check_archive_element): Only free the
1103         symbol table if it was created by the current call.
1105 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1107         * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
1108         class XMC_DS rather than XMC_UA.
1110 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1112         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
1113         bfd_boolean export_defineds parameter with an unsigned int
1114         auto_export_flags parameter.
1115         * bfd-in2.h: Regenerate.
1116         * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
1117         split out from xcoff_build_ldsyms.
1118         (xcoff_covered_by_expall_p): New function.
1119         (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
1120         but with extra code to handle -bexpfull and -bexpall.
1121         (xcoff_mark_auto_exports): New function.
1122         (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
1123         a function should be automatically exported.
1124         (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
1125         parameter with an auto_export_flags parameter.  Update ldinfo
1126         accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
1127         exported symbols.
1129 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1131         * xcofflink.c (xcoff_mark_symbol_by_name): New function.
1132         (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
1133         init and fini functions.  Do garbage collection for objects
1134         without an entry point too.
1136 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1138         * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
1139         check whether a symbol has csect information.
1140         (coff_print_aux): Likewise.
1141         * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
1142         information for C_AIX_WEAKEXT too.
1143         (_bfd_xcoff_swap_aux_out): Likewise.
1144         (xcoff_reloc_type_br): Handle defweak symbols too.
1145         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
1146         information for C_AIX_WEAKEXT too.
1147         (_bfd_xcoff64_swap_aux_out): Likewise.
1148         (xcoff64_reloc_type_br): Handle defweak symbols too.
1149         * coffgen.c (coff_print_symbol): Handle auxillary function
1150         information for C_AIX_WEAKEXT too.
1151         * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
1152         instead of BSF_GLOBAL if the L_WEAK flag is set.
1153         (xcoff_dynamic_definition_p): New function.
1154         (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
1155         defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
1156         always take the symbol class from the ldsym.  Use weak bfd symbol
1157         types for weak ldsyms.
1158         (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
1159         Fix the check for whether a definition is from a shared object.
1160         Allow redefinitions of weak symbols.
1161         (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
1162         (xcoff_keep_symbol_p): Likewise.
1163         (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
1164         (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
1165         Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
1166         but mark them as L_WEAK.
1167         (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
1168         instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
1170 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1172         * xcofflink.c (xcoff_mark): When walking the relocations,
1173         only mark the target symbol or the target section, not both.
1174         (xcoff_final_definition_p): New function.
1175         (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
1176         symbol is a valid definition of the associated output symbol.
1177         Use XCOFF_ALLOCATED to stop the same hash table entry having
1178         two output symbols.
1179         (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
1180         keeping a symbol.
1181         (xcoff_link_input_bfd): Use xcoff_final_definition_p.
1183 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1185         * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
1186         symbols as XMC_XO.
1188 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1190         * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
1191         * libcoff.h: Regenerate.
1192         * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
1193         line-number counts in the bfd's lineno_counts field.
1194         Don't keep per-csect line-number counts.
1195         (xcoff_sweep): Don't update per-csect line-number counts.
1196         (bfd_xcoff_size_dynamic_sections): Count the number of line-number
1197         entries in each output section.
1198         (xcoff_link_input_bfd): Get the number of line numbers from
1199         the bfd's lineno_counts field, rather than recalculating it
1200         from scratch.  Fix the range check when updating C_BINCL and
1201         C_EINCL symbols.
1202         (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
1203         here.  Don't expect csects to have line-number counts.
1205 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1207         * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
1208         * libcoff.h: Regenerate.
1209         * xcofflink.c (xcoff_keep_symbol_p): New function, using the
1210         "skip" logic from xcoff_link_input_bfd.
1211         (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
1212         objects in a dynamic link, rather than checking whether csectpp
1213         is null.  Always allocate debug_index for other objects,
1214         and always go through the loop.  Update the type of debug_index
1215         after the change above.  Read the auxillary csect information
1216         and use xcoff_keep_symbol_p to decide whether a symbol should
1217         be kept.  Set its debug_index to -2 if not.
1218         (xcoff_link_input_bfd): Update the type of debug_index after
1219         the change above and always expect it to be nonnull.  Use it to
1220         test whether a symbol should be stripped, rather than making the
1221         decision here.  Postpone all symbol creation to the second pass.
1223 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1225         * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
1226         creating a descriptor.
1227         (xcoff_sweep): Don't mark toc_section unless it's needed.
1228         (bfd_xcoff_size_dynamic_sections): Skip the toc_section
1229         when marking every bfd.
1230         (xcoff_link_input_bfd): Skip all TOC anchors.
1231         (xcoff_toc_section_p, xcoff_find_tc0): New functions.
1232         (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
1233         to -1; call xcoff_find_tc0 instead.
1235 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1237         * libcoff-in.h (xcoff_section_tdata): Update commentary.
1238         * libcoff.h: Regenerate.
1239         * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
1240         symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
1241         the previous symbol's csect.  Treat last_symndx as an inclusive value
1242         and simplify its handling.
1243         (xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
1244         symbols with the right csect.  Don't mark rsec when processing
1245         relocations against undefined or absolute sections.
1246         (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
1247         of bfd_und_section_ptr.
1248         (xcoff_link_input_bfd): Likewise.
1250 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1252         * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
1253         against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
1254         flag is set.  Assert that all undefined symbols are either
1255         imported or defined by a dynamic object.
1256         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1257         * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
1258         handling to all relocations.  Only set XCOFF_CALLED for function
1259         symbols.
1260         (xcoff_find_function): New function, split out from...
1261         (bfd_xcoff_export_symbol) ...here.
1262         (xcoff_set_import_path): New function, split out from...
1263         (bfd_xcoff_import_symbol): ...here.  Remove assertion for old
1264         meaning of XCOFF_CALLED.
1265         (xcoff_mark_symbol): If we mark an undefined and unimported
1266         symbol, find some way of defining it.  If the symbol is a function
1267         descriptor, fill in its definition automatically.  If the symbol
1268         is a function, mark its descriptor and allocate room for global
1269         linkage code.  Otherwise mark the symbol as implicitly imported.
1270         Move the code for creating function descriptors from...
1271         (xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
1272         check for symbols that were implicitly defined.
1273         (xcoff_mark): Don't count any dynamic relocations against
1274         function symbols.
1275         (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
1276         in the xcoff link info.
1277         (xcoff_link_input_bfd): Remove handling of undefined and
1278         unexported symbols.
1280 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1282         * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
1283         if the target is absolute.  Fix comment typo.
1284         (xcoff_ppc_relocate_section): Remove FIXME.
1285         * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
1286         if the target is absolute.
1288 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1290         * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
1291         R_POS and R_NEG relocations against absolute symbols to the
1292         .loader section.
1294 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1296         * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
1297         to 2 for bfd_mach_ppc_620.
1299 2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
1301         * config.bfd: Treat AIX 6+ in the same way as AIX 5.
1302         * configure.in: Likewise.
1303         * configure: Regenerate.
1305 2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>
1307         PR binutils/9945
1308         * elf.c (assign_section_numbers): Generate symbol table if there
1309         is any relocation in output.
1310         (_bfd_elf_compute_section_file_positions): Likewise.
1312 2009-03-13  Nick Clifton  <nickc@redhat.com>
1314         PR 9934
1315         * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
1316         * elflink.c (elf_link_read_relocs_from_section): Use
1317         NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
1318         relocs but no symbol table.
1319         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1321 2009-03-12  H.J. Lu  <hongjiu.lu@intel.com>
1323         PR ld/9938
1324         * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
1325         to check ___tls_get_addr.
1327         * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
1328         strncmp to check __tls_get_addr.
1330 2009-03-12  Andrew Stubbs  <ams@codesourcery.com>
1332         * dwarf2.c (read_section): Always check the offset, even when the
1333         section has been read before.
1335 2009-03-11  H.J. Lu  <hongjiu.lu@intel.com>
1337         * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
1338         comments.
1340 2009-03-11  Chris Demetriou  <cgd@google.com>
1342         * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
1343         * bfd-in2.h: Regenerate.
1344         * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
1345         flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
1346         mode.
1347         (bsd_write_armap): Likewise.
1348         (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
1349         flag is set, do nothing.
1350         (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
1351         for timestamp.
1353 2009-03-11  Ulrich Weigand  <uweigand@de.ibm.com>
1355         * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
1356         used to update stack pointer.
1358 2009-03-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1360         PR binutils/9921
1361         * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
1362         for unknown symbols in absolute section.
1364 2009-03-06  Nick Clifton  <nickc@redhat.com>
1366         * po/es.po: Updated Spanish translation.
1368 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
1370         * elf32-arm.c (group_sections): Take next section size into
1371         account before accepting to group it.
1373 2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
1375         * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1376         PLT entries.
1377         (elf32_arm_final_link_relocate): Likewise.
1379 2009-03-05  Moritz Kroll  <Moritz.Kroll@gmx.de>
1381         PR 9923
1382         * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1384 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
1386         * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1387         * section.c (struct bfd_section): Add has_tls_get_addr_call.
1388         (BFD_FAKE_SECTION): Init new flag.
1389         * ecoff.c (bfd_debug_section): Likewise.
1390         * bfd-in2.h: Regenerate.
1391         * libbfd.h: Regenerate.
1392         * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1393         (ppc_elf_reloc_type_lookup): Handle new relocs.
1394         (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1395         without marker relocs.
1396         (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1397         if section has no old-style calls.
1398         (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1399         Don't try to optimize new-style __tls_get_addr call when handling
1400         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1401         relocs.
1402         * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1403         (ppc64_elf_reloc_type_lookup): Handle new relocs.
1404         (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1405         without marker relocs.
1406         (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1407         if section has no old-style calls.  Set toc_ref for new relocs as
1408         appropriate.
1409         (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1410         Don't try to optimize new-style __tls_get_addr call when handling
1411         arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1412         relocs.
1414 2009-03-04  Alan Modra  <amodra@bigpond.net.au>
1416         PR 6768
1417         * configure.in: Test for ld --as-needed support.  Link shared
1418         libbfd against libm.
1419         * configure: Regenerate.
1421 2009-03-03  Alan Modra  <amodra@bigpond.net.au>
1423         * Makefile.am: Run "make dep-am".
1424         * Makefile.in: Regenerate.
1426 2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
1428         * elf32-score7.c: New file.
1429         * elf32-score.h: New file.
1430         * elf32-score.c: Add code to support score 7.  Set score7 as the
1431         default.
1432         * cpu-score.c: Add score7 architecure.
1433         (compatibile): New function.
1434         * Makefile.am: Add rules for building elf32-score7 object.
1435         * Makefile.in: Regenerate.
1436         * configure.in: Add elf32-score7 object to score vectors.
1437         * configure: Regenerate.
1438         * reloc.c: Add score7 relocs.
1439         * archures.c: Add score3 and score7 machine numbers.
1440         * bfd-in2.h: Regenerate.
1441         * libbfd.h: Regenerate.
1443 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1445         * configure: Regenerate.
1447 2009-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1449         * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1450         (elf32_hppa_check_relocs): Use it.
1452         * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1453         elf64-hppa.c.
1454         (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1455         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1456         (elf_hppa_is_dynamic_loader_symbol): Likewise.
1457         (elf_hppa_record_segment_addrs): Likewise.
1458         (elf_hppa_final_link): Likewise.
1459         (elf_hppa_relocate_insn): Likewise.
1460         (elf_hppa_final_link_relocate): Likewise.
1461         (elf64_hppa_relocate_section): Likewise.
1462         * elf64-hppa.c: Insert above.
1464 2009-02-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1466         * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1467         (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1468         (elf_hppa_relocate_section): Likewise.
1469         * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1470         from struct elf_link_hash_entry.  Add count field.
1471         (struct elf64_hppa_dyn_hash_table): Delete.
1472         (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1473         (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1474         (hppa_elf_hash_entry, eh_name): Define.
1475         (elf64_hppa_new_dyn_hash_entry): Delete.
1476         (elf64_hppa_dyn_hash_lookup): Delete.
1477         (elf64_hppa_dyn_hash_traverse): Delete.
1478         (get_dyn_name): Delete.
1479         (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1480         of struct elf64_hppa_dyn_hash_entry *.
1481         (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1482         allocate_global_data_plt, allocate_global_data_stub,
1483         allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1484         Likewise.
1485         (hppa64_link_hash_newfunc): New.
1486         (elf64_hppa_hash_table_create): Rework.
1487         (count_dyn_reloc): Likewise.
1488         (hppa64_elf_local_refcounts): New.
1489         (elf64_hppa_check_relocs): Rework using standard technique for recording
1490         local DLT, PLT and OPD reference counts.
1491         (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
1492         elf_link_hash_entry *.
1493         (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
1494         allocate_global_data_plt, allocate_global_data_stub,
1495         allocate_global_data_opd, allocate_dynrel_entries,
1496         elf64_hppa_adjust_dynamic_symbol,
1497         elf64_hppa_mark_milli_and_exported_functions): Likewise.
1498         (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
1499         Use hppa_link_hash_table.  Rework.
1500         (elf64_hppa_link_output_symbol_hook): Rework.
1501         (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
1502         elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
1503         elf64_hppa_finish_dynamic_sections): Likewise.
1505 2009-02-26  Christophe Lyon  <christophe.lyon@st.com>
1507         * elf32-arm.c (stub_reloc_type): Removed.
1508         (insn_sequence): Renamed reloc_type field to r_type.
1509         (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
1510         (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
1511         (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
1512         (elf32_arm_stub_type): Add new enum entries for the new stubs.
1513         (arm_stub_is_thumb): Catch new stubs.
1514         (arm_type_of_stub): Handle new stubs.
1515         (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
1516         (bfd_elf32_arm_process_before_allocation): Remove useless
1517         condition.
1519 2009-02-25  H.J. Lu  <hongjiu.lu@intel.com>
1521         * elf.c (elf_find_function): Use is_function_type to check
1522         function symbol.
1524 2009-02-24  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
1526         * xtensa-modules.c: Revert to previous version 1.11 due
1527         to inadvertant commit.
1529 2009-02-24  Sterling Augustine  <sterling@tensilica.com>
1531         * elf32-xtensa.c (text_action_add): Separate test for action
1532         type.  Break if saved action is ta_widen_insn at same offset.
1534 2009-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
1536         * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
1537         to elf32_arm_stub_long_branch_any_arm_pic.
1538         (elf32_arm_stub_long_branch_any_thumb_pic): New.
1539         (enum elf32_arm_stub_type, arm_type_of_stub)
1540         (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
1541         separately.
1543 2009-02-24  Joseph Myers  <joseph@codesourcery.com>
1545         * elf32-arm.c (PREV_SEC): Update comment.
1546         (group_sections): Rename argument to stubs_always_after_branch.
1547         Reverse the list and place stubs at the end of input sections.
1548         Undefine NEXT_SEC.
1549         (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
1551 2009-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
1553         * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
1554         Fix formatting.
1555         (arm_size_one_stub): Remove unnecessary break.
1556         (arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
1558 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
1560         * elf32-arm.c (stub_insn_type): New type.
1561         (stub_reloc_type): Likewise.
1562         (insn_sequence): Likewise.
1563         (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
1564         (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
1565         (elf32_arm_stub_long_branch_thumb_only): Likewise.
1566         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1567         (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
1568         (elf32_arm_stub_long_branch_any_any_pic): Likewise.
1569         (elf32_arm_stub_hash_entry): Add new helper fields.
1570         (stub_hash_newfunc): Initialize these new fields.
1571         (arm_build_one_stub): Encode Arm and Thumb instructions separately
1572         to take endianness into account.
1573         (arm_size_one_stub): Compute size of stubs using insn_sequence.
1574         (arm_map_one_stub): Code is now more generic, thanks to
1575         insn_sequence.
1577 2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
1579         * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1580         code.
1581         (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1582         (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1583         BLX is not available. Fix typo in warning message. Add comments
1584         and improve formatting.
1585         (arm_build_one_stub): Adjust to new
1586         elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1587         (arm_map_one_stub): Likewise.
1589 2009-02-23  Tristan Gingold  <gingold@adacore.com>
1590             Eric Botcazou  <ebotcazou@adacore.com>
1591             Douglas B Rupp  <rupp@gnat.com>
1593         * vms.h: Update copyright year, fix comments, reorder declarations.
1594         (_bfd_save_vms_section): Remove the prototype.
1595         (EGPS_S_V_NO_SHIFT): New constant.
1596         (bfd_vms_set_section_flags): New prototype.
1597         (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1598         constants.
1599         (EGSY_S_W_FLAGS): Ditto.
1600         (EGSY_S_V_QUAD_VAL): Ditto.
1601         (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1602         (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1603         EGST_S_B_NAMLNG): Ditto.
1604         (ESRF_S_B_NAMLNG): Ditto.
1605         (ETIR_S_C_HEADER_SIZE): Ditto.
1606         (EGPS_S_V_ALLOC_64BIT): Ditto.
1607         (DST_S_C_EPILOG): Ditto.
1608         (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1609         (DST_S_C_SRC_INCRLNUM_B): Ditto.
1610         (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1611         (DST_S_L_PCLINE_UNSLONG): Ditto.
1612         (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1613         (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1614         (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1615         (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1616         (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1617         (DST_S_B_SRC_UNSBYTE): Ditto.
1618         (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1619         Add prototypes.
1620         (vms_section, vms_reloc): Remove types.
1621         (hdr_struc): Replaced by ...
1622         (hdr_struct): ... new type.
1623         (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1624         (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1625         (EMH_DATE_LENGTH): Ditto.
1626         (eom_struc): Replaced by ...
1627         (eom_struct): ... new type.
1628         (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1629         (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1630         (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1631         (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1632         (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1633         (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1634         (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1635         (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1636         (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1637         (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1638         (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1639         (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1640         (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1641         (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1642         (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1643         (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1644         (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1645         (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1646         (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1647         (enum file_type_enum): New type.
1648         (struct location_struct): Removed.
1649         (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1650         (struct funcinfo, struct module): Ditto.
1651         (struct vms_private_data_struct): Update fields.
1652         (struct vms_section_data_struct): New type.
1654         * vms.c: Update copyright year, fix comments,
1655         Fix includes for DECC, add prototypes.
1656         (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1657         some initializers.
1658         Use flavour to set is_vax, location_stack is removed.
1659         (struct pair): Declare.
1660         (fill_section_ptr): Initialize variables at declaration.
1661         Add guard to set SECTION_SYM flag, handlde und section.
1662         (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1663         (_bfd_vms_slurp_object_records): New function, replaces previous
1664         vms_object_p.
1665         (vms_slurp_module): New function.
1666         (vms_slurp_image): Ditto.
1667         (vms_object_p): Complete rewrite.
1668         (vms_mkobject): Use is_vax field to slect architecture.
1669         (free_reloc_stream): New function.
1670         (vms_convert_to_var): Ditto.
1671         (vms_convert_to_var_1): Ditto.
1672         (vms_convert_to_var_unix_filename): Ditto.
1673         (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1674         VAR format on VMS.
1675         (vms_new_section_hook): Set alignment to 0, allocate private data.
1676         (vms_get_section_contents): Load content.
1677         (vms_get_symbol_info): Handle undefined section.
1678         (vms_find_nearest_line): Handle.
1679         (alloc_reloc_stream): New function.
1680         (vms_slurp_reloc_table): Ditto.
1681         (vms_get_reloc_upper_bound): Make it real.
1682         (vms_canonicalize_reloc): Do the real work.
1683         (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1684         ALPHA_R_BOH.
1685         (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1686         (vms_set_arch_mach): Check arch.
1687         (vms_set_section_contents): Copy the content after allocation.
1688         (vms_alpha_vec): Update object flags.
1690         * vms-tir.c: Update copyright year, fix comments,
1691         add prototypes for new functions.
1692         (dst_define_location): New function.
1693         (dst_restore_location): New function.
1694         (dst_retrieve_location): New function.
1695         (dst_check_allocation): New function.
1696         (image_dump): Call dst_check_allocation.
1697         (image_write_b): Ditto.
1698         (image_write_w): Ditto.
1699         (image_write_l): Ditto.
1700         (image_write_q): Ditto.
1701         (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1702         STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1703         CTL_STKDL.
1704         Call error handler instead of abort if name is not known.
1705         (etir_sta): Add quarter_relocs argument and set it.
1706         Fix cast.
1707         (etir_sto): Ditto.
1708         (etir_opr): Ditto, return FALSE in case of error.
1709         (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1710         Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1711         (etir_stc): Add quarter_relocs argument and set it, fix cast.
1712         Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1713         Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1714         Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1715         Return FALSE in case of error.
1716         (tir_sta): Change sign of psect.
1717         (tir_ctl): Ditto.
1718         (tir_cmd): Fix cast. Makes tir_table static const.
1719         (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1720         add argument to explain.
1721         (analyze_etir): Initialize maxptr, add quarter_relocs
1722         declaration, move some declarations into inner scopes.
1723         Handle quarter_relocs and STO_IMM.
1724         (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1725         (_bfd_vms_slurp_relocs): New function.
1726         (_bfd_vms_decode_relocs): New function.
1727         (sto_imm): Rewritten.
1728         (start_first_etbt_record): New function.
1729         (start_another_etbt_record): Ditto.
1730         (etir_output_check): Ditto.
1731         (defer_reloc_p): Ditto.
1732         (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1733         a for-loop.  Correctly deals with contents, deals with .vmsdebug,
1734         rewritte relocations handling.
1735         (_bfd_vms_write_tbt): Removed.
1736         (_bfd_vms_write_dbg): Ditto.
1738         * vms-misc.c: Update copyright year, Fix comments.
1739         (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1740         (maybe_adjust_record_pointer_for_object): New function.
1741         (_bfd_vms_get_first_record): New function, replaces ...
1742         (_bfd_vms_get_record): ..  removed.
1743         (_bfd_vms_get_object_record): New function.
1744         (_bfd_vms_get_object_record): New function.
1745         (vms_get_remaining_object_record): New function, replaces ...
1746         (_bfd_vms_get_next_record): ... removed.
1747         (add_new_contents): Removed.
1748         (_bfd_save_vms_section): Removed.
1749         (_bfd_get_vms_section): Removed.
1750         (_bfd_vms_output_flush): Write in VAR format.
1751         (new_symbol): Don't make UND section.
1753         * vms-hdr.c: Update copyright year, update list of record handled.
1754         (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1755         (_bfd_vms_write_hdr): Strip vms and unix patches,
1756         add comments, truncate module name at 31 characters,
1757         use constants instead of hard-coded value,
1758         write BFD version instead of a fixed string.
1759         (_bfd_vms_slurp_ihd): New function.
1760         (_bfd_vms_slurp_isd): Ditto.
1761         (_bfd_vms_slurp_ihs): Ditto.
1762         (new_module): Ditto.
1763         (parse_module): Ditto
1764         (build_module_list): Ditto.
1765         (module_find_nearest_line): Ditto.
1766         (_bfd_vms_find_nearest_dst_line): Ditto.
1767         (vms_slurp_debug): Ditto.
1768         (_bfd_vms_slurp_dbg): Ditto.
1769         (_bfd_vms_slurp_tbt): Ditto.
1770         (_bfd_vms_write_dbg): Ditto.
1771         (_bfd_vms_write_tbt): Ditto.
1773         * vms-gsd.c: Update copyright year, update list of records handled.
1774         (EVAX_LITERALS_NAME): New macro.
1775         (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1776         (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1777         (register_universal_symbol): New function and prototype.
1778         (_bfd_vms_slurp_gsd): Fix indentations and casts,
1779         improve debug messages,
1780         use constants instead of hard-coded value,
1781         fix missing endianness conversion,
1782         handle global symbol (SYMG).
1783         (bfd_vms_set_section_flags): New function.
1784         (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1785         handle section literals,
1786         fix indentation,
1787         handle section bfd and vms flags,
1788         don't output LIB$INITIALIZE symbol,
1789         fix handling of weak symbols,
1790         fix evax vs vax procedure descriptor,
1791         handle absolute symbols.
1793         * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1794         BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1796         * makefile.vms (DEFS): Fix flags for VMS.
1798         * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1800         * bfd-in2.h: Regenerated.
1801         * libbfd.h: Regenerated.
1803 2009-02-20  Cary Coutant  <ccoutant@google.com>
1805         * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1806         in struct stat.
1808 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
1810         PR gas/7059
1811         * coffcode.h (coff_write_object_contents):  Don't let the string
1812         table offset overflow the s_name field when using long section names.
1814 2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
1816         * coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
1817         control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1818         * coff-mips.c (mips_ecoff_backend_data):  Likewise.
1819         * coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
1820         control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1821         (bfd_pmac_xcoff_backend_data):  Likewise.
1822         * coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
1823         (bfd_xcoff_aix5_backend_data):  Likewise.
1824         (xcoff64_write_object_contents):  Delete unused long_section_names
1825         local variable.
1826         * coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
1827         name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1828         struct non-const.
1829         * coffcode.h (documentation):  Update to describe long section names.
1830         (COFFLONGSECTIONCATHELPER):  New helper macro.
1831         (BLANKOR1TOODD):  Likewise.
1832         (COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
1833         (COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
1834         (COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
1835         (bfd_coff_set_long_section_names_allowed):  New function.
1836         (bfd_coff_set_long_section_names_disallowed):  Likewise.
1837         (struct bfd_coff_backend_data):  Add new backend hook function
1838         pointer _bfd_coff_set_long_section_names.
1839         (bfd_coff_set_long_section_names):  New backend hook.
1840         (coff_write_object_contents):  Only generate long section names if
1841         bfd_coff_long_section_names() indicates they are currently enabled.
1842         (bfd_coff_std_swap_table):  Make non-const, and initialise long
1843         section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1844         (ticoff0_swap_table):  Likewise to both.
1845         (ticoff1_swap_table):  Again, likewise to both.
1846         * coffgen.c (make_a_section_from_file):  Allow long section names
1847         as inputs even if not currently allowed for outputs.
1848         * ecoff.c (_bfd_ecoff_no_long_sections):  New function.
1849         * efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
1850         * efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1851         * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1852         * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
1853         * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1854         * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1855         * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
1856         * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1857         * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1858         * pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
1859         * pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
1860         * pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
1861         * pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
1862         * pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
1863         * pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
1864         * pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
1865         * libcoff-in.h:  Update copyright year to cause updated copyright
1866         year in generated libcoff.h, and fix typo.
1867         * libcoff.h:  Regenerated.
1868         * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
1869         (_bfd_ecoff_no_long_sections):  Add prototype.
1870         * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
1871         * pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
1872         defined by an including .c file.
1873         * ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
1874         long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1875         (ticoff1_swap_table):  Likewise to both.
1877 2009-02-18  Christophe Lyon  <christophe.lyon@st.com>
1879         * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
1880         stub. Catch default case error.
1881         (arm_map_one_stub): Add missing Thumb mapping symbol.
1883 2009-02-18  Bjoern Haase  <bjoern.m.haase@web.de>
1885         PR 9841
1886         * elf32-avr.c: Handle case where no local symbos exist correctly.
1888 2009-02-16  Christophe Lyon  <christophe.lyon@st.com>
1890         bfd/
1891         * elf32-arm.c (arm_long_branch_stub,
1892         arm_thumb_v4t_long_branch_stub,
1893         arm_thumb_thumb_long_branch_stub,
1894         arm_thumb_arm_v4t_long_branch_stub,
1895         arm_thumb_arm_v4t_short_branch_stub,
1896         arm_pic_long_branch_stub):
1897         Renamed to elf32_arm_stub_long_branch_any_any,
1898         elf32_arm_stub_long_branch_v4t_arm_thumb,
1899         elf32_arm_stub_long_branch_thumb_only,
1900         elf32_arm_stub_long_branch_v4t_thumb_arm,
1901         elf32_arm_stub_short_branch_v4t_thumb_arm,
1902         elf32_arm_stub_long_branch_any_any_pic.
1903         (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
1904         arm_thumb_thumb_stub_long_branch,
1905         arm_thumb_arm_v4t_stub_long_branch,
1906         arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
1907         Renamed to arm_stub_long_branch_any_any,
1908         arm_stub_long_branch_v4t_arm_thumb,
1909         arm_stub_long_branch_thumb_only,
1910         arm_stub_long_branch_v4t_thumb_arm,
1911         arm_stub_short_branch_v4t_thumb_arm,
1912         arm_stub_long_branch_any_any_pic.
1914 2009-02-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1916         * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
1917         in branch offset check.
1919 2009-02-15  Alan Modra  <amodra@bigpond.net.au>
1921         * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
1922         add toc.symndx and toc.add.
1923         (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
1924         Set up toc.add.
1925         (get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
1926         callers.
1927         (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
1928         (branch_reloc_hash_match): New function, extracted from..
1929         (ppc64_elf_tls_optimize): ..here.
1930         (ppc64_elf_relocate_section): Properly set addends when optimizing
1931         tls sequences.  Avoid unnecessary reading and writing of insns.
1932         Only redo reloc when symbol changed.  Bypass symbol checks when
1933         using tlsld_got.
1934         * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
1935         (branch_reloc_hash_match): New function, extracted from..
1936         (ppc_elf_tls_optimize): ..here.
1937         (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
1938         Don't clear addend on zapped __tls_get_addr reloc.
1940 2009-02-12  Nick Clifton  <nickc@redhat.com>
1942         PR 9827
1943         * elflink.c (bfd_elf_final_link): When counting the relocations,
1944         if the header size has not been set yet then assume that it will
1945         match the output section's reloc type.
1947 2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
1949         * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
1950         relocatable link.
1952 2009-02-09  Alan Modra  <amodra@bigpond.net.au>
1954         * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
1955         (find_function): Likewise.
1956         (pasted_function): Don't error if no prior function found.
1957         (discover_functions): Revert 2008-12-10 change.  Extend first
1958         function range to start of section.
1960 2009-02-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1962         * elf64-hppa.c: Remove PARAMS macro.  Replace PTR with void *.  Convert
1963         functions to C90.
1964         * elf64-hppa.h: Likewise.
1966 2009-02-06  Joseph Myers  <joseph@codesourcery.com>
1968         * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
1969         .sbss handling.
1971 2009-02-04  Alan Modra  <amodra@bigpond.net.au>
1973         * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
1974         Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
1976 2009-02-03  Sandip Matte  <sandip@rmicorp.com>
1978         * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
1979         * archures.c (bfd_mach_mips_xlr): Define.
1980         * bfd-in2.h: Regenerate.
1981         * cpu-mips.c (I_xlr): Define.
1982         (arch_info_struct): Add XLR entry.
1983         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
1984         (mips_set_isa_flags): Handle bfd_mach_mips_xlr
1985         (mips_mach_extensions): Add XLR entry.
1987 2009-02-03  Eric B. Weddington  <eric.weddington@atmel.com>
1989         * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
1991 2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>
1993         * configure.in: AC_SUBST pdfdir.
1994         * Makefile.am: Add install-pdf, install-pdf-am
1995         and install-pdf-recursive targets. Define pdfdir.
1996         * doc/Makefile.am: Define pdf__strip_dir. Add
1997         install-pdf and install-pdf-am targets.
1998         * po/Make-in: Add install-pdf target.
1999         * configure: Regenerate.
2000         * Makefile.in: Regenerate
2001         * doc/Makefile.in: Regenerate.
2003 2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
2005         * bfd-in2.h: Regenerate.
2006         * elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
2007         fields from n_entries to n_slots where appropriate, update comments.
2008         (HOWTO): Add TLS relocations.
2009         (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
2010         (enum elf_m68k_got_offset_size): New enum.
2011         (struct elf_m68k_got_entry.type): Move field to ...
2012         (struct elf_m68k_got_entry_key): ... here.  Update all uses.
2013         (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
2014         functions.
2015         (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
2016         functions.
2017         (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
2018         fields into n_entries array.  Update comments.
2019         (elf_m68k_init_got): Simplify, update all uses.
2020         (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
2021         (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
2022         GOT entries; update name, update all uses.
2023         (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
2024         (elf_m68k_get_got_entry): Update.
2025         (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
2026         simplify.
2027         (elf_m68k_remove_got_entry_type): Simplify.
2028         (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
2029         (elf_m68k_can_merge_gots): Update.
2030         (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
2031         (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
2032         GOT entries, simplify.
2033         (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
2034         (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
2035         field, remove obsoleted local_n_entries field.
2036         (elf_m68k_partition_multi_got_2): New static function.
2037         (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
2038         update.
2039         (elf_m68k_remove_got_entry_type): Update.
2040         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2041         (elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
2042         update of sgot->size and srelgot->size.
2043         (elf_m68k_gc_sweep_hook): Update.
2044         (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2045         (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
2046         TLS relocations.
2047         * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2048         * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2050 2009-02-02  DJ Delorie  <dj@redhat.com>
2052         * elf32-mep.c (config_names): Regenerate configuration.
2054 2009-02-02  Alan Modra  <amodra@bigpond.net.au>
2056         * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
2057         (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
2058         * elf.c (bfd_elf_get_str_section): Make static.
2059         (bfd_elf_find_section): Delete.
2060         * libbfd.h: Regenerate.
2062 2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
2064         * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
2065         (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2067 2009-01-31  Alan Modra  <amodra@bigpond.net.au>
2069         * elflink.c (on_needed_list): New function.
2070         (elf_link_add_object_symbols): Link in --as-needed libs if they
2071         satisfy undefined symbols in other libs.
2073 2009-01-30  Julian Brown  <julian@codesourcery.com>
2075         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
2076         EXEC_P or DYNAMIC flags, and skip sections which are being linked
2077         with --just-symbols (-R).
2079 2009-01-29  Adam Nemet  <anemet@caviumnetworks.com>
2081         * dwarf2.c (read_rangelist): Use read_address to read low_pc and
2082         high_pc in order to properly sign-extend VMAs.
2084 2009-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
2085             Mark Shinwell  <shinwell@codesourcery.com>
2086             Catherine Moore  <clm@codesourcery.com>
2088         * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2090 2009-01-28  Catherine Moore <clm@codesourcery.com>
2092         * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
2093         SEC_LOAD for dynamic relocation sections.
2095 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
2097         * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
2098         (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
2099         the size of local TLS data.
2101 2009-01-27  Andreas Schwab  <schwab@suse.de>
2103         * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
2104         architectures in the archive.
2106 2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
2108         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
2109         <R_CRIS_32_DTPREL>: Correct relocation value.
2111         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
2112         <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
2113         symbols with non-default visibility.
2115 2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
2117         * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
2118         describing the trampolines.
2119         (ppc_elf_relocate_section): Update relocs to describe the
2120         trampolines.
2122 2009-01-25  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2124         * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
2125         branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
2126         and R_PARISC_PCREL12F relocations.
2128 2009-01-24  Alan Modra  <amodra@bigpond.net.au>
2130         PR 6022
2131         * elflink.c (find_version_for_sym): New function split out from,
2132         but without export_dynamic test, ..
2133         (_bfd_elf_link_assign_sym_version): ..here.
2134         (_bfd_elf_export_symbol): Use it.
2136 2009-01-23  Alan Modra  <amodra@bigpond.net.au>
2138         * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
2139         (struct elf_info_failed, struct elf_find_verdep_info): Move to..
2140         * elflink.c: ..here, somewhat modified.
2141         * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
2142         _bfd_elf_link_find_version_dependencies,
2143         _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
2144         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2145         _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
2146         declare..
2147         * elflink.c: ..and make static here.
2148         (_bfd_elf_link_find_version_dependencies): Adjust for removal
2149         of output_bfd from struct elf_find_verdep_info.
2150         (_bfd_elf_link_assign_sym_version): Similarly adjust to use
2151         struct elf_info_failed.
2152         (bfd_elf_size_dynamic_sections): Adjust.
2154 2009-01-22  Alan Modra  <amodra@bigpond.net.au>
2156         PR 6832
2157         * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
2158         after comp_unit_find_line call.
2160 2009-01-21  Nick Clifton  <nickc@redhat.com>
2162         PR 9769
2163         * vmsutil.c (vms_file_stats_name): Remove use of unsupported
2164         tm_gmtoff field in struct tm.
2166 2009-01-21  Alan Modra  <amodra@bigpond.net.au>
2168         * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
2169         * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
2170         sections in soft-icache lines unless non_ia_text.  Don't add
2171         rodata if doing so would exceed line size.
2173 2009-01-19  Hans-Peter Nilsson  <hp@axis.com>
2175         * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
2176         types than bfd_link_hash_indirect, before early return, call
2177         _bfd_elf_link_hash_copy_indirect.
2179 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
2181         * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
2182         * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
2183         * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
2184         (elf_backend_obj_attrs_order): New define.
2185         * elfxx-target.h (elf_backend_obj_attrs_order): New define.
2186         (elfNN_bed): Add elf_backend_obj_attrs_order.
2188 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
2190         * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
2191         (obj_attr_size): Likewise.
2192         (write_obj_attribute): Likewise.
2193         (_bfd_elf_copy_obj_attributes): Likewise.
2194         (_bfd_elf_parse_attributes): Likewise.
2195         * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
2196         (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
2197         (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
2198         (ATTR_TYPE_HAS_NO_DEFAULT): New define.
2199         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
2200         with macros.
2202 2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
2204         * elf-attrs.c (is_default_attr): Support defaultless attributes.
2205         (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
2206         (bfd_elf_add_obj_attr_string): Likewise.
2207         (bfd_elf_add_obj_attr_int_string): Likewise.
2208         (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
2209         * elf-bfd.h (struct obj_attribute): Document new flag bit.
2210         * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
2211         Tag_nodefaults has no default value.
2212         (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
2213         comment to reflect the new state.
2215 2009-01-19  Alan Modra  <amodra@bigpond.net.au>
2217         PR 9695
2218         * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
2219         (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
2220         (adjust_z_magix): Delete dead code handling QMAGIC.
2222 2009-01-16  Kai Tietz  <kai.tietz@onevision.com>
2224         * coffcode.h (styp_to_sec_flags): Correct interpretation of
2225         IMAGE_SCN_MEM_DISCARDABLE.
2227 2009-01-16  Alan Modra  <amodra@bigpond.net.au>
2229         * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
2230         SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
2231         * configure.in (commonbfdlib): Delete.
2232         (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
2233         (SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
2234         is available, not just for linux.
2235         * po/SRC-POTFILES.in: Regenerate.
2236         * Makefile.in: Regenerate.
2237         * configure: Regenerate.
2239 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
2240             Julian Brown   <julian@codesourcery.com>
2242         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
2243         ARM attributes in ABI 2.07.
2244         * elf32-arm.c (get_secondary_compatible_arch): New function.
2245         (set_secondary_compatible_arch): New function.
2246         (tag_cpu_arch_combine): New function.
2247         (elf32_arm_copy_one_eabi_other_attribute): Delete function.
2248         (elf32_arm_copy_eabi_other_attribute_list): Delete function.
2249         (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
2250         make it fit with order_01243.
2251         Add support for Tag_also_compatible_with,
2252         Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
2253         Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
2254         Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
2255         Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
2256         Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
2257         Tag_VFP_arch and Tag_ABI_FP_16bit_format.
2258         Rework the way unknown attributes are handled.
2259         Defer errors until all attributes have been processed.
2261 2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
2263         * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
2264         bfd_elf_add_obj_attr_int_string.
2265         Read Tag_compatibility from its new location in the attribute array,
2266         rather than the attribute list.
2267         (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
2268         bfd_elf_add_obj_attr_int_string.
2269         (_bfd_elf_parse_attributes): Likewise.
2270         (_bfd_elf_merge_object_attributes): There's now only one
2271         Tag_compatibility, and it's in the array, not the list.
2272         * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
2273         Tag_compatibility.
2274         (bfd_elf_add_obj_attr_compat): Rename to
2275         bfd_elf_add_obj_attr_int_string.
2276         (bfd_elf_add_proc_attr_compat): Rename to
2277         bfd_elf_add_proc_attr_int_string.
2278         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
2279         Tag_compatibility.
2281 2009-01-15  Douglas B Rupp  <rupp@gnat.com>
2283         * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
2284         (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
2285         (vmsutil.lo): Add dependency rule.
2286         * Makefile.in: Regenerate.
2287         * config.bfd (ia64*-*-*vms*): Add case.
2288         * configure.in (bfd_elf64_ia64_vms_vec): Add case.
2289         * configure: Regenerate.
2290         * vmsutil.c: New file.
2291         * vmsutil.h: New file.
2292         * elf-bfd.h (struct bfd_elf_special_section): Change type of
2293         attr to bfd_vma.
2294         * elfxx-ia64.c (elfNN_vms_post_process_headers,
2295         elfNN_vms_section_processing, elfNN_vms_final_write_processing,
2296         elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
2297         elfNN_vms_object_p): New functions
2298         * targets.c (bfd_elf64_ia64_vms_vec): New target.
2300 2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>
2302         PR ld/9727
2303         * elflink.c (elf_gc_sweep): Exclude the group section if the
2304         first member of the section group is excluded.
2306 2009-01-14  Alan Modra  <amodra@bigpond.net.au>
2308         PR 9735
2309         * syms.c (_bfd_stab_section_find_nearest_line): Don't free
2310         saved filename, use bfd_alloc rather than bfd_malloc for it.
2312 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
2314         * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2316 2009-01-13  Alan Modra  <amodra@bigpond.net.au>
2318         * elf32-spu.c (remove_cycles): Always set call->max_depth.
2320 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
2322         * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2324 2009-01-12  Alan Modra  <amodra@bigpond.net.au>
2326         * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
2327         num_lines_log2.
2328         (struct got_entry): Add br_addr.
2329         (struct call_info): Add priority.
2330         (struct function_info): Add lr_store and sp_adjust.
2331         (spu_elf_setup): Init line_size_log2 and num_lines_log2.
2332         (spu_elf_find_overlays): For soft-icache, mark any section within cache
2333         area as an overlay, and check that no other overlays exist.  Look up
2334         icache overlay manager entry sym.
2335         (BRA_STUBS, BRA, BRASL): Define.
2336         (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
2337         (needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
2338         in branch insn.
2339         (count_stub, build_stub): Support soft-icache.
2340         (build_spuear_stubs, process_stubs): Adjust build_stub call.
2341         (spu_elf_size_stubs): Size soft-icache stubs.
2342         (overlay_index): New function.
2343         (spu_elf_build_stubs): Make static.  Support soft-icache.
2344         (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
2345         (find_function_stack_adjust): Save lr store and stack adjust insn
2346         offsets.
2347         (maybe_insert_function): Adjust find_function_stack_adjust call.
2348         (mark_functions_via_relocs): Retrieve priority.
2349         (remove_cycles): Only warn about pruned arcs when stack_analysis.
2350         (sort_calls): Sort by priority first.
2351         (mark_overlay_section): Ignore .ovl.init.
2352         (sum_stack): Only print when stack_analysis.
2353         (print_one_overlay_section): New function, extracted from..
2354         (spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
2355         (spu_elf_stack_analysis): Only print when htab->stack_analysis.
2356         (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
2357         analysis.  Call spu_elf_build_stubs.
2358         (spu_elf_relocate_section): For soft-icache encode overlay index
2359         into addresses.
2360         (spu_elf_output_symbol_hook): Support soft-icache.
2361         (spu_elf_modify_program_headers: Likewise.
2363         * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
2364         num_regions to num_lines.  Add line_size and max_branch.
2365         (enum _ovly_flavour): Add ovly_soft_icache.
2366         (spu_elf_build_stubs): Delete.
2368 2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
2370         * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
2371         relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2373 2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
2375         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2376         <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2377         the program, the known offset starts at the negative size of the
2378         TLS section.
2379         <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2380         Similar.
2382 2009-01-05  Joel Sherrill <joel.sherrill@oarcorp.com>
2384         * config.bfd: Add lm32-*-rtems*.
2386 2009-01-03  H.J. Lu  <hongjiu.lu@intel.com>
2388         * coff-ppc.c: Add 2009 to Copyright.
2389         * elf32-cris.c: Likewise.
2390         * elflink.c: Likewise.
2392 2009-01-03  Hans-Peter Nilsson  <hp@axis.com>
2394         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2395         gotplt_index to rela_plt_index.  Adjust for R_CRIS_DTPMOD entry.
2397 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
2399         PR ld/9679
2400         * elflink.c (elf_merge_st_other): New.
2401         (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2402         hide them if needed.
2403         (elf_link_add_object_symbols): Updated.
2405 2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
2407         PR ld/9676
2408         * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2409         ref_dynamic and dynamic_def fields when setting def_regular
2410         to 1.
2412 2009-01-02  Curtis Mackie  <curtmackevo@gmail.com>
2414         PR 9682
2415         * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2416         literal.
2418 For older changes see ChangeLog-2008
2420 Local Variables:
2421 mode: change-log
2422 left-margin: 8
2423 fill-column: 74
2424 version-control: never
2425 End: