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