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