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