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