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