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