* bfd-in2.h: Regenerate.
[binutils-gdb.git] / bfd / ChangeLog
1 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2
3 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4 sh_elf_object_p, dtpoff_base): New functions.
5 (sh_elf_howto_table): Add TLS relocs.
6 (sh_reloc_map): Likewise.
7 (sh_elf_info_to_howto): Support TLS relocs.
8 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
9 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
10 New macros.
11 (sh_elf_obj_tdata): New.
12 (elf_sh_link_hash_table): Add tls_ldm_got.
13 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
14 (allocate_dynrelocs): Support TLS relocs.
15 (sh_elf_size_dynamic_sections): Likewise.
16 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
17 .rela.got section when found already. Return false after printing
18 error about unresolvable relocation.
19 (sh_elf_gc_sweep_hook): Support TLS relocs.
20 (sh_elf_check_relocs): Likewise.
21 (sh_elf_finish_dynamic_symbol): Likewise.
22 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
23 * reloc.c: Add SH TLS relocs.
24 * bfd-in2.h, libbfd.h: Regenerate.
25
26 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
27
28 * Makefile.am: Run dep-am.
29 (BFD32_LIBS): Add simple.lo.
30 (BFD32_LIBS_CFILES): Add simple.c.
31 * Makefile.in: Regenerated.
32 * bfd-in2.h: Regenerated.
33 * simple.c: New file.
34
35 2002-10-11 Alan Modra <amodra@bigpond.net.au>
36
37 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
38 (record_thumb_to_arm_glue): Likewise.
39 * ecoff.c (ecoff_link_add_externals): Likewise.
40 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
41 (record_thumb_to_arm_glue): Likewise.
42 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
43 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
44 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
45 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
46 * elf64-ppc.c (func_desc_adjust): Likewise.
47 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
48 (sh64_elf64_create_dynamic_sections): Likewise.
49 * elflink.c (_bfd_elf_create_got_section): Likewise.
50 (_bfd_elf_create_dynamic_sections): Likewise.
51 (_bfd_elf_create_linker_section): Likewise.
52 * elflink.h (elf_add_default_symbol): Likewise.
53 (elf_link_create_dynamic_sections): Likewise.
54 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
55 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
56 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
57 (_bfd_mips_elf_add_symbol_hook): Likewise.
58 (_bfd_mips_elf_create_dynamic_sections): Likewise.
59 * linker.c (generic_link_add_symbol_list): Likewise.
60 * xcofflink.c (xcoff_link_add_symbols): Likewise.
61
62 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
63
64 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
65 completely removed. Correct local sym adjustment.
66
67 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
68
69 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
70 Correct mistake in calculation of address of .got.
71 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
72 elf_sh64_pic_plt_entry_le): Likewise.
73
74 2002-10-09 Richard Shann <richard.shann@superh.com>
75 Stephen Clarke <stephen.clarke@superh.com>
76
77 * Makefile.am: Add entries for elf32-sh64-lin.c and
78 elf64-sh64-lin.c. Regenerate.
79 * Makefile.in: Regenerate.
80 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
81 to use sh64 vectors rather than sh vectors.
82 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
83 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
84 * configure: Regenerate.
85 * elf32-sh64-lin.c: New file.
86 * elf64-sh64-lin.c: New file.
87 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
88 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
89
90 2002-10-08 H.J. Lu <hjl@gnu.org>
91
92 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
93 IE->LE transition for R_386_TLS_IE.
94
95 2002-10-08 Alan Modra <amodra@bigpond.net.au>
96
97 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
98
99 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
100
101 * cofflink.c (mark_relocs): Don't mark relocations in excluded
102 sections.
103
104 2002-10-07 Alan Modra <amodra@bigpond.net.au>
105
106 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
107 code.
108
109 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
110
111 2002-10-06 Alan Modra <amodra@bigpond.net.au>
112
113 * opncls.c: Formatting.
114 (_bfd_new_bfd): Use a smaller section hash table.
115
116 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
117
118 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
119 of the other two relocations packed with a REL32 to NONE.
120
121 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
122
123 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
124 (sh_elf_link_hash_newfunc): Initialize it.
125 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
126 to got.refcount for symbols that are forced local or when
127 we have direct got refs.
128 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
129 to correctly adjust got.refcount and plt.refcount.
130 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
131 (sh_elf_check_relocs): Increment gotplt_refcount.
132
133 2002-10-01 Jakub Jelinek <jakub@redhat.com>
134
135 * elf32-i386.c (elf_i386_relocate_section): Fix
136 movl foo@indntpoff, %eax IE->LE transition.
137
138 2002-10-01 Jakub Jelinek <jakub@redhat.com>
139
140 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
141 sequence and its transitions.
142
143 2002-10-01 Jakub Jelinek <jakub@redhat.com>
144
145 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
146 to st_value + addend in non-code sections.
147 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
148 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
149
150 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
151 Ken Raeburn <raeburn@cygnus.com>
152 Aldy Hernandez <aldyh@redhat.com>
153 Eric Christopher <echristo@redhat.com>
154 Richard Sandiford <rsandifo@redhat.com>
155
156 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
157 (bfd_mach_mips5500): New.
158 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
159 (arch_info_struct): Add corresponding entries here.
160 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
161 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
162 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
163 bfd_mach_mips5400 and bfd_mach_mips5500.
164 (_bfd_mips_elf_mach_extends_p): New function.
165 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
166 the EF_MIPS_MACH flags.
167 * bfd-in2.h: Regenerate.
168
169 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
170
171 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
172 .got sections.
173
174 2002-09-28 Alan Modra <amodra@bigpond.net.au>
175
176 * elf.c (map_sections_to_segments): Correct test for start of
177 writable section in the same page as end of read-only section.
178
179 2002-09-27 Matt Thomas <matt@3am-software.com>
180
181 * elf32-vax.c (elf_vax_check_relocs): Remove unused
182 local_got_refcounts usage. Remove allocation of got slot.
183 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
184 Remove de-allocation of got slot.
185 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
186 traversal for elf_vax_instantiate_got_entries. Allow empty .got
187 sections to be GC'ed.
188 (elf_vax_instantiate_got_entries): New function.
189 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
190 tests that are now handled by elf_vax_instantiate_got_entries.
191 Assert GOT entry falls within .got section size. Remove redundant
192 comparisions. Fix comments.
193
194 2002-09-27 Jakub Jelinek <jakub@redhat.com>
195
196 * reloc.c: Add x86-64 TLS relocs.
197 * bfd-in2.h, libbfd.h: Rebuilt.
198 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
199 relocs. Add TLS relocs.
200 (x86_64_reloc_map): Add TLS relocs.
201 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
202 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
203 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
204 (elf64_x86_64_hash_entry): Define.
205 (struct elf64_x86_64_obj_tdata): New.
206 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
207 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
208 (link_hash_newfunc): Initialize tls_type.
209 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
210 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
211 (elf64_x86_64_mkobject): New.
212 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
213 (elf64_x86_64_tls_transition): New.
214 (elf64_x86_64_check_relocs): Add r_type variable and use it.
215 Handle TLS relocs.
216 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
217 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
218 (elf64_x86_64_size_dynamic_sections): Likewise.
219 (dtpoff_base, tpoff): New.
220 (elf64_x86_64_relocate_section): Handle TLS relocs.
221 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
222 entries.
223 (bfd_elf64_mkobject): Define.
224
225 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
226 DF_STATIC_TLS if shared.
227
228 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
229
230 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
231 empty relocation sections.
232
233 2002-09-26 Alan Modra <amodra@bigpond.net.au>
234
235 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
236 (ppc64_elf_build_stubs): Build them here instead.
237
238 2002-09-24 Jakub Jelinek <jakub@redhat.com>
239
240 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
241 addend into r_addend, not *r_offset.
242 (elf32_sparc_finish_dynamic_symbol): Likewise.
243 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
244 R_SPARC_RELATIVE's r_offset.
245
246 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
247
248 * dwarf2.c (decode_line_info): Update to correctly decode
249 the (non-standard DWARF2) out-of-order address sequences
250 generated by the Intel C++ 6.0 compiler for ia64-Linux.
251
252 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
253
254 * config.bfd: For DJGPP targets, match with any cpu and any machine.
255
256 2002-09-23 Alan Modra <amodra@bigpond.net.au>
257
258 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
259 for discarded FDEs. Remove redundant assignment.
260 * elflink.h (elf_bfd_discard_info): Save edited relocs.
261
262 2002-09-22 H.J. Lu <hjl@gnu.org>
263
264 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
265 the relocation count between different .reloc sections.
266
267 2002-09-21 Alan Modra <amodra@bigpond.net.au>
268
269 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
270 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
271 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
272 R_PPC_EMB_RELSDA.
273
274 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
275 unsigned. Move "symcount" assignment out of loop.
276 * Makefile.am: Run "make dep-am".
277 * Makefile.in: Regenerate.
278 * configure: Regenerate.
279 * po/SRC-POTFILES.in: Regnerate.
280
281 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
282
283 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
284 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
285 (e.g. IRIX64).
286
287 2002-09-19 Jakub Jelinek <jakub@redhat.com>
288
289 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
290 even if generating R_PPC_RELATIVE reloc.
291 (ppc_elf_relocate_section): Make sure relocation is performed
292 if skip == -2. Clear memory at r_offset when creating dynamic
293 relocation.
294
295 2002-09-19 Jakub Jelinek <jakub@redhat.com>
296
297 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
298 BFD_RELOC_386_TLS_GOTIE): Add.
299 * bfd-in2.h, libbfd.h: Rebuilt.
300 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
301 and R_386_TLS_GOTIE.
302 (elf_i386_reloc_type_lookup): Handle it.
303 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
304 char instead of enum, change GOT_* into defines.
305 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
306 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
307 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
308 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
309 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
310 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
311 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
312 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
313 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
314 tls_type is GOT_TLS_IE_BOTH.
315 (elf_i386_size_dynamic_sections): Likewise.
316 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
317 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
318 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
319 all 4 GOT_TLS_* TLS types.
320
321 2002-09-19 Nick Clifton <nickc@redhat.com>
322
323 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
324 follow indirect links.
325
326 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
327
328 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
329 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
330 on 64 bit machines.
331 (ecoff_swap_sym_in) <iss>: Likewise.
332 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
333 ECOFF information: 'ioptMax' refers to the actual *size*
334 of the optimization symtab, not the number of entries.
335
336 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
337
338 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
339 ELF_LINK_HASH_NEEDS_PLT logic.
340
341 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
342
343 * elfcode.h (elf_slurp_reloc_table_from_section): Check
344 correct relocation count.
345
346 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
347
348 * bfd-in.h (bfd_get_dynamic_symcount): Define.
349 * bfd.c (struct _bfd): Add dynsymcount.
350 * bfd-in2.h: Regenerated.
351 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
352 abfd->dynsymcount.
353 * elfcode.h (elf_slurp_reloc_table_from_section): Check
354 for overflow.
355
356 2002-09-17 Stan Cox <scox@redhat.com>
357
358 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
359 (mips_elf64_final_gp): Don't make up gp value.
360 * elfn32-mips.c (mips_elf_final_gp): Likewise.
361 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
362 .MIPS.options/.options section.
363
364 2002-09-17 David O'Brien <obrien@FreeBSD.org>
365
366 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
367 It is benign for FreeBSD < 4.1. Minor reformatting.
368 * elf64-alpha-fbsd.c: Likewise.
369
370 2002-09-17 Jakub Jelinek <jakub@redhat.com>
371
372 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
373 addend.
374
375 2002-09-17 Alan Modra <amodra@bigpond.net.au>
376
377 * elf64-alpha.c (alpha_elf_size_info): Make static.
378
379 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
380
381 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
382 * cpu-tic4x.c: Ditto.
383
384 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
385
386 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
387 duplicate define.
388
389 2002-09-16 Bruno Haible <bruno@clisp.org>
390
391 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
392 by a target variant implementation.
393 * elf64-alpha.c: Likewise.
394 * elf32-i386-fbsd.c: New file.
395 * elf64-alpha-fbsd.c: New file.
396 * targets.c: Support bfd_elf32_i386_freebsd_vec and
397 bfd_elf64_alpha_freebsd_vec.
398 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
399 bfd_elf64_alpha_freebsd_vec.
400 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
401 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
402 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
403 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
404 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
405 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
406 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
407
408 2002-09-12 Jakub Jelinek <jakub@redhat.com>
409
410 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
411 NULL.
412 (elf_i386_relocate_section): Return false after printing error about
413 unresolvable relocation.
414
415 2002-09-12 Nick Clifton <nickc@redhat.com>
416
417 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
418 R_ARM_THM_PC11.
419
420 2002-09-11 Jeffrey Law <law@redhat.com>
421
422 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
423
424 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
425
426 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
427 line_ptr before deciding we've found a symbol.
428
429 2002-09-11 Nick Clifton <nickc@redhat.com>
430
431 * po/da.po: New Danish translation file.
432 * configure.in (LINGUAS): Add 'da'.
433 * configure: Regenerate.
434
435 2002-09-10 Michael Snyder <msnyder@redhat.com>
436
437 * irix-core.c (do_sections, do_sections64): New functions.
438 (irix_core_core_file_p): Call new functions do_sections,
439 do_sections64, depending on corefile (32-bit or 64-bit).
440
441 2002-09-09 Richard Henderson <rth@redhat.com>
442
443 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
444 and PCREL21F like PCREL21B.
445
446 2002-09-04 Kevin Buettner <kevinb@redhat.com>
447
448 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
449 vector.
450
451 2002-09-02 Nick Clifton <nickc@redhat.com>
452
453 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
454 names instead of cryptically overloaded bfd_reloc error
455 codes.
456 (v850_elf_relocate_section): Likewise.
457 (v850_elf_relax_section): Replace caching of external symbols
458 with caching of internal symbols obtained from calling
459 bfd_elf_get_elf_syms().
460 Fixup problems with freeing cached allocated memory blocks.
461
462 2002-09-02 Alan Modra <amodra@bigpond.net.au>
463
464 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
465 (bfd_pj_arch): Use bfd_default_scan.
466 * cpu-v850.c (scan): Remove.
467 (N): Use bfd_default_scan.
468 * cpu-z8k.c (scan_mach): Remove.
469 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
470 first. Use bfd_default_scan.
471
472 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
473 bfd_mach constants.
474 (ecoff_get_magic): Likewise.
475 * elf32-v850.c (v850_elf_object_p): Likewise.
476 (v850_elf_final_write_processing): Likewise.
477 * mipsbsd.c (MY(set_arch_mach)): Likewise.
478 (MY(write_object_contents)): Likewise.
479 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
480 * coffcode.h (coff_write_object_contents): Likewise.
481 (coff_set_arch_mach_hook): Add comment describing machine == 0.
482 Remove unnecessary "machine" assignments.
483 (coff_write_relocs): Test for the absolute section sym by testing
484 section and flags.
485
486 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
487 and bfd_mach_i386_i386_intel_syntax.
488 * pdp11.c (NAME(aout,machine_type)): Likewise.
489
490 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
491
492 * bfd-in.h (align_power): Cast constants to bfd_vma type.
493 * bfd-in2.h (align_power): Likewise.
494
495 2002-08-30 Alan Modra <amodra@bigpond.net.au>
496
497 * Makefile.am: Run "make dep-am".
498 * Makefile.in: Regenerate.
499
500 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
501 * cpu-powerpc.c (powerpc_compatible): Likewise.
502 * cpu-rs6000.c (rs6000_compatible): Likewise.
503
504 2002-08-28 Catherine Moore <clm@redhat.com>
505
506 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
507 (v850-elf-reloc): Don't resolve pc relative relocs.
508 (v850_elf_ignore_reloc): New routine.
509 (v850_elf_final_link_relocate): Handle new relocs.
510 (v850_elf_relax_delete_bytes ): New routine.
511 (v850_elf_relax_section): New routine.
512 (bfd_elf32_bfd_relax_section): Define.
513 (HOWTO): New entries for new relocs.
514 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
515 (BFD_RELOC_V850_LONGJUMP): New reloc.
516 (BFD_RELOC_V850_ALIGN): New reloc.
517 * archures.c: Remove redundant v850ea architecture.
518 * cpu-v850.c: Remove redundant v850ea support.
519 * libbfd.h: Regenerate.
520 * bfd-in2.h: Regenerated.
521
522 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
523
524 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
525 * configure.in: Add tic4x_coff vector files.
526 * configure: Regenerate.
527 * Makefile.am: Add tic4x target.
528 * Makefile.in: Regenerate.
529
530 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
531
532 * archures.c: Add the BFD arch type tic4x.
533 * bfd-in.h: Add BFD_IN_MEMORY flag.
534 * coff-tic4x.c: New file.
535 * coffswap.h (coff_swap_sym_out): Add preadjuster.
536 * cpu-tic4x.c: New file.
537 * targets.c: Added tic4x- in list of xvecs.
538 * ticoff.h: New file.
539 * bfd-in2.h: Regenerate.
540
541 2002-08-27 Adam Nemet <anemet@lnxw.com>
542
543 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
544 bit of DT_INIT and DT_FINI for Thumb functions.
545
546 2002-08-26 Alan Modra <amodra@bigpond.net.au>
547
548 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
549
550 2002-08-26 Alan Modra <amodra@bigpond.net.au>
551
552 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
553
554 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
555
556 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
557 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
558 Likewise.
559 (struct elf_sh_pcrel_relocs_copied): Removed.
560 (struct elf_sh_dyn_relocs): New.
561 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
562 field with dyn_relocs.
563 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
564 sections and sym_sec.
565 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
566 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
567 (sh_elf_create_dynamic_sections): Use create_got_section instead
568 of _bfd_elf_create_got_section.
569 (sh_elf_check_relocs): Likewise.
570 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
571 sections.
572 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
573 sh_elf_relocate_section, sh_elf_check_relocs,
574 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
575 Likewise.
576 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
577 dynamic relocations and avoiding the copy relocation when we
578 didn't find any dynamic relocations in the section which has
579 contents or is read-only.
580 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
581 (sh_elf_size_dynamic_sections): Don't reset the size of
582 .rela.got section even if dynamic_sections_created flag is off.
583 Don't use sh_elf_discard_copies. Scan all input bfd and use
584 allocate_dynrelocs. Call readonly_dynrelocs to determine
585 whether we need DT_TEXTREL.
586 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
587 whether the symbol was never referred to.
588 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
589 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
590 (sh_elf_check_relocs): Call create_got_section if the short-cut
591 to .got is null. Increment reference counters only instead of
592 allocating space on dynamic sections here. Don't conditionalize
593 uninitialized got.offset value when marking the symbol as a
594 global offset table entry. Keep relocations for symbols satisfied
595 by a dynamic library to avoid copy relocations for the symbol.
596 Set dynobj field of an elf hash table if needed.
597 (sh_elf_finish_dynamic_sections): Handle null section pointer
598 correctly.
599 (elf_backend_copy_indirect_symbol): Defined.
600 (elf_backend_can_refcount): Defined.
601
602 2002-08-23 Nick Clifton <nickc@redhat.com>
603
604 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
605 previous change. Add comment explaining why.
606
607 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
608
609 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
610 contents of .got.plt[2] to tr0, not address of .got.plt.
611 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
612 patching absolute plt entry. For shmedia plt entry, set bottom bit
613 of branch to plt0 as this is a branch to an shmedia instruction.
614 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
615 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
616 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
617 branch to plt0.
618 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
619 patching absolute plt entry. For shmedia plt entry, branch to
620 plt0 is now ptrel, so use relative offset. Set bottom bit of
621 branch target as it is a branch to an shmedia instruction.
622
623 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
624 Richard Shann <richard.shann@superh.com>
625
626 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
627 value if .init is an SHmedia function. Similarly for DT_FINI.
628 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
629
630 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
631
632 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
633 dynamic section.
634 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
635
636 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
637
638 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
639 byte read when reading the return address register column.
640
641 2002-08-22 Nick Clifton <nickc@redhat.com>
642
643 * config.bfd: Add powepc64-*-*bsd* target.
644
645 2002-08-22 Graeme Peterson <gp@qnx.com>
646
647 * Makefile.am: Add entries for elf32-shqnx.c
648 * Makefile.in: Regenerate.
649 * config.bfd: Add support sh-*-nto* target.
650 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
651 * configure: Regenerate.
652 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
653 * elf32-sh.c: Do not include elf32-target.h if
654 ELF32_SH_C_INCLUDED is defined.
655 * elf32-shqnx.c: New file: Support for QNX.
656 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
657
658 2002-08-22 Nick Clifton <nickc@redhat.com>
659
660 * po/tr.po: Updated Turkish translation.
661
662 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
663 symbols are not read.
664
665 2002-08-22 Alan Modra <amodra@bigpond.net.au>
666
667 * elf32-m68hc11.c: Formatting fixes.
668 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
669 * elf32-m68hc12.c: Formatting fixes.
670 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
671
672 2002-08-22 Alan Modra <amodra@bigpond.net.au>
673
674 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
675 SEC_DATA.
676 (pmac_xcoff_vec): Likewise.
677 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
678 (aix5coff64_vec): Likewise.
679
680 2002-08-22 Alan Modra <amodra@bigpond.net.au>
681
682 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
683 param to elf_backend_copy_indirect_symbol.
684 (_bfd_elf_link_hash_copy_indirect): Likewise.
685 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
686 calls to copy_indirect_symbol.
687 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
688 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
689 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
690 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
691 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
692 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
693 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
694 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
695 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
696 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
697 test refcounts for "used" values.
698
699 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
700
701 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
702 argument declaration.
703
704 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
705
706 * archures.c (bfd_mach_ppc_e500): Added.
707 * bfd-in2.h: Rebuilt.
708 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
709
710 2002-08-19 Alan Modra <amodra@bigpond.net.au>
711
712 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
713
714 2002-08-17 Andrew Cagney <ac131313@redhat.com>
715
716 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
717 `bfd_byte'.
718
719 2002-08-17 Stan Cox <scox@redhat.com>
720
721 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
722 IRIX 6 segment layout for NEWABI.
723
724 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
725
726 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
727 symbols when looking for section referred to by a relocation.
728 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
729
730 2002-08-15 Alan Modra <amodra@bigpond.net.au>
731
732 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
733
734 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
735
736 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
737 missing check for whether the symbol is referenced by DSO before
738 unexporting it as an unneeded dynamic symbol.
739
740 2002-08-14 H.J. Lu <hjl@gnu.org>
741
742 * libbfd.h: Regenerate.
743
744 2002-08-14 H.J. Lu <hjl@gnu.org>
745
746 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
747
748 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
749
750 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
751 instructions.
752 (m68hc11_direct_relax): New to define table of relaxable instructions.
753 (find_relaxable_insn): New, find a relaxable insn.
754 (compare_reloc): New to compare two relocs.
755 (m68hc11_elf_relax_section): New, relax text sections.
756 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
757 (elf32_m68hc11_check_relocs): New function for GC support.
758 (elf32_m68hc11_relocate_section): New function for GC support.
759 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
760 (elf_backend_check_relocs): Likewise.
761 (elf_backend_relocate_section): Likewise.
762
763 2002-08-13 H.J. Lu <hjl@gnu.org>
764
765 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
766 definitions in shared objects when checking symbol with
767 undefined version.
768
769 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
770
771 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
772 (elf32_m68hc11_gc_sweep_hook): Likewise.
773 (elf_backend_gc_mark_hook): Define for GC section support.
774 (elf_backend_gc_sweep_hook): Likewise.
775 (elf_backend_can_gc_sections): Likewise.
776
777 * elf32-m68hc12.c: Likewise.
778
779 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
780
781 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
782 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
783 (_bfd_m68hc11_elf_set_private_flags): New function.
784 Use them to set/check/print ELF flags specific to 68HC11.
785
786 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
787 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
788 (_bfd_m68hc12_elf_set_private_flags): New function.
789 Use them to set/check/print ELF flags specific to 68HC12.
790
791 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
792
793 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
794 fix masks for PC-rel relocs.
795 (m68hc11_elf_ignore_reloc): New function.
796
797 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
798 68HC12 banked addressing relocs.
799 (m68hc12_phys_addr): New to compute physical address of banked memory.
800 (m68hc12_phys_page): Likewise for page.
801 (m68hc12_addr_is_banked): New to see if address is in banked area.
802 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
803
804 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
805
806 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
807 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
808 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
809 * bfd-in2.h: Regenerate.
810
811 2002-08-12 H.J. Lu <hjl@gnu.org>
812
813 * elflink.h (elf_add_default_symbol): Preserve section across
814 elf_merge_symbol.
815
816 2002-08-09 Graeme Peterson <gp@qnx.com>
817
818 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
819 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
820 * Makefile.in: Regenerate.
821 * config.bfd: Add support for powerpc{le}-*-nto targets.
822 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
823 * configure: Regenerate.
824 * elf32-i386qnx.c: Moved backend functions into a QNX specific
825 common file "elf32-qnx.h", and now include that file.
826 * elf32-qnx.h: New file: QNX specific common elf backend.
827 * elf32-ppc.c: Do not include elf32-target.h if
828 ELF32_PPC_C_INCLUDED is defined.
829 * elf32-ppcqnx.c: New file: Support for QNX.
830 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
831 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
832
833 2002-08-09 Nick Clifton <nickc@redhat.com>
834
835 * po/sv.po: Updated Swedish translation.
836
837 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
838
839 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
840 g->global_gotsym is NULL.
841
842 2002-08-08 H.J. Lu <hjl@gnu.org>
843
844 * elflink.h (elf_add_default_symbol): Don't warn if a definition
845 overrides an indirect versioned symbol.
846
847 2002-08-08 Jakub Jelinek <jakub@redhat.com>
848
849 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
850 for R_386_TLS_TPOFF32 relocs against symndx 0.
851
852 2002-08-07 H.J. Lu <hjl@gnu.org>
853
854 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
855 with undefined version if needed.
856 (elf_link_assign_sym_version): Match a default symbol with a
857 version without definition. No need to hide the default
858 definition separately.
859
860 2002-08-08 Alan Modra <amodra@bigpond.net.au>
861
862 * elflink.h (elf_link_output_extsym): Don't output symbols from
863 SEC_EXCLUDE sections.
864
865 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
866
867 2002-08-07 Alan Modra <amodra@bigpond.net.au>
868
869 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
870 entries.
871
872 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
873
874 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
875 mismatch.
876
877 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
878
879 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
880
881 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
882
883 * elf32-mips.c (mips_reloc_map): Fix typo.
884
885 2002-08-06 Alan Modra <amodra@bigpond.net.au>
886
887 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
888
889 2002-08-06 Alan Modra <amodra@bigpond.net.au>
890
891 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
892
893 2002-08-06 Alan Modra <amodra@bigpond.net.au>
894
895 * libxcoff.h: Use PARAMS on function declarations.
896 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
897 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
898
899 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
900 addend.
901 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
902
903 2002-08-06 Alan Modra <amodra@bigpond.net.au>
904
905 * coff-rs6000.c: Formatting fixes.
906 (xcoff_calculate_relocation): Use PARAMS in declaration.
907 (xcoff_complain_overflow): Likewise.
908 (xcoff_ppc_relocate_section): Use old-style function pointer call.
909 (bfd_xcoff_backend_data): Remove useless comments.
910 (rs6000coff_vec): Likewise.
911 (bfd_pmac_xcoff_backend_data): Likewise.
912 (pmac_xcoff_vec): Likewise.
913
914 * coff64-rs6000.c: Formatting fixes.
915 (xcoff64_calculate_relocation): Use PARAMS in declaration.
916 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
917 (bfd_xcoff_backend_data): Remove useless comments.
918 (rs6000coff64_vec): Likewise.
919 (bfd_xcoff_aix5_backend_data): Likewise.
920 (aix5coff64_vec): Likewise.
921
922 2002-08-06 Alan Modra <amodra@bigpond.net.au>
923
924 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
925 mask entries. Use complain_overflow_dont for R_REF.
926 (xcoff_reloc_type_ba): Revert last change.
927 (xcoff_reloc_type_br): Likewise.
928 (xcoff_reloc_type_crel): Likewise.
929 (xcoff_ppc_relocate_section): Likewise.
930 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
931 (xcoff64_ppc_relocate_section): Likewise.
932 (xcoff64_howto_table): Revert some of last change to mask entries.
933 Use complain_overflow_dont for R_REF.
934
935 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
936 relocs with bitsize == 16 have size = 1.
937 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
938 (xcoff_reloc_type_br): Likewise.
939 (xcoff_reloc_type_crel): Likewise.
940 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
941 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
942 dst_mask adjustment.
943 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
944 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
945 bitsize == 16 have size = 1.
946
947 2002-08-01 Denis Chertykov <denisc@overta.ru>
948
949 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
950 (struct misc): New field isymbuf. All free_* fields removed.
951 (symbol_value): Pass in internal syms. No need to swap syms in.
952 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
953 possibly cached info.
954 (tidyup_after_error): Removed.
955 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
956 misc. Use new field.
957 (adjust_all_relocations): Use internal syms. No need to swap syms
958 in and out.
959 (add_page_insn): Don't use removed fields of struct misc.
960
961 2002-08-01 Nick Clifton <nickc@redhat.com>
962
963 * elf32-arm.h: Revert previous delta.
964
965 2002-08-01 Nick Clifton <nickc@redhat.com>
966
967 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
968 * configure: Regenerate.
969
970 2002-07-31 H.J. Lu <hjl@gnu.org>
971
972 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
973 selected.
974
975 2002-07-31 H.J. Lu <hjl@gnu.org>
976
977 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
978 is selected.
979
980 2002-07-31 Jakub Jelinek <jakub@redhat.com>
981
982 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
983 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
984
985 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
986
987 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
988 There is no 8 byte relocation type for this architecture.
989 (do_ns32k_reloc): Use bfd_vma instead of native types.
990 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
991 returns void.
992 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
993 rely on generic code to do that.
994 * aout-ns32k.c (howto_table): Add appropriate overflow detection
995 to all table entries.
996 (_bfd_ns32k_relocate_contents): put_data returns void.
997 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
998 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
999 return void.
1000
1001 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1002
1003 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1004 archive object is target dependant.
1005
1006 2002-07-31 Adam Nemet <anemet@lnxw.com>
1007
1008 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1009 (THUMB_PLT_ENTRY_SIZE): New macro.
1010 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1011 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1012 ARM_PLT_ENTRY_SIZE.
1013 (elf32_arm_plt_entry): Likewise.
1014 (elf_backend_plt_header_size): Likewise.
1015 (elf32_thumb_plt0_entry): New global.
1016 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
1017 into .plt.thumb.
1018 (elf32_thumb_plt_entry): New global.
1019 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
1020 Thumb entries. Set the bottom bit of the corresponding GOT entry
1021 for a Thumb PLT entry.
1022 (struct elf32_arm_plt_entry_info): New structure.
1023 (struct elf32_arm_link_hash_entry, plt_info): New member of this
1024 type.
1025 (elf32_arm_link_hash_newfunc): Initialize new member.
1026 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
1027 relocations against the PLT.
1028 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
1029 first_rel_type if this is the first time we encounter the symbol.
1030 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
1031 Determine if relocation needs a PLT entry. Set first_rel_type if
1032 this is the first time we encounter the symbol
1033 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
1034 functions as well.
1035 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
1036 (elf32_arm_create_dynamic_sections): New function. Create the
1037 .plt.thumb section.
1038 (elf_backend_create_dynamic_sections): Call it.
1039
1040 2002-07-31 Nick Clifton <nickc@redhat.com>
1041
1042 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
1043 'alternative' in order to avoid shadowing global symbol of the
1044 same name.
1045 * bfd-in2.h: Regenerate.
1046 * libbfd.h: Regenerate.
1047 * libcoff.h: Regenerate.
1048
1049 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1050
1051 * Makefile.am: Add n32 ABI support.
1052 * Makefile.in: Regenerate.
1053 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
1054 bit vectors for mips*-*-linux targets as optional.
1055 * configure.in: Add n32 ABI vectors.
1056 * configure: Regenerate.
1057 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
1058 * elfn32-mips.c: New file, n32 ABI support.
1059 * targets.c: Add n32 ABI vectors.
1060
1061 2002-07-30 Graeme Peterson <gp@qnx.com>
1062
1063 * elfarmqnx-nabi.c: New file: Support for QNX.
1064 * config.bfd: Add support for arm-*-nto target.
1065 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
1066 * configure: Regenerate.
1067 * Makefile.am: Add entries for elfarmqnx-nabi.c.
1068 * Makefile.in: Regenerate.
1069 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
1070 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
1071 * elfarm-nabi.c: Do not include elf32-arm.h if
1072 ELFARM_NABI_C_INCLUDED is defined.
1073 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
1074
1075 2002-07-30 Nick Clifton <nickc@redhat.com>
1076
1077 * po/sv.po: Updated Swedish translation.
1078
1079 2002-07-30 Jakub Jelinek <jakub@redhat.com>
1080
1081 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
1082
1083 2002-07-30 Alan Modra <amodra@bigpond.net.au>
1084
1085 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
1086 * archive.c (bfd_generic_archive_p): Likewise.
1087 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
1088 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
1089 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1090 (xcoff64_archive_p): Likewise.
1091 (xcoff64_openr_next_archived_file): Likewise.
1092 (xcoff64_archive_p): Clean up tdata properly on error.
1093 * coffgen.c (coff_real_object_p): Likewise.
1094 (coff_object_p): Release filehdr and opthdr.
1095 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
1096 * ieee.c (ieee_archive_p): Likewise.
1097 * ihex.c (ihex_object_p): Likewise.
1098 (ihex_mkobject): Always allocate tdata.
1099 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
1100 * srec.c (srec_mkobject): Always allocate tdata.
1101 (srec_object_p): Clean up tdata properly on error.
1102 (symbolsrec_object_p): Likewise.
1103 * versados.c (versados_object_p): Likewise.
1104 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
1105 and bfd_realloc instead of realloc.
1106 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
1107 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
1108 place of bfd_malloc, simplifying error freeing. Free hash table too.
1109 (vms_object_p): Clean up tdata on error.
1110 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
1111 (vms_close_and_cleanup): Adjust for bfd_alloc use.
1112
1113 2002-07-30 Alan Modra <amodra@bigpond.net.au>
1114
1115 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
1116
1117 2002-07-26 Chris Demetriou <cgd@broadcom.com>
1118
1119 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
1120 flags into resulting BFD.
1121
1122 2002-07-26 Alan Modra <amodra@bigpond.net.au>
1123
1124 From John Reiser <jreiser@BitWagon.com>
1125 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
1126 tls_ldm_got.refcount.
1127
1128 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1129
1130 * elf64-mips.c: Update TODO comment.
1131 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
1132 mips_elf64_gprel16_reloca): Remove prototypes.
1133 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
1134 (UNUSED_RELOC): Replace by EMPTY_RELOC.
1135 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
1136 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
1137 R_MIPS_HIGHEST.
1138 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
1139 R_MIPS_GOT16. Remove wrong comments.
1140 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
1141 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
1142 from elf32-mips.c.
1143 (mips_elf64_hi16_reloc): Fix formatting.
1144 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
1145 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
1146 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
1147 (mips_elf64_gprel16_reloc): Make static. Add check for
1148 partial_inplace.
1149 (mips_elf64_gprel16_reloca): Remove.
1150 (mips_elf64_literal_reloc): New function.
1151 (mips_elf64_gprel32_reloc): Fix formatting.
1152 (mips_elf64_shift6_reloc): Fix comment. Make static.
1153 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
1154 elf32-mips.c.
1155 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
1156 elf32-mips.c
1157 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
1158 specific relocations.
1159 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
1160 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
1161 (ELF_MAXPAGESIZE): Add comment.
1162
1163 2002-07-25 Nick Clifton <nickc@redhat.com>
1164
1165 * po/sv.po: Updated Swedish translation.
1166 * po/es.po: Updated Spanish translation.
1167 * po/fr.po: Updated French translation.
1168
1169 2002-07-25 Alan Modra <amodra@bigpond.net.au>
1170
1171 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
1172 as elf_link_record_local_dynamic_symbol.
1173 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
1174 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
1175 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
1176 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
1177 attempt is made to record a symbol in a discarded section, and
1178 return `2' in that case.
1179
1180 2002-07-24 Nick Clifton <nickc@redhat.com>
1181
1182 * po/sv.po: Updated Swedish translation.
1183 * po/es.po: Updated Spanish translation.
1184
1185 2002-07-23 Alan Modra <amodra@bigpond.net.au>
1186
1187 * po/SRC-POTFILES.in: Regenerate.
1188
1189 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
1190 immediately. Remove code handling relocatable linking.
1191 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1192 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1193 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
1194 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1195 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1196 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1197 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1198 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1199 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1200 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1201 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1202 * elf32-avr.c (elf_backend_rela_normal): Define.
1203 * elf32-cris.c: Likewise.
1204 * elf32-fr30.c: Likewise.
1205 * elf32-frv.c: Likewise.
1206 * elf32-h8300.c: Likewise.
1207 * elf32-hppa.c: Likewise.
1208 * elf32-ip2k.c: Likewise.
1209 * elf32-sparc.c: Likewise.
1210 * elf32-v850.c: Likewise.
1211 * elf32-vax.c: Likewise.
1212 * elf64-hppa.c: Likewise.
1213 * elf64-sparc.c: Likewise.
1214 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
1215 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1216 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1217 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1218 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1219 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1220 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1221 * elf-m10200.c (USE_RELA): Don't define.
1222 * elf-m10300.c: Likewise.
1223 * elfarm-oabi.c: Likewise.
1224 * elf32-i370.c: Likewise.
1225 * elf32-ip2k.c: Likewise.
1226 * elf32-m68k.c: Likewise.
1227 * elf32-mcore.c: Likewise.
1228 * elf32-ppc.c: Likewise.
1229 * elf32-s390.c: Likewise.
1230 * elf32-vax.c: Likewise.
1231 * elf64-ppc.c: Likewise.
1232 * elf64-s390.c: Likewise.
1233 * elf64-x86-64.c: Likewise.
1234 * elfxx-ia64.c: Likewise.
1235 * elf32-avr.c (USE_REL): Don't undef.
1236 * elf32-ip2k.c: Likewise.
1237
1238 2002-07-23 Nick Clifton <nickc@redhat.com>
1239
1240 * elf-bfd.h (struct elf_backend_data): Add new bitfield
1241 'want_p_paddr_set_to_zero'.
1242 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
1243 to false;
1244 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
1245 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
1246
1247 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
1248
1249 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
1250 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
1251 show the Copyright string.
1252 Minor formatting tidy ups.
1253
1254 2002-07-23 Nick Clifton <nickc@redhat.com>
1255
1256 * po/fr.po: Updated French translation.
1257 * po/sv.po: Updated Swedish translation.
1258
1259 2002-07-23 Alan Modra <amodra@bigpond.net.au>
1260
1261 * elflink.h (elf_link_input_bfd): Don't change internal symbols
1262 when outputting relocs.
1263
1264 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
1265
1266 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
1267 DT_PLTGOT into the dynamic section if there is a PLT.
1268
1269 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1270
1271 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
1272 elf32-mips.c.
1273 (_bfd_mips_elf_write_section): Likewise.
1274 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
1275 (_bfd_mips_elf_write_section): Likewise.
1276 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
1277 (elf32_mips_write_section): Likewise.
1278 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
1279 (_bfd_mips_elf_write_section): Likewise.
1280
1281 2002-07-19 Alan Modra <amodra@bigpond.net.au>
1282
1283 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
1284 PT_IA_64_UNWIND segments for a given section.
1285
1286 2002-07-17 H.J. Lu <hjl@gnu.org>
1287
1288 * Makefile.am: Fix a typo.
1289 * Makefile.in: Regenerate.
1290
1291 2002-07-15 Denis Chertykov <denisc@overta.ru>
1292 Frank Ch. Eigler <fche@redhat.com>
1293 Ben Elliston <bje@redhat.com>
1294 Alan Lehotsky <alehotsky@cygnus.com>
1295 John Healy <jhealy@redhat.com>
1296 Graham Stott <grahams@redhat.com>
1297 Jeff Johnston <jjohnstn@redhat.com>
1298
1299 * Makefile.am: Add support for ip2k.
1300 * Makefile.in: Regenerate.
1301 * doc/Makefile.in: Regenerate.
1302 * archures.c: Add support for ip2k.
1303 * config.bfd: Add support for ip2k.
1304 * configure.in: Add support for ip2k.
1305 * configure: Regenerate.
1306 * reloc.c: Add support for ip2k.
1307 * targets.c: Add support for ip2k.
1308 * bfd-in2.h: Regenerate.
1309 * libbfd.h: Regenerate.
1310 * cpu-ip2k.c: New file.
1311 * elf32-ip2k.c: New file.
1312
1313 2002-07-17 Ian Rickards <irickard@arm.com>
1314
1315 * dwarf2.c (concat_filename): If we can't establish the directory
1316 just return the filename.
1317
1318 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
1319
1320 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
1321
1322 2002-07-16 Alan Modra <amodra@bigpond.net.au>
1323
1324 * elflink.h: Formatting fixes, tidy prototypes.
1325 (elf_link_assign_sym_version): Move common code out of loop.
1326
1327 2002-07-16 Alan Modra <amodra@bigpond.net.au>
1328
1329 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
1330 reloc section size is zero. Correct reloc output location.
1331
1332 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1333
1334 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
1335 the final type for the e_fsel selector when generating PA2.0W code.
1336 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
1337 relocations.
1338
1339 2002-07-14 H.J. Lu <hjl@gnu.org>
1340
1341 * elflink.h (elf_link_assign_sym_version): Hide the default
1342 definition if there is a hidden versioned definition.
1343
1344 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
1345
1346 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
1347 dynamic reference test in assertion when initializing GOT with
1348 static contents. Just assert that there are either no dynamic
1349 sections, the symbol is defined in the regular objects or that the
1350 symbol is undef weak. Tweak comment.
1351 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
1352 only if the symbol isn't defined in the program and isn't undef
1353 weak.
1354 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
1355 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
1356 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
1357 (elf_cris_discard_excess_program_dynamics): Don't consider
1358 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
1359
1360 2002-07-11 Alan Modra <amodra@bigpond.net.au>
1361
1362 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
1363 unresolved debugging relocs in dynamic applications.
1364 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1365 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1366 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1367 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1368 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1369 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1370
1371 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1372
1373 * elf64-ppc.c (ONES): Define.
1374 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
1375 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
1376 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
1377
1378 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
1379 (ppc64_elf_set_private_flags): Delete.
1380 (ppc64_elf_section_from_shdr): Delete.
1381 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
1382 (ppc64_elf_fake_sections): Delete.
1383 (bfd_elf64_bfd_set_private_flags): Don't define.
1384 (bfd_elf64_get_symbol_info): Likewise.
1385 (elf_backend_section_from_shdr): Likewise.
1386 (elf_backend_fake_sections): Likewise.
1387
1388 2002-07-10 Marco Walther <Marco.Walther@sun.com>
1389
1390 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
1391 when not already set.
1392 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
1393 (elf_backend_fake_sections): Define.
1394
1395 2002-07-10 Alan Modra <amodra@bigpond.net.au>
1396
1397 * merge.c (_bfd_merge_section): Remove redundant output_section check.
1398 Formatting.
1399 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
1400
1401 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
1402
1403 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
1404 NULL sym_hashes to just before use.
1405 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
1406 symbol with non-default visibility.
1407 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
1408 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1409 Ditto.
1410 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
1411 symbol with non-default visibility.
1412 (cris_elf_check_relocs): At tests for local symbol before
1413 increasing h->plt.refcount, also check for non-default
1414 visibility. Ditto when checking for local symbol to eliminate
1415 pc-relative runtime relocs.
1416
1417 2002-07-08 Alan Modra <amodra@bigpond.net.au>
1418
1419 * elf.c: Formatting.
1420 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
1421 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
1422 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
1423 segments.
1424
1425 2002-07-07 Mark Mitchell <mark@codesourcery.com>
1426 Alan Modra <amodra@bigpond.net.au>
1427
1428 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
1429 account the impact of relocation count overflow when computing
1430 section offsets.
1431 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
1432 or not to apply the PE COFF reloc overflow handling. Fix a
1433 fencepost error in deciding whether or not to use that technique.
1434
1435 2002-07-07 Alan Modra <amodra@bigpond.net.au>
1436
1437 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
1438 change type of locsyms.
1439 (bfd_elf_get_elf_syms): Declare.
1440 * elf.c (bfd_elf_get_elf_syms): New function.
1441 (group_signature): Use bfd_elf_get_elf_syms.
1442 (bfd_section_from_r_symndx): Likewise.
1443 * elfcode.h (elf_slurp_symbol_table): Likewise.
1444 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1445 (elf_link_add_object_symbols): Likewise. Reorganise to increase
1446 locality of various data structures. Properly free internal relocs.
1447 (elf_bfd_final_link): Properly free internal relocs.
1448 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
1449 (elf_link_input_bfd): Likewise.
1450 (elf_gc_mark): Likewise. Properly free internal relocs.
1451 (elf_gc_sweep): Properly free internal relocs.
1452 (elf_reloc_symbol_deleted_p): No need to swap syms in.
1453 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
1454 internal relocs.
1455 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
1456 Properly free possibly cached info.
1457 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
1458 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
1459 symbol swapping code.
1460 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
1461 Properly free possibly cached info.
1462 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
1463 (mn10300_elf_relax_delete_bytes): Likewise.
1464 (mn10300_elf_symbol_address_p): Likewise.
1465 (mn10300_elf_get_relocated_section_contents): Likewise.
1466 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
1467 (elf32_h8_relax_delete_bytes): Likewise.
1468 (elf32_h8_symbol_address_p): Likewise.
1469 (elf32_h8_get_relocated_section_contents): Likewise.
1470 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
1471 (m32r_elf_relax_delete_bytes): Likewise.
1472 (m32r_elf_get_relocated_section_contents): Likewise.
1473 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
1474 elf_section_data to determine whether cached.
1475 (sh_elf_relax_section): As above for elf-m10200.c.
1476 (sh_elf_relax_delete_bytes): Likewise.
1477 (sh_elf_get_relocated_section_contents): Likewise.
1478 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
1479 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
1480 reading of local syms.
1481 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1482 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
1483 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
1484 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
1485 relocs.
1486 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
1487 free internal relocs and section contents. Don't read symbols.
1488 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
1489 (elf32_hppa_size_stubs): Don't free local syms.
1490 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
1491 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
1492 possibly cached info.
1493 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1494 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
1495 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
1496 all_local_syms.
1497 (get_local_syms): Delete function.
1498 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
1499 on exit.
1500 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
1501
1502 2002-07-05 Jim Wilson <wilson@redhat.com>
1503
1504 * syms.c (decode_section_type): New.
1505 (bfd_decode_symclass): Call decode_section_type.
1506
1507 2002-07-04 Jakub Jelinek <jakub@redhat.com>
1508
1509 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
1510 section content start.
1511 Reported by Michael Schumacher <mike@hightec-rt.com>.
1512
1513 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1514
1515 * section.c (_bfd_strip_section_from_output): Remove unnecessary
1516 link order code. Don't actually remove the output section here;
1517 Just set a flag for the linker to do so.
1518 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
1519 sections when setting up output section dynsyms.
1520
1521 2002-07-04 Alan Modra <amodra@bigpond.net.au>
1522
1523 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
1524 fudge.
1525 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
1526 libs here instead.
1527
1528 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1529
1530 * elf64-s390.c (create_got_section): Set .got section alignment to
1531 8 bytes.
1532 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
1533
1534 2002-07-02 Alan Modra <amodra@bigpond.net.au>
1535
1536 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
1537
1538 2002-07-01 Matt Thomas <matt@3am-software.com>
1539
1540 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
1541 to EF_VAX_*.
1542
1543 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1544
1545 * elfxx-mips.c (ABI_64_P): Fix comment.
1546 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
1547 new section names for N64 ABI.
1548 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1549 (mips_elf_calculate_relocation): Code formatting.
1550 (mips_elf_create_dynamic_relocation): Likewise.
1551 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1552 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1553 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1554 in any NewABI.
1555 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1556 for NewABI.
1557 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1558 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1559 here, too.
1560
1561 2002-07-01 Andreas Schwab <schwab@suse.de>
1562
1563 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1564 R_X86_64_64 to R_X86_64_RELATIVE.
1565
1566 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1567
1568 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1569 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1570 Run "make dep-am".
1571 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1572 host_aout_vec.
1573 * configure.in (vaxbsd_vec): Add.
1574 * targets.c (vaxbsd_vec): Add.
1575 * Makefile.in: Rebuild.
1576 * configure: Rebuild.
1577 * po/SRC-POTFILES.in: Rebuild.
1578
1579 2002-07-01 Alan Modra <amodra@bigpond.net.au>
1580
1581 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1582 examining to gc_mark_hook, rather than the bfd.
1583 (elf_gc_sections): Adjust.
1584 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1585 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1586 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1587 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1588 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1589 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1590 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1591 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1592 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1593 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1594 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1595 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1596 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1597 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1598 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1599 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1600 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1601 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1602 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1603 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1604 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1605 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1606 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1607 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1608 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1609 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1610 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1611 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1612 redundant local sym tests.
1613 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1614 (link_hash_newfunc): Init is_entry.
1615 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1616 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1617 (create_linkage_sections): Use bfd_make_section_anyway rather than
1618 bfd_make_section.
1619 (ppc64_elf_mark_entry_syms): New function.
1620 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1621 up opd entry to function section map.
1622 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1623 relocs that reference the opd section.
1624 (edit_opd): New function.
1625 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1626 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1627 (get_local_syms): Do so here. Exit if we already have local syms.
1628 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1629 read local syms on non-ELF input.
1630 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1631 than duplicating it's function here. Adjust free of internal
1632 relocs to suit.
1633 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1634 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1635 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1636 _bfd_elf32_link_read_relocs rather than duplicating it's function
1637 here. Adjust free of internal relocs to suit.
1638
1639 2002-07-01 Andreas Jaeger <aj@suse.de>
1640
1641 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1642 are not allowed in shared libs code, enforce -fPIC.
1643
1644 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1645
1646 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1647 trailing zero-sequences when there's previous left-over data.
1648
1649 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1650
1651 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1652 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1653 and opd_rel_sec in order for starting rela section. Check _raw_size.
1654 (elf_backend_reloc_type_class): Define.
1655
1656 2002-06-27 Kevin Buettner <kevinb@redhat.com>
1657
1658 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1659 DWARF2 formats.
1660
1661 2002-06-27 Alan Modra <amodra@bigpond.net.au>
1662
1663 * cpu-powerpc.c: Comment on ordering of arch_info.
1664 * elf32-ppc.c (ppc_elf_object_p): New function.
1665 (elf_backend_object_p): Define.
1666 * elf64-ppc.c (ppc64_elf_object_p): New function.
1667 (elf_backend_object_p): Define.
1668
1669 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1670
1671 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1672 * configure: Regenerate.
1673
1674 2002-06-25 Jason Eckhardt <jle@rice.edu>
1675
1676 * dwarf2.c (decode_line_info): Check unit->addr_size
1677 to read in the proper number of prologue bytes.
1678
1679 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1680
1681 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1682 aix5coff64_vec if 64-bit bfd support has been enabled.
1683 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1684 been enabled.
1685
1686 * targets.c (_bfd_target_vector[]): Only include
1687 aix5coff64_vec if 64-bit bfd support has been enabled.
1688
1689 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1690
1691 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1692 * elf32-hppa.c (hppa_add_stub): Likewise.
1693 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1694 * elflink.h (elf_add_default_symbol): Fix comment typo.
1695 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1696 (elf_link_add_object_symbols): Likewise.
1697 (elf_link_assign_sym_version): Likewise.
1698 * hash.c (bfd_hash_lookup): Likewise.
1699 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1700 * section.c (bfd_get_unique_section_name): Likewise.
1701 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1702 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1703 (assign_section_numbers): Likewise.
1704 (_bfd_elfcore_make_pseudosection): Likewise.
1705 (elfcore_grok_lwpstatus): Likewise.
1706 (elfcore_grok_win32pstatus): Likewise.
1707 (elfcore_write_note): Constify input params. Use PTR instead of
1708 void *. Include terminating NUL in namesz. Correct padding.
1709 Support NULL "name" param. Use memcpy instead of strcpy.
1710 (elfcore_write_prpsinfo): Constify input params.
1711 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1712 (elfcore_write_lwpstatus): Likewise.
1713 (elfcore_write_pstatus): Likewise.
1714 (elfcore_write_prfpreg): Likewise.
1715 (elfcore_write_prxfpreg): Likewise.
1716 * elf-bfd.h (elfcore_write_note): Update declaration.
1717 (elfcore_write_prpsinfo): Likewise.
1718 (elfcore_write_prstatus): Likewise.
1719 (elfcore_write_pstatus): Likewise.
1720 (elfcore_write_prfpreg): Likewise.
1721 (elfcore_write_prxfpreg): Likewise.
1722 (elfcore_write_lwpstatus): Likewise.
1723
1724 2002-06-25 Jason Eckhardt <jle@rice.edu>
1725
1726 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1727 symbols of type stProc and stStaticProc.
1728
1729 2002-06-25 Nick Clifton <nickc@redhat.com>
1730
1731 * ecoff.c: VArious formatting fixes.
1732
1733 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1734
1735 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1736
1737 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1738
1739 * aout-adobe.c: Don't compare against "true" or "false.
1740 * aout-target.h: Likewise.
1741 * aoutx.h: Likewise.
1742 * archive.c: Likewise.
1743 * bout.c: Likewise.
1744 * cache.c: Likewise.
1745 * coff-a29k.c: Likewise.
1746 * coff-alpha.c: Likewise.
1747 * coff-i386.c: Likewise.
1748 * coff-mips.c: Likewise.
1749 * coff-or32.c: Likewise.
1750 * coff64-rs6000.c: Likewise.
1751 * coffcode.h: Likewise.
1752 * coffgen.c: Likewise.
1753 * cpu-ns32k.c: Likewise.
1754 * ecoff.c: Likewise.
1755 * ecofflink.c: Likewise.
1756 * elf.c: Likewise.
1757 * elf32-arm.h: Likewise.
1758 * elf32-cris.c: Likewise.
1759 * elf32-d30v.c: Likewise.
1760 * elf32-i386.c: Likewise.
1761 * elf32-mcore.c: Likewise.
1762 * elf32-ppc.c: Likewise.
1763 * elf32-sh.c: Likewise.
1764 * elf32-sh64.c: Likewise.
1765 * elf32-v850.c: Likewise.
1766 * elf64-alpha.c: Likewise.
1767 * elf64-sh64.c: Likewise.
1768 * elfcode.h: Likewise.
1769 * elfcore.h: Likewise.
1770 * elflink.h: Likewise.
1771 * elfxx-mips.c: Likewise.
1772 * i386os9k.c: Likewise.
1773 * ieee.c: Likewise.
1774 * libbfd.c: Likewise.
1775 * linker.c: Likewise.
1776 * mmo.c: Likewise.
1777 * nlm32-alpha.c: Likewise.
1778 * nlm32-i386.c: Likewise.
1779 * nlm32-ppc.c: Likewise.
1780 * nlm32-sparc.c: Likewise.
1781 * nlmcode.h: Likewise.
1782 * oasys.c: Likewise.
1783 * pdp11.c: Likewise.
1784 * peicode.h: Likewise.
1785 * reloc.c: Likewise.
1786 * som.c: Likewise.
1787 * srec.c: Likewise.
1788 * tekhex.c: Likewise.
1789 * vms.c: Likewise.
1790 * xcofflink.c: Likewise.
1791 * elf64-sparc.c: Edit comment to not use "== false".
1792
1793 * aoutf1.h: Don't use "? true : false".
1794 * ecoff.c: Likewise.
1795 * format.c: Likewise.
1796 * ieee.c: Likewise.
1797 * linker.c: Likewise.
1798 * mmo.c: Likewise.
1799 * oasys.c: Likewise.
1800
1801 2002-06-23 H.J. Lu <hjl@gnu.org>
1802
1803 * elflink.h (elf_link_add_archive_symbols): For the default
1804 version, check references with only one `@' first.
1805
1806 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1807
1808 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1809 function.
1810 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1811 symbol table.
1812 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1813 (elf64_hppa_size_dynamic_sections): Revise to use
1814 elf64_hppa_mark_milli_and_exported_functions.
1815 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1816 symbols out of dynamic symbol table.
1817
1818 2002-06-23 Alan Modra <amodra@bigpond.net.au>
1819
1820 * Makefile.in: Regenerate.
1821 * libbfd.h: Regenerate.
1822 * bfd-in2.h: Regenerate.
1823 * configure: Regenerate.
1824 * po/SRC-POTFILES.in: Regenerate.
1825
1826 * elflink.h: Comment typo fixes.
1827
1828 2002-06-23 H.J. Lu <hjl@gnu.org>
1829
1830 * elf-bfd.h (elf_link_loaded_list): New structure.
1831 (elf_link_hash_table): Add "loaded".
1832 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1833 * elflink.h (elf_link_check_versioned_symbol): New function.
1834 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1835
1836 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1837
1838 * elflink.h (size_dynamic_sections): If the target does not
1839 support an ELF style hash table, return true, indicating that
1840 nothing needed to be done, rather than false, indicating that the
1841 section's size could not be computed.
1842
1843 2002-06-18 Dave Brolley <brolley@redhat.com>
1844
1845 From Catherine Moore, Michael Meissner, Dave Brolley:
1846 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1847 * targets.c: Support bfd_elf32_frv_vec.
1848 * reloc.c: Add FRV relocs.
1849 * configure.in: Add support for bfd-elf32-frv-vec.
1850 * config.bfd (targ_cpu): Add support for frv-*-elf.
1851 * archures.c: Add frv arch and machines.
1852 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1853 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1854 (BFD32_BACKENDS): Add elf32-frv.lo.
1855 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1856 (cpu-frv.lo): New target.
1857 (elf32-frv.lo): New target.
1858 * cpu-frv.c: New file.
1859 * elf32-frv.c: New file.
1860
1861 2002-06-18 Jakub Jelinek <jakub@redhat.com>
1862
1863 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1864 e_shnum == 0.
1865 Only read the first section header if e_shoff is non-zero.
1866 Don't consider e_shstrndx if there are no sections.
1867
1868 2002-06-17 Tom Rix <trix@redhat.com>
1869
1870 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1871 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1872 complain_overflow_bitfield.
1873
1874 2002-06-17 Alan Modra <amodra@bigpond.net.au>
1875
1876 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1877 (bfd_fdopenr): Likewise.
1878 (bfd_openstreamr): Likewise.
1879 (bfd_openw): Likewise.
1880
1881 * targets.c: Sort target vecs.
1882 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1883 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1884 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1885 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1886 * configure.in: Sort target vecs. Add m88kmach3_vec.
1887 * configure: Regenerate.
1888
1889 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1890
1891 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1892 bpo_reloc_no to break sort order ties, not address of items.
1893
1894 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1895
1896 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1897 Skip excluded sections in determing __gp value.
1898 (elf_hppa_final_link_relocate): Use the symbol's address in
1899 R_PARISC_FPTR64 relocations that don't need an opd entry.
1900 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1901 (elf64_hppa_finalize_dynreloc): Likewise.
1902 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1903 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1904
1905 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1906
1907 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1908 alignment for .bss, .data and .text sections so that sse and sse2
1909 code will work.
1910 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1911
1912 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
1913
1914 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1915 sh[1234]*-elf*.
1916
1917 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1918
1919 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1920 dynamic sections.
1921
1922 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1923 for a symbol that has no output section.
1924 (allocate_dynrel_entries): Correct comment.
1925 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1926 unless we want one.
1927 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1928 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1929 with no section. Remove unnecessary parentheses.
1930
1931 2002-06-11 Tom Rix <trix@redhat.com>
1932
1933 * coffcode.h (coff_compute_section_file_positions): Add data
1934 section to AIX loader alignment check.
1935
1936 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1937 alignment to 4 bytes.
1938 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1939 power accessor macro.
1940 (do_shared_object_padding): Remove invalid assertion.
1941
1942 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
1943
1944 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1945 for removed output sections.
1946
1947 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
1948
1949 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1950 htab_alloc.
1951 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1952
1953 2002-06-08 H.J. Lu <hjl@gnu.org>
1954
1955 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1956 work around a long long bug in gcc 2.96 on mips.
1957
1958 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1959
1960 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1961 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1962 Regenerate dependency lists.
1963 * Makefile.in: Regenerate.
1964 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1965 vax1knetbsd_vec to targ_selvecs.
1966 * configure.in: Add vax1knetbsd_vec.
1967 * configure: Regenerate.
1968 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1969 * vax1knetbsd.c: New file.
1970 * vaxnetbsd.c: Update copyright years.
1971 (TARGET_PAGE_SIZE): Set to 0x1000.
1972 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1973
1974 2002-06-08 Matt Thomas <matt@3am-software.com>
1975
1976 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1977
1978 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1979
1980 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1981
1982 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1983
1984 * Makefile.am: Run "make dep-am".
1985 * Makefile.in: Regenerate.
1986
1987 * armnetbsd.c: Replace CONST with const.
1988 * corefile.c: Likewise.
1989 * elf32-dlx.c: Likewise.
1990 * elf64-mips.c: Likewise.
1991 * mmo.c: Likewise.
1992 * ns32knetbsd.c: Likewise.
1993
1994 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1995 table is elf64-sparc.
1996
1997 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1998
1999 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2000 Fix RELA addends to get not shifted in the result. Don't do special
2001 handling of R_MIPS_64 for NewABI.
2002
2003 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2004
2005 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2006 (NAME(aout,slurp_reloc_table)): Likewise.
2007 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2008 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2009 (xcoff_write_archive_contents_big): Likewise.
2010 (xcoff_generate_rtinit): Likewise.
2011 (xcoff_generate_rtinit): Likewise, and check error return.
2012 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2013 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2014 (coff_get_normalized_symtab): Likewise.
2015 (coff_make_empty_symbol): Likewise.
2016 (bfd_coff_set_symbol_class): Likewise.
2017 * cofflink.c (coff_link_add_symbols): Likewise.
2018 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
2019 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
2020 (bfd_ecoff_write_accumulated_debug): Likewise.
2021 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
2022 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
2023 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
2024 * ieee.c (do_with_relocs): Use bfd_zalloc.
2025 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
2026 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2027 (NAME(aout,slurp_reloc_table)): Likewise.
2028 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
2029 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
2030 * som.c (som_build_and_write_symbol_table): Likewise.
2031 (som_slurp_string_table): Likewise.
2032 (som_slurp_symbol_table): Likewise.
2033 (som_bfd_ar_write_symbol_stuff): Likewise.
2034 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
2035 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
2036 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
2037 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
2038 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
2039
2040 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2041
2042 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
2043 "group" union.
2044 (elf_group_name): Update.
2045 (elf_group_id): Define.
2046 (bfd_elf_set_group_contents): Declare.
2047 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
2048 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
2049 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
2050 that sym for the signature.
2051 (_bfd_elf_compute_section_file_positions): Don't call
2052 set_group_contents for "ld -r" case.
2053 (swap_out_syms): Use bfd_zalloc.
2054 * elflink.h (elf_link_add_archive_symbols): Likewise.
2055 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2056 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
2057
2058 2002-06-07 Alan Modra <amodra@bigpond.net.au>
2059
2060 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
2061 relocs in opd for non-shared too.
2062
2063 2002-06-06 Jeffrey Law <law@redhat.com>
2064
2065 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
2066 relocations.
2067
2068 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
2069
2070 * merge.c: Include libiberty.h.
2071 * elf-strtab.c: Include libiberty.h.
2072
2073 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
2074
2075 * peXXigen.c (pe_print_idata): Remove unused variable.
2076
2077 2002-06-06 David Heine <dlheine@tensilica.com>
2078
2079 * elf.c (assign_file_positions_for_segments): Remove unallocated
2080 sections from the section to segment mapping for PT_LOAD segments.
2081 Update comment about empty loadable segments.
2082
2083 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
2084
2085 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
2086 is within the .stabstr section.
2087
2088 2002-06-06 Alan Modra <amodra@bigpond.net.au>
2089
2090 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
2091 are "const PTR", not "const PTR *".
2092 (bfd_elf32_swap_symbol_in): Likewise.
2093 (bfd_elf64_swap_symbol_in): Likewise.
2094 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
2095 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2096 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2097 (elf_link_add_object_symbols): Likewise.
2098 (elf_link_record_local_dynamic_symbol): Likewise.
2099 (elf_link_input_bfd): Likewise.
2100 (elf_gc_mark): Likewise.
2101 (elf_reloc_symbol_deleted_p): Likewise.
2102 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2103 (mn10200_elf_relax_delete_bytes): Likewise.
2104 (mn10200_elf_symbol_address_p): Likewise.
2105 (mn10200_elf_get_relocated_section_contents): Likewise.
2106 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2107 (mn10300_elf_relax_section): Likewise.
2108 (mn10300_elf_relax_delete_bytes): Likewise.
2109 (mn10300_elf_symbol_address_p): Likewise.
2110 (mn10300_elf_get_relocated_section_contents): Likewise.
2111 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2112 (elf32_h8_relax_delete_bytes): Likewise.
2113 (elf32_h8_symbol_address_p): Likewise.
2114 (elf32_h8_get_relocated_section_contents): Likewise.
2115 * elf32-hppa.c (get_local_syms): Likewise.
2116 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2117 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2118 * elf32-sh.c (sh_elf_relax_section): Likewise.
2119 (sh_elf_relax_delete_bytes): Likewise.
2120 (sh_elf_get_relocated_section_contents): Likewise.
2121 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2122 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2123 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2124 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2125 * elf64-ppc.c (get_local_syms): Likewise.
2126 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2127 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2128
2129 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
2130
2131 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
2132
2133 2002-06-05 Alan Modra <amodra@bigpond.net.au>
2134
2135 * elf.c (group_signature): Swap in the whole symbol, and handle
2136 extracting section symbol names.
2137 (setup_group): Add comment.
2138 (set_group_contents): When called from objcopy or ld, arrange for
2139 section contents to be written. Write group member output section
2140 indices to allow objcopy to reorganize sections.
2141 (_bfd_elf_copy_private_section_data): Copy group info.
2142
2143 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
2144 (bfd_elf32_swap_symbol_in): Update prototype.
2145 (bfd_elf64_swap_symbol_in): Likewise.
2146 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
2147 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2148 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2149 (elf_link_add_object_symbols): Likewise.
2150 (elf_link_record_local_dynamic_symbol): Likewise.
2151 (elf_link_input_bfd): Likewise.
2152 (elf_gc_mark): Likewise.
2153 (elf_reloc_symbol_deleted_p): Likewise.
2154 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2155 (mn10200_elf_relax_delete_bytes): Likewise.
2156 (mn10200_elf_symbol_address_p): Likewise.
2157 (mn10200_elf_get_relocated_section_contents): Likewise.
2158 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2159 (mn10300_elf_relax_section): Likewise.
2160 (mn10300_elf_relax_delete_bytes): Likewise.
2161 (mn10300_elf_symbol_address_p): Likewise.
2162 (mn10300_elf_get_relocated_section_contents): Likewise.
2163 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2164 (elf32_h8_relax_delete_bytes): Likewise.
2165 (elf32_h8_symbol_address_p): Likewise.
2166 (elf32_h8_get_relocated_section_contents): Likewise.
2167 * elf32-hppa.c (get_local_syms): Likewise.
2168 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2169 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2170 * elf32-sh.c (sh_elf_relax_section): Likewise.
2171 (sh_elf_relax_delete_bytes): Likewise.
2172 (sh_elf_get_relocated_section_contents): Likewise.
2173 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2174 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2175 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2176 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2177 * elf64-ppc.c (get_local_syms): Likewise.
2178 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2179 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2180 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
2181 * elf64-alpha.c (alpha_elf_size_info): Likewise.
2182 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2183 * elf64-mips.c (mips_elf64_size_info): Likewise.
2184 * elf64-s390.c (s390_elf64_size_info): Likewise.
2185 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2186
2187 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2188
2189 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
2190 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
2191 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
2192 _bfd_mips_elf_ignore_discarded_relocs.
2193 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
2194
2195 2002-06-05 H.J. Lu <hjl@gnu.org>
2196
2197 * elfxx-mips.c (mips_elf_calculate_relocation): Call
2198 _bfd_elf_rel_local_sym for STT_SECTION relocations against
2199 the SEC_MERGE section.
2200
2201 2002-06-05 Alan Modra <amodra@bigpond.net.au>
2202
2203 * coff-alpha.c: Update copyright date.
2204 * coff-mips.c: Likewise.
2205 * xcoff-target.h: Likewise.
2206
2207 * bfd-in.h: Remove "taken from the source" comment.
2208 * libbfd-in.h: Likewise.
2209 * libcoff-in.h: Likewise.
2210 * bfd-in2.h: Regenerate.
2211 * libbfd.h: Regenerate.
2212 * libcoff.h: Regenerate.
2213
2214 * elf.c (bfd_elf_discard_group): Return true.
2215 * elf-bfd.h (bfd_elf_discard_group): Declare.
2216 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
2217 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
2218 * bfd.c (bfd_discard_group): Define.
2219 * targets.c (struct bfd_target): Add _bfd_discard_group.
2220 (BFD_JUMP_TABLE_LINK): Here too.
2221 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
2222 * aout-adobe.c (aout_32_bfd_discard_group): Define.
2223 * aout-target.h (MY_bfd_discard_group): Define.
2224 * aout-tic30.c (MY_bfd_discard_group): Define.
2225 * binary.c (binary_bfd_discard_group): Define.
2226 * bout.c (b_out_bfd_discard_group): Define.
2227 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
2228 * coffcode.h (coff_bfd_discard_group): Define.
2229 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
2230 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
2231 * i386msdos.c (msdos_bfd_discard_group): Define.
2232 * i386os9k.c (os9k_bfd_discard_group): Define.
2233 * ieee.c (ieee_bfd_discard_group): Define.
2234 * ihex.c (ihex_bfd_discard_group): Define.
2235 * mmo.c (mmo_bfd_discard_group): Define.
2236 * nlm-target.h (nlm_bfd_discard_group): Define.
2237 * oasys.c (oasys_bfd_discard_group): Define.
2238 * ppcboot.c (ppcboot_bfd_discard_group): Define.
2239 * som.c (som_bfd_discard_group): Define.
2240 * srec.c (srec_bfd_discard_group): Define.
2241 * tekhex.c (tekhex_bfd_discard_group): Define.
2242 * versados.c (versados_bfd_discard_group): Define.
2243 * vms.c (vms_bfd_discard_group): Define.
2244 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
2245 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
2246 (aix5coff64_vec): Likewise.
2247 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
2248
2249 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2250
2251 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
2252 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
2253 (elf32-sh64-com.lo): New dependency list.
2254 * Makefile.in: Regenerate.
2255 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
2256 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
2257 elf32-sh64-com.lo.
2258 * configure: Regenerate.
2259 * elf32-sh64.c (sh64_address_in_cranges)
2260 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
2261 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
2262 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
2263 * elf32-sh64-com.c: ...here. New file.
2264
2265 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2266
2267 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
2268 ATTRIBUTE_UNUSED on used params.
2269 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
2270 before calling bfd_section_from_elf_index on local syms.
2271 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2272
2273 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2274
2275 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
2276 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
2277 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
2278 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
2279 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
2280 * Makefile.in: Regenerate.
2281 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2282 (sh64-*-netbsd*): New targets.
2283 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
2284 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
2285 * configure: Regenerate.
2286 * elf32-sh64-nbsd.c: New file.
2287 * elf64-sh64-nbsd.c: New file.
2288 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
2289 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
2290 bfd_elf64_sh64lnbsd_vec.
2291
2292 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2293
2294 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
2295 (bfd_section_from_shdr): Likewise. Set section name of group
2296 sections from signature.
2297 (group_signature): Split out from setup_group. Ensure symbol table
2298 is available.
2299 (bfd_elf_discard_group): New function.
2300 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
2301 .gnu.linkonce* sections if they are members of a group.
2302 (set_group_contents): Set GRP_COMDAT flag.
2303 * section.c (bfd_discard_group): New function.
2304 * bfd-in.h (bfd_elf_discard_group): Declare.
2305 * bfd-in2.h: Regenerate.
2306 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
2307 (elf_linkonce_p): Define.
2308
2309 2002-06-04 Alan Modra <amodra@bigpond.net.au>
2310
2311 * elf.c (bfd_section_from_shdr): Make "name" const.
2312 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
2313 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
2314 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2315 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2316 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2317 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2318 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2319 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
2320 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2321 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2322 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2323
2324 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2325
2326 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
2327 ABI.
2328
2329 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
2330
2331 * elf32-arc.c: Fix formatting.
2332 * elf32-arm.h: Likewise.
2333 * elf32-cris.c: Likewise.
2334 * elf32-dlx.c: Likewise.
2335 * elf32-hppa.c: Likewise.
2336 * elf32-i386.c: Likewise.
2337 * elf32-i386qnx.c: Likewise.
2338 * elf32-or32.c: Likewise.
2339 * elf32-s390.c: Likewise.
2340 * elf32-sh64.c: Likewise.
2341 * elf32-vax.c: Likewise.
2342 * elf32-xstormy16.c: Likewise.
2343 * elf64-alpha.c: Likewise.
2344 * elf64-mmix.c: Likewise.
2345 * elf64-ppc.c: Likewise.
2346 * elf64-s390.c: Likewise.
2347 * elf64-sh64.c: Likewise.
2348 * elf64-x86-64.c: Likewise.
2349
2350 2002-06-02 Richard Henderson <rth@redhat.com>
2351
2352 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
2353 null when there are no got entries for a symbol.
2354 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
2355 uninitialized variable warning.
2356
2357 2002-06-01 Richard Henderson <rth@redhat.com>
2358
2359 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
2360 undefined symbols here.
2361 (elf64_alpha_relax_section): Do it here. Also test for not
2362 defined in the current module.
2363 (elf64_alpha_relocate_section_r): Split out of ...
2364 (elf64_alpha_relocate_section): ... here. Don't dereference
2365 NULL when looking up local got entries.
2366
2367 2002-06-01 Richard Henderson <rth@redhat.com>
2368
2369 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
2370 symbols from JSR relaxation.
2371 (elf64_alpha_size_plt_section_1): New.
2372 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
2373 (elf64_alpha_size_rela_got_1): ... here.
2374 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
2375 (elf64_alpha_size_rela_got_section): ... here.
2376 (elf64_alpha_size_plt_section): New.
2377 (elf64_alpha_relax_section): Call them.
2378 (elf64_alpha_size_got_sections): Remove output_bfd arg.
2379 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
2380
2381 2002-06-01 Richard Henderson <rth@redhat.com>
2382
2383 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
2384 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
2385 in shared libraries. Fix DTPRELHI and TPRELHI value.
2386 (INSN_ADDQ, INSN_RDUNIQ): New.
2387 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
2388 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
2389 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
2390 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
2391 Handle GOTDTPREL and GOTTPREL relocations.
2392 (elf64_alpha_relax_gprelhilo): New.
2393 (elf64_alpha_relax_tls_get_addr): New.
2394 (elf64_alpha_relax_find_tls_segment): New.
2395 (elf64_alpha_relax_section): Handle TLS relocations.
2396 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
2397 (elf64_alpha_check_relocs): Set it.
2398
2399 2002-06-01 Richard Henderson <rth@redhat.com>
2400
2401 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
2402
2403 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
2404 check; don't suppress dynamic relocs for non-allocated sections.
2405
2406 * elf64-alpha.c: Remove dead code.
2407
2408 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2409
2410 * bfd-in2.h: Regenerate.
2411 * libbfd.h: Regenerate.
2412 * po/SRC-POTFILES.in: Regenerate.
2413
2414 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
2415 space for bss .plt.
2416
2417 2002-05-31 Graeme Peterson <gp@qnx.com>
2418
2419 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
2420 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
2421 Run "make dep-am".
2422 * Makefile.in: Regenerate.
2423 * config.bfd: Add i[3456]86-*-nto-qnx* support.
2424 * configure.in: Add bfd_elf32_i386qnx_vec support.
2425 * configure: Regenerate.
2426 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
2427 is_contained_by_filepos, and copy_private_bfd_data_p.
2428 * elf.c (assign_file_positions_for_segments): Call backend
2429 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
2430 (IS_CONTAINED_BY_FILEPOS): Define.
2431 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
2432 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
2433 Fix non-K&R call to _bfd_error_handler.
2434 (_bfd_elf_copy_private_section_data): Use backend
2435 copy_private_bfd_data_p.
2436 * elf32-i386.c: Don't include elfxx-target.h when
2437 ELF32_I386_C_INCLUDED is defined.
2438 * elf32-i386qnx.c: New QNX elf backend file.
2439 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
2440 elf_backend_is_contained_by_filepos, and
2441 elf_backend_do_copy_private_bfd_data.
2442 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
2443
2444 2002-05-31 Alan Modra <amodra@bigpond.net.au>
2445
2446 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
2447 Move other similar defines to start of file.
2448
2449 2002-05-30 Tom Rix <trix@redhat.com>
2450
2451 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
2452 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
2453
2454 2002-05-30 Richard Henderson <rth@redhat.com>
2455
2456 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
2457 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
2458 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
2459 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
2460 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
2461 (struct alpha_elf_obj_tdata): Rename total_got_entries and
2462 n_local_got_entries to total_got_size and local_got_size.
2463 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
2464 (alpha_got_entry_size): New.
2465 (elf64_alpha_relax_with_lituse): Use it.
2466 (elf64_alpha_relax_without_lituse): Likewise.
2467 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
2468 (get_got_entry): New.
2469 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
2470 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
2471 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
2472 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
2473 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
2474 (elf64_alpha_calc_got_offsets): Likewise.
2475 (alpha_dynamic_entries_for_reloc): New.
2476 (elf64_alpha_calc_dynrel_sizes): Use it.
2477 (elf64_alpha_size_dynamic_sections): Likewise.
2478 (elf64_alpha_relocate_section): Handle TLS relocations.
2479 * reloc.c: Add Alpha TLS relocations.
2480 * bfd-in2.h, libbfd.h: Rebuild.
2481
2482 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2483
2484 * peXXigen.c (pe_print_idata): Remove double printed
2485 import table lines; add Bound-To comment.
2486
2487 2002-05-29 Matt Thomas <matt@3am-software.com>
2488
2489 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
2490 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
2491 (elf32-vax.lo): New rule.
2492 * Makefile.in: Regenerate.
2493 * configure.in (bfd_elf32_vax_vec)
2494 (vaxnetbsd_vec): New vectors.
2495 * configure: Regenerate.
2496 * config.bfd (vax-*-netbsdelf*)
2497 (vax-*-netbsdaout*)
2498 (vax-*-netbsd*): New targets.
2499 * elf32-vax.c: New file.
2500 * reloc.c: Add VAX relocations.
2501 * bfd-in2.h: Regenerate.
2502 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
2503
2504 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
2505
2506 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
2507 and bfd_elf32_bigarm_vec to targ_selvecs.
2508
2509 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2510
2511 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
2512 with auto-imported symbols.
2513
2514 2002-05-29 Adam Nemet <anemet@lnxw.com>
2515
2516 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
2517 sections only record bfd.
2518 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
2519 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
2520 * bfd-in2.h: Regenerate.
2521
2522 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
2523
2524 * syms.c (_bfd_stab_section_find_nearest_line): Move
2525 declaration and initialisation of saw_line and saw_func out of
2526 for loop.
2527
2528 2002-05-29 Alan Modra <amodra@bigpond.net.au>
2529
2530 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
2531 (bfd_elf64_get_symbol_info): Define.
2532 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
2533
2534 2002-05-29 Andrey Volkov <avolkov@transas.com>
2535
2536 * cpu-h8300.c: Make default h8300 machine first in machine list.
2537
2538 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
2539
2540 * config.bfd: Added DLX configuraton.
2541 * Makefile.am: Added DLX configuraton.
2542 * configure.in: Added DLX configuraton.
2543 * archures.c: Add DLX architecure.
2544 * reloc.c: Add DLX relocs.
2545 * targets.c: Added DLX target vector.
2546 * configure: Regenerate.
2547 * Makefile.in: Regenreate.
2548 * bfd-in2.h: Regenreate.
2549 * elf32-dlx.c: New file: Support DLX target.
2550 * cpu-dlx.c: New file: Support DLX target.
2551
2552 2002-05-25 Alan Modra <amodra@bigpond.net.au>
2553
2554 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2555
2556 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2557 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2558 strings to point inside function code sym string.
2559 (func_desc_adjust): Likewise.
2560 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2561
2562 2002-05-24 Michal Ludvig <mludvig@suse.cz>
2563
2564 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2565 (elf64_x86_64_grok_psinfo): Added.
2566
2567 2002-05-24 TAMURA Kent <kent@netbsd.org>
2568
2569 * config.bfd: Add a target for i386-netbsdpe.
2570
2571 2002-05-24 Alan Modra <amodra@bigpond.net.au>
2572
2573 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2574 and is_func_descriptor.
2575 (func_desc_adjust): Hide function code sym in shared libs unless
2576 there is a matching exported function descriptor sym.
2577
2578 2002-05-23 Jakub Jelinek <jakub@redhat.com>
2579
2580 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2581 for symbols from SHF_TLS section.
2582 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2583 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2584 (map_sections_to_segments): Build PT_TLS segment if necessary.
2585 (assign_file_positions_for_segments): Likewise.
2586 (get_program_header_size): Account for PT_TLS segment.
2587 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2588 SEC_THREAD_LOCAL sections to STT_TLS.
2589 * reloc.c: Add 386 and IA-64 TLS relocs.
2590 * section.c (SEC_THREAD_LOCAL): Define.
2591 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2592 Remove.
2593 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2594 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2595 unconditionally.
2596 (struct elf_final_link_info): Add first_tls_sec.
2597 (elf_bfd_final_link): Set first_tls_sec.
2598 Compute elf_hash_table (info)->tls_segment.
2599 (elf_link_output_extsym): Handle STT_TLS symbols.
2600 (elf_link_input_bfd): Likewise.
2601 * syms.c (BSF_THREAD_LOCAL): Define.
2602 * bfd-in2.h: Rebuilt.
2603 * libbfd.h: Rebuilt.
2604 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2605 elf_i386_mkobject, elf_i386_object_p): New functions.
2606 (elf_howto_table): Add TLS relocs.
2607 (elf_i386_reloc_type_lookup): Support TLS relocs.
2608 (elf_i386_info_to_howto_rel): Likewise.
2609 (struct elf_i386_link_hash_entry): Add tls_type.
2610 (struct elf_i386_obj_tdata): New.
2611 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2612 New macros.
2613 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2614 (link_hash_newfunc): Clear tls_type.
2615 (elf_i386_check_relocs): Support TLS relocs.
2616 (elf_i386_gc_sweep_hook): Likewise.
2617 (allocate_dynrelocs): Likewise.
2618 (elf_i386_size_dynamic_sections): Likewise.
2619 (elf_i386_relocate_section): Likewise.
2620 (elf_i386_finish_dynamic_symbol): Likewise.
2621 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2622 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2623 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2624 want_tprel, want_dtpmod, want_dtprel.
2625 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2626 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2627 R_IA64_LTOFF_TPREL22.
2628 (elf_code_to_howto_index): Add TLS relocs.
2629 (elfNN_ia64_check_relocs): Support TLS relocs.
2630 (allocate_global_data_got): Account for TLS .got data.
2631 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2632 (elfNN_ia64_install_value): Supprt TLS relocs.
2633 (set_got_entry): Support TLS relocs.
2634 (elfNN_ia64_relocate_section): Likewise.
2635
2636 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2637
2638 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2639 BLX reloc round the relocation up rather than down.
2640 * coff-arm.c (coff_arm_relocate_section): Likewise.
2641
2642 2002-05-21 H.J. Lu (hjl@gnu.org)
2643
2644 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2645 definition.
2646
2647 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2648
2649 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2650 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2651
2652 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2653
2654 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2655 unresolved relocs.
2656 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2657
2658 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2659
2660 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
2661 non-ELF targets.
2662
2663 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2664
2665 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2666 an error value.
2667 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2668 return with false on error.
2669 (elf_link_input_bfd): Check reloc_emitter return value.
2670
2671 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2672
2673 * config.bfd (armeb-*-netbsdelf*): New target.
2674
2675 2002-05-20 Alan Modra <amodra@bigpond.net.au>
2676
2677 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2678 at the plt call stub.
2679
2680 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2681
2682 * cpu-mips.c (mips_compatible): Don't try to check machine
2683 compatibility.
2684
2685 2002-05-18 Tom Rix <trix@redhat.com>
2686
2687 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2688
2689 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2690
2691 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2692 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2693 we've already warned about an undefined symbol. Report more
2694 detail on reloc errors.
2695
2696 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2697
2698 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2699 * configure.in: Invoke AM_INSTALL_LIBBFD.
2700 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2701 (install_libbfd): .. New target.
2702 (uninstall_libbfd): Likewise.
2703 (install-bfdlibLTLIBRARIES): Likewise.
2704 (uninstall-bfdlibLTLIBRARIES): Likewise.
2705 (bfdlibdir): New.
2706 (bfdincludedir): New.
2707 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2708 * aclocal.m4: Regenerate.
2709 * configure: Regenerate.
2710 * Makefile.in: Regenerate.
2711
2712 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
2713
2714 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2715 hash loop.
2716
2717 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2718
2719 * config.bfd: Add targets for sh64-linux (little endian and
2720 big endian).
2721
2722 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2723
2724 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2725 is located in the same section as the import table. Instead
2726 check, and if necessary load the section containing the thunk.
2727
2728 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2729
2730 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
2731 bfd_bread.
2732 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2733 with bfd_bread.
2734
2735 2002-05-15 Alan Modra <amodra@bigpond.net.au>
2736
2737 * aix5ppc-core.c: Warning fixes.
2738 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2739 * aout-target.h (MY_bfd_link_just_syms): Define.
2740 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2741 * bfd.c (bfd_link_just_syms): Define.
2742 * binary.c (binary_bfd_link_just_syms): Define.
2743 * bout.c (b_out_bfd_link_just_syms): Define.
2744 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2745 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2746 * coffcode.h (coff_bfd_link_just_syms): Define.
2747 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2748 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2749 (_bfd_elf_link_just_syms): Declare.
2750 * elf.c (_bfd_elf_link_just_syms): New function.
2751 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2752 sections haven't already been discarded by the linker.
2753 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2754 sections and SEC_MERGE sections.
2755 (elf_bfd_discard_info): Similarly here.
2756 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2757 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2758 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2759 * ieee.c (ieee_bfd_link_just_syms): Define.
2760 * ihex.c (ihex_bfd_link_just_syms): Define.
2761 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2762 (_bfd_generic_link_just_syms): Declare.
2763 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2764 * linker.c (_bfd_generic_link_just_syms): New function.
2765 * mmo.c (mmo_bfd_link_just_syms): Define.
2766 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2767 * oasys.c (oasys_bfd_link_just_syms): Define.
2768 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2769 * som.c (som_bfd_link_just_syms): Define.
2770 * srec.c (srec_bfd_link_just_syms): Define.
2771 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2772 (BFD_JUMP_TABLE_LINK): And here.
2773 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2774 * versados.c (versados_bfd_link_just_syms): Define.
2775 * vms.c (vms_bfd_link_just_syms): Define.
2776 * libbfd.h: Regenerate.
2777 * bfd-in2.h: Regenerate.
2778
2779 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2780
2781 * elf32-mips.c: Remove superfluous definitions copied from
2782 elfxx-mips.c.
2783 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2784 SGIish vectors to check the special case.
2785 (mips_elf_hi16_reloc): Fix comment.
2786 (mips_elf_got16_reloc): Likewise.
2787 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2788 (elf_reloc_map): Code cleanup.
2789 (mips_reloc_map): Add comment.
2790 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2791 (mips_elf32_rtype_to_howto): Likewise.
2792 (mips_elf32_discard_info): Likewise.
2793 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2794 lead to IRIX compatibility now.
2795
2796 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2797
2798 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2799
2800 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2801
2802 * config.bfd (shle-*-netbsdelf*): Add target which includes
2803 sh64 support.
2804
2805 2002-05-13 David Edelsohn <edelsohn@gnu.org>
2806
2807 * configure.in: Revert 2002-04-07. Instead, auto-configure
2808 HAVE_ST_C_IMPL.
2809 * configure: Regenerate.
2810 * config.in: Regenerate.
2811 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2812 or AIX_5_CORE.
2813
2814 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2815
2816 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2817 corefiles as well.2
2818 * configure: Regenerate.
2819
2820 2002-05-13 Alan Modra <amodra@bigpond.net.au>
2821
2822 * Makefile.am (install-data-local): Install headers to
2823 $(exec_prefix)/include.
2824 * Makefile.in: Regenerate.
2825
2826 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2827 Daniel Jacobowitz <drow@mvista.com>
2828
2829 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2830 map BFD_RELOC_RVA.
2831
2832 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2833
2834 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2835 hppa*-*-openbsd*): New targets.
2836 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2837 * configure: Regenerate.
2838
2839 2002-05-10 Tom Rix <trix@redhat.com>
2840
2841 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
2842 xcoff64_ppc_relocate_section.
2843 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2844 * libxcoff.h: Common xcoff_reloc_type function declaration.
2845
2846 2002-05-10 Alan Modra <amodra@bigpond.net.au>
2847
2848 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
2849 added in 2002-05-09 commit.
2850
2851 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2852 don't look for stubs on all undefined syms.
2853
2854 2002-05-09 Alan Modra <amodra@bigpond.net.au>
2855
2856 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2857 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2858 pcrel_offset.
2859
2860 * elf32-i386.c (elf_howto_table): Comments.
2861 (elf_i386_relocate_section): Handle more relocs for relocatable
2862 linking and against SEC_MERGE sections.
2863
2864 2002-05-08 Alan Modra <amodra@bigpond.net.au>
2865
2866 * elf32-ppc.c (ppc_elf_create_got): New function.
2867 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2868 _bfd_elf_create_dynamic_sections. Correct .plt flags.
2869 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2870 _bfd_elf_create_got_section.
2871
2872 2002-05-07 Alan Modra <amodra@bigpond.net.au>
2873
2874 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2875 * elfxx-target.h (elf_backend_rela_normal): Define.
2876 (elfNN_bed): Init rela_normal.
2877 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2878 for section symbols here if rela_normal. Simplify abs section test.
2879 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2880 return immediately. Remove code handling relocatable linking.
2881 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2882 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2883 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2884 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2885 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2886 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2887 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2888 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2889 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2890 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2891 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2892 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2893 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2894 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2895 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2896 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2897 * elf-m10200.c (elf_backend_rela_normal): Define.
2898 * elf-m10300.c (elf_backend_rela_normal): Define.
2899 * elf32-fr30.c (elf_backend_rela_normal): Define.
2900 * elf32-i370.c (elf_backend_rela_normal): Define.
2901 * elf32-i860.c (elf_backend_rela_normal): Define.
2902 * elf32-m68k.c (elf_backend_rela_normal): Define.
2903 * elf32-mcore.c (elf_backend_rela_normal): Define.
2904 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2905 * elf32-ppc.c (elf_backend_rela_normal): Define.
2906 * elf32-s390.c (elf_backend_rela_normal): Define.
2907 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2908 * elf64-ppc.c (elf_backend_rela_normal): Define.
2909 * elf64-s390.c (elf_backend_rela_normal): Define.
2910 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2911 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2912 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2913 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2914
2915 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2916
2917 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2918 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2919
2920 2002-05-06 Alan Modra <amodra@bigpond.net.au>
2921
2922 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2923 when not relocatable. Fix reloc_emitter call for K&R.
2924
2925 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2926
2927 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2928 reloading local sym addend mistakenly removed in 2002-05-01 change.
2929
2930 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2931 (read_abbrevs): Change "offset" param to bfd_vma.
2932 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2933 Change "abbrev_offset" to bfd_vma.
2934 (read_indirect_string): Use correct conversion chars in error
2935 message format string, cast bfd_vma's to unsigned long.
2936 (read_abbrevs): Likewise.
2937 (read_attribute_value): Likewise.
2938 (decode_line_info): Likewise.
2939 (scan_unit_for_functions): Likewise.
2940 (parse_comp_unit): Likewise.
2941
2942 2002-05-04 Tom Rix <trix@redhat.com>
2943
2944 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2945 (coff_swap_reloc_out): Same.
2946 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2947 (xcoff_swap_reloc_out): Same.
2948 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2949 case some 16 bit relocs. Add reloc value to output.
2950 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2951 R_RBR. Improve names.
2952 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2953 (bfd_xcoff_backend_data): Update with new reloc swap names.
2954 (bfd_pmac_xcoff_backend_data) : Same.
2955 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2956 (xcoff64_swap_reloc_out): Same.
2957 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2958 R_POS. Add reloc value to output.
2959 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2960 bit R_RBR. Improve names, masks.
2961 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2962 (bfd_xcoff_backend_data): Update with new reloc swap names.
2963 (bfd_xcoff_aix5_backend_data) : Same.
2964
2965 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2966
2967 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2968 bfd_count top_index, input_list, all_local_syms.
2969 (elf32_hppa_setup_section_lists): New function, split from
2970 elf32_hppa_size_stubs.
2971 (elf32_hppa_next_input_section): Likewise.
2972 (group_sections): Likewise.
2973 (get_local_syms): Likewise.
2974 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2975 stubs on undefined syms too.
2976 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2977 Only access htab elf fields when we have an elf hash table.
2978 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2979 (elf32_hppa_next_input_section): Declare.
2980
2981 2002-05-04 Bob Byrnes <byrnes@curl.com>
2982
2983 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2984 _bfd_new_bfd.
2985
2986 2002-05-03 H.J. Lu (hjl@gnu.org)
2987
2988 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2989 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2990 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2991 to hide a global symbol.
2992 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2993 forced_local to true.
2994
2995 2002-05-02 Richard Henderson <rth@redhat.com>
2996
2997 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2998 vs SHN_UNDEF to zero.
2999
3000 2002-05-02 Alan Modra <amodra@bigpond.net.au>
3001
3002 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3003 16 bit reloc.
3004 <R_PPC64_SECTOFF_DS>: Likewise.
3005 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3006 SECTOFF reloc.
3007 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3008 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3009 SECTOFF reloc.
3010
3011 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3012 (ppc64_elf_ha_reloc): New function.
3013 (ppc64_elf_brtaken_reloc): New function.
3014 (ppc64_elf_sectoff_reloc): New function.
3015 (ppc64_elf_sectoff_ha_reloc): New function.
3016 (ppc64_elf_toc_reloc): New function.
3017 (ppc64_elf_toc_ha_reloc): New function.
3018 (ppc64_elf_toc64_reloc): New function.
3019 (ppc64_elf_unhandled_reloc): New function.
3020 (ppc64_elf_howto_raw): Use the above.
3021 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
3022 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
3023 <R_PPC64_SECTOFF_DS>: Likewise.
3024 (IS_ABSOLUTE_RELOC): Update.
3025 (struct ppc_link_hash_table): Add have_undefweak.
3026 (ppc64_elf_link_hash_table_create): Init.
3027 (func_desc_adjust): Set have_undefweak.
3028 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
3029 add the .sfpr blr when have_undefweak.
3030 (ppc64_elf_setup_section_lists): Check hash table flavour.
3031 (ppc64_elf_next_input_section): Move output_section->owner test to
3032 ppc64elf.em.
3033 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
3034 and relocatable test. Return TOCstart and don't set elf_gp.
3035 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
3036 offset calculation. Add assert on weak sym branch tweaks.
3037 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
3038 (ppc64_elf_toc): Declare.
3039 (ppc64_elf_next_input_section): Update.
3040
3041 2002-05-01 Alan Modra <amodra@bigpond.net.au>
3042
3043 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
3044 file_name.
3045
3046 2002-05-01 Alan Modra <amodra@bigpond.net.au>
3047
3048 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
3049 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
3050 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
3051 call branches. Correct undefined weak destination.
3052 (ppc64_elf_func_desc_adjust): Always create at least one blr in
3053 .sfpr, and correct case where either only savef* or restf* is
3054 needed.
3055
3056 Long branch stubs, multiple stub sections.
3057 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
3058 (ppc64_elf_next_input_section): Declare.
3059 * elf64-ppc.c: Move linker-only prototypes.
3060 (STUB_SUFFIX): Define.
3061 (enum ppc_stub_type): New.
3062 (struct ppc_stub_hash_entry): New.
3063 (struct ppc_branch_hash_entry): New.
3064 (struct ppc_link_hash_entry): Add stub_cache, oh.
3065 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
3066 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
3067 Rename plt_overflow to stub_error.
3068 (ppc_stub_hash_lookup): Define.
3069 (ppc_branch_hash_lookup): Define.
3070 (stub_hash_newfunc): New function.
3071 (branch_hash_newfunc): New function.
3072 (link_hash_newfunc): Init new fields.
3073 (ppc64_elf_link_hash_table_create): Likewise.
3074 (ppc64_elf_link_hash_table_free): New function.
3075 (ppc_stub_name): New function.
3076 (ppc_get_stub_entry): New function.
3077 (ppc_add_stub): New function.
3078 (create_linkage_sections): Use bfd_make_section_anyway. Create
3079 .branch_lt and .rela.branch_lt sections. Don't create .stub.
3080 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
3081 and set up for plt call stubs. Link func and func desc syms.
3082 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
3083 (func_desc_adjust): Avoid hash lookup when func desc sym available
3084 via shortcut, and set links when processing.
3085 (ppc64_elf_hide_symbol): Likewise.
3086 (allocate_dynrelocs): Don't allocate stub section here.
3087 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
3088 Remove sstub code.
3089 (ppc_type_of_stub): New function.
3090 (build_one_stub): Delete.
3091 (ppc_build_one_stub): New function.
3092 (ppc_size_one_stub): New function.
3093 (ppc64_elf_setup_section_lists): New function.
3094 (ppc64_elf_next_input_section): New function.
3095 (group_sections): New function.
3096 (get_local_syms): New function.
3097 (ppc64_elf_size_stubs): Rewrite.
3098 (ppc64_elf_build_stubs): Rewrite.
3099 (ppc64_elf_relocate_section): Look up stub entry for REL24
3100 relocs. Don't propagate REL14* to dynamic objects. Look for long
3101 branch stubs if REL14* or REL24 relocs won't reach.
3102 (bfd_elf64_bfd_link_hash_table_free): Define.
3103
3104 2002-04-30 Mark Mitchell <mark@codesourcery.com>
3105
3106 * config.bfd: Add support for powerpc-*-windiss.
3107
3108 2002-04-30 Tom Rix <trix@redhat.com>
3109
3110 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
3111 symbol names into the hash table.
3112
3113 2002-04-28 Tom Rix <trix@redhat.com>
3114
3115 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
3116 calulating relocations.
3117 (xcoff_complain_overflow) : Function table for relocation errors.
3118 (xcoff_ppc_relocate_section): Use relocation and complain function
3119 tables.
3120 (xcoff_complain_overflow_unsigned_func): New complain function.
3121 (xcoff_complain_overflow_signed_func): Same.
3122 (xcoff_complain_overflow_bitfield_func): Same.
3123 (xcoff_complain_overflow_dont_func): Same.
3124 (xcoff_reloc_type_crel): New recot function.
3125 (xcoff_reloc_type_br): Same.
3126 (xcoff_reloc_type_ba): Same.
3127 (xcoff_reloc_type_toc): Same.
3128 (xcoff_reloc_type_rel): Same.
3129 (xcoff_reloc_type_neg): Same.
3130 (xcoff_reloc_type_pos): Same.
3131 (xcoff_reloc_type_fail): Same.
3132 (xcoff_reloc_type_noop): Same.
3133 * libxcoff.h : Declare common parts for xcoff64.
3134 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
3135 and complain function tables.
3136
3137 2002-04-28 Alan Modra <amodra@bigpond.net.au>
3138
3139 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
3140 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
3141
3142 2002-04-26 Alan Modra <amodra@bigpond.net.au>
3143
3144 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
3145 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
3146
3147 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
3148 same as the output before calling elf_link_input_bfd.
3149
3150 * coffcode.h (coff_compute_section_file_positions): Set
3151 section_tail after shuffling section list.
3152
3153 2002-04-24 Christian Groessler <chris@groessler.org>
3154
3155 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
3156 addresses are 23bit with a special layout, not plain 32bit
3157 values. Prevent relocation of immediate values.
3158
3159 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
3160
3161 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
3162 MIPS-16 ASE flags are set, print something to indicate that.
3163
3164 2002-04-23 Alan Modra <amodra@bigpond.net.au>
3165
3166 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
3167 under which a plt call stub is used.
3168 (final_link_relocate): Similarly.
3169 (allocate_plt_static): Clear h-plabel except when plt entry is
3170 exclusively used for a plabel.
3171 (allocate_dynrelocs): Use the above to simplify plt sizing.
3172 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
3173 (elf32_hppa_link_hash_table_create): Init.
3174 (BL22_RP): Define.
3175 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
3176 (elf32_hppa_check_relocs): Set has_22bit_branch.
3177
3178 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
3179 (final_link_relocate): Likewise.
3180
3181 2002-04-22 Jakub Jelinek <jakub@redhat.com>
3182
3183 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
3184 search table if some FDE is DW_EH_PE_aligned encoded either.
3185 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
3186
3187 2002-04-22 Richard Smith <richard@ex-parrot.com>
3188 Jakub Jelinek <jakub@redhat.com>
3189
3190 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
3191 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
3192 encoded personality.
3193 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
3194 for CIE/FDE removal.
3195
3196 2002-04-20 Tom Rix <trix@redhat.com>
3197
3198 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
3199
3200 2002-04-20 Alan Modra <amodra@bigpond.net.au>
3201
3202 * archures.c (bfd_lookup_arch): Move the list order comment..
3203 (struct bfd_arch_info): ..to where it belongs.
3204 * bfd-in2.h: Regenerate.
3205
3206 * archures.c (bfd_lookup_arch): Add comment on list order.
3207 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
3208 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
3209 is always at head of list.
3210
3211 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3212
3213 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
3214 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
3215 definition of these functions for ARM_WINCE builds as they are
3216 not used.
3217 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
3218 for ARM_WINCE builds.
3219
3220 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3221
3222 * coff-arm.c (bfd_arm_process_before_allocation):
3223
3224 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
3225
3226 * cpu-sh.c (scan_mach): Delete.
3227 (arch_info_struct): Replace scan_mach with bfd_default_scan.
3228 (bfd_sh_arch): Likewise.
3229
3230 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
3231
3232 * ihex.c (ihex_write_object_contents): Fix check for records
3233 crossing 64K boundaries.
3234
3235 2002-04-16 Alan Modra <amodra@bigpond.net.au>
3236
3237 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
3238 type rather than just assuming entries are ELF.
3239 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3240 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3241 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
3242 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
3243 rather than elf_link_hash_entry.
3244
3245 2002-04-15 Richard Henderson <rth@redhat.com>
3246
3247 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
3248 n32 binaries.
3249
3250 2002-04-15 Michael Snyder <msnyder@redhat.com>
3251
3252 * opncls.c (bfd_close): Write contents if writeable.
3253 Minor formatting tidy-ups.
3254
3255 2002-04-15 Alan Modra <amodra@bigpond.net.au>
3256
3257 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
3258
3259 2002-04-12 Michael Snyder <msnyder@redhat.com>
3260
3261 * bfd-in.h (bfd_get_section_lma): New access macro.
3262 Minor white-space fix-up.
3263
3264 2002-04-12 Alan Modra <amodra@bigpond.net.au>
3265
3266 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
3267 header pad.
3268
3269 2002-04-09 DJ Delorie <dj@redhat.com>
3270
3271 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
3272
3273 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
3274
3275 * coffcode.h (coff_read_word): New.
3276 (coff_compute_checksum): New.
3277 (coff_apply_checksum): New.
3278 (coff_write_object_contents): Call coff_apply_checksum () to
3279 apply checksum to PE image.
3280
3281 2002-04-08 Randolph Chung <tausq@debian.org>
3282
3283 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
3284 (elf32_hppa_final_link): Split out sorting logic to..
3285 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
3286 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
3287
3288 2002-04-07 Andrew Cagney <ac131313@redhat.com>
3289
3290 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
3291 pattern.
3292 * configure: Re-generate.
3293
3294 2002-04-07 Andrew Cagney <ac131313@redhat.com>
3295
3296 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
3297 is greater or equal to 4.3.3.
3298 * configure: Regenerate.
3299 Fix PR gdb/344.
3300
3301 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
3302
3303 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
3304 R_CRIS_32_PCREL>: Fix typo in name.
3305 (cris_elf_check_relocs): Always create .rela.got here when
3306 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
3307 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
3308 assume it's created.
3309
3310 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
3311
3312 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
3313 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
3314 define.
3315 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
3316 * bfd.c (bfd_link_hash_table_free): Define.
3317 * binary.c (binary_bfd_link_hash_table_free): Define.
3318 * bout.c (b_out_bfd_link_hash_table_free): Define.
3319 * coff-rs6000.c (rs6000coff_vec): Include
3320 _bfd_generic_link_hash_table_free.
3321 (pmac_xcoff_vec): Likewise.
3322 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3323 (aix5coff64_vec): Likewise.
3324 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
3325 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
3326 (bfd_elf32_bfd_link_hash_table_free): Define.
3327 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
3328 (bfd_elf32_bfd_link_hash_table_free): Define.
3329 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
3330 define.
3331 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
3332 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
3333 * ieee.c (ieee_bfd_link_hash_table_free): Define.
3334 * ihex.c (ihex_bfd_link_hash_table_free): Define.
3335 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
3336 (_bfd_generic_link_hash_table_free): Add prototype.
3337 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
3338 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
3339 * linker.c (_bfd_generic_link_hash_table_free): New function.
3340 * mmo.c (mmo_bfd_link_hash_table_free): Define.
3341 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
3342 * oasys.c (oasys_bfd_link_hash_table_free): Define.
3343 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
3344 * som.c (som_bfd_link_hash_table_free): Define.
3345 * srec.c (srec_bfd_link_hash_table_free): Define.
3346 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
3347 * versados.c (versados_bfd_link_hash_table_free): Define.
3348 * vms.c (vms_bfd_link_hash_table_free): New function.
3349 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
3350
3351 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
3352 instead of bfd_alloc.
3353 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
3354 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
3355 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
3356 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
3357 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3358 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
3359 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
3360 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
3361 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3362 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
3363 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
3364 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3365 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
3366 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
3367 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
3368 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
3369 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
3370 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
3371 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
3372 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
3373 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3374 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
3375 * m68klinux.c (linux_link_hash_table_create): Likewise.
3376 * sparclinux.c (linux_link_hash_table_create): Likewise.
3377 * sunos.c (sunos_link_hash_table_create): Likewise.
3378 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
3379
3380 * targets.c: Add _bfd_link_hash_table_free to xvec.
3381
3382 * bfd-in2.h: Regenerate.
3383 * libbfd.h: Regenerate.
3384 * libcoff.h: Regenerate.
3385
3386 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3387
3388 * dep-in.sed: Cope with absolute paths.
3389 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
3390 Run "make dep-am".
3391 * Makefile.in: Regenerate.
3392 * coff-arm.c: Fix copyright date.
3393 * cpu-h8300.c: Likewise.
3394 * cpu-i370.c: Likewise.
3395 * cpu-s390.c: Likewise.
3396 * cpu-mips.c: Likewise.
3397 * po/SRC-POTFILES.in: Regenerate.
3398
3399 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3400
3401 * Makefile.am: Add elfxx-mips.c to the known backends.
3402 (elf32-mips.lo): remove dependency to coff/external.h.
3403 * Makefile.in: Regenerate.
3404 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
3405 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
3406 accordingly.
3407 * configure: Regenerate.
3408 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
3409 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
3410 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
3411 MIPS specific backend functions.
3412 * elf32-mips.c: Moved most code to elfxx-mips.c.
3413 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
3414 static.
3415 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
3416 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
3417 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
3418 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
3419 interface to allow selection of the right REL or RELA howto table.
3420 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
3421 static. Let it refuse n32 objects.
3422 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
3423 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
3424 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
3425 (elf32_mips_ignore_discarded_relocs): Rename from
3426 _bfd_elf32_mips_ignore_discarded_relocs.
3427 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
3428 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
3429 (elf_mips_howto_table_rela): Remove.
3430 * elf64-mips.c: Moved most code to elfxx-mips.c.
3431 (bfd_elf64_bfd_reloc_type_lookup): Make static.
3432 (mips_elf64_rtype_to_howto): New function.
3433 (mips_elf64_object_p): Likewise.
3434 (elf64_mips_irix_compat): Likewise.
3435 * elfxx-mips.c: New file containing common code merged together from
3436 elf32-mips.c and elf64-mips.c.
3437 * elfxx-mips.h: New file containing MIPS specific prototypes from
3438 elf-bfd.h.
3439 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
3440 elf_backend_mips_rtype_to_howto.
3441
3442 2002-04-04 Alan Modra <amodra@bigpond.net.au>
3443
3444 * srec.c (MAXCHUNK, Chunk): Revise comments.
3445 (srec_write_record): Correct buffer size.
3446 (srec_write_header): Do without intermediate buffer.
3447 (srec_write_section): Validate Chunk.
3448 (srec_write_terminator): Pass NULL instead of dummy buffer.
3449 (srec_write_symbols): Pass file and symbol names directly to
3450 bfd_bwrite so sprintf won't overflow buffer.
3451
3452 2002-04-03 Jakub Jelinek <jakub@redhat.com>
3453
3454 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
3455 PC relative relocs against hidden symbols.
3456 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3457
3458 2002-04-03 Alan Modra <amodra@bigpond.net.au>
3459
3460 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
3461 LMAs, loop over segments until p_vaddr and p_memsz specify an
3462 extent enclosing the section.
3463
3464 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
3465
3466 * ihex.c (ihex_write_object_contents): Do not allow records to
3467 cross a 64K boundary - wrap if necessary.
3468
3469 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
3470
3471 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
3472 which caused the returned LWP ID to always be 0.
3473
3474 2002-04-01 Richard Henderson <rth@redhat.com>
3475
3476 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3477 (elf32_sparc_relocate_section): Use it to figure out when to
3478 initialize .got entries.
3479 * elf64-sparc.c: Similarly.
3480
3481 2002-03-28 Alan Modra <amodra@bigpond.net.au>
3482
3483 * linker.c (link_action): Ignore duplicate warning syms.
3484 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
3485 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
3486 (elf_adjust_dynamic_symbol): Likewise.
3487 (elf_export_symbol): Likewise.
3488 (elf_link_find_version_dependencies): Likewise.
3489 (elf_link_assign_sym_version): Likewise.
3490 (elf_link_sec_merge_syms): Likewise.
3491 (elf_link_output_extsym): Likewise.
3492 (elf_gc_sweep_symbol): Likewise.
3493 (elf_gc_propagate_vtable_entries_used): Likewise.
3494 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3495 (elf_gc_allocate_got_offsets): Likewise.
3496 (elf_collect_hash_codes): Likewise.
3497 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
3498 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3499 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3500 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
3501 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
3502 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
3503 (elf_cris_discard_excess_dso_dynamics): Likewise.
3504 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
3505 (mark_PIC_calls): Likewise.
3506 (allocate_plt_static): Likewise.
3507 (allocate_dynrelocs): Likewise.
3508 (readonly_dynrelocs): Likewise.
3509 * elf32-i386.c (allocate_dynrelocs): Likewise.
3510 (readonly_dynrelocs): Likewise.
3511 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
3512 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
3513 * elf32-mips.c (mips_elf_output_extsym): Likewise.
3514 (mips_elf_sort_hash_table_f): Likewise.
3515 (mips_elf_check_mips16_stubs): Likewise.
3516 * elf32-s390.c (allocate_dynrelocs): Likewise.
3517 (readonly_dynrelocs): Likewise.
3518 * elf32-sh.c (sh_elf_discard_copies): Likewise.
3519 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
3520 (xstormy16_relax_plt_realloc): Likewise.
3521 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
3522 (elf64_alpha_output_extsym): Likewise.
3523 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
3524 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
3525 (mips_elf64_check_mips16_stubs): Likewise.
3526 (mips_elf64_output_extsym): Likewise.
3527 * elf64-ppc.c (func_desc_adjust): Likewise.
3528 (allocate_dynrelocs): Likewise.
3529 (readonly_dynrelocs): Likewise.
3530 * elf64-s390.c (allocate_dynrelocs): Likewise.
3531 (readonly_dynrelocs): Likewise.
3532 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
3533 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3534 (readonly_dynrelocs): Likewise.
3535 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
3536 * aoutx.h (aout_link_write_other_symbol): Likewise.
3537 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
3538 (_bfd_coff_write_global_sym): Likewise.
3539 * i386linux.c (linux_tally_symbols): Likewise.
3540 * m68klinux.c (linux_tally_symbols): Likewise.
3541 * sparclinux.c (linux_tally_symbols): Likewise.
3542 * pdp11.c (aout_link_write_other_symbol): Likewise.
3543 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3544 * xcofflink.c (xcoff_build_ldsyms): Likewise.
3545 (xcoff_write_global_symbol): Likewise.
3546
3547 * cofflink.c (_bfd_coff_final_link): Formatting.
3548 * cpu-mips.c (mips_compatible): Make static, prototype.
3549 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3550 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3551 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3552 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3553 (mips_elf64_final_link): Likewise.
3554 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3555 prototype.
3556
3557 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3558
3559 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3560 (SWAP_OUT_RELOC_OFFSET): Define.
3561
3562 2002-03-27 Gregory Steuck <greg@nest.cx>
3563
3564 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3565 terminating NULL if empty symbol table.
3566 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3567
3568 2002-03-26 H.J. Lu (hjl@gnu.org)
3569
3570 * elflink.h (elf_link_input_bfd): Revert the last change since
3571 the gcc exception handling isn't fixed yet.
3572
3573 2002-03-26 H.J. Lu (hjl@gnu.org)
3574
3575 * elflink.h (elf_link_input_bfd): Complain about relocations
3576 against local symbols in discarded sections.
3577
3578 2002-03-26 Alan Modra <amodra@bigpond.net.au>
3579
3580 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3581
3582 2002-03-23 Alan Modra <amodra@bigpond.net.au>
3583
3584 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3585 section file offset for !SEC_LOAD sections.
3586
3587 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
3588
3589 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3590 <case R_ARM_GOT>): Handle relocations to Thumb functions.
3591
3592 2002-03-21 Alan Modra <amodra@bigpond.net.au>
3593
3594 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3595 Whitespace changes.
3596 * archive.c: Update copyright date.
3597 * bfd-in2.h: Regenerate.
3598 * libbfd.h: Regenerate.
3599 * Makefile.am: Run "make dep-am"
3600 * Makefile.in: Regenerate.
3601 * po/SRC-POTFILES.in: Regenerate.
3602
3603 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
3604
3605 * dwarf2.c (struct funcinfo): Move up.
3606 (lookup_address_in_function_table): New argument function_ptr.
3607 Set it.
3608 (lookup_address_in_line_table): New argument function. If function
3609 is non-NULL, use it to handle ``addr'' before the first line note of
3610 the function.
3611 (comp_unit_find_nearest_line): Update and swap calls to
3612 lookup_address_in_function_table and lookup_address_in_line_table.
3613 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3614 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3615
3616 2002-03-20 Tom Rix <trix@redhat.com>
3617
3618 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
3619 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
3620 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
3621
3622 2002-03-19 Tom Rix <trix@redhat.com>
3623
3624 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
3625 dynamic objects in archives.
3626
3627 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3628
3629 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3630 STT_NOTYPE symbols to STT_OBJECT.
3631
3632 2002-03-18 Jan Hubicka <jh@suse.cz>
3633
3634 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3635
3636 2002-03-18 Tom Rix <trix@redhat.com>
3637
3638 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3639 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3640 * coff-rs6000 (do_pad) : New function for archive padding.
3641 (do_copy) : New function for object file copying in archives.
3642 (do_shared_object_padding) : New function for padding shared
3643 objects to their text section alignment in archives.
3644 (bfd_xcoff_ar_achive_set_magic) : Stub.
3645 (xcoff_write_armap_big) : Use do_copy and do_pad.
3646 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3647 do_copy and do_pad.
3648 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
3649 bfd_xcoff_magic_number.
3650 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3651 fop.
3652 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3653 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3654 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3655 * rs6000-core.c : Update copyright date.
3656 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
3657 csectpp.
3658 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3659 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3660 (coff_set_flags) : Use bfd_xcoff_magic_number.
3661 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3662 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3663 * Makefile.am : Same.
3664 * config.bfd : Same.
3665 * targets.c : Same.
3666 * configure : Regnerate.
3667 * Makefile.in : Same.
3668 * bfd-in2.h : Same.
3669
3670 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3671
3672 * po/fr.po: Updated version.
3673
3674 2002-03-18 Alan Modra <amodra@bigpond.net.au>
3675
3676 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3677 * libbfd.h: Regenerate.
3678 * archive.c (coff_write_armap): Pass on failures from
3679 bfd_write_bigendian_4byte_int.
3680
3681 2002-03-14 H.J. Lu <hjl@gnu.org>
3682
3683 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3684 error to bfd_error_nonrepresentable_section for reinit_array
3685 section in DSO.
3686
3687 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3688
3689 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3690 OR it in rather than replacing previously selected flags.
3691
3692 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3693 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3694
3695 2002-03-14 Alan Modra <amodra@bigpond.net.au>
3696
3697 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3698 (N): Use the above.
3699 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3700 ensure reloc size matches before calling elf_link_input_bfd.
3701 Add an assert to check reloc size when counting output relocs.
3702
3703 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3704
3705 * mmo.c (mmo_get_loc): Return NULL rather than false.
3706
3707 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3708
3709 * po/fr.po: Updated version.
3710
3711 2002-03-13 Alan Modra <amodra@bigpond.net.au>
3712
3713 * archures.c (bfd_default_compatible): Test bits_per_word.
3714 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3715 bfd_default_compatible.
3716 * cpu-i370.c (i370_compatible): Likewise.
3717 * cpu-sparc.c (sparc_compatible): Likewise.
3718 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3719
3720 * elflink.h: Formatting fixes.
3721 (elf_link_output_extsym): Merge undefined and undef weak cases.
3722
3723 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3724 when word size of input matches output word size.
3725
3726 2002-03-12 Andreas Jaeger <aj@suse.de>
3727
3728 * cpu-i386.c (i386_compatible): New. Use it instead of
3729 bfd_default_compatible.
3730
3731 2002-03-07 H.J. Lu (hjl@gnu.org)
3732
3733 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3734 as the type for bfd_reloc_val.
3735
3736 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3737
3738 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3739 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3740 (elf_hppa_final_link_relocate): Correct relocations for indirect
3741 references to local data through the DLT. Fix .opd creation for
3742 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3743 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3744 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3745 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3746 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3747 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3748 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3749
3750 2002-03-05 Jakub Jelinek <jakub@redhat.com>
3751
3752 * merge.c (_bfd_merge_sections): Don't segfault if there
3753 is nothing to merge due to GC.
3754
3755 2002-03-05 Alan Modra <amodra@bigpond.net.au>
3756
3757 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3758 symbols that have been forced local.
3759
3760 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3761 to output forced local syms for non-shared link.
3762 (elf_link_output_extsym): Tweak condition for calling backend
3763 adjust_dynamic_symbol so that previous behaviour is kept.
3764 Whitespace changes throughout file.
3765
3766 2002-03-04 H.J. Lu <hjl@gnu.org>
3767
3768 * elf.c (bfd_section_from_shdr): Handle special sections,
3769 .init_array, .fini_array and .preinit_array.
3770 (elf_fake_sections): Likewise.
3771
3772 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3773 DT entry only if the section is in output for .init_array,
3774 .fini_array and .preinit_array. Complain about .preinit_array
3775 section in DSO.
3776 (elf_bfd_final_link): Warn zero size for .init_array,
3777 .fini_array and .preinit_array sections.
3778
3779 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3780 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3781 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3782 .preinit_array.
3783
3784 2002-03-04 Alan Modra <amodra@bigpond.net.au>
3785
3786 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3787 * configure: Regenerate.
3788
3789 2002-03-02 Tom Rix <trix@redhat.com>
3790
3791 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3792 symbolic equiv.
3793 * coff-rs6000.c (xcoff_howto_table): Same.
3794
3795 2002-03-01 David Mosberger <davidm@hpl.hp.com>
3796
3797 * elflink.h (size_dynamic_sections): If section named
3798 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3799 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3800 ".init_array" and ".fini_array".
3801 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3802 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3803 DT_FINI_ARRAY.
3804
3805 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
3806
3807 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3808 dynsyms.
3809
3810 2002-02-25 Alan Modra <amodra@bigpond.net.au>
3811
3812 * elf64-hppa.h: Update copyright date.
3813
3814 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3815 (ppc64_elf_relocate_section): Don't generate power4 style branch
3816 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3817
3818 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3819
3820 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3821 last patch.
3822 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3823
3824 2002-02-21 Andreas Jaeger <aj@suse.de>
3825
3826 * elf64-x86-64.c: Major rework that introduces all recent changes
3827 to the x86-64 backend. Get a closer match to elf32-i386.
3828 (struct elf64_x86_64_dyn_relocs): Rename from
3829 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3830 all users.
3831 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3832 sections.
3833 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3834 remove casts, initialize new hash members.
3835 (create_got_section): New.
3836 (elf64_x86_64_create_dynamic_sections): New.
3837 (elf64_x86_64_copy_indirect_symbol): New.
3838 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3839 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3840 Reference count possible .plt and .got entries. Don't test input
3841 section SEC_READONLY here to try to avoid copy relocs, and keep
3842 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3843 DF_TEXTREL here. Delay setting of variables until needed. Cache
3844 pointer to "sreloc" section in elf_section_data. Tweak condition
3845 under which .got created. Report files with bad relocation
3846 section names.
3847 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3848 Reference count possible .plt entries. Don't deallocate .got and
3849 .relgot space here.
3850 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3851 do copy reloc processing for weakdefs. Remove redundant casts and
3852 aborts. Delay setting of vars until needed. Move creation of
3853 dynamic symbols and allocation of .plt and .rela.plt to
3854 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3855 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3856 (allocate_dynrelocs): New.
3857 (readonly_dynrelocs): New.
3858 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3859 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3860 Zero out the dynamic allocated content space.
3861 (elf64_x86_64_discard_copies): Removed.
3862 (elf64_x86_64_relocate_section): Make use of dynamic section
3863 short-cuts. Localise vars, and delay setting. Better error
3864 reporting, replace BFD_ASSERT with abort. Check
3865 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3866 regular object file and tread the weak definition as the normal
3867 one. Don't discard relocs for undefweak or undefined symbols and
3868 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3869 relocs.
3870 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3871 symbols that have been forced local. Use same test to decide if
3872 we can use a relative reloc for got as relocate_section. Expand
3873 SHN_UNDEF comment. Move expressions out of function calls.
3874 Replace BFD_ASSERT with abort.
3875 (bfd_elf64_bfd_final_link): Removed.
3876 (elf_backend_copy_indirect_symbol): Define.
3877
3878 2002-02-20 Tom Rix <trix@redhat.com>
3879
3880 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3881 (_bfd_xcoff_reloc_type_lookup): Use it.
3882 * coff64-rs6000.c (xcoff64_howto_table): Same.
3883 (xcoff64_reloc_type_lookup): Same.
3884
3885 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3886
3887 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3888 little endian.
3889
3890 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3891
3892 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3893 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3894 * bfd-in2.h: Regenerate.
3895 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3896 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3897 with "s390:64-bit".
3898 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3899 (elf_s390_reloc_type_lookup): Likewise.
3900 (elf_s390_check_relocs): Likewise.
3901 (elf_s390_gc_sweep_hook): Likewise.
3902 (elf_s390_relocate_section): Likewise.
3903 (elf_s390_object_p): Use renamed architecture define.
3904 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3905
3906 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
3907
3908 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3909
3910 2002-02-19 Jakub Jelinek <jakub@redhat.com>
3911
3912 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3913 absptr -> pcrel optimization for shared libs.
3914 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3915 library cannot be converted to pcrel.
3916 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3917 relative.
3918 * elf32-i386.c (elf_i386_relocate_section): If
3919 _bfd_elf_section_offset returned -2, skip, but make sure the
3920 relocation is installed.
3921 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3922 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3923 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3924 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3925 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3926 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3927 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3928 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3929 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3930 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3931 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3932 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3933 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3934 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3935 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3936 _bfd_elf_section_offset returning -2 the same way as -1.
3937 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3938 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3939 and BFD_ASSERT.
3940 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3941
3942 2002-02-18 Tom Rix <trix@redhat.com>
3943
3944 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3945 (bfd_xcoff_size_dynamic_sections): Same.
3946 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3947 (bfd_xcoff_size_dynamic_sections): Same.
3948 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3949 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3950 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3951 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3952 * bfd-in2.h: Regenerate.
3953
3954 2002-02-18 Alan Modra <amodra@bigpond.net.au>
3955
3956 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3957 (struct ppc_link_hash_table): Add sfpr.
3958 (ppc64_elf_link_hash_table_create): Init it.
3959 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3960 .glink out to..
3961 (create_linkage_sections): ..here. Make .sfpr too.
3962 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3963 dynobj early.
3964 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3965 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3966 ._restf* functions, and create as needed.
3967 (func_desc_adjust): Only force_local for shared libs.
3968
3969 2002-02-18 David O'Brien <obrien@FreeBSD.org>
3970
3971 * configure.in: Bump version number post 2.12 branching.
3972 * configure: Regenerate.
3973
3974 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3975
3976 * mmo.c: Correct and improve comments.
3977 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3978 zero-pad. Use input to fill up non-empty bfd buffer.
3979 (mmo_flush_chunk): New function.
3980 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3981 changed. Don't emit location specifier if VMA is same as
3982 *LAST_VMAP after omitting leading zero contents. Call
3983 mmo_flush_chunk before emitting location specifier.
3984 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3985 with mmo_write_loc_chunk calls.
3986 (mmo_internal_write_section): Call mmo_flush_chunk after
3987 mmo_write_chunk.
3988 (mmo_write_symbols_and_terminator): Move :Main to first position
3989 in symbol array. Add faked one if it does not exist if there are
3990 other symbols. Don't add it if there are no symbols at all. Move
3991 out test for value of :Main from symbol loop. Rename table
3992 fakemain to maintable and variable mainsym to fakemain.
3993
3994 2002-02-15 Richard Henderson <rth@redhat.com>
3995
3996 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3997 section with no got matches any got. Simplify error generaion.
3998
3999 2002-02-15 Alan Modra <amodra@bigpond.net.au>
4000
4001 Support arbitrary length fill patterns.
4002 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4003 (_bfd_default_link_order): Remove bfd_fill_link_order code.
4004 Call default_data_link_order.
4005 (default_fill_link_order): Delete.
4006 (default_data_link_order): New function.
4007 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4008 of bfd_fill_link_order with bfd_data_link_order.
4009 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4010 * elf64-mips.c (mips_elf64_final_link): Likewise.
4011
4012 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4013 Correct value returned in "end" for "0x<non-hex>".
4014
4015 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
4016
4017 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
4018 (scan): Test against 'mach' field in info structure.
4019
4020 2002-02-14 Alan Modra <amodra@bigpond.net.au>
4021
4022 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
4023
4024 2002-02-14 Matt Fredette <fredette@netbsd.org>
4025
4026 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
4027 EF_M68000.
4028
4029 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
4030
4031 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
4032 non-zero physical addresses when adjusting the LMAs of new
4033 sections.
4034
4035 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4036
4037 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
4038 from _bfd_elf_hppa_gen_reloc_type.
4039 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
4040 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
4041 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
4042 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
4043
4044 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
4045
4046 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
4047 loading its contents if there's nothing to do in it.
4048
4049 2002-02-12 Alan Modra <amodra@bigpond.net.au>
4050
4051 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
4052 64k boundary.
4053
4054 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
4055 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
4056 (ppc64_elf_finish_dynamic_sections): Set values for them.
4057
4058 2002-02-11 Michael Snyder <msnyder@redhat.com>
4059
4060 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
4061 * elf.c (elfcore_grok_pstatus): Add prototype.
4062 (elfcore_grok_lwpstatus): Add prototype.
4063 (elfcore_write_lwpstatus): New function.
4064 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
4065
4066 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
4067
4068 * elf32-sh.c: Added missing prototypes.
4069 * elf32-sh64.c: Likewise.
4070 (sh_elf_align_loads): Mark unused args as such.
4071 * elf64-sh64.c: Added missing prototypes.
4072 (struct elf_sh64_link_hash_entry): Fix typo.
4073 (sh_elf64_relocate_section): Fix info argument passed to
4074 _bfd_elf_section_offset.
4075
4076 2002-02-11 Alan Modra <amodra@bigpond.net.au>
4077
4078 * Makefile.am: "make dep-am".
4079 * Makefile.in: Regenerate.
4080 * aclocal.m4: Regenerate.
4081 * config.in: Regenerate.
4082 * configure: Regenerate.
4083
4084 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
4085
4086 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
4087 variable warnings.
4088 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
4089 comparison warning.
4090 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
4091 cast warnings for the common case.
4092
4093 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
4094
4095 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
4096 vectors.
4097 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
4098 vectors.
4099
4100 2002-02-09 Richard Henderson <rth@redhat.com>
4101
4102 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
4103 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
4104 (elf64_alpha_relocate_section): Likewise.
4105 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
4106 * bfd-in2.h, libbfd.h: Rebuild.
4107
4108 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
4109
4110 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
4111 that base-plus-offset reloc accounting is consistent.
4112 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
4113 up to date for undefined symbols.
4114
4115 2002-02-08 Eric Christopher <echristo@redhat.com>
4116
4117 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4118
4119 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
4120 sections for the O32 ABI.
4121
4122 2002-02-08 Chris Demetriou <cgd@broadcom.com>
4123
4124 * elf32-arm.h: Fix formatting of _("...").
4125 * elf32-d10v.c: Likewise.
4126 * elf32-m68k.c: Likewise.
4127 * elf32-mips.c: Likewise.
4128
4129 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
4130
4131 * coff-or32.c: Fix compile time warning messages.
4132
4133 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
4134
4135 Contribute sh64-elf.
4136 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
4137 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
4138 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
4139 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
4140 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
4141 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
4142 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
4143 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
4144 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
4145 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
4146 New relocs.
4147 * libbfd.h, bfd-in2.h: Rebuilt.
4148 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
4149 (sh_reloc_map): Map them.
4150 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4151 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
4152 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
4153 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
4154 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
4155 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
4156 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
4157 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
4158 datalabel_got_offset.
4159 (sh_elf_link_hash_newfunc): Initialize it.
4160 (sh_elf_relocate_section): Augment the scope of
4161 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
4162 GOT and GOTOFF handling to new SHmedia relocation types. Support
4163 GOT_BIAS.
4164 (sh_elf_check_relocs): Likewise.
4165 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
4166 PLT entries using movi_shori_putval. Support GOT_BIAS.
4167 (sh_elf_finish_dynamic_sections): Likewise.
4168 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
4169 relocation, it's now done by the caller.
4170 (GOT_BIAS): New.
4171 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
4172 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
4173 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
4174 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
4175 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
4176 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
4177 sh64_elf64_hash_table): New.
4178 (sh_elf64_howto_table): Introduce new relocs.
4179 (sh_elf64_info_to_howto): Accept new PIC relocs.
4180 (sh_elf64_relocate_section): Augment the scope of
4181 seen_stt_datalabel. Support new PIC relocs.
4182 (sh_elf64_check_relocs): Support new PIC relocs.
4183 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
4184 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
4185 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
4186 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
4187 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
4188 movi_shori_putval, movi_3shori_putval,
4189 sh64_elf64_create_dynamic_sections,
4190 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
4191 sh64_elf64_size_dynamic_sections,
4192 sh64_elf64_finish_dynamic_symbol,
4193 sh64_elf64_finish_dynamic_sections): New.
4194 (elf_backend_create_dynamic-sections,
4195 bfd_elf64_bfd_link_hash_table_create,
4196 elf_backend_adjust_dynamic_symbol,
4197 elf_backend_size_dynamic_sections,
4198 elf_backend_finish_dynamic_symbol,
4199 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
4200 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4201 elf_backend_got_header_size, elf_backend_plt_header_size):
4202 Define.
4203 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
4204 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
4205 match official numbers and names; moved unmaching ones to the
4206 range 0xf2-0xff.
4207 * elf32-sh64.c, elf64-sh64.c: Likewise.
4208 2001-03-12 DJ Delorie <dj@redhat.com>
4209 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
4210 sections.
4211 2001-03-12 DJ Delorie <dj@redhat.com>
4212 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
4213 be aligned.
4214 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
4215 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
4216 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
4217 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
4218 .cranges section with SEC_SORT_ENTRIES set.
4219 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
4220 incoming sorted .cranges section.
4221 (sh64_bfd_elf_copy_private_section_data): New.
4222 (sh64_elf_final_write_processing): Only sort .cranges and modify
4223 start address if called by linker.
4224 2001-01-08 Ben Elliston <bje@redhat.com>
4225 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
4226 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
4227 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
4228 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4229 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
4230 line. Add comments before all entries.
4231 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
4232 comment.
4233 (sh_elf64_reloc): Correct head comment.
4234 (sh_elf64_relocate_section): Correct spacing.
4235 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
4236 instead call reloc_dangerous callback.
4237 <case R_SH_SHMEDIA_CODE>: New case.
4238 (sh_elf64_gc_mark_hook): Correct spacing.
4239 (sh_elf64_check_relocs): Ditto.
4240 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
4241 New case.
4242 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
4243 functions.
4244 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
4245 clarify describing comment. Add comments before all entries.
4246 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
4247 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
4248 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4249 Sort .cranges section in final link. Prepare to set bit 0 on
4250 entry address.
4251 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
4252 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
4253 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
4254 .cranges section.
4255 (sh64_backend_section_from_shdr): New, to recognize
4256 SHT_SH5_CR_SORTED on incoming .cranges section.
4257 (elf_backend_section_from_shdr): Define.
4258 (sh64_elf_final_write_processing): Sort outgoing .cranges
4259 section. (New, temporarily disabled:) Set bit 0 on entry address
4260 according to ISA type.
4261 (sh64_find_section_for_address): New.
4262 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
4263 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
4264 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
4265 bfd_malloc, not xmalloc.
4266 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
4267 global.
4268 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
4269 temporarily disabled) setting bit 0 on entry address.
4270 (elf_backend_final_write_processing): Define.
4271 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
4272 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
4273 be a proper relocation for PTA and PTB rather than a marker.
4274 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
4275 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
4276 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
4277 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
4278 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
4279 Zero src_mask.
4280 * elf64-sh64.c: Ditto.
4281 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
4282 * elf32-sh64.c: Include opcodes/sh64-opc.h
4283 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
4284 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
4285 parameters. No unused parameters. Caller changed.
4286 <case R_SH_PT_16>: New case.
4287 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
4288 * Makefile.in: Regenerate.
4289 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
4290 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
4291 all code sections.
4292 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4293 (sh64_elf_merge_private_data): Ditto.
4294 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
4295 to access stored section flags.
4296 (sh64_elf_final_write_processing): Return immediately unless
4297 called by linker. Use sh64_elf_section_data (cranges) to get size
4298 of linker-generated cranges entries.
4299 (sh64_elf_copy_private_data): Add missing "return true".
4300 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4301 (sh_elf64_merge_private_data): Ditto.
4302 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
4303 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
4304 elf64-sh64.c:sh64_elf_fake_sections.
4305 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
4306 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
4307 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
4308 (sh64_elf_final_write_processing): New.
4309 (elf_backend_final_write_processing): Define.
4310 (sh64_elf_fake_sections): Get header flags from tdata field.
4311 (sh64_elf_copy_private_data): Do not call
4312 sh64_elf_copy_private_data_internal, just copy e_flags field.
4313 (sh64_elf_merge_private_data): Do not call
4314 sh64_elf_copy_private_data_internal.
4315 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
4316 Remove EF_SH64_ABI64, let ELF size make difference.
4317 Remove SH64-specific BFD section flag.
4318 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
4319 containing SHmedia through elf_section_data (asect)->tdata
4320 non-zero, not using a BFD section flag.
4321 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
4322 (sh64_elf_merge_private_data): Similar.
4323 (elf_backend_section_flags): Don't define.
4324 (sh64_elf_backend_section_flags): Delete.
4325 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
4326 not EF_SH64_ABI64.
4327 (sh_elf64_merge_private_data): Similar.
4328 * section.c (Section flags definitions): Don't define
4329 SEC_SH_ISA_SHMEDIA.
4330 (bfd-in2.h): Regenerate.
4331 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
4332 Make DataLabel references work with partial linking.
4333 * elf32-sh64.c: Fix formatting.
4334 (sh64_elf_link_output_symbol_hook): New.
4335 (elf_backend_link_output_symbol_hook): Define to
4336 sh64_elf_link_output_symbol_hook.
4337 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
4338 undefined if partial linking. Adjust sanity check.
4339 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
4340 (elf_backend_link_output_symbol_hook): Define to
4341 sh64_elf64_link_output_symbol_hook.
4342 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
4343 undefined if partial linking. Adjust sanity check.
4344 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
4345 Implement semantics for inter-file DataLabel references.
4346 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
4347 (sh64_elf64_add_symbol_hook): New.
4348 (sh_elf64_relocate_section): If passing an indirect symbol with
4349 st_type STT_DATALABEL on the way to a symbol with st_other
4350 STO_SH5_ISA32, do not bitor 1 to the relocation.
4351 (elf_backend_add_symbol_hook): Define to
4352 sh64_elf64_add_symbol_hook.
4353 * elf64-sh32.c: Tweak comments.
4354 (DATALABEL_SUFFIX): Define.
4355 (sh64_elf_add_symbol_hook): New.
4356 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
4357 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
4358 symbol with st_type STT_DATALABEL on the way to a symbol with
4359 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
4360 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
4361 Pass through STT_DATALABEL.
4362 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
4363 (elf_backend_get_symbol_type): Define.
4364 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
4365 (elf_backend_get_symbol_type): Define.
4366 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
4367 * elf32-sh64.c: Tweak comments.
4368 (sh64_elf_copy_private_data_internal): Add prototype.
4369 (bfd_elf32_bfd_set_private_flags): Define.
4370 (sh64_elf_copy_private_data_internal): Compare machine name, not
4371 textual BFD target name, to check whether to copy section flag
4372 SHF_SH5_ISA32.
4373 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
4374 Tweak section-contents-type-mismatch message.
4375 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
4376 Validize reloc-types.
4377 * elf64-sh64.c: New file.
4378 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
4379 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
4380 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
4381 Regenerate dependencies.
4382 * Makefile.in: Regenerate.
4383 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
4384 bfd_elf64_sh64l_vec.
4385 * configure.in: Handle bfd_elf64_sh64_vec and
4386 bfd_elf64_sh64l_vec.
4387 * configure: Regenerate.
4388 * po/POTFILES.in: Regenerate.
4389 * po/bfd.pot: Regenerate.
4390 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
4391 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
4392 anything else but EF_SH64 and EF_SH64_ABI64.
4393 (sh64_elf_merge_private_data): Emit error for anything else but
4394 EF_SH64 and EF_SH64_ABI64.
4395 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
4396 from targ_selvecs.
4397 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
4398 bfd_elf32_sh64l_vec as a temporary measure.
4399 * configure: Regenerate.
4400 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
4401 * cpu-sh.c (arch_info_struct): Include sh5 item
4402 unconditionalized.
4403 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
4404 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
4405 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
4406 * elf32-sh64.c: Tweak comments.
4407 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
4408 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
4409 (sh64_elf_copy_private_data_internal): Wrap long line.
4410 (sh64_elf_merge_private_data): Rewrite to allow objects from
4411 SH64 subsets to be linked together.
4412 (INCLUDE_SHMEDIA): Define.
4413 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
4414 Parenthesize plus-expression inside or-expression.
4415 <global symbol>: Ditto.
4416 (sh_elf_set_mach_from_flags): Remove code refusing
4417 deleted EF_SH64_32BIT_ABI flag.
4418 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
4419 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
4420 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
4421 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
4422 (sh_elf_relocate_section) <local symbol>: Or 1 in
4423 calculation of relocation if sym->st_other & STO_SH5_ISA32.
4424 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
4425 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
4426 relocation.
4427 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
4428 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
4429 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
4430 Regenerate dependencies.
4431 * Makefile.in: Regenerate.
4432 * archures.c: Add bfd_mach_sh5.
4433 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
4434 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
4435 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
4436 * configure: Regenerate.
4437 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
4438 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
4439 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
4440 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
4441 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
4442 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
4443 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
4444 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
4445 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
4446 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
4447 in item for SH5.
4448 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
4449 for SHmedia relocs.
4450 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
4451 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
4452 shmedia_prepare_reloc, goto final_link_relocate if it returns
4453 non-zero, else fail as before.
4454 (sh_elf_set_mach_from_flags): Provide function only if not defined
4455 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
4456 (sh_elf_set_private_flags): Provide function only if not defined
4457 as a macro.
4458 (sh_elf_copy_private_data): Similar.
4459 (sh_elf_merge_private_data): Similar.
4460 * section.c (SEC_SH_ISA_SHMEDIA): New.
4461 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
4462 * elf32-sh64.c: New file.
4463 * libbfd.h: Regenerate.
4464 * bfd-in2.h: Regenerate.
4465 * po/POTFILES.in: Regenerate.
4466 * po/bfd.pot: Regenerate.
4467 * bfd-in2.h: Regenerate.
4468 * libbfd.h: Regenerate.
4469
4470 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
4471
4472 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
4473 been included, not drag it in.
4474 * bfd-in2.h: Regenerate.
4475
4476 2002-02-06 H.J. Lu (hjl@gnu.org)
4477
4478 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
4479 the mach and ISA fields if necessary.
4480
4481 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
4482
4483 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
4484 ARM architecture when an F_ARM_5 flag is detected, since we cannot
4485 be sure exactly which architecture this represents.
4486
4487 2002-02-05 Nick Clifton <nickc@redhat.com>
4488
4489 * po/tr.po: Updated translation.
4490
4491 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4492
4493 From Jimi X <jimix@watson.ibm.com>
4494 * archures (bfd_mach_ppc64): Define.
4495 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
4496 (bfd_powerpc_arch): Define.
4497 * bfd-in2.h: Regenerate.
4498 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
4499 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
4500 (bfd_powerpc_archs): Add default powerpc64 arch.
4501
4502 2002-02-05 Alan Modra <amodra@bigpond.net.au>
4503
4504 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
4505 against section syms in readonly sections. Don't do the global
4506 sym check if we find one.
4507 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
4508 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
4509 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4510 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
4511 (elf_s390_grok_prstatus): Add missing prototype.
4512
4513 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
4514
4515 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
4516 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
4517 Call bfd_get_section_by_name only once. Initialize
4518 bpodata->n_bpo_relocs_this_section.
4519 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
4520 referring to DSOs.
4521 (bpo_reloc_request_sort_fn): Don't use difference of values as
4522 return-value.
4523
4524 2002-02-02 David O'Brien <obrien@FreeBSD>
4525
4526 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
4527 version 4.5 and later the same as 5-CURRENT.
4528 * configure: Re-generate.
4529
4530 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
4531
4532 * config.bfd (hppa*-*-netbsd*): New target.
4533
4534 2002-01-31 Philipp Thomas <pthomas@suse.de>
4535
4536 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
4537 to front of message. Unify messages with elf32-arm.h. Use
4538 commas where neccessary.
4539 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
4540 ERROR in messages. Unify messages with coff-arm.c. Correct
4541 VFP/FPA error message.
4542 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
4543 APCS-32 for translation.
4544
4545 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
4546
4547 Perform on-demand global register allocation from
4548 R_MMIX_BASE_PLUS_OFFSET relocs.
4549 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4550 bpo_reloc_request, struct bpo_greg_section_info): New.
4551 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4552 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4553 _bfd_mmix_check_all_relocs,
4554 _bfd_mmix_prepare_linker_allocated_gregs,
4555 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4556 (elf_mmix_howto_table): Correct src_mask for most relocs.
4557 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4558 case.
4559 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4560 case. Fix typo in comment. New label do_mmix_reloc.
4561 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4562 store first object file with a base-plus-offset reloc. Call
4563 mmix_elf_check_common_relocs for the part common with mmo.
4564 (mmix_elf_final_link): Write out linker-allocated register
4565 contents section.
4566 (elf_backend_gc_sweep_hook): Define.
4567 (bfd_elf64_bfd_relax_section): Define.
4568
4569 * mmo.c: Don't include <ctype.h>
4570 (mmo_init): Correct init-once logic.
4571
4572 2002-02-01 Tom Rix <trix@redhat.com>
4573
4574 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4575
4576 2002-02-01 Alan Modra <amodra@bigpond.net.au>
4577
4578 * Makefile.am: Run "make dep-am"
4579 * Makefile.in: Regenerate.
4580
4581 2002-01-31 David O'Brien <obrien@FreeBSD>
4582
4583 * configure.in: Recognize the differences in core files from FreeBSD
4584 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4585 5-CURRENT.
4586 * configure: Regenerate.
4587
4588 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
4589
4590 * coff-or32.c: New file.
4591 * cpu-or32.c: New file.
4592 * elf32-or32.c: New file.
4593 * archures.c: Add support for or32.
4594 * targets.c: Add support for or32.
4595 * bfd-in2.h: Regenerate.
4596 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
4597 coff_write_object_contents): Add support for or32.
4598 * config.bfd: Add target.
4599 * configure.in: Add support for or32.
4600 * configure: Regenerate.
4601 * Makefile.am: Add support for or32.
4602 * Makefile.in: Regenerate.
4603 * po/SRC-POTFILES.in: Add or32 files.
4604 * po/bfd.pot: Regenerate.
4605
4606 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4607 Don Lindsay <lindsayd@cisco.com>
4608
4609 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4610 false' with a return of a bfd_reloc_ error code.
4611
4612 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
4613
4614 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4615 unexport unreferenced symbols when --export-dynamic. Call
4616 _bfd_elf_strtab_delref when unexporting.
4617
4618 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
4619
4620 * bfd-in.h: Include <stdbool.h> if it is available.
4621 * bfd-in2.h: Regenerated.
4622
4623 2002-01-31 Alan Modra <amodra@bigpond.net.au>
4624
4625 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4626 not go via the plt.
4627
4628 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4629
4630 * archures.c: Tidy up formatting of embedded comments.
4631 * bfd.c: Tidy up formatting of embedded comments.
4632 * bfd-in.h: Fix formatting of comments.
4633 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4634 * section.c: Tidy up formatting of embedded comments.
4635 * syms.c: Tidy up formatting of embedded comments.
4636 * targets.c: Tidy up formatting of embedded comments.
4637
4638 * bfd-in2.h: Regenerate.
4639
4640 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4641
4642 * vms-tir.c (cmd_name): New function.
4643 (tir_cmd_name): New function.
4644 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4645 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4646 Fix formatting.
4647
4648 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4649 translation.
4650 (pe_print_pdata): Rearrange message to aid in translation.
4651
4652 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4653 translation.
4654
4655 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4656
4657 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4658
4659 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4660 message to aid in translation.
4661
4662 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4663 to aid in translation.
4664
4665 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4666
4667 2002-01-30 Philipp Thomas <pthomas@suse.de>
4668
4669 * coff-arm.c, elf32-elf.h: Unify messages.
4670
4671 2002-01-30 Nick Clifton <nickc@redhat.com>
4672
4673 * po/sv.po: Updated translation.
4674
4675 2002-01-30 Philipp Thomas <pthomas@suse.de>
4676
4677 * dwarf2.c (read_abbrev): Use full section name in error message.
4678 (decode_line_info): Likewise.
4679
4680 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4681 message.
4682
4683 2002-01-30 Alan Modra <amodra@bigpond.net.au>
4684
4685 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4686 descriptor symbols for undefined function code syms. Clear
4687 ELF_LINK_NON_ELF so that they can stay weak.
4688
4689 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4690 Mitch Lichtenberg <mpl@broadcom.com>
4691
4692 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4693 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4694 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4695 generation.
4696 * bfd-in2.h: Regenerate.
4697
4698 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4699
4700 * elf32-mips.c: Add additional comments about HI16 relocation
4701 processing.
4702 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4703 pc-relative relocations. (Reverts change made on 2001-10-31.)
4704 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4705 for pc-relative relocations.
4706 (mips_elf_calculate_relocation): Add a comment about a kludge
4707 in the R_MIPS_GNU_REL_HI16 handling.
4708 (_bfd_mips_elf_relocate_section): Implement that kludge;
4709 adjust pc-relative HI16 relocation for difference in HI16 and
4710 LO16 addresses, since it can't easily be done in
4711 mips_elf_calculate_relocation.
4712
4713 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4714
4715 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4716 relocations with PC32 relocations for undefined or weak symbols.
4717 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4718 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4719
4720 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4721
4722 * elfcore.h (elf_core_file_p): Improve comment for last change.
4723
4724 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
4725
4726 * configure: Regenerated.
4727
4728 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4729
4730 * elfcore.h (elf_core_file_p): Set the machine architecture
4731 before processing the program headers.
4732
4733 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4734
4735 * configure.in <64-bit configuration>: If using gcc, check and
4736 emit error for egcs-1.1.2.
4737 * configure: Regenerate.
4738
4739 2002-01-26 Egor Duda <deo@logos-m.ru>
4740
4741 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4742 as possible to avoid stack corruption.
4743
4744 2002-01-26 Richard Henderson <rth@redhat.com>
4745
4746 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4747 for non-allocated sections.
4748
4749 2002-01-25 Mark Kettenis <kettenis@gnu.org>
4750
4751 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4752 prstat.pr_reg even if it is a struct.
4753
4754 2002-01-25 Steve Ellcey <sje@cup.hp.com>
4755
4756 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
4757
4758 2002-01-25 Philipp Thomas <pthomas@suse.de>
4759
4760 * coffgen.c (coff_print_symbol): Don't mark info message
4761 for translation.
4762
4763 2002-01-25 Nick Clifton <nickc@redhat.com>
4764
4765 * po/fr.po: Updated translation.
4766 * po/es.po: Updated translation.
4767
4768 2002-01-25 Philipp Thomas <pthomas@suse.de>
4769
4770 * coff-alpha.c (alpha_relocate_section): Unify warning message
4771 for GP relative relocations without GP defined.
4772 * coff-mips.c (mips_relocate_section): Likewise.
4773
4774 2002-01-25 Alan Modra <amodra@bigpond.net.au>
4775
4776 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4777 unsigned overflow when new_offset < old_offset.
4778
4779 2002-01-24 Philipp Thomas <pthomas@suse.de>
4780
4781 * bfd.c (_bfd_abort): Fix typo.
4782
4783 2002-01-23 Richard Henderson <rth@redhat.com>
4784
4785 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4786 plt entries for undefweak symbols.
4787
4788 2002-01-23 Steve Ellcey <sje@cup.hp.com>
4789
4790 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
4791 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4792 (bfd_elf32_h8300_vec): Ditto.
4793
4794 2002-01-23 Alan Modra <amodra@bigpond.net.au>
4795
4796 * elf64-ppc.c: Remove stale part of ABI comment.
4797 (NO_OPD_RELOCS): Define.
4798 (ppc64_elf_check_relocs): Use it.
4799 (ppc64_elf_relocate_section): Here too.
4800 (build_one_stub): Don't point function syms at the stub. Instead,
4801 hijack plt.offset.
4802 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4803 really go to the stub. Make all dynamic relocs in opd against
4804 locals.
4805 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4806 plt.offset.
4807
4808 2002-01-22 Richard Henderson <rth@redhat.com>
4809
4810 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4811
4812 2002-01-22 Alan Modra <amodra@bigpond.net.au>
4813
4814 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4815 TOC_BASE_OFF adjustment.
4816
4817 * Makefile.am: Run "make dep-am".
4818 * Makefile.in: Regenerate.
4819 * po/SRC-POTFILES.in: Regenerate.
4820
4821 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4822
4823 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4824 host defines.
4825
4826 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
4827
4828 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4829 Check for and emit error if sgot is NULL at this point.
4830
4831 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4832
4833 * config.bfd (ia64*-*-netbsd*): New target.
4834
4835 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4836
4837 * som.c (som_write_space_strings): Comment typo fix.
4838
4839 2002-01-21 Alan Modra <amodra@bigpond.net.au>
4840
4841 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4842 is_func_descriptor fields.
4843 (link_hash_newfunc): Init them.
4844 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4845 dot are candidates for plt entries. When processing .opd relocs,
4846 set function descriptor strings to point inside function code
4847 string, and set new ppc_link_hash_entry fields.
4848 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4849 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4850 function descriptors. It's now done in..
4851 (func_desc_adjust): New.
4852 (ppc64_elf_func_desc_adjust): New.
4853 (define elf_backend_always_size_sections): Define.
4854 (ppc64_elf_hide_symbol): New.
4855 (define elf_backend_hide_symbol): Define.
4856 (allocate_dynrelocs): Remove code looking up function descriptors
4857 as that has been done earlier.
4858 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4859 table.
4860 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4861 up function descriptor.
4862 (build_one_stub): Look up the function code sym. Check for
4863 invalid plt offsets.
4864 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4865 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4866
4867 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4868 boolean param.
4869 (_bfd_elf_link_hash_hide_symbol): Likewise.
4870 * elflink.h (elf_link_add_object_symbols): Adjust call to
4871 elf_backend_hide_symbol.
4872 (elf_fix_symbol_flags): Likewise.
4873 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4874 than bfd_alloc.
4875 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4876 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4877 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4878 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4879 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4880 and adjust to suit.
4881 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4882 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4883 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4884
4885 2002-01-18 Alan Modra <amodra@bigpond.net.au>
4886
4887 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4888 dynamic function descriptor symbol, not the associated function
4889 symbol.
4890
4891 2002-01-17 Eric Christopher <echristo@redhat.com>
4892
4893 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4894
4895 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4896
4897 * po/bfd.pot: Regenerate.
4898 * po/fr.po: Regenerate.
4899
4900 2002-01-17 Alan Modra <amodra@bigpond.net.au>
4901
4902 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4903 Remove "Elf_Internal_Shdr *" param.
4904 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4905 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4906 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4907 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4908 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4909 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4910 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4911 function to override special sections. Remove hdr arg from
4912 backend call, and don't loop.
4913
4914 2002-01-16 Eric Christopher <echristo@redhat.com>
4915
4916 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4917 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4918 relocations requiring gp0 and gp.
4919
4920 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
4921
4922 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4923 EF_ARM_VFP_FLOAT.
4924 (elf32_arm_print_private_bfd_data): Likewise.
4925
4926 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4927
4928 * po/tr.po: Import new version.
4929
4930 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4931
4932 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4933 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4934 (ORI_R0_R0_0): Correct.
4935
4936 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4937
4938 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4939 when plt_not_loaded.
4940 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4941 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4942 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4943 (ppc64_elf_glink_code): Delete.
4944 (PPC64_ELF_GLINK_SIZE): Delete.
4945 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4946 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4947 ORI_R0_R0_0): Define.
4948 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4949 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4950 (ppc64_elf_link_hash_table_create): Init them.
4951 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4952 Don't copy to shared lib.
4953 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4954 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4955 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4956 room for .stub and .glink code.
4957 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4958 DT_PPC64_GLINK.
4959 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4960 bfd_elf64_bfd_final_link.
4961 (bfd_elf64_bfd_final_link): Don't define.
4962 (ppc64_elf_size_stubs): New.
4963 (build_plt_stub): New.
4964 (build_one_stub): New.
4965 (ppc64_elf_build_stubs): New.
4966 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4967 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4968 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4969 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4970 case output sections not separate. Adjust DT_RELASZ to not
4971 include plt relocs. Set reserved got entry. Set got and plt
4972 entry size.
4973 (elf_backend_got_header_size): Set to 8.
4974 * elf64-ppc.h: New file.
4975
4976 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4977
4978 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4979 sections, use bfd_section_list_remove.
4980 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4981 * elflink.h (elf_link_add_object_symbols): When removing all
4982 sections, use bfd_section_list_clear.
4983
4984 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4985
4986 * po/sv.po: New file: Swedish translation.
4987 * configure.in (ALL_LINGUAS): Add sv.
4988 * configure: Regenerate.
4989
4990 2002-01-15 Jakub Jelinek <jakub@redhat.com>
4991
4992 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4993 * elf.c (merge_sections_remove_hook): New function.
4994 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4995 _bfd_merge_sections.
4996 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4997 * libbfd.h: Rebuilt.
4998 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4999 Call remove_hook if a SEC_EXCLUDE section is encountered.
5000
5001 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5002
5003 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5004 (xstormy16_reloc_map): Initialise new field with correct howto
5005 table.
5006 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5007 howto entry.
5008
5009 2002-01-10 Michael Snyder <msnyder@redhat.com>
5010
5011 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5012 (elfcore_write_pstatus): Use long instead of pid_t;
5013 * elf-bfd.h: Change prototypes to use long instead of pid_t;
5014
5015 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
5016
5017 * elf.c: Update copyright years.
5018 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
5019 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
5020
5021 2002-01-08 Michael Snyder <msnyder@redhat.com>
5022
5023 Add capability to write corefile note sections, for gdb.
5024 * elf.c (elfcore_write_note): New function.
5025 (elfcore_write_prpsinfo): New function.
5026 (elfcore_write_prstatus): New function.
5027 (elfcore_write_pstatus): New function.
5028 (elfcore_write_prfpreg): New function.
5029 (elfcore_write_prxfpreg): New function.
5030 * elf-bfd.h: Add prototypes for above functions.
5031
5032 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
5033
5034 * elf.c (elf_fake_sections): Propagate errors from
5035 elf_backend_fake_section.
5036
5037 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
5038
5039 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
5040 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
5041 (elf32-sh-nbsd.lo): New rule.
5042 * Makefile.in: Regenerate.
5043 * config.bfd (sh*le-*-netbsdelf*): New target.
5044 (sh*-*-netbsdelf*): New target.
5045 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
5046 (bfd_elf32_shnbsd_vec): New vector.
5047 (bfd_elf32_shlnbsd_vec): New vector.
5048 * configure: Regenerate.
5049 * elf32-sh-nbsd.c: New file.
5050 * targets.c: Update copyright years.
5051 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
5052 bfd_elf32_shnbsd_vec.
5053
5054 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
5055
5056 * coff-rs6000.c (READ20): Use bfd_scan_vma.
5057
5058 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
5059
5060 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
5061 of a symbol in a section that will be deleted.
5062
5063 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
5064
5065 * po/es.po: New file: Spanish translation.
5066 * configure.in (ALL_LINGUAS): Add es.
5067 * configure: Regenerate.
5068
5069 2002-01-06 Steve Ellcey <sje@cup.hp.com>
5070
5071 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
5072 argument so we can handle HP-UX specially.
5073 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
5074 (elfNN_hpux_backend_section_from_bfd_section): New for support
5075 of SHN_IA_64_ANSI_COMMON.
5076 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
5077 (is_unwind_section_name): Add special HP-UX support.
5078 (elfNN_ia64_section_from_shdr): Add support for more sections.
5079 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
5080 add support for more sections.
5081 (elfNN_ia64_additional_program_headers): Modify
5082 is_unwind_section_name call.
5083 (elfNN_ia64_modify_segment_map): Remove assumption that there is
5084 only one unwind section in segment.
5085
5086 2002-01-06 Alan Modra <amodra@bigpond.net.au>
5087
5088 * syms.c (_bfd_generic_make_empty_symbol): New function.
5089 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
5090 _bfd_generic_make_empty_symbol.
5091 * libbfd.h: Regenerate.
5092 * bfd-in2.h: Regenerate.
5093 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
5094 (hppabsd_core_get_symtab_upper_bound): Don't define.
5095 (hppabsd_core_get_symtab): Likewise.
5096 (hppabsd_core_print_symbol): Likewise.
5097 (hppabsd_core_get_symbol_info): Likewise.
5098 (hppabsd_core_bfd_is_local_label_name): Likewise.
5099 (hppabsd_core_get_lineno): Likewise.
5100 (hppabsd_core_find_nearest_line): Likewise.
5101 (hppabsd_core_bfd_make_debug_symbol): Likewise.
5102 (hppabsd_core_read_minisymbols): Likewise.
5103 (hppabsd_core_minisymbol_to_symbol): Likewise.
5104 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
5105 Formatting fixes.
5106 * hpux-core.c: Similarly.
5107 * irix-core.c: Similarly.
5108 * osf-core.c: Similarly.
5109 * sco5-core.c: Similarly.
5110 * binary.c (binary_make_empty_symbol): Remove function, define as
5111 _bfd_generic_make_empty_symbol.
5112 * ihex.c (ihex_make_empty_symbol): Likewise.
5113 * mmo.c (mmo_make_empty_symbol): Likewise.
5114 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
5115 * srec.c (srec_make_empty_symbol): Likewise.
5116 * versados.c (versados_make_empty_symbol): Likewise.
5117 * vms.c (_bfd_vms_make_empty_symbol): Remove.
5118 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
5119 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
5120 rather than _bfd_vms_make_empty_symbol.
5121 * vms-misc.c (new_symbol): Likewise.
5122
5123 2002-01-05 Alan Modra <amodra@bigpond.net.au>
5124
5125 * section.c (bfd_section_init): Remove unnecessary initialisations.
5126 (bfd_section_list_clear): New function.
5127 (bfd_section_list_remove, bfd_section_list_insert): New macros.
5128 (_bfd_strip_section_from_output): Use them.
5129 * coffcode.h (coff_set_alignment_hook): Likewise.
5130 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
5131 * elf64-mips.c (mips_elf64_final_link): Likewise.
5132 * elf64-mmix.c (mmix_elf_final_link): Likewise.
5133 * sunos.c (sunos_add_dynamic_symbols): Likewise.
5134 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
5135 * bfd-in2.h: Regenerate.
5136
5137 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
5138 rather than doing our own section handling. Clean up after errors
5139 with bfd_release and bfd_section_list_clear. Handle unexpected
5140 flags.
5141 * aoutf1.h (sunos4_core_file_p): Likewise.
5142 * aix386-core.c (aix386_core_file_p): Likewise.
5143 * cisco-core.c (cisco_core_file_validate): Likewise.
5144 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
5145 * trad-core.c (trad_unix_core_file_p): Likewise.
5146
5147 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
5148 with bfd_release and bfd_section_list_clear.
5149 * hpux-core.c (hpux_core_core_file_p): Likewise.
5150 * irix-core.c (irix_core_core_file_p): Likewise.
5151 * lynx-core.c (lynx_core_file_p): Likewise.
5152 * osf-core.c (osf_core_core_file_p): Likewise.
5153 * rs6000-core.c (rs6000coff_core_p): Likewise.
5154 * sco5-core.c (sco5_core_file_p): Likewise.
5155
5156 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
5157 sign extension adjustments without conditionals.
5158
5159 2002-01-04 Jakub Jelinek <jakub@redhat.com>
5160
5161 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
5162 CIE at .eh_frame start is removed due to no FDEs referencing it.
5163
5164 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
5165
5166 * config.bfd (x86_64-*-netbsd*): New target.
5167 * configure.in (x86_64-*-netbsd*): Set COREFILE
5168 to netbsd-core.lo.
5169 * configure: Regenerated.
5170
5171 2002-01-03 Tom Rix <trix@redhat.com>
5172
5173 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
5174 for recent bfd_make_section_anyway change.
5175
5176 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
5177
5178 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5179 R_ARM_THM_PC11 reloc.
5180
5181 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5182
5183 * configure.in (LINGUAS): Add ja.
5184 * configure: Regenerate.
5185 * po/ja.po: Import from translation project's web site.
5186
5187 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5188
5189 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
5190 messages to ease translation into other languages.
5191
5192 For older changes see ChangeLog-0001
5193 \f
5194 Local Variables:
5195 mode: change-log
5196 left-margin: 8
5197 fill-column: 74
5198 version-control: never
5199 End: