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