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