Allow GDB to read general-purpose registers from Linux S/390 core files.
[binutils-gdb.git] / bfd / ChangeLog
1 2001-12-07 Jim Blandy <jimb@redhat.com>
2
3 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
4 (elf_backend_grok_prstatus): Define.
5
6 2001-12-07 Jakub Jelinek <jakub@redhat.com>
7
8 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
9 2001-09-14 change.
10
11 2001-12-07 Jakub Jelinek <jakub@redhat.com>
12
13 * elf.c (_bfd_elf_rela_local_sym): Only call
14 _bfd_merged_section_offset if merge_info is non-NULL.
15 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
16 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
17 prototypes.
18 * elf32-arm.h (elf32_arm_final_link_relocate): Use
19 _bfd_elf_section_offset.
20 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
21 * elf32-i386.c (elf_i386_relocate_section): Use
22 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
23 * elf32-sh.c (sh_elf_relocate_section): Likewise.
24 * elf32-sparc.c (elf32_sparc_relocate_section): Use
25 _bfd_elf_section_offset.
26 * elf32-cris.c (cris_elf_relocate_section): Likewise.
27 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
28 * elf32-i370.c (i370_elf_relocate_section): Likewise.
29 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
30 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
31 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
32 * elf32-s390.c (elf_s390_relocate_section): Likewise.
33 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
34 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
35 * elf64-s390.c (elf_s390_relocate_section): Likewise.
36 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
37 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
38 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
39
40 2001-12-07 Alan Modra <amodra@bigpond.net.au>
41
42 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
43 already forced local.
44
45 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
46
47 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
48 fragmented sentence parts into a whole sentence to permit
49 better translation into foreign languages.
50
51 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
52
53 * configure: Regenerate.
54 * Makefile.in: Regenerate.
55
56 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
57
58 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
59 BFD64_LIBS, make the latter depending on the availability of BFD64.
60 Add archive64.c source file.
61 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
62 and bfd_elf64_archive_write_armap, code from elf64-mips.c
63 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
64 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
65 (mips64*el-*-linux*): Likewise.
66 (mips*el-*-linux*): Likewise. Reorder entries.
67 * configure.in (bfd_libs): Define in dependency of BFD64 and
68 AC_SUBST it.
69 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
70 bfd_elf64_archive_slurp_armap instead.
71 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
72 instead.
73
74 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
75
76 * config.bfd: Remove trailing blanks.
77 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
78
79 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
80
81 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
82 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
83 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
84 Disable pointless overflow checking of NONE and 32.
85
86 2001-12-04 Alan Modra <amodra@bigpond.net.au>
87
88 * reloc.c (bfd_install_relocation): Correct reloc address test.
89 (bfd_perform_relocation): Formatting fix.
90 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
91
92 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
93
94 * configure.in (LINGUAS): Add tr.
95 * configure: Regenerate.
96 * po/tr.po: Import from translation project's web site.
97
98 2001-12-03 Alan Modra <amodra@bigpond.net.au>
99
100 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
101 happens to trigger on undefined symbols.
102 (final_link_relocate): Return bfd_reloc_undefined for undefined
103 stubs.
104 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
105 if we have already warned about an undefined symbol.
106
107 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
108
109 * elf32-mips.c (NEWABI_P): New define.
110 (USE_REL): Remove, replaced by
111 (elf_backend_may_use_rel_p): New define.
112 (elf_backend_may_use_rela_p): Likewise.
113 (elf_backend_default_use_rela_p): Likewise.
114 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
115 Fix some relocation definitions.
116 (elf_mips_howto_table_rela): New RELA relocation definitions for
117 NewABI support.
118 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
119 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
120 (mips_rtype_to_howto): Likewise.
121 (_bfd_mips_elf_relocate_section): Likewise.
122 (_bfd_mips_elf_object_p): Typo.
123 (elf_backend_sign_extend_vma): Reordered together with many other
124 defines nearby to resemble the order of declaration in the header
125 file.
126
127 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
128
129 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
130 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
131 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
132 * elf32-mips.c (mips_reloc_map): Likewise. Replace
133 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
134 * elf64-mips.c (mips_reloc_map): Likewise.
135 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
136 (BFD_RELOC_MIPS_GPREL32): Remove.
137
138 2001-11-30 H.J. Lu <hjl@gnu.org>
139
140 * elflink.h (elf_add_default_symbol): New.
141 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
142 to create an indirect symbol from the default for the symbol
143 with the default version if needed.
144
145 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
146
147 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
148 if it has already been set by another thread.
149
150 2001-11-28 Jakub Jelinek <jakub@redhat.com>
151
152 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
153 (elf64_alpha_relocate_section): Translate local_got_entries
154 for STT_SECTION symbol to SHF_MERGE section the first time
155 we see it.
156 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
157 sec_merge_done.
158 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
159 (get_dyn_sym_info): Use it.
160 (elfNN_ia64_relocate_section): Translate local dyn entries
161 for STT_SECTION symbol to SHF_MERGE section the first time
162 we see it.
163
164 2001-11-27 H.J. Lu <hjl@gnu.org>
165
166 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
167 ELF.
168
169 2001-11-26 Jeffrey A Law (law@cygnus.com)
170
171 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
172 prototypes.
173
174 2001-11-24 Alan Modra <amodra@bigpond.net.au>
175
176 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
177 group sizes to accommodate c++.
178
179 2001-11-23 Jakub Jelinek <jakub@redhat.com>
180
181 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
182 relocations in non-alloced sections against global symbols
183 defined in shared library being built.
184 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
185
186 2001-11-23 Jakub Jelinek <jakub@redhat.com>
187
188 * elf.c (_bfd_elf_rela_local_sym): New.
189 * elflink.h (elf_link_input_bfd): Don't consider empty
190 merged sections as removed in relocation tests.
191 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
192 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
193 against STT_SECTION symbol of SHF_MERGE section.
194 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
195 * elf32-avr.c (elf32_avr_relocate_section): Call
196 _bfd_elf_rela_local_sym.
197 * elf32-cris.c (cris_elf_relocate_section): Likewise.
198 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
199 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
200 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
201 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
202 * elf32-i370.c (i370_elf_relocate_section): Likewise.
203 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
204 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
205 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
206 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
207 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
208 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
209 * elf32-s390.c (elf_s390_relocate_section): Likewise.
210 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
211 * elf32-v850.c (v850_elf_relocate_section): Likewise.
212 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
213 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
214 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
215 * elf64-s390.c (elf_s390_relocate_section): Likewise.
216 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
217 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
218 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
219 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
220 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
221 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
222 * elf32-sh.c (sh_elf_relocate_section): Likewise for
223 !partial_inplace relocs. Handle relocs against STT_SECTION
224 symbol of SHF_MERGE for partial_inplace relocs.
225
226 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
227
228 * po/Make-in (distclean): Move SRC-POTFILES.in and
229 BLD-POTFILES.in to maintainer-clean target.
230
231 2001-11-21 Alan Modra <amodra@bigpond.net.au>
232
233 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
234 than sym_sec->output_section to detect relocs against discarded
235 sections.
236
237 2001-11-19 H.J. Lu <hjl@gnu.org>
238
239 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
240 discarding relocations.
241
242 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
243
244 * section.c (bfd_is_const_section): New macro. Return true if the
245 given seciton is one of the special, constant, sections.
246 * bfd-in2.h: Regenerate.
247 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
248 (coff_write_native_symbol): Use bfd_is_const_section.
249
250 2001-11-19 Alan Modra <amodra@bigpond.net.au>
251
252 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
253
254 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
255 millicode syms as candidates for import stubs.
256
257 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
258 (allocate_PIC_calls): Rename to allocate_plt_static.
259 (allocate_dynrelocs): Move most of code handling .plt entries to..
260 (allocate_plt_static): ..here. Don't drop plabel entries.
261
262 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
263
264 * mmo.c: Adjust documentation tags to use texinfo 4 features.
265
266 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
267
268 * section.c (bfd_is_const_section): New macro. Return true if the
269 section pointer refers to one of the special, constant sections.
270 * bfd-in2.h: Regenerate.
271
272 * coffgen.c (coff_count_linenumbers): Only update the line number
273 count in non-special sections.
274 (coff_write_native_symbol): Only update the line number file
275 position in non-special sections.
276
277 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
278
279 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
280 local syms from discarded sections. Update comment.
281
282 2001-11-15 Alan Modra <amodra@bigpond.net.au>
283
284 * po/SRC-POTFILES.in: Regenerate.
285
286 * elflink.h (elf_link_input_bfd): Complain about all relocs
287 against local syms from discarded sections. K&R fixes.
288 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
289 K&R fixes.
290
291 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
292
293 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
294 overflows in the .stab section.
295
296 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
297
298 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
299 (bfd_elf64_discard_info): Likewise.
300 * bfd-in2.h: Regenerate.
301 * elf-bfd.h (struct elf_reloc_cookie): New.
302 (struct elf_backend_data): Add elf_backend_discard_info,
303 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
304 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
305 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
306 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
307 (_bfd_elf32_mips_ignore_discarded_relocs): New.
308 (_bfd_elf32_mips_write_section): New.
309 (elf_backend_discard_info): Define.
310 (elf_backend_ignore_discarded_relocs): Define.
311 (elf_backend_write_section): Define.
312 * elfcode.h (elf_bfd_discard_info): Define.
313 (elf_reloc_symbol_deleted_p): Define.
314 * elflink.h (elf_link_input_bfd): Check
315 elf_section_ignore_discarded_relocs. Call
316 bed->elf_backend_write_section if available.
317 (elf_reloc_symbol_deleted_p): New.
318 (elf_bfd_discard_info): New.
319 (elf_section_ignore_discarded_relocs): New.
320 * elfxx-target.h (elf_backend_discard_info): Define.
321 (elf_backend_ignore_discarded_relocs): Define.
322 (elf_backend_write_section): Define.
323 (elfNN_bed): Add elf_backend_discard_info,
324 elf_backend_ignore_discarded_relocs, and
325 elf_backend_write_section.
326 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
327 * libbfd.h: Regenerate.
328 * stabs.c (_bfd_discard_section_stabs): New.
329
330 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
331
332 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
333 scheme to get rid of an ugly complicated test.
334 * elf64-s390.c (elf_s390_relocate_section): Likewise.
335
336 2001-11-14 Andreas Jaeger <aj@suse.de>
337
338 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
339 x86-64 for display.
340
341 2001-11-14 Jakub Jelinek <jakub@redhat.com>
342
343 * dwarf2.c (struct line_head) [total_length]: Change type to
344 bfd_vma.
345 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
346 (struct comp_unit): Add stash and offset_size.
347 (read_8_bytes): Return bfd_vma.
348 (read_indirect_string): New.
349 (read_attribute): Handle DW_FORM_strp.
350 (decode_line_info): Support 64-bit DWARF format.
351 (_bfd_dwarf2_find_nearest_line): Likewise.
352 (parse_comp_unit): Set offset_size and stash.
353
354 2001-11-13 Keith Walker <keith.walker@arm.com>
355
356 * dwarf2.c (read_attribute_value): New function to handle
357 DW_FORM_indirect.
358 (read_attribute): Use it.
359
360 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
361
362 * dwarf2.c (decode_line_info): Properly deal with unknown standard
363 opcodes.
364
365 2001-11-13 John Marshall <jmarshall@acm.org>
366 Alan Modra <amodra@bigpond.net.au>
367
368 * section.c (bfd_make_section_anyway): Don't increment section_id
369 and the BFD's section_count if adding the section failed.
370 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
371 change.
372
373 2001-11-12 Orjan Friberg <orjanf@axis.com>
374
375 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
376 core dump format.
377
378 2001-11-11 H.J. Lu <hjl@gnu.org>
379
380 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
381 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
382
383 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
384 dynstr type to `struct elf_strtab_hash *'.
385
386 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
387
388 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
389 size_t. Rename second i to j.
390
391 2001-11-10 Jeffrey A Law (law@cygnus.com)
392
393 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
394
395 2001-11-10 Alan Modra <amodra@bigpond.net.au>
396
397 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
398 relocs into shared libs.
399 * elf32-cris.c (cris_elf_relocate_section): Likewise.
400 * elf32-i370.c (i370_elf_relocate_section): Likewise.
401 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
402 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
403 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
404 * elf32-sh.c (sh_elf_relocate_section): Likewise.
405 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
406 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
407 * elf64-s390.c (elf_s390_relocate_section): Likewise.
408 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
409 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
410 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
411
412 * elf.c (bfd_section_from_r_symndx): New function.
413 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
414 (struct sym_sec_cache): New.
415 (bfd_section_from_r_symndx): Declare.
416 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
417 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
418 relocs when relocatable. Don't zero entire reloc, just zero the
419 addend and sym.
420 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
421 (elf32_hppa_link_hash_table_create): Init it.
422 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
423 syms on a per-section basis as we do for globals.
424 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
425 (allocate_dynrelocs): Warning fix.
426 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
427 section has been discarded.
428 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
429 into shared libs.
430 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
431 (elf_i386_link_hash_table_create): Init it.
432 (elf_i386_check_relocs): Track dynamic relocs needed for local
433 syms on a per-section basis as we do for globals.
434 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
435 Remove dead code.
436 (allocate_dynrelocs): Warning fix.
437 (elf_i386_size_dynamic_sections): Don't allocate relocs when
438 section has been discarded.
439 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
440 into shared libs.
441 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
442 (elf_s390_link_hash_table_create): Init it.
443 (elf_s390_check_relocs): Track dynamic relocs needed for local
444 syms on a per-section basis as we do for globals.
445 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
446 Remove dead code.
447 (allocate_dynrelocs): Warning fix.
448 (elf_s390_size_dynamic_sections): Don't allocate relocs when
449 section has been discarded.
450 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
451 into shared libs.
452 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
453 (ppc64_link_hash_table_create): Init it.
454 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
455 syms on a per-section basis as we do for globals.
456 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
457 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
458 function. Warning fix.
459 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
460 section has been discarded.
461 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
462 into shared libs.
463 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
464 (elf_s390_link_hash_table_create): Init it.
465 (elf_s390_check_relocs): Track dynamic relocs needed for local
466 syms on a per-section basis as we do for globals.
467 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
468 Remove dead code.
469 (allocate_dynrelocs): Warning fix.
470 (elf_s390_size_dynamic_sections): Don't allocate relocs when
471 section has been discarded.
472 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
473 into shared libs.
474
475 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
476
477 * elf32-s390: Major rework that introduces all recent changes to
478 the s390 backends. Get a closer match to elf32-i386.
479 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
480 Localise vars, and delay setting. Better error reporting, replace
481 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
482 symbol is not defined in the regular object file and tread the weak
483 definition as the normal one. Don't discard relocs for undefweak or
484 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
485 test for avoided copy relocs. Reinstate fudge for unresolved relocs
486 in debugging sections.
487 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
488 reloc processing for weakdefs. Remove redundant casts and aborts.
489 Delay setting of vars until needed. Move creation of dynamic symbols
490 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
491 BFD_ASSERT with abort. Discard .plt entries for everything with
492 plt.refcount <= 0.
493 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
494 .got or .relgot here but do it in allocate_dynrelocs. Reference count
495 possible .plt and .got entries. Don't test input section SEC_READONLY
496 here to try to avoid copy relocs, and keep dyn_relocs regardless of
497 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
498 variables until needed. Remove separate switch stmt for creating .got
499 section. Initialise local_got_refcounts to 0. Cache pointer to
500 "sreloc" section in elf_section_data. Tweak condition under which .got
501 created. Report files with bad relocation section names.
502 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
503 have been forced local. Use same test to decide if we can use a
504 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
505 comment. Move expressions out of function calls. Replace BFD_ASSERT
506 with abort.
507 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
508 statement. Replace BFD_ASSERT with abort.
509 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
510 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
511 instead of looking up section names for DT_TEXTREL. Replace
512 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
513 Add a comment to remind us that one day this ought to be fixed.
514 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
515 (struct elf_s390_link_hash_table): Likewise.
516 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
517 rid of unnecessary casts.
518 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
519 Remove "section" field.
520 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
521 Reference count possible .plt entries. Don't deallocate .got and
522 .relgot space here.
523 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
524 Update comment.
525 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
526 dyn_relocs.
527 (elf_s390_discard_copies): Delete.
528 (elf_s390_link_hash_traverse): Delete.
529 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
530 rather than gc variety).
531 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
532 srelplt, sdynbss, srelbss fields.
533 (elf_s390_link_hash_table_create): Init them.
534 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
535 (allocate_dynrelocs): New function.
536 (create_got_section): New function.
537 (elf_backend_can_refcount): Define.
538 (elf_backend_copy_indirect_symbol): Define.
539 (elf_s390_copy_indirect_symbol): New function.
540 (elf_s390_create_dynamic_sections): New function.
541 (readonly_dynrelocs): New function.
542 * elf64-s390.c: Likewise.
543
544 2001-11-07 Jakub Jelinek <jakub@redhat.com>
545
546 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
547 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
548 (elf-strtab.lo): Add rule.
549 * Makefile.in: Rebuilt.
550 * configure.in (elf): Add elf-strtab.lo.
551 * configure: Rebuilt.
552 * elf-bfd.h (elf_strtab_hash): Forward declare.
553 (struct elf_link_hash_table): Change dynstr type to
554 struct elf_strtab_hash *.
555 (struct elf_obj_tdata): Change strtab_ptr type to
556 struct elf_strtab_hash *.
557 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
558 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
559 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
560 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
561 _bfd_elf_strtab_finalize): New prototypes.
562 * elf-strtab.c: New file.
563 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
564 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
565 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
566 when forcing dynamic symbol to local.
567 (elf_link_create_dynamic_sections): Call
568 _bfd_elf_strtab_init instead of elf_stringtab_init.
569 (elf_link_record_local_dynamic_symbol): Likewise, change
570 dynstr type. Use _bfd_elf_strtab functions instead of
571 _bfd_stringtab calls.
572 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
573 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
574 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
575 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
576 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
577 dynamic symbol to local.
578 (elf_link_assign_sym_version): Likewise.
579 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
580 _bfd_stringtab_emit.
581 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
582 type. Call _bfd_elf_strtab functions instead of
583 _bfd_stringtab functions.
584 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
585 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
586 (elf_fake_sections): Likewise.
587 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
588 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
589 name in the output. Call _bfd_elf_strtab_finalize and
590 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
591 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
592 instead of _bfd_stringtab_size.
593 (prep_headers): Change shstrtab type.
594 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
595
596 2001-11-07 Alan Modra <amodra@bigpond.net.au>
597
598 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
599 bad symtab segfault. Formatting and warning fixes. Improve
600 error message for internationalisation.
601
602 2001-11-06 H.J. Lu (hjl@gnu.org)
603
604 * elflink.h (elf_link_input_bfd): Complain about relocs against
605 discarded sections.
606
607 2001-11-03 Alan Modra <amodra@bigpond.net.au>
608
609 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
610
611 2001-11-02 H.J. Lu <hjl@gnu.org>
612
613 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
614 dynamic relocation for symbols defined in regular objects when
615 creating executables.
616
617 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
618
619 * configure.in (ALL_LINGUAS): Add "fr".
620 * configure: Regenerate.
621 * po/fr.po: New file.
622
623 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
624
625 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
626
627 * som.c (setup_sections): Initialize subspace_sections.
628
629 2001-11-02 H.J. Lu (hjl@gnu.org)
630
631 * coffgen.c (coff_object_p): Return 0 if the header is too big.
632
633 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
634
635 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
636 information. Save bfd arch and mach values. Restore on error.
637
638 2001-11-02 Alan Modra <amodra@bigpond.net.au>
639
640 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
641 (allocate_PIC_calls): New function.
642 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
643 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
644 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
645
646 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
647
648 * elf32-cris.c (cris_elf_grok_prstatus): New function.
649 (cris_elf_grok_psinfo): New function.
650 (elf_backend_grok_prstatus): Define.
651 (elf_backend_grok_psinfo): Define.
652
653 2001-11-01 Alan Modra <amodra@bigpond.net.au>
654
655 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
656 prediction bits.
657
658 2001-10-31 Chris Demetriou <cgd@demetriou.com>
659
660 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
661 relocations properly.
662
663 2001-10-31 H.J. Lu <hjl@gnu.org>
664
665 * elflink.h (elf_link_output_extsym): Don't clear the visibility
666 field for relocateable.
667
668 2001-11-01 Alan Modra <amodra@bigpond.net.au>
669
670 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
671 .plt relocs in DT_RELASZ.
672
673 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
674
675 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
676 targets.
677
678 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
679
680 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
681
682 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
683
684 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
685 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
686 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
687 Regenerate dependencies.
688 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
689 * config.bfd: [BFD64] (mmix-*-*): New case.
690 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
691 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
692 (bfd_mmix_arch): Declare.
693 (bfd_archures_list): Add bfd_mmix_arch.
694 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
695 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
696 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
697 bfd_mmo_mmix_vec.
698 * reloc.c: Add MMIX relocations.
699 * bfd.c (struct _bfd, tdata): Add mmo_data.
700 * Makefile.in: Regenerate.
701 * configure: Regenerate.
702 * libbfd.h: Regenerate.
703 * bfd-in2.h: Regenerate.
704 * configure: Rebuild.
705
706 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
707
708 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
709 p_paddr of the segment that contains it.
710 (copy_private_bfd_data): If the LMA for a segment is known, use it
711 for matching sections to segments.
712 (assign_file_positions_for_segments): Use the LMA when adjusting
713 for inter-section alignment padding.
714
715 2001-10-29 Kazu Hirata <kazu@hxi.com>
716
717 * README: Fix a typo.
718
719 2001-10-24 Richard Henderson <rth@redhat.com>
720
721 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
722 timestamp to time_t for ctime.
723
724 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
725
726 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
727 unsigned, increasing index.
728
729 2001-10-23 H.J. Lu <hjl@gnu.org>
730
731 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
732 m != NULL before accessing it.
733
734 2001-10-23 Alan Modra <amodra@bigpond.net.au>
735
736 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
737 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
738 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
739
740 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
741 (hppa_link_hash_newfunc): Likewise.
742 (elf32_hppa_finish_dynamic_symbol): Likewise.
743 (allocate_dynrelocs): Always allocate .got relocs if shared.
744 (elf32_hppa_relocate_section): Output them too. Similarly
745 consolidate .plt reloc code, and no longer initialise .plt
746 when a reloc is output.
747 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
748 when no reloc is output.
749
750 From Herbert Xu <herbert@gondor.apana.org.au>
751 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
752 unreachable branches.
753
754 2001-10-22 H.J. Lu <hjl@gnu.org>
755
756 * configure.in (WIN32LIBADD): Use -L../libiberty for
757 mips*-*-linux*.
758 * configure: Rebuild.
759
760 2001-10-21 H.J. Lu <hjl@gnu.org>
761
762 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
763 if shared library is enabled only for Linux hosts.
764 * configure: Rebuild.
765
766 2001-10-21 H.J. Lu <hjl@gnu.org>
767
768 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
769 ../libiberty/Makefile instead of $enable_shared.
770 * configure: Rebuild.
771
772 2001-10-21 H.J. Lu <hjl@gnu.org>
773
774 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
775 index 0.
776
777 2001-10-20 H.J. Lu <hjl@gnu.org>
778
779 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
780 if shared library is enabled.
781 * configure: Rebuild.
782
783 2001-10-20 H.J. Lu <hjl@gnu.org>
784
785 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
786
787 2001-10-19 H.J. Lu <hjl@gnu.org>
788
789 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
790 size is empty.
791
792 2001-10-18 H.J. Lu <hjl@gnu.org>
793
794 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
795 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
796
797 2001-10-18 Jakub Jelinek <jakub@redhat.com>
798
799 * section.c (_bfd_strip_section_from_output): Don't count
800 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
801
802 2001-10-17 Alan Modra <amodra@bigpond.net.au>
803
804 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
805 Elf_Internal_Shdr.contents now that it's no longer a PTR.
806 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
807 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
808 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
809 * elf32-sh.c (sh_elf_relax_section): Likewise.
810 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
811 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
812 * elf.c (setup_group): Warning fixes.
813 * elflink.h (elf_link_sort_relocs): Likewise.
814 * pdp11.c (slurp_reloc_table): Likewise.
815
816 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
817
818 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
819 casts.
820
821 2001-10-15 H.J. Lu <hjl@gnu.org>
822
823 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
824 for relocations against discarded link-once section.
825
826 2001-10-15 Alan Modra <amodra@bigpond.net.au>
827
828 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
829 bfd_reloc_outofrange and similar errors.
830
831 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
832 rather than ind->weakdef.
833 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
834 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
835 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
836 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
837 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
838
839 2001-10-15 Alan Modra <amodra@bigpond.net.au>
840 H.J. Lu <hjl@gnu.org>
841
842 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
843 counts for aliases instead of aborting.
844 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
845 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
846
847 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
848 to -1 for non-function symbols.
849 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
850 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
851 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
852 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
853 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
854 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
855 plt.offset instead of plt.refcount when setting to -1.
856
857 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
858
859 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
860 like R_ARM_PC24. Include reloc number in error message about
861 unresolvable relocs.
862
863 2001-10-10 Jakub Jelinek <jakub@redhat.com>
864
865 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
866 relocations against the same symbol in .rel{,a}.dyn section.
867
868 2001-10-10 Kazu Hirata <kazu@hxi.com>
869
870 * aout-encap.c: Fix comment typos.
871 * aoutx.h: Likewise.
872 * archive.c: Likewise.
873 * bout.c: Likewise.
874 * coff64-rs6000.c: Likewise.
875 * coffcode.h: Likewise.
876 * coffgen.c: Likewise.
877 * cofflink.c: Likewise.
878 * coff-mips.c: Likewise.
879 * ecoff.c: Likewise.
880 * elf32-m32r.c: Likewise.
881 * libcoff-in.h: Likewise.
882 * libecoff.h: Likewise.
883 * libxcoff.h: Likewise.
884 * nlm32-i386.c: Likewise.
885 * pdp11.c: Likewise.
886 * section.c: Likewise.
887 * som.c: Likewise.
888 * som.h: Likewise.
889 * bfd-in2.h: Regenerate.
890 * libcoff.h: Likewise.
891
892 2001-10-10 Alan Modra <amodra@bigpond.net.au>
893
894 * elf.c (elf_map_symbols): Don't create new section symbols; Use
895 existing section syms. Update comments.
896 (copy_private_bfd_data): Formatting fixes.
897 (elfcore_grok_win32pstatus): Likewise.
898 (swap_out_syms): Likewise. Remove unnecessary level of braces.
899
900 2001-10-09 Alan Modra <amodra@bigpond.net.au>
901
902 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
903 "group_name".
904 (elf_group_name): Define.
905 (elf_next_in_group): Define.
906 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
907 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
908 first member section; Instead use elf_next_in_group.
909 (bfd_section_from_shdr): Likewise.
910 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
911
912 2001-10-09 Alan Modra <amodra@bigpond.net.au>
913
914 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
915 "next_in_group". Fix gp and gp_size comments.
916 * elf.c (union elf_internal_group): New.
917 (setup_group): New function.
918 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
919 Call setup_group for SHF_GROUP sections.
920 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
921 (elf_fake_sections): Set header type for SEC_GROUP, and header
922 flags for sections in a group.
923 (set_group_contents): New function.
924 (_bfd_elf_compute_section_file_positions): Call it.
925 (assign_section_numbers): Set sh_link for SHT_GROUP.
926
927 * elflink.h (gc_mark_hook): Handle section groups.
928 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
929 * section.c (SEC_GROUP): Define.
930 (struct sec): Comment fixes.
931 * bfd-in2.h: Regenerate.
932
933 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
934 out of function args.
935 (_bfd_elf_canonicalize_reloc): Similarly.
936 (_bfd_elf_get_symtab): Here too.
937 (_bfd_elf_canonicalize_dynamic_symtab): And here.
938 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
939 bfd_bread, and remove unnecessary cast.
940
941 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
942
943 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
944
945 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
946
947 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
948 compilation unit.
949
950 2001-10-06 Alan Modra <amodra@bigpond.net.au>
951
952 * bfd.c (bfd_assert): Report bfd version.
953 (_bfd_abort): Likewise.
954
955 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
956 section sym values. Instead replace any relocs against them with
957 relocs against STN_UNDEF, which has a zero value.
958
959 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
960 relocs.
961
962 2001-10-05 Jeff Law <law@redhat.com>
963
964 * som.h (som_exec_data): New field "version_id".
965 * som.c (som_object_setup): Record the version_id if it
966 exists.
967 (som_prep_headers): Do not initialize version_id here.
968 (som_finish_writing): Initialize version_id here.
969
970 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
971
972 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
973 according to the MIPS/SGI ELF64 ABI Draft.
974 (mips_elf_sort_hash_table): Typo.
975
976 2001-10-04 Alan Modra <amodra@bigpond.net.au>
977
978 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
979
980 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
981 copying flags if this is a weakdef.
982
983 2001-10-04 Alan Modra <amodra@bigpond.net.au>
984
985 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
986 packing.
987
988 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
989 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
990 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
991
992 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
993 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
994 backends we configure. Run "make dep-am".
995 (install-data-local): Install symcat.h.
996 * dep-in.sed: Remove symcat.h from dependencies.
997 * Makefile.in: Regenerate.
998
999 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
1000
1001 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1002
1003 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1004
1005 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1006 (elf_backend_default_use_rela_p): New define.
1007
1008 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1009
1010 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1011 change.
1012
1013 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1014 * configure: Regenerate.
1015 * Makefile.am (BFD_H_FILES): Add version.h.
1016 * Makefile.in: Regenerate.
1017 * po/SRC-POTFILES.in: Regenerate.
1018
1019 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1020 elf_backend_copy_indirect_symbol so that backend has a chance to
1021 copy other necessary fields.
1022 * elf-bfd.h (struct elf_backend_data): Update description of
1023 elf_backend_copy_indirect_symbol.
1024 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1025 copying flags if this is a weakdef.
1026 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1027 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1028 than bfd_link_hash_lookup.
1029 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1030 reloc processing for weakdefs.
1031 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1032 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1033
1034 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1035
1036 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1037 result of ELF64_R_TYPE to enum before using in a switch.
1038 (ppc64_elf_gc_mark_hook): Likewise.
1039 (ppc64_elf_gc_sweep_hook): Likewise.
1040 (ppc64_elf_reloc_type_class): Likewise.
1041
1042 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1043
1044 * version.h: New file.
1045 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1046 (BFD_VERSION_DATE): Define.
1047 (BFD_VERSION_STRING): Define.
1048 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1049 bfd_version_string.
1050 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1051 * bfd-in2.h: Regenerate.
1052 * configure: Regenerate.
1053 * Makefile.am: Run "make dep-am".
1054 * Makefile.in: Regenerate.
1055
1056 * bfd-in.h: Include "symcat.h".
1057 (CONCAT4): Redefine as for old CAT4.
1058 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1059 Add warning regarding whitespace.
1060 * aout-cris.c: Likewise.
1061 * aout-ns32k.c: Likewise.
1062 * aout-sparcle.c: Likewise.
1063 * aout-tic30.c: Likewise.
1064 * aout0.c: Likewise.
1065 * armnetbsd.c: Likewise.
1066 * demo64.c: Likewise.
1067 * elf-bfd.h: Likewise.
1068 * gen-aout.c: Likewise.
1069 * host-aout.c: Likewise.
1070 * hp300bsd.c: Likewise.
1071 * hp300hpux.c: Likewise.
1072 * i386aout.c: Likewise.
1073 * i386bsd.c: Likewise.
1074 * i386dynix.c: Likewise.
1075 * i386freebsd.c: Likewise.
1076 * i386linux.c: Likewise.
1077 * i386lynx.c: Likewise.
1078 * i386mach3.c: Likewise.
1079 * i386netbsd.c: Likewise.
1080 * libaout.h: Likewise.
1081 * m68k4knetbsd.c: Likewise.
1082 * m68klinux.c: Likewise.
1083 * m68klynx.c: Likewise.
1084 * m68knetbsd.c: Likewise.
1085 * m88kmach3.c: Likewise.
1086 * mipsbsd.c: Likewise.
1087 * newsos3.c: Likewise.
1088 * ns32knetbsd.c: Likewise.
1089 * pc532-mach.c: Likewise.
1090 * pdp11.c: Likewise.
1091 * riscix.c: Likewise.
1092 * sparclinux.c: Likewise.
1093 * sparclynx.c: Likewise.
1094 * sparcnetbsd.c: Likewise.
1095 * sunos.c: Likewise.
1096 * targets.c: Likewise.
1097 * vaxnetbsd.c: Likewise.
1098 * vms-hdr.c: Likewise.
1099
1100 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1101
1102 * bfd-in.h: Remove comments regarding generated files.
1103 * libbfd-in.h: Likewise.
1104 * libcoff-in.h: Likewise.
1105 * bfd-in2.h: Regenerate.
1106 * libbfd.h: Likewise.
1107 * libcoff.h: Likewise.
1108
1109 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1110 Hans-Peter Nilsson <hp@bitrange.com>
1111
1112 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1113 partial_inplace, matching assembler output. Set src_mask to
1114 all ones.
1115 (sh_elf_relocate_section): Delete misplaced comment.
1116 For relocatable linking against section symbol, call
1117 _bfd_relocate_contents for partial_inplace relocs and adjust
1118 rel->r_addend for others.
1119 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1120 bfd_get_32, not at rel->r_addend.
1121
1122 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1123
1124 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1125 the old dir refcount, so we indirectly set them to init_refcount.
1126 Short-circuit asserts when we've just verified they are true.
1127
1128 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1129
1130 * section.c (struct sec): Remove kept_section.
1131 (STD_SECTION): Remove kept_section initialisation.
1132 (bfd_make_section_anyway): Here too.
1133 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1134 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1135 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1136 symbols to zero, and remove all code involved with kept_section
1137 and tracking section symbol values.
1138 * bfd-in2.h: Regenerate.
1139 * configure.in: Bump version number.
1140 * configure: Regenerate.
1141
1142 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1143
1144 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1145 (IS_ABSOLUTE_RELOC): Define.
1146 (struct ppc_link_hash_entry): New.
1147 (struct ppc_link_hash_table): New.
1148 (ppc_hash_table): Define.
1149 (link_hash_newfunc): New function.
1150 (ppc64_elf_link_hash_table_create): New function.
1151 (create_got_section): New function.
1152 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1153 pointers to our dynamic sections in hash table.
1154 (ppc64_elf_copy_indirect_symbol): New function.
1155 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1156 dynamic sections. Localise vars. Modify code for refcounts
1157 starting from zero. Don't allocate here, or force symbols dynamic.
1158 Don't copy all relocs if shared, select ones we need. Add code
1159 to track possible copy relocs for non-shared link.
1160 (ppc64_elf_gc_mark_hook): Update comment.
1161 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1162 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1163 code for reference counting garbage collection. Don't create .plt
1164 entries for functions that don't comply with ABI naming convention,
1165 and don't allocate .plt space here. Use short-cuts to dynamic
1166 sections. If possible, keep dynamic relocations instead of using
1167 copy relocs. Remove confused comments.
1168 (ppc_adjust_dynindx): Delete.
1169 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1170 (allocate_dynrelocs): New function.
1171 (readonly_dynrelocs): New function.
1172 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1173 space here, and call allocate_dynrelocs to allocate space for
1174 global .plt, .got and reloc sections. Use short-cuts to dynamic
1175 sections. Call readonly_dynrelocs to determine whether we need
1176 DT_TEXTREL. Don't generate section symbols here, the generic
1177 ELF linker code does it for us.
1178 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1179 gc variety, since we do our own .got handling.
1180 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1181 dynamic section short-cuts. Localise vars, and delay setting.
1182 Handle unknown relocs in main switch statement. Replace ugly
1183 complicated tests for unresolvable relocs with a simple direct
1184 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1185 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1186 after main switch, when we've set addend. Do non-addend insn
1187 tweaks before main swithc. Ignore input_section->vma when
1188 calculating reloc offsets as it's always zero. Rewrite dynamic
1189 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1190 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1191 of dynamic section short-cuts. Reorganise .plt handling code.
1192 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1193 Move expressions out of swap_reloca_out function calls.
1194 (ppc64_elf_reloc_type_class): New function.
1195 (ppc64_elf_info_to_howto): Move common expression to local var.
1196 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1197 of dynamic section short-cuts. Don't fiddle with section syms
1198 here as the ELF linker does it for us.
1199 (elf_backend_can_refcount): Define.
1200 (bfd_elf64_bfd_link_hash_table_create): Define.
1201 (elf_backend_copy_indirect_symbol): Define.
1202 (elf_backend_reloc_type_class): Define.
1203 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1204
1205 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1206
1207 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1208 (struct elf_backend_data): Add can_refcount.
1209 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1210 got.refcount and plt.refcount from init_refcount.
1211 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1212 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1213 rather than got/plt.offset, and test for <= 0 rather than -1.
1214 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1215 * elfxx-target.h (elf_backend_can_refcount): Define.
1216 (elfNN_bed): Init can_refcount.
1217 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1218 (_bfd_generic_link_hash_newfunc): Likewise.
1219 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1220 starting from zero.
1221 (elf_backend_can_refcount): Define.
1222 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1223 starting from zero.
1224 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1225 prototype.
1226 (elf_backend_can_refcount): Define.
1227 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1228 starting from zero.
1229 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1230 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1231 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1232 (elf_backend_can_refcount): Define.
1233 (elf_i386_copy_indirect_symbol): Make static to agree with
1234 prototype. Formatting fix.
1235 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1236 starting from zero.
1237 (elf_backend_can_refcount): Define.
1238 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1239 starting from zero.
1240 (elf_backend_can_refcount): Define.
1241 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1242 starting from zero.
1243 (elf_backend_can_refcount): Define.
1244 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1245 starting from zero.
1246 (elf_backend_can_refcount): Define.
1247 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1248 starting from zero.
1249 (elf_backend_can_refcount): Define.
1250
1251 * som.c (som_write_symbol_strings): Cast current_offset in
1252 bfd_seek call to match param type.
1253
1254 2001-09-28 J. Brobecker <brobecker@gnat.com>
1255
1256 * som.c (som_write_symbol_strings): Fix incorrect type of
1257 current_offset to match the function definition. Fixes a build
1258 failure on HPUX-11.00.
1259
1260 2001-09-28 Richard Henderson <rth@redhat.com>
1261
1262 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1263 SEC_MERGE, SEC_STRINGS.
1264
1265 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1266 * bfd-in2.h: Rebuild.
1267
1268 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1269
1270 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1271 reloc code using x86_64_reloc_map.
1272
1273 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1274 no longer allocate here. Localise some vars to blocks where they
1275 are used.
1276 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1277 setting of vars until needed.
1278 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1279 when symbol visibilty makes a function local.
1280 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1281 swap_reloca_out function calls.
1282 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1283 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1284 switch statement.
1285
1286 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1287 no longer allocate here. Localise some vars to blocks where they
1288 are used. Remove separate switch stmt for creating .got sec.
1289 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1290 redundant casts and aborts. Delay setting of vars until needed.
1291 (allocate_dynrelocs): Remove redundant casts and aborts.
1292 (elf_i386_size_dynamic_sections): Move comment.
1293 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1294 calls.
1295 (elf_i386_relocate_section): Likewise. Comment typo fix.
1296 (elf_i386_finish_dynamic_sections): Migrate common code out of
1297 switch statement.
1298 (elf_backend_* defines): Sort.
1299
1300 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1301 without a reloc when symbol visibilty makes a function local.
1302
1303 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1304
1305 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1306 conflicting float flags.
1307
1308 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1309
1310 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1311 (elf_backend_copy_indirect_symbol): Define.
1312 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1313 (struct elf_i386_link_hash_table): Likewise.
1314 (link_hash_newfunc): Get rid of unnecessary casts.
1315 (elf_i386_link_hash_table_create): Likewise.
1316 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1317 Don't test input section SEC_READONLY here to try to avoid copy
1318 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1319 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1320 here to properly test whether we need copy relocs. Do so for weak
1321 syms too.
1322
1323 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1324 (elf_backend_copy_indirect_symbol): Define.
1325 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1326 (stub_hash_newfunc): Get rid of unnecessary casts.
1327 (hppa_link_hash_newfunc): Likewise.
1328 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1329 Don't test input section SEC_READONLY here to try to avoid copy
1330 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1331 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1332 here to properly test whether we need copy relocs. Do so for weak
1333 syms too.
1334
1335 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1336
1337 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1338 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1339 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1340
1341 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1342
1343 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1344 computation.
1345
1346 2001-09-25 H.J. Lu <hjl@gnu.org>
1347
1348 * bfd-in2.h: Regenerated.
1349
1350 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1351
1352 * elf32-i386.c: Add comment re linker function names and ordering.
1353 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1354 (elf_i386_grok_prstatus): Move before linker functions.
1355 (elf_i386_grok_psinfo): Likewise.
1356 (elf_i386_fake_sections): Move so that functions are ordered.
1357 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1358
1359 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1360
1361 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1362 throughout file.
1363
1364 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1365 code handling this option.
1366 (LONG_BRANCH_VIA_PLT): Likewise.
1367 (RELATIVE_DYNRELOCS): Define as zero.
1368 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1369 "pc_count" fields. Remove "section" field.
1370 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1371 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1372 relocs here. Instead, record all needed dynamic relocs via
1373 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1374 in elf_section_data.
1375 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1376 (allocate_plt_and_got_and_discard_relocs): Rename to
1377 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1378 (readonly_dynrelocs): New function.
1379 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1380 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1381 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1382 (elf32_hppa_relocate_section): Make use of cached sreloc.
1383 (elf32_hppa_reloc_type_class): New function.
1384 (elf_backend_reloc_type_class): Define.
1385
1386 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1387
1388 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1389 and "sreloc" fields.
1390 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1391 "pc_count" fields. Remove "section" field.
1392 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1393 allocate space for dynamic relocs here. Instead, record all
1394 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1395 pointer to "sreloc" section in elf_section_data.
1396 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1397 (allocate_plt_and_got_and_discard_relocs): Rename to
1398 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1399 (readonly_dynrelocs): New function.
1400 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1401 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1402 (elf_i386_relocate_section): Make use of cached sreloc.
1403
1404 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1405
1406 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1407 reloc rather than just the type.
1408 (_bfd_elf_reloc_type_class): Likewise.
1409 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1410 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1411 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1412 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1413 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1414 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1415 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1416 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1417 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1418 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1419 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1420 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1421 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1422 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1423 * elflink.h: Formatting fixes.
1424 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1425 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1426 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1427
1428 2001-09-22 John Reiser <jreiser@BitWagon.com>
1429
1430 * elfcode.h (elf_object_p): Allow for no section header at all in
1431 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1432
1433 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1434
1435 * elfxx-ia64.c: Fix compile time warning messages.
1436 * coff-mcore.c: Fix compile time warning messages.
1437 * coff-ppc.c: Fix compile time warning messages.
1438 * coffcode.h: Fix compile time warning messages.
1439 * elf32-mips.c: Fix compile time warning messages.
1440 * elf64-alpha.c: Fix compile time warning messages.
1441 * libbfd.c: Fix compile time warning messages.
1442 * bfd-in2.h: Regenerate.
1443
1444 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1445
1446 * Makefile.am: Run "make dep-am".
1447 * Makefile.in: Regenerate.
1448
1449 * aoutx.h: Formatting fixes.
1450 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1451
1452 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1453 in error message.
1454
1455 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1456
1457 * bfd.c (bfd_archive_filename): New function.
1458 * bfd-in2.h: Regenerate.
1459 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1460 in error messages where the bfd is an input bfd.
1461 * aout-cris.c: Likewise.
1462 * coff-arm.c: Likewise.
1463 * coff-mcore.c: Likewise.
1464 * coff-ppc.c: Likewise.
1465 * coff-rs6000.c: Likewise.
1466 * coff-sh.c: Likewise.
1467 * coff-tic54x.c: Likewise.
1468 * coff-tic80.c: Likewise.
1469 * coff64-rs6000.c: Likewise.
1470 * coffcode.h: Likewise.
1471 * coffgen.c: Likewise.
1472 * cofflink.c: Likewise.
1473 * ecofflink.c: Likewise.
1474 * elf-hppa.h: Likewise.
1475 * elf.c: Likewise.
1476 * elf32-arm.h: Likewise.
1477 * elf32-cris.c: Likewise.
1478 * elf32-gen.c: Likewise.
1479 * elf32-hppa.c: Likewise.
1480 * elf32-i370.c: Likewise.
1481 * elf32-i386.c: Likewise.
1482 * elf32-m32r.c: Likewise.
1483 * elf32-mcore.c: Likewise.
1484 * elf32-mips.c: Likewise.
1485 * elf32-ppc.c: Likewise.
1486 * elf32-s390.c: Likewise.
1487 * elf32-sh.c: Likewise.
1488 * elf32-sparc.c: Likewise.
1489 * elf32-v850.c: Likewise.
1490 * elf64-alpha.c: Likewise.
1491 * elf64-gen.c: Likewise.
1492 * elf64-ppc.c: Likewise.
1493 * elf64-s390.c: Likewise.
1494 * elf64-sparc.c: Likewise.
1495 * elf64-x86-64.c: Likewise.
1496 * elflink.h: Likewise.
1497 * elfxx-ia64.c: Likewise.
1498 * ieee.c: Likewise.
1499 * ihex.c: Likewise.
1500 * libbfd.c: Likewise.
1501 * pdp11.c: Likewise.
1502 * pe-mips.c: Likewise.
1503 * peicode.h: Likewise.
1504 * srec.c: Likewise.
1505 * xcofflink.c: Likewise.
1506
1507 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1508
1509 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1510 error message.
1511
1512 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1513 error message.
1514
1515 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1516 Consolidate error messages, and split long messages to two lines.
1517
1518 2001-09-20 John Reiser <jreiser@BitWagon.com>
1519
1520 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1521 and info->allow_shlib_undefined.
1522 * elf32-cris.c: Likewise.
1523 * elf32-hppa.c: Likewise.
1524 * elf32-m68k.c: Likewise.
1525 * elf32-mips.c: Likewise.
1526 * elf32-ppc.c: Likewise.
1527 * elf32-s390.c: Likewise.
1528 * elf32-sh.c: Likewise.
1529 * elf32-sparc.c: Likewise.
1530 * elf64-alpha.c: Likewise.
1531 * elf64-hppa.c: Likewise.
1532 * elf64-ppc.c: Likewise.
1533 * elf64-s390.c: Likewise.
1534 * elf64-sparc.c: Likewise.
1535 * elf64-x86-64.c: Likewise.
1536 * elfxx-ia64.c: Likewise.
1537
1538 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1539
1540 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1541 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1542 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1543 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1544 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1545 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1546 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1547 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1548 isxdigit/isdigit/islower.
1549 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1550 (mangle_name): Use ISALNUM instead of isalnum.
1551 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1552 (scan): Use ISDIGIT instead of isdigit.
1553 * hosts/alphavms.h: Don't include <ctype.h>.
1554 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1555 (ieee_object_p): Use TOUPPER instead of toupper.
1556 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1557 (ihex_bad_byte): Use ISPRINT instead of isprint.
1558 * merge.c: Don't include <ctype.h>.
1559 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1560 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1561 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1562 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1563 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1564 (mangle_name): Use ISALNUM instead of isalnum.
1565 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1566 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1567 isupper/islower/isdigit.
1568 (som_decode_symclass): Use TOUPPER instead of toupper.
1569 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1570 (srec_bad_byte): Use ISPRINT instead of isprint.
1571 (srec_scan): Use ISSPACE instead of isspace.
1572 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1573 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1574 * syms.c: Include "safe-ctype.h"
1575 (islower, toupper): Remove macro definitions.
1576 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1577 * vms-gsd.c: Don't include <ctype.h>.
1578 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1579 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1580 islower/toupper.
1581 * vms-tir.c: Don't include <ctype.h>.
1582
1583 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1584
1585 * libbfd.c (bfd_bread): New function replacing bfd_read without
1586 redundant params. Allow reads up to (size_t) -2 in length.
1587 (bfd_bwrite): Similarly for bfd_write.
1588 (real_read): Return a size_t.
1589 (bfd_read): Call bfd_bread.
1590 (bfd_write): Call bfd_bwrite.
1591 (warn_deprecated): New function to annoy everybody.
1592 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1593 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1594 (bfd_read, bfd_write): Define as macro.
1595 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1596 likewise for bfd_write. Ensure function args are correct size by
1597 using casts or local vars. In some cases, remove unnecessary
1598 casts. Formatting fixes, in some cases removing a large expression
1599 from function args by using a local var. Replace CONST with const.
1600 Modify variable types to avoid warings. Use casts to avoid
1601 warnings when using negative numbers in unsigned expressions.
1602 * aout-adobe.c: Likewise.
1603 * aout-arm.c: Likewise.
1604 * aout-cris.c: Likewise.
1605 * aout-encap.c: Likewise.
1606 * aout-ns32k.c: Likewise.
1607 * aout-target.h: Likewise.
1608 * aout-tic30.c: Likewise.
1609 * aoutf1.h: Likewise.
1610 * aoutx.h: Likewise.
1611 * archive.c: Likewise.
1612 * archures.c: Likewise.
1613 * bfd-in.h: Likewise.
1614 * bfd.c: Likewise.
1615 * binary.c: Likewise.
1616 * bout.c: Likewise.
1617 * cache.c: Likewise.
1618 * cisco-core.c: Likewise.
1619 * coff-a29k.c: Likewise.
1620 * coff-alpha.c: Likewise.
1621 * coff-arm.c: Likewise.
1622 * coff-h8300.c: Likewise.
1623 * coff-h8500.c: Likewise.
1624 * coff-i386.c: Likewise.
1625 * coff-i860.c: Likewise.
1626 * coff-i960.c: Likewise.
1627 * coff-ia64.c: Likewise.
1628 * coff-m68k.c: Likewise.
1629 * coff-m88k.c: Likewise.
1630 * coff-mcore.c: Likewise.
1631 * coff-mips.c: Likewise.
1632 * coff-ppc.c: Likewise.
1633 * coff-rs6000.c: Likewise.
1634 * coff-sh.c: Likewise.
1635 * coff-sparc.c: Likewise.
1636 * coff-stgo32.c: Likewise.
1637 * coff-tic30.c: Likewise.
1638 * coff-tic54x.c: Likewise.
1639 * coff-tic80.c: Likewise.
1640 * coff-w65.c: Likewise.
1641 * coff-z8k.c: Likewise.
1642 * coff64-rs6000.c: Likewise.
1643 * coffcode.h: Likewise.
1644 * coffgen.c: Likewise.
1645 * cofflink.c: Likewise.
1646 * coffswap.h: Likewise.
1647 * corefile.c: Likewise.
1648 * cpu-arc.c: Likewise.
1649 * cpu-h8300.c: Likewise.
1650 * cpu-h8500.c: Likewise.
1651 * cpu-i960.c: Likewise.
1652 * cpu-ia64-opc.c: Likewise.
1653 * cpu-ns32k.c: Likewise.
1654 * cpu-pdp11.c: Likewise.
1655 * cpu-pj.c: Likewise.
1656 * cpu-sh.c: Likewise.
1657 * cpu-w65.c: Likewise.
1658 * cpu-z8k.c: Likewise.
1659 * dwarf1.c: Likewise.
1660 * dwarf2.c: Likewise.
1661 * ecoff.c: Likewise.
1662 * ecofflink.c: Likewise.
1663 * ecoffswap.h: Likewise.
1664 * elf-bfd.h: Likewise.
1665 * elf-hppa.h: Likewise.
1666 * elf-m10200.c: Likewise.
1667 * elf-m10300.c: Likewise.
1668 * elf.c: Likewise.
1669 * elf32-arc.c: Likewise.
1670 * elf32-arm.h: Likewise.
1671 * elf32-avr.c: Likewise.
1672 * elf32-cris.c: Likewise.
1673 * elf32-fr30.c: Likewise.
1674 * elf32-gen.c: Likewise.
1675 * elf32-h8300.c: Likewise.
1676 * elf32-hppa.c: Likewise.
1677 * elf32-i370.c: Likewise.
1678 * elf32-i386.c: Likewise.
1679 * elf32-i860.c: Likewise.
1680 * elf32-m32r.c: Likewise.
1681 * elf32-m68k.c: Likewise.
1682 * elf32-mcore.c: Likewise.
1683 * elf32-mips.c: Likewise.
1684 * elf32-openrisc.c: Likewise.
1685 * elf32-pj.c: Likewise.
1686 * elf32-ppc.c: Likewise.
1687 * elf32-s390.c: Likewise.
1688 * elf32-sh-lin.c: Likewise.
1689 * elf32-sh.c: Likewise.
1690 * elf32-sparc.c: Likewise.
1691 * elf32-v850.c: Likewise.
1692 * elf64-alpha.c: Likewise.
1693 * elf64-hppa.c: Likewise.
1694 * elf64-mips.c: Likewise.
1695 * elf64-ppc.c: Likewise.
1696 * elf64-s390.c: Likewise.
1697 * elf64-sparc.c: Likewise.
1698 * elf64-x86-64.c: Likewise.
1699 * elfarm-nabi.c: Likewise.
1700 * elfcode.h: Likewise.
1701 * elfcore.h: Likewise.
1702 * elflink.c: Likewise.
1703 * elflink.h: Likewise.
1704 * elfxx-ia64.c: Likewise.
1705 * elfxx-target.h: Likewise.
1706 * format.c: Likewise.
1707 * hash.c: Likewise.
1708 * hp300hpux.c: Likewise.
1709 * hppabsd-core.c: Likewise.
1710 * hpux-core.c: Likewise.
1711 * i386aout.c: Likewise.
1712 * i386dynix.c: Likewise.
1713 * i386linux.c: Likewise.
1714 * i386lynx.c: Likewise.
1715 * i386mach3.c: Likewise.
1716 * i386msdos.c: Likewise.
1717 * i386os9k.c: Likewise.
1718 * ieee.c: Likewise.
1719 * ihex.c: Likewise.
1720 * irix-core.c: Likewise.
1721 * libaout.h: Likewise.
1722 * libbfd-in.h: Likewise.
1723 * libbfd.c: Likewise.
1724 * libcoff-in.h: Likewise.
1725 * libecoff.h: Likewise.
1726 * libieee.h: Likewise.
1727 * libnlm.h: Likewise.
1728 * libpei.h: Likewise.
1729 * libxcoff.h: Likewise.
1730 * linker.c: Likewise.
1731 * lynx-core.c: Likewise.
1732 * m68klinux.c: Likewise.
1733 * merge.c: Likewise.
1734 * mipsbsd.c: Likewise.
1735 * netbsd-core.c: Likewise.
1736 * nlm.c: Likewise.
1737 * nlm32-alpha.c: Likewise.
1738 * nlm32-i386.c: Likewise.
1739 * nlm32-ppc.c: Likewise.
1740 * nlm32-sparc.c: Likewise.
1741 * nlmcode.h: Likewise.
1742 * nlmswap.h: Likewise.
1743 * ns32k.h: Likewise.
1744 * oasys.c: Likewise.
1745 * opncls.c: Likewise.
1746 * osf-core.c: Likewise.
1747 * pc532-mach.c: Likewise.
1748 * pdp11.c: Likewise.
1749 * pe-mips.c: Likewise.
1750 * peXXigen.c: Likewise.
1751 * peicode.h: Likewise.
1752 * ppcboot.c: Likewise.
1753 * ptrace-core.c: Likewise.
1754 * reloc.c: Likewise.
1755 * reloc16.c: Likewise.
1756 * riscix.c: Likewise.
1757 * rs6000-core.c: Likewise.
1758 * sco5-core.c: Likewise.
1759 * section.c: Likewise.
1760 * som.c: Likewise.
1761 * sparclinux.c: Likewise.
1762 * sparclynx.c: Likewise.
1763 * srec.c: Likewise.
1764 * stabs.c: Likewise.
1765 * sunos.c: Likewise.
1766 * syms.c: Likewise.
1767 * targets.c: Likewise.
1768 * tekhex.c: Likewise.
1769 * trad-core.c: Likewise.
1770 * versados.c: Likewise.
1771 * vms-gsd.c: Likewise.
1772 * vms-hdr.c: Likewise.
1773 * vms-misc.c: Likewise.
1774 * vms-tir.c: Likewise.
1775 * vms.c: Likewise.
1776 * vms.h: Likewise.
1777 * xcofflink.c: Likewise.
1778 * bfd-in2.h: Regenerate.
1779 * libbfd.h: Regenerate.
1780 * libcoff.h: Regenerate.
1781
1782 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1783 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1784 (ufile_ptr): Define.
1785 (bfd_tell): Return a ufile_ptr.
1786 * libbfd.c (bfd_tell): Likewise.
1787 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1788 unnecessarily.
1789 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1790 * aoutf1.h: Likewise.
1791 * som.c: Likewise.
1792 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1793 larger than unsigned long can represent.
1794
1795 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1796 size overflows size_t.
1797 (bfd_realloc): Likewise.
1798 (bfd_zmalloc): Likewise.
1799 * opncls.c (bfd_alloc): Likewise.
1800 (bfd_zalloc): Likewise.
1801 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1802 (bfd_alloc, bfd_zalloc): Update.
1803
1804 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1805 8 bits.
1806 (bfd_get_signed_8): Likewise.
1807 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1808 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1809 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1810 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1811 * libaout.h: Likewise define and use here.
1812 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1813 * aout-arm.c: Likewise.
1814 * aout-encap.c: Likewise.
1815 * aout-ns32k.c: Likewise.
1816 * aout-tic30.c: Likewise.
1817 * aoutf1.h: Likewise.
1818 * aoutx.h: Likewise.
1819 * bout.c: Likewise.
1820 * coff-alpha.c: Likewise.
1821 * coff-h8300.c: Likewise.
1822 * coff-h8500.c: Likewise.
1823 * coff-i960.c: Likewise.
1824 * coff-ia64.c: Likewise.
1825 * coff-m88k.c: Likewise.
1826 * coff-mips.c: Likewise.
1827 * coff-ppc.c: Likewise.
1828 * coff-rs6000.c: Likewise.
1829 * coff-sh.c: Likewise.
1830 * coff-sparc.c: Likewise.
1831 * coff-stgo32.c: Likewise.
1832 * coff-tic30.c: Likewise.
1833 * coff-tic80.c: Likewise.
1834 * coff-w65.c: Likewise.
1835 * coff-z8k.c: Likewise.
1836 * coff64-rs6000.c: Likewise.
1837 * coffgen.c: Likewise.
1838 * cofflink.c: Likewise.
1839 * coffswap.h: Likewise.
1840 * ecoff.c: Likewise.
1841 * ecoffswap.h: Likewise.
1842 * elf.c: Likewise.
1843 * elf32-mips.c: Likewise.
1844 * elf64-mips.c: Likewise.
1845 * hp300hpux.c: Likewise.
1846 * i386dynix.c: Likewise.
1847 * i386lynx.c: Likewise.
1848 * i386msdos.c: Likewise.
1849 * i386os9k.c: Likewise.
1850 * libpei.h: Likewise.
1851 * nlm32-alpha.c: Likewise.
1852 * nlm32-i386.c: Likewise.
1853 * nlm32-ppc.c: Likewise.
1854 * nlmcode.h: Likewise.
1855 * nlmswap.h: Likewise.
1856 * oasys.c: Likewise.
1857 * pdp11.c: Likewise.
1858 * pe-mips.c: Likewise.
1859 * peXXigen.c: Likewise.
1860 * peicode.h: Likewise.
1861 * riscix.c: Likewise.
1862 * sunos.c: Likewise.
1863 * xcofflink.c: Likewise.
1864 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1865 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1866 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1867 equivalent H_PUT_* macro instead.
1868 (GETWORD, GETHALF, GETBYTE): Similarly.
1869 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1870 (GETWORD, GETHALF, GETBYTE): Likewise.
1871 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1872
1873 * bfd-in.h (struct orl): Change "pos" to a union.
1874 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1875 (bsd_write_armap): Here too.
1876 (coff_write_armap): And here.
1877 * coff-rs6000.c (xcoff_write_armap_old): And here.
1878 (xcoff_write_one_armap_big): And here.
1879 (xcoff_write_armap_big): And here.
1880 * ecoff.c (_bfd_ecoff_write_armap): And here.
1881 * elf64-mips.c (mips_elf64_write_armap): And here.
1882
1883 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1884 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1885 * elf32-h8300.c (elf32_h8_mach): Likewise.
1886 * elf32-mips.c (elf_mips_mach): Likewise.
1887 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1888
1889 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1890 calls.
1891 (aix386_core_vec): Typo fix.
1892
1893 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1894 etc. to avoid redefined macro warning.
1895 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1896 (MY(fix_pcrel_26)): Likewise.
1897 * aout-ns32k.c (MY(put_reloc)): Likewise.
1898 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1899 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1900 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1901
1902 * aout-encap.c: Include "file", not <file> for binutils headers.
1903 (encap_object_p): Half baked attempt to fix compile errors in
1904 code dealing with "magic".
1905
1906 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1907 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1908 bfd_vma's rather than longs.
1909 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1910 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1911 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1912 remove case 3.
1913 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1914 Use unsigned comparisons.
1915 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1916 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1917 (_bfd_do_ns32k_reloc_contents): Likewise.
1918 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1919 (_bfd_ns32k_get_immediate): Likewise.
1920 (_bfd_ns32k_put_displacement): Likewise.
1921 (_bfd_ns32k_put_immediate): Likewise.
1922 (bfd_reloc_status_type): Likewise.
1923
1924 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1925 to avoid shadowing.
1926 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1927 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1928 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1929 avoid shadowing.
1930 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1931 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1932 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1933 shadow warning.
1934 (_bfd_elfcore_strndup): Likewise for "dup".
1935 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1936 "name" to avoid shadowing.
1937 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1938 definition of "off".
1939 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1940 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1941 definition of "s".
1942 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1943 "secpp".
1944 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1945 to avoid shadowing.
1946 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1947 to avoid shadowing.
1948 (elf_link_input_bfd): Likewise.
1949 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1950 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1951 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1952 "input_section".
1953 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1954 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1955 (sunos_write_dynamic_symbol): Remove unused vars.
1956 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1957 innermost "directory_name" and "file_name" vars.
1958 * tekhex.c (first_phase): Rename local var "type" to "stype".
1959 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1960 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1961 doing comparison at caller.
1962 (vms_esecflag_by_name): Likewise.
1963 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1964 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1965 (xcoff_write_global_symbol): Rename "p" param to "inf".
1966
1967 * cisco-core.c: Add missing prototypes.
1968 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1969 (cisco_core_file_failing_signal): Likewise.
1970 (cisco_core_file_matches_executable_p): Likewise.
1971 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1972 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1973 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1974 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1975
1976 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1977 thumb_glue_size and arm_glue_size.
1978 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1979
1980 * coff64-rs6000.c: Group prototypes together.
1981
1982 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1983 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1984
1985 * cpu-arc.c: Add missing prototypes.
1986 * cpu-h8500.c: Likewise.
1987 * cpu-i960.c: Likewise.
1988 * cpu-pj.c: Likewise.
1989 * cpu-sh.c: Likewise.
1990 * cpu-w65.c: Likewise.
1991 * cpu-z8k.c: Likewise.
1992 * elf32-fr30.c: Likewise.
1993 * elf32-h8300.c: Likewise.
1994 * elf32-i370.c: Likewise.
1995 * hpux-core.c: Likewise.
1996 * versados.c: Likewise.
1997
1998 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1999 * cpu-h8500.c: Likewise.
2000 * cpu-i960.c: Likewise.
2001 * cpu-z8k.c: Likewise.
2002
2003 * cpu-ia64-opc.c: Correct comment.
2004
2005 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2006
2007 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2008 to unsigned.
2009 (bfd_elf32_write_out_phdrs): Likewise.
2010 (bfd_elf64_write_out_phdrs): Likewise.
2011 (elf_linker_section_pointers): Change addend to bfd_vma.
2012 (_bfd_elf_find_pointer_linker_section): Likewise.
2013 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2014 filepos to unsigned file_ptr.
2015 (_bfd_elfcore_strndup): Change max param to size_t.
2016 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2017 (_bfd_elfcore_strndup): Likewise.
2018 (_bfd_elf_find_pointer_linker_section): Likewise.
2019
2020 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2021 insn and sym_value to ints.
2022
2023 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2024 bfd_size_type.
2025 (elfcore_read_notes): Likewise.
2026
2027 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2028 param from unsigned char to int.
2029 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2030 for info_to_howto call.
2031 (add_dynamic_entry): Define macro.
2032 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2033
2034 * elf32-cris.c (add_dynamic_entry): Define macro.
2035 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2036
2037 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2038 (elf32_h8_object_p): Likewise.
2039 (elf32_h8_merge_private_bfd_data): Likewise.
2040 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2041
2042 * elf32-hppa.c (add_dynamic_entry): Define macro.
2043 (elf32_hppa_size_dynamic_sections): Use it.
2044 * elf32-i370.c (add_dynamic_entry): Define macro.
2045 (i370_elf_size_dynamic_sections): Use it.
2046 (i370_noop): Make static.
2047 * elf32-i386.c (add_dynamic_entry): Define macro.
2048 (elf_i386_size_dynamic_sections): Use it.
2049 * elf32-m68k.c (add_dynamic_entry): Define macro.
2050 (elf_m68k_size_dynamic_sections): Use it.
2051 * elf32-ppc.c (add_dynamic_entry): Define macro.
2052 (ppc_elf_size_dynamic_sections): Use it.
2053 * elf32-s390.c (add_dynamic_entry): Define macro.
2054 (elf_s390_size_dynamic_sections): Use it.
2055 * elf64-alpha.c (add_dynamic_entry): Define macro.
2056 (elf64_alpha_size_dynamic_sections): Use it.
2057 * elf64-hppa.c (add_dynamic_entry): Define macro.
2058 (elf64_hppa_size_dynamic_sections): Use it.
2059 * elf64-ppc.c (add_dynamic_entry): Define macro.
2060 (ppc64_elf_size_dynamic_sections): Use it.
2061 * elf64-s390.c (add_dynamic_entry): Define macro.
2062 (elf_s390_size_dynamic_sections): Use it.
2063 * elf64-sparc.c (add_dynamic_entry): Define macro.
2064 (sparc64_elf_size_dynamic_sections): Use it.
2065 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2066 (elf64_x86_64_size_dynamic_sections): Use it.
2067 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2068 (elfNN_ia64_size_dynamic_sections): Use it.
2069
2070 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2071 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2072
2073 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2074 false if the first malloc fails rather than going via error_return.
2075
2076 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2077 "index" param.
2078 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2079
2080 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2081
2082 * elfxx-ia64.c (global_sym_index): Return a long.
2083
2084 * ieee.c (get_symbol): Use int rather than char param.
2085 (ieee_slurp_sections): Move "section" var to inner blocks.
2086 (copy_expression): Don't init "value" to zero or worry about
2087 clearing to zero after using.
2088 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2089 shadowing.
2090
2091 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2092 unsigned int.
2093
2094 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2095 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2096
2097 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2098
2099 * pc532-mach.c (MYNSX): Delete.
2100 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2101 (write_object_contents): Correct prototype.
2102
2103 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2104 than unsigned short.
2105
2106 * section.c (bfd_set_section_contents): Remove redundant
2107 "offset < 0" test. Check that "count" doesn't overflow size_t.
2108 (bfd_get_section_contents): Likewise.
2109
2110 * som.c (som_fixup_formats): Add missing braces.
2111 (som_reloc_addend): Pass a bfd_vma for "addend".
2112
2113 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2114 (srec_write_symbols): Remove an unnecessary var.
2115
2116 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2117 to match.
2118 * configure.in: Sort to match. Bump version number.
2119 * configure: Regenerate.
2120
2121 * tekhex.c (move_section_contents): Assert offset == 0.
2122
2123 * versados.c (new_symbol_string): Constify arg.
2124 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2125 (versados_get_symbol_info): Make static.
2126 (versados_print_symbol): Likewise.
2127 (versados_get_reloc_upper_bound): Likewise.
2128 (versados_canonicalize_reloc): Likewise.
2129
2130 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2131
2132 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2133
2134 2001-09-17 H.J. Lu <hjl@gnu.org>
2135
2136 * dwarf1.c (parse_die): Take a new arg for the end of the
2137 section. Return false if die is beyond the section.
2138 (parse_functions_in_unit): Pass the end of the section to
2139 parse_die ().
2140 (_bfd_dwarf1_find_nearest_line): Likewise.
2141
2142 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2143
2144 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2145 just like R_SPARC_32.
2146
2147 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2148
2149 * configure.bfd: Add arm-openbsd target.
2150
2151 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2152
2153 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2154 Add support for mips64.
2155
2156 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2157
2158 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2159
2160 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2161
2162 * elf.c (prep_headers): Get the machine code from the elf
2163 backend data.
2164 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2165 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2166 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2167 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2168 * elf-arc.c (arc_elf_final_write_processing): Don't override
2169 e_machine, it's now properly set in prep_headers.
2170 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2171 EM_AVR_OLD.
2172 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2173 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2174 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2175 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2176 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2177 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2178 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2179 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2180 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2181 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2182 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2183 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2184
2185 2001-09-11 Richard Henderson <rth@redhat.com>
2186
2187 * elf64-alpha.c (elf64_alpha_section_flags): New.
2188 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2189
2190 2001-09-11 Richard Henderson <rth@redhat.com>
2191
2192 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2193 apply HINT relocations against dynamic symbols.
2194
2195 2001-09-11 H.J. Lu <hjl@gnu.org>
2196
2197 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2198
2199 2001-09-09 Richard Henderson <rth@redhat.com>
2200
2201 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2202
2203 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2204 following a call to a near function.
2205
2206 2001-09-08 Richard Henderson <rth@redhat.com>
2207
2208 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2209 relocation errors. Fail gp-relative relocations against
2210 dynamic symbols.
2211
2212 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2213
2214 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2215 as well as DEF_DYNAMIC in test for avoided copy relocs.
2216 (allocate_plt_and_got_and_discard_relocs): Likewise.
2217 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2218 (allocate_plt_and_got_and_discard_relocs): Likewise.
2219
2220 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2221
2222 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2223 of R_MIPS_PC16.
2224
2225 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2226
2227 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2228 definitions.
2229 (mips_elf64_howto_table_rel): Likewise.
2230
2231 2001-09-05 Tom Rix <trix@redhat.com>
2232
2233 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2234 and syscall symbols.
2235 (write_global_symbol) : Same.
2236 (bfd_xcoff_export_symbol): Remove unused syscall param.
2237 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2238 bfd_xcoff_import_symbol.
2239 * bfd-in.h: Same.
2240 * bfd-in2.h : Regenerate.
2241
2242 2001-09-04 Richard Henderson <rth@redhat.com>
2243
2244 * elf64-alpha.c (SKIP_HOWTO): New.
2245 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2246 Fix sizes of 16-bit mem format relocs.
2247 (elf64_alpha_reloc_map): Update to match.
2248 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2249 (elf64_alpha_relax_without_lituse): Likewise.
2250 (elf64_alpha_check_relocs): Handle GPREL16.
2251 (elf64_alpha_relocate_section): Likewise.
2252 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2253 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2254 * bfd-in2.h, libbfd.h: Rebuild.
2255
2256 2001-09-04 Jeff Law <law@redhat.com>
2257
2258 * elf32-h8300.c (elf32_h8_relax_section): New function.
2259 (elf32_h8_relax_delete_bytes): Likewise.
2260 (elf32_h8_symbol_address_p): Likewise.
2261 (elf32_h8_get_relocated_section_contents): Likewise.
2262 (bfd_elf32_bfd_relax_section): Define.
2263 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2264
2265 * elf32-h8300.c (special): New function.
2266 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2267 all relocations.
2268 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2269 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2270 Fix minor problems with 8bit and 16bit PC relative relocations.
2271
2272 2001-09-01 Andreas Jaeger <aj@suse.de>
2273
2274 * vms-tir.c: Add missing prototypes.
2275 * vms-hdr.c: Likewise.
2276 * vms-gsd.c: Likewise.
2277 * vms-misc.c: Likewise.
2278
2279 2001-08-31 H.J. Lu <hjl@gnu.org>
2280
2281 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2282 with bad relocation.
2283
2284 2001-08-31 Eric Christopher <echristo@redhat.com>
2285 Jason Eckhardt <jle@redhat.com>
2286
2287 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2288 mips32_4k and mips64.
2289 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2290 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2291 * bfd/cpu-mips.c: Ditto.
2292 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2293 * bfd/bfd-in2.h: Regenerate.
2294
2295 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2296
2297 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2298 value into R_ALPHA_RELATIVE's addend.
2299 (elf64_alpha_finish_dynamic_symbol): Likewise.
2300
2301 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2302
2303 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2304 recomputed addend during relocatable link if not USE_REL.
2305
2306 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2307 error.
2308
2309 2001-08-30 H.J. Lu <hjl@gnu.org>
2310
2311 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2312 2 changes.
2313 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2314 relocations for weak definitions.
2315
2316 2001-08-30 H.J. Lu <hjl@gnu.org>
2317
2318 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2319 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2320 * Makefile.in: Rebuild.
2321
2322 2001-08-30 H.J. Lu <hjl@gnu.org>
2323
2324 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2325 dynamic relocation for undefined weak symbols when creating
2326 executables. Check h->root.root.type, instead of h->root.type.
2327
2328 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2329
2330 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2331 default from coff to elf.
2332
2333 2001-08-29 Jeff Law <law@redhat.com>
2334
2335 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2336 relocations.
2337 (h8_reloc_map): Similarly.
2338 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2339 Add support for PC relative relocations.
2340
2341 * elf32-h8300.c: Put all prototypes together.
2342 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2343 (elf32_h8_final_link_relocate): New function for linker.
2344 (elf32_h8_relocate_section): Similarly.
2345 (elf_backend_relocate_section): Define.
2346
2347 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2348 (h8300_scan): Handle architecture:machine encodings typically
2349 found in linker scripts.
2350 * elf.c (prep_headers): Do not try to do H8 machine recognition
2351 here.
2352 * elf32-h8300.c: Add some missing prototypes.
2353 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2354 (elf32_h8_object_p): Similarly.
2355
2356 2001-08-29 Tom Rix <trix@redhat.com>
2357
2358 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2359 does not follow a XTY_SD.
2360
2361 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2362
2363 * targmatch.sed: Delete case statements.
2364 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2365 aix4.3 and above.
2366
2367 2001-08-29 J"orn Rennecke <amylaar@redhat.com>
2368
2369 * Makefile.am (elf32-h8300.lo): New target.
2370 * config.bfd (h8300*-*-elf): New case.
2371 * configure.in (bfd_elf32_h8300_vec): New case.
2372 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2373 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2374 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2375 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2376 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2377 * elf32-h8300.c: New file.
2378 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2379
2380 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2381
2382 * sparclynx.c: Add missing prototypes.
2383 * coff-mcore.c: Add missing prototypes.
2384 * elf32-pj.c: Add missing prototypes.
2385 * nlm32-sparc.c: Add missing prototypes.
2386 * oasys.c: Add missing prototypes.
2387 * pdp11.c: Add missing prototypes.
2388 * pe-mips.c: Add missing prototypes.
2389 * riscix.c: Add missing prototypes.
2390
2391 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2392
2393 * elf32-i386.c: Add missing prototypes.
2394 * elf32-ppc.c: Likewise.
2395 * elf32-sh-lin.c: Likewise.
2396 * elfarm-nabi.c: Likewise.
2397
2398 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2399
2400 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2401 (elf_i386_grok_psinfo): New function.
2402 (elf_backend_grok_prstatus): Define.
2403 (elf_backend_grok_psinfo): Likewise.
2404 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2405 (ppc_elf_grok_psinfo): New function.
2406 (elf_backend_grok_prstatus): Define.
2407 (elf_backend_grok_psinfo): Likewise.
2408 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2409 (elf32_shlin_grok_psinfo): New function.
2410 (elf_backend_grok_prstatus): Define.
2411 (elf_backend_grok_psinfo): Likewise.
2412 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2413 (elf32_arm_nabi_grok_psinfo): New function.
2414 (elf_backend_grok_prstatus): Define.
2415 (elf_backend_grok_psinfo): Likewise.
2416
2417 2001-08-27 H.J. Lu <hjl@gnu.org>
2418
2419 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2420 sanity check.
2421 (mips_elf_calculate_relocation): Create dynamic relocation for
2422 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2423 bit is not set.
2424
2425 2001-08-27 H.J. Lu <hjl@gnu.org>
2426
2427 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2428 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2429 (_bfd_elf32_mips_grok_prstatus): Likewise.
2430 (_bfd_elf32_mips_grok_psinfo): Likewise.
2431 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2432 `struct mips_elf_link_hash_entry *'.
2433 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2434
2435 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2436
2437 * mipsbsd.c: Add missing prototypes.
2438 * hp300hpux.c: Add missing prototypes.
2439 * i386aout.c: Add missing prototypes.
2440 * i386lynx.c: Add missing prototypes.
2441 * i386mach3.c: Add missing prototypes.
2442 * i386msdos.c: Add missing prototypes.
2443 * i386os9k.c: Add missing prototypes.
2444
2445 2001-08-27 Linus Nordberg <linus@swox.se>
2446 Torbjorn Granlund <tege@swox.com>
2447 Staffan Ulfberg <staffanu@swox.se>
2448 Alan Modra <amodra@bigpond.net.au>
2449
2450 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2451 targ64_selvecs for 32 bit powerpc targets.
2452 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2453 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2454 Run "make dep-am".
2455 * Makefile.in: Regenerate.
2456 * configure.in: Add elf64_powerpc vecs.
2457 * configure: Regenerate.
2458 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2459 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2460 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2461 * elf64-ppc.c: New file.
2462 * reloc.c: Add powerpc64 relocs.
2463 * libbfd.h: Regenerate.
2464 * bfd-in2.h: Regenerate.
2465
2466 2001-08-27 Andreas Schwab <schwab@suse.de>
2467
2468 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2469 reloc is against read-only section.
2470 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2471 looking up section names for DT_TEXTREL.
2472 (elf32_m68k_reloc_type_class): New function.
2473 (elf_backend_reloc_type_class): Define.
2474
2475 2001-08-27 Andreas Jaeger <aj@suse.de>
2476
2477 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2478 reloc is against read-only section.
2479 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2480 looking up section names for DT_TEXTREL.
2481 (elf_s390_reloc_type_class): New.
2482 (elf_backend_reloc_type_class): Define.
2483
2484 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2485 reloc is against read-only section.
2486 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2487 looking up section names for DT_TEXTREL.
2488 (elf_s390_reloc_type_class): New.
2489 (elf_backend_reloc_type_class): Define.
2490
2491 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2492 is against read-only section.
2493 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2494 looking up section names for DT_TEXTREL.
2495 (ppc_elf_reloc_type_class): New.
2496 (elf_backend_reloc_type_class): Define.
2497
2498 2001-08-26 Andreas Jaeger <aj@suse.de>
2499
2500 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2501 reloc is against read-only section.
2502 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2503 looking up section names for DT_TEXTREL.
2504 (elf_cris_reloc_type_class): New.
2505 (elf_backend_reloc_type_class): Define.
2506
2507 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2508 against read-only section.
2509 (elf_backend_reloc_type_class): Define.
2510 (sh_elf_reloc_type_class): New.
2511 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2512 looking up section names for DT_TEXTREL.
2513
2514 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2515 reloc is against read-only section.
2516 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2517 looking up section names for DT_TEXTREL.
2518 (elf32_arm_reloc_type_class): New.
2519 (elf_backend_reloc_type_class): Define.
2520
2521 2001-08-25 Andreas Jaeger <aj@suse.de>
2522
2523 * oasys.c: Add missing prototypes.
2524
2525 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2526 attribute for parameter.
2527 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2528
2529 * versados.c (get_4): Make static.
2530 (get_10): Make static.
2531 Add missing prototypes.
2532 (process_esd): Fix call to versados_new_symbol.
2533
2534 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2535
2536 * coff-a29k.c: Add missing prototypes.
2537 * coff-apollo.c: Add missing prototypes.
2538 * coff-arm.c: Add missing prototypes.
2539 * coff-i860.c: Add missing prototypes.
2540 * coff-rs6000.c: Add missing prototypes.
2541 * coff-tic80.c: Add missing prototypes.
2542 * elf-m10200.c: Add missing prototypes.
2543 * elf-m10300.c: Add missing prototypes.
2544 * elf32-arm.h: Add missing prototypes.
2545 * elf32-d10v.c: Add missing prototypes.
2546 * elf32-m32r.c: Add missing prototypes.
2547 * elf32-mcore.c: Add missing prototypes.
2548 * elf32-openrisc.c: Add missing prototypes.
2549 * elf32-sh.c: Add missing prototypes.
2550 * elf32-sparc.c: Add missing prototypes.
2551 * elf32-v850.c: Add missing prototypes.
2552 * elfarm-nabi.c: Add missing prototypes.
2553 * elfarm-oabi.c: Add missing prototypes.
2554
2555 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2556
2557 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2558 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2559
2560 2001-08-24 H.J. Lu <hjl@gnu.org>
2561
2562 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2563 hash structure.
2564
2565 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2566
2567 * elf-bfd.h (elf_hash_table): Revert definition.
2568 (is_elf_hash_table): New macro.
2569 * elflink.h (elf_link_add_object_symbols): Test
2570 is_elf_hash_table before accessing ELF only fields in hash
2571 structure.
2572 (elf_link_create_dynamic_sections): Fail if not using an ELF
2573 hash structure.
2574 (elf_add_dynamic_entry): Fail if not using an ELF hash
2575 structure.
2576 (elf_link_record_local_dynamic_symbol): Fail if not using an
2577 ELF hash structure.
2578 (size_dynamic_sections): Fail if not using an ELF hash
2579 structure.
2580 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2581 hash structure.
2582 (elf_bfd_final_link): Fail if not using an ELF hash
2583 structure.
2584
2585 2001-08-24 H.J. Lu <hjl@gnu.org>
2586
2587 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2588 table is not an ELF linker hash table.
2589
2590 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2591 table type to bfd_link_elf_hash_table.
2592
2593 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2594 the last change.
2595
2596 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2597 table type to bfd_link_generic_hash_table.
2598
2599 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2600
2601 * bfd.c (bfd_alt_mach_code): New function.
2602 * bfd-in2.h: Rebuilt.
2603
2604 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2605
2606 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2607 `type' field in the hash entry when deciding whether to follow a
2608 link.
2609
2610 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2611
2612 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2613 last.
2614 (elf_link_sort_relocs): Adjust accordingly.
2615
2616 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2617 (elf64_alpha_check_relocs): Set it if section this reloc is against
2618 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2619 read-only section.
2620 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2621 is is against read-only section.
2622 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2623 check section names.
2624 (elf64_alpha_reloc_type_class): New.
2625 (elf_backend_reloc_type_class): Define.
2626
2627 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2628
2629 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2630 by bfd_malloc().
2631
2632 2001-08-23 Andreas Jaeger <aj@suse.de>
2633
2634 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2635 the reloc is against read-only section.
2636 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2637 of looking up section names for DT_TEXTREL.
2638 (elf64_x86_64_reloc_type_class): New.
2639 (elf_backend_reloc_type_class): Define.
2640
2641 2001-08-23 H.J. Lu <hjl@gnu.org>
2642
2643 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2644 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2645
2646 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2647 bfd_print_symbol_vandf.
2648 * coffgen.c (coff_print_symbol): Likewise.
2649 * elf.c (bfd_elf_print_symbol): Likewise.
2650 * ieee.c (ieee_print_symbol): Likewise.
2651 * nlmcode.h (nlm_print_symbol): Likewise.
2652 * oasys.c (oasys_print_symbol): Likewise.
2653 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2654 * som.c (som_print_symbol): Likewise.
2655 * srec.c (srec_print_symbol): Likewise.
2656 * tekhex.c (tekhex_print_symbol): Likewise.
2657 * versados.c (versados_print_symbol): Likewise.
2658 * vms.c (vms_print_symbol): Likewise.
2659
2660 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2661 with bfd_fprintf_vma.
2662 (bfd_elf_print_symbol): Likewise.
2663 * syms.c (bfd_print_symbol_vandf): Likewise.
2664
2665 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2666
2667 * aoutf1.h (sunos_write_object_contents): Silence compile time
2668 warning.
2669 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2670
2671 * bout.c: Add missing function prototypes. Fix formatting.
2672 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2673 * coff-w65.c: Add missing function prototypes. Fix formatting.
2674 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2675 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2676 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2677 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2678 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2679 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2680 * coff-sh.c: Add missing function prototypes. Fix formatting.
2681
2682 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2683
2684 * elf-bfd.h (enum elf_reloc_type_class): New.
2685 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2686 (_bfd_elf_reloc_type_class): New.
2687 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2688 (elfNN_bed): Add elf_backend_reloc_type_class.
2689 * elf.c (_bfd_elf_reloc_type_class): New.
2690 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2691 is against read-only section.
2692 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2693 looking up section names for DT_TEXTREL.
2694 (elf_i386_reloc_type_class): New.
2695 (elf_backend_reloc_type_class): Define.
2696 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2697 reloc is against read-only section.
2698 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2699 looking up section names for DT_TEXTREL.
2700 (elf32_sparc_reloc_type_class): New.
2701 (elf_backend_reloc_type_class): Define.
2702 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2703 reloc is against read-only section.
2704 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2705 looking up section names for DT_TEXTREL.
2706 (sparc64_elf_reloc_type_class): New.
2707 (elf_backend_reloc_type_class): Define.
2708 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2709 (elfNN_ia64_hash_table_create): Clear ia64_info.
2710 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2711 section.
2712 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2713 instead of looking up section names for DT_TEXTREL.
2714 (elfNN_ia64_reloc_type_class): New.
2715 (elf_backend_reloc_type_class): Define.
2716 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2717 (struct elf_link_sort_rela): New.
2718 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2719 (elf_bfd_final_link): Call elf_link_sort_relocs.
2720 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2721 necessary.
2722
2723 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2724
2725 * configure.in (x86-bsdi): No corefile support.
2726 * configure: Regenerate.
2727
2728 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2729
2730 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2731 comma.
2732
2733 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2734
2735 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2736 the alignment of dwarf2 linkonce sections to 0.
2737 * coff-sto32.c: Likewise.
2738
2739 2001-08-20 Andreas Jaeger <aj@suse.de>
2740
2741 * coff-sparc.c: Add missing prototypes.
2742 * elf32-s390.c: Likewise.
2743 * elf32-i960.c: Likewise.
2744 * aout-target.h: Likewise.
2745
2746 2001-08-20 H.J. Lu <hjl@gnu.org>
2747
2748 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2749 (elf_num_section_syms): New for num_section_syms.
2750
2751 * elf.c (elf_map_symbols): Set num_section_syms.
2752 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2753 the section symbol index.
2754
2755 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2756
2757 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2758 select the generic has table creator. All elf backends need elf
2759 specific fields in the hash table.
2760
2761 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2762
2763 * archive.c (offsetof): Remove define.
2764 * elf.c: Likewise.
2765 * oasys.c: Likewise
2766 * sysdep.h (offsetof): Define.
2767
2768 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2769
2770 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2771 (bfd_set_gp_size): Make param unsigned.
2772 * bfd-in2.h: Regenerate.
2773 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2774 than calling bfd_get_gp_size.
2775 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2776 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2777
2778 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2779
2780 * linker.c (default_fill_link_order): Handle four byte fill value.
2781
2782 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2783
2784 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2785 prototype.
2786 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2787
2788 * elf64-mips.c (UNUSED_RELOC): Define.
2789 (mips_elf64_howto_table_rel): Use it.
2790 (mips_elf64_howto_table_rela): Here too.
2791 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2792
2793 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2794 silence warning.
2795 * coffgen.c (coff_print_symbol): Fix warnings.
2796 (coff_find_nearest_line): Likewise.
2797 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2798 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2799 * format.c (bfd_check_format_matches): Likewise.
2800 (bfd_set_format): Likewise.
2801 * coff-ia64.c: Add missing prototypes.
2802 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2803 signed to silence warnings.
2804 (elf64_alpha_relocate_section): Likewise.
2805 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2806 (elf64_alpha_add_symbol_hook): Likewise.
2807 (elf64_alpha_final_link): Likewise.
2808 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2809 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2810 (elf64_alpha_size_got_sections): Likewise.
2811 * elfxx-ia64.c: Add missing prototypes.
2812 (elfNN_ia64_relocate_section): Fix warning.
2813 (elfNN_ia64_unwind_entry_compare): Make params const.
2814
2815 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2816
2817 * config.bfd (targ64_selvecs): New.
2818 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2819
2820 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2821 (BFD_DEFAULT_TARGET_SIZE): New.
2822 (BFD_ARCH_SIZE): Comment.
2823 * configure.in (target_size): New. Set instead of target64 in
2824 selvecs case statement. Set target64 from it.
2825 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2826 * bfd-in2.h: Regenerate.
2827 * configure: Regenerate.
2828
2829 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2830
2831 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2832 (bfd_errmsgs): Add corresponding message.
2833 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2834 finding an archive that contains different format object files.
2835 Return bfd_error_wrong_object_format for this case.
2836 * format.c: Formatting fixes. s/CONST/const/.
2837 (bfd_check_format_matches): Accept archives that give
2838 bfd_error_wrong_object_format if no full match is found. Tidy
2839 code handling matching_vector. Don't return a pointer to freed
2840 memory in `matching'. Handle ambiguous matches as for partial
2841 archive matches.
2842 * bfd-in2.h: Regenerate.
2843
2844 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2845
2846 * libieee.h (common_header_type): Add last_byte field.
2847
2848 * ieee.c: Add missing prototypes. Some format fixes.
2849 (struct output_buffer_struct): Move for availability to prototypes.
2850 (ieee_part_after): New function.
2851 (ieee_slurp_debug): Use it here.
2852 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2853 ieee_part_after to set last_byte to one past end of current part.
2854 Update callers.
2855 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2856 Update callers.
2857 (parse_expression): Don't go beyond the end of the current part.
2858 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2859 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2860 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2861 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2862 ieee_set_section_contents, ieee_write_object_contents,
2863 ieee_make_empty_symbol): Make static.
2864 (ieee_archive_p): Correct comments regarding bfd_read.
2865 (ieee_object_p): Similarly.
2866 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2867 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2868 input_bfd, output_bfd, output_buffer.
2869 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2870 do_with_relocs, ie. as a symbol for relocatable files.
2871 (ieee_vec): Add comments showing functions referenced by macros.
2872
2873 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2874
2875 * aout-tic30.c: Add missing prototypes. Fix formatting.
2876 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2877 * peXXigen.c: Add missining prototypes. Fix formatting.
2878 * aout-adobe.c: Add missining prototypes. Fix formatting.
2879
2880 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2881
2882 * elf32-v850.c: Add missing function prototypes.
2883 Fix some formatting.
2884
2885 * cpu-v850.c: Add missing function prototype.
2886 Fix some formatting.
2887
2888 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2889
2890 * elf-bfd.h (struct elf_backend_data): Add new fields
2891 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2892 (bfd_elf_sprintf_vma): Rename function prototype to
2893 '_bfd_elf_sprintf_vma'.
2894 (bfd_elf_fprintf_vma): Rename function prototype to
2895 '_bfd_elf_fprintf_vma'.
2896 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2897 directly, instead indirect via the elf_backend_data structure.
2898 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2899 instead indirect via the elf_backend_data structure.
2900 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2901 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2902 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2903 already defined.
2904 (elf_backend_fprintf_vma): Initialise if not already defined.
2905 (struct elf_backend_data): Initialise the
2906 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2907
2908 2001-08-10 Andreas Jaeger <aj@suse.de>
2909
2910 * elf64-sparc.c: Add missing prototypes.
2911 * elf32-cris.c: Likewise.
2912 * elf32-i370.c: Likewise.
2913 * elf64-hppa.c: Likewise.
2914 * elf64-s390.c: Likewise.
2915
2916 2001-08-10 Andreas Jaeger <aj@suse.de>
2917
2918 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2919 Add prototypes where needed.
2920
2921 2001-08-10 H.J. Lu <hjl@gnu.org>
2922
2923 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2924 (bfd_fprintf_vma): Likewise.
2925
2926 2001-08-10 H.J. Lu <hjl@gnu.org>
2927
2928 * bfd.c (bfd_sprintf_vma): Don't return void.
2929 (bfd_fprintf_vma): Likewise.
2930
2931 2001-08-10 Andreas Jaeger <aj@suse.de>
2932
2933 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2934 to build warnings.
2935 * configure: Regenerate.
2936
2937 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2938
2939 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2940 warning if not BFD64. Add braces so emacs auto format works.
2941 (bfd_elf_fprintf_vma): Likewise.
2942
2943 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2944 of _xcoff_swap_ld*.
2945 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2946 param to agree with libxcoff.h.
2947 (xcoff_swap_ldhdr_out): Likewise.
2948 (xcoff_swap_ldsym_in): Likewise.
2949 (xcoff_swap_ldsym_out): Likewise.
2950 (xcoff_swap_ldrel_in): Likewise.
2951 (xcoff_swap_ldrel_out): Likewise.
2952 (xcoff_create_csect_from_smclas): Likewise.
2953 * coff64-rs6000.c: Add missing prototypes.
2954 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2955 with libxcoff.h.
2956 (xcoff64_swap_ldhdr_out): Likewise.
2957 (xcoff64_swap_ldsym_in): Likewise.
2958 (xcoff64_swap_ldsym_out): Likewise.
2959 (xcoff64_swap_ldrel_in): Likewise.
2960 (xcoff64_swap_ldrel_out): Likewise.
2961 (xcoff64_ppc_relocate_section): Make static.
2962 (xcoff64_slurp_armap): Likewise.
2963 (xcoff64_archive_p): Likewise.
2964 (xcoff64_openr_next_archived_file): Likewise.
2965 (xcoff64_sizeof_headers): Likewise.
2966 (xcoff64_is_lineno_count_overflow): Likewise.
2967 (xcoff64_is_reloc_count_overflow): Likewise.
2968 (xcoff64_loader_symbol_offset): Likewise.
2969 (xcoff64_loader_reloc_offset): Likewise.
2970 * elf64-gen.c: Add missing prototypes.
2971
2972 2001-08-09 H.J. Lu <hjl@gnu.org>
2973
2974 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2975 (bfd_elf_fprintf_vma): Likewise.
2976
2977 2001-08-09 H.J. Lu <hjl@gnu.org>
2978
2979 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2980 to ...
2981 * elf-bfd.h: Here.
2982 * bfd-in2.h: Regenerated.
2983
2984 2001-08-09 H.J. Lu <hjl@gnu.org>
2985
2986 * bfd-in.h (bfd_sprintf_vma): New prototype.
2987 (bfd_fprintf_vma): Likewise.
2988 (bfd_elf_sprintf_vma): Likewise.
2989 (bfd_elf_fprintf_vma): Likewise.
2990 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2991 * bfd-in2.h: Regenerated.
2992
2993 * bfd.c (bfd_sprintf_vma): New. Defined.
2994 (bfd_fprintf_vma): Likewise.
2995
2996 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2997 (bfd_elf_fprintf_vma): Likewise.
2998
2999 2001-08-09 Alan Modra <amodra@bigpond.net.au>
3000
3001 * coff-rs6000.c: Add missing prototypes.
3002 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3003 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3004 xcoff_loader_reloc_offset): Make static.
3005 * dwarf1.c: Add missing prototypes.
3006 * dwarf2.c: Add missing prototypes.
3007 (struct abbrev_info): Move definition.
3008 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3009 * elf.c: Add missing prototypes.
3010 * elf32-gen.c: Likewise.
3011 * elf32-i386.c: Likewise.
3012 * elf32-ppc.c: Likewise.
3013 (ppc_elf_sort_rela): Use PTR instead of "void *".
3014 * elflink.h: Add missing prototypes. Formatting fixes.
3015 * merge.c: Add missing prototypes.
3016 (last4_eq): Use PTR instead of "void *".
3017 (last_eq): Likewise.
3018 * syms.c: Add missing prototypes.
3019
3020 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3021
3022 * bfd.c: Fix formatting.
3023 * bfd-in2.h: Regenerate.
3024
3025 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3026
3027 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3028 true (this target uses REL relocations) and 'pcrel_offset' to
3029 false (the PC is implied, not stored in the offset).
3030
3031 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3032
3033 1999-10-19 Linus Nordberg <linus@swox.se>
3034 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3035 * elfxx-target.h (elf_backend_want_got_sym): Define.
3036 (elfNN_bed): Add elf_backend_want_got_sym.
3037 * elflink.c (_bfd_elf_create_got_section): Define
3038 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3039
3040 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3041
3042 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3043 (find_rela_addend): New function.
3044 (parse_comp_unit): Call it to find the abbrev offset addend.
3045 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3046 members of dwarf2_debug as debugging information is read.
3047
3048 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3049
3050 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3051 targets as well as sh-pe.
3052
3053 2001-08-03 Ben Harris <bjh21@netbsd.org>
3054
3055 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3056 reloc from start of section when computing value for R_ARM_REL32
3057 reloc.
3058
3059 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3060
3061 From H.J. Lu <hjl@gnu.org>
3062 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3063 keep relocs for undefined syms if there are no dynamic sections in
3064 executable.
3065 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3066
3067 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3068
3069 * cofflink.c (coff_link_check_ar_symbols): also search for
3070 __imp__symbol as well as _symbol.
3071 * linker.c (_bfd_generic_link_add_archive_symbols): also
3072 search for __imp__symbol as well as _symbol.
3073
3074 2001-08-01 Adam Nemet <anemet@lnxw.com>
3075
3076 * elf.c (elf_sort_sections): Return zero only as the last step.
3077
3078 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3079
3080 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3081 ARM_COFF_BUGFIX.
3082 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3083 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3084 ARM_COFF_BUGFIX.
3085
3086 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3087
3088 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3089 to match corresponding bfd_coff_backend data member.
3090
3091 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3092
3093 * Makefile.am: Update dependencies with "make dep-am".
3094 * Makefile.in: Regenerate
3095
3096 2001-07-15 H.J. Lu <hjl@gnu.org>
3097
3098 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3099 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3100 * Makefile.in: Regenerate.
3101
3102 2001-07-11 H.J. Lu <hjl@gnu.org>
3103
3104 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3105 flags when creating the reloc section if the ALLOC flag in the
3106 source section is set.
3107
3108 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3109
3110 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3111 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3112 * bfd-in2.h: Regenerate.
3113 * libbfd.h: Regenerate.
3114 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3115 new relocations.
3116 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3117 (elfNN_ia64_check_relocs): Likewise.
3118 (elfNN_ia64_install_value): Likewise.
3119 (elfNN_ia64_relocate_section): Likewise.
3120
3121 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3122
3123 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3124 R_SPARC_UA64.
3125 (elf32_sparc_check_relocs): Likewise.
3126 Only create .rela section for alloced sections in shared libraries.
3127 (elf32_sparc_relocate_section): Likewise.
3128 Remove redundant check.
3129 Optimize unaligned reloc usage.
3130 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3131 check.
3132
3133 2001-07-11 H.J. Lu <hjl@gnu.org>
3134
3135 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3136 ALLOC|LOAD flags as the source section for debugging sections
3137 when creating the reloc section.
3138
3139 2001-07-05 Jim Wilson <wilson@redhat.com>
3140
3141 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3142 the section of the bigger symbol.
3143
3144 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3145
3146 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3147
3148 * peicode.h (coff_swap_scnhdr_in): For sections containing
3149 uninitialised data, only set their size to s_paddr if this does
3150 not reset their size to zero. MS's latest compilers will set
3151 s_paddr to zero.
3152
3153 2001-07-04 H.J. Lu <hjl@gnu.org>
3154
3155 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3156 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3157 bfd_mach_mips5000.
3158
3159 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3160
3161 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3162
3163 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3164 sections being discarded.
3165
3166 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3167
3168 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3169 instead of _bfd_elfcore_section_from_phdr.
3170 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3171 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3172 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3173 (elfcore_grok_prstatus): Likewise.
3174 (elfcore_grok_lwpstatus): Likewise.
3175 (bfd_get_elf_phdr_upper_bound): Likewise.
3176 (elfcore_make_note_pseudosection): Formatting.
3177 (_bfd_elfcore_strndup): Formatting.
3178 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3179 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3180
3181 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3182
3183 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3184 and _bfd_elfcore_strndup.
3185 (struct elf_backend_data): Add elf_backend_grok_prstatus
3186 and elf_backend_grok_psinfo.
3187 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3188 (elfcore_grok_prstatus): Use it.
3189 (elfcore_make_note_pseudosection): Likewise.
3190 (elfcore_strndup): Rename to...
3191 (_bfd_elfcore_strndup): Here, and make global.
3192 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3193 (elfcore_grok_note): Call elf_backend_grok_prstatus
3194 and elf_backend_grok_psinfo if available.
3195 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3196 (_bfd_elf32_mips_grok_psinfo): New function.
3197 (elf_backend_grok_prstatus): Define.
3198 (elf_backend_grok_psinfo): Define.
3199 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3200 (elf_backend_grok_psinfo): Likewise.
3201 (elfNN_bed): Include elf_backend_grok_prstatus and
3202 elf_backend_grok_psinfo.
3203
3204 2001-06-29 H.J. Lu <hjl@gnu.org>
3205
3206 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3207 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3208 is NULL before filling PLT.
3209
3210 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3211
3212 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3213
3214 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3215
3216 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3217 here..
3218 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3219 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3220 after gc has run.
3221
3222 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3223 (IS_ABSOLUTE_RELOC): Define.
3224 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3225 (hppa_link_hash_newfunc): Always init it.
3226 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3227 create COPY relocs only when the reloc is in a read-only section.
3228 Instead, allocate space for a dynamic reloc to reference the
3229 library symbol directly. Keep track of space we allocate using
3230 relocs_entries.
3231 (hppa_discard_copies): Delete, and move code to..
3232 (allocate_plt_and_got): ..here. Rename to
3233 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3234 relocs for non-shared link.
3235 (elf32_hppa_size_dynamic_sections): Update calls to above.
3236 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3237 in lieu of COPY relocs.
3238
3239 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3240 here..
3241 (elf_i386_adjust_dynamic_symbol): ..nor here..
3242 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3243 after gc has run.
3244 (elf_i386_size_dynamic_sections): Fix a comment.
3245 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3246 involved in writing reloc out.
3247
3248 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3249
3250 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3251 Ensure syms are dynamic if we might be emitting a reloc.
3252 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3253 for undefweak or undefined syms..
3254 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3255
3256 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3257 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3258 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3259 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3260
3261 2001-06-24 H.J. Lu <hjl@gnu.org>
3262
3263 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3264 strncasecmp/strcasecmp instead of strncmp/strcmp.
3265
3266 2001-06-23 H.J. Lu <hjl@gnu.org>
3267
3268 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3269 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3270 in the regular object file and treat the weak definition as
3271 the normal one.
3272
3273 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3274
3275 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3276 unresolved_reloc test to exclude cases where we use "relocation"
3277 before setting it to point into the .got. Reinstate fudge for
3278 unresolved relocs in debugging sections.
3279
3280 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3281 complicated tests for unresolvable relocs with a simple direct
3282 scheme using "unresolved_reloc" var.
3283
3284 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3285 elf_i386_dyn_relocs. Update comment.
3286 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3287 dyn_relocs.
3288 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3289 others to aborts.
3290 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3291 abort.
3292 (elf_i386_size_dynamic_sections): Likewise.
3293 (elf_i386_finish_dynamic_symbol): Likewise.
3294 (elf_i386_finish_dynamic_sections): Likewise.
3295 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3296 handling code.
3297
3298 Avoid creating COPY relocs if possible.
3299 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3300 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3301 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3302 reloc is in a read-only section. Instead, allocate space for a
3303 dynamic reloc to reference the library symbol directly. Keep
3304 track of space we allocate using pcrel_relocs_copied.
3305 (discard_copies): Delete, and move code to ..
3306 (allocate_plt_and_got): ..here. Rename to
3307 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3308 relocs for non-shared link.
3309 (elf_i386_size_dynamic_sections): Update calls to above functions.
3310 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3311 more ugly logic to avoid "unresolvable relocation" error. Use
3312 htab shortcut in place of elf_hash_table macro.
3313 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3314 not always be created now.
3315
3316 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3317
3318 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3319 shared libraries.
3320
3321 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3322
3323 * configure.host (mips64-*-linux): Reformat.
3324
3325 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3326
3327 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3328 allocate local .got space. Use shortcuts from hash table for .got
3329 and .plt rather than comparing section names.
3330 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3331 adjusting index into local_got_refcounts to document what we are
3332 really doing.
3333 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3334 Tidy .got and .plt error checking.
3335
3336 2001-06-20 Catherine Moore <clm@redhat.com>
3337
3338 * elf-bfd.h (struct elf_backend_data):
3339 elf_backend_emit_relocs: New field: Function for emitting
3340 relocs.
3341 elf_backend_count_relocs: New field: Function for determining
3342 the number of relocs to be emitted.
3343 * elfxx-target.h: Provide default (NULL) values for
3344 elf_backend_emit_relocs and elf_backend_count_relocs.
3345 * elflink.h (elf_link_size_reloc_section): Make the hash table
3346 big enough to hold the relocs counted by either reloc_count or
3347 o->reloc_count.
3348 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3349 should be emitted, either because of a command line option
3350 stored in the info structure or because the target provides a
3351 special reloc emitting function.
3352 If the target provides a reloc counting function use it,
3353 unless performing a relocatable link or emitting all relocs.
3354 Also set the SEC_RELOC flag on any output section which will
3355 contain relocs.
3356 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3357 should be emitted, either because of a command line option
3358 stored in the info structure or because the target provides a
3359 special reloc emitting function.
3360 If the target provides a reloc emitting function, use it,
3361 unless performing a relocatable link or emitting all relocs.
3362
3363 2001-06-20 H.J. Lu <hjl@gnu.org>
3364
3365 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3366 allocate local .got space.
3367
3368 2001-06-19 Andreas Jaeger <aj@suse.de>
3369
3370 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3371 dynamic symbols.
3372
3373 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3374
3375 * elflink.h (struct elf_assign_sym_version_info): Remove member
3376 export_dynamic. All users changed to use info member.
3377 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3378 export_dynamic, instead use member in parameter info.
3379 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3380 bfd_elf64_size_dynamic_sections): Update prototype.
3381 * bfd-in2.h: Regenerate.
3382
3383 2001-06-18 H.J. Lu <hjl@gnu.org>
3384
3385 * elflink.h (elf_info_failed): Add a new field, verdefs.
3386 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3387 elf_export_symbol.
3388 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3389 should be exported.
3390
3391 2001-06-17 H.J. Lu <hjl@gnu.org>
3392
3393 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3394 readonly_reloc, to record if a relocation in the .rel.dyn
3395 section is against a read-only section.
3396 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3397 field to false.
3398 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3399 in the .rel.dyn section against a read-only section by setting
3400 DF_TEXTREL or readonly_reloc.
3401 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3402 it is true.
3403 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3404 there is a relocation in the .rel.dyn section against a
3405 read-only section.
3406 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3407 DF_TEXTREL is set.
3408
3409 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3410
3411 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3412 function. Move flagword result into parameter list. Remove
3413 comment about setting bfd_error_handler to intercept failure
3414 results.
3415 * coffgen.c (make_a_section_from_file): Examine result of
3416 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3417 caller.
3418 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3419 function. Move flagword result into parameter list.
3420 * libcoff.h: Regenerate.
3421 * libecoff.h: Regenerate.
3422
3423 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3424
3425 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3426 section is going to follow it.
3427
3428 2001-06-12 Catherine Moore <clm@redhat.com>
3429
3430 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3431 with the file_align entry from elf_backend_data.
3432 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3433 (elf_gc_record_vtentry): Likewise.
3434
3435 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3436
3437 * elflink.h: Whitespace changes.
3438 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3439 rather than "unsigned char".
3440 (elf_link_output_relocs): Likewise.
3441 (elf_link_input_bfd): Likewise.
3442 (elf_reloc_link_order): LIkewise.
3443 * elf.c: s/CONST/const/. Whitespace changes.
3444 * elf32-mips.c: Formatting fix.
3445
3446 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3447 * Makefile.in: Regenerate.
3448 * po/Make-in: Remove trailing tab.
3449
3450 2001-06-09 Philip Blundell <philb@gnu.org>
3451
3452 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3453 change.
3454 (elf32_arm_plt_entry): Likewise.
3455
3456 2001-06-08 H.J. Lu <hjl@gnu.org>
3457
3458 * elf.c (swap_out_syms): Keep names for global section symbols.
3459
3460 2001-06-07 H.J. Lu <hjl@gnu.org>
3461
3462 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3463 MIPS-based machines need it.
3464
3465 2001-06-07 H.J. Lu <hjl@gnu.org>
3466
3467 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3468 for SGI only.
3469
3470 * config.bfd: Remove ecoff from Linux/mips.
3471
3472 2001-06-07 Andreas Jaeger <aj@suse.de>
3473
3474 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3475 assertion.
3476 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3477 alignment of 8 for .rela sections; handle further relocations.
3478
3479 2001-06-06 Christian Groessler <cpg@aladdin.de>
3480
3481 * coff-z8k.c: Fix formatting.
3482 Fix howtos: howto->size was always 1.
3483
3484 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3485
3486 * configure.host (mips64*-*-linux*): Define.
3487
3488 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3489
3490 * elf32-i386.c (elf_i386_discard_copies): Rename to
3491 discard_copies, and use elf_link_hash_entry arg rather than
3492 elf_i386_link_hash_entry.
3493 (elf_i386_link_hash_traverse): Delete.
3494 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3495 Tidy sizing of dynamic sections.
3496 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3497 possible .plt entries.
3498 (elf_i386_gc_sweep_hook): Likewise.
3499 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3500 everything with plt.refcount <= 0.
3501
3502 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3503 .relgot space here.
3504 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3505 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3506 .rel.plt here..
3507 (allocate_plt_and_got): ..instead do it all here. New function.
3508 (elf_i386_size_dynamic_sections): Allocate local .got space and
3509 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3510 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3511 rather than gc variety).
3512 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3513 (elf_i386_relocate_section): Use it here and correct handling of
3514 R_386_GOT32. Provide section and offset for "unresolvable
3515 relocation" error message.
3516 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3517
3518 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3519 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3520 (elf_i386_link_hash_table_create): Init them.
3521 (create_got_section): New function.
3522 (elf_i386_create_dynamic_sections): New function.
3523 (elf_backend_create_dynamic_sections): Set to above.
3524 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3525 calling bfd_get_section_by_name.
3526 (elf_i386_gc_sweep_hook): Likewise.
3527 (elf_i386_adjust_dynamic_symbol): Likewise.
3528 (elf_i386_size_dynamic_sections): Likewise.
3529 (elf_i386_relocate_section): Likewise.
3530 (elf_i386_finish_dynamic_sections): Likewise.
3531
3532 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3533
3534 2001-06-02 H.J. Lu <hjl@gnu.org>
3535
3536 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3537 and ELFOSABI_HPUX.
3538 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3539
3540 2001-06-02 H.J. Lu <hjl@gnu.org>
3541
3542 * aout-cris.c (MACHTYPE_OK): New. Defined.
3543
3544 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3545
3546 * section.c (_bfd_strip_section_from_output): Handle NULL
3547 output_section.
3548
3549 2001-06-02 H.J. Lu <hjl@gnu.org>
3550
3551 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3552 rs6000coff64_vec only if BFD64 is defined.
3553 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3554
3555 2001-06-02 H.J. Lu <hjl@gnu.org>
3556
3557 * coff-ia64.c (ia64coff_object_p): Rewrite with
3558 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3559
3560 2001-06-01 Andreas Jaeger <aj@suse.de>
3561
3562 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3563 relocation, small reformatting.
3564
3565 2001-05-29 Andreas Jaeger <aj@suse.de>
3566
3567 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3568 (elf64_x86_64_relocate_section): Likewise.
3569
3570 2001-05-30 Alan Modra <amodra@one.net.au>
3571
3572 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3573 millicode. Don't allocate .got and .rela.got space here..
3574 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3575 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3576 .rela.plt here..
3577 (hppa_handle_PIC_calls): ..nor here..
3578 (allocate_plt_and_got): ..instead do it all here. New function.
3579 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3580 call allocate_plt_and_got. No need to zap .got if not dynamic.
3581 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3582 gc_common_final_link.
3583 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3584 (elf32_hppa_relocate_section): Use it here.
3585 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3586 dynamic_sections_created.
3587 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3588
3589 2001-05-28 Andreas Jaeger <aj@suse.de>
3590
3591 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3592 generic version since we want a hashsize of 4.
3593 (elf_backend_size_info): Likewise.
3594
3595 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3596
3597 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3598 a zeroing loop.
3599 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3600 (elf_link_input_bfd): Likewise.
3601 (elf_reloc_link_order): Likewise.
3602 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3603 relocations correctly.
3604
3605 2001-05-28 Nicolas Pitre <nico@cam.org>
3606
3607 * elf32-arm.h: fix PLT generation for big endian ARM
3608
3609 2001-05-28 Alan Modra <amodra@one.net.au>
3610
3611 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3612 for symbols forced local that need plabels.
3613 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3614 .plt.rela for local syms if non-shared.
3615 (hppa_build_one_stub): Mask lsb of plt.offset.
3616 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3617 (clobber_millicode_symbols): Correct comment.
3618 (elf32_hppa_relocate_section): Likewise.
3619 (elf32_hppa_finish_dynamic_symbol): Likewise.
3620
3621 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3622
3623 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3624 * bfd-in2.h: Regenerate.
3625 * libbfd.h: Regenerate.
3626 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3627 and BFD_RELOC_SPARC_UA64 mapping
3628 * elf64-sparc.c: Likewise.
3629
3630 2001-05-25 H.J. Lu <hjl@gnu.org>
3631
3632 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3633 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3634 (coff-rs6000.lo): Remove the old dependency.
3635 * Makefile.in: Rebuild.
3636
3637 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3638 coff-rs6000.lo.
3639
3640 2001-05-25 H.J. Lu <hjl@gnu.org>
3641
3642 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3643 rs6000coff_core_file_matches_executable_p,
3644 rs6000coff_core_file_failing_command and
3645 rs6000coff_core_file_failing_signal only if AIX_CORE is
3646 defined.
3647 (pmac_xcoff_vec): Likewise.
3648 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3649
3650 2001-05-25 Timothy Wall <twall@redhat.com>
3651
3652 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3653 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3654
3655 2001-05-25 H.J. Lu <hjl@gnu.org>
3656
3657 * bfd-in2.h: Regenerated.
3658 * libcoff.h: Likewise.
3659
3660 2001-05-25 Alan Modra <amodra@one.net.au>
3661
3662 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3663 undefined millicode syms in shared libs.
3664 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3665 (elf32_hppa_check_relocs): Likewise.
3666 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3667 (elf32_hppa_size_dynamic_sections): Likewise.
3668 (elf32_hppa_relocate_section): Likewise.
3669 (elf32_hppa_finish_dynamic_symbol): Likewise.
3670 (elf32_hppa_finish_dynamic_sections): Likewise.
3671
3672 2001-05-24 Tom Rix <trix@redhat.com>
3673
3674 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3675 xcoff-target.h not used to define rs6000 or ppc bfd.
3676 * Makefile.in same
3677
3678 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3679 to 64 bit.
3680
3681 * coff-rs6000.c : Many changes for 64 bit support. Move common
3682 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3683 and pmac_xcoff_vec
3684
3685 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3686 linker now supported. Explictly define the rs6000coff64_vec.
3687
3688 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3689 (coff_print_aux) same
3690 (coff_write_object_contents) same
3691 (coff_slurp_line_table) same
3692
3693 * coffgen.c : (coff_fix_symbol_name) formatting
3694 (coff_mangle_symbols) xcoff 64 bit support
3695 (coff_write_symbol) same
3696 (coff_write_alien_symbol) same
3697 (coff_write_native_symbol) same
3698 (coff_write_symbols) same
3699 (coff_get_symbol_info) same
3700 (bfd_coff_get_syment) same
3701 (coff_print_symbol) same
3702
3703 * config.bfd : add powerpc64-*-aix* target
3704
3705 * libcoff-in.h : formatting
3706
3707 * libcoff.h : move xcoff extern declarations to libxcoff.h
3708
3709 * libxcoff.h : New file
3710
3711 * xcofflink.c : Many changes for xcoff64 support. Move common
3712 structures to include/coff/xcoff.h. Move specific structure to
3713 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3714 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3715
3716 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3717 aix4.2+ -binitfini.
3718
3719 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3720
3721 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3722
3723 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3724 s/ENTIRES/ENTRIES/.
3725
3726 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3727
3728 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3729 * libbfd.h: Regenerate.
3730 * bfd-in2.h: Regenerate.
3731
3732 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3733 * archures.c (bfd_mach_mips12000): Define.
3734 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3735 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3736 support.
3737 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3738 * bfd-in2.h: Regenerate.
3739 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3740
3741 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3742
3743 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3744 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3745 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3746 that is used by GCC.
3747
3748 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3749
3750 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3751 of entries in a structured section.
3752 * elf.c: Use new macro.
3753 * elf32-i386.c: Use new macro.
3754 * elf32-mips.c: Use new macro.
3755 * elf64-alpha.c: Use new macro.
3756 * elf64-sparc.c: Use new macro.
3757 * elfcode.h: Use new macro.
3758 * elflink.h: Use new macro.
3759
3760 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3761
3762 * bfdint.texi: Replace -oformat with --oformat.
3763
3764 2001-05-21 Andreas Jaeger <aj@suse.de>
3765
3766 * dwarf2.c (decode_line_info): Fix error message.
3767 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3768 adjust error message.
3769
3770 2001-05-18 H.J. Lu <hjl@gnu.org>
3771
3772 * elflink.h (elf_link_add_object_symbols): Revert the last
3773 change.
3774
3775 2001-05-17 Alan Modra <amodra@one.net.au>
3776
3777 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3778 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3779 (hppa_build_one_stub): Add an assert to check plt.offset.
3780
3781 2001-05-17 H.J. Lu <hjl@gnu.org>
3782
3783 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3784 version definition to basename of the output filename.
3785
3786 2001-05-17 H.J. Lu <hjl@gnu.org>
3787
3788 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3789 basename of the bfd filename.
3790
3791 2001-05-16 Alan Modra <amodra@one.net.au>
3792
3793 * section.c (asection): Add linker_has_input field.
3794 (STD_SECTION): Adjust initialization to suit.
3795 * ecoff.c (bfd_debug_section): Likewise.
3796 * bfd-in2.h: Regenerate.
3797
3798 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3799
3800 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3801 negative 32-bit operands to 16 operands when the operand is
3802 going to be zero-extended by the modified opcode.
3803
3804 2001-05-12 Peter Targett <peter.targett@arccores.com>
3805
3806 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3807 name for 'arc5' core versions.
3808 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3809
3810 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3811 architecture.
3812 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3813
3814 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3815
3816 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3817 sections as well.
3818 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3819 to .gnu.linkonce.t.FOO text section.
3820
3821 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3822
3823 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3824 fields, change sec into secinfo.
3825 (struct sec_merge_info): Add chain, remove last fields.
3826 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3827 (sec_merge_hash_lookup): If lookup could not use a string only
3828 because it has bad alignment, mark the old string for deletion.
3829 (sec_merge_add): Add secinfo argument. Don't compute entry's
3830 position, instead record the section.
3831 (sec_merge_emit): Update for the sec into secinfo change in
3832 struct sec_merge_hash_entry.
3833 (_bfd_merge_section): Only record the section for merging, defer
3834 putting strings into the hash table.
3835 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3836 _bfd_merge_sections): New functions.
3837 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3838 changes.
3839 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3840 (_bfd_nolink_bfd_merge_sections): Define.
3841 * libbfd.h: Likewise.
3842 (bfd_generic_merge_sections): Add prototype.
3843 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3844 (struct bfd_target): Likewise.
3845 * bfd.c (bfd_merge_sections): Define.
3846 * bfd-in2.h: Rebuilt.
3847 * elf.c (_bfd_elf_merge_sections): New function.
3848 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3849 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3850 * reloc.c (bfd_generic_merge_sections): New function.
3851 * vms.c (vms_bfd_merge_sections): New function.
3852 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3853 * aout-target.h (MY_bfd_merge_sections): Define.
3854 * aout-tic30.c (MY_bfd_merge_sections): Define.
3855 * binary.c (binary_bfd_merge_sections): Define.
3856 * bout.c (b_out_bfd_merge_sections): Define.
3857 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3858 * coffcode.c (coff_bfd_merge_sections): Define.
3859 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3860 * i386msdos.c (msdos_bfd_merge_sections): Define.
3861 * i386os9k.c (os9k_bfd_merge_sections): Define.
3862 * ieee.c (ieee_bfd_merge_sections): Define.
3863 * ihex.c (ihex_bfd_merge_sections): Define.
3864 * nlm-target.h (nlm_bfd_merge_sections): Define.
3865 * oasys.c (oasys_bfd_merge_sections): Define.
3866 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3867 * som.c (som_bfd_merge_sections): Define.
3868 * srec.c (srec_bfd_merge_sections): Define.
3869 * tekhex.c (tekhex_bfd_merge_sections): Define.
3870 * versados.c (versados_bfd_merge_sections): Define.
3871 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3872
3873 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3874
3875 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3876 to be unsigned long, in order to match its use.
3877
3878 2001-05-10 H.J. Lu <hjl@gnu.org>
3879
3880 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3881 indirect symbols.
3882
3883 2001-05-09 H.J. Lu <hjl@gnu.org>
3884
3885 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3886 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3887 Remove the unused veriable `dynver'.
3888
3889 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3890
3891 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3892 NULL or is not COFF.
3893 (coff_i386_rtype_to_howto): Don't dump core if output section
3894 owner is not COFF.
3895
3896 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3897
3898 * ecoff.c (bfd_debug_section): Fix initialization.
3899 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3900 is always a positive integer. Cast away sign mismatch.
3901 * elf32-mips.c: Fix misleading comment and typo.
3902 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3903 correct data type.
3904 * elflink.c: Fix typo.
3905 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3906 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3907
3908 2001-05-04 Richard Henderson <rth@redhat.com>
3909
3910 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3911
3912 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3913
3914 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3915 EF_ARM_HASENTRY if the start address is set.
3916
3917 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3918
3919 * targets.c (_bfd_target_vector_entries): Compute value based on
3920 the size of the _bfd_target_vector and not bfd_target_vector.
3921
3922 2001-05-03 H.J. Lu <hjl@gnu.org>
3923
3924 * elfcode.h: Include "libiberty.h".
3925
3926 * elflink.h (elf_link_add_object_symbols): Set
3927 elf_dt_name (abfd) to basename of the bfd filename.
3928 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3929 of the bfd filename.
3930
3931 2001-05-03 Andreas Jaeger <aj@suse.de>
3932
3933 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3934 (elf_generic_info_to_howto_rel): Likewise.
3935 * coff-alpha.c (reloc_nil): Likewise.
3936 (alpha_ecoff_bad_format_hook): Likewise.
3937 (alpha_adjust_reloc_out): Likewise.
3938 (alpha_bfd_reloc_type_lookup): Likewise.
3939 (alpha_convert_external_reloc): Likewise.
3940 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3941 (elf64_alpha_reloc_bad): Likewise.
3942 (elf64_alpha_reloc_gpdisp): Likewise.
3943 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3944 (elf64_alpha_info_to_howto): Likewise.
3945 (elf64_alpha_add_symbol_hook): Likewise.
3946 (elf64_alpha_create_got_section): Likewise.
3947 (elf64_alpha_is_local_label_name): Likewise.
3948 (elf64_alpha_merge_ind_symbols): Likewise.
3949 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3950 (mips_elf64_get_reloc_upper_bound): Likewise.
3951 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3952 (nlm_alpha_get_public_offset): Likewise.
3953
3954 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3955
3956 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3957 about overflow in R_OPENRISC_LO_16_IN_INSN and
3958 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3959
3960 2001-04-30 H.J. Lu <hjl@gnu.org>
3961
3962 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3963 only for ELF_LINK_FORCED_LOCAL.
3964 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3965 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3966 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3967
3968 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3969 if the symbol has hidden or internal visibility.
3970
3971 2001-04-30 Alan Modra <amodra@one.net.au>
3972
3973 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3974 calls to undefined weak symbols.
3975
3976 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3977
3978 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3979 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3980
3981 2001-04-27 Andreas Jaeger <aj@suse.de>
3982
3983 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3984 out handled entries.
3985 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3986 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3987 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3988 GOT32.
3989
3990 2001-04-27 Sean McNeil <sean@mcneil.com>
3991
3992 * config.bfd: Add arm-vxworks target.
3993 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3994 addend (fro VXworks targets).
3995
3996 2001-04-26 H.J. Lu <hjl@gnu.org>
3997
3998 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3999 valid.
4000
4001 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
4002
4003 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4004 * bfd-in2.h: Regenerated.
4005
4006 2001-04-24 Jakub Jelinek <jakub@redhat.com>
4007
4008 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4009 (struct sec_merge_hash): Remove alignment_power.
4010 (sec_merge_hash_newfunc): Clear alignment.
4011 (sec_merge_hash_lookup): Pass alignment as argument.
4012 Use hashp->root.next, not hashp->next to walk the hash chain.
4013 If a string already in the hashtable does not have required
4014 alignment, create a new hashtable entry.
4015 (sec_merge_init): Remove alignment_power argument.
4016 (sec_merge_add): Add alignment argument.
4017 (sec_merge_emit): Alignment is now a per-entity thing, not per
4018 section.
4019 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4020 for proper alignment.
4021 Pass alignment information to sec_merge_add.
4022
4023 2001-04-24 Christian Groessler <cpg@aladdin.de>
4024
4025 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4026 and R_REL16 reloc types; accept odd values for R_REL16 type
4027
4028 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4029
4030 * cpu-openrisc.c: New file.
4031 * elf32-openrisc.c: Likewise.
4032
4033 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4034 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4035 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4036 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4037 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4038 * Makefile.in: Regenerated.
4039 * config.bfd: (openrisc-*-elf): New target.
4040 * configure.in (bfd_elf32_openrisc_vec): New vector.
4041 * configure: Regenerated.
4042 * libbfd.h: Regenerated.
4043 * bfd-in2.h: Regenerated.
4044 * reloc.c: Add OpenRISC relocations.
4045 * targets.c (bfd_elf32_openrisc_vec): Declare.
4046 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4047 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4048 (bfd_openrisc_arch): Declare.
4049 (bfd_archures_list): Add bfd_openrisc_arch.
4050 * elf.c (prep_headers): Add bfd_arch_openrisc.
4051
4052 2001-04-23 Bo Thorsen <bo@suse.de>
4053
4054 * elf64-x86-64.c: Add c++ vtable hack.
4055 Small whitespace and comment changes.
4056
4057 2001-04-19 Andreas Jaeger <aj@suse.de>
4058
4059 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4060 (elf64_x86_64_plt_entry): Likewise.
4061 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4062 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4063
4064 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4065
4066 * elf32-cris.c: Tweak comments related to dynamic linking.
4067 (cris_elf_relocate_section): When not creating shared object, fill
4068 in the .got table for any symbol not in the dynamic symbol table.
4069 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4070 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4071 table.
4072 (cris_elf_check_relocs): Use variable r_type in all places rather
4073 than the original expression. Add default case in switch for
4074 reloc types.
4075 (elf_cris_size_dynamic_sections): Iterate over
4076 elf_cris_discard_excess_program_dynamics when not creating shared
4077 library.
4078 (elf_cris_discard_excess_dso_dynamics): Renamed from
4079 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4080 (elf_cris_discard_excess_program_dynamics): New.
4081
4082 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4083
4084 * coffcode.h (coff_write_object_contents): Use
4085 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4086
4087 2001-04-14 H.J. Lu <hjl@gnu.org>
4088
4089 * bfd-in2.h: Regenerate.
4090
4091 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4092
4093 * section.c (STD_SECTION): Add entsize.
4094
4095 2001-04-13 H.J. Lu <hjl@gnu.org>
4096
4097 * section.c (SEC_MERGE): Define new flag for merging.
4098 (SEC_STRINGS): Likewise.
4099 (entsize): New field.
4100
4101 2001-04-13 Roger Sayle <roger@metaphorics.com>
4102
4103 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4104 flag on pe-i386 targets.
4105
4106 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4107
4108 * libbfd-in.h (_bfd_merge_section): New.
4109 (_bfd_write_merged_section): New.
4110 (_bfd_merged_section_offset): New.
4111 * libbfd.h: Rebuilt.
4112 * linker.c (_bfd_generic_link_output_symbols): Handle
4113 discard_sec_merge.
4114 * aoutx.h (aout_link_write_symbols): Likewise.
4115 * pdp11.c (aout_link_write_symbols): Likewise.
4116 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4117 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4118 sections.
4119 (elf_link_sec_merge_syms): New.
4120 (elf_link_input_bfd): Call _bfd_merged_section_offset
4121 and _bfd_write_merged_section.
4122 Handle discard_sec_merge.
4123 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4124 field.
4125 (struct bfd_elf_section_data): Likewise.
4126 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4127 SEC_STRINGS section flags and entsize from their ELF counterparts.
4128 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4129 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4130 from their BFD counterparts.
4131 * merge.c: New file.
4132 * Makefile.am: Add strtab.lo.
4133 * Makefile.in: Rebuilt.
4134
4135 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4136
4137 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4138 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4139
4140 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4141
4142 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4143 endian MIPS ELF target.
4144 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4145 MIPS ELF target.
4146
4147 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4148 64bit big endian MIPS ELF target.
4149 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4150 endian MIPS ELF target.
4151 * configure: Regenerated.
4152
4153 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4154 little endian targets.
4155 (mips_elf_sym_is_global): Handle traditional targets.
4156
4157 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4158 64bit big endian MIPS ELF target.
4159 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4160 endian MIPS ELF target.
4161
4162 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4163 and bfd_elf64_tradlittlemips_vec.
4164
4165 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4166
4167 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4168 ordinary "progbits" section.
4169
4170 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4171
4172 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4173 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4174
4175 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4176
4177 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4178
4179 2001-03-30 H.J. Lu <hjl@gnu.org>
4180
4181 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4182 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4183
4184 2001-03-26 H.J. Lu <hjl@gnu.org>
4185
4186 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4187 if there are any relocations for generic ELF.
4188 (bfd_elf32_bfd_link_add_symbols): Defined to
4189 elf32_generic_link_add_symbols.
4190 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4191 if there are any relocations for generic ELF.
4192 (bfd_elf64_bfd_link_add_symbols): Defined to
4193 elf64_generic_link_add_symbols.
4194
4195 2001-03-23 Nick Clifton <nickc@redhat.com>
4196
4197 * Makefile.am (BUILD_CFILES): New variable: List of C source
4198 files created in build directory.
4199 (BUILD_HFILES): New variable: List of header files created in
4200 build directory.
4201 (POTFILES): Delete.
4202 (po/POTFILES.in): Replace rule with empty entry.
4203 (po/SRC-POTFILES.in): New rule: Create a list of source files
4204 in the source directory.
4205 (po/BLD-POTFILES.in): New rule: Create a list of source files
4206 in the build directory.
4207 (MOSTLYCLEAN): Do not delete source files created in build
4208 directory.
4209 * Makefile.in: Regenerate.
4210 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4211 into po/Makefile.
4212 * configure: Regenerate.
4213
4214 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4215 and BLD_POTFILES.
4216 Add .. to the search path when building bfd.pot.
4217 Delete POTFILES when performing distclean.
4218 Add comment describing why distclean is broken in maintainer mode.
4219 * po/POTFILES.in: Delete.
4220 * po/SRC-POTFILES.in: New file.
4221 * po/BLD-POTFILES.in: New file.
4222 * po/bfd.pot: Regenerate.
4223
4224 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4225
4226 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4227 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4228 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4229 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4230 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4231 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4232 functions.
4233 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4234 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4235 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4236 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4237 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4238 New HOWTO members for new relocs.
4239 (cris_reloc_map): Map new relocs.
4240 (ELF_DYNAMIC_INTERPRETER): Define.
4241 (PLT_ENTRY_SIZE): Define.
4242 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4243 elf_cris_pic_plt_entry): New, PLT templates.
4244 (struct elf_cris_pcrel_relocs_copied, struct
4245 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4246 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4247 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4248 positive values. Adjust PCREL relocs to be relative to location
4249 after relocation.
4250 (cris_elf_relocate_section): Handle relocations to dynamic
4251 objects. Handle new relocations. Call error handler when seeing
4252 non-PIC relocation for read-only sections while generating shared
4253 object.
4254 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4255 entries.
4256 (bfd_elf32_bfd_link_hash_table_create,
4257 elf_backend_adjust_dynamic_symbol,
4258 elf_backend_size_dynamic_sections,
4259 elf_backend_finish_dynamic_symbol,
4260 elf_backend_finish_dynamic_sections,
4261 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4262 elf_backend_hide_symbol, elf_backend_want_got_plt,
4263 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4264 elf_backend_got_header_size, elf_backend_plt_header_size):
4265 Define.
4266
4267 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4268 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4269 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4270 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4271 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4272 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4273 * bfd-in2.h, libbfd.h: Regenerate.
4274
4275 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4276
4277 (_bfd_mips_elf_relocate_section): Give a better error message when
4278 a relocation is not recognized.
4279
4280 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4281
4282 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4283 non-NULL before attempting to dereference.
4284
4285 2001-03-20 H.J. Lu <hjl@gnu.org>
4286
4287 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4288 * configure: Rebuild.
4289
4290 2001-03-20 Andreas Schwab <schwab@suse.de>
4291
4292 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4293 relocation value when resolving a reference from a debugging
4294 section.
4295
4296 2001-03-16 Scott Thomason <SThomaso@hii.com>
4297
4298 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4299 (xcoff64_swap_sym_out): Fix syntax errors.
4300
4301 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4302
4303 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4304
4305 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4306
4307 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4308 (hppa_link_hash_newfunc): Init it.
4309 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4310 section appears to be non-PIC.
4311 (final_link_relocate): Likewise.
4312 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4313 possible candidate function, and set pic_call for those that will
4314 only have a .plt entry for the PIC call stub.
4315 (hppa_handle_PIC_calls): Set maybe_pic_call.
4316
4317 2001-03-12 DJ Delorie <dj@redhat.com>
4318
4319 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4320 R_SH_DIR8WP* relocs if they're against external symbols, else
4321 they're just for relaxing. Validate the reloc values.
4322
4323 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4324
4325 * binary.c (bfd_external_binary_architecture): Declare.
4326 (binary_object_p): If bfd_external_binary_architecture is defined,
4327 set the architecture to this string.
4328
4329 2001-03-11 Philip Blundell <philb@gnu.org>
4330
4331 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4332 entries that could serve as a definition for a weak symbol.
4333
4334 2001-03-08 Nick Clifton <nickc@redhat.com>
4335
4336 * Most files: Update copyright notices using Perl script created
4337 by Kevin Buettner <kevinb@redhat.com>.
4338
4339 2001-03-07 Nick Clifton <nickc@redhat.com>
4340
4341 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4342 prior patch on ! defined OLD_ARM_ABI.
4343
4344 2001-03-07 Andreas Jaeger <aj@suse.de>
4345
4346 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4347 some relocation values.
4348
4349 2001-03-06 Nick Clifton <nickc@redhat.com>
4350
4351 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4352 of offset in BLX(1) instruction.
4353 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4354 offset in BLX(1) instruction.
4355 Fix formatting.
4356
4357 2001-03-06 Nick Clifton <nickc@redhat.com>
4358
4359 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4360 BFD_RELOC_THUMB_PCREL_BLX.
4361
4362 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4363
4364 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4365 * bfd-in2.h: Regenerate.
4366 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4367 * ieee.c (ieee_write_processor): Set proper id for
4368 Coldfire CPUs.
4369
4370 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4371
4372 * configure.in: Add s390 target.
4373 * configure: Regenerate.
4374
4375 2001-02-28 Andreas Jaeger <aj@suse.de>
4376
4377 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4378 to addend.
4379
4380 2001-02-28 Philip Blundell <pb@futuretv.com>
4381
4382 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4383 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4384
4385 2001-02-27 H.J. Lu <hjl@gnu.org>
4386
4387 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4388 abfd->tdata.aout_data == NULL.
4389
4390 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4391
4392 * elf32-hppa.c: Correct field selector in stub comments.
4393 (clobber_millicode_symbols): Formatting fix.
4394
4395 * configure.in: Bump version to 2.11.90.
4396 * configure: Regenerate.
4397 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4398 (CFILES): $SOURCE_CFILES + generated C files.
4399 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4400 Run "make dep-am"
4401 * Makefile.in: Regenerate.
4402 * doc/Makefile.in: This too.
4403
4404 2001-02-26 Timothy Wall <twall@cygnus.com>
4405
4406 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4407 comments.
4408
4409 2001-02-26 Nick Clifton <nickc@redhat.com>
4410
4411 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4412 up, replacing multiple if statements with a switch.
4413 (handle_COMDAT): New function.
4414
4415 2001-02-26 H.J. Lu <hjl@gnu.org>
4416
4417 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4418 a warning for section flags we do not handle instead of
4419 aborting.
4420
4421 2001-02-26 Andreas Jaeger <aj@suse.de>
4422
4423 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4424
4425 2001-02-22 Timothy Wall <twall@cygnus.com>
4426
4427 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4428 * configure.in: Add objects for elf64_ia64_aix vectors.
4429 * configure: Regenerated.
4430 * configure.host: Recognize ia64-*-aix*.
4431 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4432 for AIX. AIX5 requires most relocations to be dynamic (*all*
4433 binaries are somewhat similar to shared libraries).
4434 * targets.c: Add elf64_ia64_aix vectors.
4435
4436 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4437
4438 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4439 C8 said "1" instead of "8". Clarify error string for IMM22:
4440 "signed integer" instead of just "integer".
4441
4442 2001-02-20 Andreas Jaeger <aj@suse.de>
4443
4444 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4445 PLT entries that could serve as a definition for a weak symbol.
4446
4447 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4448
4449 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4450 entries that could serve as a definition for a weak symbol.
4451 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4452
4453 2001-02-18 David O'Brien <obrien@FreeBSD>
4454
4455 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4456 FreeBSD/i386-CURRENT differently until I can figure out the needed
4457 corefile changes.
4458 * configure: Regenerate.
4459 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4460 FreeBSD/PowerPC, and FreeBSD/sparc64.
4461
4462 2001-02-18 lars brinkhoff <lars@nocrew.org>
4463
4464 * Makefile.am: Add PDP-11 a.out target.
4465 * config.bfd: Likewise.
4466 * configure.in: Likewise.
4467 * targets.c: Likewise.
4468 * archures.c: Likewise.
4469 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4470 * libbfd.h: Add PDP-11 relocations.
4471 * reloc.c: Likewise.
4472 * cpu-pdp11.c: New file.
4473 * pdp11.c: New file.
4474
4475 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4476 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4477 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4478 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4479 (GET_MAGIC): New macro.
4480 (PUT_MAGIC): Likewise.
4481 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4482
4483 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4484
4485 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4486 multiarch needs it).
4487
4488 2001-02-18 H.J. Lu <hjl@gnu.org>
4489
4490 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4491 index.
4492
4493 2001-02-18 Kazu Hirata <kazu@hxi.com>
4494
4495 * vms-misc.c: Fix formatting.
4496
4497 2001-02-16 Kazu Hirata <kazu@hxi.com>
4498
4499 * vms.c: Fix formatting.
4500
4501 2001-02-14 H.J. Lu <hjl@gnu.org>
4502
4503 * elf.c (elf_find_function): New function.
4504 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4505 the file name and function name.
4506
4507 2001-02-14 Nick Clifton <nickc@redhat.com>
4508
4509 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4510 asection structure.
4511
4512 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4513 (BFD64_BACKENDS): Add pepigen.c
4514 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4515
4516 * Makefile.in: Regenerate.
4517 * configure: Regenerate.
4518 * po/POTFILES.in: Regenerate.
4519 * po/bfd.pot: Regenerate.
4520
4521 2001-02-14 H.J. Lu <hjl@gnu.org>
4522
4523 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4524 force_minimum_alignment.
4525
4526 2001-02-14 Bo Thorsen <bo@suse.de>
4527
4528 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4529 (elf64_86_64_size_info): Struct added to fix a problem
4530 with the hashtable string entries.
4531 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4532 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4533 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4534 remove the FIXME for this.
4535 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4536 section. Also removed the FIXME for it.
4537 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4538 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4539 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4540
4541 2001-02-13 Richard Henderson <rth@redhat.com>
4542
4543 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4544 and not user provided.
4545
4546 2001-02-13 Kazu Hirata <kazu@hxi.com>
4547
4548 * vms.c (vms_print_symbol): Remove unreachable code.
4549
4550 * rs6000-core.c: Fix formatting.
4551
4552 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4553
4554 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4555 as _bfd_XXi_only_swap_filehdr_out.
4556 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4557 pe->force_minimum_alignment to TRUE.
4558 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4559 PEI_TARGET_SUBSYSTEM.
4560 (pe_print_private_bfd_data): Call
4561 _bfd_XX_print_private_bfd_data_common() instead of
4562 _bfd_pe_print_private_bfd_data_common().
4563 (pe_bfd_copy_private_bfd_data): Call
4564 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4565 _bfd_pe_bfd_copy_private_bfd_data_common().
4566 (coff_bfd_copy_private_section_data): Define as
4567 _bfd_XX_bfd_copy_private_section_data instead of
4568 _bfd_pe_bfd_copy_private_section_data.
4569 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4570 of a _bfd_pe_get_symbol_info.
4571
4572 * peigen.c: Delete.
4573
4574 * peXXigen.c: Renamed from peigen.c.
4575 (COFF_WITH_XX): Define this macro (will get expanded into
4576 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4577 compiled as peigen.c or pepigen.c.
4578 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4579 define the canonical PEP structures and definitions.
4580 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4581 effect, enforce minimum file and section alignments. If
4582 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4583 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4584 so, by default, this is a no-op).
4585
4586 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4587 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4588 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4589 _bfd_pefoo if it's not defined. Use these macros to define
4590 coff swap macros.
4591
4592 * libcoff.h (pe_tdata): Add members target_subsystem and
4593 force_minimum_alignment.
4594
4595 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4596 COFF_WITH_pep.
4597 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4598
4599 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4600 peigen.lo.
4601
4602 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4603 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4604 PEPAOUTHDR.
4605
4606 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4607 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4608 (peigen.c): Add rule to generate from peXXigen.c.
4609 (pepigen.c): Ditto.
4610 (pepigen.lo): List dependencies for pepigen.lo.
4611
4612 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4613
4614 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4615 $global$ referenced but not defined, set its value here.
4616
4617 2001-02-09 Bo Thorsen <bo@suse.de>
4618
4619 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4620 alignment to 3.
4621 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4622 and relocation.
4623 (elf64_x86_64_relocate_section): Fix formatting.
4624 (elf64_x86_64_relocate_section): Fix addend for relocation of
4625 R_X86_64_(8|16|32|PC8|PC16|PC32).
4626
4627 2001-02-12 Jan Hubicka <jh@suse.cz>
4628
4629 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4630
4631 2001-02-11 H.J. Lu <hjl@gnu.org>
4632
4633 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4634 alignment.
4635
4636 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4637
4638 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4639 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4640 relocations against dynsym symbols.
4641
4642 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4643 the R_MIPS_26 relocation.
4644 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4645 the R_MIPS_26 relocation.
4646 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4647 relocation.
4648 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4649 the R_MIPS_26 relocation.
4650 (mips_elf64_howto_table_rela): Likewise.
4651
4652 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4653 member to mark symbols that have non-CALL relocations against
4654 them.
4655 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4656 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4657 R_MIPS_GOT16.
4658 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4659 non-CALL relocation against it is encountered.
4660 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4661 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4662 no_fn_stub is not set.
4663
4664 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4665 information from the real symbol for indirect ones.
4666 Check no_fn_stub to find out if a symbol has a function stub
4667 indeed.
4668
4669 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4670
4671 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4672 * Makefile.in: Regenerate.
4673
4674 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4675
4676 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4677 true if section name is an unwind table section name.
4678 (elfNN_ia64_additional_program_headers): Count each unwind section
4679 separately.
4680 (elfNN_ia64_modify_segment_map): Install one unwind program header
4681 for each unwind separate section. Note: normally the linker
4682 script merges the unwind sections that go into a single segment,
4683 so this still generates at most one unwind program header per
4684 segment.
4685
4686 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4687 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4688 (elfNN_ia64_fake_sections): Mark sections with names that start
4689 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4690 unwind section.
4691
4692 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4693 Use it to make sh_info in unwind section point to the text section
4694 it applies to.
4695
4696 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4697
4698 * Makefile.am: Add linux target for S/390.
4699 * archures.c: Likewise.
4700 * bfd-in2.h: Likewise.
4701 * config.bfd: Likewise.
4702 * configure.in: Likewise.
4703 * elf.c: Likewise.
4704 * libbfd.h: Likewise.
4705 * targets.c: Likewise.
4706 * cpu-s390.c: New file.
4707 * elf32-s390.c: New file.
4708 * elf64-s390.c: New file.
4709
4710 2001-02-09 Nick Clifton <nickc@redhat.com>
4711
4712 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4713 ImageBase. This has already been done by coff_swap_hdr_in.
4714
4715 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4716
4717 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4718
4719 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4720
4721 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4722 (sparc64_elf_relocate_section): Likewise.
4723
4724 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4725
4726 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4727 similar to R_SPARC_32.
4728 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4729
4730 2001-02-08 H.J. Lu <hjl@gnu.org>
4731
4732 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4733 relocation entries for weak definitions when building DSO with
4734 -Bsymbolic.
4735
4736 2001-02-08 Richard Henderson <rth@redhat.com>
4737
4738 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4739 before visibility. Locally defined protected symbols are not
4740 dynamic.
4741
4742 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4743
4744 * config.bfd: Enable coff64 for rs6000-*. Patch from
4745 <hzoli@austin.ibm.com>.
4746
4747 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4748
4749 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4750 found, do not attempt to find dwarf2 info before returning.
4751
4752 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4753
4754 * elflink.h (is_global_symbol_definition): Rename to
4755 is_global_data_symbol_definition and have it reject function
4756 symbols.
4757 (elf_link_is_defined_archive_symbol): Use renamed function.
4758
4759 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4760
4761 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4762 * libbfd.h (bfd_target_vector): Likewise.
4763 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4764 make static; create pointer reference named bfd_target_vector.
4765 (_bfd_target_vector_entries): Calculate this based on the array
4766 typed _bfd_target_vector.
4767
4768 2001-02-06 H.J. Lu <hjl@gnu.org>
4769
4770 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4771 internal symbols are not dynamic.
4772 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4773
4774 2001-02-06 Nick Clifton <nickc@redhat.com>
4775
4776 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4777 that it will not be pulled into the list of files that make up
4778 po/POTFILES.in.
4779 * Makefile.in: Regenerate.
4780 * po/bfd.pot: Regenerate.
4781
4782 2001-02-06 H.J. Lu <hjl@gnu.org>
4783
4784 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4785 checking.
4786 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4787 external_PEI_IMAGE_hdr.
4788
4789 2001-02-06 Kazu Hirata <kazu@hxi.com>
4790
4791 * elf-m10200.c: Fix formatting.
4792
4793 2001-02-04 Nick Clifton <nickc@redhat.com>
4794
4795 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4796 rel, it will be handled later on.
4797
4798 2001-02-02 Fred Fish <fnf@ninemoons.com>
4799
4800 * Makefile.in: Fix typo.
4801
4802 2001-02-01 Kazu Hirata <kazu@hxi.com>
4803
4804 * elf-m10300.c: Fix formatting.
4805
4806 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4807
4808 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4809 (elf_backend_get_symbol_type): Define.
4810 (elf64_hppa_object_p): Set architecture and machine from elf
4811 header flags.
4812
4813 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4814
4815 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4816 before mdebug.
4817
4818 2001-01-26 Richard Henderson <rth@redhat.com>
4819
4820 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4821 for non-default visibility.
4822 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4823 delete ugly macro and replace with pretty function.
4824
4825 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4826
4827 * coff-go32.c: Update copyright.
4828 * coff-stgo32.c: Likewise.
4829 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4830 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4831 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4832 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4833
4834 2001-01-25 Kazu Hirata <kazu@hxi.com>
4835
4836 * bfd-in2.h: Rebuild.
4837 * libbfd.h: Likewise.
4838
4839 2001-01-23 H.J. Lu <hjl@gnu.org>
4840
4841 * bfd-in2.h: Rebuild.
4842
4843 2001-01-23 H.J. Lu <hjl@gnu.org>
4844
4845 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4846 is NULL or PRIV(vms_rec) is outside of the buffer.
4847
4848 2001-01-23 Kazu Hirata <kazu@hxi.com>
4849
4850 * coff64-rs6000.c: Fix formatting.
4851 * coff-arm.c: Likewise.
4852 * coffgen.c: Likewise.
4853 * cofflink.c: Likewise.
4854 * coff-mcore.c: Likewise.
4855 * coff-mips.c: Likewise.
4856 * coff-pmac.c: Likewise.
4857 * coff-ppc.c: Likewise.
4858 * coff-rs6000.c: Likewise.
4859 * elf32.c: Likewise.
4860 * elf32-fr30.c: Likewise.
4861 * elf32-i370.c: Likewise.
4862 * elf32-i860.c: Likewise.
4863 * elf32-m32r.c: Likewise.
4864 * elf32-m68k.c: Likewise.
4865 * elf32-mcore.c: Likewise.
4866 * elf32-ppc.c: Likewise.
4867 * elf32-sh.c: Likewise.
4868 * elf32-v850.c: Likewise.
4869 * elf64-alpha.c: Likewise.
4870 * elf64-sparc.c: Likewise.
4871 * elflink.c: Likewise.
4872 * elflink.h: Likewise.
4873 * elf-m10200.c: Likewise.
4874 * elf-m10300.c: Likewise.
4875 * elfxx-ia64.c: Likewise.
4876
4877 * aoutx.h: Fix formatting.
4878 * bfd.c: Likewise.
4879 * bfd-in2.h: Likewise.
4880 * bfd-in.h: Likewise.
4881 * cpu-i386.c: Likewise.
4882 * cpu-m68hc11.c: Likewise.
4883 * dwarf2.c: Likewise.
4884 * elf64-x86-64.c: Likewise.
4885 * format.c: Likewise.
4886 * freebsd.h: Likewise.
4887 * hash.c: Likewise.
4888 * hp300hpux.c: Likewise.
4889 * hppabsd-core.c: Likewise.
4890 * hpux-core.c: Likewise.
4891
4892 2001-01-22 Bo Thorsen <bo@suse.de>
4893
4894 * elf64-x86-64.c: Added PIC support for X86-64.
4895 (elf64_x86_64_link_hash_newfunc): Function added.
4896 (elf64_x86_64_link_hash_table_create): Likewise.
4897 (elf64_x86_64_check_relocs): Likewise.
4898 (elf64_x86_64_gc_mark_hook): Likewise.
4899 (elf64_x86_64_gc_sweep_hook): Likewise.
4900 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4901 (elf64_x86_64_size_dynamic_sections): Likewise.
4902 (elf64_x86_64_discard_copies): Likewise.
4903 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4904 (elf64_x86_64_finish_dynamic_sections): Likewise.
4905 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4906
4907 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4908
4909 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4910 * Makefile.in: Regenerate.
4911
4912 2001-01-21 Kazu Hirata <kazu@hxi.com>
4913
4914 * coff-a29k.c: Fix formatting.
4915
4916 2001-01-19 H.J. Lu <hjl@gnu.org>
4917
4918 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4919 relocation section names.
4920 (elf_i386_relocate_section): Report files with bad relocation
4921 section names and return false.
4922
4923 2001-01-17 Bo Thorsen <bo@suse.de>
4924
4925 * targets.c: Alphabetize list of xvecs.
4926
4927 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4928
4929 * config.bfd: Add linux target variant for elfxx-hppa.
4930 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4931 bfd_elf64_hppa_linux_vec.
4932 * configure: Regenerate.
4933 * elf64-hppa.c: Include elf64-target.h again to support linux
4934 target variant.
4935 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4936 * elf32-hppa.c: Include elf32-target.h again to support linux
4937 target variant.
4938 (elf32_hppa_post_process_headers): New function.
4939 (elf_backend_post_process_headers): Define.
4940 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4941 bfd_elf32_hppa_linux_vec.
4942
4943 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4944 and data_segment_base fields.
4945 (elf32_hppa_link_hash_table_create ): Init them.
4946 (elf32_hppa_check_relocs): Update comments.
4947 (hppa_record_segment_addr): New function.
4948 (elf32_hppa_relocate_section): Call it.
4949 (final_link_relocate): Handle R_PARISC_SEGREL32.
4950 (elf32_hppa_final_link): New function.
4951 (bfd_elf32_bfd_final_link): Define to call it.
4952 (hppa_unwind_entry_compare): New function.
4953 * cache.c (bfd_open_file): Create files in write+read mode.
4954
4955 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4956 SEGREL32 and numerous other relocs. Change duplicate
4957 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4958
4959 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4960 O_ACCMODE.
4961
4962 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4963 .plt entries for DT_INIT and DT_FINI.
4964 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4965 DT_INIT and DT_FINI.
4966
4967 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4968 offsets for stub .plt access if wide mode. Check offset in range.
4969
4970 2001-01-13 Nick Clifton <nickc@redhat.com>
4971
4972 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4973 line.
4974
4975 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4976 line.
4977
4978 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4979
4980 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4981 * configure: Regenerate.
4982
4983 2001-01-11 Peter Targett <peter.targett@arccores.com>
4984
4985 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4986 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4987 * cpu-arc.c (arch_info_struct): Add entries for variants.
4988 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4989 (arc_get_mach) Don't assume machine names prefixed arc- before
4990 testing.
4991 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4992 selections.
4993 (arc_elf_final_write_processing) Likewise.
4994 (ELF_MACHINE_CODE) Use EM_ARC.
4995
4996 2001-01-10 Nick Clifton <nickc@redhat.com>
4997
4998 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4999
5000 2001-01-07 Philip Blundell <philb@gnu.org>
5001
5002 * README: Replace `bug-gnu-utils@gnu.org' with
5003 `bug-binutils@gnu.org'.
5004
5005 2001-01-04 Kazu Hirata <kazu@hxi.com>
5006
5007 * som.c: Fix formatting.
5008
5009 2001-01-03 Kazu Hirata <kazu@hxi.com>
5010
5011 * ecoffswap.h: Fix formatting.
5012 * elf-bfd.h: Likewise.
5013 * elfarm-nabi.c: Likewise.
5014 * elfarm-oabi.c: Likewise.
5015 * elfcode.h: Likewise.
5016 * elfcore.h: Likewise.
5017 * elflink.c: Likewise.
5018 * elflink.h: Likewise.
5019 * elfxx-ia64.c: Likewise.
5020 * elfxx-target.h: Likewise.
5021 * libbfd.c: Likewise
5022 * linker.c: Likewise.
5023 * lynx-core.c: Likewise.
5024
5025 2001-01-02 Kazu Hirata <kazu@hxi.com>
5026
5027 * pc532-mach.c: Fix formatting.
5028 * pe-arm.c: Likewise.
5029 * pe-i386.c: Likewise.
5030 * pe-mips.c: Likewise.
5031 * pe-ppc.c: Likewise.
5032 * pe-sh.c: Likewise.
5033 * pei-mips.c: Likewise.
5034 * pei-sh.c: Likewise.
5035 * peicode.h: Likewise.
5036 * ppcboot.c: Likewise.
5037 * ptrace-core.c: Likewise.
5038
5039 2001-01-01 Kazu Hirata <kazu@hxi.com>
5040
5041 * reloc.c: Fix formatting.
5042 * riscix.c: Likewise.
5043 * rs6000-core.c: Likewise.
5044 * xcoff-target.h: Likewise.
5045
5046 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5047
5048 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5049 error, by calling bfd_default_set_arch_mach with incoming
5050 values.
5051
5052 2000-12-26 Kazu Hirata <kazu@hxi.com>
5053
5054 * vaxnetbsd.c: Fix formatting.
5055 * versados.c: Likewise.
5056 * vms-gsd.c: Likewise.
5057 * vms-hdr.c: Likewise.
5058 * vms-misc.c: Likewise.
5059
5060 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5061
5062 * archive.c (coff_write_armap): Don't write more than symbol_count
5063 `archive_member_file_ptr's.
5064
5065 2000-12-25 Kazu Hirata <kazu@hxi.com>
5066
5067 * vms-tir.c: Fix formatting.
5068
5069 2000-12-23 Kazu Hirata <kazu@hxi.com>
5070
5071 * vms.c: Fix formatting.
5072 * vms.h: Likewise.
5073
5074 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5075
5076 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5077
5078 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5079
5080 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5081 arithmetic.
5082
5083 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5084
5085 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5086
5087 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5088
5089 * libbfd.c (bfd_get_bits): Added
5090 (bfd_put_bits): Likewise
5091 * bfd-in.h: Declared the above.
5092 * bfd-in2.h: Regenerated.
5093
5094 2000-12-20 Kazu Hirata <kazu@hxi.com>
5095
5096 * targets.c: Fix formatting.
5097 * tekhex.c: Likewise.
5098 * trad-core.c: Likewise.
5099
5100 2000-12-19 Kazu Hirata <kazu@hxi.com>
5101
5102 * sco5-core.c: Fix formatting.
5103 * section.c: Likewise.
5104 * sparclinux.c: Likewise.
5105 * sparclynx.c: Likewise.
5106 * sparcnetbsd.c: Likewise.
5107 * srec.c: Likewise.
5108 * stabs.c: Likewise.
5109 * stab-syms.c: Likewise.
5110 * sunos.c: Likewise.
5111 * syms.c: Likewise.
5112 * sysdep.h: Likewise.
5113
5114 2000-12-18 Nick Clifton <nickc@redhat.com>
5115
5116 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5117 defined.
5118 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5119 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5120
5121 2000-12-18 Nick Clifton <nickc@redhat.com>
5122
5123 * vms-misc.c (_bfd_vms_get_record): Add default case to
5124 file_format switch.
5125
5126 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5127
5128 * elfcore.h (elf_core_file_p): Move to the start of the program
5129 headers before attempting to read them.
5130
5131 2000-12-14 Kazu Hirata <kazu@hxi.com>
5132
5133 * peigen.c: Fix formatting.
5134 * som.c: Likewise.
5135 * som.h: Likewise.
5136
5137 2000-12-13 Kazu Hirata <kazu@hxi.com>
5138
5139 * peigen.c: Fix formatting.
5140
5141 2000-12-12 Jim Wilson <wilson@redhat.com>
5142
5143 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5144
5145 2000-12-08 Mark Salter <msalter@redhat.com>
5146
5147 * binary.c (binary_set_section_contents): Ignore sections
5148 with zero size.
5149
5150 2000-12-12 Kazu Hirata <kazu@hxi.com>
5151
5152 * m68klinux.c: Fix formatting.
5153 * m68knetbsd.c: Likewise.
5154 * mipsbsd.c: Likewise.
5155 * netbsd-core.c: Likewise.
5156 * netbsd.h: Likewise.
5157 * newsos3.c: Likewise.
5158 * nlm32-alpha.c: Likewise.
5159 * nlm32-i386.c: Likewise.
5160 * nlm32-ppc.c: Likewise.
5161 * nlm32-sparc.c: Likewise.
5162 * nlmcode.h: Likewise.
5163 * nlmswap.h: Likewise.
5164 * nlm-target.h: Likewise.
5165 * ns32knetbsd.c: Likewise.
5166
5167 2000-12-10 Fred Fish <fnf@be.com>
5168
5169 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5170 symbols in shared objects if allow_shlib_undefined is true.
5171
5172 2000-12-12 Nick Clifton <nickc@redhat.com>
5173
5174 * cpu-sh.c: Fix formattng.
5175 * elf.c: Fix formattng.
5176 * elf32-mips.c: Fix formattng.
5177 * elf32-sh.c: Fix formattng.
5178 * elf64-alpha.c: Fix formattng.
5179
5180 2000-12-09 Nick Clifton <nickc@redhat.com>
5181
5182 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5183 dwarf2_find_line_info as last parameter to invocation of
5184 _bfd_dwarf2_find_nearest_line.
5185 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5186 dwarf2_find_line_info as last parameter to invocation of
5187 _bfd_dwarf2_find_nearest_line.
5188
5189 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5190
5191 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5192 (BFD_LIBS): ...to here.
5193 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5194 (BFD_LIBS_CFILES): ...to here.
5195 * Makefile.in: Regenerate.
5196 * configure.in: Remove dwarf.lo from the elf shell variable.
5197 * configure: Regenerate.
5198 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5199 * libcoff.h: Regenerate.
5200 * coffgen.c (coff_find_nearest_line): Call
5201 _bfd_dwarf2_find_nearest_line.
5202 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5203 accordingly.
5204 (read_abbrevs): Likewise
5205 (decode_line_info): Likewise.
5206 (parse_comp_unit): Likewise.
5207 (comp_unit_find_nearest_line): Likewise.
5208 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5209 * libbfd.h: Regenerate.
5210 * elf.c (_bfd_elf_find_nearest_line): Update call.
5211 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5212 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5213 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5214 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5215 (styp_to_sec_flags): Handle DWARF2 sections.
5216 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5217 to _bfd_find_nearest_line.
5218 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5219 call to _bfd_find_nearest_line.
5220
5221 2000-12-08 Kazu Hirata <kazu@hxi.com>
5222
5223 * coffgen.c: Fix formatting.
5224 * elf-m10300.c: Likewise.
5225 * elf32-i386.c: Likewise.
5226 * elf32-i960.c: Likewise.
5227 * elf32-m68k.c: Likewise.
5228 * elf32-mcore.c: Likewise.
5229 * elf32-ppc.c: Likewise.
5230 * elf32-sh.c: Likewise.
5231 * elf32-sparc.c: Likewise.
5232 * elf32-v850.c: Likewise.
5233 * elf64-alpha.c: Likewise.
5234 * elf64-hppa.c: Likewise.
5235 * elf64-mips.c: Likewise.
5236 * elf64-sparc.c: Likewise.
5237
5238 2000-12-07 Kazu Hirata <kazu@hxi.com>
5239
5240 * elf32-ppc.c: Fix formatting.
5241 * elf64-x86-64.c: Likewise.
5242
5243 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5244
5245 From Ralf Baechle <ralf@gnu.org>
5246
5247 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5248 BFDs containing no sections or empty .text, .data or .bss sections
5249 to be merged, regardless of their flags.
5250
5251 2000-12-06 Kazu Hirata <kazu@hxi.com>
5252
5253 * elf32-m32r.c: Fix formatting.
5254 * elf32-m68hc11.c: Likewise.
5255 * elf32-m68hc12.c: Likewise.
5256 * elf32-m68k.c: Likewise.
5257 * elf32-mcore.c: Likewise.
5258 * elf32-pj.c: Likewise.
5259 * elf32-ppc.c: Likewise.
5260
5261 2000-12-05 Kazu Hirata <kazu@hxi.com>
5262
5263 * elf32-fr30.c: Fix formatting.
5264 * elf32-hppa.c: Likewise.
5265 * elf32-i370.c: Likewise.
5266 * elf32-i386.c: Likewise.
5267 * elf32-i860.c: Likewise.
5268 * elf32-i960.c: Likewise.
5269
5270 2000-12-03 Kazu Hirata <kazu@hxi.com>
5271
5272 * elf32-arm.h: Fix formatting.
5273 * elf32-avr.c: Likewise.
5274 * elf32-cris.c: Likewise.
5275 * elf32-d10v.c: Likewise.
5276 * elf32-d30v.c: Likewise.
5277 * elf-hppa.h: Likewise.
5278 * elf-m10200.c: Likewise.
5279 * elf-m10300.c: Likewise.
5280
5281 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5282
5283 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5284 bfd_mach_mips32_4k. Update FIXME comment.
5285 * archures.c (bfd_mach_mips32): New constant.
5286 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5287 the latter, renumber it.
5288 * bfd-in2.h (bfd_mach_mips32): New constant.
5289 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5290 the latter, renumber it.
5291 * cpu-mips.c (I_mips32): New constant.
5292 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5293 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5294 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5295 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5296 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5297 with E_MIPS_MACH_MIPS32_4K.
5298 (_bfd_mips_elf_final_write_processing): Replace
5299 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5300 bfd_mach_mips32 case.
5301 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5302 comparison with support for MIPS32.
5303 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5304 MIPS32.
5305
5306 * aoutx.h (NAME(aout,machine_type)): Add cases for
5307 bfd_mach_mips5 and bfd_mach_mips64.
5308 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5309 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5310 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5311 (arch_info_struct): Add entries for bfd_mach_mips5 and
5312 bfd_mach_mips64.
5313 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5314 _bfd_mips_elf_print_private_bfd_data): Add cases for
5315 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5316 (_bfd_mips_elf_final_write_processing): Add cases for
5317 bfd_mach_mips5 and bfd_mach_mips64.
5318
5319 * aoutx.h (NAME(aout,machine_type)): Add a
5320 bfd_mach_mips_sb1 case.
5321 * archures.c (bfd_mach_mips_sb1): New constant.
5322 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5323 * cpu-mips.c (I_sb1): New constant.
5324 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5325 * elf32-mips.c (elf_mips_mach): Add case for
5326 E_MIPS_MACH_SB1.
5327 (_bfd_mips_elf_final_write_processing): Add case for
5328 bfd_mach_mips_sb1.
5329
5330 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5331
5332 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5333 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5334 (sparc*-*-rtems*): Switched from a.out to ELF.
5335
5336 2000-11-30 Jan Hubicka <jh@suse.cz>
5337
5338 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5339 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5340 (elf64-x86-64.lo): Add dependencies.
5341 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5342 bfd_mach_x86_64_intel_syntax.
5343 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5344 * config.bfd (x86_64): Add.
5345 * configure.in: Add support for bfd_elf64_x86_64_vec.
5346 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5347 (bfd_i386_arch, i8086_ar): Link in.
5348 * elf64-x86-64.c: New file.
5349 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5350 * targets.c (bfd_elf64_x86_64_vec): Add.
5351 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5352
5353 2000-11-30 Kazu Hirata <kazu@hxi.com>
5354
5355 * xcofflink.c: Fix formatting.
5356
5357 2000-11-28 Kazu Hirata <kazu@hxi.com>
5358
5359 * aoutx.h: Fix formatting.
5360 * bfd-in.h: Likewise.
5361 * bfd-in2.h: Likewise.
5362 * cache.c: Likewise.
5363 * cisco-core.c: Likewise.
5364 * coff64-rs6000.c: Likewise.
5365 * coffcode.h: Likewise.
5366 * coffswap.h: Likewise.
5367 * corefile.c: Likewise.
5368 * elf32-mips.c: Likewise.
5369
5370 2000-11-27 Kazu Hirata <kazu@hxi.com>
5371
5372 * aout-adobe.c: Fix formatting.
5373 * coff64-rs6000.c: Likewise.
5374 * coffgen.c: Likewise.
5375 * cofflink.c: Likewise.
5376
5377 2000-11-27 Philip Blundell <pb@futuretv.com>
5378
5379 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5380 (obj_coff_strings_written): New accessor macro for above.
5381 * libcoff.h: Regenerate.
5382 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5383 strings.
5384 * coffcode.h (coff_write_object_contents): No need to write out
5385 the string table if it's already been done.
5386
5387 2000-11-22 Philip Blundell <pb@futuretv.com>
5388
5389 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5390 weak undefined symbols.
5391
5392 2000-11-24 Nick Clifton <nickc@redhat.com>
5393
5394 * archures.c (bfd_mach_arm_5TE): Define.
5395 (bfd_mach_arm+XScale): Define.
5396 * bfd-in2.h: Regenerate.
5397
5398 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5399 BFD_RELOC_ARM_PCREL_BLX.
5400
5401 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5402 XScale machine numbers.
5403
5404 * config.bfd (xscale-elf): Add target.
5405 (xscale-coff): Add target.
5406
5407 * cpu-arm.c: Add xscale machine name.
5408 Add v5t, v5te and XScale machine numbers.
5409
5410 2000-11-23 Kazu Hirata <kazu@hxi.com>
5411
5412 * aix386-core.c: Fix formatting.
5413
5414 2000-11-22 Jim Wilson <wilson@redhat.com>
5415
5416 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5417 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5418 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5419 (ins_imms_scaled): Initialize sign_bit at function entry.
5420 (elf64_ia64_operands): Add missing initializers.
5421 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5422 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5423 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5424 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5425 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5426 parameters.
5427 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5428 and free_extsyms at function entry.
5429 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5430 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5431 (get_got): Delete unused local srel.
5432 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5433 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5434
5435 2000-11-21 Kazu Hirata <kazu@hxi.com>
5436
5437 * coff-a29k.c: Fix formatting.
5438 * coff-h8500.c: Likewise.
5439 * coff-i960.c: Likewise.
5440 * coff-ppc.c: Likewise.
5441 * coff-rs6000.c: Likewise.
5442 * coff-stgo32.c: Likewise.
5443 * coff-tic54x.c: Likewise.
5444 * coff-w65.c: Likewise.
5445 * cpu-h8500.c: Likewise.
5446 * cpu-hppa.c: Likewise.
5447 * cpu-ns32k.c: Likewise.
5448 * ecoff.c: Likewise.
5449 * ecofflink.c: Likewise.
5450
5451 2000-11-21 Nick Clifton <nickc@redhat.com>
5452
5453 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5454 remove possibility of infinite loop.
5455
5456 2000-11-20 Kazu Hirata <kazu@hxi.com>
5457
5458 * aix386-core.c: Fix formatting.
5459 * aout-adobe.c: Likewise.
5460 * aout-arm.c: Likewise.
5461 * aout-encap.c: Likewise.
5462 * aout-ns32k.c: Likewise.
5463 * aout-target.h: Likewise.
5464 * aout-tic30.c: Likewise.
5465 * aoutf1.h: Likewise.
5466 * aoutx.h: Likewise.
5467 * archive.c: Likewise.
5468 * bfd-in.h: Likewise.
5469 * bfd-in2.h: Likewise.
5470 * bfd.c: Likewise.
5471 * bout.c: Likewise.
5472
5473 2000-11-17 H.J. Lu <hjl@gnu.org>
5474
5475 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5476 pltoff entries for DT_INIT and DT_FINI.
5477 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5478 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5479 entries.
5480
5481 2000-11-16 Richard Henderson <rth@redhat.com>
5482
5483 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5484 (allocate_dynrel_entries): Likewise.
5485 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5486 (set_pltoff_entry): Likewise.
5487 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5488 (elfNN_ia64_reloc_type_lookup): Likewise.
5489 (elfNN_ia64_install_value): Likewise.
5490 (elfNN_ia64_relocate_section): Likewise.
5491 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5492 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5493
5494 2000-11-16 Kazu Hirata <kazu@hxi.com>
5495
5496 * cpu-a29k.c: Fix formatting.
5497 * cpu-alpha.c: Likewise.
5498 * cpu-arm.c: Likewise.
5499 * cpu-avr.c: Likewise.
5500 * cpu-d10v.c: Likewise.
5501 * cpu-h8500.c: Likewise.
5502 * cpu-hppa.c: Likewise.
5503 * cpu-i370.c: Likewise.
5504 * cpu-i386.c: Likewise.
5505 * cpu-i960.c: Likewise.
5506 * cpu-ia64-opc.c: Likewise.
5507 * cpu-ia64.c: Likewise.
5508 * cpu-m32r.c: Likewise.
5509 * cpu-m68hc11.c: Likewise.
5510 * cpu-m68hc12.c: Likewise.
5511 * cpu-m68k.c: Likewise.
5512 * cpu-m88k.c: Likewise.
5513 * cpu-mips.c: Likewise.
5514 * cpu-ns32k.c: Likewise.
5515 * cpu-pj.c: Likewise.
5516 * cpu-powerpc.c: Likewise.
5517 * cpu-sh.c: Likewise.
5518 * cpu-sparc.c: Likewise.
5519 * cpu-tic54x.c: Likewise.
5520 * cpu-v850.c: Likewise.
5521 * cpu-vax.c: Likewise.
5522 * cpu-w65.c: Likewise.
5523 * cpu-we32k.c: Likewise.
5524 * cpu-z8k.c: Likewise.
5525 * dwarf1.c: Likewise.
5526 * dwarf2.c: Likewise.
5527
5528 2000-11-15 Kazu Hirata <kazu@hxi.com>
5529
5530 * coff-arm.c: Fix formatting.
5531 * coff-ppc.c: Likewise.
5532 * coff-rs6000.c: Likewise.
5533 * coff-sh.c: Likewise.
5534 * coff-sparc.c: Likewise.
5535 * coff-tic30.c: Likewise.
5536 * coff-tic54x.c: Likewise.
5537 * coff-tic80.c: Likewise.
5538 * coff-w65.c: Likewise.
5539 * coff-we32k.c: Likewise.
5540 * coff-z8k.c: Likewise.
5541
5542 2000-11-15 Richard Henderson <rth@redhat.com>
5543
5544 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5545 section with the same ALLOC|LOAD flags as the source section.
5546
5547 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5548
5549 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5550 by STO_ALPHA constants.
5551
5552 2000-11-14 Kazu Hirata <kazu@hxi.com>
5553
5554 * coff-pmac.c: Fix formatting.
5555 * coff-ppc.c: Likewise.
5556
5557 2000-11-13 H.J. Lu <hjl@gnu.org>
5558
5559 * elflink.h (elf_link_add_object_symbols): Also add indirect
5560 symbols for common symbols with the default version.
5561
5562 2000-11-09 Philip Blundell <pb@futuretv.com>
5563
5564 * section.c (STD_SECTION): Set gc_mark flag.
5565
5566 2000-11-11 Kazu Hirata <kazu@hxi.com>
5567
5568 * coff-i960.c: Likewise.
5569 * coff-m68k.c: Likewise.
5570 * coff-m88k.c: Likewise.
5571 * coff-mcore.c: Likewise.
5572 * coff-mips.c: Likewise.
5573
5574 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5575
5576 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5577
5578 2000-11-10 Kazu Hirata <kazu@hxi.com>
5579
5580 * coff-h8300.c: Fix formatting.
5581 * coff-h8500.c: Likewise.
5582 * coff-i386.c: Likewise.
5583 * coff-i860.c: Likewise.
5584 * coff-i960.c: Likewise.
5585 * coff-ia64.c: Likewise.
5586
5587 2000-11-09 Kazu Hirata <kazu@hxi.com>
5588
5589 * archive.c: Fix formatting.
5590 * archures.c: Likewise.
5591
5592 2000-11-07 Richard Henderson <rth@redhat.com>
5593
5594 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5595 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5596 * section.c (bfd_set_section_contents): Call memcpy if
5597 section->contents set and location not equal to contents plus offset.
5598
5599 2000-11-08 Kazu Hirata <kazu@hxi.com>
5600
5601 * bfd-in.h: Fix formatting.
5602 * bfd-in2.h: Likewise.
5603 * bfd.c: Likewise.
5604 * binary.c: Likewise.
5605 * bout.c: Likewise.
5606 * coff-a29k.c: Likewise.
5607 * coff-alpha.c: Likewise.
5608 * coff-apollo.c: Likewise.
5609 * coff-aux.c: Likewise.
5610
5611 2000-11-07 Kazu Hirata <kazu@hxi.com>
5612
5613 * aix386-core.c: Fix formatting.
5614 * aoutf1.h: Likewise.
5615 * aoutx.h: Likewise.
5616 * archures.c: Likewise.
5617 * armnetbsd.c: Likewise.
5618
5619 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5620
5621 * coff-h8300.c (special): Adjust reloc address.
5622
5623 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5624
5625 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5626 to differentiate elf32 and elf64 on ia64.
5627 * bfd-in2.h: Regenerate.
5628 * config.bfd: Add target for "ia64*-*-hpux*".
5629 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5630 * configure: Regenerate.
5631 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5632 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5633
5634 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5635 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5636 * Makefile.in: Regnerate.
5637 * elf64-ia64.c: Deleted.
5638 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5639
5640 2000-11-06 Kazu Hirata <kazu@hxi.com>
5641
5642 * aout-adobe.c: Fix formatting.
5643 * aout-arm.c: Likewise.
5644 * aout-cris.c: Likewise.
5645 * aout-encap.c: Likewise.
5646 * aout-ns32k.c: Likewise.
5647 * aout-target.h: Likewise.
5648 * aout-tic30.c: Likewise.
5649
5650 2000-11-05 Philip Blundell <philb@gnu.org>
5651
5652 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5653 BFDs containing no sections to be merged, regardless of their flags.
5654
5655 2000-11-04 Philip Blundell <philb@gnu.org>
5656
5657 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5658 if a relocation for an undefined symbol also results in an
5659 overflow.
5660
5661 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5662
5663 * config.bfd: Add support for Sun Chorus.
5664
5665 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5666
5667 * configure.in: Recognize alpha-*-freebsd*.
5668 * configure: Regenerate.
5669
5670 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5671
5672 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5673 (Chunk): New global variable set by a parameter in objcopy.c.
5674 (S3Forced): New global variable set by a parameter in
5675 objcopy.c.
5676 (srec_set_section_contents): If S3Forced is true, always generate
5677 S3 records.
5678 (srec_write_section): Use 'Chunk' to limit maximum length of S
5679 records.
5680
5681 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5682
5683 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5684 * Makefile.in: Regenerate.
5685 * bfd-in2.h: Regenerate.
5686 * po/bfd.pot: Regenerate.
5687
5688 2000-10-31 Philip Blundell <philb@gnu.org>
5689
5690 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5691 EF_SOFT_FLOAT if it is defined.
5692
5693 2000-10-27 Philip Blundell <philb@gnu.org>
5694
5695 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5696 attempts to mix PIC code with non-PIC, just mark the output as
5697 being position dependent.
5698 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5699 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5700 all mismatches, not just the first one.
5701
5702 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5703
5704 * ieee.c (ieee_archive_p): Plug one of many possible
5705 memory leaks in error handling.
5706
5707 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5708
5709 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5710 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5711 Support v8plusb.
5712 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5713 sparc64_elf_object_p): Support v9b.
5714 * archures.c: Declare v8plusb and v9b machines.
5715 * bfd-in2.h: Ditto.
5716 * cpu-sparc.c: Ditto.
5717
5718 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5719
5720 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5721 of a GOT reloc.
5722
5723 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5724 (SYMBOL_CALLS_LOCAL): New macro.
5725 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5726 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5727 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5728 (ppc_elf_relocate_section): Use flag variable to determine
5729 whether the relocation refers to a local symbol.
5730 Test whether a PLTREL24 reloc will produce a reloc by looking
5731 to see whether a PLT entry was made.
5732
5733 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5734
5735 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5736 entries that could serve as a definition for a weak symbol.
5737
5738 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5739
5740 From Ralf Baechle <ralf@gnu.org>
5741
5742 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5743 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5744 against local symbols.
5745 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5746
5747 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5748
5749 * section.c (struct sec): Add kept_section.
5750 (struct bfd_comdat_info): Remove sec, we can use above.
5751 (STD_SECTION): Add initializer.
5752 (bfd_make_section_anyway): Init here too.
5753
5754 * bfd-in2.h: Regenerate.
5755
5756 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5757 zeroing of `flags'.
5758 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5759 fudge values for discarded link-once section symbols.
5760
5761 * elf64-hppa.c: Include alloca-conf.h
5762
5763 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5764
5765 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5766
5767 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5768
5769 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5770
5771 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5772
5773 2000-10-10 Tom Rix <trix@redhat.com>
5774
5775 * section.c (bfd_make_section_anyway): Release newsect ptr when
5776 newsect->symbol fails to alloc. Use bfd_release instead of free.
5777
5778 2000-10-09 Richard Henderson <rth@cygnus.com
5779
5780 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5781 (elf64_ia64_unwind_entry_compare): New.
5782 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5783
5784 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5785
5786 * elflink.h (size_dynamic_sections): Don't create various tags if
5787 .dynstr is excluded from the link. Don't set first dynsym entry
5788 if dynsymcount is zero.
5789 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5790 .dynsym excluded from the link. Don't try to write any dynamic
5791 sections excluded from the link.
5792
5793 * elf.c (swap_out_syms): Handle global section symbols.
5794
5795 2000-10-05 DJ Delorie <dj@redhat.com>
5796
5797 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5798 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5799 (coff_write_relocs): write extended reloc count
5800 (coff_write_object_contents): account for extended relocs
5801
5802 2000-10-05 Jim Wilson <wilson@cygnus.com>
5803
5804 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5805 field.
5806 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5807 elf_backend_section_flags function.
5808 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5809 code.
5810 (elf64_ia64_section_flags): New function containing flag conversion
5811 code.
5812 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5813 * elfxx-target.h (elf_backend_section_flags): Define.
5814 (elfNN_bed): Initialize elf_backend_section_flags field.
5815
5816 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5817
5818 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5819 _bfd_elf32_gc_record_vtable. Correct a comment.
5820
5821 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5822
5823 From Ralf Baechle <ralf@gnu.org>
5824
5825 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5826 produces binaries with got[1] = 0x80000001 to differenciate them
5827 for the dynamic linker from the broken binaries produced by old
5828 versions.
5829
5830 2000-09-30 Petr Sorfa <petrs@sco.com>
5831
5832 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5833 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5834 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5835 * configure: Regenerate.
5836
5837 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5838
5839 Define two bfd_targets for absence and presence of leading
5840 underscore on symbols. Make sure to only link same kind.
5841 * elf32-cris.c (cris_elf_object_p,
5842 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5843 cris_elf_merge_private_bfd_data): New.
5844 (elf_backend_object_p, elf_backend_final_write_processing,
5845 bfd_elf32_bfd_print_private_bfd_data,
5846 bfd_elf32_bfd_merge_private_bfd_data): Define.
5847 <Target vector definition>: Include elf32-target.h twice with
5848 different macro settings:
5849 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5850 bfd_elf32_us_cris_vec.
5851 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5852 (elf_symbol_leading_char): First as 0, then '_'.
5853 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5854 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5855 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5856 * configure: Regenerate.
5857 * targets.c: Declare bfd_elf32_us_cris_vec.
5858 * po/bfd.pot: Regenerate.
5859
5860 2000-09-29 Momchil Velikov <velco@fadata.bg>
5861
5862 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5863 R_ARM_THM_PC22 relocations.
5864
5865 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5866
5867 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5868
5869 2000-09-29 Momchil Velikov <velco@fadata.bg>
5870
5871 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5872 is has the SEC_HAS_CONTENTS flag set.
5873
5874 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5875 Hans-Peter Nilsson <hp@axis.com>
5876
5877 * aout-cris.c (N_TXTADDR): Define.
5878
5879 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5880
5881 * som.c: Include alloca-conf.h.
5882 * Makefile.am: "make dep-am"
5883 * Makefile.in: Regenerate.
5884
5885 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5886
5887 * elf32-hppa.c (plt_stub): New.
5888 (PLT_STUB_ENTRY): Define.
5889 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5890 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5891 (elf32_hppa_link_hash_table_create): Init to suit.
5892 (elf32_hppa_check_relocs): Set has_12bit_branch and
5893 has_17bit_branch as appropriate.
5894 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5895 non-local functions.
5896 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5897 Add space for plt_stub as needed.
5898 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5899 functions at plt_stub.
5900 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5901 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5902
5903 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5904 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5905 of fixed size, and if negative, disable handling of input sections
5906 before stub section. Set up default stub group size depending
5907 on detected branch relocs.
5908 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5909 ensure different offsets from sym_value aren't rounded to
5910 different 2k blocks. Use lrsel and rrsel for other stubs too for
5911 consistency rather than necessity.
5912 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5913 (final_link_relocate): Likewise.
5914 (elf32_hppa_relocate_section): Likewise.
5915
5916 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5917 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5918 (elf_hppa_final_link_relocate): Handle them.
5919 (elf_hppa_relocate_insn): Likewise.
5920 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5921
5922 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5923
5924 * elfcode.h (elf_object_p): Preserve and clear abfd section
5925 information. Restore at error.
5926
5927 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5928
5929 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5930 is empty, make sure that its rva also 0. NT loader dislikes
5931 having otherwise.
5932
5933 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5934
5935 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5936 global by default.
5937
5938 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5939
5940 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5941 currently unused RELATIVE_DYNAMIC_RELOCS code.
5942 (hppa_discard_copies): Likewise.
5943 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5944 comments. Don't check non-code output sections for stub grouping.
5945
5946 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5947
5948 * section.c (bfd_get_unique_section_name): Return NULL if
5949 bfd_malloc fails.
5950
5951 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5952
5953 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5954 instruction sequence to actually work.
5955 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5956 accordingly.
5957
5958 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5959
5960 * elf32-sh.c (sh_elf_relocate_section): Use
5961 _bfd_final_link_relocate to apply the relocation against a section
5962 symbol, when doing relocatable links.
5963
5964 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5965
5966 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5967 to id_sec.
5968 (stub_hash_newfunc): Here too.
5969 (hppa_add_stub): And here.
5970 (elf32_hppa_link_hash_table): Remove stub_section_created,
5971 reloc_section_created, first_init_sec and first_fini_sec. Add
5972 stub_group.
5973 (elf32_hppa_link_hash_table_create): Init to suit.
5974 (hppa_get_stub_entry): Add support for grouping stub sections.
5975 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5976 section code. Index stub vars by section->id.
5977 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5978 exit paths. Zap allocation of above removed vars. Refine
5979 link-once test.
5980
5981 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5982 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5983 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5984 rather than pointer to bfd_link_info.
5985 (hppa_add_stub): Likewise.
5986 (final_link_relocate): Likewise.
5987
5988 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5989
5990 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5991 link-once sections.
5992
5993 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5994
5995 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5996 ld/emulparams/shelf.sh.
5997
5998 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5999
6000 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6001 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6002 * bfd-in2.h: Regenerate.
6003
6004 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
6005
6006 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6007 LITUSE relocations incorrectly if -relax is specified on the ld
6008 command line and the displacement field of the load or store
6009 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6010
6011 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6012
6013 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6014 first_fini_sec here.
6015 (elf32_hppa_size_stubs): Instead correctly find the first .init
6016 and .fini section here.
6017
6018 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6019
6020 * elf32-hppa.c (clobber_millicode_symbols): New function.
6021 (elf32_hppa_size_dynamic_sections): Call it.
6022
6023 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6024
6025 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6026 packed. Add plabel, plt_abs packed booleans.
6027 (hppa_link_hash_newfunc): Init new fields.
6028 (PLABEL_PLT_ENTRY_SIZE): Define.
6029 (hppa_stub_name): Use size_t len vars.
6030 (hppa_add_stub): Likewise.
6031 (elf32_hppa_build_stubs): Likewise.
6032 (hppa_build_one_stub): Kill some compiler warnings.
6033 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6034 if dynamic linking. Munge the local plt offsets into
6035 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6036 size_t len vars. Add assert for plabel addend.
6037 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6038 (elf32_hppa_hide_symbol): New function.
6039 (elf_backend_hide_symbol): Define.
6040 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6041 with h->plabel set. Don't make plt entries to have dynamic syms
6042 when they have been forced local. If plt entry is used by a
6043 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6044 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6045 Set up .plt offsets for local syms.
6046 (elf32_hppa_relocate_section): Initialise plt entries for local
6047 syms. Leave weak undefined plabels zero. Make global plabel
6048 relocs against function symbol, and leave the addend zero.
6049 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6050 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6051 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6052 relocs instead of SEGREL32 for dynamic got relocs.
6053 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6054 (elf_backend_got_header_size): Adjust.
6055 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6056
6057 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6058 (hppa_type_of_stub): Use it instead of #if 0
6059 (hppa_discard_copies): Use it here too.
6060 (elf32_hppa_size_dynamic_sections): And here.
6061
6062 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6063 (elf32_hppa_link_hash_table_create): And here.
6064 (hppa_build_one_stub): And here. Instead keep track of stub
6065 offset using _raw_size.
6066 (elf32_hppa_size_stubs): Likewise.
6067 (elf32_hppa_build_stubs): Likewise.
6068 (hppa_size_one_stub): Likewise. Resize reloc section too.
6069
6070 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6071 first_fini_sec handling. Don't search for reloc section or set
6072 hplink->reloc_section_created here.
6073 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6074 set reloc_section_created here.
6075 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6076 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6077 and DT_FINI.
6078 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6079
6080 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6081 with `hplink->root.'.
6082 (elf32_hppa_check_relocs): Likewise.
6083 (elf32_hppa_gc_sweep_hook): Likewise.
6084 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6085 (hppa_handle_PIC_calls): Likewise.
6086 (elf32_hppa_size_dynamic_sections): Likewise.
6087 (elf32_hppa_set_gp): Likewise.
6088 (elf32_hppa_relocate_section): Likewise.
6089 (elf32_hppa_finish_dynamic_symbol): Likewise.
6090 (elf32_hppa_finish_dynamic_sections): Likewise.
6091
6092 From David Huggins-Daines <dhd@linuxcare.com>
6093 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6094 defined weak symbols in shared links.
6095 (final_link_relocate): Calls to defined weak symbols in shared
6096 objects must go via import stubs, as the target might not be known
6097 at link time.
6098
6099 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6100
6101 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6102 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6103 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6104 the original entries with EMPTY_HOWTOs, and added new ones to fill
6105 in the gap.
6106 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6107 (sh_elf_relocate_section): Likewise.
6108
6109 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6110
6111 * cpu-mips.c (arch_info_struct): Add mips:4K
6112 * bfd-in2.h (bfd_mach_mips4K): New define.
6113 * archures.c: Add bfd_mach_mips4K to comment.
6114 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6115 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6116
6117 2000-09-13 Marco Franzen <marcof@thyron.com>
6118
6119 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6120 use size_t as a counter.
6121 (som_write_space_strings): Similarly.
6122
6123 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6124
6125 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6126 and prototype.
6127 (elf32_i860_relocate_section): Invoke new function from here.
6128
6129 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6130
6131 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6132 static.
6133
6134 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6135
6136 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6137 target section name instead of dumping core when the target symbol is
6138 undefined.
6139
6140 2000-09-09 Kazu Hirata <kazu@hxi.com>
6141
6142 * riscix.c: Remove DEFUN.
6143
6144 2000-09-08 Nick Clifton <nickc@redhat.com>
6145
6146 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6147 initialise flags in output bfd if the input bfd is the default
6148 architecture with the default flags.
6149
6150 2000-09-08 Kazu Hirata <kazu@hxi.com>
6151
6152 * archive.c: Fix formatting.
6153 * coff-arm.c: Likewise.
6154 * doc/chew.c: Likewise.
6155
6156 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6157
6158 * section.c (bfd_get_unique_section_name): Put a dot before the
6159 numeric suffix.
6160
6161 2000-09-07 Kazu Hirata <kazu@hxi.com>
6162
6163 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6164 * elf.c: Fix formatting.
6165
6166 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6167
6168 * config.bfd (sh-*-linux*): Added.
6169 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6170 * targets.c: Declare them.
6171 * elf32-sh-lin.c: New file.
6172 * Makefile.am: Compile it.
6173 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6174 * configure, Makefile.in: Rebuilt.
6175
6176 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6177
6178 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6179 pseduo-section when determining where the TOC ends.
6180
6181 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6182 output x_tvndx as it is only two bytes wide.
6183
6184 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6185 reloc is 26 or 32 bits wide.
6186
6187 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6188 for relocs that don't change anything. Also look at the full
6189 6 bits of bitsize.
6190
6191 2000-09-06 Philip Blundell <philb@gnu.org>
6192
6193 * config.bfd (arm*-*-uclinux*): New target.
6194
6195 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6196
6197 * configure: Rebuilt with new libtool.m4.
6198
6199 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6200
6201 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6202 word for variable name.
6203 * bfd-in2.h: Regenerate.
6204
6205 2000-09-05 Nick Clifton <nickc@redhat.com>
6206
6207 * config.in: Regenerate.
6208 * libbfd.h: Regenerate.
6209 * po/bfd.pot: Regenerate.
6210 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6211 local versions.
6212
6213 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6214
6215 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6216
6217 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6218
6219 Shared library and PIC support.
6220 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6221 (GOT_ENTRY_SIZE): New.
6222 (ELF_DYNAMIC_INTERPRETER): New.
6223 (STUB_SUFFIX): Define.
6224 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6225 (RELATIVE_DYNAMIC_RELOCS): Define.
6226 (enum elf32_hppa_stub_type): New.
6227 (struct elf32_hppa_stub_hash_entry): Rename offset to
6228 stub_offset. Add a number of new fields.
6229 (struct elf32_hppa_link_hash_entry): New.
6230 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6231 global_value.
6232 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6233 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6234 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6235 new fields.
6236 (hppa_link_hash_newfunc): New function.
6237 (elf32_hppa_link_hash_table_create): Use above function. Init new
6238 fields.
6239 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6240 instead of addend, and remove sym_name from args. Don't use
6241 symbol name for local syms, instead use sym index.
6242 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6243 stub type rather than size. Pass in hash and handle import stub
6244 case. Also pass in reloc instead of offset so we can calculate
6245 PCREL22F and PCREL12F branches properly.
6246 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6247 import and export stubs too.
6248 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6249 import and export stub sizing.
6250 (elf32_hppa_check_relocs): New function.
6251 (elf32_hppa_adjust_dynamic_symbol): New function.
6252 (hppa_discard_copies): New function.
6253 (elf32_hppa_size_dynamic_sections): New function.
6254 (elf_backend_size_dynamic_sections): Define.
6255 (elf32_hppa_finish_dynamic_symbol): New function.
6256 (elf_backend_finish_dynamic_symbol): Define.
6257 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6258 some local vars into the link hash table too. For shared links,
6259 trundle over function syms, generating export stubs. Handle
6260 PCREL22F branches. Break out stub creation code from here..
6261 (hppa_add_stub): .. to here. New function.
6262 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6263 call the bfd linker. Use elf_gp to record global pointer.
6264 Calculate a value from sections if $global$ is missing.
6265 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6266 (elf32_hppa_gc_mark_hook): New function.
6267 (elf_backend_gc_mark_hook): Define.
6268 (elf32_hppa_gc_sweep_hook): New function.
6269 (elf_backend_gc_sweep_hook): Define.
6270 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6271 Add rel to args, and remove howto, input_bfd, offset, addend,
6272 sym_name as we can recalculate these locally. Handle calls to
6273 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6274 handling of undefined weak syms. Check that stubs are in range.
6275 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6276 message on hitting a DPREL21L reloc that needs fixing. Subtract
6277 off PC for PCREL14F. Break out code that does a stub lookup from
6278 here..
6279 (hppa_get_stub_entry): ..to here. New function.
6280 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6281 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6282 relocs, etc. etc.
6283 (elf32_hppa_finish_dynamic_sections): New function.
6284 (elf_backend_finish_dynamic_sections): Define.
6285 (elf_backend_final_write_processing) Define.
6286 (hppa_handle_PIC_calls): New function.
6287 (elf32_hppa_build_stubs): Call it. Pass link_info to
6288 hppa_build_one_stub.
6289 (elf32_hppa_create_dynamic_sections): New function
6290 to create .plt and .got then set .plt flags correctly.
6291 (elf_backend_create_dynamic_sections): Define.
6292 (elf32_hppa_object_p): New function.
6293 (elf_backend_object_p): Define.
6294 (elf32_hppa_elf_get_symbol_type): New function.
6295 (elf_backend_get_symbol_type): Define.
6296 (elf_backend_can_gc_sections): Define.
6297 (elf_backend_want_got_plt): Define.
6298 (elf_backend_plt_alignment): Set to 2.
6299 (elf_backend_plt_readonly): Define.
6300 (elf_backend_want_plt_sym): Define.
6301 (elf_backend_got_header_size): Reserve one entry.
6302
6303 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6304 (elf32_hppa_size_stubs): Pass in multi_subspace.
6305 (elf32_hppa_set_gp): Declare.
6306
6307 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6308 (bfd_get_unique_section_name): New function.
6309 * bfd-in2.h: Regenerate.
6310
6311 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6312 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6313 comment.
6314
6315 From David Huggins-Daines <dhd@linuxcare.com>
6316 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6317 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6318 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6319 been updated in finish_dynamic_symbol before modifying function
6320 symbol.
6321
6322 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6323 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6324 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6325 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6326 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6327 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6328 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6329 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6330
6331 From David Huggins-Daines <dhd@linuxcare.com>
6332 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6333 style of local labels as well.
6334
6335 2000-09-03 Philip Blundell <philb@gnu.org>
6336
6337 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6338 references to undefined symbols in debugging sections.
6339
6340 2000-09-02 H.J. Lu <hjl@gnu.org>
6341
6342 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6343 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6344 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6345 section.
6346
6347 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6348
6349 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6350 (elf32_i860_is_local_label_name): New function and prototype.
6351
6352 2000-09-02 Nick Clifton <nickc@redhat.com>
6353
6354 * configure.in: Increase version number to 2.10.91.
6355 * configure: Regenerate.
6356 * aclocal.m4: Regenerate.
6357 * config.in: Regenerate.
6358 * po/bfd.pot: Regenerate.
6359
6360 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6361
6362 * elf.c (_bfd_elf_make_section_from_shdr): Add
6363 .gnu.linkobce.wi. to the list of debug section names.
6364
6365 2000-09-02 Nick Clifton <nickc@redhat.com>
6366
6367 * dwarf2.c (find_debug_info): New function: Locate a section
6368 containing dwarf2 debug information.
6369 (bfd_dwarf2_find_nearest_line): Find all sections containing
6370 debug information and include them in the stash.
6371
6372 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6373
6374 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6375 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6376 (sh_reloc_map): Add new relocs.
6377 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6378 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6379 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6380 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6381 functions.
6382 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6383 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6384 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6385 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6386 New array constants.
6387 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6388 New variables.
6389 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6390 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6391 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6392 elf_sh_plt_reloc_offset): Define.
6393 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6394 elf_sh_link_hash_table): New structs.
6395 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6396 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6397 relocation types.
6398 (elf_backend_create_dynamic_sections,
6399 bfd_elf32_bfd_link_hash_table_create,
6400 elf_backend_adjust_dynamic_symbol,
6401 elf_backend_size_dynamic_sections,
6402 elf_backend_finish_dynamic_symbol,
6403 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6404 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6405 elf_backend_got_header_size, elf_backend_plt_header_size):
6406 Define.
6407 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6408 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6409 New relocs.
6410 * bfd-in2.h, libbfd.h: Rebuilt.
6411
6412 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6413
6414 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6415 change.
6416
6417 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6418
6419 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6420 not initialized, set them to indicate the SH1 instruction set.
6421
6422 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6423
6424 * acinclude.m4: Include libtool and gettext macros from the
6425 top level.
6426 * aclocal.m4, configure: Rebuilt.
6427
6428 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6429
6430 * elf.c: Eliminate references to __sparcv9 macro; replace with
6431 autoconf variables HAVE_PSINFO32_T etc.
6432 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6433 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6434 * config.in: Ditto.
6435 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6436 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6437 * aclocal.m4: Ditto.
6438 * configure: Regenerate.
6439
6440 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6441
6442 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6443 for any shared link, not just shared -Bsymbolic.
6444 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6445 any shared link, and pass link info to it.
6446 (elf_i386_size_dynamic_sections): Update comment.
6447 (elf_i386_discard_copies): Modify to discard relocs for symbols
6448 that have been forced local.
6449 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6450 that have been forced local.
6451
6452 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6453
6454 * elflink.h (elf_link_add_object_symbols): Allow common
6455 symbols to have an alignment of 1 if explicitly requested, and
6456 not overridden by other definitions.
6457
6458 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6459
6460 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6461 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6462
6463 2000-08-22 H.J. Lu <hjl@gnu.org>
6464
6465 * elf-bfd.h (elf_link_hash_table): Add runpath.
6466
6467 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6468 * bfd-in2.h: Rebuilt.
6469
6470 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6471 "runpath" field to NULL.
6472 (bfd_elf_get_runpath_list): New function.
6473
6474 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6475 DT_RUNPATH entries.
6476
6477 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6478
6479 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6480 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6481 explicitly. Improve validation of r_type.
6482
6483 2000-08-21 H.J. Lu <hjl@gnu.org>
6484
6485 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6486 dynamic allocated content space. Add a comment to remind us that
6487 one day this ought to be fixed.
6488 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6489 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6490 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6491
6492 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6493
6494 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6495 field with the newly relocated value instead of adding it to the
6496 existing immediate field.
6497 (elf32_i860_relocate_splitn): Likewise.
6498 (elf32_i860_relocate_highadj): Likewise.
6499
6500 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6501
6502 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6503 was previously just a stub).
6504
6505 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6506
6507 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6508 Formatting fixes.
6509 (_bfd_elf_create_dynamic_sections): Likewise.
6510
6511 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6512
6513 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6514 for undefined symbols to be the beginning of the section.
6515
6516 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6517 four extra entries at the beginning of the .rela.plt section.
6518 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6519 section to account for the four reserved entries in the .plt section.
6520
6521 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6522
6523 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6524 to the list of NOPs we recognize after a branch-and-link.
6525 Use the ori NOP when one is needed.
6526
6527 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6528 for large archives.
6529
6530 2000-08-14 Jim Wilson <wilson@cygnus.com>
6531
6532 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6533 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6534 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6535 EF_IA_64_ABSOLUTE.
6536
6537 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6538
6539 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6540
6541 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6542
6543 * elf32-i860.c (elf32_i860_relocate_section): New function.
6544 (i860_final_link_relocate): New function.
6545 (elf32_i860_relocate_splitn): New function.
6546 (elf32_i860_relocate_pc16): New function.
6547 (elf32_i860_relocate_highadj): New function.
6548 (elf32_i860_howto): Minor adjustments to some relocations.
6549 (elf_info_to_howto_rel): Define.
6550 (elf_backend_relocate_section): Define.
6551
6552 2000-08-10 Nick Clifton <nickc@cygnus.com>
6553
6554 * elf32-arm.h: Fix formatting.
6555
6556 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6557
6558 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6559
6560 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6561
6562 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6563
6564 2000-08-07 Kazu Hirata <kazu@hxi.com>
6565
6566 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6567 * elf64-ia64.c: Fix a typo.
6568
6569 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6570
6571 * elf32-i860.c (elf32_i860_howto_table): New structure.
6572 (lookup_howto): New function.
6573 (elf32_i860_reloc_type_lookup): New function.
6574 (elf32_i860_info_to_howto_rela): New function.
6575 (elf_code_to_howto_index): New structure.
6576 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6577 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6578 elf32_i860_reloc_type_lookup.
6579
6580 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6581
6582 * som.c (struct fixup_format): Constify `format'.
6583 (som_hppa_howto_table): Use SOM_HOWTO macro.
6584 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6585 (som_bfd_reloc_type_lookup): Likewise.
6586 (compare_subspaces): Remove unused `count1', `count2'.
6587 (som_begin_writing): Remove unused `total_reloc_size'.
6588 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6589 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6590 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6591 (som_find_nearest_line): Decorate unused parameter(s).
6592 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6593 (som_bfd_link_split_section): Likewise.
6594
6595 2000-08-03 Nick Clifton <nickc@cygnus.com>
6596
6597 * section.c: Restore backed out code.
6598 * elf.c: Restore backed out code.
6599 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6600 binaries from working.
6601 * bfd-in2.h: Regenerate.
6602
6603 2000-08-03 H.J. Lu <hjl@gnu.org>
6604
6605 * section.c: Back out the change made by Nick Clifton
6606 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6607 binaries.
6608 * bfd-in2.h: Likewise.
6609 * elf.c: Likewise.
6610
6611 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6612
6613 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6614
6615 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6616
6617 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6618 * bfd-in2.h, libbfd.h: Regenerate.
6619
6620 2000-07-31 Nick Clifton <nickc@cygnus.com>
6621
6622 * section.c (struct sec): Add new boolean field 'segment_mark'.
6623 (STD_SECTION): Initialise new field to zero.
6624
6625 * bfd-in2.h: Regenerate.
6626
6627 * elf.c (copy_private_bfd_data): Reorganise section to segment
6628 mapping to cope with moved sections requiring new segments,
6629 and overlapping segments.
6630 (SEGMENT_END): New macro: Return the end address of a segment.
6631 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6632 contains a section by comparing their VMA addresses.
6633 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6634 contains a section by comparing their LMA addresses.
6635 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6636 section should be included in a segment.
6637 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6638 follows another in memory.
6639 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6640 segments overlap.
6641
6642 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6643
6644 * cpu-i860.c: Added comments.
6645
6646 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6647 bfd_elf32_i860_little_vec.
6648 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6649 (ELF_MAXPAGESIZE): Changed to 4096.
6650
6651 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6652 new target.
6653 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6654
6655 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6656 config for little endian elf32 i860.
6657 (targ_defvec): Define for the new config above
6658 as "bfd_elf32_i860_little_vec".
6659 (targ_selvecs): Define for the new config above
6660 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6661
6662 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6663 of new target vec.
6664
6665 * configure: Regenerated.
6666
6667 2000-07-27 H.J. Lu <hjl@gnu.org>
6668
6669 * elflink.h (elf_merge_symbol): Take one more argument,
6670 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6671 entry. Don't overide the existing weak definition if dt_needed
6672 is true.
6673 (elf_link_add_object_symbols): Pass dt_needed to
6674 elf_merge_symbol ().
6675
6676 2000-07-27 Nick Clifton <nickc@cygnus.com>
6677
6678 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6679 allocated contents.
6680
6681 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6682
6683 * configure.host (*-*-aix*): AIX has 'long long' always.
6684
6685 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6686 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6687 (xcoff_write_archive_contents_big): Don't update the offset
6688 of the symbol table, xcoff_write_armap will do it.
6689
6690 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6691
6692 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6693 of dynobj for SGI_COMPAT checks.
6694
6695 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6696
6697 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6698 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6699 * bfd-in2.h: Regenerate.
6700
6701 2000-07-21 Nick Clifton <nickc@cygnus.com>
6702
6703 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6704 range symbol indices in relocs and issue an error message.
6705
6706 2000-07-20 H.J. Lu <hjl@gnu.org>
6707
6708 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6709 info->new_dtags when setting DT_FLAGS_1. It will only be set
6710 by the new linker options. It shouldn't break anything.
6711
6712 2000-07-20 H.J. Lu <hjl@gnu.org>
6713
6714 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6715 only if info->new_dtags is true.
6716
6717 2000-07-20 H.J. Lu <hjl@gnu.org>
6718
6719 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6720 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6721
6722 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6723
6724 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6725 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6726 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6727 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6728 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6729 * Makefile.in: Rebuild.
6730 * aclocal.m4: Rebuild.
6731 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6732 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6733 (bfd_cris_arch): Declare.
6734 (bfd_archures_list): Add bfd_cris_arch.
6735 * bfd-in2.h: Rebuild.
6736 * config.bfd: (cris-*-*): New target.
6737 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6738 * configure: Rebuild.
6739 * elf.c (prep_headers): Add bfd_arch_cris.
6740 * libbfd.h: Rebuild.
6741 * libaout.h (enum machine_type): Add M_CRIS.
6742 * reloc.c: Add CRIS relocations.
6743 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6744 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6745 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6746 * po/POTFILES.in, po/bfd.pot: Regenerate.
6747
6748 2000-07-19 H.J. Lu <hjl@gnu.org>
6749
6750 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6751 DF_TEXTREL if DT_TEXTREL is set.
6752 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6753 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6754 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6755 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6756 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6757 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6758 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6759 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6760 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6761 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6762
6763 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6764 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6765 DT_RPATH is set.
6766 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6767
6768 2000-07-19 H.J. Lu <hjl@gnu.org>
6769
6770 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6771 * bfd-in2.h: Rebuild.
6772
6773 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6774 (elf_dt_soname): New.
6775
6776 * elf.c (bfd_elf_set_dt_needed_soname): New.
6777
6778 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6779 entry if the shared object loaded by DT_NEEDED is used to
6780 resolve the reference in a regular object.
6781
6782 2000-07-19 H.J. Lu <hjl@gnu.org>
6783
6784 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6785 DT_DEPAUDIT and DT_AUDIT as strings.
6786
6787 2000-07-19 Nick Clifton <nickc@cygnus.com>
6788
6789 * format.c: Fix formatting.
6790
6791 2000-07-19 H.J. Lu <hjl@gnu.org>
6792
6793 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6794
6795 2000-07-19 H.J. Lu <hjl@gnu.org>
6796
6797 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6798 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6799 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6800 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6801 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6802 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6803 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6804
6805 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6806
6807 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6808 renamed functions from here...
6809 (assign_section_numbers): Use renamed functions.
6810 (prep_headers): Use renamed functions.
6811
6812 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6813 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6814 * bfd-in2.h: Regenerate.
6815
6816 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6817
6818 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6819 parenthesis in if statement.
6820
6821 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6822
6823 Enable the support for Traditional MIPS.
6824 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6825 return ict_none appropriately for traditional mips targets.
6826 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6827 (STUB_MOVE): Conditionalize for traditonal mips.
6828 (STUB_LI16): Likewise.
6829 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6830 room for RTPROC header.
6831 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6832 the permission for the PT_DYNAMIC as read, write and execute.
6833 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6834 for traditonal mips.
6835 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6836 _DYNAMIC_LINKING for traditonal mips.
6837 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6838 in case of traditonal mips.
6839 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6840 entry is required. For a function if PLT is not required then set the
6841 corresponding hash table entry to 0.
6842 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6843 traditonal mips.
6844 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6845 shared object set the value to 0.
6846 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6847 _DYNAMIC_LINKING for traditonal mips.
6848 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6849 for traditonal mips.
6850
6851 2000-07-15 H.J. Lu <hjl@gnu.org>
6852
6853 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6854
6855 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6856
6857 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6858 out a structure that is BFD_IN_MEMORY.
6859
6860 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6861
6862 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6863 bfd pointer. Print section id instead of bfd pointer for local
6864 syms. Prefix addend with `+' for global syms as well as local.
6865 Correct calculation of name component lengths.
6866 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6867
6868 From David Huggins-Daines <dhd@linuxcare.com>
6869 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6870 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6871 (elf64_hppa_modify_segment_map): Likewise.
6872
6873 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6874
6875 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6876 addresses to be "naturally" sign extended. Return -1 if unknown.
6877 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6878 * bfd-in2.h: Regenerate.
6879
6880 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6881
6882 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6883 and ECOF_SIGNED_64 to list ways to extract an offset.
6884 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6885 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6886 Update.
6887 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6888 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6889
6890 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6891
6892 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6893 bfd_get_start_address.
6894 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6895 (elf_swap_ehdr_out): Ditto.
6896
6897 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6898
6899 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6900 compatibility with older binutils.
6901
6902 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6903
6904 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6905 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6906
6907 From Ryan Bradetich <rbradetich@uswest.net>
6908 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6909 (parse_line_table): Ditto.
6910 (_bfd_dwarf1_find_nearest_line): Ditto.
6911 * syms.c (cmpindexentry): Remove extra `*' from params.
6912
6913 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6914
6915 * elf32-mips.c (sort_dynamic_relocs): New Function.
6916 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6917 via qsort to sort the dynamic relocations in increasing r_symndx
6918 value.
6919
6920 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6921
6922 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6923 ATTRIBUTE_UNUSED to unused args.
6924 (get_opd): Likewise.
6925 (get_plt): Likewise.
6926 (get_dlt): Likewise.
6927 (get_stub): Likewise.
6928 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6929 (elf64_hppa_link_output_symbol_hook): Likewise.
6930 (elf64_hppa_check_relocs): Delete unused var.
6931 (elf64_hppa_size_dynamic_sections): Likewise.
6932 (elf64_hppa_finalize_opd): Likewise.
6933 (elf64_hppa_finalize_dynreloc): Likewise.
6934 (elf64_hppa_modify_segment_map): Likewise.
6935 (elf64_hppa_finish_dynamic_sections): Likewise.
6936
6937 * elf-hppa.h (elf_hppa_final_write_processing): Add
6938 ATTRIBUTE_UNUSED to unused args.
6939 (elf_hppa_final_link_relocate): Likewise.
6940 (elf_hppa_record_segment_addrs): Add paretheses.
6941 (elf_hppa_relocate_section): Constify dyn_name.
6942
6943 From David Huggins-Daines <dhd@linuxcare.com>
6944 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6945 rearrange case statement so that it gets preferred to 32-bit ones.
6946
6947 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6948 asection->id instead of address of asection structure.
6949 (elf32_hppa_size_stubs): Likewise.
6950
6951 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6952 for .init* and .fini*.
6953
6954 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6955 and addends used in stub names to 32 bits.
6956 (elf32_hppa_size_stubs): Likewise.
6957
6958 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6959 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6960 not bfd_put_64. Fix minor comment typo and formatting.
6961
6962 Changes to create multiple linker stubs, positioned immediately
6963 before the section where they are required.
6964 * elf32-hppa.c: Don't include hppa_stubs.h.
6965 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6966 (elf32_hppa_stub_hash_table): Delete.
6967 (elf32_hppa_link_hash_entry): Delete.
6968 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6969 stub_hash_table, and store the struct here rather than a pointer.
6970 Delete output_symbol_count. Add offset array. Change
6971 global_value to a bfd_vma.
6972 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6973 (elf32_hppa_stub_hash_traverse): Delete.
6974 (elf32_hppa_name_of_stub): Delete.
6975 (elf32_hppa_link_hash_lookup): Delete.
6976 (elf32_hppa_link_hash_traverse): Delete.
6977 (elf32_hppa_stub_hash_table_init): Delete.
6978 (elf32_hppa_size_of_stub): Pass input section and offset rather
6979 than location and calculate location here. Don't pass name as all
6980 stubs are now the same size.
6981 (elf32_hppa_stub_hash_newfunc): Init new fields.
6982 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6983 too.
6984 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6985 comparing against ints. Rewrite stub handling code.
6986 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6987 Case enums to int before comparing against ints. Remove
6988 bfd_reloc_dangerous case.
6989 (elf32_hppa_build_one_stub): Rewrite.
6990 (elf32_hppa_size_one_stub): New function.
6991 (elf32_hppa_build_stubs): Rewrite.
6992 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6993 Rewrite stub-handling specific code.
6994
6995 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6996
6997 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6998
6999 * hppa_stubs.h: Delete.
7000 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7001 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7002 * Makefile.in: Regenerate.
7003
7004 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7005 e_nlrsel.
7006
7007 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7008
7009 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7010 and section name for bfd_reloc_notsupported error message.
7011 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7012 bfd_reloc_notsupported.
7013 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7014
7015 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7016 undefined weak symbols for all relocs.
7017 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7018 offsets are relative to one past the delay slot.
7019 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7020 branch destination. Put addend into stub name too.
7021 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7022 adjust by 8 when deciding whether a linker stub is needed. Put
7023 addend into stub name as for above.
7024
7025 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7026 various args and vars.
7027 (elf32_hppa_bfd_final_link_relocate): Here too.
7028 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7029 inner block var to avoid shadowing.
7030
7031 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7032 unsigned.
7033 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7034 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7035 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7036
7037 * libhppa.h: Change practically all unsigned ints to plain ints.
7038 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7039 prototypes.
7040
7041 From Ryan Bradetich <rbradetich@uswest.net>
7042 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7043 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7044 suit above.
7045 From David Huggins-Daines <dhd@linuxcare.com>
7046 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7047 to the new OP_* ones.
7048
7049 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7050 error exit. Bail out earlier on plabel relocs that we aren't
7051 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7052 string, and then don't free our copy.
7053 (elf32_hppa_build_one_stub): Make insn unsigned int.
7054
7055 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7056 available with BL, not BE and BLE.
7057
7058 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7059 code for elf arg relocs.
7060 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7061 argument with elf_link_hash_entry h. Handle undefined weak
7062 symbols. Move $global$ lookup from here...
7063 (elf32_hppa_relocate_section): ...to here. Return correct error
7064 message for non-handled relocs.
7065 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7066 wrong test was -0x3ffff to +0x40000.
7067
7068 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7069 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7070 Handle them as such.
7071 (elf_hppa_relocate_insn): Fix a typo.
7072
7073 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7074 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7075 assemble_17, assemble_21): Delete.
7076 Supply defines for all 64 possible opcodes.
7077 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7078 formats. Handle COMICLR.
7079 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7080 -10, -16, 16, 22.
7081
7082 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7083 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7084 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7085 to suit.
7086 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7087 the local syms - did this code get deleted accidentally? Ignore
7088 undefined and undefweak syms.
7089
7090 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7091 block. Use it instead of elf64_hppa_hash_table (info).
7092 (elf_hppa_final_link_relocate): Use hppa_info instead of
7093 elf64_hppa_hash_table (info).
7094
7095 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7096 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7097 (hppa_rebuild_insn): Mask immediate bits here instead.
7098 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7099
7100 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7101
7102 * section.c (struct sec): Add id field. Tidy comment formatting.
7103 (bfd_make_section_anyway): Set id.
7104 (STD_SECTION): Init id too.
7105 Change CONST to const throughout.
7106 * archures.c (bfd_arch_info): Tidy comment.
7107 (bfd_arch_list): Change a CONST to const.
7108 * libbfd-in.h: Tidy comments and replace CONST with const.
7109 * elf-bfd.h: Likewise.
7110 * libbfd.h: Regenerate.
7111 * bfd-in2.h: Regenerate.
7112 * libcoff.h: Regenerate.
7113
7114 2000-07-07 DJ Delorie <dj@redhat.com>
7115
7116 * archive.c (_bfd_write_archive_contents): Add an informative
7117 comment.
7118
7119 2000-07-06 Kazu Hirata <kazu@hxi.com>
7120
7121 * srec.c: Fix formatting.
7122
7123 2000-06-05 DJ Delorie <dj@redhat.com>
7124
7125 * MAINTAINERS: new
7126
7127 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7128
7129 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7130 value of PC-relative offsets.
7131
7132 2000-07-03 Jim Wilson <wilson@cygnus.com>
7133
7134 * elf64-alpha.c (alpha_elf_size_info): New.
7135 (elf_backend_size_info): Define to alpha_elf_size_info.
7136 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7137
7138 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7139
7140 * elf32-mips.c: Include elf32-target.h again for the traditional
7141 MIPS targets.
7142
7143 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7144
7145 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7146 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7147 (avr_info_to_howto_rela): Likewise.
7148 (elf32_avr_gc_mark_hook): Likewise.
7149 (elf32_avr_gc_sweep_hook): Likewise.
7150 (elf32_avr_relocate_section): Likewise.
7151
7152 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7153
7154 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7155 an external symbol for a non-shared, non-relocatable link.
7156
7157 2000-07-03 Nick Clifton <nickc@redhat.com>
7158
7159 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7160 is an external symbol.
7161 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7162 external symbol.
7163
7164 2000-07-03 Kazu Hirata <kazu@hxi.com>
7165
7166 * reloc16.c: Fix formatting.
7167
7168 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7169
7170 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7171 to add a new target for traditional mips i.e
7172 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7173 * configure.in: Likewise.
7174 * configure: Rebuild.
7175 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7176 bfd_target_vector.
7177 (bfd_elf32_tradlittlemips_vec): Likewise.
7178 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7179 to see that elfNN_bed does not get redefined even if the target file
7180 is included twice for a chip. See elf32-mips.c.
7181
7182 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7183
7184 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7185 (CLEANFILES): Add DEPA.
7186 * Makefile.in: Regenerate.
7187
7188 2000-06-30 DJ Delorie <dj@cygnus.com>
7189
7190 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7191 can't assume the PE header is at 0x80.
7192
7193 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7194
7195 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7196
7197 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7198
7199 * go32stub.h: Update stub.
7200
7201 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7202
7203 * archures.c (bfd_mach_avr5): Define.
7204 * bfd-in2.h (bfd_mach_avr5): Define.
7205 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7206 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7207 (compatible): Update comment. Add missing test.
7208 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7209 for avr2 and avr4. Simplify 8K wrap code.
7210 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7211 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7212
7213 2000-06-26 Kazu Hirata <kazu@hxi.com>
7214
7215 * coff-h8300.c: Fix formatting.
7216 * cpu-h8300.c: Likewise.
7217
7218 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7219
7220 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7221 for local symbols whose names are unknown.
7222
7223 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7224
7225 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7226 find one.
7227 * Makefile.in: Regenerate.
7228 * doc/Makefile.in: Regenerate.
7229
7230 2000-06-20 H.J. Lu <hjl@gnu.org>
7231
7232 * Makefile.am: Rebuild dependency.
7233 * Makefile.in: Rebuild.
7234
7235 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7236
7237 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7238 (elf_backend_copy_indirect_symbol): Map to the new function.
7239
7240 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7241
7242 * archive.c (normalize): Correct pointer comparison when checking
7243 for backslashes.
7244 (bfd_bsd_truncate_arname): Likewise.
7245 (bfd_gnu_truncate_arname): Likewise.
7246
7247 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7248
7249 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7250 sections elf_{text,data}_{section,symbol}.
7251 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7252 (_bfd_mips_elf_hide_symbol): New function.
7253 (elf_backend_hide_symbol): Map to the new function.
7254 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7255 definitions of mips_elf_{text,data}_{section,symbol}.
7256 (mips_elf_local_relocation_p): Try to find the direct symbol
7257 based on new check_forced argument.
7258 (mips_elf_calculate_relocation): Use new version of
7259 mips_elf_local_relocation_p.
7260 (mips_elf_relocate_section): Likewise.
7261 (_bfd_mips_elf_relocate_section): Likewise.
7262 (mips_elf_sort_hash_table): Only assert that have enough GOT
7263 space.
7264 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7265 entry if the relocation based on the new external argument.
7266 (mips_elf_create_dynamic_relocation): Assert that we have a
7267 section contents allocated where we can swap out the dynamic
7268 relocations.
7269 (mips_elf_calculate_relocation): Find the real hash-table entry
7270 correctly by using h->root.root.type. Only create a dynamic
7271 relocation entry if the symbol is defined in a shared library.
7272 Create an external GOT entry for the GOT16 relocation if the
7273 symbol was forced local.
7274 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7275 dynamic index if the symbol was forced local.
7276
7277 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7278
7279 * elf32-mips.c: Fix typos in comments.
7280
7281 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7282
7283 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7284 CORE_VERSION_1.
7285
7286 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7287
7288 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7289 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7290 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7291 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7292 (bfd_elf32_m68hc11_vec): Likewise.
7293 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7294 Supports 68hc11 & 68hc12 at the same time.
7295 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7296 bfd_target_vector.
7297 (bfd_elf32_m68hc11_vec): Likewise.
7298 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7299 * archures.c (bfd_m68hc12_arch): Define and register in global list
7300 (bfd_m68hc11_arch): Likewise.
7301 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7302 BFD_RELOC_M68HC11_3B): Define.
7303 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7304 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7305
7306 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7307
7308 * elf_bfd.h (struct elf_backend_data): Add info argument to
7309 elf_backend_hide_symbol.
7310 (_bfd_elf_link_hash_hide_symbol): Likewise.
7311 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7312 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7313 * elflink.h (elf_link_add_object_symbols): Likewise.
7314 (elf_link_assign_sym_version): Likewise.
7315
7316 2000-06-18 H.J. Lu <hjl@gnu.org>
7317
7318 * coff-i386.c (coff_i386_reloc): Don't return in case of
7319 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7320 Compensate PE relocations when linking with non-PE object
7321 files to generate a non-PE executable.
7322
7323 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7324
7325 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7326 GOT entries if we're doing a static link or -Bsymbolic link.
7327
7328 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7329
7330 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7331 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7332 available.
7333 (elf_link_output_relocs): Likewise.
7334 (elf_reloc_link_order): Likewise.
7335
7336 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7337
7338 * archures.c (enum bfd_architecture): #define constants for
7339 PowerPc and RS6000 machine numbers.
7340 * bfd-in2.h: Regenerate.
7341 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7342 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7343 and RS6000 machine numbers using #defined constants from
7344 archures.c.
7345 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7346 machine numbers using #defined constants from archures.c. Add
7347 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7348 64-bit words in 620 entry.
7349 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7350 RSC, and RS2.
7351 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7352
7353 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7354
7355 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7356 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7357 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7358
7359 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7360
7361 * bfd-in.h (bfd_family_coff): Define.
7362 * bfd-in2.h: Regenerate.
7363 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7364 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7365 instead of bfd_target_coff_flavour.
7366 * cofflink.c (_bfd_coff_final_link): Likewise.
7367 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7368 exclude XCOFF files.
7369 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7370 Likewise.
7371 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7372 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7373 * xcofflink.c (XCOFF_XVECP): Delete.
7374 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7375 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7376 bfd_xcoff_record_link_assignment,
7377 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7378 check for bfd_target_xcoff_flavour.
7379
7380 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7381
7382 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7383 files on AIX 4.3.
7384 (read_hdr): New function.
7385 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7386 of trying to extract individual registers. Set abfd->arch_info
7387 to match the architecture that created the core file.
7388 (rs6000coff_get_section_contents): Delete.
7389 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7390
7391 2000-06-14 H.J. Lu <hjl@gnu.org>
7392
7393 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7394 is NULL.
7395
7396 2000-06-13 H.J. Lu <hjl@gnu.org>
7397
7398 * configure: Regenerate.
7399
7400 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7401
7402 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7403 armpei_little_vec.
7404
7405 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7406
7407 * configure.in (VERSION): Update to show this is the CVS mainline.
7408
7409 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7410
7411 * elf32-d10v.c: Include elf/d10v.h
7412 (enum reloc_type): Delete.
7413 * elf32-d30v.c: Include elf/d30v.h
7414 (enum reloc_type): Delete.
7415
7416 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7417 * Makefile.in: Regenerate.
7418
7419 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7420 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7421 move HOWTOs into elf_howto_table.
7422 (R_386_standard, R_386_ext_offset): Define.
7423 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7424 (elf_i386_reloc_type_lookup): Modify calculation of index into
7425 elf_howto_table since we've removed the padding.
7426 (elf_i386_info_to_howto_rel): Likewise.
7427 (elf_i386_relocate_section): Likewise.
7428
7429 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7430
7431 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7432
7433 2000-06-05 H.J. Lu <hjl@gnu.org>
7434
7435 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7436 an error when seeing an undefined symbol with hidden/internal
7437 attribute. It is handled in *_relocate_section ().
7438
7439 2000-06-05 H.J. Lu <hjl@gnu.org>
7440
7441 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7442 indirect symbol for the ELF_LINK_NON_ELF bit.
7443 (elf_link_output_extsym): Don't output the indirect symbol even
7444 if the ELF_LINK_NON_ELF bit is set.
7445
7446 2000-06-01 J.T. Conklin <jtc@redback.com>
7447
7448 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7449 (i[3456]86-*-netbsdaout*): New target.
7450 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7451 (i[3456]86-*-openbsd*): Likewise.
7452
7453 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7454
7455 * trad-core.c: From hpux-core.c, include <dirent.h> or
7456 <sys/ndir.h> when possible.
7457
7458 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7459
7460 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7461 definitions. We must not assume they are sorted in the file
7462 according to their index numbers.
7463
7464 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7465
7466 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7467 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7468 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7469
7470 2000-05-30 Nick Clifton <nickc@cygnus.com>
7471
7472 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7473 80960CA, 80960MC as valid machine names.
7474
7475 2000-05-30 H.J. Lu <hjl@gnu.org>
7476
7477 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7478 visibility bits if the symbol is undefined. Correctly handle
7479 weak undefined symbols with hidden and internal attributes.
7480
7481 * elflink.h (elf_link_add_object_symbols): Always turn the
7482 symbol into local if it has the hidden or internal attribute.
7483
7484 2000-05-29 Philip Blundell <philb@gnu.org>
7485
7486 * ppcboot.c: Add packed attribute if compiling with GCC.
7487
7488 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7489
7490 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7491
7492 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7493
7494 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7495 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7496 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7497 a few old comments.
7498
7499 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7500
7501 * Makefile.am: Update dependencies with "make dep-am"
7502 * Makefile.in: Regenerate.
7503
7504 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7505 bindtextdomain): Replace defines with those from intl/libgettext.h
7506 to quieten gcc warnings.
7507
7508 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7509
7510 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7511
7512 * archive.c (normalize, bfd_bsd_truncate_arname,
7513 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7514 file names with backslashes.
7515
7516 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7517 before opening it.
7518
7519 * sysdep.h: Include filenames.h.
7520
7521 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7522
7523 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7524
7525 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7526
7527 * elf64-sparc.c (sparc64_elf_relax_section): New.
7528 (sparc64_elf_relocate_section): Optimize tail call into branch always
7529 if possible.
7530 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7531 (elf32_sparc_relax_section): New.
7532
7533 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7534
7535 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7536 Remove unusued variables.
7537 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7538 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7539 previous fix, so that shared libs really don't influence targets
7540 extension mask and memory model.
7541
7542 2000-05-23 H.J. Lu <hjl@gnu.org>
7543
7544 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7545 h->root.other not h->other.
7546 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7547
7548 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7549
7550 2000-05-23 H.J. Lu <hjl@gnu.org>
7551
7552 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7553 undefined symbol with the non-default visibility attributes.
7554 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7555 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7556 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7557 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7558 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7559 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7560 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7561 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7562 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7563 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7564 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7565
7566 2000-05-22 Richard Henderson <rth@cygnus.com>
7567
7568 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7569 PCREL22, PCREL64I. Zero size of special relocs.
7570 (elf64_ia64_reloc_type_lookup): Likewise.
7571 (USE_BRL, oor_brl, oor_ip): New.
7572 (elf64_ia64_relax_section): New.
7573 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7574 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7575 (elf64_ia64_relocate_section): Likewise.
7576 (bfd_elf64_bfd_relax_section): New.
7577 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7578 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7579 * bfd-in2.h, libbfd.h: Regenerate.
7580
7581 2000-05-22 Nick Clifton <nickc@cygnus.com>
7582
7583 * configure.in : Add peigen.lo to MIPS PE targets.
7584 * configure: Regenerate.
7585
7586 2000-05-22 Momchil Velikov <velco@fadata.bg>
7587
7588 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7589 only if it is known for both input and output bfds. Separate
7590 error message strings as in some languages, it may be necessary
7591 to change more than one place in the string to change between
7592 'big' and 'little'.
7593
7594 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7595 endianess checks, call _bfd_generic_verify_endian_match() instead.
7596
7597 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7598
7599 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7600
7601 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7602 endianess before checking bfd flavours.
7603
7604 2000-05-22 H.J. Lu <hjl@gnu.org>
7605
7606 * elflink.h (elf_link_output_extsym): Clear the visibility
7607 field for symbols not defined locally.
7608
7609 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7610
7611 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7612 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7613 (hppa_rebuild_insn): Mask immediate bits here instead.
7614 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7615
7616 2000-05-18 Momchil Velikov <velco@fadata.bg>
7617
7618 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7619 relocs for an executable, ensure that they are virtual addresses.
7620
7621 2000-05-18 Jeffrey A Law (law@cygnus.com)
7622
7623 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7624
7625 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7626 Rick Gorton <gorton@scrugs.lkg.dec.com>
7627
7628 * elflink.h: Add emitrelocations support: when enabled, relocation
7629 information and relocation sections are put into final output
7630 executables. If the emitrelocations flag is set, do the following:
7631 (elf_bfd_final_link): Emit relocation sections.
7632 (elf_link_input_bfd): Compute relocation section contents.
7633 (elf_gc_sections): Don't clean relocation sections.
7634
7635 2000-05-16 Catherine Moore <clm@cygnus.com>
7636
7637 * som.c (som_decode_symclass): Recognize weak symbols.
7638
7639 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7640
7641 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7642 read idata section only from dataoff.
7643 (pe_print_edata): Correctly check for valid eat_member.
7644
7645 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7646
7647 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7648
7649 2000-05-14 Philip Blundell <philb@gnu.org>
7650
7651 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7652
7653 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7654
7655 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7656
7657 * peigen.c (pe_print_idata): Look for .idata section and print
7658 info even if data directory has zero entries. Read idata section
7659 starting from dataoff, and adjust all data offsets to suit. Cast
7660 all bfd_vma vars to unsigned long before passing to fprintf.
7661 * peigen.c (pe_print_edata): Similarly, look for .edata section
7662 and print info even if data directory has zero entries. Cast
7663 all bfd_vma vars to unsigned long before passing to fprintf.
7664
7665 From Szabolcs Szakacsits <szaka@F-Secure.com>
7666 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7667 directory size which may be bogus.
7668 * peigen.c (pe_print_edata): Similarly.
7669
7670 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7671
7672 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7673 section is empty.
7674 (copy_private_bfd_data): Allow for space possibly taken up by elf
7675 headers when calculating segment physical address from lma.
7676
7677 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7678
7679 * versados.c (versados_scan): Init stringlen and pass_2_done.
7680
7681 * trad-core.c (trad_unix_core_file_p): Return
7682 bfd_error_wrong_format rather than bfd_error_file_truncated.
7683
7684 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7685 add_data_entry. DataDirectory virtual address is relative.
7686 (pe_print_idata): Account for relative DataDirectory virtual
7687 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7688 (pe_print_edata): Similarly.
7689
7690 From Szabolcs Szakacsits <szaka@F-Secure.com>
7691 * peigen.c (dir_names): Add Delay Import Directory.
7692 (pe_print_idata): Always search for bfd section containing
7693 idata address rather than looking up section name. Print this
7694 section name rather than .idata.
7695 (pe_print_edata): Similarly. Also print some fields as %08lx.
7696 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7697 Win32Version.
7698
7699 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7700
7701 * xcoff.h: Rename to xcoff-target.h
7702 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7703 * coff-rs6000.c: Ditto.
7704 * coff64-rs6000.c: Ditto.
7705 * coff-pmac.c: Ditto.
7706 * Makefile.in: Regenerate.
7707
7708 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7709
7710 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7711 Change U802TOC64MAGIC to U803XTOCMAGIC.
7712
7713 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7714
7715 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7716 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7717 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7718
7719 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7720
7721 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7722
7723 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7724
7725 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7726 hidden and internal symbols.
7727 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7728 visibility.
7729 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7730 assign a PLT or GOT entry to symbols with hidden and
7731 internal visibility.
7732
7733 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7734
7735 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7736 the .bss section.
7737 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7738
7739 2000-05-02 H.J. Lu <hjl@gnu.org>
7740
7741 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7742 ELFOSABI_SYSV.
7743
7744 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7745
7746 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7747 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7748 dependencies.
7749 * Makefile.in: Regenerate.
7750
7751 2000-05-01 Jim Wilson <wilson@cygnus.com>
7752
7753 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7754 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7755 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7756 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7757 * Makefile.in: Rebuild.
7758
7759 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7760
7761 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7762 doesn't work very well.
7763
7764 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7765 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7766 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7767 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7768 (elf_hppa_info_to_howto): Likewise.
7769 (elf_hppa_info_to_howto_rel): Likewise.
7770 (elf_hppa_reloc_type_lookup): Likewise.
7771 (elf_hppa_is_local_label_name): Likewise.
7772 (elf_hppa_fake_sections): Likewise.
7773 (elf_hppa_final_write_processing): Likewise.
7774 (elf_hppa_howto_table): Fully initialise all entries.
7775 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7776 (elf_hppa_info_to_howto): Likewise.
7777 (elf_hppa_info_to_howto_rel): Likewise.
7778 (elf_hppa_reloc_type_lookup): Likewise.
7779 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7780 elf_hppa_unmark_useless_dynamic_symbols,
7781 elf_hppa_remark_useless_dynamic_symbols,
7782 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7783 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7784 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7785 elf32-hppa.c mess is cleaned up.
7786 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7787 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7788 r_field then call hppa_field_adjust inline func with variable
7789 r_field arg, instead call hppa_field_adjust with fixed arg.
7790 In case R_PARISC_PCREL22F, don't set r_field.
7791 (elf_hppa_relocate_insn): Change args and return type to unsigned
7792 int. Call re_assemble_* funcs to do the work.
7793
7794 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7795 sign extending.
7796
7797 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7798 extending.
7799 (sign_extend): Mask first before sign extending.
7800 (low_sign_extend): Rewrite without condition expression.
7801 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7802 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7803 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7804 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7805 result as function return value rather than through pointer arg.
7806 Accept unsigned int args, and return unsigned int.
7807 (re_assemble_3): New. Combines function of dis_assemble_3 with
7808 re-assembly of opcode and immediate.
7809 (re_assemble_12): Likewise.
7810 (re_assemble_16): Likewise.
7811 (re_assemble_17): Likewise.
7812 (re_assemble_21): Likewise.
7813 (re_assemble_22): Likewise.
7814 (hppa_field_adjust): Rewrite and document, paying attention to
7815 size of types and signed/unsigned issues.
7816 (get_opcode): Shift before masking.
7817 (FDLW): Rename to FLDW.
7818 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7819 (hppa_rebuild_insn): Change args and return value to unsigned
7820 int. Make use of re_assemble_*. Correct case 11.
7821
7822 * dep-in.sed: Handle ../opcodes/.
7823 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7824 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7825 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7826 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7827 elfarm-nabi.lo dependencies outside of auto-dependency area.
7828 Regenerate dependencies.
7829 * Makefile.in: Regenerate.
7830
7831 * configure.in (TRAD_HEADER): Test non-null before
7832 AC_DEFINE_UNQUOTED.
7833 * configure: Regenerate.
7834
7835 * reloc.c: Fix mis-spelling in comment.
7836
7837 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7838
7839 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7840 * vms.c (vms_openr_next_archived_file): Return NULL.
7841
7842 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7843
7844 * coffcode.h Copy changes mistakenly done to libcoff.h in
7845 4/24/2000 patch.
7846
7847 2000-04-29 Andreas Jaeger <aj@suse.de>
7848
7849 * libbfd-in.h: Correctly check GCC version.
7850 * bfd-in.h: Likewise.
7851 * libhppa.h: Likewise.
7852 * libbfd.h: Regenerate.
7853 * bfd-in2.h: Regenerate.
7854
7855 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7856
7857 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7858 coffdu-rs6000.{lo,c}.
7859 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7860 on xcoff.h
7861 * Makefile.in: Regenerate.
7862 * xcoff.h: New file.
7863 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7864 * coff-rs6000.c: Move all declarations and defines that are
7865 common to the xcoff backends into xcoff.h
7866 * coff64-rs6000.c: Ditto,
7867
7868 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7869
7870 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7871 _bfd_coff_force_symnames in strings and
7872 _bfd_coff_debug_string_prefix_length to their default values.
7873 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7874
7875 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7876
7877 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7878 _bfd_coff_force_symnames in strings and
7879 _bfd_coff_debug_string_prefix_length to their default values.
7880
7881 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7882
7883 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7884 Check local_got_refcounts before dereferencing.
7885
7886 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7887 before deciding we don't need R_PPC_PLT32 relocation.
7888 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7889 dereferencing.
7890
7891 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7892
7893 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7894 .plt entries.
7895 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7896 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7897 (elf_i386_relocate_section): Allow for .plt to go missing.
7898 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7899 can use a relative reloc for got as elf_i386_relocate_section.
7900 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7901
7902 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7903
7904 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7905
7906 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7907
7908 * Makefile.am (coff64-rs6000.lo): New rule.
7909 * Makefile.in: Regenerate.
7910 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7911 xcoff_is_local_label_name, xcoff_rtype2howto,
7912 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7913 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7914 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7915 (NO_COFF_SYMBOLS): Define.
7916 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7917 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7918 internally.
7919 (MINUS_ONE): New macro.
7920 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7921 relocation.
7922 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7923 coff_SWAP_aux_out): Map to the new functions.
7924 * coff64-rs6000.c: New file.
7925 * libcoff.h (bfd_coff_backend_data): Add new fields
7926 _bfd_coff_force_symnames_in_strings and
7927 _bfd_coff_debug_string_prefix_length.
7928 (bfd_coff_force_symnames_in_strings,
7929 bfd_coff_debug_string_prefix_length): New macros for above fields.
7930 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7931 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7932 of using coff_swap_sym_in directly.
7933 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7934 (coff_set_flags) Set magic for XCOFF64.
7935 (coff_compute_section_file_positions): Add symbol name length to
7936 string section length if bfd_coff_debug_string_prefix_length is
7937 true.
7938 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7939 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7940 using coff_swap_lineno_in directly.
7941 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7942 and _bfd_coff_debug_string_prefix_length fields.
7943 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7944 symbol names into strings table when
7945 bfd_coff_force_symnames_in_strings is true.
7946 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7947 SET_RELOC_VADDR): New macros.
7948 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7949 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7950 code.
7951 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7952 changes within RS6000COFF_C specific code.
7953 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7954 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7955 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7956 Extend existing hack on target name.
7957 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7958 target name.
7959 * coff-tic54x.c (ticof): Keep up to date with new fields
7960 in bfd_coff_backend_data.
7961 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7962 targ_selvecs to include rs6000coff64_vec for rs6000.
7963 * configure.in: Add rs6000coff64_vec case.
7964 * cpu-powerpc.c: New bfd_arch_info_type.
7965
7966 2000-04-24 Jeffrey A Law (law@cygnus.com)
7967
7968 * config.bfd: Only disable elf32-hppa vectors, not all of the
7969 BSD and OSF configuration support. Provide (disabled) clauses
7970 for PA64 support.
7971 * configure.in: Add clause for PA64 support.
7972 * configure: Rebuilt.
7973
7974 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7975 (bfd_elf64_hppa_vec): Declare.
7976
7977 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7978 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7979 (elf64-hppa.lo): Add dependencies.
7980 * Makefile.in: Rebuilt.
7981
7982 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7983
7984 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7985
7986 * libhppa.h (dis_assemble_16): New function.
7987 (pa_arch): Added pa20w element.
7988
7989 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7990
7991 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7992 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7993 bfd_elf64_slurp_reloc_table.
7994
7995 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7996 definitions to get external names.
7997 (elf_write_relocs): Renamed from write_relocs and make global.
7998 (elf_slurp_reloc_table): Make global.
7999 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8000
8001 * archive.c (hpux_uid_gid_encode): New function.
8002 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8003 defined and the ID is greater than 99999.
8004 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8005 special uid/gid fields into 32 bit values.
8006
8007 2000-04-21 Matthew Green <mrg@cygnus.com>
8008
8009 * config.bfd: Add NetBSD/sparc64 support.
8010
8011 2000-04-21 Richard Henderson <rth@cygnus.com>
8012 David Mosberger <davidm@hpl.hp.com>
8013 Timothy Wall <twall@cygnus.com>
8014 Jim Wilson <wilson@cygnus.com>
8015
8016 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8017 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8018 (BFD64_BACKENDS): Add elf64-ia64.lo.
8019 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8020 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8021 * Makefile.in: Rebuild.
8022 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8023 (bfd_ia64_arch): Declare.
8024 (bfd_archures_list): Add bfd_ia64_arch.
8025 * bfd-in2.h: Rebuild.
8026 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8027 * configure: Rebuild.
8028 * configure.host: (ia64-*-linux*): New host.
8029 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8030 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8031 * elf.c (prep_headers): Add bfd_arch_ia64.
8032 * libbfd.h: Rebuild.
8033 * reloc.c: Add IA-64 relocations.
8034 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8035 Declare.
8036 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8037 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8038
8039 2000-04-21 Richard Henderson <rth@cygnus.com>
8040
8041 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8042 contents when performing a partial link.
8043 (bfd_elf_d30v_reloc_21): Likewise.
8044
8045 2000-04-20 H.J. Lu <hjl@gnu.org>
8046
8047 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8048 patch to symbols defined by a shared object.
8049 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8050
8051 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8052
8053 K&R compiler fixes.
8054 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8055 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8056
8057 2000-04-11 David Mosberger <davidm@hpl.hp.com>
8058
8059 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8060 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8061 (coff-ia64.lo): Add dependency.
8062 * Makefile.in: Regenerate.
8063 * coff-ia64.c: New file.
8064 * efi-app-ia32.c: Ditto.
8065 * efi-app-ia64.c: Ditto.
8066 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8067 (coff_set_flags): Ditto.
8068 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8069 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8070 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8071 * configure: Regenerate.
8072 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8073 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8074 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8075 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8076 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8077 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8078 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8079 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8080 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8081 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8082 (GET_PDATA_ENTRY): Ditto.
8083 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8084 data_start. Use above macros to read fields that are 64 bit wide for
8085 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8086 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8087 FileAlignment and SectionAlignment to minimum alignment if they
8088 are zero.
8089 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8090 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8091 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8092 Use above macros to write fields that are 64 bit wide for
8093 COFF_WITH_PEP64.
8094 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8095 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8096 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8097 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8098 begin address, end address, and unwind info address only. Use
8099 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8100 print addresses.
8101 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8102 HIGH3ADJ relocation names.
8103 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8104 * targets.c: Declare bfd_efi_app_ia32_vec and
8105 bfd_efi_app_ia64_vec.
8106 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8107 bfd_efi_app_ia64_vec.
8108
8109 2000-04-17 Timothy Wall <twall@cygnus.com>
8110
8111 * bfd-in2.h: Add prototypes for tic54x load page access.
8112 * bfd-in.h: Regenerate.
8113 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8114 in customized _set_arch_mach function.
8115 * coffcode.h (coff_set_alignment_hook): Set section load page if
8116 the appropriate macro is defined.
8117 (write_object_contents): Read section load page.
8118
8119 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8120
8121 * elf32-hppa.h: Update copyright date.
8122
8123 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8124 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8125
8126 * elf32-d30v.c (MAX32): Don't use LL suffix.
8127 (MIN32): Define in terms of MAX32.
8128 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8129
8130 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8131 expression.
8132
8133 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8134
8135 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8136
8137 * dep-in.sed: Match space before file name, not after.
8138 * Makefile.am: Regenerate dependencies.
8139 * Makefile.in: Regenerate.
8140
8141 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8142 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8143 extend without an if statement.
8144
8145 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8146
8147 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8148 signed quantites.
8149 * elf32-mips.c (gprel16_with_gp): Likewise.
8150 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8151 here using -0x40000, not (int)0xfffc0000.
8152 (elf32_hppa_size_of_stub): Likewise.
8153
8154 2000-04-11 Timothy Wall <twall@cygnus.com>
8155
8156 * coff-tic54x.c: Now builds with all targets.
8157 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8158 * Makefile.in: Regenerate.
8159 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8160 unitialized variable.
8161
8162 2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
8163
8164 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8165 --enable-build-warnings option.
8166 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8167 * Makefile.in, configure: Re-generate.
8168
8169 2000-04-07 Nick Clifton <nickc@cygnus.com>
8170
8171 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8172 BFD_RELOC_THUMB_PCREL_BLX.
8173
8174 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8175 R_ARM_XPC25 and R_ARM_THM_PC22.
8176
8177 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8178 R_ARM_XPC25 and R_ARM_THM_XPC22.
8179 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8180 R_ARM_[XPC25|THM_XPC22].
8181
8182 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8183 elf/arm-oabi.h to elf/arm.h
8184
8185 * Makefile.am: Fix dependency for elfarm-oabi.c
8186 * Makefile.in: Regenerate.
8187
8188 * bfd-in2.h: Regenerate.
8189 * libbfd.h: Regenerate.
8190
8191 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8192
8193 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8194 and restore it on failure. Release newly allocated tdata on
8195 failure.
8196
8197 2000-04-07 Jim Wilson <wilson@cygnus.com>
8198
8199 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8200 (decode_line_info): Set it. Report error if unit->line_offset is
8201 equal to or larger than it.
8202
8203 2000-04-07 Timothy Wall <twall@cygnus.com>
8204
8205 * targets.c: Added vecs for tic54x.
8206 * reloc.c: Added relocs for tic54x.
8207 * libbfd.h: Regenerated.
8208 * configure: Add TI COFF vecs for tic54x.
8209 * configure.in: Ditto.
8210 * config.bfd (targ_cpu): Recognize new tic54x target.
8211 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8212 * bfd-in2.h: Add tic54x target and relocations.
8213 * Makefile.am, Makefile.in: Add tic54x target.
8214 * archures.c (bfd_archures_list): Add tic54x target.
8215 * coff-tic54x.c: New.
8216 * cpu-tic54x.c: New.
8217
8218 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8219
8220 * elfcore.h (elf_core_file_p): call backend_object_p which
8221 thereby gets an opportunity to update the arch/machine type.
8222
8223 2000-04-06 Timothy Wall <twall@cygnus.com>
8224
8225 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8226 class. Handle SEC_CLINK and SEC_BLOCK flags.
8227 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8228 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8229
8230 2000-04-06 Nick Clifton <nickc@cygnus.com>
8231
8232 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8233 EF_INTERWORK if this is an unknown EABI.
8234 (elf32_arm_merge_private_bfd_data): Check EABI version
8235 numbers. Only check EF_xxx flags if the EABI version number
8236 is unknown.
8237 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8238 if the EABI version number is unknown.
8239 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8240 if the EABI version number is unknown.
8241
8242 2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
8243
8244 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8245 BFD_RELOC_SH_LOOP_END.
8246 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8247 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8248 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8249 (sh_elf_reloc_loop): New function.
8250 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8251 any more.
8252 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8253 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8254 * bfd-in2.h, libbfd.h: Regenerate.
8255
8256 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8257
8258 * po/bfd.pot: Regenerate.
8259
8260 * Makefile.am: Remove extraneous mkdep comment.
8261 (MKDEP): Use gcc -MM rather than mkdep.
8262 (DEP): Quote when passing vars to sub-make. Add warning
8263 message to end.
8264 (DEP1): Rewrite for "gcc -MM".
8265 (CLEANFILES): Add DEP2.
8266 Update dependencies.
8267 * Makefile.in: Regenerate.
8268
8269 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8270
8271 * configure.in: Added corefile support for AIX 4.3. In particular,
8272 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8273 compiling rs6000-core.c.
8274 * configure: Regenerated.
8275
8276 2000-04-03 H.J. Lu <hjl@gnu.org>
8277
8278 * cache.c (bfd_open_file): Unlink the output file only if
8279 it has non-zero size.
8280
8281 2000-04-01 Ken Block USG <block@zk3.dec.com>
8282
8283 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8284 relative relocations for non-loaded sections in shared objects.
8285 (elf64_alpha_check_relocs): Similarly.
8286
8287 2000-04-03 Hans-Peter Nilsson <hp@axis.com>
8288
8289 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8290 BFD_RELOC_16 to switch for extended relocs.
8291 (MY_swap_ext_reloc_in): New.
8292 (MY_swap_ext_reloc_out): New.
8293 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8294 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8295 (NAME(aout,squirt_out_relocs)): Similarly use
8296 MY_swap_ext_reloc_out.
8297 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8298
8299 2000-04-03 Kazu Hirata <kazu@hxi.com>
8300
8301 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8302 the R_PCRWORD_B case.
8303
8304 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8305
8306 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8307 on some targets.
8308 * ihex.c : Ditto.
8309
8310 2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
8311
8312 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8313 HOWTO references to bfd_elf_generic_reloc, that have
8314 partial_inplace == true, now use the new function. The function
8315 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8316 extends its fixes to the R_M32R_{16,24,32} relocs.
8317 The new logic in m32r_elf_lo16_reloc() has been removed, and
8318 it instead calls the new routine to obtain that functionality.
8319
8320 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8321
8322 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8323 elf32_avr_check_relocs, avr_final_link_relocate,
8324 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8325 elf32_avr_object_p): Add prototypes.
8326 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8327 (bfd_elf_avr_final_write_processing): Make static.
8328
8329 2000-03-27 Denis Chertykov <denisc@overta.ru>
8330
8331 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8332 * archures.c (bfd_architecture): Add AVR architecture.
8333 (bfd_archures_list): Add reference to AVR architecture info.
8334 * elf.c (prep_headers): Handle bfd_arch_avr.
8335 * reloc.c: Add various AVR relocation enums.
8336 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8337 list.
8338 * Makefile.am: Add support for AVR elf.
8339 * configure.in: Likewise.
8340 * config.bfd: Likewise.
8341 * Makefile.in: Regenerate.
8342 * configure: This too.
8343 * bfd-in2.h: And this.
8344 * libbfd.h: And this.
8345
8346 2000-03-24 H.J. Lu <hjl@gnu.org>
8347
8348 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8349 (elf64_alpha_find_reloc_at_ofs): Likewise.
8350
8351 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8352
8353 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8354 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8355 allowable range used to be -2**(n-1) to 2**n-1.
8356 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8357 "boolean overflow" with "bfd_reloc_status_type flag".
8358
8359 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8360
8361 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8362
8363 2000-03-14 Kazu Hirata <kazu@hxi.com>
8364
8365 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8366 of shrinks properly, including the last reloc.
8367
8368 2000-03-13 Kazu Hirata <kazu@hxi.com>
8369
8370 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8371 check for R_MOVL2.
8372
8373 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8374
8375 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8376 a format mismatch rather than an "error" from bfd_read such as
8377 bfd_error_file_truncated.
8378
8379 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8380
8381 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8382 sign-extension and big-endian compensation for
8383 R_MIPS_64 even in ld -r.
8384
8385 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8386
8387 * elf32-mips.c (mips_elf_next_relocation): Rename from
8388 mips_elf_next_lo16_relocation, and generalize to look
8389 for any relocation type.
8390 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8391 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8392 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8393 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8394 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8395 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8396 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8397 (mips_rtype_to_howto): Likewise.
8398 (mips_elf_calculate_relocation): Handle new relocs.
8399 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8400 are paired. The addend for R_MIPS_GNU_REL16_S2
8401 is shifted right two bits.
8402
8403 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8404
8405 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8406 comment, and ensure it doesn't happen again.
8407 (bfd_install_relocation): Same here.
8408 (_bfd_relocate_contents): Don't bother assigning unused signmask
8409 shift result. Fix typos in comments.
8410 Remove trailing whitespace throughout file.
8411
8412 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8413
8414 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8415 * bfd-in2.h: Rebuild.
8416
8417 2000-03-06 Nick Clifton <nickc@cygnus.com>
8418
8419 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8420 sym_ptr_ptr fields.
8421 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8422 (SIZEOF_ILF_STRINGS): Redefine.
8423 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8424 relative reloc, as opposed to a section relative reloc.
8425 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8426 not C_LABEL.
8427 Add length of symbol's prefix to string pointer.
8428 Store a pointer to the symbol in the symbol pointer table.
8429 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8430 Initialise the symbol pointer table.
8431 Store the hint in the Hint/Name table.
8432 Make the jump reloc be symbol realtive, not section relative.
8433 Create an import symbol for imported code.
8434
8435 2000-03-06 Catherine Moore <clm@cygnus.com>
8436
8437 * elf.c (swap_out_syms): Check for null type_ptr.
8438
8439 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8440
8441 * aout-target.h (MY(write_object_contents)): Remove unused
8442 and unusable "#if CHOOSE_RELOC_SIZE".
8443 * pc532-mach.c (MY(write_object_contents)): Ditto.
8444 * netbsd.h (MY(write_object_contents)): Ditto.
8445 * hp300hpux.c (MY(write_object_contents)): Ditto.
8446 * freebsd.h (MY(write_object_contents)): Ditto.
8447 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8448
8449 2000-02-29 H.J. Lu <hjl@gnu.org>
8450
8451 * peicode.h (jtab): Make it static.
8452
8453 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8454 defined and COFF_IMAGE_WITH_PE is not defined.
8455 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8456 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8457
8458 2000-03-01 Nick Clifton <nickc@cygnus.com>
8459
8460 * coff-arm.c (bfd_arm_process_before_allocation): Make
8461 'symndx' signed to prevent compile time warning.
8462
8463 * coff-mcore.c: Remove unused prototype for pe_object_p.
8464
8465 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8466 functions that are not used when COFF_IMAGE_WITH_PE is
8467 defined.
8468 (struct sh_opcode): Change type of 'flags' field to unsigned
8469 long so that it can hold the USESAS flag.
8470
8471 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8472
8473 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8474 'sym_sec'.
8475
8476 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8477 parameters.
8478 Remove unusued variables and code.
8479 (elf_backend_add_symbol_hook): Fix prototype.
8480
8481 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8482 'srelgot'.
8483
8484 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8485 'oldinst'.
8486
8487 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8488 parameters.
8489 Remove unusued variables and code.
8490 (elf_backend_add_symbol_hook): Fix prototype.
8491
8492 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8493
8494 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8495 to unused function parameter.
8496
8497 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8498 parameters.
8499 Use EMPTY_HOWTO to initialise empty howto slots.
8500 Remove unused variables.
8501
8502 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8503
8504 2000-03-01 H.J. Lu <hjl@gnu.org>
8505
8506 * aoutx.h (aout_link_input_section_std): Pass "true" to
8507 the undefined_symbol callback.
8508 (aout_link_input_section_ext): Likewise.
8509 * bout.c (get_value): Likewise.
8510 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8511 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8512 Likewise.
8513 (alpha_relocate_section): Likewise.
8514 * coff-arm.c (coff_arm_relocate_section): Likewise.
8515 * coff-i960.c (coff_i960_relocate_section): Likewise.
8516 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8517 * coff-mips.c (mips_relocate_section): Likewise.
8518 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8519 * coff-sh.c (sh_relocate_section): Likewise.
8520 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8521 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8522 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8523 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8524 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8525 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8526 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8527 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8528 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8529 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8530 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8531 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8532 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8533 * elflink.h (elf_link_output_extsym): Likewise.
8534 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8535 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8536 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8537
8538 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8539 undefined_symbol callback when building shared library with
8540 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8541 "true".
8542 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8543 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8544 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8545 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8546 (elf32_mips_get_relocated_section_content): Likewise.
8547 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8548 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8549 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8550 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8551
8552 2000-02-28 Nick Clifton <nickc@cygnus.com>
8553
8554 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8555 * Makefile.in: Regenerate.
8556
8557 * configure.in: Add support for mips and sh pe vectors.
8558 * configure: regenerate.
8559
8560 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8561 targets.
8562
8563 * targets.c: Add mips and sh pe vectors.
8564
8565 * libpei.h (coff_final_link_postscript): Only define if not
8566 already defined.
8567
8568 * coffcode.h: Add support for WinCE magic numbers.
8569
8570 * peigen.c (pe_print_reloc): Update comment and rearrange
8571 appending of newline character.
8572
8573 * peicode.h: Add support for Image Library Format.
8574 (pe_ILF_vars): Structure containing data used by ILF code.
8575 (pe_ILF_make_a_section): New function. Create a section based
8576 on ILF data.
8577 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8578 ILF data.
8579 (pe_ILF_make_a_symbol): New function. Create a symbol based
8580 on ILF data.
8581 (pe_ILF_save_relocs): New function. Store the relocs created
8582 by pe_ILF_make_a_reloc in a section.
8583 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8584 an ILF object.
8585 (pe_ILF_object_p): New function. Return a bfd_target pointer
8586 for an ILF object.
8587 (pe_bfd_object_p): If an ILF object is detected call
8588 pe_ILF_object_p on it.
8589
8590 * coff-arm.c: Add support for WinCE relocs which are different
8591 from normal ARM COFF relocs.
8592 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8593
8594 * coff-sh.c: Add support for sh-pe target.
8595 * pe-sh.c: New file. Support code for sh-pe target.
8596 * pei-sh.c: New file. Support code for sh-pe target.
8597
8598 * pe-mips.c: New file. Support code for mips-pe target.
8599 * pei-mips.c: New file. Support code for mips-pe target.
8600
8601 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8602
8603 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8604 architecture if the object causing the bump is dynamic.
8605 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8606 and also don't it for memory ordering.
8607 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8608
8609 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8610
8611 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8612 calling bfd_get_section_size_before_reloc.
8613 (decode_line_info): Likewise.
8614 (_bfd_dwarf2_find_nearest_line): Likewise.
8615
8616 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8617
8618 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8619 name of the libtool directory.
8620 * Makefile.in: Rebuild.
8621
8622 2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
8623
8624 * som.c (SOM_HOWTO): Define.
8625 (som_hppa_howto_table): Use it.
8626
8627 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8628
8629 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8630
8631 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8632
8633 2000-02-24 Catherine Moore <clm@cygnus.com>
8634
8635 * som.c (som_misc_symbol_info): Add field
8636 secondary_def.
8637 (som_bfd_derive_misc_symbol_info): Initialize
8638 secondary_def.
8639 (som_build_and_write_symbol_table): Keep track
8640 of secondary_def field.
8641 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8642 if secondary_def field is set.
8643 (som_bfd_ar_write_symbol_stuff): Initialize
8644 secondary_def.
8645
8646 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8647
8648 * dwarf2.c (read_address): Read 16-bits addresses.
8649 (parse_comp_unit): Accept addr_size == 2.
8650
8651 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8652
8653 * bfd-in.h: Update copyright date.
8654
8655 2000-02-23 Linas Vepstas <linas@linas.org>
8656
8657 * cpu-i370.c: New file.
8658 * elf32-i370.c: New file.
8659 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8660 (bfd_i370_arch): New.
8661 (bfd_archures_list): Add bfd_i370_arch.
8662 * elf.c (prep_headers): Add bfd_arch_i370.
8663 * Makefile.am: Add support for IBM 370 elf.
8664 * config.bfd: Likewise.
8665 * configure.in: Likewise.
8666 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8667 * reloc.c (bfd_reloc_code_type): Likewise.
8668 * targets.c: Likewise.
8669
8670 * Makefile.in: Regenerate.
8671 * configure: Regenerate.
8672 * bfd-in2.h: Regenerate.
8673
8674 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8675
8676 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8677 invalid relocation types, and change them to R_386_NONE.
8678
8679 2000-02-22 H.J. Lu <hjl@gnu.org>
8680
8681 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8682 not defined, don't add a second ELF_VER_CHR.
8683
8684 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8685 symbols converted to local symbols even when stripping all
8686 symbols.
8687 (elf_link_output_extsym): Process global symbols converted to
8688 local symbols even if they are being stripped.
8689
8690 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8691
8692 * archures.c (bfd_octets_per_byte): Return unsigned int.
8693 (bfd_arch_mach_octets_per_byte): Ditto.
8694 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8695 comparison warning.
8696 * section.c (bfd_get_section_size_before_reloc): Quell signed
8697 vs. unsigned comparison warning.
8698 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8699 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8700 change. What was I thinking?
8701 * bfd-in2.h: Regenerate.
8702
8703 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8704 (elf_gc_sections): Same here.
8705 (elf_gc_common_finalize_got_offsets): And here.
8706
8707 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8708
8709 ELF HPPA doesn't work at present; remove it until it does.
8710 * config.bfd: Comment out setting targ_defvec to
8711 bfd_elf32_hppa_vec.
8712 * Makefile.am: Rebuild dependencies.
8713 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8714 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8715 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8716 * Makefile.in: Rebuild.
8717 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8718
8719 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8720
8721 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8722 is no bfd_free(). Revert bfd_free part of previous change.
8723
8724 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8725
8726 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8727 arrays.
8728 (coff_compute_section_file_positions): Use bfd_free to pair
8729 bfd_malloc.
8730 (coff_write_object_contents): Likewise.
8731
8732 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8733 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8734
8735 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8736
8737 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8738 (xcoff_ar_file_hdr_big): New structure.
8739 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8740 (xcoff_ar_hdr_big): New structure.
8741 (SIZEOF_AR_HDR_BIG): New macro.
8742 (xcoff_big_format_p): New macro.
8743 (xcoff_ardata_big): New macro.
8744 (arch_xhdr_big): New macro.
8745 (xcoff_slurp_armap): Handle large archives.
8746 (xcoff_archive_p): Detect large archives.
8747 (xcoff_read_ar_hdr): Handle large archives.
8748 (xcoff_openr_next_archived_file): Handle large archives.
8749 (xcoff_generic_stat_arch_elt): Handle large archives.
8750 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8751 (xcoff_write_armap_big): New function.
8752 (xcoff_write_armap): New function, dispatch to _old or _big.
8753 (xcoff_write_archive_contents_old): Rename from
8754 xcoff_write_archive_contents.
8755 (xcoff_write_archive_contents_big): New function.
8756 (xcoff_write_archive_contents): New function, dispatch to _old or
8757 _big.
8758
8759 2000-02-18 Richard Henderson <rth@cygnus.com>
8760
8761 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8762 and hide_symbol members.
8763 (elf_link_hash_copy_indirect): Remove.
8764 (elf_link_hash_hide_symbol): Remove.
8765 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8766 and elf_backend_hide_symbol.
8767 (_bfd_elf_link_hash_copy_indirect): Declare.
8768 (_bfd_elf_link_hash_hide_symbol): Declare.
8769 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8770 (_bfd_elf_link_hash_hide_symbol): Likewise.
8771 (_bfd_elf_link_hash_table_init): Don't init killed members.
8772 * elflink.h (elf_link_add_object_symbols): Use the bed function
8773 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8774 (elf_link_assign_sym_version): Likewise.
8775 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8776 (elf_backend_hide_symbol): Likewise.
8777 (elfNN_bed): Update for new members.
8778
8779 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8780
8781 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8782 STACK_END_ADDR): Define for new core file format.
8783 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8784 for handling the vagaries of the various core file structures used
8785 by AIX over the years.
8786 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8787 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8788 core_dumpx structure.
8789
8790 2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
8791
8792 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8793 (bfd_mach_sh3_dsp): Likewise.
8794 (bfd_mach_sh4): Reinstate.
8795 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8796 * bfd-in2.h: Regenerate.
8797 * coff-sh.c (struct sh_opcode): flags is no longer short.
8798 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8799 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8800 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8801 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8802 (sh_opcodes): No longer const.
8803 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8804 (sh_insn_uses_reg): Check for USESAS and USESR8.
8805 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8806 (_bfd_sh_align_load_span): Return early for SH4.
8807 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8808 Take into account that field b of a parallel processing insn
8809 could be mistaken for a separate insn.
8810 * cpu-sh.c (arch_info_struct): New array elements for
8811 sh2, sh-dsp and sh3-dsp.
8812 Reinstate element for sh4.
8813 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8814 (SH4_NEXT): Reinstate.
8815 (SH3_NEXT, SH3E_NEXT): Adjust.
8816 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8817 * elf32-sh.c (sh_elf_set_private_flags): New function.
8818 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8819 (sh_elf_merge_private_data): New function.
8820 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8821 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8822 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8823 sh_elf_merge_private_data.
8824
8825 2000-02-13 Richard Henderson <rth@cygnus.com>
8826
8827 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8828 hide_symbol members.
8829 (elf_link_hash_copy_indirect): New.
8830 (elf_link_hash_hide_symbol): New.
8831 * elflink.h (elf_link_add_object_symbols): Break out copy from
8832 indirect new new symbol to elf.c.
8833 (elf_link_assign_sym_version): Break out privatization of
8834 non-exported symbol to elf.c.
8835 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8836 (_bfd_elf_link_hash_hide_symbol): New.
8837 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8838
8839 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8840
8841 * section.c (_bfd_strip_section_from_output): Add info parameter.
8842 If it passed as non-NULL, use it to check whether any input BFD
8843 has an input section which uses this output section. Change all
8844 callers.
8845 * bfd-in2.h: Rebuild.
8846
8847 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8848 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8849 1999-11-29.
8850 * bfd-in2.h: Rebuild.
8851
8852 2000-02-10 Timothy Wall <twall@cygnus.com>
8853
8854 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8855 allow final modifications of swapped-in symbol.
8856 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8857 * coffcode.h (coff_write_relocs): Use macro
8858 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8859 symbol index should be set to -1.
8860
8861 2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
8862
8863 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8864 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8865 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8866 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8867 sh_insns_uses_or_sets_freg): New functions.
8868 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8869 * (sh_insns_conflict): Use new functions and new macros to
8870 detect conflicts when two instructions both set same integer registers,
8871 both set same fp register, and both set special register.
8872
8873 2000-02-09 Timothy Wall <twall@cygnus.com>
8874
8875 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8876 swapping in sections, so that the swapping routines have access to
8877 the arch/mach info.
8878
8879 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8880
8881 * coff-go32.c: Update comment. Update copyright.
8882
8883 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8884
8885 * syms.c (bfd_decode_symclass)
8886 Two new class characters were added - 'V' and 'v'. The
8887 meaning of 'W' is now restricted to just weak non-object
8888 symbols. This allows differentiation between, for example,
8889 weak functions vs weak objects. nm for example now dumps:
8890 'W' = weak global
8891 'w' = weak unresolved
8892 'V' = weak global object
8893 'v' = weak unresolved object
8894
8895 (bfd_is_undefined_symclass): New function. Return true if the
8896 given symbol class represents and undefined/unresolved symbol.
8897
8898 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8899 unresolved symbols.
8900
8901 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8902
8903 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8904 STT_ARM_16BIT flag set, but it is not attached to a data object
8905 return STT_ARM_16BIT so that it will be treated as code by the
8906 disassembler.
8907
8908 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8909
8910 * coff-i386.c (i3coff_object_p): Remove prototype.
8911 Update copyright.
8912
8913 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8914 to name. Update copyright.
8915
8916 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8917 assignment to avoid warning. Update copyright.
8918
8919 2000-01-24 Robert Lipe (robertl@sco.com)
8920
8921 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8922 instead of using GNU C extension.
8923
8924 2000-01-21 Nick Clifton <nickc@cygnus.com>
8925
8926 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8927 amount from a bfd_in_memory structure.
8928 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8929 structure.
8930
8931 2000-01-14 Nick Clifton <nickc@cygnus.com>
8932
8933 * linker.c (default_indirect_link_order): oops - fix incorrectly
8934 applied patch from Tim Wall.
8935
8936 2000-01-13 Timothy Wall (twall@tiac.net>
8937
8938 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8939 = scnhsz, filhsz, relsz, aoutsz, etc)
8940
8941 * coffswap.h: Ditto.
8942
8943 2000-01-13 Nick Clifton <nickc@cygnus.com>
8944
8945 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8946 interwork thumb to arm stub.
8947
8948 2000-01-13 Timothy Wall (twall@tiac.net>
8949
8950 * archures.c (bfd_octets_per_byte): New function: Return
8951 target byte size.
8952 (bfd_arch_mach_octets_per_byte): New function: Return target
8953 byte size.
8954
8955 * section.c: Distinguish between octets and bytes for usage of
8956 _cooked_size, _raw_size, and output_offset. Clarify
8957 description of bfd_set_section_contents.
8958
8959 * bfd-in2.h: Regenerate.
8960
8961 * coffgen.c: Indicate that the offset parameter is in bytes, not
8962 octets.
8963
8964 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8965 where appropriate to get the octet offset when calling
8966 bfd_set_section_contents.
8967 (bfd_coff_reloc_link_order): Ditto.
8968
8969 * linker.c (bfd_generic_reloc_link_order): Ditto.
8970 (_bfd_default_link_order): Ditto.
8971
8972 * reloc.c (bfd_perform_relocation): Distinguish between octets
8973 and bytes. Use octets when indexing into octet data; use bytes
8974 when calculating target addresses.
8975 (bfd_install_relocation): Ditto.
8976
8977 * srec.c (srec_write_section): Ditto.
8978
8979 2000-01-13 Nick Clifton <nickc@cygnus.com>
8980
8981 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8982 3 to 2. This allows 4 byte sized sections, which is necessary for
8983 dlltool to build functioning DLLs.
8984
8985 2000-01-10 Philip Blundell <pb@futuretv.com>
8986
8987 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8988 (arm*-*-conix*): New target.
8989
8990 2000-01-10 Egor Duda <deo@logos-m.ru>
8991
8992 * config.bfd: Include elf32_i386 vector to target list for cygwin
8993 and mingw.
8994
8995 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8996 * configure.in: Test for structure win32_pstatus_t in
8997 <sys/procfs.h>
8998 * configure: Regenerate.
8999
9000 * elf.c (elfcore_grok_win32pstatus): New function: process
9001 win32_pstatus_t notes in elf core file.
9002 (elfcore_grok_note): Detect win32_pstatus notes.
9003
9004 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9005
9006 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9007 visibility.
9008 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9009 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9010
9011 For older changes see ChangeLog-9899
9012 \f
9013 Local Variables:
9014 mode: change-log
9015 left-margin: 8
9016 fill-column: 74
9017 version-control: never
9018 End: