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