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