]> Git Repo - binutils.git/blob - bfd/ChangeLog
bfd:
[binutils.git] / bfd / ChangeLog
1 2010-11-02  Joseph Myers  <[email protected]>
2
3         * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for
4         Tag_ABI_compatibility, treat odd tags as strings and even ones as
5         integers.
6         (elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment,
7         elf32_tic6x_array_alignment_to_tag): New.
8         (elf32_tic6x_merge_attributes): Handle more attributes.  Set type
9         for merged attributes.
10         (elf_backend_obj_attrs_order): Define.
11
12 2010-10-29  Maciej W. Rozycki  <[email protected]>
13
14         * elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo.
15
16 2010-10-29  Pawel Sikora  <[email protected]>
17
18         PR binutils/12075
19         * compress.c (bfd_compress_section_contents): Use uLong on
20         compressed_size.
21
22 2010-10-29  Joseph Myers  <[email protected]>
23
24         * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check
25         Tag_ABI_compatibility not Tag_compatibility.
26         (elf32_tic6x_merge_attributes): Update compatibility attribute
27         name in comment.  Return FALSE if merging common attributes fails.
28
29 2010-10-29  Nick Clifton  <[email protected]>
30
31         PR bintils/6962
32         * coffcode.h (handle_COMDAT): Only check the base type when
33         looking for a section symbol.
34
35 2010-10-29  H.J. Lu  <[email protected]>
36             Cary Coutant  <[email protected]>
37
38         * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
39         and BFD_DECOMPRESS.
40
41         * bfd.c (BFD_COMPRESS): New.
42         (BFD_DECOMPRESS): Likewise.
43         (BFD_FLAGS_SAVED): Likewise.
44         (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.
45
46         * compress.c (bfd_uncompress_section_contents): Removed.
47         (get_uncompressed_size): New.
48         (decompress_contents): Likewise.
49         (bfd_compress_section_contents): Likewise.
50         (bfd_get_full_section_contents): Likewise.
51         (bfd_is_section_compressed): Likewise.
52         (bfd_init_section_decompress_status): Likewise.
53         (bfd_init_section_compress_status): Likewise.
54
55         * dwarf2.c (dwarf_debug_sections): New.
56         (dwarf_debug_section_enum): Likewise.
57         (read_section): Remove section_name and compressed_section_name.
58         Add dwarf_debug_section_enum.  Try compressed debug section.
59         (read_indirect_string): Updated.
60         (read_abbrevs): Likewise.
61         (decode_line_info): Likewise.
62         (read_debug_ranges): Likewise.
63         (find_line): Updated.
64
65         * ecoff.c (bfd_debug_section): Add compress_status and
66         compressed_size.
67
68         * elf.c (_bfd_elf_make_section_from_shdr): Call
69         bfd_is_section_compressed to check if a DWARF debug section is
70         compressed.  Call bfd_init_section_compress_status or
71         bfd_init_section_decompress_status if needed.
72
73         * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
74         with bfd_get_full_section_contents.
75         * merge.c (_bfd_add_merge_section): Likewise.
76         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
77         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
78
79         * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
80         BFD_DECOMPRESS.
81         (TARGET_LITTLE_SYM): Likewise.
82
83         * libbfd-in.h (dwarf_debug_section): New.
84         (dwarf_debug_sections): Likewise.
85
86         * libbfd.c (_bfd_generic_get_section_contents): Issue an error
87         when getting contents on compressed/decompressed section.
88
89         * section.c (COMPRESS_SECTION_NONE): New.
90         (COMPRESS_SECTION_DONE): Likewise.
91         (DECOMPRESS_SECTION_SIZED): Likewise.
92         (BFD_FAKE_SECTION): Add compress_status and compressed_size.
93         (bfd_malloc_and_get_section): Replace bfd_get_section_contents
94         with bfd_get_full_section_contents.
95
96         * bfd-in2.h: Regenerated.
97         * libbfd.h: Likewise.
98
99 2010-10-29  Bernd Schmidt  <[email protected]>
100             Joseph Myers  <[email protected]>
101
102         * elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch
103         of DSBT attributes.
104
105 2010-10-25  Daniel Jacobowitz  <[email protected]>
106
107         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call
108         _bfd_clear_contents.  Pass it the input section.
109         * libbfd-in.h (_bfd_clear_contents): Add input_section argument.
110         * libbfd.h: Regenerate.
111         * reloc.c (_bfd_clear_contents): Take input_section argument.
112         Use non-zero for .debug_ranges.
113         (bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents
114         call.
115
116         * elf32-arm.c (elf32_arm_relocate_section): Use
117         RELOC_AGAINST_DISCARDED_SECTION.
118         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
119         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
120         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
121         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
122         * elf32-bfin.c (bfin_relocate_section): Likewise.
123         (bfinfdpic_relocate_section): Likewise.
124         * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
125         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
126         * elf32-cris.c (cris_elf_relocate_section): Likewise.
127         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
128         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
129         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
130         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
131         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
132         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
133         * elf32-i370.c (i370_elf_relocate_section): Likewise.
134         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
135         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
136         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
137         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
138         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
139         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
140         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
141         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
142         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
143         * elf32-mep.c (mep_elf_relocate_section): Likewise.
144         * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
145         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
146         * elf32-mt.c (mt_elf_relocate_section): Likewise.
147         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
148         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
149         * elf32-rx.c (rx_elf_relocate_section): Likewise.
150         * elf32-s390.c (elf_s390_relocate_section): Likewise.
151         * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
152         * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
153         * elf32-sh.c (sh_elf_relocate_section): Likewise.
154         * elf32-spu.c (spu_elf_relocate_section): Likewise.
155         * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
156         * elf32-v850.c (v850_elf_relocate_section): Likewise.
157         * elf32-vax.c (elf_vax_relocate_section): Likewise.
158         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
159         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
160         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
161         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
162         (elf64_alpha_relocate_section): Likewise.
163         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
164         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
165         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
166         * elf64-s390.c (elf_s390_relocate_section): Likewise.
167         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
168         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
169         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
170         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
171
172 2010-10-25  Nathan Sidwell  <[email protected]>
173
174         * elf32-tic6x.c: Add attribution.
175
176 2010-10-25  Alan Modra  <[email protected]>
177
178         * elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
179         var warning at -O3.
180
181 2010-10-25  Alan Modra  <[email protected]>
182
183         * opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal.
184         * libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here.
185         * libbfd.h: Regenerate
186         * bfd-in2.h: Regenerate.
187
188 2010-10-25  Alan Modra  <[email protected]>
189
190         * opncls.c (_bfd_id_counter): Rename to bfd_id_counter.
191         (bfd_reserved_id_counter, bfd_use_reserved_id): New vars.
192         (_bfd_new_bfd): Use negative id when bfd_use_reserved_id.
193         (bfd_create): Doc fix.
194         * bfd-in2.h: Regenerate.
195
196 2010-10-22  Rainer Orth  <[email protected]>
197
198         * elfxx-sparc.c (tpoff): Define bed, static_tls_size.
199         Consider static_tls_alignment.
200
201         * elf32-sparc.c (TARGET_BIG_SYM): Redefine to
202         bfd_elf32_sparc_sol2_vec.
203         (TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
204         (elf32_bed): Redefine to elf32_sparc_sol2_bed.
205         (elf_backend_static_tls_alignment): Redefine to 8.
206         Include elf32-target.h.
207         (elf_backend_static_tls_alignment): Undef again for VxWorks.
208
209         * elf64-sparc.c (TARGET_BIG_SYM): Redefine to
210         bfd_elf64_sparc_sol2_vec.
211         (TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
212         (ELF_OSABI): Undef.
213         (elf64_bed): Redefine to elf64_sparc_sol2_bed.
214         (elf_backend_static_tls_alignment): Redefine to 16.
215         Include elf64-target.h.
216
217         * config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
218         Set targ_defvec to bfd_elf32_sparc_sol2_vec.
219         [BFD64] (sparc-*-solaris2*): Set targ_defvec to
220         bfd_elf32_sparc_sol2_vec.
221         Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
222         targ_selvecs.
223
224         * configure.in: Handle bfd_elf32_sparc_sol2_vec,
225         bfd_elf64_sparc_sol2_vec.
226         * configure: Regenerate.
227
228         * targets.c (bfd_elf32_sparc_sol2_vec): Declare.
229         (bfd_elf64_sparc_sol2_vec): Declare.
230         (_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
231         bfd_elf64_sparc_sol2_vec.
232
233 2010-10-21  Joseph Myers  <[email protected]>
234
235         * elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for
236         attribute renaming.
237         (elf_backend_obj_attrs_section): Change to ".c6xabi.attributes".
238
239 2010-10-21  Rainer Orth  <[email protected]>
240
241         * elf-bfd.h (struct elf_backend_data): New member
242         static_tls_alignment.
243         * elfxx-target.h (elf_backend_static_tls_alignment): Provide
244         default.
245         (elfNN_bed): Initialize static_tls_alignment.
246         * elflink.c (bfd_elf_final_link): Don't round end of TLS section
247         if static TLS has special alignment requirements.
248         * elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size.
249         Consider static_tls_alignment.
250         (elf_backend_static_tls_alignment): Redefine for Solaris 2.
251         Undef again for VxWorks.
252         * elf64-x86-64.c (elf64_x86_64_tpoff):  Define bed,
253         static_tls_size.
254         Consider static_tls_alignment.
255         (elf_backend_static_tls_alignment): Redefine for Solaris 2.
256         Undef again for Intel L1OM.
257
258 2010-10-14  Dave Korn  <[email protected]>
259
260         Apply LD plugin patch series (part 6/6).
261         * aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference
262         parameter and pass it when invoking add_archive_element callback.
263         (aout_link_check_archive_element): Handle substitute bfd if it
264         was set during add_archive_element callback in the above.
265         * cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference
266         parameter and pass it when invoking add_archive_element callback.
267         (coff_link_check_archive_element): Handle substitute bfd if it
268         was set during add_archive_element callback in the above.
269         * ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading
270         code factored-out from ecoff_link_check_archive_element.
271         (reread_ext_syms_and_strs): Clear old symbols and call it.
272         (ecoff_link_check_archive_element):  Use the above.  Handle substitute
273         BFD if one is set by add_archive_element callback.
274         (ecoff_link_add_archive_symbols): Likewise allow bfd substitution.
275         * elflink.c (elf_link_add_archive_symbols): Likewise.
276         * linker.c (generic_link_check_archive_element): Likewise.
277         * pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference
278         parameter and pass it when invoking add_archive_element callback.
279         (aout_link_check_archive_element): Handle substitute bfd if it was
280         set during add_archive_element callback in the above.
281         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute
282         BFD if one is set by add_archive_element callback.
283         * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd"
284         reference parameter and pass it when invoking add_archive_element
285         callback.
286         (xcoff_link_check_ar_symbols): Likewise.
287         (xcoff_link_check_archive_element): Handle bfd substitution if it was
288         set by callback in the above.
289
290 2010-10-11  Alan Modra  <[email protected]>
291
292         * elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
293         (elf32_frvfdpic_finish_dynamic_sections): Don't crash on
294         __ROFIXUP_END__ defined in shared lib.
295
296 2010-10-11  Thomas Schwinge  <[email protected]>
297
298         * elf32-arm.c (elf32_arm_final_link_relocate)
299         (elf32_arm_relocate_section): Handle relocations against STN_UNDEF.
300
301 2010-10-11  Dave Korn  <[email protected]>
302
303         * elflink.c (_bfd_elf_link_output_relocs): Delete unused variable
304         "output_rel_hdr".
305
306 2010-10-09  John Tytgat  <[email protected]>
307
308         * reloc.c (BFD_RELOC_ARM_HVC): Add.
309         * libbfd.h: Regenerate.
310
311 2010-10-08  Kai Tietz  <[email protected]>
312
313         * pei-x86_64.c (find_next_xdata_or_end): Removed.
314         (pex64_dump_xdata): Remove arguments stop, onaline,
315         and pdata. New argument endx.  Print term "none"
316         instead of misleading "CFA".
317         (sort_xdata_arr): New function.
318         (pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs
319         instead of searching quadratic.
320
321 2010-10-08  Pierre Muller  <[email protected]>
322             Alan Modra  <[email protected]>
323
324         Fix build with -DDEBUG=7
325         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call
326         to deleted function elf_symbol_flags.  Add typecast to avoid warning.
327         * elf32-rx.c (dump_symbol) : Rename to..
328         (rx_dump_symbol): ..this to avoid link errors.
329         * elflink.c (elf_link_input_bfd): Add typecast to avoid warnings.
330         (bfd_elf_perform_complex_relocation): Likewise.
331         * elf32-xtensa.c (print_action_list): Likewise.
332
333 2010-10-06  Nathan Sidwell  <[email protected]>
334
335         * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
336         elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
337         ip/r12.
338         (arm_type_of_stub): Remove superfluous braces.
339
340 2010-10-04  Bernd Schmidt  <[email protected]>
341
342         * elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
343         (struct bfd_elf_section_data): New members REL and RELA; delete
344         members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX,
345         REL_IDX2, REL_HASHES.
346         (_bfd_elf_init_reloc_shdr): Adjust declaration.
347         (_bfd_elf_single_rel_hdr): Declare.
348         (RELOC_AGAINST_DISCARDED_SECTION): Use it.
349         * elf.c (bfd_section_from_shdr): Adjusted to match changes in
350         data structures.
351         (_bfd_elf_init_reloc_shdr): New arg RELDATA.  Remove arg REL_HDR.
352         All callers changed.  Allocate memory for the Elf_Internal_Shdr
353         structure.
354         (_bfd_elf_single_rel_hdr): New function.
355         (struct fake_section_arg): New structure.
356         (elf_fake_section): Expect to see a pointer to it in the third
357         argument.  If doing a relocatable link, allocate both REL and RELA
358         sections as needed.
359         (assign_section_numbers): Adjusted to match changes in
360         data structures.
361         (_bfd_elf_compute_section_file_positions): Call elf_fake_sections
362         with a struct fake_section_args argument.
363         * elfcode.h (elf_write_relocs): Adjusted to match changes in
364         data structures.
365         (elf_slurp_reloc_table): Likewise.
366         * elflink.c (_bfd_elf_link_read_relocs): Likewise.
367         (_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with
368         RELDATA.  Remove argument O.  All callers changed.  Remove code to
369         discover the right rel_hdr and count.
370         (_bfd_elf_link_output_relocs): Adjusted to match changes in
371         data structures.
372         (elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH;
373         replace with RELDATA.  All callers changed.
374         (elf_link_input_bfd): Correctly generate rel_hash data when both
375         REL and RELA sections are present.
376         (elf_reloc_link_order): Adjusted to match changes in
377         data structures.
378         (bfd_elf_final_link): Simplify code to count relocs.  Free the
379         hashes array for both REL and RELA.
380         (get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr
381         * elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections):
382         Delete.
383         * elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections):
384         Delete.
385         (elf32_tic6x_rel_relocation_p): Adjusted to match changes in
386         data structures.
387         * elf32-microblaze.c (microblaze_elf_check_relocs): Use
388         _bfd_elf_single_rel_hdr.
389         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
390         * elf32-spu.c (spu_elf_relocate_section): Likewise.
391         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
392         * elf64-hppa.c (get_reloc_section): Likewise.
393         * elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match
394         changes in data structures.
395         (mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr.
396         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
397         (ppc64_elf_edit_toc): Likewise.
398         (get_relocs): Adjusted to match changes in data structures.
399         Allocate an Elf_Internal_Shdr structure if necessary.
400         (ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr.
401         * elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match
402         changes in data structures.
403         * elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr.
404         * elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro.
405         (mips_elf_rel_relocation_p): Adjusted to match changes in data
406         structures.
407         (_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather
408         than MIPS_RELOC_RELOCA_P.
409         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use
410         _bfd_elf_single_rel_hdr.
411         (_bfd_sparc_elf_relocate_section): Likewise.
412
413 2010-10-01  Thomas Schwinge  <[email protected]>
414
415         * elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in
416         SHN_UNDEF, SHN_ABS, SHN_COMMON.
417
418 2010-09-30  H.J. Lu  <[email protected]>
419
420         PR ld/11812
421         * elf32-i386.c (elf_i386_size_dynamic_sections): Don't
422          allocate .got.plt section if there are no GOT nor PLT
423          entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.
424          * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise.
425
426         * elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf.
427
428 2010-09-27  Ralf Wildenhues  <[email protected]>
429
430         * configure: Regenerate.
431
432 2010-09-24  Thomas Schwinge  <[email protected]>
433
434         * elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c,
435         elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c,
436         elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c,
437         elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h,
438         elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to
439         the zero symbol index.
440
441         * elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index
442         to STN_UNDEF, not SHN_UNDEF.
443
444 2010-09-23  Bernd Schmidt  <[email protected]>
445
446         * elf32-tic6x.c (elf32_tic6x_fake_sections): New function.
447         (elf_backend_fake_sections): Define.
448
449 2010-09-23  Matthew Gretton-Dann  <[email protected]>
450
451         * bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value.
452
453 2010-09-23  Alan Modra  <[email protected]>
454
455         * cpu-d10v.c: Make bits_per_address 18 for all arch_info entries.
456
457 2010-09-23  Alan Modra  <[email protected]>
458
459         * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC
460         difference between input and output section.
461
462 2010-09-22  Kai Tietz  <[email protected]>
463
464         * coffcode.h (sec_to_styp_flags): Adjust debug
465         sections to be conform to pe-coff specification
466         and avoid marking them as excluded.
467         (styp_to_sec_flags): Doing reverse mapping.
468
469         * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for
470         setting IAT directory entry.
471
472 2010-09-20  Richard Henderson  <[email protected]>
473
474         * elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc.
475
476 2010-09-19  Richard Sandiford  <[email protected]>
477
478         * elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls.
479         (mips_elf_link_hash_newfunc): Initialize it.
480         (mips_elf_record_global_got_symbol): Add a for_call parameter.
481         (mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather
482         than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls.
483         Try to remove .got entries in favour of .got.plt entries on VxWorks.
484         (_bfd_mips_elf_check_relocs): Do not try to avoid allocating
485         a global GOT entry for VxWorks calls.  Update uses of
486         mips_elf_record_global_got_symbol.
487         (allocate_dynrelocs): Set got_only_for_calls to false if the GOT
488         entry is used for dynamic relocations.
489
490 2010-09-19  Richard Sandiford  <[email protected]>
491
492         * elfxx-mips.c (mips_got_entry): Adjust commentary.
493         (mips_elf_create_local_got_entry): If given a symbol, check that it
494         has been assigned to the local part of the GOT.
495         (mips_elf_count_got_symbols): Take the bfd_link_info as argument
496         instead of the master GOT.  Put all locally-binding symbols in
497         the local area.
498         (mips_elf_make_got_per_bfd): Use global_got_area to decide whether
499         a symbol lives in the local or global area.
500         (mips_elf_local_relocation_p): Remove check_forced argument and
501         retain only the !check_forced behavior.
502         (mips_elf_calculate_relocation): Adjust call accordingly.
503         Use global_got_area to decide whether an output relocation
504         should be local or global.  Explicitly decay R_MIPS_GOT_PAGE
505         into R_MIPS_GOT_DISP where appropriate.  Fix selection of
506         local vs. global semantics for R_MIPS*_26.  Remove redundant
507         reevaluation of what is stored in was_local_p.
508         (mips_elf_create_dynamic_relocation): Use global_got_area to decide
509         whether the relocation should be against a global or local symbol.
510         (mips_elf_lay_out_got): Update the GOT traversal after the above
511         change to mips_elf_count_got_symbols.
512         (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p.
513         (_bfd_mips_elf_relocate_section): Likewise.
514         (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide
515         whether the symbol has a global got entry.
516         (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
517
518 2010-09-19  Richard Sandiford  <[email protected]>
519
520         * elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
521         to the global GOT on VxWorks.
522
523 2010-09-19  Richard Sandiford  <[email protected]>
524
525         * elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
526         exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
527         about HI/LO relocations in shared objects.
528
529 2010-09-16  Alan Modra  <[email protected]>
530
531         * elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc
532         sections.
533         (spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and
534         set dynobj.
535         (spu_elf_finish_dynamic_sections): New function.
536         (elf_backend_finish_dynamic_sections): Define.
537
538 2010-09-16  Alan Modra  <[email protected]>
539
540         * elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD.
541         * elflink.c (elf_link_input_bfd): Likewise.
542
543 2010-09-15  Kai Tietz  <[email protected]>
544
545         * pei-x86_64.c (pex64_get_unwind_info): Reorgnized.
546         (pex64_get_scope_entry): Removed.
547         (find_next_xdata_or_end): New helper.
548         (pex64_dump_xdata): Reworked.
549         (pex64_bfd_print_pdata): Add checking for
550         valid pdata sorting and values. Reworked
551         output.
552
553 2010-09-15  H.J. Lu  <[email protected]>
554
555         PR binutils/12004
556         * plugin.c (bfd_plugin_object_p): Handle NULL iostream.
557
558 2010-09-14  Kai Tietz  <[email protected]>
559
560         * pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make
561         .rdata, .data, and .text partial matched section names.
562         * pei-x86_64.c: Likewise.
563
564         * peXXigen.c (sort_x64_pdata): New helper.
565         (_bfd_XXi_final_link_postscript): Do pdata sorting.
566
567 2010-09-09  H.J. Lu  <[email protected]>
568
569         PR ld/11998
570         * elf.c (assign_file_positions_for_load_sections): Don't warn
571         zero LMA adjustment.
572
573 2010-09-09  Bernd Schmidt  <[email protected]>
574
575         * elflink.c (bfd_elf_final_link): Correct calculation of
576         max_external_reloc_size.
577
578 2010-09-07  Alan Modra  <[email protected]>
579             Marcus Brinkmann  <[email protected]>
580
581         * peXXigen.c: Whitespace.
582         (pe_print_idata): Correct section limit calculations.  Tidy array
583         indexing.
584         (_bfd_XX_print_ce_compressed_pdata): Don't leak memory.
585
586 2010-09-02  Richard Henderson  <[email protected]>
587
588         * config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too.
589
590 2010-09-01  Pedro Alves  <[email protected]>
591
592         * netbsd-core.c (netbsd_core_core_file_pid): Renamed to ...
593         (netbsd_core_file_pid): ... this.
594
595 2010-09-01  Tristan Gingold  <[email protected]>
596
597         * coffcode.h (coff_slurp_line_table): Add a cast.
598         (coff_slurp_reloc_table): Ditto.
599
600 2010-08-30  Gunther Nikl  <[email protected]>
601
602         * cisco-core.c (cisco_core_file_pid): Define.
603
604 2010-08-30  Alan Modra  <[email protected]>
605
606         PR binutils/11953
607         * elf.c (copy_elf_program_header): Calculate map->header_size
608         from lowest_section, not first_section.  Validate program
609         header p_paddr against section lma.  Find lowest_section in
610         second loop over headers.
611
612 2010-08-28  Alan Modra  <[email protected]>
613
614         * elflink.c (_bfd_elf_dynamic_symbol_p): Rename param.  Make
615         common syms local.
616         (_bfd_elf_symbol_refs_local_p): Expand comment.
617         (elf_link_output_extsym): Fix style nit.
618
619 2010-08-26  Nathan Sidwell  <[email protected]>
620
621         * elf32-arm.c (elf32_arm_final_link): Process stub sections
622         exactly once.
623
624 2010-08-25  H.J. Lu  <[email protected]>
625
626         PR ld/11939
627         * elflink.c (elf_link_add_object_symbols): Don't set
628         unique_global for non-ELF hash link table.
629
630 2010-08-25  H.J. Lu  <[email protected]>
631
632         PR ld/11944
633         * elf-bfd.h (elf_backend_data): Add target_id.
634         (bfd_elf_make_generic_object): Renamed to ...
635         (bfd_elf_make_object): This.
636
637         * elf.c (bfd_elf_make_generic_object): Removed.
638         (bfd_elf_make_object): New.
639         (bfd_elf_mkcorefile): Really treat it as an object file.
640
641         * elf-m10300.c (ELF_TARGET_ID): New.
642         * elf32-arm.c (ELF_TARGET_ID): Likewise.
643         * elf32-bfin.c (ELF_TARGET_ID): Likewise.
644         * elf32-cris.c (ELF_TARGET_ID): Likewise.
645         * elf32-frv.c (ELF_TARGET_ID): Likewise.
646         * elf32-i386.c (ELF_TARGET_ID): Likewise.
647         * elf32-lm32.c (ELF_TARGET_ID): Likewise.
648         * elf32-m32r.c (ELF_TARGET_ID): Likewise.
649         * elf32-m68hc11.c (ELF_TARGET_ID): Likewise.
650         * elf32-m68hc12.c (ELF_TARGET_ID): Likewise.
651         * elf32-m68k.c (ELF_TARGET_ID): Likewise.
652         * elf32-microblaze.c (ELF_TARGET_ID): Likewise.
653         * elf32-ppc.c (ELF_TARGET_ID): Likewise.
654         * elf32-s390.c (ELF_TARGET_ID): Likewise.
655         * elf32-sh.c (ELF_TARGET_ID): Likewise.
656         * elf32-sparc.c (ELF_TARGET_ID): Likewise.
657         * elf32-spu.c (ELF_TARGET_ID): Likewise.
658         * elf32-tic6x.c (ELF_TARGET_ID): Likewise.
659         * elf32-xtensa.c (ELF_TARGET_ID): Likewise.
660         * elf64-alpha.c (ELF_TARGET_ID): Likewise.
661         * elf64-hppa.c (ELF_TARGET_ID): Likewise.
662         * elf64-ppc.c (ELF_TARGET_ID): Likewise.
663         * elf64-s390.c (ELF_TARGET_ID): Likewise.
664         * elf64-x86-64.c (ELF_TARGET_ID): Likewise.
665         * elfxx-ia64.c (ELF_TARGET_ID): Likewise.
666
667         * elf32-hppa.c (elf32_hppa_mkobject): Removed.
668         (bfd_elf32_mkobject): Likewise.
669         (ELF_TARGET_ID): New.
670
671         * elf32-mips.c (ELF_TARGET_ID): New.
672         (bfd_elf32_mkobject): Removed.
673
674         * elf64-mips.c (ELF_TARGET_ID): New.
675         (bfd_elf64_mkobject): Removed.
676
677         * elfn32-mips.c (ELF_TARGET_ID): New.
678         (bfd_elf32_mkobject): Removed.
679
680         * elfxx-mips.c (_bfd_mips_elf_mkobject): Removed.
681         * elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise.
682
683         * elfxx-target.h (bfd_elfNN_mkobject): Default to
684         bfd_elf_make_object.
685         (ELF_TARGET_ID): New.  Default to GENERIC_ELF_DATA.
686         (elfNN_bed): Initialize target_id.
687
688 2010-08-25  Julian Brown  <[email protected]>
689
690         * elf32-arm.c (arm_stub_required_alignment): New.
691         (arm_build_one_stub): Use above to partition stubs.
692         (make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not
693         arm_stub_a8_veneer_b_cond.
694
695 2010-08-25  Alan Modra  <[email protected]>
696
697         * aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address.
698         * aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise.
699         * aoutx.h (NAME(aout,reloc_type_lookup)): Likewise.
700         * coff-arm.c (coff_arm_reloc_type_lookup): Likewise.
701         * elf-hppa.h (elf_hppa_reloc_final_type): Likewise.
702         * reloc.c (bfd_default_reloc_type_lookup): Likewise.
703         * riscix.c (riscix_reloc_type_lookup): Likewise.
704
705 2010-08-25  Alan Modra  <[email protected]>
706
707         * elf.c (_bfd_elf_map_sections_to_segments): Don't load program
708         headers if any loaded section wraps the address space.  Simplify
709         ~(m-1) to -m.  Use lma rather than vma when determining whether
710         note sections are adjacent.
711
712 2010-08-22  H.J. Lu  <[email protected]>
713
714         PR ld/11933
715         * elflink.c (elf_link_add_object_symbols): Don't check relocation
716         if input ELF object ID doesn't match output.
717
718 2010-08-21  Ralf Wildenhues  <[email protected]>
719
720         * configure: Regenerate.
721
722 2010-08-20  H.J. Lu  <[email protected]>
723
724         * merge.c (sec_merge_emit): Revert the last checkin.
725
726 2010-08-20  Maciej W. Rozycki  <[email protected]>
727
728         * elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output
729         BFD.
730
731 2010-08-20  Maciej W. Rozycki  <[email protected]>
732
733         * elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT
734         options unless an m68k hash table has been found.
735
736 2010-08-20  Nick Clifton  <[email protected]>
737
738         * merge.c (sec_merge_emit): Do not zero pad sections that do not
739         have an alignment.
740
741 2010-08-18  Pedro Alves  <[email protected]>
742
743         PR corefile/8210
744
745         * bfd-in2.h: Regenerate.
746         * corefile.c (bfd_core_file_pid): New.
747
748         * targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
749         (struct bfd_target) <_core_file_pid>: New.
750
751         * libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
752         * libbfd.c (_bfd_nocore_core_file_pid): New.
753
754         * elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
755         Declare.
756         * elfcode.h (elf_core_file_pid): New define.
757         * elfcore.h (elf_core_file_pid): New function.
758
759         * elf.c (elfcore_make_pid): Rewrite.
760         (elfcore_grok_prstatus): Only set core_pid if not set yet.
761         (elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
762         getting the lwpid from prstat.pr_pid.
763
764         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
765         elf_tdata's core_lwpid instead of to core_pid.
766         (elf64_x86_64_grok_psinfo): Extract the the main process's PID,
767         and store it in elf_tdata's core_pid field.
768         * elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
769         elf_tdata's core_lwpid instead of to core_pid.
770         (elf_i386_grok_psinfo): Extract the the main process's PID, and
771         store it in elf_tdata's core_pid field.
772
773         * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
774         to elf_tdata's core_lwpid instead of to core_pid.
775         * elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
776         elf_tdata's core_lwpid instead of to core_pid.
777         * elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
778         elf_tdata's core_lwpid instead of to core_pid.
779         * elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
780         elf_tdata's core_lwpid instead of to core_pid.
781         * elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
782         elf_tdata's core_lwpid instead of to core_pid.
783         * elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
784         elf_tdata's core_lwpid instead of to core_pid.
785         * elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
786         elf_tdata's core_lwpid instead of to core_pid.
787         * elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
788         elf_tdata's core_lwpid instead of to core_pid.
789         * elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
790         to elf_tdata's core_lwpid instead of to core_pid.
791         * elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
792         to elf_tdata's core_lwpid instead of to core_pid.
793         * elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
794         elf_tdata's core_lwpid instead of to core_pid.
795         * elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
796         elf_tdata's core_lwpid instead of to core_pid.
797         * elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
798         elf_tdata's core_lwpid instead of to core_pid.
799         * elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
800         elf_tdata's core_lwpid instead of to core_pid.
801         * elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
802         elf_tdata's core_lwpid instead of to core_pid.
803         * elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
804         elf_tdata's core_lwpid instead of to core_pid.
805
806         * plugin.c (bfd_plugin_core_file_pid): New function.
807         * aout-target.h (MY_core_file_pid): Define.
808         * aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
809         * coff-rs6000.c (coff_core_file_pid): New define.
810         (rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
811         * coff64-rs6000.c (coff_core_file_pid): New define.
812         (rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
813         (xcoff64_core_file_pid): New define.
814         (aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
815         * mach-o-target.c (bfd_mach_o_core_file_pid): New define.
816         * aix386-core.c (aix386_core_file_pid): New define.
817         * hppabsd-core.c (hppabsd_core_core_file_pid): New define.
818         * hpux-core.c (hpux_core_core_file_pid): New define.
819         * irix-core.c (irix_core_core_file_pid): New define.
820         * lynx-core.c (lynx_core_file_pid): New define.
821         * osf-core.c (osf_core_core_file_pid): New define.
822         * ptrace-core.c (ptrace_unix_core_file_pid): New define.
823         * sco5-core.c (sco5_core_file_pid): New define.
824         * xcoff-target.h (coff_core_file_pid): New define.
825         * netbsd-core.c (netbsd_core_core_file_pid): New define.
826
827 2010-08-13  H.J. Lu  <[email protected]>
828
829         PR ld/11913
830         * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
831          .got.plt section is discarded.
832          * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.
833
834 2010-08-13  Nathan Sidwell  <[email protected]>
835
836         * elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
837         variant.
838
839 2010-08-12  H.J. Lu  <[email protected]>
840
841         PR binutils/11909
842         * Makefile.am (coff-tic4x.lo): New.  Disable -Werror.
843         (coff-tic54x.lo): Likewise.
844         * Makefile.in: Regenerated.
845
846 2010-08-12  Todd Veldhuizen  <[email protected]>
847
848         PR ld/11843
849         * elflink.c (compute_bucket_count): Avoid futile long searches for
850         the best bucket size.
851
852 2010-08-09  Richard Henderson  <[email protected]>
853
854         PR ld/11891
855         * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing
856         to tlshi/lo until pos0 and pos1 are adjacent.  Use the destination
857         register from the tldgd insn.
858
859 2010-08-09  Catherine Moore  <[email protected]>
860
861         * elfxx-mips.c (mips_elf_perform_relocation): Improve
862         interlinking error message.
863
864 2010-08-06  Alan Modra  <[email protected]>
865
866         * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
867         (ppc64_elf_relocate_section): Nop out high part insn of large toc
868         code sequence when the high part of offset is zero.
869
870 2010-08-04  Tristan Gingold  <[email protected]>
871
872         * vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
873         (alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
874         Clear the SEC_RELOC flag.
875
876 2010-08-04  Tristan Gingold  <[email protected]>
877
878         * vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
879         sections with relocs.
880         (alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
881         (alpha_vms_add_fixup_ca): Ditto.
882         (alpha_vms_add_fixup_qr): Ditto.
883         Add comments.
884
885 2010-08-04  Tristan Gingold  <[email protected]>
886
887         * vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
888         CODE sections writable.
889
890 2010-08-04  Tristan Gingold  <[email protected]>
891
892         * vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
893         (alpha_vms_add_fixup_lr): ... this for consistency.
894         (alpha_vms_add_qw_fixup): Removed.
895         Fix some comments.
896         (vms_get_symbol_info): Adjust type for unknown sections.
897
898 2010-08-04  Tristan Gingold  <[email protected]>
899
900         * vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
901         section for any absolute section.  Remove some debugging code.
902
903 2010-08-03  DJ Delorie  <[email protected]>
904
905         * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes.
906
907 2010-08-03  Tristan Gingold  <[email protected]>
908
909         * vms-misc.c (vms_convert_to_var): Make it static.
910         (_bfd_vms_convert_to_var_unix_filename): Make it public.
911
912 2010-08-03  Tristan Gingold  <[email protected]>
913
914         * makefile.vms (OBJS): Update list.
915
916 2010-08-03  Tristan Gingold  <[email protected]>
917
918         * vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
919         nor SEC_RELOC for empty sections.
920
921 2010-08-03  Tristan Gingold  <[email protected]>
922
923         * vms-alpha.c (evax_section_flags): Fix flags for absolute
924         section.  Remove useless parenthesis.
925
926 2010-08-03  Tristan Gingold  <[email protected]>
927
928         * vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
929         (vms_lib_bread, vms_lib_bopen): Adjust.
930
931 2010-08-02  Alan Modra  <[email protected]>
932
933         PR 11866
934         * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
935         calculate off_adjust rather than first section vma.
936
937 2010-07-30  H.J. Lu  <[email protected]>
938
939         * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
940
941 2010-07-30  Anthony Green  <[email protected]>
942
943         * config.bfd (targ_cpu): Add moxie-*-rtems support.
944
945 2010-07-29  Alan Modra  <[email protected]>
946
947         * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
948         .toc section, even when none are used in relocs.
949
950 2010-07-27  Maciej W. Rozycki  <[email protected]>
951
952         * elfxx-mips.h: Include "elf/mips.h".
953         (gprel16_reloc_p): New static inline function.
954         * elfxx-mips.c (_bfd_mips_elf_check_relocs)
955         [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
956         Use got16_reloc_p.
957         (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
958         gprel16_reloc_p.
959         * elf32-mips.c (mips_info_to_howto_rel): Likewise.
960         * elfn32-mips.c (mips_info_to_howto_rel): Likewise.
961
962 2010-07-27  Maciej W. Rozycki  <[email protected]>
963
964         * elf64-mips.c (mips_elf64_howto_table_rela)
965         [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
966         [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
967         [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
968         [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
969         [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
970         * elfn32-mips.c (elf_mips_howto_table_rela)
971         [R_MIPS_TLS_DTPMOD32]: Likewise.
972         [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
973         [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
974         [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
975         [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
976
977 2010-07-23  Naveen.H.S  <[email protected]>
978             Ina Pandit  <[email protected]>
979
980         * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and
981         bfd_mach_v850e2v3.
982         * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and
983         bfd_mach_v850e2v3.
984         (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL,
985         BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23,
986         BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
987         BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
988         BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
989         BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
990         BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT,
991         BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL,
992         BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY,
993         BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT,
994         BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF,
995         BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
996         BFD_RELOC_V850_DATA): New relocations for V850 target.
997         * config.bfd: Match all v850 targets.
998         * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
999         * elf32-v850.c (v850_elf_check_relocs): Check the newly added
1000         relocations.
1001         (v850_elf_perform_relocation ): Update the newly added
1002         relocations.
1003         (v850_elf_howto_t): Update the specifications of added
1004         relocations.
1005         (v850_elf_reloc_map): Update the relocation mappings.
1006         (v850_elf_final_link_relocate): Maps added relocation into the
1007         appropriate howto structure.
1008         (v850_elf_object_p): Add support for V850E2 and V850E2V3.
1009         (v850_elf_final_write_processing): Likewise.
1010         (v850_elf_merge_private_bfd_data): Likewise.
1011         (v850_elf_print_private_bfd_data): Likewise.
1012         * libbfd.h: Regenerate.
1013         * bfd-in2.h: Regenerate.
1014
1015 2010-07-23  Alan Modra  <[email protected]>
1016
1017         * archive.c (_bfd_archive_bsd44_construct_extended_name_table):
1018         Correct format specifier.
1019
1020 2010-07-22  Alan Modra  <[email protected]>
1021
1022         * ecoff.c: Don't include aout/ranlib.h.
1023         (_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
1024         (_bfd_ecoff_write_armap): Output ar_date and ar_size using
1025         _bfd_ar_spacepad.
1026
1027 2010-07-22  Alan Modra  <[email protected]>
1028
1029         * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
1030         relocs.
1031
1032 2010-07-20  Alan Modra  <[email protected]>
1033
1034         * elf.c (assign_file_positions_for_load_sections): Check that
1035         zero size sections are allocated in segments too.
1036         (assign_file_positions_for_non_load_sections): Warn if zero
1037         size alloc sections are found here.
1038         (copy_elf_program_header): Don't drop zero size sections from
1039         segment map.
1040         (copy_private_bfd_data): Check for changes in zero size sections.
1041
1042 2010-07-17  Alan Modra  <[email protected]>
1043
1044         * elf.c (_bfd_elf_map_sections_to_segments): Force new segment
1045         for sections with overlapping LMAs.
1046         (assign_file_positions_for_load_sections): Catch overlap for
1047         sections that wrap around the address space.  Replace a
1048         warning that duplicates ld's --check-sections error with a
1049         warning that lma has been adjusted for overlapping sections.
1050
1051 2010-07-14  Cary Coutant  <[email protected]>
1052
1053         PR ld/11817
1054         * dwarf2.c (read_section): Revert patch for compressed debug sections.
1055         (find_line): Likewise.
1056         (read_and_uncompress_section): Remove.
1057
1058 2010-07-13  H.J. Lu  <[email protected]>
1059
1060         PR ld/11812
1061         * elf32-i386.c (elf_i386_size_dynamic_sections): Don't
1062          allocate .got.plt section if there are no GOT nor PLT
1063          entries.
1064          * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1065
1066 2010-07-13  H.J. Lu  <[email protected]>
1067
1068         PR ld/11791
1069         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
1070         garbage collection against STT_GNU_IFUNC symbols.
1071
1072         * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
1073         elf.plt.offset/elf.got.offset to -1.
1074         (elf_i386_tls_transition): Skip TLS transition for functions.
1075         (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
1076
1077         * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
1078         elf.plt.offset/elf.got.offset to -1.
1079         (elf64_x86_64_tls_transition): Skip TLS transition for functions.
1080         (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
1081
1082 2010-07-12  H.J. Lu  <[email protected]>
1083
1084         * elf32-i386.c (elf_i386_check_relocs): Re-indent.
1085         (elf_i386_relocate_section): Likewise.
1086
1087 2010-07-06  H.J. Lu  <[email protected]>
1088
1089         * dwarf2.c (add_line_info): Initialize prev_line.
1090
1091 2010-07-06  Alan Modra  <[email protected]>
1092
1093         * elf32-ppc.c (ppc_elf_relax_section): Insert branch around
1094         trampolines only for .init and .fini sections.
1095
1096 2010-07-05  Alan Modra  <[email protected]>
1097
1098         * elf32-ppc.c: Formatting.
1099         (ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
1100
1101 2010-07-03  Cary Coutant  <[email protected]>
1102
1103         * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
1104         * dwarf2.c (read_and_uncompress_section): New function.
1105         (read_section): Call it.
1106         (find_line): Likewise.
1107
1108 2010-07-01  Alan Modra  <[email protected]>
1109
1110         * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
1111         than SYMBOL_REFERENCES_LOCAL.
1112         (ppc64_elf_relocate_section): Likewise.
1113
1114 2010-07-01  Alan Modra  <[email protected]>
1115
1116         * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
1117
1118 2010-06-29  Alan Modra  <[email protected]>
1119
1120         * cpu-maxq.c: Delete file.
1121         * coff-maxq.c: Delete file.
1122         * Makefile.am: Remove references to maxq.
1123         * archures.c: Likewise.
1124         * coffcode.h: Likewise.
1125         * configure.in: Likewise.
1126         * targets.c: Likewise.
1127         * config.bfd: Move maxq from obsolete to removed.
1128         * Makefile.in: Regenerate.
1129         * bfd-in2.h: Regenerate.
1130         * configure: Regenerate.
1131         * libbfd.h: Regenerate.
1132         * po/SRC-POTFILES.in: Regenerate.
1133
1134 2010-06-28  Alan Modra  <[email protected]>
1135
1136         * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
1137         to silence gcc warning.
1138
1139 2010-06-27  Alan Modra  <[email protected]>
1140
1141         * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
1142         (group_sections): Likewise.
1143
1144 2010-06-27  Alan Modra  <[email protected]>
1145
1146         * bout.c (aligncode): Delete set but unused variables.
1147         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1148         * coff-ppc.c (ppc_record_toc_entry): Likewise.
1149         (coff_ppc_relocate_section): Likewise.
1150         * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
1151         * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
1152         * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
1153         (mn10300_elf_relax_section): Likewise.
1154         * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
1155         (record_vfp11_erratum_veneer): Likewise.
1156         (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
1157         (elf32_arm_final_link_relocate): Likewise.
1158         (elf32_arm_check_relocs, arm_map_one_stub): Likewise.
1159         * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
1160         (elf32_avr_relax_section): Likewise.
1161         (avr_mark_stub_not_to_be_necessary): Likewise.
1162         * elf32-bfin.c (_bfin_create_got_section): Likewise.
1163         * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
1164         (elf32_cr16_relax_delete_bytes): Likewise.
1165         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
1166         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1167         * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
1168         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1169         (elf32_h8_relax_delete_bytes): Likewise.
1170         * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1171         * elf32-i370.c (i370_elf_check_relocs): Likewise.
1172         (elf_relocate_section): Likewise.
1173         * elf32-ip2k.c (adjust_all_relocations): Likewise.
1174         (ip2k_elf_relax_section): Likewise.
1175         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1176         (lm32_elf_check_relocs): Likewise.
1177         (lm32_elf_finish_dynamic_sections): Likewise.
1178         (lm32_elf_finish_dynamic_symbol): Likewise.
1179         * elf32-m32c.c (m32c_offset_for_reloc): Likewise.
1180         (m32c_elf_relax_delete_bytes): Likewise.
1181         * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
1182         (m32r_elf_finish_dynamic_sections): Likewise.
1183         (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
1184         * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
1185         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1186         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1187         * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1188         (microblaze_elf_check_relocs): Likewise.
1189         (microblaze_elf_finish_dynamic_symbol): Likewise.
1190         * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
1191         * elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
1192         * elf32-rx.c (rx_elf_relocate_section): Likewise.
1193         (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
1194         (elf32_rx_relax_section): Likewise.
1195         * elf32-score.c (score_elf_got_offset_from_index): Likewise.
1196         (score_elf_final_link_relocate): Likewise.
1197         (s3_bfd_score_elf_relocate_section): Likewise.
1198         * elf32-score7.c (score_elf_got_offset_from_index): Likewise.
1199         (s7_bfd_score_elf_relocate_section): Likewise.
1200         * elf32-sh.c (sh_elf_check_relocs): Likewise.
1201         * elf32-spu.c (spu_elf_relocate_section): Likewise.
1202         * elf32-v850.c (v850_elf_check_relocs): Likewise.
1203         (find_remembered_hi16s_reloc): Likewise.
1204         * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
1205         (elf_vax_relocate_section): Likewise.
1206         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1207         * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
1208         (move_literal): Likewise.
1209         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1210         (elf64_hppa_check_relocs): Likewise.
1211         (elf64_hppa_finish_dynamic_symbol): Likewise.
1212         (elf64_hppa_relocate_section): Likewise.
1213         * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
1214         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1215         (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
1216         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1217         (elfNN_vms_section_from_shdr): Likewise.
1218         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1219         (_bfd_sparc_elf_relocate_section): Likewise.
1220         * hp300hpux.c (slurp_symbol_table): Likewise.
1221         * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
1222         * mach-o.c (bfd_mach_o_write_thread): Likewise.
1223         * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
1224         * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
1225         * pdp11.c (pdp11_aout_link_input_section): Likewise.
1226         (aout_link_input_section, aout_link_input_bfd): Likewise.
1227         * pe-mips.c (mips_swap_reloc_out): Likewise.
1228         (coff_pe_mips_relocate_section): Likewise.
1229         * som.c (som_bfd_ar_write_symbol_stuff): Likewise.
1230         * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
1231         * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
1232
1233         * coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
1234         * coffcode.h (coff_compute_section_file_positions): Likewise.
1235         (coff_slurp_reloc_table): Likewise.
1236         * cpu-arm.c (arm_check_note): Likewise.
1237         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
1238         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1239         * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
1240         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1241         * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1242         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1243         * elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
1244         * ieee.c (parse_expression): Likewise.
1245         (ieee_slurp_external_symbols, drop_int): Likewise.
1246         * peXXigen.c (pe_print_pdata): Likewise.
1247         * versados.c (process_esd): Likewise.
1248
1249 2010-06-25  Tristan Gingold  <[email protected]>
1250
1251         * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
1252         its flags.  Create an absolute section if needed.
1253
1254 2010-06-25  Tristan Gingold  <[email protected]>
1255
1256         * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
1257         sections.  Mark .vmsdebug section as SEC_DEBUGGING.  Do not create
1258         dummy psect anymore.  Adjust.
1259         (_bfd_vms_write_eeom): Adjust (use target_index instead of index)
1260         (_bfd_vms_write_etir): Ditto.
1261         (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
1262         section name.  Adjust.
1263
1264 2010-06-25  Tristan Gingold  <[email protected]>
1265
1266         * vms-alpha.c (alpha_vms_write_exec): Set linktime field.
1267
1268 2010-06-25  Alan Modra  <[email protected]>
1269
1270         * elf64-ppc.c (toc_skip_enum): Define.
1271         (ppc64_elf_edit_toc): Use two low bits of skip array as markers.
1272         Optimize largetoc sequences.
1273         (adjust_toc_syms): Update for skip array change.
1274         (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
1275
1276 2010-06-25  Alan Modra  <[email protected]>
1277
1278         * elf64-ppc.c (is_static_defined): New function.
1279         (get_tls_mask, ppc_type_of_stub): Use it here.
1280         (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
1281         (ppc64_elf_tls_setup): Typo fix.
1282         (adjust_toc_syms): Correctly handle symbols defined past the end
1283         of the toc.  Move syms on removed entries to next entry rather
1284         than to start of toc.
1285         (ppc64_elf_edit_toc): Likewise.  Ensure we only attempt to
1286         edit ppc64 input.  Allocate one extra word in skip array.
1287         Honour info->keep_memory when reading relocs if we can.
1288         Adjust toc relocs after adjusting symbols.
1289
1290 2010-06-23  Nathan Sidwell  <[email protected]>
1291
1292         * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
1293         when scaning map.
1294
1295 2010-06-17  Tristan Gingold  <[email protected]>
1296
1297         * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
1298         (BFD64_BACKENDS_CFILES): ... here.
1299         (BFD32_BACKENDS): Move vms-alpha.lo to ...
1300         (BFD64_BACKENDS): ... here.
1301         * Makefile.in: Regenerate.
1302
1303 2010-06-15  Joseph Myers  <[email protected]>
1304
1305         * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
1306         * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
1307         elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
1308         elf32_tic6x_merge_private_bfd_data): New.
1309         (bfd_elf32_bfd_merge_private_bfd_data,
1310         elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
1311         elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
1312         Define.
1313         * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
1314
1315 2010-06-15  Joseph Myers  <[email protected]>
1316
1317         * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
1318         (struct elf_backend_data): Update comment on obj_attrs_order.
1319         * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
1320         _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
1321         instead of hardcoded 4.
1322         * elf32-arm.c (elf32_arm_obj_attrs_order): Use
1323         LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
1324         instead of hardcoded 4 and 5.
1325         (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
1326         instead of hardcoded 4.
1327
1328 2010-06-14  Kevin Buettner  <[email protected]>
1329
1330         * elf32-h8300.c (elf_symbol_leading_char): Define.
1331
1332 2010-06-11  Jan Kratochvil  <[email protected]>
1333
1334         * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
1335
1336 2010-06-11  Tristan Gingold  <[email protected]>
1337
1338         * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
1339         sections to 0.
1340
1341 2010-06-11  Tristan Gingold  <[email protected]>
1342
1343         * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
1344
1345 2010-06-11  Tristan Gingold  <[email protected]>
1346
1347         * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
1348         Adjust cast.
1349         (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
1350         * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
1351         * vms-alpha.c (evax_section_flags): Make it const.
1352         (vms_secflag_by_name): Remove unused ABFD argument.
1353         Make SECTION_FLAGS and NAME arguments const. Clarify comment.
1354         (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
1355         (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
1356         (_bfd_vms_write_egsd): Remove useless cast.
1357
1358 2010-06-10  Tristan Gingold  <[email protected]>
1359
1360         * config.bfd: Remove #if/#endif so that som can be compiled on any
1361         host.
1362         * targets.c (_bfd_target_vector): Remove #if/#endif so that som
1363         can be used on any host.
1364
1365 2010-06-10  Tristan Gingold  <[email protected]>
1366
1367         * som.c: Can now be compiled on any host.
1368         Include bfd headers instead of system one.
1369         (som_compute_checksum): Parameter is now a pointer to a
1370         som_external_header structure.  Adjust.
1371         (struct section_to_type): Field section is now const.
1372         (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
1373         definition.
1374         (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
1375         (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
1376         (som_swap_clock_in, som_swap_clock_out): New functions.
1377         (som_swap_header_in, som_swap_header_out): Likewise.
1378         (som_swap_space_dictionary_in): Likewise.
1379         (som_swap_space_dictionary_out): Likewise.
1380         (som_swap_subspace_dictionary_in): Likewise.
1381         (som_swap_subspace_dictionary_record_out): Likewise.
1382         (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
1383         (som_swap_string_auxhdr_out): Likewise.
1384         (som_swap_compilation_unit_out): Likewise.
1385         (som_swap_exec_auxhdr_in): Likewise.
1386         (som_swap_exec_auxhdr_out): Likewise.
1387         (som_swap_lst_header_in): Likewise.
1388         (som_object_setup): Adjust parameter type using bfd types.
1389         (setup_sections): Likewise.  Ditto for object file types.
1390         Use intermediate variables for external representation and use the
1391         swap functions to convert.
1392         (som_object_p): Ditto.  Remove #ifdef/#endif on always defined
1393         macros.
1394         (som_prep_headers): Likewise.
1395         (som_write_symbol_strings): Likewise.
1396         (som_begin_writing): Likewise.
1397         (som_finish_writing): Likewise.
1398         (som_build_and_write_symbol_table): Likewise.
1399         (bfd_section_from_som_symbol): Likewise.
1400         (som_slurp_symbol_table): Likewise.
1401         (som_bfd_print_private_bfd_data): Likewise.
1402         (bfd_som_attach_aux_hdr): Likewise.  Clear the padding.
1403         (bfd_som_attach_compilation_unit): Likewise.
1404         (som_bfd_count_ar_symbols): Likewise.
1405         (som_bfd_fill_in_ar_symbols): Likewise.
1406         (som_slurp_armap): Likewise.
1407         (som_bfd_ar_write_symbol_stuff): Likewise.
1408         (som_write_armap): Likewise.  Use _bfd_ar_spacepad instead of
1409         sprintf to write header fields.
1410         * som.h: Include bfd headers instead of system one.
1411         (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
1412         (struct somdata): Use bfd structures instead of system ones.
1413         (struct som_section_data_struct): Likewise.
1414         (struct som_subspace_dictionary_record): Removed (now in
1415         include/som/internal.h)
1416
1417 2010-06-10  Tristan Gingold  <[email protected]>
1418
1419         * targets.c (bfd_target_list): Remove hp/ux compiler work-around
1420         as bfd requires an ANSI-C compiler.
1421
1422 2010-06-09 Tristan Gingold  <[email protected]>
1423
1424         * bfdio.c (bfd_bread): Fix the code to prevent reading past the
1425         end of archive members.
1426
1427 2010-06-08  Tristan Gingold  <[email protected]>
1428
1429         * som.c (som_bfd_free_cached_info): Do not free relocations as
1430         they were allocated with bfd_zalloc.
1431
1432 2010-06-08  Tristan Gingold  <[email protected]>
1433
1434         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
1435         for the first block.
1436
1437 2010-06-08  Tristan Gingold  <[email protected]>
1438
1439         * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
1440         * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
1441         * libbfd.h: Regenerate.
1442         * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
1443         (bfd_elfNN_mkarchive): Ditto.
1444
1445 2010-06-02  Tristan Gingold  <[email protected]>
1446
1447         * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
1448
1449 2010-06-01  Ralf Wildenhues  <[email protected]>
1450
1451         * configure: Regenerate.
1452
1453 2010-06-01  Tristan Gingold  <[email protected]>
1454
1455         * vms-alpha.c (struct vms_private_data_struct): Add
1456         transfer_address field.  Remove unused dst_info field.
1457         (alpha_vms_write_exec): Use transfer_address.
1458         (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
1459         (alpha_vms_bfd_final_link): Set transfer_address.
1460
1461 2010-05-31  Tristan Gingold  <[email protected]>
1462
1463         * vms-lib.c (credat_lo, credat_hi): New fields.
1464         (vms_read_block): Adjust comments.
1465         (vms_write_block): New function.
1466         (_bfd_vms_lib_archive_p): Decode majorid once.  Replace some
1467         hard-coded values with constants.  Set credat_lo and credat_hi.
1468         (_bfd_vms_lib_mkarchive): Add argument kind.
1469         Set ver, mhd_size and type according to kind.
1470         (_bfd_vms_lib_alpha_mkarchive): New function.
1471         (struct lib_index): Renamed from struct vms_index
1472         (lib_index_cmp): Renamed from vms_index_cmp.  Adjusted.
1473         (get_idxlen): Type of idx argument adjusted.  Add is_elfidx
1474         argument and handle it.
1475         (vms_write_index): Adjust argument idx.  Handle elf indexes.
1476         (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
1477         (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
1478         use it.  Handle elf indexes.  Set credat.
1479         * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
1480         (_bfd_vms_lib_alpha_mkarchive): ... this.
1481         * libbfd.h: Regenerated.
1482         * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
1483
1484 2010-05-28  Sterling Augustine  <[email protected]>
1485
1486         * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
1487         of code to change the bits in the instructions to match the changes
1488         in the relocations.  Declare dest_addr and sym_sec to help.
1489
1490 2010-05-28  Jan Kratochvil  <[email protected]>
1491
1492         Workaround GCC PR middle-end/4210.
1493         * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
1494         and val[3].
1495
1496 2010-05-27  Tristan Gingold  <[email protected]>
1497
1498         * vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
1499         (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
1500         (vms_time_to_time_t): Use them instead of local const.
1501         (vms_time_t_to_vms_time): New function.
1502         (vms_get_time): Likewise.
1503         (vms_raw_get_time): Likewise.
1504         * vms.h (vms_time_t_to_vms_time): New declaration.
1505         (vms_get_time): Likewise.
1506         (vms_raw_get_time): Likewise.
1507
1508 2010-05-26  Tristan Gingold  <[email protected]>
1509
1510         * vms-alpha.c: Update comments.
1511         (alpha_vms_write_exec): Set lnkflags.  Write the GST.
1512         (alpha_vms_link_output_symbol): New function.
1513         (alpha_vms_bfd_final_link): Generate the VMS symbol table.
1514         Set dst_section private field.
1515         (alpha_vms_bfd_final_link): Remove code that set dst_section.
1516
1517 2010-05-26  Tristan Gingold  <[email protected]>
1518
1519         * bfdio.c: Declare and define _bfd_memory_iovec.
1520         (bfd_bread): Move code for BFD_IN_MEMORY...
1521         (bfd_bwrite): ... Ditto ...
1522         (bfd_tell): ... Ditto ...
1523         (bfd_flush): ... Ditto ...
1524         (bfd_stat): ... Ditto ...
1525         (bfd_seek): ... Ditto ...
1526         (bfd_get_size): ... Ditto ...
1527         (bfd_mmap): ... Ditto ...
1528         (memory_bread): ... to these new functions.
1529         (memory_bwrite): Ditto.
1530         (memory_btell): Ditto.
1531         (memory_bseek): Ditto.
1532         (memory_bflush): Ditto.
1533         (memory_bstat): Ditto.
1534         (memory_bmmap): Ditto.
1535         (memory_bclose): New function.
1536         * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
1537         * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
1538         * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
1539         (bfd_make_writable): Use _bfd_memory_iovec.
1540         * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
1541         * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
1542         _bfd_memory_iovec.
1543         (alpha_ecoff_openr_next_archived_file): Use proxy_origin
1544         instead of origin.
1545         * libbfd.h: Regenerate.
1546
1547 2010-05-25  Daniel Jacobowitz  <[email protected]>
1548             Joseph Myers  <[email protected]>
1549             Andrew Stubbs  <[email protected]>
1550
1551         * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
1552         bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
1553         * configure.in: Handle FDPIC vectors.
1554         * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
1555         * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
1556         (SYMBOL_FUNCDESC_LOCAL): Define.  Use it instead of
1557         SYMBOL_REFERENCES_LOCAL for function descriptors.
1558         (fdpic_object_p): New.
1559         (sh_reloc_map): Add FDPIC and movi20 relocations.
1560         (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
1561         range.
1562         (struct elf_sh_plt_info): Add got20 and short_plt.  Update all
1563         definitions.
1564         (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
1565         (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
1566         (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
1567         (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
1568         (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
1569         New.
1570         (get_plt_info): Handle FDPIC.
1571         (MAX_SHORT_PLT): Define.
1572         (get_plt_index, get_plt_offset): Handle short_plt.
1573         (union gotref): New.
1574         (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
1575         got_type and adjust all uses.  Add GOT_FUNCDESC.
1576         (struct sh_elf_obj_tdata): Add local_funcdesc.  Rename
1577         local_got_tls_type to local_got_type.
1578         (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type.  All
1579         users changed.
1580         (sh_elf_local_funcdesc): Define.
1581         (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
1582         and srofixup.
1583         (sh_elf_link_hash_newfunc): Initialize new fields.
1584         (sh_elf_link_hash_table_create): Set fdpic_p.
1585         (sh_elf_omit_section_dynsym): New.
1586         (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
1587         and .rofixup.
1588         (allocate_dynrelocs): Allocate local function descriptors and space
1589         for R_SH_FUNCDESC-related relocations, and for rofixups.
1590         Handle GOT_FUNCDESC.  Create fixups.  Handle GOT entries which
1591         require function descriptors.
1592         (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
1593         (sh_elf_modify_program_headers): New.
1594         (sh_elf_size_dynamic_sections): Allocate function descriptors for
1595         local symbols.  Allocate .got.funcdesc contents.  Allocate rofixups.
1596         Handle local GOT entries of type GOT_FUNCDESC.  Create fixups for
1597         local GOT entries.  Ensure that FDPIC libraries always have a PLTGOT
1598         entry in the .dynamic section.
1599         (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
1600         (sh_elf_add_rofixup, sh_elf_osec_to_segment)
1601         (sh_elf_osec_readonly_p, install_movi20_field): New functions.
1602         (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
1603         R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC.  Use sh_elf_got_offset
1604         and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_.  Add rofixup
1605         read-only section warnings.  Handle undefined weak symbols.  Generate
1606         fixups for R_SH_DIR32 and GOT entries.  Check for cross-segment
1607         relocations and clear EF_SH_PIC.  Handle 20-bit relocations.
1608         Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
1609         (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
1610         R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
1611         Handle 20-bit relocations.
1612         (sh_elf_copy_indirect_symbol): Copy function descriptor reference
1613         counts.
1614         (sh_elf_check_relocs): Handle new relocations.  Make symbols
1615         dynamic for FDPIC relocs.  Account for rofixups.  Error for FDPIC
1616         symbol mismatches.  Allocate a GOT for R_SH_DIR32. Allocate fixups
1617         for R_SH_DIR32.
1618         (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
1619         (sh_elf_merge_private_data): Copy initial flags.  Do not clobber
1620         non-mach flags.  Set EF_SH_PIC for FDPIC.  Reject FDPIC mismatches.
1621         (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
1622         here.  Rename sgot to sgotplt and srel to srelplt.  Handle short_plt,
1623         FDPIC descriptors, and got20.  Create R_SH_FUNCDESC_VALUE for FDPIC.
1624         Use install_movi20_field.  Rename srel to srelgot.  Always generate
1625         R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
1626         (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
1627         Do not fill in reserved GOT entries for FDPIC.  Correct DT_PLTGOT.
1628         Rename sgot to sgotplt.  Assert that the right number of rofixups
1629         and dynamic relocations were allocated.
1630         (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
1631         (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
1632         (elf_backend_can_make_relative_eh_frame)
1633         (elf_backend_can_make_lsda_relative_eh_frame)
1634         (elf_backend_encode_eh_address): Define.
1635         (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
1636         (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
1637         Redefine for FDPIC vector.
1638         * reloc.c: Add SH FDPIC and movi20 relocations.
1639         * targets.c (_bfd_target_vector): Add FDPIC vectors.
1640         * configure, bfd-in2.h, libbfd.h: Regenerated.
1641
1642 2010-05-25  Jay Krell  <[email protected]>
1643
1644         PR ld/11624
1645         * archive.c (_bfd_calloc_wrapper): New function.
1646         (_bfd_add_bfd_to_archive_cache): Use it.
1647
1648         * configure.in: Add alpha*-*-*vms* to list of natives.
1649         * configure: Regenerate.
1650
1651         * vms-misc.c: Define globalref if necessary.
1652         (vms_convert_to_var_unix_filename): Rename to
1653         _bfd_vms_convert_to_var_unix_filename and export.
1654         * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
1655         * vms-alpha.c (vms_close_and_cleanup): Update invocation of
1656         vms_convert_to_var_unix_filename.
1657
1658 2010-05-24  Tristan Gingold  <[email protected]>
1659
1660         * vms-alpha.c (add_symbol_entry): New function extrated from ...
1661         (add_symbol): ... adjusted.
1662
1663 2010-05-24  Tristan Gingold  <[email protected]>
1664
1665         * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
1666         (alpha_vms_write_exec): Add a comment.
1667         (_bfd_vms_write_egsd): Ditto.
1668         (alpha_vms_convert_symbol): Remove a blank line.
1669
1670 2010-05-21  Tristan Gingold  <[email protected]>
1671
1672         * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
1673         for the GST.
1674
1675 2010-05-21  Tristan Gingold  <[email protected]>
1676
1677         * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
1678         SEC_LOAD if isect has data.
1679         (vms_get_symbol_info): Refine the condition for 'T' type.
1680
1681 2010-05-18  Tristan Gingold  <[email protected]>
1682
1683         * vms-alpha.c (_bfd_vms_write_emh): New function.
1684         (_bfd_vms_write_lmn): New function.
1685         (_bfd_vms_write_eeom): Moved.
1686         (hash_string): Likewise.
1687         (_bfd_vms_length_hash_symbol): Likewise.
1688         (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
1689         and _bfd_vms_write_lmn, and call these functions.
1690
1691 2010-05-18  Tristan Gingold  <[email protected]>
1692
1693         * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
1694         Add details in the messages.
1695         (evax_bfd_print_image): Change message.
1696
1697 2010-05-18  H.J. Lu  <[email protected]>
1698
1699         PR gas/11600
1700         * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
1701         (elf_fake_sections): Likewise.
1702
1703         * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
1704         SHF_EXCLUDE here.
1705         * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
1706
1707 2010-05-17  Tristan Gingold  <[email protected]>
1708
1709         * vms-alpha.c: Include esgps.h and eidc.h.
1710         (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
1711         (evax_bfd_print_egsd_flags): New function, extracted from ...
1712         (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags.  Handles
1713         EGSD__C_SPSC and EGSD__C_IDC.
1714
1715 2010-05-14  Tristan Gingold  <[email protected]>
1716
1717         * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
1718         (_bfd_vms_get_object_record): Handle align byte only in the
1719         foreign case.
1720
1721 2010-05-14  Tristan Gingold  <[email protected]>
1722
1723         * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
1724         * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
1725         * libbfd.h: Regenerate.
1726         * configure.in (havevecs): Define HAVE_all_vecs when
1727         --enable-targets=all is set.  Use AC_SUBST on it.
1728         (tdefaults): Do not add havevecs.
1729         (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
1730         * configure: Regenerate.
1731         * Makefile.am (HAVEVECS): New variable.
1732         (INCLUDES): Add HAVEVECS.
1733         * Makefile.in: Regenerate.
1734         * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
1735         target is selected.  Add #ifdef/#endif around vms specific code.
1736         (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
1737         bfd_elfNN_archive_slurp_extended_name_table,
1738         bfd_elfNN_archive_construct_extended_name_table,
1739         bfd_elfNN_archive_truncate_arname,
1740         bfd_elfNN_archive_write_armap,
1741         bfd_elfNN_archive_read_ar_hdr,
1742         bfd_elfNN_archive_write_ar_hdr,
1743         bfd_elfNN_archive_openr_next_archived_file,
1744         bfd_elfNN_archive_get_elt_at_index,
1745         bfd_elfNN_archive_generic_stat_arch_elt,
1746         bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
1747
1748 2010-05-11  Jie Zhang  <[email protected]>
1749
1750         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
1751         Tag_ABI_HardFP_use correctly.
1752
1753 2010-05-11  Alan Modra  <[email protected]>
1754
1755         * coffcode.h (coff_write_object_contents): Enclose all occurrences
1756         of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
1757
1758 2010-05-07  Daniel Jacobowitz  <[email protected]>
1759
1760         * elf32-arm.c (struct a8_erratum_reloc): Add hash member.  Move
1761         sym_name to improve packing.
1762         (cortex_a8_erratum_scan): Check for PLT entries.
1763         (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
1764
1765 2010-05-07  Tristan Gingold  <[email protected]>
1766
1767         * Makefile.in: Regenerate with automake 1.11.1.
1768         * aclocal.m4: Ditto.
1769
1770 2010-05-05  Nick Clifton  <[email protected]>
1771
1772         * po/es.po: Updated Spanish translation.
1773
1774 2010-05-03  Tristan Gingold  <[email protected]>
1775
1776         * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
1777         selective_search flag.
1778         Add comments.
1779         * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
1780         before output_has_begun is set.
1781
1782 2010-05-03  Tristan Gingold  <[email protected]>
1783
1784         * vms-alpha.c: Add comments.
1785         (struct vms_private_data_struct): Remove image_autoextend field.
1786         (dst_check_allocation): Removed.
1787         (image_write): Remove call to dst_check_allocation.
1788         (vms_slurp_debug): Do not set image_autoextend.  Adjust section
1789         size.
1790         (_bfd_vms_slurp_object_records): Remove useless new_type variable.
1791         (alpha_vms_write_exec): Use dst_section to get the dst section.
1792         Write the dmt section.
1793         (evax_bfd_print_image): Also print the dst size in hexa.  Fix typo.
1794         (alpha_vms_read_sections_content): Do not set image_autoextend.
1795         (alpha_vms_bfd_final_link): Generate the dst.
1796
1797 2010-05-03  Tristan Gingold  <[email protected]>
1798
1799         * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
1800         next array.
1801         (vms_lib_dcx): Adjust for the above change.
1802
1803 2010-04-30  H.J. Lu  <[email protected]>
1804
1805         PR ld/11542
1806         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
1807
1808         * elf32-i386.c (elf_i386_relocate_section): Use it.
1809         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1810
1811 2010-04-30  Tristan Gingold  <[email protected]>
1812
1813         * vms-lib.c (vms_read_block): New function.
1814         (vms_traverse_index): Use vms_read_block.  Handle long key names.
1815
1816 2010-04-30  Tristan Gingold  <[email protected]>
1817
1818         * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
1819         and syms removed.
1820         (struct carsym_mem): New structure.
1821         (vms_add_index): New function.
1822         (vms_add_indexes_from_list): New function.
1823         (vms_traverse_index): Parameter carsym changed to carsym_mem.
1824         Code adjusted to handle elfidx.
1825         (vms_lib_read_index): Adjusted for vms_traverse_index changes.
1826         Parameter NBREL is now a pointer.
1827         (_bfd_vms_lib_archive_p): Adjust for above change.  Handle ia64
1828         archives.
1829         (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
1830         (_bfd_vms_lib_find_symbol): Ditto.
1831         (vms_lib_bopen): Fix two typos: return FALSE in case of error,
1832         check MHD id.
1833         (_bfd_vms_lib_get_module): New function.
1834         (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
1835         function.
1836         (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
1837         (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
1838         (vms_write_index): Adjust for structure renamed.
1839         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
1840         changes of _bfd_vms_lib_find_symbol.
1841
1842 2010-04-28  Kai Tietz  <[email protected]>
1843
1844         * config.bfd: Correct accidential reverted patch
1845         about vax*-*-*vms*.
1846
1847 2010-04-27  Kai Tietz  <[email protected]>
1848
1849         * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
1850         to USE_MINGW64_LEADING_UNDERSCORES.
1851         * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
1852         * config.bfd: Change underscoring default for x64 mingw
1853         to false.
1854         * coffcode.h (coff_write_relocs): Add check that dereferenced
1855         sym_ptr_ptr isn't NULL.
1856         * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
1857         * configure: Regenerated.
1858         * configure.in: Add option '--enable-leading-mingw64-underscores'
1859         and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
1860
1861 2010-04-27  Nick Clifton  <[email protected]>
1862
1863         PR binutils/11512
1864         * coffgen.c (coff_find_nearest_line): Incldue the section address
1865         of function name symbols in address comparisons.
1866
1867 2010-04-27  Nick Clifton  <[email protected]>
1868
1869         * po/fr.po: Updated French translation.
1870
1871 2010-04-23  Alan Modra  <[email protected]>
1872
1873         * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
1874         ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
1875         throughout file.
1876         (assign_file_positions_for_load_sections): Modify section in
1877         segment warning to ignore overlay vmas.
1878         * elf32-spu.c (spu_elf_object_p): Replace use of
1879         ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
1880
1881 2010-04-22  Nick Clifton  <[email protected]>
1882
1883         * po/bfd.pot: Updated by the Translation project.
1884         * po/vi.po: Updated Vietnamese translation.
1885
1886 2010-04-22  Alan Modra  <[email protected]>
1887
1888         * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
1889         change.  Tidy.  Don't error on sections not allocated in segment.
1890
1891 2010-04-15  Andrew Haley  <[email protected]>
1892
1893         * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
1894         merge_exidx_entries.
1895         * bfd-in2.h: Likewise.
1896         * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise.  Use it to
1897         control merging of exidx entries.
1898
1899 2010-04-20  Joseph Myers  <[email protected]>
1900
1901         * elf32-tic6x.h: New.
1902         * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
1903         * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
1904         elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
1905         elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
1906         elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
1907         bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
1908         (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
1909         elf32_tic6x_relocate_section): Handle REL relocations.
1910         (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
1911
1912 2010-04-20  Jakub Jelinek  <[email protected]>
1913
1914         * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
1915         DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
1916
1917 2010-04-19  Nick Clifton  <[email protected]>
1918
1919         * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
1920         arhdrpos variable.
1921         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
1922         attribute to warned variable.  Remove unused val, type and type2
1923         variables.
1924
1925 2010-04-16  Andreas Schwab  <[email protected]>
1926
1927         * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
1928         strict-aliasing rules.
1929
1930 2010-04-16  Tristan Gingold  <[email protected]>
1931
1932         * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
1933         (_bfd_vms_get_object_record): Always assume there is a pad byte
1934         for alignment.
1935
1936         * vms-lib.c: Add a few comments.
1937
1938 2010-04-15  Matthew Gretton-Dann  <[email protected]>
1939
1940         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
1941         attributes in v2.08 of the ABI.
1942
1943 2010-04-15  Alan Modra  <[email protected]>
1944
1945         * config.bfd (vax*-*-*vms*): Delete.
1946
1947 2010-04-14  Tristan Gingold  <[email protected]>
1948
1949         * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
1950         vms-tir.lo, vms.lo and add vms-alpha.lo
1951         (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
1952         vms-tir.c, vms.c and add vms-alpha.c
1953         * Makefile.in: Regenerate.
1954         * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
1955         Remove vms_vax_vec.
1956         * configure: Regenerate.
1957         * targets.c (vms_vax_vec): Remove the declaration.
1958         (_bfd_target_vector): Remove vms_vax_vec.
1959         * vms-alpha.c: New file.
1960         * vms-gsd.c: Removed, rewritten in vms-alpha.c
1961         * vms-hdr.c: Ditto.
1962         * vms-tir.c: Ditto.
1963         * vms.c: Ditto.
1964         * vms-misc.c: Fix indentation and comments.  Replace most of
1965         #if VMS_DEBUG/vms_debug with vms_debug2.
1966         (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
1967         (hash_string): Ditto.
1968         (_bfd_vms_length_hash_symbol): Ditto.
1969         (maybe_adjust_record_pointer_for_object): Ditto.
1970         (_bfd_vms_get_object_record): Ditto.
1971         (vms_get_remaining_object_record): Ditto.
1972         (_bfd_vms_push): Ditto.
1973         (_bfd_vms_pop): Ditto.
1974         (_bfd_vms_get_header_values): Removed.
1975         (_bfd_vms_get_first_record): Removed.
1976         (vms_get_remaining_image_record): Removed.
1977         (new_symbol): Removed.
1978         (_bfd_vms_enter_symbol): Removed.
1979         (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
1980         (_bfd_vms_output_begin): Remove rechead parameter.  Replace bfd
1981         parameter with struct vms_rec_wr.
1982         (_bfd_vms_output_push): Removed and replaced by ...
1983         (_bfd_vms_output_begin_subrec): ... new function.
1984         (_bfd_vms_output_alignment): Replace bfd parameter with
1985         struct vms_rec_wr, and adjust.
1986         (_bfd_vms_output_check): Ditto
1987         (_bfd_vms_output_byte): Ditto.
1988         (_bfd_vms_output_short): Ditto.
1989         (_bfd_vms_output_long): Ditto.
1990         (_bfd_vms_output_quad): Ditto.
1991         (_bfd_vms_output_counted): Ditto.
1992         (_bfd_vms_output_dump): Ditto.
1993         (_bfd_vms_output_fill): Ditto.
1994         (_bfd_vms_output_pop): Removed and replaced by ...
1995         (_bfd_vms_output_end_subrec): ... new function.
1996         (_bfd_vms_output_flush): Removed.
1997         (_bfd_vms_output_align): New function.
1998         (_bfd_vms_output_end): Add recwr parameter.  Adjust for this new
1999         parameter.
2000         (vms_convert_to_var): New function imported from vms.c
2001         (vms_convert_to_var_1): Ditto.
2002         (vms_convert_to_var_unix_filename): Ditto.
2003         (vms_get_module_name): Ditto.
2004         (get_vms_time_string): Ditto.
2005         (vms_time_to_time_t): Ditto.
2006         (vms_rawtime_to_time_t): Ditto.
2007         * vms.h: All macros for the VMS file format are now in include/vms.
2008         Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
2009         have been removed.
2010         (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
2011         (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
2012         (struct funcinfo, struct vms_private_data_struct): Ditto.
2013         (struct vms_section_data_struct): Ditto.
2014         (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
2015         (vms_get_module_name, get_vms_time_string): New declarations.
2016         (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
2017         (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
2018         (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
2019         (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
2020         (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
2021         (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
2022         (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
2023         (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
2024         (_bfd_vms_output_fill): Ditto.
2025         (bfd_vms_set_section_flags): Ditto.
2026
2027 2010-04-14  Matthew Gretton-Dann  <[email protected]>
2028
2029         * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
2030         exit due to merging the same weak symbol to test that the symbols are
2031         actually weak.
2032
2033 2010-04-13  Alan Modra  <[email protected]>
2034
2035         * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
2036         when optimizing high got_tlsgd/ld insns.
2037
2038 2010-04-10  H.J. Lu  <[email protected]>
2039
2040         * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
2041         define.
2042         (HAVE_PRSTATUS32_T): Likewise.
2043
2044 2010-04-10  H.J. Lu  <[email protected]>
2045
2046         PR corefiles/11467
2047         * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
2048         for x86_64-*-linux*.
2049         * config.in: Regenerated.
2050         * configure: Likewise.
2051
2052         * elf.c: Include CORE_HEADER if it is defined.
2053
2054 2010-04-10  H.J. Lu  <[email protected]>
2055             Jan Kratochvil  <[email protected]>
2056
2057         * hosts/x86-64linux.h: New.
2058
2059 2010-04-09  Nick Clifton  <[email protected]>
2060
2061         * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
2062         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
2063         variables htab and hdr_info and mark info parameter as unused.
2064         * elf.c (prep_headers): Remove unused variable i_phdrp.
2065         (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
2066         * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
2067         as unused.
2068         * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
2069         * verilog.c (verilog_write_section): Remove unused variable
2070         address.
2071
2072 2010-04-07  Alan Modra  <[email protected]>
2073
2074         * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
2075         * configure: Regenerate.
2076
2077 2010-04-06  H.J. Lu  <[email protected]>
2078
2079         PR ld/11434
2080         * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
2081
2082 2010-04-06  Tristan Gingold  <[email protected]>
2083
2084         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
2085
2086 2010-04-05  Jakub Jelinek  <[email protected]>
2087
2088         * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
2089         provided that it has the expected address size and zero segment
2090         length.
2091
2092         * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
2093         (struct line_info): Add op_index field, change end_sequence type to
2094         unsigned char.
2095         (new_line_sorts_after): For the same address compare op_index.
2096         (add_line_info): Add op_index argument, store it into the structure.
2097         (decode_line_info): Complain about unknown versions of .debug_line.
2098         Initialize maximum_ops_per_insn.  Add op_index state register and
2099         track it.
2100
2101 2010-04-01  Nathan Sidwell  <[email protected]>
2102
2103         * elf32-ppc.c (apuinfo_set): New static var.
2104         (ppc_elf_begin_write_processing): Set it here, always create an
2105         APUinfo section if there were any in the inputs.
2106         (ppc_elf_write_section): Check apuinfo_set.
2107         (ppc_elf_final_write_processing): Likewise.
2108
2109 2010-04-01  Tristan Gingold  <[email protected]>
2110
2111         * vms.h: Include time.h. Add prototypes for vms_get_module_name,
2112         vms_time_to_time_t and vms_rawtime_to_time_t.
2113         * vms.c (vms_alpha_vec): Add archives support.
2114         * vms-misc.c: Include safe-ctype.h
2115         (vms_get_module_name): New function.
2116         (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
2117         * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
2118         vms_get_module_name function.  Use this function.
2119         * targets.c: Declare vms_lib_txt_vec.  Add it to _bfd_target_vector.
2120         * libbfd-in.h: Add prototype for _bfd_append_relative_path.
2121         Add prototypes for vms-lib.c
2122         * libbfd.h: Regenerate.
2123         * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec.  Add
2124         vms-lib.lo to vms_alpha_vec.
2125         * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
2126         * configure: Regenerate.
2127         * bfd.c: Add selective_search field.
2128         * bfd-in2.h: Regenerate.
2129         * archive.c (append_relative_path): Rename to
2130         _bfd_append_relative_path and make it public.
2131         (_bfd_get_elt_at_filepos): Adjust for above renaming.
2132         * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
2133         (BFD32_BACKENDS_CFILES): Add vms-lib.c
2134         * Makefile.in: Regenerate.
2135
2136 2010-04-01  Jakub Jelinek  <[email protected]>
2137
2138         * dwarf2.c (read_attribute_value): Handle CU version 4
2139         for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
2140         and DW_FORM_flag_present.  For unknown form value return NULL.
2141         (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
2142         like DW_FORM_block.
2143         (parse_comp_unit): Allow CU version 4.
2144
2145 2010-04-01  Hans-Peter Nilsson  <[email protected]>
2146
2147         * elf32-cris.c (cris_elf_relocate_section): Correct first argument
2148         to _bfd_elf_get_dynamic_reloc_section.
2149         (elf_cris_discard_excess_dso_dynamics): Ditto.
2150
2151 2010-03-31  Kai Tietz  <[email protected]>
2152
2153         * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
2154         * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
2155
2156 2010-03-31  Alan Modra  <[email protected]>
2157
2158         * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
2159         TPREL16_HI and TPREL16_HA insns.
2160
2161 2010-03-31  Hans-Peter Nilsson  <[email protected]>
2162
2163         PR ld/11458
2164         * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
2165         assert of empty pcrel_relocs_copied on the direct symbol.  Instead
2166         of moving the list from the indirect symbol to the direct symbol,
2167         merge into any existing list.
2168         (cris_elf_check_relocs): Store the original section in the
2169         pcrel_relocs_copied list, not the relocation section.
2170         (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
2171         the relocation section, for reducing its size.  Change the
2172         BFD_ASSERT into a check for the section being read-only, and only
2173         emit warnings and TEXTREL marker when there's an entry for a
2174         read-only section.
2175
2176 2010-03-29  Daniel Jacobowitz  <[email protected]>
2177
2178         * elf32-arm.c (using_thumb_only): Handle v6-M.
2179
2180 2010-03-26  Alan Modra  <[email protected]>
2181
2182         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
2183         * bfd-in.h (elf_discarded_section): Clarify comment.
2184         * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
2185         * bfd-in2.h: Regenerate.
2186
2187 2010-03-26  Matt Rice  <[email protected]>
2188
2189         * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
2190         as unique in the armap.
2191
2192 2010-03-26  Alan Modra  <[email protected]>
2193
2194         PR ld/11375
2195         * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
2196         possible stub on branches.
2197
2198 2010-03-25  Joseph Myers  <[email protected]>
2199
2200         * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
2201         (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
2202         (BFD32_BACKENDS): Add elf32-tic6x.lo.
2203         (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
2204         * Makefile.in: Regenerate.
2205         * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
2206         (bfd_archures_list): Update.
2207         * config.bfd (tic6x-*-elf): New.
2208         * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
2209         New.
2210         * configure: Regenerate.
2211         * cpu-tic6x.c, elf32-tic6x.c: New.
2212         * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
2213         BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
2214         BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
2215         BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
2216         BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
2217         BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
2218         BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
2219         BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
2220         BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
2221         BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
2222         BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
2223         BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
2224         BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
2225         * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
2226         (_bfd_target_vector): Update.
2227         * bfd-in2.h, libbfd.h: Regenerate.
2228
2229 2010-03-24  H.J. Lu  <[email protected]>
2230
2231         * aout-target.h: Update copyright year.
2232         * aout-tic30.c: Likewise.
2233         * coff-alpha.c: Likewise.
2234         * coff-rs6000.c: Likewise.
2235         * coff64-rs6000.c: Likewise.
2236         * elf64-mips.c: Likewise.
2237         * ieee.c: Likewise.
2238         * libecoff.h: Likewise.
2239         * mach-o-target.c: Likewise.
2240         * mach-o.c: Likewise.
2241         * oasys.c: Likewise.
2242         * targets.c: Likewise.
2243
2244 2010-03-24  H.J. Lu  <[email protected]>
2245
2246         * libbfd-in.h: Update copyright year.
2247
2248 2010-03-21  H.J. Lu  <[email protected]>
2249
2250         PR ld/11413
2251         * elflink.c (_bfd_elf_add_default_symbol): Check !executable
2252         instead of shared.
2253
2254 2010-03-19  Jie Zhang  <[email protected]>
2255
2256         * elf32-arm.c (struct section_list): Remove.
2257         (section_list): Remove typedef.
2258         (record_section_with_arm_elf_section_data): Remove.
2259         (find_arm_elf_section_entry): Remove.
2260         (get_arm_elf_section_data): Use is_arm_elf.
2261         (unrecord_section_with_arm_elf_section_data): Remove.
2262         (elf32_arm_new_section_hook): Don't call
2263         record_section_with_arm_elf_section_data.
2264         (elf32_arm_write_section): Set mapcount to -1 when
2265         the map has been used. Don't call
2266         unrecord_section_with_arm_elf_section_data.
2267         (unrecord_section_via_map_over_sections): Remove.
2268         (elf32_arm_close_and_cleanup): Remove.
2269         (elf32_arm_bfd_free_cached_info): Remove.
2270         (bfd_elf32_close_and_cleanup): Don't define.
2271         (bfd_elf32_bfd_free_cached_info): Don't define.
2272
2273 2010-03-18  H.J. Lu  <[email protected]>
2274
2275         PR binutils/11396
2276         * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
2277         * libcoff.h: Regenerated.
2278
2279         * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
2280         if dont_strip_reloc is set.
2281         (_bfd_XX_bfd_copy_private_bfd_data_common): Set
2282         dont_strip_reloc on output if there is no .reloc and
2283         IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
2284
2285 2010-03-18  Wei Guozhi  <[email protected]>
2286
2287         PR gas/11323
2288         * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
2289         R_ARM_GOT_PREL.
2290         * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
2291         * bfd-in2.h: Regenerate.
2292         * libbfd.h: Regenerate.
2293
2294 2010-03-17  H.J. Lu  <[email protected]>
2295
2296         * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
2297         (BFD_RELOC_SPU_STUB): Likewise.
2298
2299 2010-03-17  Jie Zhang  <[email protected]>
2300
2301         * elf.c (assign_file_positions_for_load_sections): Avoid
2302         overflow.
2303
2304 2010-03-17  Alan Modra  <[email protected]>
2305
2306         PR binutils/11382
2307         * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
2308         proper type.
2309
2310 2010-03-17  Alan Modra  <[email protected]>
2311
2312         * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
2313
2314 2010-03-16  Alan Modra  <[email protected]>
2315
2316         * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
2317         (ppc64_elf_edit_toc): Set it here.
2318         (ha_reloc_match): New function.
2319         (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
2320
2321 2010-03-15  Alan Modra  <[email protected]>
2322
2323         * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
2324         * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
2325
2326 2010-03-14  Alan Modra  <[email protected]>
2327
2328         PR ld/11378
2329         * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
2330         * elf64-ppc.c (call_check_done): Define.
2331         (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
2332         (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
2333         (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
2334         (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
2335         Simplify return logic.  Iterate over all .init and .fini fragments
2336         by recursion.  Set makes_toc_func_call here..
2337         (ppc64_elf_next_input_section): ..rather than here.
2338         (check_pasted_section, ppc64_elf_check_init_fini): New functions.
2339
2340 2010-03-13  Alan Modra  <[email protected]>
2341
2342         PR ld/11375
2343         * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
2344         function descriptor symbol if there is one, not just for plt stubs.
2345         (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
2346
2347 2010-03-05  Rainer Orth  <[email protected]>
2348
2349         * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
2350         version twice.
2351         Skip it when constructing def.vd_next.
2352
2353         * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
2354         bfd_elf32_i386_sol2_vec.
2355         (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
2356         (elf32_bed): Redefine to elf32_i386_sol2_bed.
2357         (elf_backend_want_plt_sym): Redefine to 1.
2358
2359         * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
2360         bfd_elf64_x86_64_sol2_vec.
2361         (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
2362         (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
2363         (elf_backend_want_plt_sym): Redefine to 1.
2364
2365         * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
2366         bfd_elf32_i386_sol2_vec.
2367         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
2368         targ64_selvecs.
2369         (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
2370         Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
2371         targ_selvecs.
2372
2373         * configure.in: Handle bfd_elf32_i386_sol2_vec,
2374         bfd_elf64_x86_64_sol2_vec.
2375         * configure: Regenerate.
2376
2377         * targets.c (bfd_elf32_i386_sol2_vec): Declare.
2378         (bfd_elf64_x86_64_sol2_vec): Declare.
2379         (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
2380         bfd_elf64_x86_64_sol2_vec.
2381
2382 2010-03-04  Daniel Jacobowitz  <[email protected]>
2383
2384         * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
2385         sections.
2386
2387 2010-03-04  Alan Modra  <[email protected]>
2388
2389         PR 11302
2390         * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
2391         (read_attribute_value, decode_line_info): Likewise.
2392         (add_line_info, read_rangelist): Return FALSE on alloc failures.
2393         (arange_add, sort_line_sequences): Likewise.
2394         (find_abstract_instance_name): Handle failures from called funcs.
2395         (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
2396         (find_line): Realloc to a temp, and handle alloc fail.
2397
2398 2010-03-03  Daniel Jacobowitz  <[email protected]>
2399
2400         * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
2401         a mapping symbol to an empty section.
2402
2403 2010-03-02  Matthew Gretton-Dann  <[email protected]>
2404
2405         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
2406         return value from the call to _bfd_elf_merge_object_attributes.
2407
2408 2010-03-02  Christophe Lyon  <[email protected]>
2409         Alan Modra  <[email protected]>
2410
2411         * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
2412         destination mode of the a8 stub.
2413         (elf32_arm_link_hash_table): Add top_id field.
2414         (elf32_arm_link_hash_table_create): Initialize top_id.
2415         (arm_type_of_stub): Update prototype, st_type can now be updated
2416         by this function. Actual destination address in case of PLT is
2417         computed here, to help factorizing code.
2418         (elf32_arm_stub_name): Update prototype, use stub_type additional
2419         parameter to build stub name.
2420         (elf32_arm_get_stub_entry): Update prototype, use stub_type
2421         additional parameter to build stub entry.
2422         (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
2423         put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
2424         Call elf32_arm_final_link_relocate to process all in-stub
2425         relocations.
2426         (elf32_arm_setup_section_lists): Update top_id.
2427         (cortex_a8_erratum_scan): Record stub destination mode.
2428         (elf32_arm_size_stubs): Update call to arm_type_of_stub according
2429         to new prototype.
2430         (elf32_arm_final_link_relocate): Enable processing of in-stub
2431         REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
2432         needed, enabling code factorization.
2433         (elf32_arm_final_link): Process stub sections.
2434         (elf32_arm_output_map_sym): Add entry to code/data map.
2435
2436 2010-03-01  David S. Miller  <[email protected]>
2437
2438         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
2439         h->def_regular, set h->ref_regular.
2440         (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
2441         and dynamic relocations if h->ref_regular.
2442
2443         * elfxx-sparc.c (struct elf_reloc_map): Delete.
2444         (sparc_reloc_map): Delete.
2445         (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
2446         relocation type in switch statements.
2447
2448 2010-02-25  Alan Modra  <[email protected]>
2449
2450         PR ld/11304
2451         * elf.c (_bfd_elf_init_private_section_data): Rename need_group
2452         to final_link and invert.  For final link allow some flags to
2453         differ.  Don't specially allow flags to be all zero.
2454
2455 2010-02-24  Alan Modra  <[email protected]>
2456
2457         PR binutils/10858
2458         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
2459         SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
2460         table.
2461
2462 2010-02-23  Andrew Zabolotny  <[email protected]>
2463
2464         PR binutils/11297
2465         * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
2466         (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
2467
2468 2010-02-22  Alan Modra  <[email protected]>
2469
2470         * reloc.c (bfd_check_overflow): When forming addrmask, shift
2471         fieldmask left by rightshift.
2472         (_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
2473         overflow checks.
2474
2475 2010-02-20  H.J. Lu  <[email protected]>
2476
2477         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
2478         STT_GNU_IFUNC on large common symbol.
2479
2480 2010-02-18  H.J. Lu  <[email protected]>
2481
2482         * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
2483         has_ifunc_symbols if the symbol comes from a shared library.
2484         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2485         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2486         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2487         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2488         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
2489
2490 2010-02-19  Alan Modra  <[email protected]>
2491
2492         * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
2493         (_bfd_elf_copy_private_header_data): ..here.
2494         * elflink.c (_bfd_elf_size_group_sections): New function.
2495         (bfd_elf_size_dynamic_sections): Call it.
2496         * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
2497         (_bfd_elf_fixup_group_sections): Declare.
2498
2499 2010-02-18  Matthew Gretton-Dann  <[email protected]>
2500
2501         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
2502         merging Tag_DIV_use, Tag_MPextension_use, and
2503         Tag_MPextension_use_legacy tags.
2504
2505 2010-02-18  Alan Modra  <[email protected]>
2506
2507         * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
2508         commit.  Don't write zeros for removed group members.
2509         (_bfd_elf_copy_private_header_data): Adjust size of group section
2510         when group members are removed by objcopy.
2511
2512 2010-02-15  Dave Korn  <[email protected]>
2513
2514         PR binutils/11280
2515         * configure.host (*-*-solaris2.11):  Add host define to select
2516         valid default code page for windres/windmc on solaris.
2517
2518 2010-02-15  Nick Clifton  <[email protected]>
2519
2520         * po/vi.po: Updated Vietnamese translation.
2521
2522 2010-02-12  Daniel Gutson  <[email protected]>
2523
2524         * elf32-arm.c (elf32_arm_output_arch_local_syms): add
2525         missing mapping symbol to data only sections.
2526
2527 2010-02-11  David S. Miller  <[email protected]>
2528
2529         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
2530         and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
2531         symbols.
2532         (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
2533         these relocs on global symbols.
2534         (gdopoff): New.
2535         (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
2536         local symbol references which are not STT_GNU_IFUNC.  Handle
2537         relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
2538         and deal with negative vs. non-negative values properly.
2539
2540 2010-02-09  Tristan Gingold  <[email protected]>
2541
2542         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
2543         non-external relocation.
2544
2545 2010-02-09  Alan Modra  <[email protected]>
2546
2547         * elf64-ppc.c (merge_got_entries): Move earlier in file.
2548         (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
2549         (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
2550         (ppc64_elf_layout_multitoc): Don't resize if we have already
2551         merged got entries.
2552
2553 2010-02-09  Michael Holzheu  <[email protected]>
2554
2555         * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
2556         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
2557         elfcore_write_s390_prefix): New.
2558         * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
2559         elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
2560         elfcore_write_s390_prefix): New.
2561         (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
2562         NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
2563         (elfcore_write_register_note): Handle .reg-s390-timer,
2564         .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
2565         .reg-s390-prefix section.
2566
2567 2010-02-09  Alan Modra  <[email protected]>
2568
2569         * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
2570         unsigned char.  Update variables and code using them throughout file.
2571         (struct ppc_link_hash_entry): Likewise for tls_mask.
2572
2573         * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
2574
2575         * elf64-ppc.c (has_small_toc_reloc): Don't define.
2576         (makes_toc_func_call, call_check_in_progress): Shuffle flags.
2577         (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
2578         code setting the flag.
2579         (ppc64_elf_next_toc_section): Group big-toc sections in
2580         0x80008000 chunks.
2581
2582 2010-02-08  David S. Miller  <[email protected]>
2583
2584         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
2585         srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
2586
2587         * elfxx-sparc.c (create_got_section): Delete.
2588         (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
2589         section creator does that work for us.  Use ->elf.foo instead of
2590         ->foo where applicable.
2591         (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
2592         where applicable.
2593         (allocate_dynrelocs): Likewise.
2594         (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2595         (_bfd_sparc_elf_relocate_section): Likewise.
2596         (sparc_vxworks_build_plt_entry): Likewise.
2597         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2598         (sparc_finish_dyn): Likewise.
2599         (sparc_vxworks_finish_exec_plt): Likewise.
2600         (sparc_vxworks_finish_shared_plt): Likewise.
2601         (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
2602
2603         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
2604         macros for visibilty and locality checks.
2605         (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
2606         (allocate_dynrelocs): Likewise.
2607         (_bfd_sparc_elf_relocate_section): Likewise.
2608         (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
2609
2610         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
2611         but never used local var 'dynobj'.
2612
2613         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
2614         nocopyreloc.
2615
2616         * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
2617         (BFD_RELOC_SPARC_IRELATIVE): Likewise.
2618         * bfd-in2.h: Regenerate.
2619         * libbfd.h: Regenerate.
2620
2621         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
2622         and loc_hash_memory.
2623         (_bfd_sparc_elf_link_hash_table_free): Declare.
2624         * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
2625         (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
2626         bfd_elf32_bfd_link_hash_table_free): Define.
2627         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
2628         has_ifunc_symbols if STT_GNU_IFUNC.
2629         (bfd_elf64_bfd_link_hash_table_free): Define.
2630         (elf_backend_post_process_headers): Define always.
2631         * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
2632         (sparc_reloc_map): Add entries for new IFUNC relocs.
2633         (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
2634         (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
2635         (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
2636         elf_sparc_get_local_sym_hash): New.
2637         (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
2638         from here...
2639         (_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
2640         local hash table.
2641         (_bfd_sparc_elf_link_hash_table_free): New.
2642         (create_ifunc_sections): New.
2643         (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
2644         and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
2645         cons up a fake local hash table entry for it.  Unconditionally add
2646         a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
2647         dyn relocs for ifunc.
2648         (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
2649         (allocate_dynrelocs):  Unconditionally emit a PLT entry when
2650         STT_GNU_IFUNC and h->def_regular.  Count GOT dyn relocs for ifunc.
2651         (allocate_local_dynrelocs): New function.
2652         (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
2653         table.  Emit dynamic relocs to irelplt when not shared.  Treat iplt
2654         like splt.
2655         (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
2656         (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
2657         plt in iplt/irelplt.
2658
2659 2010-02-08  Richard Sandiford  <[email protected]>
2660
2661         * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
2662         max_contents_size, only consider sections whose contents must
2663         be swapped in.
2664
2665 2010-02-09  Alan Modra  <[email protected]>
2666
2667         * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
2668         (ppc64_elf_size_dynamic_sections): ..and here..
2669         (merge_got_entries): ..rather than here.
2670
2671 2010-02-09  Alan Modra  <[email protected]>
2672
2673         * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
2674         (has_small_toc_reloc): Define.
2675         (ppc64_elf_check_relocs): Set the above flags.
2676         (ppc64_elf_edit_opd): Delete obfd param.
2677         (ppc64_elf_tls_optimize): Likewise.
2678         (ppc64_elf_edit_toc): Likewise.
2679         (ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
2680         * elf64-ppc.h: Update prototypes.
2681
2682 2010-02-08  Alan Modra  <[email protected]>
2683
2684         * section.c (struct bfd_section): Delete has_tls_reloc,
2685         has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
2686         Add sec_flg0 thru sec_flg5.
2687         (BFD_FAKE_SECTION): Update for changed flags.
2688         * ecoff.c (bfd_debug_section): Likewise.
2689         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
2690         * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
2691         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
2692         * elf32-xtensa.c (reloc_done): Define.
2693         * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
2694         * bfd-in2.h: Regenerate.
2695
2696 2010-02-08  Tristan Gingold  <[email protected]>
2697
2698         * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
2699         for non-scattered relocations.
2700
2701 2010-02-08  Nathan Sidwell  <[email protected]>
2702
2703         * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
2704         apuinfo sections, only scan input sections once and reuse the
2705         buffer.
2706
2707 2010-02-08  Philipp Tomsich  <[email protected]>
2708
2709         * archures.c (bfd_mach_ppc_titan): Define.
2710         * bfd-in2.h: Regenerate.
2711         * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
2712
2713 2010-02-08  Alan Modra  <[email protected]>
2714
2715         * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
2716
2717 2010-02-05  Sterling Augustine  <[email protected]>
2718
2719         * elf.c (assign_file_positions_for_load_sections) Update lma of
2720         section if necessary.  Fixes Bugzilla 11219.
2721
2722 2010-02-05  H.J. Lu  <[email protected]>
2723
2724         * elf32-i386.c: Remove trailing white spaces.
2725         * elf64-x86-64.c: Likewise.
2726
2727 2010-02-03  Nick Clifton  <[email protected]>
2728
2729         * elf-bfd.h (emum elf_object_id): Rename to elf_target_id.  Add
2730         entries for other architectures.
2731         (struct elf_link_hash_table): Add hash_table_id field.
2732         (elf_hash_table_id): New accessor macro.
2733         * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
2734         parameter.
2735         * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
2736         returning cast pointer.
2737         (elf32_mn10300_link_hash_table_create): Identify new table as
2738         containing MN10300 extensions.
2739         (mn10300_elf_relax_section): Check pointer returned by
2740         elf32_mn10300_hash_table.
2741         * elf32-arm.c: Likewise, except using ARM extensions.
2742         * elf32-avr.c: Likewise, except using AVR extensions.
2743         * elf32-bfin.c: Likewise, except using BFIN extensions.
2744         * elf32-cris.c: Likewise, except using CRIS extensions.
2745         * elf32-frv.c: Likewise, except using FRV extensions.
2746         * elf32-hppa.c: Likewise, except using HPPA32 extensions.
2747         * elf32-i386.c: Likewise, except using I386 extensions.
2748         * elf32-lm32.c: Likewise, except using LM32 extensions.
2749         * elf32-m32r.c: Likewise, except using M32RM extensions.
2750         * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
2751         * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
2752         * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
2753         * elf32-m68k.c: Likewise, except using M68K extensions.
2754         * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
2755         * elf32-ppc.c: Likewise, except using PPC32 extensions.
2756         * elf32-s390.c: Likewise, except using S390 extensions.
2757         * elf32-sh.c: Likewise, except using SH extensions.
2758         * elf32-spu.c: Likewise, except using SPU extensions.
2759         * elf32-xtensa.c: Likewise, except using XTENSA extensions.
2760         * elf64-alpha.c: Likewise, except using ALPHA extensions.
2761         * elf64-hppa.c: Likewise, except using HPPA64 extensions.
2762         * elf64-ppc.c: Likewise, except using PPC64 extensions.
2763         * elf64-s390.c: Likewise, except using S390 extensions.
2764         * elf64-x86-64.c: Likewise, except using X86_64 extensions.
2765         * elfxx-ia64.c: Likewise, except using IA64 extensions.
2766         * elfxx-mips.c: Likewise, except using MIPS extensions.
2767         * elfxx-sparc.c: Likewise, except using SPARC extensions.
2768         * elfxx-sparc.h: Likewise, except using SPARC extensions.
2769         * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
2770         redundant structure.
2771         (elf32_cr16_hash_table): Delete unused macro.
2772         (elf32_cr16_link_hash_traverse): Delete unused macro.
2773         * elf32-score.c: Likewise.
2774         * elf32-score7.c: Likewise.
2775         * elf32-vax.c: Likewise.
2776         * elf64-sh64.c: Likewise.
2777
2778 2010-02-03  Alan Modra  <[email protected]>
2779
2780         * elf64-ppc.c (struct plt_entry): Move earlier in file.
2781         (struct got_entry): Likewise.  Add is_indirect and got.ent fields.
2782         (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
2783         Update all uses.
2784         (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
2785         Remove no_multi_toc.
2786         (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
2787         when allocating a new struct got_entry.
2788         (allocate_got): New function, extracted from..
2789         (allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
2790         (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
2791         .reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
2792         (ppc64_elf_setup_section_lists): Remove output_bfd param and
2793         no_multi_toc, add add_stub_section and layout_sections_again.  Stash
2794         new params in htab.  Extract some code to..
2795         (ppc64_elf_start_multitoc_partition): ..here.  New function.
2796         (ppc64_elf_next_toc_section): Check for linker script errors.  Handle
2797         second pass toc scan.
2798         (merge_got_entries, merge_global_got, reallocate_got): New functions.
2799         (ppc64_elf_reinit_toc): Rename to..
2800         (ppc64_elf_finish_multitoc_partition): ..this.
2801         (ppc64_elf_layout_multitoc): New function.
2802         (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
2803         layout_sections_again params.
2804         (ppc64_elf_relocate_section): Handle indirect got entries.
2805         * elf64-ppc.h: Update prototypes.  Declare new functions.
2806
2807 2010-02-02  H.J. Lu  <[email protected]>
2808
2809         * elf-bfd.h (elfcore_write_xstatereg): New.
2810
2811         * elf.c (elfcore_grok_xstatereg): New.
2812         (elfcore_write_xstatereg): Likewise.
2813         (elfcore_grok_note): Handle NT_X86_XSTATE.
2814         (elfcore_write_register_note): Handle .reg-xstate section.
2815
2816 2010-02-01  Tristan Gingold  <[email protected]>
2817
2818         * som.c (som_write_ar_hdr): Define this macro.
2819
2820 2010-01-30  John David Anglin  <[email protected]>
2821
2822         * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
2823         R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
2824         linkage table pointer to use the global table pointer if not doing
2825         a shared link.
2826
2827 2010-01-29  Joel Brobecker  <[email protected]>
2828
2829         * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
2830         if it has already been set.
2831
2832 2010-01-27  Tristan Gingold  <[email protected]>
2833
2834         * vms.h: Remove trailing spaces.
2835         (struct hdr_struct): Remove unused hdr_c_cpr field.
2836         (enum file_format_enum): Add comments.
2837         * vms.c (vms_bfd_print_private_bfd_data): New function that
2838         replaces the macro.
2839         Remove trailing spaces.
2840         * vms-misc.c: Improve comments.
2841         (_bfd_vms_get_object_record): Also handle files without pads.
2842         * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
2843         * vms-gsd.c (struct flagdescstruct): Make name field const.
2844         (gsyflagdesc): Fix typo.
2845
2846 2010-01-27  Alan Modra  <[email protected]>
2847
2848         PR ld/11217
2849         * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
2850         (ppc64_elf_setup_section_lists): Init them.
2851         (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
2852         and .toc on the same input file.
2853         (ppc64_elf_relocate_section): Correct GOT entry offset.
2854
2855 2010-01-26  Tristan Gingold  <[email protected]>
2856
2857         * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
2858         (bfd_target): Add _bfd_write_ar_hdr_fn field.
2859         * archive.c (is_bsd44_extended_name): New macro.
2860         (_bfd_generic_read_ar_hdr_mag): Use it.  Add extra_size.
2861         (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
2862         name.
2863         (_bfd_archive_bsd44_construct_extended_name_table): New function.
2864         (_bfd_generic_write_ar_hdr): Ditto.
2865         (_bfd_bsd44_write_ar_hdr): Ditto.
2866         (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
2867         (bsd_write_armap): Adjust firstreal computation.
2868         * libbfd-in.h (struct areltdata): Add extra_size field.
2869         (_bfd_generic_write_ar_hdr): Add prototype.
2870         (_bfd_bsd44_write_ar_hdr): Ditto.
2871         (_bfd_write_ar_hdr): Define.
2872         (_bfd_noarchive_write_ar_hdr): Ditto.
2873         (_bfd_archive_bsd_write_ar_hdr): Ditto.
2874         (_bfd_archive_coff_write_ar_hdr): Ditto.
2875         (_bfd_archive_bsd44_slurp_armap): Ditto.
2876         (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
2877         (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
2878         (_bfd_archive_bsd44_truncate_arname): Ditto.
2879         (_bfd_archive_bsd44_write_armap): Ditto.
2880         (_bfd_archive_bsd44_read_ar_hdr): Ditto.
2881         (_bfd_archive_bsd44_write_ar_hdr): Ditto.
2882         (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
2883         (_bfd_archive_bsd44_get_elt_at_index): Ditto.
2884         (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
2885         (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
2886         * libbfd.h: Regenerate.
2887         * oasys.c (oasys_write_ar_hdr): Define.
2888         * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
2889         * ieee.c (ieee_write_ar_hdr): Define.
2890         * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
2891         * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
2892         (bfd_pmac_xcoff_backend_data): Ditto.
2893         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
2894         (bfd_xcoff_aix5_backend_data): Ditto.
2895         * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
2896         * aout-target.h (MY_write_ar_hdr): Define it if not defined.
2897         * aout-tic30.c (MY_write_ar_hdr): Ditto.
2898         * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
2899         (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
2900         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
2901         (bfd_mach_o_construct_extended_name_table)
2902         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
2903         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
2904         (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
2905         * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
2906         (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
2907         (bfd_mach_o_construct_extended_name_table)
2908         (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
2909         (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
2910         (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
2911         * bfd-in2.h: Regenerate.
2912
2913 2010-01-26  Alan Modra  <[email protected]>
2914             H.J. Lu  <[email protected]>
2915
2916         PR ld/11218
2917         * elflink.c (elf_link_output_extsym): Do not ignore undefined
2918         symbols with ref_regular set when gc_sections is active.
2919
2920 2010-01-25  Alan Modra  <[email protected]>
2921
2922         PR ld/11217
2923         * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
2924         with relocations against undefined weak symbols.
2925         (ppc64_elf_relocate_section): Don't optimize calls to undefined
2926         weak functions if the symbol is dynamic.
2927         (ppc64_elf_relocate_section): Edit tprel tls sequences.
2928         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2929         (_bfd_elf_ppc_at_tprel_transform): New function.
2930         * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
2931         * bfd-in2.h: Regenerate.
2932
2933 2010-01-23  Richard Sandiford  <[email protected]>
2934
2935         * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
2936         (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
2937         * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
2938         bitsize to 1.
2939         (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
2940
2941 2010-01-21  Nick Clifton  <[email protected]>
2942
2943         * elflink.c (elf_link_add_object_symbols): Look up name of
2944         undefined symbol both before and after versioning has been
2945         applied.  Do not bother with symbols that are weakly undefined.
2946
2947 2010-01-21  Andreas Krebbel  <[email protected]>
2948
2949         * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
2950         (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
2951
2952 2010-01-19  Cary Coutant  <[email protected]>
2953
2954         * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
2955
2956 2010-01-19  Daisuke Hatayama  <[email protected]>
2957             Alan Modra <[email protected]>
2958
2959         * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
2960         (elf_object_p): Read e_phnum extension.
2961         (elf_write_shdrs_and_ehdr): Write e_phnum extension.
2962         * elfcore.h (elf_core_file_p): Read e_phnum extension.  Sanity check
2963         that we can read last program header.
2964
2965 2010-01-19  Matthew Gretton-Dann  <[email protected]>
2966
2967         * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
2968         R_ARM_THM_CALL entry.
2969         (elf32_arm_final_link_relocate): Correct calculation of
2970         reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
2971         or R_ARM_THM_JUMP24 relocation.
2972
2973 2010-01-18  Alan Modra  <[email protected]>
2974
2975         PR 11168
2976         * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
2977         block past vars in COFF_IMAGE_WITH_PE block.  Report error on more
2978         than 32k sections.
2979
2980 2010-01-15  Jan Kratochvil  <[email protected]>
2981
2982         Fix compilation warning on gcc-3.4.
2983         * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
2984         parameter index to sec_index according to the function definition.
2985
2986 2010-01-13  Chao-ying Fu  <[email protected]>
2987
2988         * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
2989         It is true for all CPUs.
2990         (jal_reloc_p): New function.
2991         (mips_elf_calculate_relocation): Rename require_jalxp to
2992         cross_mode_jump_p.
2993         Update comment for CROSS_MODE_JUMP_P.
2994         Set up cross_mode_jump_p based on the mode change.
2995         (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
2996         Update comment for CROSS_MODE_JUMP_P.
2997         Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
2998         Use !cross_mode_jump_p to guard conversion.
2999         Convert "jr t9" to "b", if possible.
3000         (_bfd_mips_elf_relocate_section): Rename require_jalx to
3001         cross_mode_jump_p.
3002         Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
3003         Pass cross_mode_jump_p to call mips_elf_perform_relocation.
3004
3005 2010-01-13  Nick Clifton  <[email protected]>
3006
3007         * cpu-m32c.c (m32c_scan): New function.  Ensures that a scan for
3008         "m32c" returns the m32c arch_info_struct and not the m16c
3009         arch_info_struct.
3010         (arch_info_struct): Use the new scan function.
3011         (bfd_m32c_arch): Likewise.
3012
3013 2010-01-13  Tristan Gingold  <[email protected]>
3014
3015         * config.bfd: Remove duplicated target vector for i386-*-darwin.
3016         Appends new arch instead of overriding.
3017         Use mach_o_x86_64_vec for x86_64-*-darwin.
3018         * configure.in: Add mach_o_x86_64_vec.
3019         * configure: Regenerate.
3020         * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
3021         * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
3022         (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
3023         * Makefile.in: Regenerate.
3024         * mach-o-x86-64.c: New file.
3025
3026 2010-01-13  Tristan Gingold  <[email protected]>
3027
3028         * reloc.c: Add MACH_O_X86_64 relocations.
3029         * bfd-in2.h: Regenerate.
3030         * libbfd.h: Regenerate.
3031
3032 2010-01-13  Tristan Gingold  <[email protected]>
3033
3034         * archive.c (normalize): Use lbasename.
3035         (bfd_bsd_truncate_arname): Ditto.
3036         (bfd_gnu_truncate_arname): Ditto.
3037
3038 2010-01-12  Tristan Gingold  <[email protected]>
3039
3040         * makefile.vms (CFLAGS): Turns warnings into informational messages.
3041
3042 2010-01-11  Tristan Gingold  <[email protected]>
3043
3044         * mach-o.h: Add x86-64 relocation types.
3045
3046 2010-01-11  Tristan Gingold  <[email protected]>
3047
3048         * mach-o.h (bfd_mach_o_backend_data): Add arch field.
3049         (bfd_mach_o_set_arch_mach): New prototype.
3050         * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
3051         (bfd_mach_o_set_arch_mach): New function.
3052         (bfd_mach_o_gen_mkobject): New function.
3053         Set TARGET_ARCHITECTURE for the generic back-ends.
3054         * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
3055         Check that TARGET_ARCHITECTURE is defined.
3056         Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
3057         * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
3058
3059 2010-01-11  Tristan Gingold  <[email protected]>
3060
3061         * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
3062
3063 2010-01-11  Nick Clifton  <[email protected]>
3064
3065         * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
3066         handling of R_V850_HI16_S relocation.
3067
3068 2010-01-11  Alan Modra  <[email protected]>
3069
3070         PR 11103
3071         * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
3072
3073 2010-01-11  Alan Modra  <[email protected]>
3074
3075         PR 6832
3076         * dwarf2.c (struct comp_unit): Add sec_info_ptr.
3077         (find_abstract_instance_name): Use it.
3078         (parse_comp_unit): Set it.
3079
3080 2010-01-09  Ralf Wildenhues  <[email protected]>
3081
3082         * Makefile.in: Regenerate.
3083         * configure: Regenerate.
3084
3085 2010-01-08  Tristan Gingold  <[email protected]>
3086
3087         * archive.c: Remove bfd_special_undocumented_glue.
3088
3089 2010-01-08  Alan Modra  <[email protected]>
3090
3091         PR ld/11133
3092         * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
3093         * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
3094         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
3095
3096 2010-01-07  H.J. Lu  <[email protected]>
3097
3098         PR ld/11138
3099         * elflink.c (elf_link_check_versioned_symbol): Don't abort if
3100         a symbol referenced by DSO is is defined in a non-shared object
3101         and forced local.
3102
3103 2010-01-07  H.J. Lu  <[email protected]>
3104
3105         PR ld/11133
3106         * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
3107         undefined __start_XXX/__stop_XXX in all input files and set
3108         SEC_KEEP.
3109
3110 2010-01-07  H.J. Lu  <[email protected]>
3111
3112         PR ld/11143
3113         * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
3114
3115 2010-01-04  Daniel Gutson  <[email protected]>
3116
3117         * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
3118         before including procfs.h.
3119         (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
3120         * configure.in: Added autoconf probe for the pr_fpreg member.
3121         * configure: Regenerated.
3122         * config.in: Regenerated.
3123         * elf.c: Define _STRUCTURE_PROC before including procfs.h.
3124
3125 2010-01-04  Joel Brobecker  <[email protected]>
3126
3127         Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
3128         * dwarf2.c (concat_filename): Rename dirname with dir_name
3129         to void shadowing the dirname function.
3130         Rename subdirname with subdir_name to stay consistent with
3131         the new dir_name variable name.
3132
3133 2010-01-04  Edmar Wienskoski  <[email protected]>
3134
3135         * archures.c: Add bfd_mach_ppc_e500mc64.
3136         * bfd-in2.h: Regenerate.
3137         * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
3138         bfd_mach_ppc_e500mc64.
3139
3140 2010-01-01  Joel Brobecker  <[email protected]>
3141
3142         Fix -Wshadow warnings (seen on ppc-aix)
3143         * xcofflink.c: Replace finfo by flinfo throughout.
3144
3145 For older changes see ChangeLog-2009
3146 \f
3147 Local Variables:
3148 mode: change-log
3149 left-margin: 8
3150 fill-column: 74
3151 version-control: never
3152 End:
This page took 0.213924 seconds and 4 git commands to generate.