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