8a369c8b38f6a5dd785509b7bd977c20a00a89ee
[binutils-gdb.git] / bfd / ChangeLog
1 2006-06-12 Thiemo Seufer <ths@mips.com>
2
3 * elf32-mips.c: Expand comment about ABI-mandated pagesize values.
4 (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): define in a more obvious way.
5 * elf64-mips.c, elfn32-mips.c (ELF_MAXPAGESIZE): Fix value for IRIX6.
6 Delete old comments.
7 (ELF_COMMONPAGESIZE): Define in a more obvious way.
8
9 2006-06-12 Nick Clifton <nickc@redhat.com>
10
11 PR binutils/2735
12 * elflink.c (elf_link_add_object_symbols): Fix the warning message
13 about mismatched alignments to allow for the case where the common
14 alignment has been deduced from the section alignment.
15 * bfd.c (_bfd_default_error_handler): Update comment to explain
16 why bfd and asection varargs are out of order. Explicitly catch
17 and abort on NULL bfd and asection arguments.
18
19 2006-06-11 Richard Sandiford <richard@codesourcery.com>
20 Thiemo Seufer <ths@mips.com>
21
22 * elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size.
23 (STUB_ORI): New macro.
24 (STUB_LI16U): Fix formatting.
25 (MIPS_FUNCTION_STUB_SIZE): Delete.
26 (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise.
27 (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro.
28 (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
29 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size
30 instead of MIPS_FUNCTION_STUB_SIZE.
31 (count_section_dynsyms): New function, split out from
32 _bfd_mips_elf_final_link.
33 (_bfd_mips_elf_always_size_sections): Get a worst-case estimate
34 of the number of dynamic symbols needed and use it to set up
35 function_stub_size. Use function_stub_size rather than
36 MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section.
37 Use 16-byte stubs for 0x10000 dynamic symbols.
38 (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size
39 instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting.
40 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the
41 size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to
42 MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes.
43 Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20.
44 Use STUB_ORI rather than STUB_LI16U for big stubs.
45 (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size.
46 (_bfd_mips_elf_final_link): Use count_section_dynsyms.
47
48 2006-06-09 David Ung <davidu@mips.com>
49
50 * bfd/elfxx-mips.c (mips_elf_calculate_relocation): Fix mode for stub
51 calling relocations.
52
53 2006-06-08 David Daney <ddaney@avtrex.com>
54
55 * elfxx-mips.c (STUB_LI16): Removed.
56 (STUB_LUI): New macro.
57 (STUB_LI16U): Ditto.
58 (STUB_LI16S): Ditto.
59 (MIPS_FUNCTION_STUB_SIZE): Rewrote to take info parameter.
60 (_bfd_mips_elf_adjust_dynamic_symbol): Pass info parameter to
61 MIPS_FUNCTION_STUB_SIZE.
62 (_bfd_mips_elf_always_size_sections): Ditto.
63 (_bfd_mips_elf_size_dynamic_sections): Ditto.
64 (_bfd_mips_elf_finish_dynamic_sections): Ditto.
65 (_bfd_mips_elf_finish_dynamic_symbol): Rewrote stub generation
66 to allow larger symbol table indexes.
67
68 2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
69
70 * po/Make-in (pdf, ps): New dummy targets.
71
72 2006-06-06 Alan Modra <amodra@bigpond.net.au>
73
74 * hash.c (bfd_hash_lookup): Correct stray line.
75
76 * elf.c (_bfd_elf_init_private_section_data): Comment typo.
77 (elfcore_grok_nto_status): Use long instead of pid_t.
78 (elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
79
80 2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
81
82 * po/Make-in (top_builddir): Define.
83
84 2006-06-05 Alan Modra <amodra@bigpond.net.au>
85
86 * Makefile.am: Run "make dep-am".
87 * Makefile.in: Regenerate.
88 * config.in: Regenerate.
89
90 2006-06-02 Alan Modra <amodra@bigpond.net.au>
91 H.J. Lu <hongjiu.lu@intel.com>
92
93 PR ld/2723
94 * elflink.c (bfd_elf_final_link): Don't output section symbols
95 for special ELF sections.
96
97 2006-06-01 Alan Modra <amodra@bigpond.net.au>
98
99 * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
100 instead of bfd_make_section*.
101 * aix386-core.c: Likewise.
102 * aix5ppc-core.c: Likewise.
103 * aout-adobe.c: Likewise.
104 * aoutf1.h: Likewise.
105 * binary.c: Likewise.
106 * cisco-core.c: Likewise.
107 * coff-arm.c: Likewise.
108 * coff-h8300.c: Likewise.
109 * elf.c: Likewise.
110 * elf32-bfin.c: Likewise.
111 * elf32-m32c.c: Likewise.
112 * hppabsd-core.c: Likewise.
113 * hpux-core.c: Likewise.
114 * i386linux.c: Likewise.
115 * ieee.c: Likewise.
116 * ihex.c: Likewise.
117 * irix-core.c: Likewise.
118 * lynx-core.c: Likewise.
119 * m68klinux.c: Likewise.
120 * mach-o.c: Likewise.
121 * netbsd-core.c: Likewise.
122 * nlmcode.h: Likewise.
123 * opncls.c: Likewise.
124 * osf-core.c: Likewise.
125 * peXXigen.c: Likewise.
126 * ppcboot.c: Likewise.
127 * ptrace-core.c: Likewise.
128 * rs6000-core.c: Likewise.
129 * sco5-core.c: Likewise.
130 * sparclinux.c: Likewise.
131 * srec.c: Likewise.
132 * sunos.c: Likewise.
133 * trad-core.c: Likewise.
134 * xcofflink.c: Likewise.
135 * xsym.c: Likewise.
136
137 2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
138
139 * Makefile.am (INCLUDES): Use @INCINTL@.
140 * acinclude.m4: Include new gettext macros.
141 * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
142 Manually substitute POFILES and GMOFILES.
143 * Makefile.in, aclocal.m4, configure, doc/Makefile.in: Regenerated.
144
145 2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
146
147 * bfd.c (bfd_emul_get_maxpagesize): New.
148 (bfd_elf_set_pagesize): Likewise.
149 (bfd_emul_set_maxpagesize): Likewise.
150 (bfd_emul_get_commonpagesize): Likewise.
151 (bfd_emul_set_commonpagesize): Likewise.
152 * bfd-in2.h: Regenerated.
153
154 * elf-bfd.h (elf_backend_data): Add commonpagesize.
155 (xvec_get_elf_backend_data): New.
156 (get_elf_backend_data): Use xvec_get_elf_backend_data.
157
158 * elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
159 * elfxx-target.h (elfNN_bed): Likewise.
160
161 * elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
162 * elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
163 * elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
164 * elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
165 * elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
166 * elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
167 * elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
168 * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
169 * elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
170 * elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
171 * elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
172 * elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.
173
174 * elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
175 (elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.
176
177 * targets.c (bfd_find_target): Support NULL abfd.
178
179 2006-05-30 Nick Clifton <nickc@redhat.com>
180
181 * po/es.po: Updated Spanish translation.
182
183 2006-05-27 Alan Modra <amodra@bigpond.net.au>
184 H.J. Lu <hongjiu.lu@intel.com>
185
186 * elf.c (assign_file_positions_for_load_sections): Retrieve
187 maxpagesize from m->p_align if it is valid. Set p_vaddr,
188 p_paddr and p_align earlier. Revert 2006-05-19 change to p_align.
189 (copy_elf_program_header): Copy p_align. Set p_align_valid.
190
191 2006-05-26 H.J. Lu <hongjiu.lu@intel.com>
192
193 * elf64-x86-64.c (ELF_MINPAGESIZE): Changed to 0x1000.
194
195 2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
196
197 * elf64-x86-64.c (ELF_MINPAGESIZE): Set to 0x100000.
198
199 2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
200
201 * elf64-x86-64.c (ELF_MAXPAGESIZE): Updated to 0x200000.
202
203 2006-05-26 Alan Modra <amodra@bigpond.net.au>
204
205 * elf.c (sym_is_global): Return a bfd_boolean.
206 (ignore_section_sym): New function.
207 (elf_map_symbols): Use ignore_section_sym to discard some syms.
208 (_bfd_elf_symbol_from_bfd_symbol): Ensure section belongs to
209 bfd before using elf_section_syms.
210
211 2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
212
213 * config.bfd: (sh-*-linux*): Treat as 64bit target.
214 (sh*l*-*-netbsdelf*): Likewise.
215 (sh-*-netbsdelf*): Likewise.
216 (shl*-*-elf*): Likewise.
217 (sh[1234]l*-*-elf*): Likewise.
218 (sh3el*-*-elf*): Likewise.
219 (shl*-*-kaos*): Likewise.
220 (sh-*-elf*): Likewise.
221 (sh[1234]*-elf*): Likewise.
222 (sh-*-rtems*): Likewise.
223 (sh-*-kaos*): Likewise.
224
225 2006-05-24 H.J. Lu <hongjiu.lu@intel.com>
226
227 PR ld/1485
228 * config.bfd: Set want64 to true if 64bit bfd is used.
229 (sh-*-linux*): Use targ64_selvecs for 64bit targets.
230 (sh*l*-*-netbsdelf*): Likewise.
231 (sh-*-netbsdelf*): Likewise.
232 (shl*-*-elf*): Likewise.
233 (sh[1234]l*-*-elf*): Likewise.
234 (sh3el*-*-elf*): Likewise.
235 (shl*-*-kaos*): Likewise.
236 (sh-*-elf*): Likewise.
237 (sh[1234]*-elf*): Likewise.
238 (sh-*-rtems*): Likewise.
239 (sh-*-kaos*): Likewise.
240
241 2006-05-24 Paul Brook <paul@codesourcery.com>
242
243 * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms
244 * elf32-arm.c (output_arch_syminfo): Define.
245 (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map,
246 elf32_arm_output_arch_local_syms): New functions.
247 (elf_backend_output_arch_local_syms): Define.
248 * elflink.c (bfd_elf_final_link): Call
249 elf_backend_output_arch_local_syms.
250 * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default
251 definition.
252 (elfNN_bed): Add elf_backend_output_arch_local_syms.
253
254 2006-05-24 Paul Brook <paul@codesourcery.com>
255
256 * elf32-arm.c (put_arm_insn, put_thumb_insn): New functions.
257 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
258 elf32_arm_finish_dynamic_symbol): Use them.
259
260 2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
261 Randolph Chung <tausq@debian.org>
262
263 * elf-hppa.h (reloc_hppa_howto_table): Check bitfield for
264 TPREL21L/TPREL14R relocations. Handle LTOFF_TP14R relocations.
265 Add handling for TLS relocations.
266 (elf_hpp_reloc_final_type): Handle TLS relocs.
267 * elf32-hppa.c: Add authors for cleanup and TLS support.
268 (hppa_elf_local_got_tls_type, hh_name, eh_name): Define.
269 (elf32_hppa_link_hash_entry): Add tls_type.
270 (elf32_hppa_link_hash_table): Add tld_ldm_got.
271 (hppa_link_has_newfunc): Set tls_type.
272 (elf32_hppa_link_hash_table_create): Set tls_ldm_got refcount.
273 (hppa_stub_name): Use hh_name macro.
274 (elf32_hppa_copy_indirect_symbol): Copy TLS information.
275 (elf32_hppa_check_relocs): Call elf32_hppa_optimized_tls_reloc.
276 Handle TLS relocs.
277 (elf32_hppa_gc_sweep_hook): Likewise.
278 (allocate_dynrelocs): Handle TLS relocs.
279 (elf32_hppa_size_dynamic_sections): Count space required by TLS
280 relocs. Use hh_name macro.
281 (dtpoff_base): New function.
282 (tpoff): Likewise.
283 (elf32_hppa_optimized_tls_reloc): Likewise.
284 (final_link_relocate): Handle TLS relocs.
285 (elf32_hppa_relocate_section): Handle TLS relocs. Use eh_name
286 and hh_name macros.
287 (elf32_hppa_finish_dynamic_symbol): Setup TLS got entries. Use
288 hh_name and eh_name macros.
289 (elf32_hppa_reloc_type_clas): Handle TLS relocs.
290
291 2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
292
293 * archures.c: Add bfd_mach_avr6.
294 * cpu-avr.c: Likewise.
295 * reloc.c (BFD_RELOC_AVR_LO8_LDI_GS, BFD_RELOC_AVR_HI8_LDI_GS):
296 New relocations.
297 * libbfd.h: Regenerate.
298 * bfd-in2.h:Regenerate.
299 * elf32-avr.h: New file. Protoypes for functions accessed from ld.
300 * elf32-avr.c: Add elf32-avr.h to include list.
301 (elf32_avr_stub_hash_entry): New function.
302 (elf32_avr_link_hash_table): New struct.
303 (avr_link_hash_table): Likewise.
304 (avr_stub_hash_entry): Likewise.
305 (avr_stub_hash_lookup): New function.
306 (stub_hash_newfunc): New function.
307 (elf32_avr_link_hash_table_create): New function.
308 (elf32_avr_link_hash_table_free): New function.
309 (avr_get_stub_addr): New function.
310 (debug_relax, debug_stubs): Add new global variables controlling
311 debugging printout to stdout.
312 (avr_pc_wrap_around): Change the type to bfd_vma.
313 (avr_replace_call_ret_sequences): Add a new variable controling
314 linkrelax optimizations.
315 (avr_stub_is_required_for_16_bit_reloc): New function.
316 (avr_final_link_relocate):
317 Add linker hash table to parameter list. Use stub addr. if necessary.
318 (elf32_avr_relocate_section):
319 Add linker hashtable to parameter list of avr_final_link_relocate.
320 (bfd_elf_avr_final_write_processing): Add support for bfd_mach_avr6.
321 (elf32_avr_object_p): Add support for E_AVR_MACH_AVR6.
322 (elf32_avr_relax_delete_bytes):
323 Iterate over all sections of a bfd when adjusting relocs addends.
324 (elf32_avr_relax_section):
325 Evaluate avr_replace_call_ret_sequences and recalculate the size of
326 stub section.
327 (avr_stub_name): New function.
328 (avr_get_stub_entry): New function.
329 (avr_add_stub): New function.
330 (avr_build_one_stub): New function.
331 (avr_size_one_stub): New function.
332 (elf32_avr_setup_params): New function.
333 (elf32_avr_setup_section_lists): New function.
334 (get_local_syms): New function.
335 (elf32_avr_size_stubs): New function.
336 (bfd_elf32_bfd_link_hash_table_create): New function.
337 (bfd_elf32_bfd_link_hash_table_free): New function.
338
339 2006-05-23 H.J. Lu <hongjiu.lu@intel.com>
340
341 PR ld/2655
342 PR ld/2657
343 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Properly
344 update CIE/FDE length. Don't pad to the section alignment.
345
346 2006-05-23 Jie Zhang <jie.zhang@analog.com>
347
348 * elf32-bfin.c (bfinfdpic_relocate_section): Clear reloc for
349 deteted entries in .eh_frame section.
350
351 2006-05-23 Jie Zhang <jie.zhang@analog.com>
352
353 * elf32-bfin.c (bfin_check_relocs): Use __GLOBAL_OFFSET_TABLE_
354 instead of _GLOBAL_OFFSET_TABLE_.
355 (bfin_relocate_section): Ditto.
356 (_bfin_create_got_section): Ditto.
357 (elf32_bfinfdpic_create_dynamic_sections): Use
358 __PROCEDURE_LINKAGE_TABLE_ instead of _PROCEDURE_LINKAGE_TABLE_.
359 (bfin_finish_dynamic_symbol): Use __DYNAMIC instead of _DYNAMIC.
360
361 2006-05-23 Alan Modra <amodra@bigpond.net.au>
362
363 * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
364 function syms over other syms.
365
366 2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
367
368 * elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
369 check.
370 (bfd_elf_final_link): Add a late DT_TEXTREL check.
371 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): Define.
372 (mips_elf_create_dynamic_relocation): Set DF_TEXTREL.
373 (_bfd_mips_elf_check_relocs): Delete MIPS_READONLY_SECTION.
374 Use MIPS_ELF_READONLY_SECTION.
375 (_bfd_mips_elf_size_dynamic_sections): Clear DF_TEXTREL after
376 creating DT_TEXTREL.
377 (_bfd_mips_elf_finish_dynamic_sections): Clear textrel markers
378 if no text relocations were generated.
379
380 2006-05-19 H.J. Lu <hongjiu.lu@intel.com>
381
382 * elfxx-ia64.c (ELF_MAXPAGESIZE): Fix a typo in comment.
383
384 2006-05-19 Alan Modra <amodra@bigpond.net.au>
385
386 * elf.c (elf_fake_sections): Formatting.
387 (assign_file_positions_for_load_sections): Only add SEC_ALLOC
388 sections to p_memsz. Remove hack for PT_NOTE sections. Allow
389 section alignment to increase p_align for PT_LOAD.
390 (assign_file_positions_for_non_load_sections): Remove ARM BPABI
391 hack for PT_DYNAMIC. Instead, set p_filesz for all segments
392 other than PT_LOAD, and PT_NOTE in core.
393
394 2006-05-17 Alan Modra <amodra@bigpond.net.au>
395
396 * elf.c (assign_file_positions_for_segments): Split into..
397 (assign_file_positions_for_load_sections): ..this, and..
398 (assign_file_positions_for_non_load_sections): ..this new function,..
399 (assign_file_positions_except_relocs): ..writing program headers here.
400
401 2006-05-17 Alan Modra <amodra@bigpond.net.au>
402
403 * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
404 non-load sections if they have relocs.
405
406 2006-05-15 Paul Brook <paul@codesourcery.com>
407
408 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
409 (bfd_is_arm_special_symbol_name): ... to this. Add type argument.
410 Check symbol name is of specified type.
411 * elf32-arm.c (elf32_arm_is_target_special_symbol,
412 arm_elf_find_function, elf32_arm_output_symbol_hook): Use
413 bfd_is_arm_special_symbol_name.
414 * bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
415 BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
416 BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
417 (bfd_is_arm_mapping_symbol_name): Remove prototype.
418 (bfd_is_arm_special_symbol_name): Add prototype.
419 * bfd-in2.h: Regenerate.
420
421 2006-05-15 David Heine <dlheine@tensilica.com>
422 Bob Wilson <bob.wilson@acm.org>
423
424 * elf32-xtensa.c (check_loop_aligned): Fix reversed check for
425 undefined opcode. Clean up assertions.
426 (narrow_instruction, widen_instruction): Remove "do_it" parameters.
427 Factor most of the code into separate functions....
428 (can_narrow_instruction, can_widen_instruction): New.
429 (prev_instr_is_a_loop): New.
430 (compute_ebb_proposed_actions): Combine error handling code for
431 decode errors. Replace call to insn_decode_len with inline code.
432 Use can_narrow_instruction and can_widen_instruction. Handle errors
433 from call to xtensa_opcode_is_loop.
434 (relax_section): Adjust calls to narrow_instruction and
435 widen_instruction.
436
437 2006-05-15 Alan Modra <amodra@bigpond.net.au>
438
439 PR 2658
440 * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
441 -shared link.
442
443 2006-05-11 Michael Matz <matz@suse.de>
444
445 * elflink.c (match_group_member): Correctly iterate group
446 members.
447
448 2006-05-11 Paul Brook <paul@codesourcery.com>
449
450 * elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs.
451 (elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs.
452 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
453 * reloc.c: Ditto.
454 * bfd-in2.h: Regenerate.
455 * libbfd.h: Regenerate.
456 * libcoff.h: Regenerate.
457
458 2006-05-11 Mike Bland <mbland@google.com>
459
460 * elf.c (_bfd_elf_init_private_section_data): Don't change
461 section type if already set.
462
463 2006-05-10 Nick Clifton <nickc@redhat.com>
464
465 PR ld/2607
466 * elfcode.h (valid_section_index_p): New function: Checks for a
467 valid section index. Allows indicies in the range SHN_LOPROC to
468 SHN_HIOS.
469 (elf_object_p): Use valid_section_index_p.
470
471 2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
472
473 * coff-arm.c (ARM_26D, ARM_32, ARM_RVA_32, ARM_SECTION,
474 ARM_SECREL): Mark WinCE versions of these relocs as partial
475 inplace.
476 (coff_arm_relocate_section): Adjust addend for WinCE.
477
478 2006-05-10 Alan Modra <amodra@bigpond.net.au>
479
480 PR 2342
481 * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
482
483 2006-05-09 Nick Clifton <nickc@redhat.com>
484
485 * coffcode.h (coff_write_relocs): Produce an error message if a an
486 out-of-range symbol index is detected in a reloc.
487
488 2006-05-09 Ben Elliston <bje@au.ibm.com>
489
490 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Remove unused
491 local variable `dynobj'.
492
493 2006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
494
495 * elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all
496 of the bfd's sections for the reloc-addend adjustments.
497
498 2006-05-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
499
500 * elf32-s390.c (invalid_tls_insn): Call bfd_set_error.
501 (elf_s390_relocate_section): Add code to do the GD->LE and
502 LD->LE TLS linker optimizations if a brasl instruction is used
503 for the __tls_get_offset function call.
504 * elf64-s390.c (invalid_tls_insn): Call bfd_set_error.
505
506 2006-05-05 Alan Modra <amodra@bigpond.net.au>
507
508 * elf64-ppc.c (ppc64_elf_tls_optimize): Only optimize
509 R_PPC64_TPREL64 and R_PPC64_DTPMOD64 relocs when they are in
510 the .toc and referenced by a TLS code sequence.
511 (ppc64_elf_edit_toc): Cater for the unlikely situation that
512 .toc is the first section in a file.
513
514 2006-05-04 Andreas Schwab <schwab@suse.de>
515
516 * aoutf1.h (struct external_sparc_core): Declare c_regs as struct
517 regs instead of an array of int.
518 (struct external_solaris_bcp_core): Likewise.
519 (swapcore_sun3): Use offsetof instead of computing the offset
520 manually.
521 (swapcore_sparc): Likewise. Simplify reference to c_regs.
522 (swapcore_solaris_bcp): Likewise.
523
524 2006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
525
526 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Adjust handling
527 for missing GOTs.
528
529 2006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
530
531 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
532 mapping symbols.
533
534 2006-05-04 Ben Elliston <bje@au.ibm.com>
535
536 * coff-or32.c (bfd_section_from_shdr): Remove unused local
537 variable `ptr'.
538 * cofflink.c (process_embedded_commands): Remove unused local
539 variables `had_read' and `had_shared'.
540 * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
541 variable `fdr_adr'.
542 * ihex.c (ihex_read_section): Remove unused local variable `addr'.
543
544 2006-05-03 Alan Modra <amodra@bigpond.net.au>
545
546 * libbfd-in.h (_bfd_generic_new_section_hook): Declare.
547 * section.c (bfd_abs_symbol, bfd_com_symbol): Delete.
548 (bfd_und_symbol, bfd_ind_symbol): Delete.
549 (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to
550 &SEC.symbol.
551 (STD_SECTION): Adjust.
552 (_bfd_generic_new_section_hook): New function, extracted from..
553 (bfd_section_init): ..here.
554 (bfd_make_section_old_way): Call new_section_hook for abs, com,
555 und and ind sections.
556 * elf.c (_bfd_elf_large_com_section): Adjust.
557 * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook.
558 * pdp11.c (new_section_hook): Likewise.
559 * coffcode.h (coff_new_section_hook): Likewise.
560 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
561 * elf.c (_bfd_elf_new_section_hook): Likewise.
562 * vms.c (vms_new_section_hook): Likwise.
563 * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't
564 already set.
565 * elf32-sh64.c (sh64_elf_new_section_hook): Likewise.
566 * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise.
567 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
568 * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise.
569 * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise.
570 * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise.
571 * ieee.c (ieee_new_section_hook): Likewise. Call
572 _bfd_generic_new_section_hook too.
573 * mmo.c (mmo_new_section_hook): Likewise.
574 * oasys.c (oasys_new_section_hook): Likewise.
575 * som.c (som_new_section_hook): Likewise.
576 * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol.
577 * bfd-in2.h: Regenerate.
578 * libbfd.h: Regenerate.
579
580 2006-05-03 Alan Modra <amodra@bigpond.net.au>
581
582 * hash.c (DEFAULT_SIZE): Revert last change.
583 (higher_prime_number): Correct test for no larger prime. Don't
584 abort on error, instead return 0. Depopulate primes[].
585 (bfd_hash_lookup): If we overflow size, refuse to grow table.
586
587 2006-05-02 Paul Brook <paul@codesourcery.com>
588
589 * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
590 for R_ARM_REL32.
591
592 2006-05-02 Ben Elliston <bje@au.ibm.com>
593
594 * archive.c (bfd_generic_archive_p): Remove unused local variable
595 `fail'.
596 * dwarf2.c (decode_line_info): Remove unused local variable
597 `basic_block'.
598 * elfcode.h (elf_slurp_reloc_table_from_section): Remove unused
599 local variable `s'.
600 * tekhex.c (tekhex_write_object_contents): Remove unused local
601 variable `bytes_written'.
602 * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
603 variable `r_addend'.
604 * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
605 * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
606 (_bfd_ns32k_relocate_contents): Remove break after return.
607 * elf.c (bfd_section_from_shdr): Remove breaks after returns.
608
609 2006-05-02 Nick Clifton <nickc@redhat.com>
610
611 * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
612 in order to avoid conflicts with the global DEBUG define.
613
614 2006-05-02 Alan Modra <amodra@bigpond.net.au>
615
616 * dwarf2.c: Formatting.
617 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Simplify
618 output section check.
619 * elf32-i370.c: Warning fixes inside #ifdef DEBUG.
620 * elf32-m32c.c: Similarly.
621 * elf32-ppc.c: Similarly.
622 * elf32-v850.c: Similarly.
623 * nlm32-sparc.c: Similarly.
624 * elfcode.h: Similarly.
625 (elf_symbol_flags): Delete.
626 * elflink.c (elf_link_input_bfd): Comment typo.
627
628 2006-05-01 DJ Delorie <dj@redhat.com>
629
630 * bfd-in.h (bfd_hash_table): Add count field.
631 * bfd-in2.h: Regenerate.
632 * hash.c (higher_prime_number): New.
633 (bfd_hash_table_inint_n): Init count field.
634 (bfd_hash_lookup): Grow table as needed.
635
636 2006-04-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
637
638 PR binutils/2584
639 * tekhex.c (getvalue): Change return type to bfd_boolean and
640 add the new parameter. Return false if the unexpected character
641 is found.
642 (getsym): Likewise.
643 (first_phase): Change return type to bfd_boolean and return
644 false if the unexpected character is found. Replace abort
645 with returning false.
646 (pass_over): Change return type to bfd_boolean and the type of
647 the second argument to bfd_boolean (*) (bfd *, int, char *).
648 Return false if FUNC returns false.
649 (tekhex_object_p): Return NULL if pass_over fails.
650
651 2006-04-27 Alan Modra <amodra@bigpond.net.au>
652
653 * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
654
655 2006-04-26 H.J. Lu <hongjiu.lu@intel.com>
656
657 PR binutils/2593
658 * elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
659 and flags if its BFD flags have been set.
660 (_bfd_elf_init_private_section_data): Don't copy the output ELF
661 section type from input if it has been set to something
662 different.
663
664 2006-04-25 H.J. Lu <hongjiu.lu@intel.com>
665
666 PR binutils/2467
667 * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd)
668 is NULL first.
669
670 * elf32-arm.c (elf32_arm_close_and_cleanup): Check if
671 abfd->sections is NULL.
672 (elf32_arm_bfd_free_cached_info): New.
673 (bfd_elf32_bfd_free_cached_info): Defined.
674
675 * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it
676 to _bfd_free_cached_info.
677
678 * libbfd-in.h (_bfd_free_cached_info): New.
679 * libbfd: Regenerated.
680
681 * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL.
682 (_bfd_free_cached_info): New.
683
684 2006-04-21 Alan Modra <amodra@bigpond.net.au>
685
686 * elf.c (assign_file_positions_except_relocs): Move code setting
687 file position of non-loaded sections..
688 (assign_file_positions_for_segments): ..to here.
689
690 2006-04-20 H.J. Lu <hongjiu.lu@intel.com>
691
692 PR ld/2537
693 * elf.c (bfd_section_from_shdr): Allow sections reserved for
694 applications. Issue an error on sections we don't know how
695 to handle.
696
697 2006-04-19 Alan Modra <amodra@bigpond.net.au>
698
699 * Makefile.am: Run "make dep-am".
700 * Makefile.in: Regenerate.
701
702 2006-04-19 Alan Modra <amodra@bigpond.net.au>
703
704 * warning.m4 (--enable-werror): Format help message.
705 (--enable-build-warnings): Likewise.
706 * configure: Regenerate.
707
708 2006-04-18 Nick Clifton <nickc@redhat.com>
709
710 PR 2257
711 * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
712 fields to still be handled as ELF files.
713
714 2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
715
716 * po/SRC-POTFILES.in: Regenerated.
717
718 2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
719
720 * configure.in: Update version to 2.17.50.
721 * configure: Regenerated.
722
723 2006-04-14 David Heine <dlheine@tensilica.com>
724
725 * elf32-xtensa.c (build_reloc_opcodes): New.
726 (compute_text_actions): Use it to decode opcodes outside inner loop.
727 (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
728 it is set, use it to get the opcodes for relocations.
729 (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
730
731 2006-04-08 H.J. Lu <hongjiu.lu@intel.com>
732
733 PR ld/2513
734 * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
735 (GOT_TLS_IE_IE): Likewise.
736 (GOT_TLS_IE_GD): Likewise.
737 (GOT_TLS_IE_MASK): Likewise.
738 (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
739 and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
740 respectively.
741 (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
742 are set, treat tls_type as GOT_TLS_IE_BOTH.
743 (elf_i386_relocate_section): Likewise.
744
745 2006-04-07 Randolph Chung <tausq@debian.org>
746
747 * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
748 (elf64_hppa_grok_psinfo): Likewise.
749 (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
750
751 2006-04-06 DJ Delorie <dj@redhat.com>
752
753 * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
754 each plt entry we create.
755
756 2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
757
758 * po/Make-in: Add install-html target.
759 * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
760 htmldir. Add install-html and install-html-recursive targets.
761 * Makefile.in: Regenerate.
762 * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
763 * configure: Regenerate.
764
765 2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
766
767 * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
768 with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
769 section structure.
770
771 2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
772
773 * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
774 eliminate warnings.
775
776 2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
777 James E Wilson <wilson@specifixinc.com>
778
779 PR ld/2442
780 * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
781 (elfNN_ia64_local_hash_entry): Add count, sorted_count and
782 size.
783 (elfNN_ia64_link_hash_entry): Likewise.
784 (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
785 and size.
786 (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
787 processing.
788 (elfNN_ia64_hash_hide_symbol): Likewise.
789 (elfNN_ia64_global_dyn_sym_thunk): Likewise.
790 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
791 (elfNN_ia64_global_dyn_info_free): New function.
792 (elfNN_ia64_local_dyn_info_free): Likewise.
793 (elfNN_ia64_hash_table_free): Free local and global
794 elfNN_ia64_dyn_sym_info.
795 (addend_compare): New function.
796 (sort_dyn_sym_info): Likewise.
797 (get_dyn_sym_info): Updated to use binary search for addend.
798 (elfNN_ia64_check_relocs): Scan relocations to create dynamic
799 relocation arrays first.
800
801 2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
802
803 * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
804 symbol.
805
806 2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
807
808 PR ld/2411
809 * elflink.c (check_dynsym): New.
810 (elf_link_output_extsym): Use it.
811 (bfd_elf_final_link): Likewise.
812
813 2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
814
815 PR ld/2404
816 * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
817 symbol from the dynamic definition with the default version if
818 its type and the type of existing regular definition mismatch.
819
820 2006-04-05 Richard Sandiford <richard@codesourcery.com>
821 Daniel Jacobowitz <dan@codesourcery.com>
822
823 * config.bfd (sparc-*-vxworks*): New stanza.
824 * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
825 (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
826 * configure: Regenerate.
827 * elf32-sparc.c: Include elf-vxworks.h.
828 (elf32_sparc_vxworks_link_hash_table_create: New.
829 (elf32_sparc_vxworks_final_write_processing): New.
830 (TARGET_BIG_SYM): Override for VxWorks.
831 (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
832 (bfd_elf32_bfd_link_hash_table_create): Likewise.
833 (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
834 (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
835 (elf_backend_link_output_symbol_hook): Likewise.
836 (elf_backend_emit_relocs): Likewise.
837 (elf_backend_final_write_processing, elf32_bed): Likewise.
838 * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
839 (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
840 (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
841 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
842 build_plt_entry here.
843 (create_got_section): Initialize sgotplt for VxWorks.
844 (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
845 plt_header_size and plt_entry_size, with new VxWorks-specific settings.
846 Call elf_vxworks_create_dynamic_sections for VxWorks.
847 (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
848 Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
849 (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
850 for VxWorks. Check for the .got.plt section.
851 (sparc_vxworks_build_plt_entry): New function.
852 (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
853 Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
854 absolute on VxWorks.
855 (sparc32_finish_dyn): Add special handling for DT_RELASZ
856 and DT_PLTGOT on VxWorks.
857 (sparc_vxworks_finish_exec_plt): New.
858 (sparc_vxworks_finish_shared_plt): New.
859 (_bfd_sparc_elf_finish_dynamic_sections): Call them.
860 Use plt_header_size and plt_entry_size.
861 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
862 srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
863 * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
864 (elf32-sparc.lo): Likewise.
865 * Makefile.in: Regenerate.
866 * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
867 (_bfd_target_vector): Add a pointer to it.
868
869 2006-03-30 Ben Elliston <bje@au.ibm.com>
870
871 PR ld/2267
872 * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
873 special section number that exceeds the number of ELF sections
874 (eg. SHN_MIPS_SCOMMON).
875
876 2006-03-27 Richard Sandiford <richard@codesourcery.com>
877
878 * elfxx-mips.c (mips_got_entry): Add more commentary.
879 (mips_elf_local_got_index): Use the hash table entry to record
880 the GOT index of forced-local symbols.
881 (mips_elf_initialize_tls_index): Rearrange code. Store the index
882 in either the hash table entry or the mips_got_entry, not both.
883 Add more commentary.
884 (mips_elf_multi_got): Make sure the g->next is nonnull when calling
885 mips_elf_initialize_tls_index.
886
887 2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
888
889 * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
890 RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
891 reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
892 bfin_areloc_howto_table): Delete. All
893 uses deleted as well.
894 (bfin_reloc_map): Delete all stack relocs.
895 (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
896 bfin_reloc_type_lookup): Don't support them.
897 (bfin_relocate_section): Don't try to handle them.
898
899 * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
900 * configure.in: Likewise.
901 * configure: Regenerate.
902 * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
903 (BFIN_RELOC_MAX): Now 0x21.
904 (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
905 (bfd_elf32_bfinfdpic_vec): Declare.
906 (IS_FDPIC): New macro.
907 (struct bfinfdpic_elf_link_hash_table): New struct.
908 (bfinfdpic_hash_table, bfinfdpic_got_section,
909 bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
910 bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
911 bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
912 bfinfdpic_plt_initial_offset): Accessor macros for it.
913 (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
914 (struct bfinfdpic_relocs_info): New struct.
915 (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
916 BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
917 DEFAULT_STACK_SIZE): New macros.
918 (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
919 bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
920 bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
921 bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
922 _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
923 _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
924 bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
925 _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
926 elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
927 _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
928 _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
929 _bfinfdpic_resolve_final_relocs_info,
930 elf32_bfinfdpic_size_dynamic_sections,
931 elf32_bfinfdpic_always_size_sections,
932 elf32_bfinfdpic_modify_segment_map,
933 _bfinfdpic_count_got_plt_entries,
934 elf32_bfinfdpic_finish_dynamic_sections,
935 elf32_bfinfdpic_adjust_dynamic_symbol,
936 elf32_bfinfdpic_finish_dynamic_symbol,
937 elf32_bfinfdpic_elf_use_relative_eh_frame,
938 elf32_bfinfdpic_elf_encode_eh_address,
939 elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
940 elf32_bfinfdpic_copy_private_bfd_data,
941 (struct _bfinfdpic_dynamic_got_info,
942 struct _bfinfdpic_dynamic_got_plt_info): New structs.
943 (elf32_bfin_print_private_bfd_data): Print PIC flags.
944 (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
945 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
946 elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
947 elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
948 bfd_elf32_bfd_copy_private_bfd_data,
949 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
950 elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
951 elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
952 elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
953 elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
954 elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
955 elf_backend_omit_section_dynsym): Redefine these macros and include
956 "elf32-target.h" again to create the elf32-bfinfdpic target.
957 * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
958 BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
959 BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
960 BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
961 BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
962 BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
963 BFD_RELOC_BFIN_GOTOFFLO): New.
964 * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
965 (_bfd_target_vector): Add it.
966 * bfd-in2.h: Regenerate.
967 * libbfd.h: Regenerate.
968
969 2006-03-25 Richard Sandiford <richard@codesourcery.com>
970
971 * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
972 incompatible. Likewise MAC and EMAC code.
973 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
974 bfd_get_compatible to set the new bfd architecture. Rely on it
975 to detect incompatibilities.
976
977 2006-03-23 Michael Matz <matz@suse.de>
978
979 * reloc.c: Add BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64,
980 BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64,
981 BFD_RELOC_X86_64_PLTOFF64.
982 * bfd-in2.h: Regenerated.
983 * libbfd.h: Regenerated.
984 * elf64-x86-64.c (x86_64_elf_howto_table): Correct comment.
985 Add howtos for above relocs.
986 (x86_64_reloc_map): Add mappings for new relocs.
987 (elf64_x86_64_check_relocs): R_X86_64_GOT64, R_X86_64_GOTPCREL64,
988 R_X86_64_GOTPLT64 need a got entry. R_X86_64_GOTPLT64 also a PLT
989 entry. R_X86_64_GOTPC64 needs a .got section. R_X86_64_PLTOFF64
990 needs a PLT entry.
991 (elf64_x86_64_gc_sweep_hook): Reflect changes from
992 elf64_x86_64_check_relocs for the new relocs.
993 (elf64_x86_64_relocate_section): Handle new relocs.
994
995 2006-03-22 Bob Wilson <bob.wilson@acm.org>
996
997 * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
998 rel->r_addend is zero.
999
1000 2006-03-22 Richard Sandiford <richard@codesourcery.com>
1001
1002 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
1003 of "loc".
1004
1005 2006-03-22 Richard Sandiford <richard@codesourcery.com>
1006 Daniel Jacobowitz <dan@codesourcery.com>
1007 Phil Edwards <phil@codesourcery.com>
1008 Zack Weinberg <zack@codesourcery.com>
1009 Mark Mitchell <mark@codesourcery.com>
1010 Nathan Sidwell <nathan@codesourcery.com>
1011
1012 * bfd-in2.h: Regenerate.
1013 * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
1014 * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
1015 (bfd_elf32_littlemips_vxworks_vec): Likewise.
1016 (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
1017 (bfd_elf32_littlemips_vec): Likewise.
1018 (bfd_elf32_nbigmips_vec): Likewise.
1019 (bfd_elf32_nlittlemips_vec): Likewise.
1020 (bfd_elf32_ntradbigmips_vec): Likewise.
1021 (bfd_elf32_ntradlittlemips_vec): Likewise.
1022 (bfd_elf32_tradbigmips_vec): Likewise.
1023 (bfd_elf32_tradlittlemips_vec): Likewise.
1024 (bfd_elf64_bigmips_vec): Likewise.
1025 (bfd_elf64_littlemips_vec): Likewise.
1026 (bfd_elf64_tradbigmips_vec): Likewise.
1027 (bfd_elf64_tradlittlemips_vec): Likewise.
1028 * elf32-mips.c: Include elf-vxworks.h.
1029 (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
1030 instead of calling mips_elf32_rtype_to_howto directly.
1031 (mips_vxworks_copy_howto_rela): New reloc howto.
1032 (mips_vxworks_jump_slot_howto_rela): Likewise.
1033 (mips_vxworks_bfd_reloc_type_lookup): New function.
1034 (mips_vxworks_rtype_to_howto): Likewise.
1035 (mips_vxworks_final_write_processing): Likewise.
1036 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
1037 (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
1038 (elf_backend_want_got_plt): Likewise.
1039 (elf_backend_want_plt_sym): Likewise.
1040 (elf_backend_got_symbol_offset): Likewise.
1041 (elf_backend_want_dynbss): Likewise.
1042 (elf_backend_may_use_rel_p): Likewise.
1043 (elf_backend_may_use_rela_p): Likewise.
1044 (elf_backend_default_use_rela_p): Likewise.
1045 (elf_backend_got_header_size: Likewise.
1046 (elf_backend_plt_readonly): Likewise.
1047 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
1048 (elf_backend_mips_rtype_to_howto): Likewise.
1049 (elf_backend_adjust_dynamic_symbol): Likewise.
1050 (elf_backend_finish_dynamic_symbol): Likewise.
1051 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1052 (elf_backend_add_symbol_hook): Likewise.
1053 (elf_backend_link_output_symbol_hook): Likewise.
1054 (elf_backend_emit_relocs): Likewise.
1055 (elf_backend_final_write_processing: Likewise.
1056 (elf_backend_additional_program_headers): Likewise.
1057 (elf_backend_modify_segment_map): Likewise.
1058 (elf_backend_symbol_processing): Likewise.
1059 * elfxx-mips.c: Include elf-vxworks.h.
1060 (mips_elf_link_hash_entry): Add is_relocation_target and
1061 is_branch_target fields.
1062 (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
1063 srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
1064 (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
1065 (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
1066 Return 3 for VxWorks.
1067 (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
1068 mips_elf_link_hash_table. Return 0 for VxWorks.
1069 (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
1070 mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
1071 (mips_vxworks_exec_plt0_entry): New variable.
1072 (mips_vxworks_exec_plt_entry): Likewise.
1073 (mips_vxworks_shared_plt0_entry): Likewise.
1074 (mips_vxworks_shared_plt_entry): Likewise.
1075 (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
1076 (mips_elf_rel_dyn_section): Change the bfd argument to a
1077 mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
1078 the name of the section.
1079 (mips_elf_initialize_tls_slots): Update the call to
1080 mips_elf_rel_dyn_section.
1081 (mips_elf_gotplt_index): New function.
1082 (mips_elf_local_got_index): Add an input_section argument.
1083 Update the call to mips_elf_create_local_got_entry.
1084 (mips_elf_got_page): Likewise.
1085 (mips_elf_got16_entry): Likewise.
1086 (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
1087 arguments. Create dynamic relocations for each entry on VxWorks.
1088 (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
1089 (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
1090 and MIPS_RESERVED_GOTNO.
1091 (mips_elf_create_got_section): Update the uses of
1092 MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
1093 (is_gott_symbol): New function.
1094 (mips_elf_calculate_relocation): Use a dynobj local variable.
1095 Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
1096 mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
1097 VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
1098 relocations on VxWorks. Add dynamic relocations for references
1099 to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
1100 create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
1101 in VxWorks executables.
1102 (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
1103 Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
1104 Don't allocate a null entry on VxWorks.
1105 (mips_elf_create_dynamic_relocation): Update the call to
1106 mips_elf_rel_dyn_section. Use absolute rather than relative
1107 relocations for VxWorks, and make them RELA rather than REL.
1108 (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
1109 read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
1110 Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
1111 VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
1112 Call elf_vxworks_create_dynamic_sections for VxWorks and
1113 initialize the plt_header_size and plt_entry_size fields.
1114 (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
1115 used in VxWorks executables. Don't allocate dynamic relocations
1116 for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
1117 Set is_relocation_target for each symbol referenced by a relocation.
1118 Allocate .rela.dyn entries for relocations against the special
1119 VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
1120 entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
1121 a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
1122 R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
1123 to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
1124 Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
1125 relocations. Don't set no_fn_stub on VxWorks.
1126 (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
1127 mips_elf_allocate_dynamic_relocations.
1128 (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
1129 (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
1130 entries for VxWorks, and do not create multiple GOTs.
1131 (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
1132 Handle .got specially for VxWorks. Update the uses of
1133 MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
1134 Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
1135 once its final size is known. Set DF_TEXTREL for VxWorks. Add
1136 DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
1137 tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
1138 (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
1139 (mips_vxworks_finish_exec_plt): Likewise.
1140 (mips_vxworks_finish_shared_plt): Likewise.
1141 (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
1142 to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
1143 DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
1144 DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
1145 and mips_elf_rel_dyn_section. Use a different GOT header for
1146 VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
1147 (_bfd_mips_elf_link_hash_table_create): Initialize the new
1148 mips_elf_link_hash_table fields.
1149 (_bfd_mips_vxworks_link_hash_table_create): New function.
1150 (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
1151 on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
1152 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
1153 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1154 (_bfd_mips_vxworks_link_hash_table_create): Likewise.
1155 * libbfd.h: Regenerate.
1156 * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
1157 (elf32-mips.lo): Likewise.
1158 * Makefile.in: Regenerate.
1159 * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
1160 * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
1161 (bfd_elf32_littlemips_vxworks_vec): Likewise.
1162 (_bfd_target_vector): Add entries for them.
1163
1164 2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1165
1166 * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
1167 section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
1168 (elf_backend_special_sections): Remove #undef.
1169
1170 2006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1171
1172 * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
1173 for undefined weak symbols.
1174
1175 2006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
1176
1177 PR ld/2462
1178 * elflink.c (bfd_elf_final_link): Remove
1179 bed->elf_backend_emit_relocs from emit_relocs.
1180
1181 2006-03-17 Alexandre Oliva <aoliva@redhat.com>
1182
1183 * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
1184 first relocation to the second when relaxing TLS GD to LE;
1185 zero it out when relaxing to IE.
1186
1187 2006-03-17 Alan Modra <amodra@bigpond.net.au>
1188
1189 PR 2434
1190 * elflink.c (elf_link_add_object_symbols): Save and restore
1191 warning sym's linked sym.
1192
1193 2006-03-16 Alan Modra <amodra@bigpond.net.au>
1194
1195 PR 2434
1196 * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
1197 (elf_link_add_object_symbols): Delete unnecessary locals. Rename
1198 hash_table -> htab. Formatting. Save entire symbol table
1199 before loading as-needed syms, and restore afterwards if lib not
1200 needed. Use bfd_hash_allocate rather than bfd_alloc for sym
1201 name. Free some buffers earlier.
1202 * bfd-in.h (struct bfd_hash_table): Add entsize.
1203 (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
1204 * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
1205 * hash.c (bfd_hash_table_init_n): Add entsize param, save to
1206 hash table.
1207 (bfd_hash_table_init): Add param, adjust calls.
1208 * aoutx.h: Adjust all hash_table_init functions and calls.
1209 * bfd.c: Likewise.
1210 * coff-arm.c: Likewise.
1211 * coff-h8300.c: Likewise.
1212 * coff-ppc.c: Likewise.
1213 * cofflink.c: Likewise.
1214 * ecoff.c: Likewise.
1215 * ecofflink.c: Likewise.
1216 * elf-m10300.c: Likewise.
1217 * elf-strtab.c: Likewise.
1218 * elf.c: Likewise.
1219 * elf32-arm.c: Likewise.
1220 * elf32-bfin.c: Likewise.
1221 * elf32-cris.c: Likewise.
1222 * elf32-frv.c: Likewise.
1223 * elf32-hppa.c: Likewise.
1224 * elf32-i386.c: Likewise.
1225 * elf32-m32r.c: Likewise.
1226 * elf32-m68hc1x.c: Likewise.
1227 * elf32-m68k.c: Likewise.
1228 * elf32-ppc.c: Likewise.
1229 * elf32-s390.c: Likewise.
1230 * elf32-sh.c: Likewise.
1231 * elf32-vax.c: Likewise.
1232 * elf64-alpha.c: Likewise.
1233 * elf64-hppa.c: Likewise.
1234 * elf64-ppc.c: Likewise.
1235 * elf64-s390.c: Likewise.
1236 * elf64-sh64.c: Likewise.
1237 * elf64-x86-64.c: Likewise.
1238 * elfxx-ia64.c: Likewise.
1239 * elfxx-mips.c: Likewise.
1240 * elfxx-sparc.c: Likewise.
1241 * i386linux.c: Likewise.
1242 * libaout.h: Likewise.
1243 * libbfd-in.h: Likewise.
1244 * libcoff-in.h: Likewise.
1245 * linker.c: Likewise.
1246 * m68klinux.c: Likewise.
1247 * merge.c: Likewise.
1248 * opncls.c: Likewise.
1249 * pdp11.c: Likewise.
1250 * sparclinux.c: Likewise.
1251 * stabs.c: Likewise.
1252 * sunos.c: Likewise.
1253 * vms.c: Likewise.
1254 * xcofflink.c: Likewise.
1255 * section.c (struct section_hash_entry): Move to..
1256 * libbfd-in.h: ..here.
1257 * Makefile.am: Run "make dep-am"
1258 * Makefile.in: Regenerate.
1259 * bfd-in2.h: Regenerate.
1260 * libbfd.h: Regenerate.
1261 * libcoff.h: Regenerate.
1262
1263 2006-03-16 Alan Modra <amodra@bigpond.net.au>
1264
1265 * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
1266 against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
1267 last change to REL32 relocs so that they are counted as
1268 possibly dynamic as per REL24 and REL14.
1269
1270 2006-03-16 Alan Modra <amodra@bigpond.net.au>
1271
1272 * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
1273 checks from REL32.
1274
1275 2006-03-15 Ben Elliston <bje@au.ibm.com>
1276
1277 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
1278 in_list elements, not just the first.
1279
1280 2006-03-14 Richard Sandiford <richard@codesourcery.com>
1281
1282 * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
1283 out from...
1284 (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
1285 for final links too.
1286
1287 2006-03-13 Richard Sandiford <richard@codesourcery.com>
1288
1289 * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
1290
1291 2006-03-11 H.J. Lu <hongjiu.lu@intel.com>
1292
1293 PR ld/2443
1294 * dwarf2.c (concat_filename): Don't issue an error if file is 0.
1295
1296 2006-03-10 Paul Brook <paul@codesourcery.com>
1297
1298 * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
1299 (elf32_arm_print_private_bfd_data): Ditto.
1300
1301 2006-03-09 Paul Brook <paul@codesourcery.com>
1302
1303 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
1304 mapping symbols.
1305
1306 2006-03-09 Khem Raj <khem@mvista.com>
1307
1308 * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
1309 char type.
1310
1311 2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
1312
1313 * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
1314
1315 2006-03-07 Richard Sandiford <richard@codesourcery.com>
1316 Daniel Jacobowitz <dan@codesourcery.com>
1317 Zack Weinberg <zack@codesourcery.com>
1318 Nathan Sidwell <nathan@codesourcery.com>
1319 Paul Brook <paul@codesourcery.com>
1320 Ricardo Anguiano <anguiano@codesourcery.com>
1321 Phil Edwards <phil@codesourcery.com>
1322
1323 * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
1324 (bfd_elf32_bigarm_symbian_vec): Likewise.
1325 (bfd_elf32_bigarm_vxworks_vec): Likewise.
1326 (bfd_elf32_littlearm_vec): Likewise.
1327 (bfd_elf32_littlearm_symbian_vec): Likewise.
1328 (bfd_elf32_littlearm_vxworks_vec): Likewise.
1329 * configure: Regenerate.
1330 * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
1331 (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
1332 (elf32_arm_vxworks_bed): Add forward declaration.
1333 (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
1334 (elf32_arm_vxworks_exec_plt0_entry): New table.
1335 (elf32_arm_vxworks_exec_plt_entry): Likewise.
1336 (elf32_arm_vxworks_shared_plt_entry): Likewise.
1337 (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
1338 (reloc_section_p): New function.
1339 (create_got_section): Use RELOC_SECTION.
1340 (elf32_arm_create_dynamic_sections): Likewise. Call
1341 elf_vxworks_create_dynamic_sections for VxWorks targets.
1342 Choose between the two possible values of plt_header_size
1343 and plt_entry_size.
1344 (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
1345 (elf32_arm_abs12_reloc): New function.
1346 (elf32_arm_final_link_relocate): Call it. Allow the creation of
1347 dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
1348 RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
1349 r_addend fields of relocs. On rela targets, skip any code that
1350 adjusts in-place addends. When using _bfd_link_final_relocate
1351 to perform a final relocation, pass rel->r_addend as the addend
1352 argument.
1353 (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
1354 object, ignore flags that are not standard on VxWorks.
1355 (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
1356 relocs on VxWorks. Use reloc_section_p.
1357 (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
1358 (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
1359 .rela.plt.unloaded relocs on VxWorks targets.
1360 (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
1361 .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
1362 instead of DT_REL* tags on RELA targets.
1363 (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
1364 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
1365 PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
1366 (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
1367 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
1368 like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
1369 Correct the .rela.plt.unreloaded symbol indexes.
1370 (elf32_arm_output_symbol_hook): Call the VxWorks version of this
1371 hook on VxWorks targets.
1372 (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
1373 Minor formatting tweak.
1374 (elf32_arm_vxworks_final_write_processing): New function.
1375 (elf_backend_add_symbol_hook): Override for VxWorks and reset
1376 for Symbian.
1377 (elf_backend_final_write_processing): Likewise.
1378 (elf_backend_emit_relocs): Likewise.
1379 (elf_backend_want_plt_sym): Likewise.
1380 (ELF_MAXPAGESIZE): Likewise.
1381 (elf_backend_may_use_rel_p): Minor formatting tweak.
1382 (elf_backend_may_use_rela_p): Likewise.
1383 (elf_backend_default_use_rela_p): Likewise.
1384 (elf_backend_rela_normal): Likewise.
1385 * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
1386
1387 2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
1388
1389 * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
1390 New. Adjust other variants.
1391 (bfd_default_scan): Update.
1392 * bfd-in2.h: Rebuilt.
1393 * cpu-m68k.c: Adjust.
1394 (bfd_m68k_compatible): New. Use it for architectures.
1395 * elf32-m68k.c (elf32_m68k_object_p): Adjust.
1396 (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
1397 mismatch.
1398 (elf32_m68k_print_private_bfd_data): Adjust.
1399 * ieee.c (ieee_write_processor): Adjust.
1400
1401 2006-03-06 Alan Modra <amodra@bigpond.net.au>
1402
1403 * dwarf2.c: Formatting.
1404 (add_line_info): Remove outer loop.
1405
1406 2006-03-05 H.J. Lu <hongjiu.lu@intel.com>
1407 Alan Modra <amodra@bigpond.net.au>
1408
1409 PR binutils/2338
1410 * dwarf2.c (loadable_section): New struct.
1411 (dwarf2_debug): Add loadable_section_count and
1412 loadable_sections.
1413 (new_line_sorts_after): New.
1414 (add_line_info): Use new_line_sorts_after to compare line
1415 addresses.
1416 (check_function_name): Removed.
1417 (unset_sections): New.
1418 (place_sections): New.
1419 (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
1420 and unset_sections on relocatable files.
1421 (_bfd_dwarf2_find_line): Likewise.
1422
1423 2006-03-03 Nick Clifton <nickc@redhat.com>
1424
1425 * cpu-avr.c: Update to ISO-C90 formatting.
1426 * elf32-avr.c: Likewise.
1427
1428 2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
1429
1430 * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
1431 and R_AVR_MS8_LDI
1432 (bfd_elf_avr_final_write_processing): Set
1433 EF_AVR_LINKRELAX_PREPARED in e_flags field.
1434 (elf32_avr_relax_section): New function.
1435 (elf32_avr_relax_delete_bytes): New function.
1436 (elf32_avr_get_relocated_section_contents): New function.
1437 (avr_pc_wrap_around): New function.
1438 (avr_relative_distance_considering_wrap_around): New function.
1439 (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
1440 * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
1441 * libbfd.h: Regenerate.
1442 * bfd-in2.h: Regenerate.
1443
1444 2006-03-02 DJ Delorie <dj@redhat.com>
1445
1446 * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
1447 calculations.
1448
1449 2006-03-02 Richard Sandiford <richard@codesourcery.com>
1450
1451 * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
1452 bfd_elf32_powerpc_vxworks_vec.
1453
1454 2006-03-02 Nick Clifton <nickc@redhat.com>
1455
1456 * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
1457
1458 2006-03-02 Richard Sandiford <richard@codesourcery.com>
1459
1460 * elf32-i386.c (elf_i386_create_dynamic_sections): Use
1461 elf_vxworks_create_dynamic_sections.
1462 (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
1463 symbol handling.
1464 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
1465 elf_vxworks_create_dynamic_sections.
1466 (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
1467 symbol handling.
1468 * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
1469 * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
1470
1471 2006-03-02 Richard Sandiford <richard@codesourcery.com>
1472
1473 * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
1474 (elf_backend_link_output_symbol_hook): Use
1475 elf_vxworks_link_output_symbol_hook instead.
1476 * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
1477 (elf_backend_link_output_symbol_hook): Use
1478 elf_vxworks_link_output_symbol_hook instead.
1479 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
1480 same interface as elf_backend_link_output_symbol_hook.
1481 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
1482 prototype accordingly.
1483
1484 2006-03-02 Richard Sandiford <richard@codesourcery.com>
1485
1486 * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
1487 (ppc_elf_link_hash_table): Replace old_got and new_got with
1488 plt_type and can_use_new_plt.
1489 (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
1490 SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
1491 (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
1492 Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
1493 (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
1494 either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
1495 this function should not be called for VxWorks targets.
1496 (ppc_elf_tls_setup): Use plt_type instead of old_got.
1497 (allocate_got): Likewise. Rearrange so that max_before_header
1498 is only used for PLT_OLD and PLT_NEW.
1499 (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
1500 (ppc_elf_size_dynamic_sections): Likewise.
1501 (ppc_elf_relax_section): Likewise.
1502 (ppc_elf_relocate_section): Likewise.
1503 (ppc_elf_finish_dynamic_symbol): Likewise.
1504 (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
1505
1506 2006-02-28 Richard Sandiford <richard@codesourcery.com>
1507
1508 * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
1509 (elf_i386_link_hash_table_create): Initialize it.
1510 (elf_i386_compute_jump_table_size): Use it instead of
1511 srelplt->reloc_count.
1512 (allocate_dynrelocs): Likewise.
1513 (elf_i386_size_dynamic_sections): Likewise.
1514 (elf_i386_relocate_section): Likewise.
1515
1516 2006-02-27 Jakub Jelinek <jakub@redhat.com>
1517
1518 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
1519 (_bfd_elf_write_section_eh_frame): Likewise.
1520
1521 2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
1522
1523 * po/Make-in: Add html target.
1524
1525 2006-02-27 Richard Sandiford <richard@codesourcery.com>
1526
1527 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
1528 cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
1529 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
1530 * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
1531 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1532 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
1533 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
1534 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
1535 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
1536 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
1537 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
1538 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
1539 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
1540 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
1541 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1542 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
1543 the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
1544 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
1545 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
1546 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
1547 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1548
1549 2006-02-25 Richard Sandiford <richard@codesourcery.com>
1550
1551 * elf-bfd.h (elf_link_hash_table): Add hplt field.
1552 * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
1553 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1554 * elf32-frv.c (_frv_create_got_section): Likewise.
1555 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
1556 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1557 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
1558 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
1559 * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
1560 (elf_i386_link_hash_table_create): Don't initialize them.
1561 (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
1562 hgot fields.
1563 (elf_i386_finish_dynamic_symbol): Likewise.
1564 * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
1565 (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
1566 (ppc_elf_finish_dynamic_symbol): Likewise.
1567
1568 2006-02-24 DJ Delorie <dj@redhat.com>
1569
1570 * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
1571 (m32c_elf_relocate_section): Don't relocate them.
1572 (compare_reloc): New.
1573 (relax_reloc): Remove.
1574 (m32c_offset_for_reloc): New.
1575 (m16c_addr_encodings): New.
1576 (m16c_jmpaddr_encodings): New.
1577 (m32c_addr_encodings): New.
1578 (m32c_elf_relax_section): Relax jumps and address displacements.
1579 (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
1580 short jumps.
1581
1582 * reloc.c: Add m32c relax relocs.
1583 * libbfd.h: Regenerate.
1584 * bfd-in2.h: Regenerate.
1585
1586 2006-02-24 H.J. Lu <hongjiu.lu@intel.com>
1587
1588 PR ld/2218
1589 * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
1590 (_bfd_elf_link_hash_fixup_symbol): New.
1591
1592 * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
1593 (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
1594 it isn't NULL.
1595
1596 * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
1597
1598 * elfxx-target.h (elf_backend_fixup_symbol): New.
1599 (elfNN_bed): Initialize elf_backend_fixup_symbol.
1600
1601 2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
1602
1603 * cpu-ia64-opc.c (ins_immu5b): New.
1604 (ext_immu5b): Likewise.
1605 (elf64_ia64_operands): Add IMMU5b.
1606
1607 2006-02-21 Alan Modra <amodra@bigpond.net.au>
1608
1609 PR ld/2218
1610 * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
1611 is dynamic.
1612 * elf32-hppa.c (allocate_dynrelocs): Likewise.
1613 * elf32-i386.c (allocate_dynrelocs): Likewise.
1614 * elf32-s390.c (allocate_dynrelocs): Likewise.
1615 * elf32-sh.c (allocate_dynrelocs): Likewise.
1616 * elf64-s390.c (allocate_dynrelocs): Likewise.
1617 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1618 * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
1619 on undef weak with non-default visibility too.
1620 * elfxx-sparc.c (allocate_dynrelocs): Ditto.
1621
1622 2006-02-21 Alan Modra <amodra@bigpond.net.au>
1623
1624 * bfd.c: (_bfd_default_error_handler): Don't call abort on
1625 error, instead call _exit.
1626 (_bfd_abort): Call _exit not xexit.
1627
1628 2006-02-17 Kevin Buettner <kevinb@redhat.com>
1629
1630 * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
1631 New functions.
1632 * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1633
1634 2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
1635 Anil Paranjape <anilp1@kpitcummins.com>
1636 Shilin Shakti <shilins@kpitcummins.com>
1637
1638 * Makefile.am: Add xc16x related entry
1639 * Makefile.in: Regenerate
1640 * archures.c: Add bfd_xc16x_arch
1641 * bfd-in2.h: Regenerate
1642 * config.bfd: Add xc16x-*-elf
1643 * configure.in: Add bfd_elf32_xc16x_vec
1644 * configure: Regenerate.
1645 * targets.c: Added xc16x related information
1646 * cpu-xc16x.c: New file
1647 * reloc.c: Add new relocations specific to xc16x:
1648 BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
1649 BFD_RELOC_XC16X_SOF
1650 * elf32-xc16x.c: New file.
1651
1652 2006-02-17 Alan Modra <amodra@bigpond.net.au>
1653
1654 * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
1655 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1656
1657 2006-02-17 Alan Modra <amodra@bigpond.net.au>
1658
1659 PR ld/2218
1660 * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
1661 dynamic.
1662 (ppc64_elf_relocate_section): Check output reloc section size.
1663 * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
1664
1665 2006-02-16 H.J. Lu <hongjiu.lu@intel.com>
1666
1667 PR ld/2322
1668 * elf.c (get_segment_type): New function.
1669 (_bfd_elf_print_private_bfd_data): Use it.
1670 (print_segment_map): New function.
1671 (assign_file_positions_for_segments): Call print_segment_map
1672 when there are not enough room for program headers.
1673
1674 2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
1675
1676 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
1677 traditional MIPS ELF targets.
1678
1679 2006-02-15 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 PR binutils/2338
1682 * dwarf2.c (check_function_name): New function.
1683 (_bfd_dwarf2_find_nearest_line): Use check_function_name to
1684 check if function is correct.
1685
1686 2006-02-16 Alan Modra <amodra@bigpond.net.au>
1687
1688 * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
1689 debug sections.
1690 (elf_link_input_bfd): Adjust comments.
1691
1692 2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
1693
1694 * elf.c (copy_private_bfd_data): Minor update.
1695
1696 2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
1697
1698 PR binutils/2258
1699 * elf.c (copy_private_bfd_data): Renamed to ...
1700 (rewrite_elf_program_header): This.
1701 (copy_elf_program_header): New function.
1702 (copy_private_bfd_data): Likewise.
1703
1704 2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
1705
1706 * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
1707 bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
1708 bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
1709 bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
1710 (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
1711 bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
1712 bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
1713 bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
1714 bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
1715 bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
1716 bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
1717 bfd_mach_mcf_isa_b_usp_float_emac): New.
1718 (bfd_default_scan): Update coldfire mapping.
1719 * bfd-in.h (bfd_m68k_mach_to_features,
1720 bfd_m68k_features_to_mach): Declare.
1721 * bfd-in2.h: Rebuilt.
1722 * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
1723 adjust legacy names.
1724 (m68k_arch_features): New.
1725 (bfd_m68k_mach_to_features,
1726 bfd_m68k_features_to_mach): Define.
1727 * elf32-m68k.c (elf32_m68k_object_p): New.
1728 (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
1729 (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
1730 (elf_backend_object_p): Define.
1731 * ieee.c (ieee_write_processor): Update coldfire machines.
1732 * libbfd.h: Rebuilt.
1733
1734 2006-02-06 Steve Ellcey <sje@cup.hp.com>
1735
1736 * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
1737 if SHF_TLS is set.
1738
1739 2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
1740
1741 * coff-z80.c (r_imm24): New howto.
1742 (rtype2howto): New case R_IMM24.
1743 (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
1744 (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
1745
1746 2006-02-04 Richard Sandiford <richard@codesourcery.com>
1747
1748 * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
1749 has already been assigned a GOT index, copy that index to the
1750 current hash table entry.
1751
1752 2006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
1753
1754 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
1755 for call-to-undefweak reloc overflow.
1756
1757 2006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1758
1759 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
1760 for 32-bit relocs overflow.
1761
1762 2006-01-27 Paul Brook <paul@codesourcery.com>
1763
1764 * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
1765 objects.
1766
1767 2006-01-18 Alexandre Oliva <aoliva@redhat.com>
1768
1769 Introduce TLS descriptors for i386 and x86_64.
1770 * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
1771 BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
1772 BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
1773 * libbfd.h, bfd-in2.h: Rebuilt.
1774 * elf32-i386.c (elf_howto_table): New relocations.
1775 (R_386_tls): Adjust.
1776 (elf_i386_reloc_type_lookup): Map new relocations.
1777 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1778 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1779 (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
1780 (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
1781 (elf_i386_local_tlsdesc_gotent): New macro.
1782 (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
1783 (elf_i386_compute_jump_table_size): New macro.
1784 (link_hash_newfunc): Initialize tlsdesc_got.
1785 (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
1786 (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
1787 R_386_TLS_DESC_CALL.
1788 (elf_i386_check_relocs): Likewise. Allocate space for
1789 local_tlsdesc_gotent.
1790 (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
1791 R_386_TLS_DESC_CALL.
1792 (allocate_dynrelocs): Count function PLT relocations. Reserve
1793 space for TLS descriptors and relocations.
1794 (elf_i386_size_dynamic_sections): Reserve space for TLS
1795 descriptors and relocations. Set up sgotplt_jump_table_size.
1796 Don't zero reloc_count in srelplt.
1797 (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
1798 (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
1799 R_386_TLS_DESC_CALL.
1800 (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1801 (elf_backend_always_size_sections): Define.
1802 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
1803 R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
1804 (R_X86_64_standard): Adjust.
1805 (x86_64_reloc_map): Map new relocs.
1806 (elf64_x86_64_rtype_to_howto): New, split out of...
1807 (elf64_x86_64_info_to_howto): ... this function, and...
1808 (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
1809 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
1810 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
1811 (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
1812 (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
1813 (elf64_x86_64_local_tlsdesc_gotent): New macro.
1814 (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
1815 tlsdesc_got and sgotplt_jump_table_size fields.
1816 (elf64_x86_64_compute_jump_table_size): New macro.
1817 (link_hash_newfunc): Initialize tlsdesc_got.
1818 (elf64_x86_64_link_hash_table_create): Initialize new fields.
1819 (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
1820 R_X86_64_TLSDESC_CALL.
1821 (elf64_x86_64_check_relocs): Likewise. Allocate space for
1822 local_tlsdesc_gotent.
1823 (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
1824 R_X86_64_TLSDESC_CALL.
1825 (allocate_dynrelocs): Count function PLT relocations. Reserve
1826 space for TLS descriptors and relocations.
1827 (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
1828 descriptors and relocations. Set up sgotplt_jump_table_size,
1829 tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
1830 reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
1831 and DT_TLSDESC_GOT.
1832 (elf64_x86_64_always_size_sections): New. Set up
1833 _TLS_MODULE_BASE_.
1834 (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
1835 R_386_TLS_DESC_CALL.
1836 (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
1837 (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
1838 DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
1839 (elf_backend_always_size_sections): Define.
1840
1841 2006-01-17 H.J. Lu <hongjiu.lu@intel.com>
1842
1843 PR binutils/2096
1844 * dwarf2.c (comp_unit_contains_address): Update comment.
1845 (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
1846 lma. Return TRUE only if both comp_unit_contains_address and
1847 comp_unit_find_nearest_line return TRUE.
1848 (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
1849
1850 2006-01-18 Alan Modra <amodra@bigpond.net.au>
1851
1852 * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
1853 (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
1854 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
1855 elf_gc_mark_dynamic_ref_symbol. Make global.
1856 (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
1857 * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
1858 (elfNN_bed): Init new field.
1859 * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
1860 (ppc64_elf_gc_mark_dynamic_ref): New function.
1861
1862 2006-01-17 Alan Modra <amodra@bigpond.net.au>
1863
1864 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
1865
1866 2006-01-17 Nick Clifton <nickc@redhat.com>
1867
1868 PR binutils/2159
1869 * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
1870 parameters.
1871
1872 2006-01-11 Nick Clifton <nickc@redhat.com>
1873
1874 * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
1875 into the newly (re)allocated map array.
1876
1877 2006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
1878
1879 * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
1880
1881 2006-01-01 Jakub Jelinek <jakub@redhat.com>
1882
1883 * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
1884 for .toc1 section.
1885
1886 For older changes see ChangeLog-2005
1887 \f
1888 Local Variables:
1889 mode: change-log
1890 left-margin: 8
1891 fill-column: 74
1892 version-control: never
1893 End: