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