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