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