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