]> Git Repo - binutils.git/blob - bfd/ChangeLog
* remote-sim.c (gdb_os_vprintf_filtered): Fix to work with non-ANSI
[binutils.git] / bfd / ChangeLog
1 Thu Mar 20 12:39:02 1997  Ian Lance Taylor  <[email protected]>
2
3         Based on patches from Philippe De Muyter <[email protected]>.
4         * coff-svm68k.c: New file.  Just defines some macros and includes
5         coff-m68k.c.
6         * coff-m68k.c: Add functions to handle common addends, moved in
7         from cf-m68klynx.c.  Control them using COFF_COMMON_ADDEND macro.
8         Control whether relocs are visible using STATIC_RELOCS.
9         * cf-m68klynx.c: Simplify greatly: just define macros to control
10         coff-m68k.c.
11         * coff-aux.c: Likewise.  Just leave add_one_symbol routine.
12         * targets. (m68ksysvcoff_vec): Declare.
13         (bfd_target_vector): Add m68ksysvcoff_vec.
14         * config.bfd (m68*-motorola-sysv*): New target.
15         * configure.in (m68ksysvcoff_vec): New vector.
16         * configure: Rebuild.
17         * Makefile.in: Rebuild dependencies.
18         (BFD32_BACKENDS): Add coff-svm68k.o.
19         (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
20
21         * binary.c (binary_set_section_contents): Don't get misled if the
22         first section is not loadable.  From Matthew L. Martin
23         <[email protected]>.
24
25         * elflink.h (elf_bfd_final_link): Set the value of a section
26         symbol to the section address unless doing a relocateable link.
27
28 Tue Mar 18 23:03:17 1997  Richard Henderson  <[email protected]>
29
30         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
31         .plt entry if we've taken the function's address.
32         (elf64_alpha_merge_gots): Merge collected flags info as well.
33
34 Tue Mar 18 22:40:09 1997  H.J. Lu  <[email protected]>
35
36         * Many files: Add function prototypes.
37         * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
38         * ecofflink.c: Include "libcoff.h" and "libecoff.h".
39         * elf32-ppc.c (ppc_elf_fake_sections): Make static.
40         * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
41         * peicode.h: Change several void * parameters to PTR.
42         * srec.c (srec_get_symbol_info): Make static.
43         * syms.c (bfd_symbol_is_absolute): Remove.
44         * Makefile.in: Rebuild dependencies.
45
46 Tue Mar 18 12:58:08 1997  Ian Lance Taylor  <[email protected]>
47
48 start-sanitize-m32r
49         * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
50         (bfd_elf32_bfd_is_local_label): Don't define.
51
52 end-sanitize-m32r
53         * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
54         than malloc.
55
56 Mon Mar 17 11:32:53 1997  Ian Lance Taylor  <[email protected]>
57
58         * bfd-in.h: Don't include obstack.h.
59         (struct bfd_hash_table): Change memory field to PTR.
60         * bfd.c (struct _bfd): Change memory field to PTR.
61         * bfd-in2.h: Rebuild.
62         * libbfd-in.h (bfd_release): Declare as function, don't define as
63         macro.
64         * libbfd.h: Rebuild.
65         * opncls.c: Include "objalloc.h" rather than "obstack.h".  Use
66         objalloc routines rather than obstack routines.
67         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
68         (getpagesize): Don't define.
69         (_bfd_new_bfd): Don't set _bfd_chunksize.
70         (bfd_openr): Free new bfd and objalloc on failure.
71         (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
72         (bfd_alloc_size): Remove.
73         (bfd_release): New function.
74         * hash.c: Include "objalloc.h" rather than "obstack.h".  Use
75         objalloc routines rather than obstack routines.
76         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
77         * ecofflink.c: Include "objalloc.h" rather than "obstack.h".  Use
78         objalloc routines rather than obstack routines.
79         (obstack_chunk_alloc, obstack_chunk_free): Don't define.
80         (struct accumulate): Change memory to struct objalloc *.
81         * liboasys.h (oasys_data_type): Remove oasys_obstack field.
82         * dep-in.sed: Don't remove obstack.h from dependency list.
83         * Makefile.in: Rebuild dependencies.
84         (BFD_H_DEPS): Remove obstack.h.
85         (install): Don't install obstack.h.
86         * Many files: Don't include "obstack.h".
87         * VERSION: Bump.
88
89         * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
90         * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
91         * libbfd.h: Rebuild.
92         * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
93         * sunos.c (sunos_add_dynamic_symbols): Likewise.
94         * srec.c (srec_scan): Rewrite to not use obstack_1grow.
95
96         * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t.  Remove
97         old version of bfd_alloc.
98         * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
99         * libbfd.h: Rebuild.
100         * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
101
102 Sat Mar 15 15:24:18 1997  Ian Lance Taylor  <[email protected]>
103
104         * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
105         ELF local label syntax as well.
106
107 Sat Mar 15 10:16:42 1997  Fred Fish  <[email protected]>
108
109         * config.bfd (powerpc-*-beos*): New target.
110         * configure.in (powerpc-*-beos*): Add case that explicitly
111         does not set COREFILE for now.  A future BeOS version is
112         expected to support core files.
113         * configure: Regenerate with autoconf.
114
115 Fri Mar 14 16:43:22 1997  Ian Lance Taylor  <[email protected]>
116
117         * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
118         seen with a local symbol, rather than crashing.
119
120         * elfcode.h (elf_slurp_symbol_table): Don't try to read the
121         version symbols if there aren't any.
122
123 start-sanitize-tic80
124 Thu Mar 13 16:38:30 1997  Fred Fish  <[email protected]>
125
126         * coff-tic80.c (coff_rtype_to_howto): Define
127         (coff_tic80_rtype_to_howto): Clone generic coff version and
128         add code to handle the funky TI "internal relocations".
129
130 end-sanitize-tic80
131 Thu Mar 13 14:08:53 1997  Ian Lance Taylor  <[email protected]>
132
133         * elflink.h (elf_link_add_object_symbols): Don't warn about type
134         or size changes because of a weak symbol.
135
136         * cisco-core.c (SIGEMT): Define if not defined.
137
138 Wed Mar 12 21:36:05 1997  Ian Lance Taylor  <[email protected]>
139
140         * elflink.h (elf_link_add_object_symbols): Use extsymoff when
141         setting ever.  Sanity check the version number.  Sort out copying
142         flags and other information when adding an indirect symbol.
143         (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
144         symbols added by the backend.  Clear the entire contents of the
145         versym section.
146         (elf_export_symbol): Ignore indirect symbols.
147         (elf_link_output_extsym): Accept a section without an owner in an
148         assert.
149         * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
150         version count.  Correct the allocation of x_versymp.
151
152         * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
153         the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
154         Don't return bfd_und_section_ptr when info->shared.
155         (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
156         (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
157         (mips_elf_check_relocs): Resolve an indirect symbol in
158         sym_hashes.
159         (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
160         SHN_MIPS_TEXT or SHN_MIPS_DATA.
161
162         * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
163
164 Tue Mar 11 01:38:36 1997  Ian Lance Taylor  <[email protected]>
165
166         From Eric Youngdale <[email protected]>:
167         * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
168         * elf.c (bfd_elf_print_symbol): Correct errors in last change.
169         * elflink.h (elf_link_add_object_symbols): Handle cases in which a
170         versioned symbol appears in both a regular and a shared object.
171         (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
172         appropriate.  Improve error message.
173         (struct elf_outext_info): Rename from elf_finfo_failed.  Change
174         all uses.  Add localsyms field.
175         (elf_bfd_final_link): When generating a shared library, call
176         elf_link_output_extsym to output all local symbols.
177         (elf_link_output_extsym): Handle symbols which were forced to
178         become local.
179
180 Sun Mar  9 23:08:49 1997  Ian Lance Taylor  <[email protected]>
181
182         From Eric Youngdale <[email protected]>:
183         * elf-bfd.h (elf_symbol_type): Add version field.
184         * elfcode.h (elf_slurp_symbol_table): Set version field.
185         * elflink.h (elf_link_add_object_symbols): When creating an
186         indirect symbol for a default version symbol, set DEF_DYNAMIC if
187         appropriate.  Set up an indirection from the nondefault version of
188         the symbol as well.
189         (NAME(bfd_elf,size_dynamic_sections)): Call
190         elf_link_assign_sym_version before checking whether there are any
191         versions.  Always record the version name as a dynamic symbol.
192         Initialize counters.
193         (elf_link_assign_sym_version): After finding a version, see if a
194         symbol should be forced to local scope.  Create a new version
195         definition if appropriate.
196         (elf_link_output_extsym): Correct indirect symbol handling.
197         * elf.c (bfd_elf_print_symbol): Print version information.
198         (bfd_section_from_shdr): Turn version sections into BFD sections.
199         (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
200         if sh_info is not already set.
201         (_bfd_elf_copy_private_section_data): Copy sh_info for version
202         sections.
203         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
204         _bfd_stringtab_add to copy the name into permanent memory if
205         appropriate.
206
207 Fri Mar  7 11:55:31 1997  H.J. Lu  <[email protected]>
208
209         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
210
211 Fri Mar  7 10:37:30 1997  Ian Lance Taylor  <[email protected]>
212
213         * coffcode.h (bfd_coff_backend_data): Change
214         _bfd_coff_compute_section_file_positions to return a boolean
215         value.  Change all callers.
216         (coff_compute_section_file_positions): Change return type to
217         boolean.  If the size of the last section changed, then output a
218         zero byte at the end of the file.
219         * libcoff.h: Rebuild.
220
221         * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
222         for at least 6 output symbols.
223         (xcoff_write_global_symbol): When emitting TOC entry relocs, also
224         emit a TC csect to represent the space they take up.  For an XO
225         symbol, just emit a reference, not a csect.
226
227         * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
228         Solaris doesn't like the combined options, and the -f is
229         unnecessary.
230         (stamp-tshlink, install): Likewise.
231
232         * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
233         handling when little endian.
234
235 Thu Mar  6 13:51:51 1997  Jeffrey A Law  ([email protected])
236
237         * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
238         (mn10300_elf_relocate_section): Likewise.
239         (elf_backend_relocate_section): Define.
240
241         * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
242         relocs.  Replace them with generic PCREL_{8,16,32} relocs.
243         (elf32_mn10300_howto_table): Likewise.
244         (elf32_mn10300_reloc_map): Likewise.
245         (bfd_elf32_mn10300_reloc): Delete unused function.
246
247 Thu Mar  6 12:19:59 1997  Fred Fish  <[email protected]>
248
249 start-sanitize-tic80
250         * coff-tic80.c (rtype2howto): If passed a relocation type we don't
251         understand, just set the howto field to NULL, and the caller will
252         print an appropriate error message.
253 end-sanitize-tic80
254         * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
255         code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
256         block.  Use NULL for initializations of "ptr" rather than bare 0.
257         * coff-h8300.c: Fix typo in comment.
258         * coff-h8500.c: Ditto.
259         * coff-w65.c: Ditto
260         * coff-z8k.c: Ditto.
261         
262 start-sanitize-m32r
263 Wed Mar  5 13:59:09 1997  Doug Evans  <[email protected]>
264
265         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
266         (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
267         m32r_elf_get_relocated_section_contents): First pass at relax support.
268
269 end-sanitize-m32r
270 Mon Mar  3 13:27:09 1997  Ulrich Drepper  <[email protected]>
271
272         * elflink.h (elf_link_add_object_symbols): Use correct sh_size
273         entry for reading verdef records.
274         Use correct braces for computing increments of extverdaux and
275         exteverdef record pointers.
276
277 start-sanitize-tic80
278 Sun Mar  2 22:47:54 1997  Fred Fish  <[email protected]>
279
280         * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
281         instead of 4.
282
283 end-sanitize-tic80
284 Sun Mar  2 16:25:35 1997  Ian Lance Taylor  <[email protected]>
285
286         * elflink.h (elf_link_find_version_dependencies): Check that
287         DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
288         set.
289
290 start-sanitize-tic80
291 Fri Feb 28 16:52:40 1997  Fred Fish  <[email protected]>
292
293         * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
294
295 end-sanitize-tic80
296 Fri Feb 28 15:06:45 1997  Ian Lance Taylor  <[email protected]>
297
298         * targets.c (bfd_default_vector): Make non-const.
299         (find_target): New static function, broken out of
300         bfd_find_target.
301         (bfd_set_default_target): New function.
302         (bfd_find_target): Call find_target.  When defaulting, use
303         bfd_default_vector[0] if it is not NULL.
304         * libbfd-in.h (bfd_default_vector): Adjust declaration.
305         * bfd-in2.h, libbfd.h: Rebuild.
306
307         * syms.c (bfd_is_local_label): Return false if the symbol has no
308         name.
309         * coff-i960.c (coff_i960_is_local_label_name): New function.
310         (coff_bfd_is_local_label_name): Define.
311         * coff-m68k.c (m68k_coff_is_local_label_name): New function.
312         (coff_bfd_is_local_label_name): Define.
313         * coff-rs6000.c (xcoff_is_local_label_name): New function.
314         (coff_bfd_is_local_label_name): Define.
315         * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
316         with .. or _.L_ as local.
317         * elf32-i386.c (elf_i386_is_local_label_name): New function.
318         (bfd_elf32_bfd_is_local_label_name): Define.
319         * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
320         beginning with $ as local.
321
322 Thu Feb 27 18:36:23 1997  Ian Lance Taylor  <[email protected]>
323
324         * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
325         rather than comparing against info->lprefix.
326         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
327         * elflink.h (elf_link_input_bfd): Likewise.
328         * linker.c (_bfd_generic_link_output_symbols): Likewise.
329         * xcofflink.c (xcoff_link_input_bfd): Likewise.
330
331         * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
332         _bfd_elf_is_local_label_name if not already defined.
333         * elf.c (_bfd_elf_is_local_label_name): New function.
334         * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
335
336         * coff-m88k.c (coff_bfd_is_local_label_name): Define.
337         (m88k_is_local_label_name): New static function.
338
339         * coffcode.h (coff_bfd_is_local_label_name): Define as
340         _bfd_coff_is_local_label_name if not already defined.
341         * coffgen.c (_bfd_coff_is_local_label_name): New function.
342         * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
343         * libcoff.h: Rebuild.
344         
345         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
346         to _bfd_is_local_label_name.
347         (bfd_target): Likewise.
348         * syms.c (bfd_is_local_label): Define as function, not macro.
349         (bfd_is_local_name): Define.
350         * libbfd.c (bfd_generic_is_local_label_name): Rename from
351         bfd_generic_is_local_label, and take a string rather than a
352         symbol.
353         * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
354         (_bfd_nosymbols_bfd_is_local_label_name): Define.
355         (bfd_generic_is_local_label): Don't declare.
356         (bfd_generic_is_local_label_name): Declare.
357         * bfd-in2.h, libbfd.h: Rebuild.
358         * All backends: Change local_label to local_label_name.
359
360         * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
361         (mips_elf_relocate_got_local): Change return type to boolean.
362         Don't assume that the first zero entry is unassigned; instead, use
363         assigned_gotno.
364         (mips_elf_relocate_section): Check return value of
365         mips_elf_relocate_got_local.
366         (mips_elf_create_got_section): Initialize assigned_gotno field.
367
368 start-sanitize-d30v
369 Wed Feb 26 15:19:51 1997  Martin M. Hunt  <[email protected]>
370
371         * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
372         relocations.
373
374 end-sanitize-d30v       
375 Wed Feb 26 13:33:03 1997  Ian Lance Taylor  <[email protected]>
376
377         * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
378         that have no contents merely because linker_mark is not set.
379
380 Tue Feb 25 18:51:35 1997  Stan Shebs  <[email protected]>
381
382         * config.bfd (mips*-*-lnews*): New target.
383         * coff-mips.c (mips_relocate_section): Make assert compare
384         content byteorder instead of header byteorder.
385         (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
386         data.
387         * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
388         * configure.in (ecoff_biglittle_vec): Add case.
389         * configure: Update.
390
391 Tue Feb 25 00:32:49 1997  Ian Lance Taylor  <[email protected]>
392
393         * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
394         name begins with ".note".
395         (map_sections_to_segments): Add a PT_NOTE segment for any loadable
396         section whose name begins with ".note".
397         (get_program_header_size): Corresponding change.
398
399         * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
400         jal and for jal overflow.
401
402 Mon Feb 24 17:53:14 1997  Ian Lance Taylor  <[email protected]>
403
404         From Eric Youngdale <[email protected]>:
405         * elflink.h (elf_link_add_archive_symbols): If a default symbol is
406         not found, try looking it up again without the version name.
407         (elf_link_add_object_symbols): Always link against the dynamic
408         symbol table of a dynamic object.  When linking against a dynamic
409         object, include version strings in symbol names, and set up
410         version information.  Add indirect symbols for default versions.
411         (elf_link_create_dynamic_sections): Add special version sections.
412         (struct elf_assign_sym_version_info): Define.
413         (struct elf_find_verdep_info): Define.
414         (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter.  Set
415         up version sections.
416         (elf_adjust_dynamic_symbol): Ignore indirect symbols.
417         (elf_link_find_version_dependencies): New static function.
418         (elf_link_assign_sym_version): New static function.
419         (elf_link_renumber_dynsyms): New static function.
420         (struct elf_final_link_info): Add symver_sec field.
421         (elf_bfd_final_link): Initialize finfo.symver_sec.  Don't count
422         local symbols of a dynamic object.  Handle DT_VER* constants.
423         (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
424         dynamic object.  Skip indirect symbols from ELF objects.  Remove
425         the version name before choosing a hash bucket.  Write out the
426         version information if appropriate.
427         (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
428         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
429         (bfd_elf64_size_dynamic_sections): Likewise.
430         * bfd-in2.h: Rebuild.
431         * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
432         Change elf_link_hash_flags to unsigned short.
433         (ELF_LINK_HIDDEN): Define.
434         (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
435         dynverdef_hdr, dynversym_section, dynverdef_section,
436         dynverref_section, cverdefs, cverrefs, verdef, verref.
437         (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
438         (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
439         (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
440         (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
441         (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
442         (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
443         (_bfd_elf_slurp_version_tables): Declare.
444         * elf.c (_bfd_elf_swap_verdef_in): New function.
445         (_bfd_elf_swap_verdef_out): Likewise.
446         (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
447         (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
448         (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
449         (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
450         (_bfd_elf_print_private_bfd_data): Add DT_VER* constants.  Print
451         version information if there is any.
452         (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
453         (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
454         (elf_fake_sections): Handle .gnu.version* section names.
455         (assign_section_numbers): Handle SHT_GNU_ver* section types.
456         (_bfd_elf_slurp_version_tables): New function.
457         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
458         version name in string entered in dynamic hash table.
459         * elfcode.h: Include fnmatch.h.
460         * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
461         symbol which was forced to become local.
462         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
463         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
464         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
465         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
466
467 Fri Feb 21 16:15:18 1997  Jeffrey A Law  ([email protected])
468
469         * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
470         somewhat.
471         (mn10200_elf_relax_section): Correctly compute a symbol's value
472         when the symbol is local, but not in the same section as we are
473         relaxing.  Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
474         relaxing.
475
476 start-sanitize-m32r
477 Fri Feb 21 13:55:14 1997  Doug Evans  <[email protected]>
478
479         * elf32-m32r.c: Rewrite to use ELF backend linker.
480         Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
481         Add small data area support (R_M32R_SDA16).
482         * reloc.c: Document BFD_RELOC_M32R_SDA16.
483         * bfd-in2.h,libbfd.h: Regenerated.
484
485 end-sanitize-m32r
486 Thu Feb 20 23:50:31 1997  Jeffrey A Law  ([email protected])
487
488         * elf32-mn10200.c (mn10200_elf_relax_section): New function.
489         (mn10200_elf_relax_delete_bytes): Likewise.
490         (mn10200_elf_symbol_address_p): Likewise.
491         (mn10200_elf_get_relocated_section_contents): Likewise.
492         (bfd_elf32_bfd_relax_section): Define.
493         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
494
495         * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
496         (mn10200_elf_relocate_section): Likewise.
497         (elf_backend_relocate_section): Define.
498
499 start-sanitize-d30v
500 Tue Feb 18 17:22:59 1997  Martin M. Hunt  <[email protected]>
501
502         * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
503         reloc.c, targets.c: New target, elf-*-D30V. 
504
505         * bfd-in2.h, configure, libbfd.h: Rebuilt.
506
507         * cpu-d30v.c, elf32-d30v.c: New files.
508         
509 end-sanitize-d30v       
510 Tue Feb 18 15:31:48 1997  Fred Fish  <[email protected]>
511
512         * reloc.c (struct reloc_howto_struct): Fix typo in comment.
513         * bfd-in2.h: Regenerated.
514 start-sanitize-tic80
515         * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
516         (rtype2howto): Add function.
517         (tic80_howto_table): Add.
518 end-sanitize-tic80
519         
520 Tue Feb 18 11:41:00 1996  Dawn Perchik  <[email protected]>
521
522         * sysdep.h: Don't define errno in MSVC if error.h is included.
523
524 start-sanitize-v850
525 Tue Feb 18 10:04:13 1997  Jeffrey A Law  ([email protected])
526
527         * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
528         is initialized before it is used.
529
530 end-sanitize-v850
531 Mon Feb 17 11:28:40 1997  Ian Lance Taylor  <[email protected]>
532
533         * hp300hpux.c (convert_sym_type): Don't convert a secondary common
534         symbol into a weak undefined symbol; leave it as a common symbol.
535
536 Fri Feb 14 19:08:03 1997  Ian Lance Taylor  <[email protected]>
537
538         * elflink.h (elf_link_add_object_symbols): Don't issue a warning
539         about a symbol defined in a dynamic object if it has already been
540         defined in a regular object.
541
542 Thu Feb 13 20:53:22 1997  Klaus Kaempf  ([email protected])
543
544         * makefile.vms: Add gcc flags to allow compiling with current gcc
545         snapshot
546         (targmatch.h): New dependency.
547
548         * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
549         openVMS/Alpha.
550         * evax.h (ALPHA_R_CODEADDR): New relocation.
551         * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
552         openVMS/Alpha.
553         * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
554         relocation.
555         * bfd-in2.h, libbfd.h: Rebuild.
556
557         Restrict symbol length to 64 bytes, case preserving:
558         * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
559         * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
560         (_bfd_evax_length_hash_symbol): Added.
561         * evax-etir.c (_bfd_evax_write_etir): Call
562         _bfd_evax_length_hash_symbol before output of symbol.
563         * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
564         * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
565
566         * evax-emh.c: Output filename to object file without path.
567
568         * evax-egsd.c: New sections for local and global commons.
569
570         * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
571         evax-misc.c, evax.h: Remove 8 bit characters from copyright
572         notices.  Replace AXP with Alpha.
573
574 Wed Feb 12 18:10:30 1997  Ian Lance Taylor  <[email protected]>
575
576         * sunos.c (sunos_create_dynamic_sections): We need the dynamic
577         sections if we are creating a shared library.
578
579 Tue Feb 11 15:45:43 1997  Doug Evans  <[email protected]>
580
581         * configure.host (i386-windows): Don't set host64=true.
582
583 Tue Feb 11 15:27:32 1997  Ian Lance Taylor  <[email protected]>
584
585         * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
586         (elf_mips16_gprel_howto): New static variable.
587         (mips16_gprel_reloc): New static function.
588         (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
589         (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
590         (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
591         * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
592         * bfd-in2.h, libbfd.h: Rebuild.
593
594 start-sanitize-m32r
595 Mon Feb 10 23:25:00 1997  Doug Evans  <[email protected]>
596
597         * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
598         for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
599
600 end-sanitize-m32r
601 start-sanitize-r5900
602         Fri Feb  7 16:20:17 1997  Gavin Koch   <[email protected]>
603         
604         * config.bfd: add r5900
605         
606 end-sanitize-r5900        
607 Fri Feb  7 12:39:11 1997  Ian Lance Taylor  <[email protected]>
608
609         * elflink.h (elf_link_input_bfd): If we've discarded a section,
610         the output section will be the absolute section; don't print an
611         assertion message for that case when doing a relocateable link.
612
613 Thu Feb  6 16:55:43 1997  Ian Lance Taylor  <[email protected]>
614
615         * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
616         (struct mips_elf_link_hash_entry): Add new fields fn_stub,
617         need_fn_sub, call_stub, and call_fp_stub.
618         (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
619         (mips_elf_link_hash_newfunc): Initialize new fields.
620         (mips_elf_link_hash_table_create): Likewise.
621         (mips_elf_relocate_section): Redirect relocations to use mips16
622         stubs when appropriate.
623         (mips_elf_check_relocs): Attach stub sections to the appropriate
624         symbol.  Set need_fn_stub when appropriate.
625         (mips_elf_always_size_sections): New static function.
626         (mips_elf_check_mips16_stubs): New static function.
627         (elf_backend_always_size_sections): Define.
628         * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
629
630         * elflink.h (elf_link_input_bfd): Discard local symbols that are
631         attached to sections which are not being included in the link.
632
633 Wed Feb  5 13:20:17 1997  Ian Lance Taylor  <[email protected]>
634
635         * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
636         symbol value when computing the addend for a pc_relative
637         pcrel_offset reloc.
638
639 Mon Feb  3 11:54:06 1997  Ian Lance Taylor  <[email protected]>
640
641         * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
642         relocateable link, just skip pc_relative pcrel_offset relocs.
643         * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
644         structure for an ARM26 reloc which can be resolved.
645         (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
646         reloc can be resolved.
647
648         * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
649         error in overflow check for R_RELBYTE.
650
651 Fri Jan 31 14:07:27 1997  Ian Lance Taylor  <[email protected]>
652
653         * ieee.c (ieee_slurp_section_data): Pick up the start address.
654         From Mark Rasin <[email protected]>.
655
656         * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
657         debugging symbols.
658
659 Wed Jan 29 00:00:49 1997  Jeffrey A Law  ([email protected])
660
661         * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
662         (elf_mn10200_howto_table): Likewise.
663         (mn10200_reloc_map): Likewise.
664
665 start-sanitize-m32r
666 Mon Jan 27 12:07:35 1997  Doug Evans  <[email protected]>
667
668         * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
669         * bfd-in2.h, libbfd.h: Regenerated.
670         * elf32-m32r.c: Add support for them.
671
672 end-sanitize-m32r
673 Mon Jan 27 12:25:02 1997  Ian Lance Taylor  <[email protected]>
674
675         * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
676         * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
677 start-sanitize-v850
678         * elf32-v850.c (v850_elf_final_link_relocate): Remove used
679         r_format and r_pcrel.  Always return a value.
680 end-sanitize-v850
681         * riscix.c (MY_final_link_callback): Define to dummy value.
682
683         * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
684         relocations against the text segment, look up the output name of
685         the reloc section.
686         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
687         * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
688         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
689         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
690         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
691
692 start-sanitize-tic80
693 Wed Jan 22 15:40:28 1997  Fred Fish  <[email protected]>
694
695         * coff-tic80.c (tic80coff_vec): Use correct data put/get
696         routines for little endian data.
697         * coffcode.h (coff_write_object_contents): Set magic to
698         TIC80_ARCH_MAGIC for TIc80.
699
700 Tue Jan 21 12:32:43 1997  Fred Fish  <[email protected]>
701
702         * coff-tic80.c (tic80coff_vec): Change to little endian data
703         as the default.
704
705 end-sanitize-tic80
706 Thu Jan 16 17:45:57 1997  Ian Lance Taylor  <[email protected]>
707
708         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
709         auxiliary_filters parameter to be const char * const *.  Accept a
710         NULL terminated array.
711         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
712         (bfd_elf32_size_dynamic_sections): Update declaration.
713         * bfd-in2.h: Rebuild.
714
715 Wed Jan 15 11:21:32 1997  Ian Lance Taylor  <[email protected]>
716
717         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
718         NOTYPE symbol in a text section as a FUNC symbol.
719
720         * coffcode.h (coff_compute_section_file_positions): Force
721         relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
722
723 Tue Jan 14 08:46:33 1997  Doug Evans  <[email protected]>
724
725         * libaout.h (machine_type): Reserve several values for sparclet.
726
727 start-sanitize-tic80
728 Mon Jan 13 22:39:08 1997  Michael Meissner  <[email protected]>
729
730         * config.bfd (tic80-*-*): Don't require 'coff'.
731
732 end-sanitize-tic80
733 start-sanitize-v850
734 Mon Jan 13 19:36:25 1997  Michael Meissner  <[email protected]>
735
736         * elf32-v850.c (v850_elf_howto_table): Set the special_function
737         table to v850_elf_reloc for all non-standard relocations.
738         (v850_elf_check_relocs): Add check for h being non-null.
739         (v850_elf_reloc): Add  R_V850_ZDA_OFFSET support.  Use switch
740         statement instead of multiple ifs.
741         (v850_elf_relocate_section): Fix up error message, don't just call
742         abort.
743
744 end-sanitize-v850
745 Mon Jan  6 13:28:35 1997  Jeffrey A Law  ([email protected])
746
747         * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
748         Use bfd_elf_generic_reloc as special function for all relocs.
749         (bfd_elf32_mn10200_reloc): Remove unnecessary function.
750
751         * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
752         24bit pc-relative reloc.
753
754 start-sanitize-tic80
755 Fri Jan  3 16:33:00 1997  Fred Fish  <[email protected]>
756
757         * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
758         * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
759         header byte order is little endian.  Use correct bfd_get and
760         bfd_put routines for little endian headers.
761         * coffcode.h (coff_set_arch_mach_hook): Set arch to
762         bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
763
764 end-sanitize-tic80
765 Fri Jan  3 16:54:08 1997  Jeffrey A Law  ([email protected])
766
767         * reloc.c: Add BFD_RELOC_24.
768         * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
769         (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
770         * bfd-in2.h, libbfd.h: Rebuilt.
771
772 Fri Jan  3 16:58:31 1997  Richard Henderson  <[email protected]>
773
774         elf64-alpha multiple .got rewrite:
775
776         * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
777         (bfd_elf*_mkobject): Don't define here ...
778         * elfxx-target.h: ... but rather here.  Default always_size_sections
779         hook to NULL.
780         * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was 
781         what the #defines in elf-bfd.h transmuted it to anyway.
782
783         * section.c: Add SEC_LINKER_CREATED flag.
784         * bfd-in2.h: Rebuild.
785         * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
786         relocation section flags.
787         (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
788         SEC_IN_MEMORY to recognize generated bits.
789         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
790         Likewise.
791         * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
792         mips_elf_create_compact_rel_section, mips_elf_create_got_section,
793         mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
794         * elf32-ppc.c (ppc_elf_create_linker_section,
795         ppc_elf_size_dynamic_sections): Likewise.
796         * elf32-sparc.c (elf32_sparc_check_relocs,
797         elf32_sparc_size_dynamic_sections): Likewise.
798         * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to 
799         section flags.
800         (_bfd_elf_create_dynamic_sections): Likewise.
801         (_bfd_elf_make_linker_section_rela): Likewise.
802         * elflink.h (elf_link_create_dynamic_sections): Likewise.
803         (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
804         (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
805         to identify generated bits.
806         (elf_link_input_bfd): Likewise.
807
808         * elf64-alpha.c: Rewrite everything touching relocations.
809
810 start-sanitize-v850
811 Fri Jan  3 11:42:53 1997  Michael Meissner  <[email protected]>
812
813         * elf32-v850.c (all functions and static variables): Go through
814         and regularize names to be of the form v850_elf_<xxx>.
815         (toplevel): Include <elf/v850.h>.
816         (enum reloc_type): Move to include/elf/v850.h.
817         (v850_elf_check_relocs): For common variables, if the variable is
818         referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
819         into the appropriate section.
820         (elf_backend_check_relocs): Define.
821
822 Tue Dec 31 15:15:28 1996  Michael Meissner  <[email protected]>
823
824         * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
825
826 end-sanitize-v850
827 Tue Dec 31 14:44:50 1996  Ian Lance Taylor  <[email protected]>
828
829         * config.bfd (mips*el-*-linux*): New target.
830         (mips*-*-linux*): New target.
831
832         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
833         Return a useful value.
834
835         * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
836
837         * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
838         ac_cv_func_mmap.
839         * configure: Rebuild.
840         * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
841         ac_cv_func_mmap in bfd/configure.host.
842
843         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
844         filter_shlib and auxiliary_filter_shlib parameters.
845         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
846         DT_FILTER.
847         * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
848         (bfd_elf64_size_dynamic_sections): Likewise.
849         * bfd-in2.h: Rebuild.
850
851 Mon Dec 30 18:48:52 1996  Ian Lance Taylor  <[email protected]>
852
853         * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
854         symbols, don't export a symbol which is defined by an object in an
855         archive which contains shared objects.
856
857 start-sanitize-tic80
858 Mon Dec 30 16:12:58 1996  Fred Fish  <[email protected]>
859
860         * archures.c (enum bfd_architecture): Add bfd_arch_tic80
861         for TI TMS320c80 (MVP).
862         (bfd_archures_list): Add bfd_tic80_arch.
863         * bfd-in2.h: Regenerate by running "make headers".
864
865 Sun Dec 29 16:18:52 1996  Fred Fish  <[email protected]>
866
867         * cpu-tic80.c (bfd_tic80_arch): Add struct.
868         * configure.in (case $vec): Correct typo, "tb" not "tp".
869         Also add cofflink.o for tic80coff_vec.
870         * configure: Regenerate with autoconf.
871
872 end-sanitize-tic80
873 Mon Dec 30 11:54:56 1996  Ian Lance Taylor  <[email protected]>
874
875         * libbfd.c: Patch up the mmap code so that it is only built if BFD
876         is configured with --with-mmap.
877
878 start-sanitize-tic80
879 Sun Dec 29 10:48:57 1996  Fred Fish  <[email protected]>
880
881         * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
882         (ALL_MACHINES): Add cpu-tic80.o
883         (cpu-tic80.o, coff-tic80.o): Add dependencies.
884         * coff-tic80.c: Add skeleton, cloned from another coff config.
885         * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
886         for TIc80.
887
888 end-sanitize-tic80
889 Fri Dec 27 20:56:41 1996  Fred Fish  <[email protected]>
890
891         * TODO: Correct a misspelling.
892 start-sanitize-tic80
893         * coff-tic80.c: New file for TI TMS320C80 (MVP).
894         * cpu-tic80.c: New file for TI TMS320C80 (MVP).
895         * configure.in (case $vec): Add tic80coff_vec entry.
896         * configure: Regenerate with autoconf.
897         * archures.c (bfd_tic80_arch): Declare.
898         * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
899         * config.bfd (case ${targ}): Add tic80*-*-coff* target.
900         * targets.c (tic80coff_vec): Add decl as extern bfd_target.
901         (bfd_target_vector): Add tic80coff_vec entry.
902 end-sanitize-tic80
903
904 Fri Dec 27 11:48:12 1996  H.J. Lu  <[email protected]>
905
906         * elflink.h (elf_buckets): Add some more values for larger
907         binaries.
908
909 Thu Dec 26 18:36:54 1996  Ian Lance Taylor  <[email protected]>
910
911         * Makefile.in (install): Move subdir_do out of conditional. From
912         Fred Fish <[email protected]>.
913
914 Wed Dec 18 10:04:30 1996  Jeffrey A Law  ([email protected])
915
916         * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
917         32 bit relocs.
918         (elf_mn10200_howto_table): Likewise.
919         (mn10200_reloc_map): Likewise.
920
921 Tue Dec 17 11:09:36 1996  Ian Lance Taylor  <[email protected]>
922
923         * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
924         mips16 symbol during the link.
925         (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
926         mips16 symbol.
927         (mips_elf_link_output_symbol_hook): New static function.
928         (elf_backend_link_output_symbol_hook): Define.
929
930         * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
931         not zero.
932
933 Mon Dec 16 14:38:39 1996  Ian Lance Taylor  <[email protected]>
934
935         * elf.c (bfd_section_from_shdr): Don't check for reloc sections
936         against SEC_DEBUGGING sections here (revert patch of December 5).
937         * elfcode.h (elf_object_p): Check for them here, instead.
938
939 Sun Dec 15 14:46:06 1996  Ian Lance Taylor  <[email protected]>
940
941         * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
942         * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
943         slurp_reloc_table.
944         (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
945         (_bfd_elf_canonicalize_dynamic_reloc): New function.
946         * elf-bfd.h (struct elf_size_info): Update declaration of
947         slurp_reloc_table.
948         (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
949         (_bfd_elf_canonicalize_dynamic_reloc): Declare.
950         * elfxx-target.h: Use new dynamic reloc routines by default.
951         * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
952         parameter.
953
954 Fri Dec 13 13:18:49 1996  Dan Wilder  <[email protected]>
955
956         * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
957         if NAMES_HAVE_UNDERSCORE is defined.
958
959 Fri Dec 13 11:13:23 1996  Doug Evans  <[email protected]>
960
961         * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
962
963 Thu Dec 12 15:07:20 1996  Michael Meissner  <[email protected]>
964
965         * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
966         supported relocs.
967
968 Thu Dec 12 14:55:41 1996  Ian Lance Taylor  <[email protected]>
969
970         * elflink.h (elf_link_add_object_symbols): Only add a weak
971         symbol if the real definition is in the dynamic symbol table.
972         After finding the real definition, then, if it is dynamic, add the
973         weak symbol to the dynamic symbol table.
974
975         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
976
977         * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
978         function.
979         (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
980         array.
981
982 Tue Dec 10 23:23:52 1996  Jeffrey A Law  ([email protected])
983
984         * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
985         variants.
986         (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
987         (bfd_elf32_mn10300_reloc): Write data in little endian format.
988         * reloc.c: Remove mn10300 big endian relocs.
989         * bfd-in2.h, libbfd.h: Rebuilt.
990
991         * elf32-mn10200.c: Update from elf32-mn10300.c.
992  
993 Fri Dec  6 15:18:05 1996  Jeffrey A Law  ([email protected])
994
995         * elf32-mn10300.c (elf_symbol_leading_char): Define.
996
997         * elf32-mn10300.c: Add some comments.
998
999 Fri Dec  6 17:16:43 1996  Ian Lance Taylor  <[email protected]>
1000
1001         * ihex.c (ihex_scan): Always initialize buf before jumping to
1002         error_return.
1003         (ihex_read_section): Likewise.
1004
1005 Thu Dec  5 22:29:18 1996  Jeffrey A Law  ([email protected])
1006
1007         * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
1008         inplace for most relocs.
1009
1010 Thu Dec  5 13:24:46 1996  Ian Lance Taylor  <[email protected]>
1011
1012         * elflink.h (elf_link_add_object_symbols): Calling check_relocs
1013         even if SEC_ALLOC is not set.
1014         * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
1015         when deciding whether to copy a reloc into a shared object.
1016         (elf_i386_relocate_section): Likewise.
1017         * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1018         (elf32_sparc_relocate_section): Likewise.
1019         * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
1020         reloc section if it is not set in the source section.
1021         * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
1022         * elf.c (bfd_section_from_shdr): Mark a reloc section associated
1023         with a SEC_DEBUGGING section as SEC_DEBUGGING.
1024
1025 Wed Dec  4 14:18:13 1996  Michael Meissner  <[email protected]>
1026
1027         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
1028         expects a .got.plt until we actually create it.
1029
1030 Mon Dec  2 12:13:51 1996  Ian Lance Taylor  <[email protected]>
1031
1032         * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
1033         message for bfd_reloc_outofrange, rather than aborting.  From
1034         Philippe De Muyter <[email protected]>.
1035
1036         * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
1037         a relocateable link, don't try to process them.  From Heinz Wrobel
1038         <[email protected]>.
1039
1040 Mon Dec  2 00:39:24 1996  Jeffrey A Law  ([email protected])
1041
1042         * elf32-mn10300.c (mn10300_info_howto): Renamed from
1043         mn10300_info_howto_rel.  Tweak reloc argument to be an
1044         Elf32_Internal_Rela.
1045         (USE_RELA): Define instead of USE_REL.
1046         (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
1047
1048 Sun Dec  1 00:18:59 1996  Peter Schauer  ([email protected])
1049
1050         * configure.in, configure:  Handle mips*-sgi-irix6*.
1051         * irix-core.c (irix_core_core_file_p):  Accept CORE_MAGICN32
1052         core files.
1053
1054 Wed Nov 27 12:10:25 1996  Ian Lance Taylor  <[email protected]>
1055
1056         * elf32-i386.c (elf_i386_relocate_section): Warn about a
1057         relocation against a symbol defined in a section with no output
1058         section.
1059
1060 Tue Nov 26 11:07:31 1996  Ian Lance Taylor  <[email protected]>
1061
1062         * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
1063         * configure, config.in: Rebuild with autoconf 2.12.
1064
1065         * elf-bfd.h (struct elf_link_hash_entry): Add other field.
1066         * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
1067         (swap_out_syms): Set st_other from existing st_other field.
1068         * elflink.h (elf_link_add_object_symbols): Store st_other in hash
1069         table other field.
1070         (elf_link_output_extsym): Set the other field from the global hash
1071         table entry.
1072         * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
1073         (elf_mips16_jump_howto): New static variable.
1074         (mips16_jump_reloc): New static function.
1075         (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
1076         (mips_info_to_howto_rel): Handle R_MIPS16_26.
1077         (mips_elf_relocate_section): Handle R_MIPS16_26.  Handle R_MIPS_26
1078         to a mips16 symbol.
1079         * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
1080         * bfd-in2.h, libbfd.h: Rebuild.
1081         * cpu-mips.c (arch_info_struct): Add mips:16 entry.
1082
1083 Mon Nov 25 11:23:32 1996  Ian Lance Taylor  <[email protected]>
1084
1085         * configure.host: Use long long for mips-sgi-irix6*.
1086
1087         * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
1088         only a warning.  From Philippe De Muyter <[email protected]>.
1089
1090 Mon Nov 25 08:52:29 1996  Jeffrey A Law  ([email protected])
1091
1092         * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
1093         (enum reloc_type): Add more reloc types.
1094         (elf32_mn10300_howto_table): Update for new reloc types.
1095         (elf32_mn10300_reloc_map): Update for new reloc types.
1096         * reloc.c: Add some new relocs for the mn10300 series.
1097         * bfd-in2.h, libbfd.h: Rebuilt.
1098         
1099 Sat Nov 23 13:26:18 1996  Jeffrey A Law  ([email protected])
1100
1101         * som.c (setup_sections): Don't lose for a space which has
1102         no data, but some symbols.
1103
1104 Fri Nov 22 11:32:13 1996  Ian Lance Taylor  <[email protected]>
1105
1106         * sunos.c (struct sunos_link_hash_table): Add got_needed field.
1107         (sunos_link_hash_table_create): Initialize got_needed.
1108         (sunos_create_dynamic_sections): Only set .got section size if it
1109         is not already set.  Set got_needed.
1110         (bfd_sunos_size_dynamic_sections): Check got_needed.  Only set
1111         sdynptr, and only handle dynamic sections, if dynamic sections are
1112         needed.
1113         (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
1114         Initialize .got section.
1115         (sunos_scan_ext_relocs): Likewise.
1116         (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
1117         a dynamic symbol.
1118         (sunos_finish_dynamic_link): Check got_needed.  Only set up
1119         dynamic linking information if needed.
1120
1121 Thu Nov 21 10:31:31 1996  Rob Savoye  ([email protected])
1122         
1123         * config.bfd: Added VersaDOS format to the Ericsson configuration.
1124
1125 Wed Nov 20 16:31:31 1996  Jeffrey A Law  ([email protected])
1126
1127         * elf32-mn10300.c: Rough cut at relocs for the mn10300.
1128
1129 Wed Nov 13 08:12:38 1996  Jeffrey A Law  ([email protected])
1130
1131         * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
1132         anymore.
1133
1134 Tue Nov 12 13:30:00 1996  Dawn Perchik  <[email protected]>
1135
1136         * filemode.c: Include sysdep.h.
1137         * ihex.c: Add casts to eliminate compiler warnings.
1138         * sunos.c: Add casts to eliminate compiler warnings.
1139
1140 Mon Nov 11 10:37:02 1996  Michael Meissner  <[email protected]>
1141
1142         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
1143         section.
1144         (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC.  Make
1145         appropriate relocations in the .so file if shared.
1146         (ppc_elf_relocate_section): Ditto.
1147
1148 start-sanitize-m32r
1149 Tue Oct 29 15:03:02 1996  Doug Evans  <[email protected]>
1150
1151         * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
1152         complain_overflow_unsigned.
1153
1154 end-sanitize-m32r
1155 Tue Oct 29 12:53:46 1996  Martin M. Hunt  <[email protected]>
1156
1157         * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
1158         overflows for R_D10V_16 and R_D10V_18.
1159
1160 Tue Oct 29 13:23:53 1996  Ian Lance Taylor  <[email protected]>
1161
1162         * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
1163         (do_with_relocs): Likewise.
1164         (do_as_repeat): Likewise.
1165         (copy_expression): Likewise.
1166
1167 Fri Oct 25 16:56:40 1996  Ian Lance Taylor  <[email protected]>
1168
1169         * ieee.c (ieee_write_external_part): Correctly record whether
1170         there is an external part.
1171
1172 start-sanitize-v850
1173 Thu Oct 24 14:32:52 1996  Jeffrey A Law  ([email protected])
1174
1175         * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
1176         handle tda offsets for sld.w and sst.w instructions.
1177         Fix alignment check in sld.w and sst.w tda reloc handling.
1178
1179 end-sanitize-v850
1180 Thu Oct 24 09:08:47 1996  Stu Grossman  ([email protected])
1181
1182         * aclocal.m4, configure:  Set USE_BINARY_FOPEN for *-*-windows.
1183
1184 start-sanitize-v850
1185 Wed Oct 23 00:53:16 1996  Jeffrey A Law  ([email protected])
1186
1187         * elf32-v850.c: Add comments about assumptions about
1188         char, short & long sizes.
1189         (elf32_v850_bfd_final_link_relocate): Fix sign extension
1190         problems for several relocs.
1191
1192         * elf32-v850.c (elf32_v850_howto_table): Fix typo in
1193         R_V850_SDA_OFFSET entry.
1194
1195 end-sanitize-v850
1196 Wed Oct 23 00:20:34 1996  Ian Lance Taylor  <[email protected]>
1197
1198         * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
1199         Store import file index in ldindx.
1200         (xcoff_build_ldsyms): Assume that ldsym was not previously
1201         allocated.  For an imported symbol, copy ldindx into l_ifile.
1202
1203 start-sanitize-v850
1204 Tue Oct 22 19:20:38 1996  Jeffrey A Law  ([email protected])
1205
1206         * elf32-v850.c (elf_v850_howto_table): Fix ordering of
1207         R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET.  Fix various
1208         fields in R_V850_TDA_OFFSET.
1209         (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
1210         relocs to work more like other relocs.  Handle R_V850_TDA_OFFSET
1211         relocations.
1212
1213         * elf32-v850.c: Include bfdlink.h.
1214         (bfd_elf32_v850_reloc): Return an error if we get a reloc
1215         we can't handle.
1216         (elf32_v850_bfd_final_link_relocate): New function.
1217         (v850_elf_relocation_section): Likewise.
1218         (elf_backend_relocate_section): Define.
1219
1220 end-sanitize-v850
1221 Tue Oct 22 17:22:43 1996  Ian Lance Taylor  <[email protected]>
1222
1223         * binary.c (binary_set_section_contents): Ignore sections which
1224         don't have SEC_LOAD and SEC_ALLOC set.
1225
1226 Mon Oct 21 12:13:05 1996  Jeffrey A Law  ([email protected])
1227
1228         * linker.c (_bfd_generic_final_link): Avoid losing static
1229         symbols in the .bss section.
1230
1231 Mon Oct 21 10:54:58 1996  Ian Lance Taylor  <[email protected]>
1232
1233         * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
1234         (mips32_64bit_reloc): New static function.
1235         (mips_reloc_map): Add entry for BFD_RELOC_64.
1236         (mips_elf_relocate_section): Handle R_MIPS_64.
1237
1238         * linker.c (default_indirect_link_order): Print an error message
1239         when attempting to do a relocateable link with different object
1240         file formats, rather than calling abort.
1241
1242 start-sanitize-m32r
1243 Thu Oct 17 10:43:29 1996  Doug Evans  <[email protected]>
1244
1245         * reloc.c (m32r relocs): Rename them.
1246         * bfd-in2.h, libbfd.h: Regenerated.
1247         * elf32-m32r.c: Update.
1248         (m32r_elf_10_pcrel_reloc): New function.
1249         (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
1250         (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
1251
1252 end-sanitize-m32r
1253 Wed Oct 16 11:24:35 1996  Jeffrey A Law  ([email protected])
1254
1255         * linker.c (_bfd_generic_final_link): Set "linker_mark" for
1256         all sections that will be included in the output file.
1257         (_bfd_generic_link_output_symbols): Discard symbols in sections
1258         which are being discarded.
1259
1260 start-sanitize-v850
1261
1262         * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
1263         R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
1264         (elf_v850_howto_table): Corresponding changes.
1265         (elf_v850_reloc_map): Corresponding changes.
1266         * reloc.c: Add additional V850 relocations.
1267         * bfd-in2.h, libbfd.h: Rebuilt.
1268
1269         * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
1270         no longer want in pc-relative relocs.
1271
1272 Tue Oct 15 22:17:37 1996  Jeffrey A Law  ([email protected])
1273
1274         * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
1275         accept a reloc against an undefined sybmol!
1276
1277 Tue Oct 15 16:17:28 1996  Stu Grossman  ([email protected])
1278
1279         * elf32-v850.c:  Define elf_symbol_leading_char to be '_'.
1280
1281 end-sanitize-v850
1282 Tue Oct 15 12:40:41 1996  Ian Lance Taylor  <[email protected]>
1283
1284         * VERSION: Bump for new relocation.
1285
1286         * hosts/i386bsd.h: If NBPG is not defined, define it as
1287         PAGE_SIZE, for recent versions of FreeBSD.
1288
1289 Mon Oct 14 12:37:26 1996  Ian Lance Taylor  <[email protected]>
1290
1291         * configure.host: Use `long long' as the 64 bit type on a Solaris
1292         host, since both gcc and the SunPRO compilers support it.
1293
1294 Mon Oct 14 11:17:24 1996  Richard Henderson  <[email protected]>
1295
1296         * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL.  It was a 
1297         mistake to have reused the ECOFF LITERAL for ELF since they have
1298         different semantics.
1299         * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
1300         * bfd-in2.h, libbfd.h: Rebuild.
1301
1302         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
1303         section overflow.
1304
1305         * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
1306         dynamic relocation for an undefweak symbol when we are building
1307         a static executable.
1308
1309 Thu Oct 10 11:15:06 1996  Stan Shebs  <[email protected]>
1310
1311         * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
1312         point explicitly to srcdir.
1313         (targmatch.h): Edit references to point explicitly to objdir.
1314
1315 Thu Oct 10 14:14:23 1996  Ian Lance Taylor  <[email protected]>
1316
1317         * config.bfd: When setting targ_cpu, don't get confused by
1318         linux-gnu.
1319
1320 Tue Oct  8 08:51:19 1996  Stu Grossman  ([email protected])
1321
1322         * configure.host:  Add support for windows host (a build done
1323         under the Microsoft build environment).
1324
1325 Tue Oct  8 11:40:16 1996  Ian Lance Taylor  <[email protected]>
1326
1327         * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
1328         definition in a dynamic object, add it to the dynamic symbol table
1329         if any dynamic object mentions it.  Reverts part of last patch.
1330
1331         * sunos.c (struct sunos_link_hash_table): Add got_base field.
1332         (sunos_link_hash_table_create): Initialize got_base.
1333         (bfd_sunos_size_dynamic_sections): If the .got section is more
1334         than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
1335         0x1000.
1336         (sunos_check_dynamic_reloc): Subtract got_base from a base
1337         relative relocation.
1338
1339         * elf32-mips.c (elf_mips_isa): New static function.
1340         (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
1341         -mips1 and -mips2 code together, or -mips3 and -mips4 code.
1342
1343 Mon Oct  7 11:44:17 1996  Ian Lance Taylor  <[email protected]>
1344
1345         * archive.c (do_slurp_coff_armap): Only treat archive as little
1346         endian for i960 COFF.
1347
1348 Fri Oct  4 13:49:01 1996  Ian Lance Taylor  <[email protected]>
1349
1350         * coffcode.h (coff_compute_section_file_positions): Adjust sofar
1351         by the change in size of the section when EXEC_P is not set.
1352
1353         * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
1354         (m68kcoff_rtype_to_howto): New static function.
1355         * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
1356         VMA to the addend for a PC relative reloc.
1357
1358         * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
1359         HP/UX 10.20.
1360         * Makefile.in: Rebuild dependencies.
1361
1362         * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
1363         som.h is included.
1364
1365 Fri Oct  4 11:41:39 1996  Jeffrey A Law  ([email protected])
1366
1367         * Makefile.in: Remove explicit dependencies for mn10200 and
1368         mn10300 files.
1369         (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
1370         (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
1371         (dependencies): Rebuilt.
1372
1373 Thu Oct  3 16:57:51 1996  Ian Lance Taylor  <[email protected]>
1374
1375         * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
1376         during this function.
1377
1378         * elflink.c (_bfd_elf_create_linker_section): Only use an existing
1379         section if the flags are compatible.
1380
1381         * configure.in: Add havevecs, and put it in tdefaults.
1382         * mpw-config.in: Likewise.
1383         * configure: Rebuild.
1384         * targmatch.sed: New file; a sed script to build targmatch.h from
1385         config.bfd.
1386         * config.bfd: Add #if, #endif, and comments for targmatch.h.
1387         * targets.c: Include "fnmatch.h".
1388         (struct targmatch): Define.
1389         (bfd_target_match): Define by including targmatch.h.
1390         (bfd_find_target): If the target is not found by name, search for
1391         it as a configuration triplet.
1392         * Makefile.in: Rebuild dependencies.
1393         (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
1394         i386dynix.o, m68k4knetbsd.o, and riscix.o.
1395         (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
1396         hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
1397         (HFILES): Add targmatch.h.  Also, alphabetize and reindent.
1398         (CFILES): Remove i386dynix.c and hp300bsd.c.
1399         (targmatch.h): New target.
1400         (do_clean): Remove targmatch.h.
1401
1402         * configure.in: Add BFD_NEED_DECLARATION(getenv).
1403         * acconfig.h: Add NEED_DECLARATION_GETENV.
1404         * configure, config.in: Rebuild.
1405         * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
1406         * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
1407
1408 Thu Oct  3 09:29:09 1996  Jeffrey A Law  ([email protected])
1409
1410         * cpu-mn10x00.c, elf32-mn10x00: Removed.
1411         * cpu-mn10200.c, cpu-mn10300.c: New files.
1412         * elf32-mn10200.c, elf32-mn10300.c: New files.
1413         * Makefile.in: Break mn10x00 support into two separate
1414         configurations, mn10200 and mn10300.
1415         * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
1416         * bfd-in2.h, configure: Rebuilt.
1417
1418 Thu Oct  3 15:38:19 1996  Jason Molenda  ([email protected])
1419
1420         * Makefile.in (do_clean): Move config.log to do_distclean.
1421
1422 Wed Oct  2 21:40:55 1996  Jeffrey A Law  ([email protected])
1423
1424         * cpu-mn10x00.c, elf32-mn10x00.c: New files.
1425         * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
1426         (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
1427         (elf32-mn10x00.o): Add dependencies.
1428         * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
1429         (bfd_mn10x00_arch): Declare.
1430         (bfd_archures_list): Add bfd_mn10x00_arch.
1431         * config.bfd: Add mn10x00-*-*.
1432         * configure.in: Add bfd_elf32_mn10x00_vec.
1433         * elf.c (prep_headers): Handle bfd_arch_mn10x00.
1434         * targets.c (bfd_elf32_mn10x00_vec): Declare.
1435         (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
1436         * bfd-in2.h, configure: Rebuilt.
1437         
1438 Wed Oct  2 15:46:45 1996  Klaus Kaempf  <[email protected]>
1439
1440         openVMS/Alpha: Provide filename and case_hack flags via
1441         symbol table from gas.
1442         Add case_hack code for symbol output from vax/vms.
1443         * evax-alpha.c (evax_initialize): Remove filename handling,
1444         filename is provided via symbol table.
1445         (evax_get_symtab): Use local symbol count when setting up table.
1446         * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
1447         debugging.
1448         (_bfd_evax_write_egsd): Skip file name symbol.
1449         * evax-emh.c (get_vms_time_string): Local function now.
1450         (_bfd_evax_write_emh): Extract source filename and case_hack flags
1451         from symbol table.
1452         * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
1453         through _bfd_evax_case_hack_symbol.
1454         * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
1455         functions.
1456         (_bfd_evax_basename): Removed.
1457         (_bfd_get_vms_time_string): Moved to evax-emh.c.
1458         * evax.h (evax_private_data_struct): Remove filename.
1459         (flag_hash_long_names, flag_show_after_trunc,
1460         flag_no_hash_mixed_case, vms_name_mapping): New flags for
1461         vms_case_hack.
1462
1463 Wed Oct  2 12:02:02 1996  Ian Lance Taylor  <[email protected]>
1464
1465         * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
1466         (N_GETMID_NET, N_GETFLAG_NET): Likewise.
1467         (NO_SWAP_MAGIC): Don't define.
1468         (SWAP_MAGIC): Define.
1469
1470         * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
1471         no hash table entry for a global symbol.
1472
1473 Tue Oct  1 16:14:22 1996  Joel Sherrill  <[email protected]>
1474
1475         * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
1476
1477 Tue Oct  1 12:31:39 1996  Ian Lance Taylor  <[email protected]>
1478
1479         * cofflink.c (coff_link_add_symbols): Don't override a meaningful
1480         symbol type with T_NULL.  Warn if symbol type changes.  Based on
1481         patch from Philippe De Muyter <[email protected]>.
1482
1483         * elflink.h (elf_link_add_object_symbols): Only put a symbol from
1484         a dynamic object in the dynamic symbol table if it is referenced
1485         or defined by a regular object.
1486
1487 start-sanitize-v850
1488 Fri Sep 27 18:41:07 1996  Stu Grossman  ([email protected])
1489
1490         * elf32-v850.c (bfd_elf32_v850_is_local_label):  New function to
1491         remove dwarf local labels.  Shrinks binaries by a factor of 3!
1492
1493 end-sanitize-v850
1494 Mon Sep 23 13:33:00 1996  Ian Lance Taylor  <[email protected]>
1495
1496         * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
1497         by hand, rather than by calling bfd_make_section.
1498
1499 start-sanitize-m32r
1500 Mon Sep 23 09:23:41 1996  Doug Evans  <[email protected]>
1501
1502         * reloc.c: Rename m32r relocs.
1503         * bfd-in2.h, libbfd.h: Rebuilt.
1504         * elf32-m32r.c: Update.
1505
1506 end-sanitize-m32r
1507 Fri Sep 20 11:43:43 1996  Ian Lance Taylor  <[email protected]>
1508
1509         * aoutx.h (aout_link_input_section_ext): When doing a relocateable
1510         link, adjust the symbol index of a base relative reloc.  Don't
1511         change the addend of a PC relative reloc if pcrel_offset is set.
1512         * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
1513         a relocateable link.
1514
1515         * reloc.c (bfd_perform_relocation): Apply the relocation even if
1516         it is zero, in case src_mask matters.
1517         (bfd_install_relocation): Likewise.
1518
1519 Thu Sep 19 11:03:06 1996  Ian Lance Taylor  <[email protected]>
1520
1521         * xcofflink.c (xcoff_link_add_symbols): Always initialize
1522         keep_syms.
1523         (_bfd_xcoff_bfd_final_link): Don't set target_index
1524         to an uninitialized value.
1525
1526 Tue Sep 17 14:18:31 1996  Ian Lance Taylor  <[email protected]>
1527
1528         * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
1529         indices, rather than crashing.
1530         (coff_slurp_reloc_table): Likewise.  Check whether the howto field
1531         is NULL.
1532         * coff-sh.c (sh_relocate_section): Check for an illegal symbol
1533         index.
1534
1535 Mon Sep 16 12:39:36 1996  Ian Lance Taylor  <[email protected]>
1536
1537         * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
1538         reloc to 0.
1539         (coff_arm_adjust_symndx): New static function.
1540         (coff_adjust_symndx): Define.
1541
1542         * srec.c (srec_scan): Accept multiple symbols on a single line.
1543         From Pascal Martin <[email protected]>.
1544
1545         * README: New file.
1546
1547 Fri Sep 13 14:32:42 1996  Doug Evans  <[email protected]>
1548
1549         * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
1550         (sunos_merge_private_bfd_data): New function.
1551
1552 Fri Sep 13 15:50:57 1996  Ian Lance Taylor  <[email protected]>
1553
1554         * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
1555         than input BFD.
1556         (bfd_merge_private_bfd_data): Likewise.
1557         * section.c (bfd_copy_private_section_data): Likewise.
1558         * syms.c (bfd_copy_private_symbol_data): Likewise.
1559         * bfd-in2.h: Rebuild.
1560         * aout-target.h (MY_bfd_copy_private_section_data): Check that
1561         both BFD's are the right flavour.
1562         * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
1563         * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
1564         * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
1565         (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1566         * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
1567         (ppc_elf_merge_private_bfd_data): Likewise.
1568         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
1569         * peicode.h (pe_bfd_copy_private_section_data): Likewise.
1570
1571         * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
1572         R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
1573         its sanity check.
1574
1575 start-sanitize-m32r
1576 Thu Sep 12 11:45:57 1996  Doug Evans  <[email protected]>
1577
1578         * reloc.c: Add m32r relocs.
1579         * bfd-in2.h, libbfd.h: Rebuilt.
1580         * cpu-m32r.c,elf32-m32r.c: New files.
1581
1582 end-sanitize-m32r
1583 Thu Sep 12 11:10:05 1996  Ian Lance Taylor  <[email protected]>
1584
1585         * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
1586
1587 Wed Sep 11 11:57:56 1996  Ian Lance Taylor  <[email protected]>
1588
1589         * tekhex.c (first_phase): Change type parameter from char to int.
1590         (out): Likewise.
1591         (pass_over): Change func to expect int, not char.
1592
1593         * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
1594         rather than SEC_LOAD when aligning the file offset for the first
1595         section in a segment.
1596
1597 Tue Sep 10 16:18:30 1996  Fred Fish  <[email protected]>
1598
1599         * syms.c (coff_section_type): Make arg const.
1600         * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
1601         to make_bfd_asection().
1602         * elf-bfd.h (bfd_section_from_phdr): Add prototype.
1603         * elfcode.h (bfd_section_from_phdr): Remove prototype.
1604         (_bfd_elf_stringtab_init): Remove prototype.
1605
1606         * netbsd-core.c (swap_abort): Add prototype.
1607         * aix386-core.c (swap_abort): Ditto & make static
1608         * hpux-core.c (swap_abort): Ditto & make static.
1609         * irix-core.c (swap_abort): Ditto & make static.
1610         * ptrace-core.c (swap_abort): Ditto & make static.
1611         * trad-core.c (swap_abort): Ditto & make static.
1612         * coffswap.h (coff_swap_reloc_in): Ditto.
1613         (coff_swap_reloc_out): Ditto.
1614         (coff_swap_filehdr_in): Ditto.
1615         (coff_swap_filehdr_out): Ditto.
1616         (coff_swap_sym_in): Ditto.
1617         (coff_swap_sym_out): Ditto.
1618         (coff_swap_aux_in): Ditto.
1619         (coff_swap_aux_out): Ditto.
1620         (coff_swap_lineno_in): Ditto.
1621         (coff_swap_lineno_out): Ditto.
1622         (coff_swap_aouthdr_in): Ditto.
1623         (coff_swap_aouthdr_out): Ditto.
1624         (coff_swap_scnhdr_in): Ditto.
1625         (coff_swap_scnhdr_out): Ditto.
1626         * ihex.c (ihex_sizeof_headers): Ditto.
1627         * tekhex.c (getsym): Ditto.
1628         (find_chunk): Ditto & make static.
1629         (insert_byte): Ditto.
1630         (first_phase): Ditto.
1631         (pass_over): Ditto.
1632         (tekhex_get_symtab): Ditto & make static.
1633         (tekhex_get_symtab_upper_bound): Ditto & make static.
1634         (tekhex_mkobject): Ditto.
1635         (tekhex_object_p): Ditto.
1636         (move_section_contents): Ditto.
1637         (tekhex_get_section_contents): Ditto.
1638         (tekhex_set_arch_mach): Ditto & make static.
1639         (tekhex_set_section_contents): Ditto.
1640         (writevalue): Ditto.
1641         (writesym): Ditto.
1642         (out): Ditto.
1643         (tekhex_write_object_contents): Ditto.
1644         (tekhex_sizeof_headers): Ditto.
1645         (tekhex_make_empty_symbol): Ditto.
1646         (tekhex_get_symbol_info): Ditto.
1647         (tekhex_print_symbol): Ditto.
1648         * irix-core.c (make_bfd_asection): Ditto.
1649         (irix_core_core_file_p): Ditto.
1650         (irix_core_core_file_failing_command): Ditto.
1651         (irix_core_core_file_failing_signal): Ditto.
1652         (irix_core_core_file_matches_executable_p): Ditto.
1653         (irix_core_make_empty_symbol): Ditto.
1654         * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
1655         * srec.c (srec_new_symbol): Ditto.
1656         (srec_get_section_contents): Ditto.
1657         (srec_set_arch_mach): Ditto.
1658         (srec_set_section_contents): Ditto.
1659         (internal_srec_write_object_contents): Ditto.
1660         (srec_write_object_contents): Ditto.
1661         (symbolsrec_write_object_contents): Ditto.
1662         (srec_sizeof_headers): Ditto.
1663         (srec_make_empty_symbol): Ditto.
1664         (srec_get_symtab_upper_bound): Ditto.
1665         (srec_get_symtab): Ditto.
1666         (srec_print_symbol): Ditto and make static.
1667         * elf.c (elf_read): Ditto
1668         (assign_section_numbers): Ditto.
1669         (elf_fake_sections): Ditto.
1670         (sym_is_global): Ditto.
1671         (elf_map_symbols): Ditto.
1672         (get_program_header_size): Ditto.
1673         * coffgen.c (make_a_section_from_file): Ditto.
1674         (coff_real_object_p): Ditto.
1675         (fixup_symbol_value): Ditto.
1676         (build_debug_section): Ditto.
1677         (copy_name): Ditto.
1678         * syms.c (coff_section_type): Ditto.
1679         
1680 start-sanitize-m32r
1681 Mon Sep  9 22:36:01 1996  Jeffrey A Law  ([email protected])
1682
1683         * bfd-in2.h: Rebuilt after m32r changes.
1684
1685 end-sanitize-m32r
1686 Mon Sep  9 12:31:22 1996  Doug Evans  <[email protected]>
1687
1688 start-sanitize-m32r
1689         * config.bfd,configure.in,configure: Add m32r support.
1690         * Makefile.in,archures.c,elf.c,targets.c: Likewise.
1691 end-sanitize-m32r
1692         * config.bfd: Keep target list alphabetically sorted.
1693
1694 start-sanitize-v850
1695 Mon Sep  9 11:48:41 1996  Jeffrey A Law  ([email protected])
1696
1697         * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
1698         to add in the constant part found in the instruction itself.
1699         (case R_V850_HI16_S): Likewise.
1700
1701 end-sanitize-v850 
1702 Fri Sep  6 17:04:39 1996  Martin M. Hunt  <[email protected]>
1703
1704         * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
1705         and R_D10V_18 to be 1 (word).
1706
1707 Thu Sep  5 15:23:08 1996  Ian Lance Taylor  <[email protected]>
1708
1709         * stabs.c (_bfd_link_section_stabs): If the output_section field
1710         of either section is bfd_abs_section, then the linker is
1711         discarding the section and we should not optimize it.
1712
1713 Tue Sep  3 12:16:20 1996  Doug Evans  <[email protected]>
1714
1715         * Makefile.in (aout-sparcle.o): New target.
1716         * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
1717         * config.bfd (sparclet-*-aout*): Add case.
1718         * configure.in (sparcle_aout_vec): Add case.
1719         * configure: Regenerated.
1720         * targets.c (sparcle_aout_vec): Declare.
1721         (bfd_target_vector): Add sparcle_aout_vec.
1722         * aout-sparcle.c: New file.
1723
1724 start-sanitize-v850
1725 Tue Sep  3 00:57:02 1996  Jeffrey A Law  ([email protected])
1726
1727         * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
1728         low order sign bit propogation for R_V850_HI16_S.
1729
1730         * elf32-v850.c (bfd_elf32_v850_reloc): New function for
1731         handling V850 specific relocs.
1732         (elf_v850_howto_table): Use the new function for some
1733         relocations.  Twiddle masks & shifts for some relocs.
1734         Set partial_inplace where needed.
1735
1736 end-sanitize-v850
1737 Mon Sep  2 12:12:34 1996  Ian Lance Taylor  <[email protected]>
1738
1739         * cpu-mips.c: Add an explicit mips:3000 entry, and change the
1740         default architecture to a machine number of 0.
1741         * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
1742         for E_MIPS_ARCH_1.
1743         (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
1744         the output BFD is the default, set it from the first input BFD.
1745
1746 start-sanitize-v850
1747 Sun Sep  1 18:38:01 1996  Jeffrey A Law  ([email protected])
1748
1749         * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
1750         insert at bitpos zero.  The HI16 relocs are shifted right
1751         by 16 bits.  Fix src_mask for all relocs.
1752         (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define.  The V850 is
1753         little endian!
1754         (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove.  The V850 is little
1755         endian!
1756
1757 end-sanitize-v850
1758 Sun Sep  1 15:41:08 1996  Ian Lance Taylor  <[email protected]>
1759
1760         * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
1761         Rewrite to use BFD file read routines and to avoid using a fixed
1762         length for the file name.
1763
1764 start-sanitize-v850
1765 Sat Aug 31 10:22:25 1996  Jeffrey A Law  ([email protected])
1766
1767         * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
1768         (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
1769         (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
1770         to R_V850_{32,16,8}.
1771
1772 Fri Aug 30 18:06:04 1996  J.T. Conklin  <[email protected]>
1773
1774         * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
1775         (elf_v850_howto_table): Add info for HI16_S reloc.
1776         (v850_reloc_map): Add HI_16_S reloc.
1777         * reloc.c: Define BFD_RELOC_V850_* relocs.
1778
1779 end-sanitize-v850
1780 Fri Aug 30 11:49:19 1996  Ian Lance Taylor  <[email protected]>
1781
1782         Add SH ELF support.
1783         * elf32-sh.c: New file.
1784         * elf.c (prep_headers): Handle bfd_arch_sh.
1785         * elfcode.h (write_relocs): Handle absolute symbol.
1786         * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
1787         (_bfd_elf64_link_read_relocs): Declare.
1788         * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
1789         elf_link_read_relocs.  Make globally visible.  Change all
1790         callers.
1791         (elf_link_input_bfd): Get external symbols from cache in
1792         symtab_hdr->contents.  Get contents from cache in
1793         elf_section_data.
1794         * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
1795         already defined.
1796         * reloc.c: Define BFD_RELOC_SH_* relocs.
1797         * libbfd-in.h (_bfd_sh_align_load_span): Declare.
1798         * coff-sh.c (sh_insns_conflict): Fix a return value.
1799         (_bfd_sh_align_load_span): New globally visible function, broken
1800         out of sh_align_load.
1801         (sh_align_load): Call _bfd_sh_align_load_span.
1802         (sh_swap_insns): Change relocs parameter to PTR.
1803         * bfd-in2.h, libbfd.h: Rebuild.
1804         * targets.c (bfd_elf32_sh_vec): Declare.
1805         (bfd_elf32_shl_vec): Declare.
1806         * config.bfd (sh-*-elf*): New target.
1807         * configure.in (bfd_elf32_sh_vec): New target vector.
1808         (bfd_elf32_shl_vec): New target vector.
1809         * configure: Rebuild.
1810         * Makefile.in: Rebuild dependencies.
1811         (BFD32_BACKENDS): Add elf32-sh.o.
1812         (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
1813
1814         * elf.c (map_sections_to_segments): Check that LMA does not skip a
1815         page before checking D_PAGED.
1816
1817         * ihex.c (ihex_scan): Removed unnecessary extbase variable.
1818         (ihex_write_object_contents): Remove extbase; always use segbase
1819         instead.
1820
1821 Thu Aug 29 16:52:17 1996  Michael Meissner  <[email protected]>
1822
1823         * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
1824         * configure.host (i[345]86-*-*): Ditto.
1825         * config.bfd (i[345]86-*-*): Ditto.
1826         * configure: Regenerate.
1827
1828         * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
1829         elf.
1830
1831 Tue Aug 27 09:18:18 1996  Jeffrey A Law  ([email protected])
1832
1833         * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
1834         * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
1835         * som.c (hppa_som_gen_reloc_type): Add new argument.  If
1836         we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
1837         will have an ST_CODE type, change the symbol's type to ST_DATA.
1838         * som.c (hppa_som_gen_reloc_type): Update prototype.
1839
1840 Tue Aug 27 00:12:22 1996  Ian Lance Taylor  <[email protected]>
1841
1842         * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
1843         R_MIPS_32 and R_MIPS_REL32.  Set sgot and g as soon as possible.
1844         (mips_elf_size_dynamic_sections): Don't require .got to exist.
1845         (mips_elf_finish_dynamic_sections): Likewise.
1846
1847 Thu Aug 22 10:54:38 1996  Ian Lance Taylor  <[email protected]>
1848
1849         * configure.host (HLDENV): New variable to set.  Set it for
1850         *-*-sysv4*, since those linkers may not support -R but they always
1851         support LD_RUN_PATH.
1852
1853         * libieee.h (NSECTIONS): Don't define.
1854         (ieee_data_struct): Change section_table to asection **.  Add
1855         section_table_size.
1856         * ieee.c (get_section_entry): If the table isn't big enough, make
1857         it bigger.
1858         (ieee_slurp_sections): Remove assertion about number of sections.
1859         (ieee_object_p): Adjust initialization of ieee to match changes to
1860         the structure.
1861
1862         * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
1863         symbols merely because we are generating a shared library.
1864         (xcoff_build_ldsyms): Don't set up global linkage code for an
1865         undefined symbol merely because we are generating a shared
1866         library.
1867
1868 start-sanitize-v850
1869 Tue Aug 20 15:06:05 1996  J.T. Conklin  <[email protected]>
1870         
1871         * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
1872         (BFD32_BACKENDS) Add elf32-v850.o.
1873         * archures.c: Add bfd_v850_arch.
1874         * bfd-in2.h: Add bfd_v850_arch.
1875         * config.bfd (v850-*-*): New target.
1876         * configure: (bfd_elf32_v850_vec) New vector.
1877         * configure.in: (bfd_elf32_v850_vec) New vector.
1878         * cpu-v850.c: New file.
1879         * elf.c (prep_headers): Added case bfd_arch_v850.
1880         * elf32-v850.c: New file.
1881         * targets.c (bfd_elf32_v850_vec): New vector.
1882         
1883 end-sanitize-v850
1884 Fri Aug 16 16:25:35 1996  Ian Lance Taylor  <[email protected]>
1885
1886         * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
1887         a function code symbol for an XMC_XO symbol.
1888
1889 Thu Aug 15 12:33:29 1996  Stan Shebs  <[email protected]>
1890
1891         * mpw-config.in: Update editing of autoconf vars to reflect
1892         Jul 18 configure.in change.
1893         * mpw-make.sed: Update editing of include pathnames to be
1894         more general, add @DASH_C_FLAG@ to explicit compile rule edit.
1895
1896 Thu Aug 15 10:35:13 1996  Richard Henderson  <[email protected]>
1897
1898         * elf64-alpha.c (elf64_alpha_output_extsym): The section from
1899         which to offset to get the .plt entry address is ".plt".
1900
1901 Thu Aug 15 16:40:30 1996  James G. Smith  <[email protected]>
1902
1903         * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
1904         BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
1905         Added, for internal use by the ARM gas.
1906         * libbfd.h: Rebuilt
1907         * bfd-in2.h: Rebuilt
1908
1909 Wed Aug 14 17:02:09 1996  Richard Henderson  <[email protected]>
1910
1911         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
1912         in section dynidx start.
1913
1914 Tue Aug 13 14:35:38 1996  Ian Lance Taylor  <[email protected]>
1915
1916         * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
1917         name begins with .gnu.linkonce as SEC_LINK_ONCE.  This is an
1918         optimization for g++.
1919
1920 Tue Aug 13 17:04:40 1996  Michael Meissner  <[email protected]>
1921
1922         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
1923         the -mrelocatable-lib bit set and the other doesn't, clear the
1924         -mrelocatable-lib bit in the header.
1925
1926 Sat Aug 10 22:59:17 1996  Ian Lance Taylor  <[email protected]>
1927
1928         * elflink.h (elf_link_add_object_symbols): Do not resolve a common
1929         symbol against a STT_FUNC symbol in a shared library.
1930
1931 Fri Aug  9 12:44:57 1996  Ian Lance Taylor  <[email protected]>
1932
1933         * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
1934         symbol is found, automatically define the corresponding function
1935         code.
1936
1937         * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
1938         if sym.n_numaux is not zero.
1939         (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
1940         entry to disagree about the number of aux entries if the symbol
1941         has zero.
1942
1943         * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
1944         section if it might be needed, not just if info->shared.
1945         (mips_elf_adjust_dynamic_symbol): Make room for a null element at
1946         the start of .rel.dyn if we are going to use it.
1947         (mips_elf_finish_dynamic_sections): Only clear the first element
1948         of .rel.dyn if the size is greater than zero.
1949
1950 Thu Aug  8 16:24:55 1996  Ian Lance Taylor  <[email protected]>
1951
1952         * xcofflink.c (xcoff_link_input_bfd): If we already called the
1953         undefined_symbol callback for a symbol, then don't issue any more
1954         warnings about loader relocs.
1955         (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
1956         after calling the undefined_symbol callback.
1957
1958         * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
1959         (xcoff_link_add_symbols): Permit multiple definitions of a symbol
1960         as the AIX linker seems to do.
1961
1962 Thu Aug  8 12:21:56 1996  Klaus Kaempf  <[email protected]>
1963
1964         * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
1965         (evax_initialize): Remove evax_reloc_table.
1966         (evax_close_and_cleanup): Ditto.
1967         (reloc_nil): Ditto.
1968         (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
1969         entries.
1970         (evax_bfd_reloc_type_lookup): Ditto.
1971         * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
1972         cooked_size == raw_size.
1973         * evax-emh.c (_bfd_evax_register_filename): Remove.
1974         * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
1975         * evax-misc.c (add_new_contents): Malloc section at full size.
1976         (_bfd_save_evax_section): Memcpy section contents directly.
1977         * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
1978         (evax_reloc_table): Remove.
1979
1980         * hosts/alphavms.h (O_ACCMODE): Define if needed.
1981
1982         * makefile.vms: Add better support for DEC C compilation
1983         Add evax.h dependencies
1984
1985         * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
1986         (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
1987         (BFD_RELOC_ALPHA_BASEREG): Remove.
1988         * bfd-in2.h, libbfd.h: Rebuild.
1989
1990 Thu Aug  8 08:17:32 1996  Stu Grossman  ([email protected])
1991
1992         * archive.c (bsd_write_armap):  Ifdef around calls to getuid and
1993         getgid if _WIN32 is defined.
1994         * opncls.c (bfd_fdopenr):  Remove unnecessary WINGDB ifdef.
1995
1996 Wed Aug  7 23:19:00 1996  Stu Grossman  ([email protected])
1997
1998         * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
1999         Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
2000         include file.
2001         * libbfd.c:  Create dummy getpagesize() macro if HAVE_GETPAGESIZE
2002         isn't defined.
2003
2004 Wed Aug  7 14:11:44 1996  Philippe De Muyter  <[email protected]>
2005
2006         * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
2007         realloc.
2008         * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
2009         (NEED_DECLARATION_REALLOC): New macro.
2010         * configure, config.in: Rebuild.
2011         * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
2012         (realloc): Declare if NEED_DECLARATION_REALLOC.
2013
2014         * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
2015         <strings.h> if they exist.
2016
2017         * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
2018
2019 Wed Aug  7 12:12:03 1996  Ian Lance Taylor  <[email protected]>
2020
2021         * cpu-i386.c (i8086_arch): Architecture info for the i8086.
2022
2023         Based on patches from Eric Valette <[email protected]>:
2024         * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
2025         LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
2026         (elf_howto_table): Add entries for new relocs.
2027         (elf_i386_reloc_type_lookup): Handle new relocs.
2028         (elf_i386_info_to_howto): Just call abort.
2029         (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
2030         (elf_i386_relocate_section): Likewise.
2031
2032 Tue Aug  6 12:54:56 1996  Martin M. Hunt  <[email protected]>
2033
2034         * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
2035
2036 Mon Aug  5 13:42:41 1996  Ian Lance Taylor  <[email protected]>
2037
2038         * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
2039         only get the LMA from the phdr if they are in the same part of the
2040         file.
2041
2042         * elf.c (map_sections_to_segments): Rewrite tests for starting a
2043         new segment to make them more comprehensible.  If the relationship
2044         between the LMA and the VMA changed, start a new segment.  Don't
2045         check dynsec when deciding whether to start a new segment for a
2046         writeable section; -N will now handle this.
2047
2048 Thu Aug  1 22:43:08 1996  Jeffrey A Law  ([email protected])
2049
2050         * libhppa.h: Remove "esel" changes.  Not the right approach.
2051         * som.c: Corresponding changes.
2052         (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
2053         which don't have a SOM symbol type associated with them.
2054         Reverses a 1994 change.
2055
2056 Wed Jul 31 15:50:55 1996  Ian Lance Taylor  <[email protected]>
2057
2058         Make ld -N more reasonable for ELF:
2059         * elf.c (map_sections_to_segments): If D_PAGED is not set, set
2060         phdr_in_section to false, and always use a single load segment.
2061         (elf_sort_sections): Sort sections by LMA after VMA.
2062         (assign_file_positions_for_segments): If D_PAGED is not set, don't
2063         align to maxpagesize.
2064         (assign_file_positions_except_relocs): Likewise.
2065         * elfcode.h (elf_object_p): If a section is loaded but not page
2066         aligned, clear D_PAGED.
2067
2068 Wed Jul 31 15:00:12 1996  James G. Smith  <[email protected]>
2069
2070         * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
2071         Added, for internal use by the ARM gas.
2072         * libbfd.h: Rebuilt
2073         * bfd-in2.h: Rebuilt
2074
2075 Tue Jul 30 14:14:57 1996  Jeffrey A Law  ([email protected])
2076
2077         * libhppa.h (R_HPPA_ESEL): New field selector.
2078         (e_esel): Similarly.
2079         * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
2080         then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
2081         (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
2082
2083 Tue Jul 30 13:31:27 1996  Ian Lance Taylor  <[email protected]>
2084
2085         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
2086         archive search before looking for stripped dynamic objects.
2087
2088 Fri Jul 26 17:51:39 1996  Ian Lance Taylor  <[email protected]>
2089
2090         * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
2091         symbol a warning rather than an error.
2092
2093 Wed Jul 24 12:02:53 1996  Ian Lance Taylor  <[email protected]>
2094
2095         * elf.c (assign_file_positions_for_segments): Track the virtual
2096         memory position separately from the file position, and use it to
2097         compute the alignment adjustment.
2098
2099 Tue Jul 23 10:43:31 1996  Martin M. Hunt  <[email protected]>
2100
2101         * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
2102         and fixed mask on R_D10V_10_PCREL_L.
2103
2104 Mon Jul 22 15:30:30 1996  Ian Lance Taylor  <[email protected]>
2105
2106         * elf64-mips.c: Include "aout/ar.h".
2107         (mips_elf64_slurp_armap): New static function.
2108         (mips_elf64_write_armap): New static function.
2109         (bfd_elf64_archive_*): Define.
2110         * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
2111         Use instead of bfd_generic_archive_p.
2112         (bfd_elfNN_write_archive_contents): Define if not defined.  Use
2113         instead of _bfd_write_archive_contents.
2114         (bfd_elfNN_mkdarchive): Define if not defined.  Use instead of
2115         _bfd_generic_mkarchive.
2116         (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
2117         bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
2118         _bfd_archive_coff.
2119         (TARGET_LITTLE_SYM): Likewise.
2120         * archive.c (bfd_slurp_armap): Check for and reject an archive map
2121         name of /SYM64/.
2122         * Makefile.in: Rebuild dependencies.
2123
2124         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
2125         SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
2126         SHT_MIPS_EVENTS sections.
2127         (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
2128         SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
2129         sections.
2130         (_bfd_mips_elf_fake_sections): Likewise.
2131
2132         * libecoff.h (ecoff_data_type): Add rdata_in_text field.
2133         * ecoff.c (ecoff_compute_section_file_positions): Copy
2134         rdata_in_text from backend info to tdata.  Clear it if any data
2135         section comes before .rdata.
2136         (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
2137         tdata rather than backend info.
2138
2139 Fri Jul 19 18:15:51 1996  Ian Lance Taylor  <[email protected]>
2140
2141         * configure.in: Fix test for whether a compiler has a 64 bit
2142         type.  From Jim Wilson <[email protected]>.
2143
2144 Thu Jul 18 15:39:10 1996  Ian Lance Taylor  <[email protected]>
2145
2146         * configure.host (mips-sgi-irix6*): New host.
2147
2148         * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
2149         (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
2150         BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT.  Add bfd-in2.h:bfd-in2.h
2151         to AC_OUTPUT call.
2152         * configure: Rebuild.
2153         * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
2154         (BFD_HOST_64_BIT): Define conditionally.
2155         (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
2156         (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
2157         (symvalue, bfd_size_type): Likewise.
2158         * bfd-in2.h: Rebuild.
2159         * Makefile.in (do_clean): Remove bfd-tmp.h.
2160         (do_distclean): Remove bfd-in3.h.
2161         (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
2162         (bfd-in3.h): New target.
2163
2164         * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec.  From
2165         Andrew Gierth <[email protected]>.
2166
2167         * configure.host: Set INSTALL_SHLIB.
2168         * configure.in: Call AC_SUBST (INSTALL_SHLIB).
2169         * configure: Rebuild.
2170         * Makefile.in (install): Use @INSTALL_SHLIB@.
2171
2172         * config.bfd (mips*-*-irix6*): New target.
2173         * configure.host: Handle Irix 6 shared library like Irix 5.
2174
2175         * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
2176         symbol for a magic name.
2177         (xcoff_link_input_bfd): Don't change the reloc symbol for an
2178         XMC_TD symbol.
2179         (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
2180         XMC_TD symbol.
2181
2182 Thu Jul 18 11:36:31 1996  Stan Shebs  <[email protected]>
2183
2184         * mpw-config.in: Add ELF support to mips config, create the
2185         elf32-target.h file in the object dir.
2186         * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
2187
2188 Wed Jul 17 18:02:32 1996  Kim Knuttila  <[email protected]>
2189
2190         * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
2191         Also removed most abort calls, in favor of using bfd reporting.
2192
2193 Wed Jul 17 14:51:52 1996  Martin M. Hunt  <[email protected]>
2194
2195         * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
2196         (BFD32_BACKENDS) Add elf32-d10v.o.
2197         * archures.c: Add bfd_d10v_arch.
2198         * bfd-in2.h: Add bfd_d10v_arch.
2199         * config.bfd (d10v-*-*): New target.
2200         * configure: (bfd_elf32_d10v_vec) New vector.
2201         * configure.in: (bfd_elf32_d10v_vec) New vector.
2202         * cpu-d10v.c: New file.
2203         * elf.c (prep_headers): Added case bfd_arch_d10v.
2204         * elf32-d10v.c: New file.
2205         * libbfd.h: Rebuild.
2206         * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
2207         BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
2208         * targets.c (bfd_elf32_d10v_vec): New vector.
2209         
2210 Wed Jul 17 10:58:55 1996  Kim Knuttila  <[email protected]>
2211
2212         * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
2213
2214 Tue Jul 16 23:49:02 1996  Stu Grossman  ([email protected])
2215
2216         * archures.c bfd-in2.h:  Add bfd_mach_i386_i386 and
2217         bfd_mach_i386_i8086 machine types.
2218
2219 Wed Jul 10 12:42:56 1996  Ian Lance Taylor  <[email protected]>
2220
2221         * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
2222         and _FINI sections.
2223
2224 Wed Jul 10 11:18:21 1996  Richard Henderson  <[email protected]>
2225
2226         * coffcode.h (coff_set_section_contents): A/UX does not require
2227         special handling of the _LIB section.
2228
2229 Tue Jul  9 15:52:20 1996  Jeffrey A Law  ([email protected])
2230
2231         * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
2232         value for R_RELBYTE.
2233
2234         * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
2235         array if one was allocated.
2236
2237 Tue Jul  9 12:21:54 1996  Ian Lance Taylor  <[email protected]>
2238
2239         From Kazumoto Kojima <[email protected]>:
2240         * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
2241         use_rld_obj_head and rld_value.
2242         (mips_elf_link_hash_table_create): Initialize new fields.
2243         (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
2244         dynamic.
2245         (mips_elf_create_dynamic_sections): Create .rld_map section.  If
2246         __rld_obj_head symbol not seen, create an __rld_map symbol.
2247         (mips_elf_size_dynamic_sections): Make space in .rld_map section.
2248         Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
2249         (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
2250         __rld_obj_head symbol.
2251         (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
2252
2253 Mon Jul  8 16:18:03 1996  Ian Lance Taylor  <[email protected]>
2254
2255         * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
2256
2257         * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
2258         ppc_elf_addr16_ha_reloc.
2259         (ppc_elf_addr16_ha_reloc): New static function.
2260
2261         * coff-mips.c (struct mips_hi): Define.
2262         (mips_refhi_list): New static variable.
2263         (mips_refhi_addr, mips_refhi_addend): Remove.
2264         (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
2265         (mips_reflo_reloc): Process mips_refhi_list.
2266         (mips_relhi_list): New static variable.
2267         (mips_relhi_addr, mips_relhi_addend): Remove.
2268         (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
2269         (mips_rello_reloc): Process mips_relhi_list.
2270         (mips_relocate_section): Permit an arbitrary number of REFHI or
2271         RELHI relocs before the associated REFLO or RELLO reloc.
2272
2273 Fri Jul  5 19:27:49 1996  Ian Lance Taylor  <[email protected]>
2274
2275         * aout-target.h (MY(callback)): Set reloc_count fields.
2276
2277 Thu Jul  4 12:00:37 1996  Ian Lance Taylor  <[email protected]>
2278
2279         * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
2280         sections unless this is a SunOS link.
2281
2282         * VERSION: Set to 2.7.1.
2283
2284         * Released binutils 2.7.
2285
2286 Wed Jul  3 14:59:47 1996  Ian Lance Taylor  <[email protected]>
2287
2288         * i386aout.c: Include "aout/aout64.h".
2289         (i386aout_write_object_contents): New static function.
2290         (MY_write_object_contents): Define.
2291
2292         * netbsd.h (MY(write_object_contents)): Make sure that
2293         adjust_sizes_and_vmas is called before fiddling with the magic
2294         number.
2295
2296 Tue Jul  2 23:30:39 1996  Ian Lance Taylor  <[email protected]>
2297
2298         * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
2299
2300 Sun Jun 30 13:34:33 1996  Ian Lance Taylor  <[email protected]>
2301
2302         * libbfd-in.h (itos, stoi): Don't define.
2303         * libbfd.h: Rebuild.
2304         * i386lynx.c (KEEPIT): Define as udata.i.
2305         (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
2306         (NAME(lynx,swap_ext_reloc_out)): Likewise.
2307         * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
2308         flags.  Don't use stoi.
2309
2310         * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
2311
2312         * elf.c (map_sections_to_segments): Don't start a new segment for
2313         a writable section if it's on the same page as the previous
2314         segment.  Reset the writable variable for a readonly section.
2315
2316 Sat Jun 29 16:18:51 1996  Kim Knuttila  <[email protected]>
2317
2318         * peicode.h (coff_swap_aouthdr_in): Missing initializations of
2319         first_thunk_address, thunk_size, and import_table_size.
2320         * peicode.h: Improved some diagnostics regarding edata sections.
2321
2322         * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
2323         on IMGLUE relocs.
2324         (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
2325         (TARGET_LITTLE_SYM): Added missing D_PAGED.
2326
2327 Fri Jun 28 13:48:45 1996  Ian Lance Taylor  <[email protected]>
2328
2329         * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
2330         with XCOFF_DEF_DYNAMIC set is really defined.
2331         (xcoff_link_check_dynamic_ar_symbols): Likewise.
2332         (xcoff_link_add_symbols): Only create special sections if using an
2333         XCOFF hash table.
2334
2335         * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
2336         aixcoff-rs6000.
2337         (bfd_install_relocation): Likewise.
2338
2339 Fri Jun 28 11:17:00 1996  Richard Henderson  <[email protected]>
2340
2341         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
2342         field.
2343         (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
2344         (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
2345         (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
2346         (elf64_alpha_link_hash_newfunc): Initialize flags field.
2347         (elf64_alpha_check_relocs): Record types of LITUSE entries that
2348         are found for LITERAL relocs.
2349         (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
2350         taken, we cannot generate a .plt entry for the symbol.
2351
2352 Thu Jun 27 11:24:29 1996  Ian Lance Taylor  <[email protected]>
2353
2354         * configure.in: Add AC_ISC_POSIX, and check for setitimer and
2355         sysconf functions (for gprof).
2356         * configure, config.in: Rebuild.
2357
2358 Wed Jun 26 16:29:02 1996  Ian Lance Taylor  <[email protected]>
2359
2360         * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
2361         an archive if it has a map.  If the object file has the wrong
2362         xvec, reject it.
2363
2364         * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
2365         BRADDR, SREL16, SREL32, or SREL64 reloc against an external
2366         symbol.
2367         (alpha_relocate_section): Likewise.
2368
2369         * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
2370         (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
2371         (coff_swap_sym_out): Use SYMESZ, not sizeof.
2372         (coff_swap_aux_out): Use AUXESZ, not sizeof.
2373         (coff_swap_lineno_out): Use LINESZ, not sizeof.
2374         (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
2375         (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
2376         * peicode.h: Corresponding changes.
2377
2378 Tue Jun 25 15:28:34 1996  Michael Meissner  <[email protected]>
2379
2380         * elflink.h (elf_create_pointer_linker_section): Comment out code
2381         dealing with making GOT pointers negative of the GOT symbol for
2382         now.
2383
2384 Tue Jun 25 11:41:24 1996  Richard Henderson  <[email protected]>
2385
2386         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
2387         increment the .rela.plt size until after we're done creating the
2388         .plt entry.
2389         (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
2390         .rela.plt offset directly rather than calculating it.
2391
2392 Mon Jun 24 17:15:10 1996  Jason Molenda  ([email protected])
2393  
2394         * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir): 
2395         Use autoconf-set values.
2396         * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir, 
2397         includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set 
2398         values.
2399         (docdir): Deleted.
2400         * configure.in (AC_PREREQ): autoconf v2.5 or higher.
2401         * configure: Rebuilt.
2402  
2403 Mon Jun 24 22:50:35 1996  Jeffrey A Law  ([email protected])
2404
2405         * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
2406         handling code > 1k away.
2407
2408 Mon Jun 24 18:41:06 1996  Michael Meissner  <[email protected]>
2409
2410         * elflink.h (elf_create_pointer_linker_section): If DEBUG is
2411         defined, output whenever the symbol is updated.
2412
2413 Mon Jun 24 17:58:12 1996  Jouke Numan  <[email protected]>
2414
2415         * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
2416         section to 0 if user_set_vma is set.
2417         * elflink.h (elf_bfd_final_link): Likewise.
2418
2419 Sun Jun 23 20:42:51 1996  Doug Evans  <[email protected]>
2420
2421         Partially undo patch of Jun 20.
2422         * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
2423         (coff_compute_section_file_positions): Likewise.
2424         (coff_write_object_contents): Likewise.  Re-add deleted code, but
2425         use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
2426         * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
2427
2428 Fri Jun 21 17:38:15 1996  Joel Sherrill  <[email protected]>
2429
2430         * config.bfd: Add support for *-*-rtems* configurations.
2431         
2432 Fri Jun 21 15:19:59 1996  Ian Lance Taylor  <[email protected]>
2433
2434         * elf.c (prep_headers): Add bfd_arch_alpha case.
2435
2436 Fri Jun 21 12:35:27 1996  Richard Henderson  <[email protected]>
2437
2438         * elf64-alpha.c: New file.
2439         * config.bfd (alpha-*-linuxecoff*): New target.
2440         (alpha-*-linux*, alpha-*-elf*): New targets.
2441         * configure.in (bfd_elf64_alpha_vec): New vector.
2442         * configure: Rebuild.
2443         * targets.c (bfd_elf64_alpha_vec): Declare.
2444         (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
2445         * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
2446         * bfd-in2.h, libbfd.h: Rebuild.
2447         * Makefile.in: Rebuild dependencies.
2448         (BFD64_BACKENDS): Add elf64-alpha.o.
2449         (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
2450
2451 Thu Jun 20 18:14:25 1996  Ian Lance Taylor  <[email protected]>
2452
2453         * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
2454         than relying on a right shift of 32.
2455
2456 Thu Jun 20 11:00:57 1996  Doug Evans  <[email protected]>
2457
2458         * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
2459         ifdef to COFF_WITH_PE.
2460         (coff_compute_section_file_positions): Likewise.
2461         (coff_write_object_contents): Likewise.  Delete COFF_OBJ_WITH_PE.
2462         * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
2463         * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
2464         COFF_IMAGE_WITH_PE, always include.
2465
2466         * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
2467
2468 Wed Jun 19 11:37:52 1996  Ian Lance Taylor  <[email protected]>
2469
2470         * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
2471         approximate the correct answer if SIZEOF_HEADERS was not used.
2472
2473         * binary.c (binary_set_section_contents): Set section file
2474         position based on LMA rather than VMA.
2475
2476 Wed Jun 19 11:19:25 1996  Manfred Hollstein KS/EIC5 60/3/142 #40283  <[email protected]>
2477
2478         * linker.c (_bfd_generic_link_output_symbols): Don't output any
2479         symbols if info->strip == strip_all.
2480
2481 Tue Jun 18 15:17:36 1996  Jeffrey A. Law  <[email protected]>
2482
2483         * coff-h8300.c: Remove #if 0 code.
2484         (compatable): Don't allow mixing/matching of different architectures.
2485         
2486         * archures.c (bfd_mach_h8300s): Add.
2487         * bfd-in2.h: Rebuilt.
2488         * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
2489         (BADMAG): Likewise.
2490         (h8300_reloc16_estimate): Likewise.
2491         (h8300_reloc16_extra_cases): Likewise.
2492         (h8300_bfd_link_add_symbols): Likewise.
2493         * coffcode.h (coff_set_arch_mach_hook): Likewise.
2494         (coff_set_flags): Likewise.
2495         * cpu-h8300.c (h8300_scan): Likewise.
2496         Add H8/S to bfd_h8300_arch list.
2497
2498 Tue Jun 18 14:42:58 1996  Klaus Kaempf  <[email protected]>
2499
2500         Added support for Alpha OpenVMS:
2501         * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
2502         * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
2503         * config.h-vms, makefile.vms: New files.
2504         * config.bfd (alpha-*-*vms*): New target.
2505         * configure.in (evax_alpha_vec): New target vector.
2506         * configure: Rebuild.
2507         * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
2508         (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
2509         * targets.c (bfd_target_evax_flavour): Define.
2510         (evax_alpha_vec): Declare.
2511         (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
2512         if BFD64 is defined.
2513         * bfd-in2.h, libbfd.h: Rebuild.
2514         * Makefile.in: Rebuild dependencies.
2515         (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
2516         evax-emh.o, and evax-misc.o.
2517         (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
2518         evax-etir.c, evax-emh.c, and evax-misc.c.
2519         (HFILES): Add evax.h.
2520
2521 Tue Jun 18 13:54:18 1996  Ian Lance Taylor  <[email protected]>
2522
2523         * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
2524         pointer.
2525         (h8300_bfd_link_add_symbols): Likewise.
2526
2527 Mon Jun 17 10:06:50 1996  Jeffrey A. Law  <[email protected]>
2528
2529         * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
2530         * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
2531
2532 Mon Jun 17 12:49:11 1996  Ian Lance Taylor  <[email protected]>
2533
2534         * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
2535         for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
2536         created.
2537         (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
2538         R_MIPS_32 relocs if creating a shared library.
2539
2540 Thu Jun 13 20:14:51 1996  Doug Evans  <[email protected]>
2541
2542         * peicode.h (add_data_entry): Use pei_section_data rather than
2543         _cooked_size.  Corresponds to May 13 change in coffcode.h.
2544
2545 Thu Jun 13 10:23:40 1996  Ian Lance Taylor  <[email protected]>
2546
2547         * cofflink.c (_bfd_coff_final_link): Handle long section names.
2548         * coffcode.h (coff_write_object_contents): If there are long
2549         section names, always set the f_symptr field, even if there are no
2550         symbols.
2551         * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
2552         if there are no symbols.
2553
2554         * coffgen.c (make_a_section_from_file): Check return value of
2555         _bfd_coff_read_string_table.
2556         (coff_real_object_p): Check return value of
2557         make_a_section_from_file.
2558         (_bfd_coff_read_string_table): Check that there are some symbols
2559         before trying to read the string table size.
2560
2561 Wed Jun 12 11:16:37 1996  Ian Lance Taylor  <[email protected]>
2562
2563         * xcofflink.c (xcoff_link_add_symbols): When considering whether
2564         to replace a symbol in a dynamic object with a symbol from another
2565         dynamic object, do the replacement if the existing symbol is
2566         global linkage code.
2567
2568         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
2569         for _ptrgl, and treat it as global linkage code.
2570
2571         * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
2572         filename or N_SO symbol past the offset, and use it to indicate
2573         that there is no line number or function when appropriate.
2574
2575 Tue Jun 11 15:24:48 1996  Ian Lance Taylor  <[email protected]>
2576
2577         * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
2578         common symbol defined by the linker.  Don't export function code
2579         even if export_defineds is set.
2580
2581 Mon Jun 10 11:57:27 1996  Jeffrey A Law  ([email protected])
2582
2583         * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
2584         and R_JMP_DEL.
2585         (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
2586         (h8300_symbol_address_p): New function.
2587         (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
2588         relaxing.
2589
2590 Sun Jun  9 16:30:20 1996  Jeffrey A Law  ([email protected])
2591
2592         * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
2593         problems.
2594         (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
2595         correctly for the two variants.  Allow relaxing if the target
2596         is 128 bytes away since after relaxation it'll be 126 bytes away.
2597         (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
2598         "dot" and "value".  Allow relaxing if the target is 128 bytes
2599         away since after relaxation it'll be 126 bytes away.
2600         * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
2601         the given section until nothing changes.
2602
2603 Thu Jun  6 15:24:45 1996  Richard Henderson  <[email protected]>
2604
2605         * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
2606         alignment hack--we can get the lnnoptr info another way without
2607         suddenly increasing the alignment requirements.  Set the flags for
2608         the _PDATA section.
2609         (ecoff_compute_section_file_positions): Do so.
2610
2611 Thu Jun  6 11:24:37 1996  Ian Lance Taylor  <[email protected]>
2612
2613         * ieee.c (ieee_write_object_contents): Put a timestamp in the file
2614         to keep the HP emulator database happy.
2615
2616         * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
2617         From Kevin Buettner <[email protected]>.
2618
2619 Wed Jun  5 15:16:04 1996  Ian Lance Taylor  <[email protected]>
2620
2621         * aoutx.h (translate_to_native_sym_flags): Don't try to print the
2622         name of a NULL section.
2623
2624 Tue Jun  4 18:53:58 1996  Ian Lance Taylor  <[email protected]>
2625
2626         * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
2627         set, always call the notice callback.
2628
2629         * VERSION: Increment for bfdlink.h change.
2630
2631 Mon Jun  3 11:01:53 1996  Ian Lance Taylor  <[email protected]>
2632
2633         * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
2634         (sh_relax_delete_bytes): Correct handling of differently sized
2635         trailing alignment reloc.
2636
2637         * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
2638         * bfd-in2.h: Rebuild.
2639         * configure.in: Warn if there is no known 64 bit type.
2640         * configure: Rebuild.
2641
2642         * Makefile.in: Rebuild dependencies.
2643         (BFD32_BACKENDS): Add ppcboot.o.
2644         (BFD32_BACKENDS_CFILES): Add ppcboot.c.
2645
2646         * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
2647         From Per Fogelstrom <[email protected]>.
2648
2649 Sat Jun  1 21:49:58 1996  Ian Lance Taylor  <[email protected]>
2650
2651         * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
2652         (bfd_mips_elf64_swap_reginfo_out): Move from here...
2653         * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
2654         (bfd_mips_elf64_swap_reginfo_out): ...to here.
2655
2656 Fri May 31 13:51:28 1996  Ian Lance Taylor  <[email protected]>
2657
2658         * elf64-mips.c: Improve reloc special_functions and handling of
2659         SHT_MIPS_OPTIONS section.
2660         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
2661         mips_elf_hi16_reloc and make globally visible.
2662         (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
2663         make globally visible.
2664         (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
2665         make globally visible.
2666         (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
2667         and make globally visible.
2668         (gprel16_with_gp): Check howto->src_mask before using value in
2669         insn.
2670         (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
2671         and make globally visible.
2672         (gprel32_with_gp): Check howto->src_mask before fetching value.
2673         (bfd_mips_elf_swap_options_in): New function.
2674         (bfd_mips_elf_swap_options_out): New function.
2675         (_bfd_mips_elf_set_private_flags): Rename from
2676         mips_elf_set_private_flags and make globally visible.
2677         (_bfd_mips_elf_copy_private_bfd_data): Rename from
2678         mips_elf_copy_private_bfd_data and make globally visible.
2679         (_bfd_mips_elf_merge_private_bfd_data): Rename from
2680         mips_elf_merge_private_bfd_data and make globally visible.
2681         (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
2682         for a SHT_MIPS_OPTIONS section.
2683         (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
2684         (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
2685         name of a SHT_MIPS_OPTIONS section.
2686         (_bfd_mips_elf_set_section_contents): New function.
2687         (mips_elf32_section_processing): Set the GP value in a
2688         SHT_MIPS_OPTIONS section.
2689         (_bfd_mips_elf_find_nearest_line): Rename from
2690         mips_elf_find_nearest_line and make globally visible.
2691         (bfd_elf32_set_section_contents): Define.
2692         * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
2693         (_bfd_mips_elf_lo16_reloc): Declare.
2694         (_bfd_mips_elf_gprel16_reloc): Declare.
2695         (_bfd_mips_elf_got16_reloc): Declare.
2696         (_bfd_mips_elf_gprel32_reloc): Declare.
2697         (_bfd_mips_elf_set_private_flags): Declare.
2698         (_bfd_mips_elf_copy_private_bfd_data): Declare.
2699         (_bfd_mips_elf_merge_private_bfd_data): Declare.
2700         (_bfd_mips_elf_find_nearest_line): Declare.
2701         (_bfd_mips_elf_set_section_contents): Declare.
2702
2703         * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
2704         elf_info_to_howto.
2705         (elf_info_to_howto): Define.
2706         * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
2707         elf_info_to_howto.
2708         (elf_info_to_howto): Define.
2709         * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
2710         elf_info_to_howto.
2711         (elf_info_to_howto): Define.
2712
2713         * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
2714         R_MOV16B[12], to match change in coff/internal.h.
2715
2716 Thu May 30 12:38:49 1996  Ian Lance Taylor  <[email protected]>
2717
2718         * elf64-mips.c: Extensive additions to provide better support for
2719         writing files and for gas.
2720         * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
2721         of mips_elf_object_p.
2722         (mips_elf32_object_p): Rename from mips_elf_object_p; call
2723         _bfd_mips_elf_object_p.
2724         (_bfd_mips_elf_final_write_processing): Rename from
2725         mips_elf_final_write_processing and make globally visible.
2726         (_bfd_mips_elf_fake_sections): Rename from
2727         mips_elf_fake_sections and make globally visible.
2728         (_bfd_mips_elf_section_from_bfd_section): Rename from
2729         mips_elf_section_from_bfd_section and make globally visible.
2730         (_bfd_mips_elf_section_processing): New function, broken out of
2731         mips_elf_section_processing.
2732         (mips_elf32_section_processing): Rename from
2733         mips_elf_section_processing; call
2734         _bfd_mips_elf_section_processing.
2735         (_bfd_mips_elf_symbol_processing): Rename from
2736         mips_elf_symbol_processing and make globally visible.
2737         (_bfd_mips_elf_read_ecoff_info): Rename from
2738         mips_elf_read_ecoff_info and make globally visible.
2739         (mips_elf32_ecoff_debug_swap): Rename from
2740         mips_elf_ecoff_debug_swap.
2741         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
2742         struct symbol_cache_entry.
2743         (_bfd_elf_validate_reloc): New function, moved in from
2744         elfcode.h:validate_reloc.
2745         * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
2746         to _bfd_elf_validate_reloc.  Change all callers.
2747         * elf-bfd.h (bfd_section_from_shdr): Declare.
2748         (_bfd_elf_symbol_from_bfd_symbol): Declare.
2749         (_bfd_elf_validate_reloc): Declare.
2750         (_bfd_mips_elf_object_p): Declare.
2751         (_bfd_mips_elf_fake_sections): Declare.
2752         (_bfd_mips_elf_section_from_bfd_section): Declare.
2753         (_bfd_mips_elf_section_processing): Declare.
2754         (_bfd_mips_elf_symbol_processing): Declare.
2755         (_bfd_mips_elf_read_ecoff_info): Declare.
2756         (_bfd_mips_elf_final_write_processing): Declare.
2757         * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
2758         if already defined.
2759
2760         * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
2761         (mips_elf_final_write_processing): Likewise.
2762
2763 Wed May 29 16:15:29 1996  Ian Lance Taylor  <[email protected]>
2764
2765         64-bit MIPS ELF ABI objdump support:
2766         * elf64-mips.c: New file.
2767         * Makefile.in: Rebuild dependencies.
2768         (BFD64_BACKENDS): Add elf64-mips.o.
2769         (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
2770         * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
2771         bfd_elf64_littlemips_vec to targ_selvecs.
2772         (mips*-*-elf*): Likewise.
2773         * confingure.in: Add bfd_elf64_bigmips_vec and
2774         bfd_elf64_littlemips_vec to vector switch.
2775         * configure: Rebuild.
2776         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
2777         broken out of mips_elf_section_from_shdr.
2778         (mips_elf32_section_from_shdr): Rename from
2779         mips_elf_section_from_shdr.  Call new function.
2780         (elf_backend_section_from_shdr): Update name of renamed function.
2781         * elf-bfd.h (struct elf_size_info): Change second parameter of
2782         write_out_phdrs to be const.  Likewise for second parameter of
2783         swap_symbol_out.
2784         (struct bfd_elf_section_data): Add rel_hdr2 field.
2785         (bfd_elf32_swap_symbol_in): Change second parameter to be const.
2786         (bfd_elf32_swap_symbol_out): Likewise.
2787         (bfd_elf32_swap_reloc_in): Likewise.
2788         (bfd_elf32_swap_reloc_out): Likewise.
2789         (bfd_elf32_swap_reloca_in): Likewise.
2790         (bfd_elf32_swap_reloca_out): Likewise.
2791         (bfd_elf32_swap_phdr_in): Likewise.
2792         (bfd_elf32_swap_phdr_out): Likewise.
2793         (bfd_elf32_swap_dyn_in): Likewise.
2794         (bfd_elf32_swap_dyn_out): Likewise.
2795         (bfd_elf32_slurp_symbol_table): Declare.
2796         (bfd_elf32_write_shdrs_and_ehdr): Declare.
2797         (bfd_elf32_write_out_phdrs): Declare.
2798         (bfd_elf64_swap_symbol_in): Change second parameter to be const.
2799         (bfd_elf64_swap_symbol_out): Likewise.
2800         (bfd_elf64_swap_reloc_in): Likewise.
2801         (bfd_elf64_swap_reloc_out): Likewise.
2802         (bfd_elf64_swap_reloca_in): Likewise.
2803         (bfd_elf64_swap_reloca_out): Likewise.
2804         (bfd_elf64_swap_phdr_in): Likewise.
2805         (bfd_elf64_swap_phdr_out): Likewise.
2806         (bfd_elf64_swap_dyn_in): Likewise.
2807         (bfd_elf64_swap_dyn_out): Likewise.
2808         (bfd_elf64_slurp_symbol_table): Declare.
2809         (bfd_elf64_write_shdrs_and_ehdr): Declare.
2810         (bfd_elf64_write_out_phdrs): Declare.
2811         (_bfd_mips_elf_section_from_shdr): Declare.
2812         * elf.c (bfd_section_from_shdr): Remove assertion requiring
2813         SHT_REL/SHT_RELA to match use_rela_p.  If there is already a reloc
2814         section for the section, add the new one to rel_hdr2.  Increment
2815         reloc_count rather than setting it.
2816         * elfcode.h (elf_slurp_symbol_table): Define name as macro.
2817         Remove static declaration.
2818         (elf_write_shdrs_and_ehdr): Define name as macro.
2819         (elf_write_out_phdrs): Likewise.
2820         (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
2821         (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
2822         (elf_swap_symbol_in): Change second parameter to be const.
2823         (elf_swap_symbol_out): Likewise.
2824         (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
2825         (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
2826         (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
2827         (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
2828         (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
2829         (elf_write_out_phdrs): Rename from write_out_phdrs.  Change second
2830         parameter to be const.  Make non-static.
2831         (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
2832         Make non-static.
2833         (elf_slurp_symbol_table): Make non-static.
2834         (NAME(_bfd_elf,size_info)): Update names of renamed functions.
2835         * elfxx-target.h (elf_info_to_howto): Define if not defined.
2836         (elf_backend_size_info): Likewise.
2837         (elfNN_bed): Use elf_backend_size_info.
2838         * targets.c (bfd_elf64_bigmips_vec): Declare.
2839         (bfd_elf64_littlemips_vec): Declare.
2840         (bfd_target_vector): Add bfd_elf64_bigmips_vec and
2841         bfd_elf64_littlemips_vec if BFD64 is defined.
2842         
2843         * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
2844
2845 Tue May 28 11:42:08 1996  Ian Lance Taylor  <[email protected]>
2846
2847         * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
2848         zeroes, in alignment holes.
2849
2850         * configure: Rebuild with autoconf 2.10.
2851
2852         * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
2853         potential leading underscore in the allocated buffer.
2854
2855 Fri May 24 14:28:38 1996  Michael Meissner  <[email protected]>
2856
2857         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
2858         symbols into .sbss if this is a relocatable link.
2859
2860 Thu May 23 12:26:24 1996  Ian Lance Taylor  <[email protected]>
2861
2862         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
2863         undefined symbols when creating a shared library.
2864
2865 Fri May 17 13:54:15 1996  Ian Lance Taylor  <[email protected]>
2866
2867         * coff-sh.c: Add a bunch of new code and static const arrays to
2868         support aligning loads and stores on four byte memory boundaries.
2869         Also:
2870         (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
2871         R_SH_LABEL.
2872         (sh_relax_section): Look for R_SH_CODE relocs.  If we find one,
2873         call sh_align_loads.
2874         (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
2875         as unused.
2876
2877 Thu May 16 16:34:13 1996  Ian Lance Taylor  <[email protected]>
2878
2879         * cache.c (bfd_open_file): Unlink the file before opening it for
2880         write.  From Marty Leisner <[email protected]>.
2881
2882         * opncls.c (bfd_fdopenr): Set opened_once.
2883
2884 Tue May 14 12:35:32 1996  Ian Lance Taylor  <[email protected]>
2885
2886         * som.c (som_slurp_reloc_table): Clear external_relocs cache after
2887         freeing it.
2888
2889         * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
2890         the code unconditionally.
2891
2892 Mon May 13 19:51:37 1996  Ian Lance Taylor  <[email protected]>
2893
2894         * libcoff-in.h (struct pei_section_tdata): Define structure.
2895         (pei_section_data): Define macro.
2896         * libcoff.h: Rebuild.
2897         * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
2898         store s_paddr field in pei_section_data.
2899         (coff_compute_section_file_positions): Use pei_section_data rather
2900         than _cooked_size, and don't overwrite an existing value.
2901         (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
2902         0.  If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
2903         * peicode.h (coff_bfd_copy_private_section_data): Define if
2904         COFF_IMAGE_WITH_PE.
2905         (pe_bfd_copy_private_section_data): New static function if
2906         COFF_IMAGE_WITH_PE.
2907
2908 Wed May  8 16:10:38 1996  Ian Lance Taylor  <[email protected]>
2909
2910         * srec.c (srec_set_arch_mach): Write as a function rather than a
2911         macro definition.
2912
2913         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
2914         no map, just check each member in turn to see whether it is
2915         required.
2916
2917 Wed May  8 09:17:34 1996  Michael Meissner  <[email protected]>
2918
2919         * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
2920         table.  Call BFD_ASSERT to validate header size, instead of
2921         calling fatal.
2922         (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
2923         name.
2924
2925 Tue May  7 16:10:19 1996  Michael Meissner  <[email protected]>
2926
2927         * ppcboot.c: New target for looking at PPCbug boot records.
2928
2929         * config{ure.in,.bfd}: Add support for ppcboot target.
2930         * targets.c: Ditto.
2931         * configure: Regenerate.
2932                 
2933 Tue May  7 11:15:19 1996  Jeffrey A Law  ([email protected])
2934
2935         * coff-h8300.c (howto_table): Update names to match recent
2936         changes to include/coff/internal.h.  Fix minor errors in the
2937         existing relocs.  Add R_MOVL1 and R_MOVL2.
2938         (rtype2howto): Similarly.
2939         (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
2940         existing relaxing code  and peform more relaxing.
2941         (h8300_reloc16_extra_cases): Likewise.
2942
2943 Mon May  6 18:24:09 1996  Jeffrey A Law  ([email protected])
2944
2945         * reloc16.c (bfd_coff_reloc16_get_value): Handle common
2946         symbols correctly.
2947
2948 Sat May  4 05:08:45 1996  Peter Schauer  ([email protected])
2949
2950         * elfcode.h (elf_object_p):  Reject generic ELF target if
2951         e_machine matches an alternate machine code in a specific backend.
2952
2953         * netbsd-core.c (netbsd_core_vec):  Remove initializer for
2954         obsolete align_power_min field.
2955
2956 Fri May  3 13:07:35 1996  Jeffrey A Law  ([email protected])
2957
2958         * coff-h8300.c (reloc_howto_type): Add howto entry for
2959         R_PCRWORD_B.
2960         (rtype2howto): Handle R_PCRWORD_B.
2961         (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
2962         (h8300_reloc_16_estimate): Likewise.  Try to turn a 16bit
2963         pc-relative branch (R_PCRWORD) into an 8bit pc-relative
2964         branch (R_PCWORD_B).
2965
2966 Fri May  3 10:47:41 1996  Ian Lance Taylor  <[email protected]>
2967
2968         * aoutx.h (translate_from_native_sym_flags): Set the section for
2969         BSF_CONSTRUCTOR symbols.
2970
2971         * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
2972         last_bf_index.
2973
2974 Wed May  1 18:39:32 1996  Doug Evans  <[email protected]>
2975
2976         * coffcode.h (coff_write_object_contents): In comdat section lookup,
2977         stop looking when section is found.
2978
2979 Wed May  1 14:17:57 1996  Ian Lance Taylor  <[email protected]>
2980
2981         * coffcode.h (STRING_SIZE_SIZE): Define.
2982         (styp_to_sec_flags): Handle long symbol names when looking for the
2983         section symbol.
2984         (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
2985         (bfd_coff_long_section_names): Define.
2986         (coff_write_object_contents): Handle long section names.
2987         (bfd_coff_std_swap_table): Initialize new field.
2988         * libcoff.h: Rebuild.
2989         * coffgen.c (make_a_section_from_file): Handle long section
2990         names.
2991         (coff_write_symbols): Handle long section names.
2992         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2993         * coff-mips.c (mips_ecoff_backend_data): Likewise.
2994         * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
2995         * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
2996         * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
2997         * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
2998         * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
2999         * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
3000
3001         * bout.c (b_out_callback): Set lma of sections.
3002         (b_out_bfd_get_relocated_section_contents): Rename in_abfd
3003         parameter to output_bfd.  Used input_bfd instead of output_bfd in
3004         several places.
3005
3006 Tue Apr 30 17:56:39 1996  Ian Lance Taylor  <[email protected]>
3007
3008         * aoutx.h (translate_from_native_sym_flags): Don't create
3009         SEC_CONSTRUCTOR sections.
3010         * ecoff.c (ecoff_set_symbol_info): Likewise.
3011
3012         * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
3013         From Don Bowman <[email protected]>.
3014
3015 Tue Apr 30 17:06:32 1996  Doug Evans  <[email protected]>
3016
3017         * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
3018         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3019
3020 Mon Apr 29 13:15:17 1996  Ian Lance Taylor  <[email protected]>
3021
3022         * elf32-mips.c (struct mips_elf_link_hash_entry): Add
3023         mips_32_relocs field.
3024         (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
3025         (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
3026         relocs against a global symbol which is not defined in a regular
3027         file.
3028         (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
3029         against a global symbol, increment mips_32_relocs.
3030         (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
3031         the symbol is not defined in a regular file, make room in the
3032         .rel.dyn section.
3033
3034 Fri Apr 26 18:00:37 1996  Ian Lance Taylor  <[email protected]>
3035
3036         * ecoff.c (ecoff_compute_section_file_positions): Track the real
3037         file position and the virtual file position separately.  Set
3038         filepos information bsaed on the real file position.
3039         (_bfd_ecoff_set_section_contents): Handle .lib sections like the
3040         Jan 23 change to coffcode.h.
3041
3042         * som.c (som_slurp_symbol_table): Set the symbol count to the
3043         number of BFD symbols created.
3044
3045 Fri Apr 26 12:34:29 1996  Michael Meissner  <[email protected]>
3046
3047         * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
3048         output file if linking shared objects.  Loop to check all relocs,
3049         rather than returning false on first error.
3050
3051 Thu Apr 25 13:25:12 1996  Michael Meissner  <[email protected]>
3052
3053         * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
3054         (ppc_elf_additional_program_headers): If .interp section, bump #
3055         of program headers by 1.
3056         (ppc_elf_adjust_dynamic_symbol): Flesh out support.
3057         (ppc_elf_size_dynamic_sections): Add support for .plt section.
3058         (ppc_elf_check_relocs): Print out filename in debug code.  Enable
3059         PLT support.
3060         (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
3061         debug output.
3062         (ppc_elf_relocate_section): If the output section isn't defined,
3063         don't abort, just give an error message.
3064
3065         * elflink.c (_bfd_elf_create_dynamic_sections): If the section
3066         being created is .sdata or .sdata2, don't make the symbol dynamic.
3067
3068 Wed Apr 24 14:04:07 1996  Ian Lance Taylor  <[email protected]>
3069
3070         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
3071         members of an archive for dynamic objects with no symbols, and
3072         pass them directly to check_archive_element.
3073         (xcoff_link_check_ar_symbols): Pass dynamic objects to
3074         xcoff_link_check_dynamic_ar_symbols.
3075         (xcoff_link_check_dynamic_ar_symbols): New static function.
3076
3077         * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
3078         from _bfd_nodynamic to _bfd_xcoff.
3079         * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
3080         Declare.
3081         (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
3082         (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
3083         (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
3084         * libcoff.h: Rebuild.
3085         * xcofflink.c (xcoff_swap_ldrel_in): New static function.
3086         (xcoff_get_section_contents): New static function.
3087         (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
3088         (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
3089         (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
3090         (xcoff_dynamic_reloc): New static variable.
3091         (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
3092         (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
3093         
3094 Tue Apr 23 12:48:42 1996  Ian Lance Taylor  <[email protected]>
3095
3096         * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
3097         if reloc_entry->addend is not 0.
3098         (CALC_ADDEND): Just set the addend to reloc.r_offset.
3099
3100 Mon Apr 22 18:29:01 1996  Doug Evans  <[email protected]>
3101
3102         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
3103         R_SPARC_GLOB_JMP.
3104         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3105         Add entries for R_SPARC_[56].
3106         (sparc_reloc_map): Add entries for R_SPARC_[56].
3107
3108 Mon Apr 22 15:07:24 1996  Ian Lance Taylor  <[email protected]>
3109
3110         Optimize linking of stabs in sections as used in ELF and COFF.
3111         * stabs.c: New file.
3112         * libbfd-in.h (_bfd_link_section_stabs): Declare.
3113         (_bfd_write_section_stabs): Declare.
3114         (_bfd_write_stab_strings): Declare.
3115         * libbfd.h: Rebuild.
3116         * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
3117         (struct coff_link_hash_table): Add stab_info field.
3118         * libcoff.h: Rebuild.
3119         * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
3120         stab_info field.
3121         (coff_link_add_symbols): Call _bfd_link_section_stabs if
3122         appropriate.
3123         (_bfd_coff_final_link): Write out stab strings hash table.
3124         (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
3125         * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
3126         hash table.
3127         * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
3128         (struct bfd_elf_section_data): Add stab_info field.
3129         * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
3130         field.
3131         * elflink.h (elf_link_add_object_symbols): If appropriate, call
3132         _bfd_link_section_stabs.
3133         (elf_bfd_final_link): Write out stab strings hash table.
3134         (elf_link_input_bfd): Handle optimized stabs sections.
3135         * reloc.c (_bfd_final_link_relocate): Check address against
3136         _raw_size rather than _cooked_size.
3137         * Makefile.in: Rebuild dependencies.
3138         (BFD_LIBS): Add stabs.o
3139         (BFD_LIBS_CFILES): Add stabs.c.
3140
3141         * VERSION: Increment for bfdlink.h change.
3142
3143         * coffgen.c (coff_renumber_symbols): Correct handling of
3144         BSF_NOT_AT_END common symbols.
3145
3146 Fri Apr 19 19:21:56 1996  Ian Lance Taylor  <[email protected]>
3147
3148         * coff-ppc.c (record_toc): Add cast to avoid warning.
3149         (ppc_allocate_toc_section): Likewise.
3150         (coff_ppc_relocate_section): Remove ANSI C string concatenation.
3151         (ppc_coff_reloc_type_lookup): Remove unreached code.
3152         * coffcode.h (coff_write_object_contents): Don't take the address
3153         of an array.
3154         * peicode.h (pe_print_idata): Add casts to avoid warning.
3155         (pe_print_edata): Likewise.
3156         (pe_print_reloc): Remove ANSI C string concatenation.
3157
3158 Thu Apr 18 18:51:18 1996  Ian Lance Taylor  <[email protected]>
3159
3160         * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
3161         and last_bf fields.
3162         * libcoff.h: Rebuild.
3163         * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
3164         symbols.
3165         (coff_swap_aux_out): Likewise.
3166         * peicode.h (coff_swap_aux_in): Likewise.
3167         (coff_swap_aux_out): Likewise.
3168         * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
3169         symbols.
3170         * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
3171         field.
3172         (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
3173         Fix up .bf endndx link fields.
3174         * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
3175         field.
3176         * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
3177         symbols.
3178
3179 Wed Apr 17 12:08:24 1996  Michael Meissner  <[email protected]>
3180
3181         * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
3182         on Solaris PowerPC systems doesn't get confused.
3183
3184         * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
3185         #ifdef PPC.
3186
3187         * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
3188         (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
3189         update did_reg and did_reg2.
3190
3191 Wed Apr 17 13:07:37 1996  Ian Lance Taylor  <[email protected]>
3192
3193         * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
3194
3195         * linker.c (_bfd_generic_link_add_one_symbol): When calling the
3196         callback routines, pass h->root.string rather than name, in case
3197         copy is true and name is transient.
3198
3199 Tue Apr 16 16:36:38 1996  Stu Grossman  ([email protected])
3200
3201         * elfcore.h:  Add support for core files with multiple threads.
3202         (Primarily for Solaris.)
3203
3204 Tue Apr 16 13:44:08 1996  Ian Lance Taylor  <[email protected]>
3205
3206         * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
3207         section->orelocation is NULL.
3208
3209         * coffgen.c (bfd_coff_get_syment): New function.
3210         (bfd_coff_get_auxent): New function.
3211         * bfd-in.h (bfd_coff_get_syment): Declare.
3212         (bfd_coff_get_auxent): Declare.
3213         * bfd-in2.h: Rebuild.
3214
3215 Mon Apr 15 19:06:59 1996  Ian Lance Taylor  <[email protected]>
3216
3217         * elf32-mips.c (struct mips_hi16): Define.
3218         (mips_hi16_addr, mips_hi16_addend): Remove.
3219         (mips_hi16_list): New static variable.
3220         (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
3221         (mips_elf_lo16_reloc): Process mips_hi16_list.
3222         (mips_elf_relocate_section): Permit an arbitrary number of HI16
3223         relocs before the associated LO16 reloc.
3224
3225 Wed Apr 10 00:23:53 1996  Ian Lance Taylor  <[email protected]>
3226
3227         * versados.c (versados_scan): Check bfd_alloc return value.
3228         (versados_object_p): Check all bfd_read return values.  Require
3229         that lang field be less than 10, to avoid confusion with Intel Hex
3230         files.
3231
3232         * libaout.h (WRITE_HEADERS): Write out the relocs even if there
3233         aren't any symbols.
3234         * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
3235         not 0, for an absolute symbol.
3236         (NAME(aout,swap_ext_reloc_out)): Likewise.
3237
3238         * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
3239         (ihex_write_object_contents): For a large start address, output
3240         the full 32 bit address in record type 5.
3241
3242         * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
3243         to int to avoid promotion problems in prototype.
3244
3245 Tue Apr  9 11:44:21 1996  Ian Lance Taylor  <[email protected]>
3246
3247         * configure.host: Use ${srcdir} when looking for picfrag.
3248
3249         * configure.host: Switch on ${libdir}, not $(libdir).  From
3250         [email protected] (Alan Modra).
3251
3252         * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
3253         entry point, not just for DYNAMIC objects.
3254         * sunos.c (sunos_add_dynamic_symbols): Always call
3255         sunos_create_dynamic_sections.  If called with a non DYNAMIC
3256         object, don't do anything else.
3257         (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
3258
3259 Mon Apr  8 12:09:36 1996  Ian Lance Taylor  <[email protected]>
3260
3261         * configure.in: Permit --enable-shared to specify a list of
3262         directories.
3263         * configure: Rebuild.
3264
3265         * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
3266         host when configuring with --enable-shard.
3267
3268 Fri Apr  5 12:24:13 1996  Ian Lance Taylor  <[email protected]>
3269
3270         * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
3271         <[email protected]>.
3272
3273         * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
3274         to avoid crashing in bfd_hash_replace.
3275
3276         * sysdep.h: Use #ifdef, not #if.
3277
3278 Thu Apr  4 23:32:23 1996  Ian Lance Taylor  <[email protected]>
3279
3280         * config.in: Rebuild.
3281
3282 Thu Apr  4 18:49:09 1996  Fred Fish  <[email protected]>
3283
3284         * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
3285         (AC_CHECK_HEADERS): Check for sys/time.h
3286         (AC_HEADER_TIME): Add macro.
3287         * configure: Rebuild.
3288         * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
3289         to control what combination of <time> and <sys/time.h>
3290         get included.
3291         
3292 Tue Apr  2 13:11:53 1996  Doug Evans  <[email protected]>
3293
3294         * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
3295         (aout_32_sunos4_write_object_contents): Likewise.
3296         * aoutx.h (NAME(aout,machine_type)): Handle
3297         bfd_mach_sparc_{sparclet,sparclite}.
3298         * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
3299         (bfd_mach_sparc_v9_p): Update.
3300         * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
3301         * libaout.h (enum machine_type): Add M_SPARCLET.
3302         * sunos.c (MACHTYPE_OK): Define.
3303         * bfd-in2.h: Regenerated.
3304
3305 Tue Apr  2 00:33:18 1996  Ian Lance Taylor  <[email protected]>
3306
3307         * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
3308         * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
3309         * elflink.c (_bfd_elf_create_got_section): Store the
3310         _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
3311         * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
3312         global offset table goes over 0x1000, set the value of
3313         _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
3314         (elf32_sparc_relocate_section): Subtract the offset of
3315         _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
3316
3317         * elfcode.h: Don't include <string.h>.
3318
3319 Mon Apr  1 10:39:24 1996  Jeffrey A Law  ([email protected])
3320
3321         * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
3322         generic_link_hash_newfunc.  All references changed.
3323         * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
3324         moved here from libbfd-in.h.
3325         * libbfd-in.h: Corresponding changes.
3326         * libbfd.h: Regenerated.
3327
3328 Mon Apr  1 12:35:36 1996  Ian Lance Taylor  <[email protected]>
3329
3330         * aoutx.h (aout_link_input_section_std): When reporting an
3331         overflow error, use the name of the symbol in the hash table if
3332         available.
3333         (aout_link_input_section_ext): Likewise.
3334
3335         * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
3336         defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
3337
3338 Sun Mar 31 01:58:41 1996  steve chamberlain  <[email protected]>
3339
3340         * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
3341         * coffcode.h (coff_compute_section_file_positions): Likewise.
3342         (coff_write_object_contents): Likewise.
3343         
3344 Fri Mar 29 12:44:36 1996  Ian Lance Taylor  <[email protected]>
3345
3346         * section.c (SEC_LINK_ONCE): Define.
3347         (SEC_LINK_DUPLICATES): Define.
3348         (SEC_LINK_DUPLICATES_DISCARD): Define.
3349         (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
3350         (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
3351         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
3352         * bfd-in2.h: Rebuild.
3353         * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
3354         SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
3355         (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
3356         into SEC_EXCLUDE.  If IMAGE_SCN_LNK_COMDAT is set, set
3357         SEC_LINK_ONCE, and look through the symbol table for the setting
3358         for SEC_LINK_DUPLICATES.
3359         (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
3360         set for a section, find the section symbol in the symbol table,
3361         and set the aux entry based on SEC_LINK_DUPLICATES.
3362         * coffgen.c (coff_print_symbol): Add a space before "checksum".
3363         * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
3364         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
3365         * coff-i386.c (i386coff_vec): Likewise.
3366         * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
3367
3368         * VERSION: Bump to 2.6.1.
3369         * Makefile.in (stamp-h): Depend upon VERSION.
3370
3371 Thu Mar 28 23:48:49 1996  Jeffrey A Law  ([email protected])
3372
3373         * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
3374         * libbfd.h: Rebuilt.
3375         * linker.c (generic_link_hash_newfunc): No longer static.
3376         * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
3377         to override.
3378         * coff-h8300.c: Add two derived hash tables and their associated
3379         funtions and #defines for use by the h8300 linker.
3380         (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
3381         the function vector as needed.  Place the address of the function
3382         vector entry in the location specified by the R_MEM_INDIRECT reloc.
3383         Rewrite the vectors section contents as necessary.
3384         (h8300_bfd_link_add_symbols): New function for the h8300 linker. 
3385         (coff_bfd_link_add_symbols): Define to use h8300 specific version.
3386         (coff_bfd_link_hash_table_create): Likewise.
3387
3388 Thu Mar 28 17:44:08 1996  Ian Lance Taylor  <[email protected]>
3389
3390         * libhppa.h: If gcc 2.7 or higher, declare all the functions with
3391         __attribute__ ((__unused__)) so that -Wall doesn't warn about
3392         them.
3393         (hppa_rebuild_insn): Pass pointer to correct type to
3394         low_sign_unext and dis_assemble_21.
3395
3396 Thu Mar 28 11:00:36 1996  Doug Evans  <[email protected]>
3397
3398         * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
3399         Stick with sparc-*-{sysv4*,solaris2*}.
3400
3401 Wed Mar 27 10:43:34 1996  Ian Lance Taylor  <[email protected]>
3402
3403         * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
3404         (coff_swap_aux_out): Swap out extra PE x_scn fields.
3405         * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
3406         * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
3407         fields is non-zero, print them.
3408
3409         * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
3410         ifdef.  Remove unused variables.
3411         (ppc_record_data_in_toc_entry): Ifdef out.  Removed unused
3412         variables.
3413         (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
3414         (get_symbol_value): Ifdef out.
3415         (pe_ppc_reloc): Ifdef out.  Remove unused variables.
3416         (coff_ppc_relocate_section): Remove unused variables.  Make
3417         fprintf strings and argument types correspond.  Put before_addr in
3418         DEBUG_RELOC ifdef.
3419         (dump_toc): Make fprintf strings and argument types correspond.
3420         (ppc_process_before_allocation): Remove unused variables.  Always
3421         return a value.
3422         (ppc_reflo_reloc): Ifdef out.
3423         (ppc_addr32nb_reloc): Ifdef out.
3424         (ppc_coff_rtype2howto): Make fprintf strings and argument types
3425         correspond.
3426         (coff_ppc_rtype_to_howto): Likewise.
3427         (ppc_coff_swap_sym_in_hook): Remove unused variables.
3428
3429         * peicode.h (pe_print_idata): Move otherwise unused variables into
3430         the #ifdef where they are used.  Always return a value.
3431         (pe_print_edata): Make fprintf strings and argument types
3432         correspond.  Always return a value.
3433         (pe_print_pdata): Removed unused variable addr_value.  Always
3434         return a value.
3435         (pe_print_reloc): Remove unused variable onaline.  Make fprintf
3436         strings and argument types correspond.  Always return a value.
3437
3438         * elf32-ppc.c (ppc_elf_fake_sections): Return true.
3439         (ppc_elf_finish_dynamic_symbol): Move definition of unused
3440         variable rela inside #if 0 section where it is used.
3441
3442         * ns32k.h: New file.
3443         * cpu-ns32k.h: Include ns32k.h.  Rename externally visible
3444         functions to start with _bfd_.
3445         * aout-ns32k.c: Include ns32k.h.  Change references to renamed
3446         functions in cpu-ns32k.h.
3447         * Makefile.in: Rebuild dependencies.
3448         (HFILES): Add ns32k.h.
3449
3450         * section.c (struct sec): Add linker_mark field.  Change
3451         user_set_vma and reloc_done to be single bit fields.
3452         (STD_SECTION): Update accordingly.
3453         * bfd-in2.h: Rebuild.
3454         * aoutx.h (NAME(aout,final_link)): Mark sections included in the
3455         link.
3456         (aout_link_input_bfd): Don't link unmarked sections.
3457         * cofflink.c (_bfd_coff_final_link): Mark sections included in the
3458         link.
3459         (_bfd_coff_link_input_bfd): Don't link unmarked sections.
3460         * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
3461         the link.
3462         * elflink.h (elf_bfd_final_link): Mark sections included in the
3463         link.
3464         (elf_link_input_bfd): Don't link unmarked sections.
3465         * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
3466         in the link.
3467         (xcoff_link_input_bfd): Don't link unmarked sections.
3468
3469         * coffswap.h (coff_swap_scnhdr_out): Include section name in
3470         overflow error messages.
3471
3472 Tue Mar 26 15:46:18 1996  Ian Lance Taylor  <[email protected]>
3473
3474         * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
3475         is not set, print "BFD: " before the error message.
3476
3477         * configure.in: Use AC_CHECK_TOOL to find ar and ranlib.  From
3478         Miles Bader <[email protected]>.
3479         * configure: Rebuild.
3480
3481 Fri Mar 22 12:17:00 1996  Ian Lance Taylor  <[email protected]>
3482
3483         * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
3484         symbols.
3485
3486         * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
3487         m68k-aout, m68k-coff, and m68k-elf targets.
3488
3489 Fri Mar 22 11:33:44 1996  Martin Anantharaman  <[email protected]>
3490
3491         * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
3492         (ieee_generic_stat_arch_elt): Restructured to prevent
3493         ieee_object_p from being called repeatedly.
3494
3495 Thu Mar 21 11:00:47 1996  steve chamberlain  <[email protected]>
3496
3497         * coffcode.h (coff_write_object_contents):  Allocate
3498         buffers large enough for any FILEHDR or AOUTHDR.
3499
3500 Thu Mar 21 16:28:17 1996  David Mosberger-Tang  <[email protected]>
3501
3502         * ecofflink.c (lookup_line): New static function, renamed and
3503         slighly changed from old _bfd_ecoff_locate_line.
3504         (_bfd_ecoff_locate_line): Cache line number information.  Use
3505         lookup_line for actual lookup.
3506
3507 Thu Mar 21 14:59:11 1996  Michael Meissner  <[email protected]>
3508
3509         * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
3510         multiple of 20 bytes.
3511
3512 Thu Mar 21 13:54:40 1996  Ian Lance Taylor  <[email protected]>
3513
3514         * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
3515         allocate ecoff_find_line, and don't initialize by hand.
3516         * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
3517         mips_elf_find_line, and don't call memset.
3518
3519         * coffcode.h (coff_compute_section_file_positions): If not
3520         producing a final executable, don't consider sofar when aligning
3521         the section to the correct size.
3522
3523 Wed Mar 20 16:53:12 1996  Ian Lance Taylor  <[email protected]>
3524
3525         * coffcode.h (coff_add_missing_symbols): Ifdef out.
3526         (coff_write_object_contents): Don't call coff_add_missing_symbols.
3527         * coffgen.c (coff_section_symbol): Ifdef out.
3528
3529 Mon Mar 18 12:54:41 1996  Ian Lance Taylor  <[email protected]>
3530
3531         * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
3532         output_bfd is not NULL.
3533
3534 Thu Mar 14 17:12:06 1996  Doug Evans  <[email protected]>
3535
3536         * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
3537         of bfd_alloc (fixes fix_line not being initialized).
3538         Delete zeroing of fix_{value,tag,end,scnlen} fields.
3539
3540 Thu Mar 14 16:06:06 1996  Jeffrey A Law  ([email protected])
3541
3542         * coffcode.h: Allow specific backends to override the
3543         bfd_link_add_symbols routine.
3544
3545         * coff-h8300.c: Include genlink.h.
3546         (howto_table): Add R_MEM_INDIRECT.
3547         (rtype2howto): Support R_MEM_INDIRECT.
3548         (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
3549         for now.
3550         
3551 Tue Mar 12 12:41:17 1996  David Mosberger-Tang  <[email protected]>
3552
3553         * coff-alpha.c (alpha_relocate_section): Use
3554         info->callbacks_warning, rather than _bfd_error_handler, for
3555         "multiple gp" warning.
3556
3557 Tue Mar 12 12:10:55 1996  Ian Lance Taylor  <[email protected]>
3558
3559         * linker.c (bfd_wrapped_link_hash_lookup): New function.
3560         (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
3561         table string.  Use bfd_wrapped_link_hash_lookup.
3562         (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
3563         table string.
3564         * aoutx.h (aout_link_write_symbols): Use the name from the hash
3565         table, if any, when writing out symbols.
3566         (aout_link_input_section_std): Use the name from the hash table,
3567         if any, when reporting undefined symbols.
3568         (aout_link_input_section_ext): Likewise.
3569         (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
3570         * bout.c (get_value): Likewise.
3571         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3572         * ecoff.c (ecoff_reloc_link_order): Likewise.
3573         * elflink.h (elf_link_add_object_symbols): Likewise.
3574         (elf_reloc_link_order): Likewise.       
3575         * linker.c (_bfd_generic_link_output_symbols): Likewise.
3576         (_bfd_generic_reloc_link_order): Likewise.
3577         (default_indirect_link_order): Likewise.
3578         * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
3579         * sunos.c (sunos_add_one_symbol): Likewise.
3580         * xcofflink.c (xcoff_link_add_symbols): Likewise.
3581         (bfd_xcoff_link_count_reloc): Likewise.
3582         (xcoff_reloc_link_order): Likewise.
3583
3584         * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
3585         into -1 for intern->rss.
3586
3587         * configure: Rebuild with autoconf 2.8.
3588
3589 Mon Mar 11 12:28:31 1996  Ian Lance Taylor  <[email protected]>
3590
3591         * stab-syms.c (__define_stab_duplicate): Define.
3592         (bfd_get_stab_name): Rename from aout_stab_name.  Rewrite to use a
3593         switch.
3594         * bfd-in.h (bfd_get_stab_name): Declare.
3595         * bfd-in2.h: Rebuild.
3596         * Makefile.in: Rebuild dependencies.
3597         (BFD_LIBS): Add stab-syms.o.
3598         (BFD_LIBS_CFILES): Add stab-syms.c.
3599         (BFD32_BACKENDS): Remove stab-syms.o.
3600         (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
3601         * configure.in: Don't list stab-syms.o in bfd_backends.
3602         * configure: Rebuild.
3603         * libaout.h (aout_stab_name): Don't declare.
3604         * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
3605         not aout_stab_name.
3606
3607 Fri Mar  8 11:26:20 1996  Ian Lance Taylor  <[email protected]>
3608
3609         * elf.c (assign_file_positions_for_segments): Adjust file offset
3610         for section alignment even if SEC_LOAD is not set.
3611
3612 Tue Mar  5 12:02:23 1996  Ian Lance Taylor  <[email protected]>
3613
3614         * configure.in: Don't set SHLIB or SHLINK to an empty string,
3615         since they appear as targets in Makefile.in.
3616         * configure: Rebuild.
3617
3618         * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
3619         don't fiddle with a symbol which is not defined anywhere.
3620
3621 Mon Mar  4 12:49:16 1996  Ian Lance Taylor  <[email protected]>
3622
3623         * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
3624         though they are defined in a shared library.
3625         (xcoff_build_ldsyms): Likewise.
3626
3627         * coffgen.c (coff_find_nearest_line): Don't look at the line
3628         numbers for the section if section->lineno is NULL.
3629
3630         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
3631         message rather than calling BFD_ASSERT.
3632         * elfcode.h (write_relocs): Check return value of
3633         _bfd_elf_symbol_from_bfd_symbol.
3634
3635 Fri Mar  1 09:42:59 1996  Michael Meissner  <[email protected]>
3636
3637         * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
3638         for .sbss section.
3639
3640 Wed Feb 28 11:25:47 1996  Jeffrey A Law  ([email protected])
3641
3642         * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
3643         and R_HPPA_NLRSEL.
3644         (e_nsel, e_nlsel, e_nlrsel): Undefine.  Add to
3645         hppa_reloc_field_selector_type_alt.
3646         (hppa_field_adjust): Handle e_nlsel, e_nlrsel.  Fix e_nsel handling.
3647         * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
3648         selectors.
3649         (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
3650
3651 Wed Feb 28 11:00:24 1996  Ian Lance Taylor  <[email protected]>
3652
3653         * elf.c (assign_file_positions_for_segments): Adjust the segment
3654         memory size for the alignment of a SEC_ALLOC section, not just a
3655         SEC_LOAD section.
3656
3657 Tue Feb 27 14:17:31 1996  Andreas Schwab  <[email protected]>
3658
3659         * m68klinux.c: New file.
3660         * hosts/m68klinux.h: New file.
3661         * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
3662         * configure.in (m68*-*-linux*): New native host.
3663         (m68klinux_vec): New vector.
3664         * configure: Rebuild.
3665         * targets.c (m68klinux_vec): Declare.
3666         * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
3667         bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
3668         * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
3669         declaration from bfd_linux_size_dynamic_sections.
3670         (bfd_m68klinux_size_dynamic_sections): Declare.
3671         * bfd-in2.h: Rebuild.
3672         * Makefile.in: Rebuild dependencies.
3673         (BFD32_BACKENDS): Add m68klinux.o.
3674         (BFD32_BACKENDS_CFILES): Add m68klinux.c.
3675
3676 Tue Feb 27 11:31:34 1996  Jeffrey A Law  ([email protected])
3677
3678         * libhppa.h (pa_arch): Add pa20.
3679         (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
3680         (e_nsel): Undefine.  Add to hppa_reloc_field_selector_type_alt.
3681         (hppa_field_adjust): Handle e_nsel.
3682         * som.c: Provide default definitions for many new relocs found only
3683         in hpux10 include files.
3684         (som_fixup_formats): Add several new relocs from hpux10.
3685         (som_hppa_howto_table): Add hpux10 relocs.
3686         (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
3687
3688 Mon Feb 26 12:52:48 1996  Stan Shebs  <[email protected]>
3689
3690         * mpw-make.sed: Edit out recent shared library support, and
3691         rules to rebuild .h files using doc/chew.
3692
3693 Mon Feb 26 14:48:39 1996  David Mosberger-Tang  <[email protected]>
3694
3695         * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
3696         size even of sections with no contents.
3697
3698 Mon Feb 26 14:01:13 1996  Ian Lance Taylor  <[email protected]>
3699
3700         * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
3701         starting with '$' the way we skip names starting with '.'.  When
3702         updating x_endndx, don't be fooled by an index which has been
3703         merged.
3704
3705         * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
3706         struct/union/enum type with no elements.
3707
3708 Sat Feb 24 11:38:58 1996  Ian Lance Taylor  <[email protected]>
3709
3710         * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
3711
3712         * archive.c (bfd_generic_archive_p): If the first file in the
3713         archive can not be recognized as an object, don't assume that this
3714         is the wrong format.
3715
3716         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
3717         format is not bfd_object.
3718         (bfd_elf_get_dt_soname): Likewise.
3719
3720 Wed Feb 21 13:58:04 1996  Ian Lance Taylor  <[email protected]>
3721
3722         * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
3723         reloc.
3724
3725 Tue Feb 20 16:22:44 1996  J.T. Conklin  <[email protected]>
3726
3727         * bfd.c (tdata): Add netbsd_core_data.
3728         * bfd-in2.h: Regenerated.
3729
3730 Tue Feb 20 16:50:02 1996  Ian Lance Taylor  <[email protected]>
3731
3732         * sunos.c (SUNOS_CONSTRUCTOR): Define.
3733         (sunos_add_one_symbol): Don't let a symbol from a dynamic object
3734         override a constructor symbol.  Set SUNOS_CONSTRUCTOR when
3735         appropriate.
3736
3737         * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
3738         to get the symbol index, matching 14 Jul 95 change.
3739
3740 Tue Feb 20 08:26:27 1996  Fred Fish  <[email protected]>
3741
3742         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3743         Remove duplicate definition of gp.
3744
3745 Mon Feb 19 12:37:41 1996  Ian Lance Taylor  <[email protected]>
3746
3747         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
3748         assume that we can set the GP value and then get the same value,
3749         since it won't be true if the output file is neither ELF nor
3750         ECOFF.
3751         * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
3752         _bfd_get_gp_value here.
3753         (mips_gprel_reloc): Don't assume we can set and get the GP value.
3754         * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
3755         mips_elf_final_gp.
3756         (mips_elf_lo16_reloc): Likewise.
3757         (mips_elf_final_gp): Add pgp parameter.  Set it to the GP value.
3758         Don't require that the BFD be ELF.
3759         (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
3760         (mips_elf_gprel32_reloc): Likewise.
3761         (mips_elf_relocate_section): Don't assume we can set and get the
3762         GP value.
3763         (mips_elf_finish_dynamic_symbol): Don't bother to use
3764         _bfd_get_gp_value here.
3765
3766         * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
3767         Don't change epdr between malloc and free.  Be careful not to free
3768         NULL pointers.  Zero out the first RPDR.
3769
3770         * configure.host: On Linux, only pass -rpath option if $(libdir)
3771         is neither /lib nor /usr/lib.  From Alan Modra
3772         <[email protected]>.
3773
3774         * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
3775         dt_name.
3776         (elf_dt_name): Rename from elf_dt_needed_name.
3777         * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
3778         elf_dt_needed_name.
3779         (bfd_elf_get_dt_soname): New function.
3780         * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
3781         elf_dt_needed_name.  Save the SONAME back in elf_dt_name.
3782         * bfd-in.h (bfd_elf_get_dt_soname): Declare.
3783         * bfd-in2.h: Rebuild.
3784
3785 Mon Feb 19 02:50:23 1996  Doug Evans  <[email protected]>
3786
3787         * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
3788         _bfd_sparc_elf_reloc_type_lookup.
3789         (bfd_elf32_bfd_reloc_type_lookup): Update.
3790         * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
3791         (sparc64_elf_howto_table): Define.
3792         (sparc_reloc_map): Define.
3793         (sparc64_elf_reloc_type_lookup): New function.
3794         (sparc_elf_wdisp16_reloc): New function.
3795         (elf_info_to_howto): Use sparc64_elf_howto_table.
3796         (sparc64_elf_relocate_section): Likewise.
3797         (bfd_elf64_bfd_reloc_type_lookup): Update.
3798
3799 Sun Feb 18 15:02:25 1996  Ian Lance Taylor  <[email protected]>
3800
3801         * configure.host: Check for 'do not mix' from native linker before
3802         trying to use -rpath.
3803
3804 Fri Feb 16 12:46:18 1996  Ian Lance Taylor  <[email protected]>
3805
3806         * bfd.c (_bfd_get_gp_value): New function.
3807         (_bfd_set_gp_value): New function.
3808         * libbfd-in.h (_bfd_get_gp_value): Declare.
3809         (_bfd_set_gp_value): Declare.
3810         * libbfd.h: Rebuild.
3811         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
3812         _bfd_get_gp_value and _bfd_set_gp_value rather than referring
3813         directly to the fields in the tdata information.
3814         (alpha_relocate_section): Likewise.
3815         * coff-mips.c (mips_adjust_reloc_in): Likewise.
3816         (mips_gprel_reloc): Likewise.
3817         (mips_relocate_section): Likewise.
3818         * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
3819         (mips_elf_lo16_reloc): Likewise.
3820         (mips_elf_final_gp): Likewise.
3821         (mips_elf_gprel16_reloc): Likewise.
3822         (mips_elf_gprel32_reloc): Likewise.
3823         (mips_elf_relocate_section): Likewise.
3824         (mips_elf_finish_dynamic_symbol): Likewise.
3825
3826         * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
3827
3828 Thu Feb 15 11:29:13 1996  Ian Lance Taylor  <[email protected]>
3829
3830         * configure.in: Call AC_PROG_CC before configure.host.
3831         * configure: Rebuild.
3832         * configure.host: Don't set information which autoconf should
3833         figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
3834
3835         * configure.host: Remove go32 and win32 host information, since it
3836         should no longer be needed.
3837
3838         * elf.c (map_sections_to_segments): If we have a .dynamic section,
3839         then start a new segment rather than put a writable section in a
3840         readonly segment.
3841
3842         * configure.host: Set RPATH_ENVVAR.
3843
3844         * Makefile.in: Rebuild dependencies.
3845
3846         * elflink.c (_bfd_elf_create_linker_section): Remove unused
3847         zero_section variable.
3848
3849 Thu Feb 15 10:39:17 1996  H.J. Lu  <[email protected]>
3850
3851         * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
3852         ($(srcdir)/libbfd.h): Rename from libbfd.h.
3853         ($(srcdir)/libcoff.h): Rename from libcoff.h.
3854
3855 Wed Feb 14 16:29:07 1996  Martin Anantharaman  <[email protected]>
3856
3857         * ieee.c (ieee_write_expression): Only use an R variable for a
3858         local symbol.  Don't output a zero offset.  Handle a zero address.
3859         (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
3860         (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
3861         PCREL_OFFSET.
3862         (parse_expression): Don't try to handle multiple occurrences of a
3863         P variable.  Handle I variables differently from X variables.  Fix
3864         the order of minus expressions.
3865         (ieee_slurp_external_symbols): Generate an I variable for an NN
3866         record.  Fix handling of ATI and ATX records.
3867         (ieee_slurp_sections): Only set minimal section attributes.
3868         Adjust them later, based on the section contents.
3869         (ieee_object_p): Read in the file until just after the ME record.
3870         Call ieee_slurp_section_data to set the section flags.
3871         (do_one): Add iterations parameter.  Only repeat the first load
3872         item.  Set the section and file reloc flags.
3873         (ieee_slurp_section_data): Set section flags.  Pass iterations to
3874         do_one.
3875         (ieee_canonicalize_reloc): Handle I variables.
3876         (do_with_relocs): Only emit relocation size when necessary.
3877         Increase MAXRUN to 127.  Change ov to be assigned, and take
3878         src_mask and pcrel_offset into account.
3879         (ieee_write_data_part): Skip sections that are not loaded.
3880         (ieee_write_external_part): Don't output optional last entry of WX
3881         records.
3882         (ieee_write_me_part): Make setting of me_record neater.
3883         (ieee_generic_stat_arch_elt): Get the size of an archive element.
3884
3885         * syms.c (stt): Add entries for zerovars, vars, and code.
3886
3887         * elfcode.h (validate_reloc): New static function.
3888         (write_relocs): Call validate_reloc for non ELF relocs.
3889
3890         * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
3891         (TARGET_BIG_SYM): Use elf_symbol_leading_char.
3892         (TARGET_LITTLE_SYM): Likewise.
3893
3894         * config.bfd (m68*-*-psos*): New target.
3895
3896 Tue Feb 13 15:56:22 1996  Bryan Ford  <[email protected]>
3897
3898         * i386msdos.c: Remove some #if 0 code.
3899         (msdos_write_object_contents): Don't include empty sections in the
3900         size computation, regardless of their address.
3901
3902 Tue Feb 13 15:36:37 1996  Michael Meissner  <[email protected]>
3903
3904         * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
3905         is NULL, ie, the -r switch is used.
3906
3907 Tue Feb 13 14:35:15 1996  Ian Lance Taylor  <[email protected]>
3908
3909         * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
3910         (BFD_RELOC_MIPS_GOT_LO16): Define.
3911         (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
3912         * bfd-in2.h, libbfd.h: Rebuild.
3913         * elf32-mips.c (mips_reloc_map): Map new relocs.
3914
3915         * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
3916
3917         * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
3918         $(SHLINK).
3919
3920         * ieee.c (get_symbol): Set the section to bfd_abs_section.
3921         (do_with_relocs): If EXEC_P is set and there are no relocs, use a
3922         simple number for the section address, rather than an expression.
3923         Limit the number of bytes between relocs to MAXRUN.
3924         (ieee_write_me_part): Set me_record to the file offset after the
3925         start address.
3926         (ieee_write_processor): New static function.
3927         (ieee_write_object_contents): Use ieee_write_processor.
3928
3929 Fri Feb  9 10:53:00 1996  Ian Lance Taylor  <[email protected]>
3930
3931         * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
3932
3933         * coff-aux.c: Change include of aux.h to aux-coff.h.
3934
3935 Thu Feb  8 14:01:03 1996  Andreas Schwab  <[email protected]>
3936
3937         * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
3938         relocation put the addend both in the reloc entry and the data.
3939         (elf_m68k_finish_dynamic_symbol): Likewise.  Mask out marker in
3940         GOT offset value.
3941
3942         * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
3943         a R_68K_PCxx reloc against a defined global symbol directly.
3944         (elf_m68k_check_relocs): Don't count such a reloc.
3945
3946         * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
3947         a PLTxx reloc as dynamic.  Disallow PLTxxO reloc against a local
3948         symbol for now, otherwise always record the symbol as dynamic.
3949         (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
3950         is not referenced by a dynamic object, and we are not making a
3951         shared object, then don't make a PLT entry.  If we do make a PLT
3952         entry, make sure the symbol has been recorded as dynamic.
3953
3954 Wed Feb  7 13:56:06 1996  Ian Lance Taylor  <[email protected]>
3955
3956         * configure.host: When making a shared library, set HLDFLAGS to
3957         pass an appropriate -rpath option.  Use the make variable SONAME
3958         as the shared library soname, rather than computing it here.  On
3959         SunOS, build stamp-tshlink in place of $(SHLINK).
3960         * Makefile.in (SONAME): New variable.
3961         ($(SHLINK)): Make a link to the transformed name, as well.
3962         (stamp-tshlink): New target.
3963         (install): Skip stamp-tshlink during install.
3964
3965 Wed Feb  7 13:37:39 1996  Michael Meissner  <[email protected]>
3966
3967         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
3968         linker sections have been set up yet.
3969
3970         * elf.c (make_mapping): Add an additional argument to suppress
3971         making the first section include the program headers.
3972         (map_sections_to_segments): If the user used -Ttext such that the
3973         program headers are on a different page, do not set the flags
3974         saying that this section includes the program headers.
3975
3976 Tue Feb  6 14:04:49 1996  J.T. Conklin  <[email protected]>
3977
3978         * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
3979         don't define TRAD_HEADER.
3980         * configure: Rebuild.
3981
3982         * netbsd-core.c: New file, support for NetBSD core files.
3983         * hosts/*nbsd.h: Removed.
3984
3985 Tue Feb  6 11:47:49 1996  Doug Evans  <[email protected]>
3986
3987         * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
3988         (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
3989         * libbfd.h, bfd-in2.h: Regenerated.
3990         * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
3991         bfd_elf32_bfd_reloc_type_lookup.
3992         (reloc_type{,_names}): Deleted.
3993         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
3994         Add sparc64 relocs.
3995         (sparc_reloc_map): Add sparc64 relocs.
3996         (sparc_elf_notsupported_reloc): New static function.
3997         (sparc_elf_wdisp16_reloc): New static function.
3998         (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
3999         (elf32_sparc_relocate_section): Likewise.
4000         (bfd_elf32_bfd_reloc_type_lookup): Define.
4001         * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
4002         (reloc_type{,_names}): Deleted.
4003         (elf_sparc_howto_table): Deleted.
4004         (sparc_reloc_map): Deleted.
4005         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
4006         (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
4007
4008 Tue Feb  6 12:12:22 1996  Ian Lance Taylor  <[email protected]>
4009
4010         * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
4011         *-*-hpux* host.
4012
4013         * Makefile.in (program_transform_name): New variable.
4014         (install): Transform library name before installing it.
4015
4016 Mon Feb  5 10:38:27 1996  Ian Lance Taylor  <[email protected]>
4017
4018         * archures.c (bfd_mach_i960_hx): Define.
4019         * bfd-in2.h: Rebuild.
4020         * cpu-i960.c (scan_960_mach): Accept machine "hx".
4021         (MATRIX): Expand entries for HX.
4022         (arch_info_struct): Add i960:hx entry.
4023         * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
4024         * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
4025         (coff_set_flags): Handle bfd_mach_i960_hx.
4026
4027         Support for building as a shared library, based on patches from
4028         Alan Modra <[email protected]>:
4029         * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
4030         New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
4031         SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
4032         * configure: Rebuild.
4033         * configure.host: If --enable-shared, adjust shared library stuff
4034         based on the host.  If the host is SunOS, and the linker supports
4035         -rpath, set HLDFLAGS to use it.
4036         * Makefile.in (ALLLIBS): New variable.
4037         (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
4038         (COMMON_SHLIB, SHLINK): New variables.
4039         (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
4040         (STAGESTUFF): Remove variable.
4041         (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
4042         $(TARGETLIB).
4043         (stamp-ofiles): New target, like old ofiles target, but build
4044         using a temporary file and move-if-change, and touch stamp-ofiles
4045         when done.
4046         (ofiles): Just depend upon stamp-ofiles.
4047         (stamp-piclist, piclist): New targets.
4048         ($(SHLIB), $(SHLINK)): New targets.
4049         (targets.o, archures.o): Build twice if PICFLAG is set.
4050         (do_mostlyclean): Remove pic/*.o.
4051         (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
4052         stamp-piclist.
4053         (do_distclean): Remove pic and stamp-picdir.
4054         (install): Install shared libraries.
4055         ($(OFILES)): Depend upon stamp-picdir.
4056         (stamp-picdir): New target.
4057
4058         * libcoff-in.h: Add comment reminding people that libcoff.h is a
4059         generated file.
4060         * libcoff.h: Rebuild.
4061
4062         * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
4063         flavour of a section with no owner.
4064
4065         * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
4066         ELF_LINK_NON_ELF flag.
4067         (mips_elf_create_got_section): Likewise.
4068
4069         * elf.c: Revert last change, since it breaks dynamic linking.
4070         * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
4071         field.
4072         * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
4073         * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
4074         (elfNN_bed): Don't initialize want_hdr_in_seg field.
4075
4076 Sun Feb  4 20:45:13 1996  Michael Meissner  <[email protected]>
4077
4078         * elf.c (assign_file_positions_for_segments): If the backend does
4079         not want the elf header or the program headers in the address
4080         space, do not include them in the calculations.
4081
4082         * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
4083         function to determine if we need additional program headers.
4084         (ppc_elf_modify_segment_map): Define as a NOP function for now.
4085         (ppc_elf_create_linker_section): .sdata2 is a read-only section.
4086
4087 Sat Feb  3 23:00:03 1996  Ian Lance Taylor  <[email protected]>
4088
4089         * coffcode.h: Move today's libcoff.h change into coffcode.h.
4090
4091 Sat Feb  3 15:43:44 1996  Fred Fish  <[email protected]>
4092
4093         * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
4094         back into one line.  Some compilers (sunos 4.1.3 for example)
4095         won't accept args split across more than one line.
4096
4097 Fri Feb  2 11:42:15 1996  Steve Chamberlain  <[email protected]>
4098
4099         * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
4100         * configure: Regenerate.
4101
4102 Fri Feb  2 12:12:16 1996  Jeffrey A Law  ([email protected])
4103
4104         * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
4105         try to do arithmetic on a void *, cast it to a unsigned char * first.
4106
4107 Thu Feb  1 16:04:06 1996  Ian Lance Taylor  <[email protected]>
4108
4109         * elf-bfd.h (ELF_LINK_NON_ELF): Define.
4110         * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
4111         ELF_LINK_NON_ELF.
4112         * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
4113         flag for a newly defined symbol.
4114         (NAME(bfd_elf,record_link_assignment)): Likewise.
4115         (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
4116         set the DEF or REF_REGULAR flags correctly.
4117
4118         * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
4119         (libbfd.h, libcoff.h): Corresponding change.
4120
4121         * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
4122         a PLT32 reloc as dynamic.
4123         (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
4124         is not referenced by a dynamic object, and we are not making a
4125         shared object, then don't make a PLT entry.  If we do make a PLT
4126         entry, make sure the symbol has been recorded as dynamic.
4127
4128 Wed Jan 31 17:23:32 1996  Steve Chamberlain  <[email protected]>
4129
4130         * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
4131         * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
4132         (powerpcle-*-cygwin32): New.
4133         * peicode.h (add_data_entry): Get address from vma.
4134
4135 Wed Jan 31 16:23:57 1996  Michael Meissner  <[email protected]>
4136
4137         * elflink.c (_bfd_elf_create_linker_section): If the symbol
4138         attached to the section has already been created as an undefined
4139         symbol, treat it as if it hasn't been created yet.
4140
4141 Wed Jan 31 16:16:53 1996  Ian Lance Taylor  <[email protected]>
4142
4143         * elflink.h (elf_bfd_final_link): Don't output initial dummy
4144         symbol or section symbols if stripping all symbols and this is not
4145         a relocateable link.  Don't output the symbol string table if
4146         there are no symbols.
4147         (elf_link_flush_output_syms): Don't do anything if there are no
4148         symbols to flush.
4149
4150 Wed Jan 31 12:55:49 1996  Richard Henderson  <[email protected]>
4151
4152         * coff-aux.c: New file.
4153         * hosts/m68kaux.h: New file.
4154         * config.bfd (m68*-apple-aux*): New target.
4155         * configure.in (m68*-apple-aux*): New native host.
4156         (m68kaux_coff_vec): New vector.
4157         * configure: Rebuild.
4158         * targets.c (m68kaux_coff_vec): Declare.
4159         * coffcode.h (bfd_coff_backend_data): Add field
4160         _bfd_coff_link_add_one_symbol.
4161         (bfd_coff_link_add_one_symbol): Define.
4162         (compare_arelent_ptr): New static function if TARG_AUX.
4163         (coff_write_relocs): If TARG_AUX, sort the relocs.
4164         (coff_write_object_contents): Set A/UX aouthdr magic number.
4165         (coff_link_add_one_symbol): Define if not defined.
4166         (bfd_coff_std_swap_table): Initialize new field.
4167         * libcoff.h: Rebuild.
4168         * cofflink.c (coff_link_add_symbols): Call
4169         bfd_coff_link_add_one_symbol rather than
4170         _bfd_generic_link_add_one_symbol.
4171         * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
4172         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4173         * coff-mips.c (mips_ecoff_backend_data): Likewise.
4174         * Makefile.in: Rebuild dependencies.
4175         (BFD32_BACKENDS): Add coff-aux.o.
4176         (BFD32_BACKENDS_CFILES): Add coff-aux.c.
4177
4178 Wed Jan 31 11:37:46 1996  Andreas Schwab  <[email protected]>
4179
4180         * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
4181         relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
4182
4183 Tue Jan 30 12:09:04 1996  Ian Lance Taylor  <[email protected]>
4184
4185         * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
4186         $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
4187         (maintainer-clean): Warn about deleting special files.
4188         (bfd-in2.h, libbfd.h, libcoff.h): New targets.
4189
4190         * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
4191         warning symbols correctly.
4192         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4193         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4194         * elf32-mips.c (mips_elf_relocate_section): Likewise.
4195         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4196         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4197         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4198
4199         * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
4200         warnings.
4201
4202 Mon Jan 29 14:27:24 1996  Kim Knuttila  <[email protected]>
4203
4204         * libcoff-in.h: aligned newly exported names with bfd naming 
4205         conventions. Removed an erroneous define of POWERPC_LE_PE.
4206         * libcoff.h: Rebuild.
4207         * cofflink.c, coff-ppc.c: the above function name changes
4208
4209 Mon Jan 29 13:06:28 1996  Ian Lance Taylor  <[email protected]>
4210
4211         From Basim Kadhim <[email protected]>:
4212         * ecoff.c (struct extsym_info): Define.
4213         (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
4214         to ecoff_link_write_external.
4215         (ecoff_link_write_external): Accept a struct extsym_info pointer.
4216         Strip symbols when appropriate.
4217
4218         Based on patches from Ronald F. Guilmette <[email protected]>:
4219         * syms.c (BSF_OBJECT): Define.
4220         (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
4221         * bfd-in2.h: Rebuild.
4222         * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
4223         STT_OBJECT symbol.
4224         * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
4225         is set.
4226
4227         * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
4228         copying relocs into a shared object, treat a defined global symbol
4229         as a local symbol.
4230         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4231         * elf32-mips.c (mips_elf_relocate_section): Likewise.
4232         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4233
4234         * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
4235         real defined symbol, not to a weak defined symbol.
4236
4237 Mon Jan 29 11:34:36 1996  Kim Knuttila  <[email protected]>
4238
4239         * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
4240         and made a few static functions externs.
4241
4242         * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
4243         POWERPC_LE_PE hack in cofflink.
4244
4245         * libcoff-in.h: promoted the following from cofflink.c to allow
4246         _bfd_coff_final_link to be overridden -  STRING_SIZE_SIZE,
4247         coff_debug_merge_element, struct coff_debug_merge_type, 
4248         coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
4249         coff_debug_merge_hash_table_init,  coff_debug_merge_hash_table_free,
4250         coff_debug_merge_hash_lookup, coff_link_section_info, 
4251         coff_final_link_info, coff_debug_merge_hash_newfunc,
4252         coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
4253
4254         * libcoff.h: re-gen'd
4255
4256 Fri Jan 26 18:33:35 1996  Ian Lance Taylor  <[email protected]>
4257
4258         * syms.c: Include "bfdlink.h".
4259         (struct stab_find_info): Define.
4260         (_bfd_stab_section_find_nearest_line): New function.
4261         * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
4262         * libbfd.h: Rebuild.
4263         * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
4264         * elf.c (_bfd_elf_find_nearest_line): Try calling
4265         _bfd_stab_section_find_nearest_line before searching the ELF
4266         symbol table.  Find the closest STT_FUNC symbol, not the last one.
4267         * libcoff-in.h (coff_data_type): Add line_info field.
4268         * libcoff.h: Rebuild.
4269         * coffgen.c (coff_find_nearest_line): Try calling
4270         _bfd_stab_section_find_nearest_line before searching the COFF
4271         symbol table.
4272         * Makefile.in: Rebuild dependencies.
4273
4274 Fri Jan 26 16:11:19 1996  Michael Meissner  <[email protected]>
4275
4276         * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
4277         4 bytes, so we get the correct value when updating the register
4278         field in little endian mode.
4279
4280 Thu Jan 25 12:14:16 1996  Ian Lance Taylor  <[email protected]>
4281
4282         * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
4283         entry_section fields.  Add sntoc and snentry fields.
4284         * libcoff.h: Rebuild.
4285         * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
4286         not toc_section and entry_section (the COFF file does not have any
4287         sections at this point).
4288         (coff_write_object_contents): Set o_snentry and o_sntoc from
4289         snentry and sntoc rather than entry_section and toc_section.
4290         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
4291         snentry, not toc_section and entry_section.
4292         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
4293         entry_section from hentry.
4294         (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
4295         set snenty.
4296         (xcoff_link_input_bfd): Set sntoc, not toc_section.
4297         (xcoff_write_global_symbol): Get toc_section from sntoc, rather
4298         than using toc_section directly.
4299
4300         * archures.c: Add missing `.' in enum bfd_architecture.
4301         * bfd-in2.h: Rebuild.
4302
4303         * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec.  From
4304         Robert Lipe <[email protected]>.
4305
4306 Thu Jan 25 12:08:51 1996  Michael Meissner  <[email protected]>
4307
4308         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
4309         to sections we allocate.  Use bfd_zalloc to allocate initialial
4310         sections, not bfd_alloc.
4311         (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
4312         SDA{,2}I16 relocations.
4313         (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
4314         whether to put something in .sbss or not.
4315         (ppc_elf_relocate_section): Add support for more relocations.  Add
4316         in sec->output_offset where appropriate.  Make error messages
4317         include the symbol name.
4318
4319         * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
4320         trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
4321         doesn't get redefined messages if -shared.
4322
4323         * elflink.h (elf_create_pointer_linker_section) Only bump RELA
4324         section if the rel_section field has been set up.
4325
4326 Wed Jan 24 20:40:26 1996  Michael Meissner  <[email protected]>
4327
4328         * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
4329         relocations.
4330
4331 Wed Jan 24 10:38:34 1996  Doug Evans  <[email protected]>
4332
4333         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
4334         of flags, only flags used are controlled by mach number.  Bump up
4335         output file mach number to highest of input file mach numbers.
4336         (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
4337         (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
4338
4339         * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
4340         bfd_elf64_sparc_vec support.
4341
4342 Tue Jan 23 14:33:05 1996  Michael Meissner  <[email protected]>
4343
4344         * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
4345         the embedded bit is set on some objects and not on others.  Just
4346         or it together.
4347         (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
4348         relocations.
4349
4350 Tue Jan 23 14:22:45 1996  Ian Lance Taylor  <[email protected]>
4351
4352         * coffcode.h (coff_new_section_hook): Don't try to align the
4353         .stabstr section.
4354
4355         * coffcode.h (coff_set_section_contents): Fix the handling of the
4356         .lib section to work even if the entire section contents are
4357         written at once.  From Gvran Uddeborg <[email protected]> and
4358         Robert Lipe <[email protected]>.
4359
4360 Mon Jan 22 18:45:51 1996  Michael Meissner  <[email protected]>
4361
4362         * elflink.h (elf_finish_pointer_linker_section): Don't allocate
4363         memory here for contents.
4364
4365         * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
4366         _SDA2_BASE_ by 32768.
4367         (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
4368         started using.  Allocate contents for .sdata and .sdata2 sections
4369         also.
4370         (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
4371         rather than _name.
4372         (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
4373         size _SDA{,2}_BASE_.
4374         (ppc_elf_relocate_section): Change how sdata{,2} relocations are
4375         done.
4376
4377 Mon Jan 22 08:52:04 1996  Doug Evans  <[email protected]>
4378
4379         * elflink.h (elf_finish_pointer_linker_section): Fix typo.
4380
4381         * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
4382         (bfd_mach_sparc_{v8plus,v8plusa}): Define.
4383         (bfd_mach_sparc_v9a): Define.
4384         (bfd_mach_sparc_v9_p): Define.
4385         * bfd-in2.h: Regenerated.
4386         * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
4387         bfd_mach_sparc_v9.
4388         * elf64-sparc.c (sparc64_elf_object_p): Likewise.
4389         * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
4390         to bfd_elf32_sparc_vec.
4391         * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
4392         Add v8plus{,a} support.
4393         Add v9a support.
4394         (sparc_compatible): New function.
4395         * elf32-sparc.h: #include "elf/sparc.h".
4396         (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
4397         elf32_sparc_final_write_processing): New functions.
4398         (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
4399         elf_backend_final_write_processing): Define.
4400
4401 Mon Jan 22 11:21:51 1996  Michael Meissner  <[email protected]>
4402
4403         * elf-bfd.h (struct elf_link_hash_entry): Add
4404         linker_section_pointer field.
4405         (enum elf_linker_section_enum): Enumeration for new way of
4406         creating linker dynamic sections and symbols.
4407         (elf_linker_section{,_pointers}): New structures for creating
4408         dynamic sections and symbols.
4409         (elf_obj_tdata): Add linker_section_pointers and linker_section
4410         fields.
4411         (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
4412         (_bfd_elf_create_linker_section): New declarations.
4413         (_bfd_elf_find_pointer_linker_section): Ditto.
4414         (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
4415         (_bfd_elf_make_linker_section_rela): Ditto.
4416
4417         * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
4418
4419         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
4420         (ppc_elf_create_linker_section): New function to create the
4421         sections .got, .sdata, and .sdata2.
4422         (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
4423         needed.
4424         (ppc_elf_check_relocs): Support more of the eabi relocations.
4425         (ppc_elf_relocate_section): Ditto.
4426         (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
4427         if the .sdata{,2} + .sbss{,2} section size is > 32k.
4428
4429         * elflink.h (elf_create_pointer_linker_section): New function to
4430         create initialized pointers in dynamic linker sections.
4431         (elf_finish_pointer_linker_section): Actually intialize the
4432         pointers created above.
4433
4434         * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
4435         macros to provide both 32 and 64 bit versions of
4436         elf_create_pointer_linker_section.
4437         (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
4438         provide both 32 and 64 bit versions of
4439         elf_finish_pointer_linker_section.
4440
4441         * elflink.c (_bfd_elf_create_linker_section): New function to
4442         create a linker section.
4443         (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
4444         given address in the linker pointer offsets created for a given
4445         symbol.
4446         (_bfd_elf_make_linker_section_rela): Make a RELA section
4447         corresponding to the generated linker section.
4448
4449 Sat Jan 20 08:36:10 1996  Doug Evans  <[email protected]>
4450
4451         * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
4452
4453 Thu Jan 18 18:25:34 1996  Kim Knuttila  <[email protected]>
4454
4455         * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
4456         (coff_ppc_relocate_section): Handle special values for gcc built dlls.
4457         (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
4458         Also begin the toc at 4 as an eye catcher ('31313131' marks the first
4459         toc entry in an objdump) for now.
4460         (ppc_do_last, ppc_get_last): New function - needed to save processing 
4461         the toc owner to the end.
4462         (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the 
4463         toc owner last.
4464
4465         * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the 
4466         toc owner from being done till last. Must define POWERPC_LE_PC 
4467         to enable it.
4468
4469         * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
4470
4471         * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
4472         to INFO.
4473         (coff_swap_aouthdr_out): Removed a non-working hack for computing the
4474         SizeOfImage for PowerPC. Ignore the size of the .junk section.
4475
4476 Thu Jan 18 17:42:12 1996  Ian Lance Taylor  <[email protected]>
4477
4478         * elfcore.h: Include <signal.h> before <sys/procfs.h>.
4479
4480 Wed Jan 17 12:40:14 1996  Ian Lance Taylor  <[email protected]>
4481
4482         * cpu-powerpc.c (arch_info_struct): Change last entry to not point
4483         back to first.
4484         (bfd_powerpc_arch): Point at first entry in arch_info_struct.
4485
4486 Tue Jan 16 15:10:49 1996  Ian Lance Taylor  <[email protected]>
4487
4488         * elf.c (assign_file_positions_for_segments): Don't increment file
4489         offset for a segment which contains no loadable sections.
4490
4491 Mon Jan 15 17:46:27 1996  Michael Meissner  <[email protected]>
4492
4493         * reloc.c: Add new PowerPC relocations.
4494         * {bfd-in2,libbfd}.h: Regenerate.
4495
4496         * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
4497         (ppc_elf_reloc_type_lookup): Lookup new relocations.
4498
4499 Mon Jan 15 14:29:44 1996  Ian Lance Taylor  <[email protected]>
4500
4501         * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
4502         entries.
4503
4504         * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
4505         info->shared.
4506
4507         * coffgen.c (coff_find_nearest_line): Don't try to cache
4508         information in sections that are not owned by a BFD.  From Richard
4509         Henderson <[email protected]>.
4510
4511         * elf32-mips.c: Numerous changes to dynamic linking code, mostly
4512         from Kazumoto Kojima <[email protected]>.
4513         * elflink.h (elf_link_output_extsym): Remove special check for
4514         _rld_new_interface.
4515
4516         * ecoffswap.h: Add prototypes for static functions.
4517
4518 Sun Jan 14 21:36:08 1996  Michael Meissner  <[email protected]>
4519
4520         * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
4521         (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
4522         references.
4523         (ppc_elf_relocate_section):  No longer allow .sdata/.sbss sections
4524         to satisfy a TOC16 relocation.  Rewrite unsupported relocation
4525         support.  Begin support for R_PPC_SDA{2,}REL.
4526
4527 Sat Jan 13 09:36:52 1996  Michael Meissner  <[email protected]>
4528
4529         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
4530         create the .got and .got.neg sections.
4531         (ppc_elf_size_dynamic_sections): Call it.
4532         (ppc_elf_check_relocs): Call it.
4533         (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
4534         (ppc_elf_check_relocs): Add error messages for relocations we
4535         don't yet support.  Do not include R_PPC_SDAREL16 like a GOT
4536         relocation.
4537
4538 Fri Jan 12 15:27:59 1996  Michael Meissner  <[email protected]>
4539
4540         * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
4541         section flags for V.4 and eabi.
4542
4543 Fri Jan 12 13:59:16 1996  Ian Lance Taylor  <[email protected]>
4544
4545         * elf.c (assign_file_positions_for_segments): If a segment
4546         contains no sections, don't mark it as readable.
4547
4548         * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
4549         * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
4550
4551         * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
4552         dynamic section, if there is one.
4553         * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
4554         (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
4555         (bfd_elf64_swap_dyn_in): Likewise.
4556         * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
4557         PTR.
4558         (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
4559
4560         * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
4561         DT_TEXTREL entry because of .rel.plt.  From Martin Pirker
4562         <[email protected]>.
4563
4564 Thu Jan 11 17:06:14 1996  Michael Meissner  <[email protected]>
4565
4566         * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
4567         PowerPC V.4 and eabi.
4568         * bfd-in2.h: Regenerate.
4569         * libfd.h: Regenerate.
4570
4571         * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
4572
4573         * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
4574         section type and SHF_EXCLUDE section flag, turning them into the
4575         appropriate bfd section flag.
4576
4577 Thu Jan 11 11:23:30 1996  Ian Lance Taylor  <[email protected]>
4578
4579         * xcofflink.c (xcoff_link_add_symbols): Create the special
4580         sections if we see a DYNAMIC object, in case that is the only
4581         XCOFF input object we see.
4582         
4583         * elf32-mips.c: Extensive changes for a start at dynamic linking
4584         support, from Kazumoto Kojima <[email protected]>.
4585
4586         * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
4587         (struct elf_backend_data): Remove
4588         elf_backend_create_program_headers field.  Add
4589         elf_backend_additional_program_headers and
4590         elf_backend_modify_segment_map fields.
4591         * elfxx-target.h (elf_backend_type_change_ok): Define if not
4592         defined.
4593         (elf_backend_additional_program_headers): Likewise.
4594         (elf_backend_modify_segment_map): Likewise.
4595         (elf_backend_create_program_headers): Don't define.
4596         (elfNN_bed): Change to account for field changes.
4597         * elf.c (assign_file_positions_for_segments): Call new
4598         modify_segment_map backend function.  Don't call old
4599         create_program_headers backend function.
4600         (get_program_header_size): Call additional_program_headers rather
4601         than create_program_headers.
4602         * elflink.h (elf_link_add_object_symbols): Initialize
4603         type_change_ok from new backend field.
4604         (elf_link_output_extsym): Don't warn if _rld_new_interface is
4605         defined.
4606         (elf_reloc_link_order): Treat a reloc against a defined symbol as
4607         a reloc against the appropriate section.
4608
4609         * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
4610         (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
4611         (elf_flags_init): Rename from elf_ppc_flags_init.
4612         * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
4613         elf_ppc_flags_init.
4614         (ppc_elf_copy_private_bfd_data): Likewise.
4615         (ppc_elf_merge_private_bfd_data): Likewise.
4616
4617         * elf32-m68k.c (howto_table): Change src_mask to 0 for all
4618         relocation entries.
4619
4620 Tue Jan  9 15:22:53 1996  David Mosberger-Tang  <[email protected]>
4621
4622         * coff-alpha.c (alpha_relocate_section): During final link, allow
4623         output .lita section to be bigger than 64k by adjusting gp value
4624         on a per-input section basis.
4625         * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
4626         field.
4627         (struct ecoff_section_tdata): Add gp field.
4628
4629 Tue Jan  9 12:00:36 1996  Ian Lance Taylor  <[email protected]>
4630
4631         Handle Alpha ECOFF changes in OSF/1 3.2.
4632         * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
4633         field.
4634         * coff-alpha.c: Include "aout/ar.h".
4635         (alpha_ecoff_get_relocated_section_contents): Don't require an
4636         ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
4637         3.2 doesn't generate one.
4638         (alpha_relocate_section): Likewise.
4639         (alpha_ecoff_slurp_armap): Define.
4640         (alpha_ecoff_slurp_extended_name_table): Define.
4641         (alpha_ecoff_construct_extended_name_table): Define.
4642         (alpha_ecoff_truncate_arname): Define.
4643         (alpha_ecoff_write_armap): Define.
4644         (alpha_ecoff_generic_stat_arch_elt): Define.
4645         (alpha_ecoff_update_armap_timestamp): Define.
4646         (ARFZMAG): Define.
4647         (alpha_ecoff_read_ar_hdr): New static function.
4648         (alpha_ecoff_get_elt_at_filepos): New static function.
4649         (alpha_ecoff_openr_next_archived_file): New static function.
4650         (alpha_ecoff_get_elt_at_index): New static function.
4651         (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
4652         (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
4653         _bfd_ecoff to alpha_ecoff.
4654         * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
4655         field from backend structure, rather than always calling
4656         _bfd_get_elt_at_filepos.
4657         * coff-mips.c (mips_ecoff_backend_data): Initialize
4658         get_elt_at_filepos field.
4659         * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
4660         from _bfd_generic_read_ar_hdr with minor changes.
4661         (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
4662         * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
4663         * libbfd.h: Rebuild.
4664
4665         * bfd-in.h (BFD_IN_MEMORY): Define.
4666         * libbfd-in.h (struct bfd_in_memory): Define.
4667         * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
4668         (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
4669         (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
4670         (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
4671         * bfd.c (struct _bfd): Change iostream field from char * to PTR.
4672         (bfd_get_size): Handle BFD_IN_MEMORY flag.
4673         * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
4674         (bfd_open_file): Cast to PTR, not char *, when setting iostream.
4675         (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
4676         * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
4677         iostream.
4678         (bfd_openstreamr): Likewise.
4679         * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
4680         BFD_IN_MEMORY is not set.
4681         * riscix.c (riscix_some_aout_object_p): Likewise.
4682         * bfd-in2.h, libbfd.h: Rebuild.
4683
4684         * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
4685         (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
4686         (bfd_get_elt_at_index): Define.
4687         * archive.c (_bfd_generic_get_elt_at_index): Rename from
4688         bfd_get_elt_at_index.  Change index parameter from int to
4689         symindex.
4690         * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
4691         (_bfd_noarchive_get_elt_at_index): Define.
4692         (_bfd_archive_bsd_get_elt_at_index): Define.
4693         (_bfd_archive_coff_get_elt_at_index): Define.
4694         * bfd-in2.h, libbfd.h: Rebuild.
4695         * aout-target.h (MY_get_elt_at_index): Define if not defined.
4696         * coff-rs6000.c (xcoff_get_elt_at_index): Define.
4697         * ieee.c (ieee_get_elt_at_index): Define.
4698         * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
4699         * oasys.c (oasys_get_elt_at_index): Define.
4700         * som.c (som_get_elt_at_index): Define.
4701
4702         * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
4703         numbers to the .text section.
4704
4705 Mon Jan  8 17:00:57 1996  Ian Lance Taylor  <[email protected]>
4706
4707         * ieee.c (ieee_write_debug_part): Change return type to boolean.
4708         If there is a SEC_DEBUGGING section, get the contents of the debug
4709         information part from it.
4710         (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
4711         section in memory.
4712         (ieee_write_object_contents): Check ieee_write_debug_part return.
4713
4714 Thu Jan  4 17:12:37 1996  Fred Fish  <[email protected]>
4715
4716         * config.bfd (i[345]86-*-freebsd*): Add target.
4717         * configure.in (i386freebsd_vec): Add vec.
4718         * configure: Regenerate.
4719         * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
4720         (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
4721         Rebuild dependencies..
4722         * freebsd.h: New file.
4723         * i386freebsd.c: New file.
4724         * targets.c (i386freebsd_vec): Declare.
4725         (bfd_target_vector): Add i386freebsd_vec.
4726         * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
4727         * i386netbsd.c (SEGMENT_SIZE):  Define as TARGET_PAGE_SIZE
4728         
4729 Thu Jan  4 16:27:46 1996  Ian Lance Taylor  <[email protected]>
4730
4731         * ieee.c (ieee_slurp_debug): New static function.
4732         (ieee_object_p): Call it.
4733         (ieee_slurp_section_data): Skip debugging sections.
4734         (ieee_get_reloc_upper_bound): Likewise.
4735         (ieee_get_section_contents): Likewise.
4736         (ieee_canonicalize_reloc): Likewise.
4737         (ieee_write_section_part): Likewise.
4738         (ieee_write_debug_part): Likewise.
4739         (ieee_write_data_part): Likewise.
4740         (init_for_output): Likewise.
4741
4742 Wed Jan  3 19:42:47 1996  Michael Meissner  <[email protected]>
4743
4744         * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
4745         work.
4746         (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
4747         relocs, since ppc_elf_relocate_section handles the linker case.
4748         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
4749         used.
4750         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
4751         ppc_elf_relocate_section since that is now the only caller.
4752         (ppc_elf_relocate_section): Ditto.
4753
4754 Wed Jan  3 15:11:30 1996  Ian Lance Taylor  <[email protected]>
4755
4756         * coffcode.h (coff_write_object_contents): If we don't know the
4757         section of the entry point for an XCOFF executable, always set the
4758         entry address to -1.
4759
4760 Tue Jan  2 14:17:15 1996  Michael Meissner  <[email protected]>
4761
4762         * elf.c (bfd_section_from_shdr): Add support for note sections.
4763
4764 Tue Jan  2 13:10:25 1996  Ian Lance Taylor  <[email protected]>
4765
4766         * bfd-in.h (struct _symbol_info): Add stab_type field.
4767         * bfd-in2.h: Rebuild.
4768         * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
4769
4770         * elf32-ppc.c: Remove trailing newline from calls to
4771         _bfd_error_handler.
4772         (ppc_elf_merge_private_bfd_data): Only warn about endianness
4773         difference if target endianness is known.
4774
4775 Thu Dec 21 12:43:49 1995  Michael Meissner  <[email protected]>
4776
4777         * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
4778         old style TOC16 references without using R_PPC_GOT.
4779         (ppc_reloc_type): Ditto.
4780         (ppc_elf_reloc_type_lookup): Add support for TOC16.
4781         (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
4782         (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
4783         (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
4784         (ppc_elf_check_relocs): New function for GOT/PLT support that is
4785         work in progress.
4786         (ppc_elf_adjust_dynamic_symbol): Ditto.
4787         (ppc_elf_adjust_dynindx): Ditto.
4788         (ppc_elf_size_dynamic_sections): Ditto.
4789         (ppc_elf_finish_dynamic_symbol): Ditto.
4790         (ppc_elf_finish_dynamic_sections): Ditto.
4791         (ELF_DYNAMIC_INTERPRETER): Define.
4792
4793 Wed Dec 20 19:14:18 1995  Ken Raeburn  <[email protected]>
4794
4795         * elf.c (copy_private_bfd_data): When attaching sections to
4796         segments ignore sections that won't be allocated.  Patch from
4797         Andreas Schwab.
4798
4799 Tue Dec 19 20:01:43 1995  Ken Raeburn  <[email protected]>
4800
4801         * config.bfd: Match on m68k-cbm-* only if OS doesn't match
4802         anything else.
4803
4804 Tue Dec 19 16:38:59 1995  Ian Lance Taylor  <[email protected]>
4805
4806         * coff-i960.c (CALC_ADDEND): Define.
4807         (coff_i960_relocate_section): Add the input section VMA to the
4808         addend for PC relative relocs.
4809
4810 Sun Dec 17 20:11:55 1995  Kim Knuttila  <[email protected]>
4811
4812         * peicode.h (pe_print_pdata): Must test the entire entry for zero
4813         to correctly terminate.
4814
4815 Fri Dec 15 12:05:57 1995  Ian Lance Taylor  <[email protected]>
4816
4817         * targets.c (enum bfd_endian): Define.
4818         (bfd_target): Rename byteorder_big_p to byteorder, and change it
4819         from boolean to enum bfd_endian.  Change header_byteorder_big_p
4820         correspondingly.
4821         * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
4822         (bfd_header_big_endian, bfd_header_little_endian): New macros.
4823         * bfd-in2.h: Rebuild.
4824         * All targets: Change initialization of byteorder and
4825         header_byteorder to use enum bfd_endian values rather than
4826         booleans.
4827         * All files: Change all references to byteorder_big_p and
4828         header_byteorder_big_p to use new bfd_*_endian macros.
4829
4830         * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
4831         s_vaddr.
4832         * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
4833         vma.
4834         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4835
4836 Fri Dec 15 07:32:09 1995  steve chamberlain  <[email protected]>
4837
4838         * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
4839
4840 Thu Dec 14 13:45:37 1995  Ian Lance Taylor  <[email protected]>
4841
4842         * ieee.c: Lots of minor cleanups.  Make many functions return
4843         errors rather than calling abort.  Also:
4844         (ieee_write_twobyte): Remove; change callers to call existing
4845         ieee_write_2bytes function.
4846         (ieee_write_expression): Don't output the section twice when
4847         outputting a local symbol.  Don't emit an extraneous zero if there
4848         is only one term.
4849         (ieee_slurp_sections): Set the lma as well as the vma.
4850         (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
4851
4852         * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
4853         a recognized one or bfd_arch_unknown.
4854         (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
4855         to succeed.
4856         (ihex_get_symtab): Likewise.
4857
4858 Wed Dec 13 15:44:06 1995  Ian Lance Taylor  <[email protected]>
4859
4860         * aoutx.h: Include <ctype.h>.
4861         (struct aout_link_includes_table): Define.
4862         (struct aout_link_includes_totals): Define.
4863         (struct aout_link_includes_entry): Define.
4864         (aout_link_includes_lookup): Define macro.
4865         (struct aout_final_link_info): Add includes field.
4866         (aout_link_includes_newfunc): New static function.
4867         (NAME(aout,final_link)): Initialize includes hash table.
4868         (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
4869
4870 Wed Dec 13 10:52:14 1995  Stan Shebs  <[email protected]>
4871
4872         * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
4873
4874 Wed Dec 13 11:07:45 1995  Kim Knuttila  <[email protected]>
4875
4876         * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
4877
4878 Tue Dec 12 17:42:06 1995  Kim Knuttila  <[email protected]>
4879
4880         * peicode.h (pe_print_reloc): New function to dump the .reloc section.
4881         (pe_print_private_bfd_data): call pe_print_reloc.
4882         * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
4883         * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
4884         up some debugging as well.
4885
4886 Tue Dec 12 11:34:23 1995  Ian Lance Taylor  <[email protected]>
4887
4888         * config.bfd: Handle sparc-*-elf*.  From Ronald F. Guilmette
4889         <[email protected]>.
4890
4891 Fri Dec  8 17:47:07 1995  Ian Lance Taylor  <[email protected]>
4892
4893         * elflink.h (elf_link_add_object_symbols): Set section_count to 0
4894         when setting sections to NULL.
4895
4896 Wed Dec  6 17:05:37 1995  Ian Lance Taylor  <[email protected]>
4897
4898         * xcofflink.c (struct xcoff_loader_info): Add export_defineds
4899         field.
4900         (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
4901         (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
4902         for all symbols.
4903         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
4904         * bfd-in2.h: Rebuild.
4905
4906 Mon Dec  4 16:40:47 1995  Kim Knuttila  <[email protected]>
4907
4908         * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
4909
4910 Mon Dec  4 11:25:39 1995  Ian Lance Taylor  <[email protected]>
4911
4912         * ihex.c (ihex_scan): Handle record types 4 and 5.
4913         (ihex_object_p): Permit types 4 and 5.
4914         (ihex_set_section_contents): Remove check for out of range
4915         addresses.
4916         (ihex_write_object_contents): Generate types 4 and 5.
4917
4918         * elflink.h (elf_link_output_extsym): Just ignore warning and
4919         indirect references to symbols which don't really exist.
4920
4921 Sun Dec  3 19:00:27 1995  Kim Knuttila  <[email protected]>
4922
4923         * peicode.h (pe_print_idata): Minor format fixes
4924         (pe_print_edata): New function. Under private printing, this formats
4925         the edata section of a PE file.
4926         (pe_print_private_bfd_data): Added call to pe_print_edata.
4927
4928 Sun Dec  3 16:46:54 1995  Richard Earnshaw ([email protected])
4929
4930         * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
4931         index, don't call stoi.
4932
4933 Fri Dec  1 14:46:51 1995  Ian Lance Taylor  <[email protected]>
4934
4935         * srec.c (srec_scan): Set lma as well as vma.
4936
4937         * ihex.c: New file; support for Intel Hex format.
4938         * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
4939         (ihex_vec): Declare.
4940         (bfd_target_vector): Always include ihex_vec.
4941         * bfd.c (struct _bfd): Add ihex_data field to tdata union.
4942         * Makefile.in: Rebuild dependencies.
4943         (BFD_LIBS): Add ihex.o
4944         (BFD_LIBS_CFILES): Add ihex.c.
4945         * bfd-in2.h: Rebuild.
4946
4947         * elf.c (assign_file_positions_for_segments): Sort the sections in
4948         each segment.
4949         (get_program_header_size): Return the right size if segment_map is
4950         not NULL.
4951         (copy_private_bfd_data): Don't bother to sort the sections.
4952
4953         * bfd.c (bfd_record_phdr): New function.
4954         * bfd-in.h (bfd_record_phdr): Declare.
4955         * bfd_in2.h: Rebuild.
4956
4957         * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
4958         BFD_ASSERT.
4959
4960         * libbfd.c (bfd_malloc, bfd_realloc): New functions.
4961         (bfd_zmalloc): Return PTR, not char *.  Take size_t, not
4962         bfd_size_type.
4963         * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
4964         (bfd_zmalloc): Change declaration.
4965         * libbfd.h: Rebuild.
4966         * Many files: Use bfd_malloc and bfd_realloc rather than malloc
4967         and realloc.  Don't set bfd_error_no_memory if they fail.
4968
4969 Thu Nov 30 19:32:26 1995  Kim Knuttila  <[email protected]>
4970
4971         * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
4972         uses as well. Added a new howto to deal with TOCREL16 relocs that 
4973         are TOCDEFN as well.
4974         (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
4975         to handle RVA relocs from dlltool.
4976         (ppc_coff_rtype2howto): TOCDEFN reloc addition.
4977         (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
4978         (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
4979
4980         * coffcode.h (coff_set_alignment_hook): check idata$X sections 
4981         to get the right section alignment.
4982
4983 Thu Nov 30 16:48:18 1995  Ian Lance Taylor  <[email protected]>
4984
4985         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
4986         p_paddr if p_paddr is zero.
4987         (make_mapping): Set includes_filehdr and includes_phdrs for first
4988         PT_LOAD segment.
4989         (map_sections_to_segments): Set includes_phdrs for PT_PHDR
4990         segment.
4991         (assign_file_positions_for_segments): Handle includes_filehdr and
4992         includes_phdrs.  Remove special handling of PT_PHDR and first
4993         PT_LOAD segments.
4994         (copy_private_bfd_data): Set includes_filehdr and includes_phdr
4995         when appropriate.  Remove special handling of PT_PHDR segment.
4996         Use a more complex condition for when a section is included in a
4997         segment to handle Solaris linker oddities.
4998
4999 Thu Nov 30 11:17:33 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <[email protected]>
5000
5001         * coff-m88k.c (howto_table): Reformatted for easier reading;
5002         special_function now points to new function m88k_special_reloc.
5003         (howto_hvrt16): Function previously used for handling HVRT16 relocs
5004         removed.
5005         (rtype2howto): Do not add reloc's r_offset to the addend, this will
5006         be done correctly by m88k_special_reloc.
5007         (reloc_processing): New function to be used by RELOC_PROCESSING.
5008         (RELOC_PROCESSING): Define to call reloc_processing.
5009
5010 Wed Nov 29 12:42:36 1995  Ian Lance Taylor  <[email protected]>
5011
5012         * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
5013         (pe_print_pdata): Likewise.
5014
5015         * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
5016         obstack_alloc fails.
5017         (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
5018         fails.
5019         * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
5020         * Many files: don't set bfd_error_no_memory if one of the above
5021         routines fails.
5022
5023         * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
5024         if p_paddr_valid is set.
5025         (copy_private_bfd_data): New static function.
5026         (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
5027
5028         * elf.c (assign_file_positions_for_segments): Fix case where extra
5029         program headers were allocated.
5030
5031         * elf.c (_bfd_elf_print_private_bfd_data): New function.
5032         * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
5033         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
5034         _bfd_elf_print_private_bfd_data.
5035
5036         * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
5037         r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
5038         Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
5039         (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
5040         RELOC_SECTION_LITA for ALPHA_R_IGNORE.
5041         (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
5042         RELOC_SECTION_ABS to RELOC_SECTION_NONE.
5043
5044 Tue Nov 28 16:59:50 1995  Ian Lance Taylor  <[email protected]>
5045
5046         * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
5047         * elf.c (make_mapping): New static function.
5048         (map_sections_to_segments): New static function.
5049         (elf_sort_sections): New static function.
5050         (assign_file_positions_for_segments): New static function.
5051         (map_program_segments): Remove.
5052         (get_program_header_size): Remove sorted_hdrs, count, and
5053         maxpagesize parameters.  Simplify.
5054         (assign_file_positions_except_relocs): When generating an
5055         executable, use assign_file_positions_for_segments.
5056         (elf_sort_hdrs): Remove.
5057         (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
5058         to get_program_header_size.
5059
5060 Mon Nov 27 12:27:46 1995  Ian Lance Taylor  <[email protected]>
5061
5062         * hp300hpux.c (MY(callback)): Set lma as well as vma.
5063
5064         * configure, config.in: Regenerate with autoconf 2.7.
5065
5066         * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
5067         * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
5068
5069 Wed Nov 22 12:02:09 1995  Ian Lance Taylor  <[email protected]>
5070
5071         * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
5072         (ecoff_sec_to_styp_flags): Likewise.
5073         (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
5074         (ecoff_set_symbol_info): Handle scRConst.
5075         (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
5076         (ecoff_compute_section_file_positions): Handle .rconst section.
5077         (_bfd_ecoff_write_object_contents): Likewise.
5078         (ecoff_link_check_archive_element): Handle scRConst.
5079         (ecoff_link_add_externals): Likewise.
5080         (ecoff_link_write_external): Handle .rconst section.
5081         (ecoff_reloc_link_order): Likewise.
5082         * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
5083         * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
5084         section.
5085         (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
5086
5087         * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
5088         DEF_DYNAMIC flag is set.
5089
5090 Tue Nov 21 13:25:29 1995  Ken Raeburn  <[email protected]>
5091
5092         * host-aout.c: If TRAD_HEADER is defined, include it.
5093
5094 Tue Nov 21 13:03:57 1995  Ian Lance Taylor  <[email protected]>
5095
5096         * aclocal.m4 (AC_PROG_CC): Remove local definition.
5097         (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
5098         (BFD_NEED_DECLARATION): New function.
5099         * configure.in: Use BFD_NEED_DECLARATION.
5100         * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
5101         * configure, config.in: Rebuild with autoconf 2.6.
5102
5103         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
5104         special_sections before returning when called with a non XCOFF
5105         BFD.
5106
5107         * coffgen.c (coff_renumber_symbols): Sort common symbols with
5108         global symbols.
5109
5110         * coffcode.h (coff_compute_section_file_positions): Only pad the
5111         previous section to force file alignment when creating an
5112         executable.
5113
5114 Mon Nov 20 14:54:09 1995  Ian Lance Taylor  <[email protected]>
5115
5116         * coffcode.h (coff_compute_section_file_positions): If
5117         RS6000COFF_C, set up the .debug section.
5118
5119         * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
5120         if it is not large enough to accomodate the entire TOC area with
5121         signed 16 bit offsets.
5122         (xcoff_write_global_symbol): Handle negative TOC offsets in global
5123         linkage code.
5124         (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
5125         TOC anchor to use the TOC value used in the output file.
5126
5127 Sat Nov 18 18:01:41 1995  Ian Lance Taylor  <[email protected]>
5128
5129         * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
5130         (_bfd_coff_read_string_table): Likewise.
5131
5132 Sat Nov 18 19:43:04 1995  Richard Earnshaw ([email protected])
5133
5134         * pe-arm.c: Fix typos.
5135         * coff-arm.c: Likewise.
5136
5137 Fri Nov 17 16:22:04 1995  Kim Knuttila  <[email protected]>
5138
5139         * coff-ppc.c (list_ele): Added "cat"egory member.
5140         (record_toc): New category parameter (priv or pub).
5141         (ppc_record_toc_entry): Check to see if toc bounds exceeded.
5142         (ppc_process_before_allocation): Removed embrionic data-in-toc from
5143         the mainline. It addes extra toc cells in error.
5144         (ppc_coff_swap_sym_in_hook): Added some documentation.
5145         (dump_toc): Can now diagnose "virtual toc" chicanery.
5146
5147 Fri Nov 17 10:41:25 1995  Philippe De Muyter  <[email protected]>
5148
5149         * elf-bfd.h (struct elf_link_hash_table): Change type of
5150         dynsymcount and bucketcount fields from size_t to bfd_size_type.
5151
5152 Fri Nov 17 10:02:58 1995  Ian Lance Taylor  <[email protected]>
5153
5154         * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
5155         pointerize C_LEAFSTAT or C_LEAFEXT entries.
5156
5157         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
5158         DT_INIT and DT_FINI entries if the _init or _fini symbol is
5159         defined or mentioned in a regular file.
5160
5161 Thu Nov 16 15:16:42 1995  Kim Knuttila  <[email protected]>
5162
5163         * coff-ppc.c (ppc_record_data_in_toc_entry): new function
5164         (coff_ppc_relocate_section): Handle TOCDEFN attribute
5165         (coff_ppc_relocate_section): Correct REL24 handling
5166         (ppc_process_before_allocation): Correct TOCDEFN handling
5167
5168         * peicode.h (dir_names): Added name descriptions
5169
5170 Thu Nov 16 03:38:03 1995  Ken Raeburn  <[email protected]>
5171
5172         * VERSION: Updated to cygnus-2.6.
5173
5174 Wed Nov 15 19:30:07 1995  Ken Raeburn  <[email protected]>
5175
5176         * targets.c (m68k4knetbsd_vec): Declare.
5177
5178 Wed Nov 15 18:05:52 1995  Ian Lance Taylor  <[email protected]>
5179
5180         * targets.c (bfd_target): Change type of second argument to
5181         _bfd_print_private_bfd_data from void * to PTR.
5182         * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
5183         using PTR rather than void *.
5184         * bfd-in2, libbfd.h: Rebuild.
5185         * peicode.h (pe_print_private_bfd_data): Change vfile from void *
5186         to PTR.
5187         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
5188         _bfd_generic_bfd_print_private_bfd_data rather than casting
5189         bfd_true.
5190
5191 Wed Nov 15 04:09:14 1995  Ken Raeburn  <[email protected]>
5192
5193         * Makefile.in (.dep1): Fix stupid typo in last change.  Remove any
5194         "DO NOT DELETE" lines or blank lines that mkdep writes on some
5195         systems.
5196         (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
5197         BFD64_BACKENDS_CFILES): New variables.
5198         (CFILES): Use them.
5199         
5200 Tue Nov 14 11:52:23 1995  Ian Lance Taylor  <[email protected]>
5201
5202         * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
5203         not at the file position of the first section.
5204         * coffcode.h (coff_compute_section_file_positions): Avoid using
5205         unportable #elif.
5206         (coff_write_object_contents): When generating a PPC PE executable
5207         with no symbols, round up the file size to a COFF_PAGE_SIZE
5208         boundary.
5209         * cofflink.c (_bfd_coff_final_link): If there are no symbols,
5210         don't write out a string table.
5211
5212         * elf.c (bfd_section_from_shdr): When using a different section
5213         header, pass the new one to _bfd_elf_make_section_from_shdr.
5214         (elf_fake_sections): Don't set sh_info and sh_entsize fields.
5215         (elf_map_symbols): Add section VMA to symbol value when comparing
5216         against 0.
5217         (_bfd_elf_compute_section_file_positions): Only build symbol table
5218         if there are some symbols.  Set file offset of symtab and strtab
5219         sections.
5220         (assign_file_positions_except_relocs): Remove dosyms parameter.
5221         Change all callers.  Never set file offset of symtab and strtab
5222         sections.
5223         (_bfd_elf_copy_private_section_data): New function.
5224         (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
5225         (_bfd_elf_copy_private_symbol_data): New function.
5226         (swap_out_syms): Check for special mapping of st_shndx created by
5227         copy_private_symbol_data.
5228         * elfxx-target.h: Use new copy routines.
5229         * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
5230         (_bfd_elf_copy_private_section_data): Declare.
5231
5232         * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
5233
5234         * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
5235         C_NT_WEAK.
5236
5237         * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
5238         _bfd_dummy_target, matching the recent change to archive
5239         recognition.
5240
5241 Mon Nov 13 13:24:38 1995  Ian Lance Taylor  <[email protected]>
5242
5243         * libbfd.c (bfd_get_file_window): Use casts to avoid doing
5244         arithmetic on PTR types.
5245
5246         * aout-target.h (MY(callback)): Set the lma of the sections.
5247
5248         * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
5249         symbol into a reloc against the section.
5250
5251 Mon Nov 13 07:31:35 1995  Kim Knuttila  <[email protected]>
5252
5253         * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
5254         glue for the relocs: IMGLUE and IFGLUE.
5255         (record_toc): new function - tracks toc contents
5256         (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
5257         (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
5258         (ppc_coff_rtype2howto): removed invalid IMGLUE hack
5259         (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
5260         (ppc_record_toc_entry): Removed a debug define (duh)
5261
5262         * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
5263         (pe_print_idata): New function - formats the idata section data
5264         (pe_print_pdata): New function - formats the pdata section data
5265         (pe_print_private_bfd_data): calls to above
5266
5267 Sun Nov 12 12:23:24 1995  Stan Shebs  <[email protected]>
5268
5269         * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
5270         * coff-rs6000.c (rs6000coff_vec): Add conditional defines
5271         TARGET_SYM and TARGET_NAME for vector and BFD name.
5272         * coff-pmac.c (pmac_xcoff_vec): Remove.
5273         (TARGET_SYM, TARGET_NAME): Define.
5274         * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
5275         machine to 0, not all PowerMacs are 601s.
5276
5277 Fri Nov 10 12:10:14 1995  Ian Lance Taylor  <[email protected]>
5278
5279         * elfcode.h (elf_object_p): Read in any program headers.
5280         * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
5281         based on the program headers, if any.
5282         (elf_fake_sections): Set sh_addr from the vma, not the lma.
5283         (map_program_segments): Set p_paddr of program headers based on
5284         the lma.
5285
5286 Thu Nov  9 13:01:31 1995  Ian Lance Taylor  <[email protected]>
5287
5288         * archive.c (bfd_generic_archive_p): Preserve tdata in case of
5289         failure.
5290
5291         * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
5292         trying to do a relocateable link with a non-a.out object file.
5293
5294         * archive.c (bfd_generic_archive_p): Check the first object file
5295         in an archive even if target_defaulted is set.  If the object file
5296         has the wrong xvec, reject it.
5297
5298         * aoutx.h (NAME(aout,set_section_contents)): If a section can not
5299         be represented, report the name via _bfd_error_handler.
5300         (translate_to_native_sym_flags): Likewise.
5301         * elf32-mips.c (mips_elf_final_link): Likewise.
5302         * oasys.c (oasys_write_sections): Likewise.
5303
5304         * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
5305         which checks for STYP_OVRFLO sections.
5306         (coff_compute_section_file_positions): If RS6000COFF_C, handle
5307         reloc and lineno count overflows.
5308         (coff_write_object_contents): Call coff_count_linenumbers before
5309         coff_compute_section_file_positions.  If RS6000COFF_C, handle
5310         reloc and lineno count overflows.
5311         * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
5312         relocs before dealing with .pad sections.  Count overflow section
5313         headers when handling .pad sections.
5314
5315         * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
5316         if RS6000COFF_C.
5317
5318         * xcofflink.c (XCOFF_DESCRIPTOR): Define.
5319         (struct xcoff_link_hash_table): Add descriptor_section and
5320         special_sections fields.
5321         (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
5322         (xcoff_link_add_symbols): Set linkage section alignment.  Create
5323         descriptor section.  Check for magic symbol names (_text, etc.),
5324         and record them in special_sections if found.  Set
5325         XCOFF_DESCRIPTOR flag for a function descriptor, and set its
5326         descriptor field to point back to the function code symbol.
5327         (xcoff_sweep): Always mark the special descriptor_section.
5328         (bfd_xcoff_export_symbol): Check whether the symbol might be a
5329         function descriptor, and mark it if it is.
5330         (bfd_xcoff_size_dynamic_sections): Add new special_sections
5331         parameter, and fill it in.  Allocate space for the descriptor
5332         section.
5333         (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
5334         global linkage code.  If an undefined function descriptor is
5335         exported, arrange to define it.  Warn about any other undefined
5336         exported symbol.
5337         (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
5338         (xcoff_write_global_symbol): Create a function descriptor when
5339         necessary.
5340         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
5341         * bfd-in2.h: Rebuild.
5342
5343 Thu Nov  9 08:40:23 1995  Kim Knuttila  <[email protected]>
5344
5345         * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
5346         (ppc_coff_link_hash_table): new types for hashing
5347         (ppc_coff_link_hash_newfunc): hash entry constructor
5348         (ppc_coff_link_hash_table_init): hash table initializer
5349         (ppc_coff_link_hash_table_create): hash table constructor
5350         (ppc_record_toc_entry): changed references to hash table
5351         (coff_ppc_relocate_section): changed references to hash table
5352
5353         * libcoff-in.h (coff_link_hash_entry): removed toc_offset
5354         * libcoff.h: Rebuild
5355
5356         * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
5357         (coff_link_add_symbols): removed toc_offset init
5358
5359 Thu Nov  9 04:00:38 1995  Ken Raeburn  <[email protected]>
5360
5361         * Makefile.in (.dep1): Make sure the file mkdep is to write exists
5362         first.
5363
5364         * configure.in: Added new option --with[out]-mmap.  Set USE_MMAP
5365         if it is given and mmep is available.
5366         * acconfig.h: Undef USE_MMAP.
5367         * configure, config.in: Regenerated.
5368         * aoutx.h: If USE_MMAP is not defined, do all symbol and string
5369         table handling the old way.
5370         (aout_get_external_symbols): Don't complain if last byte of string
5371         table is nonzero.
5372         * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
5373         (bfd_free_window) [! USE_MMAP]: Don't define.
5374         (bfd_get_file_window,
5375         _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
5376
5377 Wed Nov  8 20:03:44 1995  Eric Freudenthal <[email protected]>
5378
5379         * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
5380         0xffff0000.
5381
5382 Wed Nov  8 11:31:11 1995  Ian Lance Taylor  <[email protected]>
5383
5384         * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
5385         compatible with AMD generated COFF files.  Try to support both AMD
5386         and GNU formats simultaneously.
5387         (coff_a29k_relocate_section): Likewise.
5388
5389         * libbfd.c (bfd_get_file_window): Change writable parameter from
5390         int to boolean; update all callers.  Pass MAP_SHARED if not
5391         writable--it's required on Solaris.  Cast fprintf argument to
5392         avoid warning.
5393         * bfd-in.h (bfd_get_file_window): Update declaration.
5394         * bfd-in2.h: Rebuild.
5395         * aoutx.h: Update calls to bfd_get_file_window.
5396
5397         * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
5398         Change all uses.
5399         (xcoff_swap_ldhdr_in): New static function.
5400         (xcoff_swap_ldsym_in): New static function.
5401         (xcoff_find_reloc): Handle the case of a single reloc correctly.
5402         (xcoff_link_add_symbols): If we just created a descriptor, pass it
5403         to _bfd_generic_link_add_one_symbol, to save a hash lookup.
5404         Handle XTY_ER/XMC_XO symbols correctly.
5405         (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
5406         rather than normal symbol table.
5407         (bfd_xcoff_import_symbol): It's not an error if the symbol is
5408         already defined with the same absolute value.
5409         (xcoff_mark): When considering called symbols, check whether the
5410         descriptor is from a dynamic object, rather than the symbol
5411         itself.
5412         (xcoff_build_ldsyms): Likewise.
5413
5414         * libbfd.c (bfd_get_file_window): Change return type to boolean.
5415         Cast realloc and malloc return values.  If malloc or realloc fail,
5416         set bfd_error_no_memory.
5417         * bfd-in.h (bfd_get_file_window): Change type to boolean.
5418         * bfd-in2.h: Rebuild.
5419
5420 Tue Nov  7 11:53:48 1995  Kim Knuttila  <[email protected]>
5421
5422         * coff-ppc.c (ppc_record_toc_entry): new function.
5423         (in_reloc_p): changed return value.
5424         (coff_ppc_relocate_section): much rework.
5425         (ppc_allocate_toc_section): new function.
5426         (ppc_process_before_allocation): new function.
5427         (ppc_coff_swap_sym_in_hook): new function.
5428
5429         * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
5430         (coff_link_add_symbols): initialize toc_offset.
5431
5432         * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
5433         (coff_swap_aouthdr_out): Added more sections to the data
5434         dictionary for the pe file header. Also changed linker version
5435         number on the ppc side.
5436         (dir_names): small improvements to the dictionary printing.
5437         (pe_mkobject_hook): save the file level flags.
5438
5439         * libcoff-in.h (coff_link_hash_entry): added toc_offset field
5440         (pe_tdata): added real_flags field
5441         (coff_tdata): added local_toc_sym_map and access macro
5442
5443         * libcoff.h (coff_link_hash_entry): added toc_offset field
5444         (pe_tdata): added real_flags field
5445         (coff_tdata): added local_toc_sym_map and access macro
5446
5447         * coffcode.h (coff_set_alignment_hook): added hook for PE.
5448         (coff_mkobject): init for local_toc_sym_map
5449         (coff_write_object_contents): set the internal_a.magic to
5450         IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
5451         ppc compilers use.
5452
5453 Tue Nov  7 13:48:58 1995  Ian Lance Taylor  <[email protected]>
5454
5455         * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
5456         entries until both the line number address and the function name
5457         address are too large.
5458
5459         * configure.in: Call AC_CHECK_PROG to find and cache AR.
5460         * configure: Rebuilt.
5461
5462         * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
5463         is defined in the environment.
5464
5465 Tue Nov  7 10:57:24 1995  Jeffrey A Law  ([email protected])
5466
5467         * som.c (som_get_section_contents_in_window): Define to use
5468         generic version.
5469
5470 Mon Nov  6 17:13:15 1995  Harry Dolan  <[email protected]>
5471
5472         * coff-i860.c: New file, based on coff-i386.c.
5473         * cpu-i860.c: New file, based on cpu-i386.c.
5474         * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
5475         * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
5476         targets, using i860coff_vec.
5477         * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
5478         trad-core.o and hosts/i860mach3.h.
5479         (i860coff_vec): Use coff-i860.o and cofflink.o.
5480         * configure: Rebuild.
5481         * Makefile.in: Rebuild dependencies.
5482         (ALL_MACHINES): Add cpu-i860.o.
5483         (BFD32_BACKENDS): Add coff-i860.o.
5484         (CFILES): Add cpu-i860.c and coff-i860.c.
5485         * targets.c (i860coff_vec): Declare.
5486         (bfd_target_vector): Add &i860coff_vec. 
5487         * archures.c (bfd_i860_arch): Declare.
5488         (bfd_archures_list): Add &bfd_i860_arch.
5489         * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
5490         (coff_set_flags): Handle bfd_arch_i860.
5491         (coff_write_object_contents): Handle I860 a.out magic number.
5492
5493 Mon Nov  6 14:34:07 1995  Ian Lance Taylor  <[email protected]>
5494
5495         * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
5496         the created .tc section to 2.
5497         (xcoff_mark): Don't keep a .loader reloc for a call to an
5498         undefined symbol when creating a shared library.
5499         (xcoff_build_ldsyms): When creating a shared library, generate
5500         global linkage code for a call to an undefined symbol.
5501
5502 Sun Nov  5 21:44:13 1995  Ken Raeburn  <[email protected]>
5503
5504         * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
5505         BFD32_BACKENDS, BFD64_BACKENDS.
5506         (.dep1): Put mkdep output in a separate file.
5507         Rebuilt dependencies.
5508
5509         * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
5510         value.
5511
5512         Permit use of mmap when available:
5513
5514         * configure.in: Check for mmap, madvise, mprotect.
5515         * config.in, configure: Regenerated.
5516
5517         * libbfd.c (struct _bfd_window_internal): Define type.
5518         (bfd_init_window, bfd_free_window, bfd_get_file_window): New
5519         functions.
5520         (ok_to_map): New static variable for debugging.
5521         (_bfd_generic_get_section_contents_in_window): New function.
5522         * bfd-in.h (bfd_window_internal): Declare type.
5523         (bfd_window): Define type.
5524         (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
5525         * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
5526         Declare.
5527
5528         * libaout.h (struct aoutdata): Add two window fields.
5529         (obj_aout_sym_window, obj_aout_string_window): New macros.
5530         * aoutx.h (some_aout_object_p): Initialize windows.
5531         (aout_get_external_symbols): Get symbol data and strings in
5532         windows instead of explicitly allocated buffers.
5533         (slurp_symbol_table): Free window instead of memory.
5534         (bfd_free_cached_info): Release windows instead of freeing storage
5535         directly.
5536         (aout_link_free_symbols): Ditto.
5537
5538         * targets.c (bfd_target): Add new field for
5539         get_section_contents_in_window.
5540         (BFD_JUMP_TABLE_GENERIC): Updated.
5541         * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
5542         coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
5543         libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
5544         macros for get_section_contents_in_window field.
5545
5546 Sat Nov  4 12:23:26 1995  Fred Fish  <[email protected]>
5547
5548         * core.c: Renamed to corefile.c
5549         * makefile.dos (OBJS): Change core.o to corefile.o
5550         * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
5551         
5552 start-sanitize-gm
5553 Sat Nov  4 10:16:54 1995  Stu Grossman  ([email protected])
5554
5555         * config.bfd (mips*-*-magic*):  Add bfd_elf32_bigmips_vec to
5556         targ_selvecs to allow debugging under Irix-5 native.
5557
5558 end-sanitize-gm
5559 Fri Nov  3 15:54:59 1995  Ian Lance Taylor  <[email protected]>
5560
5561         * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
5562         to o.  Clobber and restore the list of new csects around the call
5563         to _bfd_generic_link_add_one_symbol, in case it wants to report a
5564         linker error and the linker wants to read the symbol table.  Reset
5565         the line number count of a real section even if it has no relocs.
5566         (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
5567
5568         * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
5569         is too small.
5570
5571 Thu Nov  2 23:16:39 1995  Ian Lance Taylor  <[email protected]>
5572
5573         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
5574         an undefined symbol in a shared link.
5575
5576         * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
5577         oldtype from bfd_link_order_type to bfd_link_hash_type.  From
5578         [email protected] (Philippe De Muyter).
5579
5580 Wed Nov  1 14:26:02 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <[email protected]>
5581
5582         * coff-m88k.c (rtype2howto): New static function.
5583         (RTYPE2HOWTO): Use it rather than a macro definition.
5584
5585         * coffcode.h (coff_write_object_contents): set internal_a.magic
5586         to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
5587
5588         * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
5589         define TRAD_HEADER to new file hosts/delta68.h.
5590         m88*-motorola-sysv*, however, does use ptrace-core.o.
5591         * hosts/delta68.h: New file.
5592
5593         * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
5594         bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
5595
5596 Wed Nov  1 13:51:54 1995  Ken Raeburn  <[email protected]>
5597
5598         * i386linux.c (MY(vec)): Declare before use.
5599
5600 Wed Nov  1 11:45:07 1995  Ian Lance Taylor  <[email protected]>
5601
5602         * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
5603         Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
5604
5605         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
5606         BFD is not of the right type.
5607         (bfd_elf_get_needed_list): Likewise.
5608         * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
5609         * sunos.c (bfd_sunos_get_needed_list): Likewise.
5610         * xcofflink.c (XCOFF_XVECP): Define.
5611         (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
5612         of the right type.
5613         (bfd_xcoff_import_symbol): Likewise.
5614         (bfd_xcoff_export_symbol): Likewise.
5615         (bfd_xcoff_link_count_reloc): Likewise.
5616         (bfd_xcoff_record_link_assignment): Likewise.
5617         (bfd_xcoff_size_dynamic_sections): Likewise.
5618
5619         * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
5620         table index against the number of symbols for a base relative
5621         reloc.
5622
5623         * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
5624         static function.
5625         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
5626         full_aouthdr flag here...
5627         (_bfd_xcoff_bfd_final_link): ...not here.
5628
5629 Tue Oct 31 12:52:02 1995  Fred Fish  <[email protected]>
5630
5631         * libelf.h:  Rename to elf-bfd.h to avoid conflict with
5632         systems that have a system <libelf.h>.
5633         * Makefile.in: Globally replace libelf.h with elf-bfd.h.
5634         * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
5635         elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
5636         elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
5637         elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
5638         elfxx-target.h: Include elf-bfd.h rather than libelf.h.
5639         * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
5640
5641 Tue Oct 31 15:30:07 1995  David Mosberger-Tang  <[email protected]>
5642
5643         * ecoff.c (ecoff_set_symbol_info): Add new parameter weak.  If
5644         set, set BSF_WEAK in symbol.  Change all callers.
5645         (ecoff_get_extr): Set weakext based on BSF_WEAK.
5646         (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
5647         _bfd_generic_link_add_one_symbol.
5648         (ecoff_indirect_link_order): Check that the section tdata relocs
5649         are not NULL before using them.
5650
5651         * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
5652         define TRAD_HEADER as hosts/alphalinux.h.
5653         * configure: Rebuild.
5654         * hosts/alphalinux.h: New file.
5655         * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
5656         not int.
5657
5658 Tue Oct 31 12:34:11 1995  Ian Lance Taylor  <[email protected]>
5659
5660         * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
5661         C_ECOMM storage classes.
5662
5663         * xcofflink.c (xcoff_mark_symbol): New static function, broken out
5664         of xcoff_mark.
5665         (xcoff_mark): Call xcoff_mark_symbol.
5666         (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
5667         (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
5668         doing it by hand.
5669         (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
5670
5671 Mon Oct 30 14:53:48 1995  Ian Lance Taylor  <[email protected]>
5672
5673         * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
5674         field.
5675         (xcoff_find_reloc): New static function.
5676         (xcoff_link_add_symbols): Use it.
5677         (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
5678         (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL.  Don't
5679         relocate the value of C_DECL.
5680
5681         * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
5682
5683 Sat Oct 28 01:25:34 1995  steve chamberlain  <[email protected]>
5684
5685         * cofflink.c (_bfd_coff_generic_relocate_section): Make
5686         callback decide what goes in .relocs.
5687         * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
5688         * peicode.h (pe_mkobject_hook): Only copy aouthdr if
5689         there is one.
5690
5691 Sat Oct 28 01:51:02 1995  Ian Lance Taylor  <[email protected]>
5692
5693         * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
5694         absolute section.
5695
5696 Fri Oct 27 18:14:39 1995  Ian Lance Taylor  <[email protected]>
5697
5698         * xcofflink.c: More improvements, mostly to fix handling of
5699         constructors and a few other special cases.
5700         * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
5701         zero, reverting yesterday's change.
5702         * bfd-in.h (bfd_xcoff_link_record_set): Declare.
5703         (bfd_xcoff_link_count_reloc): Declare.
5704         (bfd_xcoff_record_link_assignment): Declare.
5705         * bfd-in2.h: Rebuild.
5706
5707 Fri Oct 27 14:42:15 1995  Niklas Hallqvist  <[email protected]>
5708
5709         * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
5710         aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
5711         i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
5712         i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
5713         ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
5714         Change PAGE_SIZE to TARGET_PAGE_SIZE.
5715
5716         * m68knetbsd.c: Ditto as well as add support for the m68k4k object
5717         format.
5718
5719         * netbsd.h: Double ditto (incl. m68k4k support).  NetBSD's text
5720         segments includes the a.out header.  See to that the magic number
5721         *always* is big-endian.
5722
5723         * config.bfd: Add m68*-hp*-netbsd* case.  Cross-pollinate m68k and
5724         m68k4k NetBSD configurations.
5725
5726         * configure.in, configure: Separate i386 & mips NetBSD
5727         configurations from other BSD ones.  Don't assume DEC is the only
5728         thing NetBSD/mips run on.  Add {m68k,ns32k,sparc}-*-netbsd*
5729         configurations.  Add support for m68k4k NetBSD object format.
5730
5731         * libaout.h: Added M_68K4K_NETBSD magic.
5732
5733         * m68k4knetbsd.c: New file.
5734         
5735         * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
5736
5737         * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
5738         <machine/endian.h>.
5739
5740         * hosts/mipsnbsd.h: New file.
5741         
5742 start-sanitize-gm
5743 Fri Oct 27 09:41:51 1995  Stu Grossman  ([email protected])
5744
5745         * config.bfd:  Add config stuff for mips*-*-magic* to set
5746         targ_defvec to ecoff_big_vec.
5747
5748 end-sanitize-gm
5749 Thu Oct 26 14:16:47 1995  Ian Lance Taylor  <[email protected]>
5750
5751         * xcofflink.c: Numerous changes to get closer to a working XCOFF
5752         linker.
5753         * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
5754         toc_section, and entry_section fields.
5755         (struct xcoff_section_tdata): Remove ldrel_count field.
5756         * libcoff.h: Rebuild.
5757         * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
5758         fields.
5759         (coff_compute_section_file_positions): If RS6000COFF_C, generate
5760         full a.out header if full_aouthdr is set in xcoff_data.
5761         (coff_write_object_contents): Likewise.  Set o_snentry and o_sntoc
5762         based on sections stored in xcoff_data.
5763         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
5764         fields.
5765         (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
5766         (rs6000coff_vec): Set symbol_leading_char to '.'.
5767         * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
5768         value stored in ret rather than returning a pointer value.
5769         
5770 Wed Oct 25 23:10:39 1995  Michael Meissner  <[email protected]>
5771
5772         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
5773         format for now.
5774
5775 Wed Oct 25 16:19:27 1995  Jeffrey A Law  ([email protected])
5776
5777         * som.c (som_slurp_string_table): Allocate the strings with malloc
5778         since they're free'd by free_cached_info.
5779         (som_slurp_symbol_table): Similarly for the symbol table.
5780
5781 Wed Oct 25 14:59:22 1995  Per Bothner  <[email protected]>
5782
5783         * Makefile.in (diststuff):  Don't make headers.
5784
5785 Wed Oct 25 11:32:54 1995  Ian Lance Taylor  <[email protected]>
5786
5787         * Makefile.in: Rebuild dependencies.
5788
5789         * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
5790         output_bfd is not SunOS.
5791         (bfd_sunos_size_dynamic_sections): Likewise.  Don't scan relocs of
5792         non-SunOS input files.
5793
5794         * xcofflink.c: Extensive changes to support linking shared objects
5795         and generating a .loader section.
5796         * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
5797         (struct xcoff_section_tdata): Add lineno_count, first_symndx,
5798         last_symndx, and ldrel_count fields.
5799         * libcoff.h: Rebuild.
5800         * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
5801         * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
5802         is set.
5803         * bfd-in.h (bfd_xcoff_import_symbol): Declare.
5804         (bfd_xcoff_export_symbol): Declare.
5805         (bfd_xcoff_size_dynamic_sections): Declare.
5806         * bfd-in2.h: Rebuild.
5807
5808 Tue Oct 24 17:44:20 1995  Stan Shebs  <[email protected]>
5809
5810         * configure.in: Add xcofflink.o to pmac_xcoff_vec.
5811         * configure: Rebuild.
5812         * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
5813         * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
5814         contents.
5815         (pmac_xcoff_vec): Update to use new xcoff support.
5816         * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
5817         (xcoff_write_armap): Declare buf as unsigned char.
5818         * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
5819
5820         * mpw-make.sed: Generalize subdir_do edit.
5821         
5822 Tue Oct 24 10:25:01 1995  Jeffrey A Law  ([email protected])
5823
5824         * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
5825         correctly.  Don't initialize asect->vma.
5826
5827 Fri Oct 20 13:23:48 1995  Ken Raeburn  <[email protected]>
5828
5829         * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
5830         something a little less than the page size.
5831
5832 Thu Oct 19 13:06:09 1995  Ian Lance Taylor  <[email protected]>
5833
5834         * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
5835
5836 Wed Oct 18 16:20:08 1995  steve chamberlain  <[email protected]>
5837
5838         * coff-i386.c (coff_i386_reloc_type_lookup): New.
5839         * coffcode.h (coff_write_object_contents): If .bss is before
5840         .data us that as data_start.
5841         * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
5842         calc correct.
5843         * peicode.h (add_data_entry): Use _cooked_size of data directory.
5844         (coff_swap_outhdr_out): Hardwire in version number.
5845         
5846 Wed Oct 18 16:50:54 1995  Ken Raeburn  <[email protected]>
5847
5848         * sunos.c (sunos_add_dynamic_symbols): Rename local variables
5849         major and minor to *_vno, since the former are also macros in
5850         SunOS header files.  Cast result of bfd_alloc to appropriate
5851         type.
5852
5853         * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
5854         before assigning to sec_data.
5855
5856 Wed Oct 18 13:25:17 1995  Ian Lance Taylor  <[email protected]>
5857
5858         * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
5859         now relative to the section, not absolute.
5860         * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
5861         get the file name when there is a N_SO directory name.  When
5862         handling stabs, remember that section->vma was added to the
5863         offset.
5864
5865 Tue Oct 17 18:24:54 1995  Ian Lance Taylor  <[email protected]>
5866
5867         * sunos.c (struct sunos_link_hash_table): Add needed field.
5868         (sunos_link_hash_table_create): Call bfd_release, not free.
5869         (sunos_link_hash_table_create): Initialize needed field.
5870         (sunos_add_dynamic_symbols): Record needed objects.
5871         (bfd_sunos_get_needed_list): New function.
5872         * bfd-in.h (bfd_sunos_get_needed_list): Declare.
5873         * bfd-in2.h: Rebuild.
5874
5875 Mon Oct 16 14:43:59 1995  steve chamberlain  <[email protected]>
5876
5877         * libcoff-in.h (pe_data_type.in_reloc_p): New.
5878
5879 Mon Oct 16 10:52:50 1995  Ian Lance Taylor  <[email protected]>
5880
5881         * bfd-in.h (struct bfd_link_needed_list): Rename from
5882         bfd_elf_link_needed_list.
5883         * bfd-in2.h: Rebuild.
5884         * elf.c, elflink.h, libelf.h: Corresponding changes.
5885
5886         Add start at AIX linker support; no shared libraries yet.
5887         * xcofflink.c: New file.
5888         * configure.in (rs600coff_vec): Use xcofflink.o.
5889         * configure: Rebuild.
5890         * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
5891         fields.
5892         (struct xcoff_section_tdata): Define.
5893         (xcoff_section_data): Define macro.
5894         (_bfd_xcoff_bfd_link_hash_table_create): Declare.
5895         (_bfd_xcoff_bfd_link_add_symbols): Declare.
5896         (_bfd_xcoff_bfd_final_link): Declare.
5897         (_bfd_ppc_xcoff_relocate_section): Declare.
5898         * libcoff.h: Rebuild.
5899         * coff-rs6000.c: Clean up a bit.
5900         (xcoff_mkobject): Default modtype to 1L, not RE.  Initialize
5901         cputype, csects, and debug_indices.
5902         (xcoff_copy_private_bfd_data): Copy cputype.
5903         (xcoff_howto_table): Rename from rs6000coff_howto_table.
5904         (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
5905         (xcoff_reloc_type_lookup): Rename from
5906         rs6000coff_reloc_type_lookup.
5907         (coff_relocate_section): Define.
5908         (_bfd_xcoff_sizeof_headers): Define.
5909         (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
5910         (_bfd_xcoff_bfd_relax_section): Define.
5911         (_bfd_xcoff_bfd_link_split_section): Define.
5912         (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
5913         coff.
5914         * coffcode.h (coff_compute_section_file_positions): If AIX,
5915         increment sofar by SMALL_AOUTSZ if not executable.
5916         (coff_write_object_contents): If AIX, always output an a.out
5917         header; if not executable, header size of SMALL_AOUTSZ.
5918         * hash.c (struct bfd_strtab_hash): Add xcoff field.
5919         (_bfd_stringtab_init): Initialize xcoff field.
5920         (_bfd_xcoff_stringtab_init): New function.
5921         (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
5922         (_bfd_stringtab_emit): In XCOFF mode, write out length.
5923         * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
5924         * libbfd.h: Rebuild.
5925         * Makefile.in: Rebuild dependencies.
5926         (BFD32_BACKENDS): Add xcofflink.o.
5927         (CFILES): Add xcofflink.c.
5928
5929         * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
5930         SEC_NO_FLAGS, for .acommon section.  From Peter Schauer
5931         <[email protected]>.
5932
5933 Sat Oct 14 21:36:02 1995  Michael Meissner  <[email protected]>
5934
5935         * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
5936
5937 Fri Oct 13 17:48:43 1995  Ken Raeburn  <[email protected]>
5938
5939         * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
5940         * config.in: Regenerated.
5941
5942         * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
5943         (_bfd_chunksize): New variable.
5944         (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
5945         for obstack chunk size.
5946         * configure.in: Check for getpagesize.
5947         * configure: Regenerated.
5948
5949         Mon Sep 25 22:49:32 1995  Andreas Schwab  <[email protected]>
5950
5951         * trad-core.c (rawptr): Make it a local variable of
5952         ptrace_unix_core_file_p.
5953
5954 Fri Oct 13 11:22:01 1995  steve chamberlain  <[email protected]>
5955
5956         * coff-arm.c (in_reloc_p): New.
5957         * coff-i386.c (in_reloc_p): New.
5958         * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
5959         (coff_write_object_contents): Only set has_reloc_section
5960         if PE_IMAGE.
5961         * cofflink.c (_bfd_coff_generic_relocate_section): Call
5962         in_reloc_p to decide if reloc should be emitted.
5963         * libcoff.h (pe_data_type.in_reloc_p): New.
5964         * peicode.h (pe_mkobject): Initialize in_reloc_p.
5965
5966 Wed Oct 11 00:49:29 1995  Ian Lance Taylor  <[email protected]>
5967
5968         * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
5969         (_bfd_coff_read_internal_relocs): Likewise.
5970         * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
5971         (_bfd_coff_read_internal_relocs): Likewise.
5972
5973         * elflink.h (elf_link_add_object_symbols): Correct conditions
5974         under which type and size change warnings are issued.
5975
5976 Tue Oct 10 18:32:46 1995  Ian Lance Taylor  <[email protected]>
5977
5978         * coffgen.c (coff_count_linenumbers): Don't count line numbers for
5979         a symbol which is not in a real section.
5980         (coff_write_native_symbol): Corresponding change.
5981
5982         * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
5983         coff_link_hash_newfunc and make non-static.
5984         (_bfd_coff_link_hash_table_init): New function, broken out of
5985         _bfd_coff_link_hash_table_create.
5986         (_bfd_coff_link_hash_table_create): Use it.
5987         (process_embedded_commands): Make static.
5988         * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
5989         (_bfd_coff_link_hash_table_init): Declare.
5990         * libcoff.h: Rebuild.
5991
5992         * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
5993         field in XCOFF tdata.
5994         (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
5995         U802ROMAGIC, for clarity.  Try to set arch and machine correctly
5996         based on cputype stored in a.out header, or in n_type of initial
5997         .file symbol.
5998         (coff_write_object_contents): Set cputype correctly in a.out
5999         header.
6000         (coff_slurp_symbol_table): Add casts to file_ptr to avoid
6001         warnings.
6002         * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
6003         (coff_swap_aouthdr_out): Swap out cputype field.  Don't clear
6004         old resv1 field.
6005         * libcoff-in.h (struct xcoff_tdata): Add cputype field.
6006         * libcoff.h: Rebuild.
6007
6008         * cpu-rs6000.c (rs6000_compatible): New static function.
6009         (bfd_rs6000_arch): Use it.
6010         * cpu-powerpc.c (powerpc_compatible): New static function.
6011         (arch_info_struct): Define various flavours of PowerPC.
6012         (bfd_powerpc_arch): Use powerpc_compatible.  Point at
6013         arch_info_struct.
6014
6015 Tue Oct 10 10:50:46 1995  Fred Fish  <[email protected]>
6016
6017         * Makefile.in (FLAGS_TO_PASS):  Remove BISON.
6018
6019 Tue Oct 10 01:28:29 1995  Ian Lance Taylor  <[email protected]>
6020
6021         * elflink.h (elf_link_add_object_symbols): Don't warn about
6022         changing the size or type if the old definition was weak.
6023
6024 Mon Oct  9 11:24:08 1995  Ian Lance Taylor  <[email protected]>
6025
6026         * coffcode.h (combined_entry_type): Add fix_line field.
6027         (coff_slurp_line_table): Warn if we try to set the lineno field of
6028         a symbol twice.
6029         (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
6030         C_EINCL by setting fix_line.  Fix C_BSTAT symbol value.
6031         * coffgen.c (coff_mangle_symbols): Handle fix_line.
6032         (coff_write_symbol): Only use N_DEBUG if the symbol is in the
6033         absolute section.
6034         (coff_print_symbol): Print fix_value symbols in a useful fashion.
6035         * libcoff.h: Rebuild.
6036
6037         * libcoff-in.h (struct xcoff_tdata): Define.
6038         (xcoff_data): Define.
6039         * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
6040         * bfd-in2.h, libcoff.h: Rebuild.
6041         * coff-rs6000.c (xcoff_mkobject): New static function.
6042         (coff_mkobject): Define.
6043         (xcoff_copy_private_bfd_data): New static function.
6044         (coff_bfd_copy_private_bfd_data): Define.
6045         (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
6046         signed to bitfield.
6047         (rs6000coff_vec): Add DYNAMIC to object_flags.
6048         * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
6049         .loader sections specially.
6050         (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
6051         section alignment from the XCOFF tdata information.
6052         (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
6053         F_SHROBJ, and copy the extra a.out header information into the
6054         XCOFF tdata structure.
6055         (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
6056         F_DYNLOAD and the extra a.out header information.
6057         (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
6058         C_HIDEXT symbol with attached csect information.
6059         * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
6060         in the o_maxdata field.
6061         (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
6062         * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
6063         end if BSF_NOT_AT_END is set.
6064
6065         * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
6066         _bfd_read_ar_hdr_fn.
6067         * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
6068         * bfd-in2.h, libbfd.h: Rebuild.
6069         * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
6070         return value.
6071         (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
6072         (bfd_slurp_bsd_armap_f2): Likewise.
6073         (_bfd_slurp_extended_name_table): Likewise.
6074
6075 Fri Oct  6 16:18:35 1995  Ken Raeburn  <[email protected]>
6076
6077         Mon Sep 25 22:49:32 1995  Andreas Schwab  <[email protected]>
6078
6079         * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
6080         when the symbol table is empty.
6081
6082         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
6083         space for section symbols, since we don't output them either.
6084         (elf_m68k_adjust_dynindx): Removed.
6085
6086         * ptrace-core.c (rawptr): Make it a local variable of
6087         ptrace_unix_core_file_p.
6088
6089 Fri Oct  6 12:24:47 1995  Michael Meissner  <[email protected]>
6090
6091         * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
6092         NULL.
6093
6094         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
6095         Mac object file formats.
6096
6097 Fri Oct  6 12:04:02 1995  Ian Lance Taylor  <[email protected]>
6098
6099         * coffgen.c (coff_fix_symbol_name): Don't try to set up file
6100         auxent if there isn't one.
6101         (coff_write_symbols): If there is no file auxent, use SYMNMLEN
6102         rather than FILNMLEN as the maximum name length.
6103
6104         * coffcode.h (bfd_coff_backend_data): Add new field
6105         _bfd_coff_print_aux.
6106         (bfd_coff_print_aux): New static function.
6107         (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
6108         scnlen field of an XTY_LD csect aux entry.
6109         (coff_print_aux): New static function.
6110         (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
6111         in coff_pointerize_aux_hook.
6112         (bfd_coff_std_swap_table): Initialize new field.
6113         * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
6114         * libcoff.h: Rebuild.
6115         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
6116         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6117
6118         * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
6119         if there are symbols, for native AIX ld compatibility.
6120
6121         * coffcode.h (bfd_coff_backend_data): Add new field
6122         _bfd_coff_pointerize_aux_hook.
6123         (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
6124         or I960, and as 0 otherwise.
6125         (bfd_coff_std_swap_table): Initialize new field.
6126         * libcoff.h: Rebuild.
6127         * coffgen.c (coff_pointerize_aux): Change parameters  to take
6128         symbol pointer instead of type and class, and to take aux index.
6129         Call _bfd_coff_pointerize_aux_hook if it is defined.
6130         (coff_get_normalized_symtab): Always call coff_pointerize_aux.
6131         * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
6132         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6133
6134         * coff-rs6000.c: Add full support for AIX archives.  Rewrite old
6135         read-only/host-only support.
6136
6137         * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
6138         BSF_LOCAL.
6139         (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
6140         RS6000COFF_C.
6141
6142         * targets.c (bfd_target): Add _bfd_read_ar_hdr field.  Modify
6143         BFD_JUMP_TABLE_ARCHIVE accordingly.
6144         * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
6145         (_bfd_compute_and_write_armap): Declare.
6146         (_bfd_generic_read_ar_hdr): Declare.
6147         (_bfd_read_ar_hdr): Define.
6148         (_bfd_noarchive_read_ar_hdr): Define.
6149         (_bfd_archive_bsd_read_ar_hdr): Define.
6150         (_bfd_archive_coff_read_ar_hdr): Define.
6151         * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
6152         _bfd_read_ar_hdr instead.
6153         (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
6154         (_bfd_compute_and_write_armap): Rename from
6155         compute_and_write_armap.  Make non-static.  Change all callers.
6156         * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
6157         than _bfd_snarf_ar_hdr.
6158         * aout-target.h (MY_read_ar_hdr): Define if not defined.
6159         * ieee.c (ieee_read_ar_hdr): Define.
6160         * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
6161         * oasys.c (oasys_read_ar_hdr): Define.
6162         * som.c (som_read_ar_hdr): Define.
6163         * bfd-in2.h, libbfd.h: Rebuild.
6164
6165 Thu Oct  5 14:04:07 1995  steve chamberlain  <[email protected]>
6166
6167         * peicode.c (coff_swap_filehdr_in): If symptr is
6168         zero, there aren't any symbols, even if nsyms is set.
6169
6170 Thu Oct  5 11:45:02 1995  Ian Lance Taylor  <[email protected]>
6171
6172         * libecoff.h (struct ecoff_backend_data): Add adjust_headers
6173         field.
6174         * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
6175         sections, and set styp correctly for them: .got, .hash, .dynamic,
6176         .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
6177         (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
6178         types.
6179         (ecoff_sort_hdrs): New static function.
6180         (ecoff_compute_section_file_positions): Return boolean, not void.
6181         Sort the sections by VMA before looking through them.  Put the
6182         first non SEC_ALLOC section on a new page.  Put every SEC_ALLOC
6183         section on an appropriate boundary within the page.
6184         (ecoff_compute_reloc_file_positions): Check return value of
6185         ecoff_compute_section_file_positions.
6186         (_bfd_ecoff_set_section_contents): Likewise.
6187         (_bfd_ecoff_write_object_contents): Check for various Alpha
6188         section types when incrementing text_size and data_size.  Call
6189         adjust_headers backend function if it exists.
6190         * coff-alpha.c (alpha_adjust_headers): New static function.
6191         (alpha_ecoff_backend_data): Initialize adjust_headers field.
6192         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6193
6194         * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
6195
6196 Wed Oct  4 18:15:02 1995  Jeff Law  ([email protected])
6197
6198         * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
6199         of ALTERNATE_AIX_CORE_FORMAT.
6200         * configure.in (aix4): No longer need CORE_FLAGS.
6201         * configure: Updated.
6202
6203 Wed Oct  4 15:36:36 1995  Ken Raeburn  <[email protected]>
6204
6205         NS32k changes from Ian Dall:
6206         * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
6207         macros.
6208         (aout_link_input_section_std, aout_link_input_section_ext,
6209         aout_link_reloc_link_order): Call them instead of _bfd_*
6210         versions.
6211         * aout-target.h (MY_exec_header_not_counted): New macro, defaults
6212         to zero.
6213         (backend_data): Use it instead of hardcoded zero.
6214
6215         * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
6216         (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
6217
6218         * ns32knetbsd.c: Include bfd.h.
6219         (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
6220         (MY_bfd_reloc_type_lookup): Declare function too.
6221         * pc532-mach.c (set_sizes): Don't declare.
6222         (MY_text_includes_header, MY_exec_header_not_counted): Define.
6223         (backend_data, MY_backend_data): Don't define.
6224
6225         * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
6226         ns32k-*-lites* like ns32k-*-netbsd*.
6227
6228         * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
6229         compile on lites.
6230
6231 Wed Oct  4 14:15:52 1995  Ian Lance Taylor  <[email protected]>
6232
6233         * coffcode.h (coff_write_object_contents): Restore setting
6234         f_timdat to 0, deleted on August 22.
6235
6236 Tue Oct  3 16:28:32 1995  steve chamberlain  <[email protected]>
6237
6238         * coffcode.h (coff_bfd_copy_private_symbol_data,
6239         coff_bfd_copy_private_section_data,
6240         coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
6241         * peicode.h (coff_bfd_copy_private_bfd_data): New
6242         (pe_bfd_copy_private_bfd_data): New.
6243         (coff_swap_scnhdr_in): Swap bss size into the right place.
6244         (pe_print_private_bfd_data): Add some newlines.
6245
6246 Tue Oct  3 11:53:04 1995  Jeff Law  ([email protected])
6247
6248         * som.c (setup_sections): Don't die if a space has no subspaces.
6249
6250 Mon Oct  2 14:08:55 1995  Ian Lance Taylor  <[email protected]>
6251
6252         * elflink.h (elf_link_add_object_symbols): Don't let a weak
6253         dynamic symbol override a common symbol.  Don't change the size or
6254         type if they have been set and the new symbol is not a definition.
6255         Warn if the size or type changes.
6256
6257 Sun Oct  1 01:34:41 1995  Jeff Law  ([email protected])
6258
6259         * som.c (som_begin_writing): Don't write the symbol table or
6260         symbol  strings.
6261         (som_finish_writing): Write them here.  Place them after the
6262         subspace data, but before the relocs.
6263
6264 Fri Sep 29 11:01:55 1995  Ian Lance Taylor  <[email protected]>
6265
6266         * sunos.c (sunos_add_one_symbol): Just pass false, not
6267         info->shared_library, to sunos_create_dynamic_sections.
6268         (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
6269         section.
6270         (sunos_check_dynamic_reloc): Remove .text section assertion.
6271
6272 Thu Sep 28 18:48:47 1995  Stan Shebs  <[email protected]>
6273
6274         * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
6275         * configure, configure.in: Add pmac_xcoff_vec case.
6276         * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
6277         * coff-pmac.c: New file, PowerMac XCOFF support.
6278         * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
6279         * targets.c (pmac_xcoff_vec): Declare.
6280
6281         * mpw-config.in: Various changes to be compatible with the
6282         autoconf-based configury.
6283         * mpw-make.sed: New file, sed commands to translate Unix
6284         makefile into MPW syntax.
6285         * mpw-make.in: Remove.
6286         * hosts/mpw.h: Remove.
6287         * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
6288         true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
6289
6290 Thu Sep 28 17:06:23 1995  steve chamberlain  <[email protected]>
6291
6292         * binary.c (binary_get_symtab): Return an empty string on error.
6293         * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
6294
6295 Thu Sep 28 15:30:44 1995  Kim Knuttila  <krk@nellie>
6296
6297         * coff-ppc.c: Reformatted according to gnu conventions
6298                       Removed irrelevant "if 0" code
6299
6300 Thu Sep 28 11:19:53 1995  Ian Lance Taylor  <[email protected]>
6301
6302         * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
6303         symbols rather than as indirect symbols.
6304         (MY(slurp_symbol_table)): Don't do anything special about
6305         secondary symbols.
6306
6307         * coffcode.h (coff_new_section_hook): Make sure that the alignment
6308         of .ctors and .dtors sections is no larger than 2.
6309
6310         * sunos.c (sunos_add_one_symbol): Don't change
6311         bfd_link_hash_common to bfd_link_hash_new, since it may be on the
6312         undef list.
6313         (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
6314         dynamic symbols when creating a shared library.
6315         (sunos_scan_ext_relocs): Handle relocs correctly when creating a
6316         shared library.
6317         (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
6318         written even if it is not defined in a regular object.
6319         (sunos_write_dynamic_symbol): Use plt_offset for the address of
6320         the jump table reloc.  Add an assertion.  Use RELOC_JMP_SLOT
6321         rather than the constant 22.
6322         (sunos_check_dynamic_reloc): Handle creating a shared library.
6323         (sunos_finish_dynamic_link): Set the first entry in the GOT to
6324         zero when creating a shared library.
6325         * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
6326         write it out at the start of the symbol table.
6327
6328         * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
6329
6330 Thu Sep 28 00:58:05 1995  Doug Evans  <[email protected]>
6331
6332         * config.bfd: Add arm-*-coff.
6333         * configure.in, configure: Add armcoff_{little,big}_vec.
6334         * targets.c (armcoff_{little,big}_vec): Declare.
6335         (bfd_target_vector): Add armcoff_{little,big}_vec.
6336         * coff-arm.c (armcoff_{little,big}_vec): Always define.
6337
6338 Wed Sep 27 10:37:14 1995  Ian Lance Taylor  <[email protected]>
6339
6340         * targets.c (bfd_find_target): Remove debugging code.
6341
6342 Wed Sep 27 07:23:39 1995  Kim Knuttila  <krk@nellie>
6343
6344         * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE 
6345         support on powerpc.
6346         * Makefile.in: added *-ppc files
6347         * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
6348         allow pe based .o's to be shared with other tools on ppc/NT
6349         * config.bfd: added powerpc[le]-[pe|winnt] config support
6350         * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec 
6351         * peicode.h: Added more section flags for PE on ppc
6352                      Added coff_swap_filehdr_out to allow peicode.h to be
6353                      used for non-image PE files on ppc.
6354                      Check for image, or not, before copying pe_opthdr
6355         * targets.c: Added new bfd's
6356         * targets.c: Removed two inactive bfds that shouldn't have made it this
6357                      far.
6358
6359 Tue Sep 26 14:06:41 1995  Michael Meissner  <[email protected]>
6360
6361         * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
6362         explicit values to initialize all relocs.  Change all users.
6363         (ppc_elf_brtaken_inner): New function to handle branch predicition
6364         relocs.
6365         (ppc_elf_brtaken_reloc): Ditto.
6366         (ppc_elf_howto_raw): Use new functions.  Make sure all unsupported
6367         relocs use ppc_elf_unsupported_reloc.
6368         (ppc_elf_merge_private_bfd_data): Keep track of whether an error
6369         needs to be reported.
6370         (ppc_elf_relocate_section): Support branch prediction relocs.
6371
6372 Tue Sep 26 12:48:05 1995  Ian Lance Taylor  <[email protected]>
6373
6374         * bfd.c (bfd_assert): Remove \n from string passed to
6375         _bfd_error_handler.
6376
6377         * coff-i386.c: (TWO_DATA_SECS): Don't define.
6378         * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
6379         (bfd_coff_make_section_hook): Don't define.
6380         (coff_make_section_hook): Remove.
6381         (sec_to_styp_flags): Remove TWO_DATA_SECS case.
6382         (styp_to_sec_flags): Likewise.
6383         (coff_write_object_contents): Likewise.
6384         (bfd_coff_std_swap_table): Don't initialize make_section_hook
6385         field.
6386         * libcoff.h: Rebuild.
6387         * coffgen.c (make_a_section_from_file): Just call
6388         bfd_make_section_anyway, not bfd_make_section or
6389         bfd_coff_make_section_hook.
6390         * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
6391         * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
6392         * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
6393         make_section_hook field.
6394         * coff-mips.c (mips_ecoff_backend_data): Likewise.
6395
6396         * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
6397         pointers into value field for warning and indirect symbols; just
6398         leave the value field alone.
6399         * linker.c (generic_link_add_symbol_list): Use next symbol for
6400         warning and indirect symbols, rather than looking in symbol value.
6401         * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
6402         parameter.  Change all callers.  Remove support for indirect
6403         symbols; it didn't work anyhow.
6404         (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
6405         * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
6406         * bfd-in2.h: Rebuild.
6407
6408 Mon Sep 25 16:04:09 1995  Michael Meissner  <[email protected]>
6409
6410         * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
6411         go back to telling the tools this reloc operates on 32 bits.
6412
6413 Mon Sep 25 11:48:02 1995  Ian Lance Taylor  <[email protected]>
6414
6415         * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
6416         rather than a direct fprintf.
6417         * archive.c (_bfd_write_archive_contents): Likewise.
6418         * coffcode.h (coff_slurp_symbol_table): Likewise.
6419         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
6420         (ppc_elf_unsupported_reloc): Likewise.
6421         (ppc_elf_relocate_section): Likewise.
6422         * i386linux.c (linux_tally_symbols): Likewise.
6423         (linux_finish_dynamic_link): Likewise.
6424         * osf-core.c (osf_core_core_file_p): Likewise.
6425         * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
6426         * som.c (som_sizeof_headers): Likewise.
6427         * srec.c (srec_bad_byte): Likewise.
6428         * bfd.c (bfd_assert): Likewise.  Also change file to be const.
6429         * libbfd-in.h (bfd_assert): Declare first parameter const.
6430         * libbfd.h: Rebuild.
6431         * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
6432         bfd_reloc_overflow is enough.
6433         * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
6434         * coff-h8500.c (rtype2howto): Likewise.
6435         * coff-z8k.c (rtype2howto): Likewise.
6436         * coffcode.h (dummy_reloc16_extra_cases): Likewise.
6437         * elf.c (_bfd_elf_get_lineno): Likewise.
6438         (_bfd_elf_no_info_to_howto): Likewise.
6439         (_bfd_elf_no_info_to_howto_rel): Likewise.
6440         * hp300hpux.c (convert_sym_type): Likewise.
6441         (MY(swap_std_reloc_in)): Likewise.
6442         * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
6443
6444         * libaout.h (struct aoutdata): Add line_buf field.
6445         * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
6446         and filename_buffer.  Instead, use a malloc buffer stored in the
6447         new line_buf field.  Remove length restrictions.
6448
6449         * coffgen.c (string_size): Remove static variable.
6450         (debug_string_size, debug_string_section): Likewise.
6451         (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
6452         and debug_string_size_p parameters.  Use them instead of the
6453         global variables.  Change all callers.
6454         (coff_write_symbol): Likewise.
6455         (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
6456         (coff_write_symbols): Add local variables to replace removed
6457         global variables.
6458
6459         * libcoff-in.h (struct coff_section_tdata): Add offset, i,
6460         function, and line_base fields.
6461         * libcoff.h: Rebuild.
6462         * coffgen.c (coff_find_nearest_line): Use section tdata to cache
6463         information, rather than using static variables.
6464
6465         * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
6466         file.  From Peter DeWolf <[email protected]>.
6467
6468         * init.c (initialized): Remove static variable.
6469         (bfd_init): Don't bother setting initialized.
6470         (bfd_check_init): Remove.
6471         * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
6472         * libbfd.h: Rebuild.
6473
6474 Sat Sep 23 01:22:23 1995  Peter Schauer  ([email protected])
6475
6476         * rs6000-core.c (rs6000coff_core_p):  Don't check the core file
6477         size for full core dumps. Copy core file header to private data.
6478         (rs6000coff_core_file_failing_command,
6479         rs6000coff_core_file_failing_signal):  New functions to extract
6480         the file name and terminating signal from the core file.
6481         * coff-rs6000.c:  Use them.
6482
6483 Fri Sep 22 17:44:47 1995  Ian Lance Taylor  <[email protected]>
6484
6485         Change arch info to be const, initialized at compile time.
6486         * archures.c: Reindent many functions.  Change CONST to const.
6487         (bfd_arch_info_type): Make arch_name const.  Remove disassemble;
6488         nothing set it anyhow.  Make next const.
6489         (bfd_arch_info_list): Remove.
6490         (bfd_archures_list): Rename from archures_init_table.  Change from
6491         a table of function pointers to a table of bfd_arch_info_type
6492         structure addresses.
6493         (bfd_scan_arch): Rewrite accordingly.  Return a const pointer.
6494         (bfd_lookup_arch): Likewise.
6495         (bfd_set_arch_info): Rewrite accordingly.  Change argument to be a
6496         const pointer.
6497         (bfd_default_arch_struct): Make const.
6498         (bfd_arch_init, bfd_arch_linkin): Remove.
6499         (bfd_get_arch_info): Return a const pointer.
6500         * init.c (bfd_init): Don't call bfd_arch_init.
6501         * bfd.c (struct _bfd): Make arch_info const.
6502         * bfd-in2.h: Rebuild.
6503         * libbfd.h: Rebuild.
6504         * configure.in: Put & before everything in $selarchs.
6505         * configure: Rebuild.
6506         * cpu-*.c: Change bfd_*_arch from a function which calls
6507         bfd_arch_linkin to a const structure.
6508         * ieee.c (ieee_object_p): Make arch const.
6509
6510 Fri Sep 22 16:23:18 1995  Michael Meissner  <[email protected]>
6511
6512         * reloc.c (bfd_reloc_code_type): Add relocations to support all of
6513         PowerPC V.4.
6514         * bfd-in2.h: Regenerate.
6515         * libbfd.h: Regenerate.
6516
6517         * elf32-ppc.c (reloc_type): Update names to match current draft.
6518         (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
6519         relative.  Update names to current V.4 draft.
6520         (ppc_elf_reloc_type_lookup): Add support for more relocations.
6521         (ppc_elf_relocate_section): Rename relocations to match draft.
6522
6523 Thu Sep 21 21:53:18 1995  Michael Meissner  <[email protected]>
6524
6525         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
6526         compiled with -mrelocatable-lib to be linked with either normal
6527         modules or -mrelocatable modules.
6528
6529 Wed Sep 20 12:03:26 1995  Ian Lance Taylor  <[email protected]>
6530
6531         * coffcode.h (coff_write_object_contents): Clear the vstamp field
6532         in the a.out header.
6533
6534         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
6535         a reloc against a local symbol, even if it's not a section.
6536
6537 Tue Sep 19 17:02:26 1995  Ian Lance Taylor  <[email protected]>
6538
6539         * targets.c (bfd_target): Remove unused align_power_min field.
6540         * bfd-in2.h: Rebuild.
6541         * All backends: Remove initialization of align_power_min.
6542
6543 Tue Sep 19 14:02:21 1995  steve chamberlain  <[email protected]>
6544
6545         * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
6546
6547 Mon Sep 18 14:35:01 1995  Arne H. Juul  <[email protected]>
6548
6549         * config.bfd (mips-dec-netbsd*): New target.
6550         * configure.host (mips-dec-netbsd*): New host.
6551         * configure.in (mips-dec-netbsd*): New native.
6552         * configure: Rebuild.
6553
6554 Fri Sep 15 10:24:36 1995  Ian Lance Taylor  <[email protected]>
6555
6556         Make the COFF backend linker merge common types:
6557         * cofflink.c (struct coff_debug_merge_element): Define.
6558         (struct coff_debug_merge_type): Define.
6559         (struct coff_debug_merge_hash_entry): Define.
6560         (struct coff_debug_merge_hash_table): Define.
6561         (coff_debug_merge_hash_table_init): Define.
6562         (coff_debug_merge_hash_table_free): Define.
6563         (coff_debug_merge_hash_lookup): Define.
6564         (struct coff_final_link_info): Add debug_merge field.
6565         (coff_debug_merge_hash_newfunc): New static function.
6566         (_bfd_coff_final_link): Allocate and free debug_merge table.
6567         (coff_link_input_bfd): Merge identical enum, struct and union
6568         types.
6569
6570 Thu Sep 14 14:53:58 1995  Ian Lance Taylor  <[email protected]>
6571
6572         Convert i960 COFF to use COFF backend linker.
6573         * coff-i960.c (coff_i960_relocate): Use a coff_section_data
6574         structure to store the symbol being used.
6575         (coff_i960_start_final_link): New static function.
6576         (coff_i960_relocate_section): New static function.
6577         (coff_i960_adjust_symndx): New static function.
6578         (coff_start_final_link): Define.
6579         (coff_relocate_section): Define.
6580         (coff_adjust_symndx): Define.
6581         * coffcode.h (bfd_coff_backend_data): Add new callback function
6582         _bfd_coff_start_final_link.
6583         (bfd_coff_start_final_link): Define.
6584         (coff_start_final_link): Define if not defined.
6585         (bfd_coff_std_swap_table): Add coff_start_final_link.
6586         * cofflink.c (_bfd_coff_internal_syment_name): Make globally
6587         visible.
6588         (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
6589         function callback is not NULL.
6590         * libcoff-in.h (struct coff_section_tdata): Add tdata field.
6591         (_bfd_coff_internal_syment_name): Declare.
6592         * libcoff.h: Rebuild.
6593         * configure.in (icoff_big_vec): Add cofflink.o.
6594         (icoff_little_vec): Likewise.
6595         * configure: Rebuild.
6596
6597 Wed Sep 13 17:38:23 1995  Fred Fish  <[email protected]>
6598
6599         * Makefile.in (clean-info): Remove extraneous tab from line
6600         following action.
6601
6602 Wed Sep 13 13:27:53 1995  Ian Lance Taylor  <[email protected]>
6603
6604         * cofflink.c (coff_link_input_bfd): Fail if a section with no
6605         contents has relocs.
6606
6607 Thu Sep 12 12:45:34 1995  steve chamberlain  <[email protected]>
6608
6609         * coffcode.h (coff_compute_section_file_positions): Keep the
6610         raw size safe. 
6611         (coff_write_object_contents): Remember if it's a relocatable
6612         file.
6613         * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
6614         * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
6615         if relocatable file. Swap out saved raw size.
6616
6617 Tue Sep 12 12:14:33 1995  Ian Lance Taylor  <[email protected]>
6618
6619         * Makefile.in (do_maintainer_clean): Rename from do_realclean.
6620         (maintainer-clean): Rename from realclean, passing
6621         maintainer-clean down to subdirectories, but leave realclean as a
6622         synonym.
6623
6624         * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
6625         warning callback.
6626
6627         * dep-in.sed: Remove config.h from generated dependencies.
6628
6629         * sunos.c (sunos_slurp_dynamic_symtab): New static function,
6630         broken out of sunos_canonicalize_dynamic_symtab.
6631         (sunos_canonicalize_dynamic_symtab): Call new function
6632         sunos_slurp_dynamic_symtab.
6633         (sunos_add_dynamic_symbols): Add three new parameters.  Return the
6634         dynamic symbol table to the caller.
6635         * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
6636         callback to override the symbols being read.
6637         * libaout.h (struct aout_backend_data): Add three new parameters
6638         to add_dynamic_symbols callback.
6639
6640         Extensive minor changes to avoid various gcc warnings.  Also:
6641         * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
6642         * archures.c (bfd_arch_info_type): Change mach field from long to
6643         unsigned long.
6644         (bfd_lookup_arch): Change machine parameter from long to unsigned
6645         long.
6646
6647 Mon Sep 11 10:55:47 1995  Ian Lance Taylor  <[email protected]>
6648
6649         * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
6650         a symbol with a non-zero plt_offset.
6651
6652 Fri Sep  8 11:47:24 1995  Ian Lance Taylor  <[email protected]>
6653
6654         * elfcode.h (align_file_position): Remove; not used.
6655
6656         * configure.in: Only check for <sys/procfs.h> on a native system,
6657         and make sure it defines prstatus_t.
6658         * configure: Rebuild.
6659
6660 Thu Sep  7 12:48:01 1995  Ian Lance Taylor  <[email protected]>
6661
6662         * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
6663
6664         * config.in: Rename from config.h.in.
6665         * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
6666         Check for config.h:config.in when creating stamp-h.
6667         * configure: Rebuild.
6668         * Makefile.in (stamp-h): Depend upon config.in rather than
6669         config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
6670         calling config.status.
6671
6672         * Makefile.in (do_distclean): Remove config.h and stamp-h.
6673         (Makefile): Just rebuild Makefile.
6674         (config.h, stamp-h): New targets.
6675         * configure.in: Create stamp-h when rebuilding config.h.
6676         * configure: Rebuild.
6677
6678 Wed Sep  6 15:00:33 1995  Ian Lance Taylor  <[email protected]>
6679
6680         * configure.in: Call AC_CONFIG_HEADER.  Substitute
6681         HOST_64BIT_LONG.  Check that various header files exist.  Check
6682         that fcntl exists.  Call BFD_BINARY_FOPEN.  Check whether malloc
6683         and/or free need to be declared.  Don't make a link to sysdep.h.
6684         Define TRAD_HEADER for various hosts.
6685         * configure: Rebuild.
6686         * configure.host: Don't set my_host.  Add definitions taken from
6687         host header files for various entries.  Remove entries which now
6688         do nothing.
6689         * acconfig.h: New file.
6690         * config.h.in: New file, built by autoheader.
6691         * sysdep.h: New file.
6692         * Makefile.in (do_distclean): Don't remove sysdep.h.
6693         (RECONFIG): Remove.
6694         (LOCAL_H_DEPS): New variable.
6695         ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
6696         $(RECONFIG).
6697         ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
6698         ($(OPTIONAL_BACKENDS)): Likewise.
6699         (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
6700         looking through sysdep.h.
6701         * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
6702         (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
6703         (fprintf_vma, sprintf_vma): Likewise.
6704         (int64_type, uint64_type): Don't define.
6705         * bfd-in2.h: Rebuild.
6706         * archures.c, bfd.c, srec.c: Include <ctype.h>.
6707         * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
6708         * lynx-core.c: Include stuff from old hosts/lynx.h.
6709         * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
6710         rather than NO_FCNTL.
6711         * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
6712         rather than NATIVE_HPPAHPUX_COMPILER.
6713         * trad-core.c: Don't include <errno.h>.  Include TRAD_HEADER if it
6714         is defined.
6715         * hosts/*.h: Remove all header files which merely include,
6716         declare, and define things.  Leave header files which define
6717         information needed by trad-core.c.
6718
6719         * aclocal.m4 (BFD_BINARY_FOPEN): Define.
6720         (BFD_CC_FOR_BUILD): Define.
6721         * configure.in: Use BFD_CC_FOR_BUILD.
6722         * configure: Rebuild.
6723
6724 Tue Sep  5 19:35:28 1995  Ian Lance Taylor  <[email protected]>
6725
6726         * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
6727         * configure: Rebuild.
6728
6729         * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
6730         a global symbol.
6731
6732 Tue Sep  5 12:48:26 1995  Jason Molenda   ([email protected])
6733
6734         * config.bfd: i386pe_ve -> i386pe_vec.
6735
6736 Mon Sep  4 14:02:43 1995  Ian Lance Taylor  <[email protected]>
6737
6738         * configure.host: Incorporate host Makefile fragments by setting
6739         shell variables.
6740         * configure.in: Call AC_PROG_CC.  Substitute CFLAGS, HDEFINES and
6741         AR.  Call AC_PROG_INSTALL.  Substitute CC_FOR_BUILD, choosing a
6742         value based on whether the code is being compiled by a cross
6743         compiler.  Don't substitute host_makefile_frag or frags.
6744         * aclocal.m4: New file to define local AC_PROG_CC.
6745         * configure: Rebuild.
6746         * Makefile.in (INSTALL): Set to @INSTALL@.
6747         (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
6748         (INSTALL_DATA): Set to @INSTALL_DATA@.
6749         (AR): Set to @AR@.
6750         (CC): Define as @CC@.
6751         (CFLAGS): Set to @CFLAGS@.
6752         (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
6753         (@host_makefile_frag@): Remove.
6754         (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@.  Move $(CFLAGS)
6755         after other options.
6756         (config.status): Remove dependency upon @frags@.
6757         * config/*.mh, config/README: Remove.
6758
6759         * config.bfd: Rewrite to incorporate the contents of the Makefile
6760         fragments by setting shell variables, rather than merely returning
6761         the name of a Makefile fragment.
6762         * configure.in: Use shell variables set by config.bfd rather than
6763         looking at the target Makefile fragment files.  Don't substitute
6764         target_makefile_frag.  Do substitute TDEFINES.
6765         * configure: Rebuild.
6766         * Makefile.in (@target_makefile_frag@): Remove.
6767         (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
6768         * config/*.mt: Remove.
6769
6770 Mon Sep  4 03:13:28 1995  Ken Raeburn  <[email protected]>
6771
6772         * configure.in: Put changequote lines around "i[345]86" patterns
6773         section of core file support.
6774
6775 Sun Sep  3 11:31:58 1995  Jeff Law  ([email protected])
6776
6777         * som.c (som_bfd_print_private_bfd_data): Define to use the
6778         generic version.
6779
6780 Fri Sep  1 17:08:40 1995  steve chamberlain  <[email protected]>
6781
6782         * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
6783         entry, text_start and data_start.
6784
6785 Fri Sep  1 18:06:28 1995  Ian Lance Taylor  <[email protected]>
6786
6787         * Makefile.in (OFILES): Remove $(TDEPFILES).
6788         * config/apollo.mt (TDEPFILES): Remove.
6789         * config/README: Update.
6790
6791         * configure.in: For a native configuration, set COREFILE and
6792         COREFLAG based on the canonical host name.
6793         * configure: Rebuild.
6794         * Makefile.in: Rebuild dependencies.
6795         (ALL_CFLAGS): Add @COREFLAG@.
6796         (OFILES): Replace $(HDEPFILES) with @COREFILE@.
6797         * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
6798         support routines.  Check LYNX_CORE rather than HOST_LYNX.
6799         * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
6800         * i386lynx.c: Likewise.
6801         * m68klynx.c: Likewise.
6802         * sparclynx.c: Likewise.
6803         * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
6804         * *-core.c: Comment changes.
6805         * config/decstation.mh (HDEPFILES): Remove.
6806         (HDEFINES): Remove -DTRAD_CORE.
6807         * config/irix3.mh (RANLIB): Remove.
6808         * config/irix4.mh (HDEPFILES, RANLIB): Remove.
6809         (HDEFINES): Remove -DIRIX_CORE.
6810         * config/riscos.mh (RANLIB, HDEPFILES): Remove.
6811         (HDEFINES): Remove -DTRAD_CORE.
6812         * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
6813         * config/ultra3.mh (RANLIB): Remove.
6814         * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
6815         * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
6816         * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
6817         * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
6818         * config/hppahpux.mh, config/hppaosf.mh: Remove.
6819         * config/i386aix.mh, config/i386bsd.mh: Remove.
6820         * config/i386linux.mh, config/i386mach3.mh: Remove.
6821         * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
6822         * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
6823         * config/mipsmach3.mh, config/news-mips.mh: Remove.
6824         * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
6825         * config/rs600.mh, config/rs6000lynx.mh: Remove.
6826         * config/solaris2.mh, config/stratus.mh: Remove.
6827         * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
6828         * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
6829
6830 Fri Sep  1 15:18:50 1995  Kazumoto Kojima  <[email protected]>
6831
6832         * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
6833         DT_FINI entry if the appropriate symbol is not in the hash table.
6834
6835         * libelf.h (struct elf_backend_data): Add create_program_headers
6836         and want_hdr_in_seg fields.
6837         * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
6838         defined.
6839         (elf_backend_create_program_headers): Likewise.
6840         (elfNN_bed): Initialize create_program_headers and
6841         want_hdr_in_seg.
6842         * elf.c (get_program_header_size): Call create_program_headers
6843         backend routine.
6844         (map_program_segments): Check want_hdr_in_seg backend field.  Call
6845         create_program_headers backend routine.
6846
6847         * elf.c (assign_file_positions_except_relocs): Align non allocated
6848         sections when creating an executable.
6849
6850         * elfcode.h (elf_swap_phdr_in): Make non static.
6851         (elf_swap_phdr_out): Make non static.
6852         * libelf.h (bfd_elf32_swap_phdr_in): Declare.
6853         (bfd_elf32_swap_phdr_out): Declare.
6854         (bfd_elf64_swap_phdr_in): Declare.
6855         (bfd_elf64_swap_phdr_out): Declare.
6856
6857         * ecofflink.c (ecoff_collect_shuffle): New static function.
6858         (_bfd_ecoff_get_accumulated_pdr): New function.
6859         (_bfd_ecoff_get_accumulated_sym): New function.
6860         (_bfd_ecoff_get_accumulated_ss): New function.
6861         * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
6862         (_bfd_ecoff_get_accumulated_sym): Declare.
6863         (_bfd_ecoff_get_accumulated_ss): Declare.
6864         * libbfd.h: Rebuild.
6865
6866 Fri Sep  1 13:20:25 1995  Ian Lance Taylor  <[email protected]>
6867
6868         * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
6869
6870         * elflink.h (elf_link_add_object_symbols): Handle indirect and
6871         warning symbols.  If any section is named .gnu.warning.XXX, treat
6872         the contents as a warning to be issued if the symbol XXX is
6873         referenced.
6874         (elf_link_output_extsym): For an indirect or warning symbol, just
6875         output the symbol it points to.
6876
6877         * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
6878         if bfd_hash_allocate fails, since it will already be set.
6879         (generic_link_hash_newfunc): Likewise.
6880         (archive_hash_newfunc): Likewise.
6881         (hash_entry_bfd): New static function.
6882         (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
6883         callback.  Allocate a new warning using the hash table newfunc.
6884         Use bfd_hash_replace to update the entry in the hash table, rather
6885         than assuming we can copy the fields with structure assignment.
6886
6887         * hash.c (bfd_hash_replace): New function.
6888         * bfd-in.h (bfd_hash_replace): Declare.
6889         * bfd-in2.h: Rebuild.
6890
6891 Fri Sep  1 08:12:50 1995  James G. Smith  <[email protected]>
6892
6893         * config.bfd: Add mips*vr4300-*-elf* target.
6894         * config/mipsbvr4300.mt: Added.
6895
6896 See file ChangeLog.2
6897
6898 \f
6899 Local Variables:
6900 mode: change-log
6901 left-margin: 8
6902 fill-column: 74
6903 version-control: never
6904 End:
This page took 0.425912 seconds and 4 git commands to generate.