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