* objcopy.c (setup_section): Copy entsize.
[binutils-gdb.git] / bfd / ChangeLog
1 2001-12-07 Geoffrey Keating <geoffk@redhat.com>
2 Richard Henderson <rth@redhat.com>
3 Corinna Vinschen <vinschen@redhat.com>
4
5 * Makefile.am: Add support for xstormy16.
6 * archures.c: Add support for xstormy16.
7 * config.bfd: Add support for xstormy16.
8 * configure.in: Add support for xstormy16.
9 * reloc.c: Add support for xstormy16.
10 * targets.c: Add support for xstormy16.
11 * cpu-xstormy16.c: New file.
12 * elf32-xstormy16.c: New file.
13 * Makefile.in: Regenerated.
14 * bfd-in2.h: Regenerated.
15 * configure: Regenerated.
16 * libbfd.h: Regenerated.
17
18 2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
19
20 * elf.c (assign_file_positions_for_segments): Combine sentance
21 fragments into a single sentance in order to permit better
22 translation into foreign languages.
23
24 2001-12-07 Jim Blandy <jimb@redhat.com>
25
26 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
27 (elf_backend_grok_prstatus): Define.
28
29 2001-12-07 Jakub Jelinek <jakub@redhat.com>
30
31 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
32 2001-09-14 change.
33
34 2001-12-07 Jakub Jelinek <jakub@redhat.com>
35
36 * elf.c (_bfd_elf_rela_local_sym): Only call
37 _bfd_merged_section_offset if merge_info is non-NULL.
38 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
39 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
40 prototypes.
41 * elf32-arm.h (elf32_arm_final_link_relocate): Use
42 _bfd_elf_section_offset.
43 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
44 * elf32-i386.c (elf_i386_relocate_section): Use
45 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
46 * elf32-sh.c (sh_elf_relocate_section): Likewise.
47 * elf32-sparc.c (elf32_sparc_relocate_section): Use
48 _bfd_elf_section_offset.
49 * elf32-cris.c (cris_elf_relocate_section): Likewise.
50 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
51 * elf32-i370.c (i370_elf_relocate_section): Likewise.
52 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
53 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
54 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
55 * elf32-s390.c (elf_s390_relocate_section): Likewise.
56 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
57 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
58 * elf64-s390.c (elf_s390_relocate_section): Likewise.
59 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
60 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
61 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
62
63 2001-12-07 Alan Modra <amodra@bigpond.net.au>
64
65 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
66 already forced local.
67
68 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
69
70 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
71 fragmented sentence parts into a whole sentence to permit
72 better translation into foreign languages.
73
74 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
75
76 * configure: Regenerate.
77 * Makefile.in: Regenerate.
78
79 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
80
81 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
82 BFD64_LIBS, make the latter depending on the availability of BFD64.
83 Add archive64.c source file.
84 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
85 and bfd_elf64_archive_write_armap, code from elf64-mips.c
86 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
87 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
88 (mips64*el-*-linux*): Likewise.
89 (mips*el-*-linux*): Likewise. Reorder entries.
90 * configure.in (bfd_libs): Define in dependency of BFD64 and
91 AC_SUBST it.
92 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
93 bfd_elf64_archive_slurp_armap instead.
94 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
95 instead.
96
97 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
98
99 * config.bfd: Remove trailing blanks.
100 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
101
102 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
103
104 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
105 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
106 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
107 Disable pointless overflow checking of NONE and 32.
108
109 2001-12-04 Alan Modra <amodra@bigpond.net.au>
110
111 * reloc.c (bfd_install_relocation): Correct reloc address test.
112 (bfd_perform_relocation): Formatting fix.
113 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
114
115 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
116
117 * configure.in (LINGUAS): Add tr.
118 * configure: Regenerate.
119 * po/tr.po: Import from translation project's web site.
120
121 2001-12-03 Alan Modra <amodra@bigpond.net.au>
122
123 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
124 happens to trigger on undefined symbols.
125 (final_link_relocate): Return bfd_reloc_undefined for undefined
126 stubs.
127 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
128 if we have already warned about an undefined symbol.
129
130 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
131
132 * elf32-mips.c (NEWABI_P): New define.
133 (USE_REL): Remove, replaced by
134 (elf_backend_may_use_rel_p): New define.
135 (elf_backend_may_use_rela_p): Likewise.
136 (elf_backend_default_use_rela_p): Likewise.
137 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
138 Fix some relocation definitions.
139 (elf_mips_howto_table_rela): New RELA relocation definitions for
140 NewABI support.
141 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
142 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
143 (mips_rtype_to_howto): Likewise.
144 (_bfd_mips_elf_relocate_section): Likewise.
145 (_bfd_mips_elf_object_p): Typo.
146 (elf_backend_sign_extend_vma): Reordered together with many other
147 defines nearby to resemble the order of declaration in the header
148 file.
149
150 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
151
152 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
153 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
154 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
155 * elf32-mips.c (mips_reloc_map): Likewise. Replace
156 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
157 * elf64-mips.c (mips_reloc_map): Likewise.
158 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
159 (BFD_RELOC_MIPS_GPREL32): Remove.
160
161 2001-11-30 H.J. Lu <hjl@gnu.org>
162
163 * elflink.h (elf_add_default_symbol): New.
164 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
165 to create an indirect symbol from the default for the symbol
166 with the default version if needed.
167
168 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
169
170 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
171 if it has already been set by another thread.
172
173 2001-11-28 Jakub Jelinek <jakub@redhat.com>
174
175 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
176 (elf64_alpha_relocate_section): Translate local_got_entries
177 for STT_SECTION symbol to SHF_MERGE section the first time
178 we see it.
179 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
180 sec_merge_done.
181 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
182 (get_dyn_sym_info): Use it.
183 (elfNN_ia64_relocate_section): Translate local dyn entries
184 for STT_SECTION symbol to SHF_MERGE section the first time
185 we see it.
186
187 2001-11-27 H.J. Lu <hjl@gnu.org>
188
189 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
190 ELF.
191
192 2001-11-26 Jeffrey A Law (law@cygnus.com)
193
194 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
195 prototypes.
196
197 2001-11-24 Alan Modra <amodra@bigpond.net.au>
198
199 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
200 group sizes to accommodate c++.
201
202 2001-11-23 Jakub Jelinek <jakub@redhat.com>
203
204 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
205 relocations in non-alloced sections against global symbols
206 defined in shared library being built.
207 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
208
209 2001-11-23 Jakub Jelinek <jakub@redhat.com>
210
211 * elf.c (_bfd_elf_rela_local_sym): New.
212 * elflink.h (elf_link_input_bfd): Don't consider empty
213 merged sections as removed in relocation tests.
214 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
215 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
216 against STT_SECTION symbol of SHF_MERGE section.
217 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
218 * elf32-avr.c (elf32_avr_relocate_section): Call
219 _bfd_elf_rela_local_sym.
220 * elf32-cris.c (cris_elf_relocate_section): Likewise.
221 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
222 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
223 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
224 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
225 * elf32-i370.c (i370_elf_relocate_section): Likewise.
226 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
227 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
228 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
229 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
230 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
231 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
232 * elf32-s390.c (elf_s390_relocate_section): Likewise.
233 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
234 * elf32-v850.c (v850_elf_relocate_section): Likewise.
235 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
236 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
237 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
238 * elf64-s390.c (elf_s390_relocate_section): Likewise.
239 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
240 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
241 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
242 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
243 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
244 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
245 * elf32-sh.c (sh_elf_relocate_section): Likewise for
246 !partial_inplace relocs. Handle relocs against STT_SECTION
247 symbol of SHF_MERGE for partial_inplace relocs.
248
249 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
250
251 * po/Make-in (distclean): Move SRC-POTFILES.in and
252 BLD-POTFILES.in to maintainer-clean target.
253
254 2001-11-21 Alan Modra <amodra@bigpond.net.au>
255
256 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
257 than sym_sec->output_section to detect relocs against discarded
258 sections.
259
260 2001-11-19 H.J. Lu <hjl@gnu.org>
261
262 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
263 discarding relocations.
264
265 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
266
267 * section.c (bfd_is_const_section): New macro. Return true if the
268 given seciton is one of the special, constant, sections.
269 * bfd-in2.h: Regenerate.
270 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
271 (coff_write_native_symbol): Use bfd_is_const_section.
272
273 2001-11-19 Alan Modra <amodra@bigpond.net.au>
274
275 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
276
277 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
278 millicode syms as candidates for import stubs.
279
280 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
281 (allocate_PIC_calls): Rename to allocate_plt_static.
282 (allocate_dynrelocs): Move most of code handling .plt entries to..
283 (allocate_plt_static): ..here. Don't drop plabel entries.
284
285 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
286
287 * mmo.c: Adjust documentation tags to use texinfo 4 features.
288
289 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
290
291 * section.c (bfd_is_const_section): New macro. Return true if the
292 section pointer refers to one of the special, constant sections.
293 * bfd-in2.h: Regenerate.
294
295 * coffgen.c (coff_count_linenumbers): Only update the line number
296 count in non-special sections.
297 (coff_write_native_symbol): Only update the line number file
298 position in non-special sections.
299
300 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
301
302 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
303 local syms from discarded sections. Update comment.
304
305 2001-11-15 Alan Modra <amodra@bigpond.net.au>
306
307 * po/SRC-POTFILES.in: Regenerate.
308
309 * elflink.h (elf_link_input_bfd): Complain about all relocs
310 against local syms from discarded sections. K&R fixes.
311 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
312 K&R fixes.
313
314 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
315
316 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
317 overflows in the .stab section.
318
319 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
320
321 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
322 (bfd_elf64_discard_info): Likewise.
323 * bfd-in2.h: Regenerate.
324 * elf-bfd.h (struct elf_reloc_cookie): New.
325 (struct elf_backend_data): Add elf_backend_discard_info,
326 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
327 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
328 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
329 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
330 (_bfd_elf32_mips_ignore_discarded_relocs): New.
331 (_bfd_elf32_mips_write_section): New.
332 (elf_backend_discard_info): Define.
333 (elf_backend_ignore_discarded_relocs): Define.
334 (elf_backend_write_section): Define.
335 * elfcode.h (elf_bfd_discard_info): Define.
336 (elf_reloc_symbol_deleted_p): Define.
337 * elflink.h (elf_link_input_bfd): Check
338 elf_section_ignore_discarded_relocs. Call
339 bed->elf_backend_write_section if available.
340 (elf_reloc_symbol_deleted_p): New.
341 (elf_bfd_discard_info): New.
342 (elf_section_ignore_discarded_relocs): New.
343 * elfxx-target.h (elf_backend_discard_info): Define.
344 (elf_backend_ignore_discarded_relocs): Define.
345 (elf_backend_write_section): Define.
346 (elfNN_bed): Add elf_backend_discard_info,
347 elf_backend_ignore_discarded_relocs, and
348 elf_backend_write_section.
349 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
350 * libbfd.h: Regenerate.
351 * stabs.c (_bfd_discard_section_stabs): New.
352
353 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
354
355 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
356 scheme to get rid of an ugly complicated test.
357 * elf64-s390.c (elf_s390_relocate_section): Likewise.
358
359 2001-11-14 Andreas Jaeger <aj@suse.de>
360
361 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
362 x86-64 for display.
363
364 2001-11-14 Jakub Jelinek <jakub@redhat.com>
365
366 * dwarf2.c (struct line_head) [total_length]: Change type to
367 bfd_vma.
368 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
369 (struct comp_unit): Add stash and offset_size.
370 (read_8_bytes): Return bfd_vma.
371 (read_indirect_string): New.
372 (read_attribute): Handle DW_FORM_strp.
373 (decode_line_info): Support 64-bit DWARF format.
374 (_bfd_dwarf2_find_nearest_line): Likewise.
375 (parse_comp_unit): Set offset_size and stash.
376
377 2001-11-13 Keith Walker <keith.walker@arm.com>
378
379 * dwarf2.c (read_attribute_value): New function to handle
380 DW_FORM_indirect.
381 (read_attribute): Use it.
382
383 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
384
385 * dwarf2.c (decode_line_info): Properly deal with unknown standard
386 opcodes.
387
388 2001-11-13 John Marshall <jmarshall@acm.org>
389 Alan Modra <amodra@bigpond.net.au>
390
391 * section.c (bfd_make_section_anyway): Don't increment section_id
392 and the BFD's section_count if adding the section failed.
393 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
394 change.
395
396 2001-11-12 Orjan Friberg <orjanf@axis.com>
397
398 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
399 core dump format.
400
401 2001-11-11 H.J. Lu <hjl@gnu.org>
402
403 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
404 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
405
406 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
407 dynstr type to `struct elf_strtab_hash *'.
408
409 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
410
411 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
412 size_t. Rename second i to j.
413
414 2001-11-10 Jeffrey A Law (law@cygnus.com)
415
416 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
417
418 2001-11-10 Alan Modra <amodra@bigpond.net.au>
419
420 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
421 relocs into shared libs.
422 * elf32-cris.c (cris_elf_relocate_section): Likewise.
423 * elf32-i370.c (i370_elf_relocate_section): Likewise.
424 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
425 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
426 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
427 * elf32-sh.c (sh_elf_relocate_section): Likewise.
428 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
429 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
430 * elf64-s390.c (elf_s390_relocate_section): Likewise.
431 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
433 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
434
435 * elf.c (bfd_section_from_r_symndx): New function.
436 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
437 (struct sym_sec_cache): New.
438 (bfd_section_from_r_symndx): Declare.
439 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
440 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
441 relocs when relocatable. Don't zero entire reloc, just zero the
442 addend and sym.
443 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
444 (elf32_hppa_link_hash_table_create): Init it.
445 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
446 syms on a per-section basis as we do for globals.
447 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
448 (allocate_dynrelocs): Warning fix.
449 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
450 section has been discarded.
451 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
452 into shared libs.
453 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
454 (elf_i386_link_hash_table_create): Init it.
455 (elf_i386_check_relocs): Track dynamic relocs needed for local
456 syms on a per-section basis as we do for globals.
457 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
458 Remove dead code.
459 (allocate_dynrelocs): Warning fix.
460 (elf_i386_size_dynamic_sections): Don't allocate relocs when
461 section has been discarded.
462 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
463 into shared libs.
464 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
465 (elf_s390_link_hash_table_create): Init it.
466 (elf_s390_check_relocs): Track dynamic relocs needed for local
467 syms on a per-section basis as we do for globals.
468 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
469 Remove dead code.
470 (allocate_dynrelocs): Warning fix.
471 (elf_s390_size_dynamic_sections): Don't allocate relocs when
472 section has been discarded.
473 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
474 into shared libs.
475 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
476 (ppc64_link_hash_table_create): Init it.
477 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
478 syms on a per-section basis as we do for globals.
479 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
480 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
481 function. Warning fix.
482 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
483 section has been discarded.
484 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
485 into shared libs.
486 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
487 (elf_s390_link_hash_table_create): Init it.
488 (elf_s390_check_relocs): Track dynamic relocs needed for local
489 syms on a per-section basis as we do for globals.
490 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
491 Remove dead code.
492 (allocate_dynrelocs): Warning fix.
493 (elf_s390_size_dynamic_sections): Don't allocate relocs when
494 section has been discarded.
495 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
496 into shared libs.
497
498 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
499
500 * elf32-s390: Major rework that introduces all recent changes to
501 the s390 backends. Get a closer match to elf32-i386.
502 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
503 Localise vars, and delay setting. Better error reporting, replace
504 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
505 symbol is not defined in the regular object file and tread the weak
506 definition as the normal one. Don't discard relocs for undefweak or
507 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
508 test for avoided copy relocs. Reinstate fudge for unresolved relocs
509 in debugging sections.
510 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
511 reloc processing for weakdefs. Remove redundant casts and aborts.
512 Delay setting of vars until needed. Move creation of dynamic symbols
513 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
514 BFD_ASSERT with abort. Discard .plt entries for everything with
515 plt.refcount <= 0.
516 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
517 .got or .relgot here but do it in allocate_dynrelocs. Reference count
518 possible .plt and .got entries. Don't test input section SEC_READONLY
519 here to try to avoid copy relocs, and keep dyn_relocs regardless of
520 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
521 variables until needed. Remove separate switch stmt for creating .got
522 section. Initialise local_got_refcounts to 0. Cache pointer to
523 "sreloc" section in elf_section_data. Tweak condition under which .got
524 created. Report files with bad relocation section names.
525 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
526 have been forced local. Use same test to decide if we can use a
527 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
528 comment. Move expressions out of function calls. Replace BFD_ASSERT
529 with abort.
530 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
531 statement. Replace BFD_ASSERT with abort.
532 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
533 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
534 instead of looking up section names for DT_TEXTREL. Replace
535 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
536 Add a comment to remind us that one day this ought to be fixed.
537 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
538 (struct elf_s390_link_hash_table): Likewise.
539 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
540 rid of unnecessary casts.
541 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
542 Remove "section" field.
543 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
544 Reference count possible .plt entries. Don't deallocate .got and
545 .relgot space here.
546 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
547 Update comment.
548 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
549 dyn_relocs.
550 (elf_s390_discard_copies): Delete.
551 (elf_s390_link_hash_traverse): Delete.
552 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
553 rather than gc variety).
554 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
555 srelplt, sdynbss, srelbss fields.
556 (elf_s390_link_hash_table_create): Init them.
557 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
558 (allocate_dynrelocs): New function.
559 (create_got_section): New function.
560 (elf_backend_can_refcount): Define.
561 (elf_backend_copy_indirect_symbol): Define.
562 (elf_s390_copy_indirect_symbol): New function.
563 (elf_s390_create_dynamic_sections): New function.
564 (readonly_dynrelocs): New function.
565 * elf64-s390.c: Likewise.
566
567 2001-11-07 Jakub Jelinek <jakub@redhat.com>
568
569 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
570 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
571 (elf-strtab.lo): Add rule.
572 * Makefile.in: Rebuilt.
573 * configure.in (elf): Add elf-strtab.lo.
574 * configure: Rebuilt.
575 * elf-bfd.h (elf_strtab_hash): Forward declare.
576 (struct elf_link_hash_table): Change dynstr type to
577 struct elf_strtab_hash *.
578 (struct elf_obj_tdata): Change strtab_ptr type to
579 struct elf_strtab_hash *.
580 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
581 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
582 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
583 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
584 _bfd_elf_strtab_finalize): New prototypes.
585 * elf-strtab.c: New file.
586 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
587 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
588 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
589 when forcing dynamic symbol to local.
590 (elf_link_create_dynamic_sections): Call
591 _bfd_elf_strtab_init instead of elf_stringtab_init.
592 (elf_link_record_local_dynamic_symbol): Likewise, change
593 dynstr type. Use _bfd_elf_strtab functions instead of
594 _bfd_stringtab calls.
595 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
596 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
597 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
598 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
599 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
600 dynamic symbol to local.
601 (elf_link_assign_sym_version): Likewise.
602 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
603 _bfd_stringtab_emit.
604 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
605 type. Call _bfd_elf_strtab functions instead of
606 _bfd_stringtab functions.
607 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
608 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
609 (elf_fake_sections): Likewise.
610 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
611 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
612 name in the output. Call _bfd_elf_strtab_finalize and
613 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
614 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
615 instead of _bfd_stringtab_size.
616 (prep_headers): Change shstrtab type.
617 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
618
619 2001-11-07 Alan Modra <amodra@bigpond.net.au>
620
621 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
622 bad symtab segfault. Formatting and warning fixes. Improve
623 error message for internationalisation.
624
625 2001-11-06 H.J. Lu (hjl@gnu.org)
626
627 * elflink.h (elf_link_input_bfd): Complain about relocs against
628 discarded sections.
629
630 2001-11-03 Alan Modra <amodra@bigpond.net.au>
631
632 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
633
634 2001-11-02 H.J. Lu <hjl@gnu.org>
635
636 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
637 dynamic relocation for symbols defined in regular objects when
638 creating executables.
639
640 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
641
642 * configure.in (ALL_LINGUAS): Add "fr".
643 * configure: Regenerate.
644 * po/fr.po: New file.
645
646 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
647
648 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
649
650 * som.c (setup_sections): Initialize subspace_sections.
651
652 2001-11-02 H.J. Lu (hjl@gnu.org)
653
654 * coffgen.c (coff_object_p): Return 0 if the header is too big.
655
656 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
657
658 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
659 information. Save bfd arch and mach values. Restore on error.
660
661 2001-11-02 Alan Modra <amodra@bigpond.net.au>
662
663 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
664 (allocate_PIC_calls): New function.
665 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
666 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
667 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
668
669 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
670
671 * elf32-cris.c (cris_elf_grok_prstatus): New function.
672 (cris_elf_grok_psinfo): New function.
673 (elf_backend_grok_prstatus): Define.
674 (elf_backend_grok_psinfo): Define.
675
676 2001-11-01 Alan Modra <amodra@bigpond.net.au>
677
678 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
679 prediction bits.
680
681 2001-10-31 Chris Demetriou <cgd@demetriou.com>
682
683 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
684 relocations properly.
685
686 2001-10-31 H.J. Lu <hjl@gnu.org>
687
688 * elflink.h (elf_link_output_extsym): Don't clear the visibility
689 field for relocateable.
690
691 2001-11-01 Alan Modra <amodra@bigpond.net.au>
692
693 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
694 .plt relocs in DT_RELASZ.
695
696 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
697
698 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
699 targets.
700
701 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
702
703 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
704
705 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
706
707 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
708 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
709 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
710 Regenerate dependencies.
711 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
712 * config.bfd: [BFD64] (mmix-*-*): New case.
713 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
714 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
715 (bfd_mmix_arch): Declare.
716 (bfd_archures_list): Add bfd_mmix_arch.
717 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
718 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
719 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
720 bfd_mmo_mmix_vec.
721 * reloc.c: Add MMIX relocations.
722 * bfd.c (struct _bfd, tdata): Add mmo_data.
723 * Makefile.in: Regenerate.
724 * configure: Regenerate.
725 * libbfd.h: Regenerate.
726 * bfd-in2.h: Regenerate.
727 * configure: Rebuild.
728
729 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
730
731 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
732 p_paddr of the segment that contains it.
733 (copy_private_bfd_data): If the LMA for a segment is known, use it
734 for matching sections to segments.
735 (assign_file_positions_for_segments): Use the LMA when adjusting
736 for inter-section alignment padding.
737
738 2001-10-29 Kazu Hirata <kazu@hxi.com>
739
740 * README: Fix a typo.
741
742 2001-10-24 Richard Henderson <rth@redhat.com>
743
744 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
745 timestamp to time_t for ctime.
746
747 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
748
749 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
750 unsigned, increasing index.
751
752 2001-10-23 H.J. Lu <hjl@gnu.org>
753
754 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
755 m != NULL before accessing it.
756
757 2001-10-23 Alan Modra <amodra@bigpond.net.au>
758
759 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
760 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
761 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
762
763 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
764 (hppa_link_hash_newfunc): Likewise.
765 (elf32_hppa_finish_dynamic_symbol): Likewise.
766 (allocate_dynrelocs): Always allocate .got relocs if shared.
767 (elf32_hppa_relocate_section): Output them too. Similarly
768 consolidate .plt reloc code, and no longer initialise .plt
769 when a reloc is output.
770 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
771 when no reloc is output.
772
773 From Herbert Xu <herbert@gondor.apana.org.au>
774 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
775 unreachable branches.
776
777 2001-10-22 H.J. Lu <hjl@gnu.org>
778
779 * configure.in (WIN32LIBADD): Use -L../libiberty for
780 mips*-*-linux*.
781 * configure: Rebuild.
782
783 2001-10-21 H.J. Lu <hjl@gnu.org>
784
785 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
786 if shared library is enabled only for Linux hosts.
787 * configure: Rebuild.
788
789 2001-10-21 H.J. Lu <hjl@gnu.org>
790
791 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
792 ../libiberty/Makefile instead of $enable_shared.
793 * configure: Rebuild.
794
795 2001-10-21 H.J. Lu <hjl@gnu.org>
796
797 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
798 index 0.
799
800 2001-10-20 H.J. Lu <hjl@gnu.org>
801
802 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
803 if shared library is enabled.
804 * configure: Rebuild.
805
806 2001-10-20 H.J. Lu <hjl@gnu.org>
807
808 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
809
810 2001-10-19 H.J. Lu <hjl@gnu.org>
811
812 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
813 size is empty.
814
815 2001-10-18 H.J. Lu <hjl@gnu.org>
816
817 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
818 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
819
820 2001-10-18 Jakub Jelinek <jakub@redhat.com>
821
822 * section.c (_bfd_strip_section_from_output): Don't count
823 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
824
825 2001-10-17 Alan Modra <amodra@bigpond.net.au>
826
827 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
828 Elf_Internal_Shdr.contents now that it's no longer a PTR.
829 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
830 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
831 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
832 * elf32-sh.c (sh_elf_relax_section): Likewise.
833 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
834 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
835 * elf.c (setup_group): Warning fixes.
836 * elflink.h (elf_link_sort_relocs): Likewise.
837 * pdp11.c (slurp_reloc_table): Likewise.
838
839 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
840
841 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
842 casts.
843
844 2001-10-15 H.J. Lu <hjl@gnu.org>
845
846 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
847 for relocations against discarded link-once section.
848
849 2001-10-15 Alan Modra <amodra@bigpond.net.au>
850
851 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
852 bfd_reloc_outofrange and similar errors.
853
854 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
855 rather than ind->weakdef.
856 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
857 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
858 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
859 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
860 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
861
862 2001-10-15 Alan Modra <amodra@bigpond.net.au>
863 H.J. Lu <hjl@gnu.org>
864
865 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
866 counts for aliases instead of aborting.
867 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
868 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
869
870 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
871 to -1 for non-function symbols.
872 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
873 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
874 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
875 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
876 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
877 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
878 plt.offset instead of plt.refcount when setting to -1.
879
880 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
881
882 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
883 like R_ARM_PC24. Include reloc number in error message about
884 unresolvable relocs.
885
886 2001-10-10 Jakub Jelinek <jakub@redhat.com>
887
888 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
889 relocations against the same symbol in .rel{,a}.dyn section.
890
891 2001-10-10 Kazu Hirata <kazu@hxi.com>
892
893 * aout-encap.c: Fix comment typos.
894 * aoutx.h: Likewise.
895 * archive.c: Likewise.
896 * bout.c: Likewise.
897 * coff64-rs6000.c: Likewise.
898 * coffcode.h: Likewise.
899 * coffgen.c: Likewise.
900 * cofflink.c: Likewise.
901 * coff-mips.c: Likewise.
902 * ecoff.c: Likewise.
903 * elf32-m32r.c: Likewise.
904 * libcoff-in.h: Likewise.
905 * libecoff.h: Likewise.
906 * libxcoff.h: Likewise.
907 * nlm32-i386.c: Likewise.
908 * pdp11.c: Likewise.
909 * section.c: Likewise.
910 * som.c: Likewise.
911 * som.h: Likewise.
912 * bfd-in2.h: Regenerate.
913 * libcoff.h: Likewise.
914
915 2001-10-10 Alan Modra <amodra@bigpond.net.au>
916
917 * elf.c (elf_map_symbols): Don't create new section symbols; Use
918 existing section syms. Update comments.
919 (copy_private_bfd_data): Formatting fixes.
920 (elfcore_grok_win32pstatus): Likewise.
921 (swap_out_syms): Likewise. Remove unnecessary level of braces.
922
923 2001-10-09 Alan Modra <amodra@bigpond.net.au>
924
925 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
926 "group_name".
927 (elf_group_name): Define.
928 (elf_next_in_group): Define.
929 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
930 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
931 first member section; Instead use elf_next_in_group.
932 (bfd_section_from_shdr): Likewise.
933 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
934
935 2001-10-09 Alan Modra <amodra@bigpond.net.au>
936
937 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
938 "next_in_group". Fix gp and gp_size comments.
939 * elf.c (union elf_internal_group): New.
940 (setup_group): New function.
941 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
942 Call setup_group for SHF_GROUP sections.
943 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
944 (elf_fake_sections): Set header type for SEC_GROUP, and header
945 flags for sections in a group.
946 (set_group_contents): New function.
947 (_bfd_elf_compute_section_file_positions): Call it.
948 (assign_section_numbers): Set sh_link for SHT_GROUP.
949
950 * elflink.h (gc_mark_hook): Handle section groups.
951 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
952 * section.c (SEC_GROUP): Define.
953 (struct sec): Comment fixes.
954 * bfd-in2.h: Regenerate.
955
956 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
957 out of function args.
958 (_bfd_elf_canonicalize_reloc): Similarly.
959 (_bfd_elf_get_symtab): Here too.
960 (_bfd_elf_canonicalize_dynamic_symtab): And here.
961 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
962 bfd_bread, and remove unnecessary cast.
963
964 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
965
966 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
967
968 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
969
970 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
971 compilation unit.
972
973 2001-10-06 Alan Modra <amodra@bigpond.net.au>
974
975 * bfd.c (bfd_assert): Report bfd version.
976 (_bfd_abort): Likewise.
977
978 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
979 section sym values. Instead replace any relocs against them with
980 relocs against STN_UNDEF, which has a zero value.
981
982 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
983 relocs.
984
985 2001-10-05 Jeff Law <law@redhat.com>
986
987 * som.h (som_exec_data): New field "version_id".
988 * som.c (som_object_setup): Record the version_id if it
989 exists.
990 (som_prep_headers): Do not initialize version_id here.
991 (som_finish_writing): Initialize version_id here.
992
993 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
994
995 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
996 according to the MIPS/SGI ELF64 ABI Draft.
997 (mips_elf_sort_hash_table): Typo.
998
999 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1000
1001 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1002
1003 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1004 copying flags if this is a weakdef.
1005
1006 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1007
1008 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1009 packing.
1010
1011 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1012 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1013 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1014
1015 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1016 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1017 backends we configure. Run "make dep-am".
1018 (install-data-local): Install symcat.h.
1019 * dep-in.sed: Remove symcat.h from dependencies.
1020 * Makefile.in: Regenerate.
1021
1022 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
1023
1024 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1025
1026 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1027
1028 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1029 (elf_backend_default_use_rela_p): New define.
1030
1031 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1032
1033 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1034 change.
1035
1036 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1037 * configure: Regenerate.
1038 * Makefile.am (BFD_H_FILES): Add version.h.
1039 * Makefile.in: Regenerate.
1040 * po/SRC-POTFILES.in: Regenerate.
1041
1042 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1043 elf_backend_copy_indirect_symbol so that backend has a chance to
1044 copy other necessary fields.
1045 * elf-bfd.h (struct elf_backend_data): Update description of
1046 elf_backend_copy_indirect_symbol.
1047 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1048 copying flags if this is a weakdef.
1049 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1050 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1051 than bfd_link_hash_lookup.
1052 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1053 reloc processing for weakdefs.
1054 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1055 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1056
1057 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1058
1059 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1060 result of ELF64_R_TYPE to enum before using in a switch.
1061 (ppc64_elf_gc_mark_hook): Likewise.
1062 (ppc64_elf_gc_sweep_hook): Likewise.
1063 (ppc64_elf_reloc_type_class): Likewise.
1064
1065 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1066
1067 * version.h: New file.
1068 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1069 (BFD_VERSION_DATE): Define.
1070 (BFD_VERSION_STRING): Define.
1071 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1072 bfd_version_string.
1073 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1074 * bfd-in2.h: Regenerate.
1075 * configure: Regenerate.
1076 * Makefile.am: Run "make dep-am".
1077 * Makefile.in: Regenerate.
1078
1079 * bfd-in.h: Include "symcat.h".
1080 (CONCAT4): Redefine as for old CAT4.
1081 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1082 Add warning regarding whitespace.
1083 * aout-cris.c: Likewise.
1084 * aout-ns32k.c: Likewise.
1085 * aout-sparcle.c: Likewise.
1086 * aout-tic30.c: Likewise.
1087 * aout0.c: Likewise.
1088 * armnetbsd.c: Likewise.
1089 * demo64.c: Likewise.
1090 * elf-bfd.h: Likewise.
1091 * gen-aout.c: Likewise.
1092 * host-aout.c: Likewise.
1093 * hp300bsd.c: Likewise.
1094 * hp300hpux.c: Likewise.
1095 * i386aout.c: Likewise.
1096 * i386bsd.c: Likewise.
1097 * i386dynix.c: Likewise.
1098 * i386freebsd.c: Likewise.
1099 * i386linux.c: Likewise.
1100 * i386lynx.c: Likewise.
1101 * i386mach3.c: Likewise.
1102 * i386netbsd.c: Likewise.
1103 * libaout.h: Likewise.
1104 * m68k4knetbsd.c: Likewise.
1105 * m68klinux.c: Likewise.
1106 * m68klynx.c: Likewise.
1107 * m68knetbsd.c: Likewise.
1108 * m88kmach3.c: Likewise.
1109 * mipsbsd.c: Likewise.
1110 * newsos3.c: Likewise.
1111 * ns32knetbsd.c: Likewise.
1112 * pc532-mach.c: Likewise.
1113 * pdp11.c: Likewise.
1114 * riscix.c: Likewise.
1115 * sparclinux.c: Likewise.
1116 * sparclynx.c: Likewise.
1117 * sparcnetbsd.c: Likewise.
1118 * sunos.c: Likewise.
1119 * targets.c: Likewise.
1120 * vaxnetbsd.c: Likewise.
1121 * vms-hdr.c: Likewise.
1122
1123 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1124
1125 * bfd-in.h: Remove comments regarding generated files.
1126 * libbfd-in.h: Likewise.
1127 * libcoff-in.h: Likewise.
1128 * bfd-in2.h: Regenerate.
1129 * libbfd.h: Likewise.
1130 * libcoff.h: Likewise.
1131
1132 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1133 Hans-Peter Nilsson <hp@bitrange.com>
1134
1135 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1136 partial_inplace, matching assembler output. Set src_mask to
1137 all ones.
1138 (sh_elf_relocate_section): Delete misplaced comment.
1139 For relocatable linking against section symbol, call
1140 _bfd_relocate_contents for partial_inplace relocs and adjust
1141 rel->r_addend for others.
1142 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1143 bfd_get_32, not at rel->r_addend.
1144
1145 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1146
1147 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1148 the old dir refcount, so we indirectly set them to init_refcount.
1149 Short-circuit asserts when we've just verified they are true.
1150
1151 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1152
1153 * section.c (struct sec): Remove kept_section.
1154 (STD_SECTION): Remove kept_section initialisation.
1155 (bfd_make_section_anyway): Here too.
1156 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1157 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1158 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1159 symbols to zero, and remove all code involved with kept_section
1160 and tracking section symbol values.
1161 * bfd-in2.h: Regenerate.
1162 * configure.in: Bump version number.
1163 * configure: Regenerate.
1164
1165 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1166
1167 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1168 (IS_ABSOLUTE_RELOC): Define.
1169 (struct ppc_link_hash_entry): New.
1170 (struct ppc_link_hash_table): New.
1171 (ppc_hash_table): Define.
1172 (link_hash_newfunc): New function.
1173 (ppc64_elf_link_hash_table_create): New function.
1174 (create_got_section): New function.
1175 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1176 pointers to our dynamic sections in hash table.
1177 (ppc64_elf_copy_indirect_symbol): New function.
1178 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1179 dynamic sections. Localise vars. Modify code for refcounts
1180 starting from zero. Don't allocate here, or force symbols dynamic.
1181 Don't copy all relocs if shared, select ones we need. Add code
1182 to track possible copy relocs for non-shared link.
1183 (ppc64_elf_gc_mark_hook): Update comment.
1184 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1185 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1186 code for reference counting garbage collection. Don't create .plt
1187 entries for functions that don't comply with ABI naming convention,
1188 and don't allocate .plt space here. Use short-cuts to dynamic
1189 sections. If possible, keep dynamic relocations instead of using
1190 copy relocs. Remove confused comments.
1191 (ppc_adjust_dynindx): Delete.
1192 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1193 (allocate_dynrelocs): New function.
1194 (readonly_dynrelocs): New function.
1195 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1196 space here, and call allocate_dynrelocs to allocate space for
1197 global .plt, .got and reloc sections. Use short-cuts to dynamic
1198 sections. Call readonly_dynrelocs to determine whether we need
1199 DT_TEXTREL. Don't generate section symbols here, the generic
1200 ELF linker code does it for us.
1201 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1202 gc variety, since we do our own .got handling.
1203 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1204 dynamic section short-cuts. Localise vars, and delay setting.
1205 Handle unknown relocs in main switch statement. Replace ugly
1206 complicated tests for unresolvable relocs with a simple direct
1207 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1208 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1209 after main switch, when we've set addend. Do non-addend insn
1210 tweaks before main swithc. Ignore input_section->vma when
1211 calculating reloc offsets as it's always zero. Rewrite dynamic
1212 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1213 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1214 of dynamic section short-cuts. Reorganise .plt handling code.
1215 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1216 Move expressions out of swap_reloca_out function calls.
1217 (ppc64_elf_reloc_type_class): New function.
1218 (ppc64_elf_info_to_howto): Move common expression to local var.
1219 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1220 of dynamic section short-cuts. Don't fiddle with section syms
1221 here as the ELF linker does it for us.
1222 (elf_backend_can_refcount): Define.
1223 (bfd_elf64_bfd_link_hash_table_create): Define.
1224 (elf_backend_copy_indirect_symbol): Define.
1225 (elf_backend_reloc_type_class): Define.
1226 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1227
1228 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1229
1230 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1231 (struct elf_backend_data): Add can_refcount.
1232 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1233 got.refcount and plt.refcount from init_refcount.
1234 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1235 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1236 rather than got/plt.offset, and test for <= 0 rather than -1.
1237 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1238 * elfxx-target.h (elf_backend_can_refcount): Define.
1239 (elfNN_bed): Init can_refcount.
1240 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1241 (_bfd_generic_link_hash_newfunc): Likewise.
1242 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1243 starting from zero.
1244 (elf_backend_can_refcount): Define.
1245 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1246 starting from zero.
1247 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1248 prototype.
1249 (elf_backend_can_refcount): Define.
1250 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1251 starting from zero.
1252 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1253 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1254 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1255 (elf_backend_can_refcount): Define.
1256 (elf_i386_copy_indirect_symbol): Make static to agree with
1257 prototype. Formatting fix.
1258 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1259 starting from zero.
1260 (elf_backend_can_refcount): Define.
1261 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1262 starting from zero.
1263 (elf_backend_can_refcount): Define.
1264 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1265 starting from zero.
1266 (elf_backend_can_refcount): Define.
1267 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1268 starting from zero.
1269 (elf_backend_can_refcount): Define.
1270 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1271 starting from zero.
1272 (elf_backend_can_refcount): Define.
1273
1274 * som.c (som_write_symbol_strings): Cast current_offset in
1275 bfd_seek call to match param type.
1276
1277 2001-09-28 J. Brobecker <brobecker@gnat.com>
1278
1279 * som.c (som_write_symbol_strings): Fix incorrect type of
1280 current_offset to match the function definition. Fixes a build
1281 failure on HPUX-11.00.
1282
1283 2001-09-28 Richard Henderson <rth@redhat.com>
1284
1285 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1286 SEC_MERGE, SEC_STRINGS.
1287
1288 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1289 * bfd-in2.h: Rebuild.
1290
1291 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1292
1293 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1294 reloc code using x86_64_reloc_map.
1295
1296 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1297 no longer allocate here. Localise some vars to blocks where they
1298 are used.
1299 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1300 setting of vars until needed.
1301 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1302 when symbol visibilty makes a function local.
1303 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1304 swap_reloca_out function calls.
1305 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1306 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1307 switch statement.
1308
1309 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1310 no longer allocate here. Localise some vars to blocks where they
1311 are used. Remove separate switch stmt for creating .got sec.
1312 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1313 redundant casts and aborts. Delay setting of vars until needed.
1314 (allocate_dynrelocs): Remove redundant casts and aborts.
1315 (elf_i386_size_dynamic_sections): Move comment.
1316 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1317 calls.
1318 (elf_i386_relocate_section): Likewise. Comment typo fix.
1319 (elf_i386_finish_dynamic_sections): Migrate common code out of
1320 switch statement.
1321 (elf_backend_* defines): Sort.
1322
1323 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1324 without a reloc when symbol visibilty makes a function local.
1325
1326 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1327
1328 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1329 conflicting float flags.
1330
1331 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1332
1333 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1334 (elf_backend_copy_indirect_symbol): Define.
1335 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1336 (struct elf_i386_link_hash_table): Likewise.
1337 (link_hash_newfunc): Get rid of unnecessary casts.
1338 (elf_i386_link_hash_table_create): Likewise.
1339 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1340 Don't test input section SEC_READONLY here to try to avoid copy
1341 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1342 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1343 here to properly test whether we need copy relocs. Do so for weak
1344 syms too.
1345
1346 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1347 (elf_backend_copy_indirect_symbol): Define.
1348 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1349 (stub_hash_newfunc): Get rid of unnecessary casts.
1350 (hppa_link_hash_newfunc): Likewise.
1351 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1352 Don't test input section SEC_READONLY here to try to avoid copy
1353 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1354 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1355 here to properly test whether we need copy relocs. Do so for weak
1356 syms too.
1357
1358 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1359
1360 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1361 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1362 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1363
1364 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1365
1366 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1367 computation.
1368
1369 2001-09-25 H.J. Lu <hjl@gnu.org>
1370
1371 * bfd-in2.h: Regenerated.
1372
1373 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1374
1375 * elf32-i386.c: Add comment re linker function names and ordering.
1376 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1377 (elf_i386_grok_prstatus): Move before linker functions.
1378 (elf_i386_grok_psinfo): Likewise.
1379 (elf_i386_fake_sections): Move so that functions are ordered.
1380 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1381
1382 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1383
1384 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1385 throughout file.
1386
1387 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1388 code handling this option.
1389 (LONG_BRANCH_VIA_PLT): Likewise.
1390 (RELATIVE_DYNRELOCS): Define as zero.
1391 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1392 "pc_count" fields. Remove "section" field.
1393 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1394 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1395 relocs here. Instead, record all needed dynamic relocs via
1396 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1397 in elf_section_data.
1398 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1399 (allocate_plt_and_got_and_discard_relocs): Rename to
1400 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1401 (readonly_dynrelocs): New function.
1402 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1403 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1404 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1405 (elf32_hppa_relocate_section): Make use of cached sreloc.
1406 (elf32_hppa_reloc_type_class): New function.
1407 (elf_backend_reloc_type_class): Define.
1408
1409 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1410
1411 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1412 and "sreloc" fields.
1413 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1414 "pc_count" fields. Remove "section" field.
1415 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1416 allocate space for dynamic relocs here. Instead, record all
1417 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1418 pointer to "sreloc" section in elf_section_data.
1419 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1420 (allocate_plt_and_got_and_discard_relocs): Rename to
1421 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1422 (readonly_dynrelocs): New function.
1423 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1424 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1425 (elf_i386_relocate_section): Make use of cached sreloc.
1426
1427 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1428
1429 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1430 reloc rather than just the type.
1431 (_bfd_elf_reloc_type_class): Likewise.
1432 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1433 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1434 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1435 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1436 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1437 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1438 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1439 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1440 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1441 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1442 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1443 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1444 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1445 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1446 * elflink.h: Formatting fixes.
1447 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1448 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1449 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1450
1451 2001-09-22 John Reiser <jreiser@BitWagon.com>
1452
1453 * elfcode.h (elf_object_p): Allow for no section header at all in
1454 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1455
1456 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1457
1458 * elfxx-ia64.c: Fix compile time warning messages.
1459 * coff-mcore.c: Fix compile time warning messages.
1460 * coff-ppc.c: Fix compile time warning messages.
1461 * coffcode.h: Fix compile time warning messages.
1462 * elf32-mips.c: Fix compile time warning messages.
1463 * elf64-alpha.c: Fix compile time warning messages.
1464 * libbfd.c: Fix compile time warning messages.
1465 * bfd-in2.h: Regenerate.
1466
1467 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1468
1469 * Makefile.am: Run "make dep-am".
1470 * Makefile.in: Regenerate.
1471
1472 * aoutx.h: Formatting fixes.
1473 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1474
1475 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1476 in error message.
1477
1478 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1479
1480 * bfd.c (bfd_archive_filename): New function.
1481 * bfd-in2.h: Regenerate.
1482 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1483 in error messages where the bfd is an input bfd.
1484 * aout-cris.c: Likewise.
1485 * coff-arm.c: Likewise.
1486 * coff-mcore.c: Likewise.
1487 * coff-ppc.c: Likewise.
1488 * coff-rs6000.c: Likewise.
1489 * coff-sh.c: Likewise.
1490 * coff-tic54x.c: Likewise.
1491 * coff-tic80.c: Likewise.
1492 * coff64-rs6000.c: Likewise.
1493 * coffcode.h: Likewise.
1494 * coffgen.c: Likewise.
1495 * cofflink.c: Likewise.
1496 * ecofflink.c: Likewise.
1497 * elf-hppa.h: Likewise.
1498 * elf.c: Likewise.
1499 * elf32-arm.h: Likewise.
1500 * elf32-cris.c: Likewise.
1501 * elf32-gen.c: Likewise.
1502 * elf32-hppa.c: Likewise.
1503 * elf32-i370.c: Likewise.
1504 * elf32-i386.c: Likewise.
1505 * elf32-m32r.c: Likewise.
1506 * elf32-mcore.c: Likewise.
1507 * elf32-mips.c: Likewise.
1508 * elf32-ppc.c: Likewise.
1509 * elf32-s390.c: Likewise.
1510 * elf32-sh.c: Likewise.
1511 * elf32-sparc.c: Likewise.
1512 * elf32-v850.c: Likewise.
1513 * elf64-alpha.c: Likewise.
1514 * elf64-gen.c: Likewise.
1515 * elf64-ppc.c: Likewise.
1516 * elf64-s390.c: Likewise.
1517 * elf64-sparc.c: Likewise.
1518 * elf64-x86-64.c: Likewise.
1519 * elflink.h: Likewise.
1520 * elfxx-ia64.c: Likewise.
1521 * ieee.c: Likewise.
1522 * ihex.c: Likewise.
1523 * libbfd.c: Likewise.
1524 * pdp11.c: Likewise.
1525 * pe-mips.c: Likewise.
1526 * peicode.h: Likewise.
1527 * srec.c: Likewise.
1528 * xcofflink.c: Likewise.
1529
1530 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1531
1532 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1533 error message.
1534
1535 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1536 error message.
1537
1538 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1539 Consolidate error messages, and split long messages to two lines.
1540
1541 2001-09-20 John Reiser <jreiser@BitWagon.com>
1542
1543 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1544 and info->allow_shlib_undefined.
1545 * elf32-cris.c: Likewise.
1546 * elf32-hppa.c: Likewise.
1547 * elf32-m68k.c: Likewise.
1548 * elf32-mips.c: Likewise.
1549 * elf32-ppc.c: Likewise.
1550 * elf32-s390.c: Likewise.
1551 * elf32-sh.c: Likewise.
1552 * elf32-sparc.c: Likewise.
1553 * elf64-alpha.c: Likewise.
1554 * elf64-hppa.c: Likewise.
1555 * elf64-ppc.c: Likewise.
1556 * elf64-s390.c: Likewise.
1557 * elf64-sparc.c: Likewise.
1558 * elf64-x86-64.c: Likewise.
1559 * elfxx-ia64.c: Likewise.
1560
1561 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1562
1563 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1564 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1565 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1566 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1567 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1568 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1569 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1570 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1571 isxdigit/isdigit/islower.
1572 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1573 (mangle_name): Use ISALNUM instead of isalnum.
1574 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1575 (scan): Use ISDIGIT instead of isdigit.
1576 * hosts/alphavms.h: Don't include <ctype.h>.
1577 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1578 (ieee_object_p): Use TOUPPER instead of toupper.
1579 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1580 (ihex_bad_byte): Use ISPRINT instead of isprint.
1581 * merge.c: Don't include <ctype.h>.
1582 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1583 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1584 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1585 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1586 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1587 (mangle_name): Use ISALNUM instead of isalnum.
1588 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1589 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1590 isupper/islower/isdigit.
1591 (som_decode_symclass): Use TOUPPER instead of toupper.
1592 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1593 (srec_bad_byte): Use ISPRINT instead of isprint.
1594 (srec_scan): Use ISSPACE instead of isspace.
1595 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1596 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1597 * syms.c: Include "safe-ctype.h"
1598 (islower, toupper): Remove macro definitions.
1599 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1600 * vms-gsd.c: Don't include <ctype.h>.
1601 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1602 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1603 islower/toupper.
1604 * vms-tir.c: Don't include <ctype.h>.
1605
1606 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1607
1608 * libbfd.c (bfd_bread): New function replacing bfd_read without
1609 redundant params. Allow reads up to (size_t) -2 in length.
1610 (bfd_bwrite): Similarly for bfd_write.
1611 (real_read): Return a size_t.
1612 (bfd_read): Call bfd_bread.
1613 (bfd_write): Call bfd_bwrite.
1614 (warn_deprecated): New function to annoy everybody.
1615 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1616 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1617 (bfd_read, bfd_write): Define as macro.
1618 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1619 likewise for bfd_write. Ensure function args are correct size by
1620 using casts or local vars. In some cases, remove unnecessary
1621 casts. Formatting fixes, in some cases removing a large expression
1622 from function args by using a local var. Replace CONST with const.
1623 Modify variable types to avoid warings. Use casts to avoid
1624 warnings when using negative numbers in unsigned expressions.
1625 * aout-adobe.c: Likewise.
1626 * aout-arm.c: Likewise.
1627 * aout-cris.c: Likewise.
1628 * aout-encap.c: Likewise.
1629 * aout-ns32k.c: Likewise.
1630 * aout-target.h: Likewise.
1631 * aout-tic30.c: Likewise.
1632 * aoutf1.h: Likewise.
1633 * aoutx.h: Likewise.
1634 * archive.c: Likewise.
1635 * archures.c: Likewise.
1636 * bfd-in.h: Likewise.
1637 * bfd.c: Likewise.
1638 * binary.c: Likewise.
1639 * bout.c: Likewise.
1640 * cache.c: Likewise.
1641 * cisco-core.c: Likewise.
1642 * coff-a29k.c: Likewise.
1643 * coff-alpha.c: Likewise.
1644 * coff-arm.c: Likewise.
1645 * coff-h8300.c: Likewise.
1646 * coff-h8500.c: Likewise.
1647 * coff-i386.c: Likewise.
1648 * coff-i860.c: Likewise.
1649 * coff-i960.c: Likewise.
1650 * coff-ia64.c: Likewise.
1651 * coff-m68k.c: Likewise.
1652 * coff-m88k.c: Likewise.
1653 * coff-mcore.c: Likewise.
1654 * coff-mips.c: Likewise.
1655 * coff-ppc.c: Likewise.
1656 * coff-rs6000.c: Likewise.
1657 * coff-sh.c: Likewise.
1658 * coff-sparc.c: Likewise.
1659 * coff-stgo32.c: Likewise.
1660 * coff-tic30.c: Likewise.
1661 * coff-tic54x.c: Likewise.
1662 * coff-tic80.c: Likewise.
1663 * coff-w65.c: Likewise.
1664 * coff-z8k.c: Likewise.
1665 * coff64-rs6000.c: Likewise.
1666 * coffcode.h: Likewise.
1667 * coffgen.c: Likewise.
1668 * cofflink.c: Likewise.
1669 * coffswap.h: Likewise.
1670 * corefile.c: Likewise.
1671 * cpu-arc.c: Likewise.
1672 * cpu-h8300.c: Likewise.
1673 * cpu-h8500.c: Likewise.
1674 * cpu-i960.c: Likewise.
1675 * cpu-ia64-opc.c: Likewise.
1676 * cpu-ns32k.c: Likewise.
1677 * cpu-pdp11.c: Likewise.
1678 * cpu-pj.c: Likewise.
1679 * cpu-sh.c: Likewise.
1680 * cpu-w65.c: Likewise.
1681 * cpu-z8k.c: Likewise.
1682 * dwarf1.c: Likewise.
1683 * dwarf2.c: Likewise.
1684 * ecoff.c: Likewise.
1685 * ecofflink.c: Likewise.
1686 * ecoffswap.h: Likewise.
1687 * elf-bfd.h: Likewise.
1688 * elf-hppa.h: Likewise.
1689 * elf-m10200.c: Likewise.
1690 * elf-m10300.c: Likewise.
1691 * elf.c: Likewise.
1692 * elf32-arc.c: Likewise.
1693 * elf32-arm.h: Likewise.
1694 * elf32-avr.c: Likewise.
1695 * elf32-cris.c: Likewise.
1696 * elf32-fr30.c: Likewise.
1697 * elf32-gen.c: Likewise.
1698 * elf32-h8300.c: Likewise.
1699 * elf32-hppa.c: Likewise.
1700 * elf32-i370.c: Likewise.
1701 * elf32-i386.c: Likewise.
1702 * elf32-i860.c: Likewise.
1703 * elf32-m32r.c: Likewise.
1704 * elf32-m68k.c: Likewise.
1705 * elf32-mcore.c: Likewise.
1706 * elf32-mips.c: Likewise.
1707 * elf32-openrisc.c: Likewise.
1708 * elf32-pj.c: Likewise.
1709 * elf32-ppc.c: Likewise.
1710 * elf32-s390.c: Likewise.
1711 * elf32-sh-lin.c: Likewise.
1712 * elf32-sh.c: Likewise.
1713 * elf32-sparc.c: Likewise.
1714 * elf32-v850.c: Likewise.
1715 * elf64-alpha.c: Likewise.
1716 * elf64-hppa.c: Likewise.
1717 * elf64-mips.c: Likewise.
1718 * elf64-ppc.c: Likewise.
1719 * elf64-s390.c: Likewise.
1720 * elf64-sparc.c: Likewise.
1721 * elf64-x86-64.c: Likewise.
1722 * elfarm-nabi.c: Likewise.
1723 * elfcode.h: Likewise.
1724 * elfcore.h: Likewise.
1725 * elflink.c: Likewise.
1726 * elflink.h: Likewise.
1727 * elfxx-ia64.c: Likewise.
1728 * elfxx-target.h: Likewise.
1729 * format.c: Likewise.
1730 * hash.c: Likewise.
1731 * hp300hpux.c: Likewise.
1732 * hppabsd-core.c: Likewise.
1733 * hpux-core.c: Likewise.
1734 * i386aout.c: Likewise.
1735 * i386dynix.c: Likewise.
1736 * i386linux.c: Likewise.
1737 * i386lynx.c: Likewise.
1738 * i386mach3.c: Likewise.
1739 * i386msdos.c: Likewise.
1740 * i386os9k.c: Likewise.
1741 * ieee.c: Likewise.
1742 * ihex.c: Likewise.
1743 * irix-core.c: Likewise.
1744 * libaout.h: Likewise.
1745 * libbfd-in.h: Likewise.
1746 * libbfd.c: Likewise.
1747 * libcoff-in.h: Likewise.
1748 * libecoff.h: Likewise.
1749 * libieee.h: Likewise.
1750 * libnlm.h: Likewise.
1751 * libpei.h: Likewise.
1752 * libxcoff.h: Likewise.
1753 * linker.c: Likewise.
1754 * lynx-core.c: Likewise.
1755 * m68klinux.c: Likewise.
1756 * merge.c: Likewise.
1757 * mipsbsd.c: Likewise.
1758 * netbsd-core.c: Likewise.
1759 * nlm.c: Likewise.
1760 * nlm32-alpha.c: Likewise.
1761 * nlm32-i386.c: Likewise.
1762 * nlm32-ppc.c: Likewise.
1763 * nlm32-sparc.c: Likewise.
1764 * nlmcode.h: Likewise.
1765 * nlmswap.h: Likewise.
1766 * ns32k.h: Likewise.
1767 * oasys.c: Likewise.
1768 * opncls.c: Likewise.
1769 * osf-core.c: Likewise.
1770 * pc532-mach.c: Likewise.
1771 * pdp11.c: Likewise.
1772 * pe-mips.c: Likewise.
1773 * peXXigen.c: Likewise.
1774 * peicode.h: Likewise.
1775 * ppcboot.c: Likewise.
1776 * ptrace-core.c: Likewise.
1777 * reloc.c: Likewise.
1778 * reloc16.c: Likewise.
1779 * riscix.c: Likewise.
1780 * rs6000-core.c: Likewise.
1781 * sco5-core.c: Likewise.
1782 * section.c: Likewise.
1783 * som.c: Likewise.
1784 * sparclinux.c: Likewise.
1785 * sparclynx.c: Likewise.
1786 * srec.c: Likewise.
1787 * stabs.c: Likewise.
1788 * sunos.c: Likewise.
1789 * syms.c: Likewise.
1790 * targets.c: Likewise.
1791 * tekhex.c: Likewise.
1792 * trad-core.c: Likewise.
1793 * versados.c: Likewise.
1794 * vms-gsd.c: Likewise.
1795 * vms-hdr.c: Likewise.
1796 * vms-misc.c: Likewise.
1797 * vms-tir.c: Likewise.
1798 * vms.c: Likewise.
1799 * vms.h: Likewise.
1800 * xcofflink.c: Likewise.
1801 * bfd-in2.h: Regenerate.
1802 * libbfd.h: Regenerate.
1803 * libcoff.h: Regenerate.
1804
1805 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1806 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1807 (ufile_ptr): Define.
1808 (bfd_tell): Return a ufile_ptr.
1809 * libbfd.c (bfd_tell): Likewise.
1810 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1811 unnecessarily.
1812 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1813 * aoutf1.h: Likewise.
1814 * som.c: Likewise.
1815 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1816 larger than unsigned long can represent.
1817
1818 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1819 size overflows size_t.
1820 (bfd_realloc): Likewise.
1821 (bfd_zmalloc): Likewise.
1822 * opncls.c (bfd_alloc): Likewise.
1823 (bfd_zalloc): Likewise.
1824 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1825 (bfd_alloc, bfd_zalloc): Update.
1826
1827 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1828 8 bits.
1829 (bfd_get_signed_8): Likewise.
1830 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1831 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1832 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1833 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1834 * libaout.h: Likewise define and use here.
1835 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1836 * aout-arm.c: Likewise.
1837 * aout-encap.c: Likewise.
1838 * aout-ns32k.c: Likewise.
1839 * aout-tic30.c: Likewise.
1840 * aoutf1.h: Likewise.
1841 * aoutx.h: Likewise.
1842 * bout.c: Likewise.
1843 * coff-alpha.c: Likewise.
1844 * coff-h8300.c: Likewise.
1845 * coff-h8500.c: Likewise.
1846 * coff-i960.c: Likewise.
1847 * coff-ia64.c: Likewise.
1848 * coff-m88k.c: Likewise.
1849 * coff-mips.c: Likewise.
1850 * coff-ppc.c: Likewise.
1851 * coff-rs6000.c: Likewise.
1852 * coff-sh.c: Likewise.
1853 * coff-sparc.c: Likewise.
1854 * coff-stgo32.c: Likewise.
1855 * coff-tic30.c: Likewise.
1856 * coff-tic80.c: Likewise.
1857 * coff-w65.c: Likewise.
1858 * coff-z8k.c: Likewise.
1859 * coff64-rs6000.c: Likewise.
1860 * coffgen.c: Likewise.
1861 * cofflink.c: Likewise.
1862 * coffswap.h: Likewise.
1863 * ecoff.c: Likewise.
1864 * ecoffswap.h: Likewise.
1865 * elf.c: Likewise.
1866 * elf32-mips.c: Likewise.
1867 * elf64-mips.c: Likewise.
1868 * hp300hpux.c: Likewise.
1869 * i386dynix.c: Likewise.
1870 * i386lynx.c: Likewise.
1871 * i386msdos.c: Likewise.
1872 * i386os9k.c: Likewise.
1873 * libpei.h: Likewise.
1874 * nlm32-alpha.c: Likewise.
1875 * nlm32-i386.c: Likewise.
1876 * nlm32-ppc.c: Likewise.
1877 * nlmcode.h: Likewise.
1878 * nlmswap.h: Likewise.
1879 * oasys.c: Likewise.
1880 * pdp11.c: Likewise.
1881 * pe-mips.c: Likewise.
1882 * peXXigen.c: Likewise.
1883 * peicode.h: Likewise.
1884 * riscix.c: Likewise.
1885 * sunos.c: Likewise.
1886 * xcofflink.c: Likewise.
1887 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1888 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1889 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1890 equivalent H_PUT_* macro instead.
1891 (GETWORD, GETHALF, GETBYTE): Similarly.
1892 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1893 (GETWORD, GETHALF, GETBYTE): Likewise.
1894 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1895
1896 * bfd-in.h (struct orl): Change "pos" to a union.
1897 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1898 (bsd_write_armap): Here too.
1899 (coff_write_armap): And here.
1900 * coff-rs6000.c (xcoff_write_armap_old): And here.
1901 (xcoff_write_one_armap_big): And here.
1902 (xcoff_write_armap_big): And here.
1903 * ecoff.c (_bfd_ecoff_write_armap): And here.
1904 * elf64-mips.c (mips_elf64_write_armap): And here.
1905
1906 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1907 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1908 * elf32-h8300.c (elf32_h8_mach): Likewise.
1909 * elf32-mips.c (elf_mips_mach): Likewise.
1910 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1911
1912 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1913 calls.
1914 (aix386_core_vec): Typo fix.
1915
1916 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1917 etc. to avoid redefined macro warning.
1918 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1919 (MY(fix_pcrel_26)): Likewise.
1920 * aout-ns32k.c (MY(put_reloc)): Likewise.
1921 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1922 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1923 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1924
1925 * aout-encap.c: Include "file", not <file> for binutils headers.
1926 (encap_object_p): Half baked attempt to fix compile errors in
1927 code dealing with "magic".
1928
1929 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1930 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1931 bfd_vma's rather than longs.
1932 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1933 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1934 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1935 remove case 3.
1936 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1937 Use unsigned comparisons.
1938 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1939 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1940 (_bfd_do_ns32k_reloc_contents): Likewise.
1941 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1942 (_bfd_ns32k_get_immediate): Likewise.
1943 (_bfd_ns32k_put_displacement): Likewise.
1944 (_bfd_ns32k_put_immediate): Likewise.
1945 (bfd_reloc_status_type): Likewise.
1946
1947 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1948 to avoid shadowing.
1949 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1950 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1951 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1952 avoid shadowing.
1953 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1954 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1955 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1956 shadow warning.
1957 (_bfd_elfcore_strndup): Likewise for "dup".
1958 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1959 "name" to avoid shadowing.
1960 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1961 definition of "off".
1962 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1963 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1964 definition of "s".
1965 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1966 "secpp".
1967 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1968 to avoid shadowing.
1969 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1970 to avoid shadowing.
1971 (elf_link_input_bfd): Likewise.
1972 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1973 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1974 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1975 "input_section".
1976 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1977 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1978 (sunos_write_dynamic_symbol): Remove unused vars.
1979 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1980 innermost "directory_name" and "file_name" vars.
1981 * tekhex.c (first_phase): Rename local var "type" to "stype".
1982 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1983 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1984 doing comparison at caller.
1985 (vms_esecflag_by_name): Likewise.
1986 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1987 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1988 (xcoff_write_global_symbol): Rename "p" param to "inf".
1989
1990 * cisco-core.c: Add missing prototypes.
1991 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1992 (cisco_core_file_failing_signal): Likewise.
1993 (cisco_core_file_matches_executable_p): Likewise.
1994 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1995 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1996 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1997 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1998
1999 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2000 thumb_glue_size and arm_glue_size.
2001 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2002
2003 * coff64-rs6000.c: Group prototypes together.
2004
2005 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2006 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2007
2008 * cpu-arc.c: Add missing prototypes.
2009 * cpu-h8500.c: Likewise.
2010 * cpu-i960.c: Likewise.
2011 * cpu-pj.c: Likewise.
2012 * cpu-sh.c: Likewise.
2013 * cpu-w65.c: Likewise.
2014 * cpu-z8k.c: Likewise.
2015 * elf32-fr30.c: Likewise.
2016 * elf32-h8300.c: Likewise.
2017 * elf32-i370.c: Likewise.
2018 * hpux-core.c: Likewise.
2019 * versados.c: Likewise.
2020
2021 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2022 * cpu-h8500.c: Likewise.
2023 * cpu-i960.c: Likewise.
2024 * cpu-z8k.c: Likewise.
2025
2026 * cpu-ia64-opc.c: Correct comment.
2027
2028 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2029
2030 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2031 to unsigned.
2032 (bfd_elf32_write_out_phdrs): Likewise.
2033 (bfd_elf64_write_out_phdrs): Likewise.
2034 (elf_linker_section_pointers): Change addend to bfd_vma.
2035 (_bfd_elf_find_pointer_linker_section): Likewise.
2036 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2037 filepos to unsigned file_ptr.
2038 (_bfd_elfcore_strndup): Change max param to size_t.
2039 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2040 (_bfd_elfcore_strndup): Likewise.
2041 (_bfd_elf_find_pointer_linker_section): Likewise.
2042
2043 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2044 insn and sym_value to ints.
2045
2046 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2047 bfd_size_type.
2048 (elfcore_read_notes): Likewise.
2049
2050 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2051 param from unsigned char to int.
2052 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2053 for info_to_howto call.
2054 (add_dynamic_entry): Define macro.
2055 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2056
2057 * elf32-cris.c (add_dynamic_entry): Define macro.
2058 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2059
2060 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2061 (elf32_h8_object_p): Likewise.
2062 (elf32_h8_merge_private_bfd_data): Likewise.
2063 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2064
2065 * elf32-hppa.c (add_dynamic_entry): Define macro.
2066 (elf32_hppa_size_dynamic_sections): Use it.
2067 * elf32-i370.c (add_dynamic_entry): Define macro.
2068 (i370_elf_size_dynamic_sections): Use it.
2069 (i370_noop): Make static.
2070 * elf32-i386.c (add_dynamic_entry): Define macro.
2071 (elf_i386_size_dynamic_sections): Use it.
2072 * elf32-m68k.c (add_dynamic_entry): Define macro.
2073 (elf_m68k_size_dynamic_sections): Use it.
2074 * elf32-ppc.c (add_dynamic_entry): Define macro.
2075 (ppc_elf_size_dynamic_sections): Use it.
2076 * elf32-s390.c (add_dynamic_entry): Define macro.
2077 (elf_s390_size_dynamic_sections): Use it.
2078 * elf64-alpha.c (add_dynamic_entry): Define macro.
2079 (elf64_alpha_size_dynamic_sections): Use it.
2080 * elf64-hppa.c (add_dynamic_entry): Define macro.
2081 (elf64_hppa_size_dynamic_sections): Use it.
2082 * elf64-ppc.c (add_dynamic_entry): Define macro.
2083 (ppc64_elf_size_dynamic_sections): Use it.
2084 * elf64-s390.c (add_dynamic_entry): Define macro.
2085 (elf_s390_size_dynamic_sections): Use it.
2086 * elf64-sparc.c (add_dynamic_entry): Define macro.
2087 (sparc64_elf_size_dynamic_sections): Use it.
2088 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2089 (elf64_x86_64_size_dynamic_sections): Use it.
2090 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2091 (elfNN_ia64_size_dynamic_sections): Use it.
2092
2093 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2094 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2095
2096 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2097 false if the first malloc fails rather than going via error_return.
2098
2099 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2100 "index" param.
2101 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2102
2103 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2104
2105 * elfxx-ia64.c (global_sym_index): Return a long.
2106
2107 * ieee.c (get_symbol): Use int rather than char param.
2108 (ieee_slurp_sections): Move "section" var to inner blocks.
2109 (copy_expression): Don't init "value" to zero or worry about
2110 clearing to zero after using.
2111 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2112 shadowing.
2113
2114 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2115 unsigned int.
2116
2117 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2118 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2119
2120 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2121
2122 * pc532-mach.c (MYNSX): Delete.
2123 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2124 (write_object_contents): Correct prototype.
2125
2126 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2127 than unsigned short.
2128
2129 * section.c (bfd_set_section_contents): Remove redundant
2130 "offset < 0" test. Check that "count" doesn't overflow size_t.
2131 (bfd_get_section_contents): Likewise.
2132
2133 * som.c (som_fixup_formats): Add missing braces.
2134 (som_reloc_addend): Pass a bfd_vma for "addend".
2135
2136 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2137 (srec_write_symbols): Remove an unnecessary var.
2138
2139 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2140 to match.
2141 * configure.in: Sort to match. Bump version number.
2142 * configure: Regenerate.
2143
2144 * tekhex.c (move_section_contents): Assert offset == 0.
2145
2146 * versados.c (new_symbol_string): Constify arg.
2147 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2148 (versados_get_symbol_info): Make static.
2149 (versados_print_symbol): Likewise.
2150 (versados_get_reloc_upper_bound): Likewise.
2151 (versados_canonicalize_reloc): Likewise.
2152
2153 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2154
2155 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2156
2157 2001-09-17 H.J. Lu <hjl@gnu.org>
2158
2159 * dwarf1.c (parse_die): Take a new arg for the end of the
2160 section. Return false if die is beyond the section.
2161 (parse_functions_in_unit): Pass the end of the section to
2162 parse_die ().
2163 (_bfd_dwarf1_find_nearest_line): Likewise.
2164
2165 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2166
2167 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2168 just like R_SPARC_32.
2169
2170 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2171
2172 * configure.bfd: Add arm-openbsd target.
2173
2174 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2175
2176 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2177 Add support for mips64.
2178
2179 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2180
2181 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2182
2183 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2184
2185 * elf.c (prep_headers): Get the machine code from the elf
2186 backend data.
2187 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2188 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2189 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2190 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2191 * elf-arc.c (arc_elf_final_write_processing): Don't override
2192 e_machine, it's now properly set in prep_headers.
2193 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2194 EM_AVR_OLD.
2195 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2196 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2197 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2198 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2199 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2200 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2201 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2202 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2203 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2204 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2205 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2206 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2207
2208 2001-09-11 Richard Henderson <rth@redhat.com>
2209
2210 * elf64-alpha.c (elf64_alpha_section_flags): New.
2211 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2212
2213 2001-09-11 Richard Henderson <rth@redhat.com>
2214
2215 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2216 apply HINT relocations against dynamic symbols.
2217
2218 2001-09-11 H.J. Lu <hjl@gnu.org>
2219
2220 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2221
2222 2001-09-09 Richard Henderson <rth@redhat.com>
2223
2224 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2225
2226 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2227 following a call to a near function.
2228
2229 2001-09-08 Richard Henderson <rth@redhat.com>
2230
2231 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2232 relocation errors. Fail gp-relative relocations against
2233 dynamic symbols.
2234
2235 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2236
2237 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2238 as well as DEF_DYNAMIC in test for avoided copy relocs.
2239 (allocate_plt_and_got_and_discard_relocs): Likewise.
2240 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2241 (allocate_plt_and_got_and_discard_relocs): Likewise.
2242
2243 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2244
2245 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2246 of R_MIPS_PC16.
2247
2248 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2249
2250 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2251 definitions.
2252 (mips_elf64_howto_table_rel): Likewise.
2253
2254 2001-09-05 Tom Rix <trix@redhat.com>
2255
2256 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2257 and syscall symbols.
2258 (write_global_symbol) : Same.
2259 (bfd_xcoff_export_symbol): Remove unused syscall param.
2260 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2261 bfd_xcoff_import_symbol.
2262 * bfd-in.h: Same.
2263 * bfd-in2.h : Regenerate.
2264
2265 2001-09-04 Richard Henderson <rth@redhat.com>
2266
2267 * elf64-alpha.c (SKIP_HOWTO): New.
2268 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2269 Fix sizes of 16-bit mem format relocs.
2270 (elf64_alpha_reloc_map): Update to match.
2271 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2272 (elf64_alpha_relax_without_lituse): Likewise.
2273 (elf64_alpha_check_relocs): Handle GPREL16.
2274 (elf64_alpha_relocate_section): Likewise.
2275 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2276 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2277 * bfd-in2.h, libbfd.h: Rebuild.
2278
2279 2001-09-04 Jeff Law <law@redhat.com>
2280
2281 * elf32-h8300.c (elf32_h8_relax_section): New function.
2282 (elf32_h8_relax_delete_bytes): Likewise.
2283 (elf32_h8_symbol_address_p): Likewise.
2284 (elf32_h8_get_relocated_section_contents): Likewise.
2285 (bfd_elf32_bfd_relax_section): Define.
2286 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2287
2288 * elf32-h8300.c (special): New function.
2289 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2290 all relocations.
2291 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2292 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2293 Fix minor problems with 8bit and 16bit PC relative relocations.
2294
2295 2001-09-01 Andreas Jaeger <aj@suse.de>
2296
2297 * vms-tir.c: Add missing prototypes.
2298 * vms-hdr.c: Likewise.
2299 * vms-gsd.c: Likewise.
2300 * vms-misc.c: Likewise.
2301
2302 2001-08-31 H.J. Lu <hjl@gnu.org>
2303
2304 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2305 with bad relocation.
2306
2307 2001-08-31 Eric Christopher <echristo@redhat.com>
2308 Jason Eckhardt <jle@redhat.com>
2309
2310 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2311 mips32_4k and mips64.
2312 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2313 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2314 * bfd/cpu-mips.c: Ditto.
2315 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2316 * bfd/bfd-in2.h: Regenerate.
2317
2318 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2319
2320 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2321 value into R_ALPHA_RELATIVE's addend.
2322 (elf64_alpha_finish_dynamic_symbol): Likewise.
2323
2324 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2325
2326 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2327 recomputed addend during relocatable link if not USE_REL.
2328
2329 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2330 error.
2331
2332 2001-08-30 H.J. Lu <hjl@gnu.org>
2333
2334 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2335 2 changes.
2336 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2337 relocations for weak definitions.
2338
2339 2001-08-30 H.J. Lu <hjl@gnu.org>
2340
2341 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2342 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2343 * Makefile.in: Rebuild.
2344
2345 2001-08-30 H.J. Lu <hjl@gnu.org>
2346
2347 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2348 dynamic relocation for undefined weak symbols when creating
2349 executables. Check h->root.root.type, instead of h->root.type.
2350
2351 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2352
2353 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2354 default from coff to elf.
2355
2356 2001-08-29 Jeff Law <law@redhat.com>
2357
2358 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2359 relocations.
2360 (h8_reloc_map): Similarly.
2361 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2362 Add support for PC relative relocations.
2363
2364 * elf32-h8300.c: Put all prototypes together.
2365 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2366 (elf32_h8_final_link_relocate): New function for linker.
2367 (elf32_h8_relocate_section): Similarly.
2368 (elf_backend_relocate_section): Define.
2369
2370 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2371 (h8300_scan): Handle architecture:machine encodings typically
2372 found in linker scripts.
2373 * elf.c (prep_headers): Do not try to do H8 machine recognition
2374 here.
2375 * elf32-h8300.c: Add some missing prototypes.
2376 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2377 (elf32_h8_object_p): Similarly.
2378
2379 2001-08-29 Tom Rix <trix@redhat.com>
2380
2381 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2382 does not follow a XTY_SD.
2383
2384 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2385
2386 * targmatch.sed: Delete case statements.
2387 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2388 aix4.3 and above.
2389
2390 2001-08-29 J"orn Rennecke <amylaar@redhat.com>
2391
2392 * Makefile.am (elf32-h8300.lo): New target.
2393 * config.bfd (h8300*-*-elf): New case.
2394 * configure.in (bfd_elf32_h8300_vec): New case.
2395 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2396 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2397 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2398 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2399 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2400 * elf32-h8300.c: New file.
2401 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2402
2403 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2404
2405 * sparclynx.c: Add missing prototypes.
2406 * coff-mcore.c: Add missing prototypes.
2407 * elf32-pj.c: Add missing prototypes.
2408 * nlm32-sparc.c: Add missing prototypes.
2409 * oasys.c: Add missing prototypes.
2410 * pdp11.c: Add missing prototypes.
2411 * pe-mips.c: Add missing prototypes.
2412 * riscix.c: Add missing prototypes.
2413
2414 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2415
2416 * elf32-i386.c: Add missing prototypes.
2417 * elf32-ppc.c: Likewise.
2418 * elf32-sh-lin.c: Likewise.
2419 * elfarm-nabi.c: Likewise.
2420
2421 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2422
2423 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2424 (elf_i386_grok_psinfo): New function.
2425 (elf_backend_grok_prstatus): Define.
2426 (elf_backend_grok_psinfo): Likewise.
2427 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2428 (ppc_elf_grok_psinfo): New function.
2429 (elf_backend_grok_prstatus): Define.
2430 (elf_backend_grok_psinfo): Likewise.
2431 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2432 (elf32_shlin_grok_psinfo): New function.
2433 (elf_backend_grok_prstatus): Define.
2434 (elf_backend_grok_psinfo): Likewise.
2435 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2436 (elf32_arm_nabi_grok_psinfo): New function.
2437 (elf_backend_grok_prstatus): Define.
2438 (elf_backend_grok_psinfo): Likewise.
2439
2440 2001-08-27 H.J. Lu <hjl@gnu.org>
2441
2442 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2443 sanity check.
2444 (mips_elf_calculate_relocation): Create dynamic relocation for
2445 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2446 bit is not set.
2447
2448 2001-08-27 H.J. Lu <hjl@gnu.org>
2449
2450 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2451 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2452 (_bfd_elf32_mips_grok_prstatus): Likewise.
2453 (_bfd_elf32_mips_grok_psinfo): Likewise.
2454 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2455 `struct mips_elf_link_hash_entry *'.
2456 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2457
2458 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2459
2460 * mipsbsd.c: Add missing prototypes.
2461 * hp300hpux.c: Add missing prototypes.
2462 * i386aout.c: Add missing prototypes.
2463 * i386lynx.c: Add missing prototypes.
2464 * i386mach3.c: Add missing prototypes.
2465 * i386msdos.c: Add missing prototypes.
2466 * i386os9k.c: Add missing prototypes.
2467
2468 2001-08-27 Linus Nordberg <linus@swox.se>
2469 Torbjorn Granlund <tege@swox.com>
2470 Staffan Ulfberg <staffanu@swox.se>
2471 Alan Modra <amodra@bigpond.net.au>
2472
2473 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2474 targ64_selvecs for 32 bit powerpc targets.
2475 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2476 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2477 Run "make dep-am".
2478 * Makefile.in: Regenerate.
2479 * configure.in: Add elf64_powerpc vecs.
2480 * configure: Regenerate.
2481 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2482 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2483 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2484 * elf64-ppc.c: New file.
2485 * reloc.c: Add powerpc64 relocs.
2486 * libbfd.h: Regenerate.
2487 * bfd-in2.h: Regenerate.
2488
2489 2001-08-27 Andreas Schwab <schwab@suse.de>
2490
2491 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2492 reloc is against read-only section.
2493 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2494 looking up section names for DT_TEXTREL.
2495 (elf32_m68k_reloc_type_class): New function.
2496 (elf_backend_reloc_type_class): Define.
2497
2498 2001-08-27 Andreas Jaeger <aj@suse.de>
2499
2500 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2501 reloc is against read-only section.
2502 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2503 looking up section names for DT_TEXTREL.
2504 (elf_s390_reloc_type_class): New.
2505 (elf_backend_reloc_type_class): Define.
2506
2507 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2508 reloc is against read-only section.
2509 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2510 looking up section names for DT_TEXTREL.
2511 (elf_s390_reloc_type_class): New.
2512 (elf_backend_reloc_type_class): Define.
2513
2514 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2515 is against read-only section.
2516 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2517 looking up section names for DT_TEXTREL.
2518 (ppc_elf_reloc_type_class): New.
2519 (elf_backend_reloc_type_class): Define.
2520
2521 2001-08-26 Andreas Jaeger <aj@suse.de>
2522
2523 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2524 reloc is against read-only section.
2525 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2526 looking up section names for DT_TEXTREL.
2527 (elf_cris_reloc_type_class): New.
2528 (elf_backend_reloc_type_class): Define.
2529
2530 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2531 against read-only section.
2532 (elf_backend_reloc_type_class): Define.
2533 (sh_elf_reloc_type_class): New.
2534 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2535 looking up section names for DT_TEXTREL.
2536
2537 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2538 reloc is against read-only section.
2539 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2540 looking up section names for DT_TEXTREL.
2541 (elf32_arm_reloc_type_class): New.
2542 (elf_backend_reloc_type_class): Define.
2543
2544 2001-08-25 Andreas Jaeger <aj@suse.de>
2545
2546 * oasys.c: Add missing prototypes.
2547
2548 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2549 attribute for parameter.
2550 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2551
2552 * versados.c (get_4): Make static.
2553 (get_10): Make static.
2554 Add missing prototypes.
2555 (process_esd): Fix call to versados_new_symbol.
2556
2557 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2558
2559 * coff-a29k.c: Add missing prototypes.
2560 * coff-apollo.c: Add missing prototypes.
2561 * coff-arm.c: Add missing prototypes.
2562 * coff-i860.c: Add missing prototypes.
2563 * coff-rs6000.c: Add missing prototypes.
2564 * coff-tic80.c: Add missing prototypes.
2565 * elf-m10200.c: Add missing prototypes.
2566 * elf-m10300.c: Add missing prototypes.
2567 * elf32-arm.h: Add missing prototypes.
2568 * elf32-d10v.c: Add missing prototypes.
2569 * elf32-m32r.c: Add missing prototypes.
2570 * elf32-mcore.c: Add missing prototypes.
2571 * elf32-openrisc.c: Add missing prototypes.
2572 * elf32-sh.c: Add missing prototypes.
2573 * elf32-sparc.c: Add missing prototypes.
2574 * elf32-v850.c: Add missing prototypes.
2575 * elfarm-nabi.c: Add missing prototypes.
2576 * elfarm-oabi.c: Add missing prototypes.
2577
2578 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2579
2580 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2581 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2582
2583 2001-08-24 H.J. Lu <hjl@gnu.org>
2584
2585 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2586 hash structure.
2587
2588 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2589
2590 * elf-bfd.h (elf_hash_table): Revert definition.
2591 (is_elf_hash_table): New macro.
2592 * elflink.h (elf_link_add_object_symbols): Test
2593 is_elf_hash_table before accessing ELF only fields in hash
2594 structure.
2595 (elf_link_create_dynamic_sections): Fail if not using an ELF
2596 hash structure.
2597 (elf_add_dynamic_entry): Fail if not using an ELF hash
2598 structure.
2599 (elf_link_record_local_dynamic_symbol): Fail if not using an
2600 ELF hash structure.
2601 (size_dynamic_sections): Fail if not using an ELF hash
2602 structure.
2603 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2604 hash structure.
2605 (elf_bfd_final_link): Fail if not using an ELF hash
2606 structure.
2607
2608 2001-08-24 H.J. Lu <hjl@gnu.org>
2609
2610 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2611 table is not an ELF linker hash table.
2612
2613 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2614 table type to bfd_link_elf_hash_table.
2615
2616 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2617 the last change.
2618
2619 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2620 table type to bfd_link_generic_hash_table.
2621
2622 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2623
2624 * bfd.c (bfd_alt_mach_code): New function.
2625 * bfd-in2.h: Rebuilt.
2626
2627 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2628
2629 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2630 `type' field in the hash entry when deciding whether to follow a
2631 link.
2632
2633 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2634
2635 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2636 last.
2637 (elf_link_sort_relocs): Adjust accordingly.
2638
2639 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2640 (elf64_alpha_check_relocs): Set it if section this reloc is against
2641 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2642 read-only section.
2643 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2644 is is against read-only section.
2645 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2646 check section names.
2647 (elf64_alpha_reloc_type_class): New.
2648 (elf_backend_reloc_type_class): Define.
2649
2650 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2651
2652 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2653 by bfd_malloc().
2654
2655 2001-08-23 Andreas Jaeger <aj@suse.de>
2656
2657 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2658 the reloc is against read-only section.
2659 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2660 of looking up section names for DT_TEXTREL.
2661 (elf64_x86_64_reloc_type_class): New.
2662 (elf_backend_reloc_type_class): Define.
2663
2664 2001-08-23 H.J. Lu <hjl@gnu.org>
2665
2666 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2667 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2668
2669 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2670 bfd_print_symbol_vandf.
2671 * coffgen.c (coff_print_symbol): Likewise.
2672 * elf.c (bfd_elf_print_symbol): Likewise.
2673 * ieee.c (ieee_print_symbol): Likewise.
2674 * nlmcode.h (nlm_print_symbol): Likewise.
2675 * oasys.c (oasys_print_symbol): Likewise.
2676 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2677 * som.c (som_print_symbol): Likewise.
2678 * srec.c (srec_print_symbol): Likewise.
2679 * tekhex.c (tekhex_print_symbol): Likewise.
2680 * versados.c (versados_print_symbol): Likewise.
2681 * vms.c (vms_print_symbol): Likewise.
2682
2683 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2684 with bfd_fprintf_vma.
2685 (bfd_elf_print_symbol): Likewise.
2686 * syms.c (bfd_print_symbol_vandf): Likewise.
2687
2688 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2689
2690 * aoutf1.h (sunos_write_object_contents): Silence compile time
2691 warning.
2692 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2693
2694 * bout.c: Add missing function prototypes. Fix formatting.
2695 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2696 * coff-w65.c: Add missing function prototypes. Fix formatting.
2697 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2698 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2699 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2700 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2701 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2702 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2703 * coff-sh.c: Add missing function prototypes. Fix formatting.
2704
2705 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2706
2707 * elf-bfd.h (enum elf_reloc_type_class): New.
2708 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2709 (_bfd_elf_reloc_type_class): New.
2710 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2711 (elfNN_bed): Add elf_backend_reloc_type_class.
2712 * elf.c (_bfd_elf_reloc_type_class): New.
2713 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2714 is against read-only section.
2715 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2716 looking up section names for DT_TEXTREL.
2717 (elf_i386_reloc_type_class): New.
2718 (elf_backend_reloc_type_class): Define.
2719 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2720 reloc is against read-only section.
2721 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2722 looking up section names for DT_TEXTREL.
2723 (elf32_sparc_reloc_type_class): New.
2724 (elf_backend_reloc_type_class): Define.
2725 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2726 reloc is against read-only section.
2727 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2728 looking up section names for DT_TEXTREL.
2729 (sparc64_elf_reloc_type_class): New.
2730 (elf_backend_reloc_type_class): Define.
2731 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2732 (elfNN_ia64_hash_table_create): Clear ia64_info.
2733 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2734 section.
2735 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2736 instead of looking up section names for DT_TEXTREL.
2737 (elfNN_ia64_reloc_type_class): New.
2738 (elf_backend_reloc_type_class): Define.
2739 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2740 (struct elf_link_sort_rela): New.
2741 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2742 (elf_bfd_final_link): Call elf_link_sort_relocs.
2743 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2744 necessary.
2745
2746 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2747
2748 * configure.in (x86-bsdi): No corefile support.
2749 * configure: Regenerate.
2750
2751 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2752
2753 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2754 comma.
2755
2756 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2757
2758 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2759 the alignment of dwarf2 linkonce sections to 0.
2760 * coff-sto32.c: Likewise.
2761
2762 2001-08-20 Andreas Jaeger <aj@suse.de>
2763
2764 * coff-sparc.c: Add missing prototypes.
2765 * elf32-s390.c: Likewise.
2766 * elf32-i960.c: Likewise.
2767 * aout-target.h: Likewise.
2768
2769 2001-08-20 H.J. Lu <hjl@gnu.org>
2770
2771 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2772 (elf_num_section_syms): New for num_section_syms.
2773
2774 * elf.c (elf_map_symbols): Set num_section_syms.
2775 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2776 the section symbol index.
2777
2778 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2779
2780 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2781 select the generic has table creator. All elf backends need elf
2782 specific fields in the hash table.
2783
2784 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2785
2786 * archive.c (offsetof): Remove define.
2787 * elf.c: Likewise.
2788 * oasys.c: Likewise
2789 * sysdep.h (offsetof): Define.
2790
2791 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2792
2793 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2794 (bfd_set_gp_size): Make param unsigned.
2795 * bfd-in2.h: Regenerate.
2796 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2797 than calling bfd_get_gp_size.
2798 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2799 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2800
2801 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2802
2803 * linker.c (default_fill_link_order): Handle four byte fill value.
2804
2805 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2806
2807 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2808 prototype.
2809 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2810
2811 * elf64-mips.c (UNUSED_RELOC): Define.
2812 (mips_elf64_howto_table_rel): Use it.
2813 (mips_elf64_howto_table_rela): Here too.
2814 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2815
2816 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2817 silence warning.
2818 * coffgen.c (coff_print_symbol): Fix warnings.
2819 (coff_find_nearest_line): Likewise.
2820 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2821 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2822 * format.c (bfd_check_format_matches): Likewise.
2823 (bfd_set_format): Likewise.
2824 * coff-ia64.c: Add missing prototypes.
2825 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2826 signed to silence warnings.
2827 (elf64_alpha_relocate_section): Likewise.
2828 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2829 (elf64_alpha_add_symbol_hook): Likewise.
2830 (elf64_alpha_final_link): Likewise.
2831 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2832 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2833 (elf64_alpha_size_got_sections): Likewise.
2834 * elfxx-ia64.c: Add missing prototypes.
2835 (elfNN_ia64_relocate_section): Fix warning.
2836 (elfNN_ia64_unwind_entry_compare): Make params const.
2837
2838 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2839
2840 * config.bfd (targ64_selvecs): New.
2841 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2842
2843 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2844 (BFD_DEFAULT_TARGET_SIZE): New.
2845 (BFD_ARCH_SIZE): Comment.
2846 * configure.in (target_size): New. Set instead of target64 in
2847 selvecs case statement. Set target64 from it.
2848 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2849 * bfd-in2.h: Regenerate.
2850 * configure: Regenerate.
2851
2852 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2853
2854 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2855 (bfd_errmsgs): Add corresponding message.
2856 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2857 finding an archive that contains different format object files.
2858 Return bfd_error_wrong_object_format for this case.
2859 * format.c: Formatting fixes. s/CONST/const/.
2860 (bfd_check_format_matches): Accept archives that give
2861 bfd_error_wrong_object_format if no full match is found. Tidy
2862 code handling matching_vector. Don't return a pointer to freed
2863 memory in `matching'. Handle ambiguous matches as for partial
2864 archive matches.
2865 * bfd-in2.h: Regenerate.
2866
2867 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2868
2869 * libieee.h (common_header_type): Add last_byte field.
2870
2871 * ieee.c: Add missing prototypes. Some format fixes.
2872 (struct output_buffer_struct): Move for availability to prototypes.
2873 (ieee_part_after): New function.
2874 (ieee_slurp_debug): Use it here.
2875 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2876 ieee_part_after to set last_byte to one past end of current part.
2877 Update callers.
2878 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2879 Update callers.
2880 (parse_expression): Don't go beyond the end of the current part.
2881 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2882 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2883 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2884 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2885 ieee_set_section_contents, ieee_write_object_contents,
2886 ieee_make_empty_symbol): Make static.
2887 (ieee_archive_p): Correct comments regarding bfd_read.
2888 (ieee_object_p): Similarly.
2889 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2890 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2891 input_bfd, output_bfd, output_buffer.
2892 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2893 do_with_relocs, ie. as a symbol for relocatable files.
2894 (ieee_vec): Add comments showing functions referenced by macros.
2895
2896 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2897
2898 * aout-tic30.c: Add missing prototypes. Fix formatting.
2899 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2900 * peXXigen.c: Add missining prototypes. Fix formatting.
2901 * aout-adobe.c: Add missining prototypes. Fix formatting.
2902
2903 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2904
2905 * elf32-v850.c: Add missing function prototypes.
2906 Fix some formatting.
2907
2908 * cpu-v850.c: Add missing function prototype.
2909 Fix some formatting.
2910
2911 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2912
2913 * elf-bfd.h (struct elf_backend_data): Add new fields
2914 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2915 (bfd_elf_sprintf_vma): Rename function prototype to
2916 '_bfd_elf_sprintf_vma'.
2917 (bfd_elf_fprintf_vma): Rename function prototype to
2918 '_bfd_elf_fprintf_vma'.
2919 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2920 directly, instead indirect via the elf_backend_data structure.
2921 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2922 instead indirect via the elf_backend_data structure.
2923 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2924 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2925 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2926 already defined.
2927 (elf_backend_fprintf_vma): Initialise if not already defined.
2928 (struct elf_backend_data): Initialise the
2929 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2930
2931 2001-08-10 Andreas Jaeger <aj@suse.de>
2932
2933 * elf64-sparc.c: Add missing prototypes.
2934 * elf32-cris.c: Likewise.
2935 * elf32-i370.c: Likewise.
2936 * elf64-hppa.c: Likewise.
2937 * elf64-s390.c: Likewise.
2938
2939 2001-08-10 Andreas Jaeger <aj@suse.de>
2940
2941 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2942 Add prototypes where needed.
2943
2944 2001-08-10 H.J. Lu <hjl@gnu.org>
2945
2946 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2947 (bfd_fprintf_vma): Likewise.
2948
2949 2001-08-10 H.J. Lu <hjl@gnu.org>
2950
2951 * bfd.c (bfd_sprintf_vma): Don't return void.
2952 (bfd_fprintf_vma): Likewise.
2953
2954 2001-08-10 Andreas Jaeger <aj@suse.de>
2955
2956 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2957 to build warnings.
2958 * configure: Regenerate.
2959
2960 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2961
2962 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2963 warning if not BFD64. Add braces so emacs auto format works.
2964 (bfd_elf_fprintf_vma): Likewise.
2965
2966 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2967 of _xcoff_swap_ld*.
2968 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2969 param to agree with libxcoff.h.
2970 (xcoff_swap_ldhdr_out): Likewise.
2971 (xcoff_swap_ldsym_in): Likewise.
2972 (xcoff_swap_ldsym_out): Likewise.
2973 (xcoff_swap_ldrel_in): Likewise.
2974 (xcoff_swap_ldrel_out): Likewise.
2975 (xcoff_create_csect_from_smclas): Likewise.
2976 * coff64-rs6000.c: Add missing prototypes.
2977 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2978 with libxcoff.h.
2979 (xcoff64_swap_ldhdr_out): Likewise.
2980 (xcoff64_swap_ldsym_in): Likewise.
2981 (xcoff64_swap_ldsym_out): Likewise.
2982 (xcoff64_swap_ldrel_in): Likewise.
2983 (xcoff64_swap_ldrel_out): Likewise.
2984 (xcoff64_ppc_relocate_section): Make static.
2985 (xcoff64_slurp_armap): Likewise.
2986 (xcoff64_archive_p): Likewise.
2987 (xcoff64_openr_next_archived_file): Likewise.
2988 (xcoff64_sizeof_headers): Likewise.
2989 (xcoff64_is_lineno_count_overflow): Likewise.
2990 (xcoff64_is_reloc_count_overflow): Likewise.
2991 (xcoff64_loader_symbol_offset): Likewise.
2992 (xcoff64_loader_reloc_offset): Likewise.
2993 * elf64-gen.c: Add missing prototypes.
2994
2995 2001-08-09 H.J. Lu <hjl@gnu.org>
2996
2997 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2998 (bfd_elf_fprintf_vma): Likewise.
2999
3000 2001-08-09 H.J. Lu <hjl@gnu.org>
3001
3002 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3003 to ...
3004 * elf-bfd.h: Here.
3005 * bfd-in2.h: Regenerated.
3006
3007 2001-08-09 H.J. Lu <hjl@gnu.org>
3008
3009 * bfd-in.h (bfd_sprintf_vma): New prototype.
3010 (bfd_fprintf_vma): Likewise.
3011 (bfd_elf_sprintf_vma): Likewise.
3012 (bfd_elf_fprintf_vma): Likewise.
3013 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3014 * bfd-in2.h: Regenerated.
3015
3016 * bfd.c (bfd_sprintf_vma): New. Defined.
3017 (bfd_fprintf_vma): Likewise.
3018
3019 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3020 (bfd_elf_fprintf_vma): Likewise.
3021
3022 2001-08-09 Alan Modra <amodra@bigpond.net.au>
3023
3024 * coff-rs6000.c: Add missing prototypes.
3025 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3026 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3027 xcoff_loader_reloc_offset): Make static.
3028 * dwarf1.c: Add missing prototypes.
3029 * dwarf2.c: Add missing prototypes.
3030 (struct abbrev_info): Move definition.
3031 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3032 * elf.c: Add missing prototypes.
3033 * elf32-gen.c: Likewise.
3034 * elf32-i386.c: Likewise.
3035 * elf32-ppc.c: Likewise.
3036 (ppc_elf_sort_rela): Use PTR instead of "void *".
3037 * elflink.h: Add missing prototypes. Formatting fixes.
3038 * merge.c: Add missing prototypes.
3039 (last4_eq): Use PTR instead of "void *".
3040 (last_eq): Likewise.
3041 * syms.c: Add missing prototypes.
3042
3043 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3044
3045 * bfd.c: Fix formatting.
3046 * bfd-in2.h: Regenerate.
3047
3048 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3049
3050 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3051 true (this target uses REL relocations) and 'pcrel_offset' to
3052 false (the PC is implied, not stored in the offset).
3053
3054 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3055
3056 1999-10-19 Linus Nordberg <linus@swox.se>
3057 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3058 * elfxx-target.h (elf_backend_want_got_sym): Define.
3059 (elfNN_bed): Add elf_backend_want_got_sym.
3060 * elflink.c (_bfd_elf_create_got_section): Define
3061 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3062
3063 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3064
3065 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3066 (find_rela_addend): New function.
3067 (parse_comp_unit): Call it to find the abbrev offset addend.
3068 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3069 members of dwarf2_debug as debugging information is read.
3070
3071 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3072
3073 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3074 targets as well as sh-pe.
3075
3076 2001-08-03 Ben Harris <bjh21@netbsd.org>
3077
3078 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3079 reloc from start of section when computing value for R_ARM_REL32
3080 reloc.
3081
3082 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3083
3084 From H.J. Lu <hjl@gnu.org>
3085 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3086 keep relocs for undefined syms if there are no dynamic sections in
3087 executable.
3088 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3089
3090 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3091
3092 * cofflink.c (coff_link_check_ar_symbols): also search for
3093 __imp__symbol as well as _symbol.
3094 * linker.c (_bfd_generic_link_add_archive_symbols): also
3095 search for __imp__symbol as well as _symbol.
3096
3097 2001-08-01 Adam Nemet <anemet@lnxw.com>
3098
3099 * elf.c (elf_sort_sections): Return zero only as the last step.
3100
3101 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3102
3103 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3104 ARM_COFF_BUGFIX.
3105 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3106 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3107 ARM_COFF_BUGFIX.
3108
3109 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3110
3111 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3112 to match corresponding bfd_coff_backend data member.
3113
3114 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3115
3116 * Makefile.am: Update dependencies with "make dep-am".
3117 * Makefile.in: Regenerate
3118
3119 2001-07-15 H.J. Lu <hjl@gnu.org>
3120
3121 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3122 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3123 * Makefile.in: Regenerate.
3124
3125 2001-07-11 H.J. Lu <hjl@gnu.org>
3126
3127 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3128 flags when creating the reloc section if the ALLOC flag in the
3129 source section is set.
3130
3131 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3132
3133 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3134 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3135 * bfd-in2.h: Regenerate.
3136 * libbfd.h: Regenerate.
3137 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3138 new relocations.
3139 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3140 (elfNN_ia64_check_relocs): Likewise.
3141 (elfNN_ia64_install_value): Likewise.
3142 (elfNN_ia64_relocate_section): Likewise.
3143
3144 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3145
3146 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3147 R_SPARC_UA64.
3148 (elf32_sparc_check_relocs): Likewise.
3149 Only create .rela section for alloced sections in shared libraries.
3150 (elf32_sparc_relocate_section): Likewise.
3151 Remove redundant check.
3152 Optimize unaligned reloc usage.
3153 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3154 check.
3155
3156 2001-07-11 H.J. Lu <hjl@gnu.org>
3157
3158 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3159 ALLOC|LOAD flags as the source section for debugging sections
3160 when creating the reloc section.
3161
3162 2001-07-05 Jim Wilson <wilson@redhat.com>
3163
3164 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3165 the section of the bigger symbol.
3166
3167 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3168
3169 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3170
3171 * peicode.h (coff_swap_scnhdr_in): For sections containing
3172 uninitialised data, only set their size to s_paddr if this does
3173 not reset their size to zero. MS's latest compilers will set
3174 s_paddr to zero.
3175
3176 2001-07-04 H.J. Lu <hjl@gnu.org>
3177
3178 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3179 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3180 bfd_mach_mips5000.
3181
3182 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3183
3184 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3185
3186 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3187 sections being discarded.
3188
3189 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3190
3191 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3192 instead of _bfd_elfcore_section_from_phdr.
3193 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3194 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3195 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3196 (elfcore_grok_prstatus): Likewise.
3197 (elfcore_grok_lwpstatus): Likewise.
3198 (bfd_get_elf_phdr_upper_bound): Likewise.
3199 (elfcore_make_note_pseudosection): Formatting.
3200 (_bfd_elfcore_strndup): Formatting.
3201 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3202 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3203
3204 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3205
3206 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3207 and _bfd_elfcore_strndup.
3208 (struct elf_backend_data): Add elf_backend_grok_prstatus
3209 and elf_backend_grok_psinfo.
3210 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3211 (elfcore_grok_prstatus): Use it.
3212 (elfcore_make_note_pseudosection): Likewise.
3213 (elfcore_strndup): Rename to...
3214 (_bfd_elfcore_strndup): Here, and make global.
3215 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3216 (elfcore_grok_note): Call elf_backend_grok_prstatus
3217 and elf_backend_grok_psinfo if available.
3218 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3219 (_bfd_elf32_mips_grok_psinfo): New function.
3220 (elf_backend_grok_prstatus): Define.
3221 (elf_backend_grok_psinfo): Define.
3222 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3223 (elf_backend_grok_psinfo): Likewise.
3224 (elfNN_bed): Include elf_backend_grok_prstatus and
3225 elf_backend_grok_psinfo.
3226
3227 2001-06-29 H.J. Lu <hjl@gnu.org>
3228
3229 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3230 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3231 is NULL before filling PLT.
3232
3233 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3234
3235 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3236
3237 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3238
3239 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3240 here..
3241 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3242 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3243 after gc has run.
3244
3245 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3246 (IS_ABSOLUTE_RELOC): Define.
3247 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3248 (hppa_link_hash_newfunc): Always init it.
3249 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3250 create COPY relocs only when the reloc is in a read-only section.
3251 Instead, allocate space for a dynamic reloc to reference the
3252 library symbol directly. Keep track of space we allocate using
3253 relocs_entries.
3254 (hppa_discard_copies): Delete, and move code to..
3255 (allocate_plt_and_got): ..here. Rename to
3256 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3257 relocs for non-shared link.
3258 (elf32_hppa_size_dynamic_sections): Update calls to above.
3259 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3260 in lieu of COPY relocs.
3261
3262 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3263 here..
3264 (elf_i386_adjust_dynamic_symbol): ..nor here..
3265 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3266 after gc has run.
3267 (elf_i386_size_dynamic_sections): Fix a comment.
3268 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3269 involved in writing reloc out.
3270
3271 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3272
3273 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3274 Ensure syms are dynamic if we might be emitting a reloc.
3275 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3276 for undefweak or undefined syms..
3277 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3278
3279 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3280 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3281 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3282 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3283
3284 2001-06-24 H.J. Lu <hjl@gnu.org>
3285
3286 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3287 strncasecmp/strcasecmp instead of strncmp/strcmp.
3288
3289 2001-06-23 H.J. Lu <hjl@gnu.org>
3290
3291 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3292 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3293 in the regular object file and treat the weak definition as
3294 the normal one.
3295
3296 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3297
3298 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3299 unresolved_reloc test to exclude cases where we use "relocation"
3300 before setting it to point into the .got. Reinstate fudge for
3301 unresolved relocs in debugging sections.
3302
3303 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3304 complicated tests for unresolvable relocs with a simple direct
3305 scheme using "unresolved_reloc" var.
3306
3307 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3308 elf_i386_dyn_relocs. Update comment.
3309 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3310 dyn_relocs.
3311 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3312 others to aborts.
3313 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3314 abort.
3315 (elf_i386_size_dynamic_sections): Likewise.
3316 (elf_i386_finish_dynamic_symbol): Likewise.
3317 (elf_i386_finish_dynamic_sections): Likewise.
3318 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3319 handling code.
3320
3321 Avoid creating COPY relocs if possible.
3322 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3323 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3324 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3325 reloc is in a read-only section. Instead, allocate space for a
3326 dynamic reloc to reference the library symbol directly. Keep
3327 track of space we allocate using pcrel_relocs_copied.
3328 (discard_copies): Delete, and move code to ..
3329 (allocate_plt_and_got): ..here. Rename to
3330 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3331 relocs for non-shared link.
3332 (elf_i386_size_dynamic_sections): Update calls to above functions.
3333 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3334 more ugly logic to avoid "unresolvable relocation" error. Use
3335 htab shortcut in place of elf_hash_table macro.
3336 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3337 not always be created now.
3338
3339 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3340
3341 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3342 shared libraries.
3343
3344 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3345
3346 * configure.host (mips64-*-linux): Reformat.
3347
3348 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3349
3350 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3351 allocate local .got space. Use shortcuts from hash table for .got
3352 and .plt rather than comparing section names.
3353 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3354 adjusting index into local_got_refcounts to document what we are
3355 really doing.
3356 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3357 Tidy .got and .plt error checking.
3358
3359 2001-06-20 Catherine Moore <clm@redhat.com>
3360
3361 * elf-bfd.h (struct elf_backend_data):
3362 elf_backend_emit_relocs: New field: Function for emitting
3363 relocs.
3364 elf_backend_count_relocs: New field: Function for determining
3365 the number of relocs to be emitted.
3366 * elfxx-target.h: Provide default (NULL) values for
3367 elf_backend_emit_relocs and elf_backend_count_relocs.
3368 * elflink.h (elf_link_size_reloc_section): Make the hash table
3369 big enough to hold the relocs counted by either reloc_count or
3370 o->reloc_count.
3371 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3372 should be emitted, either because of a command line option
3373 stored in the info structure or because the target provides a
3374 special reloc emitting function.
3375 If the target provides a reloc counting function use it,
3376 unless performing a relocatable link or emitting all relocs.
3377 Also set the SEC_RELOC flag on any output section which will
3378 contain relocs.
3379 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3380 should be emitted, either because of a command line option
3381 stored in the info structure or because the target provides a
3382 special reloc emitting function.
3383 If the target provides a reloc emitting function, use it,
3384 unless performing a relocatable link or emitting all relocs.
3385
3386 2001-06-20 H.J. Lu <hjl@gnu.org>
3387
3388 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3389 allocate local .got space.
3390
3391 2001-06-19 Andreas Jaeger <aj@suse.de>
3392
3393 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3394 dynamic symbols.
3395
3396 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3397
3398 * elflink.h (struct elf_assign_sym_version_info): Remove member
3399 export_dynamic. All users changed to use info member.
3400 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3401 export_dynamic, instead use member in parameter info.
3402 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3403 bfd_elf64_size_dynamic_sections): Update prototype.
3404 * bfd-in2.h: Regenerate.
3405
3406 2001-06-18 H.J. Lu <hjl@gnu.org>
3407
3408 * elflink.h (elf_info_failed): Add a new field, verdefs.
3409 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3410 elf_export_symbol.
3411 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3412 should be exported.
3413
3414 2001-06-17 H.J. Lu <hjl@gnu.org>
3415
3416 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3417 readonly_reloc, to record if a relocation in the .rel.dyn
3418 section is against a read-only section.
3419 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3420 field to false.
3421 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3422 in the .rel.dyn section against a read-only section by setting
3423 DF_TEXTREL or readonly_reloc.
3424 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3425 it is true.
3426 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3427 there is a relocation in the .rel.dyn section against a
3428 read-only section.
3429 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3430 DF_TEXTREL is set.
3431
3432 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3433
3434 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3435 function. Move flagword result into parameter list. Remove
3436 comment about setting bfd_error_handler to intercept failure
3437 results.
3438 * coffgen.c (make_a_section_from_file): Examine result of
3439 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3440 caller.
3441 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3442 function. Move flagword result into parameter list.
3443 * libcoff.h: Regenerate.
3444 * libecoff.h: Regenerate.
3445
3446 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3447
3448 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3449 section is going to follow it.
3450
3451 2001-06-12 Catherine Moore <clm@redhat.com>
3452
3453 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3454 with the file_align entry from elf_backend_data.
3455 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3456 (elf_gc_record_vtentry): Likewise.
3457
3458 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3459
3460 * elflink.h: Whitespace changes.
3461 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3462 rather than "unsigned char".
3463 (elf_link_output_relocs): Likewise.
3464 (elf_link_input_bfd): Likewise.
3465 (elf_reloc_link_order): LIkewise.
3466 * elf.c: s/CONST/const/. Whitespace changes.
3467 * elf32-mips.c: Formatting fix.
3468
3469 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3470 * Makefile.in: Regenerate.
3471 * po/Make-in: Remove trailing tab.
3472
3473 2001-06-09 Philip Blundell <philb@gnu.org>
3474
3475 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3476 change.
3477 (elf32_arm_plt_entry): Likewise.
3478
3479 2001-06-08 H.J. Lu <hjl@gnu.org>
3480
3481 * elf.c (swap_out_syms): Keep names for global section symbols.
3482
3483 2001-06-07 H.J. Lu <hjl@gnu.org>
3484
3485 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3486 MIPS-based machines need it.
3487
3488 2001-06-07 H.J. Lu <hjl@gnu.org>
3489
3490 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3491 for SGI only.
3492
3493 * config.bfd: Remove ecoff from Linux/mips.
3494
3495 2001-06-07 Andreas Jaeger <aj@suse.de>
3496
3497 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3498 assertion.
3499 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3500 alignment of 8 for .rela sections; handle further relocations.
3501
3502 2001-06-06 Christian Groessler <cpg@aladdin.de>
3503
3504 * coff-z8k.c: Fix formatting.
3505 Fix howtos: howto->size was always 1.
3506
3507 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3508
3509 * configure.host (mips64*-*-linux*): Define.
3510
3511 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3512
3513 * elf32-i386.c (elf_i386_discard_copies): Rename to
3514 discard_copies, and use elf_link_hash_entry arg rather than
3515 elf_i386_link_hash_entry.
3516 (elf_i386_link_hash_traverse): Delete.
3517 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3518 Tidy sizing of dynamic sections.
3519 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3520 possible .plt entries.
3521 (elf_i386_gc_sweep_hook): Likewise.
3522 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3523 everything with plt.refcount <= 0.
3524
3525 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3526 .relgot space here.
3527 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3528 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3529 .rel.plt here..
3530 (allocate_plt_and_got): ..instead do it all here. New function.
3531 (elf_i386_size_dynamic_sections): Allocate local .got space and
3532 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3533 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3534 rather than gc variety).
3535 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3536 (elf_i386_relocate_section): Use it here and correct handling of
3537 R_386_GOT32. Provide section and offset for "unresolvable
3538 relocation" error message.
3539 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3540
3541 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3542 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3543 (elf_i386_link_hash_table_create): Init them.
3544 (create_got_section): New function.
3545 (elf_i386_create_dynamic_sections): New function.
3546 (elf_backend_create_dynamic_sections): Set to above.
3547 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3548 calling bfd_get_section_by_name.
3549 (elf_i386_gc_sweep_hook): Likewise.
3550 (elf_i386_adjust_dynamic_symbol): Likewise.
3551 (elf_i386_size_dynamic_sections): Likewise.
3552 (elf_i386_relocate_section): Likewise.
3553 (elf_i386_finish_dynamic_sections): Likewise.
3554
3555 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3556
3557 2001-06-02 H.J. Lu <hjl@gnu.org>
3558
3559 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3560 and ELFOSABI_HPUX.
3561 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3562
3563 2001-06-02 H.J. Lu <hjl@gnu.org>
3564
3565 * aout-cris.c (MACHTYPE_OK): New. Defined.
3566
3567 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3568
3569 * section.c (_bfd_strip_section_from_output): Handle NULL
3570 output_section.
3571
3572 2001-06-02 H.J. Lu <hjl@gnu.org>
3573
3574 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3575 rs6000coff64_vec only if BFD64 is defined.
3576 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3577
3578 2001-06-02 H.J. Lu <hjl@gnu.org>
3579
3580 * coff-ia64.c (ia64coff_object_p): Rewrite with
3581 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3582
3583 2001-06-01 Andreas Jaeger <aj@suse.de>
3584
3585 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3586 relocation, small reformatting.
3587
3588 2001-05-29 Andreas Jaeger <aj@suse.de>
3589
3590 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3591 (elf64_x86_64_relocate_section): Likewise.
3592
3593 2001-05-30 Alan Modra <amodra@one.net.au>
3594
3595 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3596 millicode. Don't allocate .got and .rela.got space here..
3597 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3598 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3599 .rela.plt here..
3600 (hppa_handle_PIC_calls): ..nor here..
3601 (allocate_plt_and_got): ..instead do it all here. New function.
3602 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3603 call allocate_plt_and_got. No need to zap .got if not dynamic.
3604 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3605 gc_common_final_link.
3606 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3607 (elf32_hppa_relocate_section): Use it here.
3608 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3609 dynamic_sections_created.
3610 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3611
3612 2001-05-28 Andreas Jaeger <aj@suse.de>
3613
3614 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3615 generic version since we want a hashsize of 4.
3616 (elf_backend_size_info): Likewise.
3617
3618 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3619
3620 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3621 a zeroing loop.
3622 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3623 (elf_link_input_bfd): Likewise.
3624 (elf_reloc_link_order): Likewise.
3625 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3626 relocations correctly.
3627
3628 2001-05-28 Nicolas Pitre <nico@cam.org>
3629
3630 * elf32-arm.h: fix PLT generation for big endian ARM
3631
3632 2001-05-28 Alan Modra <amodra@one.net.au>
3633
3634 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3635 for symbols forced local that need plabels.
3636 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3637 .plt.rela for local syms if non-shared.
3638 (hppa_build_one_stub): Mask lsb of plt.offset.
3639 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3640 (clobber_millicode_symbols): Correct comment.
3641 (elf32_hppa_relocate_section): Likewise.
3642 (elf32_hppa_finish_dynamic_symbol): Likewise.
3643
3644 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3645
3646 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3647 * bfd-in2.h: Regenerate.
3648 * libbfd.h: Regenerate.
3649 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3650 and BFD_RELOC_SPARC_UA64 mapping
3651 * elf64-sparc.c: Likewise.
3652
3653 2001-05-25 H.J. Lu <hjl@gnu.org>
3654
3655 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3656 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3657 (coff-rs6000.lo): Remove the old dependency.
3658 * Makefile.in: Rebuild.
3659
3660 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3661 coff-rs6000.lo.
3662
3663 2001-05-25 H.J. Lu <hjl@gnu.org>
3664
3665 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3666 rs6000coff_core_file_matches_executable_p,
3667 rs6000coff_core_file_failing_command and
3668 rs6000coff_core_file_failing_signal only if AIX_CORE is
3669 defined.
3670 (pmac_xcoff_vec): Likewise.
3671 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3672
3673 2001-05-25 Timothy Wall <twall@redhat.com>
3674
3675 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3676 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3677
3678 2001-05-25 H.J. Lu <hjl@gnu.org>
3679
3680 * bfd-in2.h: Regenerated.
3681 * libcoff.h: Likewise.
3682
3683 2001-05-25 Alan Modra <amodra@one.net.au>
3684
3685 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3686 undefined millicode syms in shared libs.
3687 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3688 (elf32_hppa_check_relocs): Likewise.
3689 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3690 (elf32_hppa_size_dynamic_sections): Likewise.
3691 (elf32_hppa_relocate_section): Likewise.
3692 (elf32_hppa_finish_dynamic_symbol): Likewise.
3693 (elf32_hppa_finish_dynamic_sections): Likewise.
3694
3695 2001-05-24 Tom Rix <trix@redhat.com>
3696
3697 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3698 xcoff-target.h not used to define rs6000 or ppc bfd.
3699 * Makefile.in same
3700
3701 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3702 to 64 bit.
3703
3704 * coff-rs6000.c : Many changes for 64 bit support. Move common
3705 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3706 and pmac_xcoff_vec
3707
3708 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3709 linker now supported. Explictly define the rs6000coff64_vec.
3710
3711 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3712 (coff_print_aux) same
3713 (coff_write_object_contents) same
3714 (coff_slurp_line_table) same
3715
3716 * coffgen.c : (coff_fix_symbol_name) formatting
3717 (coff_mangle_symbols) xcoff 64 bit support
3718 (coff_write_symbol) same
3719 (coff_write_alien_symbol) same
3720 (coff_write_native_symbol) same
3721 (coff_write_symbols) same
3722 (coff_get_symbol_info) same
3723 (bfd_coff_get_syment) same
3724 (coff_print_symbol) same
3725
3726 * config.bfd : add powerpc64-*-aix* target
3727
3728 * libcoff-in.h : formatting
3729
3730 * libcoff.h : move xcoff extern declarations to libxcoff.h
3731
3732 * libxcoff.h : New file
3733
3734 * xcofflink.c : Many changes for xcoff64 support. Move common
3735 structures to include/coff/xcoff.h. Move specific structure to
3736 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3737 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3738
3739 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3740 aix4.2+ -binitfini.
3741
3742 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3743
3744 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3745
3746 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3747 s/ENTIRES/ENTRIES/.
3748
3749 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3750
3751 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3752 * libbfd.h: Regenerate.
3753 * bfd-in2.h: Regenerate.
3754
3755 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3756 * archures.c (bfd_mach_mips12000): Define.
3757 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3758 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3759 support.
3760 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3761 * bfd-in2.h: Regenerate.
3762 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3763
3764 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3765
3766 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3767 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3768 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3769 that is used by GCC.
3770
3771 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3772
3773 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3774 of entries in a structured section.
3775 * elf.c: Use new macro.
3776 * elf32-i386.c: Use new macro.
3777 * elf32-mips.c: Use new macro.
3778 * elf64-alpha.c: Use new macro.
3779 * elf64-sparc.c: Use new macro.
3780 * elfcode.h: Use new macro.
3781 * elflink.h: Use new macro.
3782
3783 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3784
3785 * bfdint.texi: Replace -oformat with --oformat.
3786
3787 2001-05-21 Andreas Jaeger <aj@suse.de>
3788
3789 * dwarf2.c (decode_line_info): Fix error message.
3790 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3791 adjust error message.
3792
3793 2001-05-18 H.J. Lu <hjl@gnu.org>
3794
3795 * elflink.h (elf_link_add_object_symbols): Revert the last
3796 change.
3797
3798 2001-05-17 Alan Modra <amodra@one.net.au>
3799
3800 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3801 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3802 (hppa_build_one_stub): Add an assert to check plt.offset.
3803
3804 2001-05-17 H.J. Lu <hjl@gnu.org>
3805
3806 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3807 version definition to basename of the output filename.
3808
3809 2001-05-17 H.J. Lu <hjl@gnu.org>
3810
3811 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3812 basename of the bfd filename.
3813
3814 2001-05-16 Alan Modra <amodra@one.net.au>
3815
3816 * section.c (asection): Add linker_has_input field.
3817 (STD_SECTION): Adjust initialization to suit.
3818 * ecoff.c (bfd_debug_section): Likewise.
3819 * bfd-in2.h: Regenerate.
3820
3821 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3822
3823 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3824 negative 32-bit operands to 16 operands when the operand is
3825 going to be zero-extended by the modified opcode.
3826
3827 2001-05-12 Peter Targett <peter.targett@arccores.com>
3828
3829 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3830 name for 'arc5' core versions.
3831 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3832
3833 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3834 architecture.
3835 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3836
3837 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3838
3839 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3840 sections as well.
3841 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3842 to .gnu.linkonce.t.FOO text section.
3843
3844 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3845
3846 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3847 fields, change sec into secinfo.
3848 (struct sec_merge_info): Add chain, remove last fields.
3849 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3850 (sec_merge_hash_lookup): If lookup could not use a string only
3851 because it has bad alignment, mark the old string for deletion.
3852 (sec_merge_add): Add secinfo argument. Don't compute entry's
3853 position, instead record the section.
3854 (sec_merge_emit): Update for the sec into secinfo change in
3855 struct sec_merge_hash_entry.
3856 (_bfd_merge_section): Only record the section for merging, defer
3857 putting strings into the hash table.
3858 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3859 _bfd_merge_sections): New functions.
3860 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3861 changes.
3862 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3863 (_bfd_nolink_bfd_merge_sections): Define.
3864 * libbfd.h: Likewise.
3865 (bfd_generic_merge_sections): Add prototype.
3866 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3867 (struct bfd_target): Likewise.
3868 * bfd.c (bfd_merge_sections): Define.
3869 * bfd-in2.h: Rebuilt.
3870 * elf.c (_bfd_elf_merge_sections): New function.
3871 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3872 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3873 * reloc.c (bfd_generic_merge_sections): New function.
3874 * vms.c (vms_bfd_merge_sections): New function.
3875 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3876 * aout-target.h (MY_bfd_merge_sections): Define.
3877 * aout-tic30.c (MY_bfd_merge_sections): Define.
3878 * binary.c (binary_bfd_merge_sections): Define.
3879 * bout.c (b_out_bfd_merge_sections): Define.
3880 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3881 * coffcode.c (coff_bfd_merge_sections): Define.
3882 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3883 * i386msdos.c (msdos_bfd_merge_sections): Define.
3884 * i386os9k.c (os9k_bfd_merge_sections): Define.
3885 * ieee.c (ieee_bfd_merge_sections): Define.
3886 * ihex.c (ihex_bfd_merge_sections): Define.
3887 * nlm-target.h (nlm_bfd_merge_sections): Define.
3888 * oasys.c (oasys_bfd_merge_sections): Define.
3889 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3890 * som.c (som_bfd_merge_sections): Define.
3891 * srec.c (srec_bfd_merge_sections): Define.
3892 * tekhex.c (tekhex_bfd_merge_sections): Define.
3893 * versados.c (versados_bfd_merge_sections): Define.
3894 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3895
3896 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3897
3898 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3899 to be unsigned long, in order to match its use.
3900
3901 2001-05-10 H.J. Lu <hjl@gnu.org>
3902
3903 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3904 indirect symbols.
3905
3906 2001-05-09 H.J. Lu <hjl@gnu.org>
3907
3908 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3909 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3910 Remove the unused veriable `dynver'.
3911
3912 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3913
3914 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3915 NULL or is not COFF.
3916 (coff_i386_rtype_to_howto): Don't dump core if output section
3917 owner is not COFF.
3918
3919 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3920
3921 * ecoff.c (bfd_debug_section): Fix initialization.
3922 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3923 is always a positive integer. Cast away sign mismatch.
3924 * elf32-mips.c: Fix misleading comment and typo.
3925 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3926 correct data type.
3927 * elflink.c: Fix typo.
3928 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3929 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3930
3931 2001-05-04 Richard Henderson <rth@redhat.com>
3932
3933 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3934
3935 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3936
3937 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3938 EF_ARM_HASENTRY if the start address is set.
3939
3940 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3941
3942 * targets.c (_bfd_target_vector_entries): Compute value based on
3943 the size of the _bfd_target_vector and not bfd_target_vector.
3944
3945 2001-05-03 H.J. Lu <hjl@gnu.org>
3946
3947 * elfcode.h: Include "libiberty.h".
3948
3949 * elflink.h (elf_link_add_object_symbols): Set
3950 elf_dt_name (abfd) to basename of the bfd filename.
3951 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3952 of the bfd filename.
3953
3954 2001-05-03 Andreas Jaeger <aj@suse.de>
3955
3956 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3957 (elf_generic_info_to_howto_rel): Likewise.
3958 * coff-alpha.c (reloc_nil): Likewise.
3959 (alpha_ecoff_bad_format_hook): Likewise.
3960 (alpha_adjust_reloc_out): Likewise.
3961 (alpha_bfd_reloc_type_lookup): Likewise.
3962 (alpha_convert_external_reloc): Likewise.
3963 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3964 (elf64_alpha_reloc_bad): Likewise.
3965 (elf64_alpha_reloc_gpdisp): Likewise.
3966 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3967 (elf64_alpha_info_to_howto): Likewise.
3968 (elf64_alpha_add_symbol_hook): Likewise.
3969 (elf64_alpha_create_got_section): Likewise.
3970 (elf64_alpha_is_local_label_name): Likewise.
3971 (elf64_alpha_merge_ind_symbols): Likewise.
3972 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3973 (mips_elf64_get_reloc_upper_bound): Likewise.
3974 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3975 (nlm_alpha_get_public_offset): Likewise.
3976
3977 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3978
3979 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3980 about overflow in R_OPENRISC_LO_16_IN_INSN and
3981 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3982
3983 2001-04-30 H.J. Lu <hjl@gnu.org>
3984
3985 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3986 only for ELF_LINK_FORCED_LOCAL.
3987 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3988 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3989 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3990
3991 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3992 if the symbol has hidden or internal visibility.
3993
3994 2001-04-30 Alan Modra <amodra@one.net.au>
3995
3996 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3997 calls to undefined weak symbols.
3998
3999 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4000
4001 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4002 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4003
4004 2001-04-27 Andreas Jaeger <aj@suse.de>
4005
4006 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4007 out handled entries.
4008 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4009 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4010 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4011 GOT32.
4012
4013 2001-04-27 Sean McNeil <sean@mcneil.com>
4014
4015 * config.bfd: Add arm-vxworks target.
4016 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4017 addend (fro VXworks targets).
4018
4019 2001-04-26 H.J. Lu <hjl@gnu.org>
4020
4021 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4022 valid.
4023
4024 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
4025
4026 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4027 * bfd-in2.h: Regenerated.
4028
4029 2001-04-24 Jakub Jelinek <jakub@redhat.com>
4030
4031 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4032 (struct sec_merge_hash): Remove alignment_power.
4033 (sec_merge_hash_newfunc): Clear alignment.
4034 (sec_merge_hash_lookup): Pass alignment as argument.
4035 Use hashp->root.next, not hashp->next to walk the hash chain.
4036 If a string already in the hashtable does not have required
4037 alignment, create a new hashtable entry.
4038 (sec_merge_init): Remove alignment_power argument.
4039 (sec_merge_add): Add alignment argument.
4040 (sec_merge_emit): Alignment is now a per-entity thing, not per
4041 section.
4042 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4043 for proper alignment.
4044 Pass alignment information to sec_merge_add.
4045
4046 2001-04-24 Christian Groessler <cpg@aladdin.de>
4047
4048 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4049 and R_REL16 reloc types; accept odd values for R_REL16 type
4050
4051 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4052
4053 * cpu-openrisc.c: New file.
4054 * elf32-openrisc.c: Likewise.
4055
4056 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4057 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4058 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4059 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4060 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4061 * Makefile.in: Regenerated.
4062 * config.bfd: (openrisc-*-elf): New target.
4063 * configure.in (bfd_elf32_openrisc_vec): New vector.
4064 * configure: Regenerated.
4065 * libbfd.h: Regenerated.
4066 * bfd-in2.h: Regenerated.
4067 * reloc.c: Add OpenRISC relocations.
4068 * targets.c (bfd_elf32_openrisc_vec): Declare.
4069 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4070 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4071 (bfd_openrisc_arch): Declare.
4072 (bfd_archures_list): Add bfd_openrisc_arch.
4073 * elf.c (prep_headers): Add bfd_arch_openrisc.
4074
4075 2001-04-23 Bo Thorsen <bo@suse.de>
4076
4077 * elf64-x86-64.c: Add c++ vtable hack.
4078 Small whitespace and comment changes.
4079
4080 2001-04-19 Andreas Jaeger <aj@suse.de>
4081
4082 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4083 (elf64_x86_64_plt_entry): Likewise.
4084 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4085 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4086
4087 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4088
4089 * elf32-cris.c: Tweak comments related to dynamic linking.
4090 (cris_elf_relocate_section): When not creating shared object, fill
4091 in the .got table for any symbol not in the dynamic symbol table.
4092 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4093 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4094 table.
4095 (cris_elf_check_relocs): Use variable r_type in all places rather
4096 than the original expression. Add default case in switch for
4097 reloc types.
4098 (elf_cris_size_dynamic_sections): Iterate over
4099 elf_cris_discard_excess_program_dynamics when not creating shared
4100 library.
4101 (elf_cris_discard_excess_dso_dynamics): Renamed from
4102 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4103 (elf_cris_discard_excess_program_dynamics): New.
4104
4105 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4106
4107 * coffcode.h (coff_write_object_contents): Use
4108 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4109
4110 2001-04-14 H.J. Lu <hjl@gnu.org>
4111
4112 * bfd-in2.h: Regenerate.
4113
4114 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4115
4116 * section.c (STD_SECTION): Add entsize.
4117
4118 2001-04-13 H.J. Lu <hjl@gnu.org>
4119
4120 * section.c (SEC_MERGE): Define new flag for merging.
4121 (SEC_STRINGS): Likewise.
4122 (entsize): New field.
4123
4124 2001-04-13 Roger Sayle <roger@metaphorics.com>
4125
4126 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4127 flag on pe-i386 targets.
4128
4129 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4130
4131 * libbfd-in.h (_bfd_merge_section): New.
4132 (_bfd_write_merged_section): New.
4133 (_bfd_merged_section_offset): New.
4134 * libbfd.h: Rebuilt.
4135 * linker.c (_bfd_generic_link_output_symbols): Handle
4136 discard_sec_merge.
4137 * aoutx.h (aout_link_write_symbols): Likewise.
4138 * pdp11.c (aout_link_write_symbols): Likewise.
4139 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4140 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4141 sections.
4142 (elf_link_sec_merge_syms): New.
4143 (elf_link_input_bfd): Call _bfd_merged_section_offset
4144 and _bfd_write_merged_section.
4145 Handle discard_sec_merge.
4146 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4147 field.
4148 (struct bfd_elf_section_data): Likewise.
4149 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4150 SEC_STRINGS section flags and entsize from their ELF counterparts.
4151 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4152 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4153 from their BFD counterparts.
4154 * merge.c: New file.
4155 * Makefile.am: Add strtab.lo.
4156 * Makefile.in: Rebuilt.
4157
4158 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4159
4160 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4161 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4162
4163 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4164
4165 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4166 endian MIPS ELF target.
4167 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4168 MIPS ELF target.
4169
4170 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4171 64bit big endian MIPS ELF target.
4172 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4173 endian MIPS ELF target.
4174 * configure: Regenerated.
4175
4176 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4177 little endian targets.
4178 (mips_elf_sym_is_global): Handle traditional targets.
4179
4180 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4181 64bit big endian MIPS ELF target.
4182 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4183 endian MIPS ELF target.
4184
4185 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4186 and bfd_elf64_tradlittlemips_vec.
4187
4188 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4189
4190 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4191 ordinary "progbits" section.
4192
4193 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4194
4195 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4196 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4197
4198 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4199
4200 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4201
4202 2001-03-30 H.J. Lu <hjl@gnu.org>
4203
4204 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4205 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4206
4207 2001-03-26 H.J. Lu <hjl@gnu.org>
4208
4209 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4210 if there are any relocations for generic ELF.
4211 (bfd_elf32_bfd_link_add_symbols): Defined to
4212 elf32_generic_link_add_symbols.
4213 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4214 if there are any relocations for generic ELF.
4215 (bfd_elf64_bfd_link_add_symbols): Defined to
4216 elf64_generic_link_add_symbols.
4217
4218 2001-03-23 Nick Clifton <nickc@redhat.com>
4219
4220 * Makefile.am (BUILD_CFILES): New variable: List of C source
4221 files created in build directory.
4222 (BUILD_HFILES): New variable: List of header files created in
4223 build directory.
4224 (POTFILES): Delete.
4225 (po/POTFILES.in): Replace rule with empty entry.
4226 (po/SRC-POTFILES.in): New rule: Create a list of source files
4227 in the source directory.
4228 (po/BLD-POTFILES.in): New rule: Create a list of source files
4229 in the build directory.
4230 (MOSTLYCLEAN): Do not delete source files created in build
4231 directory.
4232 * Makefile.in: Regenerate.
4233 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4234 into po/Makefile.
4235 * configure: Regenerate.
4236
4237 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4238 and BLD_POTFILES.
4239 Add .. to the search path when building bfd.pot.
4240 Delete POTFILES when performing distclean.
4241 Add comment describing why distclean is broken in maintainer mode.
4242 * po/POTFILES.in: Delete.
4243 * po/SRC-POTFILES.in: New file.
4244 * po/BLD-POTFILES.in: New file.
4245 * po/bfd.pot: Regenerate.
4246
4247 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4248
4249 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4250 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4251 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4252 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4253 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4254 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4255 functions.
4256 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4257 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4258 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4259 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4260 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4261 New HOWTO members for new relocs.
4262 (cris_reloc_map): Map new relocs.
4263 (ELF_DYNAMIC_INTERPRETER): Define.
4264 (PLT_ENTRY_SIZE): Define.
4265 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4266 elf_cris_pic_plt_entry): New, PLT templates.
4267 (struct elf_cris_pcrel_relocs_copied, struct
4268 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4269 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4270 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4271 positive values. Adjust PCREL relocs to be relative to location
4272 after relocation.
4273 (cris_elf_relocate_section): Handle relocations to dynamic
4274 objects. Handle new relocations. Call error handler when seeing
4275 non-PIC relocation for read-only sections while generating shared
4276 object.
4277 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4278 entries.
4279 (bfd_elf32_bfd_link_hash_table_create,
4280 elf_backend_adjust_dynamic_symbol,
4281 elf_backend_size_dynamic_sections,
4282 elf_backend_finish_dynamic_symbol,
4283 elf_backend_finish_dynamic_sections,
4284 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4285 elf_backend_hide_symbol, elf_backend_want_got_plt,
4286 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4287 elf_backend_got_header_size, elf_backend_plt_header_size):
4288 Define.
4289
4290 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4291 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4292 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4293 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4294 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4295 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4296 * bfd-in2.h, libbfd.h: Regenerate.
4297
4298 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4299
4300 (_bfd_mips_elf_relocate_section): Give a better error message when
4301 a relocation is not recognized.
4302
4303 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4304
4305 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4306 non-NULL before attempting to dereference.
4307
4308 2001-03-20 H.J. Lu <hjl@gnu.org>
4309
4310 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4311 * configure: Rebuild.
4312
4313 2001-03-20 Andreas Schwab <schwab@suse.de>
4314
4315 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4316 relocation value when resolving a reference from a debugging
4317 section.
4318
4319 2001-03-16 Scott Thomason <SThomaso@hii.com>
4320
4321 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4322 (xcoff64_swap_sym_out): Fix syntax errors.
4323
4324 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4325
4326 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4327
4328 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4329
4330 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4331 (hppa_link_hash_newfunc): Init it.
4332 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4333 section appears to be non-PIC.
4334 (final_link_relocate): Likewise.
4335 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4336 possible candidate function, and set pic_call for those that will
4337 only have a .plt entry for the PIC call stub.
4338 (hppa_handle_PIC_calls): Set maybe_pic_call.
4339
4340 2001-03-12 DJ Delorie <dj@redhat.com>
4341
4342 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4343 R_SH_DIR8WP* relocs if they're against external symbols, else
4344 they're just for relaxing. Validate the reloc values.
4345
4346 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4347
4348 * binary.c (bfd_external_binary_architecture): Declare.
4349 (binary_object_p): If bfd_external_binary_architecture is defined,
4350 set the architecture to this string.
4351
4352 2001-03-11 Philip Blundell <philb@gnu.org>
4353
4354 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4355 entries that could serve as a definition for a weak symbol.
4356
4357 2001-03-08 Nick Clifton <nickc@redhat.com>
4358
4359 * Most files: Update copyright notices using Perl script created
4360 by Kevin Buettner <kevinb@redhat.com>.
4361
4362 2001-03-07 Nick Clifton <nickc@redhat.com>
4363
4364 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4365 prior patch on ! defined OLD_ARM_ABI.
4366
4367 2001-03-07 Andreas Jaeger <aj@suse.de>
4368
4369 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4370 some relocation values.
4371
4372 2001-03-06 Nick Clifton <nickc@redhat.com>
4373
4374 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4375 of offset in BLX(1) instruction.
4376 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4377 offset in BLX(1) instruction.
4378 Fix formatting.
4379
4380 2001-03-06 Nick Clifton <nickc@redhat.com>
4381
4382 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4383 BFD_RELOC_THUMB_PCREL_BLX.
4384
4385 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4386
4387 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4388 * bfd-in2.h: Regenerate.
4389 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4390 * ieee.c (ieee_write_processor): Set proper id for
4391 Coldfire CPUs.
4392
4393 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4394
4395 * configure.in: Add s390 target.
4396 * configure: Regenerate.
4397
4398 2001-02-28 Andreas Jaeger <aj@suse.de>
4399
4400 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4401 to addend.
4402
4403 2001-02-28 Philip Blundell <pb@futuretv.com>
4404
4405 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4406 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4407
4408 2001-02-27 H.J. Lu <hjl@gnu.org>
4409
4410 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4411 abfd->tdata.aout_data == NULL.
4412
4413 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4414
4415 * elf32-hppa.c: Correct field selector in stub comments.
4416 (clobber_millicode_symbols): Formatting fix.
4417
4418 * configure.in: Bump version to 2.11.90.
4419 * configure: Regenerate.
4420 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4421 (CFILES): $SOURCE_CFILES + generated C files.
4422 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4423 Run "make dep-am"
4424 * Makefile.in: Regenerate.
4425 * doc/Makefile.in: This too.
4426
4427 2001-02-26 Timothy Wall <twall@cygnus.com>
4428
4429 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4430 comments.
4431
4432 2001-02-26 Nick Clifton <nickc@redhat.com>
4433
4434 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4435 up, replacing multiple if statements with a switch.
4436 (handle_COMDAT): New function.
4437
4438 2001-02-26 H.J. Lu <hjl@gnu.org>
4439
4440 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4441 a warning for section flags we do not handle instead of
4442 aborting.
4443
4444 2001-02-26 Andreas Jaeger <aj@suse.de>
4445
4446 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4447
4448 2001-02-22 Timothy Wall <twall@cygnus.com>
4449
4450 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4451 * configure.in: Add objects for elf64_ia64_aix vectors.
4452 * configure: Regenerated.
4453 * configure.host: Recognize ia64-*-aix*.
4454 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4455 for AIX. AIX5 requires most relocations to be dynamic (*all*
4456 binaries are somewhat similar to shared libraries).
4457 * targets.c: Add elf64_ia64_aix vectors.
4458
4459 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4460
4461 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4462 C8 said "1" instead of "8". Clarify error string for IMM22:
4463 "signed integer" instead of just "integer".
4464
4465 2001-02-20 Andreas Jaeger <aj@suse.de>
4466
4467 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4468 PLT entries that could serve as a definition for a weak symbol.
4469
4470 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4471
4472 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4473 entries that could serve as a definition for a weak symbol.
4474 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4475
4476 2001-02-18 David O'Brien <obrien@FreeBSD>
4477
4478 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4479 FreeBSD/i386-CURRENT differently until I can figure out the needed
4480 corefile changes.
4481 * configure: Regenerate.
4482 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4483 FreeBSD/PowerPC, and FreeBSD/sparc64.
4484
4485 2001-02-18 lars brinkhoff <lars@nocrew.org>
4486
4487 * Makefile.am: Add PDP-11 a.out target.
4488 * config.bfd: Likewise.
4489 * configure.in: Likewise.
4490 * targets.c: Likewise.
4491 * archures.c: Likewise.
4492 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4493 * libbfd.h: Add PDP-11 relocations.
4494 * reloc.c: Likewise.
4495 * cpu-pdp11.c: New file.
4496 * pdp11.c: New file.
4497
4498 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4499 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4500 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4501 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4502 (GET_MAGIC): New macro.
4503 (PUT_MAGIC): Likewise.
4504 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4505
4506 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4507
4508 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4509 multiarch needs it).
4510
4511 2001-02-18 H.J. Lu <hjl@gnu.org>
4512
4513 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4514 index.
4515
4516 2001-02-18 Kazu Hirata <kazu@hxi.com>
4517
4518 * vms-misc.c: Fix formatting.
4519
4520 2001-02-16 Kazu Hirata <kazu@hxi.com>
4521
4522 * vms.c: Fix formatting.
4523
4524 2001-02-14 H.J. Lu <hjl@gnu.org>
4525
4526 * elf.c (elf_find_function): New function.
4527 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4528 the file name and function name.
4529
4530 2001-02-14 Nick Clifton <nickc@redhat.com>
4531
4532 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4533 asection structure.
4534
4535 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4536 (BFD64_BACKENDS): Add pepigen.c
4537 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4538
4539 * Makefile.in: Regenerate.
4540 * configure: Regenerate.
4541 * po/POTFILES.in: Regenerate.
4542 * po/bfd.pot: Regenerate.
4543
4544 2001-02-14 H.J. Lu <hjl@gnu.org>
4545
4546 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4547 force_minimum_alignment.
4548
4549 2001-02-14 Bo Thorsen <bo@suse.de>
4550
4551 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4552 (elf64_86_64_size_info): Struct added to fix a problem
4553 with the hashtable string entries.
4554 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4555 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4556 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4557 remove the FIXME for this.
4558 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4559 section. Also removed the FIXME for it.
4560 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4561 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4562 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4563
4564 2001-02-13 Richard Henderson <rth@redhat.com>
4565
4566 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4567 and not user provided.
4568
4569 2001-02-13 Kazu Hirata <kazu@hxi.com>
4570
4571 * vms.c (vms_print_symbol): Remove unreachable code.
4572
4573 * rs6000-core.c: Fix formatting.
4574
4575 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4576
4577 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4578 as _bfd_XXi_only_swap_filehdr_out.
4579 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4580 pe->force_minimum_alignment to TRUE.
4581 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4582 PEI_TARGET_SUBSYSTEM.
4583 (pe_print_private_bfd_data): Call
4584 _bfd_XX_print_private_bfd_data_common() instead of
4585 _bfd_pe_print_private_bfd_data_common().
4586 (pe_bfd_copy_private_bfd_data): Call
4587 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4588 _bfd_pe_bfd_copy_private_bfd_data_common().
4589 (coff_bfd_copy_private_section_data): Define as
4590 _bfd_XX_bfd_copy_private_section_data instead of
4591 _bfd_pe_bfd_copy_private_section_data.
4592 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4593 of a _bfd_pe_get_symbol_info.
4594
4595 * peigen.c: Delete.
4596
4597 * peXXigen.c: Renamed from peigen.c.
4598 (COFF_WITH_XX): Define this macro (will get expanded into
4599 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4600 compiled as peigen.c or pepigen.c.
4601 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4602 define the canonical PEP structures and definitions.
4603 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4604 effect, enforce minimum file and section alignments. If
4605 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4606 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4607 so, by default, this is a no-op).
4608
4609 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4610 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4611 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4612 _bfd_pefoo if it's not defined. Use these macros to define
4613 coff swap macros.
4614
4615 * libcoff.h (pe_tdata): Add members target_subsystem and
4616 force_minimum_alignment.
4617
4618 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4619 COFF_WITH_pep.
4620 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4621
4622 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4623 peigen.lo.
4624
4625 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4626 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4627 PEPAOUTHDR.
4628
4629 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4630 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4631 (peigen.c): Add rule to generate from peXXigen.c.
4632 (pepigen.c): Ditto.
4633 (pepigen.lo): List dependencies for pepigen.lo.
4634
4635 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4636
4637 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4638 $global$ referenced but not defined, set its value here.
4639
4640 2001-02-09 Bo Thorsen <bo@suse.de>
4641
4642 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4643 alignment to 3.
4644 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4645 and relocation.
4646 (elf64_x86_64_relocate_section): Fix formatting.
4647 (elf64_x86_64_relocate_section): Fix addend for relocation of
4648 R_X86_64_(8|16|32|PC8|PC16|PC32).
4649
4650 2001-02-12 Jan Hubicka <jh@suse.cz>
4651
4652 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4653
4654 2001-02-11 H.J. Lu <hjl@gnu.org>
4655
4656 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4657 alignment.
4658
4659 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4660
4661 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4662 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4663 relocations against dynsym symbols.
4664
4665 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4666 the R_MIPS_26 relocation.
4667 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4668 the R_MIPS_26 relocation.
4669 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4670 relocation.
4671 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4672 the R_MIPS_26 relocation.
4673 (mips_elf64_howto_table_rela): Likewise.
4674
4675 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4676 member to mark symbols that have non-CALL relocations against
4677 them.
4678 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4679 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4680 R_MIPS_GOT16.
4681 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4682 non-CALL relocation against it is encountered.
4683 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4684 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4685 no_fn_stub is not set.
4686
4687 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4688 information from the real symbol for indirect ones.
4689 Check no_fn_stub to find out if a symbol has a function stub
4690 indeed.
4691
4692 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4693
4694 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4695 * Makefile.in: Regenerate.
4696
4697 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4698
4699 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4700 true if section name is an unwind table section name.
4701 (elfNN_ia64_additional_program_headers): Count each unwind section
4702 separately.
4703 (elfNN_ia64_modify_segment_map): Install one unwind program header
4704 for each unwind separate section. Note: normally the linker
4705 script merges the unwind sections that go into a single segment,
4706 so this still generates at most one unwind program header per
4707 segment.
4708
4709 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4710 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4711 (elfNN_ia64_fake_sections): Mark sections with names that start
4712 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4713 unwind section.
4714
4715 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4716 Use it to make sh_info in unwind section point to the text section
4717 it applies to.
4718
4719 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4720
4721 * Makefile.am: Add linux target for S/390.
4722 * archures.c: Likewise.
4723 * bfd-in2.h: Likewise.
4724 * config.bfd: Likewise.
4725 * configure.in: Likewise.
4726 * elf.c: Likewise.
4727 * libbfd.h: Likewise.
4728 * targets.c: Likewise.
4729 * cpu-s390.c: New file.
4730 * elf32-s390.c: New file.
4731 * elf64-s390.c: New file.
4732
4733 2001-02-09 Nick Clifton <nickc@redhat.com>
4734
4735 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4736 ImageBase. This has already been done by coff_swap_hdr_in.
4737
4738 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4739
4740 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4741
4742 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4743
4744 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4745 (sparc64_elf_relocate_section): Likewise.
4746
4747 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4748
4749 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4750 similar to R_SPARC_32.
4751 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4752
4753 2001-02-08 H.J. Lu <hjl@gnu.org>
4754
4755 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4756 relocation entries for weak definitions when building DSO with
4757 -Bsymbolic.
4758
4759 2001-02-08 Richard Henderson <rth@redhat.com>
4760
4761 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4762 before visibility. Locally defined protected symbols are not
4763 dynamic.
4764
4765 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4766
4767 * config.bfd: Enable coff64 for rs6000-*. Patch from
4768 <hzoli@austin.ibm.com>.
4769
4770 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4771
4772 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4773 found, do not attempt to find dwarf2 info before returning.
4774
4775 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4776
4777 * elflink.h (is_global_symbol_definition): Rename to
4778 is_global_data_symbol_definition and have it reject function
4779 symbols.
4780 (elf_link_is_defined_archive_symbol): Use renamed function.
4781
4782 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4783
4784 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4785 * libbfd.h (bfd_target_vector): Likewise.
4786 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4787 make static; create pointer reference named bfd_target_vector.
4788 (_bfd_target_vector_entries): Calculate this based on the array
4789 typed _bfd_target_vector.
4790
4791 2001-02-06 H.J. Lu <hjl@gnu.org>
4792
4793 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4794 internal symbols are not dynamic.
4795 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4796
4797 2001-02-06 Nick Clifton <nickc@redhat.com>
4798
4799 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4800 that it will not be pulled into the list of files that make up
4801 po/POTFILES.in.
4802 * Makefile.in: Regenerate.
4803 * po/bfd.pot: Regenerate.
4804
4805 2001-02-06 H.J. Lu <hjl@gnu.org>
4806
4807 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4808 checking.
4809 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4810 external_PEI_IMAGE_hdr.
4811
4812 2001-02-06 Kazu Hirata <kazu@hxi.com>
4813
4814 * elf-m10200.c: Fix formatting.
4815
4816 2001-02-04 Nick Clifton <nickc@redhat.com>
4817
4818 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4819 rel, it will be handled later on.
4820
4821 2001-02-02 Fred Fish <fnf@ninemoons.com>
4822
4823 * Makefile.in: Fix typo.
4824
4825 2001-02-01 Kazu Hirata <kazu@hxi.com>
4826
4827 * elf-m10300.c: Fix formatting.
4828
4829 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4830
4831 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4832 (elf_backend_get_symbol_type): Define.
4833 (elf64_hppa_object_p): Set architecture and machine from elf
4834 header flags.
4835
4836 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4837
4838 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4839 before mdebug.
4840
4841 2001-01-26 Richard Henderson <rth@redhat.com>
4842
4843 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4844 for non-default visibility.
4845 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4846 delete ugly macro and replace with pretty function.
4847
4848 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4849
4850 * coff-go32.c: Update copyright.
4851 * coff-stgo32.c: Likewise.
4852 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4853 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4854 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4855 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4856
4857 2001-01-25 Kazu Hirata <kazu@hxi.com>
4858
4859 * bfd-in2.h: Rebuild.
4860 * libbfd.h: Likewise.
4861
4862 2001-01-23 H.J. Lu <hjl@gnu.org>
4863
4864 * bfd-in2.h: Rebuild.
4865
4866 2001-01-23 H.J. Lu <hjl@gnu.org>
4867
4868 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4869 is NULL or PRIV(vms_rec) is outside of the buffer.
4870
4871 2001-01-23 Kazu Hirata <kazu@hxi.com>
4872
4873 * coff64-rs6000.c: Fix formatting.
4874 * coff-arm.c: Likewise.
4875 * coffgen.c: Likewise.
4876 * cofflink.c: Likewise.
4877 * coff-mcore.c: Likewise.
4878 * coff-mips.c: Likewise.
4879 * coff-pmac.c: Likewise.
4880 * coff-ppc.c: Likewise.
4881 * coff-rs6000.c: Likewise.
4882 * elf32.c: Likewise.
4883 * elf32-fr30.c: Likewise.
4884 * elf32-i370.c: Likewise.
4885 * elf32-i860.c: Likewise.
4886 * elf32-m32r.c: Likewise.
4887 * elf32-m68k.c: Likewise.
4888 * elf32-mcore.c: Likewise.
4889 * elf32-ppc.c: Likewise.
4890 * elf32-sh.c: Likewise.
4891 * elf32-v850.c: Likewise.
4892 * elf64-alpha.c: Likewise.
4893 * elf64-sparc.c: Likewise.
4894 * elflink.c: Likewise.
4895 * elflink.h: Likewise.
4896 * elf-m10200.c: Likewise.
4897 * elf-m10300.c: Likewise.
4898 * elfxx-ia64.c: Likewise.
4899
4900 * aoutx.h: Fix formatting.
4901 * bfd.c: Likewise.
4902 * bfd-in2.h: Likewise.
4903 * bfd-in.h: Likewise.
4904 * cpu-i386.c: Likewise.
4905 * cpu-m68hc11.c: Likewise.
4906 * dwarf2.c: Likewise.
4907 * elf64-x86-64.c: Likewise.
4908 * format.c: Likewise.
4909 * freebsd.h: Likewise.
4910 * hash.c: Likewise.
4911 * hp300hpux.c: Likewise.
4912 * hppabsd-core.c: Likewise.
4913 * hpux-core.c: Likewise.
4914
4915 2001-01-22 Bo Thorsen <bo@suse.de>
4916
4917 * elf64-x86-64.c: Added PIC support for X86-64.
4918 (elf64_x86_64_link_hash_newfunc): Function added.
4919 (elf64_x86_64_link_hash_table_create): Likewise.
4920 (elf64_x86_64_check_relocs): Likewise.
4921 (elf64_x86_64_gc_mark_hook): Likewise.
4922 (elf64_x86_64_gc_sweep_hook): Likewise.
4923 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4924 (elf64_x86_64_size_dynamic_sections): Likewise.
4925 (elf64_x86_64_discard_copies): Likewise.
4926 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4927 (elf64_x86_64_finish_dynamic_sections): Likewise.
4928 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4929
4930 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4931
4932 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4933 * Makefile.in: Regenerate.
4934
4935 2001-01-21 Kazu Hirata <kazu@hxi.com>
4936
4937 * coff-a29k.c: Fix formatting.
4938
4939 2001-01-19 H.J. Lu <hjl@gnu.org>
4940
4941 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4942 relocation section names.
4943 (elf_i386_relocate_section): Report files with bad relocation
4944 section names and return false.
4945
4946 2001-01-17 Bo Thorsen <bo@suse.de>
4947
4948 * targets.c: Alphabetize list of xvecs.
4949
4950 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4951
4952 * config.bfd: Add linux target variant for elfxx-hppa.
4953 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4954 bfd_elf64_hppa_linux_vec.
4955 * configure: Regenerate.
4956 * elf64-hppa.c: Include elf64-target.h again to support linux
4957 target variant.
4958 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4959 * elf32-hppa.c: Include elf32-target.h again to support linux
4960 target variant.
4961 (elf32_hppa_post_process_headers): New function.
4962 (elf_backend_post_process_headers): Define.
4963 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4964 bfd_elf32_hppa_linux_vec.
4965
4966 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4967 and data_segment_base fields.
4968 (elf32_hppa_link_hash_table_create ): Init them.
4969 (elf32_hppa_check_relocs): Update comments.
4970 (hppa_record_segment_addr): New function.
4971 (elf32_hppa_relocate_section): Call it.
4972 (final_link_relocate): Handle R_PARISC_SEGREL32.
4973 (elf32_hppa_final_link): New function.
4974 (bfd_elf32_bfd_final_link): Define to call it.
4975 (hppa_unwind_entry_compare): New function.
4976 * cache.c (bfd_open_file): Create files in write+read mode.
4977
4978 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4979 SEGREL32 and numerous other relocs. Change duplicate
4980 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4981
4982 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4983 O_ACCMODE.
4984
4985 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4986 .plt entries for DT_INIT and DT_FINI.
4987 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4988 DT_INIT and DT_FINI.
4989
4990 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4991 offsets for stub .plt access if wide mode. Check offset in range.
4992
4993 2001-01-13 Nick Clifton <nickc@redhat.com>
4994
4995 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4996 line.
4997
4998 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4999 line.
5000
5001 2001-01-12 Alan Modra <alan@linuxcare.com.au>
5002
5003 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5004 * configure: Regenerate.
5005
5006 2001-01-11 Peter Targett <peter.targett@arccores.com>
5007
5008 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5009 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5010 * cpu-arc.c (arch_info_struct): Add entries for variants.
5011 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5012 (arc_get_mach) Don't assume machine names prefixed arc- before
5013 testing.
5014 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5015 selections.
5016 (arc_elf_final_write_processing) Likewise.
5017 (ELF_MACHINE_CODE) Use EM_ARC.
5018
5019 2001-01-10 Nick Clifton <nickc@redhat.com>
5020
5021 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5022
5023 2001-01-07 Philip Blundell <philb@gnu.org>
5024
5025 * README: Replace `bug-gnu-utils@gnu.org' with
5026 `bug-binutils@gnu.org'.
5027
5028 2001-01-04 Kazu Hirata <kazu@hxi.com>
5029
5030 * som.c: Fix formatting.
5031
5032 2001-01-03 Kazu Hirata <kazu@hxi.com>
5033
5034 * ecoffswap.h: Fix formatting.
5035 * elf-bfd.h: Likewise.
5036 * elfarm-nabi.c: Likewise.
5037 * elfarm-oabi.c: Likewise.
5038 * elfcode.h: Likewise.
5039 * elfcore.h: Likewise.
5040 * elflink.c: Likewise.
5041 * elflink.h: Likewise.
5042 * elfxx-ia64.c: Likewise.
5043 * elfxx-target.h: Likewise.
5044 * libbfd.c: Likewise
5045 * linker.c: Likewise.
5046 * lynx-core.c: Likewise.
5047
5048 2001-01-02 Kazu Hirata <kazu@hxi.com>
5049
5050 * pc532-mach.c: Fix formatting.
5051 * pe-arm.c: Likewise.
5052 * pe-i386.c: Likewise.
5053 * pe-mips.c: Likewise.
5054 * pe-ppc.c: Likewise.
5055 * pe-sh.c: Likewise.
5056 * pei-mips.c: Likewise.
5057 * pei-sh.c: Likewise.
5058 * peicode.h: Likewise.
5059 * ppcboot.c: Likewise.
5060 * ptrace-core.c: Likewise.
5061
5062 2001-01-01 Kazu Hirata <kazu@hxi.com>
5063
5064 * reloc.c: Fix formatting.
5065 * riscix.c: Likewise.
5066 * rs6000-core.c: Likewise.
5067 * xcoff-target.h: Likewise.
5068
5069 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5070
5071 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5072 error, by calling bfd_default_set_arch_mach with incoming
5073 values.
5074
5075 2000-12-26 Kazu Hirata <kazu@hxi.com>
5076
5077 * vaxnetbsd.c: Fix formatting.
5078 * versados.c: Likewise.
5079 * vms-gsd.c: Likewise.
5080 * vms-hdr.c: Likewise.
5081 * vms-misc.c: Likewise.
5082
5083 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5084
5085 * archive.c (coff_write_armap): Don't write more than symbol_count
5086 `archive_member_file_ptr's.
5087
5088 2000-12-25 Kazu Hirata <kazu@hxi.com>
5089
5090 * vms-tir.c: Fix formatting.
5091
5092 2000-12-23 Kazu Hirata <kazu@hxi.com>
5093
5094 * vms.c: Fix formatting.
5095 * vms.h: Likewise.
5096
5097 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5098
5099 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5100
5101 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5102
5103 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5104 arithmetic.
5105
5106 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5107
5108 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5109
5110 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5111
5112 * libbfd.c (bfd_get_bits): Added
5113 (bfd_put_bits): Likewise
5114 * bfd-in.h: Declared the above.
5115 * bfd-in2.h: Regenerated.
5116
5117 2000-12-20 Kazu Hirata <kazu@hxi.com>
5118
5119 * targets.c: Fix formatting.
5120 * tekhex.c: Likewise.
5121 * trad-core.c: Likewise.
5122
5123 2000-12-19 Kazu Hirata <kazu@hxi.com>
5124
5125 * sco5-core.c: Fix formatting.
5126 * section.c: Likewise.
5127 * sparclinux.c: Likewise.
5128 * sparclynx.c: Likewise.
5129 * sparcnetbsd.c: Likewise.
5130 * srec.c: Likewise.
5131 * stabs.c: Likewise.
5132 * stab-syms.c: Likewise.
5133 * sunos.c: Likewise.
5134 * syms.c: Likewise.
5135 * sysdep.h: Likewise.
5136
5137 2000-12-18 Nick Clifton <nickc@redhat.com>
5138
5139 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5140 defined.
5141 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5142 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5143
5144 2000-12-18 Nick Clifton <nickc@redhat.com>
5145
5146 * vms-misc.c (_bfd_vms_get_record): Add default case to
5147 file_format switch.
5148
5149 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5150
5151 * elfcore.h (elf_core_file_p): Move to the start of the program
5152 headers before attempting to read them.
5153
5154 2000-12-14 Kazu Hirata <kazu@hxi.com>
5155
5156 * peigen.c: Fix formatting.
5157 * som.c: Likewise.
5158 * som.h: Likewise.
5159
5160 2000-12-13 Kazu Hirata <kazu@hxi.com>
5161
5162 * peigen.c: Fix formatting.
5163
5164 2000-12-12 Jim Wilson <wilson@redhat.com>
5165
5166 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5167
5168 2000-12-08 Mark Salter <msalter@redhat.com>
5169
5170 * binary.c (binary_set_section_contents): Ignore sections
5171 with zero size.
5172
5173 2000-12-12 Kazu Hirata <kazu@hxi.com>
5174
5175 * m68klinux.c: Fix formatting.
5176 * m68knetbsd.c: Likewise.
5177 * mipsbsd.c: Likewise.
5178 * netbsd-core.c: Likewise.
5179 * netbsd.h: Likewise.
5180 * newsos3.c: Likewise.
5181 * nlm32-alpha.c: Likewise.
5182 * nlm32-i386.c: Likewise.
5183 * nlm32-ppc.c: Likewise.
5184 * nlm32-sparc.c: Likewise.
5185 * nlmcode.h: Likewise.
5186 * nlmswap.h: Likewise.
5187 * nlm-target.h: Likewise.
5188 * ns32knetbsd.c: Likewise.
5189
5190 2000-12-10 Fred Fish <fnf@be.com>
5191
5192 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5193 symbols in shared objects if allow_shlib_undefined is true.
5194
5195 2000-12-12 Nick Clifton <nickc@redhat.com>
5196
5197 * cpu-sh.c: Fix formattng.
5198 * elf.c: Fix formattng.
5199 * elf32-mips.c: Fix formattng.
5200 * elf32-sh.c: Fix formattng.
5201 * elf64-alpha.c: Fix formattng.
5202
5203 2000-12-09 Nick Clifton <nickc@redhat.com>
5204
5205 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5206 dwarf2_find_line_info as last parameter to invocation of
5207 _bfd_dwarf2_find_nearest_line.
5208 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5209 dwarf2_find_line_info as last parameter to invocation of
5210 _bfd_dwarf2_find_nearest_line.
5211
5212 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5213
5214 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5215 (BFD_LIBS): ...to here.
5216 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5217 (BFD_LIBS_CFILES): ...to here.
5218 * Makefile.in: Regenerate.
5219 * configure.in: Remove dwarf.lo from the elf shell variable.
5220 * configure: Regenerate.
5221 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5222 * libcoff.h: Regenerate.
5223 * coffgen.c (coff_find_nearest_line): Call
5224 _bfd_dwarf2_find_nearest_line.
5225 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5226 accordingly.
5227 (read_abbrevs): Likewise
5228 (decode_line_info): Likewise.
5229 (parse_comp_unit): Likewise.
5230 (comp_unit_find_nearest_line): Likewise.
5231 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5232 * libbfd.h: Regenerate.
5233 * elf.c (_bfd_elf_find_nearest_line): Update call.
5234 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5235 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5236 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5237 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5238 (styp_to_sec_flags): Handle DWARF2 sections.
5239 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5240 to _bfd_find_nearest_line.
5241 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5242 call to _bfd_find_nearest_line.
5243
5244 2000-12-08 Kazu Hirata <kazu@hxi.com>
5245
5246 * coffgen.c: Fix formatting.
5247 * elf-m10300.c: Likewise.
5248 * elf32-i386.c: Likewise.
5249 * elf32-i960.c: Likewise.
5250 * elf32-m68k.c: Likewise.
5251 * elf32-mcore.c: Likewise.
5252 * elf32-ppc.c: Likewise.
5253 * elf32-sh.c: Likewise.
5254 * elf32-sparc.c: Likewise.
5255 * elf32-v850.c: Likewise.
5256 * elf64-alpha.c: Likewise.
5257 * elf64-hppa.c: Likewise.
5258 * elf64-mips.c: Likewise.
5259 * elf64-sparc.c: Likewise.
5260
5261 2000-12-07 Kazu Hirata <kazu@hxi.com>
5262
5263 * elf32-ppc.c: Fix formatting.
5264 * elf64-x86-64.c: Likewise.
5265
5266 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5267
5268 From Ralf Baechle <ralf@gnu.org>
5269
5270 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5271 BFDs containing no sections or empty .text, .data or .bss sections
5272 to be merged, regardless of their flags.
5273
5274 2000-12-06 Kazu Hirata <kazu@hxi.com>
5275
5276 * elf32-m32r.c: Fix formatting.
5277 * elf32-m68hc11.c: Likewise.
5278 * elf32-m68hc12.c: Likewise.
5279 * elf32-m68k.c: Likewise.
5280 * elf32-mcore.c: Likewise.
5281 * elf32-pj.c: Likewise.
5282 * elf32-ppc.c: Likewise.
5283
5284 2000-12-05 Kazu Hirata <kazu@hxi.com>
5285
5286 * elf32-fr30.c: Fix formatting.
5287 * elf32-hppa.c: Likewise.
5288 * elf32-i370.c: Likewise.
5289 * elf32-i386.c: Likewise.
5290 * elf32-i860.c: Likewise.
5291 * elf32-i960.c: Likewise.
5292
5293 2000-12-03 Kazu Hirata <kazu@hxi.com>
5294
5295 * elf32-arm.h: Fix formatting.
5296 * elf32-avr.c: Likewise.
5297 * elf32-cris.c: Likewise.
5298 * elf32-d10v.c: Likewise.
5299 * elf32-d30v.c: Likewise.
5300 * elf-hppa.h: Likewise.
5301 * elf-m10200.c: Likewise.
5302 * elf-m10300.c: Likewise.
5303
5304 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5305
5306 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5307 bfd_mach_mips32_4k. Update FIXME comment.
5308 * archures.c (bfd_mach_mips32): New constant.
5309 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5310 the latter, renumber it.
5311 * bfd-in2.h (bfd_mach_mips32): New constant.
5312 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5313 the latter, renumber it.
5314 * cpu-mips.c (I_mips32): New constant.
5315 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5316 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5317 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5318 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5319 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5320 with E_MIPS_MACH_MIPS32_4K.
5321 (_bfd_mips_elf_final_write_processing): Replace
5322 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5323 bfd_mach_mips32 case.
5324 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5325 comparison with support for MIPS32.
5326 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5327 MIPS32.
5328
5329 * aoutx.h (NAME(aout,machine_type)): Add cases for
5330 bfd_mach_mips5 and bfd_mach_mips64.
5331 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5332 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5333 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5334 (arch_info_struct): Add entries for bfd_mach_mips5 and
5335 bfd_mach_mips64.
5336 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5337 _bfd_mips_elf_print_private_bfd_data): Add cases for
5338 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5339 (_bfd_mips_elf_final_write_processing): Add cases for
5340 bfd_mach_mips5 and bfd_mach_mips64.
5341
5342 * aoutx.h (NAME(aout,machine_type)): Add a
5343 bfd_mach_mips_sb1 case.
5344 * archures.c (bfd_mach_mips_sb1): New constant.
5345 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5346 * cpu-mips.c (I_sb1): New constant.
5347 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5348 * elf32-mips.c (elf_mips_mach): Add case for
5349 E_MIPS_MACH_SB1.
5350 (_bfd_mips_elf_final_write_processing): Add case for
5351 bfd_mach_mips_sb1.
5352
5353 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5354
5355 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5356 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5357 (sparc*-*-rtems*): Switched from a.out to ELF.
5358
5359 2000-11-30 Jan Hubicka <jh@suse.cz>
5360
5361 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5362 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5363 (elf64-x86-64.lo): Add dependencies.
5364 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5365 bfd_mach_x86_64_intel_syntax.
5366 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5367 * config.bfd (x86_64): Add.
5368 * configure.in: Add support for bfd_elf64_x86_64_vec.
5369 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5370 (bfd_i386_arch, i8086_ar): Link in.
5371 * elf64-x86-64.c: New file.
5372 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5373 * targets.c (bfd_elf64_x86_64_vec): Add.
5374 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5375
5376 2000-11-30 Kazu Hirata <kazu@hxi.com>
5377
5378 * xcofflink.c: Fix formatting.
5379
5380 2000-11-28 Kazu Hirata <kazu@hxi.com>
5381
5382 * aoutx.h: Fix formatting.
5383 * bfd-in.h: Likewise.
5384 * bfd-in2.h: Likewise.
5385 * cache.c: Likewise.
5386 * cisco-core.c: Likewise.
5387 * coff64-rs6000.c: Likewise.
5388 * coffcode.h: Likewise.
5389 * coffswap.h: Likewise.
5390 * corefile.c: Likewise.
5391 * elf32-mips.c: Likewise.
5392
5393 2000-11-27 Kazu Hirata <kazu@hxi.com>
5394
5395 * aout-adobe.c: Fix formatting.
5396 * coff64-rs6000.c: Likewise.
5397 * coffgen.c: Likewise.
5398 * cofflink.c: Likewise.
5399
5400 2000-11-27 Philip Blundell <pb@futuretv.com>
5401
5402 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5403 (obj_coff_strings_written): New accessor macro for above.
5404 * libcoff.h: Regenerate.
5405 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5406 strings.
5407 * coffcode.h (coff_write_object_contents): No need to write out
5408 the string table if it's already been done.
5409
5410 2000-11-22 Philip Blundell <pb@futuretv.com>
5411
5412 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5413 weak undefined symbols.
5414
5415 2000-11-24 Nick Clifton <nickc@redhat.com>
5416
5417 * archures.c (bfd_mach_arm_5TE): Define.
5418 (bfd_mach_arm+XScale): Define.
5419 * bfd-in2.h: Regenerate.
5420
5421 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5422 BFD_RELOC_ARM_PCREL_BLX.
5423
5424 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5425 XScale machine numbers.
5426
5427 * config.bfd (xscale-elf): Add target.
5428 (xscale-coff): Add target.
5429
5430 * cpu-arm.c: Add xscale machine name.
5431 Add v5t, v5te and XScale machine numbers.
5432
5433 2000-11-23 Kazu Hirata <kazu@hxi.com>
5434
5435 * aix386-core.c: Fix formatting.
5436
5437 2000-11-22 Jim Wilson <wilson@redhat.com>
5438
5439 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5440 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5441 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5442 (ins_imms_scaled): Initialize sign_bit at function entry.
5443 (elf64_ia64_operands): Add missing initializers.
5444 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5445 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5446 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5447 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5448 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5449 parameters.
5450 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5451 and free_extsyms at function entry.
5452 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5453 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5454 (get_got): Delete unused local srel.
5455 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5456 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5457
5458 2000-11-21 Kazu Hirata <kazu@hxi.com>
5459
5460 * coff-a29k.c: Fix formatting.
5461 * coff-h8500.c: Likewise.
5462 * coff-i960.c: Likewise.
5463 * coff-ppc.c: Likewise.
5464 * coff-rs6000.c: Likewise.
5465 * coff-stgo32.c: Likewise.
5466 * coff-tic54x.c: Likewise.
5467 * coff-w65.c: Likewise.
5468 * cpu-h8500.c: Likewise.
5469 * cpu-hppa.c: Likewise.
5470 * cpu-ns32k.c: Likewise.
5471 * ecoff.c: Likewise.
5472 * ecofflink.c: Likewise.
5473
5474 2000-11-21 Nick Clifton <nickc@redhat.com>
5475
5476 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5477 remove possibility of infinite loop.
5478
5479 2000-11-20 Kazu Hirata <kazu@hxi.com>
5480
5481 * aix386-core.c: Fix formatting.
5482 * aout-adobe.c: Likewise.
5483 * aout-arm.c: Likewise.
5484 * aout-encap.c: Likewise.
5485 * aout-ns32k.c: Likewise.
5486 * aout-target.h: Likewise.
5487 * aout-tic30.c: Likewise.
5488 * aoutf1.h: Likewise.
5489 * aoutx.h: Likewise.
5490 * archive.c: Likewise.
5491 * bfd-in.h: Likewise.
5492 * bfd-in2.h: Likewise.
5493 * bfd.c: Likewise.
5494 * bout.c: Likewise.
5495
5496 2000-11-17 H.J. Lu <hjl@gnu.org>
5497
5498 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5499 pltoff entries for DT_INIT and DT_FINI.
5500 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5501 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5502 entries.
5503
5504 2000-11-16 Richard Henderson <rth@redhat.com>
5505
5506 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5507 (allocate_dynrel_entries): Likewise.
5508 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5509 (set_pltoff_entry): Likewise.
5510 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5511 (elfNN_ia64_reloc_type_lookup): Likewise.
5512 (elfNN_ia64_install_value): Likewise.
5513 (elfNN_ia64_relocate_section): Likewise.
5514 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5515 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5516
5517 2000-11-16 Kazu Hirata <kazu@hxi.com>
5518
5519 * cpu-a29k.c: Fix formatting.
5520 * cpu-alpha.c: Likewise.
5521 * cpu-arm.c: Likewise.
5522 * cpu-avr.c: Likewise.
5523 * cpu-d10v.c: Likewise.
5524 * cpu-h8500.c: Likewise.
5525 * cpu-hppa.c: Likewise.
5526 * cpu-i370.c: Likewise.
5527 * cpu-i386.c: Likewise.
5528 * cpu-i960.c: Likewise.
5529 * cpu-ia64-opc.c: Likewise.
5530 * cpu-ia64.c: Likewise.
5531 * cpu-m32r.c: Likewise.
5532 * cpu-m68hc11.c: Likewise.
5533 * cpu-m68hc12.c: Likewise.
5534 * cpu-m68k.c: Likewise.
5535 * cpu-m88k.c: Likewise.
5536 * cpu-mips.c: Likewise.
5537 * cpu-ns32k.c: Likewise.
5538 * cpu-pj.c: Likewise.
5539 * cpu-powerpc.c: Likewise.
5540 * cpu-sh.c: Likewise.
5541 * cpu-sparc.c: Likewise.
5542 * cpu-tic54x.c: Likewise.
5543 * cpu-v850.c: Likewise.
5544 * cpu-vax.c: Likewise.
5545 * cpu-w65.c: Likewise.
5546 * cpu-we32k.c: Likewise.
5547 * cpu-z8k.c: Likewise.
5548 * dwarf1.c: Likewise.
5549 * dwarf2.c: Likewise.
5550
5551 2000-11-15 Kazu Hirata <kazu@hxi.com>
5552
5553 * coff-arm.c: Fix formatting.
5554 * coff-ppc.c: Likewise.
5555 * coff-rs6000.c: Likewise.
5556 * coff-sh.c: Likewise.
5557 * coff-sparc.c: Likewise.
5558 * coff-tic30.c: Likewise.
5559 * coff-tic54x.c: Likewise.
5560 * coff-tic80.c: Likewise.
5561 * coff-w65.c: Likewise.
5562 * coff-we32k.c: Likewise.
5563 * coff-z8k.c: Likewise.
5564
5565 2000-11-15 Richard Henderson <rth@redhat.com>
5566
5567 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5568 section with the same ALLOC|LOAD flags as the source section.
5569
5570 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5571
5572 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5573 by STO_ALPHA constants.
5574
5575 2000-11-14 Kazu Hirata <kazu@hxi.com>
5576
5577 * coff-pmac.c: Fix formatting.
5578 * coff-ppc.c: Likewise.
5579
5580 2000-11-13 H.J. Lu <hjl@gnu.org>
5581
5582 * elflink.h (elf_link_add_object_symbols): Also add indirect
5583 symbols for common symbols with the default version.
5584
5585 2000-11-09 Philip Blundell <pb@futuretv.com>
5586
5587 * section.c (STD_SECTION): Set gc_mark flag.
5588
5589 2000-11-11 Kazu Hirata <kazu@hxi.com>
5590
5591 * coff-i960.c: Likewise.
5592 * coff-m68k.c: Likewise.
5593 * coff-m88k.c: Likewise.
5594 * coff-mcore.c: Likewise.
5595 * coff-mips.c: Likewise.
5596
5597 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5598
5599 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5600
5601 2000-11-10 Kazu Hirata <kazu@hxi.com>
5602
5603 * coff-h8300.c: Fix formatting.
5604 * coff-h8500.c: Likewise.
5605 * coff-i386.c: Likewise.
5606 * coff-i860.c: Likewise.
5607 * coff-i960.c: Likewise.
5608 * coff-ia64.c: Likewise.
5609
5610 2000-11-09 Kazu Hirata <kazu@hxi.com>
5611
5612 * archive.c: Fix formatting.
5613 * archures.c: Likewise.
5614
5615 2000-11-07 Richard Henderson <rth@redhat.com>
5616
5617 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5618 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5619 * section.c (bfd_set_section_contents): Call memcpy if
5620 section->contents set and location not equal to contents plus offset.
5621
5622 2000-11-08 Kazu Hirata <kazu@hxi.com>
5623
5624 * bfd-in.h: Fix formatting.
5625 * bfd-in2.h: Likewise.
5626 * bfd.c: Likewise.
5627 * binary.c: Likewise.
5628 * bout.c: Likewise.
5629 * coff-a29k.c: Likewise.
5630 * coff-alpha.c: Likewise.
5631 * coff-apollo.c: Likewise.
5632 * coff-aux.c: Likewise.
5633
5634 2000-11-07 Kazu Hirata <kazu@hxi.com>
5635
5636 * aix386-core.c: Fix formatting.
5637 * aoutf1.h: Likewise.
5638 * aoutx.h: Likewise.
5639 * archures.c: Likewise.
5640 * armnetbsd.c: Likewise.
5641
5642 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5643
5644 * coff-h8300.c (special): Adjust reloc address.
5645
5646 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5647
5648 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5649 to differentiate elf32 and elf64 on ia64.
5650 * bfd-in2.h: Regenerate.
5651 * config.bfd: Add target for "ia64*-*-hpux*".
5652 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5653 * configure: Regenerate.
5654 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5655 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5656
5657 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5658 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5659 * Makefile.in: Regnerate.
5660 * elf64-ia64.c: Deleted.
5661 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5662
5663 2000-11-06 Kazu Hirata <kazu@hxi.com>
5664
5665 * aout-adobe.c: Fix formatting.
5666 * aout-arm.c: Likewise.
5667 * aout-cris.c: Likewise.
5668 * aout-encap.c: Likewise.
5669 * aout-ns32k.c: Likewise.
5670 * aout-target.h: Likewise.
5671 * aout-tic30.c: Likewise.
5672
5673 2000-11-05 Philip Blundell <philb@gnu.org>
5674
5675 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5676 BFDs containing no sections to be merged, regardless of their flags.
5677
5678 2000-11-04 Philip Blundell <philb@gnu.org>
5679
5680 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5681 if a relocation for an undefined symbol also results in an
5682 overflow.
5683
5684 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5685
5686 * config.bfd: Add support for Sun Chorus.
5687
5688 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5689
5690 * configure.in: Recognize alpha-*-freebsd*.
5691 * configure: Regenerate.
5692
5693 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5694
5695 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5696 (Chunk): New global variable set by a parameter in objcopy.c.
5697 (S3Forced): New global variable set by a parameter in
5698 objcopy.c.
5699 (srec_set_section_contents): If S3Forced is true, always generate
5700 S3 records.
5701 (srec_write_section): Use 'Chunk' to limit maximum length of S
5702 records.
5703
5704 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5705
5706 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5707 * Makefile.in: Regenerate.
5708 * bfd-in2.h: Regenerate.
5709 * po/bfd.pot: Regenerate.
5710
5711 2000-10-31 Philip Blundell <philb@gnu.org>
5712
5713 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5714 EF_SOFT_FLOAT if it is defined.
5715
5716 2000-10-27 Philip Blundell <philb@gnu.org>
5717
5718 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5719 attempts to mix PIC code with non-PIC, just mark the output as
5720 being position dependent.
5721 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5722 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5723 all mismatches, not just the first one.
5724
5725 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5726
5727 * ieee.c (ieee_archive_p): Plug one of many possible
5728 memory leaks in error handling.
5729
5730 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5731
5732 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5733 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5734 Support v8plusb.
5735 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5736 sparc64_elf_object_p): Support v9b.
5737 * archures.c: Declare v8plusb and v9b machines.
5738 * bfd-in2.h: Ditto.
5739 * cpu-sparc.c: Ditto.
5740
5741 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5742
5743 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5744 of a GOT reloc.
5745
5746 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5747 (SYMBOL_CALLS_LOCAL): New macro.
5748 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5749 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5750 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5751 (ppc_elf_relocate_section): Use flag variable to determine
5752 whether the relocation refers to a local symbol.
5753 Test whether a PLTREL24 reloc will produce a reloc by looking
5754 to see whether a PLT entry was made.
5755
5756 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5757
5758 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5759 entries that could serve as a definition for a weak symbol.
5760
5761 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5762
5763 From Ralf Baechle <ralf@gnu.org>
5764
5765 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5766 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5767 against local symbols.
5768 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5769
5770 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5771
5772 * section.c (struct sec): Add kept_section.
5773 (struct bfd_comdat_info): Remove sec, we can use above.
5774 (STD_SECTION): Add initializer.
5775 (bfd_make_section_anyway): Init here too.
5776
5777 * bfd-in2.h: Regenerate.
5778
5779 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5780 zeroing of `flags'.
5781 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5782 fudge values for discarded link-once section symbols.
5783
5784 * elf64-hppa.c: Include alloca-conf.h
5785
5786 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5787
5788 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5789
5790 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5791
5792 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5793
5794 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5795
5796 2000-10-10 Tom Rix <trix@redhat.com>
5797
5798 * section.c (bfd_make_section_anyway): Release newsect ptr when
5799 newsect->symbol fails to alloc. Use bfd_release instead of free.
5800
5801 2000-10-09 Richard Henderson <rth@cygnus.com
5802
5803 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5804 (elf64_ia64_unwind_entry_compare): New.
5805 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5806
5807 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5808
5809 * elflink.h (size_dynamic_sections): Don't create various tags if
5810 .dynstr is excluded from the link. Don't set first dynsym entry
5811 if dynsymcount is zero.
5812 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5813 .dynsym excluded from the link. Don't try to write any dynamic
5814 sections excluded from the link.
5815
5816 * elf.c (swap_out_syms): Handle global section symbols.
5817
5818 2000-10-05 DJ Delorie <dj@redhat.com>
5819
5820 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5821 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5822 (coff_write_relocs): write extended reloc count
5823 (coff_write_object_contents): account for extended relocs
5824
5825 2000-10-05 Jim Wilson <wilson@cygnus.com>
5826
5827 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5828 field.
5829 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5830 elf_backend_section_flags function.
5831 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5832 code.
5833 (elf64_ia64_section_flags): New function containing flag conversion
5834 code.
5835 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5836 * elfxx-target.h (elf_backend_section_flags): Define.
5837 (elfNN_bed): Initialize elf_backend_section_flags field.
5838
5839 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5840
5841 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5842 _bfd_elf32_gc_record_vtable. Correct a comment.
5843
5844 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5845
5846 From Ralf Baechle <ralf@gnu.org>
5847
5848 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5849 produces binaries with got[1] = 0x80000001 to differenciate them
5850 for the dynamic linker from the broken binaries produced by old
5851 versions.
5852
5853 2000-09-30 Petr Sorfa <petrs@sco.com>
5854
5855 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5856 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5857 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5858 * configure: Regenerate.
5859
5860 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5861
5862 Define two bfd_targets for absence and presence of leading
5863 underscore on symbols. Make sure to only link same kind.
5864 * elf32-cris.c (cris_elf_object_p,
5865 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5866 cris_elf_merge_private_bfd_data): New.
5867 (elf_backend_object_p, elf_backend_final_write_processing,
5868 bfd_elf32_bfd_print_private_bfd_data,
5869 bfd_elf32_bfd_merge_private_bfd_data): Define.
5870 <Target vector definition>: Include elf32-target.h twice with
5871 different macro settings:
5872 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5873 bfd_elf32_us_cris_vec.
5874 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5875 (elf_symbol_leading_char): First as 0, then '_'.
5876 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5877 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5878 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5879 * configure: Regenerate.
5880 * targets.c: Declare bfd_elf32_us_cris_vec.
5881 * po/bfd.pot: Regenerate.
5882
5883 2000-09-29 Momchil Velikov <velco@fadata.bg>
5884
5885 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5886 R_ARM_THM_PC22 relocations.
5887
5888 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5889
5890 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5891
5892 2000-09-29 Momchil Velikov <velco@fadata.bg>
5893
5894 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5895 is has the SEC_HAS_CONTENTS flag set.
5896
5897 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5898 Hans-Peter Nilsson <hp@axis.com>
5899
5900 * aout-cris.c (N_TXTADDR): Define.
5901
5902 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5903
5904 * som.c: Include alloca-conf.h.
5905 * Makefile.am: "make dep-am"
5906 * Makefile.in: Regenerate.
5907
5908 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5909
5910 * elf32-hppa.c (plt_stub): New.
5911 (PLT_STUB_ENTRY): Define.
5912 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5913 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5914 (elf32_hppa_link_hash_table_create): Init to suit.
5915 (elf32_hppa_check_relocs): Set has_12bit_branch and
5916 has_17bit_branch as appropriate.
5917 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5918 non-local functions.
5919 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5920 Add space for plt_stub as needed.
5921 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5922 functions at plt_stub.
5923 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5924 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5925
5926 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5927 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5928 of fixed size, and if negative, disable handling of input sections
5929 before stub section. Set up default stub group size depending
5930 on detected branch relocs.
5931 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5932 ensure different offsets from sym_value aren't rounded to
5933 different 2k blocks. Use lrsel and rrsel for other stubs too for
5934 consistency rather than necessity.
5935 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5936 (final_link_relocate): Likewise.
5937 (elf32_hppa_relocate_section): Likewise.
5938
5939 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5940 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5941 (elf_hppa_final_link_relocate): Handle them.
5942 (elf_hppa_relocate_insn): Likewise.
5943 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5944
5945 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5946
5947 * elfcode.h (elf_object_p): Preserve and clear abfd section
5948 information. Restore at error.
5949
5950 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5951
5952 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5953 is empty, make sure that its rva also 0. NT loader dislikes
5954 having otherwise.
5955
5956 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5957
5958 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5959 global by default.
5960
5961 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5962
5963 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5964 currently unused RELATIVE_DYNAMIC_RELOCS code.
5965 (hppa_discard_copies): Likewise.
5966 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5967 comments. Don't check non-code output sections for stub grouping.
5968
5969 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5970
5971 * section.c (bfd_get_unique_section_name): Return NULL if
5972 bfd_malloc fails.
5973
5974 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5975
5976 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5977 instruction sequence to actually work.
5978 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5979 accordingly.
5980
5981 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5982
5983 * elf32-sh.c (sh_elf_relocate_section): Use
5984 _bfd_final_link_relocate to apply the relocation against a section
5985 symbol, when doing relocatable links.
5986
5987 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5988
5989 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5990 to id_sec.
5991 (stub_hash_newfunc): Here too.
5992 (hppa_add_stub): And here.
5993 (elf32_hppa_link_hash_table): Remove stub_section_created,
5994 reloc_section_created, first_init_sec and first_fini_sec. Add
5995 stub_group.
5996 (elf32_hppa_link_hash_table_create): Init to suit.
5997 (hppa_get_stub_entry): Add support for grouping stub sections.
5998 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5999 section code. Index stub vars by section->id.
6000 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
6001 exit paths. Zap allocation of above removed vars. Refine
6002 link-once test.
6003
6004 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6005 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6006 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6007 rather than pointer to bfd_link_info.
6008 (hppa_add_stub): Likewise.
6009 (final_link_relocate): Likewise.
6010
6011 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
6012
6013 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6014 link-once sections.
6015
6016 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
6017
6018 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6019 ld/emulparams/shelf.sh.
6020
6021 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6022
6023 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6024 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6025 * bfd-in2.h: Regenerate.
6026
6027 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
6028
6029 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6030 LITUSE relocations incorrectly if -relax is specified on the ld
6031 command line and the displacement field of the load or store
6032 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6033
6034 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6035
6036 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6037 first_fini_sec here.
6038 (elf32_hppa_size_stubs): Instead correctly find the first .init
6039 and .fini section here.
6040
6041 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6042
6043 * elf32-hppa.c (clobber_millicode_symbols): New function.
6044 (elf32_hppa_size_dynamic_sections): Call it.
6045
6046 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6047
6048 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6049 packed. Add plabel, plt_abs packed booleans.
6050 (hppa_link_hash_newfunc): Init new fields.
6051 (PLABEL_PLT_ENTRY_SIZE): Define.
6052 (hppa_stub_name): Use size_t len vars.
6053 (hppa_add_stub): Likewise.
6054 (elf32_hppa_build_stubs): Likewise.
6055 (hppa_build_one_stub): Kill some compiler warnings.
6056 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6057 if dynamic linking. Munge the local plt offsets into
6058 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6059 size_t len vars. Add assert for plabel addend.
6060 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6061 (elf32_hppa_hide_symbol): New function.
6062 (elf_backend_hide_symbol): Define.
6063 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6064 with h->plabel set. Don't make plt entries to have dynamic syms
6065 when they have been forced local. If plt entry is used by a
6066 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6067 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6068 Set up .plt offsets for local syms.
6069 (elf32_hppa_relocate_section): Initialise plt entries for local
6070 syms. Leave weak undefined plabels zero. Make global plabel
6071 relocs against function symbol, and leave the addend zero.
6072 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6073 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6074 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6075 relocs instead of SEGREL32 for dynamic got relocs.
6076 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6077 (elf_backend_got_header_size): Adjust.
6078 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6079
6080 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6081 (hppa_type_of_stub): Use it instead of #if 0
6082 (hppa_discard_copies): Use it here too.
6083 (elf32_hppa_size_dynamic_sections): And here.
6084
6085 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6086 (elf32_hppa_link_hash_table_create): And here.
6087 (hppa_build_one_stub): And here. Instead keep track of stub
6088 offset using _raw_size.
6089 (elf32_hppa_size_stubs): Likewise.
6090 (elf32_hppa_build_stubs): Likewise.
6091 (hppa_size_one_stub): Likewise. Resize reloc section too.
6092
6093 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6094 first_fini_sec handling. Don't search for reloc section or set
6095 hplink->reloc_section_created here.
6096 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6097 set reloc_section_created here.
6098 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6099 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6100 and DT_FINI.
6101 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6102
6103 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6104 with `hplink->root.'.
6105 (elf32_hppa_check_relocs): Likewise.
6106 (elf32_hppa_gc_sweep_hook): Likewise.
6107 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6108 (hppa_handle_PIC_calls): Likewise.
6109 (elf32_hppa_size_dynamic_sections): Likewise.
6110 (elf32_hppa_set_gp): Likewise.
6111 (elf32_hppa_relocate_section): Likewise.
6112 (elf32_hppa_finish_dynamic_symbol): Likewise.
6113 (elf32_hppa_finish_dynamic_sections): Likewise.
6114
6115 From David Huggins-Daines <dhd@linuxcare.com>
6116 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6117 defined weak symbols in shared links.
6118 (final_link_relocate): Calls to defined weak symbols in shared
6119 objects must go via import stubs, as the target might not be known
6120 at link time.
6121
6122 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6123
6124 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6125 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6126 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6127 the original entries with EMPTY_HOWTOs, and added new ones to fill
6128 in the gap.
6129 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6130 (sh_elf_relocate_section): Likewise.
6131
6132 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6133
6134 * cpu-mips.c (arch_info_struct): Add mips:4K
6135 * bfd-in2.h (bfd_mach_mips4K): New define.
6136 * archures.c: Add bfd_mach_mips4K to comment.
6137 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6138 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6139
6140 2000-09-13 Marco Franzen <marcof@thyron.com>
6141
6142 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6143 use size_t as a counter.
6144 (som_write_space_strings): Similarly.
6145
6146 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6147
6148 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6149 and prototype.
6150 (elf32_i860_relocate_section): Invoke new function from here.
6151
6152 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6153
6154 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6155 static.
6156
6157 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6158
6159 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6160 target section name instead of dumping core when the target symbol is
6161 undefined.
6162
6163 2000-09-09 Kazu Hirata <kazu@hxi.com>
6164
6165 * riscix.c: Remove DEFUN.
6166
6167 2000-09-08 Nick Clifton <nickc@redhat.com>
6168
6169 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6170 initialise flags in output bfd if the input bfd is the default
6171 architecture with the default flags.
6172
6173 2000-09-08 Kazu Hirata <kazu@hxi.com>
6174
6175 * archive.c: Fix formatting.
6176 * coff-arm.c: Likewise.
6177 * doc/chew.c: Likewise.
6178
6179 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6180
6181 * section.c (bfd_get_unique_section_name): Put a dot before the
6182 numeric suffix.
6183
6184 2000-09-07 Kazu Hirata <kazu@hxi.com>
6185
6186 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6187 * elf.c: Fix formatting.
6188
6189 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6190
6191 * config.bfd (sh-*-linux*): Added.
6192 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6193 * targets.c: Declare them.
6194 * elf32-sh-lin.c: New file.
6195 * Makefile.am: Compile it.
6196 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6197 * configure, Makefile.in: Rebuilt.
6198
6199 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6200
6201 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6202 pseduo-section when determining where the TOC ends.
6203
6204 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6205 output x_tvndx as it is only two bytes wide.
6206
6207 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6208 reloc is 26 or 32 bits wide.
6209
6210 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6211 for relocs that don't change anything. Also look at the full
6212 6 bits of bitsize.
6213
6214 2000-09-06 Philip Blundell <philb@gnu.org>
6215
6216 * config.bfd (arm*-*-uclinux*): New target.
6217
6218 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6219
6220 * configure: Rebuilt with new libtool.m4.
6221
6222 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6223
6224 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6225 word for variable name.
6226 * bfd-in2.h: Regenerate.
6227
6228 2000-09-05 Nick Clifton <nickc@redhat.com>
6229
6230 * config.in: Regenerate.
6231 * libbfd.h: Regenerate.
6232 * po/bfd.pot: Regenerate.
6233 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6234 local versions.
6235
6236 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6237
6238 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6239
6240 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6241
6242 Shared library and PIC support.
6243 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6244 (GOT_ENTRY_SIZE): New.
6245 (ELF_DYNAMIC_INTERPRETER): New.
6246 (STUB_SUFFIX): Define.
6247 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6248 (RELATIVE_DYNAMIC_RELOCS): Define.
6249 (enum elf32_hppa_stub_type): New.
6250 (struct elf32_hppa_stub_hash_entry): Rename offset to
6251 stub_offset. Add a number of new fields.
6252 (struct elf32_hppa_link_hash_entry): New.
6253 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6254 global_value.
6255 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6256 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6257 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6258 new fields.
6259 (hppa_link_hash_newfunc): New function.
6260 (elf32_hppa_link_hash_table_create): Use above function. Init new
6261 fields.
6262 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6263 instead of addend, and remove sym_name from args. Don't use
6264 symbol name for local syms, instead use sym index.
6265 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6266 stub type rather than size. Pass in hash and handle import stub
6267 case. Also pass in reloc instead of offset so we can calculate
6268 PCREL22F and PCREL12F branches properly.
6269 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6270 import and export stubs too.
6271 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6272 import and export stub sizing.
6273 (elf32_hppa_check_relocs): New function.
6274 (elf32_hppa_adjust_dynamic_symbol): New function.
6275 (hppa_discard_copies): New function.
6276 (elf32_hppa_size_dynamic_sections): New function.
6277 (elf_backend_size_dynamic_sections): Define.
6278 (elf32_hppa_finish_dynamic_symbol): New function.
6279 (elf_backend_finish_dynamic_symbol): Define.
6280 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6281 some local vars into the link hash table too. For shared links,
6282 trundle over function syms, generating export stubs. Handle
6283 PCREL22F branches. Break out stub creation code from here..
6284 (hppa_add_stub): .. to here. New function.
6285 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6286 call the bfd linker. Use elf_gp to record global pointer.
6287 Calculate a value from sections if $global$ is missing.
6288 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6289 (elf32_hppa_gc_mark_hook): New function.
6290 (elf_backend_gc_mark_hook): Define.
6291 (elf32_hppa_gc_sweep_hook): New function.
6292 (elf_backend_gc_sweep_hook): Define.
6293 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6294 Add rel to args, and remove howto, input_bfd, offset, addend,
6295 sym_name as we can recalculate these locally. Handle calls to
6296 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6297 handling of undefined weak syms. Check that stubs are in range.
6298 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6299 message on hitting a DPREL21L reloc that needs fixing. Subtract
6300 off PC for PCREL14F. Break out code that does a stub lookup from
6301 here..
6302 (hppa_get_stub_entry): ..to here. New function.
6303 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6304 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6305 relocs, etc. etc.
6306 (elf32_hppa_finish_dynamic_sections): New function.
6307 (elf_backend_finish_dynamic_sections): Define.
6308 (elf_backend_final_write_processing) Define.
6309 (hppa_handle_PIC_calls): New function.
6310 (elf32_hppa_build_stubs): Call it. Pass link_info to
6311 hppa_build_one_stub.
6312 (elf32_hppa_create_dynamic_sections): New function
6313 to create .plt and .got then set .plt flags correctly.
6314 (elf_backend_create_dynamic_sections): Define.
6315 (elf32_hppa_object_p): New function.
6316 (elf_backend_object_p): Define.
6317 (elf32_hppa_elf_get_symbol_type): New function.
6318 (elf_backend_get_symbol_type): Define.
6319 (elf_backend_can_gc_sections): Define.
6320 (elf_backend_want_got_plt): Define.
6321 (elf_backend_plt_alignment): Set to 2.
6322 (elf_backend_plt_readonly): Define.
6323 (elf_backend_want_plt_sym): Define.
6324 (elf_backend_got_header_size): Reserve one entry.
6325
6326 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6327 (elf32_hppa_size_stubs): Pass in multi_subspace.
6328 (elf32_hppa_set_gp): Declare.
6329
6330 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6331 (bfd_get_unique_section_name): New function.
6332 * bfd-in2.h: Regenerate.
6333
6334 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6335 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6336 comment.
6337
6338 From David Huggins-Daines <dhd@linuxcare.com>
6339 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6340 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6341 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6342 been updated in finish_dynamic_symbol before modifying function
6343 symbol.
6344
6345 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6346 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6347 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6348 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6349 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6350 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6351 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6352 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6353
6354 From David Huggins-Daines <dhd@linuxcare.com>
6355 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6356 style of local labels as well.
6357
6358 2000-09-03 Philip Blundell <philb@gnu.org>
6359
6360 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6361 references to undefined symbols in debugging sections.
6362
6363 2000-09-02 H.J. Lu <hjl@gnu.org>
6364
6365 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6366 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6367 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6368 section.
6369
6370 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6371
6372 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6373 (elf32_i860_is_local_label_name): New function and prototype.
6374
6375 2000-09-02 Nick Clifton <nickc@redhat.com>
6376
6377 * configure.in: Increase version number to 2.10.91.
6378 * configure: Regenerate.
6379 * aclocal.m4: Regenerate.
6380 * config.in: Regenerate.
6381 * po/bfd.pot: Regenerate.
6382
6383 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6384
6385 * elf.c (_bfd_elf_make_section_from_shdr): Add
6386 .gnu.linkobce.wi. to the list of debug section names.
6387
6388 2000-09-02 Nick Clifton <nickc@redhat.com>
6389
6390 * dwarf2.c (find_debug_info): New function: Locate a section
6391 containing dwarf2 debug information.
6392 (bfd_dwarf2_find_nearest_line): Find all sections containing
6393 debug information and include them in the stash.
6394
6395 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6396
6397 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6398 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6399 (sh_reloc_map): Add new relocs.
6400 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6401 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6402 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6403 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6404 functions.
6405 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6406 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6407 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6408 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6409 New array constants.
6410 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6411 New variables.
6412 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6413 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6414 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6415 elf_sh_plt_reloc_offset): Define.
6416 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6417 elf_sh_link_hash_table): New structs.
6418 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6419 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6420 relocation types.
6421 (elf_backend_create_dynamic_sections,
6422 bfd_elf32_bfd_link_hash_table_create,
6423 elf_backend_adjust_dynamic_symbol,
6424 elf_backend_size_dynamic_sections,
6425 elf_backend_finish_dynamic_symbol,
6426 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6427 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6428 elf_backend_got_header_size, elf_backend_plt_header_size):
6429 Define.
6430 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6431 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6432 New relocs.
6433 * bfd-in2.h, libbfd.h: Rebuilt.
6434
6435 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6436
6437 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6438 change.
6439
6440 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6441
6442 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6443 not initialized, set them to indicate the SH1 instruction set.
6444
6445 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6446
6447 * acinclude.m4: Include libtool and gettext macros from the
6448 top level.
6449 * aclocal.m4, configure: Rebuilt.
6450
6451 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6452
6453 * elf.c: Eliminate references to __sparcv9 macro; replace with
6454 autoconf variables HAVE_PSINFO32_T etc.
6455 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6456 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6457 * config.in: Ditto.
6458 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6459 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6460 * aclocal.m4: Ditto.
6461 * configure: Regenerate.
6462
6463 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6464
6465 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6466 for any shared link, not just shared -Bsymbolic.
6467 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6468 any shared link, and pass link info to it.
6469 (elf_i386_size_dynamic_sections): Update comment.
6470 (elf_i386_discard_copies): Modify to discard relocs for symbols
6471 that have been forced local.
6472 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6473 that have been forced local.
6474
6475 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6476
6477 * elflink.h (elf_link_add_object_symbols): Allow common
6478 symbols to have an alignment of 1 if explicitly requested, and
6479 not overridden by other definitions.
6480
6481 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6482
6483 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6484 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6485
6486 2000-08-22 H.J. Lu <hjl@gnu.org>
6487
6488 * elf-bfd.h (elf_link_hash_table): Add runpath.
6489
6490 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6491 * bfd-in2.h: Rebuilt.
6492
6493 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6494 "runpath" field to NULL.
6495 (bfd_elf_get_runpath_list): New function.
6496
6497 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6498 DT_RUNPATH entries.
6499
6500 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6501
6502 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6503 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6504 explicitly. Improve validation of r_type.
6505
6506 2000-08-21 H.J. Lu <hjl@gnu.org>
6507
6508 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6509 dynamic allocated content space. Add a comment to remind us that
6510 one day this ought to be fixed.
6511 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6512 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6513 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6514
6515 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6516
6517 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6518 field with the newly relocated value instead of adding it to the
6519 existing immediate field.
6520 (elf32_i860_relocate_splitn): Likewise.
6521 (elf32_i860_relocate_highadj): Likewise.
6522
6523 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6524
6525 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6526 was previously just a stub).
6527
6528 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6529
6530 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6531 Formatting fixes.
6532 (_bfd_elf_create_dynamic_sections): Likewise.
6533
6534 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6535
6536 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6537 for undefined symbols to be the beginning of the section.
6538
6539 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6540 four extra entries at the beginning of the .rela.plt section.
6541 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6542 section to account for the four reserved entries in the .plt section.
6543
6544 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6545
6546 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6547 to the list of NOPs we recognize after a branch-and-link.
6548 Use the ori NOP when one is needed.
6549
6550 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6551 for large archives.
6552
6553 2000-08-14 Jim Wilson <wilson@cygnus.com>
6554
6555 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6556 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6557 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6558 EF_IA_64_ABSOLUTE.
6559
6560 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6561
6562 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6563
6564 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6565
6566 * elf32-i860.c (elf32_i860_relocate_section): New function.
6567 (i860_final_link_relocate): New function.
6568 (elf32_i860_relocate_splitn): New function.
6569 (elf32_i860_relocate_pc16): New function.
6570 (elf32_i860_relocate_highadj): New function.
6571 (elf32_i860_howto): Minor adjustments to some relocations.
6572 (elf_info_to_howto_rel): Define.
6573 (elf_backend_relocate_section): Define.
6574
6575 2000-08-10 Nick Clifton <nickc@cygnus.com>
6576
6577 * elf32-arm.h: Fix formatting.
6578
6579 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6580
6581 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6582
6583 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6584
6585 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6586
6587 2000-08-07 Kazu Hirata <kazu@hxi.com>
6588
6589 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6590 * elf64-ia64.c: Fix a typo.
6591
6592 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6593
6594 * elf32-i860.c (elf32_i860_howto_table): New structure.
6595 (lookup_howto): New function.
6596 (elf32_i860_reloc_type_lookup): New function.
6597 (elf32_i860_info_to_howto_rela): New function.
6598 (elf_code_to_howto_index): New structure.
6599 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6600 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6601 elf32_i860_reloc_type_lookup.
6602
6603 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6604
6605 * som.c (struct fixup_format): Constify `format'.
6606 (som_hppa_howto_table): Use SOM_HOWTO macro.
6607 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6608 (som_bfd_reloc_type_lookup): Likewise.
6609 (compare_subspaces): Remove unused `count1', `count2'.
6610 (som_begin_writing): Remove unused `total_reloc_size'.
6611 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6612 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6613 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6614 (som_find_nearest_line): Decorate unused parameter(s).
6615 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6616 (som_bfd_link_split_section): Likewise.
6617
6618 2000-08-03 Nick Clifton <nickc@cygnus.com>
6619
6620 * section.c: Restore backed out code.
6621 * elf.c: Restore backed out code.
6622 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6623 binaries from working.
6624 * bfd-in2.h: Regenerate.
6625
6626 2000-08-03 H.J. Lu <hjl@gnu.org>
6627
6628 * section.c: Back out the change made by Nick Clifton
6629 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6630 binaries.
6631 * bfd-in2.h: Likewise.
6632 * elf.c: Likewise.
6633
6634 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6635
6636 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6637
6638 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6639
6640 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6641 * bfd-in2.h, libbfd.h: Regenerate.
6642
6643 2000-07-31 Nick Clifton <nickc@cygnus.com>
6644
6645 * section.c (struct sec): Add new boolean field 'segment_mark'.
6646 (STD_SECTION): Initialise new field to zero.
6647
6648 * bfd-in2.h: Regenerate.
6649
6650 * elf.c (copy_private_bfd_data): Reorganise section to segment
6651 mapping to cope with moved sections requiring new segments,
6652 and overlapping segments.
6653 (SEGMENT_END): New macro: Return the end address of a segment.
6654 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6655 contains a section by comparing their VMA addresses.
6656 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6657 contains a section by comparing their LMA addresses.
6658 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6659 section should be included in a segment.
6660 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6661 follows another in memory.
6662 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6663 segments overlap.
6664
6665 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6666
6667 * cpu-i860.c: Added comments.
6668
6669 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6670 bfd_elf32_i860_little_vec.
6671 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6672 (ELF_MAXPAGESIZE): Changed to 4096.
6673
6674 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6675 new target.
6676 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6677
6678 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6679 config for little endian elf32 i860.
6680 (targ_defvec): Define for the new config above
6681 as "bfd_elf32_i860_little_vec".
6682 (targ_selvecs): Define for the new config above
6683 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6684
6685 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6686 of new target vec.
6687
6688 * configure: Regenerated.
6689
6690 2000-07-27 H.J. Lu <hjl@gnu.org>
6691
6692 * elflink.h (elf_merge_symbol): Take one more argument,
6693 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6694 entry. Don't overide the existing weak definition if dt_needed
6695 is true.
6696 (elf_link_add_object_symbols): Pass dt_needed to
6697 elf_merge_symbol ().
6698
6699 2000-07-27 Nick Clifton <nickc@cygnus.com>
6700
6701 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6702 allocated contents.
6703
6704 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6705
6706 * configure.host (*-*-aix*): AIX has 'long long' always.
6707
6708 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6709 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6710 (xcoff_write_archive_contents_big): Don't update the offset
6711 of the symbol table, xcoff_write_armap will do it.
6712
6713 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6714
6715 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6716 of dynobj for SGI_COMPAT checks.
6717
6718 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6719
6720 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6721 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6722 * bfd-in2.h: Regenerate.
6723
6724 2000-07-21 Nick Clifton <nickc@cygnus.com>
6725
6726 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6727 range symbol indices in relocs and issue an error message.
6728
6729 2000-07-20 H.J. Lu <hjl@gnu.org>
6730
6731 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6732 info->new_dtags when setting DT_FLAGS_1. It will only be set
6733 by the new linker options. It shouldn't break anything.
6734
6735 2000-07-20 H.J. Lu <hjl@gnu.org>
6736
6737 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6738 only if info->new_dtags is true.
6739
6740 2000-07-20 H.J. Lu <hjl@gnu.org>
6741
6742 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6743 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6744
6745 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6746
6747 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6748 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6749 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6750 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6751 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6752 * Makefile.in: Rebuild.
6753 * aclocal.m4: Rebuild.
6754 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6755 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6756 (bfd_cris_arch): Declare.
6757 (bfd_archures_list): Add bfd_cris_arch.
6758 * bfd-in2.h: Rebuild.
6759 * config.bfd: (cris-*-*): New target.
6760 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6761 * configure: Rebuild.
6762 * elf.c (prep_headers): Add bfd_arch_cris.
6763 * libbfd.h: Rebuild.
6764 * libaout.h (enum machine_type): Add M_CRIS.
6765 * reloc.c: Add CRIS relocations.
6766 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6767 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6768 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6769 * po/POTFILES.in, po/bfd.pot: Regenerate.
6770
6771 2000-07-19 H.J. Lu <hjl@gnu.org>
6772
6773 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6774 DF_TEXTREL if DT_TEXTREL is set.
6775 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6776 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6777 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6778 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6779 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6780 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6781 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6782 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6783 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6784 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6785
6786 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6787 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6788 DT_RPATH is set.
6789 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6790
6791 2000-07-19 H.J. Lu <hjl@gnu.org>
6792
6793 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6794 * bfd-in2.h: Rebuild.
6795
6796 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6797 (elf_dt_soname): New.
6798
6799 * elf.c (bfd_elf_set_dt_needed_soname): New.
6800
6801 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6802 entry if the shared object loaded by DT_NEEDED is used to
6803 resolve the reference in a regular object.
6804
6805 2000-07-19 H.J. Lu <hjl@gnu.org>
6806
6807 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6808 DT_DEPAUDIT and DT_AUDIT as strings.
6809
6810 2000-07-19 Nick Clifton <nickc@cygnus.com>
6811
6812 * format.c: Fix formatting.
6813
6814 2000-07-19 H.J. Lu <hjl@gnu.org>
6815
6816 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6817
6818 2000-07-19 H.J. Lu <hjl@gnu.org>
6819
6820 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6821 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6822 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6823 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6824 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6825 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6826 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6827
6828 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6829
6830 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6831 renamed functions from here...
6832 (assign_section_numbers): Use renamed functions.
6833 (prep_headers): Use renamed functions.
6834
6835 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6836 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6837 * bfd-in2.h: Regenerate.
6838
6839 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6840
6841 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6842 parenthesis in if statement.
6843
6844 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6845
6846 Enable the support for Traditional MIPS.
6847 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6848 return ict_none appropriately for traditional mips targets.
6849 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6850 (STUB_MOVE): Conditionalize for traditonal mips.
6851 (STUB_LI16): Likewise.
6852 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6853 room for RTPROC header.
6854 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6855 the permission for the PT_DYNAMIC as read, write and execute.
6856 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6857 for traditonal mips.
6858 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6859 _DYNAMIC_LINKING for traditonal mips.
6860 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6861 in case of traditonal mips.
6862 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6863 entry is required. For a function if PLT is not required then set the
6864 corresponding hash table entry to 0.
6865 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6866 traditonal mips.
6867 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6868 shared object set the value to 0.
6869 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6870 _DYNAMIC_LINKING for traditonal mips.
6871 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6872 for traditonal mips.
6873
6874 2000-07-15 H.J. Lu <hjl@gnu.org>
6875
6876 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6877
6878 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6879
6880 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6881 out a structure that is BFD_IN_MEMORY.
6882
6883 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6884
6885 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6886 bfd pointer. Print section id instead of bfd pointer for local
6887 syms. Prefix addend with `+' for global syms as well as local.
6888 Correct calculation of name component lengths.
6889 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6890
6891 From David Huggins-Daines <dhd@linuxcare.com>
6892 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6893 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6894 (elf64_hppa_modify_segment_map): Likewise.
6895
6896 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6897
6898 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6899 addresses to be "naturally" sign extended. Return -1 if unknown.
6900 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6901 * bfd-in2.h: Regenerate.
6902
6903 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6904
6905 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6906 and ECOF_SIGNED_64 to list ways to extract an offset.
6907 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6908 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6909 Update.
6910 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6911 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6912
6913 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6914
6915 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6916 bfd_get_start_address.
6917 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6918 (elf_swap_ehdr_out): Ditto.
6919
6920 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6921
6922 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6923 compatibility with older binutils.
6924
6925 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6926
6927 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6928 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6929
6930 From Ryan Bradetich <rbradetich@uswest.net>
6931 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6932 (parse_line_table): Ditto.
6933 (_bfd_dwarf1_find_nearest_line): Ditto.
6934 * syms.c (cmpindexentry): Remove extra `*' from params.
6935
6936 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6937
6938 * elf32-mips.c (sort_dynamic_relocs): New Function.
6939 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6940 via qsort to sort the dynamic relocations in increasing r_symndx
6941 value.
6942
6943 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6944
6945 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6946 ATTRIBUTE_UNUSED to unused args.
6947 (get_opd): Likewise.
6948 (get_plt): Likewise.
6949 (get_dlt): Likewise.
6950 (get_stub): Likewise.
6951 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6952 (elf64_hppa_link_output_symbol_hook): Likewise.
6953 (elf64_hppa_check_relocs): Delete unused var.
6954 (elf64_hppa_size_dynamic_sections): Likewise.
6955 (elf64_hppa_finalize_opd): Likewise.
6956 (elf64_hppa_finalize_dynreloc): Likewise.
6957 (elf64_hppa_modify_segment_map): Likewise.
6958 (elf64_hppa_finish_dynamic_sections): Likewise.
6959
6960 * elf-hppa.h (elf_hppa_final_write_processing): Add
6961 ATTRIBUTE_UNUSED to unused args.
6962 (elf_hppa_final_link_relocate): Likewise.
6963 (elf_hppa_record_segment_addrs): Add paretheses.
6964 (elf_hppa_relocate_section): Constify dyn_name.
6965
6966 From David Huggins-Daines <dhd@linuxcare.com>
6967 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6968 rearrange case statement so that it gets preferred to 32-bit ones.
6969
6970 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6971 asection->id instead of address of asection structure.
6972 (elf32_hppa_size_stubs): Likewise.
6973
6974 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6975 for .init* and .fini*.
6976
6977 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6978 and addends used in stub names to 32 bits.
6979 (elf32_hppa_size_stubs): Likewise.
6980
6981 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6982 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6983 not bfd_put_64. Fix minor comment typo and formatting.
6984
6985 Changes to create multiple linker stubs, positioned immediately
6986 before the section where they are required.
6987 * elf32-hppa.c: Don't include hppa_stubs.h.
6988 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6989 (elf32_hppa_stub_hash_table): Delete.
6990 (elf32_hppa_link_hash_entry): Delete.
6991 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6992 stub_hash_table, and store the struct here rather than a pointer.
6993 Delete output_symbol_count. Add offset array. Change
6994 global_value to a bfd_vma.
6995 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6996 (elf32_hppa_stub_hash_traverse): Delete.
6997 (elf32_hppa_name_of_stub): Delete.
6998 (elf32_hppa_link_hash_lookup): Delete.
6999 (elf32_hppa_link_hash_traverse): Delete.
7000 (elf32_hppa_stub_hash_table_init): Delete.
7001 (elf32_hppa_size_of_stub): Pass input section and offset rather
7002 than location and calculate location here. Don't pass name as all
7003 stubs are now the same size.
7004 (elf32_hppa_stub_hash_newfunc): Init new fields.
7005 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7006 too.
7007 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7008 comparing against ints. Rewrite stub handling code.
7009 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7010 Case enums to int before comparing against ints. Remove
7011 bfd_reloc_dangerous case.
7012 (elf32_hppa_build_one_stub): Rewrite.
7013 (elf32_hppa_size_one_stub): New function.
7014 (elf32_hppa_build_stubs): Rewrite.
7015 (elf32_hppa_size_stubs): Pass in linker call-back functions.
7016 Rewrite stub-handling specific code.
7017
7018 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7019
7020 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7021
7022 * hppa_stubs.h: Delete.
7023 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7024 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7025 * Makefile.in: Regenerate.
7026
7027 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7028 e_nlrsel.
7029
7030 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7031
7032 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7033 and section name for bfd_reloc_notsupported error message.
7034 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7035 bfd_reloc_notsupported.
7036 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7037
7038 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7039 undefined weak symbols for all relocs.
7040 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7041 offsets are relative to one past the delay slot.
7042 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7043 branch destination. Put addend into stub name too.
7044 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7045 adjust by 8 when deciding whether a linker stub is needed. Put
7046 addend into stub name as for above.
7047
7048 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7049 various args and vars.
7050 (elf32_hppa_bfd_final_link_relocate): Here too.
7051 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7052 inner block var to avoid shadowing.
7053
7054 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7055 unsigned.
7056 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7057 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7058 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7059
7060 * libhppa.h: Change practically all unsigned ints to plain ints.
7061 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7062 prototypes.
7063
7064 From Ryan Bradetich <rbradetich@uswest.net>
7065 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7066 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7067 suit above.
7068 From David Huggins-Daines <dhd@linuxcare.com>
7069 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7070 to the new OP_* ones.
7071
7072 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7073 error exit. Bail out earlier on plabel relocs that we aren't
7074 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7075 string, and then don't free our copy.
7076 (elf32_hppa_build_one_stub): Make insn unsigned int.
7077
7078 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7079 available with BL, not BE and BLE.
7080
7081 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7082 code for elf arg relocs.
7083 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7084 argument with elf_link_hash_entry h. Handle undefined weak
7085 symbols. Move $global$ lookup from here...
7086 (elf32_hppa_relocate_section): ...to here. Return correct error
7087 message for non-handled relocs.
7088 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7089 wrong test was -0x3ffff to +0x40000.
7090
7091 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7092 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7093 Handle them as such.
7094 (elf_hppa_relocate_insn): Fix a typo.
7095
7096 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7097 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7098 assemble_17, assemble_21): Delete.
7099 Supply defines for all 64 possible opcodes.
7100 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7101 formats. Handle COMICLR.
7102 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7103 -10, -16, 16, 22.
7104
7105 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7106 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7107 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7108 to suit.
7109 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7110 the local syms - did this code get deleted accidentally? Ignore
7111 undefined and undefweak syms.
7112
7113 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7114 block. Use it instead of elf64_hppa_hash_table (info).
7115 (elf_hppa_final_link_relocate): Use hppa_info instead of
7116 elf64_hppa_hash_table (info).
7117
7118 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7119 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7120 (hppa_rebuild_insn): Mask immediate bits here instead.
7121 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7122
7123 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7124
7125 * section.c (struct sec): Add id field. Tidy comment formatting.
7126 (bfd_make_section_anyway): Set id.
7127 (STD_SECTION): Init id too.
7128 Change CONST to const throughout.
7129 * archures.c (bfd_arch_info): Tidy comment.
7130 (bfd_arch_list): Change a CONST to const.
7131 * libbfd-in.h: Tidy comments and replace CONST with const.
7132 * elf-bfd.h: Likewise.
7133 * libbfd.h: Regenerate.
7134 * bfd-in2.h: Regenerate.
7135 * libcoff.h: Regenerate.
7136
7137 2000-07-07 DJ Delorie <dj@redhat.com>
7138
7139 * archive.c (_bfd_write_archive_contents): Add an informative
7140 comment.
7141
7142 2000-07-06 Kazu Hirata <kazu@hxi.com>
7143
7144 * srec.c: Fix formatting.
7145
7146 2000-06-05 DJ Delorie <dj@redhat.com>
7147
7148 * MAINTAINERS: new
7149
7150 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7151
7152 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7153 value of PC-relative offsets.
7154
7155 2000-07-03 Jim Wilson <wilson@cygnus.com>
7156
7157 * elf64-alpha.c (alpha_elf_size_info): New.
7158 (elf_backend_size_info): Define to alpha_elf_size_info.
7159 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7160
7161 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7162
7163 * elf32-mips.c: Include elf32-target.h again for the traditional
7164 MIPS targets.
7165
7166 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7167
7168 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7169 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7170 (avr_info_to_howto_rela): Likewise.
7171 (elf32_avr_gc_mark_hook): Likewise.
7172 (elf32_avr_gc_sweep_hook): Likewise.
7173 (elf32_avr_relocate_section): Likewise.
7174
7175 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7176
7177 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7178 an external symbol for a non-shared, non-relocatable link.
7179
7180 2000-07-03 Nick Clifton <nickc@redhat.com>
7181
7182 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7183 is an external symbol.
7184 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7185 external symbol.
7186
7187 2000-07-03 Kazu Hirata <kazu@hxi.com>
7188
7189 * reloc16.c: Fix formatting.
7190
7191 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7192
7193 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7194 to add a new target for traditional mips i.e
7195 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7196 * configure.in: Likewise.
7197 * configure: Rebuild.
7198 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7199 bfd_target_vector.
7200 (bfd_elf32_tradlittlemips_vec): Likewise.
7201 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7202 to see that elfNN_bed does not get redefined even if the target file
7203 is included twice for a chip. See elf32-mips.c.
7204
7205 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7206
7207 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7208 (CLEANFILES): Add DEPA.
7209 * Makefile.in: Regenerate.
7210
7211 2000-06-30 DJ Delorie <dj@cygnus.com>
7212
7213 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7214 can't assume the PE header is at 0x80.
7215
7216 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7217
7218 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7219
7220 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7221
7222 * go32stub.h: Update stub.
7223
7224 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7225
7226 * archures.c (bfd_mach_avr5): Define.
7227 * bfd-in2.h (bfd_mach_avr5): Define.
7228 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7229 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7230 (compatible): Update comment. Add missing test.
7231 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7232 for avr2 and avr4. Simplify 8K wrap code.
7233 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7234 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7235
7236 2000-06-26 Kazu Hirata <kazu@hxi.com>
7237
7238 * coff-h8300.c: Fix formatting.
7239 * cpu-h8300.c: Likewise.
7240
7241 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7242
7243 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7244 for local symbols whose names are unknown.
7245
7246 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7247
7248 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7249 find one.
7250 * Makefile.in: Regenerate.
7251 * doc/Makefile.in: Regenerate.
7252
7253 2000-06-20 H.J. Lu <hjl@gnu.org>
7254
7255 * Makefile.am: Rebuild dependency.
7256 * Makefile.in: Rebuild.
7257
7258 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7259
7260 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7261 (elf_backend_copy_indirect_symbol): Map to the new function.
7262
7263 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7264
7265 * archive.c (normalize): Correct pointer comparison when checking
7266 for backslashes.
7267 (bfd_bsd_truncate_arname): Likewise.
7268 (bfd_gnu_truncate_arname): Likewise.
7269
7270 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7271
7272 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7273 sections elf_{text,data}_{section,symbol}.
7274 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7275 (_bfd_mips_elf_hide_symbol): New function.
7276 (elf_backend_hide_symbol): Map to the new function.
7277 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7278 definitions of mips_elf_{text,data}_{section,symbol}.
7279 (mips_elf_local_relocation_p): Try to find the direct symbol
7280 based on new check_forced argument.
7281 (mips_elf_calculate_relocation): Use new version of
7282 mips_elf_local_relocation_p.
7283 (mips_elf_relocate_section): Likewise.
7284 (_bfd_mips_elf_relocate_section): Likewise.
7285 (mips_elf_sort_hash_table): Only assert that have enough GOT
7286 space.
7287 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7288 entry if the relocation based on the new external argument.
7289 (mips_elf_create_dynamic_relocation): Assert that we have a
7290 section contents allocated where we can swap out the dynamic
7291 relocations.
7292 (mips_elf_calculate_relocation): Find the real hash-table entry
7293 correctly by using h->root.root.type. Only create a dynamic
7294 relocation entry if the symbol is defined in a shared library.
7295 Create an external GOT entry for the GOT16 relocation if the
7296 symbol was forced local.
7297 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7298 dynamic index if the symbol was forced local.
7299
7300 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7301
7302 * elf32-mips.c: Fix typos in comments.
7303
7304 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7305
7306 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7307 CORE_VERSION_1.
7308
7309 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7310
7311 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7312 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7313 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7314 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7315 (bfd_elf32_m68hc11_vec): Likewise.
7316 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7317 Supports 68hc11 & 68hc12 at the same time.
7318 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7319 bfd_target_vector.
7320 (bfd_elf32_m68hc11_vec): Likewise.
7321 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7322 * archures.c (bfd_m68hc12_arch): Define and register in global list
7323 (bfd_m68hc11_arch): Likewise.
7324 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7325 BFD_RELOC_M68HC11_3B): Define.
7326 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7327 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7328
7329 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7330
7331 * elf_bfd.h (struct elf_backend_data): Add info argument to
7332 elf_backend_hide_symbol.
7333 (_bfd_elf_link_hash_hide_symbol): Likewise.
7334 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7335 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7336 * elflink.h (elf_link_add_object_symbols): Likewise.
7337 (elf_link_assign_sym_version): Likewise.
7338
7339 2000-06-18 H.J. Lu <hjl@gnu.org>
7340
7341 * coff-i386.c (coff_i386_reloc): Don't return in case of
7342 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7343 Compensate PE relocations when linking with non-PE object
7344 files to generate a non-PE executable.
7345
7346 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7347
7348 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7349 GOT entries if we're doing a static link or -Bsymbolic link.
7350
7351 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7352
7353 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7354 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7355 available.
7356 (elf_link_output_relocs): Likewise.
7357 (elf_reloc_link_order): Likewise.
7358
7359 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7360
7361 * archures.c (enum bfd_architecture): #define constants for
7362 PowerPc and RS6000 machine numbers.
7363 * bfd-in2.h: Regenerate.
7364 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7365 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7366 and RS6000 machine numbers using #defined constants from
7367 archures.c.
7368 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7369 machine numbers using #defined constants from archures.c. Add
7370 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7371 64-bit words in 620 entry.
7372 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7373 RSC, and RS2.
7374 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7375
7376 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7377
7378 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7379 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7380 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7381
7382 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7383
7384 * bfd-in.h (bfd_family_coff): Define.
7385 * bfd-in2.h: Regenerate.
7386 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7387 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7388 instead of bfd_target_coff_flavour.
7389 * cofflink.c (_bfd_coff_final_link): Likewise.
7390 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7391 exclude XCOFF files.
7392 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7393 Likewise.
7394 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7395 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7396 * xcofflink.c (XCOFF_XVECP): Delete.
7397 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7398 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7399 bfd_xcoff_record_link_assignment,
7400 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7401 check for bfd_target_xcoff_flavour.
7402
7403 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7404
7405 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7406 files on AIX 4.3.
7407 (read_hdr): New function.
7408 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7409 of trying to extract individual registers. Set abfd->arch_info
7410 to match the architecture that created the core file.
7411 (rs6000coff_get_section_contents): Delete.
7412 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7413
7414 2000-06-14 H.J. Lu <hjl@gnu.org>
7415
7416 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7417 is NULL.
7418
7419 2000-06-13 H.J. Lu <hjl@gnu.org>
7420
7421 * configure: Regenerate.
7422
7423 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7424
7425 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7426 armpei_little_vec.
7427
7428 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7429
7430 * configure.in (VERSION): Update to show this is the CVS mainline.
7431
7432 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7433
7434 * elf32-d10v.c: Include elf/d10v.h
7435 (enum reloc_type): Delete.
7436 * elf32-d30v.c: Include elf/d30v.h
7437 (enum reloc_type): Delete.
7438
7439 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7440 * Makefile.in: Regenerate.
7441
7442 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7443 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7444 move HOWTOs into elf_howto_table.
7445 (R_386_standard, R_386_ext_offset): Define.
7446 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7447 (elf_i386_reloc_type_lookup): Modify calculation of index into
7448 elf_howto_table since we've removed the padding.
7449 (elf_i386_info_to_howto_rel): Likewise.
7450 (elf_i386_relocate_section): Likewise.
7451
7452 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7453
7454 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7455
7456 2000-06-05 H.J. Lu <hjl@gnu.org>
7457
7458 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7459 an error when seeing an undefined symbol with hidden/internal
7460 attribute. It is handled in *_relocate_section ().
7461
7462 2000-06-05 H.J. Lu <hjl@gnu.org>
7463
7464 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7465 indirect symbol for the ELF_LINK_NON_ELF bit.
7466 (elf_link_output_extsym): Don't output the indirect symbol even
7467 if the ELF_LINK_NON_ELF bit is set.
7468
7469 2000-06-01 J.T. Conklin <jtc@redback.com>
7470
7471 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7472 (i[3456]86-*-netbsdaout*): New target.
7473 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7474 (i[3456]86-*-openbsd*): Likewise.
7475
7476 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7477
7478 * trad-core.c: From hpux-core.c, include <dirent.h> or
7479 <sys/ndir.h> when possible.
7480
7481 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7482
7483 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7484 definitions. We must not assume they are sorted in the file
7485 according to their index numbers.
7486
7487 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7488
7489 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7490 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7491 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7492
7493 2000-05-30 Nick Clifton <nickc@cygnus.com>
7494
7495 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7496 80960CA, 80960MC as valid machine names.
7497
7498 2000-05-30 H.J. Lu <hjl@gnu.org>
7499
7500 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7501 visibility bits if the symbol is undefined. Correctly handle
7502 weak undefined symbols with hidden and internal attributes.
7503
7504 * elflink.h (elf_link_add_object_symbols): Always turn the
7505 symbol into local if it has the hidden or internal attribute.
7506
7507 2000-05-29 Philip Blundell <philb@gnu.org>
7508
7509 * ppcboot.c: Add packed attribute if compiling with GCC.
7510
7511 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7512
7513 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7514
7515 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7516
7517 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7518 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7519 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7520 a few old comments.
7521
7522 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7523
7524 * Makefile.am: Update dependencies with "make dep-am"
7525 * Makefile.in: Regenerate.
7526
7527 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7528 bindtextdomain): Replace defines with those from intl/libgettext.h
7529 to quieten gcc warnings.
7530
7531 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7532
7533 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7534
7535 * archive.c (normalize, bfd_bsd_truncate_arname,
7536 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7537 file names with backslashes.
7538
7539 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7540 before opening it.
7541
7542 * sysdep.h: Include filenames.h.
7543
7544 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7545
7546 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7547
7548 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7549
7550 * elf64-sparc.c (sparc64_elf_relax_section): New.
7551 (sparc64_elf_relocate_section): Optimize tail call into branch always
7552 if possible.
7553 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7554 (elf32_sparc_relax_section): New.
7555
7556 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7557
7558 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7559 Remove unusued variables.
7560 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7561 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7562 previous fix, so that shared libs really don't influence targets
7563 extension mask and memory model.
7564
7565 2000-05-23 H.J. Lu <hjl@gnu.org>
7566
7567 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7568 h->root.other not h->other.
7569 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7570
7571 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7572
7573 2000-05-23 H.J. Lu <hjl@gnu.org>
7574
7575 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7576 undefined symbol with the non-default visibility attributes.
7577 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7578 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7579 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7580 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7581 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7582 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7583 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7584 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7585 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7586 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7587 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7588
7589 2000-05-22 Richard Henderson <rth@cygnus.com>
7590
7591 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7592 PCREL22, PCREL64I. Zero size of special relocs.
7593 (elf64_ia64_reloc_type_lookup): Likewise.
7594 (USE_BRL, oor_brl, oor_ip): New.
7595 (elf64_ia64_relax_section): New.
7596 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7597 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7598 (elf64_ia64_relocate_section): Likewise.
7599 (bfd_elf64_bfd_relax_section): New.
7600 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7601 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7602 * bfd-in2.h, libbfd.h: Regenerate.
7603
7604 2000-05-22 Nick Clifton <nickc@cygnus.com>
7605
7606 * configure.in : Add peigen.lo to MIPS PE targets.
7607 * configure: Regenerate.
7608
7609 2000-05-22 Momchil Velikov <velco@fadata.bg>
7610
7611 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7612 only if it is known for both input and output bfds. Separate
7613 error message strings as in some languages, it may be necessary
7614 to change more than one place in the string to change between
7615 'big' and 'little'.
7616
7617 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7618 endianess checks, call _bfd_generic_verify_endian_match() instead.
7619
7620 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7621
7622 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7623
7624 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7625 endianess before checking bfd flavours.
7626
7627 2000-05-22 H.J. Lu <hjl@gnu.org>
7628
7629 * elflink.h (elf_link_output_extsym): Clear the visibility
7630 field for symbols not defined locally.
7631
7632 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7633
7634 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7635 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7636 (hppa_rebuild_insn): Mask immediate bits here instead.
7637 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7638
7639 2000-05-18 Momchil Velikov <velco@fadata.bg>
7640
7641 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7642 relocs for an executable, ensure that they are virtual addresses.
7643
7644 2000-05-18 Jeffrey A Law (law@cygnus.com)
7645
7646 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7647
7648 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7649 Rick Gorton <gorton@scrugs.lkg.dec.com>
7650
7651 * elflink.h: Add emitrelocations support: when enabled, relocation
7652 information and relocation sections are put into final output
7653 executables. If the emitrelocations flag is set, do the following:
7654 (elf_bfd_final_link): Emit relocation sections.
7655 (elf_link_input_bfd): Compute relocation section contents.
7656 (elf_gc_sections): Don't clean relocation sections.
7657
7658 2000-05-16 Catherine Moore <clm@cygnus.com>
7659
7660 * som.c (som_decode_symclass): Recognize weak symbols.
7661
7662 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7663
7664 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7665 read idata section only from dataoff.
7666 (pe_print_edata): Correctly check for valid eat_member.
7667
7668 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7669
7670 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7671
7672 2000-05-14 Philip Blundell <philb@gnu.org>
7673
7674 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7675
7676 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7677
7678 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7679
7680 * peigen.c (pe_print_idata): Look for .idata section and print
7681 info even if data directory has zero entries. Read idata section
7682 starting from dataoff, and adjust all data offsets to suit. Cast
7683 all bfd_vma vars to unsigned long before passing to fprintf.
7684 * peigen.c (pe_print_edata): Similarly, look for .edata section
7685 and print info even if data directory has zero entries. Cast
7686 all bfd_vma vars to unsigned long before passing to fprintf.
7687
7688 From Szabolcs Szakacsits <szaka@F-Secure.com>
7689 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7690 directory size which may be bogus.
7691 * peigen.c (pe_print_edata): Similarly.
7692
7693 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7694
7695 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7696 section is empty.
7697 (copy_private_bfd_data): Allow for space possibly taken up by elf
7698 headers when calculating segment physical address from lma.
7699
7700 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7701
7702 * versados.c (versados_scan): Init stringlen and pass_2_done.
7703
7704 * trad-core.c (trad_unix_core_file_p): Return
7705 bfd_error_wrong_format rather than bfd_error_file_truncated.
7706
7707 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7708 add_data_entry. DataDirectory virtual address is relative.
7709 (pe_print_idata): Account for relative DataDirectory virtual
7710 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7711 (pe_print_edata): Similarly.
7712
7713 From Szabolcs Szakacsits <szaka@F-Secure.com>
7714 * peigen.c (dir_names): Add Delay Import Directory.
7715 (pe_print_idata): Always search for bfd section containing
7716 idata address rather than looking up section name. Print this
7717 section name rather than .idata.
7718 (pe_print_edata): Similarly. Also print some fields as %08lx.
7719 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7720 Win32Version.
7721
7722 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7723
7724 * xcoff.h: Rename to xcoff-target.h
7725 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7726 * coff-rs6000.c: Ditto.
7727 * coff64-rs6000.c: Ditto.
7728 * coff-pmac.c: Ditto.
7729 * Makefile.in: Regenerate.
7730
7731 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7732
7733 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7734 Change U802TOC64MAGIC to U803XTOCMAGIC.
7735
7736 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7737
7738 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7739 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7740 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7741
7742 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7743
7744 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7745
7746 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7747
7748 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7749 hidden and internal symbols.
7750 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7751 visibility.
7752 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7753 assign a PLT or GOT entry to symbols with hidden and
7754 internal visibility.
7755
7756 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7757
7758 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7759 the .bss section.
7760 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7761
7762 2000-05-02 H.J. Lu <hjl@gnu.org>
7763
7764 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7765 ELFOSABI_SYSV.
7766
7767 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7768
7769 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7770 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7771 dependencies.
7772 * Makefile.in: Regenerate.
7773
7774 2000-05-01 Jim Wilson <wilson@cygnus.com>
7775
7776 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7777 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7778 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7779 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7780 * Makefile.in: Rebuild.
7781
7782 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7783
7784 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7785 doesn't work very well.
7786
7787 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7788 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7789 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7790 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7791 (elf_hppa_info_to_howto): Likewise.
7792 (elf_hppa_info_to_howto_rel): Likewise.
7793 (elf_hppa_reloc_type_lookup): Likewise.
7794 (elf_hppa_is_local_label_name): Likewise.
7795 (elf_hppa_fake_sections): Likewise.
7796 (elf_hppa_final_write_processing): Likewise.
7797 (elf_hppa_howto_table): Fully initialise all entries.
7798 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7799 (elf_hppa_info_to_howto): Likewise.
7800 (elf_hppa_info_to_howto_rel): Likewise.
7801 (elf_hppa_reloc_type_lookup): Likewise.
7802 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7803 elf_hppa_unmark_useless_dynamic_symbols,
7804 elf_hppa_remark_useless_dynamic_symbols,
7805 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7806 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7807 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7808 elf32-hppa.c mess is cleaned up.
7809 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7810 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7811 r_field then call hppa_field_adjust inline func with variable
7812 r_field arg, instead call hppa_field_adjust with fixed arg.
7813 In case R_PARISC_PCREL22F, don't set r_field.
7814 (elf_hppa_relocate_insn): Change args and return type to unsigned
7815 int. Call re_assemble_* funcs to do the work.
7816
7817 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7818 sign extending.
7819
7820 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7821 extending.
7822 (sign_extend): Mask first before sign extending.
7823 (low_sign_extend): Rewrite without condition expression.
7824 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7825 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7826 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7827 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7828 result as function return value rather than through pointer arg.
7829 Accept unsigned int args, and return unsigned int.
7830 (re_assemble_3): New. Combines function of dis_assemble_3 with
7831 re-assembly of opcode and immediate.
7832 (re_assemble_12): Likewise.
7833 (re_assemble_16): Likewise.
7834 (re_assemble_17): Likewise.
7835 (re_assemble_21): Likewise.
7836 (re_assemble_22): Likewise.
7837 (hppa_field_adjust): Rewrite and document, paying attention to
7838 size of types and signed/unsigned issues.
7839 (get_opcode): Shift before masking.
7840 (FDLW): Rename to FLDW.
7841 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7842 (hppa_rebuild_insn): Change args and return value to unsigned
7843 int. Make use of re_assemble_*. Correct case 11.
7844
7845 * dep-in.sed: Handle ../opcodes/.
7846 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7847 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7848 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7849 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7850 elfarm-nabi.lo dependencies outside of auto-dependency area.
7851 Regenerate dependencies.
7852 * Makefile.in: Regenerate.
7853
7854 * configure.in (TRAD_HEADER): Test non-null before
7855 AC_DEFINE_UNQUOTED.
7856 * configure: Regenerate.
7857
7858 * reloc.c: Fix mis-spelling in comment.
7859
7860 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7861
7862 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7863 * vms.c (vms_openr_next_archived_file): Return NULL.
7864
7865 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7866
7867 * coffcode.h Copy changes mistakenly done to libcoff.h in
7868 4/24/2000 patch.
7869
7870 2000-04-29 Andreas Jaeger <aj@suse.de>
7871
7872 * libbfd-in.h: Correctly check GCC version.
7873 * bfd-in.h: Likewise.
7874 * libhppa.h: Likewise.
7875 * libbfd.h: Regenerate.
7876 * bfd-in2.h: Regenerate.
7877
7878 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7879
7880 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7881 coffdu-rs6000.{lo,c}.
7882 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7883 on xcoff.h
7884 * Makefile.in: Regenerate.
7885 * xcoff.h: New file.
7886 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7887 * coff-rs6000.c: Move all declarations and defines that are
7888 common to the xcoff backends into xcoff.h
7889 * coff64-rs6000.c: Ditto,
7890
7891 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7892
7893 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7894 _bfd_coff_force_symnames in strings and
7895 _bfd_coff_debug_string_prefix_length to their default values.
7896 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7897
7898 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7899
7900 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7901 _bfd_coff_force_symnames in strings and
7902 _bfd_coff_debug_string_prefix_length to their default values.
7903
7904 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7905
7906 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7907 Check local_got_refcounts before dereferencing.
7908
7909 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7910 before deciding we don't need R_PPC_PLT32 relocation.
7911 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7912 dereferencing.
7913
7914 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7915
7916 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7917 .plt entries.
7918 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7919 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7920 (elf_i386_relocate_section): Allow for .plt to go missing.
7921 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7922 can use a relative reloc for got as elf_i386_relocate_section.
7923 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7924
7925 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7926
7927 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7928
7929 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7930
7931 * Makefile.am (coff64-rs6000.lo): New rule.
7932 * Makefile.in: Regenerate.
7933 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7934 xcoff_is_local_label_name, xcoff_rtype2howto,
7935 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7936 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7937 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7938 (NO_COFF_SYMBOLS): Define.
7939 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7940 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7941 internally.
7942 (MINUS_ONE): New macro.
7943 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7944 relocation.
7945 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7946 coff_SWAP_aux_out): Map to the new functions.
7947 * coff64-rs6000.c: New file.
7948 * libcoff.h (bfd_coff_backend_data): Add new fields
7949 _bfd_coff_force_symnames_in_strings and
7950 _bfd_coff_debug_string_prefix_length.
7951 (bfd_coff_force_symnames_in_strings,
7952 bfd_coff_debug_string_prefix_length): New macros for above fields.
7953 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7954 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7955 of using coff_swap_sym_in directly.
7956 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7957 (coff_set_flags) Set magic for XCOFF64.
7958 (coff_compute_section_file_positions): Add symbol name length to
7959 string section length if bfd_coff_debug_string_prefix_length is
7960 true.
7961 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7962 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7963 using coff_swap_lineno_in directly.
7964 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7965 and _bfd_coff_debug_string_prefix_length fields.
7966 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7967 symbol names into strings table when
7968 bfd_coff_force_symnames_in_strings is true.
7969 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7970 SET_RELOC_VADDR): New macros.
7971 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7972 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7973 code.
7974 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7975 changes within RS6000COFF_C specific code.
7976 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7977 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7978 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7979 Extend existing hack on target name.
7980 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7981 target name.
7982 * coff-tic54x.c (ticof): Keep up to date with new fields
7983 in bfd_coff_backend_data.
7984 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7985 targ_selvecs to include rs6000coff64_vec for rs6000.
7986 * configure.in: Add rs6000coff64_vec case.
7987 * cpu-powerpc.c: New bfd_arch_info_type.
7988
7989 2000-04-24 Jeffrey A Law (law@cygnus.com)
7990
7991 * config.bfd: Only disable elf32-hppa vectors, not all of the
7992 BSD and OSF configuration support. Provide (disabled) clauses
7993 for PA64 support.
7994 * configure.in: Add clause for PA64 support.
7995 * configure: Rebuilt.
7996
7997 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7998 (bfd_elf64_hppa_vec): Declare.
7999
8000 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8001 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8002 (elf64-hppa.lo): Add dependencies.
8003 * Makefile.in: Rebuilt.
8004
8005 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8006
8007 2000-04-24 Jason Eckhardt <jle@cygnus.com>
8008
8009 * libhppa.h (dis_assemble_16): New function.
8010 (pa_arch): Added pa20w element.
8011
8012 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
8013
8014 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8015 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8016 bfd_elf64_slurp_reloc_table.
8017
8018 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8019 definitions to get external names.
8020 (elf_write_relocs): Renamed from write_relocs and make global.
8021 (elf_slurp_reloc_table): Make global.
8022 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8023
8024 * archive.c (hpux_uid_gid_encode): New function.
8025 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8026 defined and the ID is greater than 99999.
8027 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8028 special uid/gid fields into 32 bit values.
8029
8030 2000-04-21 Matthew Green <mrg@cygnus.com>
8031
8032 * config.bfd: Add NetBSD/sparc64 support.
8033
8034 2000-04-21 Richard Henderson <rth@cygnus.com>
8035 David Mosberger <davidm@hpl.hp.com>
8036 Timothy Wall <twall@cygnus.com>
8037 Jim Wilson <wilson@cygnus.com>
8038
8039 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8040 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8041 (BFD64_BACKENDS): Add elf64-ia64.lo.
8042 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8043 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8044 * Makefile.in: Rebuild.
8045 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8046 (bfd_ia64_arch): Declare.
8047 (bfd_archures_list): Add bfd_ia64_arch.
8048 * bfd-in2.h: Rebuild.
8049 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8050 * configure: Rebuild.
8051 * configure.host: (ia64-*-linux*): New host.
8052 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8053 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8054 * elf.c (prep_headers): Add bfd_arch_ia64.
8055 * libbfd.h: Rebuild.
8056 * reloc.c: Add IA-64 relocations.
8057 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8058 Declare.
8059 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8060 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8061
8062 2000-04-21 Richard Henderson <rth@cygnus.com>
8063
8064 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8065 contents when performing a partial link.
8066 (bfd_elf_d30v_reloc_21): Likewise.
8067
8068 2000-04-20 H.J. Lu <hjl@gnu.org>
8069
8070 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8071 patch to symbols defined by a shared object.
8072 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8073
8074 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8075
8076 K&R compiler fixes.
8077 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8078 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8079
8080 2000-04-11 David Mosberger <davidm@hpl.hp.com>
8081
8082 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8083 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8084 (coff-ia64.lo): Add dependency.
8085 * Makefile.in: Regenerate.
8086 * coff-ia64.c: New file.
8087 * efi-app-ia32.c: Ditto.
8088 * efi-app-ia64.c: Ditto.
8089 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8090 (coff_set_flags): Ditto.
8091 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8092 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8093 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8094 * configure: Regenerate.
8095 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8096 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8097 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8098 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8099 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8100 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8101 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8102 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8103 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8104 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8105 (GET_PDATA_ENTRY): Ditto.
8106 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8107 data_start. Use above macros to read fields that are 64 bit wide for
8108 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8109 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8110 FileAlignment and SectionAlignment to minimum alignment if they
8111 are zero.
8112 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8113 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8114 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8115 Use above macros to write fields that are 64 bit wide for
8116 COFF_WITH_PEP64.
8117 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8118 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8119 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8120 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8121 begin address, end address, and unwind info address only. Use
8122 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8123 print addresses.
8124 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8125 HIGH3ADJ relocation names.
8126 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8127 * targets.c: Declare bfd_efi_app_ia32_vec and
8128 bfd_efi_app_ia64_vec.
8129 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8130 bfd_efi_app_ia64_vec.
8131
8132 2000-04-17 Timothy Wall <twall@cygnus.com>
8133
8134 * bfd-in2.h: Add prototypes for tic54x load page access.
8135 * bfd-in.h: Regenerate.
8136 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8137 in customized _set_arch_mach function.
8138 * coffcode.h (coff_set_alignment_hook): Set section load page if
8139 the appropriate macro is defined.
8140 (write_object_contents): Read section load page.
8141
8142 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8143
8144 * elf32-hppa.h: Update copyright date.
8145
8146 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8147 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8148
8149 * elf32-d30v.c (MAX32): Don't use LL suffix.
8150 (MIN32): Define in terms of MAX32.
8151 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8152
8153 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8154 expression.
8155
8156 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8157
8158 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8159
8160 * dep-in.sed: Match space before file name, not after.
8161 * Makefile.am: Regenerate dependencies.
8162 * Makefile.in: Regenerate.
8163
8164 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8165 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8166 extend without an if statement.
8167
8168 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8169
8170 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8171 signed quantites.
8172 * elf32-mips.c (gprel16_with_gp): Likewise.
8173 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8174 here using -0x40000, not (int)0xfffc0000.
8175 (elf32_hppa_size_of_stub): Likewise.
8176
8177 2000-04-11 Timothy Wall <twall@cygnus.com>
8178
8179 * coff-tic54x.c: Now builds with all targets.
8180 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8181 * Makefile.in: Regenerate.
8182 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8183 unitialized variable.
8184
8185 2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
8186
8187 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8188 --enable-build-warnings option.
8189 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8190 * Makefile.in, configure: Re-generate.
8191
8192 2000-04-07 Nick Clifton <nickc@cygnus.com>
8193
8194 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8195 BFD_RELOC_THUMB_PCREL_BLX.
8196
8197 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8198 R_ARM_XPC25 and R_ARM_THM_PC22.
8199
8200 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8201 R_ARM_XPC25 and R_ARM_THM_XPC22.
8202 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8203 R_ARM_[XPC25|THM_XPC22].
8204
8205 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8206 elf/arm-oabi.h to elf/arm.h
8207
8208 * Makefile.am: Fix dependency for elfarm-oabi.c
8209 * Makefile.in: Regenerate.
8210
8211 * bfd-in2.h: Regenerate.
8212 * libbfd.h: Regenerate.
8213
8214 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8215
8216 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8217 and restore it on failure. Release newly allocated tdata on
8218 failure.
8219
8220 2000-04-07 Jim Wilson <wilson@cygnus.com>
8221
8222 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8223 (decode_line_info): Set it. Report error if unit->line_offset is
8224 equal to or larger than it.
8225
8226 2000-04-07 Timothy Wall <twall@cygnus.com>
8227
8228 * targets.c: Added vecs for tic54x.
8229 * reloc.c: Added relocs for tic54x.
8230 * libbfd.h: Regenerated.
8231 * configure: Add TI COFF vecs for tic54x.
8232 * configure.in: Ditto.
8233 * config.bfd (targ_cpu): Recognize new tic54x target.
8234 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8235 * bfd-in2.h: Add tic54x target and relocations.
8236 * Makefile.am, Makefile.in: Add tic54x target.
8237 * archures.c (bfd_archures_list): Add tic54x target.
8238 * coff-tic54x.c: New.
8239 * cpu-tic54x.c: New.
8240
8241 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8242
8243 * elfcore.h (elf_core_file_p): call backend_object_p which
8244 thereby gets an opportunity to update the arch/machine type.
8245
8246 2000-04-06 Timothy Wall <twall@cygnus.com>
8247
8248 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8249 class. Handle SEC_CLINK and SEC_BLOCK flags.
8250 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8251 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8252
8253 2000-04-06 Nick Clifton <nickc@cygnus.com>
8254
8255 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8256 EF_INTERWORK if this is an unknown EABI.
8257 (elf32_arm_merge_private_bfd_data): Check EABI version
8258 numbers. Only check EF_xxx flags if the EABI version number
8259 is unknown.
8260 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8261 if the EABI version number is unknown.
8262 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8263 if the EABI version number is unknown.
8264
8265 2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
8266
8267 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8268 BFD_RELOC_SH_LOOP_END.
8269 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8270 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8271 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8272 (sh_elf_reloc_loop): New function.
8273 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8274 any more.
8275 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8276 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8277 * bfd-in2.h, libbfd.h: Regenerate.
8278
8279 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8280
8281 * po/bfd.pot: Regenerate.
8282
8283 * Makefile.am: Remove extraneous mkdep comment.
8284 (MKDEP): Use gcc -MM rather than mkdep.
8285 (DEP): Quote when passing vars to sub-make. Add warning
8286 message to end.
8287 (DEP1): Rewrite for "gcc -MM".
8288 (CLEANFILES): Add DEP2.
8289 Update dependencies.
8290 * Makefile.in: Regenerate.
8291
8292 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8293
8294 * configure.in: Added corefile support for AIX 4.3. In particular,
8295 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8296 compiling rs6000-core.c.
8297 * configure: Regenerated.
8298
8299 2000-04-03 H.J. Lu <hjl@gnu.org>
8300
8301 * cache.c (bfd_open_file): Unlink the output file only if
8302 it has non-zero size.
8303
8304 2000-04-01 Ken Block USG <block@zk3.dec.com>
8305
8306 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8307 relative relocations for non-loaded sections in shared objects.
8308 (elf64_alpha_check_relocs): Similarly.
8309
8310 2000-04-03 Hans-Peter Nilsson <hp@axis.com>
8311
8312 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8313 BFD_RELOC_16 to switch for extended relocs.
8314 (MY_swap_ext_reloc_in): New.
8315 (MY_swap_ext_reloc_out): New.
8316 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8317 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8318 (NAME(aout,squirt_out_relocs)): Similarly use
8319 MY_swap_ext_reloc_out.
8320 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8321
8322 2000-04-03 Kazu Hirata <kazu@hxi.com>
8323
8324 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8325 the R_PCRWORD_B case.
8326
8327 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8328
8329 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8330 on some targets.
8331 * ihex.c : Ditto.
8332
8333 2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
8334
8335 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8336 HOWTO references to bfd_elf_generic_reloc, that have
8337 partial_inplace == true, now use the new function. The function
8338 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8339 extends its fixes to the R_M32R_{16,24,32} relocs.
8340 The new logic in m32r_elf_lo16_reloc() has been removed, and
8341 it instead calls the new routine to obtain that functionality.
8342
8343 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8344
8345 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8346 elf32_avr_check_relocs, avr_final_link_relocate,
8347 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8348 elf32_avr_object_p): Add prototypes.
8349 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8350 (bfd_elf_avr_final_write_processing): Make static.
8351
8352 2000-03-27 Denis Chertykov <denisc@overta.ru>
8353
8354 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8355 * archures.c (bfd_architecture): Add AVR architecture.
8356 (bfd_archures_list): Add reference to AVR architecture info.
8357 * elf.c (prep_headers): Handle bfd_arch_avr.
8358 * reloc.c: Add various AVR relocation enums.
8359 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8360 list.
8361 * Makefile.am: Add support for AVR elf.
8362 * configure.in: Likewise.
8363 * config.bfd: Likewise.
8364 * Makefile.in: Regenerate.
8365 * configure: This too.
8366 * bfd-in2.h: And this.
8367 * libbfd.h: And this.
8368
8369 2000-03-24 H.J. Lu <hjl@gnu.org>
8370
8371 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8372 (elf64_alpha_find_reloc_at_ofs): Likewise.
8373
8374 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8375
8376 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8377 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8378 allowable range used to be -2**(n-1) to 2**n-1.
8379 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8380 "boolean overflow" with "bfd_reloc_status_type flag".
8381
8382 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8383
8384 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8385
8386 2000-03-14 Kazu Hirata <kazu@hxi.com>
8387
8388 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8389 of shrinks properly, including the last reloc.
8390
8391 2000-03-13 Kazu Hirata <kazu@hxi.com>
8392
8393 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8394 check for R_MOVL2.
8395
8396 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8397
8398 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8399 a format mismatch rather than an "error" from bfd_read such as
8400 bfd_error_file_truncated.
8401
8402 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8403
8404 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8405 sign-extension and big-endian compensation for
8406 R_MIPS_64 even in ld -r.
8407
8408 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8409
8410 * elf32-mips.c (mips_elf_next_relocation): Rename from
8411 mips_elf_next_lo16_relocation, and generalize to look
8412 for any relocation type.
8413 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8414 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8415 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8416 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8417 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8418 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8419 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8420 (mips_rtype_to_howto): Likewise.
8421 (mips_elf_calculate_relocation): Handle new relocs.
8422 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8423 are paired. The addend for R_MIPS_GNU_REL16_S2
8424 is shifted right two bits.
8425
8426 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8427
8428 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8429 comment, and ensure it doesn't happen again.
8430 (bfd_install_relocation): Same here.
8431 (_bfd_relocate_contents): Don't bother assigning unused signmask
8432 shift result. Fix typos in comments.
8433 Remove trailing whitespace throughout file.
8434
8435 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8436
8437 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8438 * bfd-in2.h: Rebuild.
8439
8440 2000-03-06 Nick Clifton <nickc@cygnus.com>
8441
8442 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8443 sym_ptr_ptr fields.
8444 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8445 (SIZEOF_ILF_STRINGS): Redefine.
8446 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8447 relative reloc, as opposed to a section relative reloc.
8448 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8449 not C_LABEL.
8450 Add length of symbol's prefix to string pointer.
8451 Store a pointer to the symbol in the symbol pointer table.
8452 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8453 Initialise the symbol pointer table.
8454 Store the hint in the Hint/Name table.
8455 Make the jump reloc be symbol realtive, not section relative.
8456 Create an import symbol for imported code.
8457
8458 2000-03-06 Catherine Moore <clm@cygnus.com>
8459
8460 * elf.c (swap_out_syms): Check for null type_ptr.
8461
8462 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8463
8464 * aout-target.h (MY(write_object_contents)): Remove unused
8465 and unusable "#if CHOOSE_RELOC_SIZE".
8466 * pc532-mach.c (MY(write_object_contents)): Ditto.
8467 * netbsd.h (MY(write_object_contents)): Ditto.
8468 * hp300hpux.c (MY(write_object_contents)): Ditto.
8469 * freebsd.h (MY(write_object_contents)): Ditto.
8470 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8471
8472 2000-02-29 H.J. Lu <hjl@gnu.org>
8473
8474 * peicode.h (jtab): Make it static.
8475
8476 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8477 defined and COFF_IMAGE_WITH_PE is not defined.
8478 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8479 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8480
8481 2000-03-01 Nick Clifton <nickc@cygnus.com>
8482
8483 * coff-arm.c (bfd_arm_process_before_allocation): Make
8484 'symndx' signed to prevent compile time warning.
8485
8486 * coff-mcore.c: Remove unused prototype for pe_object_p.
8487
8488 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8489 functions that are not used when COFF_IMAGE_WITH_PE is
8490 defined.
8491 (struct sh_opcode): Change type of 'flags' field to unsigned
8492 long so that it can hold the USESAS flag.
8493
8494 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8495
8496 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8497 'sym_sec'.
8498
8499 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8500 parameters.
8501 Remove unusued variables and code.
8502 (elf_backend_add_symbol_hook): Fix prototype.
8503
8504 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8505 'srelgot'.
8506
8507 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8508 'oldinst'.
8509
8510 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8511 parameters.
8512 Remove unusued variables and code.
8513 (elf_backend_add_symbol_hook): Fix prototype.
8514
8515 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8516
8517 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8518 to unused function parameter.
8519
8520 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8521 parameters.
8522 Use EMPTY_HOWTO to initialise empty howto slots.
8523 Remove unused variables.
8524
8525 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8526
8527 2000-03-01 H.J. Lu <hjl@gnu.org>
8528
8529 * aoutx.h (aout_link_input_section_std): Pass "true" to
8530 the undefined_symbol callback.
8531 (aout_link_input_section_ext): Likewise.
8532 * bout.c (get_value): Likewise.
8533 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8534 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8535 Likewise.
8536 (alpha_relocate_section): Likewise.
8537 * coff-arm.c (coff_arm_relocate_section): Likewise.
8538 * coff-i960.c (coff_i960_relocate_section): Likewise.
8539 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8540 * coff-mips.c (mips_relocate_section): Likewise.
8541 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8542 * coff-sh.c (sh_relocate_section): Likewise.
8543 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8544 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8545 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8546 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8547 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8548 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8549 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8550 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8551 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8552 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8553 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8554 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8555 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8556 * elflink.h (elf_link_output_extsym): Likewise.
8557 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8558 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8559 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8560
8561 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8562 undefined_symbol callback when building shared library with
8563 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8564 "true".
8565 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8566 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8567 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8568 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8569 (elf32_mips_get_relocated_section_content): Likewise.
8570 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8571 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8572 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8573 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8574
8575 2000-02-28 Nick Clifton <nickc@cygnus.com>
8576
8577 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8578 * Makefile.in: Regenerate.
8579
8580 * configure.in: Add support for mips and sh pe vectors.
8581 * configure: regenerate.
8582
8583 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8584 targets.
8585
8586 * targets.c: Add mips and sh pe vectors.
8587
8588 * libpei.h (coff_final_link_postscript): Only define if not
8589 already defined.
8590
8591 * coffcode.h: Add support for WinCE magic numbers.
8592
8593 * peigen.c (pe_print_reloc): Update comment and rearrange
8594 appending of newline character.
8595
8596 * peicode.h: Add support for Image Library Format.
8597 (pe_ILF_vars): Structure containing data used by ILF code.
8598 (pe_ILF_make_a_section): New function. Create a section based
8599 on ILF data.
8600 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8601 ILF data.
8602 (pe_ILF_make_a_symbol): New function. Create a symbol based
8603 on ILF data.
8604 (pe_ILF_save_relocs): New function. Store the relocs created
8605 by pe_ILF_make_a_reloc in a section.
8606 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8607 an ILF object.
8608 (pe_ILF_object_p): New function. Return a bfd_target pointer
8609 for an ILF object.
8610 (pe_bfd_object_p): If an ILF object is detected call
8611 pe_ILF_object_p on it.
8612
8613 * coff-arm.c: Add support for WinCE relocs which are different
8614 from normal ARM COFF relocs.
8615 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8616
8617 * coff-sh.c: Add support for sh-pe target.
8618 * pe-sh.c: New file. Support code for sh-pe target.
8619 * pei-sh.c: New file. Support code for sh-pe target.
8620
8621 * pe-mips.c: New file. Support code for mips-pe target.
8622 * pei-mips.c: New file. Support code for mips-pe target.
8623
8624 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8625
8626 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8627 architecture if the object causing the bump is dynamic.
8628 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8629 and also don't it for memory ordering.
8630 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8631
8632 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8633
8634 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8635 calling bfd_get_section_size_before_reloc.
8636 (decode_line_info): Likewise.
8637 (_bfd_dwarf2_find_nearest_line): Likewise.
8638
8639 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8640
8641 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8642 name of the libtool directory.
8643 * Makefile.in: Rebuild.
8644
8645 2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
8646
8647 * som.c (SOM_HOWTO): Define.
8648 (som_hppa_howto_table): Use it.
8649
8650 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8651
8652 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8653
8654 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8655
8656 2000-02-24 Catherine Moore <clm@cygnus.com>
8657
8658 * som.c (som_misc_symbol_info): Add field
8659 secondary_def.
8660 (som_bfd_derive_misc_symbol_info): Initialize
8661 secondary_def.
8662 (som_build_and_write_symbol_table): Keep track
8663 of secondary_def field.
8664 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8665 if secondary_def field is set.
8666 (som_bfd_ar_write_symbol_stuff): Initialize
8667 secondary_def.
8668
8669 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8670
8671 * dwarf2.c (read_address): Read 16-bits addresses.
8672 (parse_comp_unit): Accept addr_size == 2.
8673
8674 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8675
8676 * bfd-in.h: Update copyright date.
8677
8678 2000-02-23 Linas Vepstas <linas@linas.org>
8679
8680 * cpu-i370.c: New file.
8681 * elf32-i370.c: New file.
8682 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8683 (bfd_i370_arch): New.
8684 (bfd_archures_list): Add bfd_i370_arch.
8685 * elf.c (prep_headers): Add bfd_arch_i370.
8686 * Makefile.am: Add support for IBM 370 elf.
8687 * config.bfd: Likewise.
8688 * configure.in: Likewise.
8689 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8690 * reloc.c (bfd_reloc_code_type): Likewise.
8691 * targets.c: Likewise.
8692
8693 * Makefile.in: Regenerate.
8694 * configure: Regenerate.
8695 * bfd-in2.h: Regenerate.
8696
8697 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8698
8699 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8700 invalid relocation types, and change them to R_386_NONE.
8701
8702 2000-02-22 H.J. Lu <hjl@gnu.org>
8703
8704 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8705 not defined, don't add a second ELF_VER_CHR.
8706
8707 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8708 symbols converted to local symbols even when stripping all
8709 symbols.
8710 (elf_link_output_extsym): Process global symbols converted to
8711 local symbols even if they are being stripped.
8712
8713 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8714
8715 * archures.c (bfd_octets_per_byte): Return unsigned int.
8716 (bfd_arch_mach_octets_per_byte): Ditto.
8717 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8718 comparison warning.
8719 * section.c (bfd_get_section_size_before_reloc): Quell signed
8720 vs. unsigned comparison warning.
8721 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8722 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8723 change. What was I thinking?
8724 * bfd-in2.h: Regenerate.
8725
8726 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8727 (elf_gc_sections): Same here.
8728 (elf_gc_common_finalize_got_offsets): And here.
8729
8730 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8731
8732 ELF HPPA doesn't work at present; remove it until it does.
8733 * config.bfd: Comment out setting targ_defvec to
8734 bfd_elf32_hppa_vec.
8735 * Makefile.am: Rebuild dependencies.
8736 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8737 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8738 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8739 * Makefile.in: Rebuild.
8740 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8741
8742 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8743
8744 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8745 is no bfd_free(). Revert bfd_free part of previous change.
8746
8747 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8748
8749 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8750 arrays.
8751 (coff_compute_section_file_positions): Use bfd_free to pair
8752 bfd_malloc.
8753 (coff_write_object_contents): Likewise.
8754
8755 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8756 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8757
8758 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8759
8760 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8761 (xcoff_ar_file_hdr_big): New structure.
8762 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8763 (xcoff_ar_hdr_big): New structure.
8764 (SIZEOF_AR_HDR_BIG): New macro.
8765 (xcoff_big_format_p): New macro.
8766 (xcoff_ardata_big): New macro.
8767 (arch_xhdr_big): New macro.
8768 (xcoff_slurp_armap): Handle large archives.
8769 (xcoff_archive_p): Detect large archives.
8770 (xcoff_read_ar_hdr): Handle large archives.
8771 (xcoff_openr_next_archived_file): Handle large archives.
8772 (xcoff_generic_stat_arch_elt): Handle large archives.
8773 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8774 (xcoff_write_armap_big): New function.
8775 (xcoff_write_armap): New function, dispatch to _old or _big.
8776 (xcoff_write_archive_contents_old): Rename from
8777 xcoff_write_archive_contents.
8778 (xcoff_write_archive_contents_big): New function.
8779 (xcoff_write_archive_contents): New function, dispatch to _old or
8780 _big.
8781
8782 2000-02-18 Richard Henderson <rth@cygnus.com>
8783
8784 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8785 and hide_symbol members.
8786 (elf_link_hash_copy_indirect): Remove.
8787 (elf_link_hash_hide_symbol): Remove.
8788 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8789 and elf_backend_hide_symbol.
8790 (_bfd_elf_link_hash_copy_indirect): Declare.
8791 (_bfd_elf_link_hash_hide_symbol): Declare.
8792 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8793 (_bfd_elf_link_hash_hide_symbol): Likewise.
8794 (_bfd_elf_link_hash_table_init): Don't init killed members.
8795 * elflink.h (elf_link_add_object_symbols): Use the bed function
8796 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8797 (elf_link_assign_sym_version): Likewise.
8798 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8799 (elf_backend_hide_symbol): Likewise.
8800 (elfNN_bed): Update for new members.
8801
8802 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8803
8804 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8805 STACK_END_ADDR): Define for new core file format.
8806 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8807 for handling the vagaries of the various core file structures used
8808 by AIX over the years.
8809 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8810 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8811 core_dumpx structure.
8812
8813 2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
8814
8815 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8816 (bfd_mach_sh3_dsp): Likewise.
8817 (bfd_mach_sh4): Reinstate.
8818 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8819 * bfd-in2.h: Regenerate.
8820 * coff-sh.c (struct sh_opcode): flags is no longer short.
8821 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8822 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8823 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8824 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8825 (sh_opcodes): No longer const.
8826 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8827 (sh_insn_uses_reg): Check for USESAS and USESR8.
8828 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8829 (_bfd_sh_align_load_span): Return early for SH4.
8830 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8831 Take into account that field b of a parallel processing insn
8832 could be mistaken for a separate insn.
8833 * cpu-sh.c (arch_info_struct): New array elements for
8834 sh2, sh-dsp and sh3-dsp.
8835 Reinstate element for sh4.
8836 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8837 (SH4_NEXT): Reinstate.
8838 (SH3_NEXT, SH3E_NEXT): Adjust.
8839 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8840 * elf32-sh.c (sh_elf_set_private_flags): New function.
8841 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8842 (sh_elf_merge_private_data): New function.
8843 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8844 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8845 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8846 sh_elf_merge_private_data.
8847
8848 2000-02-13 Richard Henderson <rth@cygnus.com>
8849
8850 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8851 hide_symbol members.
8852 (elf_link_hash_copy_indirect): New.
8853 (elf_link_hash_hide_symbol): New.
8854 * elflink.h (elf_link_add_object_symbols): Break out copy from
8855 indirect new new symbol to elf.c.
8856 (elf_link_assign_sym_version): Break out privatization of
8857 non-exported symbol to elf.c.
8858 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8859 (_bfd_elf_link_hash_hide_symbol): New.
8860 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8861
8862 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8863
8864 * section.c (_bfd_strip_section_from_output): Add info parameter.
8865 If it passed as non-NULL, use it to check whether any input BFD
8866 has an input section which uses this output section. Change all
8867 callers.
8868 * bfd-in2.h: Rebuild.
8869
8870 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8871 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8872 1999-11-29.
8873 * bfd-in2.h: Rebuild.
8874
8875 2000-02-10 Timothy Wall <twall@cygnus.com>
8876
8877 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8878 allow final modifications of swapped-in symbol.
8879 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8880 * coffcode.h (coff_write_relocs): Use macro
8881 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8882 symbol index should be set to -1.
8883
8884 2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
8885
8886 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8887 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8888 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8889 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8890 sh_insns_uses_or_sets_freg): New functions.
8891 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8892 * (sh_insns_conflict): Use new functions and new macros to
8893 detect conflicts when two instructions both set same integer registers,
8894 both set same fp register, and both set special register.
8895
8896 2000-02-09 Timothy Wall <twall@cygnus.com>
8897
8898 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8899 swapping in sections, so that the swapping routines have access to
8900 the arch/mach info.
8901
8902 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8903
8904 * coff-go32.c: Update comment. Update copyright.
8905
8906 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8907
8908 * syms.c (bfd_decode_symclass)
8909 Two new class characters were added - 'V' and 'v'. The
8910 meaning of 'W' is now restricted to just weak non-object
8911 symbols. This allows differentiation between, for example,
8912 weak functions vs weak objects. nm for example now dumps:
8913 'W' = weak global
8914 'w' = weak unresolved
8915 'V' = weak global object
8916 'v' = weak unresolved object
8917
8918 (bfd_is_undefined_symclass): New function. Return true if the
8919 given symbol class represents and undefined/unresolved symbol.
8920
8921 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8922 unresolved symbols.
8923
8924 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8925
8926 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8927 STT_ARM_16BIT flag set, but it is not attached to a data object
8928 return STT_ARM_16BIT so that it will be treated as code by the
8929 disassembler.
8930
8931 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8932
8933 * coff-i386.c (i3coff_object_p): Remove prototype.
8934 Update copyright.
8935
8936 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8937 to name. Update copyright.
8938
8939 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8940 assignment to avoid warning. Update copyright.
8941
8942 2000-01-24 Robert Lipe (robertl@sco.com)
8943
8944 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8945 instead of using GNU C extension.
8946
8947 2000-01-21 Nick Clifton <nickc@cygnus.com>
8948
8949 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8950 amount from a bfd_in_memory structure.
8951 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8952 structure.
8953
8954 2000-01-14 Nick Clifton <nickc@cygnus.com>
8955
8956 * linker.c (default_indirect_link_order): oops - fix incorrectly
8957 applied patch from Tim Wall.
8958
8959 2000-01-13 Timothy Wall (twall@tiac.net>
8960
8961 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8962 = scnhsz, filhsz, relsz, aoutsz, etc)
8963
8964 * coffswap.h: Ditto.
8965
8966 2000-01-13 Nick Clifton <nickc@cygnus.com>
8967
8968 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8969 interwork thumb to arm stub.
8970
8971 2000-01-13 Timothy Wall (twall@tiac.net>
8972
8973 * archures.c (bfd_octets_per_byte): New function: Return
8974 target byte size.
8975 (bfd_arch_mach_octets_per_byte): New function: Return target
8976 byte size.
8977
8978 * section.c: Distinguish between octets and bytes for usage of
8979 _cooked_size, _raw_size, and output_offset. Clarify
8980 description of bfd_set_section_contents.
8981
8982 * bfd-in2.h: Regenerate.
8983
8984 * coffgen.c: Indicate that the offset parameter is in bytes, not
8985 octets.
8986
8987 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8988 where appropriate to get the octet offset when calling
8989 bfd_set_section_contents.
8990 (bfd_coff_reloc_link_order): Ditto.
8991
8992 * linker.c (bfd_generic_reloc_link_order): Ditto.
8993 (_bfd_default_link_order): Ditto.
8994
8995 * reloc.c (bfd_perform_relocation): Distinguish between octets
8996 and bytes. Use octets when indexing into octet data; use bytes
8997 when calculating target addresses.
8998 (bfd_install_relocation): Ditto.
8999
9000 * srec.c (srec_write_section): Ditto.
9001
9002 2000-01-13 Nick Clifton <nickc@cygnus.com>
9003
9004 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9005 3 to 2. This allows 4 byte sized sections, which is necessary for
9006 dlltool to build functioning DLLs.
9007
9008 2000-01-10 Philip Blundell <pb@futuretv.com>
9009
9010 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9011 (arm*-*-conix*): New target.
9012
9013 2000-01-10 Egor Duda <deo@logos-m.ru>
9014
9015 * config.bfd: Include elf32_i386 vector to target list for cygwin
9016 and mingw.
9017
9018 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9019 * configure.in: Test for structure win32_pstatus_t in
9020 <sys/procfs.h>
9021 * configure: Regenerate.
9022
9023 * elf.c (elfcore_grok_win32pstatus): New function: process
9024 win32_pstatus_t notes in elf core file.
9025 (elfcore_grok_note): Detect win32_pstatus notes.
9026
9027 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9028
9029 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9030 visibility.
9031 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9032 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9033
9034 For older changes see ChangeLog-9899
9035 \f
9036 Local Variables:
9037 mode: change-log
9038 left-margin: 8
9039 fill-column: 74
9040 version-control: never
9041 End: