e26f318b76aa8b8ce625d2aff44604b933846145
[external/binutils.git] / bfd / ChangeLog
1 2006-02-27  Richard Sandiford  <richard@codesourcery.com>
2
3         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
4         cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
5         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
6         * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
7         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
8         * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
9         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
10         * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
11         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
12         * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
13         * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
14         * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
15         * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
16         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
17         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
18         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.  Also use
19         the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
20         * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
21         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
22         * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
23         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
24
25 2006-02-25  Richard Sandiford  <richard@codesourcery.com>
26
27         * elf-bfd.h (elf_link_hash_table): Add hplt field.
28         * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
29         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
30         * elf32-frv.c (_frv_create_got_section): Likewise.
31         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
32         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
33         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
34         * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
35         * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
36         (elf_i386_link_hash_table_create): Don't initialize them.
37         (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
38         hgot fields.
39         (elf_i386_finish_dynamic_symbol): Likewise.
40         * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
41         (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
42         (ppc_elf_finish_dynamic_symbol): Likewise.
43         
44 2006-02-24  DJ Delorie  <dj@redhat.com>
45
46         * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
47         (m32c_elf_relocate_section): Don't relocate them.
48         (compare_reloc): New.
49         (relax_reloc): Remove.
50         (m32c_offset_for_reloc): New.
51         (m16c_addr_encodings): New.
52         (m16c_jmpaddr_encodings): New.
53         (m32c_addr_encodings): New.
54         (m32c_elf_relax_section): Relax jumps and address displacements.
55         (m32c_elf_relax_delete_bytes): Adjust for internal syms.  Fix up
56         short jumps.
57
58         * reloc.c: Add m32c relax relocs.
59         * libbfd.h: Regenerate.
60         * bfd-in2.h: Regenerate.
61         
62 2006-02-24  H.J. Lu  <hongjiu.lu@intel.com>
63
64         PR ld/2218
65         * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
66         (_bfd_elf_link_hash_fixup_symbol): New.
67
68         * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
69         (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
70         it isn't NULL.
71
72         * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
73
74         * elfxx-target.h (elf_backend_fixup_symbol): New.
75         (elfNN_bed): Initialize elf_backend_fixup_symbol.
76
77 2006-02-23  H.J. Lu  <hongjiu.lu@intel.com>
78
79         * cpu-ia64-opc.c (ins_immu5b): New.
80         (ext_immu5b): Likewise.
81         (elf64_ia64_operands): Add IMMU5b.
82
83 2006-02-21  Alan Modra  <amodra@bigpond.net.au>
84
85         PR ld/2218
86         * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
87         is dynamic.
88         * elf32-hppa.c (allocate_dynrelocs): Likewise.
89         * elf32-i386.c (allocate_dynrelocs): Likewise.
90         * elf32-s390.c (allocate_dynrelocs): Likewise.
91         * elf32-sh.c (allocate_dynrelocs): Likewise.
92         * elf64-s390.c (allocate_dynrelocs): Likewise.
93         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
94         * elf32-m32r.c (allocate_dynrelocs): Likewise.  Discard relocs
95         on undef weak with non-default visibility too.
96         * elfxx-sparc.c (allocate_dynrelocs): Ditto.
97
98 2006-02-21  Alan Modra  <amodra@bigpond.net.au>
99
100         * bfd.c: (_bfd_default_error_handler): Don't call abort on
101         error, instead call _exit.
102         (_bfd_abort): Call _exit not xexit.
103
104 2006-02-17  Kevin Buettner  <kevinb@redhat.com>
105
106         * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
107         New functions.
108         * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
109
110 2006-02-17  Shrirang Khisti  <shrirangk@kpitcummins.com>
111             Anil Paranjape   <anilp1@kpitcummins.com>
112             Shilin Shakti    <shilins@kpitcummins.com>
113
114         * Makefile.am: Add xc16x related entry 
115         * Makefile.in: Regenerate 
116         * archures.c: Add bfd_xc16x_arch 
117         * bfd-in2.h: Regenerate
118         * config.bfd: Add xc16x-*-elf
119         * configure.in: Add bfd_elf32_xc16x_vec
120         * configure: Regenerate.
121         * targets.c: Added xc16x related information
122         * cpu-xc16x.c: New file
123         * reloc.c: Add new relocations specific to xc16x:
124         BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
125         BFD_RELOC_XC16X_SOF     
126         * elf32-xc16x.c: New file.
127
128 2006-02-17  Alan Modra  <amodra@bigpond.net.au>
129
130         * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
131         * elf64-ppc.c (allocate_dynrelocs): Likewise.
132
133 2006-02-17  Alan Modra  <amodra@bigpond.net.au>
134
135         PR ld/2218
136         * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
137         dynamic.
138         (ppc64_elf_relocate_section): Check output reloc section size.
139         * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
140
141 2006-02-16  H.J. Lu  <hongjiu.lu@intel.com>
142
143         PR ld/2322
144         * elf.c (get_segment_type): New function.
145         (_bfd_elf_print_private_bfd_data): Use it.
146         (print_segment_map): New function.
147         (assign_file_positions_for_segments): Call print_segment_map
148         when there are not enough room for program headers.
149
150 2006-02-16  Nick Hudson  <nick.hudson@dsl.pipex.com>
151
152         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
153         traditional MIPS ELF targets.
154
155 2006-02-15  H.J. Lu  <hongjiu.lu@intel.com>
156
157         PR binutils/2338
158         * dwarf2.c (check_function_name): New function.
159         (_bfd_dwarf2_find_nearest_line): Use check_function_name to
160         check if function is correct.
161
162 2006-02-16  Alan Modra  <amodra@bigpond.net.au>
163
164         * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
165         debug sections.
166         (elf_link_input_bfd): Adjust comments.
167
168 2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
169
170         * elf.c (copy_private_bfd_data): Minor update.
171
172 2006-02-10  H.J. Lu  <hongjiu.lu@intel.com>
173
174         PR binutils/2258
175         * elf.c (copy_private_bfd_data): Renamed to ...
176         (rewrite_elf_program_header): This.
177         (copy_elf_program_header): New function.
178         (copy_private_bfd_data): Likewise.
179
180 2006-02-07  Nathan Sidwell  <nathan@codesourcery.com>
181
182         * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
183         bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
184         bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
185         bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
186         (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
187         bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
188         bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
189         bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
190         bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
191         bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
192         bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
193         bfd_mach_mcf_isa_b_usp_float_emac): New.
194         (bfd_default_scan): Update coldfire mapping.
195         * bfd-in.h (bfd_m68k_mach_to_features,
196         bfd_m68k_features_to_mach): Declare.
197         * bfd-in2.h: Rebuilt.
198         * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
199         adjust legacy names.
200         (m68k_arch_features): New.
201         (bfd_m68k_mach_to_features,
202         bfd_m68k_features_to_mach): Define.
203         * elf32-m68k.c (elf32_m68k_object_p): New.
204         (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
205         (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
206         (elf_backend_object_p): Define.
207         * ieee.c (ieee_write_processor): Update coldfire machines.
208         * libbfd.h: Rebuilt.
209
210 2006-02-06  Steve Ellcey  <sje@cup.hp.com>
211
212         * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
213         if SHF_TLS is set.
214
215 2006-02-05  Arnold Metselaar  <arnold.metselaar@planet.nl>
216
217         * coff-z80.c (r_imm24): New howto. 
218         (rtype2howto): New case R_IMM24.
219         (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
220         (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
221
222 2006-02-04  Richard Sandiford  <richard@codesourcery.com>
223
224         * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
225         has already been assigned a GOT index, copy that index to the
226         current hash table entry.
227
228 2006-02-01  Eric Botcazou  <ebotcazou@libertysurf.fr>
229
230         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
231         for call-to-undefweak reloc overflow.
232
233 2006-01-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
234
235         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
236         for 32-bit relocs overflow.
237
238 2006-01-27  Paul Brook  <paul@codesourcery.com>
239
240         * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
241         objects.
242
243 2006-01-18  Alexandre Oliva  <aoliva@redhat.com>
244
245         Introduce TLS descriptors for i386 and x86_64.
246         * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
247         BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
248         BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
249         * libbfd.h, bfd-in2.h: Rebuilt.
250         * elf32-i386.c (elf_howto_table): New relocations.
251         (R_386_tls): Adjust.
252         (elf_i386_reloc_type_lookup): Map new relocations.
253         (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
254         (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
255         (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
256         (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
257         (elf_i386_local_tlsdesc_gotent): New macro.
258         (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
259         (elf_i386_compute_jump_table_size): New macro.
260         (link_hash_newfunc): Initialize tlsdesc_got.
261         (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
262         (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
263         R_386_TLS_DESC_CALL.
264         (elf_i386_check_relocs): Likewise.  Allocate space for
265         local_tlsdesc_gotent.
266         (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
267         R_386_TLS_DESC_CALL.
268         (allocate_dynrelocs): Count function PLT relocations.  Reserve
269         space for TLS descriptors and relocations.
270         (elf_i386_size_dynamic_sections): Reserve space for TLS
271         descriptors and relocations.  Set up sgotplt_jump_table_size.
272         Don't zero reloc_count in srelplt.
273         (elf_i386_always_size_sections): New.  Set up _TLS_MODULE_BASE_.
274         (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
275         R_386_TLS_DESC_CALL.
276         (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
277         (elf_backend_always_size_sections): Define.
278         * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
279         R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
280         (R_X86_64_standard): Adjust.
281         (x86_64_reloc_map): Map new relocs.
282         (elf64_x86_64_rtype_to_howto): New, split out of...
283         (elf64_x86_64_info_to_howto): ... this function, and...
284         (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
285         (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
286         (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
287         (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
288         (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
289         (elf64_x86_64_local_tlsdesc_gotent): New macro.
290         (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
291         tlsdesc_got and sgotplt_jump_table_size fields.
292         (elf64_x86_64_compute_jump_table_size): New macro.
293         (link_hash_newfunc): Initialize tlsdesc_got.
294         (elf64_x86_64_link_hash_table_create): Initialize new fields.
295         (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
296         R_X86_64_TLSDESC_CALL.
297         (elf64_x86_64_check_relocs): Likewise.  Allocate space for
298         local_tlsdesc_gotent.
299         (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
300         R_X86_64_TLSDESC_CALL.
301         (allocate_dynrelocs): Count function PLT relocations.  Reserve
302         space for TLS descriptors and relocations.
303         (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
304         descriptors and relocations.  Set up sgotplt_jump_table_size,
305         tlsdesc_plt and tlsdesc_got.  Make room for them.  Don't zero
306         reloc_count in srelplt.  Add dynamic entries for DT_TLSDESC_PLT
307         and DT_TLSDESC_GOT.
308         (elf64_x86_64_always_size_sections): New.  Set up
309         _TLS_MODULE_BASE_.
310         (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
311         R_386_TLS_DESC_CALL.
312         (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
313         (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
314         DT_TLSDESC_GOT.  Set up TLS descriptor lazy resolver PLT entry.
315         (elf_backend_always_size_sections): Define.
316
317 2006-01-17  H.J. Lu  <hongjiu.lu@intel.com>
318
319         PR binutils/2096
320         * dwarf2.c (comp_unit_contains_address): Update comment.
321         (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
322         lma.  Return TRUE only if both comp_unit_contains_address and
323         comp_unit_find_nearest_line return TRUE.
324         (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
325
326 2006-01-18  Alan Modra  <amodra@bigpond.net.au>
327
328         * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
329         (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
330         * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
331         elf_gc_mark_dynamic_ref_symbol.  Make global.
332         (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
333         * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
334         (elfNN_bed): Init new field.
335         * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
336         (ppc64_elf_gc_mark_dynamic_ref): New function.
337
338 2006-01-17  Alan Modra  <amodra@bigpond.net.au>
339
340         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
341
342 2006-01-17  Nick Clifton  <nickc@redhat.com>
343
344         PR binutils/2159
345         * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
346         parameters.
347
348 2006-01-11  Nick Clifton  <nickc@redhat.com>
349
350         * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
351         into the newly (re)allocated map array.
352
353 2006-01-09  Alexis Wilke  <alexis_wilke@yahoo.com>
354
355         * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
356
357 2006-01-01  Jakub Jelinek  <jakub@redhat.com>
358
359         * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
360         for .toc1 section.
361
362 For older changes see ChangeLog-2005
363 \f
364 Local Variables:
365 mode: change-log
366 left-margin: 8
367 fill-column: 74
368 version-control: never
369 End: