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