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