OSDN Git Service

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