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