OSDN Git Service

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