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