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