2004-04-30 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
20f0a1ad
AM
12004-04-30 Alan Modra <amodra@bigpond.net.au>
2
3 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
4
f7458fc9 52004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6
7 * configure.in: Update version to 2.15.91.
8 * configure: Regenerate.
9
8a7140c3
NC
102004-04-29 Brian Ford <ford@vss.fsi.com>
11
12 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
13 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
14 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
15 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
16 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
17 .gnu.linkonce.wi. sections.
18 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
19 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
20 .gnu.linkonce.wi..
21 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
22 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
23
3e722fb5
CD
242004-04-28 Chris Demetriou <cgd@broadcom.com>
25
26 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
27 * bfd-in2.h: Regenerate.
28 * libbfd.h: Likewise.
29
351e2b5a
DA
302004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
31
32 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
33 dup_common fields.
34 (setup_sections): Use som_subspace_dictionary_record struct instead
35 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
36 is_comdat, is_common or dup_common.
37 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
38 is_comdat, is_common and dup_common in section subspace_dict from
39 copy_data.
40 (som_begin_writing): Use som_subspace_dictionary_record struct.
41 (som_finish_writing): Likewise.
42 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
43 is_common and dup_common flags in info for symbol. Add comment
44 regarding linker support for these fields. Slightly reorganize
45 function.
46 (som_build_and_write_symbol_table): Set is_comdat, is_common and
47 dup_common fields in symbol table from symbol info.
48 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
49 arguments. Set corresponding fields in copy_data. Change all callers.
50 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
51 symbol table.
52 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
53 * som.h (som_subspace_dictionary_record): Define.
54 (som_copyable_section_data_struct): Add is_comdat, is_common and
55 dup_common fields.
56 (som_section_data_struct): Use som_subspace_dictionary_record struct
57 instead of subspace_dictionary_record.
58 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
59
3ba3bc8c
BW
602004-04-27 Bob Wilson <bob.wilson@acm.org>
61
62 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
63 if set. Check reloc_done flag before applying relocations. Use
64 output addresses, both when applying relocations and when comparing
65 against the specified section.
66 (elf_xtensa_relocate_section): Use output address to check if dynamic
67 reloc is in a literal pool. Set section's reloc_done flag.
68
beb8df56
L
692004-04-27 H.J. Lu <hongjiu.lu@intel.com>
70
71 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
72 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
73 section.
74 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
75 section.
76
1829f4b2
AM
772004-04-27 Alan Modra <amodra@bigpond.net.au>
78
79 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
80 structure field removed in 2004-04-24 patch.
81 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
82
83 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
84 Constify hdr arg.
85 * elf32-arm.h (elf32_arm_section_flags): Likewise.
86 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
87 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
88 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
89 field before calling elf_backend_section_flags.
90
4030e8f6
CD
912004-04-24 Chris Demetriou <cgd@broadcom.com>
92
93 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
94 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
95 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
96 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
97 and BFD_RELOC_32_PCREL.
98 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
99 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
100 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
101 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
102 (mips_elf_next_relocation): Move comment about matching HI/LO
103 relocations to...
104 (_bfd_mips_elf_relocate_section): Here. Remove handling for
105 R_MIPS_GNU_REL_HI16.
106
3e27568f
CD
1072004-04-23 Chris Demetriou <cgd@broadcom.com>
108
109 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
110 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
111 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
112 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
113 and update comments to reflect current usage.
114 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
115 and MIPS_R_SWITCH, as well as several empty entries. Update comment
116 for MIPS_R_PCREL16.
117 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
118 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
119 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
120 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
121 type number to be MIPS_R_PCREL16.
122 (mips_relocate_section): Remove support for link-time relaxation
123 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
124 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
125 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
126 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
127 relaxation of branches used by embedded-PIC.
128 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
129 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
130 related members, update comment.
131 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
132 code related to embedded-PIC.
133 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
134 initialization of now-removed 'adjust' member of
135 'struct ecoff_debug_info'.
136
b32de0bc 1372004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
138
139 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
140
955af222
PB
1412004-04-21 Philip Blundell <pb@nexus.co.uk>
142
143 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
144 relocs for locally defined symbols during -shared final link.
145 (elf32_arm_final_link_relocate): Likewise.
146
47a9f7b3
JJ
1472004-04-22 Jakub Jelinek <jakub@redhat.com>
148
149 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
150 ELF_LINK_POINTER_EQUALITY_NEEDED.
151 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
152 if r_type is not R_X86_64_PC32.
153 (elf64_x86_64_finish_dynamic_symbol): If
154 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
155 SHN_UNDEF symbols.
156
1f1799d5
KK
1572004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
158
159 * elf32-sh.c (sh_elf_plt_sym_val): New function.
160 (elf_backend_plt_sym_val): Define.
161
0fdea5ce
AC
1622004-04-22 Andrew Cagney <cagney@redhat.com>
163
164 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
165
5198ba8b
DA
1662004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
167
168 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
169 make_bfd_asection.
170 * som.c (som_set_section_contents): Constantify second argument.
171 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
172 (som_object_setup): Rework to avoid warning.
173 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
174 Likewise.
175
fe2e161a
AC
1762004-04-22 Andrew Cagney <cagney@redhat.com>
177
178 * cache.c (bfd_cache_close): Check for a previously closed file.
179
4c45e5c9
JJ
1802004-04-22 Jakub Jelinek <jakub@redhat.com>
181
182 * bfd.c (bfd_get_synthetic_symtab): Define.
183 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
184 NAME##_get_synthetic_symtab.
185 (struct bfd_target): Add _bfd_get_synthetic_symtab.
186 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
187 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
188 relplt_name fields.
189 (_bfd_elf_get_synthetic_symtab): New prototype.
190 * elfcode.h (elf_get_synthetic_symtab): Define.
191 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
192 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
193 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
194 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
195 * bfd-in2.h: Rebuilt.
196 * libbfd.h: Rebuilt.
197 * elf32-i386.c (elf_i386_plt_sym_val): New function.
198 (elf_backend_plt_sym_val): Define.
199 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
200 (elf_backend_plt_sym_val): Define.
201 * elf32-s390.c (elf_s390_plt_sym_val): New function.
202 (elf_backend_plt_sym_val): Define.
203 * elf64-s390.c (elf_s390_plt_sym_val): New function.
204 (elf_backend_plt_sym_val): Define.
205 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
206 (elf_backend_plt_sym_val): Define.
207 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
208 (elf_backend_plt_sym_val): Define.
209 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
210 (elf_backend_plt_sym_val): Define.
211 * aout-target.h (MY_get_synthetic_symtab): Define.
212 * aout-tic30.c (MY_get_synthetic_symtab): Define.
213 * coff-rs6000.c (rs6000coff_vec): Add
214 _bfd_nodynamic_get_synthetic_symtab.
215 (pmac_xcoff_vec): Likewise.
216 * coff64-rs6000.c (rs6000coff64_vec): Add
217 _bfd_nodynamic_get_synthetic_symtab.
218 (aix5coff64_vec): Likewise.
219 * sunos.c (MY_get_synthetic_symtab): Define.
220 * vms.c (vms_get_synthetic_symtab): Define.
221
d2f7ecac
NC
2222004-04-22 Nick Clifton <nickc@redhat.com>
223
224 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
225
fd99574b
NC
2262004-04-22 Peter Barada <peter@the-baradas.com>
227
228 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
229 * bfd2-in.h: Regenerate.
230 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
231
23867d67
CD
2322004-04-21 Chris Demetriou <cgd@broadcom.com>
233
234 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
235 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
236 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
237 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
238 * bfd-in2.h: Regenerate.
239
2c8c90bc
BW
2402004-04-21 Bob Wilson <bob.wilson@acm.org>
241
242 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
243 require relocations against a weak symbol to reference the same
244 symbol hash entry if not a final, static link.
245 (get_cached_value, add_value_map): Add final_static_link argument.
246 (remove_literals): Pass final_static_link argument as needed.
247
40838a72
AC
2482004-04-21 Andrew Cagney <cagney@redhat.com>
249
250 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
251 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
252 (opncls_bwrite, opncls_bclose, opncls_bflush)
253 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
254 bfd iovec that uses function callbacks.
255 (bfd_close): Use the iovec's bclose.
256 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
257 (cache_bclose, cache_bflush, cache_bstat)
258 (cache_iovec): New functions and global variable, implement a
259 cache "iovec", where applicable set bfd_error.
260 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
261 * bfdio.c (struct bfd_iovec): Define.
262 (real_read): Delete function.
263 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
264 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
265 assume that bread and bwrite set bfd_error.
266 * bfd.c (struct bfd): Add "iovec", update comments.
267 * bfd-in2.h, libbfd.h: Re-generate.
268
7f919c84
AC
2692004-04-21 Andrew Cagney <cagney@redhat.com>
270
271 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
272
715df9b8
EB
2732004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
274
275 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
276 (bfd_elf_gc_sections): Fail if a shared object is being created.
277 Do not fail if dynamic sections have been created. Instead call
278 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
279 dynamically referenced symbols. Do not mark the whole graph
280 rooted at .eh_frame, only the section proper.
281
6482c264
NC
2822004-04-20 DJ Delorie <dj@redhat.com>
283
284 * reloc.c: Add BFD_RELOC_32_SECREL.
285 * bfd-in2.h: Regenerate.
286 * libbfd.h: Likewise.
287 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
288 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
289 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
290
4dc570c2
JJ
2912004-04-19 Jakub Jelinek <jakub@redhat.com>
292
293 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
294 relocs against hidden/protected undefweak symbols properly.
295 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
296
0b60d5d3
MK
2972004-04-18 Mark Kettenis <kettenis@gnu.org>
298
299 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
300 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
301 core files.
302
d48bdb99
AM
3032004-04-17 Brian Ford <ford@vss.fsi.com>
304
305 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
306 filepos for the SizeOfHeaders field.
307 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
308 overflow.
309 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
310
57a1784e
AM
3112004-04-16 Alan Modra <amodra@bigpond.net.au>
312
313 * simple.c (bfd_simple_get_relocated_section_contents): Don't
314 change reloc_done. Set and restore _cooked_size.
315 (RETURN): Delete.
316
d1ad3f6f
MK
3172004-04-15 Mark Kettenis <kettenis@gnu.org>
318
319 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
320 core files.
321
3d1bca9d
NC
3222004-04-15 Nick Clifton <nickc@redhat.com>
323
324 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
325
019b892f
AM
3262004-04-15 Alan Modra <amodra@bigpond.net.au>
327
328 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
329
15b43f48
AM
3302004-04-15 H.J. Lu <hongjiu.lu@intel.com>
331
332 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
333 when it is a definition.
334
6de00a78
AM
3352004-04-14 Alan Modra <amodra@bigpond.net.au>
336
337 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
338 when statically linking PIC code.
339 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
340
279500de
TS
3412004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
342
343 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
344 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
345 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
346 * configure: Regenerate.
347
ccf2f652
RS
3482004-04-08 Richard Sandiford <rsandifo@redhat.com>
349
350 * elflink.c: Include libiberty.h.
351 * Makefile.am (elflink.lo): Depend on libiberty.h.
352 * Makefile.in: Regenerate.
353
ca07892d
DJ
3542004-04-06 Daniel Jacobowitz <drow@mvista.com>
355
356 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
357 ".MIPS.stubs".
358
a5a58ba4
L
3592004-04-05 H.J. Lu <hongjiu.lu@intel.com>
360
361 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
362 reserve the memory for dynamic linker
363
24d18d30
MK
3642004-04-05 Mark Kettenis <kettenis@gnu.org>
365
366 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
367 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
368
a4d7b4b5
L
3692004-04-02 H.J. Lu <hongjiu.lu@intel.com>
370
371 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
372 RELOC_FOR_GLOBAL_SYMBOL.
373 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
374
1f433d93
L
3752004-04-02 H.J. Lu <hongjiu.lu@intel.com>
376
377 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
378 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
379
e489d0ae
PB
3802004-04-01 Paul Brook <paul@codesourcery.com>
381
382 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
383 * elf32-arm.h (struct elf32_elf_section_map): New.
384 (struct _arm_elf_section_data): New.
385 (elf32_arm_section_data): Define.
386 (struct elf32_arm_link_hash_table): Add byteswap_code.
387 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
388 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
389 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
390 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
391 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
392 (bfd_elf32_new_section_hook, elf_backend_write_section,
393 elf_backend_link_output_symbol_hook): Define.
394
66a695f0
NC
3952004-04-01 Andy Chittenden <achittenden@bluearc.com>
396
397 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
398 that keeps the characters in a B_INCL..B_EINCL range.
399 (_bfd_link_section_stabs): When computing the sum of the
400 characters in a B_INCL..B_EINCL range also keep a copy of those
401 characters. Use this information to distinguish between
402 include sections that have the same sum and the same length
403 but which are nevertheless unique.
404
8375c36b
PB
4052004-03-31 Paul Brook <paul@codesourcery.com>
406
407 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
408 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
409
a56b48eb
NC
4102004-03-31 Andy Chittenden <achittenden@bluearc.com>
411
412 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
413 to 'sum_chars' and add field 'num_chars'.
414 (_bfd_link_section_stabs): When computing the sum of the
415 characters in a B_INCL..B_EINCL range also keep a count of the
416 number of characters. Use this information to help distinguish
417 between include sections when have the same sum but which
418 nevertheless are still unique.
419