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