1 2006-01-18 Alexandre Oliva <aoliva@redhat.com>
3 Introduce TLS descriptors for i386 and x86_64.
4 * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
5 BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
6 BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
7 * libbfd.h, bfd-in2.h: Rebuilt.
8 * elf32-i386.c (elf_howto_table): New relocations.
10 (elf_i386_reloc_type_lookup): Map new relocations.
11 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
12 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
13 (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
14 (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
15 (elf_i386_local_tlsdesc_gotent): New macro.
16 (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
17 (elf_i386_compute_jump_table_size): New macro.
18 (link_hash_newfunc): Initialize tlsdesc_got.
19 (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
20 (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
22 (elf_i386_check_relocs): Likewise. Allocate space for
24 (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
26 (allocate_dynrelocs): Count function PLT relocations. Reserve
27 space for TLS descriptors and relocations.
28 (elf_i386_size_dynamic_sections): Reserve space for TLS
29 descriptors and relocations. Set up sgotplt_jump_table_size.
30 Don't zero reloc_count in srelplt.
31 (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
32 (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
34 (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
35 (elf_backend_always_size_sections): Define.
36 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
37 R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
38 (R_X86_64_standard): Adjust.
39 (x86_64_reloc_map): Map new relocs.
40 (elf64_x86_64_rtype_to_howto): New, split out of...
41 (elf64_x86_64_info_to_howto): ... this function, and...
42 (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
43 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
44 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
45 (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
46 (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
47 (elf64_x86_64_local_tlsdesc_gotent): New macro.
48 (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
49 tlsdesc_got and sgotplt_jump_table_size fields.
50 (elf64_x86_64_compute_jump_table_size): New macro.
51 (link_hash_newfunc): Initialize tlsdesc_got.
52 (elf64_x86_64_link_hash_table_create): Initialize new fields.
53 (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
54 R_X86_64_TLSDESC_CALL.
55 (elf64_x86_64_check_relocs): Likewise. Allocate space for
57 (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
58 R_X86_64_TLSDESC_CALL.
59 (allocate_dynrelocs): Count function PLT relocations. Reserve
60 space for TLS descriptors and relocations.
61 (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
62 descriptors and relocations. Set up sgotplt_jump_table_size,
63 tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
64 reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
66 (elf64_x86_64_always_size_sections): New. Set up
68 (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
70 (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
71 (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
72 DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
73 (elf_backend_always_size_sections): Define.
75 2006-01-17 H.J. Lu <hongjiu.lu@intel.com>
78 * dwarf2.c (comp_unit_contains_address): Update comment.
79 (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
80 lma. Return TRUE only if both comp_unit_contains_address and
81 comp_unit_find_nearest_line return TRUE.
82 (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
84 2006-01-18 Alan Modra <amodra@bigpond.net.au>
86 * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
87 (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
88 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
89 elf_gc_mark_dynamic_ref_symbol. Make global.
90 (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
91 * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
92 (elfNN_bed): Init new field.
93 * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
94 (ppc64_elf_gc_mark_dynamic_ref): New function.
96 2006-01-17 Alan Modra <amodra@bigpond.net.au>
98 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
100 2006-01-17 Nick Clifton <nickc@redhat.com>
103 * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
106 2006-01-11 Nick Clifton <nickc@redhat.com>
108 * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
109 into the newly (re)allocated map array.
111 2006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
113 * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
115 2006-01-01 Jakub Jelinek <jakub@redhat.com>
117 * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
120 For older changes see ChangeLog-2005
126 version-control: never