f16d7e6f5cf2fae57b2478f50be9d5c01d2dc036
[external/binutils.git] / bfd / ChangeLog
1 2000-11-09  Kazu Hirata  <kazu@hxi.com>
2
3         * archive.c: Fix formatting.
4         * archures.c: Likewise.
5
6 2000-11-07  Richard Henderson  <rth@redhat.com>
7
8         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
9         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
10         * section.c (bfd_set_section_contents): Call memcpy if
11         section->contents set and location not equal to contents plus offset.
12
13 2000-11-08  Kazu Hirata  <kazu@hxi.com>
14
15         * bfd-in.h: Fix formatting.
16         * bfd-in2.h: Likewise.
17         * bfd.c: Likewise.
18         * binary.c: Likewise.
19         * bout.c: Likewise.
20         * coff-a29k.c: Likewise.
21         * coff-alpha.c: Likewise.
22         * coff-apollo.c: Likewise.
23         * coff-aux.c: Likewise.
24
25 2000-11-07  Kazu Hirata  <kazu@hxi.com>
26
27         * aix386-core.c: Fix formatting.
28         * aoutf1.h: Likewise.
29         * aoutx.h: Likewise.
30         * archures.c: Likewise.
31         * armnetbsd.c: Likewise.
32
33 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
34
35         * coff-h8300.c (special): Adjust reloc address.
36
37 2000-11-06  Steve Ellcey <sje@cup.hp.com>
38
39         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
40         to differentiate elf32 and elf64 on ia64.
41         * bfd-in2.h: Regenerate.
42         * config.bfd: Add target for "ia64*-*-hpux*".
43         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
44         * configure: Regenerate.
45         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
46         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
47
48         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
49         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
50         * Makefile.in: Regnerate.
51         * elf64-ia64.c: Deleted.
52         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
53
54 2000-11-06  Kazu Hirata  <kazu@hxi.com>
55
56         * aout-adobe.c: Fix formatting.
57         * aout-arm.c: Likewise.
58         * aout-cris.c: Likewise.
59         * aout-encap.c: Likewise.
60         * aout-ns32k.c: Likewise.
61         * aout-target.h: Likewise.
62         * aout-tic30.c: Likewise.
63
64 2000-11-05  Philip Blundell  <philb@gnu.org>
65
66         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
67         BFDs containing no sections to be merged, regardless of their flags.
68
69 2000-11-04  Philip Blundell  <philb@gnu.org>
70
71         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
72         if a relocation for an undefined symbol also results in an
73         overflow.
74
75 Mon Nov  6 13:35:07 2000  Christopher Faylor <cgf@cygnus.com>
76
77         * config.bfd: Add support for Sun Chorus.
78
79 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
80
81         * configure.in: Recognize alpha-*-freebsd*.
82         * configure: Regenerate.
83
84 2000-11-02  Luciano Gemme <ishitawa@yahoo.com> 
85
86         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
87         (Chunk): New global variable set by a parameter in objcopy.c.
88         (S3Forced): New global variable set by a parameter in
89         objcopy.c.
90         (srec_set_section_contents): If S3Forced is true, always generate
91         S3 records.
92         (srec_write_section): Use 'Chunk' to limit maximum length of S
93         records.
94
95 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
96
97         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
98         * Makefile.in: Regenerate.
99         * bfd-in2.h: Regenerate.
100         * po/bfd.pot: Regenerate.
101         
102 2000-10-31  Philip Blundell  <philb@gnu.org>
103
104         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
105         EF_SOFT_FLOAT if it is defined.
106
107 2000-10-27  Philip Blundell  <philb@gnu.org>
108
109         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
110         attempts to mix PIC code with non-PIC, just mark the output as
111         being position dependent.
112         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error 
113         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for 
114         all mismatches, not just the first one.
115         
116 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
117
118         * ieee.c (ieee_archive_p): Plug one of many possible
119         memory leaks in error handling.
120
121 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
122
123         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
124         elf32_sparc_object_p, elf32_sparc_final_write_processing):
125         Support v8plusb.
126         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
127         sparc64_elf_object_p): Support v9b.
128         * archures.c: Declare v8plusb and v9b machines.
129         * bfd-in2.h: Ditto.
130         * cpu-sparc.c: Ditto.
131
132 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
133
134         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
135         of a GOT reloc.
136
137         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
138         (SYMBOL_CALLS_LOCAL): New macro.
139         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
140         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
141         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
142         (ppc_elf_relocate_section): Use flag variable to determine
143         whether the relocation refers to a local symbol.
144         Test whether a PLTREL24 reloc will produce a reloc by looking
145         to see whether a PLT entry was made.
146
147 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
148
149         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
150         entries that could serve as a definition for a weak symbol.
151
152 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
153
154         From  Ralf Baechle  <ralf@gnu.org>
155
156         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
157         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
158         against local symbols.
159         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
160         
161 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
162
163         * section.c (struct sec): Add kept_section.
164         (struct bfd_comdat_info): Remove sec, we can use above.
165         (STD_SECTION): Add initializer.
166         (bfd_make_section_anyway): Init here too.
167
168         * bfd-in2.h: Regenerate.
169
170         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
171         zeroing of `flags'.  
172         (elf_link_input_bfd): Set all asection->symbol->value's here, and
173         fudge values for discarded link-once section symbols.
174
175         * elf64-hppa.c: Include alloca-conf.h
176
177 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
178
179         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
180
181         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
182
183 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
184
185         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
186
187 2000-10-10  Tom Rix <trix@redhat.com>
188
189         * section.c (bfd_make_section_anyway): Release newsect ptr when 
190         newsect->symbol fails to alloc.  Use bfd_release instead of free.
191
192 2000-10-09  Richard Henderson  <rth@cygnus.com
193
194         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
195         (elf64_ia64_unwind_entry_compare): New.
196         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
197
198 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
199
200         * elflink.h (size_dynamic_sections): Don't create various tags if
201         .dynstr is excluded from the link.  Don't set first dynsym entry
202         if dynsymcount is zero.
203         (elf_bfd_final_link): Don't try to swap out dynamic syms if
204         .dynsym excluded from the link.  Don't try to write any dynamic
205         sections excluded from the link.
206
207         * elf.c (swap_out_syms): Handle global section symbols.
208
209 2000-10-05  DJ Delorie  <dj@redhat.com>
210
211         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
212         * coffcode.h (coff_set_alignment_hook): read extended reloc count
213         (coff_write_relocs): write extended reloc count
214         (coff_write_object_contents): account for extended relocs
215
216 2000-10-05  Jim Wilson  <wilson@cygnus.com>
217
218         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
219         field.
220         * elf.c (_bfd_elf_make_section_from_shdr): Call the
221         elf_backend_section_flags function.
222         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
223         code.
224         (elf64_ia64_section_flags): New function containing flag conversion
225         code.
226         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
227         * elfxx-target.h (elf_backend_section_flags): Define.
228         (elfNN_bed): Initialize elf_backend_section_flags field.
229
230 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
231
232         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
233         _bfd_elf32_gc_record_vtable.  Correct a comment.
234
235 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
236
237         From  Ralf Baechle  <ralf@gnu.org>
238
239         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
240         produces binaries with got[1] = 0x80000001 to differenciate them
241         for the dynamic linker from the broken binaries produced by old
242         versions.
243
244 2000-09-30  Petr Sorfa <petrs@sco.com>
245
246         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
247         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
248         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
249         * configure: Regenerate.
250
251 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
252
253         Define two bfd_targets for absence and presence of leading
254         underscore on symbols.  Make sure to only link same kind.
255         * elf32-cris.c (cris_elf_object_p,
256         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
257         cris_elf_merge_private_bfd_data): New.
258         (elf_backend_object_p, elf_backend_final_write_processing,
259         bfd_elf32_bfd_print_private_bfd_data,
260         bfd_elf32_bfd_merge_private_bfd_data): Define.
261         <Target vector definition>: Include elf32-target.h twice with
262         different macro settings:
263         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
264         bfd_elf32_us_cris_vec.
265         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
266         (elf_symbol_leading_char): First as 0, then '_'.
267         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
268         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
269         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
270         * configure: Regenerate.
271         * targets.c: Declare bfd_elf32_us_cris_vec.
272         * po/bfd.pot: Regenerate.
273
274 2000-09-29  Momchil Velikov  <velco@fadata.bg>
275
276         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
277         R_ARM_THM_PC22 relocations.
278
279 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
280
281         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
282
283 2000-09-29  Momchil Velikov <velco@fadata.bg>
284
285         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
286         is has the SEC_HAS_CONTENTS flag set.
287
288 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
289             Hans-Peter Nilsson  <hp@axis.com>
290
291         * aout-cris.c (N_TXTADDR): Define.
292
293 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
294
295         * som.c: Include alloca-conf.h.
296         * Makefile.am: "make dep-am"
297         * Makefile.in: Regenerate.
298
299 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
300
301         * elf32-hppa.c (plt_stub): New.
302         (PLT_STUB_ENTRY): Define.
303         (elf32_hppa_link_hash_table): Change multi_subspace to packed
304         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
305         (elf32_hppa_link_hash_table_create): Init to suit.
306         (elf32_hppa_check_relocs): Set has_12bit_branch and
307         has_17bit_branch as appropriate.
308         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
309         non-local functions.
310         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
311         Add space for plt_stub as needed.
312         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
313         functions at plt_stub.
314         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
315         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
316
317         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
318         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
319         of fixed size, and if negative, disable handling of input sections
320         before stub section.  Set up default stub group size depending
321         on detected branch relocs.
322         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
323         ensure different offsets from sym_value aren't rounded to
324         different 2k blocks.  Use lrsel and rrsel for other stubs too for
325         consistency rather than necessity.
326         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
327         (final_link_relocate): Likewise.
328         (elf32_hppa_relocate_section): Likewise.
329
330         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
331         (_bfd_elf_hppa_gen_reloc_type): Generate them.
332         (elf_hppa_final_link_relocate): Handle them.
333         (elf_hppa_relocate_insn): Likewise.
334         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
335
336 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
337
338         * elfcode.h (elf_object_p): Preserve and clear abfd section
339         information.  Restore at error.
340
341 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
342
343         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
344         is empty, make sure that its rva also 0. NT loader dislikes
345         having otherwise.
346
347 2000-09-26  Steve Ellcey <sje@cup.hp.com>
348
349         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
350         global by default.
351
352 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
353
354         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
355         currently unused RELATIVE_DYNAMIC_RELOCS code.
356         (hppa_discard_copies): Likewise.
357         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
358         comments.  Don't check non-code output sections for stub grouping.
359
360 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
361
362         * section.c (bfd_get_unique_section_name): Return NULL if
363         bfd_malloc fails.
364
365 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
366
367         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
368         instruction sequence to actually work.
369         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
370         accordingly.
371
372 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
373
374         * elf32-sh.c (sh_elf_relocate_section): Use
375         _bfd_final_link_relocate to apply the relocation against a section
376         symbol, when doing relocatable links.
377
378 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
379
380         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
381         to id_sec.
382         (stub_hash_newfunc): Here too.
383         (hppa_add_stub): And here.
384         (elf32_hppa_link_hash_table): Remove stub_section_created,
385         reloc_section_created, first_init_sec and first_fini_sec.  Add
386         stub_group.
387         (elf32_hppa_link_hash_table_create): Init to suit.
388         (hppa_get_stub_entry): Add support for grouping stub sections.
389         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
390         section code.  Index stub vars by section->id.
391         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
392         exit paths.  Zap allocation of above removed vars.  Refine
393         link-once test.
394
395         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
396         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
397         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
398         rather than pointer to bfd_link_info.
399         (hppa_add_stub): Likewise.
400         (final_link_relocate): Likewise.
401
402 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
403
404         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
405         link-once sections.
406
407 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
408
409         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
410         ld/emulparams/shelf.sh.
411
412 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
413
414         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
415         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
416         * bfd-in2.h: Regenerate.
417
418 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
419
420         * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
421         LITUSE relocations incorrectly if -relax is specified on the ld
422         command line and the displacement field of the load or store
423         instruction is non-zero. (Patch by paul.winalski@compaq.com)
424
425 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
426
427         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
428         first_fini_sec here.
429         (elf32_hppa_size_stubs): Instead correctly find the first .init
430         and .fini section here.
431
432 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
433
434         * elf32-hppa.c (clobber_millicode_symbols): New function.
435         (elf32_hppa_size_dynamic_sections): Call it.
436
437 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
438
439         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
440         packed.  Add plabel, plt_abs packed booleans.
441         (hppa_link_hash_newfunc): Init new fields.
442         (PLABEL_PLT_ENTRY_SIZE): Define.
443         (hppa_stub_name): Use size_t len vars.
444         (hppa_add_stub): Likewise.
445         (elf32_hppa_build_stubs): Likewise.
446         (hppa_build_one_stub): Kill some compiler warnings.
447         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
448         if dynamic linking.  Munge the local plt offsets into
449         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
450         size_t len vars.  Add assert for plabel addend.
451         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
452         (elf32_hppa_hide_symbol): New function.
453         (elf_backend_hide_symbol): Define.
454         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
455         with h->plabel set.  Don't make plt entries to have dynamic syms
456         when they have been forced local.  If plt entry is used by a
457         plabel, make it PLABEL_PLT_ENTRY_SIZE.
458         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
459         Set up .plt offsets for local syms.
460         (elf32_hppa_relocate_section): Initialise plt entries for local
461         syms.  Leave weak undefined plabels zero.  Make global plabel
462         relocs against function symbol, and leave the addend zero.
463         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
464         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
465         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
466         relocs instead of SEGREL32 for dynamic got relocs.
467         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
468         (elf_backend_got_header_size): Adjust.
469         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
470
471         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
472         (hppa_type_of_stub): Use it instead of #if 0
473         (hppa_discard_copies): Use it here too.
474         (elf32_hppa_size_dynamic_sections): And here.
475
476         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
477         (elf32_hppa_link_hash_table_create): And here.
478         (hppa_build_one_stub): And here.  Instead keep track of stub
479         offset using _raw_size.
480         (elf32_hppa_size_stubs): Likewise.
481         (elf32_hppa_build_stubs): Likewise.
482         (hppa_size_one_stub): Likewise.  Resize reloc section too.
483
484         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
485         first_fini_sec handling.  Don't search for reloc section or set
486         hplink->reloc_section_created here.
487         (elf32_hppa_size_stubs): Instead search for reloc sections, and
488         set reloc_section_created here.
489         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
490         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
491         and DT_FINI.
492         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
493
494         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
495         with `hplink->root.'.
496         (elf32_hppa_check_relocs): Likewise.
497         (elf32_hppa_gc_sweep_hook): Likewise.
498         (elf32_hppa_adjust_dynamic_symbol): Likewise.
499         (hppa_handle_PIC_calls): Likewise.
500         (elf32_hppa_size_dynamic_sections): Likewise.
501         (elf32_hppa_set_gp): Likewise.
502         (elf32_hppa_relocate_section): Likewise.
503         (elf32_hppa_finish_dynamic_symbol): Likewise.
504         (elf32_hppa_finish_dynamic_sections): Likewise.
505
506         From  David Huggins-Daines  <dhd@linuxcare.com>
507         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
508         defined weak symbols in shared links.
509         (final_link_relocate): Calls to defined weak symbols in shared
510         objects must go via import stubs, as the target might not be known
511         at link time.
512
513 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
514
515         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
516         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
517         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
518         the original entries with EMPTY_HOWTOs, and added new ones to fill
519         in the gap.
520         (sh_elf_info_to_howto): Make sure the new gap isn't used.
521         (sh_elf_relocate_section): Likewise.
522
523 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
524
525         * cpu-mips.c (arch_info_struct): Add mips:4K
526         * bfd-in2.h (bfd_mach_mips4K): New define.
527         * archures.c: Add bfd_mach_mips4K to comment.
528         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
529         E_MIPS_ARCH_2 for bfd_mach_mips4K.
530
531 Wed Sep 13 19:31:39 2000  Marco Franzen <marcof@thyron.com>
532
533         * som.c (som_write_symbol_strings): Do not used fixed buffers,
534         use size_t as a counter.
535         (som_write_space_strings): Similarly.
536
537 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
538
539         * elf32-i860.c (elf32_i860_relocate_pc26): New function
540         and prototype.
541         (elf32_i860_relocate_section): Invoke new function from here.
542
543 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
544
545         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
546         static.
547
548 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
549
550         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
551         target section name instead of dumping core when the target symbol is
552         undefined.
553
554 2000-09-09  Kazu Hirata  <kazu@hxi.com>
555
556         * riscix.c: Remove DEFUN.
557
558 2000-09-08  Nick Clifton  <nickc@redhat.com>
559
560         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
561         initialise flags in output bfd if the input bfd is the default
562         architecture with the default flags.
563
564 2000-09-08  Kazu Hirata  <kazu@hxi.com>
565
566         * archive.c: Fix formatting.
567         * coff-arm.c: Likewise.
568         * doc/chew.c: Likewise.
569
570 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
571
572         * section.c (bfd_get_unique_section_name): Put a dot before the
573         numeric suffix.
574
575 2000-09-07  Kazu Hirata  <kazu@hxi.com>
576
577         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
578         * elf.c: Fix formatting.
579
580 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
581
582         * config.bfd (sh-*-linux*): Added.
583         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
584         * targets.c: Declare them.
585         * elf32-sh-lin.c: New file.
586         * Makefile.am: Compile it.
587         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
588         * configure, Makefile.in: Rebuilt.
589
590 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
591
592         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
593         pseduo-section when determining where the TOC ends.
594
595         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
596         output x_tvndx as it is only two bytes wide.
597
598         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
599         reloc is 26 or 32 bits wide.
600
601         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
602         for relocs that don't change anything.  Also look at the full
603         6 bits of bitsize.
604
605 2000-09-06  Philip Blundell  <philb@gnu.org>
606
607         * config.bfd (arm*-*-uclinux*): New target.
608
609 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
610
611         * configure: Rebuilt with new libtool.m4.
612
613 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
614
615         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
616         word for variable name.
617         * bfd-in2.h: Regenerate.
618
619 2000-09-05  Nick Clifton  <nickc@redhat.com>
620
621         * config.in: Regenerate.
622         * libbfd.h: Regenerate.
623         * po/bfd.pot: Regenerate.
624         * doc/bfdint.texi: Remove CVS date string - it foils compares with
625         local versions.
626
627 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
628
629         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
630
631 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
632
633         Shared library and PIC support.
634         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
635         (GOT_ENTRY_SIZE): New.
636         (ELF_DYNAMIC_INTERPRETER): New.
637         (STUB_SUFFIX): Define.
638         (LONG_BRANCH_PIC_IN_SHLIB): Define.
639         (RELATIVE_DYNAMIC_RELOCS): Define.
640         (enum elf32_hppa_stub_type): New.
641         (struct elf32_hppa_stub_hash_entry): Rename offset to
642         stub_offset.  Add a number of new fields.
643         (struct elf32_hppa_link_hash_entry): New.
644         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
645         global_value.
646         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
647         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
648         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
649         new fields.
650         (hppa_link_hash_newfunc): New function.
651         (elf32_hppa_link_hash_table_create): Use above function. Init new
652         fields.
653         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
654         instead of addend, and remove sym_name from args.  Don't use
655         symbol name for local syms, instead use sym index.
656         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
657         stub type rather than size.  Pass in hash and handle import stub
658         case.  Also pass in reloc instead of offset so we can calculate
659         PCREL22F and PCREL12F branches properly.
660         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
661         import and export stubs too.
662         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
663         import and export stub sizing.
664         (elf32_hppa_check_relocs): New function.
665         (elf32_hppa_adjust_dynamic_symbol): New function.
666         (hppa_discard_copies): New function.
667         (elf32_hppa_size_dynamic_sections): New function.
668         (elf_backend_size_dynamic_sections): Define.
669         (elf32_hppa_finish_dynamic_symbol): New function.
670         (elf_backend_finish_dynamic_symbol): Define.
671         (elf32_hppa_size_stubs): Stash params in link hash table, and move
672         some local vars into the link hash table too.  For shared links,
673         trundle over function syms, generating export stubs.  Handle
674         PCREL22F branches.  Break out stub creation code from here..
675         (hppa_add_stub): .. to here.  New function.
676         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
677         call the bfd linker.  Use elf_gp to record global pointer.
678         Calculate a value from sections if $global$ is missing.
679         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
680         (elf32_hppa_gc_mark_hook): New function.
681         (elf_backend_gc_mark_hook): Define.
682         (elf32_hppa_gc_sweep_hook): New function.
683         (elf_backend_gc_sweep_hook): Define.
684         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
685         Add rel to args, and remove howto, input_bfd, offset, addend,
686         sym_name as we can recalculate these locally.  Handle calls to
687         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
688         handling of undefined weak syms.  Check that stubs are in range.
689         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
690         message on hitting a DPREL21L reloc that needs fixing.  Subtract
691         off PC for PCREL14F.  Break out code that does a stub lookup from
692         here..
693         (hppa_get_stub_entry): ..to here.  New function.
694         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
695         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
696         relocs, etc. etc.
697         (elf32_hppa_finish_dynamic_sections): New function.
698         (elf_backend_finish_dynamic_sections): Define.
699         (elf_backend_final_write_processing) Define.
700         (hppa_handle_PIC_calls): New function.
701         (elf32_hppa_build_stubs): Call it.  Pass link_info to
702         hppa_build_one_stub.
703         (elf32_hppa_create_dynamic_sections): New function
704         to create .plt and .got then set .plt flags correctly.
705         (elf_backend_create_dynamic_sections): Define.
706         (elf32_hppa_object_p): New function.
707         (elf_backend_object_p): Define.
708         (elf32_hppa_elf_get_symbol_type): New function.
709         (elf_backend_get_symbol_type): Define.
710         (elf_backend_can_gc_sections): Define.
711         (elf_backend_want_got_plt): Define.
712         (elf_backend_plt_alignment): Set to 2.
713         (elf_backend_plt_readonly): Define.
714         (elf_backend_want_plt_sym): Define.
715         (elf_backend_got_header_size): Reserve one entry.
716
717         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
718         (elf32_hppa_size_stubs): Pass in multi_subspace.
719         (elf32_hppa_set_gp): Declare.
720
721         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
722         (bfd_get_unique_section_name): New function.
723         * bfd_in2.h: Regenerate.
724
725         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
726         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
727         comment.
728
729         From  David Huggins-Daines  <dhd@linuxcare.com>
730         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
731         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
732         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
733         been updated in finish_dynamic_symbol before modifying function
734         symbol.
735
736         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
737         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
738         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
739         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
740         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
741         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
742         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
743         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
744
745         From David Huggins-Daines  <dhd@linuxcare.com>
746         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
747         style of local labels as well.
748
749 2000-09-03  Philip Blundell  <philb@gnu.org>
750
751         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
752         references to undefined symbols in debugging sections.
753
754 2000-09-02  H.J. Lu  <hjl@gnu.org>
755
756         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
757         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
758         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
759         section.
760
761 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
762
763         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
764         (elf32_i860_is_local_label_name): New function and prototype.
765
766 2000-09-02  Nick Clifton  <nickc@redhat.com>
767
768         * configure.in: Increase version number to 2.10.91.
769         * configure: Regenerate.
770         * aclocal.m4: Regenerate.
771         * config.in: Regenerate.
772         * po/bfd.pot: Regenerate.
773
774 2000-09-02  Daniel Berlin <dberlin@redhat.com>
775
776         * elf.c (_bfd_elf_make_section_from_shdr): Add
777         .gnu.linkobce.wi. to the list of debug section names.
778
779 2000-09-02  Nick Clifton  <nickc@redhat.com>
780
781         * dwarf2.c (find_debug_info): New function: Locate a section
782         containing dwarf2 debug information.
783         (bfd_dwarf2_find_nearest_line): Find all sections containing
784         debug information and include them in the stash.
785
786 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
787
788         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
789         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
790         (sh_reloc_map): Add new relocs.
791         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
792         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
793         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
794         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
795         functions.
796         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
797         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
798         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
799         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
800         New array constants.
801         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
802         New variables.
803         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
804         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
805         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
806         elf_sh_plt_reloc_offset): Define.
807         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
808         elf_sh_link_hash_table): New structs.
809         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
810         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
811         relocation types.
812         (elf_backend_create_dynamic_sections,
813         bfd_elf32_bfd_link_hash_table_create,
814         elf_backend_adjust_dynamic_symbol,
815         elf_backend_size_dynamic_sections,
816         elf_backend_finish_dynamic_symbol,
817         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
818         elf_backend_plt_readonly, elf_backend_want_plt_sym,
819         elf_backend_got_header_size, elf_backend_plt_header_size):
820         Define.
821         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
822         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
823         New relocs.
824         * bfd-in2.h, libbfd.h: Rebuilt.
825
826 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
827
828         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
829         change.
830
831 Thu Aug 31 22:49:30 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
832
833         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
834         not initialized, set them to indicate the SH1 instruction set.
835
836 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
837
838         * acinclude.m4: Include libtool and gettext macros from the
839         top level.
840         * aclocal.m4, configure: Rebuilt.
841
842 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
843
844         * elf.c: Eliminate references to __sparcv9 macro; replace with
845         autoconf variables HAVE_PSINFO32_T etc.
846         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
847         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
848         * config.in: Ditto.
849         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
850         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
851         * aclocal.m4: Ditto.
852         * configure: Regenerate.
853
854 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
855
856         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
857         for any shared link, not just shared -Bsymbolic.
858         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
859         any shared link, and pass link info to it.
860         (elf_i386_size_dynamic_sections): Update comment.
861         (elf_i386_discard_copies): Modify to discard relocs for symbols
862         that have been forced local.
863         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
864         that have been forced local.
865
866 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
867
868         * elflink.h (elf_link_add_object_symbols): Allow common
869         symbols to have an alignment of 1 if explicitly requested, and
870         not overridden by other definitions.
871
872 2000-08-22  Doug Kwan <dkwan@transmeta.com>
873
874         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
875         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
876
877 2000-08-22  H.J. Lu  <hjl@gnu.org>
878
879         * elf-bfd.h (elf_link_hash_table): Add runpath.
880
881         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
882         * bfd-in2.h: Rebuilt.
883
884         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
885         "runpath" field to NULL.
886         (bfd_elf_get_runpath_list): New function.
887
888         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
889         DT_RUNPATH entries.
890
891 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
892
893         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
894         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
895         explicitly.  Improve validation of r_type.
896
897 2000-08-21  H.J. Lu  <hjl@gnu.org>
898
899         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
900         dynamic allocated content space.  Add a comment to remind us that
901         one day this ought to be fixed.
902         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
903         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
904         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
905
906 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
907
908         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
909         field with the newly relocated value instead of adding it to the
910         existing immediate field.
911         (elf32_i860_relocate_splitn): Likewise.
912         (elf32_i860_relocate_highadj): Likewise.
913
914 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
915
916         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
917         was previously just a stub).
918
919 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
920
921         * elflink.c (_bfd_elf_create_got_section): Don't abort().
922         Formatting fixes.
923         (_bfd_elf_create_dynamic_sections): Likewise.
924
925 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
926
927         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
928         for undefined symbols to be the beginning of the section.
929
930         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
931         four extra entries at the beginning of the .rela.plt section.
932         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
933         section to account for the four reserved entries in the .plt section.
934
935 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
936
937         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
938         to the list of NOPs we recognize after a branch-and-link.
939         Use the ori NOP when one is needed.
940
941         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
942         for large archives.
943
944 2000-08-14  Jim Wilson  <wilson@cygnus.com>
945
946         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
947         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
948         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
949         EF_IA_64_ABSOLUTE.
950
951 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
952
953         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
954
955 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
956
957         * elf32-i860.c (elf32_i860_relocate_section): New function.
958         (i860_final_link_relocate): New function.
959         (elf32_i860_relocate_splitn): New function.
960         (elf32_i860_relocate_pc16): New function.
961         (elf32_i860_relocate_highadj): New function.
962         (elf32_i860_howto): Minor adjustments to some relocations.
963         (elf_info_to_howto_rel): Define.
964         (elf_backend_relocate_section): Define.
965
966 2000-08-10  Nick Clifton  <nickc@cygnus.com>
967
968         * elf32-arm.h: Fix formatting.
969
970 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
971
972         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
973
974 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
975
976         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
977
978 2000-08-07  Kazu Hirata  <kazu@hxi.com>
979
980         * ieee.c (ieee_write_debug_part): Rewrite a comment.
981         * elf64-ia64.c: Fix a typo.
982
983 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
984
985         * elf32-i860 (elf32_i860_howto_table): New structure.
986         (lookup_howto): New function.
987         (elf32_i860_reloc_type_lookup): New function.
988         (elf32_i860_info_to_howto_rela): New function.
989         (elf_code_to_howto_index): New structure.
990         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
991         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
992         elf32_i860_reloc_type_lookup.
993
994 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
995
996         * som.c (struct fixup_format): Constify `format'.
997         (som_hppa_howto_table): Use SOM_HOWTO macro.
998         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
999         (som_bfd_reloc_type_lookup): Likewise.
1000         (compare_subspaces): Remove unused `count1', `count2'.
1001         (som_begin_writing): Remove unused `total_reloc_size'.
1002         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
1003         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
1004         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
1005         (som_find_nearest_line): Decorate unused parameter(s).
1006         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
1007         (som_bfd_link_split_section): Likewise.
1008
1009 2000-08-03  Nick Clifton  <nickc@cygnus.com>
1010
1011         * section.c: Restore backed out code.
1012         * elf.c: Restore backed out code.
1013         (copy_private_bfd_data): Fix bug preventing stipped dynamic
1014         binaries from working.
1015         * bfd-in2.h: Regenerate.
1016
1017 2000-08-03  H.J. Lu  <hjl@gnu.org>
1018
1019         * section.c: Back out the change made by Nick Clifton
1020         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
1021         binaries.
1022         * bfd-in2.h: Likewise.
1023         * elf.c: Likewise.
1024
1025 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
1026
1027         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
1028
1029 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
1030
1031         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
1032         * bfd-in2.h, libbfd.h: Regenerate.
1033
1034 2000-07-31  Nick Clifton  <nickc@cygnus.com>
1035
1036         * section.c (struct sec): Add new boolean field 'segment_mark'.
1037         (STD_SECTION): Initialise new field to zero.
1038
1039         * bfd-in2.h: Regenerate.
1040
1041         * elf.c (copy_private_bfd_data): Reorganise section to segment
1042         mapping to cope with moved sections requiring new segments,
1043         and overlapping segments.
1044         (SEGMENT_END): New macro: Return the end address of a segment.
1045         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
1046         contains a section by comparing their VMA addresses.
1047         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
1048         contains a section by comparing their LMA addresses.
1049         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
1050         section should be included in a segment.
1051         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
1052         follows another in memory.
1053         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
1054         segments overlap.
1055
1056 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
1057
1058         * cpu-i860.c: Added comments.
1059
1060         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
1061         bfd_elf32_i860_little_vec.
1062         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
1063         (ELF_MAXPAGESIZE): Changed to 4096.
1064
1065         * targets.c (bfd_elf32_i860_little_vec): Declaration of
1066         new target.
1067         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
1068
1069         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
1070         config for little endian elf32 i860.
1071         (targ_defvec): Define for the new config above
1072         as "bfd_elf32_i860_little_vec".
1073         (targ_selvecs): Define for the new config above
1074         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
1075
1076         * configure.in (bfd_elf32_i860_little_vec): Added recognition
1077         of new target vec.
1078
1079         * configure: Regenerated.
1080
1081 2000-07-27  H.J. Lu  <hjl@gnu.org>
1082
1083         * elflink.h (elf_merge_symbol): Take one more argument,
1084         dt_needed, to indicate if the symbol comes from a DT_NEEDED
1085         entry. Don't overide the existing weak definition if dt_needed
1086         is true.
1087         (elf_link_add_object_symbols): Pass dt_needed to
1088         elf_merge_symbol ().
1089
1090 2000-07-27  Nick Clifton  <nickc@cygnus.com>
1091
1092         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
1093         allocated contents.
1094
1095 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
1096
1097         * configure.host (*-*-aix*): AIX has 'long long' always.
1098
1099         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
1100         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
1101         (xcoff_write_archive_contents_big): Don't update the offset
1102         of the symbol table, xcoff_write_armap will do it.
1103
1104 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
1105
1106         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
1107         of dynobj for SGI_COMPAT checks.
1108
1109 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1110
1111         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
1112         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
1113         * bfd-in2.h: Regenerate.
1114
1115 2000-07-21  Nick Clifton  <nickc@cygnus.com>
1116
1117         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
1118         range symbol indices in relocs and issue an error message.
1119
1120 2000-07-20  H.J. Lu  <hjl@gnu.org>
1121
1122         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
1123         info->new_dtags when setting DT_FLAGS_1. It will only be set
1124         by the new linker options. It shouldn't break anything.
1125
1126 2000-07-20  H.J. Lu  <hjl@gnu.org>
1127
1128         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
1129         only if info->new_dtags is true.
1130
1131 2000-07-20  H.J. Lu  <hjl@gnu.org>
1132
1133         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
1134         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
1135
1136 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
1137
1138         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
1139         (ALL_MACHINES_CFILES): Add cpu-cris.c.
1140         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
1141         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
1142         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
1143         * Makefile.in: Rebuild.
1144         * aclocal.m4: Rebuild.
1145         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
1146         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
1147         (bfd_cris_arch): Declare.
1148         (bfd_archures_list): Add bfd_cris_arch.
1149         * bfd-in2.h: Rebuild.
1150         * config.bfd: (cris-*-*): New target.
1151         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
1152         * configure: Rebuild.
1153         * elf.c (prep_headers): Add bfd_arch_cris.
1154         * libbfd.h: Rebuild.
1155         * libaout.h (enum machine_type): Add M_CRIS.
1156         * reloc.c: Add CRIS relocations.
1157         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
1158         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
1159         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
1160         * po/POTFILES.in, po/bfd.pot: Regenerate.
1161
1162 2000-07-19  H.J. Lu  <hjl@gnu.org>
1163
1164         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
1165         DF_TEXTREL if DT_TEXTREL is set.
1166         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1167         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1168         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1169         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1170         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1171         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1172         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1173         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1174         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
1175         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1176
1177         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
1178         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
1179         DT_RPATH is set.
1180         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
1181
1182 2000-07-19  H.J. Lu  <hjl@gnu.org>
1183
1184         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
1185         * bfd-in2.h: Rebuild.
1186
1187         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
1188         (elf_dt_soname): New.
1189
1190         * elf.c (bfd_elf_set_dt_needed_soname): New.
1191
1192         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
1193         entry if the shared object loaded by DT_NEEDED is used to
1194         resolve the reference in a regular object.
1195
1196 2000-07-19  H.J. Lu  <hjl@gnu.org>
1197
1198         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
1199         DT_DEPAUDIT and DT_AUDIT as strings.
1200
1201 2000-07-19  Nick Clifton  <nickc@cygnus.com>
1202
1203         * format.c: Fix formatting.
1204
1205 2000-07-19  H.J. Lu  <hjl@gnu.org>
1206
1207         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
1208
1209 2000-07-19  H.J. Lu  <hjl@gnu.org>
1210
1211         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
1212         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
1213         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
1214         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
1215         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
1216         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
1217         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
1218
1219 Tue Jul 18 13:11:54 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1220
1221         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
1222         renamed functions from here...
1223         (assign_section_numbers): Use renamed functions.
1224         (prep_headers): Use renamed functions.
1225
1226         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
1227         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
1228         * bfd-in2.h: Regenerate.
1229
1230 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
1231
1232         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
1233         parenthesis in if statement.
1234
1235 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
1236
1237         Enable the support for Traditional MIPS.
1238         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
1239         return ict_none appropriately for traditional mips targets.
1240         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
1241         (STUB_MOVE): Conditionalize for traditonal mips.
1242         (STUB_LI16): Likewise.
1243         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
1244         room for RTPROC header.
1245         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
1246         the permission for the PT_DYNAMIC as read, write and execute.
1247         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
1248         for traditonal mips.
1249         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
1250         _DYNAMIC_LINKING for traditonal mips.
1251         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
1252         in case of traditonal mips.
1253         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
1254         entry is required. For a function if PLT is not required then set the
1255         corresponding hash table entry to 0.
1256         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
1257         traditonal mips.
1258         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
1259         shared object set the value to 0.
1260         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
1261         _DYNAMIC_LINKING for traditonal mips.
1262         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
1263         for traditonal mips.
1264
1265 2000-07-15  H.J. Lu  <hjl@gnu.org>
1266
1267         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
1268
1269 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
1270
1271         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
1272         out a structure that is BFD_IN_MEMORY.
1273
1274 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
1275
1276         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
1277         bfd pointer.  Print section id instead of bfd pointer for local
1278         syms.  Prefix addend with `+' for global syms as well as local.
1279         Correct calculation of name component lengths.
1280         (elf64_hppa_check_relocs): Update call to get_dyn_name.
1281
1282         From David Huggins-Daines  <dhd@linuxcare.com>
1283         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
1284         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
1285         (elf64_hppa_modify_segment_map): Likewise.
1286
1287 Tue Jul 11 17:21:52 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1288
1289         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
1290         addresses to be "naturally" sign extended.  Return -1 if unknown.
1291         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
1292         * bfd-in2.h: Regenerate.
1293
1294 Tue Jul 11 16:25:52 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1295
1296         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
1297         and ECOF_SIGNED_64 to list ways to extract an offset.
1298         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
1299         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
1300         Update.
1301         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
1302         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
1303
1304 Tue Jul 11 16:03:04 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1305
1306         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
1307         bfd_get_start_address.
1308         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
1309         (elf_swap_ehdr_out): Ditto.
1310
1311 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
1312
1313         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
1314         compatibility with older binutils.
1315
1316 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
1317
1318         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
1319         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
1320
1321         From Ryan Bradetich  <rbradetich@uswest.net>
1322         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
1323         (parse_line_table): Ditto.
1324         (_bfd_dwarf1_find_nearest_line): Ditto.
1325         * syms.c (cmpindexentry): Remove extra `*' from params.
1326
1327 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
1328
1329         * elf32-mips.c (sort_dynamic_relocs): New Function.
1330         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
1331         via qsort to sort the dynamic relocations in increasing r_symndx
1332         value.
1333
1334 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
1335
1336         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
1337         ATTRIBUTE_UNUSED to unused args.
1338         (get_opd): Likewise.
1339         (get_plt): Likewise.
1340         (get_dlt): Likewise.
1341         (get_stub): Likewise.
1342         (elf64_hppa_adjust_dynamic_symbol): Likewise.
1343         (elf64_hppa_link_output_symbol_hook): Likewise.
1344         (elf64_hppa_check_relocs): Delete unused var.
1345         (elf64_hppa_size_dynamic_sections): Likewise.
1346         (elf64_hppa_finalize_opd): Likewise.
1347         (elf64_hppa_finalize_dynreloc): Likewise.
1348         (elf64_hppa_modify_segment_map): Likewise.
1349         (elf64_hppa_finish_dynamic_sections): Likewise.
1350
1351         * elf-hppa.h (elf_hppa_final_write_processing): Add
1352         ATTRIBUTE_UNUSED to unused args.
1353         (elf_hppa_final_link_relocate): Likewise.
1354         (elf_hppa_record_segment_addrs): Add paretheses.
1355         (elf_hppa_relocate_section): Constify dyn_name.
1356
1357         From  David Huggins-Daines  <dhd@linuxcare.com>
1358         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
1359         rearrange case statement so that it gets preferred to 32-bit ones.
1360
1361         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
1362         asection->id instead of address of asection structure.
1363         (elf32_hppa_size_stubs): Likewise.
1364
1365         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
1366         for .init* and .fini*.
1367
1368         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
1369         and addends used in stub names to 32 bits.
1370         (elf32_hppa_size_stubs): Likewise.
1371
1372         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
1373         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
1374         not bfd_put_64.  Fix minor comment typo and formatting.
1375
1376         Changes to create multiple linker stubs, positioned immediately
1377         before the section where they are required.
1378         * elf32-hppa.c: Don't include hppa_stubs.h.
1379         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
1380         (elf32_hppa_stub_hash_table): Delete.
1381         (elf32_hppa_link_hash_entry): Delete.
1382         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
1383         stub_hash_table, and store the struct here rather than a pointer.
1384         Delete output_symbol_count.  Add offset array.  Change
1385         global_value to a bfd_vma.
1386         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
1387         (elf32_hppa_stub_hash_traverse): Delete.
1388         (elf32_hppa_name_of_stub): Delete.
1389         (elf32_hppa_link_hash_lookup): Delete.
1390         (elf32_hppa_link_hash_traverse): Delete.
1391         (elf32_hppa_stub_hash_table_init): Delete.
1392         (elf32_hppa_size_of_stub): Pass input section and offset rather
1393         than location and calculate location here.  Don't pass name as all
1394         stubs are now the same size.
1395         (elf32_hppa_stub_hash_newfunc): Init new fields.
1396         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
1397         too.
1398         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
1399         comparing against ints.  Rewrite stub handling code.
1400         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
1401         Case enums to int before comparing against ints.  Remove
1402         bfd_reloc_dangerous case.
1403         (elf32_hppa_build_one_stub): Rewrite.
1404         (elf32_hppa_size_one_stub): New function.
1405         (elf32_hppa_build_stubs): Rewrite.
1406         (elf32_hppa_size_stubs): Pass in linker call-back functions.
1407         Rewrite stub-handling specific code.
1408
1409         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
1410
1411         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
1412
1413         * hppa_stubs.h: Delete.
1414         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
1415         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
1416         * Makefile.in: Regenerate.
1417
1418         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
1419         e_nlrsel.
1420
1421         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
1422
1423         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
1424         and section name for bfd_reloc_notsupported error message.
1425         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
1426         bfd_reloc_notsupported.
1427         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
1428
1429         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
1430         undefined weak symbols for all relocs.
1431         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
1432         offsets are relative to one past the delay slot.
1433         (elf32_hppa_size_stubs): Account for reloc addend when calculating
1434         branch destination.  Put addend into stub name too.
1435         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
1436         adjust by 8 when deciding whether a linker stub is needed.  Put
1437         addend into stub name as for above.
1438
1439         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
1440         various args and vars.
1441         (elf32_hppa_bfd_final_link_relocate): Here too.
1442         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
1443         inner block var to avoid shadowing.
1444
1445         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
1446         unsigned.
1447         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
1448         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
1449         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
1450
1451         * libhppa.h: Change practically all unsigned ints to plain ints.
1452         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
1453         prototypes.
1454
1455         From Ryan Bradetich  <rbradetich@uswest.net>
1456         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
1457         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
1458         suit above.
1459         From  David Huggins-Daines  <dhd@linuxcare.com>
1460         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
1461         to the new OP_* ones.
1462
1463         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
1464         error exit.  Bail out earlier on plabel relocs that we aren't
1465         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
1466         string, and then don't free our copy.
1467         (elf32_hppa_build_one_stub): Make insn unsigned int.
1468
1469         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
1470         available with BL, not BE and BLE.
1471
1472         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
1473         code for elf arg relocs.
1474         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
1475         argument with elf_link_hash_entry h.  Handle undefined weak
1476         symbols.  Move $global$ lookup from here...
1477         (elf32_hppa_relocate_section): ...to here.  Return correct error
1478         message for non-handled relocs.
1479         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
1480         wrong test was -0x3ffff to +0x40000.
1481
1482         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
1483         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
1484         Handle them as such.
1485         (elf_hppa_relocate_insn): Fix a typo.
1486
1487         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
1488         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
1489         assemble_17, assemble_21): Delete.
1490         Supply defines for all 64 possible opcodes.
1491         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
1492         formats.  Handle COMICLR.
1493         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
1494         -10, -16, 16, 22.
1495
1496         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
1497         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
1498         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
1499         to suit.
1500         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
1501         the local syms - did this code get deleted accidentally?  Ignore
1502         undefined and undefweak syms.
1503
1504         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
1505         block.  Use it instead of elf64_hppa_hash_table (info).
1506         (elf_hppa_final_link_relocate): Use hppa_info instead of
1507         elf64_hppa_hash_table (info).
1508
1509         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1510         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1511         (hppa_rebuild_insn): Mask immediate bits here instead.
1512         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1513
1514 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
1515
1516         * section.c (struct sec): Add id field.  Tidy comment formatting.
1517         (bfd_make_section_anyway): Set id.
1518         (STD_SECTION): Init id too.
1519         Change CONST to const throughout.
1520         * archures.c (bfd_arch_info): Tidy comment.
1521         (bfd_arch_list): Change a CONST to const.
1522         * libbfd-in.h: Tidy comments and replace CONST with const.
1523         * elf-bfd.h: Likewise.
1524         * libbfd.h: Regenerate.
1525         * bfd-in2.h: Regenerate.
1526         * libcoff.h: Regenerate.
1527
1528 2000-07-07  DJ Delorie  <dj@redhat.com>
1529
1530         * archive.c (_bfd_write_archive_contents): Add an informative
1531         comment.
1532
1533 2000-07-06  Kazu Hirata  <kazu@hxi.com>
1534
1535         * srec.c: Fix formatting.
1536
1537 2000-06-05  DJ Delorie  <dj@redhat.com>
1538
1539         * MAINTAINERS: new
1540
1541 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
1542
1543         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
1544         value of PC-relative offsets.
1545
1546 2000-07-03  Jim Wilson  <wilson@cygnus.com>
1547
1548         * elf64-alpha.c (alpha_elf_size_info): New.
1549         (elf_backend_size_info): Define to alpha_elf_size_info.
1550         * elfcode.h (elf_size_info): Change hash bucket size to 4.
1551
1552 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
1553
1554         * elf32-mips.c: Include elf32-target.h again for the traditional
1555         MIPS targets.
1556
1557 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
1558
1559         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
1560         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
1561         (avr_info_to_howto_rela): Likewise.
1562         (elf32_avr_gc_mark_hook): Likewise.
1563         (elf32_avr_gc_sweep_hook): Likewise.
1564         (elf32_avr_relocate_section): Likewise.
1565
1566 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
1567
1568         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
1569         an external symbol for a non-shared, non-relocatable link.
1570
1571 2000-07-03  Nick Clifton  <nickc@redhat.com>
1572
1573         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
1574         is an external symbol.
1575         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
1576         external symbol.
1577
1578 2000-07-03  Kazu Hirata  <kazu@hxi.com>
1579
1580         * reloc16.c: Fix formatting.
1581
1582 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
1583
1584         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
1585         to add a new target for traditional mips i.e
1586         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
1587         * configure.in: Likewise.
1588         * configure: Rebuild.
1589         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
1590         bfd_target_vector.
1591         (bfd_elf32_tradlittlemips_vec): Likewise.
1592         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
1593         to see that elfNN_bed does not get redefined even if the target file
1594         is included twice for a chip. See elf32-mips.c.
1595
1596 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
1597
1598         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
1599         (CLEANFILES): Add DEPA.
1600         * Makefile.in: Regenerate.
1601
1602 2000-06-30  DJ Delorie  <dj@cygnus.com>
1603
1604         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
1605         can't assume the PE header is at 0x80.
1606
1607 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
1608
1609         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
1610
1611 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
1612
1613         * go32stub.h: Update stub.
1614
1615 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
1616
1617         * archures.c (bfd_mach_avr5): Define.
1618         * bfd-in2.h (bfd_mach_avr5): Define.
1619         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
1620         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
1621         (compatible): Update comment.  Add missing test.
1622         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
1623         for avr2 and avr4.  Simplify 8K wrap code.
1624         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
1625         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
1626
1627 2000-06-26  Kazu Hirata  <kazu@hxi.com>
1628
1629         * coff-h8300.c: Fix formatting.
1630         * cpu-h8300.c: Likewise.
1631
1632 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
1633
1634         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
1635         for local symbols whose names are unknown.
1636
1637 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
1638
1639         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
1640         find one.
1641         * Makefile.in: Regenerate.
1642         * doc/Makefile.in: Regenerate.
1643
1644 2000-06-20  H.J. Lu  <hjl@gnu.org>
1645
1646         * Makefile.am: Rebuild dependency.
1647         * Makefile.in: Rebuild.
1648
1649 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1650
1651         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
1652         (elf_backend_copy_indirect_symbol): Map to the new function.
1653
1654 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
1655
1656         * archive.c (normalize): Correct pointer comparison when checking
1657         for backslashes.
1658         (bfd_bsd_truncate_arname): Likewise.
1659         (bfd_gnu_truncate_arname): Likewise.
1660
1661 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
1662
1663         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
1664         sections elf_{text,data}_{section,symbol}.
1665         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
1666         (_bfd_mips_elf_hide_symbol): New function.
1667         (elf_backend_hide_symbol): Map to the new function.
1668         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
1669         definitions of mips_elf_{text,data}_{section,symbol}.
1670         (mips_elf_local_relocation_p): Try to find the direct symbol
1671         based on new check_forced argument.
1672         (mips_elf_calculate_relocation): Use new version of
1673         mips_elf_local_relocation_p.
1674         (mips_elf_relocate_section): Likewise.
1675         (_bfd_mips_elf_relocate_section): Likewise.
1676         (mips_elf_sort_hash_table): Only assert that have enough GOT
1677         space.
1678         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
1679         entry if the relocation based on the new external argument.
1680         (mips_elf_create_dynamic_relocation): Assert that we have a
1681         section contents allocated where we can swap out the dynamic
1682         relocations.
1683         (mips_elf_calculate_relocation): Find the real hash-table entry
1684         correctly by using h->root.root.type.  Only create a dynamic
1685         relocation entry if the symbol is defined in a shared library.
1686         Create an external GOT entry for the GOT16 relocation if the
1687         symbol was forced local.
1688         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
1689         dynamic index if the symbol was forced local.
1690
1691 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1692
1693         * elf32-mips.c: Fix typos in comments.
1694
1695 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
1696
1697         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
1698         CORE_VERSION_1.
1699
1700 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
1701
1702         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
1703         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
1704         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
1705         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
1706         (bfd_elf32_m68hc11_vec): Likewise.
1707         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
1708         Supports 68hc11 & 68hc12  at the same time.
1709         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
1710         bfd_target_vector.
1711         (bfd_elf32_m68hc11_vec): Likewise.
1712         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
1713         * archures.c (bfd_m68hc12_arch): Define and register in global list
1714         (bfd_m68hc11_arch): Likewise.
1715         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
1716         BFD_RELOC_M68HC11_3B): Define.
1717         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
1718         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
1719
1720 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
1721
1722         * elf_bfd.h (struct elf_backend_data): Add info argument to
1723         elf_backend_hide_symbol.
1724         (_bfd_elf_link_hash_hide_symbol): Likewise.
1725         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
1726         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
1727         * elflink.h (elf_link_add_object_symbols): Likewise.
1728         (elf_link_assign_sym_version): Likewise.
1729
1730 2000-06-18  H.J. Lu  <hjl@gnu.org>
1731
1732         * coff-i386.c (coff_i386_reloc): Don't return in case of
1733         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
1734         Compensate PE relocations when linking with non-PE object
1735         files to generate a non-PE executable.
1736
1737 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
1738
1739         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
1740         GOT entries if we're doing a static link or -Bsymbolic link.
1741
1742 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
1743
1744         * elflink.h (elf_link_adjust_relocs): Check for and call backend
1745         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
1746         available.
1747         (elf_link_output_relocs): Likewise.
1748         (elf_reloc_link_order): Likewise.
1749
1750 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1751
1752         * archures.c (enum bfd_architecture): #define constants for
1753         PowerPc and RS6000 machine numbers.
1754         * bfd-in2.h: Regenerate.
1755         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
1756         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
1757         and RS6000 machine numbers using #defined constants from
1758         archures.c.
1759         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
1760         machine numbers using #defined constants from archures.c.  Add
1761         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
1762         64-bit words in 620 entry.
1763         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
1764         RSC, and RS2.
1765         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
1766
1767 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
1768
1769         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
1770         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
1771         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
1772
1773 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1774
1775         * bfd-in.h (bfd_family_coff): Define.
1776         * bfd-in2.h: Regenerate.
1777         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
1778         coff_find_nearest_line): Check COFFness using bfd_family_coff()
1779         instead of bfd_target_coff_flavour.
1780         * cofflink.c (_bfd_coff_final_link): Likewise.
1781         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
1782         exclude XCOFF files.
1783         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
1784         Likewise.
1785         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
1786         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
1787         * xcofflink.c (XCOFF_XVECP): Delete.
1788         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
1789         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
1790         bfd_xcoff_record_link_assignment,
1791         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
1792         check for bfd_target_xcoff_flavour.
1793
1794 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1795
1796         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
1797         files on AIX 4.3.
1798         (read_hdr): New function.
1799         (rs6000coff_core_p): Store mstsave or __context64 struct instead
1800         of trying to extract individual registers.  Set abfd->arch_info
1801         to match the architecture that created the core file.
1802         (rs6000coff_get_section_contents): Delete.
1803         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
1804
1805 2000-06-14  H.J. Lu  <hjl@gnu.org>
1806
1807         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
1808         is NULL.
1809
1810 2000-06-13  H.J. Lu  <hjl@gnu.org>
1811
1812         * configure: Regenerate.
1813
1814 Tue Jun 13 01:28:57 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1815
1816         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
1817         armpei_little_vec.
1818
1819 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
1820
1821         * configure.in (VERSION): Update to show this is the CVS mainline.
1822
1823 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
1824
1825         * elf32-d10v.c: Include elf/d10v.h
1826         (enum reloc_type): Delete.
1827         * elf32-d30v.c: Include elf/d30v.h
1828         (enum reloc_type): Delete.
1829
1830         * Makefile.am: Run "make dep-am" to regenerate dependencies.
1831         * Makefile.in: Regenerate.
1832
1833         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
1834         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
1835         move HOWTOs into elf_howto_table.
1836         (R_386_standard, R_386_ext_offset): Define.
1837         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
1838         (elf_i386_reloc_type_lookup): Modify calculation of index into
1839         elf_howto_table since we've removed the padding.
1840         (elf_i386_info_to_howto_rel): Likewise.
1841         (elf_i386_relocate_section): Likewise.
1842
1843 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
1844
1845         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
1846
1847 2000-06-05  H.J. Lu  <hjl@gnu.org>
1848
1849         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
1850         an error when seeing an undefined symbol with hidden/internal
1851         attribute. It is handled in *_relocate_section ().
1852
1853 2000-06-05  H.J. Lu  <hjl@gnu.org>
1854
1855         * elflink.h (elf_fix_symbol_flags): Follow the link for the
1856         indirect symbol for the ELF_LINK_NON_ELF bit.
1857         (elf_link_output_extsym): Don't output the indirect symbol even
1858         if the ELF_LINK_NON_ELF bit is set.
1859
1860 2000-06-01  J.T. Conklin  <jtc@redback.com>
1861
1862         * config.bfd (i[3456]86-*-netbsdelf*): New target.
1863         (i[3456]86-*-netbsdaout*): New target.
1864         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
1865         (i[3456]86-*-openbsd*): Likewise.
1866
1867 Tue May 30 15:39:04 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1868
1869         * trad-core.c: From hpux-core.c, include <dirent.h> or
1870         <sys/ndir.h> when possible.
1871
1872 2000-05-31  Nick Clifton  <nickc@cygnus.com>
1873
1874         * opintl.h (_(String)): Explain why dgettext is used instead
1875         of gettext.
1876
1877 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
1878
1879         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
1880         definitions.  We must not assume they are sorted in the file
1881         according to their index numbers.
1882
1883 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
1884
1885         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
1886         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
1887         R_PARISC_DIR17F are for absolute branches; Handle them as such.
1888
1889 2000-05-30  Nick Clifton  <nickc@cygnus.com>
1890
1891         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
1892         80960CA, 80960MC as valid machine names.
1893
1894 2000-05-30  H.J. Lu  <hjl@gnu.org>
1895
1896         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
1897         visibility bits if the symbol is undefined. Correctly handle
1898         weak undefined symbols with hidden and internal attributes.
1899
1900         * elflink.h (elf_link_add_object_symbols): Always turn the
1901         symbol into local if it has the hidden or internal attribute.
1902
1903 2000-05-29  Philip Blundell  <philb@gnu.org>
1904
1905         * ppcboot.c:  Add packed attribute if compiling with GCC.
1906
1907 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
1908
1909         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
1910
1911 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
1912
1913         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
1914         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
1915         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
1916         a few old comments.
1917
1918 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
1919
1920         * Makefile.am: Update dependencies with "make dep-am"
1921         * Makefile.in: Regenerate.
1922
1923         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
1924         bindtextdomain): Replace defines with those from intl/libgettext.h
1925         to quieten gcc warnings.
1926
1927 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
1928
1929         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
1930
1931         * archive.c (normalize, bfd_bsd_truncate_arname,
1932         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
1933         file names with backslashes.
1934
1935         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
1936         before opening it.
1937
1938         * sysdep.h: Include filenames.h.
1939
1940 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
1941
1942         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
1943
1944 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
1945
1946         * elf64-sparc.c (sparc64_elf_relax_section): New.
1947         (sparc64_elf_relocate_section): Optimize tail call into branch always
1948         if possible.
1949         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1950         (elf32_sparc_relax_section): New.
1951
1952 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
1953
1954         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
1955         Remove unusued variables.
1956         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
1957         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
1958         previous fix, so that shared libs really don't influence targets
1959         extension mask and memory model.
1960
1961 2000-05-23  H.J. Lu  <hjl@gnu.org>
1962
1963         * elf64-alpha.c (elf64_alpha_relocate_section): Check
1964         h->root.other not h->other.
1965         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1966
1967         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
1968
1969 2000-05-23  H.J. Lu  <hjl@gnu.org>
1970
1971         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
1972         undefined symbol with the non-default visibility attributes.
1973         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
1974         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1975         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1976         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1977         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1978         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1979         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1980         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1981         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1982         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
1983         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1984
1985 2000-05-22  Richard Henderson  <rth@cygnus.com>
1986
1987         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
1988         PCREL22, PCREL64I.  Zero size of special relocs.
1989         (elf64_ia64_reloc_type_lookup): Likewise.
1990         (USE_BRL, oor_brl, oor_ip): New.
1991         (elf64_ia64_relax_section): New.
1992         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
1993         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
1994         (elf64_ia64_relocate_section): Likewise.
1995         (bfd_elf64_bfd_relax_section): New.
1996         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
1997         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
1998         * bfd-in2.h, libbfd.h: Regenerate.
1999
2000 2000-05-22  Nick Clifton  <nickc@cygnus.com>
2001
2002         * configure.in : Add peigen.lo to MIPS PE targets.
2003         * configure: Regenerate.
2004
2005 2000-05-22  Momchil Velikov  <velco@fadata.bg>
2006
2007         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
2008         only if it is known for both input and output bfds. Separate
2009         error message strings as in some languages, it may be necessary
2010         to change more than one place in the string to change between
2011         'big' and 'little'.
2012
2013         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
2014         endianess checks, call _bfd_generic_verify_endian_match() instead.
2015
2016         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2017
2018         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
2019
2020         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
2021         endianess before checking bfd flavours.
2022
2023 2000-05-22  H.J. Lu  <hjl@gnu.org>
2024
2025         * elflink.h (elf_link_output_extsym): Clear the visibility
2026         field for symbols not defined locally.
2027
2028 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
2029
2030         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2031         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2032         (hppa_rebuild_insn): Mask immediate bits here instead.
2033         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2034
2035 2000-05-18  Momchil Velikov <velco@fadata.bg>
2036
2037         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
2038         relocs for an executable, ensure that they are virtual addresses.
2039
2040 Thu May 18 10:55:47 2000  Jeffrey A Law  (law@cygnus.com)
2041
2042         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
2043
2044 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
2045             Rick Gorton             <gorton@scrugs.lkg.dec.com>
2046
2047         * elflink.h: Add emitrelocations support: when enabled, relocation
2048         information and relocation sections are put into final output
2049         executables.  If the emitrelocations flag is set, do the following:
2050         (elf_bfd_final_link): Emit relocation sections.
2051         (elf_link_input_bfd): Compute relocation section contents.
2052         (elf_gc_sections): Don't clean relocation sections.
2053
2054 2000-05-16  Catherine Moore  <clm@cygnus.com>
2055
2056         * som.c (som_decode_symclass):  Recognize weak symbols.
2057
2058 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
2059
2060         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
2061         read idata section only from dataoff.
2062         (pe_print_edata): Correctly check for valid eat_member.
2063
2064 Tue May 16 00:04:11 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
2065
2066         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
2067
2068 2000-05-14  Philip Blundell  <philb@gnu.org>
2069
2070         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
2071
2072 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
2073
2074         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
2075
2076         * peigen.c (pe_print_idata): Look for .idata section and print
2077         info even if data directory has zero entries.  Read idata section
2078         starting from dataoff, and adjust all data offsets to suit.  Cast
2079         all bfd_vma vars to unsigned long before passing to fprintf.
2080         * peigen.c (pe_print_edata): Similarly, look for .edata section
2081         and print info even if data directory has zero entries.  Cast
2082         all bfd_vma vars to unsigned long before passing to fprintf.
2083
2084         From Szabolcs Szakacsits <szaka@F-Secure.com>
2085         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
2086         directory size which may be bogus.
2087         * peigen.c (pe_print_edata): Similarly.
2088
2089 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
2090
2091         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
2092         section is empty.
2093         (copy_private_bfd_data): Allow for space possibly taken up by elf
2094         headers when calculating segment physical address from lma.
2095
2096 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
2097
2098         * versados.c (versados_scan): Init stringlen and pass_2_done.
2099
2100         * trad-core.c (trad_unix_core_file_p): Return
2101         bfd_error_wrong_format rather than bfd_error_file_truncated.
2102
2103         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
2104         add_data_entry.  DataDirectory virtual address is relative.
2105         (pe_print_idata): Account for relative DataDirectory virtual
2106         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
2107         (pe_print_edata): Similarly.
2108
2109         From Szabolcs Szakacsits <szaka@F-Secure.com>
2110         * peigen.c (dir_names): Add Delay Import Directory.
2111         (pe_print_idata):  Always search for bfd section containing
2112         idata address rather than looking up section name.  Print this
2113         section name rather than .idata.
2114         (pe_print_edata): Similarly.  Also print some fields as %08lx.
2115         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
2116         Win32Version.
2117
2118 Fri May  5 20:44:40 2000  Clinton Popetz  <cpopetz@cygnus.com>
2119
2120         * xcoff.h: Rename to xcoff-target.h
2121         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
2122         * coff-rs6000.c: Ditto.
2123         * coff64-rs6000.c: Ditto.
2124         * coff-pmac.c: Ditto.
2125         * Makefile.in: Regenerate.
2126
2127 Fri May  5 16:51:03 2000  Clinton Popetz  <cpopetz@cygnus.com>
2128
2129         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
2130         Change U802TOC64MAGIC to U803XTOCMAGIC.
2131
2132 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
2133
2134         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
2135         * bfd-in.h: Prototype bfd_elf_get_arch_size.
2136         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
2137
2138 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
2139
2140         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
2141
2142 2000-05-03  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2143
2144         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
2145         hidden and internal symbols.
2146         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
2147         visibility.
2148         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
2149         assign a PLT or GOT entry to symbols with hidden and
2150         internal visibility.
2151
2152 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
2153
2154         * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
2155         the .bss section.
2156         * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2157
2158 2000-05-02  H.J. Lu  <hjl@gnu.org>
2159
2160         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
2161         ELFOSABI_SYSV.
2162
2163 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2164
2165         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
2166         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
2167         dependencies.
2168         * Makefile.in: Regenerate.
2169
2170 Mon May  1 16:56:47 2000  Jim Wilson  <wilson@cygnus.com>
2171
2172         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
2173         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
2174         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
2175         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
2176         * Makefile.in: Rebuild.
2177
2178 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2179
2180         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
2181         doesn't work very well.
2182
2183         * elf-hppa.h (elf_hppa_internal_shdr): Define.
2184         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
2185         Set hdr->s_type to 1 if ARCH_SIZE == 32.
2186         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
2187         (elf_hppa_info_to_howto): Likewise.
2188         (elf_hppa_info_to_howto_rel): Likewise.
2189         (elf_hppa_reloc_type_lookup): Likewise.
2190         (elf_hppa_is_local_label_name): Likewise.
2191         (elf_hppa_fake_sections): Likewise.
2192         (elf_hppa_final_write_processing): Likewise.
2193         (elf_hppa_howto_table): Fully initialise all entries.
2194         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
2195         (elf_hppa_info_to_howto): Likewise.
2196         (elf_hppa_info_to_howto_rel): Likewise.
2197         (elf_hppa_reloc_type_lookup): Likewise.
2198         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
2199         elf_hppa_unmark_useless_dynamic_symbols,
2200         elf_hppa_remark_useless_dynamic_symbols,
2201         elf_hppa_record_segment_addrs, elf_hppa_final_link,
2202         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
2203         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
2204         elf32-hppa.c mess is cleaned up.
2205         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
2206         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
2207         r_field then call hppa_field_adjust inline func with variable
2208         r_field arg, instead call hppa_field_adjust with fixed arg.
2209         In case R_PARISC_PCREL22F, don't set r_field.
2210         (elf_hppa_relocate_insn): Change args and return type to unsigned
2211         int.  Call re_assemble_* funcs to do the work.
2212
2213         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
2214         sign extending.
2215
2216         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
2217         extending.
2218         (sign_extend): Mask first before sign extending.
2219         (low_sign_extend): Rewrite without condition expression.
2220         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
2221         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
2222         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2223         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
2224         result as function return value rather than through pointer arg.
2225         Accept unsigned int args, and return unsigned int.
2226         (re_assemble_3): New.  Combines function of dis_assemble_3 with
2227         re-assembly of opcode and immediate.
2228         (re_assemble_12): Likewise.
2229         (re_assemble_16): Likewise.
2230         (re_assemble_17): Likewise.
2231         (re_assemble_21): Likewise.
2232         (re_assemble_22): Likewise.
2233         (hppa_field_adjust): Rewrite and document, paying attention to
2234         size of types and signed/unsigned issues.
2235         (get_opcode): Shift before masking.
2236         (FDLW): Rename to FLDW.
2237         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
2238         (hppa_rebuild_insn): Change args and return value to unsigned
2239         int.  Make use of re_assemble_*.  Correct case 11.
2240
2241         * dep-in.sed: Handle ../opcodes/.
2242         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
2243         elf64-hppa.h, hppa_stubs.h, xcoff.h.
2244         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
2245         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
2246         elfarm-nabi.lo dependencies outside of auto-dependency area.
2247         Regenerate dependencies.
2248         * Makefile.in: Regenerate.
2249
2250         * configure.in (TRAD_HEADER): Test non-null before
2251         AC_DEFINE_UNQUOTED.
2252         * configure: Regenerate.
2253
2254         * reloc.c: Fix mis-spelling in comment.
2255
2256 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
2257
2258         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
2259         * vms.c (vms_openr_next_archived_file): Return NULL.
2260
2261 Fri Apr 28 21:34:44 2000  Clinton Popetz  <cpopetz@cygnus.com>
2262
2263         * coffcode.h Copy changes mistakenly done to libcoff.h in
2264         4/24/2000 patch.
2265
2266 2000-04-29  Andreas Jaeger  <aj@suse.de>
2267
2268         * libbfd-in.h: Correctly check GCC version.
2269         * bfd-in.h: Likewise.
2270         * libhppa.h: Likewise.
2271         * libbfd.h: Regenerate.
2272         * bfd-in2.h: Regenerate.
2273
2274 Fri Apr 28 14:58:37 2000  Clinton Popetz  <cpopetz@cygnus.com>
2275
2276         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
2277         coffdu-rs6000.{lo,c}.
2278         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
2279         on xcoff.h
2280         * Makefile.in: Regenerate.
2281         * xcoff.h: New file.
2282         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
2283         * coff-rs6000.c: Move all declarations and defines that are
2284         common to the xcoff backends into xcoff.h
2285         * coff64-rs6000.c: Ditto,
2286
2287 Fri Apr 28 08:35:21 2000  Clinton Popetz  <cpopetz@cygnus.com>
2288
2289         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
2290         _bfd_coff_force_symnames in strings and
2291         _bfd_coff_debug_string_prefix_length to their default values.
2292         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
2293
2294 Fri Apr 28 08:05:12 2000  Clinton Popetz  <cpopetz@cygnus.com>
2295
2296         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
2297         _bfd_coff_force_symnames in strings and
2298         _bfd_coff_debug_string_prefix_length to their default values.
2299
2300 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
2301
2302         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
2303         Check local_got_refcounts before dereferencing.
2304
2305         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
2306         before deciding we don't need R_PPC_PLT32 relocation.
2307         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
2308         dereferencing.
2309
2310         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
2311
2312         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
2313         .plt entries.
2314         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
2315         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
2316         (elf_i386_relocate_section): Allow for .plt to go missing.
2317         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
2318         can use a relative reloc for got as elf_i386_relocate_section.
2319         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
2320
2321 Wed Apr 26 16:31:28 2000  Clinton Popetz  <cpopetz@cygnus.com>
2322
2323         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
2324
2325 Mon Apr 24 15:20:35 2000  Clinton Popetz  <cpopetz@cygnus.com>
2326
2327         * Makefile.am (coff64-rs6000.lo): New rule.
2328         * Makefile.in: Regenerate.
2329         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
2330         xcoff_is_local_label_name, xcoff_rtype2howto,
2331         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
2332         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
2333         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
2334         (NO_COFF_SYMBOLS): Define.
2335         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
2336         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
2337         internally.
2338         (MINUS_ONE): New macro.
2339         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
2340         relocation.
2341         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
2342         coff_SWAP_aux_out): Map to the new functions.
2343         * coff64-rs6000.c: New file.
2344         * libcoff.h (bfd_coff_backend_data): Add new fields
2345         _bfd_coff_force_symnames_in_strings and
2346         _bfd_coff_debug_string_prefix_length.
2347         (bfd_coff_force_symnames_in_strings,
2348         bfd_coff_debug_string_prefix_length): New macros for above fields.
2349         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
2350         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
2351         of using coff_swap_sym_in directly.
2352         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
2353         (coff_set_flags) Set magic for XCOFF64.
2354         (coff_compute_section_file_positions): Add symbol name length to
2355         string section length if bfd_coff_debug_string_prefix_length is
2356         true.
2357         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
2358         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
2359         using coff_swap_lineno_in directly.
2360         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
2361         and _bfd_coff_debug_string_prefix_length fields.
2362         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
2363         symbol names into strings table when
2364         bfd_coff_force_symnames_in_strings is true.
2365         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
2366         SET_RELOC_VADDR): New macros.
2367         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
2368         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
2369         code.
2370         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
2371         changes within RS6000COFF_C specific code.
2372         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
2373         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
2374         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2375         Extend existing hack on target name.
2376         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
2377         target name.
2378         * coff-tic54x.c (ticof): Keep up to date with new fields
2379         in bfd_coff_backend_data.
2380         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
2381         targ_selvecs to include rs6000coff64_vec for rs6000.
2382         * configure.in: Add rs6000coff64_vec case.
2383         * cpu-powerpc.c: New bfd_arch_info_type.
2384
2385 Mon Apr 24 02:17:31 2000  Jeffrey A Law  (law@cygnus.com)
2386
2387         * config.bfd: Only disable elf32-hppa vectors, not all of the
2388         BSD and OSF configuration support.  Provide (disabled) clauses
2389         for PA64 support.
2390         * configure.in: Add clause for PA64 support.
2391         * configure: Rebuilt.
2392
2393         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
2394         (bfd_elf64_hppa_vec): Declare.
2395
2396         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
2397         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
2398         (elf64-hppa.lo): Add dependencies.
2399         * Makefile.in: Rebuilt.
2400
2401         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
2402
2403 Mon Apr 24 02:14:29 2000  Jason Eckhardt  <jle@cygnus.com>
2404
2405         * libhppa.h (dis_assemble_16): New function.
2406         (pa_arch): Added pa20w element.
2407
2408 Mon Apr 24 01:49:03 2000  Ulrich Drepper  <drepper@cygnus.com>
2409
2410         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
2411         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
2412         bfd_elf64_slurp_reloc_table.
2413
2414         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
2415         definitions to get external names.
2416         (elf_write_relocs): Renamed from write_relocs and make global.
2417         (elf_slurp_reloc_table): Make global.
2418         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
2419
2420         * archive.c (hpux_uid_gid_encode): New function.
2421         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
2422         defined and the ID is greater than 99999.
2423         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
2424         special uid/gid fields into 32 bit values.
2425
2426 2000-04-21  Matthew Green  <mrg@cygnus.com>
2427
2428         * config.bfd: Add NetBSD/sparc64 support.
2429
2430 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
2431                           David Mosberger  <davidm@hpl.hp.com>
2432                           Timothy Wall <twall@cygnus.com>
2433                           Jim Wilson  <wilson@cygnus.com>
2434
2435         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
2436         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
2437         (BFD64_BACKENDS): Add elf64-ia64.lo.
2438         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
2439         (cpu-ia64.lo, elf64-ia64.lo): New rules.
2440         * Makefile.in: Rebuild.
2441         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
2442         (bfd_ia64_arch): Declare.
2443         (bfd_archures_list): Add bfd_ia64_arch.
2444         * bfd-in2.h: Rebuild.
2445         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
2446         * configure: Rebuild.
2447         * configure.host: (ia64-*-linux*): New host.
2448         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
2449         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
2450         * elf.c (prep_headers): Add bfd_arch_ia64.
2451         * libbfd.h: Rebuild.
2452         * reloc.c: Add IA-64 relocations.
2453         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
2454         Declare.
2455         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
2456         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
2457
2458 2000-04-21  Richard Henderson  <rth@cygnus.com>
2459
2460         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
2461         contents when performing a partial link.
2462         (bfd_elf_d30v_reloc_21): Likewise.
2463
2464 2000-04-20  H.J. Lu  <hjl@gnu.org>
2465
2466         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
2467         patch to symbols defined by a shared object.
2468         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
2469
2470 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2471
2472         K&R compiler fixes.
2473         * dwarf2.c (concat_filename): Avoid string literal concatenation.
2474         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
2475
2476 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
2477
2478         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
2479         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
2480         (coff-ia64.lo): Add dependency.
2481         * Makefile.in: Regenerate.
2482         * coff-ia64.c: New file.
2483         * efi-app-ia32.c: Ditto.
2484         * efi-app-ia64.c: Ditto.
2485         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
2486         (coff_set_flags): Ditto.
2487         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
2488         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
2489         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
2490         * configure: Regenerate.
2491         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
2492         (PUT_OPTHDR_IMAGE_BASE): Ditto.
2493         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2494         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2495         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2496         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2497         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2498         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2499         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2500         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2501         (GET_PDATA_ENTRY): Ditto.
2502         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
2503         data_start.  Use above macros to read fields that are 64 bit wide for
2504         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
2505         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
2506         FileAlignment and SectionAlignment to minimum alignment if they
2507         are zero.
2508         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
2509         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
2510         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
2511         Use above macros to write fields that are 64 bit wide for
2512         COFF_WITH_PEP64.
2513         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
2514         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
2515         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
2516         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
2517         begin address, end address, and unwind info address only.  Use
2518         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
2519         print addresses.
2520         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
2521         HIGH3ADJ relocation names.
2522         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
2523         * targets.c: Declare bfd_efi_app_ia32_vec and
2524         bfd_efi_app_ia64_vec.
2525         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
2526         bfd_efi_app_ia64_vec.
2527
2528 2000-04-17  Timothy Wall  <twall@cygnus.com>
2529
2530         * bfd-in2.h: Add prototypes for tic54x load page access.
2531         * bfd-in.h: Regenerate.
2532         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
2533         in customized _set_arch_mach function.
2534         * coffcode.h (coff_set_alignment_hook): Set section load page if
2535         the appropriate macro is defined.
2536         (write_object_contents): Read section load page.
2537
2538 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
2539
2540         * elf32-hppa.h: Update copyright date.
2541
2542         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
2543         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
2544
2545         * elf32-d30v.c (MAX32): Don't use LL suffix.
2546         (MIN32): Define in terms of MAX32.
2547         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
2548
2549         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
2550         expression.
2551
2552         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
2553
2554 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
2555
2556         * dep-in.sed: Match space before file name, not after.
2557         * Makefile.am: Regenerate dependencies.
2558         * Makefile.in: Regenerate.
2559
2560         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
2561         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
2562         extend without an if statement.
2563
2564 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
2565
2566         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
2567         signed quantites.
2568         * elf32-mips.c (gprel16_with_gp): Likewise.
2569         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
2570         here using -0x40000, not (int)0xfffc0000.
2571         (elf32_hppa_size_of_stub): Likewise.
2572
2573 2000-04-11  Timothy Wall  <twall@cygnus.com>
2574
2575         * coff-tic54x.c: Now builds with all targets.
2576         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
2577         * Makefile.in: Regenerate.
2578         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
2579         unitialized variable.
2580
2581 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2582
2583         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
2584         --enable-build-warnings option.
2585         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2586         * Makefile.in, configure: Re-generate.
2587
2588 2000-04-07  Nick Clifton  <nickc@cygnus.com>
2589
2590         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
2591         BFD_RELOC_THUMB_PCREL_BLX.
2592
2593         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2594         R_ARM_XPC25 and R_ARM_THM_PC22.
2595
2596         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
2597         R_ARM_XPC25 and R_ARM_THM_XPC22.
2598         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
2599         R_ARM_[XPC25|THM_XPC22].
2600
2601         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
2602         elf/arm-oabi.h to elf/arm.h
2603
2604         * Makefile.am: Fix dependency for elfarm-oabi.c
2605         * Makefile.in: Regenerate.
2606
2607         * bfd-in2.h: Regenerate.
2608         * libbfd.h: Regenerate.
2609
2610 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2611
2612         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
2613         and restore it on failure.  Release newly allocated tdata on
2614         failure.
2615
2616 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
2617
2618         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
2619         (decode_line_info): Set it.  Report error if unit->line_offset is
2620         equal to or larger than it.
2621
2622 2000-04-07  Timothy Wall  <twall@cygnus.com>
2623
2624         * targets.c: Added vecs for tic54x.
2625         * reloc.c: Added relocs for tic54x.
2626         * libbfd.h: Regenerated.
2627         * configure: Add TI COFF vecs for tic54x.
2628         * configure.in: Ditto.
2629         * config.bfd (targ_cpu): Recognize new tic54x target.
2630         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
2631         * bfd-in2.h: Add tic54x target and relocations.
2632         * Makefile.am, Makefile.in: Add tic54x target.
2633         * archures.c (bfd_archures_list): Add tic54x target.
2634         * coff-tic54x.c: New.
2635         * cpu-tic54x.c: New.
2636
2637 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2638
2639         * elfcore.h (elf_core_file_p): call backend_object_p which
2640         thereby gets an opportunity to update the arch/machine type.
2641
2642 2000-04-06  Timothy Wall  <twall@cygnus.com>
2643
2644         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
2645         class.  Handle SEC_CLINK and SEC_BLOCK flags.
2646         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
2647         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
2648
2649 2000-04-06  Nick Clifton  <nickc@cygnus.com>
2650
2651         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
2652         EF_INTERWORK if this is an unknown EABI.
2653         (elf32_arm_merge_private_bfd_data): Check EABI version
2654         numbers.  Only check EF_xxx flags if the EABI version number
2655         is unknown.
2656         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
2657         if the EABI version number is unknown.
2658         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
2659         if the EABI version number is unknown.
2660
2661 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
2662
2663         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
2664         BFD_RELOC_SH_LOOP_END.
2665         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
2666         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
2667         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
2668         (sh_elf_reloc_loop): New function.
2669         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
2670         any more.
2671         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
2672         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
2673         * bfd-in2.h, libbfd.h: Regenerate.
2674
2675 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
2676
2677         * po/bfd.pot: Regenerate.
2678
2679         * Makefile.am: Remove extraneous mkdep comment.
2680         (MKDEP): Use gcc -MM rather than mkdep.
2681         (DEP): Quote when passing vars to sub-make.  Add warning
2682         message to end.
2683         (DEP1): Rewrite for "gcc -MM".
2684         (CLEANFILES): Add DEP2.
2685         Update dependencies.
2686         * Makefile.in: Regenerate.
2687
2688 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
2689
2690         * configure.in: Added corefile support for AIX 4.3.  In particular,
2691         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
2692         compiling rs6000-core.c.
2693         * configure: Regenerated.
2694
2695 2000-04-03  H.J. Lu  <hjl@gnu.org>
2696
2697         * cache.c (bfd_open_file): Unlink the output file only if
2698         it has non-zero size.
2699
2700 2000-04-01  Ken Block USG  <block@zk3.dec.com>
2701
2702         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
2703         relative relocations for non-loaded sections in shared objects.
2704         (elf64_alpha_check_relocs): Similarly.
2705
2706 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
2707
2708         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
2709         BFD_RELOC_16 to switch for extended relocs.
2710         (MY_swap_ext_reloc_in): New.
2711         (MY_swap_ext_reloc_out): New.
2712         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
2713         than NAME(aout,swap_ext_reloc_in) for extended relocs.
2714         (NAME(aout,squirt_out_relocs)): Similarly use
2715         MY_swap_ext_reloc_out.
2716         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
2717
2718 2000-04-03  Kazu Hirata  <kazu@hxi.com>
2719
2720         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
2721         the R_PCRWORD_B case.
2722
2723 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
2724
2725         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
2726         on some targets.
2727         * ihex.c : Ditto.
2728
2729 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
2730
2731         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
2732         HOWTO references to bfd_elf_generic_reloc, that have
2733         partial_inplace == true, now use the new function.  The function
2734         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
2735         extends its fixes to the R_M32R_{16,24,32} relocs.
2736         The new logic in m32r_elf_lo16_reloc() has been removed, and
2737         it instead calls the new routine to obtain that functionality.
2738
2739 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
2740
2741         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
2742         elf32_avr_check_relocs, avr_final_link_relocate,
2743         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
2744         elf32_avr_object_p): Add prototypes.
2745         (elf32_avr_gc_mark_hook): Add default for h->root.type.
2746         (bfd_elf_avr_final_write_processing): Make static.
2747
2748 2000-03-27  Denis Chertykov  <denisc@overta.ru>
2749
2750         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
2751         * archures.c (bfd_architecture): Add AVR architecture.
2752         (bfd_archures_list): Add reference to AVR architecture info.
2753         * elf.c (prep_headers): Handle bfd_arch_avr.
2754         * reloc.c: Add various AVR relocation enums.
2755         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
2756         list.
2757         * Makefile.am: Add support for AVR elf.
2758         * configure.in: Likewise.
2759         * config.bfd: Likewise.
2760         * Makefile.in: Regenerate.
2761         * configure: This too.
2762         * bfd-in2.h: And this.
2763         * libbfd.h: And this.
2764
2765 2000-03-24  H.J. Lu  <hjl@gnu.org>
2766
2767         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
2768         (elf64_alpha_find_reloc_at_ofs): Likewise.
2769
2770 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
2771
2772         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
2773         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
2774         allowable range used to be -2**(n-1) to 2**n-1.
2775         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
2776         "boolean overflow" with "bfd_reloc_status_type flag".
2777
2778 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
2779
2780         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
2781
2782 2000-03-14  Kazu Hirata  <kazu@hxi.com>
2783
2784         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
2785         of shrinks properly, including the last reloc.
2786
2787 2000-03-13  Kazu Hirata  <kazu@hxi.com>
2788
2789         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
2790         check for R_MOVL2.
2791
2792 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
2793
2794         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
2795         a format mismatch rather than an "error" from bfd_read such as
2796         bfd_error_file_truncated.
2797
2798 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
2799
2800         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
2801         sign-extension and big-endian compensation for
2802         R_MIPS_64 even in ld -r.
2803
2804 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
2805
2806         * elf32-mips.c (mips_elf_next_relocation): Rename from
2807         mips_elf_next_lo16_relocation, and generalize to look
2808         for any relocation type.
2809         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
2810         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
2811         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
2812         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
2813         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
2814         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
2815         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
2816         (mips_rtype_to_howto): Likewise.
2817         (mips_elf_calculate_relocation): Handle new relocs.
2818         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
2819         are paired.  The addend for R_MIPS_GNU_REL16_S2
2820         is shifted right two bits.
2821
2822 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
2823
2824         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
2825         comment, and ensure it doesn't happen again.
2826         (bfd_install_relocation): Same here.
2827         (_bfd_relocate_contents): Don't bother assigning unused signmask
2828         shift result.  Fix typos in comments.
2829         Remove trailing whitespace throughout file.
2830
2831 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
2832
2833         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
2834         * bfd-in2.h: Rebuild.
2835
2836 2000-03-06  Nick Clifton  <nickc@cygnus.com>
2837
2838         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
2839         sym_ptr_ptr fields.
2840         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
2841         (SIZEOF_ILF_STRINGS): Redefine.
2842         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
2843         relative reloc, as opposed to a section relative reloc.
2844         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
2845         not C_LABEL.
2846         Add length of symbol's prefix to string pointer.
2847         Store a pointer to the symbol in the symbol pointer table.
2848         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
2849         Initialise the symbol pointer table.
2850         Store the hint in the Hint/Name table.
2851         Make the jump reloc be symbol realtive, not section relative.
2852         Create an import symbol for imported code.
2853
2854 2000-03-06  Catherine Moore  <clm@cygnus.com>
2855
2856         * elf.c (swap_out_syms):  Check for null type_ptr.
2857
2858 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
2859
2860         * aout-target.h (MY(write_object_contents)): Remove unused
2861         and unusable "#if CHOOSE_RELOC_SIZE".
2862         * pc532-mach.c (MY(write_object_contents)): Ditto.
2863         * netbsd.h (MY(write_object_contents)): Ditto.
2864         * hp300hpux.c (MY(write_object_contents)): Ditto.
2865         * freebsd.h (MY(write_object_contents)): Ditto.
2866         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
2867
2868 2000-02-29  H.J. Lu  <hjl@gnu.org>
2869
2870         * peicode.h (jtab): Make it static.
2871
2872         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
2873         defined and COFF_IMAGE_WITH_PE is not defined.
2874         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
2875         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
2876
2877 2000-03-01  Nick Clifton  <nickc@cygnus.com>
2878
2879         * coff-arm.c (bfd_arm_process_before_allocation): Make
2880         'symndx' signed to prevent compile time warning.
2881
2882         * coff-mcore.c: Remove unused prototype for pe_object_p.
2883
2884         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
2885         functions that are not used when COFF_IMAGE_WITH_PE is
2886         defined.
2887         (struct sh_opcode): Change type of 'flags' field to unsigned
2888         long so that it can hold the USESAS flag.
2889
2890         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
2891
2892         * elf-m10300.c (mn10300_elf_relax_section): Initialise
2893         'sym_sec'.
2894
2895         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
2896         parameters.
2897         Remove unusued variables and code.
2898         (elf_backend_add_symbol_hook): Fix prototype.
2899
2900         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
2901         'srelgot'.
2902
2903         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
2904         'oldinst'.
2905
2906         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
2907         parameters.
2908         Remove unusued variables and code.
2909         (elf_backend_add_symbol_hook): Fix prototype.
2910
2911         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
2912
2913         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
2914         to unused function parameter.
2915
2916         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
2917         parameters.
2918         Use EMPTY_HOWTO to initialise empty howto slots.
2919         Remove unused variables.
2920
2921         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
2922
2923 2000-03-01  H.J. Lu  <hjl@gnu.org>
2924
2925         * aoutx.h (aout_link_input_section_std): Pass "true" to
2926         the undefined_symbol callback.
2927         (aout_link_input_section_ext): Likewise.
2928         * bout.c (get_value): Likewise.
2929         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2930         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
2931         Likewise.
2932         (alpha_relocate_section): Likewise.
2933         * coff-arm.c (coff_arm_relocate_section): Likewise.
2934         * coff-i960.c (coff_i960_relocate_section): Likewise.
2935         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2936         * coff-mips.c (mips_relocate_section): Likewise.
2937         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2938         * coff-sh.c (sh_relocate_section): Likewise.
2939         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2940         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2941         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2942         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2943         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2944         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2945         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2946         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2947         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2948         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2949         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2950         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2951         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2952         * elflink.h (elf_link_output_extsym): Likewise.
2953         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
2954         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
2955         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
2956
2957         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
2958         undefined_symbol callback when building shared library with
2959         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
2960         "true".
2961         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2962         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2963         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2964         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2965         (elf32_mips_get_relocated_section_content): Likewise.
2966         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2967         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2968         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2969         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2970
2971 2000-02-28  Nick Clifton  <nickc@cygnus.com>
2972
2973         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
2974         * Makefile.in: Regenerate.
2975
2976         * configure.in: Add support for mips and sh pe vectors.
2977         * configure: regenerate.
2978
2979         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
2980         targets.
2981
2982         * targets.c: Add mips and sh pe vectors.
2983
2984         * libpei.h (coff_final_link_postscript): Only define if not
2985         already defined.
2986
2987         * coffcode.h: Add support for WinCE magic numbers.
2988
2989         * peigen.c (pe_print_reloc): Update comment and rearrange
2990         appending of newline character.
2991
2992         * peicode.h: Add support for Image Library Format.
2993         (pe_ILF_vars): Structure containing data used by ILF code.
2994         (pe_ILF_make_a_section): New function.  Create a section based
2995         on ILF data.
2996         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
2997         ILF data.
2998         (pe_ILF_make_a_symbol): New function.  Create a symbol based
2999         on ILF data.
3000         (pe_ILF_save_relocs): New function.  Store the relocs created
3001         by pe_ILF_make_a_reloc in a section.
3002         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
3003         an ILF object.
3004         (pe_ILF_object_p): New function.  Return a bfd_target pointer
3005         for an ILF object.
3006         (pe_bfd_object_p): If an ILF object is detected call
3007         pe_ILF_object_p on it.
3008
3009         * coff-arm.c: Add support for WinCE relocs which are different
3010         from normal ARM COFF relocs.
3011         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
3012
3013         * coff-sh.c: Add support for sh-pe target.
3014         * pe-sh.c: New file.  Support code for sh-pe target.
3015         * pei-sh.c: New file.  Support code for sh-pe target.
3016
3017         * pe-mips.c: New file.  Support code for mips-pe target.
3018         * pei-mips.c: New file.  Support code for mips-pe target.
3019
3020 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
3021
3022         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
3023         architecture if the object causing the bump is dynamic.
3024         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
3025         and also don't it for memory ordering.
3026         (sparc64_elf_write_relocs): Take src_rela out of the loop.
3027
3028 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
3029
3030         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
3031         calling bfd_get_section_size_before_reloc.
3032         (decode_line_info): Likewise.
3033         (_bfd_dwarf2_find_nearest_line): Likewise.
3034
3035 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
3036
3037         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
3038         name of the libtool directory.
3039         * Makefile.in: Rebuild.
3040
3041 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
3042
3043         * som.c (SOM_HOWTO): Define.
3044         (som_hppa_howto_table): Use it.
3045
3046 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
3047
3048         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
3049
3050         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
3051
3052 2000-02-24  Catherine Moore  <clm@cygnus.com>
3053
3054         * som.c (som_misc_symbol_info):  Add field
3055         secondary_def.
3056         (som_bfd_derive_misc_symbol_info):  Initialize
3057         secondary_def.
3058         (som_build_and_write_symbol_table): Keep track
3059         of secondary_def field.
3060         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
3061         if secondary_def field is set.
3062         (som_bfd_ar_write_symbol_stuff): Initialize
3063         secondary_def.
3064
3065 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
3066
3067         * dwarf2.c (read_address): Read 16-bits addresses.
3068         (parse_comp_unit): Accept addr_size == 2.
3069
3070 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
3071
3072         * bfd-in.h: Update copyright date.
3073
3074 2000-02-23  Linas Vepstas <linas@linas.org>
3075
3076         * cpu-i370.c: New file.
3077         * elf32-i370.c:  New file.
3078         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
3079         (bfd_i370_arch): New.
3080         (bfd_archures_list): Add bfd_i370_arch.
3081         * elf.c (prep_headers): Add bfd_arch_i370.
3082         * Makefile.am: Add support for IBM 370 elf.
3083         * config.bfd: Likewise.
3084         * configure.in: Likewise.
3085         * libbfd.h (bfd_reloc_code_real_names): Likewise.
3086         * reloc.c (bfd_reloc_code_type): Likewise.
3087         * targets.c: Likewise.
3088
3089         * Makefile.in: Regenerate.
3090         * configure: Regenerate.
3091         * bfd-in2.h: Regenerate.
3092
3093 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
3094
3095         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
3096         invalid relocation types, and change them to R_386_NONE.
3097
3098 2000-02-22  H.J. Lu  <hjl@gnu.org>
3099
3100         * elflink.h (elf_link_add_object_symbols): If a version symbol is
3101         not defined, don't add a second ELF_VER_CHR.
3102
3103         * elflink.h (elf_bfd_final_link): Call output_extsym for global
3104         symbols converted to local symbols even when stripping all
3105         symbols.
3106         (elf_link_output_extsym): Process global symbols converted to
3107         local symbols even if they are being stripped.
3108
3109 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
3110
3111         * archures.c (bfd_octets_per_byte): Return unsigned int.
3112         (bfd_arch_mach_octets_per_byte): Ditto.
3113         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
3114         comparison warning.
3115         * section.c (bfd_get_section_size_before_reloc): Quell signed
3116         vs. unsigned comparison warning.
3117         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
3118         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
3119         change.  What was I thinking?
3120         * bfd-in2.h: Regenerate.
3121
3122         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
3123         (elf_gc_sections): Same here.
3124         (elf_gc_common_finalize_got_offsets): And here.
3125
3126 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
3127
3128         ELF HPPA doesn't work at present; remove it until it does.
3129         * config.bfd: Comment out setting targ_defvec to
3130         bfd_elf32_hppa_vec.
3131         * Makefile.am: Rebuild dependencies.
3132         (BFD32_BACKENDS): Remove elf32-hppa.lo.
3133         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
3134         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
3135         * Makefile.in: Rebuild.
3136         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
3137
3138 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
3139
3140         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
3141         is no bfd_free().  Revert bfd_free part of previous change.
3142
3143 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
3144
3145         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
3146         arrays.
3147         (coff_compute_section_file_positions): Use bfd_free to pair
3148         bfd_malloc.
3149         (coff_write_object_contents): Likewise.
3150
3151         * coff-rs6000.c (xcoff_howto_table_16): New variable.
3152         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
3153
3154 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
3155
3156         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
3157         (xcoff_ar_file_hdr_big): New structure.
3158         (SIZEOF_AR_FILE_HDR_BIG): New macro.
3159         (xcoff_ar_hdr_big): New structure.
3160         (SIZEOF_AR_HDR_BIG): New macro.
3161         (xcoff_big_format_p): New macro.
3162         (xcoff_ardata_big): New macro.
3163         (arch_xhdr_big): New macro.
3164         (xcoff_slurp_armap): Handle large archives.
3165         (xcoff_archive_p): Detect large archives.
3166         (xcoff_read_ar_hdr): Handle large archives.
3167         (xcoff_openr_next_archived_file): Handle large archives.
3168         (xcoff_generic_stat_arch_elt): Handle large archives.
3169         (xcoff_write_armap_old): Rename from xcoff_write_armap.
3170         (xcoff_write_armap_big): New function.
3171         (xcoff_write_armap): New function, dispatch to _old or _big.
3172         (xcoff_write_archive_contents_old): Rename from
3173         xcoff_write_archive_contents.
3174         (xcoff_write_archive_contents_big): New function.
3175         (xcoff_write_archive_contents): New function, dispatch to _old or
3176         _big.
3177
3178 2000-02-18  Richard Henderson  <rth@cygnus.com>
3179
3180         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
3181         and hide_symbol members.
3182         (elf_link_hash_copy_indirect): Remove.
3183         (elf_link_hash_hide_symbol): Remove.
3184         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
3185         and elf_backend_hide_symbol.
3186         (_bfd_elf_link_hash_copy_indirect): Declare.
3187         (_bfd_elf_link_hash_hide_symbol): Declare.
3188         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
3189         (_bfd_elf_link_hash_hide_symbol): Likewise.
3190         (_bfd_elf_link_hash_table_init): Don't init killed members.
3191         * elflink.h (elf_link_add_object_symbols): Use the bed function
3192         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
3193         (elf_link_assign_sym_version): Likewise.
3194         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
3195         (elf_backend_hide_symbol): Likewise.
3196         (elfNN_bed): Update for new members.
3197
3198 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
3199
3200         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
3201         STACK_END_ADDR): Define for new core file format.
3202         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
3203         for handling the vagaries of the various core file structures used
3204         by AIX over the years.
3205         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
3206         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
3207         core_dumpx structure.
3208
3209 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3210
3211         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
3212         (bfd_mach_sh3_dsp): Likewise.
3213         (bfd_mach_sh4): Reinstate.
3214         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
3215         * bfd-in2.h: Regenerate.
3216         * coff-sh.c (struct sh_opcode): flags is no longer short.
3217         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
3218         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
3219         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
3220         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
3221         (sh_opcodes): No longer const.
3222         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
3223         (sh_insn_uses_reg): Check for USESAS and USESR8.
3224         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
3225         (_bfd_sh_align_load_span): Return early for SH4.
3226         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
3227         Take into account that field b of a parallel processing insn
3228         could be mistaken for a separate insn.
3229         * cpu-sh.c (arch_info_struct): New array elements for
3230         sh2, sh-dsp and sh3-dsp.
3231         Reinstate element for sh4.
3232         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
3233         (SH4_NEXT): Reinstate.
3234         (SH3_NEXT, SH3E_NEXT): Adjust.
3235         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
3236         * elf32-sh.c (sh_elf_set_private_flags): New function.
3237         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
3238         (sh_elf_merge_private_data): New function.
3239         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
3240         (bfd_elf32_bfd_copy_private_bfd_data): Define.
3241         (bfd_elf32_bfd_merge_private_bfd_data): Change to
3242         sh_elf_merge_private_data.
3243
3244 2000-02-13  Richard Henderson  <rth@cygnus.com>
3245
3246         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
3247         hide_symbol members.
3248         (elf_link_hash_copy_indirect): New.
3249         (elf_link_hash_hide_symbol): New.
3250         * elflink.h (elf_link_add_object_symbols): Break out copy from
3251         indirect new new symbol to elf.c.
3252         (elf_link_assign_sym_version): Break out privatization of
3253         non-exported symbol to elf.c.
3254         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
3255         (_bfd_elf_link_hash_hide_symbol): New.
3256         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
3257
3258 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
3259
3260         * section.c (_bfd_strip_section_from_output): Add info parameter.
3261         If it passed as non-NULL, use it to check whether any input BFD
3262         has an input section which uses this output section.  Change all
3263         callers.
3264         * bfd-in2.h: Rebuild.
3265
3266         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
3267         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
3268         1999-11-29.
3269         * bfd-in2.h: Rebuild.
3270
3271 2000-02-10  Timothy Wall  <twall@cygnus.com>
3272
3273         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
3274         allow final modifications of swapped-in symbol.
3275         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
3276         * coffcode.h (coff_write_relocs): Use macro
3277         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
3278         symbol index should be set to -1.
3279
3280 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
3281
3282         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
3283         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
3284         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
3285         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
3286         sh_insns_uses_or_sets_freg): New functions.
3287         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
3288         * (sh_insns_conflict): Use new functions and new macros to
3289         detect conflicts when two instructions both set same integer registers,
3290         both set same fp register, and both set special register.
3291
3292 2000-02-09  Timothy Wall  <twall@cygnus.com>
3293
3294         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
3295         swapping in sections, so that the swapping routines have access to
3296         the arch/mach info.
3297
3298 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
3299
3300         * coff-go32.c: Update comment. Update copyright.
3301
3302 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
3303
3304         * syms.c (bfd_decode_symclass)
3305         Two new class characters were added - 'V' and 'v'.  The
3306         meaning of 'W' is now restricted to just weak non-object
3307         symbols.  This allows differentiation between, for example,
3308         weak functions vs weak objects.  nm for example now dumps:
3309         'W' = weak global
3310         'w' = weak unresolved
3311         'V' = weak global object
3312         'v' = weak unresolved object
3313
3314         (bfd_is_undefined_symclass): New function.  Return true if the
3315         given symbol class represents and undefined/unresolved symbol.
3316
3317         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
3318         unresolved symbols.
3319
3320         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
3321
3322         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
3323         STT_ARM_16BIT flag set, but it is not attached to a data object
3324         return STT_ARM_16BIT so that it will be treated as code by the
3325         disassembler.
3326
3327 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
3328
3329         * coff-i386.c (i3coff_object_p): Remove prototype.
3330         Update copyright.
3331
3332         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
3333         to name.  Update copyright.
3334
3335         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
3336         assignment to avoid warning.  Update copyright.
3337
3338 2000-01-24  Robert Lipe  (robertl@sco.com)
3339
3340         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
3341         instead of using GNU C extension.
3342
3343 2000-01-21  Nick Clifton  <nickc@cygnus.com>
3344
3345         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
3346         amount from a bfd_in_memory structure.
3347         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
3348         structure.
3349
3350 2000-01-14  Nick Clifton  <nickc@cygnus.com>
3351
3352         * linker.c (default_indirect_link_order): oops - fix incorrectly
3353         applied patch from Tim Wall.
3354
3355 2000-01-13  Timothy Wall (twall@tiac.net>
3356
3357         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
3358         = scnhsz, filhsz, relsz, aoutsz, etc)
3359
3360          * coffswap.h: Ditto.
3361
3362 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3363
3364         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
3365         interwork thumb to arm stub.
3366
3367 2000-01-13  Timothy Wall (twall@tiac.net>
3368
3369         * archures.c (bfd_octets_per_byte): New function: Return
3370         target byte size.
3371         (bfd_arch_mach_octets_per_byte): New function: Return target
3372         byte size.
3373
3374         * section.c: Distinguish between octets and bytes for usage of
3375         _cooked_size,  _raw_size, and output_offset.  Clarify
3376         description of bfd_set_section_contents.
3377
3378         * bfd-in2.h: Regenerate.
3379
3380         * coffgen.c: Indicate that the offset parameter is in bytes, not
3381         octets.
3382
3383         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
3384         where appropriate to get the octet offset when calling
3385         bfd_set_section_contents.
3386         (bfd_coff_reloc_link_order): Ditto.
3387
3388         * linker.c (bfd_generic_reloc_link_order): Ditto.
3389         (_bfd_default_link_order): Ditto.
3390
3391         * reloc.c (bfd_perform_relocation):  Distinguish between octets
3392         and bytes.  Use octets when indexing into octet data; use bytes
3393         when calculating target addresses.
3394         (bfd_install_relocation): Ditto.
3395
3396         * srec.c (srec_write_section): Ditto.
3397
3398 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3399
3400         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3401         3 to 2.  This allows 4 byte sized sections, which is necessary for
3402         dlltool to build functioning DLLs.
3403
3404 2000-01-10  Philip Blundell  <pb@futuretv.com>
3405
3406         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
3407         (arm*-*-conix*): New target.
3408
3409 2000-01-10  Egor Duda  <deo@logos-m.ru>
3410
3411         * config.bfd: Include elf32_i386 vector to target list for cygwin
3412         and mingw.
3413
3414         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
3415         * configure.in: Test for structure win32_pstatus_t in
3416         <sys/procfs.h>
3417         * configure: Regenerate.
3418
3419         * elf.c (elfcore_grok_win32pstatus): New function: process
3420         win32_pstatus_t notes in elf core file.
3421         (elfcore_grok_note): Detect win32_pstatus notes.
3422
3423 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
3424
3425         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
3426         visibility.
3427         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
3428         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
3429
3430 1999-12-29  Richard Henderson  <rth@cygnus.com>
3431
3432         * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
3433         if no dynamic sections created.
3434
3435 1999-12-27  Nick Clifton  <nickc@cygnus.com>
3436
3437         * peicode.h (pe_bfd_object_p): Only define for PE format
3438         targets.
3439
3440 1999-12-17  Nick Clifton  <nickc@cygnus.com>
3441
3442         * coff-i386.c (i3coff_object_p): Delete.
3443         (i386coff_vec): Replace reference to i3coff_object_p with a
3444         reference to coff_object_p.
3445
3446         * coff-mcore.c (pe_object_p): Delete.
3447
3448         * peicode.h (pe_bfd_object_p): New function: Detect the
3449         presence of a PE format COFF object file.  Also detect and
3450         warn about the presence of LINK6 format Image Library Format
3451         object files.
3452
3453 1999-12-16  Nick Clifton  <nickc@cygnus.com>
3454
3455         * coff-arm.c (NUM_ELEM): New macro.
3456         (NUM_RELOCS): New macro: The number of known ARM relocs.
3457         (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
3458         (coff_arm_rtype_to_howto):  Return NULL if the reloc type is out
3459         of range.
3460         (bfd_arm_process_before_allocation): Produce a warning message if
3461         an out of range symbol index is encountered.
3462
3463 1999-12-14  Nick Clifton  <nickc@cygnus.com>
3464
3465         * elflink.h (is_global_symbol_definition): New Function: Return
3466         true iff the symbol is being given a global definition in this
3467         bfd.
3468         (elf_link_is_defined_archive_symbol): Do not bother processing
3469         symbols for an archive element that has already been included
3470         in the link.
3471         Use is_global_symbol_definition().
3472
3473 1999-12-09  Andrew Cagney  <cagney@cygnus.com>
3474
3475         * config.bfd: Add support for sparc-*-netbsdelf* and
3476         sparc-*-netbsdaout*.
3477
3478 1999-12-13  Nick Clifton  <nickc@cygnus.com>
3479
3480         * elflink.h (elf_link_is_defined_archive_symbol): Check to see
3481         if the symbol is in the common section.
3482
3483 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3484
3485         * elflink.h (elf_link_is_defined_archive_symbol): New
3486         function: Decide if a symbol, in an archive map is there
3487         because it is defined in the archive element, or because it is
3488         just another common declaration of it.
3489         (elf_link_add_archive_symbols): Use
3490         elf_link_is_defined_archive_symbol to decide if an archive
3491         element contain a reference to a common symbol should be
3492         linked in or not.
3493
3494 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3495
3496         * elflink.h: Revert previous patch.
3497         * targets.c: Revert previous patch.
3498         * libbfd-in2.h: Revert previous patch.
3499         * libbfd.h: Revert previous patch.
3500         * elfxx-target.h: Revert previous patch.
3501         * archive.c: Revert previous patch.
3502         * aout-target.h: Revert previous patch.
3503         * aout-tic30.h: Revert previous patch.
3504         * bfd.c: Revert previous patch.
3505         * coff-alpha.c: Revert previous patch.
3506         * coff-rs6000.c: Revert previous patch.
3507         * elf64-mips.c: Revert previous patch.
3508         * ieee.c: Revert previous patch.
3509         * libecoff.h: Revert previous patch.
3510         * oasys.c: Revert previous patch.
3511         * som.c: Revert previous patch.
3512         * vms.c: Revert previous patch.
3513
3514 1999-12-09  Nick Clifton  <nickc@cygnus.com>
3515
3516         * elflink.h (elf_link_add_archive_symbols): Add an archive
3517         element even if contains a symbol which is currently only
3518         considered to be a common.
3519
3520         * targets.c (struct bfd_target): Add new field
3521         _bfd_allow_commons_in_armap.
3522         * bfd-in2.h:Regenerate.
3523
3524         * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
3525         Define.
3526          (_bfd_archive_bsd_allow_commons_in_armap): Define.
3527         * libbfd.h: Regenerate.
3528
3529         * elfxx-target.h: If using COFF archive map, override
3530         definition of allow_commons_in_armap and replace with
3531         bfd_false.
3532
3533         * archive.c (bfd_compute_and_write_armap): Do not place common
3534         symbols into the archive map unless _bfd_allow_commons_in_armap
3535         returns true.
3536
3537         * aout-target.h (MY_allow_commons_in_armap): Define.
3538         * aout-tic30.h (MY_allow_commons_in_armap): Define.
3539         * bfd.c (bfd_allow_commons_in_armap): Define.
3540         * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
3541         * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
3542         * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
3543         * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
3544         * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
3545         * oasys.c (oasys_allow_commons_in_armap): Define.
3546         * som.c (som_allow_commons_in_armap): Define.
3547         * vms.c (vms_allow_commons_in_armap): Define.
3548
3549 1999-12-07  Jim Blandy  <jimb@cygnus.com>
3550
3551         Add support for SSE registers in ELF core files.
3552         * elf.c (elfcore_make_note_pseudosection): New function.
3553         (elfcore_grok_prfpreg): Use it.
3554         (elfcore_grok_prxfpreg): New function.
3555         (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
3556
3557 1999-12-03  Ian Lance Taylor  <ian@zembu.com>
3558
3559         * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
3560         value by 4 before storing it back in the field.  From
3561         Koundinya. K <kk@ddeorg.soft.net>.
3562
3563 Tue Nov 30 22:41:14 1999  Jeffrey A Law  (law@cygnus.com)
3564
3565         * archures.c (bfd_mach_am33): Define.
3566         * bfd-in2.h: Rebuilt.
3567         * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
3568         * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
3569         (compute_function_info): Handle additional registers saved by
3570         movm on the am33.
3571         (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
3572         (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
3573
3574 1999-11-29  Jim Blandy  <jimb@cygnus.com>
3575
3576         * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3577         functions.
3578         * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3579         declarations.
3580
3581 1999-11-27  Michael Meissner  <meissner@cygnus.com>
3582
3583         * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
3584         internal use within gas for alpha explicit relocations.
3585         (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
3586         (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
3587         (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
3588         (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
3589         (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
3590         (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
3591
3592         * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
3593         BFD_RELOC_ALPHA_USER_*.
3594
3595         * bfd-in2.h: Regenerate.
3596         * libbfd.h: Regenerate.
3597
3598 1999-11-26  Fred Fish  <fnf@cygnus.com>
3599
3600         * elf.c (elfcore_read_notes): Add prototype for static function.
3601         (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
3602         (bfd_section_from_phdr): Replacement function that calls
3603         _bfd_elf_make_section_from_phdr for generic segment types and
3604         backend fucntion pointed to by elf_backend_section_from_phdr for
3605         backend specific segment types.
3606         (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
3607         now called by _bfd_elf_make_section_from_phdr.  Note that this func
3608         is now just a stub between the caller and bfd_section_from_phdr.
3609
3610         * elf-bfd.h (struct elf_backend_data): Add new function pointer
3611         elf_backend_section_from_phdr.
3612         (elf_backend_section_from_phdr): Add prototype.
3613
3614         * elfxx-target.h (elf_backend_section_from_phdr): Define default.
3615         (elfNN_bed): Add elf_backend_section_from_phdr.
3616
3617 1999-11-25  Nick Clifton  <nickc@cygnus.com>
3618
3619         * coff-arm.c (bfd_arm_get_bfd_for_interworking):  Add
3620         SEC_CODE and SEC_READONLY flags to glue sections.
3621
3622         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
3623         SEC_CODE and SEC_READONLY flags to glue sections.
3624
3625 1999-11-20  Nick Clifton  <nickc@cygnus.com>
3626
3627         * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
3628         delta.
3629
3630 1999-11-19  Catherine Moore  <clm@cygnus.com>
3631
3632         * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
3633         (elf_cpu32_plt_entry): Likewise.
3634
3635 1999-11-18  Nick Clifton  <nickc@cygnus.com>
3636
3637         * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
3638         for RVA relocs.
3639         (coff_mcore_relocate_section): Initialise addend to 0.
3640         Special case processing of RVA reloc.
3641
3642 1999-11-17  Richard Henderson  <rth@cygnus.com>
3643
3644         * elf-bfd.h (struct elf_backend_data): Reorder collect and
3645         type_change_ok; add sign_extend_vma.
3646         * elf32-mips.c (elf_backend_sign_extend_vma): Define.
3647         * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
3648         (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
3649         * elfxx-target.h (elf_backend_sign_extend_vma): Default.
3650         (elfNN_bed): Follow struture changes.
3651
3652 1999-11-09  Ian Lance Taylor  <ian@zembu.com>
3653
3654         * libbfd.c (bfd_read): Check result of read against desired result
3655         using !=, not <.
3656         (_bfd_generic_get_section_contents): Set bfd_error if the seek is
3657         invalid compared to the section size.
3658
3659         * ieee.c (ieee_slurp_debug): Get the length of the debug
3660         information right if there is no data part.
3661
3662 Tue Nov  2 01:44:41 1999  Jeffrey A Law  (law@cygnus.com)
3663
3664         * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
3665         R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
3666
3667 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
3668
3669         * elflink.h (elf_bfd_final_link): Make last_local signed.
3670
3671 1999-10-27  Ian Lance Taylor  <ian@zembu.com>
3672
3673         * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
3674         starts with a zero.
3675
3676 Sat Oct 23 17:36:12 1999  Andrew Cagney  <cagney@b1.cygnus.com>
3677
3678         * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
3679         bfd_mach_d10v_ts3.
3680         * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
3681         * bfd-in2.h: Regenerate.
3682
3683 1999-10-15  Andrew Haley  <aph@cygnus.com>
3684
3685         * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
3686
3687 Sun Oct 17 17:19:00 1999  Jeffrey A Law  (law@cygnus.com)
3688
3689         * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
3690
3691 1999-10-08  Ian Lance Taylor  <ian@zembu.com>
3692
3693         * elflink.h (elf_merge_symbol): When overriding a weak symbol with
3694         a defined symbol in a shared library, clear the DEF_DYNAMIC flag
3695         too.
3696
3697 Fri Oct  8 13:03:45 1999  Geoffrey Keating  <geoffk@cygnus.com>
3698
3699         * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
3700         relocs also need the GP value.
3701         (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
3702         properly.  Handle sign-extension for R_MIPS_64 correctly.  Correct
3703         the GP value for R_MIPS_LITERAL relocs too.  Handle
3704         R_MIPS_64 relocs properly on big-endian MIPS.
3705         (mips_elf_sign_extend): Behave properly with 'long long'.
3706         (mips_elf_highest): Correct typo.
3707
3708 Mon Oct  4 17:49:45 1999  Nick Clifton  <nickc@cygnus.com>
3709
3710         * cpu-m32r.c (arch_info_struct): New static global.
3711         (bfd_m32r_arch): Refer to it.
3712         * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
3713         (m32r_elf_print_private_bfd_data): Ditto.
3714         (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
3715         * archures.c (bfd_mach_m32rx): Define it.
3716         * bfd-in2.h: Rebuild.
3717
3718 1999-09-28  Fred Fish  <fnf@cygnus.com>
3719
3720         * targets.c (cisco_core_vec): Replaced with two new vecs ...
3721         (cisco_core_big_vec): Add new bigendian vec.
3722         (cisco_core_little_vec): Add new little endian vec.
3723
3724         * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
3725         (crash_info_locs): Add array of possible offsets.
3726         (MASK_ADDR): Mask to apply to crash info offset.
3727         (crashinfo_external): Add textbase, database, bssbase and
3728         turn into a typedef.
3729         (cisco_core_file_validate): Renamed from cisco_core_file_p.
3730         Many small changes to account for additional hardware versions.
3731         Pick a reasonable size for ".reg" section.  Add a ".crash"
3732         section to allow access to crashinfo_external struct.
3733         (cisco_core_file_p): New version of this function that
3734         iterates over crash_info_locs, calling cisco_core_file_validate.
3735         (cisco_core_vec): Old big endian only vec replaced with ...
3736         (cisco_core_big_vec): Add big endian version.
3737         (cisco_core_little_vec): Add little endian version.
3738
3739         * configure.in (cisco_core_vec): Split to two new vectors ...
3740         (cisco_core_big_vec): New target vector.
3741         (cisco_core_little_vec): New target vector.
3742         * configure: Regenerate.
3743         * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
3744         to cisco_core_big_vec in targ_selvecs.
3745
3746 1999-09-28  Geoffrey Keating  <geoffk@cygnus.com>
3747
3748         * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
3749         (mips_elf_relocate_got_local): Unused, delete.
3750         (mips_elf_relocate_global_got): Unused, delete.
3751
3752 1999-09-24  Fred Fish  <fnf@cygnus.com>
3753
3754         * elf.c (bfd_section_from_phdr): Add typename variable.  Use p_type
3755         to initialize it to something meaningful.  Then use it to generate
3756         more useful segment names.
3757
3758 Sun Sep 19 12:16:47 1999  Jeffrey A Law  (law@cygnus.com)
3759
3760         * som.c (NO_PCREL_MODES): Define if the system does not define
3761         R_SHORT_PCREL_MODE.
3762         (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
3763         (som_write_fixups): Eliminate redundant pcrel mode relocs.  Handle
3764         R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
3765         * libhppa.h (dis_assemble_22): New function.
3766         (bfd_hppa_insn2fmt): Handle long branch.
3767
3768         * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
3769         in PA2.0.
3770
3771 1999-09-17  Alan Modra  <alan@spri.levels.unisa.edu.au>
3772
3773         * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
3774         BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
3775         (reloc_howto_type howto_table): Tidy comments and whitespace.
3776
3777 1999-09-17  Nick Clifton  <nickc@cygnus.com>
3778
3779         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
3780         previous delta.  Set sec->gc_mark instead.
3781
3782 Thu Sep 16 11:21:13 1999  Catherine Moore  <clm@cygnus.com>
3783
3784         * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
3785         (elf_cpu32_plt_entry): Likewise.
3786
3787 Thu Sep 16 10:48:17 1999  Jeffrey A Law  (law@cygnus.com)
3788
3789         * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
3790
3791         * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
3792         symbol table, then just compute a suitable value (but do not
3793         create a __gp symbol).
3794
3795         * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
3796         symbols when building shared libraries.
3797         (elf_hppa_final_link_relocate): Correct handling of PCREL
3798         relocations against undefined symbols.
3799
3800 1999-09-16  Nick Clifton  <nickc@cygnus.com>
3801
3802         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
3803         interworking sections as linker created so that they will not
3804         be removed by garbage collection.
3805
3806 Wed Sep 15 02:31:57 1999  Jeffrey A Law  (law@cygnus.com)
3807
3808         * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
3809         (elf_hppa_final_link_relocate): Consistently create an absolute
3810         address, then subtract out the value of __gp.
3811
3812 1999-09-14  Michael Meissner  <meissner@cygnus.com>
3813
3814         * configure.in (Canonicalization of target names): Remove adding
3815         ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
3816         generates $ac_config_sub with a ${CONFIG_SHELL} already.
3817         * configure: Regenerate.
3818
3819 1999-09-14  Nick Clifton  <nickc@cygnus.com>
3820
3821         * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
3822         Mitsubishi).
3823
3824 Mon Sep 13 20:01:47 1999  Jeffrey A Law  (law@cygnus.com)
3825
3826         * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
3827         (elf_hppa_final_link): Initialize text_segment_base and
3828         data_segment_base.
3829         (elf_hppa_final_link_relocate): Handle SEGREL relocations.
3830
3831         * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
3832         (elf_hppa_final_link_relocate): Likewise.
3833         (elf_hppa_relocate_insn): Likewise.
3834         (elf_hppa_relocate_section): Initialize HOWTO.
3835
3836 1999-09-13  Donn Terry  <donn@interix.com>
3837
3838         * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
3839         handling to support both GNU and MS objects.
3840
3841         * coffcode.h (coff_write_object_contents): Don't check reloc_count
3842         when determining whether to set F_RELFLG.
3843
3844 1999-09-13  Philip Blundell  <pb@nexus.co.uk>
3845
3846         * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
3847         PC24 relocs if the target is an undefined weak symbol.
3848         (arm_add_to_rel): Fix compiler warning.
3849         (elf32_arm_plt0_entry): Correct comments.
3850
3851 1999-09-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
3852
3853         * elfcode.h (write_relocs): Check for the_bfd NULL when handling
3854         an absolute symbol in REL relocs.
3855
3856 Sun Sep 12 23:47:58 1999  Jeffrey A Law  (law@cygnus.com)
3857
3858         * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
3859         Stub SEGREL32.  Return an error for any relocation not handled.
3860
3861 1999-09-12  Ian Lance Taylor  <ian@zembu.com>
3862
3863         * cofflink.c (coff_link_add_symbols): Look for special MSVC string
3864         constant symbols, and avoid multiple definition errors on them.
3865
3866 1999-09-12  Donn Terry  <donn@interix.com>
3867
3868         * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
3869         significant bit is set.
3870
3871 1999-09-11  Ian Lance Taylor  <ian@zembu.com>
3872
3873         * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3874
3875         * elfcode.h (write_relocs): Handle an absolute symbol in REL
3876         relocs as we do for RELA relocs.
3877
3878 1999-09-11  Donn Terry  <donn@interix.com>
3879
3880         * libpei.h (_bfd_pei_final_link_postscript): Declare.
3881         (coff_final_link_postscript): Define.
3882         * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
3883         directory entries here.
3884         (_bfd_pei_final_link_postscript): New function.
3885
3886         * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
3887         section flags based on the section name.
3888
3889         * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
3890         get the overflow of the s_nlnno field from the s_nreloc field.
3891         * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
3892         the s_nlnno overflow of the .text section into the s_nreloc
3893         field.
3894
3895         * peigen.c (add_data_entry): Declare.
3896         (pei_swap_aouthdr_out): Get image size right.  Set linker version
3897         more intuitively.
3898         (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
3899         (pe_print_idata): Code cleanup, print more info, get rid of (now)
3900         extraneous ImageBase.
3901         (pe_print_edata): Likewise.
3902         (pe_print_pdata): Likewise.  Print exception entries.
3903         (pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
3904         (tbl): Make const, add "UNKNOWN".
3905         (_bfd_pe_print_private_bfd_data_common): Print timestamp.
3906         (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
3907         section data directory.
3908         (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
3909
3910         * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
3911         * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
3912         * peicode.h (coff_get_symbol_info): Define.
3913
3914         * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
3915         -DSTRICT_PE_FORMAT.
3916         * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
3917         than __INTERIX.
3918         (coff_classify_symbol): Re-revert 1999-08-08 patch if
3919         STRICT_PE_FORMAT.
3920
3921         * libpei.h: New file, broken out of peicode.h.
3922         * peigen.c: New file, broken out of peicode.h.
3923         * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
3924         * configure.in: Add peigen.lo to list of files required for each
3925         PE target.
3926         * Makefile.am: Rebuild dependencies.
3927         (BFD32_BACKENDS): Add peigen.lo.
3928         (BFD32_BACKENDS_CFILES): Add peigen.c.
3929         (SOURCE_HFILES): Add libpei.h.
3930         * configure, Makefile.in: Rebuild.
3931
3932         * peicode.h (coff_swap_scnhdr_in): Don't check for a special
3933         section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
3934         instead.  Don't clear the s_paddr field for an uninitialized data
3935         section.
3936
3937         * coffcode.h (coff_mkobject_hook): Set timestamp field in
3938         coff_data_type to f_timdat.
3939         * peicode.h (pe_mkobject_hook): Likewise.
3940
3941         * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
3942         number if COFF_IMAGE_WITH_PE.
3943
3944         * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
3945         to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
3946         (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
3947         there is no SEC_DEBUGGING section.
3948         * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
3949         IMAGE_FILE_DEBUG_STRIPPED.
3950
3951         * pe-i386.c (COFF_LONG_FILENAMES): Define.
3952         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3953         * pei-i386.c (COFF_LONG_FILENAMES): Define.
3954         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3955
3956         * coffswap.h (IMAGE_BASE): Don't define.
3957         * pei-arm.c (IMAGE_BASE): Don't define.
3958         * pei-i386.c (IMAGE_BASE): Don't define.
3959         * pei-mcore.c (IMAGE_BASE): Don't define.
3960         * pei-ppc.c (IMAGE_BASE): Don't define.
3961
3962         * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
3963         symbol, switch on the class when determining whether to modify the
3964         value.  For PE, don't modify the value of a C_FCN symbol not named
3965         .bf.
3966
3967         * libbfd-in.h (_bfd_abort): Declare.
3968         (abort): Define.
3969         * bfd.c (_bfd_abort): New function.
3970         * libbfd.h: Rebuild.
3971
3972         * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
3973         special handling.
3974
3975         * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
3976         don't write out the associated line numbers.
3977
3978         * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
3979         aux entries.
3980
3981         * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
3982         changes when the base type is unknown.
3983
3984         * coffgen.c (coff_print_symbol): Fix printing of aux record for
3985         function symbols.
3986
3987         * syms.c (BSF_DEBUGGING_RELOC): Define.
3988         * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
3989         for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
3990         symbols named .bf.
3991         * coffgen.c (fixup_symbol_value): Relocate a symbol which has
3992         BSF_DEBUGGING_RELOC set.
3993         * bfd-in2.h: Rebuild.
3994
3995 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
3996
3997         * ecoff.c (bfd_debug_section): Update initialization for new
3998         comdat_info field.
3999         (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
4000         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
4001
4002 1999-09-10  H.J. Lu  <hjl@gnu.org>
4003
4004         * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
4005         _bfd_filnmlen field.
4006         * coff-mips.c (mips_ecoff_backend_data): Likewise.
4007
4008 Fri Sep 10 00:35:14 1999  Jeffrey A Law  (law@cygnus.com)
4009
4010         * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
4011         for FPTR relocs involving local symbols.
4012
4013         * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
4014         value for the stub address in a call through a stub.
4015         Install the value for a local symbol directly into the DLT
4016         instead of generating a reloc.  Correctly handle FPTR64 relocs.
4017
4018         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
4019         (elf_hppa_remark_useless_dynamic_symbols): Similarly.
4020         (elf_hppa_final_link): Call them.
4021
4022 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
4023
4024         * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
4025         (elf_adjust_dynamic_symbol): ...from here.
4026
4027 Wed Sep  8 17:56:11 1999  Jeffrey A Law  (law@cygnus.com)
4028
4029         * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
4030         relocation, remove them.  SECREL64->LTOFF16WF.
4031         (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
4032         DIR* relocations.
4033         (elf_hppa_relocate_insn): Similarly.
4034
4035         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
4036         (elf_hppa_relocate_insn): Similarly.
4037
4038         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
4039         GPREL* relocations.
4040         (elf_hppa_relocate_insn): Similarly.
4041
4042         * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
4043         Handle LTOFF_TP* relocs.
4044         (elf_hppa_relocate_insn): Similarly.
4045
4046         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
4047         Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
4048         (elf_hppa_relocate_insn): Handle PCREL* relocs.
4049
4050         * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
4051         DIR32, DIR64 and FPTR64 relocations.
4052         (elf_hppa_relocate_insn): Similarly.
4053
4054         * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
4055         address of the .PARISC.global section.
4056         (elf_hppa_relocate_section): Lookup and pass the PA64 hash
4057         table entry elf_hppa_final_link_relocate.  Do not give a warning
4058         for a reloc against an external symbol if it has a PA64 hash
4059         table entry.
4060         (elf_hppa_final_link_relocate): Significantly rework.  Handle
4061         DLTIND relocations.  Compute the final value of the relocation
4062         before passing the value of elf_hppa_relocate_insn.
4063         (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
4064         relocation support.  Handle DLTIND relocation requests just like
4065         DLTREL relocation requests.  Simplify branch handling.
4066
4067 1999-09-08  Ulrich Drepper  <drepper@cygnus.com>
4068
4069         * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
4070         non-allocated section as done in i386 version.
4071         (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
4072         statement since this is no know relocation.
4073
4074 Tue Sep  7 17:25:12 1999  Jeffrey A Law  (law@cygnus.com)
4075
4076         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
4077         relocs.
4078         (elf_hppa_relocate_insn): Similarly.
4079
4080         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
4081         DLTREL14WD relocs.
4082         (elf_hppa_relocate_insn): Similarly.
4083
4084         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
4085         DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
4086         Pass the relocate type rather than the insn format to
4087         elf_hppa_relocate_insn.
4088         (elf_hppa_relocate_insn): Make switch dependent on relocation type
4089         rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
4090
4091 1999-09-07  Ian Lance Taylor  <ian@zembu.com>
4092
4093         * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
4094         (bfd_coff_filnmlen): Define.
4095         (bfd_coff_std_swap_table): Initialize new field.
4096         * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
4097         than FILNMLEN.
4098         (coff_write_symbols): Likewise.
4099         (coff_get_normalized_symtab): Likewise.
4100         * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
4101         * libcoff.h: Rebuild.
4102
4103 1999-09-06  Donn Terry  <donn@interix.com>
4104
4105         * coffcode.h (sort_by_secaddr): New static function if
4106         COFF_IMAGE_WITH_PE.
4107         (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
4108         sections by VMA when assigning target_index values.  Always set
4109         virt_size.
4110
4111         * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
4112         * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
4113         pe_flags field.
4114         * libcoff.h: Rebuild.
4115
4116         * coffcode.h (coff_set_custom_section_alignment): Add const to
4117         declaration to match definition.
4118         (coff_write_object_contents): Don't set F_AR32W(R)? if
4119         COFF_WITH_PE.
4120
4121         * coff-i386.c (in_reloc_p): Add declaration.
4122         (i386coff_vec): Simplify initialization of
4123         application_section_flags.
4124
4125         * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
4126         version.  Move COFF_WITH_PE specific code to new version.
4127         (stype_to_sec_flags): Likewise.  Add section parameter.
4128         * coffgen.c (make_a_section_from_file): Set target_index before
4129         calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
4130         * libcoff.h: Rebuild.
4131
4132         * syms.c (stt): Add some PE/PEI section names.
4133         (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
4134         symbol.
4135         (bfd_symbol_info): Check for 'w'.
4136
4137         * section.c (struct bfd_comdat_info): Define.
4138         (asection): Add comdat field.
4139         (STD_SECTION): Initialize comdat field.
4140         (bfd_make_section_anyway): Likewise.
4141         * bfd-in2.h: Rebuild.
4142
4143 1999-09-06  Andreas Schwab  <schwab@suse.de>
4144
4145         * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
4146         to version symbols.
4147
4148 1999-09-06  Nick Clifton  <nickc@cygnus.com>
4149
4150         * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
4151         bfd_realloc instead of calloc and realloc.
4152
4153 1999-09-04  Steve Chamberlain  <sac@pobox.com>
4154
4155         * cpu-pj.c: New file.
4156         * elf32-pj.c: New file.
4157         * config.bfd (pj*): New cpu.
4158         (pj-*-*, pjl-*-*): New targets.
4159         * configure.in (bfd_elf32_pj_vec): New target vector.
4160         (bfd_elf32_pjl_vec): New target vector.
4161         * archures.c (bfd_arch_pj): Define.
4162         * elf.c (prep_headers): Handle bfd_arch_pj.
4163         * reloc.c: Define BFD_RELOC_PJ_* relocations.
4164         * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
4165         to target vector list.
4166         * Makefile.am: Rebuild dependencies.
4167         (ALL_MACHINES): Add cpu-pj.lo.
4168         (ALL_MACHINES_CFILES): Add cpu-pj.c.
4169         (BFD32_BACKENDS): Add elf32-pj.lo.
4170         (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
4171         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
4172
4173 1999-09-04  Ian Lance Taylor  <ian@zembu.com>
4174
4175         * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
4176         * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
4177         and NON_GOT_REF from weak defined symbol to real symbol.
4178         * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
4179         (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
4180         create a COPY reloc.
4181         * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
4182         (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
4183         don't create a COPY reloc.
4184
4185 1999-09-03  Ian Lance Taylor  <ian@zembu.com>
4186
4187         * elflink.h (elf_bfd_final_link): When counting relocations, don't
4188         count those in sections we are not including in the link.
4189
4190 Thu Sep  2 17:41:20 1999  Jeffrey A Law  (law@cygnus.com)
4191
4192         * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
4193         field in hpux11 shared libraries.
4194
4195 1999-09-02  Nick Clifton  <nickc@cygnus.com>
4196
4197         * elflink.h (elf_gc_record_vtentry): Fix memory leak.
4198
4199 Wed Sep  1 13:34:29 1999  Jeffrey A Law  (law@cygnus.com)
4200
4201         * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
4202         (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
4203         (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
4204
4205 1999-08-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4206
4207         * elflink.h (record_link_assignment): When possible, keep the
4208         original type of the symbol.
4209
4210 Mon Aug 30 15:26:48 1999  Jeffrey A Law  (law@cygnus.com)
4211
4212         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
4213         R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
4214         tools were configured.
4215         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
4216
4217 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4218
4219         * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
4220         GOT entries for GOT16 relocations; they're not required.
4221
4222 1999-08-24  Nick Clifton  <nickc@cygnus.com>
4223
4224         From a patch submitted by Roland McGrath  <roland@baalperazim.frob.com>
4225
4226         * config.bfd (arm-*-netbsd*): New target.
4227         * configure.in (armnetbsd_vec): New target vector.
4228         * configure: Regenerate
4229         * targets.c (bfd_target_vector): Add &armnetbsd_vec.
4230
4231         * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
4232         (ALL_MACHINES_CFILES): Add armnetbsd.c.
4233         (armnetbsd.lo): New rule with deps.
4234         * Makefile.in: Regenerate.
4235
4236         * armnetbsd.c: New file:  Definitions specific to arm-netbsd
4237         target.
4238
4239 Tue Aug 24 00:25:58 1999  Jeffrey A Law  (law@cygnus.com)
4240
4241         * som.c (som_slurp_symbol_table): Fix typo in comment.
4242
4243 Fri Aug 20 17:01:23 1999  Jeffrey A Law  (law@cygnus.com)
4244
4245         * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
4246         here instead of using elf_section_data...
4247
4248 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4249
4250         * coff-mcore.c (mcore_emit_base_file_entry): New function:  Emit
4251         relocations into the base file.
4252         (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
4253         we are building a base file.
4254
4255 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4256
4257         * elf32-arm.h (arm_add_to_rel): New function.  Add a value to
4258         a REL style reloc.
4259         (elf32_arm_relocate_section): Use arm_add_to_rel to increment
4260         REL relocs when performing a partial relocation.
4261
4262 1999-08-18  Donn Terry  <donn@interix.com>
4263
4264         * cofflink.c: Move definitions of N_TMASK, et. al., out of
4265         _bfd_coff_link_input_bfd into top level.
4266
4267         * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
4268         (RTYPE2HOWTO): Return NULL if reloc type is out of range.
4269         (coff_i386_rtype_to_howto): Likewise.
4270         * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
4271         Completely ignore symbols which are all zero.
4272         (dummy_reloc16_estimate): Add return 0.
4273         * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
4274         variable copy to name_copy to avoid shadowing outer scope
4275         variable.
4276         * libcoff-in.h (coff_data_type): Change raw_syment_count field
4277         from unsigned int to unsigned long.  Add timestamp field.
4278         * libcoff.h: Rebuild.
4279
4280 1999-08-17  H.J. Lu  <hjl@gnu.org>
4281
4282         * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
4283         macro definition.
4284
4285 1999-08-17  Ian Lance Taylor  <ian@zembu.com>
4286
4287         * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
4288         for special section symbols.
4289         * elflink.h (elf_merge_symbol): If we have no old BFD, check
4290         BSF_DYNAMIC on the section symbol to see whether the old BFD is
4291         dynamic.
4292
4293 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4294
4295         * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
4296         coincidence of variable names between old and new code.
4297
4298 1999-08-12  Nick Clifton  <nickc@cygnus.com>
4299
4300         * elf32-arm.h (elf32_arm_to_thumb_stub):  Make 'offset' parameter
4301         into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
4302         (elf32_thumb_to_arm_stub):  Make 'offset' parameter into a bfd_vma
4303         and 'addend' parameter a 'bfd_signed_vma'.
4304         (elf32_arm_final_link_relocate): Do not involve stubs in
4305         R_ARM_THM_PC22 relocs relative to section symbols, they are long
4306         jumps, not function calls.
4307
4308 1999-08-11  Robin Farine <advanc@dial.eunet.ch>
4309
4310         * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
4311         in R_ARM_PC24 relocs.
4312
4313 Tue Aug 10 12:48:09 1999  Jeffrey A Law  (law@cygnus.com)
4314
4315         * elf-hppa.h (elf_hppa_fake_sections): New function.
4316         * elf32-hppa.c (elf_backend_fake_sections): Define.
4317
4318         * elf-hppa.h (elf_hppa_final_write_processing): Update for
4319         recent changes to the arch_info structure.
4320
4321         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
4322         R_HPPA_SEGBASE and R_HPPA_SEGREL32.
4323         * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
4324         list.
4325
4326 Tue Aug 10 00:34:29 1999  Mark P. Mitchell  <mark@codesourcery.com>
4327                           Ralf Baechle <ralf@uni-koblenz.de>
4328
4329         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
4330         output DT_MIPS_GOTSYM.
4331         (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
4332         DT_MIPS_SYMTABNO if there are no global GOT symbols.
4333
4334 Tue Aug 10 00:21:08 1999  Mark P. Mitchell  <mark@codesourcery.com>
4335
4336         * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
4337         prototype.  Handle local symbols.  Add commentary.
4338         (mips_elf_calculate_relocation): Adjust accordingly.
4339         (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
4340         relocations.
4341
4342         * elflink.h (elf_bfd_final_link): Tweak last change.
4343
4344 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4345
4346         * elflink.h (elf_link_size_reloc_section): Use the counts in the
4347         elf-section data to allocate just the right amount of relocation
4348         space.  Don't allocate the hash space twice.
4349         (elf_bfd_final_link): Calculate the amount of space to allocate in
4350         each relocation section.
4351
4352 Mon Aug  9 17:37:30 1999  Jeffrey A Law  (law@cygnus.com)
4353
4354         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
4355         64bit mode, generate a section relative relocation for a 32bit
4356         wide relocation.
4357         (elf_hppa_is_local_label_name): New function.
4358         * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
4359         shared between 32bit and 64bit port.
4360
4361 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4362
4363         * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
4364         R_MIPS_GOT16 and R_MIPS_CALL16.
4365         (mips_elf_got16_entry): Use mips_elf_high to calculate the value
4366         to use when looking for a preexisting GOT entry.
4367
4368 1999-08-09  Jakub Jelinek  <jj@ultra.linux.cz>
4369
4370         * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
4371         the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
4372         not binutils.
4373         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4374
4375 1999-08-09  Geoff Keating  <geoffk@cygnus.com>
4376
4377         * elflink.h (elf_link_output_extsym): Don't output a weak
4378         reference to an undefined symbol just because it was defined weak
4379         in a shared object.
4380
4381 1999-08-09  Eli Zaretskii  <eliz@is.elta.co.il>
4382
4383         * coffgen.c (coff_find_nearest_line): When looking for file, use
4384         last best match rather than first.  If address is beyond last line
4385         number record, don't return the last line as the correct value.
4386
4387 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4388
4389         * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
4390         * bfd-in2.h: Rebuild.
4391
4392 1999-08-08  Mark Elbrecht  <snowball3@bigfoot.com>
4393
4394         * libcoff-in.h (struct coff_section_alignment_entry): Define.
4395         * coffcode.h (coff_set_custom_section_alignment): New static
4396         function.
4397         (coff_section_alignment_table): New static array.
4398         (coff_new_section_hook): Use coff_set_customer_section_alignment.
4399         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4400         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4401         * libcoff.h: Rebuild.
4402
4403 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4404
4405         * Makefile.am: Rename .dep* files to DEP*.  Change DEP variable to
4406         MKDEP.
4407         * Makefile.in: Rebuild.
4408
4409 1999-08-08  Mumit Khan  <khan@xraylith.wisc.edu>
4410
4411         * section.c (SEC_SHARED): Define.
4412         * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
4413         (styp_to_sec_flags): Likewise.
4414         * peicode.h (coff_swap_scnhdr_out): Likewise.
4415         * bfd-in2.h: Rebuild.
4416
4417 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4418
4419         * coffcode.h (coff_classify_symbol): Comment out part of
4420         1999-08-05 change which breaks cygwin DLLs.
4421
4422         * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
4423         * aclocal.m4, configure: Rebuild.
4424
4425 1999-08-06  Ian Lance Taylor  <ian@zembu.com>
4426
4427         * section.c (global_syms): Only initialize union field if
4428         __STDC__.
4429
4430 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4431
4432         * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
4433         the size of a GOT entry here.
4434         (mips_elf_calculate_relocation): Don't create a local GOT entry
4435         for the symbol in a GOT16 relocation; just for it's high-order bit
4436         (_bfd_mips_elf_relocate_section): Fix thinko.
4437
4438 1999-08-05  Ian Lance Taylor  <ian@zembu.com>
4439
4440         Based on patches from Donn Terry <donn@interix.com>:
4441         * coffcode.h (enum coff_symbol_classification): Define.
4442         (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
4443         _bfd_coff_classify_symbol.  Change return type.
4444         (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
4445         (coff_slurp_symbol_table): Use coff_classify_symbol.
4446         (coff_classify_symbol): New static function.
4447         (coff_sym_is_global): Never define.
4448         (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
4449         * cofflink.c (coff_link_check_ar_symbols): Use
4450         bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
4451         (coff_link_add_symbols): Likewise.
4452         (_bfd_coff_link_input_bfd): Likewise.
4453         * coff-sh.c (bfd_coff_small_swap_table): Initialize with
4454         coff_classify_symbol.
4455         * libcoff.h: Rebuild.
4456
4457 Wed Aug  4 18:08:07 1999  Jeffrey A Law  (law@cygnus.com)
4458
4459         * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
4460         (e_ltpsel, e_rtpsel): Similarly.
4461
4462         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
4463         and 14bit ertpsel.  Handle 64bit psel.
4464
4465 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4466
4467         * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
4468         handling for REL relocations.  And only left-shift R_MIPS26
4469         relocation addends where necessary.
4470
4471 1999-08-03  Mark Mitchell  <mark@codesourcery.com>
4472
4473         * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
4474         (mips_elf_next_lo16_relocation): Don't compute the addend here.
4475         Just return the relocation found.
4476         (mips_elf_relocate_section): Pull the LO16 addend out of the
4477         section itself when using REL relocations.
4478
4479         * elf32-mips.c (mips_elf_calculate_relocation): Restore
4480         _DYNAMIC_LINK handling and handling of undefined symbols in shared
4481         libraries.
4482
4483 1999-08-03  Ian Lance Taylor  <ian@zembu.com>
4484
4485         * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
4486         value of a symbol in a SEC_DEBUGGING section.  Warn when doing a
4487         relocation against a symbol in an input section with no output
4488         section.  From Daniel Jacobowitz <drow@false.org>.
4489
4490         * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
4491
4492         * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
4493         look for generated file correctly.
4494         * aclocal.m4, configure: Rebuild.
4495
4496 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4497
4498         * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
4499         and R_MIPS16_26 relocations correctly when relocating.
4500         (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
4501         and R_MIPS_CALL_LO16 are for global symbols.
4502
4503 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4504
4505         * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
4506         some fields.
4507         * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
4508         variables and initialize them.
4509
4510 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
4511
4512         * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
4513         there are no global symbols requiring GOT entries.
4514         (_bfd_mips_elf_size_dynamic_sections): Likewise.
4515         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4516         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4517
4518         * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
4519         symbols are considered to have the value zero.
4520         (_bfd_mips_elf_relocate_section): Don't try to perform a
4521         relocation for an undefined symbol.
4522         (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
4523         GOT16 relocations.
4524
4525 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4526
4527         * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
4528         wants ba,a,pt %xcc instead of %icc.
4529         Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
4530         of large PLT entries.
4531         (sparc64_elf_plt_ptr_offset): Fix calculation.
4532         (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
4533         addend should be relative to load address, not .plt section start.
4534         (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
4535
4536 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4537
4538         * elf-bfd.h (struct elf_backend_data): Add
4539         print_symbol_all and output_arch_syms backend methods.
4540         * elfxx-target.h: Likewise.
4541         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
4542         sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
4543         sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
4544         functions.
4545         (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
4546         symbols in .dynsym, add their names into .dynstr. Put those symbols
4547         into dynlocal.
4548         (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
4549         pointers to STT_REGISTER symbols in dynsym section.
4550         (sparc64_elf_print_symbol_all): New function.
4551         * elf.c (bfd_elf_print_symbol): Allow special backend symbol
4552         printing using the print_symbol_all hook.
4553
4554 1999-07-30  Catherine Moore  <clm@cygnus.com>
4555
4556         * elf32-arm.h (elf32_arm_check_relocs):  Use r_offset for
4557         R_ARM_GNU_VTENTRY.
4558
4559 1999-07-29  Richard Henderson  <rth@cygnus.com>
4560
4561         * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
4562         dynamic_sections_created.
4563
4564 1999-07-29  Richard Henderson  <rth@cygnus.com>
4565
4566         * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
4567         (mips_rtype_to_howto): ... new function.
4568         (_bfd_mips_elf_relocate_section): Use it.
4569
4570 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
4571
4572         * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
4573
4574 1999-07-27  Nick Clifton  <nickc@cygnus.com>
4575
4576         Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
4577
4578         * coff-arm.c (coff_arm_is_local_label_name): Change to strip
4579         out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
4580
4581 1999-07-23  Donn Terry  <donn@interix.com>
4582
4583         * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
4584         field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
4585         * cofflink.c (coff_link_add_symbols): If PE, handle section
4586         symbols specially.
4587         * libcoff.h: Rebuild.
4588
4589         * config.bfd (i[3456]86-*-interix*): New target.
4590
4591 1999-07-21  Mark Elbrecht  <snowball3@bigfoot.com>
4592
4593         * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
4594         COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
4595         .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
4596         * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
4597         (COFF_SUPPORT_GNU_LINKONCE): Define.
4598         * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
4599         (COFF_SUPPORT_GNU_LINKONCE): Define.
4600
4601 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
4602
4603         From Mark Elbrecht:
4604         * makefile.dos: Remove; obsolete.
4605         * configure.bat: Remove; obsolete.
4606
4607 1999-07-21  H.J. Lu  <hjl@gnu.org>
4608
4609         * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
4610
4611 1999-07-21  Philippe De Muyter  <phdm@macqel.be>
4612
4613         * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
4614         message and fail if a symbol index is out of range.
4615
4616 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
4617
4618         * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
4619         when looking at a R_MIPS_GOT16 relocation.
4620
4621 1999-07-20  Nick Clifton  <nickc@cygnus.com>
4622
4623         * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4624
4625 Mon Jul 19 14:03:44 1999  Mark P. Mitchell  <mark@codesourcery.com>
4626
4627         * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
4628         removed in previous change.
4629         (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
4630         in relocateable output.
4631
4632 1999-07-19  Ian Lance Taylor  <ian@zembu.com>
4633
4634         * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
4635         structure.
4636
4637         * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
4638         if they appear to be specially created by the linker.
4639
4640 1999-07-19  Nick Clifton  <nickc@cygnus.com>
4641
4642         * targets.c (alternative_target): New field in bfd_target
4643         structure.
4644         (bfd_search_for_target): New function:  Find a target that
4645         satisifies a search function.
4646         * bfd-in2.h: Regenerate.
4647
4648         * elfxx-target.h: Initialise the alternative_target field of
4649         the bfd_target structures to point to the other target (if
4650         defined).
4651         * nlm-target.h: Initialise the alternative_target field of
4652         the bfd_target structures to point to the other target (if
4653         defined).
4654
4655         * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
4656         (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
4657
4658         * aix386-core.c: Initialise new field of bfd_target structure.
4659         * aout-adobe.c: Initialise new field of bfd_target structure.
4660         * aout-arm.c: Initialise new field of bfd_target structure.
4661         * aout-target.h: Initialise new field of bfd_target structure.
4662         * aout-tic30.c: Initialise new field of bfd_target structure.
4663         * binary.c: Initialise new field of bfd_target structure.
4664         * bout.c: Initialise new field of bfd_target structure.
4665         * cisco-core.c: Initialise new field of bfd_target structure.
4666         * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4667         * coff-alpha.c: Initialise new field of bfd_target structure.
4668         * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
4669         * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4670         * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
4671         * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
4672         * coff-i386.c: Initialise new field of bfd_target structure.
4673         * coff-i860.c: Initialise new field of bfd_target structure.
4674         * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4675         * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4676         * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4677         * coff-mips.c: Initialise new field of bfd_target structure.
4678         * coff-ppc.c: Initialise new field of bfd_target structure.
4679         * coff-rs6000.c: Initialise new field of bfd_target structure.
4680         * coff-sh.c:  Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4681         * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
4682         * coff-tic30.c: Initialise new field of bfd_target structure.
4683         * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4684         * coff-w65.c:   Use CREATE_LITTLE_COFF_TARGET_VEC.
4685         * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4686         * coff-z8k.c:   Use CREATE_BIG_COFF_TARGET_VEC.
4687         * hppabsd-core.c: Initialise new field of bfd_target structure.
4688         * hpux-core.c: Initialise new field of bfd_target structure.
4689         * i386msdos.c: Initialise new field of bfd_target structure.
4690         * i386os9k.c: Initialise new field of bfd_target structure.
4691         * ieee.c: Initialise new field of bfd_target structure.
4692         * ihex.c: Initialise new field of bfd_target structure.
4693         * irix-core.c: Initialise new field of bfd_target structure.
4694         * mipsbsd.c: Initialise new field of bfd_target structure.
4695         * netbsd-core.c: Initialise new field of bfd_target structure.
4696         * oasys.c: Initialise new field of bfd_target structure.
4697         * osf-core.c: Initialise new field of bfd_target structure.
4698         * ppcboot.c: Initialise new field of bfd_target structure.
4699         * ptrace-core.c: Initialise new field of bfd_target structure.
4700         * sco5-core.c: Initialise new field of bfd_target structure.
4701         * som.c: Initialise new field of bfd_target structure.
4702         * srec.c: Initialise new field of bfd_target structure.
4703         * tekhex.c: Initialise new field of bfd_target structure.
4704         * trad-core.c: Initialise new field of bfd_target structure.
4705         * versados.c: Initialise new field of bfd_target structure.
4706         * vms.c: Initialise new field of bfd_target structure.
4707
4708 1999-07-19  Andreas Schwab  <schwab@suse.de>
4709
4710         * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
4711         and rel_hdr.
4712
4713 Sat Jul 17 02:28:28 1999  Mark P. Mitchell  <mark@codesourcery.com>
4714
4715         * elflink.h (elf_link_adjust_relocs): New function.
4716         (elf_bfd_final_link): Use it.
4717         (elf_link_input_bfd): Deal with the fact that there can be
4718         two relocation sections for a single section.
4719         (elf_reloc_link_order): Likewise.
4720
4721         * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
4722         a relocateable object.
4723         (_bfd_mips_elf_relocate_section): Handle relocateable links.
4724
4725 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
4726
4727         * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
4728         (sparc64_elf_get_reloc_upper_bound,
4729         sparc64_elf_get_dynamic_reloc_upper_bound,
4730         sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
4731         sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
4732         New functions.
4733         (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
4734         ELF64_R_TYPE_ID/DATA where appropriate.
4735
4736 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
4737
4738         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
4739         DT_SPARC_PLTFMT.
4740
4741 1999-07-16  Ian Lance Taylor  <ian@zembu.com>
4742
4743         * elf32-mips.c (mips_elf_local_relocation_p): New static
4744         function.
4745         (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
4746         (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
4747         Always set *require_jalxp.
4748         (mips_elf_stub_section_p): Mark abfd parameter as unused.
4749         (_bfd_mips_elf_relocate_section): Only look for LO16 following
4750         GOT16 if the GOT16 is against a local symbol.  Don't return false
4751         for an undefined symbol.  If there is an overflow, assert that we
4752         have a name.
4753
4754 1999-07-16  Andreas Schwab  <schwab@suse.de>
4755
4756         * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
4757         variables `link' and `elfsec'.
4758         (elf_bfd_final_link): Remove unused variable `os'.
4759
4760 Thu Jul 15 17:55:31 1999  Mark P. Mitchell  <mark@codesourcery.com>
4761
4762         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
4763         a PT_PHDR program headers.
4764         (_bfd_mips_elf_final_link): Don't assume there are going to be
4765         section symbols when we're not building a shared object.
4766         (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
4767         we need one.
4768
4769 1999-07-15  J.T. Conklin  <jtc@redback.com>
4770
4771         * config.bfd (i[3456]86-*-vxworks*): New target.
4772
4773 1999-07-15  Mark Mitchell  <mark@codesourcery.com>
4774
4775         * elf32-mips.c (mips_elf_stub_section_p): New function.
4776         (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
4777         (mips_elf_relocate_section): Adjust calling sequence for
4778         mips_elf_calculate_relocation and mips_elf_perform_relocation.
4779         (mips_elf_perform_relocation): Turn `jal' into `jalx' where
4780         required.
4781
4782 1999-07-15  Ian Lance Taylor  <ian@zembu.com>
4783
4784         * configure.in: Bump version number to 2.9.5.
4785         * configure: Rebuild.
4786
4787 Thu Jul 15 02:56:15 1999  Jeffrey A Law  (law@cygnus.com)
4788
4789         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
4790         64bit format.
4791         (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
4792         to derive final type instead of hardwiring a selection.
4793
4794 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4795
4796         * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
4797         things relocated by R_MIPS16_GPREL.
4798         (mips_elf_perform_relocation): Likewise.
4799
4800 Wed Jul 14 15:23:19 1999  Jim Wilson  <wilson@cygnus.com>
4801
4802         * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
4803
4804 1999-07-14  Richard Henderson  <rth@cygnus.com>
4805
4806         * elf32-mips.c (struct mips_got_info): Add global_gotno.
4807         (_bfd_mips_elf_size_dynamic_sections): Set it.
4808         (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
4809         (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
4810         new argument max_local.
4811
4812 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4813
4814         * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
4815         subwords when handling an R_MIPS16_26 relocation.
4816         (mips_elf_perform_relocation): Don't be paranoid abour right-shift
4817         semantics.
4818
4819         * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
4820         dst_mask to match reality.
4821         (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
4822         (mips_elf_obtain_contents): Use bfd_get.
4823         (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
4824         (mips_elf_relocate_section): Likewise.
4825
4826 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
4827
4828         * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
4829         (mips_elf_relocate_section): Adjust calling sequence for
4830         mips_elf_perform_relocation.
4831         (mips_elf_perform_relocation): Take additional argument.  Handle
4832         R_MIPS16_26.  Use bfd_put for convenience.
4833
4834 1999-07-13  Richard Henderson  <rth@cygnus.com>
4835
4836         * elf.c (assign_file_positions_for_segments): Thinko last change.
4837         Always overwrite p_flags.
4838
4839 1999-07-13  Richard Henderson  <rth@cygnus.com>
4840
4841         * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
4842         * elflink.c (_bfd_elf_create_dynamic_sections): Only create
4843         .dynbss and .rel[a].bss if want_dynbss.
4844         * elfxx-target.h (elf_backend_want_dynbss): Provide default.
4845
4846 1999-07-13  Richard Henderson  <rth@cygnus.com>
4847
4848         * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
4849
4850 1999-07-13  Richard Henderson  <rth@cygnus.com>
4851
4852         * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
4853         (struct elf_link_hash_table): Add dynlocal.
4854         (_bfd_elf_link_lookup_local_dynindx): Prototype.
4855         (_bfd_elf_link_adjust_dynindx): Delete.
4856         (_bfd_elf_link_renumber_dynsyms): Prototype.
4857         (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
4858         * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
4859         * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
4860         (_bfd_elf_link_lookup_local_dynindx): New function.
4861         (elf_link_renumber_hash_table_dynsyms): New function.
4862         (_bfd_elf_link_renumber_dynsyms): New function.
4863         * elflink.h (elf_link_record_local_dynamic_symbol): New function.
4864         (struct elf_assign_sym_version_info): Delete removed_dynamic.
4865         (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
4866         instead of elf_link_remove_section_and_adjust_dynindices.
4867         Remove removed_dynamic code.  Use _bfd_elf_link_renumber_dynsyms.
4868         (elf_link_assign_sym_version): Remove removed_dynamic code.
4869         (elf_link_renumber_dynsyms): Delete.
4870         (elf_bfd_final_link): Install section and local symbols into .dynsym.
4871
4872         * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
4873         (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
4874         (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
4875         * elf32-mips.c: Similarly.
4876         * elf32-ppc.c: Similarly.
4877         * elf32-sparc.c: Similarly.
4878         * elf64-alpha.c: Similarly.
4879         * elf64-sparc.c: Similarly.
4880
4881 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
4882
4883         * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
4884         when _gp_disp is undefined.  Do not check R_MIPS_LO16 for overflow
4885         when the relocation is against _gp_disp.
4886
4887 1999-07-12  Mark Mitchell  <mark@codesourcery.com>
4888
4889         * dwarf2.c (read_attribute): Support DW_FORM_ref8.
4890         * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
4891         to possibly_dynamic_relocs.  Adjust usage throughout code.
4892         (elf_mips_howto_table): Handle R_MIPS_64 correctly.
4893         (elf_mips_ctor64_howto): Likewise.
4894         (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
4895         Adjust indentation.
4896         (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
4897         (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
4898         Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
4899         * elf64-mips.c (elf_backend_may_use_rel_p): Define.
4900
4901 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
4902
4903         * Makefile.am: Rebuild dependencies.
4904         * Makefile.in: Rebuild.
4905
4906         * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
4907         * bfd-in2.h: Rebuild.
4908
4909         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4910         as appropriate.  Use EMPTY_HOWTO as appropriate.  Fill in
4911         structure initializations.  Add casts.
4912         * reloc.c (EMPTY_HOWTO): Define.
4913         * bfd-in2.h: Rebuild.
4914         * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
4915         comparisons against 0.
4916         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
4917         previous_ibfd_e_flags to unsigned long.
4918         * vms.h (struct vms_private_data_struct): Change section_count to
4919         unsigned.
4920         * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
4921         (_bfd_vms_write_gsd): Change symnum to unsigned.
4922         * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
4923         * vms-tir.c (etir_sta): Change psect to unsigned.
4924         (alloc_section): Change idx to unsigned.
4925         (tir_sta, tir_ctl): Change psect to unsigned.
4926         (_bfd_vms_write_tir): Change len and before to bfd_size_type.
4927         * vms.c (priv_section_count): Change to unsigned.
4928
4929 1999-07-12  Andreas Schwab  <schwab@suse.de>
4930
4931         * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
4932         * m68klinux.c: Likewise.
4933
4934 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
4935
4936         * Many files: Changes to avoid gcc warnings: Remove unused local
4937         variables.  Add default case to enum switches.
4938         * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
4939         compile if not COFF_IMAGE_WITH_PE.
4940         (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
4941         (bfd_arm_get_bfd_for_interworking): Likewise.
4942         (bfd_arm_process_before_allocation): Likewise.
4943         * epoc-pei-arm.c: Don't rename bfd_arm functions.
4944         * pei-arm.c: Likewise.
4945         * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
4946         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
4947         (mips_elf_got16_entry): Put parens around & in body of ==.
4948         (mips_elf_calculate_relocation): Correct test for empty string.
4949         * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
4950         stderr.
4951         * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
4952         format.
4953
4954 1999-07-11  Ian Lance Taylor  <ian@zembu.com>
4955
4956         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4957         as appropriate.  Fill in structure initializations.  Add variable
4958         initializations.  Add casts.
4959         * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
4960         (dwarf1_unit_find_nearest_line): Change i to unsigned long.
4961
4962         * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
4963         char *.
4964         * elf-bfd.h (bfd_elf_hash): Update declaration.
4965         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
4966         when calling bfd_elf_hash.
4967
4968 1999-07-11  Mark Mitchell  <mark@codesourcery.com>
4969
4970         * libbfd.c (bfd_put_8): Make it of type `void'.
4971         * bfd-in2.h: Regenerated.
4972         * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
4973         for 32-bit hosts.
4974         (_bfd_mips_elf_final_link): Likewise.
4975
4976         * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
4977
4978 Thu Jul  8 12:32:23 1999  John David Anglin <dave@hiauly1.hia.nrc.ca>
4979
4980         * config.bfd (hppa*-*-linux-gnu*): New target
4981
4982 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
4983
4984         * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
4985         (_bfd_mips_elf_create_dynamic_sections): New function.
4986         (_bfd_mips_elf_add_symbol_hook): Likewise.
4987         (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
4988         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4989         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4990         (_bfd_mips_elf_gc_mark_hook): Likewise.
4991         (_bfd_mips_elf_gc_sweep_hook): Likewise.
4992         (_bfd_mips_elf_always_size_sections): Likewise.
4993         (_bfd_mips_elf_size_dynamic_sections): Likewise.
4994         (_bfd_mips_elf_check_relocs): Likewise.
4995         (_bfd_mips_elf_link_hash_table_create): Likewise.
4996         (_bfd_mips_elf_print_private_data): Likewise.
4997         (_bfd_mips_elf_link_output_symbol_hook): Likewise.
4998         (_bfd_mips_elf_final_link): Likewise.
4999         (_bfd_mips_elf_additional_program_headers): Likewise.
5000         (_bfd_mips_elf_modify_segment_map): Likewise.
5001         (_bfd_mips_elf_relocate_section): Likewise.
5002         * elf32-mips.c (mips_elf32_object_p): Move contents into
5003         _bfd_mips_elf_object_p.
5004         (mips_elf_additional_program_headers): Rename to
5005         _bfd_mips_elf_additional_program_headers.
5006         (mips_elf_modify_segment_map): Rename to
5007         _bfd_mips_elf_modify_segment_map.
5008         (elf_mips_abi_name): Change prototype.
5009         (mips_elf32_section_from_shdr): Merge into
5010         _bfd_mips_elf_section_from_shdr.
5011         (mips_elf32_section_processing): Merge into
5012         _bfd_mips_elf_section_processing.
5013         (mips_elf_final_link): Rename to _bfd_mips_elf_final_link.  Invoke
5014         the right back-end ELF linker.
5015         (mips_elf_relocate_section): Rename to
5016         _bfd_mips_elf_relocate_section.  Clean up.  Adjust for 64-bit code.
5017         (mips_elf_link_output_symbol_hook): Rename to
5018         _bfd_mips_elf_link_output_symbol_hook.
5019         (mips_elf_create_dynamic_section): Rename to
5020         _bfd_mips_elf_create_dynamic_section.
5021         (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
5022         Adjust for 64-bit code.  Use mips_elf_got_section.
5023         (mips_elf_adjust_dynamic_symbol): Rename to
5024         _bfd_mips_elf_adjust_dynamic_symbol.  Use
5025         mips_elf_allocate_dynamic_relocations.
5026         (mips_elf_finish_dynamic_symbol): Rename to
5027         _bfd_mips_elf_finish_dynamic_symbol.  Use mips_elf_got_section.
5028         Adjust for 64-bit code.
5029         (mips_elf_finish_dynamic_sections): Rename to
5030         _bfd_mips_elf_finish_dynamic_sections.  Adjust for 64-bit code.
5031         (mips_elf_always_size_sections): Rename to
5032         _bfd_mips_elf_always_size_sections.
5033         (mips_elf_add_symbol_hook): Rename to
5034         _bfd_mips_elf_add_symbol_hook.
5035         (mips_elf_next_lo16_addend): Constify.
5036         (mips_elf_calculate_relocation): Likewise.
5037         (mips_elf_obtain_contents): Likewise.
5038         (mips_elf_perform_relocation): Likewise.
5039         (mips_elf_create_dynamic_relocation): Likewise.
5040         (mips_elf_allocate_dynamic_relocations): New function.
5041         (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
5042         (MIPS_ELF_REL_SIZE): Likewise.
5043         (MIPS_ELF_DYN_SIZE): Likewise.
5044         (MIPS_ELF_GOT_SIZE): Likewise.
5045         (MIPS_ELF_SYM_SIZE): Likewise.
5046         (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
5047         (MIPS_ELF_GET_WORD): Likewise.
5048         (MIPS_ELF_PUT_WORD): Likewise.
5049         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
5050         (STUB_LW): Conditionalize for 64-bit value.
5051         (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
5052         entries.
5053         (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
5054         Check it for inconsistency.
5055         (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
5056         ABI.
5057         (_bfd_mips_elf_fake_sections): Remove duplicate handling of
5058         .msym.
5059         (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
5060         (mips_elf_got_offset_from_index): Use misp_elf_got_section.
5061         (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
5062         (mips_elf_local_got_index): Likewise.
5063         (mips_elf_got_page): Likewise.
5064         (mips_elf_got_info): Likewise.
5065         (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
5066         (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
5067         (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
5068         instead of constant `2'.
5069         (mips_elf_create_got_section): Tidy.  Use MIPS_ELF_GOT_SIZE.
5070         (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
5071         (mips_elf_size_dynamic_sections): Use
5072         MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
5073         MIPS_ELF_ADD_DYNAMIC_ENTRY.  Remove #if 0'd code.
5074         Adjust all releveant entries in elf backend table.
5075         * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
5076         (mips_elf64_section_processing): Likewise.
5077         Adjust elf backend entries to use _bfd_mips_elf variants now
5078         publicly available.
5079
5080         * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
5081         hash-entry sizes.
5082         (size_dynamic_sections): Likewise.
5083         (elf_link_output_extsym): Likewise.
5084         * elf.c: (elf_fake_sections): Likewise.
5085         * libbfd.c (bfd_get): New macro.
5086         (bfd_put): Likewise.
5087         * bfd-in2.h: Regenerated.
5088
5089 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
5090
5091         * elf-bfd.h (elf_size_info): Add hash_entry_size,
5092         int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
5093         wap_reloca_in, and swap_reloca_out.
5094         * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
5095         multiple internal relocations per external relocation.
5096         (link_read_relocs): Likewise.
5097         (elf_bfd_final_link): Likewise.
5098         (elf_link_input_bfd): Likewise.
5099         (elf_gc_mark): Likewise.
5100         (elf_gc_smash_unused_vtentry_relocs): Likewise.
5101         * elfcode.h (elf_swap_dyn_out): Adjust type to match
5102         elf_swap_dyn_in.
5103         (size_info): Add entries for new fields.
5104         * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
5105         (mips_elf64_be_swap_reloc_in): New function.
5106         (mips_elf64_be_swap_reloc_out): Likewise.
5107         (mips_elf64_be_swap_reloca_in): Likewise.
5108         (mips_elf64_be_swap_reloca_out): Likewise.
5109         (mips_elf64_size_info): Add entries for new fields.
5110
5111 1999-07-07  Ian Lance Taylor  <ian@zembu.com>
5112
5113         * elflink.h (elf_bfd_final_link): Assert that section reloc_count
5114         field equals the new rel_count field.
5115         (elf_link_input_bfd): When doing a relocateable link, use the new
5116         rel_count field rather than the reloc_count field.
5117         (elf_reloc_link_order): Likewise.
5118         (elf_finish_pointer_linker_section): Likewise.
5119
5120         Based on patch from H.J. Lu <hjl@gnu.org>:
5121         * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
5122         shared library to override a weak definition in a regular object.
5123
5124 Tue Jul  6 10:23:39 1999  Jeffrey A Law  (law@cygnus.com)
5125
5126         * libhppa.h: Revert July 2, 1999 patch.
5127
5128         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
5129         need to generate DLTIND relocations, not DLTREL relocations.
5130
5131 1999-07-05  Nick Clifton  <nickc@cygnus.com>
5132
5133         * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
5134         architectures.
5135         (coff_set_flags): Recognise arm 5 architectures.
5136
5137         * cpu-arm.c: Add support for strongarm and arm9 cpus.
5138         Add support for armv5 architecture.
5139
5140         * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
5141
5142         * reloc.c: Add new, assembler only, ARM reloc:
5143         BFD_RELOC_ARM_ADRL_IMMEDIATE.
5144
5145         * bfd-in2.h: Regenerate.
5146
5147 1999-07-02  Mark Mitchell  <mark@codesourcery.com>
5148
5149         * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
5150         (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
5151         * elf.c (_bfd_elf_find_nearest_line): Pass it.
5152         * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
5153         * elf32-mips.c (ABI_64_P): New macro.
5154         (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
5155         (_bfd_mips_elf_find_nearest_line): Adjust call to
5156         _bfd_dwarf2_find_nearest_line.
5157         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5158         * libbfd.h: Regenerated.
5159
5160 1999-07-02  Ian Lance Taylor  <ian@zembu.com>
5161
5162         * config.bfd: Add * at the end of i[3456]86-*-unixware.
5163
5164 Fri Jul  2 12:21:10 1999  Jeffrey A Law  (law@cygnus.com)
5165
5166         * libhppa.h (HPPA_R_ARG_RELOC): Delete.
5167         (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
5168
5169 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5170
5171         * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
5172         fields.
5173         (_bfd_elf_init_reloc_shdr): New function.
5174         * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
5175         bfd_alloc followed by memset.
5176         (_bfd_elf_init_reloc_shdr): New function, split out from ...
5177         (elf_fake_sections): Here.
5178         (assign_section_numbers): Assign section numbers for the second
5179         relocation section, if required.
5180         * elflink.h (elf_link_output_relocs): New function.
5181         (elf_link_size_reloc_section): Likewise.
5182         (elf_bfd_final_link): Use elf_link_size_reloc_section.
5183         (elf_link_input_bfd): Use elf_link_output_relocs.
5184
5185         * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
5186         _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
5187
5188 Thu Jul  1 13:58:48 1999  Jeffrey A Law  (law@cygnus.com)
5189
5190         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
5191         with 22bit format.
5192
5193 1999-06-28  Mark Mitchell  <mark@codesourcery.com>
5194
5195         * elf32-mips.c (mips_elf_got_info): Move declaration before
5196         prototypes.  Change global_gotsym to be a pointer to a hash entry,
5197         rather than a number index.
5198         (mips_elf_link_hash_entry): Move declaration before prototypes.
5199         (mips_elf_irix6_finish_dynamic_symbol): New function.
5200         (mips_elf_sign_extend): Likewise.
5201         (mips_elf_high): Likewise.
5202         (mips_elf_higher): Likewise.
5203         (mips_elf_highest): Likewise.
5204         (mips_elf_global_got_index): Likewise.
5205         (mips_elf_local_got_index): Likewise.
5206         (mips_elf_got_offset_from_index): Likeiwse.
5207         (mips_elf_record_global_got_symbol): Likewise.
5208         (mips_elf_got_page): Likewise.
5209         (mips_elf_next_lo16_addend): Likewise.
5210         (mips_elf_calculate_relocation): Likewise.
5211         (mips_elf_obtain_contents): Likewise.
5212         (mips_elf_perform_relocation): Likewise.
5213         (mips_elf_assign_gp): Likewise.
5214         (mips_elf_sort_hash_table_f): Likewise.
5215         (mips_elf_sort_hash_table): Likewise.
5216         (mips_elf_got_section): Likewise.
5217         (mips_elf_got_info): Likewise.
5218         (mips_elf_create_local_got_entry): Likewise.
5219         (mips_elf_got16_entry): Likewise.
5220         (mips_elf_create_dynamic_relocation): Likewise.
5221         (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
5222         (mips_elf_final_gp): Use mips_elf_assign_gp.
5223         (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
5224         into SHN_SCOMMON automatically on IRIX6.
5225         (mips_elf_add_symbol_hook): Likewise.
5226         (mips_elf_relocate_section): Rewrite, using
5227         mips_elf_calculate_relocation and mips_elf_perform_relocation.
5228         (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
5229         Don't deal with .rld_map on IRIX6.
5230         (mips_elf_create_got_section): Adjust use of global_gotsym.  Set
5231         section flags appropriately for .got.
5232         (mips_elf_check_relocs): Handle IRIX6 relocations making use of
5233         the got.  Call mips_elf_record_global_got_symbol and allocate
5234         local got space appropriately.
5235         (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
5236         char *.  Rework calculation of GOT size.  Sort dynamic symbol
5237         table entries so entries that do not require GOT entries appear at
5238         the beginning.  Don't use DT_MIPS_HIPAGENO on IRIX6.  Remove dead
5239         code dealing with DT_INIT and DT_FINI.  Remove fiddling with
5240         global_gotsym.
5241         (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
5242         entries.
5243         (mips_elf_finish_dynamic_symbol): Use
5244         mips_elf_irix6_finish_dynamic_symbol.
5245         (mips_elf_finish_dynamic_sections): Correct off-by-one error
5246         setting DT_MIPS_UNREFEXTNO.  Adjust setting of DT_MIPS_GOTSYM for
5247         change to global_gotsym.  Set DT_MIPS_OPTIONS on IRIX6.
5248
5249 1999-06-30  Ian Lance Taylor  <ian@zembu.com>
5250
5251         * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
5252         relocateable link.  From Ralf Baechle <ralf@uni-koblenz.de>.
5253
5254 1999-06-04  Philip Blundell  <philb@gnu.org>
5255
5256         * elf32-arm.h (elf_backend_got_header_size): Define.
5257         (elf_backend_plt_header_size): Likewise.
5258
5259 1999-06-28  Jim Pick  <jim@jimpick.com>
5260
5261         * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
5262
5263 Tue Jun 29 02:25:03 1999  Jeffrey A Law  (law@cygnus.com)
5264
5265         * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
5266         relocation function.
5267         * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
5268
5269 1999-06-27  Mark Mitchell  <mark@codesourcery.com>
5270
5271         * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
5272         (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
5273         (MIPS_ELF_STUB_SECTION_NAME): Likewise.
5274         (_bfd_mips_elf_section_from_shdr): Use them.
5275         (_bfd_mips_elf_fake_sections): Likewise.  Add .srdata to the list
5276         of GP-relative sections.
5277         (_bfd_mips_elf_set_section_contents): Use them.
5278         (_bfd_mips_elf_section_processing): Share code between .sdata and
5279         .lit4/.lit8 sections.  Set appropriate flags for .srdata.
5280         (mips_elf_additional_program_headers): Add handling for
5281         PT_MIPS_OPTIONS segment on IRIX6.
5282         (mips_elf_modify_segment_map): Likeiwse.
5283         (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
5284         Include the options sections on IRIX6.  Don't look for GP-relative
5285         sections by name; use SHF_MIPS_GPREL instead.
5286         (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
5287         the N32 ABI.
5288         (mips_elf_create_dynamic_sections): Don't muck about with section
5289         alignments and such on IRIX6.
5290         (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5291         (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
5292         fact that ELF_DYNAMIC_INTERPRETER is no longer a constant.  Use
5293         bfd_zalloc rather than bfd_alloc and memset.
5294         (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5295         Don't assert the existence of .rld_map on IRIX6.
5296         (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
5297
5298         * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
5299         (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
5300         instead.
5301
5302 1999-06-26  Mark Mitchell  <mark@codesourcery.com>
5303
5304         * elf32-mips.c (mips_elf_swap_msym_in): New function.
5305         (mips_elf_swap_msym_out): New function.
5306         (mips_elf_create_msym_section): Likewise.
5307         (MIPS_ELF_MSYM_SECTION_NAME): New macro.
5308         (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
5309         (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
5310         section not named .msym.
5311         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
5312         .msym directly.  Set appropriate attributes for the .msym
5313         section.
5314         (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
5315         (mips_elf_link_hash_newfunc): Clear it.
5316         (mips_elf_create_dynamic_sections): Create the .msym section
5317         on IRIX6.
5318         (mips_elf_size_dynamic_sections):  Allocate space for the
5319         .msym section.  Add a DT_MIPS_MSYM entry.
5320         (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
5321         the symbol.
5322         (mips_elf_finish_dynamic_sections): Assign a value for
5323         DT_MIPS_MSYM.  Add .msym entries for the section symbols as well.
5324
5325         * elf32-mips.c (irix_compat_t): New enumeration.
5326         (ABI_N32_P): New macro.
5327         (IRIX_COMPAT): Likewise.
5328         (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
5329         (mips_elf_relocate_section): Fix typo.
5330
5331 1999-06-26  Mumit Khan  <khan@xraylith.wisc.edu>
5332
5333         * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
5334         as writable PE sections.
5335
5336 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5337
5338         * dwarf2.c (struct arange): New type.
5339         (struct comp_unit): Replace LOW and HIGH by member ARANGE.
5340         (arange_add): New function.
5341         (decode_line_info): Keep track of address ranges that a compilation
5342         unit covers.
5343         (comp_unit_contains_address): Return true if address is contained
5344         in _any_ of the address ranges associated with a compilation unit.
5345         (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
5346         on the first comp_unit that contains the address.
5347
5348 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5349
5350         * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
5351         (decode_line_info): Add variable STASH and initialize it to point
5352         to the per-bfd dwarf2_debug info.  Remove static variable
5353         dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
5354
5355 1999-06-26  Ian Lance Taylor  <ian@zembu.com>
5356
5357         * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
5358         shared library to have an undefined symbol.
5359
5360         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5361         * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
5362
5363 Thu Jun 24 20:59:11 1999  Jeffrey A Law  (law@cygnus.com)
5364
5365         * elf-hppa.c (elf_hppa_final_write_processing): New function.
5366         * elf32-hppa.c: Remove everything related to symbol extension
5367         sections & records.  Use the common elf_hppa_final_write_processing.
5368
5369 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5370
5371         * elflink.h (size_dynamic_sections): Use user-specified init/fini
5372         functions instead of _init/_fini if requested.
5373
5374 1999-06-23  Ian Lance Taylor  <ian@zembu.com>
5375
5376         * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
5377         field.
5378
5379 1999-06-22  Ian Lance Taylor  <ian@zembu.com>
5380
5381         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5382         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
5383         field to 0, not -1.
5384         (ppc_elf_finish_dynamic_sections): Check for positive section
5385         dynindx field, rather than comparing against -1.
5386         (ppc_elf_relocate_section): Only return false if undefined_symbol
5387         or reloc_overflow fail, not always upon encountering an error.
5388
5389 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5390
5391         * elflink.h (link_read_relocs): Explicitly cast external_relocs to
5392         bfd_byte * before performing pointer arithmetic.
5393
5394 Tue Jun 22 13:06:25 1999  Jeffrey A Law  (law@cygnus.com)
5395
5396         * elf-hppa.h: New file.  Common stuff for elf32 and elf64 PA
5397         support.
5398         * elf32-hppa.c: Include elf-hppa.h.
5399         (ARCH_SIZE): Define.
5400         (elf_hppa_reloc_type_lookup): Delete.  Found in the common code
5401         now.
5402         (elf32_hppa_info_to_howto): Similarly.
5403         (elf_hppa_howto_table): Similarly.
5404         (elf_hppa_reloc_type_lookup): Similarly.
5405         (hppa_elf_gen_reloc_type): Similarly.
5406         * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
5407
5408 1999-06-22  Nick Clifton  <nickc@cygnus.com>
5409
5410         * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
5411         handling R_V850_22_PCREL relocation.
5412
5413 1999-06-21  Ian Lance Taylor  <ian@zembu.com>
5414
5415         * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
5416         type.
5417
5418 Sun Jun 20 14:13:57 1999  Richard Henderson  <rth@cygnus.com>
5419
5420         * section.c (_bfd_strip_section_from_output): Ignore sections
5421         DISCARDed by the link script.
5422
5423 1999-06-19  Ian Lance Taylor  <ian@zembu.com>
5424
5425         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5426         Remove unused local variable spp.
5427
5428         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
5429         the entry symbol is not set.
5430
5431 Fri Jun 18 04:24:57 1999  Richard Henderson  <rth@cygnus.com>
5432
5433         * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
5434         GPDISP or LITUSE in a relocatable link.
5435
5436 Thu Jun 17 21:24:43 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5437
5438         * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
5439         * (alloc_dwarf1_func): Likewise.
5440
5441 Wed Jun 16 03:09:57 1999  Jeffrey A Law  (law@cygnus.com)
5442
5443         * libhppa.h: Fix various formatting errors.
5444         (assemble_3); Rewrite using CATENATE.
5445         (assemble_17): Fix various bugs.
5446
5447 1999-06-16  Nick Clifton  <nickc@cygnus.com>
5448
5449         * elf32-mcore.c (R_MCORE_RAW): Fix definition.
5450
5451 1999-06-15  Richard Henderson  <rth@cygnus.com>
5452
5453         * section.c (SEC_SHORT): Define.
5454         * bfd-in2.h: Rebuild.
5455
5456 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5457
5458         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5459         Remove abfd parameter.  Use _bfd_strip_section_from_output.
5460         (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
5461
5462         * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
5463         * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
5464         * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
5465         function.
5466         (bfd_elf_size_dynamic_sections): Use it.
5467
5468 1999-06-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
5469
5470         * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
5471         complain_overflow_bitfield to complain_overflow_signed.
5472
5473 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5474
5475         * elflink.h (elf_link_read_relocs_from_section): New function,
5476         split out from ...
5477         (elf_link_read_relocs): Here.  Use it for both relocation
5478         sections.
5479
5480 1999-06-12  Mark Mitchell  <mark@codesourcery.com>
5481
5482         * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
5483         asect->reloc_count is valid.
5484
5485 1999-06-12  Ian Lance Taylor  <ian@zembu.com>
5486
5487         * elf32-mips.c (mips_elf32_section_processing): Permit a
5488         SHT_MIPS_REGINFO section to have a size of 0.
5489
5490 1999-06-12  David O'Brien  <obrien@freebsd.org>
5491
5492         * config.bfd (alpha*-*-freebsd*): New target.
5493         (i[3456]86-*-freebsd*): Now defaults to ELF.
5494
5495 1999-06-11  Ian Lance Taylor  <ian@zembu.com>
5496
5497         * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
5498         wrap if the relocation covers the high bit of an address.
5499
5500         * dwarf2.c (decode_line_info): Remove unused variable first_time.
5501
5502 1999-06-10  Jakub Jelinek  <jj@ultra.linux.cz>
5503
5504         * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
5505         instead of R_SPARC_max.
5506         (sparc64_elf_info_to_howto): Likewise.
5507         * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
5508         (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
5509
5510 1999-06-07  Richard Henderson  <rth@cygnus.com>
5511
5512         * section.c (_bfd_strip_section_from_output): Remove output
5513         sections with no initial link_order.
5514
5515 1999-06-07  Nick Clifton  <nickc@cygnus.com>
5516
5517         * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
5518
5519 Mon Jun  7 11:49:43 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5520
5521         * Makefile.am (SOURCE_HFILES): Add missing headers.
5522         * Makefile.in: Regenerated.
5523
5524 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
5525
5526         * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
5527         the N32 ABI.
5528
5529 1999-06-04  Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5530
5531         * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
5532         range undefweak symbols.
5533         * hash.c: Add missing comma after @xref{}
5534         * linker.c: Likewise.
5535
5536 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5537
5538         * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
5539         if not defined.
5540         * elf32-gen.c (ELF_MAXPAGESIZE): Define.
5541         * elf32-i860.c (ELF_MAXPAGESIZE): Define.
5542         * elf32-i960.c (ELF_MAXPAGESIZE): Define.
5543         * elf64-gen.c (ELF_MAXPAGESIZE): Define.
5544
5545 1999-06-04  Ian Lance Taylor  <ian@zembu.com>
5546
5547         * Makefile.am: Rebuild dependencies.
5548         (BFD32_BACKENDS): Add dwarf1.lo.
5549         (BFD32_BACKENDS_CFILES): Add dwarf1.c.
5550         * Makefile.in: Rebuild.
5551
5552 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5553
5554         * Makefile.am: Add epoc-arm-pe target.
5555         * Makefile.in: Regenerate.
5556         * pe-arm.c: Only redefine interworking function names if they have
5557         not already been redefined.
5558         * pei-arm.c: Only redefine interworking function names if they have
5559         not already been redefined.
5560         * epoc-pe-arm.c: Redefine interworking function names to avoid a
5561         name space clash.
5562         * epoc-pei-arm.c: Redefine interworking function names to avoid a
5563         name space clash.
5564
5565 1999-06-03  Nick Clifton  <nickc@cygnus.com>
5566
5567         * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
5568
5569 Fri Jun  4 10:05:11 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5570
5571         * elf.c (elf_fake_sections): Undo change of 1999-05-10.
5572
5573 Fri Jun  4 03:10:49 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5574
5575         * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
5576         start / stop for recalculating of r_addend of R_SH_SWITCH*.
5577
5578 Fri Jun  4 02:53:13 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5579
5580         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
5581         in other text sections.
5582
5583 Fri Jun  4 02:29:34 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5584
5585         * libbfd.c (_bfd_generic_verify_endian_match): New function.
5586         * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
5587         * libbfd.h: Regenerate.
5588         * coff-sh.c (sh_merge_private_data): Delete.
5589         (coff_bfd_merge_private_bfd_data): Change to
5590         _bfd_generic_verify_endian_match.
5591         (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
5592
5593 1999-06-03  Ulrich Drepper  <drepper@cygnus.com>
5594
5595         * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
5596
5597 1999-06-03  Ian Lance Taylor  <ian@zembu.com>
5598
5599         * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
5600         prototype.
5601         (bfd_elf32_arm_process_before_allocation): Likewise.
5602         * bfd-in2.h: Rebuild.
5603
5604 1999-06-03  David Mosberger  <davidm@hpl.hp.com>
5605
5606         * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
5607         track of end_sequence markers.
5608         (add_line_info): Add END_SEQUENCE arg.
5609         (decode_line_info): Don't try to infer lo_pc and hi_pc from the
5610         debug-line info---it doesn't work right if a compilation unit
5611         consists of multiple discontiguous code-sequences.  It would be
5612         worthwhile to optimize for the common case where a compilation
5613         unit results in a contiguous set of code sequences, but this is
5614         quite tricky to get right for arbitrary DWARF2 files.
5615         (lookup_address_in_line_info_table): Don't use the last line entry
5616         for a compilation unit for anything with an address higher than
5617         this line entry.  Also, check for end_sequence markers to
5618         correctly handle discontinuities.
5619         (_bfd_dwarf2_find_nearest_line): When checking previously loaded
5620         compilation units, check all compilation units with each->high==0
5621         just like when reading compilation units.
5622
5623         * dwarf2.c (decode_line_info): Initialize table->files and
5624         table->last_line to NULL to avoid segfaults due to random
5625         values in these members.
5626         (concat_filename): Check for out-of-range file number before
5627         indexing filename table.  Segfaults suck.
5628
5629         * dwarf2.c (decode_line_info): Don't truncate address to least
5630         significant 32 bits (breaks 64 bit targets).
5631         (lookup_address_in_function_table): Ditto.
5632         (comp_unit_contains_address): Ditto.
5633
5634 1999-06-02  Mark Mitchell  <Mark Mitchell <mark@codesourcery.com>>
5635
5636         * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
5637         * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
5638         (mips_elf64_howto_table_rela): Likewise.
5639
5640         * elfcode.h (elf_slurp_reloc_table_from_section): New function,
5641         split out from ...
5642         (elf_slurp_reloc_table): Here.  Use it to handle the case where a
5643         single section has two associated relocation sections.
5644
5645 1999-06-02  Mark Salter  <msalter@cygnus.com>
5646
5647         * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
5648         COFF_WITH_PE defined.
5649
5650 1999-06-02  Nick Clifton  <nickc@cygnus.com>
5651
5652         * pe-arm.c: Rename global arm interworking functions to avoid name
5653         collision when all targets BFD is built.
5654         * pei-arm.c: Ditto.
5655
5656 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
5657
5658         * elf-bfd.h (elf_backend_data): Remove use_rela_p.  Add
5659         may_use_rel_p, may_use_rela_p, default_use_rela_p.
5660         (bfd_elf_section_data): Add use_rela_p.
5661         * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
5662         (_bfd_elf_new_section_hook): Likewise.
5663         (elf_fake_sections): Use may_use_rela_p, etc., instead of
5664         use_rela_p.
5665         (_bfd_elf_copy_private_section_data): Copy use_rela_p.
5666         * elfcode.h (write_relocs): Determine whether or not use rela
5667         relocs based on the relocation section header.
5668         * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
5669         instead of use_rela_p.
5670         * elfxx-target.h (elf_backend_may_use_relp): New macro.
5671         (elf_backend_may_use_rela_p): Likewise.
5672         (elf_backend_default_use_rela_p): Likewise.
5673         (elfNN_bed): Use them.
5674
5675 Wed Jun  2 12:38:49 1999  Miodrag Vallat <miodrag@multimania.com>
5676
5677         * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
5678
5679 Tue Jun  1 17:57:58 1999  Mark P. Mitchell  <mitchell@n02.acl.lanl.gov>
5680
5681         * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
5682         (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
5683         (BFD_RELOC_MIPS_GOT_OFST): Likewise.
5684         (BFD_RELOC_MIPS_GOT_DISP): Likewise.
5685         * bfd-in2.h: Regenerated.
5686         * libbfd.h: Likewise.
5687         * elf32-mips.c (mips_info_to_howto_rela): New function.
5688         (USE_REL): Adjust for new conventions.
5689         (MINUS_ONE): New macro.
5690         (elf_mips_howto_table): Add R_MIPS_SUB.
5691         (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
5692         and MIPS_GOT_DISP.
5693         (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
5694         .MIPS.content section.
5695         (_bfd_mips_elf_fake_sections): Treat all sections that begin
5696         with .MIPS.content as .MIPS.content sections.  Set
5697         SHF_MNIPS_NOSTRIP for such section.
5698         (elf_info_to_howto): Define to mips_info_to_howto_rela.
5699         * elf64-mips.c (mips_r):  Add entries for MIPS_SUB, MIPS_GOT_PAGE,
5700         MIPS_GOT_OFST, and MIPS_GOT_DISP.
5701
5702 Wed Jun  2 11:51:12 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5703
5704         * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
5705         variable.
5706
5707         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
5708         `else'.
5709
5710 1999-05-30  Philip Blundell  <philb@gnu.org>
5711
5712         * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
5713         1993-03-25 (!!).  Take into account the bitmasks for the reloc so
5714         the addend does not overflow into the rest of the word.
5715
5716 1999-05-29  Nick Clifton  <nickc@cygnus.com>
5717
5718         * bfd-in.h: Amend prototype for
5719         bfd_elf32_arm_process_before_allocation .
5720         * bfd-in.h: Regenerate.
5721
5722         * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
5723         elements in a fixed sized array.
5724         (ARM_ELF_ABI_VERSION): Define.
5725         (ARM_ELF_OS_ABI_VERSION): Define.
5726         (R_ARM_THM_ABS5): Fix rightshift and size.
5727         (R_ARM_THM_PC22): Fix size.
5728         (R_ARM_PLT32): Define Howto.
5729         (find_howto): New function: Locate a howto based on a reloc
5730         number.
5731         (elf32_arm_info_to_howto): Use find_howto if necessary.
5732         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5733         bfd_reloc_code_real_type.
5734         (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
5735         and BFD_RELOC_VTABLE_ENTRY.
5736         (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
5737
5738         * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
5739         elements in a fixed sized array.
5740         (ARM_ELF_ABI_VERSION): Define.
5741         (ARM_ELF_OS_ABI_VERSION): Define.
5742         (R_ARM_THM_ABS5): Fix rightshift and size.
5743         (R_ARM_THM_PC22): Fix size.
5744         (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
5745         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5746         bfd_reloc_code_real_type.
5747
5748         * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
5749         no_pipeline_knowledge.
5750         (elf32_arm_link_hash_create): Initialise new field to zero.
5751         (bfd_elf32_arm_process_before_allocation): Add new paraemter:
5752         no_pipeline_knowledge.  Use this parameter to initialise the field
5753         in the globals data structure.
5754         (elf32_arm_final_link_relocate): Only add in pipeline offset if
5755         no_pipeline_knowledge is false and the binary is from an old
5756         toolchain.
5757         (elf32_arm_merge_private_data): Generate an error if an attempt is
5758         made to link together big endian and little endian code.
5759         (elf32_arm_post_process_headers): New function:  Initialise the
5760         EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
5761         header.
5762         (elf_backend_post_process_headers): Define.
5763
5764 1999-05-28  Nick Clifton  <nickc@cygnus.com>
5765
5766         * elf-bfd.h (struct elf_backend_data): Add new field:
5767         elf_backend_post_process_headers.
5768
5769         * elfxx-target.h (elf_backend_post_process_headers): Define to
5770         NULL if not already defined.
5771         (elfNN_bed): Initialise elf_backend_post_process_headers field.
5772
5773         * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
5774         to zero.
5775         (_bfd_elf_compute_section_file_positions): Call
5776         elf_backend_post_process_headers if defined.
5777
5778 1999-05-28  Ian Lance Taylor  <ian@zembu.com>
5779
5780         * configure.in: Check whether getuid and getgid exist.
5781         * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
5782         HAVE_GETGID are not defined, respectively.
5783         (bfd_write_armap): Don't special case on _WIN32 for getuid and
5784         getgid.
5785         * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
5786         * configure, config.in: Rebuild.
5787
5788 1999-05-28  Martin Dorey  <mdorey@madge.com>
5789
5790         * elf32-i960.c: New file.
5791         * elf.c (prep_headers): Handle bfd_arch_i960.
5792         * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
5793         * config.bfd (i960-*-elf*): New target.
5794         * configure.in (bfd_elf32_i960_vec): New target vector.
5795         * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
5796         (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
5797         * Makefile.in, aclocal.m4, configure: Rebuild.
5798
5799 1999-05-27  Nick Clifton  <nickc@cygnus.com>
5800
5801         * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
5802         R_ARM_PLT32.
5803         (find_howto): New function: Find entries in the
5804         elf32_arm_howto_table.
5805         (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
5806         computed simply.
5807         (elf32_arm_reloc_type_lookup): Add lookup for
5808         BFD_RELOC_ARM_PLT32.
5809
5810 1999-05-25  Philip Blundell  <pb@nexus.co.uk>
5811
5812         * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
5813         (elf32_arm_link_hash_table_create): Use above function as the
5814         constructor for hash table entries.
5815         (elf32_arm_relocate_section): Avoid crash when there is no output
5816         section.
5817         (elf32_arm_final_link_relocate): New parameter h.
5818         (elf32_arm_relocate_section): Pass symbol hash entry to above
5819         routine.
5820         (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
5821         comments.
5822
5823 1999-05-25  Catherine Moore  <clm@cygnus.com>
5824
5825         * coff-arm.c (coff_arm_relocate_section): Don't emit
5826         base file entries for pc-relative values.
5827
5828 1999-05-25  DJ Delorie  <dj@cygnus.com>
5829
5830         * peicode.h (coff_swap_sym_in): When we create the actual section
5831         to reflect the not-there section C_SECTION symbols refer to,
5832         change the symbol class to C_STAT as the section is now really
5833         there.
5834
5835 1999-05-24  Philip Blundell  <pb@nexus.co.uk>
5836
5837         * elf32-arm.h (elf32_arm_relocate_section): Undo change of
5838         1999-03-25.
5839
5840 Mon May 17 13:35:35 1999  Stan Cox  <scox@cygnus.com>
5841
5842         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
5843         F_PIC_INT to F_PIC.
5844         * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
5845         F_ARM_3M labels.  Changed F_PIC_INT to F_PIC.
5846
5847 1999-05-16  Nick Clifton  <nickc@cygnus.com>
5848
5849         * coff-mcore.c (in_reloc_p): Reinstate.
5850
5851 1999-05-15  Nick Clifton  <nickc@cygnus.com>
5852
5853         * reloc.c (BFD_RELOC_MCORE_RVA): Define.
5854         * bfd-in2.h: Regenerate.
5855         * coff-mcore.c (in_reloc_p): Remove defintion.
5856         (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
5857         (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
5858         IMAGE_REL_MCORE_RVA.
5859         (coff_mcore_rtype_to_howto): Add special processing for
5860         IMAGE_REL_MCORE_RVA.
5861         (coff_mcore_relocate_section): Add support for
5862         IMAGE_REL_MCORE_RVA.
5863         * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
5864         (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
5865         R_MCORE_RELATIVE.
5866         (mcore_elf_relocate_section): Delete redundant case labels.
5867
5868 Fri May 14 10:59:55 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5869
5870         * elf32-arm.h (elf32_arm_relocate_section): Fix operator
5871         precedence between bit-and and comparison.
5872
5873 Thu May 13 09:45:23 1999  Joel Sherrill (joel@OARcorp.com)
5874
5875         * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
5876         list of target formats (targ_selvecs).
5877         (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
5878         (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
5879
5880 1999-05-10  DJ Delorie  <dj@cygnus.com>
5881
5882         * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
5883         reasonable mode until "ar x" is smart enough to skip it (fixes
5884         gcc/libgcc.a builds on mips-ecoff targets
5885
5886         * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
5887         to work.  Hack to support MS import libraries, which use different
5888         COMDAT types than GNU.
5889         (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
5890         to implied zero-length sections (see peicode below)
5891         * coffgen.c (coff_get_normalized_symtab): Properly read long MS
5892         filename symbols, which use one *or more* auxents.
5893         * coffswap.h (coff_swap_aux_in): ditto
5894         * peicode.h (coff_swap_sym_in): Build the implied zero-length
5895         sections
5896
5897 Tue May 11 15:51:58 1999  Jeffrey A Law  (law@cygnus.com)
5898
5899         * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
5900         for all relocations.
5901
5902 1999-05-10  Catherine Moore  <clm@cygnus.com>
5903
5904         * bfd-in.h (bfd_arm_allocate_interworking_sections):  Static
5905         if COFF_IMAGE_WITH_PE.
5906         (bfd_arm_process_before_allocation): Likewise.
5907         (bfd_arm_get_bfd_for_interworking): Likewise.
5908         * coff-arm.c: Likewise.
5909         * bfd-in2.h: Regenerate.
5910         * configure.in (armpe_little_vec): Remove coff-arm.lo.
5911         (armpe_big_vec): Likewise.
5912         * configure: Rebuild.
5913
5914 1999-05-10  Nick Clifton  <nickc@cygnus.com>
5915
5916         * elf.c (elf_fake_sections): Check for .rel. as start of rel
5917         section, not just .rel.  Same for .rela.
5918
5919 1999-05-07  Nick Clifton  <nickc@cygnus.com>
5920
5921         * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
5922         endianism with an error message.
5923
5924 Thu May  6 17:09:09 1999  Fred Fish  <fnf@be.com>
5925
5926         * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
5927         assignment from "unsigned char *" to "char *".
5928         (decode_line_info): Likewise for dwarf_line_buffer assignment.
5929
5930 1999-05-05  Catherine Moore  <clm@cygnus.com>
5931
5932         * coff-arm.c (coff_arm_relocate_section):  Add one to
5933         address of ARM_RVA32 thumb functions.
5934
5935 1999-05-05  Catherine Moore  <clm@cygnus.com>
5936
5937         * elf32-m68k.c (elf32_m68k_set_private_flags): New.
5938         (elf32_m68k_copy_private_bfd_data): New.
5939         (elf32_m68k_merge_private_bfd_data): New.
5940         (elf32_m68k_print_private_bfd_data): New.
5941         (CPU32_FLAG): Define.
5942         (PLT_CPU32_ENTRY_SIZE): Define.
5943         (elf_cpu32_plt0_entry): Declare.
5944         (elf_cpu32_plt_entry): Declare.
5945         (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
5946         (elf_m68k_finish_dynamic_symbol): Likewise.
5947         (elf_m68k_finish_dynamic_sections): Likewise.
5948         (elf_backend_plt_header_size): Remove definition.
5949         (bfd_elf32_bfd_copy_private_bfd_data): Define.
5950         (bfd_elf32_bfd_merge_private_bfd_data): Define.
5951         (bfd_elf32_bfd_set_private_flags): Define.
5952         (bfd_elf32_bfd_print_private_bfd_data): Define.
5953
5954 Mon May  3 09:24:49 1999  Jeffrey A Law  (law@cygnus.com)
5955
5956         * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
5957         and R_LONG_PCREL_MODE.
5958
5959 1999-04-29  Nick Clifton  <nickc@cygnus.com>
5960
5961         * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
5962
5963 Fri Apr 28 16:36:19 1999  Stan Cox  <scox@cygnus.com>
5964
5965         * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
5966         in relocation calculation.
5967
5968 1999-04-26  Tom Tromey  <tromey@cygnus.com>
5969
5970         * aclocal.m4, configure: Updated for new version of libtool.
5971
5972 1999-04-21  Nick Clifton  <nickc@cygnus.com>
5973
5974         * coff-mcore.c: Add support for mcore relocs.
5975
5976 1999-04-20  Gavin Romig-Koch  <gavin@cygnus.com>
5977
5978         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
5979         incorrect use EF_MIPS_xxBITPTRS.
5980
5981 1999-04-18  Ian Lance Taylor  <ian@zembu.com>
5982
5983         * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
5984         variable insn.
5985
5986         * bfd-in2.h: Rebuild.
5987         * libbfd.h: Rebuild.
5988
5989 Sat Apr 17 20:55:15 1999  Catherine Moore  <clm@cygnus.com>
5990
5991         * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
5992         (coff_arm_relocate_section):  Add ARM26D transform.  Only
5993         change to ARM26D for relocateable links.
5994
5995 1999-04-16  Gavin Romig-Koch  <gavin@cygnus.com>
5996
5997         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
5998         (bfd_elf32_bfd_print_private_bfd_data): New.
5999
6000 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
6001
6002         * elf32-arm.h (elf32_arm_final_link_relocate):  For R_ARM_THM_ABS5,
6003         refetch addend if USE_REL, add many comments regarding current state.
6004         For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
6005         * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
6006         size and rightshift.  For R_ARM_THM_PC22, fix bitsize.
6007         * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
6008
6009 Wed Apr 14 14:33:08 1999  Richard Henderson  <rth@cygnus.com>
6010
6011         * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
6012         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
6013
6014 1999-04-13  David Mosberger  <davidm@hpl.hp.com>
6015
6016         * dwarf2.c (decode_line_info): Don't truncate address to least
6017         significant 32 bits (breaks 64 bit targets).
6018         (lookup_address_in_function_table): Ditto.
6019         (comp_unit_contains_address): Ditto.
6020
6021 Tue Apr 13 21:27:19 1999  Catherine Moore  <clm@cygnus.com>
6022
6023         * coff-arm.c (arm_emit_base_file_entry): New routine.
6024         (A2T3_OFFSET): Define.
6025         (T2A3_OFFSET): Define.
6026         (coff_arm_relocate_section):  Emit base file entries for interworking
6027         stubs.
6028
6029 1999-04-13  Philip Blundell  <philb@gnu.org>
6030
6031         * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
6032         relocs 17 through 19.
6033
6034 Sun Apr 11 01:25:17 1999  Richard Henderson  <rth@cygnus.com>
6035
6036         * elfcode.h: Remove fnmatch.h.
6037         * elflink.h (elf_link_assign_sym_version): Call back to ld
6038         instead of calling fnmatch.
6039
6040         * config.bfd (i?86-*-beoself): Include pe vecs.
6041
6042 Sun Apr 11 01:14:06 1999  Richard Henderson  <rth@cygnus.com>
6043
6044         * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
6045         to go missing.
6046
6047 1999-04-10  Richard Henderson  <rth@cygnus.com>
6048
6049         * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
6050         when trying to resolve dynamic symbol references.
6051         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6052         * elf32-mips.c (mips_elf_relocate_section): Likewise.
6053         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6054         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6055         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6056         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6057         * elflink.h (elf_link_output_extsym): Likewise.
6058
6059 Sat Apr 10 15:12:09 1999  Richard Henderson  <rth@cygnus.com>
6060
6061         * section.c (_bfd_strip_section_from_output): New function moved from
6062         * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
6063         * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
6064         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6065         * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
6066         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6067         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6068         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6069         * bfd-in2.h: Update.
6070
6071 1999-04-09  Ian Lance Taylor  <ian@zembu.com>
6072
6073         * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
6074
6075 1999-04-08  Nick Clifton  <nickc@cygnus.com>
6076
6077         * coff-mcore.c: New File: Support for mcore-pe targets.
6078         * cpu-mcore.c: New File: Support for mcore targets.
6079         * elf32-mcore.c: New File: Support for mcore-elf target.
6080         * pe-mcore.c: New File: Definitions for mcore-pe target.
6081         * pei-mcore.c: New File: Definitions for mcore-pei target.
6082         * Makefile.am: Add support for MCore targets.
6083         * Makefile.in: Regenerate.
6084         * config.bfd: Add support for MCore targets.
6085         * configure.in: Add support for MCore targets.
6086         * configure: Regenerate.
6087         * archures.c: Add support for MCore architecture.
6088         * bfd-in2.h: Regenerate.
6089         * coffcode.h: Add support for mcore-pe targets.
6090         * elf.c: Add support for mcore-elf target.
6091         * reloc.c: Add support for MCore relocs.
6092         * targets.c: Add support for MCore targets.
6093
6094 1999-04-07  Nick Clifton  <nickc@cygnus.com>
6095
6096         * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
6097         R_ARM_XPC25 and R_ARM_THM_XPC22.
6098         (elf32_arm_reloc_map): Remove redundant entries.
6099
6100 1999-04-06  Ian Lance Taylor  <ian@zembu.com>
6101
6102         * sysdep.h (LC_MESSAGES): Never define.
6103
6104 1999-04-06  Chris Torek  <torek@bsdi.com>
6105
6106         * reloc.c (bfd_check_overflow): Add addrsize parameter.  Change
6107         all callers.  Rewrite completely.
6108         (_bfd_relocate_contents): Rewrite overflow checking.
6109         * bfd-in2.h: Rebuild.
6110
6111 1999-04-05  Ian Lance Taylor  <ian@zembu.com>
6112
6113         From Gabriel Paubert <paubert@iram.es>:
6114         * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
6115         R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
6116         Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
6117         have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
6118         * ppcboot.c (ppcboot_vec): Use little endian routines for
6119         headers.
6120
6121         * elf.c (elfcore_strndup): Only define if it will be used.
6122         * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
6123         and irelend.
6124         (ppc_elf_check_relocs): Remove unused local i.
6125         (ppc_elf_gc_mark_hook): Add default case to switch.
6126
6127         From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
6128         * srec.c (srec_scan): Accept \r in symbol definitions.
6129         (srec_object_p): Set HAS_SYMS if we saw any symbols.
6130         (symbolsrec_object_p): Likewise.
6131
6132 1999-04-04  Don Bowman <don@pixsci.com>
6133
6134         * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
6135
6136 1999-04-04  Ian Lance Taylor  <ian@zembu.com>
6137
6138         * dwarf1.c (parse_line_table): Remove unused locals last_pc and
6139         last_line.
6140         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
6141         * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
6142         switch.
6143         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
6144         local i.
6145         * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
6146         local val.
6147
6148 1999-03-31  Nick Clifton  <nickc@cygnus.com>
6149
6150         * config.bfd: Add support for arm-epoc-pe target.
6151         * configure.in: Add support for arm-epoc-pe target.
6152         * configure: Regenerate.
6153         * targets.c: Add support for arm-epoc-pe target.
6154         * coff-arm.c: Allow header files to override definition of
6155         TARGET_UNDERSCORE and USER_LABEL_PREFIX.
6156         * pe-arm.h: Allow previous header files to override definition of
6157         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6158         * pei-arm.h: Allow previous header files to override definition of
6159         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6160         * epoc-pe-arm.c: New file.  Support arm-epoc-pe target.
6161         * epoc-pei-arm.c: New file.  Support arm-epoc-pei target.
6162
6163 1999-03-30  Nick Clifton  <nickc@cygnus.com>
6164
6165         * elf.c (elf_map_symbols): Handle the case where section
6166         symbols are generated for content-less sections which are
6167         not mapped to the output file.
6168
6169         * linker.c: Replace direct references to fields in BFD structure
6170         with accessor macros.
6171
6172         * elflink.h: Replace direct references to fields in BFD structure
6173         with accessor macros.
6174
6175 1999-03-25  Philip Blundell  <pb@nexus.co.uk>
6176
6177         * config.bfd: Eliminate redundancy in checks for Linux/ARM.
6178
6179         * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
6180         account when adjusting section symbols during a partial link.
6181
6182 1999-03-24  Nick Clifton  <nickc@cygnus.com>
6183
6184         * coff-sparc.c (struct coff_reloc_map): Change type of field
6185           'bfd_reloc_val' to bfd_reloc_code_real_type.
6186         * elf-m10200.c (struct mn10200_reloc_map): Ditto.
6187         * elf-m10300.c (struct mn10300_reloc_map): Ditto.
6188         * elf32-arc.c (struct arc_reloc_map): Ditto.
6189         * elf32-d10v.c (struct d10v_reloc_map): Ditto.
6190         * elf32-d30v.c (struct d30v_reloc_map): Ditto.
6191         * elf32-fr30.c (struct fr30_reloc_map): Ditto.
6192         * elf32-m32r.c (struct m32r_reloc_map): Ditto.
6193         * elf32-sh.c (struct elf_reloc_map): Ditto.
6194         * elf32-sparc.c (struct elf_reloc_map): Ditto.
6195         * elf32-v850.c (struct v850_reloc_map): Ditto.
6196         * elf64-sparc.c (struct elf_reloc_map): Ditto.
6197         * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
6198         * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
6199
6200 1999-03-17  Martin Hunt  <hunt@cygnus.com>
6201
6202         * syms.c (_bfd_stab_section_find_nearest_line): Changed this
6203         function so source-level assembly works.  If multiple N_SOs
6204         are seen without and N_FUNs, create an indextable entry with
6205         a NULL function name.
6206
6207 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6208
6209         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
6210         of certian similar cpus.
6211
6212 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6213
6214         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6215         Add the 5000.  Change the architecture for the 5400 to mips4.
6216         (elf_mips_mach): Add r5000.
6217
6218 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6219
6220         * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
6221
6222 1999-03-11  Nick Clifton  <nickc@cygnus.com>
6223
6224         * binary.c (binary_set_section_contents): Generate warning about
6225         huge file offsets for any section that will occupy file space, not
6226         just those that are loadable.
6227
6228 1999-02-24  Jim Blandy  <jimb@zwingli.cygnus.com>
6229
6230         * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
6231
6232 1999-02-22  Jim Lemke  <jlemke@cygnus.com>
6233
6234         * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
6235
6236 Mon Feb 22 18:26:51 1999  Ian Lance Taylor  <ian@cygnus.com>
6237
6238         * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
6239         * elflink.h: Revert all changes since Feb 16.  Instead:
6240         (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
6241         appropriate.  Copy it to version symbols.
6242         (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
6243         symbols if appropriate.
6244         (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
6245         symbol if appropriate.
6246         (elf_link_output_extsym): If symbol is marked as undefined, and
6247         has no nonweak references, mark it as weak undefined.
6248
6249 Fri Feb 19 16:01:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6250
6251         * elflink.h (elf_merge_symbol): When overriding a dynamic
6252         definition with a weak undefined symbol, set NEEDS_PLT if it is a
6253         function.
6254         (elf_link_add_object_symbols): Don't copy the other field if we
6255         are overridding.
6256
6257 Thu Feb 18 18:07:43 1999  Ian Lance Taylor  <ian@cygnus.com>
6258
6259         * elflink.h (elf_merge_symbol): Do not merge any symbol from a
6260         shared object with a weak undefined symbol.
6261
6262 1999-02-18  Nick Clifton  <nickc@cygnus.com>
6263
6264         * elfarm-nabi.c: Set partial_inplace back to false.
6265
6266 1999-02-17  Nick Clifton  <nickc@cygnus.com>
6267
6268         * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
6269         (USER_LABEL_PREFIX): Set to "_".
6270
6271         The following patches are from: Scott Bambrough
6272         <scottb@corelcomputer.com>
6273
6274         * libaout.h (M_ARM6_NETBSD): Set to 143.
6275
6276         * reloc.c: Add ARM PIC relocs:   BFD_RELOC_ARM_GOT12,
6277         BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
6278         BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
6279         BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
6280         * bfd-in2.h: Regenerate.
6281
6282         * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
6283         'true' as REL relocs are now being used.  Add new PIC relocs:
6284         R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
6285         R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
6286
6287         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
6288         of targets.
6289         (elf32_arm_final_link_relocate): Change parameters so that entire
6290         reloc is passed.  Add support for PIC relocs.
6291         (elf32_arm_relocate_section): Pass entire reloc to
6292         elf32_arm_final_link_relocate.
6293         (elf32_arm_check_relocs): Handle new PIC relocs.
6294         (elf32_arm_adjust_dynamic_symbol): New function.
6295         (elf32_arm_size_dynamic_sections): New function.
6296         (elf32_arm_discard_copies): New function.
6297         (elf32_arm_finish_dynamic_symbol): New function.
6298         (elf32_arm_finish_dynamic_sections): New function.
6299         (ELF_MAXPAGE_SIZE): Define.
6300         (bfd_elf32_bfd_reloc_type_lookup): Define.
6301         (elf_backend_relocate_section): Define.
6302         (elf_backend_adjust_dynamic_symbol): Define.
6303         (elf_backend_create_dynamic_sections): Define.
6304         (elf_backend_finish_dynamic_symbol): Define.
6305         (elf_backend_finish_dynamic_sections): Define.
6306         (elf_backend_size_dynamic_sections): Define.
6307         (elf_backend_plt_readonly): Define.
6308         (elf_backend_want_got_plt): Define.
6309         (elf_backend_want_plt_sym): Define.
6310
6311 Wed Feb 17 12:02:26 1999  Stan Cox  <scox@cygnus.com>
6312
6313         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
6314         sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
6315         (_bfd_mips_elf_fake_sections): Likewise.
6316
6317 Wed Feb 17 12:07:23 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6318
6319         * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
6320         bfd_elf32_arm_get_bfd_for_interworking,
6321         bfd_elf32_arm_process_before_allocation): Define to avoid clash
6322         with elfarm-nabi.c.
6323
6324         * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
6325         (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
6326         elf32_arm_find_nearest_line): Make them static.
6327
6328 Tue Feb 16 22:44:37 1999  Ian Lance Taylor  <ian@cygnus.com>
6329
6330         * elflink.h (elf_merge_symbol): Add pflags parameter.  Change all
6331         callers.  Do not merge a definition from a shared object with a
6332         weak undefined symbol.
6333         (elf_link_add_object_symbols): Do not change the symbol type or
6334         size if the old symbol overrides the new one.
6335
6336 1999-02-08  Nick Clifton  <nickc@cygnus.com>
6337
6338         * config.bfd: Add support for strongarm target.
6339
6340 Mon Feb  8 11:18:14 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6341
6342         * elf32-m68k.c (reloc_map): Use the correct types for the struct
6343         fields instead of unsigned char.
6344
6345 Fri Feb  5 00:22:36 1999  Ian Lance Taylor  <ian@cygnus.com>
6346
6347         * Makefile.am: Rebuild dependencies.
6348         * Makefile.in: Rebuild.
6349
6350 Thu Feb  4 22:30:13 1999  Ian Lance Taylor  <ian@cygnus.com>
6351
6352         * configure.in: Change AC_PREREQ to 2.13.  Remove AM_CYGWIN32.
6353         Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
6354         AC_PROG_INSTALL.  Add comments to uses of AC_DEFINE.
6355         * acinclude.m4: Add comments to uses of AC_DEFINE.
6356         * acconfig.h: Remove.
6357         * configure: Rebuild with current autoconf/automake.
6358         * aclocal.m4: Likewise.
6359         * config.in: Likewise.
6360         * Makefile.in: Likewise.
6361
6362 1999-02-04  DJ Delorie  <dj@cygnus.com>
6363
6364         * libbfd.c (real_read): don't call fread for zero bytes.  This
6365         covers up a bug (or misuse of bfd) that's exposed by Solaris.
6366
6367 Thu Feb  4 12:38:10 1999  Stan Cox  <scox@cygnus.com>
6368
6369         * elf32-mips.c (mips_elf_relocate_section): Insure that the target
6370         of a jump is in the current 256 MB region.
6371
6372 Thu Feb  4 12:15:38 1999  Ian Lance Taylor  <ian@cygnus.com>
6373
6374         * format.c (bfd_check_format_matches): Change last patch to only
6375         take effect for the binary target.
6376
6377 Wed Feb  3 19:40:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6378
6379         * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
6380
6381 Wed Feb  3 15:02:44 1999  Catherine Moore  <clm@cygnus.com>
6382
6383         * elf32-fr30.c (fr30_elf_check_relocs):  New routine.
6384
6385 Tue Feb  2 21:38:28 1999  Ian Lance Taylor  <ian@cygnus.com>
6386
6387         * format.c (bfd_check_format_matches): If the target was
6388         previously specified, don't check other targets when checking for
6389         an archive file.
6390
6391 Tue Feb  2 18:16:43 1999  Catherine Moore  <clm@cygnus.com>
6392
6393         * elf32-arm.h (elf32_arm_reloc_map):  Removed.
6394         (elf32_arm_reloc_type_lookup):  Removed
6395         * elfarm-nabi.c (elf32_arm_reloc_map):  New.
6396         (elf32_arm_reloc_type_lookup):  New.
6397         * elfarm-oabi.c (elf32_arm_reloc_map):  New.
6398         (elf32_arm_reloc_type_lookup):  New.
6399
6400 Mon Feb  1 19:49:21 1999  Catherine Moore  <clm@cygnus.com>
6401
6402         * elfarm-nabi.c:  Renamed from elf32-arm-newabi.c.
6403         * elfarm-oabi.c:  Renamed from elf32-arm-oldabi.c
6404         * Makefile.am:  Use new files.
6405         * Makefile.in:  Regenerate.
6406         * configure.in:  Use new files.
6407         * configure:  Regenerate.
6408
6409 1999-02-01  Nick Clifton  <nickc@cygnus.com>
6410
6411         * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
6412         (fr30_elf_gc_sweep_hook): New function.
6413         (elf_backend_can_gc_sections): Define.
6414
6415 Mon Feb  1 12:21:47 1999  Catherine Moore  <clm@cygnus.com>
6416
6417         * targets.c (bfd_target_vector):  Add bfd_elf32_littlearm_oabi_vec
6418         and bfd_elf32_bigarm_oabi_vec.
6419
6420 Mon Feb  1 11:46:31 1999  Catherine Moore  <clm@cygnus.com>
6421
6422         * Makefile.am (elf32-arm-oldabi.lo):  New.
6423         (elf32-arm-newabi.lo):  New.
6424         * Makefile.in:  Regenerate.
6425         * config.bfd (thumb-*-elf):  Remove definition of targ_underscore.
6426         (arm-*-elf):  Likewise.
6427         (arm-*-oabi):  New.
6428         (thumb-*-oabi):  New.
6429         * configure:  Regenerate.
6430         * configure.in (bfd_elf32_littlearm_oabi_vec):  New.
6431         (bfd_elf32_bigarm_oabi_vec):  New.
6432         * elf32-arm-newabi.c:  New.
6433         * elf32-arm-oldabi.c:  New.
6434         * elf32-arm.c:  Removed.
6435         * elf32-arm.h:  New.
6436
6437 Mon Feb  1 11:52:12 1999  Frank Ch. Eigler  <fche@cygnus.com>
6438
6439         * binary.c (binary_set_section_contents): Omit warnings for
6440         unloadable sections.
6441
6442 1999-01-31  Michael Meissner  <meissner@cygnus.com>
6443
6444         * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
6445         powerpc{,le}-*-eabi.
6446
6447 1999-01-29  Nick Clifton  <nickc@cygnus.com>
6448
6449         * dwarf2.c (read_unsigned_leb128): Remove unused variables.
6450         * dwarf2.c (read_signed_leb128): Remove unused variables.
6451
6452 Fri Jan 29 00:47:21 1999  H.J. Lu  <hjl@gnu.org>
6453
6454         * elf.c (assign_file_positions_for_segments): Only adjust
6455         p_align when needed.
6456
6457 Thu Jan 28 20:05:22 1999  Ian Lance Taylor  <ian@cygnus.com>
6458
6459         * binary.c (binary_set_section_contents): Don't return early for a
6460         non-loadable section, in case the first section is non-loadable.
6461         Don't set the low lma for a SEC_NEVER_LOAD section.  From Maciej
6462         W. Rozycki <macro@ds2.pg.gda.pl>.
6463
6464 1999-01-28  Nick Clifton  <nickc@cygnus.com>
6465
6466         * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
6467         R_FR30_GNU_VTENTRY relocs.
6468
6469 Thu Jan 28 11:08:16 1999  Catherine Moore  <clm@cygnus.com>
6470
6471         * elflink.h (elf_link_output_sym):  Zero syms which are
6472         part of sections which have been excluded.
6473
6474 Wed Jan 27 13:35:35 1999  Stan Cox  <scox@cygnus.com>
6475
6476         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
6477         to F_PIC_INT.
6478         * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
6479         F_ARM_3M labels.  Changed F_PIC to F_PIC_INT.
6480
6481 1999-01-27  Nick Clifton  <nickc@cygnus.com>
6482
6483         * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
6484         relocation.
6485         (fr30_final_link_relocate): Use computed value as result of
6486         relocation.
6487
6488 1999-01-26  Frank Ch. Eigler  <fche@cygnus.com>
6489
6490         * binary.c (binary_set_section_contents): Emit warning for
6491         huge file offsets due to widely-dispersed section LMAs.
6492
6493 Mon Jan 18 03:35:35 1999  Ian Lance Taylor  <ian@cygnus.com>
6494
6495         * elf.c (assign_file_positions_for_segments): If not D_PAGED,
6496         align first section to largest section alignment, not first
6497         section alignment.
6498
6499 1999-01-04  Jason Molenda  (jsm@bugshack.cygnus.com)
6500
6501         * configure.in: Require autoconf 2.12.1 or higher.
6502
6503 Tue Dec 22 15:21:41 1998  Catherine Moore  <clm@cygnus.com>
6504
6505         * archures.c (bfd_mach_i386_i386_intel_syntax):  Define.
6506         * bfd-in2.h:  Likewise.
6507         * cpu-i386.c (bfd_i386_arch_intel_syntax):  New.
6508
6509 1998-12-16  Gavin Romig-Koch  <gavin@cygnus.com>
6510
6511         * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
6512         * cpu-mips.c: Add support for and independent 4111.
6513         * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
6514         (_bfd_mips_elf_final_write_processing):
6515         bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
6516
6517 1998-12-15  Gavin Romig-Koch  <gavin@cygnus.com>
6518
6519         * elf32-mips.c (elf_mips_abi_name): New.
6520         (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
6521
6522 1998-12-12  Gavin Romig-Koch  <gavin@cygnus.com>
6523
6524         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6525         Handle bfd_mach_mips4300.
6526
6527 1998-12-11  Ulrich Drepper  <drepper@cygnus.com>
6528
6529         * elf32-i386.c: Remove leaked development code from patch
6530         1998-12-10 by Richard Henderson.
6531
6532 1998-12-10  Richard Henderson  <rth@cygnus.com>
6533
6534         * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
6535         in debug sections for symbol defined externally.
6536
6537 Thu Dec 10 10:58:38 1998  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6538
6539         * targets.c (bfd_target_vector): Remove duplicate entry for
6540         tekhex_vec.
6541
6542 1998-12-09  Nick Clifton  <nickc@cygnus.com>
6543
6544         * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
6545         since we are using RELAs.
6546
6547 Tue Dec  8 22:15:48 1998  Ian Lance Taylor  <ian@cygnus.com>
6548
6549         SCO Open Server Release 5 core file support, from Jouke Numan
6550         <jnuman@hiscom.nl>:
6551         * sco5-core.c: New file.
6552         * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
6553         (sco5-core.lo): Define SCO5_CORE in COREFLAG.
6554         * Makefile.am: Rebuild dependencies.
6555         (OPTIONAL_BACKENDS): Add sco5-core.lo.
6556         (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
6557         * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
6558         * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
6559         * bfd-in2.h, configure, Makefile.in: Rebuild.
6560
6561 Tue Dec  8 19:38:42 1998  Mark Klein  <mklein@dis.com>
6562
6563         * config.bfd (hppa*-*-mpeix*): New target.
6564         * configure.in: Add AC_HEADER_DIRENT.
6565         (hppa*-*-mpeix*): New target.
6566         * configure.host (hppa*-*-mpeix*): New host.
6567         * hpux-core.c: Check HOST_HPPAMPEIX.  Use HAVE_DIRENT_H and
6568         friends rather than just including <sys/dir.h>.
6569         * som.h (struct som_symbol): Add hppa_priv_level and apto
6570         tc_data.  Change all users.
6571         (struct somdata): Add comp_unit field.
6572         (obj_som_compilation_unit): Define.
6573         (bfd_som_attach_compilation_unix): Declare.
6574         * som.c: Check HOST_HPPAMPEIX.
6575         (struct som_misc_symbol_info): Add new field priv_level.
6576         (som_object_setup): Add current_offset parameter.  Change all
6577         callers.
6578         (setup_sections): Likewise.
6579         (som_object_p): For EXECLIBMAGIC, read the lst header.
6580         (som_write_symbol_strings): Add compilation_unit parameter.
6581         Change all callers.
6582         (som_finish_writing): Write out compilation_unit.
6583         (som_bfd_derive_misc_symbol_info): Set priv_level.
6584         (som_build_and_write_symbol_table): Set xleast field to 3.
6585         (som_slurp_symbol_table): Set symbol priv_level.
6586         (bfd_som_attach_compilation_unit): New function.
6587         (som_bfd_ar_write_symbol_stuff): Set xleast field to 3.  Set
6588         priv_level into symbol_value.
6589         * configure, config.in: Rebuild.
6590
6591 Tue Dec  8 16:21:35 1998  Ian Lance Taylor  <ian@cygnus.com>
6592
6593         * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
6594         warning function to call _bfd_error_handler instead.
6595
6596         * libbfd.c (COERCE32): Cast through unsigned long and long to
6597         avoid bug in old version of gcc.
6598
6599         * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
6600         (elf_backend_additional_program_headers): Don't define.
6601
6602 1998-12-08  Nick Clifton  <nickc@cygnus.com>
6603
6604         * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
6605         relocations to include offset of 2 included in the insns, and the
6606         offset of the relocs within the section.
6607
6608 Wed Dec  2 15:03:59 1998  David Taylor  <taylor@texas.cygnus.com>
6609
6610         The following changes were made by David Taylor
6611         <taylor@texas.cygnus.com>, Edith Epstein
6612         <eepstein@sophia.cygnus.com>, Jim Blandy
6613         <jimb@zwingli.cygnus.com>, and Elena Zannoni
6614         <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
6615         changes originally made by HP; HP did not create ChangeLog
6616         entries.
6617
6618         * aclocal.m4, configure, Makefile.in: Rebuilt using latest
6619         automake macro library.
6620
6621         * hpux-core.c (hpux_core_core_file_p): this function now
6622         understands HPUX 10.30 thread info. Yes, the thread stacks can be
6623         found in the corefile! Also, in hpux_core_core_file_p, if we
6624         encounter a section with an unknown type, don't punt.  Instead,
6625         just skip it.  Also, count the number of sections of known type
6626         that we encounter.  If we encounter at least one good one, then
6627         we'll declare that the file is a core file.  If we encounter any
6628         unknown ones but some known ones, then we'll issue a warning (but
6629         still declare it to be a core file). Also, correctly decide when a
6630         file is not a core.
6631         (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
6632         (CORE_ANON_SHMEM): define if not defined.
6633         (hpux_core_struct): add members lwpid and user_tid.
6634         (core_kernel_thread_id, core_user_thread_id): new macros.
6635         (make_bfd_asection): use bfd_alloc to allocate room for a copy of
6636         the name before storing it in the bfd.
6637         (hpux_core_core_file_p): handle threads.
6638
6639         * libhppa.h (GET_FIELD): protect against redefinition.
6640         (HPPA_WIDE): define.
6641         (GET_FIELD): define.
6642         (GET_BIT): define.
6643         (MASK): define.
6644         (CATENATE): define.
6645         (ELEVEN): define.
6646         (sign_extend): redefine.
6647         (assemble_6): define.
6648         (assemble_12): rewrite.
6649         (assemble_16): define.
6650         (assemble_16a): define.
6651         (assemble_17): rewrite.
6652         (assemble_22): define.
6653
6654 1998-12-07  Nick Clifton  <nickc@cygnus.com>
6655
6656         * elf32-fr30.c (fr30_final_link_relocate): Using signed
6657         relocations for signed values.
6658
6659 Sun Dec  6 16:30:33 1998  Ian Lance Taylor  <ian@cygnus.com>
6660
6661         * mipsbsd.c (MY(set_arch_mach)): Make static.
6662         * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
6663         bfd_mach_mips* macros rather than simple numbers.
6664
6665         COFF weak symbol support, based on patches from Mark Elbrecht
6666         <snowball3@usa.net>:
6667         * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
6668         * coffgen.c (coff_renumber_symbols): Handle weak symbols.
6669         (coff_write_alien_symbol): Likewise.
6670         * cofflink.c (coff_link_check_ar_symbols): Likewise.
6671         (coff_link_add_symbols): Likewise.
6672         (_bfd_coff_link_input_bfd): Likewise.
6673         (_bfd_coff_write_global_sym): Likewise.
6674
6675         * elf.c (copy_private_bfd_data): Always initialize the
6676         includes_phdrs field.
6677
6678         * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
6679         file defines a symbol first mentioned in an ELF file.
6680
6681         * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
6682         possible, rather than only if BFD64.
6683         * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
6684         not __GNUC__.
6685         * bfd-in2.h: Rebuild.
6686
6687         * srec.c (srec_set_section_contents): Correct test to avoid
6688         switching to 4 byte addresses after seeing a second section which
6689         requires 3 byte addresses.  From Joel Schantz
6690         <joel.schantz@argosys.boeing.com>.
6691
6692         * config.bfd (m68*-*-gnu*): New target.  From Aymeric Vincent
6693         <aymeric.vincent@emi.u-bordeaux.fr>.
6694
6695 1998-12-04  Jim Blandy  <jimb@zwingli.cygnus.com>
6696
6697         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
6698         decide whether the output file is -mrelocatable-lib,
6699         -mrelocatable, or neither.  (gdb.base/nodebug.exp)
6700
6701 1998-12-03  Nick Clifton  <nickc@cygnus.com>
6702
6703         * elf32-fr30.c: Add support for R_FR30_48 reloc.
6704         * reloc.c: Add BFD_RELOC_FR30_48 relocation.
6705         * bfd-in2.h: Regenerate.
6706         * libbfd.h: Regenerate
6707
6708 Wed Dec  2 00:58:37 1998  Ian Lance Taylor  <ian@cygnus.com>
6709
6710         * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
6711         link against a dynamic symbol with no type or size.
6712
6713 1998-12-01  Ulrich Drepper  <drepper@cygnus.com>
6714
6715         * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
6716         relocation for section which does not get loaded.
6717         (elf_i386_relocate_section) [R_386_32]: Likewise.
6718
6719 Tue Dec  1 11:33:33 1998  Jim Wilson  <wilson@cygnus.com>
6720
6721         * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
6722         reloc_count and i long instead of unsigned long.  Handle error
6723         return from bfd_canonicalize_reloc.
6724
6725 1998-12-01  Nick Clifton  <nickc@cygnus.com>
6726
6727         * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
6728         a hash table.
6729
6730 Mon Nov 30 15:28:09 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
6731
6732         * elf32-sh.c (elf/sh.h): Include.
6733         sh_reloc_type: Delete.  Changed all references to elf_sh_reloc_type.
6734         (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
6735         (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
6736         (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6737         * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
6738
6739 Fri Nov 27 17:51:38 1998  Geoff Keating  <geoffk@ozemail.com.au>
6740
6741         * elflink.h (compute_bucket_count): Don't allow minsize==0, it
6742         causes division by zero later on.
6743
6744 Thu Nov 26 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
6745
6746         * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
6747         needed.
6748
6749 1998-11-25  DJ Delorie  <dj@cygnus.com>
6750
6751         * coff-i386.c (i3coff_object_p): Remove hack.  Use new emulation
6752         hook now.
6753
6754 Tue Nov 24 10:25:27 1998  Nick Clifton  <nickc@cygnus.com>
6755
6756         * elf32-fr30.c (fr30_elf_relocate_section): Call
6757         fr30_final_link_relocate.
6758         (fr30_final_link_relocate): New function: Handle I20 and I32
6759         relocs.
6760         (fr30_elf_i32_reloc): New function: Handle I32 relocs.
6761         (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
6762         (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
6763
6764         * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
6765         chain to empty.
6766
6767         The following changes are based on a patch submitted by Gianluca
6768         Moro <glctr@abc.it>:
6769
6770         (v850_elf_perform_relocation): Only update a hi16s reloc if it has
6771         not already been updated.
6772         (find_remembered_hi16s_reloc): New parameter 'already_found'
6773         returns state of remembered hi16s reloc.
6774         (remember_hi16s_reloc): Set 'found' field to false.
6775         (hi16s_location): Add 'found' field.
6776
6777 1998-11-23  DJ Delorie  <dj@cygnus.com>
6778
6779         * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
6780         to see .DLL files as unrecognized.
6781         (i3coff_object_p): Sorry, had to hack it to not recognize these
6782         files (pei-i386) on request.
6783
6784 1998-11-23  DJ Delorie  <dj@cygnus.com>
6785
6786         * opncls.c (bfd_make_readable): need more cleanup for symbols and
6787         relents.  Call bfd_check_format to reinitialize.
6788
6789 Fri Nov 20 14:21:36 1998  Nick Clifton  <nickc@cygnus.com>
6790
6791         * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
6792         warnings.
6793
6794 Thu Nov 19 14:42:15 1998  Geoffrey Noer  <noer@cygnus.com>
6795
6796         * aclocal.m4: regenerate
6797         * configure: regenerate
6798
6799 Tue Nov 17 20:23:35 1998  Richard Henderson  <rth@cygnus.com>
6800
6801         * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
6802         * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
6803         * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
6804         respect it as an upper bound on what memory to reference.
6805         (elf_gc_smash_unused_vtentry_relocs): Likewise.
6806         (elf_gc_record_vtentry): Handle as-yet undefined vtables.  Set and
6807         update vtable_entries_size appropriately.
6808
6809 Tue Nov 17 15:28:31 1998  Nick Clifton  <nickc@cygnus.com>
6810
6811         * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
6812         reloc number.
6813
6814 Mon Nov 16 22:19:21 1998  DJ Delorie  <dj@cygnus.com>
6815
6816         * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
6817         bfds; they have no "file" so we fake it.
6818         * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
6819         * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
6820         resizing the memory buffer.
6821         * opncls.c (bfd_make_writable): New function; lets you write a
6822         bfd_create'd bfd to an in-memory buffer.
6823         (bfd_make_readable): New function; lets you read back that buffer
6824         as if it were from bfd_openr.  Used to build generated archive
6825         members (winsup's ld's dlltool)
6826
6827 Mon Nov 16 19:15:19 1998  Dave Brolley  <brolley@cygnus.com>
6828
6829         * po/bfd.pot: Regenerated.
6830
6831 Mon Nov 16 10:57:06 1998  Nick Clifton  <nickc@cygnus.com>
6832
6833         * elf32-v850.c (hi16s_location): Replaced fixed size array with
6834         linked list.
6835
6836 Sun Nov 15 20:28:25 1998  Richard Henderson  <rth@cygnus.com>
6837
6838         * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
6839         element of the gotentry list for local symbols too.
6840         (elf64_alpha_relocate_section): Unify local and global handling.
6841         Assert that gotent->use_count > 0.
6842
6843 Sat Nov 14 15:16:01 1998  Ian Lance Taylor  <ian@cygnus.com>
6844
6845         * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
6846         update for file name changes of July 2, 1998.
6847         (vms_vax_vec): New.
6848         * configure: Rebuild.
6849
6850 Thu Nov 12 19:19:54 1998  Dave Brolley  <brolley@cygnus.com>
6851
6852         * po/bfd.pot: Regenerated.
6853
6854 Tue Nov 10 16:17:06 1998  Geoffrey Noer  <noer@cygnus.com>
6855
6856         * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
6857         * aclocal.m4, configure: regenerate
6858
6859 Tue Nov 10 15:13:59 1998  Nick Clifton  <nickc@cygnus.com>
6860
6861         * elf.c (prep_headers): Add support for bfd_arch_fr30.
6862
6863 Tue Nov 10 13:37:36 1998  Felix Lee  <flee@cygnus.com>
6864
6865         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
6866         BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
6867         was cached.
6868         * aclocal.m4, configure: regenerated.
6869
6870 Tue Nov 10 14:31:01 1998  Catherine Moore  <clm@cygnus.com>
6871
6872         * elf32-d10v.c (reloc_type):  Add R_D10V_GNU_VTINHERIT and
6873         R_D10V_GNU_VTENTRY relocs.
6874         (elf_d10v_howto_table):  Likewise.
6875         (d10v_reloc_map d10v_reloc_map):  Likewise.
6876         (elf32_d10v_gc_mark_hook):  New.
6877         (elf32_d10v_gc_sweep_hook):  New.
6878         (elf32_d10v_check_relocs):  New.
6879         (elf32_d10v_relocate_section):  New.
6880         (elf_backend_relocate_section):  Define.
6881         (elf_backend_can_gc_sections):  Define.
6882
6883 Sat Nov  7 18:07:51 1998  Peter Schauer  <peter.schauer@regent.e-technik.tu-muenchen.de>
6884
6885         * Makefile.am (BFD32_BACKENDS): Move vms files here...
6886         (BFD64_BACKENDS): ...from here.
6887         (BFD32_BACKENDS_CFILES): Move vms files here...
6888         (BFD64_BACKENDS_CFILES): ...from here.
6889         * Makefile.in: Rebuild.
6890
6891 Wed Nov  4 15:58:48 1998  Nick Clifton  <nickc@cygnus.com>
6892
6893         * Makefile.am: Add FR30 target.
6894         * Makefile.in: Add FR30 target.
6895         * archures.c: Add support for FR30.
6896         * config.bfd: Add support for FR30.
6897         * configure.in: Add support for FR30.
6898         * reloc.c: Add support for FR30 relocations.
6899         * targets.c: Add support for FR30 relocations.
6900         * bfd-in2.h: Regenerate.
6901         * configure: Regenerate.
6902         * libbfd.h:  Regenerate.
6903         * cpu-fr30.c: New file.
6904         * elf32-fr30.c: New file.
6905
6906 Mon Nov  2 14:59:33 1998  Geoffrey Noer  <noer@cygnus.com>
6907
6908         * configure.in: detect cygwin* instead of cygwin32*
6909         * configure: regenerate
6910
6911 Sun Nov  1 19:32:28 1998  Jeffrey A Law  (law@cygnus.com)
6912
6913         * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
6914         use bfd_malloc and free instead and check return value from bfd_malloc.
6915
6916 Sun Nov  1 16:20:35 1998  Ian Lance Taylor  <ian@cygnus.com>
6917
6918         * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
6919         * libbfd.h: Rebuild.
6920
6921         * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
6922         (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
6923         (MIPS_TEXT_DYNSYM_SECN): Likewise.
6924         (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
6925         section.
6926         (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
6927         field.
6928         (mips_elf_link_hash_table_create): Don't initialize
6929         dynsym_sec_strindex.
6930         (mips_elf_gc_mark_hook): Add default case to avoid warning.
6931         (mips_elf_size_dynamic_sections): Generate a section symbol for
6932         every output section.
6933         (mips_elf_finish_dynamic_sections): Count all sections for
6934         DT_MIPS_UNREFEXTNO.
6935         (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
6936         output sections.
6937
6938 Sun Nov  1 12:46:53 1998  Geoff Keating  <geoffk@ozemail.com.au>
6939
6940         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
6941         for later PLT entries in large PLTs.
6942         (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
6943
6944 Sat Oct 31 20:10:09 1998  Jeffrey A Law  (law@cygnus.com)
6945
6946         * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
6947
6948 1998-10-26 15:58  Ulrich Drepper  <drepper@cygnus.com>
6949
6950         * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
6951         * elflink.h (elf_collect_hash_codes): New function.  This function is
6952         called for each exported symbol and we compute the ELF hash value for
6953         it.
6954         (compute_bucket_value): New function.  It is called from
6955         size_dynamic_sections to determine the hash table size.  When we are
6956         optimizing a better, but slower, algorithm is used.
6957         (size_dynamic_sections): Call compute_bucket_value.
6958
6959         * elf.c (bfd_elf_hash): Optimize the hash function a bit.
6960
6961 Mon Oct 19 20:03:21 1998  Catherine Moore  <clm@cygnus.com>
6962
6963         * elf32-sh.c:  Add HOWTO entries for R_SH_GNU_VTINHERIT and
6964         R_SH_GNU_VTENTRY.
6965         (sh_elf_gc_mark_hook):  New.
6966         (sh_elf_gc_sweep_hook):  New.
6967         (sh_elf_check_relocs):  New.
6968         (elf_backend_can_gc_sections):  Define.
6969
6970 Mon Oct 19 16:57:05 1998  Felix Lee  <flee@cygnus.com>
6971
6972         * acinclude.m4: undo previous gettext change
6973         * aclocal.m4: rebuild with right version of aclocal.
6974
6975 Mon Oct 19 01:47:21 1998  Felix Lee  <flee@cygnus.com>
6976
6977         * acinclude.m4, aclocal.m4: move gettext-related fragments from
6978         aclocal.m4 to acinclude.m4, so they don't get lost.
6979
6980         * elfcore.h: rewrite for better corefile support.
6981         * elf.c (elfcore_*): new functions.
6982         * elf-bfd.h (elf_obj_tdata): new structure members.
6983         * acconfig.h, acinclude.m4, configure.in: add feature-tests for
6984         flavor of procfs.
6985         * aclocal.m4, config.in, configure, Makefile.in: regenerated.
6986
6987 Fri Oct 16 14:07:45 1998  Catherine Moore  <clm@cygnus.com>
6988
6989         * elf32-m32r.c:  Add HOWTO entries for R_M32R_GNU_VTINHERIT
6990         and R_M32R_GNU_VTENTRY.
6991         (elf_backend_can_gc_sections):  Define.
6992         (m32r_elf_check_relocs):  New.
6993         (m32r_elf_gc_mark_hook):  New.
6994         (m32r_elf_gc_sweep_hook):  New.
6995         (m32r_elf_relocate_section):  Handle VT relocs.
6996
6997 Mon Oct 12 14:18:40 1998  Nick Clifton  <nickc@cygnus.com>
6998
6999         * coff-arm.c (arm_relocate_section): Remove redundant test.
7000
7001         * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
7002         cleat that the 'bitsize' field is the size of the bitfield AFTER
7003         relocation not before.
7004
7005         * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
7006
7007         * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
7008         relocs.
7009
7010 Tue Oct  6 09:20:44 1998  Catherine Moore  <clm@cygnus.com>
7011
7012         * elf32-sparc.c:  Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
7013         R_SPARC_GNU_VTENTRY.
7014         (elf32_sparc_check_relocs):  Handle them.
7015         (elf32_sparc_reloc_type_lookup):  Likewise.
7016         (elf32_sparc_relocate_section):  Likewise.
7017         (elf32_sparc_gc_mark_hook):  New.
7018         (elf32_sparc_gc_sweep_hook):  New.
7019
7020 Mon Oct  5 14:55:30 1998  Jeffrey A Law  (law@cygnus.com)
7021
7022         * som.c (som_finish_writing): Perform some sanity checks when
7023         writing an executable or shared library.
7024
7025 Mon Oct  5 12:02:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
7026
7027         * dwarf1.c : New file.  Adds _bfd_dwarf1_find_nearest_line.
7028         * configure.in (elf): Add dwarf1.lo.
7029         * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
7030         * elf.c (_bfd_elf_find_nearest_line): Add call to
7031         _bfd_dwarf1_find_nearest_line.
7032         * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
7033         Add call to _bfd_dwarf1_find_nearest_line.
7034         * configure: Rebuilt.
7035
7036 Mon Oct  5 10:06:22 1998  Catherine Moore  <clm@cygnus.com>
7037
7038         * elflink.h (elf_gc_sections):  Do not allow garbage
7039         collection if dynamic sections have been created.
7040
7041 Mon Oct  5 09:07:37 1998  Catherine Moore  <clm@cygnus.com>
7042
7043         * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
7044         R_V850_GNU_VTENTRY.
7045         (v850_elf_check_relocs):  Handle VTINHERIT and VTENTRY relocs.
7046         (v850_elf_perform_relocation):  Likewise.
7047         (v850_elf_final_link_relocate):  Likewise.
7048         (v850_elf_relocate_section):  Likewise.
7049         (v850_elf_gc_sweep_hook):  New routine.
7050         (v850_elf_gc_mark_hook):  New routine.
7051         (elf_backend_can_gc_sections):  Define.
7052
7053 Mon Oct  5 09:04:25 1998  Catherine Moore  <clm@cygnus.com>
7054
7055         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Don't assume
7056         that dynobj exists.
7057
7058 Sun Oct  4 23:29:34 1998  David Edelsohn  <edelsohn@mhpcc.edu>
7059
7060         * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
7061         Declare size as bfd_size_type.
7062         (rs6000coff_get_section_contents): Declare count as bfd_size_type.
7063
7064 Sun Oct  4 20:38:29 1998  Jeffrey A Law  (law@cygnus.com)
7065
7066         * cpu-hppa.c (bfd_hppa20_arch): Define.  Link it into the bfd_hppa_arch
7067         structure.
7068         * som.c (CPU_PA_RISC2_0): Define.
7069         (_PA_RISC2_0_ID): Likewise.
7070         (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
7071
7072 Sun Oct  4 21:19:09 1998  Ian Lance Taylor  <ian@cygnus.com>
7073
7074         * elflink.h (elf_link_add_object_symbols): When a versioned symbol
7075         has a base which is already defined, only add the referenced
7076         symbol to the dynamic symbol table if it is defined or referenced
7077         by a regular file.
7078
7079         * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
7080         correctly.
7081
7082 1998-09-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7083
7084         * elflink.h (elf_link_add_object_symbols): Undo last change.
7085
7086 Wed Sep 23 16:09:31 1998  Richard Henderson  <rth@cygnus.com>
7087
7088         * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
7089         symbol for the indirect alias to a versioned symbol.
7090
7091 Mon Sep 21 12:15:22 1998  Catherine Moore  <clm@cygnus.com>
7092
7093         * elf32-i386.c (elf32_i386_vtinherit_howto): New.
7094         (elf32_i386_vtentry_howto): New.
7095         (elf_i386_reloc_type_lookup):  Return elf32_i386_vtentry_howto
7096         or elf32_i386_vtinherit_howto  on lookup.
7097
7098 Sun Sep 20 00:48:07 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7099
7100         * elf32-m68k.c: Include "elf/m68k.h".  Remove definition of enum
7101         reloc_type.  Rename R_68K__max to R_68K_max.
7102         (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
7103         reloc.
7104
7105 Sun Sep 20 00:09:25 1998  Chris Torek  <torek@bsdi.com>
7106
7107         * libbfd.c (bfd_getb32): Rewrite expression to get better code.
7108         (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7109
7110         * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
7111         after.
7112
7113 Sat Sep 19 22:42:23 1998  Doug Rabson  <dfr@nlsystems.com>
7114
7115         * elflink.h (elf_link_add_object_symbols): Ensure that the warning
7116         message has a null byte terminator.
7117
7118 Fri Sep 18 14:35:29 1998  Nick Clifton  <nickc@cygnus.com>
7119
7120         * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
7121         word subject to R_V850_32 relocation.
7122
7123 Thu Sep 17 17:20:36 1998  Nick Clifton  <nickc@cygnus.com>
7124
7125         * dwarf2.c: Add comment describing problem computing line numbers
7126         for undefined symbols at link time.
7127
7128 Thu Sep 17 16:03:28 1998  Richard Henderson  <rth@cygnus.com>
7129
7130         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
7131         transform a defweak into a plt entry.
7132         (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
7133         plt entry references to receive a RELATIVE reloc.
7134         (elf64_alpha_finish_dynamic_symbol): Fill them in.
7135         (elf64_alpha_relocate_section): Assert we don't overrun
7136         the allocated relocation space.
7137
7138 Wed Sep 16 18:03:13 1998  Nick Clifton  <nickc@cygnus.com>
7139
7140         * elf.c (swap_out_syms): Always treat section symbols as
7141         special, even if they are attached to a common section.
7142
7143 Wed Sep 16 10:34:13 1998  Nick Clifton  <nickc@cygnus.com>
7144
7145         * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
7146         sections with v850 common section attributes into named v850
7147         common sections.
7148         (v850_elf_add_symbol_hook): Move symbols in sections with v850
7149         common section attributes into named v850 common sections.
7150
7151 Wed Sep 16 11:26:49 CDT 1998  Catherine Moore  <clm@cygnus.com>
7152
7153         * elf32-arm.c (elf32_arm_gc_mark_hook):  Remove print
7154         statement.
7155
7156 1998-09-15  Geoff Keating  <geoffk@ozemail.com.au>
7157
7158         * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
7159         part of Vladimir's change of 1998-08-19.  Make a R_PPC_SDAREL16
7160         reloc to the wrong section a warning, not an error.  .dynsbss
7161         is not an output section, so there is no need to check for it.
7162
7163 Tue Sep 15 12:40:05 1998  Catherine Moore  <clm@cygnus.com>
7164
7165         * elf-bfd.h:  Add argument to elf_backend_get_symbol_type.
7166
7167 Tue Sep 15 08:34:40 1998  Catherine Moore  <clm@cygnus.com>
7168
7169         * elf.c (swap_out_syms):  Pass type to elf_backend_get_symbol_type.
7170         * elf32-arm.c:  Add HOWTO entries for R_ARM_GNU_VTINHERIT and
7171         R_ARM_GNU_VTENTRY.
7172         (elf32_arm_gc_mark_hook): New.
7173         (elf32_arm_gc_sweep_hook): New.
7174         (elf32_arm_check_relocs): New.
7175         (elf32_arm_final_link_relocate):  Handle VTINHERIT and VTENTRY
7176         relocations.
7177         (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
7178         relocations.
7179
7180 1998-09-10  Geoff Keating  <geoffk@ozemail.com.au>
7181
7182         * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
7183         assume there is no PLT or GOT.
7184
7185 Wed Sep  9 14:24:12 1998  Nick Clifton  <nickc@cygnus.com>
7186
7187         * elf32-arm.c (elf32_arm_find_nearest_line): New function:  just
7188         like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
7189         also accepted as a function symbol type.
7190
7191 Mon Sep  7 13:24:03 1998  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
7192
7193         * rs6000-core.c (_LONG_LONG):  Define for AIX 4.x only.
7194
7195 Sat Sep  5 20:40:18 1998  Ian Lance Taylor  <ian@cygnus.com>
7196
7197         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
7198         match definition of _bfd_gc_sections field.
7199         * libbfd.h: Rebuild.
7200
7201 Fri Sep  4 13:54:23 1998  David Miller  <davem@dm.cobaltmicro.com>
7202
7203         * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
7204         the addend of a dynamic relocation referencing a section.
7205         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7206         (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
7207
7208 Thu Sep  3 17:28:50 1998  Richard Henderson  <rth@cygnus.com>
7209
7210         * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
7211         bed has a size_dynamic_sections routine before trying to use it.
7212
7213 Mon Aug 31 14:49:22 1998  Richard Henderson  <rth@cygnus.com>
7214
7215         * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
7216         _bfd_elf_rel_vtable_reloc_fn.
7217
7218 Mon Aug 31 10:23:40 1998  Catherine Moore  <clm@cygnus.com>
7219
7220         * Makefile.am:  Add elf32-arm.c.
7221         * Makefile.in:  Rebuild.
7222         * elf-bfd.h:  Add elf_backend_get_symbol_type.
7223         * elf.c (swap_out_syms):  If defined, call
7224         elf_backend_get_symbol_type.
7225         * elf32-arm.c: Define elf_backend_get_symbol_type.
7226         (elf32_arm_get_symbol-type):  New routine.
7227         (record_thumb_to_arm_glue):  Change to use STT_ARM_TFUNC.
7228         (bfd_elf32_arm_process_before_allocation):  Change to
7229         check for STT_ARM_TFUNC.
7230         (elf32_arm_final_link_relocate):  Likewise.
7231         * elfxx-target.h:  Add elf_backend_get_symbol_type.
7232
7233 Fri Aug 28 19:44:07 1998  Richard Henderson  <rth@cygnus.com>
7234
7235         * archures.c (bfd_mach_alpha_ev[456]): New.
7236         * cpu-alpha.c: Rework to match these types.
7237         * bfd-in2.h: Rebuild.
7238
7239 Fri Aug 28 19:38:53 1998  Richard Henderson  <rth@cygnus.com>
7240
7241         * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
7242         * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
7243
7244         * elf32-i386.c (elf_howto_table): Add vtable relocs.
7245         (elf_i386_reloc_type_lookup): Recognize them.
7246         (elf_i386_check_relocs): Pass them off to generic code.
7247         (elf_i386_relocate_section): Ignore them.
7248         (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
7249         (elf_backend_can_gc_sections): True.
7250
7251 Thu Aug 20 15:03:45 1998  Nick Clifton  <nickc@cygnus.com>
7252
7253         * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
7254         before looking at owner field.
7255         (elf32_arm_to_thumb_stub): Ditto.
7256         (elf32_arm_relocate_section): Compute name before calling
7257         elf32_arm_final_link_relocate().
7258
7259 Thu Aug 20 11:30:17 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7260
7261         * elf.c: comment and formatting cleanups.
7262         * elfcore.h: ditto.
7263
7264 Wed Aug 19 15:43:26 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7265
7266         * elfcode.h (elf_object_p): Reject files of header type ET_CORE
7267         (core files are treated differently than object files).
7268         * elf-bfd.h (_bfd_elf_write_corefile_contents,
7269         bfd_elf_mkcorefile): declare.
7270         * elfxx-target.h (_bfd_elf_write_corefile_contents,
7271         bfd_elf_mkcorefile): add to bfd_target vector.
7272         * elfcore.h (elf_core_file_p): save the program header table,
7273         and set the bfd architecture from the elf file header.
7274         * elf.c (bfd_elf_mkcorefile): new function.
7275         (_bfd_elf_write_corefile_contents): new function.
7276         (assign_file_positions_for_segments): add cases for handling
7277         PT_NOTE segments.  (assign_file_positions_except_relocs):
7278         core files should be handled the same as exec files.
7279         (prep_headers): identify core files as type ET_CORE.
7280         (copy_private_bfd_data): identify the sections belonging to
7281         the PT_NOTE segment.
7282
7283         * elf32-sparc.c (elf32_sparc_final_write_processing):
7284         add break statement to default case.
7285
7286 1998-08-19  Vladimir N. Makarov  <vmakarov@cygnus.com>
7287
7288         * elf32-ppc.c (ppc_elf_relocate_section): Check that output
7289         section (not input) will be in sections ".sbss", ".sbss2",
7290         ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
7291         R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA.  In all these cases also ignore
7292         output_offset for correct evaluation of addend.
7293
7294 Tue Aug 18 11:48:12 1998  Catherine Moore  <clm@cygnus.com>
7295
7296         * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
7297         elf32_arm_allocate_interworking_sections and
7298         elf32_arm_process_before_allocation.
7299
7300 Tue Aug 18 11:46:00 1998  Nick Clifton  <nickc@cygnus.com>
7301
7302         * bfd-in.h: Ammend prototype for
7303         elf32_arm_process_before_allocation to remove surplus third
7304         argument.
7305
7306         * bfd-in2.h: Regenerate.
7307
7308 Sat Aug 15 20:55:08 1998  Richard Henderson  <rth@cygnus.com>
7309
7310         * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
7311
7312 Fri Aug 14 09:12:28 1998  Stan Cox  <scox@cygnus.com>
7313
7314         * aoutx.h (aout_link_input_section_ext): Use the relocation already
7315         calculated for RELOC_SPARC_REV32 case.
7316
7317 Thu Aug 13 14:02:02 1998  Catherine Moore  <clm@cygnus.com>
7318
7319         * bfd-in.h:  Add prototypes for elf32_arm_get_bfd_for_interworking,
7320         elf32_arm_allocate_interworking_sections and
7321         elf32_arm_process_before_allocation.
7322         * bfd-in2.h:  Regenerated.
7323         * elf32-arm.c Define elf32_arm_link_hash_table.
7324         (insert_thumb_branch): New routine.
7325         (find_thumb_glue): New routine.
7326         (find_arm_glue): New routine.
7327         (record_arm_to_thumb_glue): New routine.
7328         (record_thumb_to_arm_glue): New routine.
7329         (elf32_arm_link_hash_table_create): New routine.
7330         (elf32_arm_get_bfd_for_interworking): New routine.
7331         (elf32_arm_allocate_interworking_sections) New routine.
7332         (elf32_arm_process_before_allocation) New routine.
7333         (elf32_thumb_to_arm_stub): New routine.
7334         (elf32_arm_to_thumb_stub): New routine.
7335         (elf32_print_private_bfd_data): Fix typo.
7336         (elf32_arm_final_link_relocate):  Add argument sym_sec.
7337         Check for branches to thumb symbols in case R_ARM_PC24.
7338         Check for branches to arm symbols in case R_ARM_THM_PC22.
7339         (elf32_arm_relocate_section):  Pass symbol section to
7340         elf32_arm_final_link_relocate.
7341
7342 Wed Aug 12 19:00:39 1998  Geoff Keating  <geoffk@ozemail.com.au>
7343
7344         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
7345         entries unless the symbol is defined in the executable; in
7346         particular, undefined weak symbols get a PLT entry.
7347
7348 Wed Aug 12 14:48:33 1998  Ian Lance Taylor  <ian@cygnus.com>
7349
7350         * libaout.h: Remove nested comment to avoid warning.
7351
7352 Wed Aug 12 08:10:11 1998 Catherine Moore  <clm@cygnus.com>
7353
7354         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7355         R_ARM_PC24 relocation.
7356
7357 Tue Aug 11 14:42:26 1998  Catherine Moore  <clm@cygnus.com>
7358
7359         * elf32-arm.c (elf32_arm_final_link_relocate):  Remove unused
7360         argument is_local.  Add argument sym_flags.  Check sym_flags
7361         in R_ARM_ABS32 case.  Include addend for R_ARM_THM_PC22 case.
7362         (elf32_arm_relocate_section):  Don't pass local sym and pass
7363         sym_flags to elf32_arm_final_link_relocate.
7364
7365 Mon Aug 10 20:38:39 1998  Richard Henderson  <rth@cygnus.com>
7366
7367         * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
7368         to not count too few relocs for dynamicly linked executables.
7369
7370 Mon Aug 10 15:35:34 1998  Richard Henderson  <rth@cygnus.com>
7371
7372         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
7373         symbols without a dynamic index dynamic.  Consider all weak
7374         symbols dynamic.
7375         (elf64_alpha_strip_section_from_output): Don't assume 1-1
7376         correspondance between input and output sections.
7377
7378 Mon Aug 10 15:31:39 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7379
7380         * elflink.h (elf_gc_common_finalize_got_offsets): For backends
7381         that use a .got.plt section start the got offset at zero.
7382
7383 Mon Aug 10 17:31:21 1998  Ian Lance Taylor  <ian@cygnus.com>
7384
7385         * ieee.c (ieee_write_processor): Correct the processor ID written
7386         out for bfd_arch_m68k, accommodating change of March 25.
7387
7388 Sun Aug  9 20:55:44 1998  Catherine Moore  <clm@cygnus.com>
7389
7390         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7391         R_ARM_THM_RPC22 relocations.
7392
7393 Sat Aug  8 15:15:30 1998  Richard Henderson  <rth@cygnus.com>
7394
7395         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
7396         are always dynamic.
7397         (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
7398         .got relocs in -Bsymbolic shared objects.
7399
7400 Wed Aug  5 15:48:08 1998  Nick Clifton  <nickc@cygnus.com>
7401
7402         * elf32-arm.c: Add private flags to ELF header.
7403         (elf32_arm_print_private_bfd_data): New Function.
7404         (elf32_arm_set_private_flags): New Function.
7405         (elf32_arm_copy_private_flags): New Function.
7406         (elf32_arm_merge_private_bfd_data): New Function.
7407
7408 Mon Aug  3 17:10:15 1998  Ian Lance Taylor  <ian@cygnus.com>
7409
7410         * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
7411         a local symbol.
7412         (elf32_sparc_relocate_section): Likewise.
7413
7414 Sun Aug  2 03:19:23 1998  Richard Henderson  <rth@cygnus.com>
7415
7416         * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL.  Create the
7417         .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
7418         (ppc_elf_relocate_section): Pull sgot and splt search to the start
7419         of the function.  Recognize no .plt as static linking.
7420
7421 1998-08-01  Ulrich Drepper  <drepper@cygnus.com>
7422
7423         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
7424         ".liblist" string through gettext.
7425
7426 Fri Jul 31 16:38:14 1998  Catherine Moore  <clm@cygnus.com>
7427
7428         * Makefile.am: Add support for elf32-arm.lo.
7429         * Makefile.in: Rebuild.
7430         * config.bfd (arm-*-elf):  Define targ_defvec and targ_selvecs.
7431         (thumb-*-elf): Define targ_defvec and targ_selvecs.
7432         * configure.in:  Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
7433         * configure: Regenerate.
7434         * elf.c: (prep_headers):  Support arch_type of EM_ARM.
7435         * targets.c:  Support new targets bfd_elf32_bigarm_vec and
7436         bfd_target bfd_elf32_littlearm_vec.
7437         * elf32-arm.c:  New file.
7438
7439 Tue Jun 28 19:05:28 1998  Stan Cox  <scox@cygnus.com>
7440
7441         * libaout.h (M_SPARCLITE_LE): New machine.
7442         * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
7443         * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
7444         (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
7445         * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
7446         (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
7447         (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
7448         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7449         elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
7450         * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
7451         be BFD_RELOC_SPARC_REV32.
7452         * reloc.c: Ditto.
7453         * config.bfd (sparc86x-*-aout): New
7454
7455 Fri Jul 24 13:54:19 1998  Nick Clifton  <nickc@cygnus.com>
7456
7457         * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
7458         actually mapping the output sections.
7459
7460 Fri Jul 24 11:24:29 1998  Jeffrey A Law  (law@cygnus.com)
7461
7462
7463         * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
7464         (mn10300_elf_reloc_map): Similarly.
7465         (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
7466
7467 Fri Jul 24 12:36:04 1998  Ian Lance Taylor  <ian@cygnus.com>
7468
7469         * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
7470         Irix 6.
7471         (bfd_elf32_bfd_reloc_type_lookup): Add default case.
7472         * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
7473         elf_mips_reloc_type defined in elf/mips.h.
7474
7475 1998-07-24  Ulrich Drepper  <drepper@cygnus.com>
7476
7477         * elf64-mips.c: Remove reloc_type definition completely.  It's now
7478         in elf/mips.h.
7479
7480 Thu Jul 23 13:33:19 1998  Doug Evans  <devans@canuck.cygnus.com>
7481
7482         * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
7483         as they are defined in elf/mips.h now.
7484
7485 Thu Jul 23 11:29:43 1998  Jeffrey A Law  (law@cygnus.com)
7486
7487
7488         * Re-add lost change:
7489         * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
7490         "movm_stack_size".
7491         (mn10300_elf_relax_section): Include stack space for register saves
7492         in the imm8 field of a "call" instruction.
7493         (compute_function_info): Determine how much stack is allocated by
7494         the movm instruction.  Fix typo.
7495         (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
7496
7497 Thu Jul 23 11:38:05 1998  Ian Lance Taylor  <ian@cygnus.com>
7498
7499         * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
7500         * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
7501
7502 1998-07-22  Ulrich Drepper  <drepper@cygnus.com>
7503
7504         * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
7505
7506 Wed Jul 22 16:27:18 1998  Nick Clifton  <nickc@cygnus.com>
7507
7508         * elf32-hppa.h: Let ELF header define the enum containing the
7509         external reloc numbers.
7510         * elf32-i386.h: Likewise.
7511
7512 1998-07-22 14:57  Ulrich Drepper  <drepper@cygnus.com>
7513
7514         * elf-m10300.c: Let ELF header now define the macros to get the enum.
7515         * elf32-mips.c: Likewise.
7516         * elf32-ppc.c: Likewise.
7517
7518 Wed Jul 22 13:53:52 1998  Nick Clifton  <nickc@cygnus.com>
7519
7520         * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
7521         bfd_coff_set_symbol_class(), in order to avoid K&R compatability
7522         prblems.
7523         * bfd-in.h: Regenerate.
7524         * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
7525         parameter to 'unsigned int' to avoid K&R compatability problems.
7526
7527 Wed Jul 22 16:43:24 1998  Ian Lance Taylor  <ian@cygnus.com>
7528
7529         * ieee.c (ieee_find_nearest_line): Change filename_ptr and
7530         functionname_ptr to be const.  Change line_ptr to be unsigned.
7531
7532         * coffcode.h (coff_link_output_has_begun): Simplify handling when
7533         macro is not defined.  Change second parameter from bfd_link_info
7534         to coff_final_link_info.  Add prototype.
7535         (coff_final_link_postscript): Simplify handling when macro is not
7536         defined.  Add prototype.
7537
7538 1998-07-22 13:08  Ulrich Drepper  <drepper@cygnus.com>
7539
7540         * elf-mn10300.c: Before include system specific ELF header define
7541         START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
7542         * elf32-mips.c: Likewise.
7543         * elf32-ppc.c: Likewise.
7544
7545 Wed Jul 22 13:46:51 1998  Ian Lance Taylor  <ian@cygnus.com>
7546
7547         * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
7548         temporary patch over to elf64-mips.c as well.
7549
7550 1998-07-21  Ulrich Drepper  <drepper@cygnus.com>
7551
7552         * elf32-mips.c (reloc_type): Temporarily disable definition of
7553         standard relocation since they are now defined in elf/mips.h.
7554
7555 Tue Jul 21 09:47:00 1998  Catherine Moore  <clm@cygnus.com>
7556
7557         * elf-m10200.c (mn10200_elf_final_link_relocate):
7558         Modify range test for case R_MN10200_8.
7559
7560         * elf-m10300.c (mn10300_elf_final_link_relocate):
7561         Modify range test for case R_MN10300_8.
7562
7563 Mon Jul 20 18:50:54 1998  Richard Henderson  <rth@cygnus.com>
7564
7565         * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
7566         * elf32-i386.c (elf_backend_got_header_size): Define.
7567         (elf_backend_plt_header_size): Define.
7568         * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
7569         * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
7570         * elfxx-target.h: Provide a default of zero.
7571         * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
7572         * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
7573
7574         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
7575         entry from an executable, even if the plt refcount goes to 0.
7576
7577 Mon Jul 20 12:47:26 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7578
7579         * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
7580         directory name at the line number.
7581
7582         * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
7583         with an unspecified type.
7584
7585 Wed Jul 15 11:20:01 1998  Ian Lance Taylor  <ian@cygnus.com>
7586
7587         * sunos.c: Add undef of valid to avoid problem on SunOS.
7588
7589 Tue Jul 14 15:30:59 1998  Richard Henderson  <rth@cygnus.com>
7590
7591         * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
7592
7593 Tue Jul 14 11:22:21 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7594
7595         * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
7596         R_68K_PCxx and R_68K_xx relocations.  Make sure that
7597         ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
7598         (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
7599         R_68K_xx relocations.
7600         (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
7601         that has no plt entry.
7602         (elf_m68k_relocate_section): Ignore the plt offset in a static
7603         link.
7604         * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
7605         an ignored symbol.
7606         (elf_gc_common_finalize_got_offsets): Set the got offsets also in
7607         a static link.
7608
7609         * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
7610         types.
7611         (howto_table, reloc_map): Add entries for them.
7612         (elf_m68k_check_relocs): Handle them.  Implement reference
7613         counting for got and plt entries.
7614         (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
7615         (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
7616         symbols.
7617         (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
7618         (elf_m68k_relocate_section): Handle the new reloc types.
7619         (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
7620         elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
7621         * elflink.h (elf_link_add_object_symbols): When creating an
7622         indirect reference for symbol versioning also copy the plt
7623         offset.
7624         (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
7625         flag also reset the plt offset.
7626         (elf_link_assign_sym_version): Likewise.
7627         (elf_gc_common_finalize_got_offsets): Increment the got offset by
7628         the size of the entry in bytes.
7629         (elf_gc_allocate_got_offsets): Likewise.
7630
7631 Tue Jul 14 11:18:14 1998  Ian Lance Taylor  <ian@cygnus.com>
7632
7633         * elflink.h (elf_gc_sections): Return true rather than falling off
7634         the bottom.
7635
7636         * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
7637         xmalloc.
7638
7639 Mon Jul 13 11:06:31 1998  Nick Clifton  <nickc@cygnus.com>
7640
7641         * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
7642         comment describing when it should be enabled.
7643         Changed definition of USER_LABEL_PREFIX to "", to fall into line
7644         with GCC sources.
7645
7646 Mon Jul 13 13:06:54 1998  Ian Lance Taylor  <ian@cygnus.com>
7647
7648         * ieee.c (ieee_slurp_external_symbols): Handle call optimization
7649         information ATN records.
7650
7651 Fri Jul 10 16:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
7652
7653         * ieee.c (ieee_slurp_external_symbols): Select an appropriate
7654         section for an absolute symbol in a fully linked file.  Based on
7655         patch from Christian Holland <CHolland@de.lucent.com>.
7656
7657 Wed Jul  8 11:29:56 1998  Manfred Hollstein  <manfred@s-direktnet.de>
7658
7659         * coff-m88k.c (m88k_special_reloc): Don't lose the information
7660         that a symbol is undefined.
7661
7662 Tue Jul  7 21:47:02 1998  Jeffrey A Law  (law@cygnus.com)
7663
7664         * som.c (som_bfd_gc_sections): Define.
7665
7666 Mon Jul  6 11:35:50 1998  Nick Clifton  <nickc@cygnus.com>
7667
7668         * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
7669         overflows in ARM_26D patches, since they have already been
7670         implmented.  Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
7671
7672 Sat Jul  4 12:25:36 1998  Ian Lance Taylor  <ian@cygnus.com>
7673
7674         * coffcode.h (coff_write_object_contents): If we have any long
7675         section names, call coff_write_symbols even if there are no
7676         symbols.
7677
7678 Fri Jul  3 13:11:35 1998  Ian Lance Taylor  <ian@cygnus.com>
7679
7680         * elf.c (copy_private_bfd_data): Only set phdr_included once for a
7681         PT_LOAD segment, rather than only setting it once for the entire
7682         file.
7683
7684         * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
7685         rather than ignoring every phdr with a p_paddr of 0, ignore all
7686         the phdrs if they all have a p_paddr of 0.
7687
7688         * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
7689         section was discarded from the link.
7690
7691 Fri Jul  3 14:39:05 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
7692
7693         * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
7694
7695 Fri Jul  3 14:35:48 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
7696
7697         * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
7698         floating point operations.
7699
7700 Thu Jul  2 18:37:25 1998  Ian Lance Taylor  <ian@cygnus.com>
7701
7702         * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
7703         function symbols.
7704
7705 Thu Jul  2 14:59:42 1998  Klaus Kaempf  <kkaempf@rmi.de>
7706
7707         Merge of vax/vms (read-only) support
7708         * configure.com: Support Vax target.
7709         * makefile.vms: Support Vax target.
7710         * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
7711         * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
7712         support.
7713         * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
7714         support.
7715         * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
7716         support.
7717         * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
7718         support.
7719         * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
7720         support.
7721         * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
7722         * targets.c (bfd_target_ovax_flavour): New flavour.
7723         (vms_alpha_vec): Renamed from evax_alpha_vec.
7724         (vms_vax_vec): New.
7725         (target_vector): Update accordingly.
7726         * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
7727         evax_alpha_vec.
7728         (vax*-*-*vms*): New target.
7729         * Makefile.am: Update for renamed files.  Rebuild dependencies.
7730         * bfd-in2.h: Rebuild.
7731         * configure.in, Makefile.in, aclocal.m4: Rebuild.
7732
7733 Thu Jul  2 13:31:55 1998  Ian Lance Taylor  <ian@cygnus.com>
7734
7735         Based on patch from Matt Semersky <matts@scd.hp.com>:
7736         * linker.c (_bfd_generic_final_link): Force a trailing NULL
7737         pointer on abfd->outsymbols.
7738         (generic_add_output_symbol): Handle NULL sym parameter.
7739
7740 Wed Jul  1 17:05:53 1998  Nick Clifton  <nickc@cygnus.com>
7741
7742         * elf.c (copy_private_bfd_data): Add support for changing VMA or
7743         LMA of sections.
7744
7745 Wed Jul  1 16:58:50 1998  Ian Lance Taylor  <ian@cygnus.com>
7746
7747         * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
7748         when handling 32 bit immediate relocs.
7749         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
7750
7751 Tue Jun 30 09:55:03 1998  Jeffrey A Law  (law@cygnus.com)
7752
7753         * section.c (STD_SECTION): Account for recently added gc_mark
7754         field in struct asection.
7755
7756         * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
7757         (bfd_elf32_bfd_merge_private_bfd_data): Define.
7758
7759 Thu Jun 25 18:31:41 1998  Richard Henderson  <rth@cygnus.com>
7760
7761         ELF Section-level Garbage Collection:
7762         * bfd.c (bfd_gc_sections): New.
7763         * aout-adobe.c: Hook to default implementation.
7764         * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
7765         * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
7766         * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
7767         * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
7768         * tekhex.c, versados.c: Likewise.
7769         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
7770         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
7771
7772         * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
7773         (bfd_generic_gc_sections): New.
7774         * section.c (SEC_KEEP): New.
7775         (asection): Add gc_mark member.
7776
7777         * elfcode.h (elf_gc*): New name remappings.
7778         * elflink.h (elf_link_input_bfd): Don't set contents on stabs
7779         sections to be excluded.
7780         (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
7781         (elf_gc_propogate_vtable_entries_used): New.
7782         (elf_gc_smash_unused_vtentry_relocs): New.
7783         (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
7784         (elf_gc_common_finalize_got_offsets): New.
7785         (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
7786         * elfxx-target.h: Add and default gc hooks.
7787
7788         * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
7789         for unions.
7790         (struct elf_obj_tdata): Likewise for local_got_offsets.
7791         * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
7792         * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
7793         * elf64-sparc.c, elflink.h: Likewise.
7794
7795         * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
7796         (ELF_LINK_HASH_MARK): Define.
7797         (struct elf_backend_data): Add GC hooks.
7798         * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
7799
7800         * elf-m10300.c (mn10300_elf_check_relocs): New.
7801         (mn10300_elf_gc_mark_hook): New.
7802         (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
7803         (elf_mn10300_howto, mn10300_reloc_map): Handle them.
7804         (mn10300_elf_final_link_relocate): Likewise.
7805         (mn10300_elf_relocate_section): Likewise.
7806         (elf_backend_can_gc_sections): Define.
7807         * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
7808         (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
7809         (bfd_elf32_bfd_reloc_type_lookup): Handle them.
7810         (mips_info_to_howto_rel): Likewise.
7811         (mips_elf_relocate_section): Likewise.
7812         (mips_elf_check_relocs): Likewise.
7813         (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
7814         (elf_backend_can_gc_sections): Define.
7815         * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
7816         (ppc_elf_howto_raw): Handle them.
7817         (ppc_elf_reloc_type_lookup): Likewise.
7818         (ppc_elf_relocate_section): Likewise.
7819         (ppc_elf_check_relocs): Reference count .got and .plt entries.
7820         Handle new vtable relocs.
7821         (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
7822         (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
7823         (elf_backend_can_gc_sections): Define.
7824
7825 Fri Jun 26 10:48:23 1998  Jeffrey A Law  (law@cygnus.com)
7826
7827         * archures.c (bfd_mach_mn10300): Define.
7828         * elf-m10300.c: Include elf/mn10300.h
7829         (elf_mn10300_mach): New function.
7830         (_bfd_mn10300_elf_final_write_processing): Likewise.
7831         (_bfd_mn10300_elf_object_p): Likewise.
7832         (elf_backendfinal_write_processing): Define.
7833         (elf_backend_object_p): Likewise.
7834
7835 Thu Jun 25 18:31:08 1998  Nick Clifton  <nickc@cygnus.com>
7836
7837         * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
7838         relocation.
7839
7840 Wed Jun 24 17:17:57 1998  Ian Lance Taylor  <ian@cygnus.com>
7841
7842         * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
7843         link_next field, not the next field.
7844
7845 Sun Jun 21 19:38:39 1998  Ian Lance Taylor  <ian@cygnus.com>
7846
7847         * elf.c (map_sections_to_segments): Check the section address
7848         against the phdr size both with and without a modulo of
7849         maxpagesize.
7850
7851 Fri Jun 19 17:08:18 1998  Ian Lance Taylor  <ian@cygnus.com>
7852
7853         * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
7854         linker created empty input section if the output section has the
7855         same name.
7856
7857         * elflink.h (elf_link_output_extsym): Print an error message if
7858         _bfd_elf_section_from_bfd_section fails.
7859
7860         * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
7861         failure.
7862
7863 Tue Jun 16 11:55:55 1998  Ian Lance Taylor  <ian@cygnus.com>
7864
7865         * elf.c (copy_private_bfd_data): Improve handling of Solaris
7866         native linker output.  Avoid putting an empty section in more than
7867         one segment.
7868
7869 Fri Jun 12 13:30:17 1998  Tom Tromey  <tromey@cygnus.com>
7870
7871         * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
7872         ($(PACKAGE).pot): Unconditionally depend on POTFILES.
7873
7874 Fri Jun 12 13:34:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7875
7876         * elf.c (swap_out_syms): New arg relocatable_p.
7877         Don't add section VMA to symbols for relocatable output.
7878         (_bfd_elf_compute_section_file_positions): Update call to
7879         swap_out_syms.
7880
7881 Mon Jun  8 15:20:57 1998  Nick Clifton  <nickc@cygnus.com>
7882
7883         * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
7884         against 'addend' be signed rather than unsigned.
7885
7886 Sat Jun  6 00:31:21 1998  Nick Clifton  <nickc@cygnus.com>
7887
7888         * elf32-m32r.c: Add prototyps for static functions.
7889
7890         * coff-arm.c: Add prototypes for static functions.
7891
7892 Fri Jun  5 17:21:51 1998  Nick Clifton  <nickc@cygnus.com>
7893
7894         * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
7895         LMA is used to order sections in a segment.
7896
7897         * elf32-v850.c: Add prototypes for static functions.
7898         Change type of addend parameter to bfd_vma in various functions.
7899
7900 Fri Jun  5 18:09:58 1998  Ian Lance Taylor  <ian@cygnus.com>
7901
7902         * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
7903         complain_overflow_signed instead of complain_overflow_bitfield.
7904
7905 Fri Jun  5 15:11:11 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7906
7907         * elf.c (elf_map_symbols): Don't add section VMA to symbol value
7908         when comparing against 0.
7909
7910 Wed Jun  3 17:52:49 1998  Ian Lance Taylor  <ian@cygnus.com>
7911
7912         * Makefile.am (config.status): New target.
7913         * Makefile.in: Rebuild.
7914
7915 Wed Jun  3 12:18:24 1998  Stan Cox  <scox@equinox.cygnus.com>
7916
7917         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
7918         error if previous object endianness doesn't match current object.
7919
7920 Tue Jun  2 17:50:59 1998  Nick Clifton  <nickc@cygnus.com>
7921
7922         * elf32-v850.c (v850_elf_print_private_bfd_data): Call
7923         _bfd_elf_print_private)bfd_data ().
7924
7925 Tue Jun  2 15:29:35 1998  Ian Lance Taylor  <ian@cygnus.com>
7926
7927         * elflink.h (elf_merge_symbol): Don't always set type_change_ok
7928         and size_change_ok.
7929         (elf_link_add_object_symbols): Set type_change_ok and
7930         size_change_ok before calling elf_merge_symbol.
7931
7932         * elf32-mips.c (mips_elf_relocate_section): If we issue an
7933         undefined symbol error, don't also issue an overflow error.
7934
7935 Tue Jun  2 13:51:00 1998  Geoff Keating  <geoffk@ozemail.com.au>
7936
7937         * elf32-ppc.c (ppc_elf_relocate_section): The target of an
7938         R_PPC_LOCAL24PC relocation should be local; if not, print an error
7939         message instead of crashing.
7940
7941 Mon Jun  1 18:23:12 1998  Yuli Barcohen  <yuli.barcohen@telrad.co.il>
7942
7943         * archures.c (bfd_mach_cpu32): Define.
7944         (bfd_default_scan): Add case for 68060.  Fix 68332 case to use
7945         bfd_mach_cpu32.
7946         * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
7947         * ieee.c: Include <ctype.h>.
7948         (ieee_object_p): Parse out process ID string to make it more
7949         likely to be acceptable for bfd_scan_arch.
7950         * bfd-in2.h: Rebuild.
7951
7952 Mon Jun  1 11:12:02 1998  Nick Clifton  <nickc@cygnus.com>
7953
7954         * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
7955         _bfd_elf_print_private_bfd_data() so that the program header will
7956         be displayed.
7957
7958 Mon Jun  1 12:14:28 1998  Ian Lance Taylor  <ian@cygnus.com>
7959
7960         * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
7961         0x68.  Reindent.  Add some comments.
7962
7963 Fri May 29 09:58:08 1998  Nick Clifton  <nickc@cygnus.com>
7964
7965         * elf.c (copy_private_bfd_data): Adjust physical address of
7966         segment in output BFD to contain LMAs of its sections.
7967
7968 Tue May 26 19:37:47 1998  Stan Cox  <scox@equinox.cygnus.com>
7969
7970         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7971         elf32_sparc_relocate_section): Added R_SPARC_32LE for little
7972         endian data 32 bit relocations.
7973         (elf32_sparc_merge_private_bfd_data): Check if linking little
7974         endian objects with big endian objects.
7975         (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
7976         (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
7977         * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
7978         * reloc.c: Same.
7979         * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
7980         * archures.c (bfd_mach_sparc_sparclite_le): New.
7981         * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
7982
7983 Thu May 21 16:59:28 1998  Nick Clifton  <nickc@cygnus.com>
7984
7985         * peicode.h (add_data_entry): Fix precedence of operators in if ()
7986         statement.
7987
7988 Tue May 19 18:41:19 1998  Ian Lance Taylor  <ian@cygnus.com>
7989
7990         * bfd-in.h: Move over patch to bfd-in2.h.
7991
7992         * reloc.c (bfd_check_overflow): Add casts before shifts which may
7993         not fit in 32 bits.
7994         (_bfd_relocate_contents): Likewise.
7995
7996 Mon May 18 14:44:15 1998  Nick Clifton  <nickc@cygnus.com>
7997
7998         * peicode.h (add_data_entry): If the section has no private data
7999         then do not create a Data Dictionary entry for it.
8000
8001 Mon May 18 00:09:28 1998  Richard Henderson  <rth@cygnus.com>
8002
8003         * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
8004         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
8005         elf64_alpha_size_got_sections): Rewrite, handling multiple got
8006         subsections during relaxation more correctly.
8007
8008 Thu May 14 14:22:58 1998  Nick Clifton  <nickc@cygnus.com>
8009
8010         * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
8011         Add extra argument to bfd_arm_process_before_allocation ().
8012         * bfd-in.h: Reflect changes made in bfd-in2.h.
8013         * coffgen.c (bfd_coff_set_symbol_class): New function.  Set the
8014         coff class of a BFD symbol.
8015         * coff-arm.c: Add support for interworking between Thumb code and
8016         non-interworking aware ARM code.
8017
8018 Sun May 10 22:33:59 1998  Jeffrey A Law  (law@cygnus.com)
8019
8020         * po/Make-in (install-info): New target.
8021
8022 Thu May  7 17:40:56 1998  Ian Lance Taylor  <ian@cygnus.com>
8023
8024         * filemode.c: Remove; not used.
8025
8026         If sysdep.h includes a header file, don't include it again:
8027         * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
8028         <errno.h>.
8029         * aoutx.h: Don't include <string.h>.  Use "sysdep.h" rather than
8030         <sysdep.h>.
8031         * archive.c: Don't include <string.h> or <errno.h>.
8032         * evax-alpha.c; Don't include <stdio.h>.
8033         * evax-egsd.c: Likewise.
8034         * evax-etir.c: Likewise.
8035         * evax-misc.c: Likewise.
8036         * evax-emh.c: Likewise.  Also, don't include <sys/types.h>.
8037         * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
8038         <errno.h>.
8039         * hpux-core.c: Likewise.
8040         * netbsd-core.c: Likewise.
8041         * som.c: Likewise.
8042         * libbfd.c: Don't include <sys/types.h>.
8043         * nlmcode.h: Don't include <string.h>.
8044         * osf-core.c: Don't include <string.h> or <stdio.h>.
8045         * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
8046         <errno.h>, or <unistd.h>.
8047         * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
8048
8049 Thu May  7 13:12:50 1998  Klaus Kaempf  <kkaempf@progis.de>
8050
8051         * configure.com: If the version number can not be found in
8052         configure.in, set it to "unknown" rather than "2.8.1".
8053
8054 Wed May  6 09:46:05 1998  Gavin Koch  <gavin@cygnus.com>
8055
8056         * elf32-mips.c (elf_mips_mach): New.
8057         (_bfd_mips_elf_object_p): Use elf_mips_mach.
8058         (_bfd_mips_elf_final_write_processing): Use the names
8059         of machines, rather than the numbers.  Set both the ARCH
8060         and MACH in e_flags.  Handle a few more specific machines.
8061         (_bfd_mips_elf_merge_private_bfd_data): Merge both
8062         EF_MIPS_ARCH and EF_MIPS_MACH.
8063
8064 Tue May  5 21:01:53 1998  Richard Henderson  <rth@cygnus.com>
8065
8066         * syms.c (bfd_is_local_label): Revert last change.
8067         * srec.c (srec_write_symbols): Discard debugging symbols.
8068
8069 Tue May  5 23:36:06 1998  Ian Lance Taylor  <ian@cygnus.com>
8070
8071         * som.c: Include <ctype.h>.
8072         * som.h: Don't include sysdep.h.
8073
8074 Tue May  5 18:29:24 1998  Tom Tromey  <tromey@cygnus.com>
8075
8076         * libbfd.h: Rebuilt.
8077         * libbfd-in.h: Removed gettext includes and defines.
8078         * sysdep.h: Moved gettext-related includes and defines here.
8079
8080 Tue May  5 16:47:54 1998  Richard Henderson  <rth@cygnus.com>
8081
8082         * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
8083         an ad-hoc test.  Kill bogus #if 0 code.
8084         * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
8085
8086 Mon May  4 16:10:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8087
8088         * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
8089         when generating a normal executable for a symbol defined in a
8090         regular file.  When copying a reloc into the output file, adjust
8091         the addend for a PC relative reloc against a global symbol.
8092
8093 Mon May  4 10:08:18 1998  Tom Tromey  <tromey@cygnus.com>
8094
8095         * libbfd.h: Rebuilt.
8096         * libbfd-in.h (_): Define as dgettext.
8097
8098 Mon May  4 11:02:23 1998  Ian Lance Taylor  <ian@cygnus.com>
8099
8100         * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
8101         not signed.
8102         * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
8103         when declaring parameter types.
8104         (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
8105
8106 Wed Apr 29 15:35:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8107
8108         * config.bfd: If we include any ELF targets in targ_defvec and/or
8109         targ_selvecs, then add the generic ELF targets to targ_selvecs.
8110         * elf32-gen.c (dummy): New static const variable.
8111         (elf_generic_info_to_howto): New static function.
8112         (elf_generic_info_to_howto_rel): New static function.
8113         (elf_info_to_howto): Define as elf_generic_info_to_howto.
8114         (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
8115         * elf64-gen.c: Same changes as elf32-gen.c.
8116         * elfcode.h (elf_object_p): For the generic target, ignore a
8117         failure of bfd_default_set_arch_mach.  Fix indentation a bit.
8118
8119 Tue Apr 28 20:05:52 1998  Ian Lance Taylor  <ian@cygnus.com>
8120
8121         * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
8122         * configure: Rebuild.
8123
8124 Tue Apr 28 12:16:57 1998  Jason Molenda  (crash@bugshack.cygnus.com)
8125
8126         * config.bfd:  Update OSR5/Unixware patterns.
8127
8128 Mon Apr 27 18:02:24 1998  Richard Henderson  <rth@cygnus.com>
8129
8130         * elf.c (assign_file_positions_for_segments): Allow for holes
8131         between sections added by a link script.
8132
8133 Mon Apr 27 11:49:55 1998  Ian Lance Taylor  <ian@cygnus.com>
8134
8135         * configure.in: Change version number to 2.9.4
8136         * configure: Rebuild.
8137
8138         Based on patch from H.J. Lu <hjl@gnu.org>:
8139         * elf.c (bfd_elf_get_bfd_needed_list): New function.
8140         * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
8141         * bfd-in2.h: Rebuild.
8142
8143 Sat Apr 25 20:07:53 1998  Richard Henderson  <rth@cygnus.com>
8144
8145         * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
8146         Change all users.
8147
8148 Sat Apr 25 18:29:07 1998  Richard Henderson  <rth@cygnus.com>
8149
8150         * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
8151         (elf64_alpha_relax_section): Fill them in.
8152         (elf64_alpha_relax_opt_call): Implement more than a stub.
8153         (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
8154         alignment on .scommon.
8155         (elf64_alpha_merge_gots): Merge use counts as well.
8156
8157 Sat Apr 25 14:07:29 1998  Richard Henderson  <rth@cygnus.com>
8158
8159         * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
8160         for calculating a local symbol's address.
8161         (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
8162         Set the .got's cooked size as well as the raw size.
8163
8164 Fri Apr 24 09:16:00 1998  Nick Clifton  <nickc@cygnus.com>
8165
8166         * elf32-v850.c (v850_elf_print_private_bfd_data): Add
8167         internationalisation of printed information.
8168
8169         * coff-arm.c (coff_arm_print_private_bfd_data): Add
8170         internationalisation of printed information.
8171
8172 Fri Apr 24 12:09:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8173
8174         * syms.c (struct indexentry): Change directory_name, file_name,
8175         and function_name fields to char *.
8176         (struct stab_find_info): Change cached_file_name field to char *.
8177
8178 Thu Apr 23 08:13:04 1998  Nick Clifton  <nickc@cygnus.com>
8179
8180         * peicode.h (dir_names): Add missing N_() macros to dir_names array.
8181
8182 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8183
8184         * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
8185
8186 Wed Apr 22 17:48:48 1998  Ian Lance Taylor  <ian@cygnus.com>
8187
8188         * Makefile.am (install-data-local): Make $(includedir).
8189         * Makefile.in: Rebuild.
8190
8191 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8192
8193         * libbfd-in.h: Use `gettext' and not `dgettext' for now.
8194
8195 Wed Apr 22 12:53:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8196
8197         * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
8198         * Makefile.in: Rebuild.
8199
8200         * bfd-in2.h: Rebuild for Nick's changes.
8201
8202 Tue Apr 21 23:11:51 1998  Richard Henderson  <rth@cygnus.com>
8203
8204         * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
8205         change wrt length == max_namelen.
8206
8207 Tue Apr 21 21:19:36 1998  Tom Tromey  <tromey@scribbles.cygnus.com>
8208
8209         * Many files: Added gettext invocations around user-visible
8210         strings.
8211         * libbfd-in.h: Added gettext includes and defines.
8212         * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
8213         HAVE_LC_MESSAGES): Define.
8214         * configure.in: Call CY_GNU_GETTEXT.  Create po/Makefile.in and
8215         po/Makefile.
8216         * Makefile.am (SUBDIRS): Added po.
8217         (POTFILES): New macro.
8218         (po/POTFILES.in): New target.
8219         (SOURCE_HFILES): New macro.
8220         (HFILES): Use it.
8221         * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
8222
8223 Tue Apr 21 13:38:18 1998 Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8224
8225         * elfcore.h (bfd_prstatus):  Copy core_prstatus from the first
8226         NT_PRSTATUS note section encountered, it contains the status of
8227         the currently executing thread when the core file was written.
8228
8229 Tue Apr 21 10:00:12 1998  Nick Clifton  <nickc@cygnus.com>
8230
8231         * libcoff.h: Add extra parameter to
8232         bfd_coff_link_output_has_begun overrideable function.
8233         * cofflink.c: Pass extra parameter to
8234         bfd_coff_link_output_has_begun function.
8235         * bfd-in.h: Add prototypes for exported ARM interworking
8236         functions.
8237         * peicode.h: ARM specific code reorganised to conform to BFD
8238         coding conventions.
8239         * coffcode.h: ARM specific code reorganised to conform to BFD
8240         coding conventions.
8241         * coff-arm.c: Code reorganised to conform to the BFD coding
8242         conventions.  Global variables have been moved into an ARM
8243         specific hash table structure and a new function:
8244         bfd_arm_get_bfd_for_interworking() has been created which is
8245         called from the linker scripts.
8246
8247 Tue Apr 21 00:11:51 1998  Richard Henderson  <rth@cygnus.com>
8248
8249         * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
8250
8251         * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
8252         elf64_alpha_relax_find_reloc_ofs.  Changed all callers.
8253         (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
8254         (elf64_alpha_size_got_sections): Don't merge .got sections twice.
8255
8256 Sat Apr 18 01:21:04 1998  Stan Cox  <scox@cygnus.com>
8257
8258         * config.bfd: Added sparc86x support.
8259
8260 Fri Apr 17 22:29:04 1998  Ian Lance Taylor  <ian@cygnus.com>
8261
8262         * elf32-mips.c (mips_elf_relocate_section): Do not complain about
8263         an out of range pc-relative jump/call to an undefined weak symbol.
8264
8265 Thu Apr 16 13:49:00 1998  Richard Henderson  <rth@cygnus.com>
8266
8267         * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
8268         comparisons signed.
8269
8270 Thu Apr 16 11:43:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8271
8272         * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
8273         an error other than bfd_error_system_call, set the error to
8274         bfd_error_wrong_format.
8275
8276         * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
8277         bfd_elf32_powerpcle_vec.
8278
8279         * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
8280         program segments are zero, don't set p_paddr_valid.
8281
8282 Wed Apr 15 22:15:16 1998  Richard Henderson  <rth@cygnus.com>
8283
8284         * elf64-alpha.c: Initial implementation of relaxation --
8285         (struct alpha_elf_link_hash_entry): Add use_count member.
8286         (elf64_alpha_check_relocs): Initialize and increment it.
8287         (elf64_alpha_can_merge_gots): Check it when considering merging.
8288         (elf64_alpha_merge_gots): Drop entries with zero use.
8289         (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8290         (elf64_alpha_always_size_sections): Split out got sizing ...
8291         (elf64_alpha_size_got_sections): ... here.  New function.
8292         (elf64_alpha_relax_find_reloc_ofs): New function.
8293         (elf64_alpha_relax_with_lituse): Likewise.
8294         (elf64_alpha_relax_without_lituse): Likewise.
8295         (elf64_alpha_relax_opt_call): Likewise.
8296         (elf64_alpha_relax_section): Likewise.
8297         (elf64_alpha_add_symbol_hook): Likewise.
8298         (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
8299         (elf64_alpha_relocate_section): Likewise.
8300         (bfd_elf64_bfd_relax_section): Define.
8301         (elf_backend_add_symbol_hook): Likewise.
8302
8303 Wed Apr 15 16:08:46 1998  Richard Henderson  <rth@cygnus.com>
8304
8305         * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
8306         * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
8307         (ELF_MACHINE_ALT1): New.  Set to EM_OLD_SPARC64.
8308
8309 Wed Apr 15 11:34:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8310
8311         * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
8312         * configure: Rebuild.
8313
8314 Mon Apr 13 16:46:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8315
8316         * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
8317         (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
8318         * configure.in: Define and substitute WIN32LDFLAGS and
8319         WIN32LIBADD.
8320         * aclocal.m4: Rebuild with new libtool.
8321         * configure, Makefile.in: Rebuild.
8322
8323 Fri Apr 10 13:44:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8324
8325         * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
8326         before any other symbols in the same section.
8327
8328 Wed Apr  8 14:50:23 1998  Michael Meissner  <meissner@cygnus.com>
8329
8330         * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
8331         systems.
8332
8333 Tue Apr  7 16:25:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
8334
8335         * dwarf2.c (comp_unit): Move it earlier in the source. Add
8336         addr_size.
8337         (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
8338         Use addr_size for address size, rather than sizeof(bfd_vma).
8339         (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
8340         Fix call to read_address.
8341         (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
8342         Scrap other unneeded arguments.  Fix call to read_address.
8343         (scan_unit_for_functions): Fix call to read_attribute.
8344         (parse_comp_unit): We now handle more values for addr_size.
8345         Set addr_size in unit.  Fix call to read_attribute and
8346         decode_line_info.
8347
8348 Tue Apr  7 15:44:47 1998  Gavin Romig-Koch <gavin@cygnus.com>
8349
8350         * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
8351
8352 Tue Apr  7 12:35:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8353
8354         * archures.c (bfd_default_scan): Add m68k cases back to default
8355         switch, reverting patch of March 25, since IEEE support depends
8356         upon them.
8357
8358 Mon Apr  6 14:06:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8359
8360         * Makefile.am (diststuff): New target.
8361         * Makefile.in: Rebuild.
8362
8363 Sun Apr  5 16:21:44 1998  Jeffrey A Law  (law@cygnus.com)
8364
8365         * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
8366         som_offset when we have an extended name table.
8367
8368 Sun Apr  5 16:04:39 1998  H.J. Lu  <hjl@gnu.org>
8369
8370         * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
8371         trying to copy it.
8372         * Makefile.in: Rebuild.
8373
8374 Fri Apr  3 11:09:42 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8375
8376         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
8377         symbols when creating a shared library.
8378         (elf_m68k_adjust_dynindx): New function, used by above code.
8379         (elf_m68k_finish_dynamic_sections): Initialize the section
8380         symbols.
8381         (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
8382
8383 Wed Apr  1 16:04:02 1998  Nick Clifton  <nickc@cygnus.com>
8384
8385         * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
8386         value 11.
8387
8388 Wed Apr  1 13:36:58 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8389
8390         * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
8391         assertion.
8392
8393 Tue Mar 31 00:12:12 1998  Jeffrey A Law  (law@cygnus.com)
8394
8395         * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
8396         absolute symbols.
8397
8398 Mon Mar 30 12:46:15 1998  Ian Lance Taylor  <ian@cygnus.com>
8399
8400         * configure.in: Set version to 2.9.1.
8401         * configure: Rebuild.
8402
8403         * Branched binutils 2.9.
8404
8405 Mon Mar 30 12:20:50 1998  Brent Baccala  <baccala@freesoft.org>
8406
8407         * syms.c (ENABLE_CACHING): Define.
8408         (struct indexentry): Define.
8409         (struct stab_cache): Remove.
8410         (cmpindexentry): New static function.
8411         (struct stab_find_info): Add new fields: indextable,
8412         indextablesize, cached_indexentry, cached_offset, cached_stab, and
8413         cached_file_name.  Remove fields: file_cache, function_cache, and
8414         line_cache.
8415         (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
8416         index table and search it.
8417
8418 Mon Mar 30 10:39:34 1998  Ian Lance Taylor  <ian@cygnus.com>
8419
8420         * elf.c (_bfd_elf_copy_private_section_data): Call
8421         copy_private_bfd_data once we've seen the last SEC_ALLOC section.
8422
8423         * cpu-mips.c: Remove trailing comma at end of enumeration list.
8424
8425 Sat Mar 28 16:33:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8426
8427         * coff-arm.c: Define all globally visible variables and functions
8428         only when COFF_WITH_PE is not defined.
8429         * configure.in (armpe_little_vec, armpe_big_vec): Add
8430         coff-arm.lo.
8431         * configure: Rebuild.
8432
8433 Fri Mar 27 16:06:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8434
8435         Fix some gcc -Wall warnings:
8436         * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
8437         * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
8438         * archures.c (bfd_default_scan): Likewise.
8439         * bfd.c (bfd_scan_vma): Likewise.
8440         * binary.c (mangle_name): Likewise
8441         * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
8442         * coff-sh.c (sh_relocate_section): Likewise.
8443         * coff-stgo32.c (create_go32_stub): Likewise.
8444         * coffcode.h (coff_slurp_line_table): Likewise.
8445         * ecoff.c (_bfd_ecoff_write_armap): Likewise.
8446         * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
8447         (assign_file_positions_for_segments): Likewise.
8448         * elf32-mips.c (mips_elf_relocate_section): Likewise.
8449         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
8450         * oasys.c (oasys_write_sections): Likewise.
8451         * ppcboot.c (ppcboot_object_p): Likewise.
8452         (mangle_name): Likewise.
8453         * riscix.c (riscix_fix_pcrel_26): Likewise.
8454         * srec.c (srec_scan): Likewise.
8455         * stabs.c (_bfd_write_section_stabs): Likewise.
8456         * sunos.c (sunos_add_dynamic_symbols): Likewise.
8457         * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
8458         switch.  Declare parameters for function pointers.
8459         * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
8460         warning.
8461         * elf.c (elf_sort_sections): Likewise.
8462         * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
8463         Add default cases to switches.
8464         (coff_arm_relocate_section): Remove unused local variables.
8465         Always set rstat.
8466         (coff_arm_bfd_set_private_flags): Change flag variable to type
8467         flagword.
8468         * coff-mips.c (mips_relocate_section): Initialize use_lo.
8469         * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
8470         (dump_toc): Change cat to const, and initialize it.
8471         * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
8472         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8473         (sh_elf_relocate_section): Initialize r_symndx.
8474         * coffcode.h (coff_compute_section_file_positions): Only declare
8475         old_sofar if ALIGN_SECTIONS_IN_FILE.
8476         (coff_write_object_contents): Initialize csym.
8477         * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
8478         * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
8479         switch.
8480         * dwarf2.c: Include libiberty.h.
8481         (read_2_signed_bytes, read_4_signed_bytes): Comment out.
8482         (decode_line_info): Remove unused local variables.
8483         * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
8484         (m32r_elf_relocate_section): Likewise.
8485         * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
8486         (v850_elf_reloc): Likewise.
8487         * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
8488         (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
8489         * elf.c (assign_file_positions_for_segments): Always set adjust.
8490         * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr.  Fully
8491         parenthesize expression.
8492         * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
8493         (m32r_elf_object_p): Return a value.
8494         (m32r_elf_print_private_bfd_data): Change fprintf format string.
8495         * elf32-mips.c (mips_elf_final_link): Initialize last.
8496         (mips_elf_finish_dynamic_sections): Initialize last and dindx.
8497         * elf32-v850.c (v850_elf_object_p): Return a value.
8498         (v850_elf_print_private_bfd_data): Change fprintf format string.
8499         * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
8500         unsigned long.
8501         * elflink.h (elf_link_add_object_symbols): Change vernum to
8502         unsigned int, and initialize it.  Change fprintf format string.
8503         (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
8504         when setting or comparing to soname_indx.
8505         (elf_create_pointer_linker_section): Change num_symbols to
8506         unsigned int.
8507         * libcoff-in.h (coff_data_type): Change flags to flagword.
8508         * peicode.h (pe_print_idata): Initialize idx.  Change j to
8509         bfd_size_type.  Initialize hint_member.  Remove useless test to
8510         time_stamp.
8511         (pe_print_edata): Change num_functions and num_names in struct
8512         EDT_type to unsigned long.  Remove cast.  Change fprintf format
8513         string.
8514         * ppcboot.c (ppcboot_object_p): Change i to size_t.
8515         * reloc.c (bfd_get_reloc_size): Change return type to unsigned
8516         int.
8517         * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
8518         int *.  Update uses.  Change j to long.
8519         * bfd-in2.h, libcoff.h: Rebuild.
8520
8521 Fri Mar 27 10:10:46 1998  Catherine Moore <clm@cygnus.com>
8522
8523         * elf32-v850.c Remove definition of USE_REL.
8524         (v850_elf_info_to_howto_rela): New function.
8525         (v850_elf_perform_relocation):  Renamed from
8526         v850_elf_store_addend_in_insn.  Removed replace argument.
8527         (v850_elf_reloc): store the relocation in the addend field instead
8528         of the insn.
8529         (v850_elf_final_link_relocate):  Now calls
8530         v850_elf_perform_relocation.
8531         (v850_elf_relocate_section):  Remove code to generate REL
8532         relocations.
8533
8534 Thu Mar 26 13:32:17 1998  Ian Lance Taylor  <ian@cygnus.com>
8535
8536         * coffcode.h (coff_new_section_hook): Set the type and storage
8537         class in the native symbol information allocated for a new section
8538         symbol.
8539
8540 Thu Mar 26 10:13:41 1998  Nick Clifton  <nickc@cygnus.com>
8541
8542         * peicode.h: Chain together calls to
8543         coff_bfd_copy_private_bfd_data and
8544         coff_bfd_print_private_bfd_data.
8545
8546         * coff-arm.c: Add prototypes for
8547         coff_arm_bfd_print_private_bfd_data and
8548         coff_arm_bfd_copy_private_bfd_data.
8549
8550 Wed Mar 25 15:45:55 1998  Nick Clifton  <nickc@cygnus.com>
8551
8552         * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
8553         build.
8554
8555         * peicode.h: Call arm-coff private data functions after handling
8556         pe private data.
8557
8558         * coff-arm.c: Turn statics into globals so that they can be shared
8559         both pe and pei backends.
8560
8561 Wed Mar 25 15:19:38 1998  Ian Lance Taylor  <ian@cygnus.com>
8562
8563         * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
8564         plain numbers.
8565         (sunos_write_object_contents): Likewise.
8566         * aoutx.h (NAME(aout,machine_type)): Likewise.
8567         * coffcode.h (coff_set_arch_mach_hook): Likewise.
8568
8569 Wed Mar 25 13:59:24 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8570
8571         * archures.c (bfd_mach_m68*): Add definitions for various m68k
8572         variants.
8573         (bfd_default_scan): Remove m68k special cases.
8574         * bfd-in2.h: Rebuild.
8575         * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
8576         than plain numbers.
8577         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
8578         * cpu-m68k.c (arch_info_struct): Likewise.  Add entry for
8579         m68k:68000.
8580         (bfd_m68k_arch): Set mach field to zero to signal no explicit
8581         selection, change printable_name to just "m68k" and make that the
8582         default instead of m68k:68020.
8583
8584         * aout-tic30.c (NAME): Define this to avoid multiple definitions
8585         from aoutx.h.
8586         (MY_get_section_contents): Define as aout_32_get_section_contents
8587         rather than NAME(aout,get_section_contents).
8588
8589         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
8590
8591         * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
8592         and call bfd_default_set_arch_mach to do the real work.
8593
8594 Wed Mar 25 10:41:35 1998  Richard Henderson  <rth@cygnus.com>
8595
8596         * bout.c (BALX): Include return register g14 as part of the insn.
8597         (BALX_MASK): New.
8598         (calljx_callback): Use it.
8599
8600 Wed Mar 25 11:19:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8601
8602         * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
8603         * libbfd.h: Rebuild.
8604
8605         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
8606         byte_count to unsigned int.
8607         (mn10300_elf_relax_section): Initialize internal_relocs.  Remove
8608         unused local variables.
8609
8610         * evax-alpha.c (evax_close_and_cleanup): Remove unused local
8611         variables er and er1.
8612
8613         * cpu-v850.c: Include <ctype.h>.
8614         (scan): Case isdigit argument to unsigned char.
8615
8616         From Yan Meroth <YAN.MEROTH@st.com>:
8617         * ihex.c (ihex_scan): Add extbase variable so that getting an
8618         extended linear address record does not ignore any previous
8619         extended address.
8620         (ihex_write_object_contents): When writing out an extended linear
8621         address record, zero out any previous extended address.
8622
8623 Tue Mar 24 16:09:43 1998  Manfred Hollstein  <manfred@s-direktnet.de>
8624
8625         * ieee.c (do_one): Check section before dereferencing it.
8626         (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
8627         (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
8628
8629 Mon Mar 23 18:51:47 1998  Joel Sherrill  <joel@OARcorp.com>
8630
8631         * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
8632
8633 Mon Mar 23 14:23:36 1998  Nick Clifton  <nickc@cygnus.com>
8634
8635         * coff-arm.c: Add interworking functions to pe backends.
8636
8637 Fri Mar 20 18:47:20 1998  Ian Lance Taylor  <ian@cygnus.com>
8638
8639         * configure.in: Use AM_DISABLE_SHARED.
8640         * aclocal.m4, configure: Rebuild with libtool 1.2.
8641
8642 Fri Mar 20 11:25:41 1998  Nick Clifton  <nickc@cygnus.com>
8643
8644         * coff-arm.c (coff_arm_relocate_section): Better error messages
8645         when interowrking conflucts occur.  Courtesy of Jonathan Walton
8646         and Tony Thompson.
8647         (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
8648         relocations.  Patch courtesy of Jonathan Walton and Tony
8649         Thompson.
8650
8651 Fri Mar 20 02:26:43 1998  Richard Henderson  <rth@cygnus.com>
8652
8653         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
8654         part of Feb 22 change controling when to override the existing
8655         symbol with the .plt entry.
8656
8657 Wed Mar 18 09:26:25 1998  Nick Clifton  <nickc@cygnus.com>
8658
8659         * config.bfd (targ_cpu): Add thumb-pe target.
8660
8661         * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
8662         functions in PE build.
8663
8664 Sun Mar  8 23:37:26 1998  Stan Cox  <scox@equinox.cygnus.com>
8665
8666         * config.bfd (sparclite-*-elf*): Added.
8667
8668 Mon Feb 23 19:31:19 1998  Ian Lance Taylor  <ian@cygnus.com>
8669
8670         * configure.in: Add elf.lo to elf shell variable.
8671         * Makefile.am (BFD_LIBS): Remove elf.lo.
8672         (BFD_LIBS_CFILES): Remove elf.c.
8673         (BFD32_BACKENDS): Add elf.lo.
8674         (BFD32_BACKENDS_CFILES): Add elf.c.
8675         * configure, Makefile.in: Rebuild.
8676
8677 1998-02-23 15:53  Richard Henderson  <rth@cygnus.com>
8678
8679         * elf32-i386.c (elf_i386_relocate_section): A pc-relative
8680         relocation against a non-local symbol should not have a dynamic
8681         relocation.
8682
8683 Mon Feb 23 16:17:08 1998  Ian Lance Taylor  <ian@cygnus.com>
8684
8685         * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
8686         COFF filehdr flags.
8687         (pe_print_private_bfd_data): Print PE flags.  From Mikey
8688         <jeffdb@netzone.com>.
8689
8690 Sun Feb 22 20:39:00 1998  Richard Henderson  <rth@cygnus.com>
8691
8692         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
8693         a plt entry when we can determine that we authoritatively define
8694         the symbol.
8695
8696 Sun Feb 22 20:33:05 1998  Richard Henderson  <rth@cygnus.com>
8697
8698         * configure.in (COREFILE selection): Remove sparc-*-linux*.  They
8699         don't actually use trad-core, but a SunOS-style core file handled
8700         by gdb directly.
8701         * hosts/sparclinux.h: Remove.
8702
8703 Wed Feb 18 15:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
8704
8705         * peicode.h (pe_print_idata): If there is no .idata section, look
8706         for the import tables in some other section.  Make the initial
8707         label line up better with the data.  Print the import address
8708         table even if there is no import name table.  If the import
8709         address table holds actual addresses, print them.
8710
8711 Tue Feb 17 12:58:34 1998  Ian Lance Taylor  <ian@cygnus.com>
8712
8713         * libbfd.c (bfd_seek): If fseek fails, save errno around call to
8714         bfd_tell.  If errno is EINVAL, set bfd_error_file_truncated, not
8715         bfd_error_system_call.
8716
8717 Fri Feb 13 13:11:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8718
8719         * Makefile.am (AUTOMAKE_OPTIONS): Define.
8720         * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
8721
8722         From H.J. Lu <hjl@gnu.org>:
8723         * Makefile.am (libbfd_la_LDFLAGS): Define.
8724         * Makefile.in: Rebuild.
8725
8726 Thu Feb 12 17:31:11 1998  Ian Lance Taylor  <ian@cygnus.com>
8727
8728         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8729         * netbsd.h (MACHTYPE_OK): Define.
8730         (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
8731         calling N_SET_MACHTYPE, rather than having a switch.
8732         * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
8733         and M_ALPHA_NETBSD.
8734         * i386netbsd.c (MACHTYPE_OK): Don't define.
8735         (DEFAULT_MID): Define.
8736         * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
8737         (MACHTYPE_OK): Don't define.
8738         (DEFAULT_MID): Define.
8739         * m68knetbsd.c: (MACHTYPE_OK): Don't define.
8740         (DEFAULT_MID): Define.
8741         * ns32knetbsd.c (MACHTYPE_OK): Don't define.
8742         (DEFAULT_MID): Define.
8743         * sparcnetbsd.c (MACHTYPE_OK): Don't define.
8744         (DEFAULT_MID): Define.
8745
8746         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8747         * vaxnetbsd.c: New file.
8748         * netbsd-core.c: Clean up.  Remove unused macros.  Use netbsd
8749         rather than netbsd_core.
8750         * targets.c (vaxnetbsd_vec): Declare.
8751         (bfd_target_vector): Add vaxnetbsd_vec.  If NETBSD_CORE is
8752         defined, add netbsd_core_vec.
8753         * configure.in: Set COREFILE for alpha*-*-netbsd* and
8754         powerpc-*-netbsd* to netbsd-core.lo.  If COREFILE is
8755         netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
8756         * config.bfd (alpha*-*-netbsd*): New target.
8757         * Makefile.am: Rebuild dependencies.
8758         (BFD32_BACKENDS): Add vaxnetbsd.lo.
8759         (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
8760         * configure, Makefile.in: Rebuild.
8761
8762         * configure.host: Remove the old shared library build stuff.  We
8763         now use libtool instead.
8764
8765 Wed Feb 11 17:13:09 1998  Richard Henderson  <rth@cygnus.com>
8766
8767         * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
8768
8769 Tue Feb 10 19:23:28 1998  H.J. Lu  <hjl@gnu.org>
8770
8771         * configure.in: Take stab-syms.lo out of sparclinux_vec list.
8772         * configure: Rebuild.
8773
8774 Tue Feb 10 15:16:38 1998  Nick Clifton  <nickc@cygnus.com>
8775         * elf32-v850.c (remember_hi16s_reloc): New function.
8776         (find_remembered_hi16s_reloc): New function.
8777         (v850_elf_store_addend_in_insn): Use the above new functions to
8778         match up HI6S relocs with LO16 relocs.
8779
8780 Tue Feb 10 15:01:39 1998  Ian Lance Taylor  <ian@cygnus.com>
8781
8782         * configure.in: Change -linux* to -linux-gnu*.
8783         * config.bfd, configure.host: Likewise.
8784         * configure: Rebuild.
8785
8786 Mon Feb  9 19:40:59 1998  Nick Clifton  <nickc@cygnus.com>
8787
8788         * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
8789         LO16/HI16S bug and improve comments about what is going on.
8790
8791 Sat Feb  7 15:27:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8792
8793         * configure, aclocal.m4: Rebuild with new libtool.
8794
8795 Fri Feb  6 14:48:20 1998  Nick Clifton  <nickc@cygnus.com>
8796
8797         * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
8798         when merging v850 code into v850e/v850ea code.  Do not initialise
8799         output flags if the input is the default architecture.
8800
8801 Fri Feb  6 11:50:22 1998  Jeffrey A Law  (law@cygnus.com)
8802
8803         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
8804         get the size from bfd_arch_bits_per_address instead of directly
8805         from the isa.
8806
8807 Thu Feb  5 14:21:34 1998  Michael Meissner  <meissner@cygnus.com>
8808
8809         * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
8810         to wrap, just return all 1's bits instead.
8811         * libbfd.h: Regenerate.
8812
8813 Thu Feb  5 11:51:05 1998  Ian Lance Taylor  <ian@cygnus.com>
8814
8815         * coff-i386.c (coff_pe_i386_relocate_section): New static function
8816         if COFF_WITH_PE.
8817         (coff_relocate_section): If COFF_WITH_PE, define as
8818         coff_pe_i386_relocate_section.
8819         * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
8820         skip empty sections, to match coff_write_object_contents.
8821
8822         * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
8823         rather than swapping out r_offset twice.  From Luke Deller
8824         <luked@cse.unsw.edu.au>.
8825
8826 Wed Feb  4 19:11:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8827
8828         * configure.in: Set libtool_enable_shared rather than
8829         libtool_shared.  Remove diversion hack.
8830         * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
8831         with new libtool.
8832
8833 Wed Feb  4 16:10:21 1998  Brent Baccala  <baccala@freesoft.org>
8834
8835         * syms.c (struct stab_cache): Define.
8836         (struct stab_find_info): Remove cached_offset, cached_stab,
8837         cached_str, and cached_stroff fields.  Add file_cache,
8838         function_cache, and line_cache fields.
8839         (_bfd_stab_section_find_nearest_line): Use extensive caching to
8840         speed up searches.
8841
8842 Wed Feb  4 13:34:22 1998  Ian Lance Taylor  <ian@cygnus.com>
8843
8844         * peicode.h (pe_print_idata): Check for import of ordinal rather
8845         than name.
8846         (pe_print_edata): If there is no .edata section, look for the
8847         export data in some other section.
8848
8849 Mon Feb  2 20:05:42 1998  Jason Molenda  (crash@bugshack.cygnus.com)
8850
8851         * configure.in: Change version to 2.8.4.
8852         * configure: Regenerated.
8853
8854 Mon Feb  2 17:39:39 1998  Steve Haworth  <steve@pm.cse.rmit.EDU.AU>
8855
8856         Add tms320c30 support:
8857         * cpu-tic30.c: New file.
8858         * aout-tic30.c: New file.
8859         * coff-tic30.c: New file.
8860         * archures.c (bfd_arch_tic30): Define.
8861         (bfd_tic30_arch): Declare.
8862         (bfd_archures_list): Add bfd_tic30_arch.
8863         * targets.c (bfd_target_vector): Add tic30_aout_vec and
8864         tic30_coff_vec.
8865         * reloc.c (BFD_RELOC_TIC30_LDP): Define.
8866         * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
8867         (coff_set_flags): Likewise.
8868         * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
8869         * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
8870         * Makefile.am: Rebuild dependencies.
8871         (ALL_MACHINES): Add cpu-tic30.lo.
8872         (ALL_MACHINES_CFILES): Add cpu-tic30.c.
8873         (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
8874         (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
8875         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
8876
8877 Mon Feb  2 12:25:12 1998  Nick Clifton  <nickc@cygnus.com>
8878
8879         * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
8880         to lag behind LO16 reloc by a couple of instructions.
8881
8882 Mon Feb  2 14:09:46 1998  Ian Lance Taylor  <ian@cygnus.com>
8883
8884         * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
8885         make to reexamine the file timestamp.
8886         ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
8887
8888         * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
8889         0x100000.
8890
8891 Fri Jan 30 19:07:07 1998  Geoff Keating  <geoffk@ozemail.com.au>
8892
8893         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
8894         to create .dynsbss and .rela.sbss sections.
8895         (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
8896         copied from dynamic objects into .sbss.
8897         (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
8898         use it.  Correct typo of .rela.sdata2.
8899         (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
8900         put the data, which may now be in .sbss.
8901         (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
8902         (elf_backend_create_dynamic_sections): Define as
8903         ppc_elf_create_dynamic_sections.
8904
8905         * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
8906         against _GLOBAL_OFFSET_TABLE_.
8907         (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
8908         shared libraries which refer to local symbols.  Make sure that the
8909         test for allocating space for a reloc in a shared object is the
8910         same as the test for emitting a reloc.
8911
8912 Thu Jan 29 15:55:35 1998  J.J. van der Heijden  <J.J.vanderHeijden@student.utwente.nl>
8913
8914         * config.bfd (i[3456]-*-mingw32*): New target.
8915         * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
8916         * aclocal.m4, configure: Rebuild.
8917
8918 Wed Jan 28 13:41:26 1998  Ian Lance Taylor  <ian@cygnus.com>
8919
8920         * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
8921         have a bfd_object.
8922
8923 Tue Jan 27 21:43:55 1998  Richard Henderson  <rth@cygnus.com>
8924
8925         Sparc v9 ABI compliant PLT:
8926         * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
8927         (plt_templates, sparc64_elf_build_plt_entry): Delete.
8928         (LARGE_PLT_THRESHOLD): New define.
8929         (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
8930         (sparc64_elf_build_plt): New function.
8931         (sparc64_elf_plt_entry_offset): Likewise.
8932         (sparc64_elf_plt_ptr_offset): Likewise.
8933         (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
8934         contain the index for convenience.  Skip the initial entries
8935         in .rela.plt.
8936         (sparc64_elf_size_dynamic_sections): Zero the allocated contents
8937         memory for the benefit of .rela.plt.
8938         (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
8939         (sparc64_elf_finish_dynamic_symbol): Kill template stuff.  Use
8940         sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
8941         (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
8942         Call sparc64_elf_build_plt.
8943         (elf_backend_want_got_plt): No.
8944         (elf_backend_plt_readonly): No.
8945         (elf_backend_plt_alignment): 8.
8946
8947         * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
8948         * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
8949         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
8950         to be called.
8951
8952 Tue Jan 27 21:45:15 1998  Jeffrey A Law  (law@cygnus.com)
8953
8954         * archures.c (bfd_mach_mips*): Add definitions for various MIPS
8955         processors.
8956         * cpu-mips.c (arch_info_struct): Add mips variants.
8957         * bfd-in2.h: Rebuilt.
8958
8959 Tue Jan 27 15:06:04 1998  Nick Clifton  <nickc@cygnus.com>
8960
8961         * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
8962         t2a3_b_insn.
8963
8964 Tue Jan 27 12:47:27 1998  Robert Lipe  <robertl@dgii.com>
8965
8966         * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
8967         (i[3456]86sco3.2v5*coff): New target.
8968
8969 Mon Jan 26 15:41:30 1998  Ian Lance Taylor  <ian@cygnus.com>
8970
8971         * bfd-in2.h: Rebuild with changes to chew--tab expansion.
8972
8973 Thu Jan 22 21:26:48 1998  Richard Henderson  <rth@cygnus.com>
8974
8975         * bfd.c (bfd_get_error_handler): Add orthogonal function.
8976         * bfd-in2.h: Regenerate.
8977
8978 Thu Jan 22 21:13:39 1998  Richard Henderson  <rth@cygnus.com>
8979
8980         * tekhex.c (tekhex_write_object_contents): Check for no symbols.
8981
8982 Wed Jan 21 21:19:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8983
8984         * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
8985         adjust addend for an output common symbol (from Jimmy Blair
8986         <jimmyb@wrs.com>).  If COFF_WITH_PE, adjust addend for PC relative
8987         defined symbol to counteract adjustment made in generic relocation
8988         code.
8989
8990         * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
8991
8992 Wed Jan 21 21:16:06 1998  Manfred Hollstein  <manfred@s-direktnet.de>
8993
8994         * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
8995         (GET_SCNDHR_NLNNO): Likewise.
8996
8997 Mon Jan 19 12:49:52 1998  Ian Lance Taylor  <ian@cygnus.com>
8998
8999         * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
9000
9001 Wed Jan 14 17:23:27 1998  Nick Clifton  <nickc@cygnus.com>
9002
9003         * elf32-m32r.c: Add macros to handle NOP insertion.
9004
9005 Wed Jan 14 16:15:22 1998  Richard Henderson  <rth@cygnus.com>
9006
9007         * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
9008         (xcoff_mark): Likewise.
9009         (xcoff_build_ldsyms): Mark absolute symbols.
9010
9011 Wed Jan 14 16:03:11 1998  Richard Henderson  <rth@cygnus.com>
9012
9013         * bout.c (b_out_write_object_contents): Sort symbols before output
9014         to keep {CALL,BAL}NAME symbols adjacent.
9015         (b_out_symbol_cmp): New function.
9016
9017 For older changes see ChangeLog-9697
9018 \f
9019 Local Variables:
9020 mode: change-log
9021 left-margin: 8
9022 fill-column: 74
9023 version-control: never
9024 End: