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