* bfd/cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2006-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
2
3         * bfd/cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
4         mapping symbols.
5
6 2006-05-04  Ben Elliston  <bje@au.ibm.com>
7
8         * coff-or32.c (bfd_section_from_shdr): Remove unused local
9         variable `ptr'.
10         * cofflink.c (process_embedded_commands): Remove unused local
11         variables `had_read' and `had_shared'.
12         * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
13         variable `fdr_adr'.
14         * ihex.c (ihex_read_section): Remove unused local variable `addr'.
15
16 2006-05-03  Alan Modra  <amodra@bigpond.net.au>
17
18         * libbfd-in.h (_bfd_generic_new_section_hook): Declare.
19         * section.c (bfd_abs_symbol, bfd_com_symbol): Delete.
20         (bfd_und_symbol, bfd_ind_symbol): Delete.
21         (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to
22         &SEC.symbol.
23         (STD_SECTION): Adjust.
24         (_bfd_generic_new_section_hook): New function, extracted from..
25         (bfd_section_init): ..here.
26         (bfd_make_section_old_way): Call new_section_hook for abs, com,
27         und and ind sections.
28         * elf.c (_bfd_elf_large_com_section): Adjust.
29         * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook.
30         * pdp11.c (new_section_hook): Likewise.
31         * coffcode.h (coff_new_section_hook): Likewise.
32         * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
33         * elf.c (_bfd_elf_new_section_hook): Likewise.
34         * vms.c (vms_new_section_hook): Likwise.
35         * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't
36         already set.
37         * elf32-sh64.c (sh64_elf_new_section_hook): Likewise.
38         * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise.
39         * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
40         * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise.
41         * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise.
42         * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise.
43         * ieee.c (ieee_new_section_hook): Likewise.  Call
44         _bfd_generic_new_section_hook too.
45         * mmo.c (mmo_new_section_hook): Likewise.
46         * oasys.c (oasys_new_section_hook): Likewise.
47         * som.c (som_new_section_hook): Likewise.
48         * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol.
49         * bfd-in2.h: Regenerate.
50         * libbfd.h: Regenerate.
51
52 2006-05-03  Alan Modra  <amodra@bigpond.net.au>
53
54         * hash.c (DEFAULT_SIZE): Revert last change.
55         (higher_prime_number): Correct test for no larger prime.  Don't
56         abort on error, instead return 0.  Depopulate primes[].
57         (bfd_hash_lookup): If we overflow size, refuse to grow table.
58
59 2006-05-02  Paul Brook  <paul@codesourcery.com>
60
61         * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
62         for R_ARM_REL32.
63
64 2006-05-02  Ben Elliston  <bje@au.ibm.com>
65
66         * archive.c (bfd_generic_archive_p): Remove unused local variable
67         `fail'.
68         * dwarf2.c (decode_line_info): Remove unused local variable
69         `basic_block'.
70         * elfcode.h (elf_slurp_reloc_table_from_section): Remove unsed
71         local varibale `s'.
72         * tekhex.c (tekhex_write_object_contents): Remove unused local
73         variable `bytes_written'.
74         * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
75         variable `r_addend'.
76         * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
77         * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
78         (_bfd_ns32k_relocate_contents): Remove break after return.
79         * elf.c (bfd_section_from_shdr): Remove breaks after returns.
80
81 2006-05-02  Nick Clifton  <nickc@redhat.com>
82
83         * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
84         in order to avoid conflicts with the global DEBUG define.
85
86 2006-05-02  Alan Modra  <amodra@bigpond.net.au>
87
88         * dwarf2.c: Formatting.
89         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Simplify
90         output section check.
91         * elf32-i370.c: Warning fixes inside #ifdef DEBUG.
92         * elf32-m32c.c: Similarly.
93         * elf32-ppc.c: Similarly.
94         * elf32-v850.c: Similarly.
95         * nlm32-sparc.c: Similarly.
96         * elfcode.h: Similarly.
97         (elf_symbol_flags): Delete.
98         * elflink.c (elf_link_input_bfd): Comment typo.
99
100 2006-05-01  DJ Delorie  <dj@redhat.com>
101
102         * bfd-in.h (bfd_hash_table): Add count field.
103         * bfd-in2.h: Regenerate.
104         * hash.c (higher_prime_number): New.
105         (bfd_hash_table_inint_n): Init count field.
106         (bfd_hash_lookup): Grow table as needed.
107
108 2006-04-27  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
109
110         PR binutils/2584
111         * tekhex.c (getvalue): Change return type to bfd_boolean and
112         add the new parameter.  Return false if the unexpected character
113         is found.
114         (getsym): Likewise.
115         (first_phase): Change return type to bfd_boolean and return
116         false if the unexpected character is found.  Replace abort
117         with returning false.
118         (pass_over): Change return type to bfd_boolean and the type of
119         the second argument to bfd_boolean (*) (bfd *, int, char *).
120         Return false if FUNC returns false.
121         (tekhex_object_p): Return NULL if pass_over fails.
122
123 2006-04-27  Alan Modra  <amodra@bigpond.net.au>
124
125         * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
126
127 2006-04-26  H.J. Lu  <hongjiu.lu@intel.com>
128
129         PR binutils/2593
130         * elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
131         and flags if its BFD flags have been set.
132         (_bfd_elf_init_private_section_data): Don't copy the output ELF
133         section type from input if it has been set to something
134         different.
135
136 2006-04-25  H.J. Lu  <hongjiu.lu@intel.com>
137
138         PR binutils/2467
139         * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd)
140         is NULL first.
141
142         * elf32-arm.c (elf32_arm_close_and_cleanup): Check if
143         abfd->sections is NULL.
144         (elf32_arm_bfd_free_cached_info): New.
145         (bfd_elf32_bfd_free_cached_info): Defined.
146
147         * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it
148         to _bfd_free_cached_info.
149
150         * libbfd-in.h (_bfd_free_cached_info): New.
151         * libbfd: Regenerated.
152
153         * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL.
154         (_bfd_free_cached_info): New.
155
156 2006-04-21  Alan Modra  <amodra@bigpond.net.au>
157
158         * elf.c (assign_file_positions_except_relocs): Move code setting
159         file position of non-loaded sections..
160         (assign_file_positions_for_segments): ..to here.
161
162 2006-04-20  H.J. Lu  <hongjiu.lu@intel.com>
163
164         PR ld/2537
165         * elf.c (bfd_section_from_shdr): Allow sections reserved for
166         applications. Issue an error on sections we don't know how
167         to handle.
168
169 2006-04-19  Alan Modra  <amodra@bigpond.net.au>
170
171         * Makefile.am: Run "make dep-am".
172         * Makefile.in: Regenerate.
173
174 2006-04-19  Alan Modra  <amodra@bigpond.net.au>
175
176         * warning.m4 (--enable-werror): Format help message.
177         (--enable-build-warnings): Likewise.
178         * configure: Regenerate.
179
180 2006-04-18  Nick Clifton  <nickc@redhat.com>
181
182         PR 2257
183         * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
184         fields to still be handled as ELF files.
185
186 2006-04-16  Daniel Jacobowitz  <dan@codesourcery.com>
187
188         * po/SRC-POTFILES.in: Regenerated.
189
190 2006-04-16  Daniel Jacobowitz  <dan@codesourcery.com>
191
192         * configure.in: Update version to 2.17.50.
193         * configure: Regenerated.
194
195 2006-04-14  David Heine  <dlheine@tensilica.com>
196
197         * elf32-xtensa.c (build_reloc_opcodes): New.
198         (compute_text_actions): Use it to decode opcodes outside inner loop.
199         (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
200         it is set, use it to get the opcodes for relocations.
201         (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
202
203 2006-04-08  H.J. Lu  <hongjiu.lu@intel.com>
204
205         PR ld/2513
206         * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
207         (GOT_TLS_IE_IE): Likewise.
208         (GOT_TLS_IE_GD): Likewise.
209         (GOT_TLS_IE_MASK): Likewise.
210         (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
211         and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
212         respectively.
213         (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
214         are set, treat tls_type as GOT_TLS_IE_BOTH.
215         (elf_i386_relocate_section): Likewise.
216
217 2006-04-07  Randolph Chung  <tausq@debian.org>
218
219         * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
220         (elf64_hppa_grok_psinfo): Likewise.
221         (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
222
223 2006-04-06  DJ Delorie  <dj@redhat.com>
224
225         * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
226         each plt entry we create.
227
228 2006-04-06  Carlos O'Donell  <carlos@codesourcery.com>
229
230         * po/Make-in: Add install-html target.
231         * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
232         htmldir. Add install-html and install-html-recursive targets.
233         * Makefile.in: Regenerate.
234         * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
235         * configure: Regenerate.
236
237 2006-04-06  H.J. Lu  <hongjiu.lu@intel.com>
238
239         * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
240         with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
241         section structure.
242
243 2006-04-05  Bernd Schmidt  <bernd.schmidt@analog.com>
244
245         * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
246         eliminate warnings.
247
248 2006-04-05  H.J. Lu  <hongjiu.lu@intel.com>
249             James E Wilson  <wilson@specifixinc.com>
250
251         PR ld/2442
252         * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
253         (elfNN_ia64_local_hash_entry): Add count, sorted_count and
254         size.
255         (elfNN_ia64_link_hash_entry): Likewise.
256         (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
257         and size.
258         (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
259         processing.
260         (elfNN_ia64_hash_hide_symbol): Likewise.
261         (elfNN_ia64_global_dyn_sym_thunk): Likewise.
262         (elfNN_ia64_local_dyn_sym_thunk): Likewise.
263         (elfNN_ia64_global_dyn_info_free): New function.
264         (elfNN_ia64_local_dyn_info_free): Likewise.
265         (elfNN_ia64_hash_table_free): Free local and global
266         elfNN_ia64_dyn_sym_info.
267         (addend_compare): New function.
268         (sort_dyn_sym_info): Likewise.
269         (get_dyn_sym_info): Updated to use binary search for addend.
270         (elfNN_ia64_check_relocs): Scan relocations to create dynamic
271         relocation arrays first.
272
273 2006-04-05  Bernd Schmidt  <bernd.schmidt@analog.com>
274
275         * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
276         symbol.
277
278 2006-04-05  H.J. Lu  <hongjiu.lu@intel.com>
279
280         PR ld/2411
281         * elflink.c (check_dynsym): New.
282         (elf_link_output_extsym): Use it.
283         (bfd_elf_final_link): Likewise.
284
285 2006-04-05  H.J. Lu  <hongjiu.lu@intel.com>
286
287         PR ld/2404
288         * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
289         symbol from the dynamic definition with the default version if
290         its type and the type of existing regular definition mismatch.
291
292 2006-04-05  Richard Sandiford  <richard@codesourcery.com>
293             Daniel Jacobowitz  <dan@codesourcery.com>
294
295         * config.bfd (sparc-*-vxworks*): New stanza.
296         * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
297         (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
298         * configure: Regenerate.
299         * elf32-sparc.c: Include elf-vxworks.h.
300         (elf32_sparc_vxworks_link_hash_table_create: New.
301         (elf32_sparc_vxworks_final_write_processing): New.
302         (TARGET_BIG_SYM): Override for VxWorks.
303         (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
304         (bfd_elf32_bfd_link_hash_table_create): Likewise.
305         (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
306         (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
307         (elf_backend_link_output_symbol_hook): Likewise.
308         (elf_backend_emit_relocs): Likewise.
309         (elf_backend_final_write_processing, elf32_bed): Likewise.
310         * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
311         (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
312         (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
313         (_bfd_sparc_elf_link_hash_table_create): Don't initialize
314         build_plt_entry here.
315         (create_got_section): Initialize sgotplt for VxWorks.
316         (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
317         plt_header_size and plt_entry_size, with new VxWorks-specific settings.
318         Call elf_vxworks_create_dynamic_sections for VxWorks.
319         (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
320         Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
321         (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
322         for VxWorks.  Check for the .got.plt section.
323         (sparc_vxworks_build_plt_entry): New function.
324         (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
325         Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
326         absolute on VxWorks.
327         (sparc32_finish_dyn): Add special handling for DT_RELASZ
328         and DT_PLTGOT on VxWorks.
329         (sparc_vxworks_finish_exec_plt): New.
330         (sparc_vxworks_finish_shared_plt): New.
331         (_bfd_sparc_elf_finish_dynamic_sections): Call them.
332         Use plt_header_size and plt_entry_size.
333         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
334         srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
335         * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
336         (elf32-sparc.lo): Likewise.
337         * Makefile.in: Regenerate.
338         * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
339         (_bfd_target_vector): Add a pointer to it.
340
341 2006-03-30  Ben Elliston  <bje@au.ibm.com>
342
343         PR ld/2267
344         * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
345         special section number that exceeds the number of ELF sections
346         (eg. SHN_MIPS_SCOMMON).
347
348 2006-03-27  Richard Sandiford  <richard@codesourcery.com>
349
350         * elfxx-mips.c (mips_got_entry): Add more commentary.
351         (mips_elf_local_got_index): Use the hash table entry to record
352         the GOT index of forced-local symbols.
353         (mips_elf_initialize_tls_index): Rearrange code.  Store the index
354         in either the hash table entry or the mips_got_entry, not both.
355         Add more commentary.
356         (mips_elf_multi_got): Make sure the g->next is nonnull when calling
357         mips_elf_initialize_tls_index.
358
359 2006-03-25  Bernd Schmidt  <bernd.schmidt@analog.com>
360
361         * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
362         RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
363         reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
364         bfin_areloc_howto_table): Delete.  All
365         uses deleted as well.
366         (bfin_reloc_map): Delete all stack relocs.
367         (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
368         bfin_reloc_type_lookup): Don't support them.
369         (bfin_relocate_section): Don't try to handle them.
370
371         * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
372         * configure.in: Likewise.
373         * configure: Regenerate.
374         * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
375         (BFIN_RELOC_MAX): Now 0x21.
376         (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
377         (bfd_elf32_bfinfdpic_vec): Declare.
378         (IS_FDPIC): New macro.
379         (struct bfinfdpic_elf_link_hash_table): New struct.
380         (bfinfdpic_hash_table, bfinfdpic_got_section,
381         bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
382         bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
383         bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
384         bfinfdpic_plt_initial_offset): Accessor macros for it.
385         (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
386         (struct bfinfdpic_relocs_info): New struct.
387         (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
388         BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
389         DEFAULT_STACK_SIZE): New macros.
390         (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
391         bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
392         bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
393         bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
394         _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
395         _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
396         bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
397         _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
398         elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
399         _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
400         _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
401         _bfinfdpic_resolve_final_relocs_info,
402         elf32_bfinfdpic_size_dynamic_sections,
403         elf32_bfinfdpic_always_size_sections,
404         elf32_bfinfdpic_modify_segment_map,
405         _bfinfdpic_count_got_plt_entries,
406         elf32_bfinfdpic_finish_dynamic_sections,
407         elf32_bfinfdpic_adjust_dynamic_symbol,
408         elf32_bfinfdpic_finish_dynamic_symbol,
409         elf32_bfinfdpic_elf_use_relative_eh_frame,
410         elf32_bfinfdpic_elf_encode_eh_address,
411         elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
412         elf32_bfinfdpic_copy_private_bfd_data,
413         (struct _bfinfdpic_dynamic_got_info,
414         struct _bfinfdpic_dynamic_got_plt_info): New structs.
415         (elf32_bfin_print_private_bfd_data): Print PIC flags.
416         (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
417         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
418         elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
419         elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
420         bfd_elf32_bfd_copy_private_bfd_data,
421         elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
422         elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
423         elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
424         elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
425         elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
426         elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
427         elf_backend_omit_section_dynsym): Redefine these macros and include
428         "elf32-target.h" again to create the elf32-bfinfdpic target.
429         * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
430         BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
431         BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
432         BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
433         BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
434         BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
435         BFD_RELOC_BFIN_GOTOFFLO): New.
436         * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
437         (_bfd_target_vector): Add it.
438         * bfd-in2.h: Regenerate.
439         * libbfd.h: Regenerate.
440
441 2006-03-25  Richard Sandiford  <richard@codesourcery.com>
442
443         * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
444         incompatible.  Likewise MAC and EMAC code.
445         * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
446         bfd_get_compatible to set the new bfd architecture.  Rely on it
447         to detect incompatibilities.
448
449 2006-03-23  Michael Matz  <matz@suse.de>
450
451         * reloc.c: Add BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64,
452         BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64,
453         BFD_RELOC_X86_64_PLTOFF64.
454         * bfd-in2.h: Regenerated.
455         * libbfd.h: Regenerated.
456         * elf64-x86-64.c (x86_64_elf_howto_table): Correct comment.
457         Add howtos for above relocs.
458         (x86_64_reloc_map): Add mappings for new relocs.
459         (elf64_x86_64_check_relocs): R_X86_64_GOT64, R_X86_64_GOTPCREL64,
460         R_X86_64_GOTPLT64 need a got entry.  R_X86_64_GOTPLT64 also a PLT
461         entry.  R_X86_64_GOTPC64 needs a .got section.  R_X86_64_PLTOFF64
462         needs a PLT entry.
463         (elf64_x86_64_gc_sweep_hook): Reflect changes from
464         elf64_x86_64_check_relocs for the new relocs.
465         (elf64_x86_64_relocate_section): Handle new relocs.
466
467 2006-03-22  Bob Wilson  <bob.wilson@acm.org>
468
469         * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
470         rel->r_addend is zero.
471
472 2006-03-22  Richard Sandiford  <richard@codesourcery.com>
473
474         * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
475         of "loc".
476
477 2006-03-22  Richard Sandiford  <richard@codesourcery.com>
478             Daniel Jacobowitz  <dan@codesourcery.com>
479             Phil Edwards  <phil@codesourcery.com>
480             Zack Weinberg  <zack@codesourcery.com>
481             Mark Mitchell  <mark@codesourcery.com>
482             Nathan Sidwell  <nathan@codesourcery.com>
483
484         * bfd-in2.h: Regenerate.
485         * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
486         * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
487         (bfd_elf32_littlemips_vxworks_vec): Likewise.
488         (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
489         (bfd_elf32_littlemips_vec): Likewise.
490         (bfd_elf32_nbigmips_vec): Likewise.
491         (bfd_elf32_nlittlemips_vec): Likewise.
492         (bfd_elf32_ntradbigmips_vec): Likewise.
493         (bfd_elf32_ntradlittlemips_vec): Likewise.
494         (bfd_elf32_tradbigmips_vec): Likewise.
495         (bfd_elf32_tradlittlemips_vec): Likewise.
496         (bfd_elf64_bigmips_vec): Likewise.
497         (bfd_elf64_littlemips_vec): Likewise.
498         (bfd_elf64_tradbigmips_vec): Likewise.
499         (bfd_elf64_tradlittlemips_vec): Likewise.
500         * elf32-mips.c: Include elf-vxworks.h.
501         (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
502         instead of calling mips_elf32_rtype_to_howto directly.
503         (mips_vxworks_copy_howto_rela): New reloc howto.
504         (mips_vxworks_jump_slot_howto_rela): Likewise.
505         (mips_vxworks_bfd_reloc_type_lookup): New function.
506         (mips_vxworks_rtype_to_howto): Likewise.
507         (mips_vxworks_final_write_processing): Likewise.
508         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
509         (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
510         (elf_backend_want_got_plt): Likewise.
511         (elf_backend_want_plt_sym): Likewise.
512         (elf_backend_got_symbol_offset): Likewise.
513         (elf_backend_want_dynbss): Likewise.
514         (elf_backend_may_use_rel_p): Likewise.
515         (elf_backend_may_use_rela_p): Likewise.
516         (elf_backend_default_use_rela_p): Likewise.
517         (elf_backend_got_header_size: Likewise.
518         (elf_backend_plt_readonly): Likewise.
519         (bfd_elf32_bfd_reloc_type_lookup): Likewise.
520         (elf_backend_mips_rtype_to_howto): Likewise.
521         (elf_backend_adjust_dynamic_symbol): Likewise.
522         (elf_backend_finish_dynamic_symbol): Likewise.
523         (bfd_elf32_bfd_link_hash_table_create): Likewise.
524         (elf_backend_add_symbol_hook): Likewise.
525         (elf_backend_link_output_symbol_hook): Likewise.
526         (elf_backend_emit_relocs): Likewise.
527         (elf_backend_final_write_processing: Likewise.
528         (elf_backend_additional_program_headers): Likewise.
529         (elf_backend_modify_segment_map): Likewise.
530         (elf_backend_symbol_processing): Likewise.
531         * elfxx-mips.c: Include elf-vxworks.h.
532         (mips_elf_link_hash_entry): Add is_relocation_target and
533         is_branch_target fields.
534         (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
535         srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
536         (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
537         (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
538         Return 3 for VxWorks.
539         (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
540         mips_elf_link_hash_table.  Return 0 for VxWorks.
541         (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
542         mips_elf_link_hash_table.  Update the call to ELF_MIPS_GP_OFFSET.
543         (mips_vxworks_exec_plt0_entry): New variable.
544         (mips_vxworks_exec_plt_entry): Likewise.
545         (mips_vxworks_shared_plt0_entry): Likewise.
546         (mips_vxworks_shared_plt_entry): Likewise.
547         (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
548         (mips_elf_rel_dyn_section): Change the bfd argument to a
549         mips_elf_link_hash_table.  Use MIPS_ELF_REL_DYN_NAME to get
550         the name of the section.
551         (mips_elf_initialize_tls_slots): Update the call to
552         mips_elf_rel_dyn_section.
553         (mips_elf_gotplt_index): New function.
554         (mips_elf_local_got_index): Add an input_section argument.
555         Update the call to mips_elf_create_local_got_entry.
556         (mips_elf_got_page): Likewise.
557         (mips_elf_got16_entry): Likewise.
558         (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
559         arguments.  Create dynamic relocations for each entry on VxWorks.
560         (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
561         (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
562         and MIPS_RESERVED_GOTNO.
563         (mips_elf_create_got_section): Update the uses of
564         MIPS_ELF_GOT_MAX_SIZE.  Create .got.plt on VxWorks.
565         (is_gott_symbol): New function.
566         (mips_elf_calculate_relocation): Use a dynobj local variable.
567         Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
568         mips_elf_got_page_entry.  Set G to the .got.plt entry when calculating
569         VxWorks R_MIPS_CALL* relocations.  Calculate and use G for all GOT
570         relocations on VxWorks.  Add dynamic relocations for references
571         to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols.  Don't
572         create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
573         in VxWorks executables.
574         (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
575         Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
576         Don't allocate a null entry on VxWorks.
577         (mips_elf_create_dynamic_relocation): Update the call to
578         mips_elf_rel_dyn_section.  Use absolute rather than relative
579         relocations for VxWorks, and make them RELA rather than REL.
580         (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
581         read-only on VxWorks.  Update the call to mips_elf_rel_dyn_section.
582         Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
583         VxWorks.  Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
584         Call elf_vxworks_create_dynamic_sections for VxWorks and
585         initialize the plt_header_size and plt_entry_size fields.
586         (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
587         used in VxWorks executables.  Don't allocate dynamic relocations
588         for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
589         Set is_relocation_target for each symbol referenced by a relocation.
590         Allocate .rela.dyn entries for relocations against the special
591         VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols.  Create GOT
592         entries for all VxWorks R_MIPS_GOT16 relocations.  Don't allocate
593         a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
594         R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations.  Update the calls
595         to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
596         Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
597         relocations.  Don't set no_fn_stub on VxWorks.
598         (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
599         mips_elf_allocate_dynamic_relocations.
600         (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
601         (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
602         entries for VxWorks, and do not create multiple GOTs.
603         (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
604         Handle .got specially for VxWorks.  Update the uses of
605         MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
606         Check for sgotplt and splt.  Allocate the .rel(a).dyn contents last,
607         once its final size is known.  Set DF_TEXTREL for VxWorks.  Add
608         DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
609         tags on VxWorks.  Do not add the MIPS-specific tags for VxWorks.
610         (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
611         (mips_vxworks_finish_exec_plt): Likewise.
612         (mips_vxworks_finish_shared_plt): Likewise.
613         (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
614         to mips_elf_rel_dyn_section.  Use a VxWorks-specific value of
615         DT_PLTGOT.  Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
616         DT_PLTRELSZ and DT_JMPREL.  Update the uses of MIPS_RESERVED_GOTNO
617         and mips_elf_rel_dyn_section.  Use a different GOT header for
618         VxWorks.  Don't sort .rela.dyn on VxWorks.  Finish the PLT on VxWorks.
619         (_bfd_mips_elf_link_hash_table_create): Initialize the new
620         mips_elf_link_hash_table fields.
621         (_bfd_mips_vxworks_link_hash_table_create): New function.
622         (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
623         on VxWorks.  Update the call to ELF_MIPS_GP_OFFSET.
624         * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
625         (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
626         (_bfd_mips_vxworks_link_hash_table_create): Likewise.
627         * libbfd.h: Regenerate.
628         * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
629         (elf32-mips.lo): Likewise.
630         * Makefile.in: Regenerate.
631         * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
632         * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
633         (bfd_elf32_littlemips_vxworks_vec): Likewise.
634         (_bfd_target_vector): Add entries for them.
635
636 2006-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
637
638         * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
639         section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
640         (elf_backend_special_sections): Remove #undef.
641
642 2006-03-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
643
644         * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
645         for undefined weak symbols.
646
647 2006-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
648
649         PR ld/2462
650         * elflink.c (bfd_elf_final_link): Remove
651         bed->elf_backend_emit_relocs from emit_relocs.
652
653 2006-03-17  Alexandre Oliva  <aoliva@redhat.com>
654
655         * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
656         first relocation to the second when relaxing TLS GD to LE;
657         zero it out when relaxing to IE.
658
659 2006-03-17  Alan Modra  <amodra@bigpond.net.au>
660
661         PR 2434
662         * elflink.c (elf_link_add_object_symbols): Save and restore
663         warning sym's linked sym.
664
665 2006-03-16  Alan Modra  <amodra@bigpond.net.au>
666
667         PR 2434
668         * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
669         (elf_link_add_object_symbols): Delete unnecessary locals.  Rename
670         hash_table -> htab.  Formatting.  Save entire symbol table
671         before loading as-needed syms, and restore afterwards if lib not
672         needed.  Use bfd_hash_allocate rather than bfd_alloc for sym
673         name.  Free some buffers earlier.
674         * bfd-in.h (struct bfd_hash_table): Add entsize.
675         (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
676         * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
677         * hash.c (bfd_hash_table_init_n): Add entsize param, save to
678         hash table.
679         (bfd_hash_table_init): Add param, adjust calls.
680         * aoutx.h: Adjust all hash_table_init functions and calls.
681         * bfd.c: Likewise.
682         * coff-arm.c: Likewise.
683         * coff-h8300.c: Likewise.
684         * coff-ppc.c: Likewise.
685         * cofflink.c: Likewise.
686         * ecoff.c: Likewise.
687         * ecofflink.c: Likewise.
688         * elf-m10300.c: Likewise.
689         * elf-strtab.c: Likewise.
690         * elf.c: Likewise.
691         * elf32-arm.c: Likewise.
692         * elf32-bfin.c: Likewise.
693         * elf32-cris.c: Likewise.
694         * elf32-frv.c: Likewise.
695         * elf32-hppa.c: Likewise.
696         * elf32-i386.c: Likewise.
697         * elf32-m32r.c: Likewise.
698         * elf32-m68hc1x.c: Likewise.
699         * elf32-m68k.c: Likewise.
700         * elf32-ppc.c: Likewise.
701         * elf32-s390.c: Likewise.
702         * elf32-sh.c: Likewise.
703         * elf32-vax.c: Likewise.
704         * elf64-alpha.c: Likewise.
705         * elf64-hppa.c: Likewise.
706         * elf64-ppc.c: Likewise.
707         * elf64-s390.c: Likewise.
708         * elf64-sh64.c: Likewise.
709         * elf64-x86-64.c: Likewise.
710         * elfxx-ia64.c: Likewise.
711         * elfxx-mips.c: Likewise.
712         * elfxx-sparc.c: Likewise.
713         * i386linux.c: Likewise.
714         * libaout.h: Likewise.
715         * libbfd-in.h: Likewise.
716         * libcoff-in.h: Likewise.
717         * linker.c: Likewise.
718         * m68klinux.c: Likewise.
719         * merge.c: Likewise.
720         * opncls.c: Likewise.
721         * pdp11.c: Likewise.
722         * sparclinux.c: Likewise.
723         * stabs.c: Likewise.
724         * sunos.c: Likewise.
725         * vms.c: Likewise.
726         * xcofflink.c: Likewise.
727         * section.c (struct section_hash_entry): Move to..
728         * libbfd-in.h: ..here.
729         * Makefile.am: Run "make dep-am"
730         * Makefile.in: Regenerate.
731         * bfd-in2.h: Regenerate.
732         * libbfd.h: Regenerate.
733         * libcoff.h: Regenerate.
734
735 2006-03-16  Alan Modra  <amodra@bigpond.net.au>
736
737         * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
738         against __GLOBAL_OFFSET_TABLE__ need never be dynamic.  Tweak
739         last change to REL32 relocs so that they are counted as
740         possibly dynamic as per REL24 and REL14.
741
742 2006-03-16  Alan Modra  <amodra@bigpond.net.au>
743
744         * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
745         checks from REL32.
746
747 2006-03-15  Ben Elliston  <bje@au.ibm.com>
748
749         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
750         in_list elements, not just the first.
751         
752 2006-03-14  Richard Sandiford  <richard@codesourcery.com>
753
754         * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
755         out from...
756         (_bfd_mips_elf_relocate_section): ...here.  Use it to adjust r_addend
757         for final links too.
758
759 2006-03-13  Richard Sandiford  <richard@codesourcery.com>
760
761         * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
762
763 2006-03-11  H.J. Lu  <hongjiu.lu@intel.com>
764
765         PR ld/2443
766         * dwarf2.c (concat_filename): Don't issue an error if file is 0.
767
768 2006-03-10  Paul Brook  <paul@codesourcery.com>
769
770         * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
771         (elf32_arm_print_private_bfd_data): Ditto.
772
773 2006-03-09  Paul Brook  <paul@codesourcery.com>
774
775         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
776         mapping symbols.
777
778 2006-03-09  Khem Raj  <khem@mvista.com>
779
780         * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
781         char type.
782
783 2006-03-08  H.J. Lu  <hongjiu.lu@intel.com>
784
785         * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
786
787 2006-03-07  Richard Sandiford  <richard@codesourcery.com>
788             Daniel Jacobowitz  <dan@codesourcery.com>
789             Zack Weinberg  <zack@codesourcery.com>
790             Nathan Sidwell  <nathan@codesourcery.com>
791             Paul Brook  <paul@codesourcery.com>
792             Ricardo Anguiano  <anguiano@codesourcery.com>
793             Phil Edwards  <phil@codesourcery.com>
794
795         * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
796         (bfd_elf32_bigarm_symbian_vec): Likewise.
797         (bfd_elf32_bigarm_vxworks_vec): Likewise.
798         (bfd_elf32_littlearm_vec): Likewise.
799         (bfd_elf32_littlearm_symbian_vec): Likewise.
800         (bfd_elf32_littlearm_vxworks_vec): Likewise.
801         * configure: Regenerate.
802         * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
803         (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
804         (elf32_arm_vxworks_bed): Add forward declaration.
805         (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
806         (elf32_arm_vxworks_exec_plt0_entry): New table.
807         (elf32_arm_vxworks_exec_plt_entry): Likewise.
808         (elf32_arm_vxworks_shared_plt_entry): Likewise.
809         (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
810         (reloc_section_p): New function.
811         (create_got_section): Use RELOC_SECTION.
812         (elf32_arm_create_dynamic_sections): Likewise.  Call
813         elf_vxworks_create_dynamic_sections for VxWorks targets.
814         Choose between the two possible values of plt_header_size
815         and plt_entry_size.
816         (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
817         (elf32_arm_abs12_reloc): New function.
818         (elf32_arm_final_link_relocate): Call it.  Allow the creation of
819         dynamic R_ARM_ABS12 relocs on VxWorks.  Use reloc_section_p,
820         RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION.  Initialize the
821         r_addend fields of relocs.  On rela targets, skip any code that
822         adjusts in-place addends.  When using _bfd_link_final_relocate
823         to perform a final relocation, pass rel->r_addend as the addend
824         argument.
825         (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
826         object, ignore flags that are not standard on VxWorks.
827         (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
828         relocs on VxWorks.  Use reloc_section_p.
829         (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
830         (allocate_dynrelocs): Use RELOC_SIZE.  Account for the size of
831         .rela.plt.unloaded relocs on VxWorks targets.
832         (elf32_arm_size_dynamic_sections): Use RELOC_SIZE.  Check for
833         .rela.plt.unloaded as well as .rel(a).plt.  Add DT_RELA* tags
834         instead of DT_REL* tags on RELA targets.
835         (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
836         and SWAP_RELOC_OUT.  Initialize r_addend fields.  Handle VxWorks
837         PLT entries.  Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
838         (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
839         and SWAP_RELOC_OUT.  Initialize r_addend fields.  Handle DT_RELASZ
840         like DT_RELSZ.  Handle the VxWorks form of initial PLT entry.
841         Correct the .rela.plt.unreloaded symbol indexes.
842         (elf32_arm_output_symbol_hook): Call the VxWorks version of this
843         hook on VxWorks targets.
844         (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
845         Minor formatting tweak.
846         (elf32_arm_vxworks_final_write_processing): New function.
847         (elf_backend_add_symbol_hook): Override for VxWorks and reset
848         for Symbian.
849         (elf_backend_final_write_processing): Likewise.
850         (elf_backend_emit_relocs): Likewise.
851         (elf_backend_want_plt_sym): Likewise.
852         (ELF_MAXPAGESIZE): Likewise.
853         (elf_backend_may_use_rel_p): Minor formatting tweak.
854         (elf_backend_may_use_rela_p): Likewise.
855         (elf_backend_default_use_rela_p): Likewise.
856         (elf_backend_rela_normal): Likewise.
857         * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
858
859 2006-03-06  Nathan Sidwell  <nathan@codesourcery.com>
860
861         * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
862         New.  Adjust other variants.
863         (bfd_default_scan): Update.
864         * bfd-in2.h: Rebuilt.
865         * cpu-m68k.c: Adjust.
866         (bfd_m68k_compatible): New. Use it for architectures.
867         * elf32-m68k.c (elf32_m68k_object_p): Adjust.
868         (elf32_m68k_merge_private_bfd_data): Adjust.  Correct isa-a/b
869         mismatch.
870         (elf32_m68k_print_private_bfd_data): Adjust.
871         * ieee.c (ieee_write_processor): Adjust.
872         
873 2006-03-06  Alan Modra  <amodra@bigpond.net.au>
874
875         * dwarf2.c: Formatting.
876         (add_line_info): Remove outer loop.
877
878 2006-03-05  H.J. Lu  <hongjiu.lu@intel.com>
879             Alan Modra  <amodra@bigpond.net.au>
880
881         PR binutils/2338
882         * dwarf2.c (loadable_section): New struct.
883         (dwarf2_debug): Add loadable_section_count and
884         loadable_sections.
885         (new_line_sorts_after): New.
886         (add_line_info): Use new_line_sorts_after to compare line
887         addresses.
888         (check_function_name): Removed.
889         (unset_sections): New.
890         (place_sections): New.
891         (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
892         and unset_sections on relocatable files.
893         (_bfd_dwarf2_find_line): Likewise.
894
895 2006-03-03  Nick Clifton  <nickc@redhat.com>
896
897         * cpu-avr.c: Update to ISO-C90 formatting.
898         * elf32-avr.c: Likewise.
899
900 2006-03-03  Bjoern Haase  <bjoern.m.haase@web.de>
901
902         * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
903         and R_AVR_MS8_LDI 
904         (bfd_elf_avr_final_write_processing): Set
905         EF_AVR_LINKRELAX_PREPARED in e_flags field.
906         (elf32_avr_relax_section): New function.
907         (elf32_avr_relax_delete_bytes): New function.
908         (elf32_avr_get_relocated_section_contents): New function.
909         (avr_pc_wrap_around): New function.
910         (avr_relative_distance_considering_wrap_around): New function.
911         (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
912         * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
913         * libbfd.h: Regenerate.
914         * bfd-in2.h: Regenerate.
915
916 2006-03-02  DJ Delorie  <dj@redhat.com>
917
918         * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
919         calculations.
920
921 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
922
923         * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
924         bfd_elf32_powerpc_vxworks_vec.
925
926 2006-03-02  Nick Clifton  <nickc@redhat.com>
927
928         * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
929
930 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
931
932         * elf32-i386.c (elf_i386_create_dynamic_sections): Use
933         elf_vxworks_create_dynamic_sections.
934         (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
935         symbol handling.
936         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
937         elf_vxworks_create_dynamic_sections.
938         (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
939         symbol handling.
940         * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
941         * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
942
943 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
944
945         * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
946         (elf_backend_link_output_symbol_hook): Use
947         elf_vxworks_link_output_symbol_hook instead.
948         * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
949         (elf_backend_link_output_symbol_hook): Use
950         elf_vxworks_link_output_symbol_hook instead.
951         * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
952         same interface as elf_backend_link_output_symbol_hook.
953         * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
954         prototype accordingly.
955
956 2006-03-02  Richard Sandiford  <richard@codesourcery.com>
957
958         * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
959         (ppc_elf_link_hash_table): Replace old_got and new_got with
960         plt_type and can_use_new_plt.
961         (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
962         SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
963         (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
964         Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
965         (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
966         either plt_type == PLT_OLD or plt_type == PLT_NEW.  Assert that
967         this function should not be called for VxWorks targets.
968         (ppc_elf_tls_setup): Use plt_type instead of old_got.
969         (allocate_got): Likewise.  Rearrange so that max_before_header
970         is only used for PLT_OLD and PLT_NEW.
971         (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
972         (ppc_elf_size_dynamic_sections): Likewise.
973         (ppc_elf_relax_section): Likewise.
974         (ppc_elf_relocate_section): Likewise.
975         (ppc_elf_finish_dynamic_symbol): Likewise.
976         (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
977
978 2006-02-28  Richard Sandiford  <richard@codesourcery.com>
979
980         * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
981         (elf_i386_link_hash_table_create): Initialize it.
982         (elf_i386_compute_jump_table_size): Use it instead of
983         srelplt->reloc_count.
984         (allocate_dynrelocs): Likewise.
985         (elf_i386_size_dynamic_sections): Likewise.
986         (elf_i386_relocate_section): Likewise.
987         
988 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
989
990         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
991         (_bfd_elf_write_section_eh_frame): Likewise.
992
993 2006-02-27  Carlos O'Donell  <carlos@codesourcery.com>
994
995         * po/Make-in: Add html target.
996
997 2006-02-27  Richard Sandiford  <richard@codesourcery.com>
998
999         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
1000         cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
1001         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
1002         * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
1003         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1004         * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1005         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1006         * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
1007         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
1008         * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
1009         * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
1010         * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
1011         * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
1012         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
1013         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1014         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.  Also use
1015         the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
1016         * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
1017         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1018         * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
1019         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1020
1021 2006-02-25  Richard Sandiford  <richard@codesourcery.com>
1022
1023         * elf-bfd.h (elf_link_hash_table): Add hplt field.
1024         * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
1025         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1026         * elf32-frv.c (_frv_create_got_section): Likewise.
1027         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
1028         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1029         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
1030         * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
1031         * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
1032         (elf_i386_link_hash_table_create): Don't initialize them.
1033         (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
1034         hgot fields.
1035         (elf_i386_finish_dynamic_symbol): Likewise.
1036         * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
1037         (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
1038         (ppc_elf_finish_dynamic_symbol): Likewise.
1039         
1040 2006-02-24  DJ Delorie  <dj@redhat.com>
1041
1042         * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
1043         (m32c_elf_relocate_section): Don't relocate them.
1044         (compare_reloc): New.
1045         (relax_reloc): Remove.
1046         (m32c_offset_for_reloc): New.
1047         (m16c_addr_encodings): New.
1048         (m16c_jmpaddr_encodings): New.
1049         (m32c_addr_encodings): New.
1050         (m32c_elf_relax_section): Relax jumps and address displacements.
1051         (m32c_elf_relax_delete_bytes): Adjust for internal syms.  Fix up
1052         short jumps.
1053
1054         * reloc.c: Add m32c relax relocs.
1055         * libbfd.h: Regenerate.
1056         * bfd-in2.h: Regenerate.
1057         
1058 2006-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1059
1060         PR ld/2218
1061         * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
1062         (_bfd_elf_link_hash_fixup_symbol): New.
1063
1064         * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
1065         (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
1066         it isn't NULL.
1067
1068         * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
1069
1070         * elfxx-target.h (elf_backend_fixup_symbol): New.
1071         (elfNN_bed): Initialize elf_backend_fixup_symbol.
1072
1073 2006-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1074
1075         * cpu-ia64-opc.c (ins_immu5b): New.
1076         (ext_immu5b): Likewise.
1077         (elf64_ia64_operands): Add IMMU5b.
1078
1079 2006-02-21  Alan Modra  <amodra@bigpond.net.au>
1080
1081         PR ld/2218
1082         * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
1083         is dynamic.
1084         * elf32-hppa.c (allocate_dynrelocs): Likewise.
1085         * elf32-i386.c (allocate_dynrelocs): Likewise.
1086         * elf32-s390.c (allocate_dynrelocs): Likewise.
1087         * elf32-sh.c (allocate_dynrelocs): Likewise.
1088         * elf64-s390.c (allocate_dynrelocs): Likewise.
1089         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1090         * elf32-m32r.c (allocate_dynrelocs): Likewise.  Discard relocs
1091         on undef weak with non-default visibility too.
1092         * elfxx-sparc.c (allocate_dynrelocs): Ditto.
1093
1094 2006-02-21  Alan Modra  <amodra@bigpond.net.au>
1095
1096         * bfd.c: (_bfd_default_error_handler): Don't call abort on
1097         error, instead call _exit.
1098         (_bfd_abort): Call _exit not xexit.
1099
1100 2006-02-17  Kevin Buettner  <kevinb@redhat.com>
1101
1102         * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
1103         New functions.
1104         * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1105
1106 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
1107             Anil Paranjape   <anilp1@kpitcummins.com>
1108             Shilin Shakti    <shilins@kpitcummins.com>
1109
1110         * Makefile.am: Add xc16x related entry 
1111         * Makefile.in: Regenerate 
1112         * archures.c: Add bfd_xc16x_arch 
1113         * bfd-in2.h: Regenerate
1114         * config.bfd: Add xc16x-*-elf
1115         * configure.in: Add bfd_elf32_xc16x_vec
1116         * configure: Regenerate.
1117         * targets.c: Added xc16x related information
1118         * cpu-xc16x.c: New file
1119         * reloc.c: Add new relocations specific to xc16x:
1120         BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
1121         BFD_RELOC_XC16X_SOF     
1122         * elf32-xc16x.c: New file.
1123
1124 2006-02-17  Alan Modra  <amodra@bigpond.net.au>
1125
1126         * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
1127         * elf64-ppc.c (allocate_dynrelocs): Likewise.
1128
1129 2006-02-17  Alan Modra  <amodra@bigpond.net.au>
1130
1131         PR ld/2218
1132         * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
1133         dynamic.
1134         (ppc64_elf_relocate_section): Check output reloc section size.
1135         * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
1136
1137 2006-02-16  H.J. Lu  <hongjiu.lu@intel.com>
1138
1139         PR ld/2322
1140         * elf.c (get_segment_type): New function.
1141         (_bfd_elf_print_private_bfd_data): Use it.
1142         (print_segment_map): New function.
1143         (assign_file_positions_for_segments): Call print_segment_map
1144         when there are not enough room for program headers.
1145
1146 2006-02-16  Nick Hudson  <nick.hudson@dsl.pipex.com>
1147
1148         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
1149         traditional MIPS ELF targets.
1150
1151 2006-02-15  H.J. Lu  <hongjiu.lu@intel.com>
1152
1153         PR binutils/2338
1154         * dwarf2.c (check_function_name): New function.
1155         (_bfd_dwarf2_find_nearest_line): Use check_function_name to
1156         check if function is correct.
1157
1158 2006-02-16  Alan Modra  <amodra@bigpond.net.au>
1159
1160         * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
1161         debug sections.
1162         (elf_link_input_bfd): Adjust comments.
1163
1164 2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
1165
1166         * elf.c (copy_private_bfd_data): Minor update.
1167
1168 2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
1169
1170         PR binutils/2258
1171         * elf.c (copy_private_bfd_data): Renamed to ...
1172         (rewrite_elf_program_header): This.
1173         (copy_elf_program_header): New function.
1174         (copy_private_bfd_data): Likewise.
1175
1176 2006-02-07  Nathan Sidwell  <nathan@codesourcery.com>
1177
1178         * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
1179         bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
1180         bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
1181         bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
1182         (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
1183         bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
1184         bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
1185         bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
1186         bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
1187         bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
1188         bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
1189         bfd_mach_mcf_isa_b_usp_float_emac): New.
1190         (bfd_default_scan): Update coldfire mapping.
1191         * bfd-in.h (bfd_m68k_mach_to_features,
1192         bfd_m68k_features_to_mach): Declare.
1193         * bfd-in2.h: Rebuilt.
1194         * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
1195         adjust legacy names.
1196         (m68k_arch_features): New.
1197         (bfd_m68k_mach_to_features,
1198         bfd_m68k_features_to_mach): Define.
1199         * elf32-m68k.c (elf32_m68k_object_p): New.
1200         (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
1201         (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
1202         (elf_backend_object_p): Define.
1203         * ieee.c (ieee_write_processor): Update coldfire machines.
1204         * libbfd.h: Rebuilt.
1205
1206 2006-02-06  Steve Ellcey  <sje@cup.hp.com>
1207
1208         * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
1209         if SHF_TLS is set.
1210
1211 2006-02-05  Arnold Metselaar  <arnold.metselaar@planet.nl>
1212
1213         * coff-z80.c (r_imm24): New howto. 
1214         (rtype2howto): New case R_IMM24.
1215         (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
1216         (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
1217
1218 2006-02-04  Richard Sandiford  <richard@codesourcery.com>
1219
1220         * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
1221         has already been assigned a GOT index, copy that index to the
1222         current hash table entry.
1223
1224 2006-02-01  Eric Botcazou  <ebotcazou@libertysurf.fr>
1225
1226         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
1227         for call-to-undefweak reloc overflow.
1228
1229 2006-01-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
1230
1231         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
1232         for 32-bit relocs overflow.
1233
1234 2006-01-27  Paul Brook  <paul@codesourcery.com>
1235
1236         * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
1237         objects.
1238
1239 2006-01-18  Alexandre Oliva  <aoliva@redhat.com>
1240
1241         Introduce TLS descriptors for i386 and x86_64.
1242         * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
1243         BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
1244         BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
1245         * libbfd.h, bfd-in2.h: Rebuilt.
1246         * elf32-i386.c (elf_howto_table): New relocations.
1247         (R_386_tls): Adjust.
1248         (elf_i386_reloc_type_lookup): Map new relocations.
1249         (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1250         (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1251         (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
1252         (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
1253         (elf_i386_local_tlsdesc_gotent): New macro.
1254         (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
1255         (elf_i386_compute_jump_table_size): New macro.
1256         (link_hash_newfunc): Initialize tlsdesc_got.
1257         (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
1258         (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
1259         R_386_TLS_DESC_CALL.
1260         (elf_i386_check_relocs): Likewise.  Allocate space for
1261         local_tlsdesc_gotent.
1262         (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
1263         R_386_TLS_DESC_CALL.
1264         (allocate_dynrelocs): Count function PLT relocations.  Reserve
1265         space for TLS descriptors and relocations.
1266         (elf_i386_size_dynamic_sections): Reserve space for TLS
1267         descriptors and relocations.  Set up sgotplt_jump_table_size.
1268         Don't zero reloc_count in srelplt.
1269         (elf_i386_always_size_sections): New.  Set up _TLS_MODULE_BASE_.
1270         (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
1271         R_386_TLS_DESC_CALL.
1272         (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1273         (elf_backend_always_size_sections): Define.
1274         * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
1275         R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
1276         (R_X86_64_standard): Adjust.
1277         (x86_64_reloc_map): Map new relocs.
1278         (elf64_x86_64_rtype_to_howto): New, split out of...
1279         (elf64_x86_64_info_to_howto): ... this function, and...
1280         (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
1281         (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1282         (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1283         (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
1284         (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
1285         (elf64_x86_64_local_tlsdesc_gotent): New macro.
1286         (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
1287         tlsdesc_got and sgotplt_jump_table_size fields.
1288         (elf64_x86_64_compute_jump_table_size): New macro.
1289         (link_hash_newfunc): Initialize tlsdesc_got.
1290         (elf64_x86_64_link_hash_table_create): Initialize new fields.
1291         (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
1292         R_X86_64_TLSDESC_CALL.
1293         (elf64_x86_64_check_relocs): Likewise.  Allocate space for
1294         local_tlsdesc_gotent.
1295         (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
1296         R_X86_64_TLSDESC_CALL.
1297         (allocate_dynrelocs): Count function PLT relocations.  Reserve
1298         space for TLS descriptors and relocations.
1299         (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
1300         descriptors and relocations.  Set up sgotplt_jump_table_size,
1301         tlsdesc_plt and tlsdesc_got.  Make room for them.  Don't zero
1302         reloc_count in srelplt.  Add dynamic entries for DT_TLSDESC_PLT
1303         and DT_TLSDESC_GOT.
1304         (elf64_x86_64_always_size_sections): New.  Set up
1305         _TLS_MODULE_BASE_.
1306         (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
1307         R_386_TLS_DESC_CALL.
1308         (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1309         (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
1310         DT_TLSDESC_GOT.  Set up TLS descriptor lazy resolver PLT entry.
1311         (elf_backend_always_size_sections): Define.
1312
1313 2006-01-17  H.J. Lu  <hongjiu.lu@intel.com>
1314
1315         PR binutils/2096
1316         * dwarf2.c (comp_unit_contains_address): Update comment.
1317         (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
1318         lma.  Return TRUE only if both comp_unit_contains_address and
1319         comp_unit_find_nearest_line return TRUE.
1320         (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
1321
1322 2006-01-18  Alan Modra  <amodra@bigpond.net.au>
1323
1324         * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
1325         (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
1326         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
1327         elf_gc_mark_dynamic_ref_symbol.  Make global.
1328         (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
1329         * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
1330         (elfNN_bed): Init new field.
1331         * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
1332         (ppc64_elf_gc_mark_dynamic_ref): New function.
1333
1334 2006-01-17  Alan Modra  <amodra@bigpond.net.au>
1335
1336         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
1337
1338 2006-01-17  Nick Clifton  <nickc@redhat.com>
1339
1340         PR binutils/2159
1341         * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
1342         parameters.
1343
1344 2006-01-11  Nick Clifton  <nickc@redhat.com>
1345
1346         * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
1347         into the newly (re)allocated map array.
1348
1349 2006-01-09  Alexis Wilke  <alexis_wilke@yahoo.com>
1350
1351         * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
1352
1353 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
1354
1355         * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
1356         for .toc1 section.
1357
1358 For older changes see ChangeLog-2005
1359 \f
1360 Local Variables:
1361 mode: change-log
1362 left-margin: 8
1363 fill-column: 74
1364 version-control: never
1365 End: