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