2006-09-24 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
65fe5dd6
L
12006-09-24 H.J. Lu <hongjiu.lu@intel.com>
2
3 * configure: Regenerated.
4
8384fb8f
AM
52006-09-22 Alan Modra <amodra@bigpond.net.au>
6
7 * elfcode.h (elf_swap_symbol_in): Return bfd_boolean. Don't abort
8 on error.
9 * elf-bfd.h (elf_size_info <swap_symbol_in>): Adjust decl.
10 (bfd_elf32_swap_symbol_in, bfd_elf64_swap_symbol_in): Likewise.
11 * elf.c (bfd_elf_get_elf_syms): Test return of swap_symbol_in,
12 and report error.
13 * elf32-arm.c (elf32_arm_swap_symbol_in): Return bfd_boolean.
14
36c10a8f
MS
152006-09-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
16
17 * elf32-s390.c (elf_s390_relocate_section): Remove check for code
18 section in LD to LE linker relaxation for R_390_TLS_LDO32.
19 * elf64-s390.c (elf_s390_relocate_section): Likewise for
20 R_390_TLS_LDO64.
21
99ad8390
NC
222006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
23
24 * configure.in: Added new target-vectors x86_64coff_vec,
25 x86_64pe_vec, and x86_64pei_vec.
26 * configure: Regenerate.
27 * config.bfd: Adjusted x86_64 target architecture detection.
28 * bfd.c: Add for new target "coff-x86-64"
29 (bfd_get_sign_extend): Add target vector idents for pe-x86-64. and pei-x86-64.
30 * coff-x86_64.c: Add new file for x86_64 (AMD64) coff support.
31 * libpei.h: Adjustments for COFF_WITH_pex64.
32 * coffcode.h: Add for new target machine, architecture, signature, and internal
33 signature handler.
34 * Makefile.am: Add new files to target-all and define make-rule for pex64igen.c
35 * Makefile.in: Regenerate.
36 * pe-x86_64.c: Add for new target "pe-x86-64".
37 * pei-x86_64.c: Add for new target "pei-x86-64".
38 * peicode.h: Adjusts for new targets.
39 (coff_swap_filehdr_out): Set for this target to
40 _bfd_pex64_only_swap_filehdr_out.
41 (SIZEOF_IDATA4): Define it as 8 byte size for this target.
42 (SIZEOF_IDATA5): Define it as 8 byte size for this target.
43 (jump_table jtab): Add for AMD64MAGIC.
44 (pe_ILF_build_a_bfd): Adjusts for new size of SIZEOF_IDATA4 and SIZE_IDATA5.
45 (pe_ILF_object_p): Add coff image-file signature to internal
46 signature translation.
47 * peXXigen.c: Adjust proper include of target coff-header and
48 introduced target specific code
49 (COFF_WITH_pex64): New macro for this target.
50 (pe_print_idata): New dumping method for import section of PE+ files.
51 * targets.c: Add new target vectors declarations for x86_64 coff targets.
52 * coffcode.h: Support code to support the x86_64 PE magic number.
53 * coff-x86_64.c: New file.
54
60ff4dc4
HPN
552006-09-17 Hans-Peter Nilsson <hp@axis.com>
56
57 * elf.c (special_sections_s): Revert last STRING_COMMA_LEN change
58 for .stabstr entry, explain why.
59
7421a730
AM
602006-09-17 Anton Blanchard <anton@samba.org>
61 Alan Modra <amodra@bigpond.net.au>
62
63 * dwarf2.c (concat_filename): Apply DW_AT_comp_dir if dir table
64 entry isn't absolute.
65
1c0d3aa6
NC
662006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
67
68 * cpu-score.c: New file.
69 * elf32-score.c: New file.
70 * config.bfd: Add Score target.
71 * Makefile.am: Add Score files.
72 * Makefile.in: Regenerate.
73 * archures.c: Add Score architecture.
74 * reloc.c: Add Score relocs.
75 * targets.c: Add Score target vectors.
76 * bfd-in2.h: Regenerate.
77 * libbfd.h: Regenerate.
78 * configure.in: Add Score target.
79 * configure: Regenerate.
80
0112cd26
NC
812006-09-16 Nick Clifton <nickc@redhat.com>
82 Pedro Alves <pedro_alves@portugalmail.pt>
83
84 * bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant
85 string as its argument and emits the string followed by a comma
86 and then the length of the string.
87 (CONST_STRNEQ): New macro. Checks to see if a variable string
88 has a constant string as its initial characters.
89 (CONST_STRNCPY): New macro. Copies a constant string to the start
90 of a variable string.
91 * bfd-in2.h: Regenerate.
92 * archive.c: Make use of the new macros.
93 * archive64.c: Likewise.
94 * bfd.c: Likewise.
95 * coff-ppc.c: Likewise.
96 * coff-stgo32.c: Likewise.
97 * coffcode.h: Likewise.
98 * cofflink.c: Likewise.
99 * cpu-i960.c: Likewise.
100 * dwarf2.c: Likewise.
101 * ecoff.c: Likewise.
102 * elf-m10300.c: Likewise.
103 * elf.c: Likewise.
104 * elf32-arm.c: Likewise.
105 * elf32-bfin.c: Likewise.
106 * elf32-cris.c: Likewise.
107 * elf32-hppa.c: Likewise.
108 * elf32-i370.c: Likewise.
109 * elf32-i386.c: Likewise.
110 * elf32-iq2000.c: Likewise.
111 * elf32-m32r.c: Likewise.
112 * elf32-m68hc11.c: Likewise.
113 * elf32-m68hc12.c: Likewise.
114 * elf32-m68k.c: Likewise.
115 * elf32-mcore.c: Likewise.
116 * elf32-ppc.c: Likewise.
117 * elf32-s390.c: Likewise.
118 * elf32-sh-symbian.c: Likewise.
119 * elf32-sh.c: Likewise.
120 * elf32-sh64.c: Likewise.
121 * elf32-v850.c: Likewise.
122 * elf32-vax.c: Likewise.
123 * elf32-xtensa.c: Likewise.
124 * elf64-alpha.c: Likewise.
125 * elf64-hppa.c: Likewise.
126 * elf64-mmix.c: Likewise.
127 * elf64-ppc.c: Likewise.
128 * elf64-s390.c: Likewise.
129 * elf64-sh64.c: Likewise.
130 * elf64-x86-64.c: Likewise.
131 * elflink.c: Likewise.
132 * elfxx-ia64.c: Likewise.
133 * elfxx-mips.c: Likewise.
134 * elfxx-sparc.c: Likewise.
135 * hpux-core.c: Likewise.
136 * i386linux.c: Likewise.
137 * ieee.c: Likewise.
138 * libpei.h: Likewise.
139 * linker.c: Likewise.
140 * m68klinux.c: Likewise.
141 * mmo.c: Likewise.
142 * nlmcode.h: Likewise.
143 * osf-core.c: Likewise.
144 * pef.c: Likewise.
145 * som.c: Likewise.
146 * sparclinux.c: Likewise.
147 * vms-hdr.c: Likewise.
148
30288845
AM
1492006-09-14 Alan Modra <amodra@bigpond.net.au>
150
151 PR 3182
152 * elf.c (_bfd_elf_copy_private_header_data): Fix group members
153 that have had their SHT_GROUP section removed.
154
41198d0c
L
1552006-09-12 H.J. Lu <hongjiu.lu@intel.com>
156
157 PR ld/3197
158 * elflink.c (elf_link_output_extsym): Compute bucket only if
159 needed.
160
168dd667
L
1612006-09-10 H.J. Lu <hongjiu.lu@intel.com>
162
163 PR binutils/3186
164 * elf.c (_bfd_elf_make_section_from_shdr): Correct length of
165 "gnu.linkonce.wi.".
166
b0fead2b
RE
1672006-09-08 Vladimir Prus <vladimir@codesourcery.com>
168
169 * elf32-arm.c (elf32_arm_swap_symbol_out): Remove
170 unconditional setting of low bit for Thumb symbol
171 mistakenly left behind after check for external
172 symbols was added. Fix comment typo.
173
55255dae
L
1742006-09-07 H.J. Lu <hongjiu.lu@intel.com>
175
176 * elf-bfd.h (elf_link_hash_entry): Add a dynamic field.
177 (bfd_elf_link_mark_dynamic_symbol): New.
178 (SYMBOLIC_BIND): New.
179
180 * elf32-i386.c (elf_i386_check_relocs): Replace info->symbolic
181 with SYMBOLIC_BIND (info, h).
182 (elf_i386_relocate_section): Likewise.
183 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
184 (elf64_x86_64_relocate_section): Likewise.
185 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
186
187 * elflink.c (bfd_elf_link_mark_dynamic_symbol): New.
188 (bfd_elf_record_link_assignment): Call
189 bfd_elf_link_mark_dynamic_symbol on new entry.
190 (_bfd_elf_merge_symbol): Likewise.
191 (_bfd_elf_export_symbol): Return if the symbol isn't exported.
192 (_bfd_elf_fix_symbol_flags): Replace info->symbolic with
193 SYMBOLIC_BIND (info, h).
194 (_bfd_elf_dynamic_symbol_p): Likewise.
195 (_bfd_elf_symbol_refs_local_p): Likewise.
196 (bfd_elf_size_dynamic_sections): Updated.
197
7a2ec0a6
L
1982006-09-05 Bibo Mao <bibo.mao@intel.com>
199
200 PR binutils/3171
201 * coffcode.h (coff_write_object_contents): Set the optional
202 header magic number to PE32PMAGIC instead of ZMAGIC for ia64.
203
2cab6cc3
MS
2042006-09-04 Mark Shinwell <shinwell@codesourcery.com>
205
206 * elf32-arm.c (elf32_arm_howto_table_1): Adjust entries for
207 R_ARM_THM_ALU_PREL_11_0 and R_ARM_THM_PC12 relocations.
208 (elf32_arm_final_link_relocate): Handle R_ARM_THM_ALU_PREL_11_0
209 and R_ARM_THM_PC12 relocations.
210
74869ac7
BW
2112006-08-24 Bob Wilson <bob.wilson@acm.org>
212
213 * elf32-xtensa.c (xtensa_get_property_section_name): Delete.
214 (xtensa_get_property_section): New.
215 (xtensa_read_table_entries): Use xtensa_get_property_section.
216 (relax_property_section, xtensa_get_property_predef_flags): Handle
217 group name suffixes in property section names.
218 (match_section_group): New.
219
174660ce
NC
2202006-08-23 Frediano Ziglio <Frediano.Ziglio@vodafone.com>
221
222 * archive.c (hpux_uid_gid_encode): Fix thinko decrementing "cnt"
223 variable.
224
b34b2d70
DJ
2252006-08-22 Daniel Jacobowitz <dan@codesourcery.com>
226
227 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Only copy
228 plt_thumb_refcount from indirect symbols.
229
5c5f6e17
AM
2302006-08-22 Alan Modra <amodra@bigpond.net.au>
231
232 * elf32-ppc.c (ppc_elf_relocate_section): Correct GOT and PLT HA
233 reloc handling.
234 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
235
87bc043a
MS
2362006-08-21 Mark Shinwell <shinwell@codesourcery.com>
237
238 * elf32-arm.c (elf32_arm_link_hash_table): Correct typo in
239 comment for target1_is_rel.
240
7148cc28
NC
2412006-08-21 Pedro Alves <pedro_alves@portugalmail.pt>
242
243 * Makefile.am: Add rules to build pe-arm-wince.lo
244 and pei-arm-wince.lo objects.
245 * Makefile.in: Regenerate.
246 * pe-arm-wince.c: New file.
247 * pei-arm-wince.c: New file.
248 * pei-arm.c: Remove ARM_WINCE block.
249 * pe-arm.c: Remove ARM_WINCE block. Rename
250 bfd_arm_pe_allocate_interworking_sections,
251 bfd_arm_pe_get_bfd_for_interworking, and
252 bfd_arm_pe_process_before_allocation to
253 bfd_armpe_allocate_interworking_sections,
254 bfd_armpe_get_bfd_for_interworking, and
255 bfd_armpe_process_before_allocation. Move them before
256 including bfd.h.
257 * bfd.c: ARM wince bfd format names were renamed. Adjust.
258 * coff-arm.c [ARM_WINCE]: Adjust so Windows CE doesn't end up
259 with unexpected/conflicting relocs.
260 * targets.c: The arm-wince-pe target got its own new vector.
261 Adjust.
262 * config.bfd: Likewise.
263 * configure.in: Likewise.
264 * configure: Regenerate.
265
a4fd1a8e
PB
2662006-08-18 Paul Brook <paul@codesourcery.com>
267
268 * elf32-arm.c (elf32_arm_link_hash_entry): Add export_glue.
269 (elf32_arm_link_hash_newfunc): Initialize export_glue.
270 (record_arm_to_thumb_glue): Return stub symbol.
271 (elf32_arm_create_thumb_stub): New function.
272 (elf32_arm_to_thumb_stub): Use it.
273 (elf32_arm_to_thumb_export_stub): New function.
274 (elf32_arm_begin_write_processing): New function.
275 (allocate_dynrelocs): Allocate Arm stubs.
276 (elf_backend_begin_write_processing): Define.
277 (elf32_arm_symbian_begin_write_processing): Remove ATTRIBUTE_UNUSED.
278 Call elf32_arm_begin_write_processing.
279
ee4bf8d2
AM
2802006-08-17 Alan Modra <amodra@bigpond.net.au>
281
282 * elf64-ppc.c (create_linkage_sections): Align .glink to 8 bytes.
283 (ppc64_elf_build_stubs): Use new lazy linking stub.
284
12c0f757
AM
2852006-08-17 Alan Modra <amodra@bigpond.net.au>
286
287 * elf64-ppc.c (ppc64_elf_size_stubs): Ignore non-code sections.
288
c9df6640
L
2892006-08-16 H.J. Lu <hongjiu.lu@intel.com>
290
291 PR ld/3015
292 * elf.c (get_program_header_size): Add a PT_GNU_RELRO segment
293 only if there is a PT_DYNAMIC segment.
294 (_bfd_elf_map_sections_to_segments): Likewise.
295 (assign_file_positions_for_load_sections): Set PT_GNU_RELRO
296 segment alignment to 1.
297
8992f0d7
TS
2982006-08-15 Thiemo Seufer <ths@mips.com>
299 Nigel Stephens <nigel@mips.com>
300
301 * elf32-mips.c, elf64-mips.c, elfn32-mips.c
302 (elf_backend_merge_symbol_attribute): Define.
303 * elflink.c (elf_link_add_object_symbols): Merge only the ELF
304 visibility flags.
305 * elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
306
4be041b2
TS
3072006-08-15 Thiemo Seufer <ths@mips.com>
308 Nigel Stephens <nigel@mips.com>
309 David Ung <davidu@mips.com>
310
311 * config.bfd: Add configurations for mips*el-sde-elf* and
312 mips*-sde-elf*.
313
eb13e63f
DD
3142006-08-14 DJ Delorie <dj@redhat.com>
315
316 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add value.
317 (elf32_mn10300_count_hash_table_entries): New.
318 (elf32_mn10300_list_hash_table_entries): New.
319 (sort_by_value): New.
320 (mn10300_elf_relax_section): Don't skip data sections; restrict
321 code-specific tests to code-specific areas so that potential
322 indirect calls can be detected. Check for multiple local symbols
323 at the same address and merge their flags.
324 (elf32_mn10300_link_hash_newfunc): Initialize value.
325
b59eed79
TS
3262006-08-14 Thiemo Seufer <ths@mips.com>
327
328 * elfxx-mips.c (_bfd_mips_elf_symbol_processing,
329 _bfd_mips_elf_add_symbol_hook): Don't try to place small common TLS
330 symbols in .scommon.
331
54938e2a
TS
3322006-08-11 Thiemo Seufer <ths@mips.com>
333
334 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Set
335 sh_entsize only when sgot was already initialized.
336
f725025b
DD
3372006-08-08 DJ Delorie <dj@redhat.com>
338
339 * elf32-sh.c (sh_elf_relax_section): Allow for branches across
340 non-moving .align directives. Preserve any DIR32 offset when
341 converting bsr's to jsr's.
342
aa8a7074
AM
3432006-08-08 Alan Modra <amodra@bigpond.net.au>
344
345 * elf64-ppc.c (ppc64_elf_build_stubs): Clear relbrlt reloc_count
346 after stubs have been built.
347
527a23b8
NC
3482006-08-07 Nick Clifton <nickc@redhat.com>
349
350 * elf32-sh.c (vxworks_object_p): Only check for vxworks target
351 vectors if they are going to be created.
352
7b12cedc
NC
3532006-08-07 Nick Clifton <nickc@redhat.com>
354
355 * configure.in (bfd_elf32_shnbsd_vec): Fix typo.
356 * configure: Regenerate.
357
0be038d6
NC
3582006-08-07 Nick Clifton <nickc@redhat.com>
359
360 * coff-arm.c (coff_arm_rtype_to_howto): Only check for ARM_SECREL
361 relocation types if the target is ARM_WINCE.
362
f0927246
NC
3632006-08-05 Pedro Alves <pedro_alves@portugalmail.pt>
364
365 * bfd.c (bfd_get_sign_extend_vma): Add cases for pe-arm-little
366 and pei-arm-little.
367 * coff-arm.c (coff_arm_rtype_to_howto) [COFF_WITH_PE]: Handle
368 ARM_SECREL.
369 (coff_arm_reloc_type_lookup): Map BFD_RELOC_32_SECREL to
370 ARM_SECREL.
371 * pe-arm.c [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
372 * pei-arm.c [TARGET_UNDERSCORE]: Define for ARM_WINCE like in
373 pe-arm.c.
374 [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
375
c17d87de
NC
3762006-08-04 Marcelo Tosatti <marcelo@kvack.org>
377
378 * elflink.c (elf_gc_sweep): If info.print_gc_sections is true,
379 list removed sections to stderr.
380
55e6e397
RS
3812006-08-04 Richard Sandiford <richard@codesourcery.com>
382 Kazu Hirata <kazu@codesourcery.com>
383 Phil Edwards <phil@codesourcery.com>
384 Nathan Sidwell <nathan@codesourcery.com>
385
386 * config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
387 bfd_elf32_shlvxworks_vec.
388 * configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
389 (bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
390 (bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
391 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
392 (bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
393 (bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
394 (bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
395 (bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
396 * configure: Regenerate.
397 * Makefile.am: Regenerate dependencies.
398 * Makefile.in: Regenerate.
399 * elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
400 (elf_vxworks_add_symbol_hook): Use it.
401 (elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
402 table entry to check for weak undefined symbols and to obtain
403 the original bfd.
404 (elf_vxworks_emit_relocs): Use target_index instead of this_idx.
405 * elf32-sh-relocs.h: New file, split from elf32-sh.c.
406 (R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
407 SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
408 special_function field.
409 (R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
410 (R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
411 (R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
412 (R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
413 (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
414 (R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
415 (SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
416 * elf32-sh.c: Include elf32-vxworks.h.
417 (MINUS_ONE): Define.
418 (sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
419 set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
420 to sh_elf_reloc.
421 (sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
422 with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
423 SH_ELF_RELOC set to bfd_elf_generic_reloc.
424 (vxworks_object_p, get_howto_table): New functions.
425 (sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
426 (sh_elf_info_to_howto): Use get_howto_table.
427 (sh_elf_relax_section): Honor the partial_inplace field of the
428 R_SH_DIR32 howto.
429 (sh_elf_relax_delete_bytes): Likewise.
430 (elf_sh_plt_info): New structure.
431 (PLT_ENTRY_SIZE): Replace both definitions with...
432 (ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
433 INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
434 (elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
435 (elf_sh_plt0_entry_le): Likewise.
436 (elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
437 (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
438 (elf_sh_plts): New structure, with separate definitions for
439 INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
440 (elf_sh_plt0_entry): Delete both definitions.
441 (elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
442 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
443 (elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
444 (elf_sh_plt_reloc_offset): Likewise.
445 (movi_shori_putval): Delete in favor of...
446 (install_plt_field): ...this new function, with separate definitions
447 for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
448 (get_plt_info): New function, with separate definitions
449 for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
450 (elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
451 (VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
452 (vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
453 (vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
454 (vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
455 (get_plt_index, get_plt_offset): New functions.
456 (elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
457 (sh_elf_link_hash_table_create): Initialize them.
458 (sh_elf_create_dynamic_sections): Call
459 elf_vxworks_create_dynamic_sections for VxWorks.
460 (allocate_dynrelocs): Use htab->plt_info to get the size of PLT
461 entries. Allocate relocation entries in .rela.plt.unloaded if
462 generating a VxWorks executable.
463 (sh_elf_always_size_sections): New function.
464 (sh_elf_size_dynamic_sections): Extend .rela.plt handling to
465 .rela.plt.unloaded.
466 (sh_elf_relocate_section): Use get_howto_table. Honor
467 partial_inplace when calculating the addend for dynamic
468 relocations. Use get_plt_index.
469 (sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
470 and htab->plt_info. Fill in the bra .plt offset for VxWorks
471 executables. Populate .rela.plt.unloaded. Do not make
472 _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
473 (sh_elf_finish_dynamic_sections): Use install_plt_field and
474 htab->plt_info. Handle cases where there is no special PLT header.
475 Populate the first relocation in .rela.plt.unloaded and fix up
476 the remaining entries.
477 (sh_elf_plt_sym_val): Use get_plt_info.
478 (elf_backend_always_size_sections): Define.
479 (TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
480 (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
481 (elf32_bed, elf_backend_want_plt_sym): Likewise.
482 (elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
483 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
484 (elf_backend_add_symbol_hook): Likewise.
485 (elf_backend_link_output_symbol_hook): Likewise.
486 (elf_backend_emit_relocs): Likewise.
487 (elf_backend_final_write_processing): Likewise.
488 (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
489 * targets.c (bfd_elf32_shlvxworks_vec): Declare.
490 (bfd_elf32_shvxworks_vec): Likewise.
491 (_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
492 bfd_elf32_shvxworks_vec.
493
e33533a4
MK
4942006-08-02 Mark Kettenis <kettenis@gnu.org>
495
496 * configure.in (arm-*-openbsd*): Set COREFILE to netbsd-core.lo.
497 * configure: Regenerate.
498
9d7cbccd
NC
4992006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
500
501 PR binutils/2983
502 * elf64-x86-64.c: Add FreeBSD support.
503 (elf64_x86_64_fbsd_post_process_headers): New function.
504 * targets.c (_bfd_target_vector): Add bfd_elf64_x86_64_freebsd_vec.
505 * config.bfd (x64_64-*-freebsd*): Add bfd_elf64_x86_64_freebsd_vec
506 to the targ_selvecs.
507 * configure.in: Add entry for bfd_elf64_x86_64_freebsd_vec.
508 * configure: Regenerate.
509
f72c3e6b
AS
5102006-07-26 Andreas Schwab <schwab@suse.de>
511
512 * elfxx-ia64.c (elfNN_ia64_choose_gp): Use rawsize if set.
513
252e386e
AM
5142006-07-26 Alan Modra <amodra@bigpond.net.au>
515
516 * elf.c (elf_modify_segment_map): Delete empty PT_LOAD segments.
517 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Delete.
518 (define elf_backend_modify_segment_map): Don't define.
519
2907b861
TS
5202006-07-25 Thiemo Seufer <ths@networkno.de>
521
522 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Allow
523 linking of objects for compatible machine types.
524
c000e262
TS
5252006-07-25 Thiemo Seufer <ths@networkno.de>
526
527 * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test
528 also for same symbol.
529
37caec6b
TS
5302006-07-25 Thiemo Seufer <ths@mips.com>
531
532 * elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant.
533
ff15b240
NC
5342006-07-24 Michael Wetherell <mike.wetherell@ntlworld.com>
535
536 * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific
537 sections only if the SHF_OS_NONCONFORMING flag is present.
538
4e22f78d
NC
5392006-07-24 Nick Clifton <nickc@redhat.com>
540
541 PR ld/2729
542 * peXXigen.c (_bfd_XXi_final_link_postscript): Check for the
543 existance of output sections before putting their entries into the
544 DataDictionary.
545
35d3d567
TS
5462006-07-20 Thiemo Seufer <ths@mips.com>
547
548 * elf32-mips.c (mips16_jump_reloc): Remove function.
549 (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc
550 instead of mips16_jump_reloc.
551 * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function.
552 (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use
553 _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc.
554
5061a885
AM
5552006-07-19 Alan Modra <amodra@bigpond.net.au>
556
557 * bfd-in.h (enum notice_asneeded_action): Define.
558 * bfd-in2.h: Regenerate.
559 * elflink.c (elf_link_add_object_symbols): Call linker "notice"
560 function with NULL name for as-needed handling.
561
16805f35
PB
5622006-07-18 Paul Brook <paul@codesourcery.com>
563
564 * bfd-in2.h: Regenerate.
565 * libbfd.h: Regenerate.
566 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_IMM.
567
e0764319
NC
5682006-07-18 Nick Clifton <nickc@redhat.com>
569
570 * elfxx-mips.c (_bfd_mips_elf_common_definition): New function.
571 Consider SHN_MIPS_ACOMMON and SHN_MIPS_SCOMMON as being common
572 sections.
573 * elfxx-mips.h (_bfd_mips_elf_common_definition): Prototype.
574
2ccdbfcc
JJ
5752006-07-14 Jakub Jelinek <jakub@redhat.com>
576
577 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Fix cinfo.shift2 value.
578
0b33793d
MK
5792006-07-14 Mark Kettenis <kettenis@gnu.org>
580
581 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Move declarations
582 to the start of a block.
583
230d6d81
NC
5842006-07-13 Nick Clifton <nickc@redhat.com>
585
586 * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info()
587 returning a NULL value.
588
d2dee3b2
L
5892006-07-12 H.J. Lu <hongjiu.lu@intel.com>
590
591 PR ld/2884
592 * elflink.c (_bfd_elf_merge_symbol): Copy the symbol info from
593 the old versioned dynamic definition to the new one with
594 non-default visibility. Hide the symbol if it is hidden or
595 internal.
596
fb405f8a
RS
5972006-07-12 Matthew R. Dempsky <mrd@alkemio.org>
598
599 * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
600
fdc90cb4
JJ
6012006-07-10 Jakub Jelinek <jakub@redhat.com>
602
603 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_GNU_HASH.
604 (bfd_section_from_shdr, elf_fake_sections, assign_section_numbers):
605 Handle SHT_GNU_HASH.
606 (special_sections_g): Include .gnu.hash section.
607 (bfd_elf_gnu_hash): New function.
608 * elf-bfd.h (bfd_elf_gnu_hash, _bfd_elf_hash_symbol): New prototypes.
609 (struct elf_backend_data): Add elf_hash_symbol method.
610 * elflink.c (_bfd_elf_link_create_dynamic_sections): Create .hash
611 only if info->emit_hash, create .gnu.hash section if
612 info->emit_gnu_hash.
613 (struct collect_gnu_hash_codes): New type.
614 (elf_collect_gnu_hash_codes, elf_renumber_gnu_hash_syms,
615 _bfd_elf_hash_symbol): New functions.
616 (compute_bucket_count): Don't compute HASHCODES array, instead add
617 that and NSYMS as arguments. Use bed->s->sizeof_hash_entry
618 instead of bed->s->arch_size / 8. Fix .hash size estimation.
619 When not optimizing, use the number of hashed symbols rather than
620 dynsymcount.
621 (bfd_elf_size_dynamic_sections): Only add DT_HASH if info->emit_hash,
622 and ADD DT_GNU_HASH if info->emit_gnu_hash.
623 (bfd_elf_size_dynsym_hash_dynstr): Size .hash only if info->emit_hash,
624 adjust compute_bucket_count caller. Create and populate .gnu.hash
625 section if info->emit_gnu_hash.
626 (elf_link_output_extsym): Only populate .hash section if
627 finfo->hash_sec != NULL.
628 (bfd_elf_final_link): Adjust assertion. Handle DT_GNU_HASH.
629 * elfxx-target.h (elf_backend_hash_symbol): Define if not yet defined.
630 (elfNN_bed): Add elf_backend_hash_symbol.
631 * elf64-x86-64.c (elf64_x86_64_hash_symbol): New function.
632 (elf_backend_hash_symbol): Define.
633 * elf32-i386.c (elf_i386_hash_symbol): New function.
634 (elf_backend_hash_symbol): Define.
635
cfc9dfb1
NC
6362006-07-05 Nick Clifton <nickc@redhat.com>
637
638 PR ld/2659
639 * cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux
640 entry when multiple definitions of a symbol are encountered.
641
10efb593
L
6422006-06-30 H.J. Lu <hongjiu.lu@intel.com>
643
644 * elf32-i386.c (elf_i386_relocate_section): Use xchg %ax,%ax
645 instead of 2 nops.
646 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
647 (elf64_x86_64_plt0_entry): Use nopl 0(%rax) instead of 4 nops.
648
ebcfb3c0
JJ
6492006-06-29 Jakub Jelinek <jakub@redhat.com>
650
651 PR ld/2513
652 * elf32-i386.c (GOT_TLS_MASK, GOT_TLS_IE_IE, GOT_TLS_IE_GD,
653 GOT_TLS_IE_MASK, elf_i386_check_relocs, allocate_dynrelocs): Revert
654 2006-04-08 changes.
655 (elf_i386_relocate_section): Likewise. For GD->IE transition
656 change subl into addl whenever tls_type is GOT_TLS_IE_POS.
657
62d7a5f6
AM
6582006-06-23 Alan Modra <amodra@bigpond.net.au>
659
660 PR ld/2754
661 * elf.c (bfd_elf_mkobject): Don't alloc if already done. Set
662 program_header_size to -1.
663 (_bfd_elf_map_sections_to_segments): Adjust program_header_size check.
664 (assign_file_positions_for_load_sections ): Likewise.
665 (_bfd_elf_sizeof_headers): Use saved program_header_size if
666 available.
667 * elf32-arm.c (elf32_arm_mkobject): Call bfd_elf_mkobject, don't
668 alloc if already done.
669 * elf32-i386.c (elf_i386_mkobject): Likewise.
670 * elf32-ppc.c (ppc_elf_mkobject): Likewise.
671 * elf32-s390.c (elf_s390_mkobject): Likewise.
672 * elf32-sh.c (sh_elf_mkobject): Likewise.
673 * elf64-alpha.c (elf64_alpha_mkobject): Likewise.
674 * elf64-ppc.c (ppc64_elf_mkobject): Likewise.
675 * elf64-s390.c (elf_s390_mkobject): Likewise.
676 * elf64-x86-64.c (elf64_x86_64_mkobject): Likewise.
677 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Likewise.
678
6a4a0940
JJ
6792006-06-20 Jakub Jelinek <jakub@redhat.com>
680
681 * elflink.c (elf_link_add_object_symbols): Don't create .tcommon
682 section for relocatable link.
683
e36284ab
AM
6842006-06-21 Alan Modra <amodra@bigpond.net.au>
685
686 * elf-bfd.h (struct elf_backend_data): Add
687 elf_backend_modify_program_headers.
688 * elfxx-target.h (elf_backend_modify_program_headers): Define.
689 (elfNN_bed): Init new field.
690 * elf.c (elf_modify_segment_map): Remove comment.
691 (assign_file_positions_for_load_sections): Only call
692 elf_modify_segment_map for objcopy/strip.
693 (assign_file_positions_except_relocs): Call
694 elf_backend_modify_program_headers.
695 * elf32-frv.c (elf32_frvfdpic_always_size_sections): Don't make
696 .stack section.
697 (elf32_frvfdpic_modify_segment_map): Delete.
698 (elf32_frvfdpic_modify_program_headers): New.
699 (elf_backend_modify_segment_map): Don't define.
700 (elf_backend_modify_program_headers): Define.
701 * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Don't make
702 .stack section.
703 (elf32_bfinfdpic_modify_segment_map): Delete.
704 (elf32_bfinfdpic_modify_program_headers): New.
705 (elf_backend_modify_segment_map): Don't define.
706 (elf_backend_modify_program_headers): Define.
707 * elfxx-ia64.c (elfNN_ia64_modify_program_headers): New function.
708 Split out from..
709 (elfNN_ia64_modify_segment_map): ..here.
710 (elf_backend_modify_program_headers): Define.
711
ed66ec07
JJ
7122006-06-20 Jakub Jelinek <jakub@redhat.com>
713
714 * bfd.c (bfd_record_phdr): Clear p_align and p_align_valid fields.
715 * elf.c (_bfd_elf_link_hash_table_init): Clear hplt field.
716
8ded5a0f
AM
7172006-06-20 Alan Modra <amodra@bigpond.net.au>
718
719 * elf-bfd.h: Formatting.
720 (_bfd_elf_map_sections_to_segments): Declare.
721 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Don't
722 clear program_header_size.
723 * elf.c (get_program_header_size): Move. Don't use or set saved
724 program_header_size here.
725 (elf_modify_segment_map): New function. Split out from..
726 (assign_file_positions_for_load_sections): ..here. Assert
727 header size is correct. Remove dead code.
728 (_bfd_elf_map_sections_to_segments): Rename from
729 map_sections_to_segments. Make global. Use get_program_header_size
730 when we need estimate of header size. Call elf_modify_segment_map.
731 Set program_header_size.
732 (print_segment_map): Delete.
733 (_bfd_elf_sizeof_headers): If segment_map available, get the
734 actual size.
735 * elf32-arm.c (elf32_arm_symbian_modify_segment_map): Make safe
736 for calling more than once.
737 * elf32-bfin.c (elf32_bfinfdpic_modify_segment_map): Likewise.
738 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Likewise.
739 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
740 * elf32-i370.c (elf_backend_add_symbol_hook): Delete.
741 (elf_backend_additional_program_headers): Delete.
742 (elf_backend_modify_segment_map): Delete.
743 * elf64-hppa.c (elf64_hppa_modify_segment_map): Convert to ISO C.
744 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
745 * doc/bfdint.texi: Delete SIZEOF_HEADERS difficulties.
746
0fa3dcad
PB
7472006-06-19 Vladimir Prus <vladimir@codesourcery.com>
748
749 * elf32-arm.c (elf32_arm_swap_symbol_out): Don't set low
750 bit for undefined symbols.
751
a6b96beb
AM
7522006-06-19 Alan Modra <amodra@bigpond.net.au>
753
754 * elf-bfd.h (struct elf_backend_data): Add bfd_link_info pointer
755 parameter.
756 (_bfd_elf_sizeof_headers): Replace bfd_boolean param with
757 bfd_link_info pointer.
758 * targets.c (struct bfd_target <_bfd_sizeof_headers>): Likewise.
759 * bfd.c (bfd_sizeof_headers): Tweak param name.
760 * aout-adobe.c (aout_adobe_sizeof_headers): Adjust.
761 * aoutx.h (NAME (aout, sizeof_headers)): Adjust.
762 * binary.c (binary_sizeof_headers): Adjust.
763 * bout.c (b_out_sizeof_headers): Adjust.
764 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust.
765 * coff64-rs6000.c (xcoff64_sizeof_headers): Adjust.
766 * coffgen.c (coff_sizeof_headers): Adjust.
767 * ecoff.c (_bfd_ecoff_sizeof_headers): Adjust.
768 (ecoff_compute_section_file_positions): Adjust.
769 (_bfd_ecoff_write_object_contents): Adjust.
770 * elf.c (get_program_header_size, _bfd_elf_sizeof_headers): Adjust.
771 * elf32-arm.c (elf32_arm_additional_program_headers): Adjust.
772 * elf32-i370.c (elf_backend_additional_program_headers): Adjust.
773 * elf32-ppc.c (ppc_elf_additional_program_headers): Adjust.
774 * elf64-hppa.c (elf64_hppa_additional_program_headers): Adjust.
775 * elf64-x86-64.c (elf64_x86_64_additional_program_headers): Adjust.
776 * elfxx-ia64.c (elfNN_ia64_additional_program_headers): Adjust.
777 * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Adjust.
778 * elfxx-mips.h (_bfd_mips_elf_additional_program_headers): Adjust.
779 * i386msdos.c: Convert to ISO C.
780 (msdos_sizeof_headers): Adjust.
781 * i386os9k.c: Convert to ISO C.
782 (os9k_sizeof_headers): Adjust.
783 * ieee.c (ieee_sizeof_headers): Adjust.
784 * ihex.c (ihex_sizeof_headers): Adjust.
785 * libaout.h (NAME (aout, sizeof_headers)): Adjust.
786 * libbfd-in.h (_bfd_nolink_sizeof_headers): Adjust.
787 * libcoff-in.h (coff_sizeof_headers): Adjust.
788 * libecoff.h (_bfd_ecoff_sizeof_headers): Adjust.
789 * mach-o.c (bfd_mach_o_sizeof_headers): Adjust.
790 * mmo.c (mmo_sizeof_headers): Adjust.
791 * oasys.c (oasys_sizeof_headers): Adjust.
792 * pdp11.c (NAME (aout, sizeof_headers)): Adjust.
793 * pef.c (bfd_pef_sizeof_headers): Adjust.
794 * ppcboot.c (ppcboot_sizeof_headers): Adjust.
795 * som.c (som_sizeof_headers): Adjust.
796 * srec.c (srec_sizeof_headers): Adjust.
797 * tekhex.c (tekhex_sizeof_headers): Adjust.
798 * versados.c (versados_sizeof_headers): Adjust.
799 * vms.c (vms_sizeof_headers): Adjust.
800 * xcoff-target.h (_bfd_xcoff_sizeof_headers): Adjust.
801 * xsym.c (bfd_sym_sizeof_headers): Adjust.
802 * xsym.h (bfd_sym_sizeof_headers): Adjust.
803 * bfd-in2.h: Regenerate.
804 * libbfd.h: Regenerate.
805 * libcoff.h: Regenerate.
806
4962c51a
MS
8072006-06-15 Mark Shinwell <shinwell@codesourcery.com>
808
809 * bfd-in2.h: Regenerate.
810 * elf32-arm.c (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0,
811 R_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1, R_ARM_ALU_PC_G2,
812 R_ARM_LDR_PC_G1, R_ARM_LDR_PC_G2, R_ARM_LDRS_PC_G0,
813 R_ARM_LDRS_PC_G1, R_ARM_LDRS_PC_G2, R_ARM_LDC_PC_G0,
814 R_ARM_LDC_PC_G1, R_ARM_LDC_PC_G2, R_ARM_ALU_SB_G0_NC,
815 R_ARM_ALU_SB_G0, R_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1,
816 R_ARM_ALU_SB_G2, R_ARM_LDR_SB_G0, R_ARM_LDR_SB_G1,
817 R_ARM_LDR_SB_G2, R_ARM_LDRS_SB_G0, R_ARM_LDRS_SB_G1,
818 R_ARM_LDRS_SB_G2, R_ARM_LDC_SB_G0, R_ARM_LDC_SB_G1,
819 R_ARM_LDC_SB_G2): New relocation types.
820 (R_ARM_PC13): Rename to AAELF name R_ARM_LDR_PC_G0 and
821 adjust HOWTO entry to be consistent with R_ARM_LDR_PC_G1
822 and friends.
823 (elf32_arm_howto_table_3): Delete; contents merged into
824 elf32_arm_howto_table_2.
825 (elf32_arm_howto_from_type): Adjust correspondingly.
826 (elf32_arm_reloc_map): Extend with the above relocations.
827 (calculate_group_reloc_mask): New function.
828 (identify_add_or_sub): New function.
829 (elf32_arm_final_link_relocate): Support for the above
830 relocations.
831 * reloc.c: Add enumeration entries for BFD_RELOC_ARM_...
832 codes to correspond to the above relocations.
833
cc3e26be
RS
8342006-06-14 Richard Sandiford <richard@codesourcery.com>
835
836 * elf32-m68k.c (elf_m68k_plt_info): New structure.
837 (elf_m68k_plt0_entry): Add R_68K_PC32-style in-place addends.
838 (elf_m68k_plt_entry): Likewise.
839 (elf_m68k_plt_info): New table.
840 (CFV4E_PLT_ENTRY_SIZE): Rename to...
841 (ISAB_PLT_ENTRY_SIZE): ...this.
842 (CFV4E_FLAG): Delete.
843 (elf_cfv4e_plt0_entry): Rename to...
844 (elf_isab_plt0_entry): ...this. Adjust comments. Use (-6,%pc,%d0)
845 for the second instruction too.
846 (elf_cfv4e_plt_entry): Rename to...
847 (elf_isab_plt_entry): ...this. Adjust comments and use (-6,%pc,%d0).
848 (elf_isab_plt_info): New table.
849 (CPU32_FLAG): Delete.
850 (PLT_CPU32_ENTRY_SIZE): Rename to...
851 (CPU32_PLT_ENTRY_SIZE): ...this.
852 (elf_cpu32_plt0_entry): Update bounds accordingly. Add R_68K_PC32-
853 style in-place addends.
854 (elf_cpu32_plt_entry): Likewise.
855 (elf_cpu32_plt_info): New table.
856 (elf_m68k_link_hash_table): Add a plt_info field.
857 (elf_m68k_link_hash_table_create): Initialize it.
858 (elf_m68k_get_plt_info): New function.
859 (elf_m68k_always_size_sections): Likewise.
860 (elf_m68k_adjust_dynamic_symbol): Use the plt_info hash table field.
861 (elf_m68k_install_pc32): New function.
862 (elf_m68k_finish_dynamic_symbol): Factor code using plt_info and
863 elf_m68k_install_pc32.
864 (elf_m68k_finish_dynamic_sections): Likewise.
865 (elf_m68k_plt_sym_val): Use elf_m68k_get_plt_info.
866 (elf_backend_always_size_sections): Define.
867
4f87808c
AM
8682006-06-14 Alan Modra <amodra@bigpond.net.au>
869
870 * elflink.c (elf_link_add_object_symbols): Save and restore
871 struct bfd_hash_table table, size and count fields for
872 as-needed libs.
873
7fd91fe0
TS
8742006-06-12 Thiemo Seufer <ths@mips.com>
875
876 * elf32-mips.c: Expand comment about ABI-mandated pagesize values.
877 (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): define in a more obvious way.
878 * elf64-mips.c, elfn32-mips.c (ELF_MAXPAGESIZE): Fix value for IRIX6.
879 Delete old comments.
880 (ELF_COMMONPAGESIZE): Define in a more obvious way.
881
d07676f8
NC
8822006-06-12 Nick Clifton <nickc@redhat.com>
883
884 PR binutils/2735
885 * elflink.c (elf_link_add_object_symbols): Fix the warning message
886 about mismatched alignments to allow for the case where the common
887 alignment has been deduced from the section alignment.
888 * bfd.c (_bfd_default_error_handler): Update comment to explain
889 why bfd and asection varargs are out of order. Explicitly catch
890 and abort on NULL bfd and asection arguments.
891
5108fc1b
RS
8922006-06-11 Richard Sandiford <richard@codesourcery.com>
893 Thiemo Seufer <ths@mips.com>
894
895 * elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size.
896 (STUB_ORI): New macro.
897 (STUB_LI16U): Fix formatting.
898 (MIPS_FUNCTION_STUB_SIZE): Delete.
899 (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise.
900 (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro.
901 (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
902 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size
903 instead of MIPS_FUNCTION_STUB_SIZE.
904 (count_section_dynsyms): New function, split out from
905 _bfd_mips_elf_final_link.
906 (_bfd_mips_elf_always_size_sections): Get a worst-case estimate
907 of the number of dynamic symbols needed and use it to set up
908 function_stub_size. Use function_stub_size rather than
909 MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section.
910 Use 16-byte stubs for 0x10000 dynamic symbols.
911 (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size
912 instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting.
913 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the
914 size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to
915 MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes.
916 Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20.
917 Use STUB_ORI rather than STUB_LI16U for big stubs.
918 (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size.
919 (_bfd_mips_elf_final_link): Use count_section_dynsyms.
920
f38c2df5
TS
9212006-06-09 David Ung <davidu@mips.com>
922
923 * bfd/elfxx-mips.c (mips_elf_calculate_relocation): Fix mode for stub
924 calling relocations.
925
3d6746ca
DD
9262006-06-08 David Daney <ddaney@avtrex.com>
927
928 * elfxx-mips.c (STUB_LI16): Removed.
929 (STUB_LUI): New macro.
930 (STUB_LI16U): Ditto.
931 (STUB_LI16S): Ditto.
932 (MIPS_FUNCTION_STUB_SIZE): Rewrote to take info parameter.
933 (_bfd_mips_elf_adjust_dynamic_symbol): Pass info parameter to
934 MIPS_FUNCTION_STUB_SIZE.
935 (_bfd_mips_elf_always_size_sections): Ditto.
936 (_bfd_mips_elf_size_dynamic_sections): Ditto.
937 (_bfd_mips_elf_finish_dynamic_sections): Ditto.
938 (_bfd_mips_elf_finish_dynamic_symbol): Rewrote stub generation
939 to allow larger symbol table indexes.
940
6648b7cf
JM
9412006-06-07 Joseph S. Myers <joseph@codesourcery.com>
942
943 * po/Make-in (pdf, ps): New dummy targets.
944
d3fd4074
AM
9452006-06-06 Alan Modra <amodra@bigpond.net.au>
946
0bef4ce5
AM
947 * hash.c (bfd_hash_lookup): Correct stray line.
948
d3fd4074
AM
949 * elf.c (_bfd_elf_init_private_section_data): Comment typo.
950 (elfcore_grok_nto_status): Use long instead of pid_t.
951 (elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
952
4cfe2c59
DJ
9532006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
954
955 * po/Make-in (top_builddir): Define.
956
7ff1a5b5
AM
9572006-06-05 Alan Modra <amodra@bigpond.net.au>
958
959 * Makefile.am: Run "make dep-am".
960 * Makefile.in: Regenerate.
961 * config.in: Regenerate.
962
f0b5bb34
AM
9632006-06-02 Alan Modra <amodra@bigpond.net.au>
964 H.J. Lu <hongjiu.lu@intel.com>
965
966 PR ld/2723
967 * elflink.c (bfd_elf_final_link): Don't output section symbols
968 for special ELF sections.
969
117ed4f8
AM
9702006-06-01 Alan Modra <amodra@bigpond.net.au>
971
972 * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
973 instead of bfd_make_section*.
974 * aix386-core.c: Likewise.
975 * aix5ppc-core.c: Likewise.
976 * aout-adobe.c: Likewise.
977 * aoutf1.h: Likewise.
978 * binary.c: Likewise.
979 * cisco-core.c: Likewise.
980 * coff-arm.c: Likewise.
981 * coff-h8300.c: Likewise.
982 * elf.c: Likewise.
983 * elf32-bfin.c: Likewise.
984 * elf32-m32c.c: Likewise.
985 * hppabsd-core.c: Likewise.
986 * hpux-core.c: Likewise.
987 * i386linux.c: Likewise.
988 * ieee.c: Likewise.
989 * ihex.c: Likewise.
990 * irix-core.c: Likewise.
991 * lynx-core.c: Likewise.
992 * m68klinux.c: Likewise.
993 * mach-o.c: Likewise.
994 * netbsd-core.c: Likewise.
995 * nlmcode.h: Likewise.
996 * opncls.c: Likewise.
997 * osf-core.c: Likewise.
998 * peXXigen.c: Likewise.
999 * ppcboot.c: Likewise.
1000 * ptrace-core.c: Likewise.
1001 * rs6000-core.c: Likewise.
1002 * sco5-core.c: Likewise.
1003 * sparclinux.c: Likewise.
1004 * srec.c: Likewise.
1005 * sunos.c: Likewise.
1006 * trad-core.c: Likewise.
1007 * xcofflink.c: Likewise.
1008 * xsym.c: Likewise.
1009
20e95c23
DJ
10102006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
1011
1012 * Makefile.am (INCLUDES): Use @INCINTL@.
1013 * acinclude.m4: Include new gettext macros.
1014 * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
1015 Manually substitute POFILES and GMOFILES.
1016 * Makefile.in, aclocal.m4, configure, doc/Makefile.in: Regenerated.
1017
24718e3b
L
10182006-05-30 H.J. Lu <hongjiu.lu@intel.com>
1019
1020 * bfd.c (bfd_emul_get_maxpagesize): New.
1021 (bfd_elf_set_pagesize): Likewise.
1022 (bfd_emul_set_maxpagesize): Likewise.
1023 (bfd_emul_get_commonpagesize): Likewise.
1024 (bfd_emul_set_commonpagesize): Likewise.
1025 * bfd-in2.h: Regenerated.
1026
1027 * elf-bfd.h (elf_backend_data): Add commonpagesize.
1028 (xvec_get_elf_backend_data): New.
1029 (get_elf_backend_data): Use xvec_get_elf_backend_data.
1030
1031 * elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
1032 * elfxx-target.h (elfNN_bed): Likewise.
1033
1034 * elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
1035 * elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
1036 * elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
1037 * elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
1038 * elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
1039 * elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
1040 * elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
1041 * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
1042 * elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
1043 * elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
1044 * elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
1045 * elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.
1046
1047 * elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
1048 (elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.
1049
1050 * targets.c (bfd_find_target): Support NULL abfd.
1051
eebf07fb
NC
10522006-05-30 Nick Clifton <nickc@redhat.com>
1053
1054 * po/es.po: Updated Spanish translation.
1055
3f570048
AM
10562006-05-27 Alan Modra <amodra@bigpond.net.au>
1057 H.J. Lu <hongjiu.lu@intel.com>
1058
1059 * elf.c (assign_file_positions_for_load_sections): Retrieve
1060 maxpagesize from m->p_align if it is valid. Set p_vaddr,
1061 p_paddr and p_align earlier. Revert 2006-05-19 change to p_align.
1062 (copy_elf_program_header): Copy p_align. Set p_align_valid.
1063
2043964e
L
10642006-05-26 H.J. Lu <hongjiu.lu@intel.com>
1065
1066 * elf64-x86-64.c (ELF_MINPAGESIZE): Changed to 0x1000.
1067
10682006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1069
1070 * elf64-x86-64.c (ELF_MINPAGESIZE): Set to 0x100000.
1071
f7661549
L
10722006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elf64-x86-64.c (ELF_MAXPAGESIZE): Updated to 0x200000.
1075
5372391b
AM
10762006-05-26 Alan Modra <amodra@bigpond.net.au>
1077
1078 * elf.c (sym_is_global): Return a bfd_boolean.
1079 (ignore_section_sym): New function.
1080 (elf_map_symbols): Use ignore_section_sym to discard some syms.
1081 (_bfd_elf_symbol_from_bfd_symbol): Ensure section belongs to
1082 bfd before using elf_section_syms.
1083
6566b43c
L
10842006-05-25 H.J. Lu <hongjiu.lu@intel.com>
1085
1086 * config.bfd: (sh-*-linux*): Treat as 64bit target.
1087 (sh*l*-*-netbsdelf*): Likewise.
1088 (sh-*-netbsdelf*): Likewise.
1089 (shl*-*-elf*): Likewise.
1090 (sh[1234]l*-*-elf*): Likewise.
1091 (sh3el*-*-elf*): Likewise.
1092 (shl*-*-kaos*): Likewise.
1093 (sh-*-elf*): Likewise.
1094 (sh[1234]*-elf*): Likewise.
1095 (sh-*-rtems*): Likewise.
1096 (sh-*-kaos*): Likewise.
1097
314e9a4e
L
10982006-05-24 H.J. Lu <hongjiu.lu@intel.com>
1099
1100 PR ld/1485
1101 * config.bfd: Set want64 to true if 64bit bfd is used.
1102 (sh-*-linux*): Use targ64_selvecs for 64bit targets.
1103 (sh*l*-*-netbsdelf*): Likewise.
1104 (sh-*-netbsdelf*): Likewise.
1105 (shl*-*-elf*): Likewise.
1106 (sh[1234]l*-*-elf*): Likewise.
1107 (sh3el*-*-elf*): Likewise.
1108 (shl*-*-kaos*): Likewise.
1109 (sh-*-elf*): Likewise.
1110 (sh[1234]*-elf*): Likewise.
1111 (sh-*-rtems*): Likewise.
1112 (sh-*-kaos*): Likewise.
1113
4e617b1e
PB
11142006-05-24 Paul Brook <paul@codesourcery.com>
1115
1116 * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms
1117 * elf32-arm.c (output_arch_syminfo): Define.
1118 (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map,
1119 elf32_arm_output_arch_local_syms): New functions.
1120 (elf_backend_output_arch_local_syms): Define.
1121 * elflink.c (bfd_elf_final_link): Call
1122 elf_backend_output_arch_local_syms.
1123 * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default
1124 definition.
1125 (elfNN_bed): Add elf_backend_output_arch_local_syms.
1126
52ab56c2
PB
11272006-05-24 Paul Brook <paul@codesourcery.com>
1128
1129 * elf32-arm.c (put_arm_insn, put_thumb_insn): New functions.
1130 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
1131 elf32_arm_finish_dynamic_symbol): Use them.
1132
9b52905e
NC
11332006-05-24 Carlos O'Donell <carlos@systemhalted.org>
1134 Randolph Chung <tausq@debian.org>
1135
1136 * elf-hppa.h (reloc_hppa_howto_table): Check bitfield for
1137 TPREL21L/TPREL14R relocations. Handle LTOFF_TP14R relocations.
1138 Add handling for TLS relocations.
1139 (elf_hpp_reloc_final_type): Handle TLS relocs.
1140 * elf32-hppa.c: Add authors for cleanup and TLS support.
1141 (hppa_elf_local_got_tls_type, hh_name, eh_name): Define.
1142 (elf32_hppa_link_hash_entry): Add tls_type.
1143 (elf32_hppa_link_hash_table): Add tld_ldm_got.
1144 (hppa_link_has_newfunc): Set tls_type.
1145 (elf32_hppa_link_hash_table_create): Set tls_ldm_got refcount.
1146 (hppa_stub_name): Use hh_name macro.
1147 (elf32_hppa_copy_indirect_symbol): Copy TLS information.
1148 (elf32_hppa_check_relocs): Call elf32_hppa_optimized_tls_reloc.
1149 Handle TLS relocs.
1150 (elf32_hppa_gc_sweep_hook): Likewise.
1151 (allocate_dynrelocs): Handle TLS relocs.
1152 (elf32_hppa_size_dynamic_sections): Count space required by TLS
1153 relocs. Use hh_name macro.
1154 (dtpoff_base): New function.
1155 (tpoff): Likewise.
1156 (elf32_hppa_optimized_tls_reloc): Likewise.
1157 (final_link_relocate): Handle TLS relocs.
1158 (elf32_hppa_relocate_section): Handle TLS relocs. Use eh_name
1159 and hh_name macros.
1160 (elf32_hppa_finish_dynamic_symbol): Setup TLS got entries. Use
1161 hh_name and eh_name macros.
1162 (elf32_hppa_reloc_type_clas): Handle TLS relocs.
1163
28c9d252
NC
11642006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
1165
1166 * archures.c: Add bfd_mach_avr6.
1167 * cpu-avr.c: Likewise.
1168 * reloc.c (BFD_RELOC_AVR_LO8_LDI_GS, BFD_RELOC_AVR_HI8_LDI_GS):
1169 New relocations.
1170 * libbfd.h: Regenerate.
1171 * bfd-in2.h:Regenerate.
1172 * elf32-avr.h: New file. Protoypes for functions accessed from ld.
1173 * elf32-avr.c: Add elf32-avr.h to include list.
1174 (elf32_avr_stub_hash_entry): New function.
1175 (elf32_avr_link_hash_table): New struct.
1176 (avr_link_hash_table): Likewise.
1177 (avr_stub_hash_entry): Likewise.
1178 (avr_stub_hash_lookup): New function.
1179 (stub_hash_newfunc): New function.
1180 (elf32_avr_link_hash_table_create): New function.
1181 (elf32_avr_link_hash_table_free): New function.
1182 (avr_get_stub_addr): New function.
1183 (debug_relax, debug_stubs): Add new global variables controlling
1184 debugging printout to stdout.
1185 (avr_pc_wrap_around): Change the type to bfd_vma.
1186 (avr_replace_call_ret_sequences): Add a new variable controling
1187 linkrelax optimizations.
1188 (avr_stub_is_required_for_16_bit_reloc): New function.
1189 (avr_final_link_relocate):
1190 Add linker hash table to parameter list. Use stub addr. if necessary.
1191 (elf32_avr_relocate_section):
1192 Add linker hashtable to parameter list of avr_final_link_relocate.
1193 (bfd_elf_avr_final_write_processing): Add support for bfd_mach_avr6.
1194 (elf32_avr_object_p): Add support for E_AVR_MACH_AVR6.
1195 (elf32_avr_relax_delete_bytes):
1196 Iterate over all sections of a bfd when adjusting relocs addends.
1197 (elf32_avr_relax_section):
1198 Evaluate avr_replace_call_ret_sequences and recalculate the size of
1199 stub section.
1200 (avr_stub_name): New function.
1201 (avr_get_stub_entry): New function.
1202 (avr_add_stub): New function.
1203 (avr_build_one_stub): New function.
1204 (avr_size_one_stub): New function.
1205 (elf32_avr_setup_params): New function.
1206 (elf32_avr_setup_section_lists): New function.
1207 (get_local_syms): New function.
1208 (elf32_avr_size_stubs): New function.
1209 (bfd_elf32_bfd_link_hash_table_create): New function.
1210 (bfd_elf32_bfd_link_hash_table_free): New function.
1211
a34a056a
L
12122006-05-23 H.J. Lu <hongjiu.lu@intel.com>
1213
1214 PR ld/2655
1215 PR ld/2657
1216 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Properly
1217 update CIE/FDE length. Don't pad to the section alignment.
1218
8aafe8b4
JZ
12192006-05-23 Jie Zhang <jie.zhang@analog.com>
1220
1221 * elf32-bfin.c (bfinfdpic_relocate_section): Clear reloc for
1222 deteted entries in .eh_frame section.
1223
5592d7ec
JZ
12242006-05-23 Jie Zhang <jie.zhang@analog.com>
1225
1226 * elf32-bfin.c (bfin_check_relocs): Use __GLOBAL_OFFSET_TABLE_
1227 instead of _GLOBAL_OFFSET_TABLE_.
1228 (bfin_relocate_section): Ditto.
1229 (_bfin_create_got_section): Ditto.
1230 (elf32_bfinfdpic_create_dynamic_sections): Use
1231 __PROCEDURE_LINKAGE_TABLE_ instead of _PROCEDURE_LINKAGE_TABLE_.
1232 (bfin_finish_dynamic_symbol): Use __DYNAMIC instead of _DYNAMIC.
1233
4d35a0aa
AM
12342006-05-23 Alan Modra <amodra@bigpond.net.au>
1235
1236 * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
1237 function syms over other syms.
1238
943284cc
DJ
12392006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
1240
1241 * elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
1242 check.
1243 (bfd_elf_final_link): Add a late DT_TEXTREL check.
1244 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): Define.
1245 (mips_elf_create_dynamic_relocation): Set DF_TEXTREL.
1246 (_bfd_mips_elf_check_relocs): Delete MIPS_READONLY_SECTION.
1247 Use MIPS_ELF_READONLY_SECTION.
1248 (_bfd_mips_elf_size_dynamic_sections): Clear DF_TEXTREL after
1249 creating DT_TEXTREL.
1250 (_bfd_mips_elf_finish_dynamic_sections): Clear textrel markers
1251 if no text relocations were generated.
1252
4d345610
L
12532006-05-19 H.J. Lu <hongjiu.lu@intel.com>
1254
1255 * elfxx-ia64.c (ELF_MAXPAGESIZE): Fix a typo in comment.
1256
1ea63fd2
AM
12572006-05-19 Alan Modra <amodra@bigpond.net.au>
1258
1259 * elf.c (elf_fake_sections): Formatting.
1260 (assign_file_positions_for_load_sections): Only add SEC_ALLOC
1261 sections to p_memsz. Remove hack for PT_NOTE sections. Allow
1262 section alignment to increase p_align for PT_LOAD.
1263 (assign_file_positions_for_non_load_sections): Remove ARM BPABI
1264 hack for PT_DYNAMIC. Instead, set p_filesz for all segments
1265 other than PT_LOAD, and PT_NOTE in core.
1266
f3520d2f
AM
12672006-05-17 Alan Modra <amodra@bigpond.net.au>
1268
1269 * elf.c (assign_file_positions_for_segments): Split into..
1270 (assign_file_positions_for_load_sections): ..this, and..
1271 (assign_file_positions_for_non_load_sections): ..this new function,..
1272 (assign_file_positions_except_relocs): ..writing program headers here.
1273
dea5f36a
AM
12742006-05-17 Alan Modra <amodra@bigpond.net.au>
1275
1276 * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
1277 non-load sections if they have relocs.
1278
b0796911
PB
12792006-05-15 Paul Brook <paul@codesourcery.com>
1280
1281 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
1282 (bfd_is_arm_special_symbol_name): ... to this. Add type argument.
1283 Check symbol name is of specified type.
1284 * elf32-arm.c (elf32_arm_is_target_special_symbol,
1285 arm_elf_find_function, elf32_arm_output_symbol_hook): Use
1286 bfd_is_arm_special_symbol_name.
1287 * bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
1288 BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
1289 BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
1290 (bfd_is_arm_mapping_symbol_name): Remove prototype.
1291 (bfd_is_arm_special_symbol_name): Add prototype.
1292 * bfd-in2.h: Regenerate.
1293
64b607e6
BW
12942006-05-15 David Heine <dlheine@tensilica.com>
1295 Bob Wilson <bob.wilson@acm.org>
1296
1297 * elf32-xtensa.c (check_loop_aligned): Fix reversed check for
1298 undefined opcode. Clean up assertions.
1299 (narrow_instruction, widen_instruction): Remove "do_it" parameters.
1300 Factor most of the code into separate functions....
1301 (can_narrow_instruction, can_widen_instruction): New.
1302 (prev_instr_is_a_loop): New.
1303 (compute_ebb_proposed_actions): Combine error handling code for
1304 decode errors. Replace call to insn_decode_len with inline code.
1305 Use can_narrow_instruction and can_widen_instruction. Handle errors
1306 from call to xtensa_opcode_is_loop.
1307 (relax_section): Adjust calls to narrow_instruction and
1308 widen_instruction.
1309
7de713b9
AM
13102006-05-15 Alan Modra <amodra@bigpond.net.au>
1311
1312 PR 2658
1313 * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
1314 -shared link.
1315
83180ade
L
13162006-05-11 Michael Matz <matz@suse.de>
1317
1318 * elflink.c (match_group_member): Correctly iterate group
1319 members.
1320
b6895b4f
PB
13212006-05-11 Paul Brook <paul@codesourcery.com>
1322
1323 * elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs.
1324 (elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs.
1325 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
1326 * reloc.c: Ditto.
1327 * bfd-in2.h: Regenerate.
1328 * libbfd.h: Regenerate.
1329 * libcoff.h: Regenerate.
1330
8b95791f
AM
13312006-05-11 Mike Bland <mbland@google.com>
1332
1333 * elf.c (_bfd_elf_init_private_section_data): Don't change
1334 section type if already set.
1335
5e1b4a6d
NC
13362006-05-10 Nick Clifton <nickc@redhat.com>
1337
1338 PR ld/2607
1339 * elfcode.h (valid_section_index_p): New function: Checks for a
1340 valid section index. Allows indicies in the range SHN_LOPROC to
1341 SHN_HIOS.
1342 (elf_object_p): Use valid_section_index_p.
1343
53baae48
NC
13442006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
1345
1346 * coff-arm.c (ARM_26D, ARM_32, ARM_RVA_32, ARM_SECTION,
1347 ARM_SECREL): Mark WinCE versions of these relocs as partial
1348 inplace.
1349 (coff_arm_relocate_section): Adjust addend for WinCE.
1350
69d54b1b
AM
13512006-05-10 Alan Modra <amodra@bigpond.net.au>
1352
1353 PR 2342
1354 * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
1355
337ff0a5
NC
13562006-05-09 Nick Clifton <nickc@redhat.com>
1357
1358 * coffcode.h (coff_write_relocs): Produce an error message if a an
1359 out-of-range symbol index is detected in a reloc.
1360
e4d4d200
BE
13612006-05-09 Ben Elliston <bje@au.ibm.com>
1362
1363 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Remove unused
1364 local variable `dynobj'.
1365
73160847
NC
13662006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
1367
336e5de1 1368 * elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all
73160847
NC
1369 of the bfd's sections for the reloc-addend adjustments.
1370
77df2968
MS
13712006-05-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
1372
1373 * elf32-s390.c (invalid_tls_insn): Call bfd_set_error.
1374 (elf_s390_relocate_section): Add code to do the GD->LE and
1375 LD->LE TLS linker optimizations if a brasl instruction is used
1376 for the __tls_get_offset function call.
1377 * elf64-s390.c (invalid_tls_insn): Call bfd_set_error.
1378
30038c59
AM
13792006-05-05 Alan Modra <amodra@bigpond.net.au>
1380
1381 * elf64-ppc.c (ppc64_elf_tls_optimize): Only optimize
1382 R_PPC64_TPREL64 and R_PPC64_DTPMOD64 relocs when they are in
1383 the .toc and referenced by a TLS code sequence.
1384 (ppc64_elf_edit_toc): Cater for the unlikely situation that
1385 .toc is the first section in a file.
1386
ff8b75c7
AS
13872006-05-04 Andreas Schwab <schwab@suse.de>
1388
1389 * aoutf1.h (struct external_sparc_core): Declare c_regs as struct
1390 regs instead of an array of int.
1391 (struct external_solaris_bcp_core): Likewise.
1392 (swapcore_sun3): Use offsetof instead of computing the offset
1393 manually.
1394 (swapcore_sparc): Likewise. Simplify reference to c_regs.
1395 (swapcore_solaris_bcp): Likewise.
1396
003b8e1d
DJ
13972006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1398
1399 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Adjust handling
1400 for missing GOTs.
1401
efacb0fb
DJ
14022006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
1403
27106ff0 1404 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
efacb0fb
DJ
1405 mapping symbols.
1406
9578239d
BE
14072006-05-04 Ben Elliston <bje@au.ibm.com>
1408
1409 * coff-or32.c (bfd_section_from_shdr): Remove unused local
1410 variable `ptr'.
1411 * cofflink.c (process_embedded_commands): Remove unused local
1412 variables `had_read' and `had_shared'.
1413 * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
1414 variable `fdr_adr'.
1415 * ihex.c (ihex_read_section): Remove unused local variable `addr'.
1416
f592407e
AM
14172006-05-03 Alan Modra <amodra@bigpond.net.au>
1418
1419 * libbfd-in.h (_bfd_generic_new_section_hook): Declare.
1420 * section.c (bfd_abs_symbol, bfd_com_symbol): Delete.
1421 (bfd_und_symbol, bfd_ind_symbol): Delete.
1422 (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to
1423 &SEC.symbol.
1424 (STD_SECTION): Adjust.
1425 (_bfd_generic_new_section_hook): New function, extracted from..
1426 (bfd_section_init): ..here.
1427 (bfd_make_section_old_way): Call new_section_hook for abs, com,
1428 und and ind sections.
1429 * elf.c (_bfd_elf_large_com_section): Adjust.
1430 * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook.
1431 * pdp11.c (new_section_hook): Likewise.
1432 * coffcode.h (coff_new_section_hook): Likewise.
1433 * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
1434 * elf.c (_bfd_elf_new_section_hook): Likewise.
1435 * vms.c (vms_new_section_hook): Likwise.
1436 * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't
1437 already set.
1438 * elf32-sh64.c (sh64_elf_new_section_hook): Likewise.
1439 * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise.
1440 * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
1441 * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise.
1442 * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise.
1443 * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise.
1444 * ieee.c (ieee_new_section_hook): Likewise. Call
1445 _bfd_generic_new_section_hook too.
1446 * mmo.c (mmo_new_section_hook): Likewise.
1447 * oasys.c (oasys_new_section_hook): Likewise.
1448 * som.c (som_new_section_hook): Likewise.
1449 * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol.
1450 * bfd-in2.h: Regenerate.
1451 * libbfd.h: Regenerate.
1452
bd75c995
AM
14532006-05-03 Alan Modra <amodra@bigpond.net.au>
1454
1455 * hash.c (DEFAULT_SIZE): Revert last change.
1456 (higher_prime_number): Correct test for no larger prime. Don't
1457 abort on error, instead return 0. Depopulate primes[].
1458 (bfd_hash_lookup): If we overflow size, refuse to grow table.
1459
a8bc6c78
PB
14602006-05-02 Paul Brook <paul@codesourcery.com>
1461
1462 * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
1463 for R_ARM_REL32.
1464
b48c61bc
BE
14652006-05-02 Ben Elliston <bje@au.ibm.com>
1466
1467 * archive.c (bfd_generic_archive_p): Remove unused local variable
1468 `fail'.
1469 * dwarf2.c (decode_line_info): Remove unused local variable
1470 `basic_block'.
e4d4d200
BE
1471 * elfcode.h (elf_slurp_reloc_table_from_section): Remove unused
1472 local variable `s'.
b48c61bc
BE
1473 * tekhex.c (tekhex_write_object_contents): Remove unused local
1474 variable `bytes_written'.
1475 * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
1476 variable `r_addend'.
1477 * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
1478 * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
1479 (_bfd_ns32k_relocate_contents): Remove break after return.
1480 * elf.c (bfd_section_from_shdr): Remove breaks after returns.
1481
63f2fc30
NC
14822006-05-02 Nick Clifton <nickc@redhat.com>
1483
1484 * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
1485 in order to avoid conflicts with the global DEBUG define.
1486
e460dd0d
AM
14872006-05-02 Alan Modra <amodra@bigpond.net.au>
1488
1489 * dwarf2.c: Formatting.
1490 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Simplify
1491 output section check.
1492 * elf32-i370.c: Warning fixes inside #ifdef DEBUG.
1493 * elf32-m32c.c: Similarly.
1494 * elf32-ppc.c: Similarly.
1495 * elf32-v850.c: Similarly.
1496 * nlm32-sparc.c: Similarly.
1497 * elfcode.h: Similarly.
1498 (elf_symbol_flags): Delete.
1499 * elflink.c (elf_link_input_bfd): Comment typo.
1500
aa149cf7
DD
15012006-05-01 DJ Delorie <dj@redhat.com>
1502
1503 * bfd-in.h (bfd_hash_table): Add count field.
1504 * bfd-in2.h: Regenerate.
1505 * hash.c (higher_prime_number): New.
1506 (bfd_hash_table_inint_n): Init count field.
1507 (bfd_hash_lookup): Grow table as needed.
1508
75b8939e
KK
15092006-04-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1510
1511 PR binutils/2584
1512 * tekhex.c (getvalue): Change return type to bfd_boolean and
1513 add the new parameter. Return false if the unexpected character
1514 is found.
1515 (getsym): Likewise.
1516 (first_phase): Change return type to bfd_boolean and return
1517 false if the unexpected character is found. Replace abort
1518 with returning false.
1519 (pass_over): Change return type to bfd_boolean and the type of
1520 the second argument to bfd_boolean (*) (bfd *, int, char *).
1521 Return false if FUNC returns false.
1522 (tekhex_object_p): Return NULL if pass_over fails.
1523
f05742e6
AM
15242006-04-27 Alan Modra <amodra@bigpond.net.au>
1525
1526 * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
1527
e843e0f8
L
15282006-04-26 H.J. Lu <hongjiu.lu@intel.com>
1529
1530 PR binutils/2593
1531 * elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
1532 and flags if its BFD flags have been set.
1533 (_bfd_elf_init_private_section_data): Don't copy the output ELF
1534 section type from input if it has been set to something
1535 different.
1536
b25e3d87
L
15372006-04-25 H.J. Lu <hongjiu.lu@intel.com>
1538
1539 PR binutils/2467
1540 * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd)
1541 is NULL first.
1542
1543 * elf32-arm.c (elf32_arm_close_and_cleanup): Check if
1544 abfd->sections is NULL.
1545 (elf32_arm_bfd_free_cached_info): New.
1546 (bfd_elf32_bfd_free_cached_info): Defined.
1547
1548 * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it
1549 to _bfd_free_cached_info.
1550
1551 * libbfd-in.h (_bfd_free_cached_info): New.
1552 * libbfd: Regenerated.
1553
1554 * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL.
1555 (_bfd_free_cached_info): New.
1556
5c182d5f
AM
15572006-04-21 Alan Modra <amodra@bigpond.net.au>
1558
1559 * elf.c (assign_file_positions_except_relocs): Move code setting
1560 file position of non-loaded sections..
1561 (assign_file_positions_for_segments): ..to here.
1562
3eb70a79
L
15632006-04-20 H.J. Lu <hongjiu.lu@intel.com>
1564
1565 PR ld/2537
1566 * elf.c (bfd_section_from_shdr): Allow sections reserved for
1567 applications. Issue an error on sections we don't know how
1568 to handle.
1569
ec3fcc56
AM
15702006-04-19 Alan Modra <amodra@bigpond.net.au>
1571
1572 * Makefile.am: Run "make dep-am".
1573 * Makefile.in: Regenerate.
1574
241a6c40
AM
15752006-04-19 Alan Modra <amodra@bigpond.net.au>
1576
1577 * warning.m4 (--enable-werror): Format help message.
1578 (--enable-build-warnings): Likewise.
1579 * configure: Regenerate.
1580
0b49d371
NC
15812006-04-18 Nick Clifton <nickc@redhat.com>
1582
1583 PR 2257
1584 * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
1585 fields to still be handled as ELF files.
1586
e7403566
DJ
15872006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
1588
1589 * po/SRC-POTFILES.in: Regenerated.
1590
ffdc4eed
DJ
15912006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
1592
1593 * configure.in: Update version to 2.17.50.
1594 * configure: Regenerated.
1595
cb337148
BW
15962006-04-14 David Heine <dlheine@tensilica.com>
1597
1598 * elf32-xtensa.c (build_reloc_opcodes): New.
1599 (compute_text_actions): Use it to decode opcodes outside inner loop.
1600 (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
1601 it is set, use it to get the opcodes for relocations.
1602 (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
1603
cb878726
L
16042006-04-08 H.J. Lu <hongjiu.lu@intel.com>
1605
1606 PR ld/2513
1607 * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
1608 (GOT_TLS_IE_IE): Likewise.
1609 (GOT_TLS_IE_GD): Likewise.
1610 (GOT_TLS_IE_MASK): Likewise.
1611 (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
1612 and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
1613 respectively.
1614 (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
1615 are set, treat tls_type as GOT_TLS_IE_BOTH.
1616 (elf_i386_relocate_section): Likewise.
1617
235ecfbc
NC
16182006-04-07 Randolph Chung <tausq@debian.org>
1619
1620 * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
1621 (elf64_hppa_grok_psinfo): Likewise.
1622 (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
1623
35520cb7
DD
16242006-04-06 DJ Delorie <dj@redhat.com>
1625
1626 * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
1627 each plt entry we create.
1628
108a6f8e
CD
16292006-04-06 Carlos O'Donell <carlos@codesourcery.com>
1630
1631 * po/Make-in: Add install-html target.
1632 * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
1633 htmldir. Add install-html and install-html-recursive targets.
1634 * Makefile.in: Regenerate.
1635 * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
1636 * configure: Regenerate.
1637
fbbc3759
L
16382006-04-06 H.J. Lu <hongjiu.lu@intel.com>
1639
1640 * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
1641 with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
1642 section structure.
1643
17e226a8
BS
16442006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
1645
1646 * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
1647 eliminate warnings.
1648
396a682d
L
16492006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1650 James E Wilson <wilson@specifixinc.com>
1651
1652 PR ld/2442
1653 * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
1654 (elfNN_ia64_local_hash_entry): Add count, sorted_count and
1655 size.
1656 (elfNN_ia64_link_hash_entry): Likewise.
1657 (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
1658 and size.
1659 (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
1660 processing.
1661 (elfNN_ia64_hash_hide_symbol): Likewise.
1662 (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1663 (elfNN_ia64_local_dyn_sym_thunk): Likewise.
1664 (elfNN_ia64_global_dyn_info_free): New function.
1665 (elfNN_ia64_local_dyn_info_free): Likewise.
1666 (elfNN_ia64_hash_table_free): Free local and global
1667 elfNN_ia64_dyn_sym_info.
1668 (addend_compare): New function.
1669 (sort_dyn_sym_info): Likewise.
1670 (get_dyn_sym_info): Updated to use binary search for addend.
1671 (elfNN_ia64_check_relocs): Scan relocations to create dynamic
1672 relocation arrays first.
1673
0781db9f
BS
16742006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
1675
1676 * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
1677 symbol.
1678
c0d5a53d
L
16792006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1680
1681 PR ld/2411
1682 * elflink.c (check_dynsym): New.
1683 (elf_link_output_extsym): Use it.
1684 (bfd_elf_final_link): Likewise.
1685
580a2b6e
L
16862006-04-05 H.J. Lu <hongjiu.lu@intel.com>
1687
1688 PR ld/2404
1689 * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
1690 symbol from the dynamic definition with the default version if
1691 its type and the type of existing regular definition mismatch.
1692
910600e9
RS
16932006-04-05 Richard Sandiford <richard@codesourcery.com>
1694 Daniel Jacobowitz <dan@codesourcery.com>
1695
1696 * config.bfd (sparc-*-vxworks*): New stanza.
1697 * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
1698 (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
1699 * configure: Regenerate.
1700 * elf32-sparc.c: Include elf-vxworks.h.
1701 (elf32_sparc_vxworks_link_hash_table_create: New.
1702 (elf32_sparc_vxworks_final_write_processing): New.
1703 (TARGET_BIG_SYM): Override for VxWorks.
1704 (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
1705 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1706 (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
1707 (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
1708 (elf_backend_link_output_symbol_hook): Likewise.
1709 (elf_backend_emit_relocs): Likewise.
1710 (elf_backend_final_write_processing, elf32_bed): Likewise.
1711 * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
1712 (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
1713 (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
1714 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
1715 build_plt_entry here.
1716 (create_got_section): Initialize sgotplt for VxWorks.
1717 (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
1718 plt_header_size and plt_entry_size, with new VxWorks-specific settings.
1719 Call elf_vxworks_create_dynamic_sections for VxWorks.
1720 (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
1721 Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
1722 (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
1723 for VxWorks. Check for the .got.plt section.
1724 (sparc_vxworks_build_plt_entry): New function.
1725 (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
1726 Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
1727 absolute on VxWorks.
1728 (sparc32_finish_dyn): Add special handling for DT_RELASZ
1729 and DT_PLTGOT on VxWorks.
1730 (sparc_vxworks_finish_exec_plt): New.
1731 (sparc_vxworks_finish_shared_plt): New.
1732 (_bfd_sparc_elf_finish_dynamic_sections): Call them.
1733 Use plt_header_size and plt_entry_size.
1734 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
1735 srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
1736 * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
1737 (elf32-sparc.lo): Likewise.
1738 * Makefile.in: Regenerate.
1739 * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
1740 (_bfd_target_vector): Add a pointer to it.
1741
b761a207
BE
17422006-03-30 Ben Elliston <bje@au.ibm.com>
1743
1744 PR ld/2267
1745 * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
1746 special section number that exceeds the number of ELF sections
1747 (eg. SHN_MIPS_SCOMMON).
1748
ead49a57
RS
17492006-03-27 Richard Sandiford <richard@codesourcery.com>
1750
1751 * elfxx-mips.c (mips_got_entry): Add more commentary.
1752 (mips_elf_local_got_index): Use the hash table entry to record
1753 the GOT index of forced-local symbols.
1754 (mips_elf_initialize_tls_index): Rearrange code. Store the index
1755 in either the hash table entry or the mips_got_entry, not both.
1756 Add more commentary.
1757 (mips_elf_multi_got): Make sure the g->next is nonnull when calling
1758 mips_elf_initialize_tls_index.
1759
3b55e94a
BS
17602006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
1761
1762 * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
1763 RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
1764 reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
1765 bfin_areloc_howto_table): Delete. All
1766 uses deleted as well.
1767 (bfin_reloc_map): Delete all stack relocs.
1768 (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
1769 bfin_reloc_type_lookup): Don't support them.
1770 (bfin_relocate_section): Don't try to handle them.
1771
48d502e1
BS
1772 * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
1773 * configure.in: Likewise.
1774 * configure: Regenerate.
1775 * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
1776 (BFIN_RELOC_MAX): Now 0x21.
1777 (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
1778 (bfd_elf32_bfinfdpic_vec): Declare.
1779 (IS_FDPIC): New macro.
1780 (struct bfinfdpic_elf_link_hash_table): New struct.
1781 (bfinfdpic_hash_table, bfinfdpic_got_section,
1782 bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
1783 bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
1784 bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
1785 bfinfdpic_plt_initial_offset): Accessor macros for it.
1786 (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
1787 (struct bfinfdpic_relocs_info): New struct.
1788 (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
1789 BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
1790 DEFAULT_STACK_SIZE): New macros.
1791 (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
1792 bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
1793 bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
1794 bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
1795 _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
1796 _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
1797 bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
1798 _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
1799 elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
1800 _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
1801 _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
1802 _bfinfdpic_resolve_final_relocs_info,
1803 elf32_bfinfdpic_size_dynamic_sections,
1804 elf32_bfinfdpic_always_size_sections,
1805 elf32_bfinfdpic_modify_segment_map,
1806 _bfinfdpic_count_got_plt_entries,
1807 elf32_bfinfdpic_finish_dynamic_sections,
1808 elf32_bfinfdpic_adjust_dynamic_symbol,
1809 elf32_bfinfdpic_finish_dynamic_symbol,
1810 elf32_bfinfdpic_elf_use_relative_eh_frame,
1811 elf32_bfinfdpic_elf_encode_eh_address,
1812 elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
1813 elf32_bfinfdpic_copy_private_bfd_data,
1814 (struct _bfinfdpic_dynamic_got_info,
1815 struct _bfinfdpic_dynamic_got_plt_info): New structs.
1816 (elf32_bfin_print_private_bfd_data): Print PIC flags.
1817 (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
1818 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
1819 elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
1820 elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
1821 bfd_elf32_bfd_copy_private_bfd_data,
1822 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
1823 elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
1824 elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
1825 elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
1826 elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
1827 elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
1828 elf_backend_omit_section_dynsym): Redefine these macros and include
1829 "elf32-target.h" again to create the elf32-bfinfdpic target.
1830 * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
1831 BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
1832 BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
1833 BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
1834 BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
1835 BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
1836 BFD_RELOC_BFIN_GOTOFFLO): New.
1837 * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
1838 (_bfd_target_vector): Add it.
1839 * bfd-in2.h: Regenerate.
1840 * libbfd.h: Regenerate.
1841
a9d34880
RS
18422006-03-25 Richard Sandiford <richard@codesourcery.com>
1843
1844 * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
1845 incompatible. Likewise MAC and EMAC code.
1846 * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
1847 bfd_get_compatible to set the new bfd architecture. Rely on it
1848 to detect incompatibilities.
1849
9ca26584
AJ
18502006-03-23 Michael Matz <matz@suse.de>
1851
1852 * reloc.c: Add BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64,
1853 BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64,
1854 BFD_RELOC_X86_64_PLTOFF64.
1855 * bfd-in2.h: Regenerated.
1856 * libbfd.h: Regenerated.
1857 * elf64-x86-64.c (x86_64_elf_howto_table): Correct comment.
1858 Add howtos for above relocs.
1859 (x86_64_reloc_map): Add mappings for new relocs.
1860 (elf64_x86_64_check_relocs): R_X86_64_GOT64, R_X86_64_GOTPCREL64,
1861 R_X86_64_GOTPLT64 need a got entry. R_X86_64_GOTPLT64 also a PLT
1862 entry. R_X86_64_GOTPC64 needs a .got section. R_X86_64_PLTOFF64
1863 needs a PLT entry.
1864 (elf64_x86_64_gc_sweep_hook): Reflect changes from
1865 elf64_x86_64_check_relocs for the new relocs.
1866 (elf64_x86_64_relocate_section): Handle new relocs.
1867
2a23c2c5
BW
18682006-03-22 Bob Wilson <bob.wilson@acm.org>
1869
1870 * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
1871 rel->r_addend is zero.
1872
6d79d2ed
RS
18732006-03-22 Richard Sandiford <richard@codesourcery.com>
1874
1875 * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
1876 of "loc".
1877
0a44bf69
RS
18782006-03-22 Richard Sandiford <richard@codesourcery.com>
1879 Daniel Jacobowitz <dan@codesourcery.com>
1880 Phil Edwards <phil@codesourcery.com>
1881 Zack Weinberg <zack@codesourcery.com>
1882 Mark Mitchell <mark@codesourcery.com>
1883 Nathan Sidwell <nathan@codesourcery.com>
1884
1885 * bfd-in2.h: Regenerate.
1886 * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
1887 * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
1888 (bfd_elf32_littlemips_vxworks_vec): Likewise.
1889 (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
1890 (bfd_elf32_littlemips_vec): Likewise.
1891 (bfd_elf32_nbigmips_vec): Likewise.
1892 (bfd_elf32_nlittlemips_vec): Likewise.
1893 (bfd_elf32_ntradbigmips_vec): Likewise.
1894 (bfd_elf32_ntradlittlemips_vec): Likewise.
1895 (bfd_elf32_tradbigmips_vec): Likewise.
1896 (bfd_elf32_tradlittlemips_vec): Likewise.
1897 (bfd_elf64_bigmips_vec): Likewise.
1898 (bfd_elf64_littlemips_vec): Likewise.
1899 (bfd_elf64_tradbigmips_vec): Likewise.
1900 (bfd_elf64_tradlittlemips_vec): Likewise.
1901 * elf32-mips.c: Include elf-vxworks.h.
1902 (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
1903 instead of calling mips_elf32_rtype_to_howto directly.
1904 (mips_vxworks_copy_howto_rela): New reloc howto.
1905 (mips_vxworks_jump_slot_howto_rela): Likewise.
1906 (mips_vxworks_bfd_reloc_type_lookup): New function.
1907 (mips_vxworks_rtype_to_howto): Likewise.
1908 (mips_vxworks_final_write_processing): Likewise.
1909 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
1910 (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
1911 (elf_backend_want_got_plt): Likewise.
1912 (elf_backend_want_plt_sym): Likewise.
1913 (elf_backend_got_symbol_offset): Likewise.
1914 (elf_backend_want_dynbss): Likewise.
1915 (elf_backend_may_use_rel_p): Likewise.
1916 (elf_backend_may_use_rela_p): Likewise.
1917 (elf_backend_default_use_rela_p): Likewise.
1918 (elf_backend_got_header_size: Likewise.
1919 (elf_backend_plt_readonly): Likewise.
1920 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
1921 (elf_backend_mips_rtype_to_howto): Likewise.
1922 (elf_backend_adjust_dynamic_symbol): Likewise.
1923 (elf_backend_finish_dynamic_symbol): Likewise.
1924 (bfd_elf32_bfd_link_hash_table_create): Likewise.
1925 (elf_backend_add_symbol_hook): Likewise.
1926 (elf_backend_link_output_symbol_hook): Likewise.
1927 (elf_backend_emit_relocs): Likewise.
1928 (elf_backend_final_write_processing: Likewise.
1929 (elf_backend_additional_program_headers): Likewise.
1930 (elf_backend_modify_segment_map): Likewise.
1931 (elf_backend_symbol_processing): Likewise.
1932 * elfxx-mips.c: Include elf-vxworks.h.
1933 (mips_elf_link_hash_entry): Add is_relocation_target and
1934 is_branch_target fields.
1935 (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
1936 srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
1937 (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
1938 (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
1939 Return 3 for VxWorks.
1940 (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
1941 mips_elf_link_hash_table. Return 0 for VxWorks.
1942 (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
1943 mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
1944 (mips_vxworks_exec_plt0_entry): New variable.
1945 (mips_vxworks_exec_plt_entry): Likewise.
1946 (mips_vxworks_shared_plt0_entry): Likewise.
1947 (mips_vxworks_shared_plt_entry): Likewise.
1948 (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
1949 (mips_elf_rel_dyn_section): Change the bfd argument to a
1950 mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
1951 the name of the section.
1952 (mips_elf_initialize_tls_slots): Update the call to
1953 mips_elf_rel_dyn_section.
1954 (mips_elf_gotplt_index): New function.
1955 (mips_elf_local_got_index): Add an input_section argument.
1956 Update the call to mips_elf_create_local_got_entry.
1957 (mips_elf_got_page): Likewise.
1958 (mips_elf_got16_entry): Likewise.
1959 (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
1960 arguments. Create dynamic relocations for each entry on VxWorks.
1961 (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
1962 (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
1963 and MIPS_RESERVED_GOTNO.
1964 (mips_elf_create_got_section): Update the uses of
1965 MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
1966 (is_gott_symbol): New function.
1967 (mips_elf_calculate_relocation): Use a dynobj local variable.
1968 Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
1969 mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
1970 VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
1971 relocations on VxWorks. Add dynamic relocations for references
1972 to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
1973 create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
1974 in VxWorks executables.
1975 (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
1976 Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
1977 Don't allocate a null entry on VxWorks.
1978 (mips_elf_create_dynamic_relocation): Update the call to
1979 mips_elf_rel_dyn_section. Use absolute rather than relative
1980 relocations for VxWorks, and make them RELA rather than REL.
1981 (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
1982 read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
1983 Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
1984 VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
1985 Call elf_vxworks_create_dynamic_sections for VxWorks and
1986 initialize the plt_header_size and plt_entry_size fields.
1987 (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
1988 used in VxWorks executables. Don't allocate dynamic relocations
1989 for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
1990 Set is_relocation_target for each symbol referenced by a relocation.
1991 Allocate .rela.dyn entries for relocations against the special
1992 VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
1993 entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
1994 a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
1995 R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
1996 to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
1997 Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
1998 relocations. Don't set no_fn_stub on VxWorks.
1999 (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
2000 mips_elf_allocate_dynamic_relocations.
2001 (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
2002 (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
2003 entries for VxWorks, and do not create multiple GOTs.
2004 (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
2005 Handle .got specially for VxWorks. Update the uses of
2006 MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
2007 Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
2008 once its final size is known. Set DF_TEXTREL for VxWorks. Add
2009 DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
2010 tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
2011 (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
2012 (mips_vxworks_finish_exec_plt): Likewise.
2013 (mips_vxworks_finish_shared_plt): Likewise.
2014 (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
2015 to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
2016 DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
2017 DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
2018 and mips_elf_rel_dyn_section. Use a different GOT header for
2019 VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
2020 (_bfd_mips_elf_link_hash_table_create): Initialize the new
2021 mips_elf_link_hash_table fields.
2022 (_bfd_mips_vxworks_link_hash_table_create): New function.
2023 (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
2024 on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
2025 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
2026 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
2027 (_bfd_mips_vxworks_link_hash_table_create): Likewise.
2028 * libbfd.h: Regenerate.
2029 * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
2030 (elf32-mips.lo): Likewise.
2031 * Makefile.in: Regenerate.
2032 * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
2033 * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
2034 (bfd_elf32_littlemips_vxworks_vec): Likewise.
2035 (_bfd_target_vector): Add entries for them.
2036
a2199086
DA
20372006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2038
2039 * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
2040 section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
2041 (elf_backend_special_sections): Remove #undef.
2042
af7cfa33
DA
20432006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2044
2045 * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
2046 for undefined weak symbols.
2047
a4676736
L
20482006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2049
2050 PR ld/2462
2051 * elflink.c (bfd_elf_final_link): Remove
2052 bed->elf_backend_emit_relocs from emit_relocs.
2053
e1710606
AO
20542006-03-17 Alexandre Oliva <aoliva@redhat.com>
2055
2056 * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
2057 first relocation to the second when relaxing TLS GD to LE;
2058 zero it out when relaxing to IE.
2059
2de92251
AM
20602006-03-17 Alan Modra <amodra@bigpond.net.au>
2061
2062 PR 2434
2063 * elflink.c (elf_link_add_object_symbols): Save and restore
2064 warning sym's linked sym.
2065
66eb6687
AM
20662006-03-16 Alan Modra <amodra@bigpond.net.au>
2067
2068 PR 2434
2069 * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
2070 (elf_link_add_object_symbols): Delete unnecessary locals. Rename
2071 hash_table -> htab. Formatting. Save entire symbol table
2072 before loading as-needed syms, and restore afterwards if lib not
2073 needed. Use bfd_hash_allocate rather than bfd_alloc for sym
2074 name. Free some buffers earlier.
2075 * bfd-in.h (struct bfd_hash_table): Add entsize.
2076 (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
2077 * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
2078 * hash.c (bfd_hash_table_init_n): Add entsize param, save to
2079 hash table.
2080 (bfd_hash_table_init): Add param, adjust calls.
2081 * aoutx.h: Adjust all hash_table_init functions and calls.
2082 * bfd.c: Likewise.
2083 * coff-arm.c: Likewise.
2084 * coff-h8300.c: Likewise.
2085 * coff-ppc.c: Likewise.
2086 * cofflink.c: Likewise.
2087 * ecoff.c: Likewise.
2088 * ecofflink.c: Likewise.
2089 * elf-m10300.c: Likewise.
2090 * elf-strtab.c: Likewise.
2091 * elf.c: Likewise.
2092 * elf32-arm.c: Likewise.
2093 * elf32-bfin.c: Likewise.
2094 * elf32-cris.c: Likewise.
2095 * elf32-frv.c: Likewise.
2096 * elf32-hppa.c: Likewise.
2097 * elf32-i386.c: Likewise.
2098 * elf32-m32r.c: Likewise.
2099 * elf32-m68hc1x.c: Likewise.
2100 * elf32-m68k.c: Likewise.
2101 * elf32-ppc.c: Likewise.
2102 * elf32-s390.c: Likewise.
2103 * elf32-sh.c: Likewise.
2104 * elf32-vax.c: Likewise.
2105 * elf64-alpha.c: Likewise.
2106 * elf64-hppa.c: Likewise.
2107 * elf64-ppc.c: Likewise.
2108 * elf64-s390.c: Likewise.
2109 * elf64-sh64.c: Likewise.
2110 * elf64-x86-64.c: Likewise.
2111 * elfxx-ia64.c: Likewise.
2112 * elfxx-mips.c: Likewise.
2113 * elfxx-sparc.c: Likewise.
2114 * i386linux.c: Likewise.
2115 * libaout.h: Likewise.
2116 * libbfd-in.h: Likewise.
2117 * libcoff-in.h: Likewise.
2118 * linker.c: Likewise.
2119 * m68klinux.c: Likewise.
2120 * merge.c: Likewise.
2121 * opncls.c: Likewise.
2122 * pdp11.c: Likewise.
2123 * sparclinux.c: Likewise.
2124 * stabs.c: Likewise.
2125 * sunos.c: Likewise.
2126 * vms.c: Likewise.
2127 * xcofflink.c: Likewise.
2128 * section.c (struct section_hash_entry): Move to..
2129 * libbfd-in.h: ..here.
2130 * Makefile.am: Run "make dep-am"
2131 * Makefile.in: Regenerate.
2132 * bfd-in2.h: Regenerate.
2133 * libbfd.h: Regenerate.
2134 * libcoff.h: Regenerate.
2135
7123df0e
AM
21362006-03-16 Alan Modra <amodra@bigpond.net.au>
2137
2138 * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
2139 against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
2140 last change to REL32 relocs so that they are counted as
2141 possibly dynamic as per REL24 and REL14.
2142
fd38b44c
AM
21432006-03-16 Alan Modra <amodra@bigpond.net.au>
2144
2145 * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
2146 checks from REL32.
2147
eb111b1f
BE
21482006-03-15 Ben Elliston <bje@au.ibm.com>
2149
2150 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
2151 in_list elements, not just the first.
2152
81d43bff
RS
21532006-03-14 Richard Sandiford <richard@codesourcery.com>
2154
2155 * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
2156 out from...
2157 (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
2158 for final links too.
2159
d329bcd1
RS
21602006-03-13 Richard Sandiford <richard@codesourcery.com>
2161
2162 * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
2163
75a657ba
L
21642006-03-11 H.J. Lu <hongjiu.lu@intel.com>
2165
2166 PR ld/2443
241a6c40 2167 * dwarf2.c (concat_filename): Don't issue an error if file is 0.
75a657ba 2168
3a4a14e9
PB
21692006-03-10 Paul Brook <paul@codesourcery.com>
2170
2171 * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
2172 (elf32_arm_print_private_bfd_data): Ditto.
2173
38406048
PB
21742006-03-09 Paul Brook <paul@codesourcery.com>
2175
2176 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
2177 mapping symbols.
2178
eed62c48
NC
21792006-03-09 Khem Raj <khem@mvista.com>
2180
2181 * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
2182 char type.
2183
6d2cf7d8
L
21842006-03-08 H.J. Lu <hongjiu.lu@intel.com>
2185
2186 * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
2187
00a97672
RS
21882006-03-07 Richard Sandiford <richard@codesourcery.com>
2189 Daniel Jacobowitz <dan@codesourcery.com>
2190 Zack Weinberg <zack@codesourcery.com>
2191 Nathan Sidwell <nathan@codesourcery.com>
2192 Paul Brook <paul@codesourcery.com>
2193 Ricardo Anguiano <anguiano@codesourcery.com>
2194 Phil Edwards <phil@codesourcery.com>
2195
2196 * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
2197 (bfd_elf32_bigarm_symbian_vec): Likewise.
2198 (bfd_elf32_bigarm_vxworks_vec): Likewise.
2199 (bfd_elf32_littlearm_vec): Likewise.
2200 (bfd_elf32_littlearm_symbian_vec): Likewise.
2201 (bfd_elf32_littlearm_vxworks_vec): Likewise.
2202 * configure: Regenerate.
2203 * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
2204 (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
2205 (elf32_arm_vxworks_bed): Add forward declaration.
2206 (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
2207 (elf32_arm_vxworks_exec_plt0_entry): New table.
2208 (elf32_arm_vxworks_exec_plt_entry): Likewise.
2209 (elf32_arm_vxworks_shared_plt_entry): Likewise.
2210 (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
2211 (reloc_section_p): New function.
2212 (create_got_section): Use RELOC_SECTION.
2213 (elf32_arm_create_dynamic_sections): Likewise. Call
2214 elf_vxworks_create_dynamic_sections for VxWorks targets.
2215 Choose between the two possible values of plt_header_size
2216 and plt_entry_size.
2217 (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
2218 (elf32_arm_abs12_reloc): New function.
2219 (elf32_arm_final_link_relocate): Call it. Allow the creation of
2220 dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
2221 RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
2222 r_addend fields of relocs. On rela targets, skip any code that
2223 adjusts in-place addends. When using _bfd_link_final_relocate
2224 to perform a final relocation, pass rel->r_addend as the addend
2225 argument.
2226 (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
2227 object, ignore flags that are not standard on VxWorks.
2228 (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
2229 relocs on VxWorks. Use reloc_section_p.
2230 (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
2231 (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
2232 .rela.plt.unloaded relocs on VxWorks targets.
2233 (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
2234 .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
2235 instead of DT_REL* tags on RELA targets.
2236 (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
2237 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
2238 PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
2239 (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
2240 and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
2241 like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
2242 Correct the .rela.plt.unreloaded symbol indexes.
2243 (elf32_arm_output_symbol_hook): Call the VxWorks version of this
2244 hook on VxWorks targets.
2245 (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
2246 Minor formatting tweak.
2247 (elf32_arm_vxworks_final_write_processing): New function.
2248 (elf_backend_add_symbol_hook): Override for VxWorks and reset
2249 for Symbian.
2250 (elf_backend_final_write_processing): Likewise.
2251 (elf_backend_emit_relocs): Likewise.
2252 (elf_backend_want_plt_sym): Likewise.
2253 (ELF_MAXPAGESIZE): Likewise.
2254 (elf_backend_may_use_rel_p): Minor formatting tweak.
2255 (elf_backend_may_use_rela_p): Likewise.
2256 (elf_backend_default_use_rela_p): Likewise.
2257 (elf_backend_rela_normal): Likewise.
2258 * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
2259
0b2e31dc
NS
22602006-03-06 Nathan Sidwell <nathan@codesourcery.com>
2261
2262 * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
2263 New. Adjust other variants.
2264 (bfd_default_scan): Update.
2265 * bfd-in2.h: Rebuilt.
2266 * cpu-m68k.c: Adjust.
2267 (bfd_m68k_compatible): New. Use it for architectures.
2268 * elf32-m68k.c (elf32_m68k_object_p): Adjust.
2269 (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
2270 mismatch.
2271 (elf32_m68k_print_private_bfd_data): Adjust.
2272 * ieee.c (ieee_write_processor): Adjust.
2273
d8d1c398
AM
22742006-03-06 Alan Modra <amodra@bigpond.net.au>
2275
2276 * dwarf2.c: Formatting.
2277 (add_line_info): Remove outer loop.
2278
d4c32a81
L
22792006-03-05 H.J. Lu <hongjiu.lu@intel.com>
2280 Alan Modra <amodra@bigpond.net.au>
2281
2282 PR binutils/2338
2283 * dwarf2.c (loadable_section): New struct.
2284 (dwarf2_debug): Add loadable_section_count and
2285 loadable_sections.
2286 (new_line_sorts_after): New.
2287 (add_line_info): Use new_line_sorts_after to compare line
2288 addresses.
2289 (check_function_name): Removed.
2290 (unset_sections): New.
2291 (place_sections): New.
2292 (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
2293 and unset_sections on relocatable files.
2294 (_bfd_dwarf2_find_line): Likewise.
2295
4cdc7696
NC
22962006-03-03 Nick Clifton <nickc@redhat.com>
2297
2298 * cpu-avr.c: Update to ISO-C90 formatting.
2299 * elf32-avr.c: Likewise.
2300
df406460
NC
23012006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
2302
2303 * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
2304 and R_AVR_MS8_LDI
2305 (bfd_elf_avr_final_write_processing): Set
2306 EF_AVR_LINKRELAX_PREPARED in e_flags field.
2307 (elf32_avr_relax_section): New function.
2308 (elf32_avr_relax_delete_bytes): New function.
2309 (elf32_avr_get_relocated_section_contents): New function.
2310 (avr_pc_wrap_around): New function.
2311 (avr_relative_distance_considering_wrap_around): New function.
2312 (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
2313 * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
2314 * libbfd.h: Regenerate.
2315 * bfd-in2.h: Regenerate.
2316
a1013894
DD
23172006-03-02 DJ Delorie <dj@redhat.com>
2318
2319 * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
2320 calculations.
2321
7c492719
RS
23222006-03-02 Richard Sandiford <richard@codesourcery.com>
2323
2324 * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
2325 bfd_elf32_powerpc_vxworks_vec.
2326
e970df31
NC
23272006-03-02 Nick Clifton <nickc@redhat.com>
2328
2329 * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
2330
711de32c
RS
23312006-03-02 Richard Sandiford <richard@codesourcery.com>
2332
2333 * elf32-i386.c (elf_i386_create_dynamic_sections): Use
2334 elf_vxworks_create_dynamic_sections.
2335 (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
2336 symbol handling.
2337 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
2338 elf_vxworks_create_dynamic_sections.
2339 (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
2340 symbol handling.
2341 * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
2342 * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
2343
9c72ff84
RS
23442006-03-02 Richard Sandiford <richard@codesourcery.com>
2345
2346 * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
2347 (elf_backend_link_output_symbol_hook): Use
2348 elf_vxworks_link_output_symbol_hook instead.
2349 * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
2350 (elf_backend_link_output_symbol_hook): Use
2351 elf_vxworks_link_output_symbol_hook instead.
2352 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
2353 same interface as elf_backend_link_output_symbol_hook.
2354 * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
2355 prototype accordingly.
2356
4a3dc543
RS
23572006-03-02 Richard Sandiford <richard@codesourcery.com>
2358
2359 * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
2360 (ppc_elf_link_hash_table): Replace old_got and new_got with
2361 plt_type and can_use_new_plt.
2362 (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
2363 SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
2364 (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
2365 Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
2366 (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
2367 either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
2368 this function should not be called for VxWorks targets.
2369 (ppc_elf_tls_setup): Use plt_type instead of old_got.
2370 (allocate_got): Likewise. Rearrange so that max_before_header
2371 is only used for PLT_OLD and PLT_NEW.
2372 (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
2373 (ppc_elf_size_dynamic_sections): Likewise.
2374 (ppc_elf_relax_section): Likewise.
2375 (ppc_elf_relocate_section): Likewise.
2376 (ppc_elf_finish_dynamic_symbol): Likewise.
2377 (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
2378
5ae0bfb6
RS
23792006-02-28 Richard Sandiford <richard@codesourcery.com>
2380
2381 * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
2382 (elf_i386_link_hash_table_create): Initialize it.
2383 (elf_i386_compute_jump_table_size): Use it instead of
2384 srelplt->reloc_count.
2385 (allocate_dynrelocs): Likewise.
2386 (elf_i386_size_dynamic_sections): Likewise.
2387 (elf_i386_relocate_section): Likewise.
2388
63752a75
JJ
23892006-02-27 Jakub Jelinek <jakub@redhat.com>
2390
2391 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
2392 (_bfd_elf_write_section_eh_frame): Likewise.
2393
f7d9e5c3
CD
23942006-02-27 Carlos O'Donell <carlos@codesourcery.com>
2395
2396 * po/Make-in: Add html target.
2397
22edb2f1
RS
23982006-02-27 Richard Sandiford <richard@codesourcery.com>
2399
2400 * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
2401 cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
2402 * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
2403 * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
2404 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
2405 * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
2406 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
2407 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
2408 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
2409 * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
2410 * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
2411 * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
2412 * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
2413 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
2414 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
2415 * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
2416 the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
2417 * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
2418 * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
2419 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
2420 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2421
7325306f
RS
24222006-02-25 Richard Sandiford <richard@codesourcery.com>
2423
2424 * elf-bfd.h (elf_link_hash_table): Add hplt field.
2425 * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
2426 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2427 * elf32-frv.c (_frv_create_got_section): Likewise.
2428 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
2429 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2430 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2431 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
2432 * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
2433 (elf_i386_link_hash_table_create): Don't initialize them.
2434 (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
2435 hgot fields.
2436 (elf_i386_finish_dynamic_symbol): Likewise.
2437 * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
2438 (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
2439 (ppc_elf_finish_dynamic_symbol): Likewise.
2440
6772dd07
DD
24412006-02-24 DJ Delorie <dj@redhat.com>
2442
2443 * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
2444 (m32c_elf_relocate_section): Don't relocate them.
2445 (compare_reloc): New.
2446 (relax_reloc): Remove.
2447 (m32c_offset_for_reloc): New.
2448 (m16c_addr_encodings): New.
2449 (m16c_jmpaddr_encodings): New.
2450 (m32c_addr_encodings): New.
2451 (m32c_elf_relax_section): Relax jumps and address displacements.
2452 (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
2453 short jumps.
2454
2455 * reloc.c: Add m32c relax relocs.
2456 * libbfd.h: Regenerate.
2457 * bfd-in2.h: Regenerate.
2458
508c3946
L
24592006-02-24 H.J. Lu <hongjiu.lu@intel.com>
2460
2461 PR ld/2218
2462 * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
2463 (_bfd_elf_link_hash_fixup_symbol): New.
2464
2465 * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
2466 (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
2467 it isn't NULL.
2468
2469 * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
2470
2471 * elfxx-target.h (elf_backend_fixup_symbol): New.
2472 (elfNN_bed): Initialize elf_backend_fixup_symbol.
2473
59cf82fe
L
24742006-02-23 H.J. Lu <hongjiu.lu@intel.com>
2475
2476 * cpu-ia64-opc.c (ins_immu5b): New.
2477 (ext_immu5b): Likewise.
2478 (elf64_ia64_operands): Add IMMU5b.
2479
22d606e9
AM
24802006-02-21 Alan Modra <amodra@bigpond.net.au>
2481
2482 PR ld/2218
2483 * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
2484 is dynamic.
2485 * elf32-hppa.c (allocate_dynrelocs): Likewise.
2486 * elf32-i386.c (allocate_dynrelocs): Likewise.
2487 * elf32-s390.c (allocate_dynrelocs): Likewise.
2488 * elf32-sh.c (allocate_dynrelocs): Likewise.
2489 * elf64-s390.c (allocate_dynrelocs): Likewise.
2490 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2491 * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
2492 on undef weak with non-default visibility too.
2493 * elfxx-sparc.c (allocate_dynrelocs): Ditto.
2494
3168356f
AM
24952006-02-21 Alan Modra <amodra@bigpond.net.au>
2496
2497 * bfd.c: (_bfd_default_error_handler): Don't call abort on
2498 error, instead call _exit.
2499 (_bfd_abort): Call _exit not xexit.
2500
888b45b8
KB
25012006-02-17 Kevin Buettner <kevinb@redhat.com>
2502
2503 * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
2504 New functions.
2505 * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2506
d70c5fc7
NC
25072006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
2508 Anil Paranjape <anilp1@kpitcummins.com>
2509 Shilin Shakti <shilins@kpitcummins.com>
2510
2511 * Makefile.am: Add xc16x related entry
2512 * Makefile.in: Regenerate
2513 * archures.c: Add bfd_xc16x_arch
2514 * bfd-in2.h: Regenerate
2515 * config.bfd: Add xc16x-*-elf
2516 * configure.in: Add bfd_elf32_xc16x_vec
2517 * configure: Regenerate.
2518 * targets.c: Added xc16x related information
2519 * cpu-xc16x.c: New file
2520 * reloc.c: Add new relocations specific to xc16x:
2521 BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
2522 BFD_RELOC_XC16X_SOF
2523 * elf32-xc16x.c: New file.
2524
cab87ef9
AM
25252006-02-17 Alan Modra <amodra@bigpond.net.au>
2526
2527 * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
2528 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2529
dfbb6ac9
AM
25302006-02-17 Alan Modra <amodra@bigpond.net.au>
2531
2532 PR ld/2218
2533 * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
2534 dynamic.
2535 (ppc64_elf_relocate_section): Check output reloc section size.
2536 * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
2537
cedc298e
L
25382006-02-16 H.J. Lu <hongjiu.lu@intel.com>
2539
2540 PR ld/2322
2541 * elf.c (get_segment_type): New function.
2542 (_bfd_elf_print_private_bfd_data): Use it.
2543 (print_segment_map): New function.
2544 (assign_file_positions_for_segments): Call print_segment_map
2545 when there are not enough room for program headers.
2546
aaa2ab3d
NH
25472006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
2548
2549 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
2550 traditional MIPS ELF targets.
2551
35ccda9e
L
25522006-02-15 H.J. Lu <hongjiu.lu@intel.com>
2553
2554 PR binutils/2338
2555 * dwarf2.c (check_function_name): New function.
2556 (_bfd_dwarf2_find_nearest_line): Use check_function_name to
2557 check if function is correct.
2558
e0ae6d6f
AM
25592006-02-16 Alan Modra <amodra@bigpond.net.au>
2560
2561 * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
2562 debug sections.
2563 (elf_link_input_bfd): Adjust comments.
2564
d55ce4e2
L
25652006-02-10 H.J. Lu <hongjiu.lu@intel.com>
2566
2567 * elf.c (copy_private_bfd_data): Minor update.
2568
84d1d650
L
25692006-02-10 H.J. Lu <hongjiu.lu@intel.com>
2570
2571 PR binutils/2258
2572 * elf.c (copy_private_bfd_data): Renamed to ...
2573 (rewrite_elf_program_header): This.
2574 (copy_elf_program_header): New function.
2575 (copy_private_bfd_data): Likewise.
2576
25772006-02-07 Nathan Sidwell <nathan@codesourcery.com>
266abb8f
NS
2578
2579 * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
2580 bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
2581 bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
2582 bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
2583 (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
2584 bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
2585 bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
2586 bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
2587 bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
2588 bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
2589 bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
2590 bfd_mach_mcf_isa_b_usp_float_emac): New.
2591 (bfd_default_scan): Update coldfire mapping.
2592 * bfd-in.h (bfd_m68k_mach_to_features,
2593 bfd_m68k_features_to_mach): Declare.
2594 * bfd-in2.h: Rebuilt.
2595 * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
2596 adjust legacy names.
2597 (m68k_arch_features): New.
2598 (bfd_m68k_mach_to_features,
2599 bfd_m68k_features_to_mach): Define.
2600 * elf32-m68k.c (elf32_m68k_object_p): New.
2601 (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
2602 (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
2603 (elf_backend_object_p): Define.
2604 * ieee.c (ieee_write_processor): Update coldfire machines.
2605 * libbfd.h: Rebuilt.
2606
75eb734c
SE
26072006-02-06 Steve Ellcey <sje@cup.hp.com>
2608
2609 * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
2610 if SHF_TLS is set.
2611
134dcee5
AM
26122006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
2613
2614 * coff-z80.c (r_imm24): New howto.
2615 (rtype2howto): New case R_IMM24.
2616 (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
2617 (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
2618
4005427f
RS
26192006-02-04 Richard Sandiford <richard@codesourcery.com>
2620
2621 * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
2622 has already been assigned a GOT index, copy that index to the
2623 current hash table entry.
2624
bb29dfea
EB
26252006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
2626
2627 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
2628 for call-to-undefweak reloc overflow.
2629
dc669dc8
EB
26302006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2631
2632 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
2633 for 32-bit relocs overflow.
2634
1a0eb693
PB
26352006-01-27 Paul Brook <paul@codesourcery.com>
2636
2637 * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
2638 objects.
2639
67a4f2b7
AO
26402006-01-18 Alexandre Oliva <aoliva@redhat.com>
2641
2642 Introduce TLS descriptors for i386 and x86_64.
2643 * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
2644 BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
2645 BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
2646 * libbfd.h, bfd-in2.h: Rebuilt.
2647 * elf32-i386.c (elf_howto_table): New relocations.
2648 (R_386_tls): Adjust.
2649 (elf_i386_reloc_type_lookup): Map new relocations.
2650 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
2651 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
2652 (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
2653 (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
2654 (elf_i386_local_tlsdesc_gotent): New macro.
2655 (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
2656 (elf_i386_compute_jump_table_size): New macro.
2657 (link_hash_newfunc): Initialize tlsdesc_got.
2658 (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
2659 (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
2660 R_386_TLS_DESC_CALL.
2661 (elf_i386_check_relocs): Likewise. Allocate space for
2662 local_tlsdesc_gotent.
2663 (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
2664 R_386_TLS_DESC_CALL.
2665 (allocate_dynrelocs): Count function PLT relocations. Reserve
2666 space for TLS descriptors and relocations.
2667 (elf_i386_size_dynamic_sections): Reserve space for TLS
2668 descriptors and relocations. Set up sgotplt_jump_table_size.
2669 Don't zero reloc_count in srelplt.
2670 (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
2671 (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
2672 R_386_TLS_DESC_CALL.
2673 (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
2674 (elf_backend_always_size_sections): Define.
2675 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
2676 R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
2677 (R_X86_64_standard): Adjust.
2678 (x86_64_reloc_map): Map new relocs.
2679 (elf64_x86_64_rtype_to_howto): New, split out of...
2680 (elf64_x86_64_info_to_howto): ... this function, and...
2681 (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
2682 (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
2683 (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
2684 (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
2685 (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
2686 (elf64_x86_64_local_tlsdesc_gotent): New macro.
2687 (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
2688 tlsdesc_got and sgotplt_jump_table_size fields.
2689 (elf64_x86_64_compute_jump_table_size): New macro.
2690 (link_hash_newfunc): Initialize tlsdesc_got.
2691 (elf64_x86_64_link_hash_table_create): Initialize new fields.
2692 (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
2693 R_X86_64_TLSDESC_CALL.
2694 (elf64_x86_64_check_relocs): Likewise. Allocate space for
2695 local_tlsdesc_gotent.
2696 (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
2697 R_X86_64_TLSDESC_CALL.
2698 (allocate_dynrelocs): Count function PLT relocations. Reserve
2699 space for TLS descriptors and relocations.
2700 (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
2701 descriptors and relocations. Set up sgotplt_jump_table_size,
2702 tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
2703 reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
2704 and DT_TLSDESC_GOT.
2705 (elf64_x86_64_always_size_sections): New. Set up
2706 _TLS_MODULE_BASE_.
2707 (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
2708 R_386_TLS_DESC_CALL.
2709 (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
2710 (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
2711 DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
2712 (elf_backend_always_size_sections): Define.
2713
6dd55cb7
L
27142006-01-17 H.J. Lu <hongjiu.lu@intel.com>
2715
2716 PR binutils/2096
2717 * dwarf2.c (comp_unit_contains_address): Update comment.
2718 (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
2719 lma. Return TRUE only if both comp_unit_contains_address and
2720 comp_unit_find_nearest_line return TRUE.
2721 (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
2722
64d03ab5
AM
27232006-01-18 Alan Modra <amodra@bigpond.net.au>
2724
2725 * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
2726 (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
2727 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
2728 elf_gc_mark_dynamic_ref_symbol. Make global.
2729 (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
2730 * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
2731 (elfNN_bed): Init new field.
2732 * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
2733 (ppc64_elf_gc_mark_dynamic_ref): New function.
2734
b56cbdb9
AM
27352006-01-17 Alan Modra <amodra@bigpond.net.au>
2736
2737 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
2738
6c10990d
NC
27392006-01-17 Nick Clifton <nickc@redhat.com>
2740
2741 PR binutils/2159
2742 * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
2743 parameters.
2744
d7f735da
NC
27452006-01-11 Nick Clifton <nickc@redhat.com>
2746
2747 * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
2748 into the newly (re)allocated map array.
2749
2bfd55ca
NC
27502006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
2751
2752 * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
2753
bce50a28
JJ
27542006-01-01 Jakub Jelinek <jakub@redhat.com>
2755
2756 * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
2757 for .toc1 section.
2758
e88d958a 2759For older changes see ChangeLog-2005
56882138
AM
2760\f
2761Local Variables:
2762mode: change-log
2763left-margin: 8
2764fill-column: 74
2765version-control: never
2766End:
This page took 0.477782 seconds and 4 git commands to generate.