* mmo.c: Adjust documentation tags to use texinfo 4 features.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6eeb40b2
HPN
12001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
2
3 * mmo.c: Adjust documentation tags to use texinfo 4 features.
4
44421011
DJ
52001-11-15 Daniel Jacobowitz <drow@mvista.com>
6
7 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
8 local syms from discarded sections. Update comment.
9
f9f32305
AM
102001-11-15 Alan Modra <amodra@bigpond.net.au>
11
beb1d4ec
AM
12 * po/SRC-POTFILES.in: Regenerate.
13
f9f32305
AM
14 * elflink.h (elf_link_input_bfd): Complain about all relocs
15 against local syms from discarded sections. K&R fixes.
16 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
17 K&R fixes.
18
6361c4c9
AO
192001-11-15 Alexandre Oliva <aoliva@redhat.com>
20
21 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
22 overflows in the .stab section.
23
73d074b4
DJ
242001-11-14 Daniel Jacobowitz <drow@mvista.com>
25
26 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
27 (bfd_elf64_discard_info): Likewise.
28 * bfd-in2.h: Regenerate.
29 * elf-bfd.h (struct elf_reloc_cookie): New.
30 (struct elf_backend_data): Add elf_backend_discard_info,
31 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
32 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
33 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
34 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
35 (_bfd_elf32_mips_ignore_discarded_relocs): New.
36 (_bfd_elf32_mips_write_section): New.
37 (elf_backend_discard_info): Define.
38 (elf_backend_ignore_discarded_relocs): Define.
39 (elf_backend_write_section): Define.
40 * elfcode.h (elf_bfd_discard_info): Define.
41 (elf_reloc_symbol_deleted_p): Define.
42 * elflink.h (elf_link_input_bfd): Check
43 elf_section_ignore_discarded_relocs. Call
44 bed->elf_backend_write_section if available.
45 (elf_reloc_symbol_deleted_p): New.
46 (elf_bfd_discard_info): New.
47 (elf_section_ignore_discarded_relocs): New.
48 * elfxx-target.h (elf_backend_discard_info): Define.
49 (elf_backend_ignore_discarded_relocs): Define.
50 (elf_backend_write_section): Define.
51 (elfNN_bed): Add elf_backend_discard_info,
52 elf_backend_ignore_discarded_relocs, and
53 elf_backend_write_section.
54 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
55 * libbfd.h: Regenerate.
56 * stabs.c (_bfd_discard_section_stabs): New.
57
27018c3f
MS
582001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
59
60 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
61 scheme to get rid of an ugly complicated test.
62 * elf64-s390.c (elf_s390_relocate_section): Likewise.
63
58a35813
AJ
642001-11-14 Andreas Jaeger <aj@suse.de>
65
66 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
67 x86-64 for display.
68
d03ba2a1
JJ
692001-11-14 Jakub Jelinek <jakub@redhat.com>
70
71 * dwarf2.c (struct line_head) [total_length]: Change type to
72 bfd_vma.
73 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
74 (struct comp_unit): Add stash and offset_size.
75 (read_8_bytes): Return bfd_vma.
76 (read_indirect_string): New.
77 (read_attribute): Handle DW_FORM_strp.
78 (decode_line_info): Support 64-bit DWARF format.
79 (_bfd_dwarf2_find_nearest_line): Likewise.
80 (parse_comp_unit): Set offset_size and stash.
81
cf716c56
RH
822001-11-13 Keith Walker <keith.walker@arm.com>
83
84 * dwarf2.c (read_attribute_value): New function to handle
85 DW_FORM_indirect.
86 (read_attribute): Use it.
87
1a509dcc
GK
882001-11-13 Geoffrey Keating <geoffk@redhat.com>
89
90 * dwarf2.c (decode_line_info): Properly deal with unknown standard
91 opcodes.
92
4e6bfe8a
AM
932001-11-13 John Marshall <jmarshall@acm.org>
94 Alan Modra <amodra@bigpond.net.au>
95
96 * section.c (bfd_make_section_anyway): Don't increment section_id
97 and the BFD's section_count if adding the section failed.
98 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
99 change.
100
bc0d28ee
HPN
1012001-11-12 Orjan Friberg <orjanf@axis.com>
102
103 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
104 core dump format.
105
350836e3
L
1062001-11-11 H.J. Lu <hjl@gnu.org>
107
108 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
109 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
110
111 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
112 dynstr type to `struct elf_strtab_hash *'.
113
b959dc73
HPN
1142001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
115
116 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
117 size_t. Rename second i to j.
118
7e250b6c
JL
119Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
120
121 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
122
ec338859
AM
1232001-11-10 Alan Modra <amodra@bigpond.net.au>
124
125 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
126 relocs into shared libs.
127 * elf32-cris.c (cris_elf_relocate_section): Likewise.
128 * elf32-i370.c (i370_elf_relocate_section): Likewise.
129 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
130 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
131 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
132 * elf32-sh.c (sh_elf_relocate_section): Likewise.
133 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
134 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
135 * elf64-s390.c (elf_s390_relocate_section): Likewise.
136 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
137 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
138 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
139
140 * elf.c (bfd_section_from_r_symndx): New function.
141 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
142 (struct sym_sec_cache): New.
143 (bfd_section_from_r_symndx): Declare.
144 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
145 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
146 relocs when relocatable. Don't zero entire reloc, just zero the
147 addend and sym.
148 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
149 (elf32_hppa_link_hash_table_create): Init it.
150 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
151 syms on a per-section basis as we do for globals.
152 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
153 (allocate_dynrelocs): Warning fix.
154 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
155 section has been discarded.
156 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
157 into shared libs.
158 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
159 (elf_i386_link_hash_table_create): Init it.
160 (elf_i386_check_relocs): Track dynamic relocs needed for local
161 syms on a per-section basis as we do for globals.
162 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
163 Remove dead code.
164 (allocate_dynrelocs): Warning fix.
165 (elf_i386_size_dynamic_sections): Don't allocate relocs when
166 section has been discarded.
167 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
168 into shared libs.
169 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
170 (elf_s390_link_hash_table_create): Init it.
171 (elf_s390_check_relocs): Track dynamic relocs needed for local
172 syms on a per-section basis as we do for globals.
173 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
174 Remove dead code.
175 (allocate_dynrelocs): Warning fix.
176 (elf_s390_size_dynamic_sections): Don't allocate relocs when
177 section has been discarded.
178 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
179 into shared libs.
180 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
181 (ppc64_link_hash_table_create): Init it.
182 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
183 syms on a per-section basis as we do for globals.
184 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
185 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
186 function. Warning fix.
187 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
188 section has been discarded.
189 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
190 into shared libs.
191 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
192 (elf_s390_link_hash_table_create): Init it.
193 (elf_s390_check_relocs): Track dynamic relocs needed for local
194 syms on a per-section basis as we do for globals.
195 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
196 Remove dead code.
197 (allocate_dynrelocs): Warning fix.
198 (elf_s390_size_dynamic_sections): Don't allocate relocs when
199 section has been discarded.
200 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
201 into shared libs.
202
0451c93c
MS
2032001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
204
205 * elf32-s390: Major rework that introduces all recent changes to
206 the s390 backends. Get a closer match to elf32-i386.
207 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
208 Localise vars, and delay setting. Better error reporting, replace
209 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
210 symbol is not defined in the regular object file and tread the weak
211 definition as the normal one. Don't discard relocs for undefweak or
212 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
213 test for avoided copy relocs. Reinstate fudge for unresolved relocs
214 in debugging sections.
215 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
216 reloc processing for weakdefs. Remove redundant casts and aborts.
217 Delay setting of vars until needed. Move creation of dynamic symbols
218 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
219 BFD_ASSERT with abort. Discard .plt entries for everything with
220 plt.refcount <= 0.
221 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
222 .got or .relgot here but do it in allocate_dynrelocs. Reference count
223 possible .plt and .got entries. Don't test input section SEC_READONLY
224 here to try to avoid copy relocs, and keep dyn_relocs regardless of
225 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
226 variables until needed. Remove separate switch stmt for creating .got
227 section. Initialise local_got_refcounts to 0. Cache pointer to
228 "sreloc" section in elf_section_data. Tweak condition under which .got
229 created. Report files with bad relocation section names.
230 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
231 have been forced local. Use same test to decide if we can use a
232 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
233 comment. Move expressions out of function calls. Replace BFD_ASSERT
234 with abort.
235 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
236 statement. Replace BFD_ASSERT with abort.
237 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
238 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
239 instead of looking up section names for DT_TEXTREL. Replace
240 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
241 Add a comment to remind us that one day this ought to be fixed.
242 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
243 (struct elf_s390_link_hash_table): Likewise.
244 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
245 rid of unnecessary casts.
246 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
247 Remove "section" field.
248 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
249 Reference count possible .plt entries. Don't deallocate .got and
250 .relgot space here.
251 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
252 Update comment.
253 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
254 dyn_relocs.
255 (elf_s390_discard_copies): Delete.
256 (elf_s390_link_hash_traverse): Delete.
257 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
258 rather than gc variety).
259 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
260 srelplt, sdynbss, srelbss fields.
261 (elf_s390_link_hash_table_create): Init them.
262 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
263 (allocate_dynrelocs): New function.
264 (create_got_section): New function.
265 (elf_backend_can_refcount): Define.
266 (elf_backend_copy_indirect_symbol): Define.
267 (elf_s390_copy_indirect_symbol): New function.
268 (elf_s390_create_dynamic_sections): New function.
269 (readonly_dynrelocs): New function.
ec338859 270 * elf64-s390.c: Likewise.
0451c93c 271
2b0f7ef9
JJ
2722001-11-07 Jakub Jelinek <jakub@redhat.com>
273
274 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
275 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
276 (elf-strtab.lo): Add rule.
277 * Makefile.in: Rebuilt.
278 * configure.in (elf): Add elf-strtab.lo.
279 * configure: Rebuilt.
280 * elf-bfd.h (elf_strtab_hash): Forward declare.
281 (struct elf_link_hash_table): Change dynstr type to
282 struct elf_strtab_hash *.
283 (struct elf_obj_tdata): Change strtab_ptr type to
284 struct elf_strtab_hash *.
285 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
286 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
287 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
288 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
289 _bfd_elf_strtab_finalize): New prototypes.
290 * elf-strtab.c: New file.
291 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
292 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
293 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
294 when forcing dynamic symbol to local.
295 (elf_link_create_dynamic_sections): Call
296 _bfd_elf_strtab_init instead of elf_stringtab_init.
297 (elf_link_record_local_dynamic_symbol): Likewise, change
298 dynstr type. Use _bfd_elf_strtab functions instead of
299 _bfd_stringtab calls.
300 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
301 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
302 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
303 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
304 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
305 dynamic symbol to local.
306 (elf_link_assign_sym_version): Likewise.
307 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
308 _bfd_stringtab_emit.
309 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
310 type. Call _bfd_elf_strtab functions instead of
311 _bfd_stringtab functions.
312 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
313 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
314 (elf_fake_sections): Likewise.
315 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
316 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
317 name in the output. Call _bfd_elf_strtab_finalize and
318 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
319 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
320 instead of _bfd_stringtab_size.
321 (prep_headers): Change shstrtab type.
322 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
323
1d761fc5
AM
3242001-11-07 Alan Modra <amodra@bigpond.net.au>
325
326 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
327 bad symtab segfault. Formatting and warning fixes. Improve
328 error message for internationalisation.
329
f8deed93
L
3302001-11-06 H.J. Lu (hjl@gnu.org)
331
1d761fc5 332 * elflink.h (elf_link_input_bfd): Complain about relocs against
f8deed93
L
333 discarded sections.
334
7fda6dbc
AM
3352001-11-03 Alan Modra <amodra@bigpond.net.au>
336
337 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
338
d918dd35
L
3392001-11-02 H.J. Lu <hjl@gnu.org>
340
341 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
342 dynamic relocation for symbols defined in regular objects when
343 creating executables.
344
b8819ab2
NC
3452001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
346
3c62831e
NC
347 * configure.in (ALL_LINGUAS): Add "fr".
348 * configure: Regenerate.
349 * po/fr.po: New file.
350
b8819ab2
NC
351 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
352
21da9f89
NC
3532001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
354
355 * som.c (setup_sections): Initialize subspace_sections.
356
95f7d9f7
L
3572001-11-02 H.J. Lu (hjl@gnu.org)
358
359 * coffgen.c (coff_object_p): Return 0 if the header is too big.
360
12e1f53e
HPN
3612001-11-02 Hans-Peter Nilsson <hp@axis.com>
362
363 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
364 information. Save bfd arch and mach values. Restore on error.
365
a8d02d66
AM
3662001-11-02 Alan Modra <amodra@bigpond.net.au>
367
368 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
369 (allocate_PIC_calls): New function.
370 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
371 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
372 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
373
72209a1f
HPN
3742001-11-02 Hans-Peter Nilsson <hp@axis.com>
375
376 * elf32-cris.c (cris_elf_grok_prstatus): New function.
4a15251e 377 (cris_elf_grok_psinfo): New function.
72209a1f
HPN
378 (elf_backend_grok_prstatus): Define.
379 (elf_backend_grok_psinfo): Define.
380
86c76c7b
AM
3812001-11-01 Alan Modra <amodra@bigpond.net.au>
382
383 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
384 prediction bits.
385
afdbd6d0
CD
3862001-10-31 Chris Demetriou <cgd@demetriou.com>
387
388 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
389 relocations properly.
390
2cd533b7
L
3912001-10-31 H.J. Lu <hjl@gnu.org>
392
393 * elflink.h (elf_link_output_extsym): Don't clear the visibility
394 field for relocateable.
395
4578e0a7
AM
3962001-11-01 Alan Modra <amodra@bigpond.net.au>
397
4e12ff7f
AM
398 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
399 .plt relocs in DT_RELASZ.
4578e0a7 400
7649aa50
NC
4012001-10-29 NIIBE Yutaka <gniibe@m17n.org>
402
403 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
404 targets.
405
a53ecf01
NC
4062001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
407
408 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
409
3c3bdf30
NC
4102001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
411
412 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
413 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
414 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
415 Regenerate dependencies.
416 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
417 * config.bfd: [BFD64] (mmix-*-*): New case.
418 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
419 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
420 (bfd_mmix_arch): Declare.
421 (bfd_archures_list): Add bfd_mmix_arch.
422 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
423 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
424 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
425 bfd_mmo_mmix_vec.
426 * reloc.c: Add MMIX relocations.
427 * bfd.c (struct _bfd, tdata): Add mmo_data.
428 * Makefile.in: Regenerate.
429 * configure: Regenerate.
430 * libbfd.h: Regenerate.
431 * bfd-in2.h: Regenerate.
432 * configure: Rebuild.
433
e0e8c97f
NC
4342001-10-30 Richard Earnshaw (rearnsha@arm.com)
435
436 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
437 p_paddr of the segment that contains it.
f5ffc919
NC
438 (copy_private_bfd_data): If the LMA for a segment is known, use it
439 for matching sections to segments.
440 (assign_file_positions_for_segments): Use the LMA when adjusting
441 for inter-section alignment padding.
e0e8c97f 442
5b74f489
KH
4432001-10-29 Kazu Hirata <kazu@hxi.com>
444
445 * README: Fix a typo.
446
0b6488e2
RH
4472001-10-24 Richard Henderson <rth@redhat.com>
448
449 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
450 timestamp to time_t for ctime.
451
908d94bf
HPN
4522001-10-24 Hans-Peter Nilsson <hp@axis.com>
453
454 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
455 unsigned, increasing index.
456
1b58be7e
L
4572001-10-23 H.J. Lu <hjl@gnu.org>
458
459 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
460 m != NULL before accessing it.
461
ce757d15
AM
4622001-10-23 Alan Modra <amodra@bigpond.net.au>
463
464 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
465 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
466 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
467
468 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
469 (hppa_link_hash_newfunc): Likewise.
470 (elf32_hppa_finish_dynamic_symbol): Likewise.
471 (allocate_dynrelocs): Always allocate .got relocs if shared.
472 (elf32_hppa_relocate_section): Output them too. Similarly
473 consolidate .plt reloc code, and no longer initialise .plt
474 when a reloc is output.
475 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
476 when no reloc is output.
477
478 From Herbert Xu <herbert@gondor.apana.org.au>
479 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
480 unreachable branches.
481
ca51bfff
L
4822001-10-22 H.J. Lu <hjl@gnu.org>
483
484 * configure.in (WIN32LIBADD): Use -L../libiberty for
485 mips*-*-linux*.
486 * configure: Rebuild.
487
78be1d6e
L
4882001-10-21 H.J. Lu <hjl@gnu.org>
489
490 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
491 if shared library is enabled only for Linux hosts.
492 * configure: Rebuild.
493
1b90af26
L
4942001-10-21 H.J. Lu <hjl@gnu.org>
495
496 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
497 ../libiberty/Makefile instead of $enable_shared.
498 * configure: Rebuild.
499
ebe7507a
L
5002001-10-21 H.J. Lu <hjl@gnu.org>
501
908d94bf
HPN
502 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
503 index 0.
ebe7507a 504
39691762
L
5052001-10-20 H.J. Lu <hjl@gnu.org>
506
507 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
508 if shared library is enabled.
509 * configure: Rebuild.
510
6a7805b5
L
5112001-10-20 H.J. Lu <hjl@gnu.org>
512
513 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
514
e0740195
L
5152001-10-19 H.J. Lu <hjl@gnu.org>
516
517 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
518 size is empty.
519
7595d193
L
5202001-10-18 H.J. Lu <hjl@gnu.org>
521
522 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
523 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
524
25263aad
JJ
5252001-10-18 Jakub Jelinek <jakub@redhat.com>
526
527 * section.c (_bfd_strip_section_from_output): Don't count
528 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
529
973ffd63
AM
5302001-10-17 Alan Modra <amodra@bigpond.net.au>
531
532 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
533 Elf_Internal_Shdr.contents now that it's no longer a PTR.
534 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
535 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
536 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
537 * elf32-sh.c (sh_elf_relax_section): Likewise.
538 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
539 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
540 * elf.c (setup_group): Warning fixes.
541 * elflink.h (elf_link_sort_relocs): Likewise.
542 * pdp11.c (slurp_reloc_table): Likewise.
543
df22989b
JH
5442001-10-16 Jeff Holcomb <jeffh@redhat.com>
545
546 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
547 casts.
548
1e09179f
L
5492001-10-15 H.J. Lu <hjl@gnu.org>
550
551 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
552 for relocations against discarded link-once section.
553
1e370bd2
AM
5542001-10-15 Alan Modra <amodra@bigpond.net.au>
555
cf5c0c5b
AM
556 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
557 bfd_reloc_outofrange and similar errors.
558
1e370bd2
AM
559 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
560 rather than ind->weakdef.
561 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
562 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
563 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
564 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
565 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
566
bbd7ec4a
AM
5672001-10-15 Alan Modra <amodra@bigpond.net.au>
568 H.J. Lu <hjl@gnu.org>
569
570 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
571 counts for aliases instead of aborting.
572 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
573 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
574
575 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
576 to -1 for non-function symbols.
577 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
578 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
579 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
580 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
581 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
582 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
583 plt.offset instead of plt.refcount when setting to -1.
584
6a360bf4
NC
5852001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
586
587 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
588 like R_ARM_PC24. Include reloc number in error message about
589 unresolvable relocs.
590
290394d6
JJ
5912001-10-10 Jakub Jelinek <jakub@redhat.com>
592
593 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
594 relocations against the same symbol in .rel{,a}.dyn section.
595
08da05b0
KH
5962001-10-10 Kazu Hirata <kazu@hxi.com>
597
598 * aout-encap.c: Fix comment typos.
599 * aoutx.h: Likewise.
600 * archive.c: Likewise.
601 * bout.c: Likewise.
602 * coff64-rs6000.c: Likewise.
603 * coffcode.h: Likewise.
604 * coffgen.c: Likewise.
605 * cofflink.c: Likewise.
606 * coff-mips.c: Likewise.
607 * ecoff.c: Likewise.
608 * elf32-m32r.c: Likewise.
609 * libcoff-in.h: Likewise.
610 * libecoff.h: Likewise.
611 * libxcoff.h: Likewise.
612 * nlm32-i386.c: Likewise.
613 * pdp11.c: Likewise.
614 * section.c: Likewise.
615 * som.c: Likewise.
616 * som.h: Likewise.
617 * bfd-in2.h: Regenerate.
618 * libcoff.h: Likewise.
619
079e9a2f
AM
6202001-10-10 Alan Modra <amodra@bigpond.net.au>
621
622 * elf.c (elf_map_symbols): Don't create new section symbols; Use
623 existing section syms. Update comments.
624 (copy_private_bfd_data): Formatting fixes.
625 (elfcore_grok_win32pstatus): Likewise.
626 (swap_out_syms): Likewise. Remove unnecessary level of braces.
627
945906ff
AM
6282001-10-09 Alan Modra <amodra@bigpond.net.au>
629
630 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
631 "group_name".
632 (elf_group_name): Define.
633 (elf_next_in_group): Define.
634 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
635 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
636 first member section; Instead use elf_next_in_group.
637 (bfd_section_from_shdr): Likewise.
638 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
639
dbb410c3
AM
6402001-10-09 Alan Modra <amodra@bigpond.net.au>
641
642 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
643 "next_in_group". Fix gp and gp_size comments.
644 * elf.c (union elf_internal_group): New.
645 (setup_group): New function.
646 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
647 Call setup_group for SHF_GROUP sections.
648 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
649 (elf_fake_sections): Set header type for SEC_GROUP, and header
650 flags for sections in a group.
651 (set_group_contents): New function.
652 (_bfd_elf_compute_section_file_positions): Call it.
653 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 654
dbb410c3
AM
655 * elflink.h (gc_mark_hook): Handle section groups.
656 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
657 * section.c (SEC_GROUP): Define.
658 (struct sec): Comment fixes.
659 * bfd-in2.h: Regenerate.
660
661 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
662 out of function args.
663 (_bfd_elf_canonicalize_reloc): Similarly.
664 (_bfd_elf_get_symtab): Here too.
665 (_bfd_elf_canonicalize_dynamic_symtab): And here.
666 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
667 bfd_bread, and remove unnecessary cast.
668
24c603fa
AH
6692001-10-08 Aldy Hernandez <aldyh@redhat.com>
670
bbd7ec4a 671 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 672
3f5864e1
SC
6732001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
674
675 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
676 compilation unit.
677
fb9ceeac
AM
6782001-10-06 Alan Modra <amodra@bigpond.net.au>
679
aec2f561
AM
680 * bfd.c (bfd_assert): Report bfd version.
681 (_bfd_abort): Likewise.
682
50b4d486
AM
683 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
684 section sym values. Instead replace any relocs against them with
685 relocs against STN_UNDEF, which has a zero value.
686
fb9ceeac
AM
687 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
688 relocs.
689
17617495
JL
6902001-10-05 Jeff Law <law@redhat.com>
691
692 * som.h (som_exec_data): New field "version_id".
693 * som.c (som_object_setup): Record the version_id if it
694 exists.
695 (som_prep_headers): Do not initialize version_id here.
696 (som_finish_writing): Initialize version_id here.
697
6982000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
699
700 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
701 according to the MIPS/SGI ELF64 ABI Draft.
702 (mips_elf_sort_hash_table): Typo.
703
58e3d09d
AM
7042001-10-04 Alan Modra <amodra@bigpond.net.au>
705
8ea52284
AM
706 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
707
58e3d09d
AM
708 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
709 copying flags if this is a weakdef.
710
b13c7b49
AM
7112001-10-04 Alan Modra <amodra@bigpond.net.au>
712
a90b9fca
AM
713 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
714 packing.
715
bbd7ec4a 716 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
717 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
718 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
719
b13c7b49
AM
720 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
721 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
722 backends we configure. Run "make dep-am".
723 (install-data-local): Install symcat.h.
724 * dep-in.sed: Remove symcat.h from dependencies.
725 * Makefile.in: Regenerate.
726
8bd621d8
AM
7272001-10-03 Vassili Karpov <malc@pulsesoft.com>
728
729 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
730
1e2be829
TS
7312001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
732
733 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
734 (elf_backend_default_use_rela_p): New define.
735
0a991dfe
AM
7362001-10-03 Alan Modra <amodra@bigpond.net.au>
737
57c7194e
AM
738 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
739 change.
740
87b632fc
AM
741 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
742 * configure: Regenerate.
743 * Makefile.am (BFD_H_FILES): Add version.h.
744 * Makefile.in: Regenerate.
745 * po/SRC-POTFILES.in: Regenerate.
746
0a991dfe
AM
747 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
748 elf_backend_copy_indirect_symbol so that backend has a chance to
749 copy other necessary fields.
750 * elf-bfd.h (struct elf_backend_data): Update description of
751 elf_backend_copy_indirect_symbol.
752 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
753 copying flags if this is a weakdef.
754 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
755 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
756 than bfd_link_hash_lookup.
bbd7ec4a 757 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
758 reloc processing for weakdefs.
759 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
760 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
761
a33d1f77
AM
7622001-10-02 Alan Modra <amodra@bigpond.net.au>
763
764 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
765 result of ELF64_R_TYPE to enum before using in a switch.
766 (ppc64_elf_gc_mark_hook): Likewise.
767 (ppc64_elf_gc_sweep_hook): Likewise.
768 (ppc64_elf_reloc_type_class): Likewise.
769
e43d48cc
AM
7702001-10-02 Alan Modra <amodra@bigpond.net.au>
771
772 * version.h: New file.
773 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
774 (BFD_VERSION_DATE): Define.
775 (BFD_VERSION_STRING): Define.
776 * configure.in: AC_SUBST bfd_version, bfd_version_date and
777 bfd_version_string.
778 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
779 * bfd-in2.h: Regenerate.
780 * configure: Regenerate.
781 * Makefile.am: Run "make dep-am".
782 * Makefile.in: Regenerate.
783
784 * bfd-in.h: Include "symcat.h".
785 (CONCAT4): Redefine as for old CAT4.
786 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
787 Add warning regarding whitespace.
788 * aout-cris.c: Likewise.
789 * aout-ns32k.c: Likewise.
790 * aout-sparcle.c: Likewise.
791 * aout-tic30.c: Likewise.
792 * aout0.c: Likewise.
793 * armnetbsd.c: Likewise.
794 * demo64.c: Likewise.
795 * elf-bfd.h: Likewise.
796 * gen-aout.c: Likewise.
797 * host-aout.c: Likewise.
798 * hp300bsd.c: Likewise.
799 * hp300hpux.c: Likewise.
800 * i386aout.c: Likewise.
801 * i386bsd.c: Likewise.
802 * i386dynix.c: Likewise.
803 * i386freebsd.c: Likewise.
804 * i386linux.c: Likewise.
805 * i386lynx.c: Likewise.
806 * i386mach3.c: Likewise.
807 * i386netbsd.c: Likewise.
808 * libaout.h: Likewise.
809 * m68k4knetbsd.c: Likewise.
810 * m68klinux.c: Likewise.
811 * m68klynx.c: Likewise.
812 * m68knetbsd.c: Likewise.
813 * m88kmach3.c: Likewise.
814 * mipsbsd.c: Likewise.
815 * newsos3.c: Likewise.
816 * ns32knetbsd.c: Likewise.
817 * pc532-mach.c: Likewise.
818 * pdp11.c: Likewise.
819 * riscix.c: Likewise.
820 * sparclinux.c: Likewise.
821 * sparclynx.c: Likewise.
822 * sparcnetbsd.c: Likewise.
823 * sunos.c: Likewise.
824 * targets.c: Likewise.
825 * vaxnetbsd.c: Likewise.
826 * vms-hdr.c: Likewise.
827
4eef72c7
AM
8282001-10-01 Alan Modra <amodra@bigpond.net.au>
829
830 * bfd-in.h: Remove comments regarding generated files.
831 * libbfd-in.h: Likewise.
832 * libcoff-in.h: Likewise.
833 * bfd-in2.h: Regenerate.
834 * libbfd.h: Likewise.
835 * libcoff.h: Likewise.
836
146be91a 8372001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 838 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
839
840 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
841 partial_inplace, matching assembler output. Set src_mask to
842 all ones.
843 (sh_elf_relocate_section): Delete misplaced comment.
844 For relocatable linking against section symbol, call
845 _bfd_relocate_contents for partial_inplace relocs and adjust
846 rel->r_addend for others.
847 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
848 bfd_get_32, not at rel->r_addend.
849
3c3e9281
AM
8502001-09-30 Alan Modra <amodra@bigpond.net.au>
851
852 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
853 the old dir refcount, so we indirectly set them to init_refcount.
854 Short-circuit asserts when we've just verified they are true.
855
862517b6
AM
8562001-09-29 Alan Modra <amodra@bigpond.net.au>
857
858 * section.c (struct sec): Remove kept_section.
859 (STD_SECTION): Remove kept_section initialisation.
860 (bfd_make_section_anyway): Here too.
861 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
862 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
863 * elflink.h (elf_link_input_bfd): Set discarded link-once section
864 symbols to zero, and remove all code involved with kept_section
865 and tracking section symbol values.
866 * bfd-in2.h: Regenerate.
867 * configure.in: Bump version number.
868 * configure: Regenerate.
869
65f38f15
AM
8702001-09-29 Alan Modra <amodra@bigpond.net.au>
871
872 * elf64-ppc.c (struct ppc_dyn_relocs): New.
873 (IS_ABSOLUTE_RELOC): Define.
874 (struct ppc_link_hash_entry): New.
875 (struct ppc_link_hash_table): New.
876 (ppc_hash_table): Define.
877 (link_hash_newfunc): New function.
878 (ppc64_elf_link_hash_table_create): New function.
879 (create_got_section): New function.
880 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
881 pointers to our dynamic sections in hash table.
882 (ppc64_elf_copy_indirect_symbol): New function.
883 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
884 dynamic sections. Localise vars. Modify code for refcounts
885 starting from zero. Don't allocate here, or force symbols dynamic.
886 Don't copy all relocs if shared, select ones we need. Add code
887 to track possible copy relocs for non-shared link.
888 (ppc64_elf_gc_mark_hook): Update comment.
889 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
890 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
891 code for reference counting garbage collection. Don't create .plt
892 entries for functions that don't comply with ABI naming convention,
893 and don't allocate .plt space here. Use short-cuts to dynamic
894 sections. If possible, keep dynamic relocations instead of using
895 copy relocs. Remove confused comments.
896 (ppc_adjust_dynindx): Delete.
897 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
898 (allocate_dynrelocs): New function.
899 (readonly_dynrelocs): New function.
900 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
901 space here, and call allocate_dynrelocs to allocate space for
902 global .plt, .got and reloc sections. Use short-cuts to dynamic
903 sections. Call readonly_dynrelocs to determine whether we need
904 DT_TEXTREL. Don't generate section symbols here, the generic
905 ELF linker code does it for us.
906 (ppc64_elf_final_link): Call regular ELF backend linker rather than
907 gc variety, since we do our own .got handling.
908 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
909 dynamic section short-cuts. Localise vars, and delay setting.
910 Handle unknown relocs in main switch statement. Replace ugly
911 complicated tests for unresolvable relocs with a simple direct
912 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
913 before allowing an undefined sym in a shared lib. Do R_*_DS tests
914 after main switch, when we've set addend. Do non-addend insn
915 tweaks before main swithc. Ignore input_section->vma when
916 calculating reloc offsets as it's always zero. Rewrite dynamic
917 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
918 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
919 of dynamic section short-cuts. Reorganise .plt handling code.
920 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
921 Move expressions out of swap_reloca_out function calls.
922 (ppc64_elf_reloc_type_class): New function.
923 (ppc64_elf_info_to_howto): Move common expression to local var.
924 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
925 of dynamic section short-cuts. Don't fiddle with section syms
926 here as the ELF linker does it for us.
927 (elf_backend_can_refcount): Define.
928 (bfd_elf64_bfd_link_hash_table_create): Define.
929 (elf_backend_copy_indirect_symbol): Define.
930 (elf_backend_reloc_type_class): Define.
931 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
932
21d17a58
AM
9332001-09-29 Alan Modra <amodra@bigpond.net.au>
934
51b64d56
AM
935 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
936 (struct elf_backend_data): Add can_refcount.
937 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
938 got.refcount and plt.refcount from init_refcount.
939 (_bfd_elf_link_hash_table_init): Set up init_refcount.
940 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
941 rather than got/plt.offset, and test for <= 0 rather than -1.
942 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
943 * elfxx-target.h (elf_backend_can_refcount): Define.
944 (elfNN_bed): Init can_refcount.
945 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
946 (_bfd_generic_link_hash_newfunc): Likewise.
947 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
948 starting from zero.
949 (elf_backend_can_refcount): Define.
950 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
951 starting from zero.
952 (elf32_hppa_copy_indirect_symbol): Make static to agree with
953 prototype.
954 (elf_backend_can_refcount): Define.
955 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
956 starting from zero.
957 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
958 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
959 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
960 (elf_backend_can_refcount): Define.
961 (elf_i386_copy_indirect_symbol): Make static to agree with
962 prototype. Formatting fix.
963 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
964 starting from zero.
965 (elf_backend_can_refcount): Define.
966 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
967 starting from zero.
968 (elf_backend_can_refcount): Define.
969 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
970 starting from zero.
971 (elf_backend_can_refcount): Define.
972 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
973 starting from zero.
974 (elf_backend_can_refcount): Define.
975 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
976 starting from zero.
977 (elf_backend_can_refcount): Define.
978
21d17a58
AM
979 * som.c (som_write_symbol_strings): Cast current_offset in
980 bfd_seek call to match param type.
981
78ae4cb9
JB
9822001-09-28 J. Brobecker <brobecker@gnat.com>
983
984 * som.c (som_write_symbol_strings): Fix incorrect type of
985 current_offset to match the function definition. Fixes a build
986 failure on HPUX-11.00.
987
65db3b0d
RH
9882001-09-28 Richard Henderson <rth@redhat.com>
989
e0aae569
RH
990 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
991 SEC_MERGE, SEC_STRINGS.
992
65db3b0d
RH
993 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
994 * bfd-in2.h: Rebuild.
995
ced53ee5
AM
9962001-09-28 Alan Modra <amodra@bigpond.net.au>
997
ffaef159
AM
998 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
999 reloc code using x86_64_reloc_map.
1000
3ac8354b
AM
1001 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1002 no longer allocate here. Localise some vars to blocks where they
1003 are used.
1004 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1005 setting of vars until needed.
1006 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1007 when symbol visibilty makes a function local.
1008 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1009 swap_reloca_out function calls.
1010 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1011 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1012 switch statement.
1013
0ac8d2ca
AM
1014 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1015 no longer allocate here. Localise some vars to blocks where they
1016 are used. Remove separate switch stmt for creating .got sec.
1017 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1018 redundant casts and aborts. Delay setting of vars until needed.
1019 (allocate_dynrelocs): Remove redundant casts and aborts.
1020 (elf_i386_size_dynamic_sections): Move comment.
1021 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1022 calls.
1023 (elf_i386_relocate_section): Likewise. Comment typo fix.
1024 (elf_i386_finish_dynamic_sections): Migrate common code out of
1025 switch statement.
1026 (elf_backend_* defines): Sort.
1027
ced53ee5
AM
1028 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1029 without a reloc when symbol visibilty makes a function local.
1030
63b0f745
NC
10312001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1032
06317a27
NC
1033 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1034 conflicting float flags.
63b0f745 1035
ebe50bae
AM
10362001-09-26 Alan Modra <amodra@bigpond.net.au>
1037
1038 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1039 (elf_backend_copy_indirect_symbol): Define.
1040 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1041 (struct elf_i386_link_hash_table): Likewise.
1042 (link_hash_newfunc): Get rid of unnecessary casts.
1043 (elf_i386_link_hash_table_create): Likewise.
1044 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1045 Don't test input section SEC_READONLY here to try to avoid copy
1046 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1047 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1048 here to properly test whether we need copy relocs. Do so for weak
1049 syms too.
1050
1051 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1052 (elf_backend_copy_indirect_symbol): Define.
1053 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1054 (stub_hash_newfunc): Get rid of unnecessary casts.
1055 (hppa_link_hash_newfunc): Likewise.
1056 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1057 Don't test input section SEC_READONLY here to try to avoid copy
1058 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1059 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1060 here to properly test whether we need copy relocs. Do so for weak
1061 syms too.
1062
af6166c0
AM
10632001-09-26 Alan Modra <amodra@bigpond.net.au>
1064
1065 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1066 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1067 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1068
e62de969
JJ
10692001-09-25 Jakub Jelinek <jakub@redhat.com>
1070
1071 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1072 computation.
1073
09c1cc88
L
10742001-09-25 H.J. Lu <hjl@gnu.org>
1075
1076 * bfd-in2.h: Regenerated.
1077
38701953
AM
10782001-09-25 Alan Modra <amodra@bigpond.net.au>
1079
1080 * elf32-i386.c: Add comment re linker function names and ordering.
1081 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1082 (elf_i386_grok_prstatus): Move before linker functions.
1083 (elf_i386_grok_psinfo): Likewise.
1084 (elf_i386_fake_sections): Move so that functions are ordered.
1085 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1086
98ceb8ce
AM
10872001-09-25 Alan Modra <amodra@bigpond.net.au>
1088
0ac8d2ca 1089 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
1090 throughout file.
1091
98ceb8ce
AM
1092 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1093 code handling this option.
1094 (LONG_BRANCH_VIA_PLT): Likewise.
1095 (RELATIVE_DYNRELOCS): Define as zero.
1096 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1097 "pc_count" fields. Remove "section" field.
1098 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1099 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1100 relocs here. Instead, record all needed dynamic relocs via
1101 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1102 in elf_section_data.
1103 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1104 (allocate_plt_and_got_and_discard_relocs): Rename to
1105 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1106 (readonly_dynrelocs): New function.
1107 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1108 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1109 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1110 (elf32_hppa_relocate_section): Make use of cached sreloc.
1111 (elf32_hppa_reloc_type_class): New function.
1112 (elf_backend_reloc_type_class): Define.
1113
0c715baa
AM
11142001-09-25 Alan Modra <amodra@bigpond.net.au>
1115
1116 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1117 and "sreloc" fields.
1118 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1119 "pc_count" fields. Remove "section" field.
1120 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1121 allocate space for dynamic relocs here. Instead, record all
1122 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1123 pointer to "sreloc" section in elf_section_data.
1124 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1125 (allocate_plt_and_got_and_discard_relocs): Rename to
1126 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1127 (readonly_dynrelocs): New function.
1128 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1129 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1130 (elf_i386_relocate_section): Make use of cached sreloc.
1131
f51e552e
AM
11322001-09-24 Alan Modra <amodra@bigpond.net.au>
1133
1134 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1135 reloc rather than just the type.
1136 (_bfd_elf_reloc_type_class): Likewise.
1137 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1138 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1139 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1140 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1141 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1142 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1143 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1144 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1145 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1146 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1147 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1148 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1149 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1150 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1151 * elflink.h: Formatting fixes.
1152 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1153 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1154 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1155
0c35f01a
AM
11562001-09-22 John Reiser <jreiser@BitWagon.com>
1157
1158 * elfcode.h (elf_object_p): Allow for no section header at all in
1159 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1160
1e738b87
NC
11612001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1162
1163 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
1164 * coff-mcore.c: Fix compile time warning messages.
1165 * coff-ppc.c: Fix compile time warning messages.
1166 * coffcode.h: Fix compile time warning messages.
1167 * elf32-mips.c: Fix compile time warning messages.
1168 * elf64-alpha.c: Fix compile time warning messages.
1169 * libbfd.c: Fix compile time warning messages.
1170 * bfd-in2.h: Regenerate.
1e738b87 1171
923f08ff
AM
11722001-09-21 Alan Modra <amodra@bigpond.net.au>
1173
1174 * Makefile.am: Run "make dep-am".
1175 * Makefile.in: Regenerate.
1176
1177 * aoutx.h: Formatting fixes.
1178 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1179
1180 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1181 in error message.
1182
8f615d07
AM
11832001-09-21 Alan Modra <amodra@bigpond.net.au>
1184
1185 * bfd.c (bfd_archive_filename): New function.
1186 * bfd-in2.h: Regenerate.
1187 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1188 in error messages where the bfd is an input bfd.
1189 * aout-cris.c: Likewise.
1190 * coff-arm.c: Likewise.
1191 * coff-mcore.c: Likewise.
1192 * coff-ppc.c: Likewise.
1193 * coff-rs6000.c: Likewise.
1194 * coff-sh.c: Likewise.
1195 * coff-tic54x.c: Likewise.
1196 * coff-tic80.c: Likewise.
1197 * coff64-rs6000.c: Likewise.
1198 * coffcode.h: Likewise.
1199 * coffgen.c: Likewise.
1200 * cofflink.c: Likewise.
1201 * ecofflink.c: Likewise.
1202 * elf-hppa.h: Likewise.
1203 * elf.c: Likewise.
1204 * elf32-arm.h: Likewise.
1205 * elf32-cris.c: Likewise.
1206 * elf32-gen.c: Likewise.
1207 * elf32-hppa.c: Likewise.
1208 * elf32-i370.c: Likewise.
1209 * elf32-i386.c: Likewise.
1210 * elf32-m32r.c: Likewise.
1211 * elf32-mcore.c: Likewise.
1212 * elf32-mips.c: Likewise.
1213 * elf32-ppc.c: Likewise.
1214 * elf32-s390.c: Likewise.
1215 * elf32-sh.c: Likewise.
1216 * elf32-sparc.c: Likewise.
1217 * elf32-v850.c: Likewise.
1218 * elf64-alpha.c: Likewise.
1219 * elf64-gen.c: Likewise.
1220 * elf64-ppc.c: Likewise.
1221 * elf64-s390.c: Likewise.
1222 * elf64-sparc.c: Likewise.
1223 * elf64-x86-64.c: Likewise.
1224 * elflink.h: Likewise.
1225 * elfxx-ia64.c: Likewise.
1226 * ieee.c: Likewise.
1227 * ihex.c: Likewise.
1228 * libbfd.c: Likewise.
1229 * pdp11.c: Likewise.
1230 * pe-mips.c: Likewise.
1231 * peicode.h: Likewise.
1232 * srec.c: Likewise.
1233 * xcofflink.c: Likewise.
1234
1235 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1236
1237 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1238 error message.
1239
1240 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1241 error message.
1242
1243 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1244 Consolidate error messages, and split long messages to two lines.
1245
671bae9c 12462001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 1247
f51e552e
AM
1248 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1249 and info->allow_shlib_undefined.
1250 * elf32-cris.c: Likewise.
1251 * elf32-hppa.c: Likewise.
1252 * elf32-m68k.c: Likewise.
1253 * elf32-mips.c: Likewise.
1254 * elf32-ppc.c: Likewise.
1255 * elf32-s390.c: Likewise.
1256 * elf32-sh.c: Likewise.
1257 * elf32-sparc.c: Likewise.
1258 * elf64-alpha.c: Likewise.
1259 * elf64-hppa.c: Likewise.
1260 * elf64-ppc.c: Likewise.
1261 * elf64-s390.c: Likewise.
1262 * elf64-sparc.c: Likewise.
1263 * elf64-x86-64.c: Likewise.
1264 * elfxx-ia64.c: Likewise.
671bae9c 1265
3882b010
L
12662001-09-18 Bruno Haible <haible@clisp.cons.org>
1267
1268 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1269 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1270 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1271 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1272 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1273 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1274 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1275 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1276 isxdigit/isdigit/islower.
1277 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1278 (mangle_name): Use ISALNUM instead of isalnum.
1279 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1280 (scan): Use ISDIGIT instead of isdigit.
1281 * hosts/alphavms.h: Don't include <ctype.h>.
1282 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1283 (ieee_object_p): Use TOUPPER instead of toupper.
1284 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1285 (ihex_bad_byte): Use ISPRINT instead of isprint.
1286 * merge.c: Don't include <ctype.h>.
1287 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1288 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1289 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1290 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1291 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1292 (mangle_name): Use ISALNUM instead of isalnum.
1293 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1294 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1295 isupper/islower/isdigit.
1296 (som_decode_symclass): Use TOUPPER instead of toupper.
1297 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1298 (srec_bad_byte): Use ISPRINT instead of isprint.
1299 (srec_scan): Use ISSPACE instead of isspace.
1300 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1301 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1302 * syms.c: Include "safe-ctype.h"
1303 (islower, toupper): Remove macro definitions.
1304 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1305 * vms-gsd.c: Don't include <ctype.h>.
1306 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1307 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1308 islower/toupper.
1309 * vms-tir.c: Don't include <ctype.h>.
1310
dc810e39
AM
13112001-09-18 Alan Modra <amodra@bigpond.net.au>
1312
1313 * libbfd.c (bfd_bread): New function replacing bfd_read without
1314 redundant params. Allow reads up to (size_t) -2 in length.
1315 (bfd_bwrite): Similarly for bfd_write.
1316 (real_read): Return a size_t.
1317 (bfd_read): Call bfd_bread.
1318 (bfd_write): Call bfd_bwrite.
1319 (warn_deprecated): New function to annoy everybody.
1320 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1321 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1322 (bfd_read, bfd_write): Define as macro.
1323 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1324 likewise for bfd_write. Ensure function args are correct size by
1325 using casts or local vars. In some cases, remove unnecessary
1326 casts. Formatting fixes, in some cases removing a large expression
1327 from function args by using a local var. Replace CONST with const.
1328 Modify variable types to avoid warings. Use casts to avoid
1329 warnings when using negative numbers in unsigned expressions.
1330 * aout-adobe.c: Likewise.
1331 * aout-arm.c: Likewise.
1332 * aout-cris.c: Likewise.
1333 * aout-encap.c: Likewise.
1334 * aout-ns32k.c: Likewise.
1335 * aout-target.h: Likewise.
1336 * aout-tic30.c: Likewise.
1337 * aoutf1.h: Likewise.
1338 * aoutx.h: Likewise.
1339 * archive.c: Likewise.
1340 * archures.c: Likewise.
1341 * bfd-in.h: Likewise.
1342 * bfd.c: Likewise.
1343 * binary.c: Likewise.
1344 * bout.c: Likewise.
1345 * cache.c: Likewise.
1346 * cisco-core.c: Likewise.
1347 * coff-a29k.c: Likewise.
1348 * coff-alpha.c: Likewise.
1349 * coff-arm.c: Likewise.
1350 * coff-h8300.c: Likewise.
1351 * coff-h8500.c: Likewise.
1352 * coff-i386.c: Likewise.
1353 * coff-i860.c: Likewise.
1354 * coff-i960.c: Likewise.
1355 * coff-ia64.c: Likewise.
1356 * coff-m68k.c: Likewise.
1357 * coff-m88k.c: Likewise.
1358 * coff-mcore.c: Likewise.
1359 * coff-mips.c: Likewise.
1360 * coff-ppc.c: Likewise.
1361 * coff-rs6000.c: Likewise.
1362 * coff-sh.c: Likewise.
1363 * coff-sparc.c: Likewise.
1364 * coff-stgo32.c: Likewise.
1365 * coff-tic30.c: Likewise.
1366 * coff-tic54x.c: Likewise.
1367 * coff-tic80.c: Likewise.
1368 * coff-w65.c: Likewise.
1369 * coff-z8k.c: Likewise.
1370 * coff64-rs6000.c: Likewise.
1371 * coffcode.h: Likewise.
1372 * coffgen.c: Likewise.
1373 * cofflink.c: Likewise.
1374 * coffswap.h: Likewise.
1375 * corefile.c: Likewise.
1376 * cpu-arc.c: Likewise.
1377 * cpu-h8300.c: Likewise.
1378 * cpu-h8500.c: Likewise.
1379 * cpu-i960.c: Likewise.
1380 * cpu-ia64-opc.c: Likewise.
1381 * cpu-ns32k.c: Likewise.
1382 * cpu-pdp11.c: Likewise.
1383 * cpu-pj.c: Likewise.
1384 * cpu-sh.c: Likewise.
1385 * cpu-w65.c: Likewise.
1386 * cpu-z8k.c: Likewise.
1387 * dwarf1.c: Likewise.
1388 * dwarf2.c: Likewise.
1389 * ecoff.c: Likewise.
1390 * ecofflink.c: Likewise.
1391 * ecoffswap.h: Likewise.
1392 * elf-bfd.h: Likewise.
1393 * elf-hppa.h: Likewise.
1394 * elf-m10200.c: Likewise.
1395 * elf-m10300.c: Likewise.
1396 * elf.c: Likewise.
1397 * elf32-arc.c: Likewise.
1398 * elf32-arm.h: Likewise.
1399 * elf32-avr.c: Likewise.
1400 * elf32-cris.c: Likewise.
1401 * elf32-fr30.c: Likewise.
1402 * elf32-gen.c: Likewise.
1403 * elf32-h8300.c: Likewise.
1404 * elf32-hppa.c: Likewise.
1405 * elf32-i370.c: Likewise.
1406 * elf32-i386.c: Likewise.
1407 * elf32-i860.c: Likewise.
1408 * elf32-m32r.c: Likewise.
1409 * elf32-m68k.c: Likewise.
1410 * elf32-mcore.c: Likewise.
1411 * elf32-mips.c: Likewise.
1412 * elf32-openrisc.c: Likewise.
1413 * elf32-pj.c: Likewise.
1414 * elf32-ppc.c: Likewise.
1415 * elf32-s390.c: Likewise.
1416 * elf32-sh-lin.c: Likewise.
1417 * elf32-sh.c: Likewise.
1418 * elf32-sparc.c: Likewise.
1419 * elf32-v850.c: Likewise.
1420 * elf64-alpha.c: Likewise.
1421 * elf64-hppa.c: Likewise.
1422 * elf64-mips.c: Likewise.
1423 * elf64-ppc.c: Likewise.
1424 * elf64-s390.c: Likewise.
1425 * elf64-sparc.c: Likewise.
1426 * elf64-x86-64.c: Likewise.
1427 * elfarm-nabi.c: Likewise.
1428 * elfcode.h: Likewise.
1429 * elfcore.h: Likewise.
1430 * elflink.c: Likewise.
1431 * elflink.h: Likewise.
1432 * elfxx-ia64.c: Likewise.
1433 * elfxx-target.h: Likewise.
1434 * format.c: Likewise.
1435 * hash.c: Likewise.
1436 * hp300hpux.c: Likewise.
1437 * hppabsd-core.c: Likewise.
1438 * hpux-core.c: Likewise.
1439 * i386aout.c: Likewise.
1440 * i386dynix.c: Likewise.
1441 * i386linux.c: Likewise.
1442 * i386lynx.c: Likewise.
1443 * i386mach3.c: Likewise.
1444 * i386msdos.c: Likewise.
1445 * i386os9k.c: Likewise.
1446 * ieee.c: Likewise.
1447 * ihex.c: Likewise.
1448 * irix-core.c: Likewise.
1449 * libaout.h: Likewise.
1450 * libbfd-in.h: Likewise.
1451 * libbfd.c: Likewise.
1452 * libcoff-in.h: Likewise.
1453 * libecoff.h: Likewise.
1454 * libieee.h: Likewise.
1455 * libnlm.h: Likewise.
1456 * libpei.h: Likewise.
1457 * libxcoff.h: Likewise.
1458 * linker.c: Likewise.
1459 * lynx-core.c: Likewise.
1460 * m68klinux.c: Likewise.
1461 * merge.c: Likewise.
1462 * mipsbsd.c: Likewise.
1463 * netbsd-core.c: Likewise.
1464 * nlm.c: Likewise.
1465 * nlm32-alpha.c: Likewise.
1466 * nlm32-i386.c: Likewise.
1467 * nlm32-ppc.c: Likewise.
1468 * nlm32-sparc.c: Likewise.
1469 * nlmcode.h: Likewise.
1470 * nlmswap.h: Likewise.
1471 * ns32k.h: Likewise.
1472 * oasys.c: Likewise.
1473 * opncls.c: Likewise.
1474 * osf-core.c: Likewise.
1475 * pc532-mach.c: Likewise.
1476 * pdp11.c: Likewise.
1477 * pe-mips.c: Likewise.
1478 * peXXigen.c: Likewise.
1479 * peicode.h: Likewise.
1480 * ppcboot.c: Likewise.
1481 * ptrace-core.c: Likewise.
1482 * reloc.c: Likewise.
1483 * reloc16.c: Likewise.
1484 * riscix.c: Likewise.
1485 * rs6000-core.c: Likewise.
1486 * sco5-core.c: Likewise.
1487 * section.c: Likewise.
1488 * som.c: Likewise.
1489 * sparclinux.c: Likewise.
1490 * sparclynx.c: Likewise.
1491 * srec.c: Likewise.
1492 * stabs.c: Likewise.
1493 * sunos.c: Likewise.
1494 * syms.c: Likewise.
1495 * targets.c: Likewise.
1496 * tekhex.c: Likewise.
1497 * trad-core.c: Likewise.
1498 * versados.c: Likewise.
1499 * vms-gsd.c: Likewise.
1500 * vms-hdr.c: Likewise.
1501 * vms-misc.c: Likewise.
1502 * vms-tir.c: Likewise.
1503 * vms.c: Likewise.
1504 * vms.h: Likewise.
1505 * xcofflink.c: Likewise.
1506 * bfd-in2.h: Regenerate.
1507 * libbfd.h: Regenerate.
1508 * libcoff.h: Regenerate.
1509
1510 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1511 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1512 (ufile_ptr): Define.
1513 (bfd_tell): Return a ufile_ptr.
1514 * libbfd.c (bfd_tell): Likewise.
1515 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1516 unnecessarily.
1517 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1518 * aoutf1.h: Likewise.
1519 * som.c: Likewise.
1520 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1521 larger than unsigned long can represent.
1522
1523 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1524 size overflows size_t.
1525 (bfd_realloc): Likewise.
1526 (bfd_zmalloc): Likewise.
1527 * opncls.c (bfd_alloc): Likewise.
1528 (bfd_zalloc): Likewise.
1529 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1530 (bfd_alloc, bfd_zalloc): Update.
1531
1532 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1533 8 bits.
1534 (bfd_get_signed_8): Likewise.
1535 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1536 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1537 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1538 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1539 * libaout.h: Likewise define and use here.
1540 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1541 * aout-arm.c: Likewise.
1542 * aout-encap.c: Likewise.
1543 * aout-ns32k.c: Likewise.
1544 * aout-tic30.c: Likewise.
1545 * aoutf1.h: Likewise.
1546 * aoutx.h: Likewise.
1547 * bout.c: Likewise.
1548 * coff-alpha.c: Likewise.
1549 * coff-h8300.c: Likewise.
1550 * coff-h8500.c: Likewise.
1551 * coff-i960.c: Likewise.
1552 * coff-ia64.c: Likewise.
1553 * coff-m88k.c: Likewise.
1554 * coff-mips.c: Likewise.
1555 * coff-ppc.c: Likewise.
1556 * coff-rs6000.c: Likewise.
1557 * coff-sh.c: Likewise.
1558 * coff-sparc.c: Likewise.
1559 * coff-stgo32.c: Likewise.
1560 * coff-tic30.c: Likewise.
1561 * coff-tic80.c: Likewise.
1562 * coff-w65.c: Likewise.
1563 * coff-z8k.c: Likewise.
1564 * coff64-rs6000.c: Likewise.
1565 * coffgen.c: Likewise.
1566 * cofflink.c: Likewise.
1567 * coffswap.h: Likewise.
1568 * ecoff.c: Likewise.
1569 * ecoffswap.h: Likewise.
1570 * elf.c: Likewise.
1571 * elf32-mips.c: Likewise.
1572 * elf64-mips.c: Likewise.
1573 * hp300hpux.c: Likewise.
1574 * i386dynix.c: Likewise.
1575 * i386lynx.c: Likewise.
1576 * i386msdos.c: Likewise.
1577 * i386os9k.c: Likewise.
1578 * libpei.h: Likewise.
1579 * nlm32-alpha.c: Likewise.
1580 * nlm32-i386.c: Likewise.
1581 * nlm32-ppc.c: Likewise.
1582 * nlmcode.h: Likewise.
1583 * nlmswap.h: Likewise.
1584 * oasys.c: Likewise.
1585 * pdp11.c: Likewise.
1586 * pe-mips.c: Likewise.
1587 * peXXigen.c: Likewise.
1588 * peicode.h: Likewise.
1589 * riscix.c: Likewise.
1590 * sunos.c: Likewise.
1591 * xcofflink.c: Likewise.
1592 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1593 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1594 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1595 equivalent H_PUT_* macro instead.
1596 (GETWORD, GETHALF, GETBYTE): Similarly.
1597 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1598 (GETWORD, GETHALF, GETBYTE): Likewise.
1599 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1600
1601 * bfd-in.h (struct orl): Change "pos" to a union.
1602 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1603 (bsd_write_armap): Here too.
1604 (coff_write_armap): And here.
1605 * coff-rs6000.c (xcoff_write_armap_old): And here.
1606 (xcoff_write_one_armap_big): And here.
1607 (xcoff_write_armap_big): And here.
1608 * ecoff.c (_bfd_ecoff_write_armap): And here.
1609 * elf64-mips.c (mips_elf64_write_armap): And here.
1610
1611 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1612 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1613 * elf32-h8300.c (elf32_h8_mach): Likewise.
1614 * elf32-mips.c (elf_mips_mach): Likewise.
1615 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1616
1617 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1618 calls.
1619 (aix386_core_vec): Typo fix.
1620
1621 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1622 etc. to avoid redefined macro warning.
1623 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1624 (MY(fix_pcrel_26)): Likewise.
1625 * aout-ns32k.c (MY(put_reloc)): Likewise.
1626 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1627 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1628 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1629
1630 * aout-encap.c: Include "file", not <file> for binutils headers.
1631 (encap_object_p): Half baked attempt to fix compile errors in
1632 code dealing with "magic".
1633
1634 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1635 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1636 bfd_vma's rather than longs.
1637 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1638 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1639 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1640 remove case 3.
1641 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1642 Use unsigned comparisons.
1643 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1644 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1645 (_bfd_do_ns32k_reloc_contents): Likewise.
1646 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1647 (_bfd_ns32k_get_immediate): Likewise.
1648 (_bfd_ns32k_put_displacement): Likewise.
1649 (_bfd_ns32k_put_immediate): Likewise.
1650 (bfd_reloc_status_type): Likewise.
1651
1652 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1653 to avoid shadowing.
1654 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1655 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1656 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1657 avoid shadowing.
1658 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1659 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1660 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1661 shadow warning.
1662 (_bfd_elfcore_strndup): Likewise for "dup".
1663 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1664 "name" to avoid shadowing.
1665 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1666 definition of "off".
1667 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1668 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1669 definition of "s".
1670 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1671 "secpp".
1672 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1673 to avoid shadowing.
1674 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1675 to avoid shadowing.
1676 (elf_link_input_bfd): Likewise.
1677 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1678 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1679 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1680 "input_section".
1681 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1682 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1683 (sunos_write_dynamic_symbol): Remove unused vars.
1684 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1685 innermost "directory_name" and "file_name" vars.
1686 * tekhex.c (first_phase): Rename local var "type" to "stype".
1687 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1688 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1689 doing comparison at caller.
1690 (vms_esecflag_by_name): Likewise.
1691 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1692 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1693 (xcoff_write_global_symbol): Rename "p" param to "inf".
1694
1695 * cisco-core.c: Add missing prototypes.
1696 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1697 (cisco_core_file_failing_signal): Likewise.
1698 (cisco_core_file_matches_executable_p): Likewise.
1699 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1700 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1701 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1702 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1703
1704 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1705 thumb_glue_size and arm_glue_size.
1706 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1707
1708 * coff64-rs6000.c: Group prototypes together.
1709
1710 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1711 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1712
1713 * cpu-arc.c: Add missing prototypes.
1714 * cpu-h8500.c: Likewise.
1715 * cpu-i960.c: Likewise.
1716 * cpu-pj.c: Likewise.
1717 * cpu-sh.c: Likewise.
1718 * cpu-w65.c: Likewise.
1719 * cpu-z8k.c: Likewise.
1720 * elf32-fr30.c: Likewise.
1721 * elf32-h8300.c: Likewise.
1722 * elf32-i370.c: Likewise.
1723 * hpux-core.c: Likewise.
1724 * versados.c: Likewise.
1725
1726 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1727 * cpu-h8500.c: Likewise.
1728 * cpu-i960.c: Likewise.
1729 * cpu-z8k.c: Likewise.
1730
1731 * cpu-ia64-opc.c: Correct comment.
1732
1733 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1734
1735 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1736 to unsigned.
1737 (bfd_elf32_write_out_phdrs): Likewise.
1738 (bfd_elf64_write_out_phdrs): Likewise.
1739 (elf_linker_section_pointers): Change addend to bfd_vma.
1740 (_bfd_elf_find_pointer_linker_section): Likewise.
1741 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1742 filepos to unsigned file_ptr.
1743 (_bfd_elfcore_strndup): Change max param to size_t.
1744 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1745 (_bfd_elfcore_strndup): Likewise.
1746 (_bfd_elf_find_pointer_linker_section): Likewise.
1747
1748 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1749 insn and sym_value to ints.
1750
1751 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1752 bfd_size_type.
1753 (elfcore_read_notes): Likewise.
1754
1755 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1756 param from unsigned char to int.
1757 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1758 for info_to_howto call.
1759 (add_dynamic_entry): Define macro.
1760 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1761
1762 * elf32-cris.c (add_dynamic_entry): Define macro.
1763 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1764
1765 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1766 (elf32_h8_object_p): Likewise.
1767 (elf32_h8_merge_private_bfd_data): Likewise.
1768 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1769
1770 * elf32-hppa.c (add_dynamic_entry): Define macro.
1771 (elf32_hppa_size_dynamic_sections): Use it.
1772 * elf32-i370.c (add_dynamic_entry): Define macro.
1773 (i370_elf_size_dynamic_sections): Use it.
1774 (i370_noop): Make static.
1775 * elf32-i386.c (add_dynamic_entry): Define macro.
1776 (elf_i386_size_dynamic_sections): Use it.
1777 * elf32-m68k.c (add_dynamic_entry): Define macro.
1778 (elf_m68k_size_dynamic_sections): Use it.
1779 * elf32-ppc.c (add_dynamic_entry): Define macro.
1780 (ppc_elf_size_dynamic_sections): Use it.
1781 * elf32-s390.c (add_dynamic_entry): Define macro.
1782 (elf_s390_size_dynamic_sections): Use it.
1783 * elf64-alpha.c (add_dynamic_entry): Define macro.
1784 (elf64_alpha_size_dynamic_sections): Use it.
1785 * elf64-hppa.c (add_dynamic_entry): Define macro.
1786 (elf64_hppa_size_dynamic_sections): Use it.
1787 * elf64-ppc.c (add_dynamic_entry): Define macro.
1788 (ppc64_elf_size_dynamic_sections): Use it.
1789 * elf64-s390.c (add_dynamic_entry): Define macro.
1790 (elf_s390_size_dynamic_sections): Use it.
1791 * elf64-sparc.c (add_dynamic_entry): Define macro.
1792 (sparc64_elf_size_dynamic_sections): Use it.
1793 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1794 (elf64_x86_64_size_dynamic_sections): Use it.
1795 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1796 (elfNN_ia64_size_dynamic_sections): Use it.
1797
1798 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1799 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1800
1801 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1802 false if the first malloc fails rather than going via error_return.
1803
1804 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1805 "index" param.
1806 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1807
1808 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1809
1810 * elfxx-ia64.c (global_sym_index): Return a long.
1811
1812 * ieee.c (get_symbol): Use int rather than char param.
1813 (ieee_slurp_sections): Move "section" var to inner blocks.
1814 (copy_expression): Don't init "value" to zero or worry about
1815 clearing to zero after using.
1816 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1817 shadowing.
1818
1819 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1820 unsigned int.
1821
1822 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1823 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1824
1825 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1826
1827 * pc532-mach.c (MYNSX): Delete.
1828 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1829 (write_object_contents): Correct prototype.
1830
1831 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1832 than unsigned short.
1833
1834 * section.c (bfd_set_section_contents): Remove redundant
1835 "offset < 0" test. Check that "count" doesn't overflow size_t.
1836 (bfd_get_section_contents): Likewise.
1837
1838 * som.c (som_fixup_formats): Add missing braces.
1839 (som_reloc_addend): Pass a bfd_vma for "addend".
1840
1841 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1842 (srec_write_symbols): Remove an unnecessary var.
1843
1844 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1845 to match.
1846 * configure.in: Sort to match. Bump version number.
1847 * configure: Regenerate.
1848
1849 * tekhex.c (move_section_contents): Assert offset == 0.
1850
1851 * versados.c (new_symbol_string): Constify arg.
1852 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1853 (versados_get_symbol_info): Make static.
1854 (versados_print_symbol): Likewise.
1855 (versados_get_reloc_upper_bound): Likewise.
1856 (versados_canonicalize_reloc): Likewise.
1857
417412a2
NC
18582001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1859
1860 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1861
bb731fb6
L
18622001-09-17 H.J. Lu <hjl@gnu.org>
1863
1864 * dwarf1.c (parse_die): Take a new arg for the end of the
1865 section. Return false if die is beyond the section.
1866 (parse_functions_in_unit): Pass the end of the section to
1867 parse_die ().
1868 (_bfd_dwarf1_find_nearest_line): Likewise.
1869
841989d6
NC
18702001-09-14 Michael Rauch <mrauch@netbsd.org>
1871
1872 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1873 just like R_SPARC_32.
1874
056a1d49
NC
18752001-09-14 Kevin Lo <kevlo@openbsd.org>
1876
1877 * configure.bfd: Add arm-openbsd target.
1878
4008bd9b
TS
18792001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1880
1881 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1882 Add support for mips64.
1883
c11cc227
AO
18842001-09-13 Alexandre Oliva <aoliva@redhat.com>
1885
1886 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1887
aa4f99bb
AO
18882001-09-12 Alexandre Oliva <aoliva@redhat.com>
1889
1890 * elf.c (prep_headers): Get the machine code from the elf
1891 backend data.
1892 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1893 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1894 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1895 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1896 * elf-arc.c (arc_elf_final_write_processing): Don't override
1897 e_machine, it's now properly set in prep_headers.
1898 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1899 EM_AVR_OLD.
1900 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1901 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1902 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1903 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1904 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1905 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1906 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1907 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1908 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1909 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1910 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1911 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1912
204692d7
RH
19132001-09-11 Richard Henderson <rth@redhat.com>
1914
1915 * elf64-alpha.c (elf64_alpha_section_flags): New.
1916 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1917
f94952df
RH
19182001-09-11 Richard Henderson <rth@redhat.com>
1919
1920 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1921 apply HINT relocations against dynamic symbols.
1922
146f1a87
L
19232001-09-11 H.J. Lu <hjl@gnu.org>
1924
f94952df 1925 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 1926
1cd6895c
RH
19272001-09-09 Richard Henderson <rth@redhat.com>
1928
96e2734b
RH
1929 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1930
1cd6895c
RH
1931 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1932 following a call to a near function.
1933
f16fbd61
RH
19342001-09-08 Richard Henderson <rth@redhat.com>
1935
1936 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1937 relocation errors. Fail gp-relative relocations against
1938 dynamic symbols.
1939
56882138
AM
19402001-09-08 Alan Modra <amodra@bigpond.net.au>
1941
1942 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1943 as well as DEF_DYNAMIC in test for avoided copy relocs.
1944 (allocate_plt_and_got_and_discard_relocs): Likewise.
1945 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1946 (allocate_plt_and_got_and_discard_relocs): Likewise.
1947
cb56d3d3
TS
19482001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1949
1950 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1951 of R_MIPS_PC16.
56882138
AM
1952
19532001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1954
1955 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1956 definitions.
1957 (mips_elf64_howto_table_rel): Likewise.
1958
19592001-09-05 Tom Rix <trix@redhat.com>
1960
1961 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1962 and syscall symbols.
1963 (write_global_symbol) : Same.
1964 (bfd_xcoff_export_symbol): Remove unused syscall param.
1965 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1966 bfd_xcoff_import_symbol.
1967 * bfd-in.h: Same.
1968 * bfd-in2.h : Regenerate.
1969
19702001-09-04 Richard Henderson <rth@redhat.com>
1971
1972 * elf64-alpha.c (SKIP_HOWTO): New.
1973 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1974 Fix sizes of 16-bit mem format relocs.
1975 (elf64_alpha_reloc_map): Update to match.
1976 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1977 (elf64_alpha_relax_without_lituse): Likewise.
1978 (elf64_alpha_check_relocs): Handle GPREL16.
1979 (elf64_alpha_relocate_section): Likewise.
1980 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1981 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1982 * bfd-in2.h, libbfd.h: Rebuild.
1983
19842001-09-04 Jeff Law <law@redhat.com>
1985
1986 * elf32-h8300.c (elf32_h8_relax_section): New function.
1987 (elf32_h8_relax_delete_bytes): Likewise.
1988 (elf32_h8_symbol_address_p): Likewise.
1989 (elf32_h8_get_relocated_section_contents): Likewise.
1990 (bfd_elf32_bfd_relax_section): Define.
1991 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1992
1993 * elf32-h8300.c (special): New function.
1994 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1995 all relocations.
1996 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1997 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1998 Fix minor problems with 8bit and 16bit PC relative relocations.
1999
20002001-09-01 Andreas Jaeger <aj@suse.de>
2001
2002 * vms-tir.c: Add missing prototypes.
2003 * vms-hdr.c: Likewise.
2004 * vms-gsd.c: Likewise.
2005 * vms-misc.c: Likewise.
2006
20072001-08-31 H.J. Lu <hjl@gnu.org>
2008
2009 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2010 with bad relocation.
2011
20122001-08-31 Eric Christopher <echristo@redhat.com>
2013 Jason Eckhardt <jle@redhat.com>
2014
2015 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2016 mips32_4k and mips64.
2017 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2018 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2019 * bfd/cpu-mips.c: Ditto.
2020 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2021 * bfd/bfd-in2.h: Regenerate.
2022
20232001-08-31 Jakub Jelinek <jakub@redhat.com>
2024
2025 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2026 value into R_ALPHA_RELATIVE's addend.
2027 (elf64_alpha_finish_dynamic_symbol): Likewise.
2028
20292001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2030
2031 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2032 recomputed addend during relocatable link if not USE_REL.
2033
2034 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2035 error.
2036
20372001-08-30 H.J. Lu <hjl@gnu.org>
2038
2039 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2040 2 changes.
2041 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2042 relocations for weak definitions.
2043
20442001-08-30 H.J. Lu <hjl@gnu.org>
2045
2046 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2047 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2048 * Makefile.in: Rebuild.
2049
20502001-08-30 H.J. Lu <hjl@gnu.org>
2051
2052 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2053 dynamic relocation for undefined weak symbols when creating
2054 executables. Check h->root.root.type, instead of h->root.type.
2055
20562001-08-29 Joel Sherrill <joel@OARcorp.com>
2057
2058 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2059 default from coff to elf.
2060
20612001-08-29 Jeff Law <law@redhat.com>
2062
2063 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2064 relocations.
2065 (h8_reloc_map): Similarly.
2066 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2067 Add support for PC relative relocations.
2068
2069 * elf32-h8300.c: Put all prototypes together.
2070 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2071 (elf32_h8_final_link_relocate): New function for linker.
2072 (elf32_h8_relocate_section): Similarly.
2073 (elf_backend_relocate_section): Define.
2074
2075 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2076 (h8300_scan): Handle architecture:machine encodings typically
2077 found in linker scripts.
2078 * elf.c (prep_headers): Do not try to do H8 machine recognition
2079 here.
2080 * elf32-h8300.c: Add some missing prototypes.
2081 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2082 (elf32_h8_object_p): Similarly.
2083
20842001-08-29 Tom Rix <trix@redhat.com>
2085
2086 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2087 does not follow a XTY_SD.
2088
20892001-08-29 Alan Modra <amodra@bigpond.net.au>
2090
2091 * targmatch.sed: Delete case statements.
2092 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2093 aix4.3 and above.
2094
2095Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
2096
2097 * Makefile.am (elf32-h8300.lo): New target.
2098 * config.bfd (h8300*-*-elf): New case.
2099 * configure.in (bfd_elf32_h8300_vec): New case.
2100 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2101 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2102 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2103 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2104 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2105 * elf32-h8300.c: New file.
2106 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2107
21082001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2109
2110 * sparclynx.c: Add missing prototypes.
2111 * coff-mcore.c: Add missing prototypes.
2112 * elf32-pj.c: Add missing prototypes.
2113 * nlm32-sparc.c: Add missing prototypes.
2114 * oasys.c: Add missing prototypes.
2115 * pdp11.c: Add missing prototypes.
2116 * pe-mips.c: Add missing prototypes.
2117 * riscix.c: Add missing prototypes.
2118
21192001-08-27 Daniel Jacobowitz <drow@mvista.com>
2120
2121 * elf32-i386.c: Add missing prototypes.
2122 * elf32-ppc.c: Likewise.
2123 * elf32-sh-lin.c: Likewise.
2124 * elfarm-nabi.c: Likewise.
2125
21262001-08-27 Daniel Jacobowitz <drow@mvista.com>
2127
2128 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2129 (elf_i386_grok_psinfo): New function.
2130 (elf_backend_grok_prstatus): Define.
2131 (elf_backend_grok_psinfo): Likewise.
2132 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2133 (ppc_elf_grok_psinfo): New function.
2134 (elf_backend_grok_prstatus): Define.
2135 (elf_backend_grok_psinfo): Likewise.
2136 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2137 (elf32_shlin_grok_psinfo): New function.
2138 (elf_backend_grok_prstatus): Define.
2139 (elf_backend_grok_psinfo): Likewise.
2140 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2141 (elf32_arm_nabi_grok_psinfo): New function.
2142 (elf_backend_grok_prstatus): Define.
2143 (elf_backend_grok_psinfo): Likewise.
2144
21452001-08-27 H.J. Lu <hjl@gnu.org>
2146
2147 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2148 sanity check.
2149 (mips_elf_calculate_relocation): Create dynamic relocation for
2150 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2151 bit is not set.
2152
21532001-08-27 H.J. Lu <hjl@gnu.org>
2154
2155 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2156 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2157 (_bfd_elf32_mips_grok_prstatus): Likewise.
2158 (_bfd_elf32_mips_grok_psinfo): Likewise.
2159 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2160 `struct mips_elf_link_hash_entry *'.
2161 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2162
21632001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2164
2165 * mipsbsd.c: Add missing prototypes.
2166 * hp300hpux.c: Add missing prototypes.
2167 * i386aout.c: Add missing prototypes.
2168 * i386lynx.c: Add missing prototypes.
2169 * i386mach3.c: Add missing prototypes.
2170 * i386msdos.c: Add missing prototypes.
2171 * i386os9k.c: Add missing prototypes.
2172
21732001-08-27 Linus Nordberg <linus@swox.se>
2174 Torbjorn Granlund <tege@swox.com>
2175 Staffan Ulfberg <staffanu@swox.se>
2176 Alan Modra <amodra@bigpond.net.au>
2177
2178 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2179 targ64_selvecs for 32 bit powerpc targets.
2180 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2181 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2182 Run "make dep-am".
2183 * Makefile.in: Regenerate.
2184 * configure.in: Add elf64_powerpc vecs.
2185 * configure: Regenerate.
2186 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2187 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2188 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2189 * elf64-ppc.c: New file.
2190 * reloc.c: Add powerpc64 relocs.
2191 * libbfd.h: Regenerate.
2192 * bfd-in2.h: Regenerate.
2193
21942001-08-27 Andreas Schwab <schwab@suse.de>
2195
2196 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2197 reloc is against read-only section.
2198 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2199 looking up section names for DT_TEXTREL.
2200 (elf32_m68k_reloc_type_class): New function.
2201 (elf_backend_reloc_type_class): Define.
2202
22032001-08-27 Andreas Jaeger <aj@suse.de>
2204
2205 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2206 reloc is against read-only section.
2207 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2208 looking up section names for DT_TEXTREL.
2209 (elf_s390_reloc_type_class): New.
2210 (elf_backend_reloc_type_class): Define.
2211
2212 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2213 reloc is against read-only section.
2214 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2215 looking up section names for DT_TEXTREL.
2216 (elf_s390_reloc_type_class): New.
2217 (elf_backend_reloc_type_class): Define.
2218
2219 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2220 is against read-only section.
2221 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2222 looking up section names for DT_TEXTREL.
2223 (ppc_elf_reloc_type_class): New.
2224 (elf_backend_reloc_type_class): Define.
2225
22262001-08-26 Andreas Jaeger <aj@suse.de>
2227
2228 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2229 reloc is against read-only section.
2230 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2231 looking up section names for DT_TEXTREL.
2232 (elf_cris_reloc_type_class): New.
2233 (elf_backend_reloc_type_class): Define.
2234
2235 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2236 against read-only section.
2237 (elf_backend_reloc_type_class): Define.
2238 (sh_elf_reloc_type_class): New.
2239 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2240 looking up section names for DT_TEXTREL.
2241
2242 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2243 reloc is against read-only section.
2244 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2245 looking up section names for DT_TEXTREL.
2246 (elf32_arm_reloc_type_class): New.
2247 (elf_backend_reloc_type_class): Define.
2248
22492001-08-25 Andreas Jaeger <aj@suse.de>
2250
2251 * oasys.c: Add missing prototypes.
2252
2253 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2254 attribute for parameter.
2255 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2256
2257 * versados.c (get_4): Make static.
2258 (get_10): Make static.
2259 Add missing prototypes.
2260 (process_esd): Fix call to versados_new_symbol.
2261
22622001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2263
2264 * coff-a29k.c: Add missing prototypes.
2265 * coff-apollo.c: Add missing prototypes.
2266 * coff-arm.c: Add missing prototypes.
2267 * coff-i860.c: Add missing prototypes.
2268 * coff-rs6000.c: Add missing prototypes.
2269 * coff-tic80.c: Add missing prototypes.
2270 * elf-m10200.c: Add missing prototypes.
2271 * elf-m10300.c: Add missing prototypes.
2272 * elf32-arm.h: Add missing prototypes.
2273 * elf32-d10v.c: Add missing prototypes.
2274 * elf32-m32r.c: Add missing prototypes.
2275 * elf32-mcore.c: Add missing prototypes.
2276 * elf32-openrisc.c: Add missing prototypes.
2277 * elf32-sh.c: Add missing prototypes.
2278 * elf32-sparc.c: Add missing prototypes.
2279 * elf32-v850.c: Add missing prototypes.
2280 * elfarm-nabi.c: Add missing prototypes.
2281 * elfarm-oabi.c: Add missing prototypes.
2282
22832001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2284
2285 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2286 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2287
22882001-08-24 H.J. Lu <hjl@gnu.org>
2289
2290 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2291 hash structure.
2292
22932001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2294
2295 * elf-bfd.h (elf_hash_table): Revert definition.
2296 (is_elf_hash_table): New macro.
2297 * elflink.h (elf_link_add_object_symbols): Test
2298 is_elf_hash_table before accessing ELF only fields in hash
2299 structure.
2300 (elf_link_create_dynamic_sections): Fail if not using an ELF
2301 hash structure.
2302 (elf_add_dynamic_entry): Fail if not using an ELF hash
2303 structure.
2304 (elf_link_record_local_dynamic_symbol): Fail if not using an
2305 ELF hash structure.
2306 (size_dynamic_sections): Fail if not using an ELF hash
2307 structure.
2308 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2309 hash structure.
2310 (elf_bfd_final_link): Fail if not using an ELF hash
2311 structure.
2312
23132001-08-24 H.J. Lu <hjl@gnu.org>
2314
2315 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2316 table is not an ELF linker hash table.
2317
2318 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2319 table type to bfd_link_elf_hash_table.
2320
2321 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2322 the last change.
2323
2324 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2325 table type to bfd_link_generic_hash_table.
2326
23272001-08-24 Alexandre Oliva <aoliva@redhat.com>
2328
2329 * bfd.c (bfd_alt_mach_code): New function.
2330 * bfd-in2.h: Rebuilt.
2331
23322001-08-24 Alexandre Oliva <aoliva@redhat.com>
2333
2334 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2335 `type' field in the hash entry when deciding whether to follow a
2336 link.
2337
23382001-08-24 Jakub Jelinek <jakub@redhat.com>
2339
2340 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2341 last.
2342 (elf_link_sort_relocs): Adjust accordingly.
2343
2344 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2345 (elf64_alpha_check_relocs): Set it if section this reloc is against
2346 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2347 read-only section.
2348 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2349 is is against read-only section.
2350 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2351 check section names.
2352 (elf64_alpha_reloc_type_class): New.
2353 (elf_backend_reloc_type_class): Define.
2354
23552001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2356
2357 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2358 by bfd_malloc().
2359
23602001-08-23 Andreas Jaeger <aj@suse.de>
2361
2362 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2363 the reloc is against read-only section.
2364 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2365 of looking up section names for DT_TEXTREL.
2366 (elf64_x86_64_reloc_type_class): New.
2367 (elf_backend_reloc_type_class): Define.
2368
23692001-08-23 H.J. Lu <hjl@gnu.org>
2370
2371 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2372 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2373
2374 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2375 bfd_print_symbol_vandf.
2376 * coffgen.c (coff_print_symbol): Likewise.
2377 * elf.c (bfd_elf_print_symbol): Likewise.
2378 * ieee.c (ieee_print_symbol): Likewise.
2379 * nlmcode.h (nlm_print_symbol): Likewise.
2380 * oasys.c (oasys_print_symbol): Likewise.
2381 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2382 * som.c (som_print_symbol): Likewise.
2383 * srec.c (srec_print_symbol): Likewise.
2384 * tekhex.c (tekhex_print_symbol): Likewise.
2385 * versados.c (versados_print_symbol): Likewise.
2386 * vms.c (vms_print_symbol): Likewise.
2387
2388 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2389 with bfd_fprintf_vma.
2390 (bfd_elf_print_symbol): Likewise.
2391 * syms.c (bfd_print_symbol_vandf): Likewise.
2392
23932001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2394
2395 * aoutf1.h (sunos_write_object_contents): Silence compile time
2396 warning.
2397 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2398
2399 * bout.c: Add missing function prototypes. Fix formatting.
2400 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2401 * coff-w65.c: Add missing function prototypes. Fix formatting.
2402 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2403 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2404 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2405 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2406 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2407 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2408 * coff-sh.c: Add missing function prototypes. Fix formatting.
2409
24102001-08-23 Jakub Jelinek <jakub@redhat.com>
2411
2412 * elf-bfd.h (enum elf_reloc_type_class): New.
2413 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2414 (_bfd_elf_reloc_type_class): New.
2415 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2416 (elfNN_bed): Add elf_backend_reloc_type_class.
2417 * elf.c (_bfd_elf_reloc_type_class): New.
2418 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2419 is against read-only section.
2420 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2421 looking up section names for DT_TEXTREL.
2422 (elf_i386_reloc_type_class): New.
2423 (elf_backend_reloc_type_class): Define.
2424 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2425 reloc is against read-only section.
2426 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2427 looking up section names for DT_TEXTREL.
2428 (elf32_sparc_reloc_type_class): New.
2429 (elf_backend_reloc_type_class): Define.
2430 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2431 reloc is against read-only section.
2432 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2433 looking up section names for DT_TEXTREL.
2434 (sparc64_elf_reloc_type_class): New.
2435 (elf_backend_reloc_type_class): Define.
2436 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2437 (elfNN_ia64_hash_table_create): Clear ia64_info.
2438 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2439 section.
2440 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2441 instead of looking up section names for DT_TEXTREL.
2442 (elfNN_ia64_reloc_type_class): New.
2443 (elf_backend_reloc_type_class): Define.
2444 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2445 (struct elf_link_sort_rela): New.
2446 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2447 (elf_bfd_final_link): Call elf_link_sort_relocs.
2448 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2449 necessary.
2450
24512001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2452
2453 * configure.in (x86-bsdi): No corefile support.
2454 * configure: Regenerate.
2455
24562001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2457
2458 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2459 comma.
2460
24612001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2462
2463 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2464 the alignment of dwarf2 linkonce sections to 0.
2465 * coff-sto32.c: Likewise.
2466
24672001-08-20 Andreas Jaeger <aj@suse.de>
2468
2469 * coff-sparc.c: Add missing prototypes.
2470 * elf32-s390.c: Likewise.
2471 * elf32-i960.c: Likewise.
2472 * aout-target.h: Likewise.
2473
24742001-08-20 H.J. Lu <hjl@gnu.org>
2475
2476 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2477 (elf_num_section_syms): New for num_section_syms.
2478
2479 * elf.c (elf_map_symbols): Set num_section_syms.
2480 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2481 the section symbol index.
2482
24832001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2484
2485 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2486 select the generic has table creator. All elf backends need elf
2487 specific fields in the hash table.
2488
24892001-08-20 Alan Modra <amodra@bigpond.net.au>
2490
2491 * archive.c (offsetof): Remove define.
2492 * elf.c: Likewise.
2493 * oasys.c: Likewise
2494 * sysdep.h (offsetof): Define.
2495
24962001-08-17 Alan Modra <amodra@bigpond.net.au>
2497
2498 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2499 (bfd_set_gp_size): Make param unsigned.
2500 * bfd-in2.h: Regenerate.
2501 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2502 than calling bfd_get_gp_size.
2503 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2504 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2505
25062001-08-17 Alan Modra <amodra@bigpond.net.au>
2507
2508 * linker.c (default_fill_link_order): Handle four byte fill value.
2509
25102001-08-17 Alan Modra <amodra@bigpond.net.au>
2511
2512 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2513 prototype.
2514 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2515
2516 * elf64-mips.c (UNUSED_RELOC): Define.
2517 (mips_elf64_howto_table_rel): Use it.
2518 (mips_elf64_howto_table_rela): Here too.
2519 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2520
2521 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2522 silence warning.
2523 * coffgen.c (coff_print_symbol): Fix warnings.
2524 (coff_find_nearest_line): Likewise.
2525 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2526 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2527 * format.c (bfd_check_format_matches): Likewise.
2528 (bfd_set_format): Likewise.
2529 * coff-ia64.c: Add missing prototypes.
2530 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2531 signed to silence warnings.
2532 (elf64_alpha_relocate_section): Likewise.
2533 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2534 (elf64_alpha_add_symbol_hook): Likewise.
2535 (elf64_alpha_final_link): Likewise.
2536 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2537 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2538 (elf64_alpha_size_got_sections): Likewise.
2539 * elfxx-ia64.c: Add missing prototypes.
2540 (elfNN_ia64_relocate_section): Fix warning.
2541 (elfNN_ia64_unwind_entry_compare): Make params const.
2542
25432001-08-17 Alan Modra <amodra@bigpond.net.au>
2544
2545 * config.bfd (targ64_selvecs): New.
2546 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2547
2548 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2549 (BFD_DEFAULT_TARGET_SIZE): New.
2550 (BFD_ARCH_SIZE): Comment.
2551 * configure.in (target_size): New. Set instead of target64 in
2552 selvecs case statement. Set target64 from it.
2553 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2554 * bfd-in2.h: Regenerate.
2555 * configure: Regenerate.
2556
25572001-08-17 Alan Modra <amodra@bigpond.net.au>
2558
2559 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2560 (bfd_errmsgs): Add corresponding message.
2561 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2562 finding an archive that contains different format object files.
2563 Return bfd_error_wrong_object_format for this case.
2564 * format.c: Formatting fixes. s/CONST/const/.
2565 (bfd_check_format_matches): Accept archives that give
2566 bfd_error_wrong_object_format if no full match is found. Tidy
2567 code handling matching_vector. Don't return a pointer to freed
2568 memory in `matching'. Handle ambiguous matches as for partial
2569 archive matches.
2570 * bfd-in2.h: Regenerate.
2571
25722001-08-15 Alan Modra <amodra@bigpond.net.au>
2573
2574 * libieee.h (common_header_type): Add last_byte field.
2575
2576 * ieee.c: Add missing prototypes. Some format fixes.
2577 (struct output_buffer_struct): Move for availability to prototypes.
2578 (ieee_part_after): New function.
2579 (ieee_slurp_debug): Use it here.
2580 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2581 ieee_part_after to set last_byte to one past end of current part.
2582 Update callers.
2583 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2584 Update callers.
2585 (parse_expression): Don't go beyond the end of the current part.
2586 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2587 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2588 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2589 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2590 ieee_set_section_contents, ieee_write_object_contents,
2591 ieee_make_empty_symbol): Make static.
2592 (ieee_archive_p): Correct comments regarding bfd_read.
2593 (ieee_object_p): Similarly.
2594 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2595 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2596 input_bfd, output_bfd, output_buffer.
2597 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2598 do_with_relocs, ie. as a symbol for relocatable files.
2599 (ieee_vec): Add comments showing functions referenced by macros.
2600
26012001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2602
2603 * aout-tic30.c: Add missing prototypes. Fix formatting.
2604 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2605 * peXXigen.c: Add missining prototypes. Fix formatting.
2606 * aout-adobe.c: Add missining prototypes. Fix formatting.
2607
26082001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2609
2610 * elf32-v850.c: Add missing function prototypes.
2611 Fix some formatting.
2612
2613 * cpu-v850.c: Add missing function prototype.
2614 Fix some formatting.
2615
26162001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2617
2618 * elf-bfd.h (struct elf_backend_data): Add new fields
2619 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2620 (bfd_elf_sprintf_vma): Rename function prototype to
2621 '_bfd_elf_sprintf_vma'.
2622 (bfd_elf_fprintf_vma): Rename function prototype to
2623 '_bfd_elf_fprintf_vma'.
2624 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2625 directly, instead indirect via the elf_backend_data structure.
2626 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2627 instead indirect via the elf_backend_data structure.
2628 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2629 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2630 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2631 already defined.
2632 (elf_backend_fprintf_vma): Initialise if not already defined.
2633 (struct elf_backend_data): Initialise the
2634 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2635
26362001-08-10 Andreas Jaeger <aj@suse.de>
2637
2638 * elf64-sparc.c: Add missing prototypes.
2639 * elf32-cris.c: Likewise.
2640 * elf32-i370.c: Likewise.
2641 * elf64-hppa.c: Likewise.
2642 * elf64-s390.c: Likewise.
2643
26442001-08-10 Andreas Jaeger <aj@suse.de>
2645
2646 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2647 Add prototypes where needed.
2648
26492001-08-10 H.J. Lu <hjl@gnu.org>
2650
2651 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2652 (bfd_fprintf_vma): Likewise.
2653
26542001-08-10 H.J. Lu <hjl@gnu.org>
2655
2656 * bfd.c (bfd_sprintf_vma): Don't return void.
2657 (bfd_fprintf_vma): Likewise.
2658
26592001-08-10 Andreas Jaeger <aj@suse.de>
2660
2661 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2662 to build warnings.
2663 * configure: Regenerate.
2664
26652001-08-10 Alan Modra <amodra@bigpond.net.au>
2666
2667 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2668 warning if not BFD64. Add braces so emacs auto format works.
2669 (bfd_elf_fprintf_vma): Likewise.
2670
2671 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2672 of _xcoff_swap_ld*.
2673 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2674 param to agree with libxcoff.h.
2675 (xcoff_swap_ldhdr_out): Likewise.
2676 (xcoff_swap_ldsym_in): Likewise.
2677 (xcoff_swap_ldsym_out): Likewise.
2678 (xcoff_swap_ldrel_in): Likewise.
2679 (xcoff_swap_ldrel_out): Likewise.
2680 (xcoff_create_csect_from_smclas): Likewise.
2681 * coff64-rs6000.c: Add missing prototypes.
2682 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2683 with libxcoff.h.
2684 (xcoff64_swap_ldhdr_out): Likewise.
2685 (xcoff64_swap_ldsym_in): Likewise.
2686 (xcoff64_swap_ldsym_out): Likewise.
2687 (xcoff64_swap_ldrel_in): Likewise.
2688 (xcoff64_swap_ldrel_out): Likewise.
2689 (xcoff64_ppc_relocate_section): Make static.
2690 (xcoff64_slurp_armap): Likewise.
2691 (xcoff64_archive_p): Likewise.
2692 (xcoff64_openr_next_archived_file): Likewise.
2693 (xcoff64_sizeof_headers): Likewise.
2694 (xcoff64_is_lineno_count_overflow): Likewise.
2695 (xcoff64_is_reloc_count_overflow): Likewise.
2696 (xcoff64_loader_symbol_offset): Likewise.
2697 (xcoff64_loader_reloc_offset): Likewise.
2698 * elf64-gen.c: Add missing prototypes.
2699
27002001-08-09 H.J. Lu <hjl@gnu.org>
2701
2702 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2703 (bfd_elf_fprintf_vma): Likewise.
2704
27052001-08-09 H.J. Lu <hjl@gnu.org>
2706
2707 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2708 to ...
2709 * elf-bfd.h: Here.
2710 * bfd-in2.h: Regenerated.
2711
27122001-08-09 H.J. Lu <hjl@gnu.org>
2713
2714 * bfd-in.h (bfd_sprintf_vma): New prototype.
2715 (bfd_fprintf_vma): Likewise.
2716 (bfd_elf_sprintf_vma): Likewise.
2717 (bfd_elf_fprintf_vma): Likewise.
2718 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2719 * bfd-in2.h: Regenerated.
2720
2721 * bfd.c (bfd_sprintf_vma): New. Defined.
2722 (bfd_fprintf_vma): Likewise.
2723
2724 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2725 (bfd_elf_fprintf_vma): Likewise.
2726
27272001-08-09 Alan Modra <amodra@bigpond.net.au>
2728
2729 * coff-rs6000.c: Add missing prototypes.
2730 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2731 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2732 xcoff_loader_reloc_offset): Make static.
2733 * dwarf1.c: Add missing prototypes.
2734 * dwarf2.c: Add missing prototypes.
2735 (struct abbrev_info): Move definition.
2736 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2737 * elf.c: Add missing prototypes.
2738 * elf32-gen.c: Likewise.
2739 * elf32-i386.c: Likewise.
2740 * elf32-ppc.c: Likewise.
2741 (ppc_elf_sort_rela): Use PTR instead of "void *".
2742 * elflink.h: Add missing prototypes. Formatting fixes.
2743 * merge.c: Add missing prototypes.
2744 (last4_eq): Use PTR instead of "void *".
2745 (last_eq): Likewise.
2746 * syms.c: Add missing prototypes.
2747
27482001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2749
2750 * bfd.c: Fix formatting.
2751 * bfd-in2.h: Regenerate.
2752
27532001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2754
2755 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2756 true (this target uses REL relocations) and 'pcrel_offset' to
2757 false (the PC is implied, not stored in the offset).
2758
27592001-08-08 Alan Modra <amodra@bigpond.net.au>
2760
2761 1999-10-19 Linus Nordberg <linus@swox.se>
2762 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2763 * elfxx-target.h (elf_backend_want_got_sym): Define.
2764 (elfNN_bed): Add elf_backend_want_got_sym.
2765 * elflink.c (_bfd_elf_create_got_section): Define
2766 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2767
27682001-08-08 Alexandre Oliva <aoliva@redhat.com>
2769
2770 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2771 (find_rela_addend): New function.
2772 (parse_comp_unit): Call it to find the abbrev offset addend.
2773 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2774 members of dwarf2_debug as debugging information is read.
2775
27762001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2777
2778 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2779 targets as well as sh-pe.
2780
27812001-08-03 Ben Harris <bjh21@netbsd.org>
2782
2783 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2784 reloc from start of section when computing value for R_ARM_REL32
2785 reloc.
2786
27872001-08-03 Alan Modra <amodra@bigpond.net.au>
2788
2789 From H.J. Lu <hjl@gnu.org>
2790 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2791 keep relocs for undefined syms if there are no dynamic sections in
2792 executable.
2793 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2794
27952001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2796
2797 * cofflink.c (coff_link_check_ar_symbols): also search for
2798 __imp__symbol as well as _symbol.
2799 * linker.c (_bfd_generic_link_add_archive_symbols): also
2800 search for __imp__symbol as well as _symbol.
2801
28022001-08-01 Adam Nemet <anemet@lnxw.com>
2803
2804 * elf.c (elf_sort_sections): Return zero only as the last step.
2805
28062001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2807
2808 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2809 ARM_COFF_BUGFIX.
2810 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2811 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2812 ARM_COFF_BUGFIX.
2813
28142001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2815
2816 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2817 to match corresponding bfd_coff_backend data member.
2818
28192001-07-24 Alan Modra <amodra@bigpond.net.au>
2820
2821 * Makefile.am: Update dependencies with "make dep-am".
2822 * Makefile.in: Regenerate
2823
28242001-07-15 H.J. Lu <hjl@gnu.org>
2825
2826 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2827 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2828 * Makefile.in: Regenerate.
2829
28302001-07-11 H.J. Lu <hjl@gnu.org>
2831
2832 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2833 flags when creating the reloc section if the ALLOC flag in the
2834 source section is set.
2835
28362001-07-11 Steve Ellcey <sje@cup.hp.com>
2837
2838 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2839 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2840 * bfd-in2.h: Regenerate.
2841 * libbfd.h: Regenerate.
2842 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2843 new relocations.
2844 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2845 (elfNN_ia64_check_relocs): Likewise.
2846 (elfNN_ia64_install_value): Likewise.
2847 (elfNN_ia64_relocate_section): Likewise.
2848
28492001-07-11 Jakub Jelinek <jakub@redhat.com>
2850
2851 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2852 R_SPARC_UA64.
2853 (elf32_sparc_check_relocs): Likewise.
2854 Only create .rela section for alloced sections in shared libraries.
2855 (elf32_sparc_relocate_section): Likewise.
2856 Remove redundant check.
2857 Optimize unaligned reloc usage.
2858 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2859 check.
2860
28612001-07-11 H.J. Lu <hjl@gnu.org>
2862
2863 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2864 ALLOC|LOAD flags as the source section for debugging sections
2865 when creating the reloc section.
2866
28672001-07-05 Jim Wilson <wilson@redhat.com>
2868
2869 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2870 the section of the bigger symbol.
2871
2872 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2873
28742001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2875
2876 * peicode.h (coff_swap_scnhdr_in): For sections containing
2877 uninitialised data, only set their size to s_paddr if this does
2878 not reset their size to zero. MS's latest compilers will set
2879 s_paddr to zero.
2880
28812001-07-04 H.J. Lu <hjl@gnu.org>
2882
2883 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2884 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2885 bfd_mach_mips5000.
2886
28872001-07-03 Mark Elbrecht <snowball3@softhome.net>
2888
2889 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2890
2891 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2892 sections being discarded.
2893
28942001-06-30 Alan Modra <amodra@bigpond.net.au>
2895
2896 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2897 instead of _bfd_elfcore_section_from_phdr.
2898 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2899 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2900 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2901 (elfcore_grok_prstatus): Likewise.
2902 (elfcore_grok_lwpstatus): Likewise.
2903 (bfd_get_elf_phdr_upper_bound): Likewise.
2904 (elfcore_make_note_pseudosection): Formatting.
2905 (_bfd_elfcore_strndup): Formatting.
2906 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2907 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2908
29092001-06-29 Daniel Jacobowitz <drow@mvista.com>
2910
2911 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2912 and _bfd_elfcore_strndup.
2913 (struct elf_backend_data): Add elf_backend_grok_prstatus
2914 and elf_backend_grok_psinfo.
2915 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2916 (elfcore_grok_prstatus): Use it.
2917 (elfcore_make_note_pseudosection): Likewise.
2918 (elfcore_strndup): Rename to...
2919 (_bfd_elfcore_strndup): Here, and make global.
2920 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2921 (elfcore_grok_note): Call elf_backend_grok_prstatus
2922 and elf_backend_grok_psinfo if available.
2923 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2924 (_bfd_elf32_mips_grok_psinfo): New function.
2925 (elf_backend_grok_prstatus): Define.
2926 (elf_backend_grok_psinfo): Define.
2927 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2928 (elf_backend_grok_psinfo): Likewise.
2929 (elfNN_bed): Include elf_backend_grok_prstatus and
2930 elf_backend_grok_psinfo.
2931
29322001-06-29 H.J. Lu <hjl@gnu.org>
2933
2934 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2935 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2936 is NULL before filling PLT.
2937
29382001-06-29 Alan Modra <amodra@bigpond.net.au>
2939
2940 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2941
29422001-06-27 Alan Modra <amodra@bigpond.net.au>
2943
2944 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2945 here..
2946 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2947 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2948 after gc has run.
2949
2950 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2951 (IS_ABSOLUTE_RELOC): Define.
2952 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2953 (hppa_link_hash_newfunc): Always init it.
2954 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2955 create COPY relocs only when the reloc is in a read-only section.
2956 Instead, allocate space for a dynamic reloc to reference the
2957 library symbol directly. Keep track of space we allocate using
2958 relocs_entries.
2959 (hppa_discard_copies): Delete, and move code to..
2960 (allocate_plt_and_got): ..here. Rename to
2961 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2962 relocs for non-shared link.
2963 (elf32_hppa_size_dynamic_sections): Update calls to above.
2964 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2965 in lieu of COPY relocs.
2966
2967 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2968 here..
2969 (elf_i386_adjust_dynamic_symbol): ..nor here..
2970 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2971 after gc has run.
2972 (elf_i386_size_dynamic_sections): Fix a comment.
2973 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2974 involved in writing reloc out.
2975
29762001-06-25 Alan Modra <amodra@bigpond.net.au>
2977
2978 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2979 Ensure syms are dynamic if we might be emitting a reloc.
2980 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2981 for undefweak or undefined syms..
2982 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2983
2984 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2985 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2986 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2987 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2988
29892001-06-24 H.J. Lu <hjl@gnu.org>
2990
2991 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2992 strncasecmp/strcasecmp instead of strncmp/strcmp.
2993
29942001-06-23 H.J. Lu <hjl@gnu.org>
2995
2996 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2997 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2998 in the regular object file and treat the weak definition as
2999 the normal one.
3000
30012001-06-23 Alan Modra <amodra@bigpond.net.au>
3002
3003 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3004 unresolved_reloc test to exclude cases where we use "relocation"
3005 before setting it to point into the .got. Reinstate fudge for
3006 unresolved relocs in debugging sections.
3007
3008 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3009 complicated tests for unresolvable relocs with a simple direct
3010 scheme using "unresolved_reloc" var.
3011
3012 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3013 elf_i386_dyn_relocs. Update comment.
3014 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3015 dyn_relocs.
3016 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3017 others to aborts.
3018 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3019 abort.
3020 (elf_i386_size_dynamic_sections): Likewise.
3021 (elf_i386_finish_dynamic_symbol): Likewise.
3022 (elf_i386_finish_dynamic_sections): Likewise.
3023 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3024 handling code.
3025
3026 Avoid creating COPY relocs if possible.
3027 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3028 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3029 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3030 reloc is in a read-only section. Instead, allocate space for a
3031 dynamic reloc to reference the library symbol directly. Keep
3032 track of space we allocate using pcrel_relocs_copied.
3033 (discard_copies): Delete, and move code to ..
3034 (allocate_plt_and_got): ..here. Rename to
3035 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3036 relocs for non-shared link.
3037 (elf_i386_size_dynamic_sections): Update calls to above functions.
3038 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3039 more ugly logic to avoid "unresolvable relocation" error. Use
3040 htab shortcut in place of elf_hash_table macro.
3041 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3042 not always be created now.
3043
30442001-06-20 Bo Thorsen <bo@suse.co.uk>
3045
3046 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3047 shared libraries.
3048
30492001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3050
3051 * configure.host (mips64-*-linux): Reformat.
3052
30532001-06-21 Alan Modra <amodra@bigpond.net.au>
3054
3055 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3056 allocate local .got space. Use shortcuts from hash table for .got
3057 and .plt rather than comparing section names.
3058 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3059 adjusting index into local_got_refcounts to document what we are
3060 really doing.
3061 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3062 Tidy .got and .plt error checking.
3063
30642001-06-20 Catherine Moore <clm@redhat.com>
3065
3066 * elf-bfd.h (struct elf_backend_data):
3067 elf_backend_emit_relocs: New field: Function for emitting
3068 relocs.
3069 elf_backend_count_relocs: New field: Function for determining
3070 the number of relocs to be emitted.
3071 * elfxx-target.h: Provide default (NULL) values for
3072 elf_backend_emit_relocs and elf_backend_count_relocs.
3073 * elflink.h (elf_link_size_reloc_section): Make the hash table
3074 big enough to hold the relocs counted by either reloc_count or
3075 o->reloc_count.
3076 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3077 should be emitted, either because of a command line option
3078 stored in the info structure or because the target provides a
3079 special reloc emitting function.
3080 If the target provides a reloc counting function use it,
3081 unless performing a relocatable link or emitting all relocs.
3082 Also set the SEC_RELOC flag on any output section which will
3083 contain relocs.
3084 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3085 should be emitted, either because of a command line option
3086 stored in the info structure or because the target provides a
3087 special reloc emitting function.
3088 If the target provides a reloc emitting function, use it,
3089 unless performing a relocatable link or emitting all relocs.
3090
30912001-06-20 H.J. Lu <hjl@gnu.org>
3092
3093 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3094 allocate local .got space.
3095
30962001-06-19 Andreas Jaeger <aj@suse.de>
3097
3098 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3099 dynamic symbols.
3100
31012001-06-18 Hans-Peter Nilsson <hp@axis.com>
3102
3103 * elflink.h (struct elf_assign_sym_version_info): Remove member
3104 export_dynamic. All users changed to use info member.
3105 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3106 export_dynamic, instead use member in parameter info.
3107 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3108 bfd_elf64_size_dynamic_sections): Update prototype.
3109 * bfd-in2.h: Regenerate.
3110
31112001-06-18 H.J. Lu <hjl@gnu.org>
3112
3113 * elflink.h (elf_info_failed): Add a new field, verdefs.
3114 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3115 elf_export_symbol.
3116 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3117 should be exported.
3118
31192001-06-17 H.J. Lu <hjl@gnu.org>
3120
3121 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3122 readonly_reloc, to record if a relocation in the .rel.dyn
3123 section is against a read-only section.
3124 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3125 field to false.
3126 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3127 in the .rel.dyn section against a read-only section by setting
3128 DF_TEXTREL or readonly_reloc.
3129 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3130 it is true.
3131 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3132 there is a relocation in the .rel.dyn section against a
3133 read-only section.
3134 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3135 DF_TEXTREL is set.
3136
31372001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3138
3139 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3140 function. Move flagword result into parameter list. Remove
3141 comment about setting bfd_error_handler to intercept failure
3142 results.
3143 * coffgen.c (make_a_section_from_file): Examine result of
3144 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3145 caller.
3146 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3147 function. Move flagword result into parameter list.
3148 * libcoff.h: Regenerate.
3149 * libecoff.h: Regenerate.
3150
31512001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3152
3153 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3154 section is going to follow it.
3155
31562001-06-12 Catherine Moore <clm@redhat.com>
3157
3158 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3159 with the file_align entry from elf_backend_data.
3160 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3161 (elf_gc_record_vtentry): Likewise.
3162
31632001-06-10 Alan Modra <amodra@bigpond.net.au>
3164
3165 * elflink.h: Whitespace changes.
3166 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3167 rather than "unsigned char".
3168 (elf_link_output_relocs): Likewise.
3169 (elf_link_input_bfd): Likewise.
3170 (elf_reloc_link_order): LIkewise.
3171 * elf.c: s/CONST/const/. Whitespace changes.
3172 * elf32-mips.c: Formatting fix.
3173
3174 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3175 * Makefile.in: Regenerate.
3176 * po/Make-in: Remove trailing tab.
3177
31782001-06-09 Philip Blundell <philb@gnu.org>
3179
3180 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3181 change.
3182 (elf32_arm_plt_entry): Likewise.
3183
31842001-06-08 H.J. Lu <hjl@gnu.org>
3185
3186 * elf.c (swap_out_syms): Keep names for global section symbols.
3187
31882001-06-07 H.J. Lu <hjl@gnu.org>
3189
3190 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3191 MIPS-based machines need it.
3192
31932001-06-07 H.J. Lu <hjl@gnu.org>
3194
3195 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3196 for SGI only.
3197
3198 * config.bfd: Remove ecoff from Linux/mips.
3199
32002001-06-07 Andreas Jaeger <aj@suse.de>
3201
3202 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3203 assertion.
3204 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3205 alignment of 8 for .rela sections; handle further relocations.
3206
32072001-06-06 Christian Groessler <cpg@aladdin.de>
3208
3209 * coff-z8k.c: Fix formatting.
3210 Fix howtos: howto->size was always 1.
3211
32122001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3213
3214 * configure.host (mips64*-*-linux*): Define.
3215
32162001-06-05 Alan Modra <amodra@bigpond.net.au>
3217
3218 * elf32-i386.c (elf_i386_discard_copies): Rename to
3219 discard_copies, and use elf_link_hash_entry arg rather than
3220 elf_i386_link_hash_entry.
3221 (elf_i386_link_hash_traverse): Delete.
3222 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3223 Tidy sizing of dynamic sections.
3224 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3225 possible .plt entries.
3226 (elf_i386_gc_sweep_hook): Likewise.
3227 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3228 everything with plt.refcount <= 0.
3229
3230 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3231 .relgot space here.
3232 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3233 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3234 .rel.plt here..
3235 (allocate_plt_and_got): ..instead do it all here. New function.
3236 (elf_i386_size_dynamic_sections): Allocate local .got space and
3237 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3238 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3239 rather than gc variety).
3240 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3241 (elf_i386_relocate_section): Use it here and correct handling of
3242 R_386_GOT32. Provide section and offset for "unresolvable
3243 relocation" error message.
3244 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3245
3246 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3247 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3248 (elf_i386_link_hash_table_create): Init them.
3249 (create_got_section): New function.
3250 (elf_i386_create_dynamic_sections): New function.
3251 (elf_backend_create_dynamic_sections): Set to above.
3252 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3253 calling bfd_get_section_by_name.
3254 (elf_i386_gc_sweep_hook): Likewise.
3255 (elf_i386_adjust_dynamic_symbol): Likewise.
3256 (elf_i386_size_dynamic_sections): Likewise.
3257 (elf_i386_relocate_section): Likewise.
3258 (elf_i386_finish_dynamic_sections): Likewise.
3259
3260 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3261
32622001-06-02 H.J. Lu <hjl@gnu.org>
3263
3264 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3265 and ELFOSABI_HPUX.
3266 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3267
32682001-06-02 H.J. Lu <hjl@gnu.org>
3269
3270 * aout-cris.c (MACHTYPE_OK): New. Defined.
3271
32722001-06-02 Hans-Peter Nilsson <hp@axis.com>
3273
3274 * section.c (_bfd_strip_section_from_output): Handle NULL
3275 output_section.
3276
32772001-06-02 H.J. Lu <hjl@gnu.org>
3278
3279 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3280 rs6000coff64_vec only if BFD64 is defined.
3281 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3282
32832001-06-02 H.J. Lu <hjl@gnu.org>
3284
3285 * coff-ia64.c (ia64coff_object_p): Rewrite with
3286 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3287
32882001-06-01 Andreas Jaeger <aj@suse.de>
3289
3290 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3291 relocation, small reformatting.
3292
32932001-05-29 Andreas Jaeger <aj@suse.de>
3294
3295 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3296 (elf64_x86_64_relocate_section): Likewise.
3297
32982001-05-30 Alan Modra <amodra@one.net.au>
3299
3300 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3301 millicode. Don't allocate .got and .rela.got space here..
3302 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3303 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3304 .rela.plt here..
3305 (hppa_handle_PIC_calls): ..nor here..
3306 (allocate_plt_and_got): ..instead do it all here. New function.
3307 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3308 call allocate_plt_and_got. No need to zap .got if not dynamic.
3309 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3310 gc_common_final_link.
3311 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3312 (elf32_hppa_relocate_section): Use it here.
3313 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3314 dynamic_sections_created.
3315 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3316
33172001-05-28 Andreas Jaeger <aj@suse.de>
3318
3319 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3320 generic version since we want a hashsize of 4.
3321 (elf_backend_size_info): Likewise.
3322
33232001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3324
3325 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3326 a zeroing loop.
3327 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3328 (elf_link_input_bfd): Likewise.
3329 (elf_reloc_link_order): Likewise.
3330 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3331 relocations correctly.
3332
33332001-05-28 Nicolas Pitre <nico@cam.org>
3334
3335 * elf32-arm.h: fix PLT generation for big endian ARM
3336
33372001-05-28 Alan Modra <amodra@one.net.au>
3338
3339 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3340 for symbols forced local that need plabels.
3341 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3342 .plt.rela for local syms if non-shared.
3343 (hppa_build_one_stub): Mask lsb of plt.offset.
3344 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3345 (clobber_millicode_symbols): Correct comment.
3346 (elf32_hppa_relocate_section): Likewise.
3347 (elf32_hppa_finish_dynamic_symbol): Likewise.
3348
33492001-05-28 Jeff Sturm <jsturm@one-point.com>
3350
3351 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3352 * bfd-in2.h: Regenerate.
3353 * libbfd.h: Regenerate.
3354 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3355 and BFD_RELOC_SPARC_UA64 mapping
3356 * elf64-sparc.c: Likewise.
3357
33582001-05-25 H.J. Lu <hjl@gnu.org>
3359
3360 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3361 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3362 (coff-rs6000.lo): Remove the old dependency.
3363 * Makefile.in: Rebuild.
3364
3365 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3366 coff-rs6000.lo.
3367
33682001-05-25 H.J. Lu <hjl@gnu.org>
3369
3370 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3371 rs6000coff_core_file_matches_executable_p,
3372 rs6000coff_core_file_failing_command and
3373 rs6000coff_core_file_failing_signal only if AIX_CORE is
3374 defined.
3375 (pmac_xcoff_vec): Likewise.
3376 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3377
33782001-05-25 Timothy Wall <twall@redhat.com>
3379
3380 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3381 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3382
33832001-05-25 H.J. Lu <hjl@gnu.org>
3384
3385 * bfd-in2.h: Regenerated.
3386 * libcoff.h: Likewise.
3387
33882001-05-25 Alan Modra <amodra@one.net.au>
3389
3390 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3391 undefined millicode syms in shared libs.
3392 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3393 (elf32_hppa_check_relocs): Likewise.
3394 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3395 (elf32_hppa_size_dynamic_sections): Likewise.
3396 (elf32_hppa_relocate_section): Likewise.
3397 (elf32_hppa_finish_dynamic_symbol): Likewise.
3398 (elf32_hppa_finish_dynamic_sections): Likewise.
3399
34002001-05-24 Tom Rix <trix@redhat.com>
3401
3402 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3403 xcoff-target.h not used to define rs6000 or ppc bfd.
3404 * Makefile.in same
3405
3406 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3407 to 64 bit.
3408
3409 * coff-rs6000.c : Many changes for 64 bit support. Move common
3410 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3411 and pmac_xcoff_vec
3412
3413 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3414 linker now supported. Explictly define the rs6000coff64_vec.
3415
3416 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3417 (coff_print_aux) same
3418 (coff_write_object_contents) same
3419 (coff_slurp_line_table) same
3420
3421 * coffgen.c : (coff_fix_symbol_name) formatting
3422 (coff_mangle_symbols) xcoff 64 bit support
3423 (coff_write_symbol) same
3424 (coff_write_alien_symbol) same
3425 (coff_write_native_symbol) same
3426 (coff_write_symbols) same
3427 (coff_get_symbol_info) same
3428 (bfd_coff_get_syment) same
3429 (coff_print_symbol) same
3430
3431 * config.bfd : add powerpc64-*-aix* target
3432
3433 * libcoff-in.h : formatting
3434
3435 * libcoff.h : move xcoff extern declarations to libxcoff.h
3436
3437 * libxcoff.h : New file
3438
3439 * xcofflink.c : Many changes for xcoff64 support. Move common
3440 structures to include/coff/xcoff.h. Move specific structure to
3441 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3442 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3443
3444 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3445 aix4.2+ -binitfini.
3446
3447 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3448
34492001-05-23 Alexandre Oliva <aoliva@redhat.com>
3450
3451 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3452 s/ENTIRES/ENTRIES/.
3453
34542001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3455
3456 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3457 * libbfd.h: Regenerate.
3458 * bfd-in2.h: Regenerate.
3459
3460 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3461 * archures.c (bfd_mach_mips12000): Define.
3462 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3463 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3464 support.
3465 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3466 * bfd-in2.h: Regenerate.
3467 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3468
34692001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3470
3471 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3472 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3473 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3474 that is used by GCC.
3475
34762001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3477
3478 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3479 of entries in a structured section.
3480 * elf.c: Use new macro.
3481 * elf32-i386.c: Use new macro.
3482 * elf32-mips.c: Use new macro.
3483 * elf64-alpha.c: Use new macro.
3484 * elf64-sparc.c: Use new macro.
3485 * elfcode.h: Use new macro.
3486 * elflink.h: Use new macro.
3487
34882001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3489
3490 * bfdint.texi: Replace -oformat with --oformat.
3491
34922001-05-21 Andreas Jaeger <aj@suse.de>
3493
3494 * dwarf2.c (decode_line_info): Fix error message.
3495 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3496 adjust error message.
3497
34982001-05-18 H.J. Lu <hjl@gnu.org>
3499
3500 * elflink.h (elf_link_add_object_symbols): Revert the last
3501 change.
3502
35032001-05-17 Alan Modra <amodra@one.net.au>
3504
3505 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3506 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3507 (hppa_build_one_stub): Add an assert to check plt.offset.
3508
35092001-05-17 H.J. Lu <hjl@gnu.org>
3510
3511 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3512 version definition to basename of the output filename.
3513
35142001-05-17 H.J. Lu <hjl@gnu.org>
3515
3516 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3517 basename of the bfd filename.
3518
35192001-05-16 Alan Modra <amodra@one.net.au>
3520
3521 * section.c (asection): Add linker_has_input field.
3522 (STD_SECTION): Adjust initialization to suit.
3523 * ecoff.c (bfd_debug_section): Likewise.
3524 * bfd-in2.h: Regenerate.
3525
35262001-05-15 Alexandre Oliva <aoliva@redhat.com>
3527
3528 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3529 negative 32-bit operands to 16 operands when the operand is
3530 going to be zero-extended by the modified opcode.
3531
35322001-05-12 Peter Targett <peter.targett@arccores.com>
3533
3534 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3535 name for 'arc5' core versions.
3536 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3537
3538 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3539 architecture.
3540 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3541
35422001-05-11 Jakub Jelinek <jakub@redhat.com>
3543
3544 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3545 sections as well.
3546 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3547 to .gnu.linkonce.t.FOO text section.
3548
35492001-05-11 Jakub Jelinek <jakub@redhat.com>
3550
3551 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3552 fields, change sec into secinfo.
3553 (struct sec_merge_info): Add chain, remove last fields.
3554 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3555 (sec_merge_hash_lookup): If lookup could not use a string only
3556 because it has bad alignment, mark the old string for deletion.
3557 (sec_merge_add): Add secinfo argument. Don't compute entry's
3558 position, instead record the section.
3559 (sec_merge_emit): Update for the sec into secinfo change in
3560 struct sec_merge_hash_entry.
3561 (_bfd_merge_section): Only record the section for merging, defer
3562 putting strings into the hash table.
3563 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3564 _bfd_merge_sections): New functions.
3565 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3566 changes.
3567 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3568 (_bfd_nolink_bfd_merge_sections): Define.
3569 * libbfd.h: Likewise.
3570 (bfd_generic_merge_sections): Add prototype.
3571 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3572 (struct bfd_target): Likewise.
3573 * bfd.c (bfd_merge_sections): Define.
3574 * bfd-in2.h: Rebuilt.
3575 * elf.c (_bfd_elf_merge_sections): New function.
3576 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3577 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3578 * reloc.c (bfd_generic_merge_sections): New function.
3579 * vms.c (vms_bfd_merge_sections): New function.
3580 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3581 * aout-target.h (MY_bfd_merge_sections): Define.
3582 * aout-tic30.c (MY_bfd_merge_sections): Define.
3583 * binary.c (binary_bfd_merge_sections): Define.
3584 * bout.c (b_out_bfd_merge_sections): Define.
3585 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3586 * coffcode.c (coff_bfd_merge_sections): Define.
3587 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3588 * i386msdos.c (msdos_bfd_merge_sections): Define.
3589 * i386os9k.c (os9k_bfd_merge_sections): Define.
3590 * ieee.c (ieee_bfd_merge_sections): Define.
3591 * ihex.c (ihex_bfd_merge_sections): Define.
3592 * nlm-target.h (nlm_bfd_merge_sections): Define.
3593 * oasys.c (oasys_bfd_merge_sections): Define.
3594 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3595 * som.c (som_bfd_merge_sections): Define.
3596 * srec.c (srec_bfd_merge_sections): Define.
3597 * tekhex.c (tekhex_bfd_merge_sections): Define.
3598 * versados.c (versados_bfd_merge_sections): Define.
3599 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3600
36012001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3602
3603 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3604 to be unsigned long, in order to match its use.
3605
36062001-05-10 H.J. Lu <hjl@gnu.org>
3607
3608 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3609 indirect symbols.
3610
36112001-05-09 H.J. Lu <hjl@gnu.org>
3612
3613 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3614 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3615 Remove the unused veriable `dynver'.
3616
36172001-05-08 Ian Lance Taylor <ian@zembu.com>
3618
3619 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3620 NULL or is not COFF.
3621 (coff_i386_rtype_to_howto): Don't dump core if output section
3622 owner is not COFF.
3623
36242001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3625
3626 * ecoff.c (bfd_debug_section): Fix initialization.
3627 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3628 is always a positive integer. Cast away sign mismatch.
3629 * elf32-mips.c: Fix misleading comment and typo.
3630 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3631 correct data type.
3632 * elflink.c: Fix typo.
3633 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3634 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3635
36362001-05-04 Richard Henderson <rth@redhat.com>
3637
3638 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3639
36402001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3641
3642 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3643 EF_ARM_HASENTRY if the start address is set.
3644
36452001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3646
3647 * targets.c (_bfd_target_vector_entries): Compute value based on
3648 the size of the _bfd_target_vector and not bfd_target_vector.
3649
36502001-05-03 H.J. Lu <hjl@gnu.org>
3651
3652 * elfcode.h: Include "libiberty.h".
3653
3654 * elflink.h (elf_link_add_object_symbols): Set
3655 elf_dt_name (abfd) to basename of the bfd filename.
3656 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3657 of the bfd filename.
3658
36592001-05-03 Andreas Jaeger <aj@suse.de>
3660
3661 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3662 (elf_generic_info_to_howto_rel): Likewise.
3663 * coff-alpha.c (reloc_nil): Likewise.
3664 (alpha_ecoff_bad_format_hook): Likewise.
3665 (alpha_adjust_reloc_out): Likewise.
3666 (alpha_bfd_reloc_type_lookup): Likewise.
3667 (alpha_convert_external_reloc): Likewise.
3668 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3669 (elf64_alpha_reloc_bad): Likewise.
3670 (elf64_alpha_reloc_gpdisp): Likewise.
3671 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3672 (elf64_alpha_info_to_howto): Likewise.
3673 (elf64_alpha_add_symbol_hook): Likewise.
3674 (elf64_alpha_create_got_section): Likewise.
3675 (elf64_alpha_is_local_label_name): Likewise.
3676 (elf64_alpha_merge_ind_symbols): Likewise.
3677 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3678 (mips_elf64_get_reloc_upper_bound): Likewise.
3679 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3680 (nlm_alpha_get_public_offset): Likewise.
3681
36822001-05-02 Johan Rydberg <jrydberg@opencores.org>
3683
3684 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3685 about overflow in R_OPENRISC_LO_16_IN_INSN and
3686 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3687
36882001-04-30 H.J. Lu <hjl@gnu.org>
3689
3690 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3691 only for ELF_LINK_FORCED_LOCAL.
3692 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3693 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3694 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3695
3696 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3697 if the symbol has hidden or internal visibility.
3698
36992001-04-30 Alan Modra <amodra@one.net.au>
3700
3701 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3702 calls to undefined weak symbols.
3703
37042001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3705
3706 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3707 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3708
37092001-04-27 Andreas Jaeger <aj@suse.de>
3710
3711 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3712 out handled entries.
3713 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3714 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3715 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3716 GOT32.
3717
37182001-04-27 Sean McNeil <sean@mcneil.com>
3719
3720 * config.bfd: Add arm-vxworks target.
3721 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3722 addend (fro VXworks targets).
3723
37242001-04-26 H.J. Lu <hjl@gnu.org>
3725
3726 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3727 valid.
3728
37292001-04-25 Frank Ch. Eigler <fche@redhat.com>
3730
3731 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3732 * bfd-in2.h: Regenerated.
3733
37342001-04-24 Jakub Jelinek <jakub@redhat.com>
3735
3736 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3737 (struct sec_merge_hash): Remove alignment_power.
3738 (sec_merge_hash_newfunc): Clear alignment.
3739 (sec_merge_hash_lookup): Pass alignment as argument.
3740 Use hashp->root.next, not hashp->next to walk the hash chain.
3741 If a string already in the hashtable does not have required
3742 alignment, create a new hashtable entry.
3743 (sec_merge_init): Remove alignment_power argument.
3744 (sec_merge_add): Add alignment argument.
3745 (sec_merge_emit): Alignment is now a per-entity thing, not per
3746 section.
3747 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3748 for proper alignment.
3749 Pass alignment information to sec_merge_add.
3750
37512001-04-24 Christian Groessler <cpg@aladdin.de>
3752
3753 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3754 and R_REL16 reloc types; accept odd values for R_REL16 type
3755
37562001-04-24 Johan Rydberg <jrydberg@opencores.org>
3757
3758 * cpu-openrisc.c: New file.
3759 * elf32-openrisc.c: Likewise.
3760
3761 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3762 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3763 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3764 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3765 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3766 * Makefile.in: Regenerated.
3767 * config.bfd: (openrisc-*-elf): New target.
3768 * configure.in (bfd_elf32_openrisc_vec): New vector.
3769 * configure: Regenerated.
3770 * libbfd.h: Regenerated.
3771 * bfd-in2.h: Regenerated.
3772 * reloc.c: Add OpenRISC relocations.
3773 * targets.c (bfd_elf32_openrisc_vec): Declare.
3774 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3775 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3776 (bfd_openrisc_arch): Declare.
3777 (bfd_archures_list): Add bfd_openrisc_arch.
3778 * elf.c (prep_headers): Add bfd_arch_openrisc.
3779
37802001-04-23 Bo Thorsen <bo@suse.de>
3781
3782 * elf64-x86-64.c: Add c++ vtable hack.
3783 Small whitespace and comment changes.
3784
37852001-04-19 Andreas Jaeger <aj@suse.de>
3786
3787 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3788 (elf64_x86_64_plt_entry): Likewise.
3789 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3790 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3791
37922001-04-17 Hans-Peter Nilsson <hp@axis.com>
3793
3794 * elf32-cris.c: Tweak comments related to dynamic linking.
3795 (cris_elf_relocate_section): When not creating shared object, fill
3796 in the .got table for any symbol not in the dynamic symbol table.
3797 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3798 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3799 table.
3800 (cris_elf_check_relocs): Use variable r_type in all places rather
3801 than the original expression. Add default case in switch for
3802 reloc types.
3803 (elf_cris_size_dynamic_sections): Iterate over
3804 elf_cris_discard_excess_program_dynamics when not creating shared
3805 library.
3806 (elf_cris_discard_excess_dso_dynamics): Renamed from
3807 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3808 (elf_cris_discard_excess_program_dynamics): New.
3809
38102001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3811
3812 * coffcode.h (coff_write_object_contents): Use
3813 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3814
38152001-04-14 H.J. Lu <hjl@gnu.org>
3816
3817 * bfd-in2.h: Regenerate.
3818
38192001-04-14 Jakub Jelinek <jakub@redhat.com>
3820
3821 * section.c (STD_SECTION): Add entsize.
3822
38232001-04-13 H.J. Lu <hjl@gnu.org>
3824
3825 * section.c (SEC_MERGE): Define new flag for merging.
3826 (SEC_STRINGS): Likewise.
3827 (entsize): New field.
3828
38292001-04-13 Roger Sayle <roger@metaphorics.com>
3830
3831 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3832 flag on pe-i386 targets.
3833
38342001-04-13 Jakub Jelinek <jakub@redhat.com>
3835
3836 * libbfd-in.h (_bfd_merge_section): New.
3837 (_bfd_write_merged_section): New.
3838 (_bfd_merged_section_offset): New.
3839 * libbfd.h: Rebuilt.
3840 * linker.c (_bfd_generic_link_output_symbols): Handle
3841 discard_sec_merge.
3842 * aoutx.h (aout_link_write_symbols): Likewise.
3843 * pdp11.c (aout_link_write_symbols): Likewise.
3844 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3845 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3846 sections.
3847 (elf_link_sec_merge_syms): New.
3848 (elf_link_input_bfd): Call _bfd_merged_section_offset
3849 and _bfd_write_merged_section.
3850 Handle discard_sec_merge.
3851 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3852 field.
3853 (struct bfd_elf_section_data): Likewise.
3854 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3855 SEC_STRINGS section flags and entsize from their ELF counterparts.
3856 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3857 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3858 from their BFD counterparts.
3859 * merge.c: New file.
3860 * Makefile.am: Add strtab.lo.
3861 * Makefile.in: Rebuilt.
3862
38632001-04-09 Hans-Peter Nilsson <hp@axis.com>
3864
3865 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3866 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3867
38682001-04-05 Steven J. Hill <sjhill@cotw.com>
3869
3870 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3871 endian MIPS ELF target.
3872 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3873 MIPS ELF target.
3874
3875 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3876 64bit big endian MIPS ELF target.
3877 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3878 endian MIPS ELF target.
3879 * configure: Regenerated.
3880
3881 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3882 little endian targets.
3883 (mips_elf_sym_is_global): Handle traditional targets.
3884
3885 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3886 64bit big endian MIPS ELF target.
3887 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3888 endian MIPS ELF target.
3889
3890 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3891 and bfd_elf64_tradlittlemips_vec.
3892
38932001-04-05 David Mosberger <davidm@hpl.hp.com>
3894
3895 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3896 ordinary "progbits" section.
3897
38982001-04-04 Alan Modra <alan@linuxcare.com.au>
3899
3900 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3901 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3902
39032001-04-03 David Mosberger <davidm@hpl.hp.com>
3904
3905 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3906
39072001-03-30 H.J. Lu <hjl@gnu.org>
3908
3909 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3910 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3911
39122001-03-26 H.J. Lu <hjl@gnu.org>
3913
3914 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3915 if there are any relocations for generic ELF.
3916 (bfd_elf32_bfd_link_add_symbols): Defined to
3917 elf32_generic_link_add_symbols.
3918 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3919 if there are any relocations for generic ELF.
3920 (bfd_elf64_bfd_link_add_symbols): Defined to
3921 elf64_generic_link_add_symbols.
3922
39232001-03-23 Nick Clifton <nickc@redhat.com>
3924
3925 * Makefile.am (BUILD_CFILES): New variable: List of C source
3926 files created in build directory.
3927 (BUILD_HFILES): New variable: List of header files created in
3928 build directory.
3929 (POTFILES): Delete.
3930 (po/POTFILES.in): Replace rule with empty entry.
3931 (po/SRC-POTFILES.in): New rule: Create a list of source files
3932 in the source directory.
3933 (po/BLD-POTFILES.in): New rule: Create a list of source files
3934 in the build directory.
3935 (MOSTLYCLEAN): Do not delete source files created in build
3936 directory.
3937 * Makefile.in: Regenerate.
3938 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3939 into po/Makefile.
3940 * configure: Regenerate.
3941
3942 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3943 and BLD_POTFILES.
3944 Add .. to the search path when building bfd.pot.
3945 Delete POTFILES when performing distclean.
3946 Add comment describing why distclean is broken in maintainer mode.
3947 * po/POTFILES.in: Delete.
3948 * po/SRC-POTFILES.in: New file.
3949 * po/BLD-POTFILES.in: New file.
3950 * po/bfd.pot: Regenerate.
3951
39522001-03-22 Hans-Peter Nilsson <hp@axis.com>
3953
3954 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3955 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3956 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3957 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3958 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3959 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3960 functions.
3961 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3962 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3963 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3964 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3965 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3966 New HOWTO members for new relocs.
3967 (cris_reloc_map): Map new relocs.
3968 (ELF_DYNAMIC_INTERPRETER): Define.
3969 (PLT_ENTRY_SIZE): Define.
3970 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3971 elf_cris_pic_plt_entry): New, PLT templates.
3972 (struct elf_cris_pcrel_relocs_copied, struct
3973 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3974 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3975 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3976 positive values. Adjust PCREL relocs to be relative to location
3977 after relocation.
3978 (cris_elf_relocate_section): Handle relocations to dynamic
3979 objects. Handle new relocations. Call error handler when seeing
3980 non-PIC relocation for read-only sections while generating shared
3981 object.
3982 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3983 entries.
3984 (bfd_elf32_bfd_link_hash_table_create,
3985 elf_backend_adjust_dynamic_symbol,
3986 elf_backend_size_dynamic_sections,
3987 elf_backend_finish_dynamic_symbol,
3988 elf_backend_finish_dynamic_sections,
3989 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3990 elf_backend_hide_symbol, elf_backend_want_got_plt,
3991 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3992 elf_backend_got_header_size, elf_backend_plt_header_size):
3993 Define.
3994
3995 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3996 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3997 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3998 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3999 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4000 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4001 * bfd-in2.h, libbfd.h: Regenerate.
4002
40032001-03-21 Diego Novillo <dnovillo@redhat.com>
4004
4005 (_bfd_mips_elf_relocate_section): Give a better error message when
4006 a relocation is not recognized.
4007
40082001-03-21 Alan Modra <alan@linuxcare.com.au>
4009
4010 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4011 non-NULL before attempting to dereference.
4012
40132001-03-20 H.J. Lu <hjl@gnu.org>
4014
4015 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4016 * configure: Rebuild.
4017
40182001-03-20 Andreas Schwab <schwab@suse.de>
4019
4020 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4021 relocation value when resolving a reference from a debugging
4022 section.
4023
40242001-03-16 Scott Thomason <SThomaso@hii.com>
4025
4026 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4027 (xcoff64_swap_sym_out): Fix syntax errors.
4028
40292001-03-16 Richard Sandiford <rsandifo@redhat.com>
4030
4031 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4032
40332001-03-15 Alan Modra <alan@linuxcare.com.au>
4034
4035 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4036 (hppa_link_hash_newfunc): Init it.
4037 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4038 section appears to be non-PIC.
4039 (final_link_relocate): Likewise.
4040 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4041 possible candidate function, and set pic_call for those that will
4042 only have a .plt entry for the PIC call stub.
4043 (hppa_handle_PIC_calls): Set maybe_pic_call.
4044
40452001-03-12 DJ Delorie <dj@redhat.com>
4046
4047 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4048 R_SH_DIR8WP* relocs if they're against external symbols, else
4049 they're just for relaxing. Validate the reloc values.
4050
40512001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4052
4053 * binary.c (bfd_external_binary_architecture): Declare.
4054 (binary_object_p): If bfd_external_binary_architecture is defined,
4055 set the architecture to this string.
4056
40572001-03-11 Philip Blundell <philb@gnu.org>
4058
4059 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4060 entries that could serve as a definition for a weak symbol.
4061
40622001-03-08 Nick Clifton <nickc@redhat.com>
4063
4064 * Most files: Update copyright notices using Perl script created
4065 by Kevin Buettner <kevinb@redhat.com>.
4066
40672001-03-07 Nick Clifton <nickc@redhat.com>
4068
4069 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4070 prior patch on ! defined OLD_ARM_ABI.
4071
40722001-03-07 Andreas Jaeger <aj@suse.de>
4073
4074 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4075 some relocation values.
4076
40772001-03-06 Nick Clifton <nickc@redhat.com>
4078
4079 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4080 of offset in BLX(1) instruction.
4081 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4082 offset in BLX(1) instruction.
4083 Fix formatting.
4084
40852001-03-06 Nick Clifton <nickc@redhat.com>
4086
4087 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4088 BFD_RELOC_THUMB_PCREL_BLX.
4089
40902001-03-06 Igor Shevlyakov <igor@windriver.com>
4091
4092 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4093 * bfd-in2.h: Regenerate.
4094 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4095 * ieee.c (ieee_write_processor): Set proper id for
4096 Coldfire CPUs.
4097
40982001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4099
4100 * configure.in: Add s390 target.
4101 * configure: Regenerate.
4102
41032001-02-28 Andreas Jaeger <aj@suse.de>
4104
4105 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4106 to addend.
4107
41082001-02-28 Philip Blundell <pb@futuretv.com>
4109
4110 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4111 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4112
41132001-02-27 H.J. Lu <hjl@gnu.org>
4114
4115 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4116 abfd->tdata.aout_data == NULL.
4117
41182001-02-27 Alan Modra <alan@linuxcare.com.au>
4119
4120 * elf32-hppa.c: Correct field selector in stub comments.
4121 (clobber_millicode_symbols): Formatting fix.
4122
4123 * configure.in: Bump version to 2.11.90.
4124 * configure: Regenerate.
4125 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4126 (CFILES): $SOURCE_CFILES + generated C files.
4127 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4128 Run "make dep-am"
4129 * Makefile.in: Regenerate.
4130 * doc/Makefile.in: This too.
4131
41322001-02-26 Timothy Wall <twall@cygnus.com>
4133
4134 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4135 comments.
4136
41372001-02-26 Nick Clifton <nickc@redhat.com>
4138
4139 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4140 up, replacing multiple if statements with a switch.
4141 (handle_COMDAT): New function.
4142
41432001-02-26 H.J. Lu <hjl@gnu.org>
4144
4145 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4146 a warning for section flags we do not handle instead of
4147 aborting.
4148
41492001-02-26 Andreas Jaeger <aj@suse.de>
4150
4151 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4152
41532001-02-22 Timothy Wall <twall@cygnus.com>
4154
4155 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4156 * configure.in: Add objects for elf64_ia64_aix vectors.
4157 * configure: Regenerated.
4158 * configure.host: Recognize ia64-*-aix*.
4159 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4160 for AIX. AIX5 requires most relocations to be dynamic (*all*
4161 binaries are somewhat similar to shared libraries).
4162 * targets.c: Add elf64_ia64_aix vectors.
4163
41642001-02-21 David Mosberger <davidm@hpl.hp.com>
4165
4166 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4167 C8 said "1" instead of "8". Clarify error string for IMM22:
4168 "signed integer" instead of just "integer".
4169
41702001-02-20 Andreas Jaeger <aj@suse.de>
4171
4172 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4173 PLT entries that could serve as a definition for a weak symbol.
4174
41752001-02-19 Jakub Jelinek <jakub@redhat.com>
4176
4177 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4178 entries that could serve as a definition for a weak symbol.
4179 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4180
41812001-02-18 David O'Brien <obrien@FreeBSD>
4182
4183 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4184 FreeBSD/i386-CURRENT differently until I can figure out the needed
4185 corefile changes.
4186 * configure: Regenerate.
4187 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4188 FreeBSD/PowerPC, and FreeBSD/sparc64.
4189
41902001-02-18 lars brinkhoff <lars@nocrew.org>
4191
4192 * Makefile.am: Add PDP-11 a.out target.
4193 * config.bfd: Likewise.
4194 * configure.in: Likewise.
4195 * targets.c: Likewise.
4196 * archures.c: Likewise.
4197 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4198 * libbfd.h: Add PDP-11 relocations.
4199 * reloc.c: Likewise.
4200 * cpu-pdp11.c: New file.
4201 * pdp11.c: New file.
4202
4203 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4204 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4205 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4206 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4207 (GET_MAGIC): New macro.
4208 (PUT_MAGIC): Likewise.
4209 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4210
42112001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4212
4213 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4214 multiarch needs it).
4215
42162001-02-18 H.J. Lu <hjl@gnu.org>
4217
4218 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4219 index.
4220
42212001-02-18 Kazu Hirata <kazu@hxi.com>
4222
4223 * vms-misc.c: Fix formatting.
4224
42252001-02-16 Kazu Hirata <kazu@hxi.com>
4226
4227 * vms.c: Fix formatting.
4228
42292001-02-14 H.J. Lu <hjl@gnu.org>
4230
4231 * elf.c (elf_find_function): New function.
4232 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4233 the file name and function name.
4234
42352001-02-14 Nick Clifton <nickc@redhat.com>
4236
4237 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4238 asection structure.
4239
4240 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4241 (BFD64_BACKENDS): Add pepigen.c
4242 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4243
4244 * Makefile.in: Regenerate.
4245 * configure: Regenerate.
4246 * po/POTFILES.in: Regenerate.
4247 * po/bfd.pot: Regenerate.
4248
42492001-02-14 H.J. Lu <hjl@gnu.org>
4250
4251 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4252 force_minimum_alignment.
4253
42542001-02-14 Bo Thorsen <bo@suse.de>
4255
4256 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4257 (elf64_86_64_size_info): Struct added to fix a problem
4258 with the hashtable string entries.
4259 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4260 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4261 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4262 remove the FIXME for this.
4263 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4264 section. Also removed the FIXME for it.
4265 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4266 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4267 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4268
42692001-02-13 Richard Henderson <rth@redhat.com>
4270
4271 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4272 and not user provided.
4273
42742001-02-13 Kazu Hirata <kazu@hxi.com>
4275
4276 * vms.c (vms_print_symbol): Remove unreachable code.
4277
4278 * rs6000-core.c: Fix formatting.
4279
42802001-02-13 David Mosberger <davidm@hpl.hp.com>
4281
4282 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4283 as _bfd_XXi_only_swap_filehdr_out.
4284 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4285 pe->force_minimum_alignment to TRUE.
4286 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4287 PEI_TARGET_SUBSYSTEM.
4288 (pe_print_private_bfd_data): Call
4289 _bfd_XX_print_private_bfd_data_common() instead of
4290 _bfd_pe_print_private_bfd_data_common().
4291 (pe_bfd_copy_private_bfd_data): Call
4292 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4293 _bfd_pe_bfd_copy_private_bfd_data_common().
4294 (coff_bfd_copy_private_section_data): Define as
4295 _bfd_XX_bfd_copy_private_section_data instead of
4296 _bfd_pe_bfd_copy_private_section_data.
4297 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4298 of a _bfd_pe_get_symbol_info.
4299
4300 * peigen.c: Delete.
4301
4302 * peXXigen.c: Renamed from peigen.c.
4303 (COFF_WITH_XX): Define this macro (will get expanded into
4304 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4305 compiled as peigen.c or pepigen.c.
4306 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4307 define the canonical PEP structures and definitions.
4308 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4309 effect, enforce minimum file and section alignments. If
4310 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4311 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4312 so, by default, this is a no-op).
4313
4314 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4315 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4316 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4317 _bfd_pefoo if it's not defined. Use these macros to define
4318 coff swap macros.
4319
4320 * libcoff.h (pe_tdata): Add members target_subsystem and
4321 force_minimum_alignment.
4322
4323 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4324 COFF_WITH_pep.
4325 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4326
4327 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4328 peigen.lo.
4329
4330 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4331 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4332 PEPAOUTHDR.
4333
4334 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4335 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4336 (peigen.c): Add rule to generate from peXXigen.c.
4337 (pepigen.c): Ditto.
4338 (pepigen.lo): List dependencies for pepigen.lo.
4339
43402001-02-13 Alan Modra <alan@linuxcare.com.au>
4341
4342 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4343 $global$ referenced but not defined, set its value here.
4344
43452001-02-09 Bo Thorsen <bo@suse.de>
4346
4347 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4348 alignment to 3.
4349 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4350 and relocation.
4351 (elf64_x86_64_relocate_section): Fix formatting.
4352 (elf64_x86_64_relocate_section): Fix addend for relocation of
4353 R_X86_64_(8|16|32|PC8|PC16|PC32).
4354
43552001-02-12 Jan Hubicka <jh@suse.cz>
4356
4357 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4358
43592001-02-11 H.J. Lu <hjl@gnu.org>
4360
4361 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4362 alignment.
4363
43642001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4365
4366 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4367 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4368 relocations against dynsym symbols.
4369
4370 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4371 the R_MIPS_26 relocation.
4372 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4373 the R_MIPS_26 relocation.
4374 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4375 relocation.
4376 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4377 the R_MIPS_26 relocation.
4378 (mips_elf64_howto_table_rela): Likewise.
4379
4380 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4381 member to mark symbols that have non-CALL relocations against
4382 them.
4383 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4384 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4385 R_MIPS_GOT16.
4386 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4387 non-CALL relocation against it is encountered.
4388 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4389 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4390 no_fn_stub is not set.
4391
4392 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4393 information from the real symbol for indirect ones.
4394 Check no_fn_stub to find out if a symbol has a function stub
4395 indeed.
4396
43972001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4398
4399 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4400 * Makefile.in: Regenerate.
4401
44022001-02-09 David Mosberger <davidm@hpl.hp.com>
4403
4404 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4405 true if section name is an unwind table section name.
4406 (elfNN_ia64_additional_program_headers): Count each unwind section
4407 separately.
4408 (elfNN_ia64_modify_segment_map): Install one unwind program header
4409 for each unwind separate section. Note: normally the linker
4410 script merges the unwind sections that go into a single segment,
4411 so this still generates at most one unwind program header per
4412 segment.
4413
4414 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4415 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4416 (elfNN_ia64_fake_sections): Mark sections with names that start
4417 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4418 unwind section.
4419
4420 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4421 Use it to make sh_info in unwind section point to the text section
4422 it applies to.
4423
44242001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4425
4426 * Makefile.am: Add linux target for S/390.
4427 * archures.c: Likewise.
4428 * bfd-in2.h: Likewise.
4429 * config.bfd: Likewise.
4430 * configure.in: Likewise.
4431 * elf.c: Likewise.
4432 * libbfd.h: Likewise.
4433 * targets.c: Likewise.
4434 * cpu-s390.c: New file.
4435 * elf32-s390.c: New file.
4436 * elf64-s390.c: New file.
4437
44382001-02-09 Nick Clifton <nickc@redhat.com>
4439
4440 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4441 ImageBase. This has already been done by coff_swap_hdr_in.
4442
44432001-02-09 Jakub Jelinek <jakub@redhat.com>
4444
4445 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4446
44472001-02-09 Jakub Jelinek <jakub@redhat.com>
4448
4449 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4450 (sparc64_elf_relocate_section): Likewise.
4451
44522001-02-09 Mark Kettenis <kettenis@gnu.org>
4453
4454 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4455 similar to R_SPARC_32.
4456 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4457
44582001-02-08 H.J. Lu <hjl@gnu.org>
4459
4460 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4461 relocation entries for weak definitions when building DSO with
4462 -Bsymbolic.
4463
44642001-02-08 Richard Henderson <rth@redhat.com>
4465
4466 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4467 before visibility. Locally defined protected symbols are not
4468 dynamic.
4469
44702001-02-08 Geoffrey Keating <geoffk@redhat.com>
4471
4472 * config.bfd: Enable coff64 for rs6000-*. Patch from
4473 <hzoli@austin.ibm.com>.
4474
44752001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4476
4477 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4478 found, do not attempt to find dwarf2 info before returning.
4479
44802001-02-07 Jakub Jelinek <jakub@redhat.com>
4481
4482 * elflink.h (is_global_symbol_definition): Rename to
4483 is_global_data_symbol_definition and have it reject function
4484 symbols.
4485 (elf_link_is_defined_archive_symbol): Use renamed function.
4486
44872001-02-07 Todd Vierling <tv@wasabisystems.com>
4488
4489 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4490 * libbfd.h (bfd_target_vector): Likewise.
4491 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4492 make static; create pointer reference named bfd_target_vector.
4493 (_bfd_target_vector_entries): Calculate this based on the array
4494 typed _bfd_target_vector.
4495
44962001-02-06 H.J. Lu <hjl@gnu.org>
4497
4498 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4499 internal symbols are not dynamic.
4500 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4501
45022001-02-06 Nick Clifton <nickc@redhat.com>
4503
4504 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4505 that it will not be pulled into the list of files that make up
4506 po/POTFILES.in.
4507 * Makefile.in: Regenerate.
4508 * po/bfd.pot: Regenerate.
4509
45102001-02-06 H.J. Lu <hjl@gnu.org>
4511
4512 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4513 checking.
4514 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4515 external_PEI_IMAGE_hdr.
4516
45172001-02-06 Kazu Hirata <kazu@hxi.com>
4518
4519 * elf-m10200.c: Fix formatting.
4520
45212001-02-04 Nick Clifton <nickc@redhat.com>
4522
4523 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4524 rel, it will be handled later on.
4525
45262001-02-02 Fred Fish <fnf@ninemoons.com>
4527
4528 * Makefile.in: Fix typo.
4529
45302001-02-01 Kazu Hirata <kazu@hxi.com>
4531
4532 * elf-m10300.c: Fix formatting.
4533
45342001-01-30 Alan Modra <alan@linuxcare.com.au>
4535
4536 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4537 (elf_backend_get_symbol_type): Define.
4538 (elf64_hppa_object_p): Set architecture and machine from elf
4539 header flags.
4540
45412001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4542
4543 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4544 before mdebug.
4545
45462001-01-26 Richard Henderson <rth@redhat.com>
4547
4548 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4549 for non-default visibility.
4550 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4551 delete ugly macro and replace with pretty function.
4552
45532001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4554
4555 * coff-go32.c: Update copyright.
4556 * coff-stgo32.c: Likewise.
4557 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4558 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4559 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4560 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4561
45622001-01-25 Kazu Hirata <kazu@hxi.com>
4563
4564 * bfd-in2.h: Rebuild.
4565 * libbfd.h: Likewise.
4566
45672001-01-23 H.J. Lu <hjl@gnu.org>
4568
4569 * bfd-in2.h: Rebuild.
4570
45712001-01-23 H.J. Lu <hjl@gnu.org>
4572
4573 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4574 is NULL or PRIV(vms_rec) is outside of the buffer.
4575
45762001-01-23 Kazu Hirata <kazu@hxi.com>
4577
4578 * coff64-rs6000.c: Fix formatting.
4579 * coff-arm.c: Likewise.
4580 * coffgen.c: Likewise.
4581 * cofflink.c: Likewise.
4582 * coff-mcore.c: Likewise.
4583 * coff-mips.c: Likewise.
4584 * coff-pmac.c: Likewise.
4585 * coff-ppc.c: Likewise.
4586 * coff-rs6000.c: Likewise.
4587 * elf32.c: Likewise.
4588 * elf32-fr30.c: Likewise.
4589 * elf32-i370.c: Likewise.
4590 * elf32-i860.c: Likewise.
4591 * elf32-m32r.c: Likewise.
4592 * elf32-m68k.c: Likewise.
4593 * elf32-mcore.c: Likewise.
4594 * elf32-ppc.c: Likewise.
4595 * elf32-sh.c: Likewise.
4596 * elf32-v850.c: Likewise.
4597 * elf64-alpha.c: Likewise.
4598 * elf64-sparc.c: Likewise.
4599 * elflink.c: Likewise.
4600 * elflink.h: Likewise.
4601 * elf-m10200.c: Likewise.
4602 * elf-m10300.c: Likewise.
4603 * elfxx-ia64.c: Likewise.
4604
4605 * aoutx.h: Fix formatting.
4606 * bfd.c: Likewise.
4607 * bfd-in2.h: Likewise.
4608 * bfd-in.h: Likewise.
4609 * cpu-i386.c: Likewise.
4610 * cpu-m68hc11.c: Likewise.
4611 * dwarf2.c: Likewise.
4612 * elf64-x86-64.c: Likewise.
4613 * format.c: Likewise.
4614 * freebsd.h: Likewise.
4615 * hash.c: Likewise.
4616 * hp300hpux.c: Likewise.
4617 * hppabsd-core.c: Likewise.
4618 * hpux-core.c: Likewise.
4619
46202001-01-22 Bo Thorsen <bo@suse.de>
4621
4622 * elf64-x86-64.c: Added PIC support for X86-64.
4623 (elf64_x86_64_link_hash_newfunc): Function added.
4624 (elf64_x86_64_link_hash_table_create): Likewise.
4625 (elf64_x86_64_check_relocs): Likewise.
4626 (elf64_x86_64_gc_mark_hook): Likewise.
4627 (elf64_x86_64_gc_sweep_hook): Likewise.
4628 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4629 (elf64_x86_64_size_dynamic_sections): Likewise.
4630 (elf64_x86_64_discard_copies): Likewise.
4631 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4632 (elf64_x86_64_finish_dynamic_sections): Likewise.
4633 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4634
46352001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4636
4637 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4638 * Makefile.in: Regenerate.
4639
46402001-01-21 Kazu Hirata <kazu@hxi.com>
4641
4642 * coff-a29k.c: Fix formatting.
4643
46442001-01-19 H.J. Lu <hjl@gnu.org>
4645
4646 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4647 relocation section names.
4648 (elf_i386_relocate_section): Report files with bad relocation
4649 section names and return false.
4650
46512001-01-17 Bo Thorsen <bo@suse.de>
4652
4653 * targets.c: Alphabetize list of xvecs.
4654
46552001-01-14 Alan Modra <alan@linuxcare.com.au>
4656
4657 * config.bfd: Add linux target variant for elfxx-hppa.
4658 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4659 bfd_elf64_hppa_linux_vec.
4660 * configure: Regenerate.
4661 * elf64-hppa.c: Include elf64-target.h again to support linux
4662 target variant.
4663 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4664 * elf32-hppa.c: Include elf32-target.h again to support linux
4665 target variant.
4666 (elf32_hppa_post_process_headers): New function.
4667 (elf_backend_post_process_headers): Define.
4668 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4669 bfd_elf32_hppa_linux_vec.
4670
4671 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4672 and data_segment_base fields.
4673 (elf32_hppa_link_hash_table_create ): Init them.
4674 (elf32_hppa_check_relocs): Update comments.
4675 (hppa_record_segment_addr): New function.
4676 (elf32_hppa_relocate_section): Call it.
4677 (final_link_relocate): Handle R_PARISC_SEGREL32.
4678 (elf32_hppa_final_link): New function.
4679 (bfd_elf32_bfd_final_link): Define to call it.
4680 (hppa_unwind_entry_compare): New function.
4681 * cache.c (bfd_open_file): Create files in write+read mode.
4682
4683 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4684 SEGREL32 and numerous other relocs. Change duplicate
4685 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4686
4687 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4688 O_ACCMODE.
4689
4690 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4691 .plt entries for DT_INIT and DT_FINI.
4692 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4693 DT_INIT and DT_FINI.
4694
4695 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4696 offsets for stub .plt access if wide mode. Check offset in range.
4697
46982001-01-13 Nick Clifton <nickc@redhat.com>
4699
4700 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4701 line.
4702
4703 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4704 line.
4705
47062001-01-12 Alan Modra <alan@linuxcare.com.au>
4707
4708 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4709 * configure: Regenerate.
4710
47112001-01-11 Peter Targett <peter.targett@arccores.com>
4712
4713 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4714 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4715 * cpu-arc.c (arch_info_struct): Add entries for variants.
4716 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4717 (arc_get_mach) Don't assume machine names prefixed arc- before
4718 testing.
4719 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4720 selections.
4721 (arc_elf_final_write_processing) Likewise.
4722 (ELF_MACHINE_CODE) Use EM_ARC.
4723
47242001-01-10 Nick Clifton <nickc@redhat.com>
4725
4726 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4727
47282001-01-07 Philip Blundell <philb@gnu.org>
4729
4730 * README: Replace `bug-gnu-utils@gnu.org' with
4731 `bug-binutils@gnu.org'.
4732
47332001-01-04 Kazu Hirata <kazu@hxi.com>
4734
4735 * som.c: Fix formatting.
4736
47372001-01-03 Kazu Hirata <kazu@hxi.com>
4738
4739 * ecoffswap.h: Fix formatting.
4740 * elf-bfd.h: Likewise.
4741 * elfarm-nabi.c: Likewise.
4742 * elfarm-oabi.c: Likewise.
4743 * elfcode.h: Likewise.
4744 * elfcore.h: Likewise.
4745 * elflink.c: Likewise.
4746 * elflink.h: Likewise.
4747 * elfxx-ia64.c: Likewise.
4748 * elfxx-target.h: Likewise.
4749 * libbfd.c: Likewise
4750 * linker.c: Likewise.
4751 * lynx-core.c: Likewise.
4752
47532001-01-02 Kazu Hirata <kazu@hxi.com>
4754
4755 * pc532-mach.c: Fix formatting.
4756 * pe-arm.c: Likewise.
4757 * pe-i386.c: Likewise.
4758 * pe-mips.c: Likewise.
4759 * pe-ppc.c: Likewise.
4760 * pe-sh.c: Likewise.
4761 * pei-mips.c: Likewise.
4762 * pei-sh.c: Likewise.
4763 * peicode.h: Likewise.
4764 * ppcboot.c: Likewise.
4765 * ptrace-core.c: Likewise.
4766
47672001-01-01 Kazu Hirata <kazu@hxi.com>
4768
4769 * reloc.c: Fix formatting.
4770 * riscix.c: Likewise.
4771 * rs6000-core.c: Likewise.
4772 * xcoff-target.h: Likewise.
4773
47742000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4775
4776 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4777 error, by calling bfd_default_set_arch_mach with incoming
4778 values.
4779
47802000-12-26 Kazu Hirata <kazu@hxi.com>
4781
4782 * vaxnetbsd.c: Fix formatting.
4783 * versados.c: Likewise.
4784 * vms-gsd.c: Likewise.
4785 * vms-hdr.c: Likewise.
4786 * vms-misc.c: Likewise.
4787
47882000-12-25 Alexandre Oliva <aoliva@redhat.com>
4789
4790 * archive.c (coff_write_armap): Don't write more than symbol_count
4791 `archive_member_file_ptr's.
4792
47932000-12-25 Kazu Hirata <kazu@hxi.com>
4794
4795 * vms-tir.c: Fix formatting.
4796
47972000-12-23 Kazu Hirata <kazu@hxi.com>
4798
4799 * vms.c: Fix formatting.
4800 * vms.h: Likewise.
4801
48022000-12-21 Santeri Paavolainen <santtu@ssh.com>
4803
4804 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4805
4806 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4807
4808 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4809 arithmetic.
4810
4811 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4812
4813 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4814
48152000-12-21 Richard Sandiford <rsandifo@redhat.com>
4816
4817 * libbfd.c (bfd_get_bits): Added
4818 (bfd_put_bits): Likewise
4819 * bfd-in.h: Declared the above.
4820 * bfd-in2.h: Regenerated.
4821
48222000-12-20 Kazu Hirata <kazu@hxi.com>
4823
4824 * targets.c: Fix formatting.
4825 * tekhex.c: Likewise.
4826 * trad-core.c: Likewise.
4827
48282000-12-19 Kazu Hirata <kazu@hxi.com>
4829
4830 * sco5-core.c: Fix formatting.
4831 * section.c: Likewise.
4832 * sparclinux.c: Likewise.
4833 * sparclynx.c: Likewise.
4834 * sparcnetbsd.c: Likewise.
4835 * srec.c: Likewise.
4836 * stabs.c: Likewise.
4837 * stab-syms.c: Likewise.
4838 * sunos.c: Likewise.
4839 * syms.c: Likewise.
4840 * sysdep.h: Likewise.
4841
48422000-12-18 Nick Clifton <nickc@redhat.com>
4843
4844 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4845 defined.
4846 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4847 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4848
48492000-12-18 Nick Clifton <nickc@redhat.com>
4850
4851 * vms-misc.c (_bfd_vms_get_record): Add default case to
4852 file_format switch.
4853
48542000-12-15 Miloslav Trmac <mitr@volny.cz>
4855
4856 * elfcore.h (elf_core_file_p): Move to the start of the program
4857 headers before attempting to read them.
4858
48592000-12-14 Kazu Hirata <kazu@hxi.com>
4860
4861 * peigen.c: Fix formatting.
4862 * som.c: Likewise.
4863 * som.h: Likewise.
4864
48652000-12-13 Kazu Hirata <kazu@hxi.com>
4866
4867 * peigen.c: Fix formatting.
4868
48692000-12-12 Jim Wilson <wilson@redhat.com>
4870
4871 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4872
48732000-12-08 Mark Salter <msalter@redhat.com>
4874
4875 * binary.c (binary_set_section_contents): Ignore sections
4876 with zero size.
4877
48782000-12-12 Kazu Hirata <kazu@hxi.com>
4879
4880 * m68klinux.c: Fix formatting.
4881 * m68knetbsd.c: Likewise.
4882 * mipsbsd.c: Likewise.
4883 * netbsd-core.c: Likewise.
4884 * netbsd.h: Likewise.
4885 * newsos3.c: Likewise.
4886 * nlm32-alpha.c: Likewise.
4887 * nlm32-i386.c: Likewise.
4888 * nlm32-ppc.c: Likewise.
4889 * nlm32-sparc.c: Likewise.
4890 * nlmcode.h: Likewise.
4891 * nlmswap.h: Likewise.
4892 * nlm-target.h: Likewise.
4893 * ns32knetbsd.c: Likewise.
4894
48952000-12-10 Fred Fish <fnf@be.com>
4896
4897 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4898 symbols in shared objects if allow_shlib_undefined is true.
4899
49002000-12-12 Nick Clifton <nickc@redhat.com>
4901
4902 * cpu-sh.c: Fix formattng.
4903 * elf.c: Fix formattng.
4904 * elf32-mips.c: Fix formattng.
4905 * elf32-sh.c: Fix formattng.
4906 * elf64-alpha.c: Fix formattng.
4907
49082000-12-09 Nick Clifton <nickc@redhat.com>
4909
4910 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4911 dwarf2_find_line_info as last parameter to invocation of
4912 _bfd_dwarf2_find_nearest_line.
4913 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4914 dwarf2_find_line_info as last parameter to invocation of
4915 _bfd_dwarf2_find_nearest_line.
4916
49172000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4918
4919 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4920 (BFD_LIBS): ...to here.
4921 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4922 (BFD_LIBS_CFILES): ...to here.
4923 * Makefile.in: Regenerate.
4924 * configure.in: Remove dwarf.lo from the elf shell variable.
4925 * configure: Regenerate.
4926 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4927 * libcoff.h: Regenerate.
4928 * coffgen.c (coff_find_nearest_line): Call
4929 _bfd_dwarf2_find_nearest_line.
4930 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4931 accordingly.
4932 (read_abbrevs): Likewise
4933 (decode_line_info): Likewise.
4934 (parse_comp_unit): Likewise.
4935 (comp_unit_find_nearest_line): Likewise.
4936 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4937 * libbfd.h: Regenerate.
4938 * elf.c (_bfd_elf_find_nearest_line): Update call.
4939 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4940 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4941 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4942 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4943 (styp_to_sec_flags): Handle DWARF2 sections.
4944 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4945 to _bfd_find_nearest_line.
4946 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4947 call to _bfd_find_nearest_line.
4948
49492000-12-08 Kazu Hirata <kazu@hxi.com>
4950
4951 * coffgen.c: Fix formatting.
4952 * elf-m10300.c: Likewise.
4953 * elf32-i386.c: Likewise.
4954 * elf32-i960.c: Likewise.
4955 * elf32-m68k.c: Likewise.
4956 * elf32-mcore.c: Likewise.
4957 * elf32-ppc.c: Likewise.
4958 * elf32-sh.c: Likewise.
4959 * elf32-sparc.c: Likewise.
4960 * elf32-v850.c: Likewise.
4961 * elf64-alpha.c: Likewise.
4962 * elf64-hppa.c: Likewise.
4963 * elf64-mips.c: Likewise.
4964 * elf64-sparc.c: Likewise.
4965
49662000-12-07 Kazu Hirata <kazu@hxi.com>
4967
4968 * elf32-ppc.c: Fix formatting.
4969 * elf64-x86-64.c: Likewise.
4970
49712000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4972
4973 From Ralf Baechle <ralf@gnu.org>
4974
4975 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4976 BFDs containing no sections or empty .text, .data or .bss sections
4977 to be merged, regardless of their flags.
4978
49792000-12-06 Kazu Hirata <kazu@hxi.com>
4980
4981 * elf32-m32r.c: Fix formatting.
4982 * elf32-m68hc11.c: Likewise.
4983 * elf32-m68hc12.c: Likewise.
4984 * elf32-m68k.c: Likewise.
4985 * elf32-mcore.c: Likewise.
4986 * elf32-pj.c: Likewise.
4987 * elf32-ppc.c: Likewise.
4988
49892000-12-05 Kazu Hirata <kazu@hxi.com>
4990
4991 * elf32-fr30.c: Fix formatting.
4992 * elf32-hppa.c: Likewise.
4993 * elf32-i370.c: Likewise.
4994 * elf32-i386.c: Likewise.
4995 * elf32-i860.c: Likewise.
4996 * elf32-i960.c: Likewise.
4997
49982000-12-03 Kazu Hirata <kazu@hxi.com>
4999
5000 * elf32-arm.h: Fix formatting.
5001 * elf32-avr.c: Likewise.
5002 * elf32-cris.c: Likewise.
5003 * elf32-d10v.c: Likewise.
5004 * elf32-d30v.c: Likewise.
5005 * elf-hppa.h: Likewise.
5006 * elf-m10200.c: Likewise.
5007 * elf-m10300.c: Likewise.
5008
50092000-12-01 Chris Demetriou <cgd@sibyte.com>
5010
5011 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5012 bfd_mach_mips32_4k. Update FIXME comment.
5013 * archures.c (bfd_mach_mips32): New constant.
5014 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5015 the latter, renumber it.
5016 * bfd-in2.h (bfd_mach_mips32): New constant.
5017 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5018 the latter, renumber it.
5019 * cpu-mips.c (I_mips32): New constant.
5020 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5021 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5022 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5023 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5024 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5025 with E_MIPS_MACH_MIPS32_4K.
5026 (_bfd_mips_elf_final_write_processing): Replace
5027 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5028 bfd_mach_mips32 case.
5029 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5030 comparison with support for MIPS32.
5031 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5032 MIPS32.
5033
5034 * aoutx.h (NAME(aout,machine_type)): Add cases for
5035 bfd_mach_mips5 and bfd_mach_mips64.
5036 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5037 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5038 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5039 (arch_info_struct): Add entries for bfd_mach_mips5 and
5040 bfd_mach_mips64.
5041 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5042 _bfd_mips_elf_print_private_bfd_data): Add cases for
5043 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5044 (_bfd_mips_elf_final_write_processing): Add cases for
5045 bfd_mach_mips5 and bfd_mach_mips64.
5046
5047 * aoutx.h (NAME(aout,machine_type)): Add a
5048 bfd_mach_mips_sb1 case.
5049 * archures.c (bfd_mach_mips_sb1): New constant.
5050 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5051 * cpu-mips.c (I_sb1): New constant.
5052 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5053 * elf32-mips.c (elf_mips_mach): Add case for
5054 E_MIPS_MACH_SB1.
5055 (_bfd_mips_elf_final_write_processing): Add case for
5056 bfd_mach_mips_sb1.
5057
50582000-12-01 Joel Sherrill <joel@OARcorp.com>
5059
5060 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5061 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5062 (sparc*-*-rtems*): Switched from a.out to ELF.
5063
50642000-11-30 Jan Hubicka <jh@suse.cz>
5065
5066 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5067 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5068 (elf64-x86-64.lo): Add dependencies.
5069 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5070 bfd_mach_x86_64_intel_syntax.
5071 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5072 * config.bfd (x86_64): Add.
5073 * configure.in: Add support for bfd_elf64_x86_64_vec.
5074 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5075 (bfd_i386_arch, i8086_ar): Link in.
5076 * elf64-x86-64.c: New file.
5077 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5078 * targets.c (bfd_elf64_x86_64_vec): Add.
5079 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5080
50812000-11-30 Kazu Hirata <kazu@hxi.com>
5082
5083 * xcofflink.c: Fix formatting.
5084
50852000-11-28 Kazu Hirata <kazu@hxi.com>
5086
5087 * aoutx.h: Fix formatting.
5088 * bfd-in.h: Likewise.
5089 * bfd-in2.h: Likewise.
5090 * cache.c: Likewise.
5091 * cisco-core.c: Likewise.
5092 * coff64-rs6000.c: Likewise.
5093 * coffcode.h: Likewise.
5094 * coffswap.h: Likewise.
5095 * corefile.c: Likewise.
5096 * elf32-mips.c: Likewise.
5097
50982000-11-27 Kazu Hirata <kazu@hxi.com>
5099
5100 * aout-adobe.c: Fix formatting.
5101 * coff64-rs6000.c: Likewise.
5102 * coffgen.c: Likewise.
5103 * cofflink.c: Likewise.
5104
51052000-11-27 Philip Blundell <pb@futuretv.com>
5106
5107 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5108 (obj_coff_strings_written): New accessor macro for above.
5109 * libcoff.h: Regenerate.
5110 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5111 strings.
5112 * coffcode.h (coff_write_object_contents): No need to write out
5113 the string table if it's already been done.
5114
51152000-11-22 Philip Blundell <pb@futuretv.com>
5116
5117 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5118 weak undefined symbols.
5119
51202000-11-24 Nick Clifton <nickc@redhat.com>
5121
5122 * archures.c (bfd_mach_arm_5TE): Define.
5123 (bfd_mach_arm+XScale): Define.
5124 * bfd-in2.h: Regenerate.
5125
5126 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5127 BFD_RELOC_ARM_PCREL_BLX.
5128
5129 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5130 XScale machine numbers.
5131
5132 * config.bfd (xscale-elf): Add target.
5133 (xscale-coff): Add target.
5134
5135 * cpu-arm.c: Add xscale machine name.
5136 Add v5t, v5te and XScale machine numbers.
5137
51382000-11-23 Kazu Hirata <kazu@hxi.com>
5139
5140 * aix386-core.c: Fix formatting.
5141
51422000-11-22 Jim Wilson <wilson@redhat.com>
5143
5144 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5145 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5146 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5147 (ins_imms_scaled): Initialize sign_bit at function entry.
5148 (elf64_ia64_operands): Add missing initializers.
5149 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5150 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5151 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5152 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5153 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5154 parameters.
5155 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5156 and free_extsyms at function entry.
5157 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5158 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5159 (get_got): Delete unused local srel.
5160 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5161 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5162
51632000-11-21 Kazu Hirata <kazu@hxi.com>
5164
5165 * coff-a29k.c: Fix formatting.
5166 * coff-h8500.c: Likewise.
5167 * coff-i960.c: Likewise.
5168 * coff-ppc.c: Likewise.
5169 * coff-rs6000.c: Likewise.
5170 * coff-stgo32.c: Likewise.
5171 * coff-tic54x.c: Likewise.
5172 * coff-w65.c: Likewise.
5173 * cpu-h8500.c: Likewise.
5174 * cpu-hppa.c: Likewise.
5175 * cpu-ns32k.c: Likewise.
5176 * ecoff.c: Likewise.
5177 * ecofflink.c: Likewise.
5178
51792000-11-21 Nick Clifton <nickc@redhat.com>
5180
5181 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5182 remove possibility of infinite loop.
5183
51842000-11-20 Kazu Hirata <kazu@hxi.com>
5185
5186 * aix386-core.c: Fix formatting.
5187 * aout-adobe.c: Likewise.
5188 * aout-arm.c: Likewise.
5189 * aout-encap.c: Likewise.
5190 * aout-ns32k.c: Likewise.
5191 * aout-target.h: Likewise.
5192 * aout-tic30.c: Likewise.
5193 * aoutf1.h: Likewise.
5194 * aoutx.h: Likewise.
5195 * archive.c: Likewise.
5196 * bfd-in.h: Likewise.
5197 * bfd-in2.h: Likewise.
5198 * bfd.c: Likewise.
5199 * bout.c: Likewise.
5200
52012000-11-17 H.J. Lu <hjl@gnu.org>
5202
5203 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5204 pltoff entries for DT_INIT and DT_FINI.
5205 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5206 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5207 entries.
5208
52092000-11-16 Richard Henderson <rth@redhat.com>
5210
5211 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5212 (allocate_dynrel_entries): Likewise.
5213 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5214 (set_pltoff_entry): Likewise.
5215 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5216 (elfNN_ia64_reloc_type_lookup): Likewise.
5217 (elfNN_ia64_install_value): Likewise.
5218 (elfNN_ia64_relocate_section): Likewise.
5219 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5220 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5221
52222000-11-16 Kazu Hirata <kazu@hxi.com>
5223
5224 * cpu-a29k.c: Fix formatting.
5225 * cpu-alpha.c: Likewise.
5226 * cpu-arm.c: Likewise.
5227 * cpu-avr.c: Likewise.
5228 * cpu-d10v.c: Likewise.
5229 * cpu-h8500.c: Likewise.
5230 * cpu-hppa.c: Likewise.
5231 * cpu-i370.c: Likewise.
5232 * cpu-i386.c: Likewise.
5233 * cpu-i960.c: Likewise.
5234 * cpu-ia64-opc.c: Likewise.
5235 * cpu-ia64.c: Likewise.
5236 * cpu-m32r.c: Likewise.
5237 * cpu-m68hc11.c: Likewise.
5238 * cpu-m68hc12.c: Likewise.
5239 * cpu-m68k.c: Likewise.
5240 * cpu-m88k.c: Likewise.
5241 * cpu-mips.c: Likewise.
5242 * cpu-ns32k.c: Likewise.
5243 * cpu-pj.c: Likewise.
5244 * cpu-powerpc.c: Likewise.
5245 * cpu-sh.c: Likewise.
5246 * cpu-sparc.c: Likewise.
5247 * cpu-tic54x.c: Likewise.
5248 * cpu-v850.c: Likewise.
5249 * cpu-vax.c: Likewise.
5250 * cpu-w65.c: Likewise.
5251 * cpu-we32k.c: Likewise.
5252 * cpu-z8k.c: Likewise.
5253 * dwarf1.c: Likewise.
5254 * dwarf2.c: Likewise.
5255
52562000-11-15 Kazu Hirata <kazu@hxi.com>
5257
5258 * coff-arm.c: Fix formatting.
5259 * coff-ppc.c: Likewise.
5260 * coff-rs6000.c: Likewise.
5261 * coff-sh.c: Likewise.
5262 * coff-sparc.c: Likewise.
5263 * coff-tic30.c: Likewise.
5264 * coff-tic54x.c: Likewise.
5265 * coff-tic80.c: Likewise.
5266 * coff-w65.c: Likewise.
5267 * coff-we32k.c: Likewise.
5268 * coff-z8k.c: Likewise.
5269
52702000-11-15 Richard Henderson <rth@redhat.com>
5271
5272 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5273 section with the same ALLOC|LOAD flags as the source section.
5274
52752000-11-14 Jakub Jelinek <jakub@redhat.com>
5276
5277 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5278 by STO_ALPHA constants.
5279
52802000-11-14 Kazu Hirata <kazu@hxi.com>
5281
5282 * coff-pmac.c: Fix formatting.
5283 * coff-ppc.c: Likewise.
5284
52852000-11-13 H.J. Lu <hjl@gnu.org>
5286
5287 * elflink.h (elf_link_add_object_symbols): Also add indirect
5288 symbols for common symbols with the default version.
5289
52902000-11-09 Philip Blundell <pb@futuretv.com>
5291
5292 * section.c (STD_SECTION): Set gc_mark flag.
5293
52942000-11-11 Kazu Hirata <kazu@hxi.com>
5295
5296 * coff-i960.c: Likewise.
5297 * coff-m68k.c: Likewise.
5298 * coff-m88k.c: Likewise.
5299 * coff-mcore.c: Likewise.
5300 * coff-mips.c: Likewise.
5301
53022000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5303
5304 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5305
53062000-11-10 Kazu Hirata <kazu@hxi.com>
5307
5308 * coff-h8300.c: Fix formatting.
5309 * coff-h8500.c: Likewise.
5310 * coff-i386.c: Likewise.
5311 * coff-i860.c: Likewise.
5312 * coff-i960.c: Likewise.
5313 * coff-ia64.c: Likewise.
5314
53152000-11-09 Kazu Hirata <kazu@hxi.com>
5316
5317 * archive.c: Fix formatting.
5318 * archures.c: Likewise.
5319
53202000-11-07 Richard Henderson <rth@redhat.com>
5321
5322 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5323 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5324 * section.c (bfd_set_section_contents): Call memcpy if
5325 section->contents set and location not equal to contents plus offset.
5326
53272000-11-08 Kazu Hirata <kazu@hxi.com>
5328
5329 * bfd-in.h: Fix formatting.
5330 * bfd-in2.h: Likewise.
5331 * bfd.c: Likewise.
5332 * binary.c: Likewise.
5333 * bout.c: Likewise.
5334 * coff-a29k.c: Likewise.
5335 * coff-alpha.c: Likewise.
5336 * coff-apollo.c: Likewise.
5337 * coff-aux.c: Likewise.
5338
53392000-11-07 Kazu Hirata <kazu@hxi.com>
5340
5341 * aix386-core.c: Fix formatting.
5342 * aoutf1.h: Likewise.
5343 * aoutx.h: Likewise.
5344 * archures.c: Likewise.
5345 * armnetbsd.c: Likewise.
5346
53472000-11-07 Alan Modra <alan@linuxcare.com.au>
5348
5349 * coff-h8300.c (special): Adjust reloc address.
5350
53512000-11-06 Steve Ellcey <sje@cup.hp.com>
5352
5353 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5354 to differentiate elf32 and elf64 on ia64.
5355 * bfd-in2.h: Regenerate.
5356 * config.bfd: Add target for "ia64*-*-hpux*".
5357 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5358 * configure: Regenerate.
5359 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5360 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5361
5362 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5363 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5364 * Makefile.in: Regnerate.
5365 * elf64-ia64.c: Deleted.
5366 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5367
53682000-11-06 Kazu Hirata <kazu@hxi.com>
5369
5370 * aout-adobe.c: Fix formatting.
5371 * aout-arm.c: Likewise.
5372 * aout-cris.c: Likewise.
5373 * aout-encap.c: Likewise.
5374 * aout-ns32k.c: Likewise.
5375 * aout-target.h: Likewise.
5376 * aout-tic30.c: Likewise.
5377
53782000-11-05 Philip Blundell <philb@gnu.org>
5379
5380 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5381 BFDs containing no sections to be merged, regardless of their flags.
5382
53832000-11-04 Philip Blundell <philb@gnu.org>
5384
5385 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5386 if a relocation for an undefined symbol also results in an
5387 overflow.
5388
53892000-11-06 Christopher Faylor <cgf@cygnus.com>
5390
5391 * config.bfd: Add support for Sun Chorus.
5392
53932000-11-05 David O'Brien <obrien@FreeBSD.org>
5394
5395 * configure.in: Recognize alpha-*-freebsd*.
5396 * configure: Regenerate.
5397
53982000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5399
5400 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5401 (Chunk): New global variable set by a parameter in objcopy.c.
5402 (S3Forced): New global variable set by a parameter in
5403 objcopy.c.
5404 (srec_set_section_contents): If S3Forced is true, always generate
5405 S3 records.
5406 (srec_write_section): Use 'Chunk' to limit maximum length of S
5407 records.
5408
54092000-11-02 Per Lundberg <plundis@chaosdev.org>
5410
5411 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5412 * Makefile.in: Regenerate.
5413 * bfd-in2.h: Regenerate.
5414 * po/bfd.pot: Regenerate.
5415
54162000-10-31 Philip Blundell <philb@gnu.org>
5417
5418 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5419 EF_SOFT_FLOAT if it is defined.
5420
54212000-10-27 Philip Blundell <philb@gnu.org>
5422
5423 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5424 attempts to mix PIC code with non-PIC, just mark the output as
5425 being position dependent.
5426 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5427 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5428 all mismatches, not just the first one.
5429
54302000-10-25 Chris Demetriou <cgd@sibyte.com>
5431
5432 * ieee.c (ieee_archive_p): Plug one of many possible
5433 memory leaks in error handling.
5434
54352000-10-20 Jakub Jelinek <jakub@redhat.com>
5436
5437 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5438 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5439 Support v8plusb.
5440 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5441 sparc64_elf_object_p): Support v9b.
5442 * archures.c: Declare v8plusb and v9b machines.
5443 * bfd-in2.h: Ditto.
5444 * cpu-sparc.c: Ditto.
5445
54462000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5447
5448 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5449 of a GOT reloc.
5450
5451 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5452 (SYMBOL_CALLS_LOCAL): New macro.
5453 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5454 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5455 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5456 (ppc_elf_relocate_section): Use flag variable to determine
5457 whether the relocation refers to a local symbol.
5458 Test whether a PLTREL24 reloc will produce a reloc by looking
5459 to see whether a PLT entry was made.
5460
54612000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5462
5463 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5464 entries that could serve as a definition for a weak symbol.
5465
54662000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5467
5468 From Ralf Baechle <ralf@gnu.org>
5469
5470 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5471 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5472 against local symbols.
5473 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5474
54752000-10-12 Alan Modra <alan@linuxcare.com.au>
5476
5477 * section.c (struct sec): Add kept_section.
5478 (struct bfd_comdat_info): Remove sec, we can use above.
5479 (STD_SECTION): Add initializer.
5480 (bfd_make_section_anyway): Init here too.
5481
5482 * bfd-in2.h: Regenerate.
5483
5484 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5485 zeroing of `flags'.
5486 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5487 fudge values for discarded link-once section symbols.
5488
5489 * elf64-hppa.c: Include alloca-conf.h
5490
54912000-10-11 Alan Modra <alan@linuxcare.com.au>
5492
5493 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5494
5495 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5496
54972000-10-10 Alan Modra <alan@linuxcare.com.au>
5498
5499 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5500
55012000-10-10 Tom Rix <trix@redhat.com>
5502
5503 * section.c (bfd_make_section_anyway): Release newsect ptr when
5504 newsect->symbol fails to alloc. Use bfd_release instead of free.
5505
55062000-10-09 Richard Henderson <rth@cygnus.com
5507
5508 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5509 (elf64_ia64_unwind_entry_compare): New.
5510 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5511
55122000-10-07 Alan Modra <alan@linuxcare.com.au>
5513
5514 * elflink.h (size_dynamic_sections): Don't create various tags if
5515 .dynstr is excluded from the link. Don't set first dynsym entry
5516 if dynsymcount is zero.
5517 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5518 .dynsym excluded from the link. Don't try to write any dynamic
5519 sections excluded from the link.
5520
5521 * elf.c (swap_out_syms): Handle global section symbols.
5522
55232000-10-05 DJ Delorie <dj@redhat.com>
5524
5525 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5526 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5527 (coff_write_relocs): write extended reloc count
5528 (coff_write_object_contents): account for extended relocs
5529
55302000-10-05 Jim Wilson <wilson@cygnus.com>
5531
5532 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5533 field.
5534 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5535 elf_backend_section_flags function.
5536 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5537 code.
5538 (elf64_ia64_section_flags): New function containing flag conversion
5539 code.
5540 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5541 * elfxx-target.h (elf_backend_section_flags): Define.
5542 (elfNN_bed): Initialize elf_backend_section_flags field.
5543
55442000-10-02 Alan Modra <alan@linuxcare.com.au>
5545
5546 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5547 _bfd_elf32_gc_record_vtable. Correct a comment.
5548
55492000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5550
5551 From Ralf Baechle <ralf@gnu.org>
5552
5553 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5554 produces binaries with got[1] = 0x80000001 to differenciate them
5555 for the dynamic linker from the broken binaries produced by old
5556 versions.
5557
55582000-09-30 Petr Sorfa <petrs@sco.com>
5559
5560 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5561 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5562 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5563 * configure: Regenerate.
5564
55652000-09-27 Hans-Peter Nilsson <hp@axis.com>
5566
5567 Define two bfd_targets for absence and presence of leading
5568 underscore on symbols. Make sure to only link same kind.
5569 * elf32-cris.c (cris_elf_object_p,
5570 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5571 cris_elf_merge_private_bfd_data): New.
5572 (elf_backend_object_p, elf_backend_final_write_processing,
5573 bfd_elf32_bfd_print_private_bfd_data,
5574 bfd_elf32_bfd_merge_private_bfd_data): Define.
5575 <Target vector definition>: Include elf32-target.h twice with
5576 different macro settings:
5577 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5578 bfd_elf32_us_cris_vec.
5579 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5580 (elf_symbol_leading_char): First as 0, then '_'.
5581 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5582 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5583 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5584 * configure: Regenerate.
5585 * targets.c: Declare bfd_elf32_us_cris_vec.
5586 * po/bfd.pot: Regenerate.
5587
55882000-09-29 Momchil Velikov <velco@fadata.bg>
5589
5590 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5591 R_ARM_THM_PC22 relocations.
5592
55932000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5594
5595 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5596
55972000-09-29 Momchil Velikov <velco@fadata.bg>
5598
5599 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5600 is has the SEC_HAS_CONTENTS flag set.
5601