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