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