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