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