* config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
[platform/upstream/binutils.git] / bfd / ChangeLog
1 Thu Jun  6 11:24:37 1996  Ian Lance Taylor  <ian@cygnus.com>
2
3         * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
4         From Kevin Buettner <kev@primenet.com>.
5
6 Wed Jun  5 15:16:04 1996  Ian Lance Taylor  <ian@cygnus.com>
7
8         * aoutx.h (translate_to_native_sym_flags): Don't try to print the
9         name of a NULL section.
10
11 Tue Jun  4 18:53:58 1996  Ian Lance Taylor  <ian@cygnus.com>
12
13         * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
14         set, always call the notice callback.
15
16         * VERSION: Increment for bfdlink.h change.
17
18 Mon Jun  3 11:01:53 1996  Ian Lance Taylor  <ian@cygnus.com>
19
20         * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
21         (sh_relax_delete_bytes): Correct handling of differently sized
22         trailing alignment reloc.
23
24         * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
25         * bfd-in2.h: Rebuild.
26         * configure.in: Warn if there is no known 64 bit type.
27         * configure: Rebuild.
28
29         * Makefile.in: Rebuild dependencies.
30         (BFD32_BACKENDS): Add ppcboot.o.
31         (BFD32_BACKENDS_CFILES): Add ppcboot.c.
32
33         * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
34         From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
35
36 Sat Jun  1 21:49:58 1996  Ian Lance Taylor  <ian@cygnus.com>
37
38         * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
39         (bfd_mips_elf64_swap_reginfo_out): Move from here...
40         * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
41         (bfd_mips_elf64_swap_reginfo_out): ...to here.
42
43 Fri May 31 13:51:28 1996  Ian Lance Taylor  <ian@cygnus.com>
44
45         * elf64-mips.c: Improve reloc special_functions and handling of
46         SHT_MIPS_OPTIONS section.
47         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
48         mips_elf_hi16_reloc and make globally visible.
49         (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
50         make globally visible.
51         (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
52         make globally visible.
53         (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
54         and make globally visible.
55         (gprel16_with_gp): Check howto->src_mask before using value in
56         insn.
57         (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
58         and make globally visible.
59         (gprel32_with_gp): Check howto->src_mask before fetching value.
60         (bfd_mips_elf_swap_options_in): New function.
61         (bfd_mips_elf_swap_options_out): New function.
62         (_bfd_mips_elf_set_private_flags): Rename from
63         mips_elf_set_private_flags and make globally visible.
64         (_bfd_mips_elf_copy_private_bfd_data): Rename from
65         mips_elf_copy_private_bfd_data and make globally visible.
66         (_bfd_mips_elf_merge_private_bfd_data): Rename from
67         mips_elf_merge_private_bfd_data and make globally visible.
68         (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
69         for a SHT_MIPS_OPTIONS section.
70         (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
71         (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
72         name of a SHT_MIPS_OPTIONS section.
73         (_bfd_mips_elf_set_section_contents): New function.
74         (mips_elf32_section_processing): Set the GP value in a
75         SHT_MIPS_OPTIONS section.
76         (_bfd_mips_elf_find_nearest_line): Rename from
77         mips_elf_find_nearest_line and make globally visible.
78         (bfd_elf32_set_section_contents): Define.
79         * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
80         (_bfd_mips_elf_lo16_reloc): Declare.
81         (_bfd_mips_elf_gprel16_reloc): Declare.
82         (_bfd_mips_elf_got16_reloc): Declare.
83         (_bfd_mips_elf_gprel32_reloc): Declare.
84         (_bfd_mips_elf_set_private_flags): Declare.
85         (_bfd_mips_elf_copy_private_bfd_data): Declare.
86         (_bfd_mips_elf_merge_private_bfd_data): Declare.
87         (_bfd_mips_elf_find_nearest_line): Declare.
88         (_bfd_mips_elf_set_section_contents): Declare.
89
90         * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
91         elf_info_to_howto.
92         (elf_info_to_howto): Define.
93         * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
94         elf_info_to_howto.
95         (elf_info_to_howto): Define.
96         * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
97         elf_info_to_howto.
98         (elf_info_to_howto): Define.
99
100         * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
101         R_MOV16B[12], to match change in coff/internal.h.
102
103 Thu May 30 12:38:49 1996  Ian Lance Taylor  <ian@cygnus.com>
104
105         * elf64-mips.c: Extensive additions to provide better support for
106         writing files and for gas.
107         * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
108         of mips_elf_object_p.
109         (mips_elf32_object_p): Rename from mips_elf_object_p; call
110         _bfd_mips_elf_object_p.
111         (_bfd_mips_elf_final_write_processing): Rename from
112         mips_elf_final_write_processing and make globally visible.
113         (_bfd_mips_elf_fake_sections): Rename from
114         mips_elf_fake_sections and make globally visible.
115         (_bfd_mips_elf_section_from_bfd_section): Rename from
116         mips_elf_section_from_bfd_section and make globally visible.
117         (_bfd_mips_elf_section_processing): New function, broken out of
118         mips_elf_section_processing.
119         (mips_elf32_section_processing): Rename from
120         mips_elf_section_processing; call
121         _bfd_mips_elf_section_processing.
122         (_bfd_mips_elf_symbol_processing): Rename from
123         mips_elf_symbol_processing and make globally visible.
124         (_bfd_mips_elf_read_ecoff_info): Rename from
125         mips_elf_read_ecoff_info and make globally visible.
126         (mips_elf32_ecoff_debug_swap): Rename from
127         mips_elf_ecoff_debug_swap.
128         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
129         struct symbol_cache_entry.
130         (_bfd_elf_validate_reloc): New function, moved in from
131         elfcode.h:validate_reloc.
132         * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
133         to _bfd_elf_validate_reloc.  Change all callers.
134         * elf-bfd.h (bfd_section_from_shdr): Declare.
135         (_bfd_elf_symbol_from_bfd_symbol): Declare.
136         (_bfd_elf_validate_reloc): Declare.
137         (_bfd_mips_elf_object_p): Declare.
138         (_bfd_mips_elf_fake_sections): Declare.
139         (_bfd_mips_elf_section_from_bfd_section): Declare.
140         (_bfd_mips_elf_section_processing): Declare.
141         (_bfd_mips_elf_symbol_processing): Declare.
142         (_bfd_mips_elf_read_ecoff_info): Declare.
143         (_bfd_mips_elf_final_write_processing): Declare.
144         * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
145         if already defined.
146
147         * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
148         (mips_elf_final_write_processing): Likewise.
149
150 Wed May 29 16:15:29 1996  Ian Lance Taylor  <ian@cygnus.com>
151
152         64-bit MIPS ELF ABI objdump support:
153         * elf64-mips.c: New file.
154         * Makefile.in: Rebuild dependencies.
155         (BFD64_BACKENDS): Add elf64-mips.o.
156         (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
157         * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
158         bfd_elf64_littlemips_vec to targ_selvecs.
159         (mips*-*-elf*): Likewise.
160         * confingure.in: Add bfd_elf64_bigmips_vec and
161         bfd_elf64_littlemips_vec to vector switch.
162         * configure: Rebuild.
163         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
164         broken out of mips_elf_section_from_shdr.
165         (mips_elf32_section_from_shdr): Rename from
166         mips_elf_section_from_shdr.  Call new function.
167         (elf_backend_section_from_shdr): Update name of renamed function.
168         * elf-bfd.h (struct elf_size_info): Change second parameter of
169         write_out_phdrs to be const.  Likewise for second parameter of
170         swap_symbol_out.
171         (struct bfd_elf_section_data): Add rel_hdr2 field.
172         (bfd_elf32_swap_symbol_in): Change second parameter to be const.
173         (bfd_elf32_swap_symbol_out): Likewise.
174         (bfd_elf32_swap_reloc_in): Likewise.
175         (bfd_elf32_swap_reloc_out): Likewise.
176         (bfd_elf32_swap_reloca_in): Likewise.
177         (bfd_elf32_swap_reloca_out): Likewise.
178         (bfd_elf32_swap_phdr_in): Likewise.
179         (bfd_elf32_swap_phdr_out): Likewise.
180         (bfd_elf32_swap_dyn_in): Likewise.
181         (bfd_elf32_swap_dyn_out): Likewise.
182         (bfd_elf32_slurp_symbol_table): Declare.
183         (bfd_elf32_write_shdrs_and_ehdr): Declare.
184         (bfd_elf32_write_out_phdrs): Declare.
185         (bfd_elf64_swap_symbol_in): Change second parameter to be const.
186         (bfd_elf64_swap_symbol_out): Likewise.
187         (bfd_elf64_swap_reloc_in): Likewise.
188         (bfd_elf64_swap_reloc_out): Likewise.
189         (bfd_elf64_swap_reloca_in): Likewise.
190         (bfd_elf64_swap_reloca_out): Likewise.
191         (bfd_elf64_swap_phdr_in): Likewise.
192         (bfd_elf64_swap_phdr_out): Likewise.
193         (bfd_elf64_swap_dyn_in): Likewise.
194         (bfd_elf64_swap_dyn_out): Likewise.
195         (bfd_elf64_slurp_symbol_table): Declare.
196         (bfd_elf64_write_shdrs_and_ehdr): Declare.
197         (bfd_elf64_write_out_phdrs): Declare.
198         (_bfd_mips_elf_section_from_shdr): Declare.
199         * elf.c (bfd_section_from_shdr): Remove assertion requiring
200         SHT_REL/SHT_RELA to match use_rela_p.  If there is already a reloc
201         section for the section, add the new one to rel_hdr2.  Increment
202         reloc_count rather than setting it.
203         * elfcode.h (elf_slurp_symbol_table): Define name as macro.
204         Remove static declaration.
205         (elf_write_shdrs_and_ehdr): Define name as macro.
206         (elf_write_out_phdrs): Likewise.
207         (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
208         (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
209         (elf_swap_symbol_in): Change second parameter to be const.
210         (elf_swap_symbol_out): Likewise.
211         (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
212         (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
213         (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
214         (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
215         (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
216         (elf_write_out_phdrs): Rename from write_out_phdrs.  Change second
217         parameter to be const.  Make non-static.
218         (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
219         Make non-static.
220         (elf_slurp_symbol_table): Make non-static.
221         (NAME(_bfd_elf,size_info)): Update names of renamed functions.
222         * elfxx-target.h (elf_info_to_howto): Define if not defined.
223         (elf_backend_size_info): Likewise.
224         (elfNN_bed): Use elf_backend_size_info.
225         * targets.c (bfd_elf64_bigmips_vec): Declare.
226         (bfd_elf64_littlemips_vec): Declare.
227         (bfd_target_vector): Add bfd_elf64_bigmips_vec and
228         bfd_elf64_littlemips_vec if BFD64 is defined.
229         
230         * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
231
232 Tue May 28 11:42:08 1996  Ian Lance Taylor  <ian@cygnus.com>
233
234         * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
235         zeroes, in alignment holes.
236
237         * configure: Rebuild with autoconf 2.10.
238
239         * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
240         potential leading underscore in the allocated buffer.
241
242 Fri May 24 14:28:38 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
243
244         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
245         symbols into .sbss if this is a relocatable link.
246
247 Thu May 23 12:26:24 1996  Ian Lance Taylor  <ian@cygnus.com>
248
249         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
250         undefined symbols when creating a shared library.
251
252 Fri May 17 13:54:15 1996  Ian Lance Taylor  <ian@cygnus.com>
253
254         * coff-sh.c: Add a bunch of new code and static const arrays to
255         support aligning loads and stores on four byte memory boundaries.
256         Also:
257         (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
258         R_SH_LABEL.
259         (sh_relax_section): Look for R_SH_CODE relocs.  If we find one,
260         call sh_align_loads.
261         (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
262         as unused.
263
264 Thu May 16 16:34:13 1996  Ian Lance Taylor  <ian@cygnus.com>
265
266         * cache.c (bfd_open_file): Unlink the file before opening it for
267         write.  From Marty Leisner <leisner@sdsp.mc.xerox.com>.
268
269         * opncls.c (bfd_fdopenr): Set opened_once.
270
271 Tue May 14 12:35:32 1996  Ian Lance Taylor  <ian@cygnus.com>
272
273         * som.c (som_slurp_reloc_table): Clear external_relocs cache after
274         freeing it.
275
276         * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
277         the code unconditionally.
278
279 Mon May 13 19:51:37 1996  Ian Lance Taylor  <ian@cygnus.com>
280
281         * libcoff-in.h (struct pei_section_tdata): Define structure.
282         (pei_section_data): Define macro.
283         * libcoff.h: Rebuild.
284         * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
285         store s_paddr field in pei_section_data.
286         (coff_compute_section_file_positions): Use pei_section_data rather
287         than _cooked_size, and don't overwrite an existing value.
288         (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
289         0.  If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
290         * peicode.h (coff_bfd_copy_private_section_data): Define if
291         COFF_IMAGE_WITH_PE.
292         (pe_bfd_copy_private_section_data): New static function if
293         COFF_IMAGE_WITH_PE.
294
295 Wed May  8 16:10:38 1996  Ian Lance Taylor  <ian@cygnus.com>
296
297         * srec.c (srec_set_arch_mach): Write as a function rather than a
298         macro definition.
299
300         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
301         no map, just check each member in turn to see whether it is
302         required.
303
304 Wed May  8 09:17:34 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
305
306         * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
307         table.  Call BFD_ASSERT to validate header size, instead of
308         calling fatal.
309         (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
310         name.
311
312 Tue May  7 16:10:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
313
314         * ppcboot.c: New target for looking at PPCbug boot records.
315
316         * config{ure.in,.bfd}: Add support for ppcboot target.
317         * targets.c: Ditto.
318         * configure: Regenerate.
319                 
320 Tue May  7 11:15:19 1996  Jeffrey A Law  (law@cygnus.com)
321
322         * coff-h8300.c (howto_table): Update names to match recent
323         changes to include/coff/internal.h.  Fix minor errors in the
324         existing relocs.  Add R_MOVL1 and R_MOVL2.
325         (rtype2howto): Similarly.
326         (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
327         existing relaxing code  and peform more relaxing.
328         (h8300_reloc16_extra_cases): Likewise.
329
330 Mon May  6 18:24:09 1996  Jeffrey A Law  (law@cygnus.com)
331
332         * reloc16.c (bfd_coff_reloc16_get_value): Handle common
333         symbols correctly.
334
335 Sat May  4 05:08:45 1996  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
336
337         * elfcode.h (elf_object_p):  Reject generic ELF target if
338         e_machine matches an alternate machine code in a specific backend.
339
340         * netbsd-core.c (netbsd_core_vec):  Remove initializer for
341         obsolete align_power_min field.
342
343 Fri May  3 13:07:35 1996  Jeffrey A Law  (law@cygnus.com)
344
345         * coff-h8300.c (reloc_howto_type): Add howto entry for
346         R_PCRWORD_B.
347         (rtype2howto): Handle R_PCRWORD_B.
348         (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
349         (h8300_reloc_16_estimate): Likewise.  Try to turn a 16bit
350         pc-relative branch (R_PCRWORD) into an 8bit pc-relative
351         branch (R_PCWORD_B).
352
353 Fri May  3 10:47:41 1996  Ian Lance Taylor  <ian@cygnus.com>
354
355         * aoutx.h (translate_from_native_sym_flags): Set the section for
356         BSF_CONSTRUCTOR symbols.
357
358         * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
359         last_bf_index.
360
361 Wed May  1 18:39:32 1996  Doug Evans  <dje@canuck.cygnus.com>
362
363         * coffcode.h (coff_write_object_contents): In comdat section lookup,
364         stop looking when section is found.
365
366 Wed May  1 14:17:57 1996  Ian Lance Taylor  <ian@cygnus.com>
367
368         * coffcode.h (STRING_SIZE_SIZE): Define.
369         (styp_to_sec_flags): Handle long symbol names when looking for the
370         section symbol.
371         (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
372         (bfd_coff_long_section_names): Define.
373         (coff_write_object_contents): Handle long section names.
374         (bfd_coff_std_swap_table): Initialize new field.
375         * libcoff.h: Rebuild.
376         * coffgen.c (make_a_section_from_file): Handle long section
377         names.
378         (coff_write_symbols): Handle long section names.
379         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
380         * coff-mips.c (mips_ecoff_backend_data): Likewise.
381         * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
382         * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
383         * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
384         * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
385         * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
386         * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
387
388         * bout.c (b_out_callback): Set lma of sections.
389         (b_out_bfd_get_relocated_section_contents): Rename in_abfd
390         parameter to output_bfd.  Used input_bfd instead of output_bfd in
391         several places.
392
393 Tue Apr 30 17:56:39 1996  Ian Lance Taylor  <ian@cygnus.com>
394
395         * aoutx.h (translate_from_native_sym_flags): Don't create
396         SEC_CONSTRUCTOR sections.
397         * ecoff.c (ecoff_set_symbol_info): Likewise.
398
399         * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
400         From Don Bowman <bowman@waterloo.hp.com>.
401
402 Tue Apr 30 17:06:32 1996  Doug Evans  <dje@canuck.cygnus.com>
403
404         * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
405         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
406
407 Mon Apr 29 13:15:17 1996  Ian Lance Taylor  <ian@cygnus.com>
408
409         * elf32-mips.c (struct mips_elf_link_hash_entry): Add
410         mips_32_relocs field.
411         (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
412         (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
413         relocs against a global symbol which is not defined in a regular
414         file.
415         (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
416         against a global symbol, increment mips_32_relocs.
417         (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
418         the symbol is not defined in a regular file, make room in the
419         .rel.dyn section.
420
421 Fri Apr 26 18:00:37 1996  Ian Lance Taylor  <ian@cygnus.com>
422
423         * ecoff.c (ecoff_compute_section_file_positions): Track the real
424         file position and the virtual file position separately.  Set
425         filepos information bsaed on the real file position.
426         (_bfd_ecoff_set_section_contents): Handle .lib sections like the
427         Jan 23 change to coffcode.h.
428
429         * som.c (som_slurp_symbol_table): Set the symbol count to the
430         number of BFD symbols created.
431
432 Fri Apr 26 12:34:29 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
433
434         * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
435         output file if linking shared objects.  Loop to check all relocs,
436         rather than returning false on first error.
437
438 Thu Apr 25 13:25:12 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
439
440         * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
441         (ppc_elf_additional_program_headers): If .interp section, bump #
442         of program headers by 1.
443         (ppc_elf_adjust_dynamic_symbol): Flesh out support.
444         (ppc_elf_size_dynamic_sections): Add support for .plt section.
445         (ppc_elf_check_relocs): Print out filename in debug code.  Enable
446         PLT support.
447         (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
448         debug output.
449         (ppc_elf_relocate_section): If the output section isn't defined,
450         don't abort, just give an error message.
451
452         * elflink.c (_bfd_elf_create_dynamic_sections): If the section
453         being created is .sdata or .sdata2, don't make the symbol dynamic.
454
455 Wed Apr 24 14:04:07 1996  Ian Lance Taylor  <ian@cygnus.com>
456
457         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
458         members of an archive for dynamic objects with no symbols, and
459         pass them directly to check_archive_element.
460         (xcoff_link_check_ar_symbols): Pass dynamic objects to
461         xcoff_link_check_dynamic_ar_symbols.
462         (xcoff_link_check_dynamic_ar_symbols): New static function.
463
464         * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
465         from _bfd_nodynamic to _bfd_xcoff.
466         * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
467         Declare.
468         (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
469         (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
470         (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
471         * libcoff.h: Rebuild.
472         * xcofflink.c (xcoff_swap_ldrel_in): New static function.
473         (xcoff_get_section_contents): New static function.
474         (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
475         (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
476         (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
477         (xcoff_dynamic_reloc): New static variable.
478         (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
479         (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
480         
481 Tue Apr 23 12:48:42 1996  Ian Lance Taylor  <ian@cygnus.com>
482
483         * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
484         if reloc_entry->addend is not 0.
485         (CALC_ADDEND): Just set the addend to reloc.r_offset.
486
487 Mon Apr 22 18:29:01 1996  Doug Evans  <dje@canuck.cygnus.com>
488
489         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
490         R_SPARC_GLOB_JMP.
491         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
492         Add entries for R_SPARC_[56].
493         (sparc_reloc_map): Add entries for R_SPARC_[56].
494
495 Mon Apr 22 15:07:24 1996  Ian Lance Taylor  <ian@cygnus.com>
496
497         Optimize linking of stabs in sections as used in ELF and COFF.
498         * stabs.c: New file.
499         * libbfd-in.h (_bfd_link_section_stabs): Declare.
500         (_bfd_write_section_stabs): Declare.
501         (_bfd_write_stab_strings): Declare.
502         * libbfd.h: Rebuild.
503         * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
504         (struct coff_link_hash_table): Add stab_info field.
505         * libcoff.h: Rebuild.
506         * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
507         stab_info field.
508         (coff_link_add_symbols): Call _bfd_link_section_stabs if
509         appropriate.
510         (_bfd_coff_final_link): Write out stab strings hash table.
511         (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
512         * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
513         hash table.
514         * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
515         (struct bfd_elf_section_data): Add stab_info field.
516         * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
517         field.
518         * elflink.h (elf_link_add_object_symbols): If appropriate, call
519         _bfd_link_section_stabs.
520         (elf_bfd_final_link): Write out stab strings hash table.
521         (elf_link_input_bfd): Handle optimized stabs sections.
522         * reloc.c (_bfd_final_link_relocate): Check address against
523         _raw_size rather than _cooked_size.
524         * Makefile.in: Rebuild dependencies.
525         (BFD_LIBS): Add stabs.o
526         (BFD_LIBS_CFILES): Add stabs.c.
527
528         * VERSION: Increment for bfdlink.h change.
529
530         * coffgen.c (coff_renumber_symbols): Correct handling of
531         BSF_NOT_AT_END common symbols.
532
533 Fri Apr 19 19:21:56 1996  Ian Lance Taylor  <ian@cygnus.com>
534
535         * coff-ppc.c (record_toc): Add cast to avoid warning.
536         (ppc_allocate_toc_section): Likewise.
537         (coff_ppc_relocate_section): Remove ANSI C string concatenation.
538         (ppc_coff_reloc_type_lookup): Remove unreached code.
539         * coffcode.h (coff_write_object_contents): Don't take the address
540         of an array.
541         * peicode.h (pe_print_idata): Add casts to avoid warning.
542         (pe_print_edata): Likewise.
543         (pe_print_reloc): Remove ANSI C string concatenation.
544
545 Thu Apr 18 18:51:18 1996  Ian Lance Taylor  <ian@cygnus.com>
546
547         * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
548         and last_bf fields.
549         * libcoff.h: Rebuild.
550         * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
551         symbols.
552         (coff_swap_aux_out): Likewise.
553         * peicode.h (coff_swap_aux_in): Likewise.
554         (coff_swap_aux_out): Likewise.
555         * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
556         symbols.
557         * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
558         field.
559         (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
560         Fix up .bf endndx link fields.
561         * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
562         field.
563         * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
564         symbols.
565
566 Wed Apr 17 12:08:24 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
567
568         * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
569         on Solaris PowerPC systems doesn't get confused.
570
571         * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
572         #ifdef PPC.
573
574         * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
575         (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
576         update did_reg and did_reg2.
577
578 Wed Apr 17 13:07:37 1996  Ian Lance Taylor  <ian@cygnus.com>
579
580         * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
581
582         * linker.c (_bfd_generic_link_add_one_symbol): When calling the
583         callback routines, pass h->root.string rather than name, in case
584         copy is true and name is transient.
585
586 Tue Apr 16 16:36:38 1996  Stu Grossman  (grossman@lisa.cygnus.com)
587
588         * elfcore.h:  Add support for core files with multiple threads.
589         (Primarily for Solaris.)
590
591 Tue Apr 16 13:44:08 1996  Ian Lance Taylor  <ian@cygnus.com>
592
593         * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
594         section->orelocation is NULL.
595
596         * coffgen.c (bfd_coff_get_syment): New function.
597         (bfd_coff_get_auxent): New function.
598         * bfd-in.h (bfd_coff_get_syment): Declare.
599         (bfd_coff_get_auxent): Declare.
600         * bfd-in2.h: Rebuild.
601
602 Mon Apr 15 19:06:59 1996  Ian Lance Taylor  <ian@cygnus.com>
603
604         * elf32-mips.c (struct mips_hi16): Define.
605         (mips_hi16_addr, mips_hi16_addend): Remove.
606         (mips_hi16_list): New static variable.
607         (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
608         (mips_elf_lo16_reloc): Process mips_hi16_list.
609         (mips_elf_relocate_section): Permit an arbitrary number of HI16
610         relocs before the associated LO16 reloc.
611
612 Wed Apr 10 00:23:53 1996  Ian Lance Taylor  <ian@cygnus.com>
613
614         * versados.c (versados_scan): Check bfd_alloc return value.
615         (versados_object_p): Check all bfd_read return values.  Require
616         that lang field be less than 10, to avoid confusion with Intel Hex
617         files.
618
619         * libaout.h (WRITE_HEADERS): Write out the relocs even if there
620         aren't any symbols.
621         * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
622         not 0, for an absolute symbol.
623         (NAME(aout,swap_ext_reloc_out)): Likewise.
624
625         * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
626         (ihex_write_object_contents): For a large start address, output
627         the full 32 bit address in record type 5.
628
629         * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
630         to int to avoid promotion problems in prototype.
631
632 Tue Apr  9 11:44:21 1996  Ian Lance Taylor  <ian@cygnus.com>
633
634         * configure.host: Use ${srcdir} when looking for picfrag.
635
636         * configure.host: Switch on ${libdir}, not $(libdir).  From
637         alan@spri.levels.unisa.edu.au (Alan Modra).
638
639         * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
640         entry point, not just for DYNAMIC objects.
641         * sunos.c (sunos_add_dynamic_symbols): Always call
642         sunos_create_dynamic_sections.  If called with a non DYNAMIC
643         object, don't do anything else.
644         (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
645
646 Mon Apr  8 12:09:36 1996  Ian Lance Taylor  <ian@cygnus.com>
647
648         * configure.in: Permit --enable-shared to specify a list of
649         directories.
650         * configure: Rebuild.
651
652         * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
653         host when configuring with --enable-shard.
654
655 Fri Apr  5 12:24:13 1996  Ian Lance Taylor  <ian@cygnus.com>
656
657         * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
658         <jdp@polstra.com>.
659
660         * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
661         to avoid crashing in bfd_hash_replace.
662
663         * sysdep.h: Use #ifdef, not #if.
664
665 Thu Apr  4 23:32:23 1996  Ian Lance Taylor  <ian@cygnus.com>
666
667         * config.in: Rebuild.
668
669 Thu Apr  4 18:49:09 1996  Fred Fish  <fnf@cygnus.com>
670
671         * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
672         (AC_CHECK_HEADERS): Check for sys/time.h
673         (AC_HEADER_TIME): Add macro.
674         * configure: Rebuild.
675         * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
676         to control what combination of <time> and <sys/time.h>
677         get included.
678         
679 Tue Apr  2 13:11:53 1996  Doug Evans  <dje@canuck.cygnus.com>
680
681         * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
682         (aout_32_sunos4_write_object_contents): Likewise.
683         * aoutx.h (NAME(aout,machine_type)): Handle
684         bfd_mach_sparc_{sparclet,sparclite}.
685         * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
686         (bfd_mach_sparc_v9_p): Update.
687         * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
688         * libaout.h (enum machine_type): Add M_SPARCLET.
689         * sunos.c (MACHTYPE_OK): Define.
690         * bfd-in2.h: Regenerated.
691
692 Tue Apr  2 00:33:18 1996  Ian Lance Taylor  <ian@cygnus.com>
693
694         * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
695         * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
696         * elflink.c (_bfd_elf_create_got_section): Store the
697         _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
698         * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
699         global offset table goes over 0x1000, set the value of
700         _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
701         (elf32_sparc_relocate_section): Subtract the offset of
702         _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
703
704         * elfcode.h: Don't include <string.h>.
705
706 Mon Apr  1 10:39:24 1996  Jeffrey A Law  (law@cygnus.com)
707
708         * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
709         generic_link_hash_newfunc.  All references changed.
710         * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
711         moved here from libbfd-in.h.
712         * libbfd-in.h: Corresponding changes.
713         * libbfd.h: Regenerated.
714
715 Mon Apr  1 12:35:36 1996  Ian Lance Taylor  <ian@cygnus.com>
716
717         * aoutx.h (aout_link_input_section_std): When reporting an
718         overflow error, use the name of the symbol in the hash table if
719         available.
720         (aout_link_input_section_ext): Likewise.
721
722         * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
723         defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
724
725 Sun Mar 31 01:58:41 1996  steve chamberlain  <sac@slash.cygnus.com>
726
727         * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
728         * coffcode.h (coff_compute_section_file_positions): Likewise.
729         (coff_write_object_contents): Likewise.
730         
731 Fri Mar 29 12:44:36 1996  Ian Lance Taylor  <ian@cygnus.com>
732
733         * section.c (SEC_LINK_ONCE): Define.
734         (SEC_LINK_DUPLICATES): Define.
735         (SEC_LINK_DUPLICATES_DISCARD): Define.
736         (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
737         (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
738         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
739         * bfd-in2.h: Rebuild.
740         * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
741         SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
742         (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
743         into SEC_EXCLUDE.  If IMAGE_SCN_LNK_COMDAT is set, set
744         SEC_LINK_ONCE, and look through the symbol table for the setting
745         for SEC_LINK_DUPLICATES.
746         (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
747         set for a section, find the section symbol in the symbol table,
748         and set the aux entry based on SEC_LINK_DUPLICATES.
749         * coffgen.c (coff_print_symbol): Add a space before "checksum".
750         * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
751         SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
752         * coff-i386.c (i386coff_vec): Likewise.
753         * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
754
755         * VERSION: Bump to 2.6.1.
756         * Makefile.in (stamp-h): Depend upon VERSION.
757
758 Thu Mar 28 23:48:49 1996  Jeffrey A Law  (law@cygnus.com)
759
760         * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
761         * libbfd.h: Rebuilt.
762         * linker.c (generic_link_hash_newfunc): No longer static.
763         * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
764         to override.
765         * coff-h8300.c: Add two derived hash tables and their associated
766         funtions and #defines for use by the h8300 linker.
767         (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
768         the function vector as needed.  Place the address of the function
769         vector entry in the location specified by the R_MEM_INDIRECT reloc.
770         Rewrite the vectors section contents as necessary.
771         (h8300_bfd_link_add_symbols): New function for the h8300 linker. 
772         (coff_bfd_link_add_symbols): Define to use h8300 specific version.
773         (coff_bfd_link_hash_table_create): Likewise.
774
775 Thu Mar 28 17:44:08 1996  Ian Lance Taylor  <ian@cygnus.com>
776
777         * libhppa.h: If gcc 2.7 or higher, declare all the functions with
778         __attribute__ ((__unused__)) so that -Wall doesn't warn about
779         them.
780         (hppa_rebuild_insn): Pass pointer to correct type to
781         low_sign_unext and dis_assemble_21.
782
783 Thu Mar 28 11:00:36 1996  Doug Evans  <dje@canuck.cygnus.com>
784
785         * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
786         Stick with sparc-*-{sysv4*,solaris2*}.
787
788 Wed Mar 27 10:43:34 1996  Ian Lance Taylor  <ian@cygnus.com>
789
790         * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
791         (coff_swap_aux_out): Swap out extra PE x_scn fields.
792         * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
793         * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
794         fields is non-zero, print them.
795
796         * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
797         ifdef.  Remove unused variables.
798         (ppc_record_data_in_toc_entry): Ifdef out.  Removed unused
799         variables.
800         (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
801         (get_symbol_value): Ifdef out.
802         (pe_ppc_reloc): Ifdef out.  Remove unused variables.
803         (coff_ppc_relocate_section): Remove unused variables.  Make
804         fprintf strings and argument types correspond.  Put before_addr in
805         DEBUG_RELOC ifdef.
806         (dump_toc): Make fprintf strings and argument types correspond.
807         (ppc_process_before_allocation): Remove unused variables.  Always
808         return a value.
809         (ppc_reflo_reloc): Ifdef out.
810         (ppc_addr32nb_reloc): Ifdef out.
811         (ppc_coff_rtype2howto): Make fprintf strings and argument types
812         correspond.
813         (coff_ppc_rtype_to_howto): Likewise.
814         (ppc_coff_swap_sym_in_hook): Remove unused variables.
815
816         * peicode.h (pe_print_idata): Move otherwise unused variables into
817         the #ifdef where they are used.  Always return a value.
818         (pe_print_edata): Make fprintf strings and argument types
819         correspond.  Always return a value.
820         (pe_print_pdata): Removed unused variable addr_value.  Always
821         return a value.
822         (pe_print_reloc): Remove unused variable onaline.  Make fprintf
823         strings and argument types correspond.  Always return a value.
824
825         * elf32-ppc.c (ppc_elf_fake_sections): Return true.
826         (ppc_elf_finish_dynamic_symbol): Move definition of unused
827         variable rela inside #if 0 section where it is used.
828
829         * ns32k.h: New file.
830         * cpu-ns32k.h: Include ns32k.h.  Rename externally visible
831         functions to start with _bfd_.
832         * aout-ns32k.c: Include ns32k.h.  Change references to renamed
833         functions in cpu-ns32k.h.
834         * Makefile.in: Rebuild dependencies.
835         (HFILES): Add ns32k.h.
836
837         * section.c (struct sec): Add linker_mark field.  Change
838         user_set_vma and reloc_done to be single bit fields.
839         (STD_SECTION): Update accordingly.
840         * bfd-in2.h: Rebuild.
841         * aoutx.h (NAME(aout,final_link)): Mark sections included in the
842         link.
843         (aout_link_input_bfd): Don't link unmarked sections.
844         * cofflink.c (_bfd_coff_final_link): Mark sections included in the
845         link.
846         (_bfd_coff_link_input_bfd): Don't link unmarked sections.
847         * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
848         the link.
849         * elflink.h (elf_bfd_final_link): Mark sections included in the
850         link.
851         (elf_link_input_bfd): Don't link unmarked sections.
852         * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
853         in the link.
854         (xcoff_link_input_bfd): Don't link unmarked sections.
855
856         * coffswap.h (coff_swap_scnhdr_out): Include section name in
857         overflow error messages.
858
859 Tue Mar 26 15:46:18 1996  Ian Lance Taylor  <ian@cygnus.com>
860
861         * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
862         is not set, print "BFD: " before the error message.
863
864         * configure.in: Use AC_CHECK_TOOL to find ar and ranlib.  From
865         Miles Bader <miles@gnu.ai.mit.edu>.
866         * configure: Rebuild.
867
868 Fri Mar 22 12:17:00 1996  Ian Lance Taylor  <ian@cygnus.com>
869
870         * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
871         symbols.
872
873         * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
874         m68k-aout, m68k-coff, and m68k-elf targets.
875
876 Fri Mar 22 11:33:44 1996  Martin Anantharaman  <martin@goofy.imech.uni-duisburg.de>
877
878         * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
879         (ieee_generic_stat_arch_elt): Restructured to prevent
880         ieee_object_p from being called repeatedly.
881
882 Thu Mar 21 11:00:47 1996  steve chamberlain  <sac@slash.cygnus.com>
883
884         * coffcode.h (coff_write_object_contents):  Allocate
885         buffers large enough for any FILEHDR or AOUTHDR.
886
887 Thu Mar 21 16:28:17 1996  David Mosberger-Tang  <davidm@azstarnet.com>
888
889         * ecofflink.c (lookup_line): New static function, renamed and
890         slighly changed from old _bfd_ecoff_locate_line.
891         (_bfd_ecoff_locate_line): Cache line number information.  Use
892         lookup_line for actual lookup.
893
894 Thu Mar 21 14:59:11 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
895
896         * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
897         multiple of 20 bytes.
898
899 Thu Mar 21 13:54:40 1996  Ian Lance Taylor  <ian@cygnus.com>
900
901         * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
902         allocate ecoff_find_line, and don't initialize by hand.
903         * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
904         mips_elf_find_line, and don't call memset.
905
906         * coffcode.h (coff_compute_section_file_positions): If not
907         producing a final executable, don't consider sofar when aligning
908         the section to the correct size.
909
910 Wed Mar 20 16:53:12 1996  Ian Lance Taylor  <ian@cygnus.com>
911
912         * coffcode.h (coff_add_missing_symbols): Ifdef out.
913         (coff_write_object_contents): Don't call coff_add_missing_symbols.
914         * coffgen.c (coff_section_symbol): Ifdef out.
915
916 Mon Mar 18 12:54:41 1996  Ian Lance Taylor  <ian@cygnus.com>
917
918         * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
919         output_bfd is not NULL.
920
921 Thu Mar 14 17:12:06 1996  Doug Evans  <dje@charmed.cygnus.com>
922
923         * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
924         of bfd_alloc (fixes fix_line not being initialized).
925         Delete zeroing of fix_{value,tag,end,scnlen} fields.
926
927 Thu Mar 14 16:06:06 1996  Jeffrey A Law  (law@cygnus.com)
928
929         * coffcode.h: Allow specific backends to override the
930         bfd_link_add_symbols routine.
931
932         * coff-h8300.c: Include genlink.h.
933         (howto_table): Add R_MEM_INDIRECT.
934         (rtype2howto): Support R_MEM_INDIRECT.
935         (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
936         for now.
937         
938 Tue Mar 12 12:41:17 1996  David Mosberger-Tang  <davidm@koala.azstarnet.com>
939
940         * coff-alpha.c (alpha_relocate_section): Use
941         info->callbacks_warning, rather than _bfd_error_handler, for
942         "multiple gp" warning.
943
944 Tue Mar 12 12:10:55 1996  Ian Lance Taylor  <ian@cygnus.com>
945
946         * linker.c (bfd_wrapped_link_hash_lookup): New function.
947         (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
948         table string.  Use bfd_wrapped_link_hash_lookup.
949         (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
950         table string.
951         * aoutx.h (aout_link_write_symbols): Use the name from the hash
952         table, if any, when writing out symbols.
953         (aout_link_input_section_std): Use the name from the hash table,
954         if any, when reporting undefined symbols.
955         (aout_link_input_section_ext): Likewise.
956         (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
957         * bout.c (get_value): Likewise.
958         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
959         * ecoff.c (ecoff_reloc_link_order): Likewise.
960         * elflink.h (elf_link_add_object_symbols): Likewise.
961         (elf_reloc_link_order): Likewise.       
962         * linker.c (_bfd_generic_link_output_symbols): Likewise.
963         (_bfd_generic_reloc_link_order): Likewise.
964         (default_indirect_link_order): Likewise.
965         * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
966         * sunos.c (sunos_add_one_symbol): Likewise.
967         * xcofflink.c (xcoff_link_add_symbols): Likewise.
968         (bfd_xcoff_link_count_reloc): Likewise.
969         (xcoff_reloc_link_order): Likewise.
970
971         * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
972         into -1 for intern->rss.
973
974         * configure: Rebuild with autoconf 2.8.
975
976 Mon Mar 11 12:28:31 1996  Ian Lance Taylor  <ian@cygnus.com>
977
978         * stab-syms.c (__define_stab_duplicate): Define.
979         (bfd_get_stab_name): Rename from aout_stab_name.  Rewrite to use a
980         switch.
981         * bfd-in.h (bfd_get_stab_name): Declare.
982         * bfd-in2.h: Rebuild.
983         * Makefile.in: Rebuild dependencies.
984         (BFD_LIBS): Add stab-syms.o.
985         (BFD_LIBS_CFILES): Add stab-syms.c.
986         (BFD32_BACKENDS): Remove stab-syms.o.
987         (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
988         * configure.in: Don't list stab-syms.o in bfd_backends.
989         * configure: Rebuild.
990         * libaout.h (aout_stab_name): Don't declare.
991         * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
992         not aout_stab_name.
993
994 Fri Mar  8 11:26:20 1996  Ian Lance Taylor  <ian@cygnus.com>
995
996         * elf.c (assign_file_positions_for_segments): Adjust file offset
997         for section alignment even if SEC_LOAD is not set.
998
999 Tue Mar  5 12:02:23 1996  Ian Lance Taylor  <ian@cygnus.com>
1000
1001         * configure.in: Don't set SHLIB or SHLINK to an empty string,
1002         since they appear as targets in Makefile.in.
1003         * configure: Rebuild.
1004
1005         * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
1006         don't fiddle with a symbol which is not defined anywhere.
1007
1008 Mon Mar  4 12:49:16 1996  Ian Lance Taylor  <ian@cygnus.com>
1009
1010         * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
1011         though they are defined in a shared library.
1012         (xcoff_build_ldsyms): Likewise.
1013
1014         * coffgen.c (coff_find_nearest_line): Don't look at the line
1015         numbers for the section if section->lineno is NULL.
1016
1017         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
1018         message rather than calling BFD_ASSERT.
1019         * elfcode.h (write_relocs): Check return value of
1020         _bfd_elf_symbol_from_bfd_symbol.
1021
1022 Fri Mar  1 09:42:59 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1023
1024         * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
1025         for .sbss section.
1026
1027 Wed Feb 28 11:25:47 1996  Jeffrey A Law  (law@cygnus.com)
1028
1029         * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
1030         and R_HPPA_NLRSEL.
1031         (e_nsel, e_nlsel, e_nlrsel): Undefine.  Add to
1032         hppa_reloc_field_selector_type_alt.
1033         (hppa_field_adjust): Handle e_nlsel, e_nlrsel.  Fix e_nsel handling.
1034         * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
1035         selectors.
1036         (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
1037
1038 Wed Feb 28 11:00:24 1996  Ian Lance Taylor  <ian@cygnus.com>
1039
1040         * elf.c (assign_file_positions_for_segments): Adjust the segment
1041         memory size for the alignment of a SEC_ALLOC section, not just a
1042         SEC_LOAD section.
1043
1044 Tue Feb 27 14:17:31 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1045
1046         * m68klinux.c: New file.
1047         * hosts/m68klinux.h: New file.
1048         * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
1049         * configure.in (m68*-*-linux*): New native host.
1050         (m68klinux_vec): New vector.
1051         * configure: Rebuild.
1052         * targets.c (m68klinux_vec): Declare.
1053         * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
1054         bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
1055         * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
1056         declaration from bfd_linux_size_dynamic_sections.
1057         (bfd_m68klinux_size_dynamic_sections): Declare.
1058         * bfd-in2.h: Rebuild.
1059         * Makefile.in: Rebuild dependencies.
1060         (BFD32_BACKENDS): Add m68klinux.o.
1061         (BFD32_BACKENDS_CFILES): Add m68klinux.c.
1062
1063 Tue Feb 27 11:31:34 1996  Jeffrey A Law  (law@cygnus.com)
1064
1065         * libhppa.h (pa_arch): Add pa20.
1066         (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
1067         (e_nsel): Undefine.  Add to hppa_reloc_field_selector_type_alt.
1068         (hppa_field_adjust): Handle e_nsel.
1069         * som.c: Provide default definitions for many new relocs found only
1070         in hpux10 include files.
1071         (som_fixup_formats): Add several new relocs from hpux10.
1072         (som_hppa_howto_table): Add hpux10 relocs.
1073         (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
1074
1075 Mon Feb 26 12:52:48 1996  Stan Shebs  <shebs@andros.cygnus.com>
1076
1077         * mpw-make.sed: Edit out recent shared library support, and
1078         rules to rebuild .h files using doc/chew.
1079
1080 Mon Feb 26 14:48:39 1996  David Mosberger-Tang  <davidm@AZStarNet.com>
1081
1082         * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
1083         size even of sections with no contents.
1084
1085 Mon Feb 26 14:01:13 1996  Ian Lance Taylor  <ian@cygnus.com>
1086
1087         * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1088         starting with '$' the way we skip names starting with '.'.  When
1089         updating x_endndx, don't be fooled by an index which has been
1090         merged.
1091
1092         * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1093         struct/union/enum type with no elements.
1094
1095 Sat Feb 24 11:38:58 1996  Ian Lance Taylor  <ian@cygnus.com>
1096
1097         * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1098
1099         * archive.c (bfd_generic_archive_p): If the first file in the
1100         archive can not be recognized as an object, don't assume that this
1101         is the wrong format.
1102
1103         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1104         format is not bfd_object.
1105         (bfd_elf_get_dt_soname): Likewise.
1106
1107 Wed Feb 21 13:58:04 1996  Ian Lance Taylor  <ian@cygnus.com>
1108
1109         * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1110         reloc.
1111
1112 Tue Feb 20 16:22:44 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
1113
1114         * bfd.c (tdata): Add netbsd_core_data.
1115         * bfd-in2.h: Regenerated.
1116
1117 Tue Feb 20 16:50:02 1996  Ian Lance Taylor  <ian@cygnus.com>
1118
1119         * sunos.c (SUNOS_CONSTRUCTOR): Define.
1120         (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1121         override a constructor symbol.  Set SUNOS_CONSTRUCTOR when
1122         appropriate.
1123
1124         * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1125         to get the symbol index, matching 14 Jul 95 change.
1126
1127 Tue Feb 20 08:26:27 1996  Fred Fish  <fnf@phydeaux.cygnus.com>
1128
1129         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1130         Remove duplicate definition of gp.
1131
1132 Mon Feb 19 12:37:41 1996  Ian Lance Taylor  <ian@cygnus.com>
1133
1134         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1135         assume that we can set the GP value and then get the same value,
1136         since it won't be true if the output file is neither ELF nor
1137         ECOFF.
1138         * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1139         _bfd_get_gp_value here.
1140         (mips_gprel_reloc): Don't assume we can set and get the GP value.
1141         * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1142         mips_elf_final_gp.
1143         (mips_elf_lo16_reloc): Likewise.
1144         (mips_elf_final_gp): Add pgp parameter.  Set it to the GP value.
1145         Don't require that the BFD be ELF.
1146         (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1147         (mips_elf_gprel32_reloc): Likewise.
1148         (mips_elf_relocate_section): Don't assume we can set and get the
1149         GP value.
1150         (mips_elf_finish_dynamic_symbol): Don't bother to use
1151         _bfd_get_gp_value here.
1152
1153         * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1154         Don't change epdr between malloc and free.  Be careful not to free
1155         NULL pointers.  Zero out the first RPDR.
1156
1157         * configure.host: On Linux, only pass -rpath option if $(libdir)
1158         is neither /lib nor /usr/lib.  From Alan Modra
1159         <alan@mullet.Levels.UniSA.Edu.Au>.
1160
1161         * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1162         dt_name.
1163         (elf_dt_name): Rename from elf_dt_needed_name.
1164         * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1165         elf_dt_needed_name.
1166         (bfd_elf_get_dt_soname): New function.
1167         * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1168         elf_dt_needed_name.  Save the SONAME back in elf_dt_name.
1169         * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1170         * bfd-in2.h: Rebuild.
1171
1172 Mon Feb 19 02:50:23 1996  Doug Evans  <dje@charmed.cygnus.com>
1173
1174         * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1175         _bfd_sparc_elf_reloc_type_lookup.
1176         (bfd_elf32_bfd_reloc_type_lookup): Update.
1177         * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1178         (sparc64_elf_howto_table): Define.
1179         (sparc_reloc_map): Define.
1180         (sparc64_elf_reloc_type_lookup): New function.
1181         (sparc_elf_wdisp16_reloc): New function.
1182         (elf_info_to_howto): Use sparc64_elf_howto_table.
1183         (sparc64_elf_relocate_section): Likewise.
1184         (bfd_elf64_bfd_reloc_type_lookup): Update.
1185
1186 Sun Feb 18 15:02:25 1996  Ian Lance Taylor  <ian@cygnus.com>
1187
1188         * configure.host: Check for 'do not mix' from native linker before
1189         trying to use -rpath.
1190
1191 Fri Feb 16 12:46:18 1996  Ian Lance Taylor  <ian@cygnus.com>
1192
1193         * bfd.c (_bfd_get_gp_value): New function.
1194         (_bfd_set_gp_value): New function.
1195         * libbfd-in.h (_bfd_get_gp_value): Declare.
1196         (_bfd_set_gp_value): Declare.
1197         * libbfd.h: Rebuild.
1198         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1199         _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1200         directly to the fields in the tdata information.
1201         (alpha_relocate_section): Likewise.
1202         * coff-mips.c (mips_adjust_reloc_in): Likewise.
1203         (mips_gprel_reloc): Likewise.
1204         (mips_relocate_section): Likewise.
1205         * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1206         (mips_elf_lo16_reloc): Likewise.
1207         (mips_elf_final_gp): Likewise.
1208         (mips_elf_gprel16_reloc): Likewise.
1209         (mips_elf_gprel32_reloc): Likewise.
1210         (mips_elf_relocate_section): Likewise.
1211         (mips_elf_finish_dynamic_symbol): Likewise.
1212
1213         * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1214
1215 Thu Feb 15 11:29:13 1996  Ian Lance Taylor  <ian@cygnus.com>
1216
1217         * configure.in: Call AC_PROG_CC before configure.host.
1218         * configure: Rebuild.
1219         * configure.host: Don't set information which autoconf should
1220         figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1221
1222         * configure.host: Remove go32 and win32 host information, since it
1223         should no longer be needed.
1224
1225         * elf.c (map_sections_to_segments): If we have a .dynamic section,
1226         then start a new segment rather than put a writable section in a
1227         readonly segment.
1228
1229         * configure.host: Set RPATH_ENVVAR.
1230
1231         * Makefile.in: Rebuild dependencies.
1232
1233         * elflink.c (_bfd_elf_create_linker_section): Remove unused
1234         zero_section variable.
1235
1236 Thu Feb 15 10:39:17 1996  H.J. Lu  <hjl@zoom.com>
1237
1238         * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1239         ($(srcdir)/libbfd.h): Rename from libbfd.h.
1240         ($(srcdir)/libcoff.h): Rename from libcoff.h.
1241
1242 Wed Feb 14 16:29:07 1996  Martin Anantharaman  <martin@mail.imech.uni-duisburg.de>
1243
1244         * ieee.c (ieee_write_expression): Only use an R variable for a
1245         local symbol.  Don't output a zero offset.  Handle a zero address.
1246         (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1247         (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1248         PCREL_OFFSET.
1249         (parse_expression): Don't try to handle multiple occurrences of a
1250         P variable.  Handle I variables differently from X variables.  Fix
1251         the order of minus expressions.
1252         (ieee_slurp_external_symbols): Generate an I variable for an NN
1253         record.  Fix handling of ATI and ATX records.
1254         (ieee_slurp_sections): Only set minimal section attributes.
1255         Adjust them later, based on the section contents.
1256         (ieee_object_p): Read in the file until just after the ME record.
1257         Call ieee_slurp_section_data to set the section flags.
1258         (do_one): Add iterations parameter.  Only repeat the first load
1259         item.  Set the section and file reloc flags.
1260         (ieee_slurp_section_data): Set section flags.  Pass iterations to
1261         do_one.
1262         (ieee_canonicalize_reloc): Handle I variables.
1263         (do_with_relocs): Only emit relocation size when necessary.
1264         Increase MAXRUN to 127.  Change ov to be assigned, and take
1265         src_mask and pcrel_offset into account.
1266         (ieee_write_data_part): Skip sections that are not loaded.
1267         (ieee_write_external_part): Don't output optional last entry of WX
1268         records.
1269         (ieee_write_me_part): Make setting of me_record neater.
1270         (ieee_generic_stat_arch_elt): Get the size of an archive element.
1271
1272         * syms.c (stt): Add entries for zerovars, vars, and code.
1273
1274         * elfcode.h (validate_reloc): New static function.
1275         (write_relocs): Call validate_reloc for non ELF relocs.
1276
1277         * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1278         (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1279         (TARGET_LITTLE_SYM): Likewise.
1280
1281         * config.bfd (m68*-*-psos*): New target.
1282
1283 Tue Feb 13 15:56:22 1996  Bryan Ford  <baford@snake.cs.utah.edu>
1284
1285         * i386msdos.c: Remove some #if 0 code.
1286         (msdos_write_object_contents): Don't include empty sections in the
1287         size computation, regardless of their address.
1288
1289 Tue Feb 13 15:36:37 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1290
1291         * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1292         is NULL, ie, the -r switch is used.
1293
1294 Tue Feb 13 14:35:15 1996  Ian Lance Taylor  <ian@cygnus.com>
1295
1296         * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1297         (BFD_RELOC_MIPS_GOT_LO16): Define.
1298         (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1299         * bfd-in2.h, libbfd.h: Rebuild.
1300         * elf32-mips.c (mips_reloc_map): Map new relocs.
1301
1302         * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1303
1304         * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1305         $(SHLINK).
1306
1307         * ieee.c (get_symbol): Set the section to bfd_abs_section.
1308         (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1309         simple number for the section address, rather than an expression.
1310         Limit the number of bytes between relocs to MAXRUN.
1311         (ieee_write_me_part): Set me_record to the file offset after the
1312         start address.
1313         (ieee_write_processor): New static function.
1314         (ieee_write_object_contents): Use ieee_write_processor.
1315
1316 Fri Feb  9 10:53:00 1996  Ian Lance Taylor  <ian@cygnus.com>
1317
1318         * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1319
1320         * coff-aux.c: Change include of aux.h to aux-coff.h.
1321
1322 Thu Feb  8 14:01:03 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1323
1324         * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1325         relocation put the addend both in the reloc entry and the data.
1326         (elf_m68k_finish_dynamic_symbol): Likewise.  Mask out marker in
1327         GOT offset value.
1328
1329         * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1330         a R_68K_PCxx reloc against a defined global symbol directly.
1331         (elf_m68k_check_relocs): Don't count such a reloc.
1332
1333         * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1334         a PLTxx reloc as dynamic.  Disallow PLTxxO reloc against a local
1335         symbol for now, otherwise always record the symbol as dynamic.
1336         (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1337         is not referenced by a dynamic object, and we are not making a
1338         shared object, then don't make a PLT entry.  If we do make a PLT
1339         entry, make sure the symbol has been recorded as dynamic.
1340
1341 Wed Feb  7 13:56:06 1996  Ian Lance Taylor  <ian@cygnus.com>
1342
1343         * configure.host: When making a shared library, set HLDFLAGS to
1344         pass an appropriate -rpath option.  Use the make variable SONAME
1345         as the shared library soname, rather than computing it here.  On
1346         SunOS, build stamp-tshlink in place of $(SHLINK).
1347         * Makefile.in (SONAME): New variable.
1348         ($(SHLINK)): Make a link to the transformed name, as well.
1349         (stamp-tshlink): New target.
1350         (install): Skip stamp-tshlink during install.
1351
1352 Wed Feb  7 13:37:39 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1353
1354         * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1355         linker sections have been set up yet.
1356
1357         * elf.c (make_mapping): Add an additional argument to suppress
1358         making the first section include the program headers.
1359         (map_sections_to_segments): If the user used -Ttext such that the
1360         program headers are on a different page, do not set the flags
1361         saying that this section includes the program headers.
1362
1363 Tue Feb  6 14:04:49 1996  J.T. Conklin  <jtc@rtl.cygnus.com>
1364
1365         * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1366         don't define TRAD_HEADER.
1367         * configure: Rebuild.
1368
1369         * netbsd-core.c: New file, support for NetBSD core files.
1370         * hosts/*nbsd.h: Removed.
1371
1372 Tue Feb  6 11:47:49 1996  Doug Evans  <dje@charmed.cygnus.com>
1373
1374         * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1375         (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1376         * libbfd.h, bfd-in2.h: Regenerated.
1377         * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1378         bfd_elf32_bfd_reloc_type_lookup.
1379         (reloc_type{,_names}): Deleted.
1380         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1381         Add sparc64 relocs.
1382         (sparc_reloc_map): Add sparc64 relocs.
1383         (sparc_elf_notsupported_reloc): New static function.
1384         (sparc_elf_wdisp16_reloc): New static function.
1385         (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1386         (elf32_sparc_relocate_section): Likewise.
1387         (bfd_elf32_bfd_reloc_type_lookup): Define.
1388         * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1389         (reloc_type{,_names}): Deleted.
1390         (elf_sparc_howto_table): Deleted.
1391         (sparc_reloc_map): Deleted.
1392         (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1393         (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1394
1395 Tue Feb  6 12:12:22 1996  Ian Lance Taylor  <ian@cygnus.com>
1396
1397         * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1398         *-*-hpux* host.
1399
1400         * Makefile.in (program_transform_name): New variable.
1401         (install): Transform library name before installing it.
1402
1403 Mon Feb  5 10:38:27 1996  Ian Lance Taylor  <ian@cygnus.com>
1404
1405         * archures.c (bfd_mach_i960_hx): Define.
1406         * bfd-in2.h: Rebuild.
1407         * cpu-i960.c (scan_960_mach): Accept machine "hx".
1408         (MATRIX): Expand entries for HX.
1409         (arch_info_struct): Add i960:hx entry.
1410         * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1411         * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1412         (coff_set_flags): Handle bfd_mach_i960_hx.
1413
1414         Support for building as a shared library, based on patches from
1415         Alan Modra <alan@spri.levels.unisa.edu.au>:
1416         * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1417         New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1418         SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1419         * configure: Rebuild.
1420         * configure.host: If --enable-shared, adjust shared library stuff
1421         based on the host.  If the host is SunOS, and the linker supports
1422         -rpath, set HLDFLAGS to use it.
1423         * Makefile.in (ALLLIBS): New variable.
1424         (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1425         (COMMON_SHLIB, SHLINK): New variables.
1426         (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1427         (STAGESTUFF): Remove variable.
1428         (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1429         $(TARGETLIB).
1430         (stamp-ofiles): New target, like old ofiles target, but build
1431         using a temporary file and move-if-change, and touch stamp-ofiles
1432         when done.
1433         (ofiles): Just depend upon stamp-ofiles.
1434         (stamp-piclist, piclist): New targets.
1435         ($(SHLIB), $(SHLINK)): New targets.
1436         (targets.o, archures.o): Build twice if PICFLAG is set.
1437         (do_mostlyclean): Remove pic/*.o.
1438         (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1439         stamp-piclist.
1440         (do_distclean): Remove pic and stamp-picdir.
1441         (install): Install shared libraries.
1442         ($(OFILES)): Depend upon stamp-picdir.
1443         (stamp-picdir): New target.
1444
1445         * libcoff-in.h: Add comment reminding people that libcoff.h is a
1446         generated file.
1447         * libcoff.h: Rebuild.
1448
1449         * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1450         flavour of a section with no owner.
1451
1452         * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1453         ELF_LINK_NON_ELF flag.
1454         (mips_elf_create_got_section): Likewise.
1455
1456         * elf.c: Revert last change, since it breaks dynamic linking.
1457         * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1458         field.
1459         * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1460         * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1461         (elfNN_bed): Don't initialize want_hdr_in_seg field.
1462
1463 Sun Feb  4 20:45:13 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1464
1465         * elf.c (assign_file_positions_for_segments): If the backend does
1466         not want the elf header or the program headers in the address
1467         space, do not include them in the calculations.
1468
1469         * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1470         function to determine if we need additional program headers.
1471         (ppc_elf_modify_segment_map): Define as a NOP function for now.
1472         (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1473
1474 Sat Feb  3 23:00:03 1996  Ian Lance Taylor  <ian@cygnus.com>
1475
1476         * coffcode.h: Move today's libcoff.h change into coffcode.h.
1477
1478 Sat Feb  3 15:43:44 1996  Fred Fish  <fnf@cygnus.com>
1479
1480         * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1481         back into one line.  Some compilers (sunos 4.1.3 for example)
1482         won't accept args split across more than one line.
1483
1484 Fri Feb  2 11:42:15 1996  Steve Chamberlain  <sac@slash.cygnus.com>
1485
1486         * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1487         * configure: Regenerate.
1488
1489 Fri Feb  2 12:12:16 1996  Jeffrey A Law  (law@cygnus.com)
1490
1491         * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1492         try to do arithmetic on a void *, cast it to a unsigned char * first.
1493
1494 Thu Feb  1 16:04:06 1996  Ian Lance Taylor  <ian@cygnus.com>
1495
1496         * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1497         * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1498         ELF_LINK_NON_ELF.
1499         * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1500         flag for a newly defined symbol.
1501         (NAME(bfd_elf,record_link_assignment)): Likewise.
1502         (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1503         set the DEF or REF_REGULAR flags correctly.
1504
1505         * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1506         (libbfd.h, libcoff.h): Corresponding change.
1507
1508         * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1509         a PLT32 reloc as dynamic.
1510         (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1511         is not referenced by a dynamic object, and we are not making a
1512         shared object, then don't make a PLT entry.  If we do make a PLT
1513         entry, make sure the symbol has been recorded as dynamic.
1514
1515 Wed Jan 31 17:23:32 1996  Steve Chamberlain  <sac@slash.cygnus.com>
1516
1517         * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1518         * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1519         (powerpcle-*-cygwin32): New.
1520         * peicode.h (add_data_entry): Get address from vma.
1521
1522 Wed Jan 31 16:23:57 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1523
1524         * elflink.c (_bfd_elf_create_linker_section): If the symbol
1525         attached to the section has already been created as an undefined
1526         symbol, treat it as if it hasn't been created yet.
1527
1528 Wed Jan 31 16:16:53 1996  Ian Lance Taylor  <ian@cygnus.com>
1529
1530         * elflink.h (elf_bfd_final_link): Don't output initial dummy
1531         symbol or section symbols if stripping all symbols and this is not
1532         a relocateable link.  Don't output the symbol string table if
1533         there are no symbols.
1534         (elf_link_flush_output_syms): Don't do anything if there are no
1535         symbols to flush.
1536
1537 Wed Jan 31 12:55:49 1996  Richard Henderson  <rth@tamu.edu>
1538
1539         * coff-aux.c: New file.
1540         * hosts/m68kaux.h: New file.
1541         * config.bfd (m68*-apple-aux*): New target.
1542         * configure.in (m68*-apple-aux*): New native host.
1543         (m68kaux_coff_vec): New vector.
1544         * configure: Rebuild.
1545         * targets.c (m68kaux_coff_vec): Declare.
1546         * coffcode.h (bfd_coff_backend_data): Add field
1547         _bfd_coff_link_add_one_symbol.
1548         (bfd_coff_link_add_one_symbol): Define.
1549         (compare_arelent_ptr): New static function if TARG_AUX.
1550         (coff_write_relocs): If TARG_AUX, sort the relocs.
1551         (coff_write_object_contents): Set A/UX aouthdr magic number.
1552         (coff_link_add_one_symbol): Define if not defined.
1553         (bfd_coff_std_swap_table): Initialize new field.
1554         * libcoff.h: Rebuild.
1555         * cofflink.c (coff_link_add_symbols): Call
1556         bfd_coff_link_add_one_symbol rather than
1557         _bfd_generic_link_add_one_symbol.
1558         * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1559         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1560         * coff-mips.c (mips_ecoff_backend_data): Likewise.
1561         * Makefile.in: Rebuild dependencies.
1562         (BFD32_BACKENDS): Add coff-aux.o.
1563         (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1564
1565 Wed Jan 31 11:37:46 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
1566
1567         * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1568         relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1569
1570 Tue Jan 30 12:09:04 1996  Ian Lance Taylor  <ian@cygnus.com>
1571
1572         * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1573         $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1574         (maintainer-clean): Warn about deleting special files.
1575         (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1576
1577         * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1578         warning symbols correctly.
1579         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1580         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1581         * elf32-mips.c (mips_elf_relocate_section): Likewise.
1582         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1583         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1584         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1585
1586         * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1587         warnings.
1588
1589 Mon Jan 29 14:27:24 1996  Kim Knuttila  <krk@cygnus.com>
1590
1591         * libcoff-in.h: aligned newly exported names with bfd naming 
1592         conventions. Removed an erroneous define of POWERPC_LE_PE.
1593         * libcoff.h: Rebuild.
1594         * cofflink.c, coff-ppc.c: the above function name changes
1595
1596 Mon Jan 29 13:06:28 1996  Ian Lance Taylor  <ian@cygnus.com>
1597
1598         From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1599         * ecoff.c (struct extsym_info): Define.
1600         (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1601         to ecoff_link_write_external.
1602         (ecoff_link_write_external): Accept a struct extsym_info pointer.
1603         Strip symbols when appropriate.
1604
1605         Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1606         * syms.c (BSF_OBJECT): Define.
1607         (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1608         * bfd-in2.h: Rebuild.
1609         * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1610         STT_OBJECT symbol.
1611         * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1612         is set.
1613
1614         * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1615         copying relocs into a shared object, treat a defined global symbol
1616         as a local symbol.
1617         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1618         * elf32-mips.c (mips_elf_relocate_section): Likewise.
1619         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1620
1621         * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1622         real defined symbol, not to a weak defined symbol.
1623
1624 Mon Jan 29 11:34:36 1996  Kim Knuttila  <krk@cygnus.com>
1625
1626         * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
1627         and made a few static functions externs.
1628
1629         * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
1630         POWERPC_LE_PE hack in cofflink.
1631
1632         * libcoff-in.h: promoted the following from cofflink.c to allow
1633         _bfd_coff_final_link to be overridden -  STRING_SIZE_SIZE,
1634         coff_debug_merge_element, struct coff_debug_merge_type, 
1635         coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
1636         coff_debug_merge_hash_table_init,  coff_debug_merge_hash_table_free,
1637         coff_debug_merge_hash_lookup, coff_link_section_info, 
1638         coff_final_link_info, coff_debug_merge_hash_newfunc,
1639         coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
1640
1641         * libcoff.h: re-gen'd
1642
1643 Fri Jan 26 18:33:35 1996  Ian Lance Taylor  <ian@cygnus.com>
1644
1645         * syms.c: Include "bfdlink.h".
1646         (struct stab_find_info): Define.
1647         (_bfd_stab_section_find_nearest_line): New function.
1648         * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
1649         * libbfd.h: Rebuild.
1650         * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
1651         * elf.c (_bfd_elf_find_nearest_line): Try calling
1652         _bfd_stab_section_find_nearest_line before searching the ELF
1653         symbol table.  Find the closest STT_FUNC symbol, not the last one.
1654         * libcoff-in.h (coff_data_type): Add line_info field.
1655         * libcoff.h: Rebuild.
1656         * coffgen.c (coff_find_nearest_line): Try calling
1657         _bfd_stab_section_find_nearest_line before searching the COFF
1658         symbol table.
1659         * Makefile.in: Rebuild dependencies.
1660
1661 Fri Jan 26 16:11:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1662
1663         * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
1664         4 bytes, so we get the correct value when updating the register
1665         field in little endian mode.
1666
1667 Thu Jan 25 12:14:16 1996  Ian Lance Taylor  <ian@cygnus.com>
1668
1669         * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
1670         entry_section fields.  Add sntoc and snentry fields.
1671         * libcoff.h: Rebuild.
1672         * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
1673         not toc_section and entry_section (the COFF file does not have any
1674         sections at this point).
1675         (coff_write_object_contents): Set o_snentry and o_sntoc from
1676         snentry and sntoc rather than entry_section and toc_section.
1677         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
1678         snentry, not toc_section and entry_section.
1679         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
1680         entry_section from hentry.
1681         (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
1682         set snenty.
1683         (xcoff_link_input_bfd): Set sntoc, not toc_section.
1684         (xcoff_write_global_symbol): Get toc_section from sntoc, rather
1685         than using toc_section directly.
1686
1687         * archures.c: Add missing `.' in enum bfd_architecture.
1688         * bfd-in2.h: Rebuild.
1689
1690         * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec.  From
1691         Robert Lipe <robertl@arnet.com>.
1692
1693 Thu Jan 25 12:08:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1694
1695         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
1696         to sections we allocate.  Use bfd_zalloc to allocate initialial
1697         sections, not bfd_alloc.
1698         (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
1699         SDA{,2}I16 relocations.
1700         (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
1701         whether to put something in .sbss or not.
1702         (ppc_elf_relocate_section): Add support for more relocations.  Add
1703         in sec->output_offset where appropriate.  Make error messages
1704         include the symbol name.
1705
1706         * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
1707         trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
1708         doesn't get redefined messages if -shared.
1709
1710         * elflink.h (elf_create_pointer_linker_section) Only bump RELA
1711         section if the rel_section field has been set up.
1712
1713 Wed Jan 24 20:40:26 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1714
1715         * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
1716         relocations.
1717
1718 Wed Jan 24 10:38:34 1996  Doug Evans  <dje@charmed.cygnus.com>
1719
1720         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
1721         of flags, only flags used are controlled by mach number.  Bump up
1722         output file mach number to highest of input file mach numbers.
1723         (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
1724         (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
1725
1726         * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
1727         bfd_elf64_sparc_vec support.
1728
1729 Tue Jan 23 14:33:05 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1730
1731         * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
1732         the embedded bit is set on some objects and not on others.  Just
1733         or it together.
1734         (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
1735         relocations.
1736
1737 Tue Jan 23 14:22:45 1996  Ian Lance Taylor  <ian@cygnus.com>
1738
1739         * coffcode.h (coff_new_section_hook): Don't try to align the
1740         .stabstr section.
1741
1742         * coffcode.h (coff_set_section_contents): Fix the handling of the
1743         .lib section to work even if the entire section contents are
1744         written at once.  From Gvran Uddeborg <gvran@uddeborg.pp.se> and
1745         Robert Lipe <robertl@arnet.com>.
1746
1747 Mon Jan 22 18:45:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1748
1749         * elflink.h (elf_finish_pointer_linker_section): Don't allocate
1750         memory here for contents.
1751
1752         * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
1753         _SDA2_BASE_ by 32768.
1754         (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
1755         started using.  Allocate contents for .sdata and .sdata2 sections
1756         also.
1757         (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
1758         rather than _name.
1759         (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
1760         size _SDA{,2}_BASE_.
1761         (ppc_elf_relocate_section): Change how sdata{,2} relocations are
1762         done.
1763
1764 Mon Jan 22 08:52:04 1996  Doug Evans  <dje@charmed.cygnus.com>
1765
1766         * elflink.h (elf_finish_pointer_linker_section): Fix typo.
1767
1768         * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
1769         (bfd_mach_sparc_{v8plus,v8plusa}): Define.
1770         (bfd_mach_sparc_v9a): Define.
1771         (bfd_mach_sparc_v9_p): Define.
1772         * bfd-in2.h: Regenerated.
1773         * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
1774         bfd_mach_sparc_v9.
1775         * elf64-sparc.c (sparc64_elf_object_p): Likewise.
1776         * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
1777         to bfd_elf32_sparc_vec.
1778         * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
1779         Add v8plus{,a} support.
1780         Add v9a support.
1781         (sparc_compatible): New function.
1782         * elf32-sparc.h: #include "elf/sparc.h".
1783         (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
1784         elf32_sparc_final_write_processing): New functions.
1785         (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
1786         elf_backend_final_write_processing): Define.
1787
1788 Mon Jan 22 11:21:51 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1789
1790         * elf-bfd.h (struct elf_link_hash_entry): Add
1791         linker_section_pointer field.
1792         (enum elf_linker_section_enum): Enumeration for new way of
1793         creating linker dynamic sections and symbols.
1794         (elf_linker_section{,_pointers}): New structures for creating
1795         dynamic sections and symbols.
1796         (elf_obj_tdata): Add linker_section_pointers and linker_section
1797         fields.
1798         (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
1799         (_bfd_elf_create_linker_section): New declarations.
1800         (_bfd_elf_find_pointer_linker_section): Ditto.
1801         (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
1802         (_bfd_elf_make_linker_section_rela): Ditto.
1803
1804         * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
1805
1806         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
1807         (ppc_elf_create_linker_section): New function to create the
1808         sections .got, .sdata, and .sdata2.
1809         (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
1810         needed.
1811         (ppc_elf_check_relocs): Support more of the eabi relocations.
1812         (ppc_elf_relocate_section): Ditto.
1813         (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
1814         if the .sdata{,2} + .sbss{,2} section size is > 32k.
1815
1816         * elflink.h (elf_create_pointer_linker_section): New function to
1817         create initialized pointers in dynamic linker sections.
1818         (elf_finish_pointer_linker_section): Actually intialize the
1819         pointers created above.
1820
1821         * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
1822         macros to provide both 32 and 64 bit versions of
1823         elf_create_pointer_linker_section.
1824         (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
1825         provide both 32 and 64 bit versions of
1826         elf_finish_pointer_linker_section.
1827
1828         * elflink.c (_bfd_elf_create_linker_section): New function to
1829         create a linker section.
1830         (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
1831         given address in the linker pointer offsets created for a given
1832         symbol.
1833         (_bfd_elf_make_linker_section_rela): Make a RELA section
1834         corresponding to the generated linker section.
1835
1836 Sat Jan 20 08:36:10 1996  Doug Evans  <dje@canuck.cygnus.com>
1837
1838         * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
1839
1840 Thu Jan 18 18:25:34 1996  Kim Knuttila  <krk@cygnus.com>
1841
1842         * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
1843         (coff_ppc_relocate_section): Handle special values for gcc built dlls.
1844         (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
1845         Also begin the toc at 4 as an eye catcher ('31313131' marks the first
1846         toc entry in an objdump) for now.
1847         (ppc_do_last, ppc_get_last): New function - needed to save processing 
1848         the toc owner to the end.
1849         (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the 
1850         toc owner last.
1851
1852         * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the 
1853         toc owner from being done till last. Must define POWERPC_LE_PC 
1854         to enable it.
1855
1856         * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
1857
1858         * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
1859         to INFO.
1860         (coff_swap_aouthdr_out): Removed a non-working hack for computing the
1861         SizeOfImage for PowerPC. Ignore the size of the .junk section.
1862
1863 Thu Jan 18 17:42:12 1996  Ian Lance Taylor  <ian@cygnus.com>
1864
1865         * elfcore.h: Include <signal.h> before <sys/procfs.h>.
1866
1867 Wed Jan 17 12:40:14 1996  Ian Lance Taylor  <ian@cygnus.com>
1868
1869         * cpu-powerpc.c (arch_info_struct): Change last entry to not point
1870         back to first.
1871         (bfd_powerpc_arch): Point at first entry in arch_info_struct.
1872
1873 Tue Jan 16 15:10:49 1996  Ian Lance Taylor  <ian@cygnus.com>
1874
1875         * elf.c (assign_file_positions_for_segments): Don't increment file
1876         offset for a segment which contains no loadable sections.
1877
1878 Mon Jan 15 17:46:27 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1879
1880         * reloc.c: Add new PowerPC relocations.
1881         * {bfd-in2,libbfd}.h: Regenerate.
1882
1883         * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
1884         (ppc_elf_reloc_type_lookup): Lookup new relocations.
1885
1886 Mon Jan 15 14:29:44 1996  Ian Lance Taylor  <ian@cygnus.com>
1887
1888         * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
1889         entries.
1890
1891         * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
1892         info->shared.
1893
1894         * coffgen.c (coff_find_nearest_line): Don't try to cache
1895         information in sections that are not owned by a BFD.  From Richard
1896         Henderson <richard@atheist.tamu.edu>.
1897
1898         * elf32-mips.c: Numerous changes to dynamic linking code, mostly
1899         from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1900         * elflink.h (elf_link_output_extsym): Remove special check for
1901         _rld_new_interface.
1902
1903         * ecoffswap.h: Add prototypes for static functions.
1904
1905 Sun Jan 14 21:36:08 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1906
1907         * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
1908         (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
1909         references.
1910         (ppc_elf_relocate_section):  No longer allow .sdata/.sbss sections
1911         to satisfy a TOC16 relocation.  Rewrite unsupported relocation
1912         support.  Begin support for R_PPC_SDA{2,}REL.
1913
1914 Sat Jan 13 09:36:52 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1915
1916         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
1917         create the .got and .got.neg sections.
1918         (ppc_elf_size_dynamic_sections): Call it.
1919         (ppc_elf_check_relocs): Call it.
1920         (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
1921         (ppc_elf_check_relocs): Add error messages for relocations we
1922         don't yet support.  Do not include R_PPC_SDAREL16 like a GOT
1923         relocation.
1924
1925 Fri Jan 12 15:27:59 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1926
1927         * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
1928         section flags for V.4 and eabi.
1929
1930 Fri Jan 12 13:59:16 1996  Ian Lance Taylor  <ian@cygnus.com>
1931
1932         * elf.c (assign_file_positions_for_segments): If a segment
1933         contains no sections, don't mark it as readable.
1934
1935         * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
1936         * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
1937
1938         * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
1939         dynamic section, if there is one.
1940         * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
1941         (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
1942         (bfd_elf64_swap_dyn_in): Likewise.
1943         * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
1944         PTR.
1945         (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1946
1947         * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
1948         DT_TEXTREL entry because of .rel.plt.  From Martin Pirker
1949         <pirker@eiunix.tuwien.ac.at>.
1950
1951 Thu Jan 11 17:06:14 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
1952
1953         * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
1954         PowerPC V.4 and eabi.
1955         * bfd-in2.h: Regenerate.
1956         * libfd.h: Regenerate.
1957
1958         * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
1959
1960         * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
1961         section type and SHF_EXCLUDE section flag, turning them into the
1962         appropriate bfd section flag.
1963
1964 Thu Jan 11 11:23:30 1996  Ian Lance Taylor  <ian@cygnus.com>
1965
1966         * xcofflink.c (xcoff_link_add_symbols): Create the special
1967         sections if we see a DYNAMIC object, in case that is the only
1968         XCOFF input object we see.
1969         
1970         * elf32-mips.c: Extensive changes for a start at dynamic linking
1971         support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1972
1973         * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
1974         (struct elf_backend_data): Remove
1975         elf_backend_create_program_headers field.  Add
1976         elf_backend_additional_program_headers and
1977         elf_backend_modify_segment_map fields.
1978         * elfxx-target.h (elf_backend_type_change_ok): Define if not
1979         defined.
1980         (elf_backend_additional_program_headers): Likewise.
1981         (elf_backend_modify_segment_map): Likewise.
1982         (elf_backend_create_program_headers): Don't define.
1983         (elfNN_bed): Change to account for field changes.
1984         * elf.c (assign_file_positions_for_segments): Call new
1985         modify_segment_map backend function.  Don't call old
1986         create_program_headers backend function.
1987         (get_program_header_size): Call additional_program_headers rather
1988         than create_program_headers.
1989         * elflink.h (elf_link_add_object_symbols): Initialize
1990         type_change_ok from new backend field.
1991         (elf_link_output_extsym): Don't warn if _rld_new_interface is
1992         defined.
1993         (elf_reloc_link_order): Treat a reloc against a defined symbol as
1994         a reloc against the appropriate section.
1995
1996         * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
1997         (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
1998         (elf_flags_init): Rename from elf_ppc_flags_init.
1999         * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
2000         elf_ppc_flags_init.
2001         (ppc_elf_copy_private_bfd_data): Likewise.
2002         (ppc_elf_merge_private_bfd_data): Likewise.
2003
2004         * elf32-m68k.c (howto_table): Change src_mask to 0 for all
2005         relocation entries.
2006
2007 Tue Jan  9 15:22:53 1996  David Mosberger-Tang  <davidm@azstarnet.com>
2008
2009         * coff-alpha.c (alpha_relocate_section): During final link, allow
2010         output .lita section to be bigger than 64k by adjusting gp value
2011         on a per-input section basis.
2012         * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
2013         field.
2014         (struct ecoff_section_tdata): Add gp field.
2015
2016 Tue Jan  9 12:00:36 1996  Ian Lance Taylor  <ian@cygnus.com>
2017
2018         Handle Alpha ECOFF changes in OSF/1 3.2.
2019         * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
2020         field.
2021         * coff-alpha.c: Include "aout/ar.h".
2022         (alpha_ecoff_get_relocated_section_contents): Don't require an
2023         ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
2024         3.2 doesn't generate one.
2025         (alpha_relocate_section): Likewise.
2026         (alpha_ecoff_slurp_armap): Define.
2027         (alpha_ecoff_slurp_extended_name_table): Define.
2028         (alpha_ecoff_construct_extended_name_table): Define.
2029         (alpha_ecoff_truncate_arname): Define.
2030         (alpha_ecoff_write_armap): Define.
2031         (alpha_ecoff_generic_stat_arch_elt): Define.
2032         (alpha_ecoff_update_armap_timestamp): Define.
2033         (ARFZMAG): Define.
2034         (alpha_ecoff_read_ar_hdr): New static function.
2035         (alpha_ecoff_get_elt_at_filepos): New static function.
2036         (alpha_ecoff_openr_next_archived_file): New static function.
2037         (alpha_ecoff_get_elt_at_index): New static function.
2038         (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
2039         (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
2040         _bfd_ecoff to alpha_ecoff.
2041         * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
2042         field from backend structure, rather than always calling
2043         _bfd_get_elt_at_filepos.
2044         * coff-mips.c (mips_ecoff_backend_data): Initialize
2045         get_elt_at_filepos field.
2046         * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
2047         from _bfd_generic_read_ar_hdr with minor changes.
2048         (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
2049         * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
2050         * libbfd.h: Rebuild.
2051
2052         * bfd-in.h (BFD_IN_MEMORY): Define.
2053         * libbfd-in.h (struct bfd_in_memory): Define.
2054         * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
2055         (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
2056         (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
2057         (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
2058         * bfd.c (struct _bfd): Change iostream field from char * to PTR.
2059         (bfd_get_size): Handle BFD_IN_MEMORY flag.
2060         * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
2061         (bfd_open_file): Cast to PTR, not char *, when setting iostream.
2062         (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
2063         * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
2064         iostream.
2065         (bfd_openstreamr): Likewise.
2066         * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
2067         BFD_IN_MEMORY is not set.
2068         * riscix.c (riscix_some_aout_object_p): Likewise.
2069         * bfd-in2.h, libbfd.h: Rebuild.
2070
2071         * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
2072         (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
2073         (bfd_get_elt_at_index): Define.
2074         * archive.c (_bfd_generic_get_elt_at_index): Rename from
2075         bfd_get_elt_at_index.  Change index parameter from int to
2076         symindex.
2077         * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
2078         (_bfd_noarchive_get_elt_at_index): Define.
2079         (_bfd_archive_bsd_get_elt_at_index): Define.
2080         (_bfd_archive_coff_get_elt_at_index): Define.
2081         * bfd-in2.h, libbfd.h: Rebuild.
2082         * aout-target.h (MY_get_elt_at_index): Define if not defined.
2083         * coff-rs6000.c (xcoff_get_elt_at_index): Define.
2084         * ieee.c (ieee_get_elt_at_index): Define.
2085         * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
2086         * oasys.c (oasys_get_elt_at_index): Define.
2087         * som.c (som_get_elt_at_index): Define.
2088
2089         * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2090         numbers to the .text section.
2091
2092 Mon Jan  8 17:00:57 1996  Ian Lance Taylor  <ian@cygnus.com>
2093
2094         * ieee.c (ieee_write_debug_part): Change return type to boolean.
2095         If there is a SEC_DEBUGGING section, get the contents of the debug
2096         information part from it.
2097         (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2098         section in memory.
2099         (ieee_write_object_contents): Check ieee_write_debug_part return.
2100
2101 Thu Jan  4 17:12:37 1996  Fred Fish  <fnf@cygnus.com>
2102
2103         * config.bfd (i[345]86-*-freebsd*): Add target.
2104         * configure.in (i386freebsd_vec): Add vec.
2105         * configure: Regenerate.
2106         * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2107         (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2108         Rebuild dependencies..
2109         * freebsd.h: New file.
2110         * i386freebsd.c: New file.
2111         * targets.c (i386freebsd_vec): Declare.
2112         (bfd_target_vector): Add i386freebsd_vec.
2113         * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2114         * i386netbsd.c (SEGMENT_SIZE):  Define as TARGET_PAGE_SIZE
2115         
2116 Thu Jan  4 16:27:46 1996  Ian Lance Taylor  <ian@cygnus.com>
2117
2118         * ieee.c (ieee_slurp_debug): New static function.
2119         (ieee_object_p): Call it.
2120         (ieee_slurp_section_data): Skip debugging sections.
2121         (ieee_get_reloc_upper_bound): Likewise.
2122         (ieee_get_section_contents): Likewise.
2123         (ieee_canonicalize_reloc): Likewise.
2124         (ieee_write_section_part): Likewise.
2125         (ieee_write_debug_part): Likewise.
2126         (ieee_write_data_part): Likewise.
2127         (init_for_output): Likewise.
2128
2129 Wed Jan  3 19:42:47 1996  Michael Meissner  <meissner@wogglebug.tiac.net>
2130
2131         * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2132         work.
2133         (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2134         relocs, since ppc_elf_relocate_section handles the linker case.
2135         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2136         used.
2137         (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2138         ppc_elf_relocate_section since that is now the only caller.
2139         (ppc_elf_relocate_section): Ditto.
2140
2141 Wed Jan  3 15:11:30 1996  Ian Lance Taylor  <ian@cygnus.com>
2142
2143         * coffcode.h (coff_write_object_contents): If we don't know the
2144         section of the entry point for an XCOFF executable, always set the
2145         entry address to -1.
2146
2147 Tue Jan  2 14:17:15 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
2148
2149         * elf.c (bfd_section_from_shdr): Add support for note sections.
2150
2151 Tue Jan  2 13:10:25 1996  Ian Lance Taylor  <ian@cygnus.com>
2152
2153         * bfd-in.h (struct _symbol_info): Add stab_type field.
2154         * bfd-in2.h: Rebuild.
2155         * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2156
2157         * elf32-ppc.c: Remove trailing newline from calls to
2158         _bfd_error_handler.
2159         (ppc_elf_merge_private_bfd_data): Only warn about endianness
2160         difference if target endianness is known.
2161
2162 Thu Dec 21 12:43:49 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
2163
2164         * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2165         old style TOC16 references without using R_PPC_GOT.
2166         (ppc_reloc_type): Ditto.
2167         (ppc_elf_reloc_type_lookup): Add support for TOC16.
2168         (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2169         (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2170         (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2171         (ppc_elf_check_relocs): New function for GOT/PLT support that is
2172         work in progress.
2173         (ppc_elf_adjust_dynamic_symbol): Ditto.
2174         (ppc_elf_adjust_dynindx): Ditto.
2175         (ppc_elf_size_dynamic_sections): Ditto.
2176         (ppc_elf_finish_dynamic_symbol): Ditto.
2177         (ppc_elf_finish_dynamic_sections): Ditto.
2178         (ELF_DYNAMIC_INTERPRETER): Define.
2179
2180 Wed Dec 20 19:14:18 1995  Ken Raeburn  <raeburn@cygnus.com>
2181
2182         * elf.c (copy_private_bfd_data): When attaching sections to
2183         segments ignore sections that won't be allocated.  Patch from
2184         Andreas Schwab.
2185
2186 Tue Dec 19 20:01:43 1995  Ken Raeburn  <raeburn@cygnus.com>
2187
2188         * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2189         anything else.
2190
2191 Tue Dec 19 16:38:59 1995  Ian Lance Taylor  <ian@cygnus.com>
2192
2193         * coff-i960.c (CALC_ADDEND): Define.
2194         (coff_i960_relocate_section): Add the input section VMA to the
2195         addend for PC relative relocs.
2196
2197 Sun Dec 17 20:11:55 1995  Kim Knuttila  <krk@cygnus.com>
2198
2199         * peicode.h (pe_print_pdata): Must test the entire entry for zero
2200         to correctly terminate.
2201
2202 Fri Dec 15 12:05:57 1995  Ian Lance Taylor  <ian@cygnus.com>
2203
2204         * targets.c (enum bfd_endian): Define.
2205         (bfd_target): Rename byteorder_big_p to byteorder, and change it
2206         from boolean to enum bfd_endian.  Change header_byteorder_big_p
2207         correspondingly.
2208         * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2209         (bfd_header_big_endian, bfd_header_little_endian): New macros.
2210         * bfd-in2.h: Rebuild.
2211         * All targets: Change initialization of byteorder and
2212         header_byteorder to use enum bfd_endian values rather than
2213         booleans.
2214         * All files: Change all references to byteorder_big_p and
2215         header_byteorder_big_p to use new bfd_*_endian macros.
2216
2217         * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2218         s_vaddr.
2219         * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2220         vma.
2221         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2222
2223 Fri Dec 15 07:32:09 1995  steve chamberlain  <sac@slash.cygnus.com>
2224
2225         * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2226
2227 Thu Dec 14 13:45:37 1995  Ian Lance Taylor  <ian@cygnus.com>
2228
2229         * ieee.c: Lots of minor cleanups.  Make many functions return
2230         errors rather than calling abort.  Also:
2231         (ieee_write_twobyte): Remove; change callers to call existing
2232         ieee_write_2bytes function.
2233         (ieee_write_expression): Don't output the section twice when
2234         outputting a local symbol.  Don't emit an extraneous zero if there
2235         is only one term.
2236         (ieee_slurp_sections): Set the lma as well as the vma.
2237         (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2238
2239         * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2240         a recognized one or bfd_arch_unknown.
2241         (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2242         to succeed.
2243         (ihex_get_symtab): Likewise.
2244
2245 Wed Dec 13 15:44:06 1995  Ian Lance Taylor  <ian@cygnus.com>
2246
2247         * aoutx.h: Include <ctype.h>.
2248         (struct aout_link_includes_table): Define.
2249         (struct aout_link_includes_totals): Define.
2250         (struct aout_link_includes_entry): Define.
2251         (aout_link_includes_lookup): Define macro.
2252         (struct aout_final_link_info): Add includes field.
2253         (aout_link_includes_newfunc): New static function.
2254         (NAME(aout,final_link)): Initialize includes hash table.
2255         (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2256
2257 Wed Dec 13 10:52:14 1995  Stan Shebs  <shebs@andros.cygnus.com>
2258
2259         * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2260
2261 Wed Dec 13 11:07:45 1995  Kim Knuttila  <krk@cygnus.com>
2262
2263         * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2264
2265 Tue Dec 12 17:42:06 1995  Kim Knuttila  <krk@cygnus.com>
2266
2267         * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2268         (pe_print_private_bfd_data): call pe_print_reloc.
2269         * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2270         * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2271         up some debugging as well.
2272
2273 Tue Dec 12 11:34:23 1995  Ian Lance Taylor  <ian@cygnus.com>
2274
2275         * config.bfd: Handle sparc-*-elf*.  From Ronald F. Guilmette
2276         <rfg@monkeys.com>.
2277
2278 Fri Dec  8 17:47:07 1995  Ian Lance Taylor  <ian@cygnus.com>
2279
2280         * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2281         when setting sections to NULL.
2282
2283 Wed Dec  6 17:05:37 1995  Ian Lance Taylor  <ian@cygnus.com>
2284
2285         * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2286         field.
2287         (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2288         (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2289         for all symbols.
2290         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2291         * bfd-in2.h: Rebuild.
2292
2293 Mon Dec  4 16:40:47 1995  Kim Knuttila  <krk@cygnus.com>
2294
2295         * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2296
2297 Mon Dec  4 11:25:39 1995  Ian Lance Taylor  <ian@cygnus.com>
2298
2299         * ihex.c (ihex_scan): Handle record types 4 and 5.
2300         (ihex_object_p): Permit types 4 and 5.
2301         (ihex_set_section_contents): Remove check for out of range
2302         addresses.
2303         (ihex_write_object_contents): Generate types 4 and 5.
2304
2305         * elflink.h (elf_link_output_extsym): Just ignore warning and
2306         indirect references to symbols which don't really exist.
2307
2308 Sun Dec  3 19:00:27 1995  Kim Knuttila  <krk@cygnus.com>
2309
2310         * peicode.h (pe_print_idata): Minor format fixes
2311         (pe_print_edata): New function. Under private printing, this formats
2312         the edata section of a PE file.
2313         (pe_print_private_bfd_data): Added call to pe_print_edata.
2314
2315 Sun Dec  3 16:46:54 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
2316
2317         * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2318         index, don't call stoi.
2319
2320 Fri Dec  1 14:46:51 1995  Ian Lance Taylor  <ian@cygnus.com>
2321
2322         * srec.c (srec_scan): Set lma as well as vma.
2323
2324         * ihex.c: New file; support for Intel Hex format.
2325         * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2326         (ihex_vec): Declare.
2327         (bfd_target_vector): Always include ihex_vec.
2328         * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2329         * Makefile.in: Rebuild dependencies.
2330         (BFD_LIBS): Add ihex.o
2331         (BFD_LIBS_CFILES): Add ihex.c.
2332         * bfd-in2.h: Rebuild.
2333
2334         * elf.c (assign_file_positions_for_segments): Sort the sections in
2335         each segment.
2336         (get_program_header_size): Return the right size if segment_map is
2337         not NULL.
2338         (copy_private_bfd_data): Don't bother to sort the sections.
2339
2340         * bfd.c (bfd_record_phdr): New function.
2341         * bfd-in.h (bfd_record_phdr): Declare.
2342         * bfd_in2.h: Rebuild.
2343
2344         * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2345         BFD_ASSERT.
2346
2347         * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2348         (bfd_zmalloc): Return PTR, not char *.  Take size_t, not
2349         bfd_size_type.
2350         * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2351         (bfd_zmalloc): Change declaration.
2352         * libbfd.h: Rebuild.
2353         * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2354         and realloc.  Don't set bfd_error_no_memory if they fail.
2355
2356 Thu Nov 30 19:32:26 1995  Kim Knuttila  <krk@cygnus.com>
2357
2358         * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2359         uses as well. Added a new howto to deal with TOCREL16 relocs that 
2360         are TOCDEFN as well.
2361         (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2362         to handle RVA relocs from dlltool.
2363         (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2364         (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2365         (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2366
2367         * coffcode.h (coff_set_alignment_hook): check idata$X sections 
2368         to get the right section alignment.
2369
2370 Thu Nov 30 16:48:18 1995  Ian Lance Taylor  <ian@cygnus.com>
2371
2372         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2373         p_paddr if p_paddr is zero.
2374         (make_mapping): Set includes_filehdr and includes_phdrs for first
2375         PT_LOAD segment.
2376         (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2377         segment.
2378         (assign_file_positions_for_segments): Handle includes_filehdr and
2379         includes_phdrs.  Remove special handling of PT_PHDR and first
2380         PT_LOAD segments.
2381         (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2382         when appropriate.  Remove special handling of PT_PHDR segment.
2383         Use a more complex condition for when a section is included in a
2384         segment to handle Solaris linker oddities.
2385
2386 Thu Nov 30 11:17:33 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
2387
2388         * coff-m88k.c (howto_table): Reformatted for easier reading;
2389         special_function now points to new function m88k_special_reloc.
2390         (howto_hvrt16): Function previously used for handling HVRT16 relocs
2391         removed.
2392         (rtype2howto): Do not add reloc's r_offset to the addend, this will
2393         be done correctly by m88k_special_reloc.
2394         (reloc_processing): New function to be used by RELOC_PROCESSING.
2395         (RELOC_PROCESSING): Define to call reloc_processing.
2396
2397 Wed Nov 29 12:42:36 1995  Ian Lance Taylor  <ian@cygnus.com>
2398
2399         * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2400         (pe_print_pdata): Likewise.
2401
2402         * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2403         obstack_alloc fails.
2404         (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2405         fails.
2406         * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2407         * Many files: don't set bfd_error_no_memory if one of the above
2408         routines fails.
2409
2410         * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2411         if p_paddr_valid is set.
2412         (copy_private_bfd_data): New static function.
2413         (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2414
2415         * elf.c (assign_file_positions_for_segments): Fix case where extra
2416         program headers were allocated.
2417
2418         * elf.c (_bfd_elf_print_private_bfd_data): New function.
2419         * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2420         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2421         _bfd_elf_print_private_bfd_data.
2422
2423         * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2424         r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2425         Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2426         (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2427         RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2428         (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2429         RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2430
2431 Tue Nov 28 16:59:50 1995  Ian Lance Taylor  <ian@cygnus.com>
2432
2433         * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2434         * elf.c (make_mapping): New static function.
2435         (map_sections_to_segments): New static function.
2436         (elf_sort_sections): New static function.
2437         (assign_file_positions_for_segments): New static function.
2438         (map_program_segments): Remove.
2439         (get_program_header_size): Remove sorted_hdrs, count, and
2440         maxpagesize parameters.  Simplify.
2441         (assign_file_positions_except_relocs): When generating an
2442         executable, use assign_file_positions_for_segments.
2443         (elf_sort_hdrs): Remove.
2444         (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2445         to get_program_header_size.
2446
2447 Mon Nov 27 12:27:46 1995  Ian Lance Taylor  <ian@cygnus.com>
2448
2449         * hp300hpux.c (MY(callback)): Set lma as well as vma.
2450
2451         * configure, config.in: Regenerate with autoconf 2.7.
2452
2453         * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2454         * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2455
2456 Wed Nov 22 12:02:09 1995  Ian Lance Taylor  <ian@cygnus.com>
2457
2458         * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2459         (ecoff_sec_to_styp_flags): Likewise.
2460         (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2461         (ecoff_set_symbol_info): Handle scRConst.
2462         (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2463         (ecoff_compute_section_file_positions): Handle .rconst section.
2464         (_bfd_ecoff_write_object_contents): Likewise.
2465         (ecoff_link_check_archive_element): Handle scRConst.
2466         (ecoff_link_add_externals): Likewise.
2467         (ecoff_link_write_external): Handle .rconst section.
2468         (ecoff_reloc_link_order): Likewise.
2469         * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2470         * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2471         section.
2472         (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2473
2474         * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2475         DEF_DYNAMIC flag is set.
2476
2477 Tue Nov 21 13:25:29 1995  Ken Raeburn  <raeburn@cygnus.com>
2478
2479         * host-aout.c: If TRAD_HEADER is defined, include it.
2480
2481 Tue Nov 21 13:03:57 1995  Ian Lance Taylor  <ian@cygnus.com>
2482
2483         * aclocal.m4 (AC_PROG_CC): Remove local definition.
2484         (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2485         (BFD_NEED_DECLARATION): New function.
2486         * configure.in: Use BFD_NEED_DECLARATION.
2487         * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2488         * configure, config.in: Rebuild with autoconf 2.6.
2489
2490         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2491         special_sections before returning when called with a non XCOFF
2492         BFD.
2493
2494         * coffgen.c (coff_renumber_symbols): Sort common symbols with
2495         global symbols.
2496
2497         * coffcode.h (coff_compute_section_file_positions): Only pad the
2498         previous section to force file alignment when creating an
2499         executable.
2500
2501 Mon Nov 20 14:54:09 1995  Ian Lance Taylor  <ian@cygnus.com>
2502
2503         * coffcode.h (coff_compute_section_file_positions): If
2504         RS6000COFF_C, set up the .debug section.
2505
2506         * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2507         if it is not large enough to accomodate the entire TOC area with
2508         signed 16 bit offsets.
2509         (xcoff_write_global_symbol): Handle negative TOC offsets in global
2510         linkage code.
2511         (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2512         TOC anchor to use the TOC value used in the output file.
2513
2514 Sat Nov 18 18:01:41 1995  Ian Lance Taylor  <ian@cygnus.com>
2515
2516         * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2517         (_bfd_coff_read_string_table): Likewise.
2518
2519 Sat Nov 18 19:43:04 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
2520
2521         * pe-arm.c: Fix typos.
2522         * coff-arm.c: Likewise.
2523
2524 Fri Nov 17 16:22:04 1995  Kim Knuttila  <krk@cygnus.com>
2525
2526         * coff-ppc.c (list_ele): Added "cat"egory member.
2527         (record_toc): New category parameter (priv or pub).
2528         (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2529         (ppc_process_before_allocation): Removed embrionic data-in-toc from
2530         the mainline. It addes extra toc cells in error.
2531         (ppc_coff_swap_sym_in_hook): Added some documentation.
2532         (dump_toc): Can now diagnose "virtual toc" chicanery.
2533
2534 Fri Nov 17 10:41:25 1995  Philippe De Muyter  <phdm@info.ucl.ac.be>
2535
2536         * elf-bfd.h (struct elf_link_hash_table): Change type of
2537         dynsymcount and bucketcount fields from size_t to bfd_size_type.
2538
2539 Fri Nov 17 10:02:58 1995  Ian Lance Taylor  <ian@cygnus.com>
2540
2541         * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2542         pointerize C_LEAFSTAT or C_LEAFEXT entries.
2543
2544         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2545         DT_INIT and DT_FINI entries if the _init or _fini symbol is
2546         defined or mentioned in a regular file.
2547
2548 Thu Nov 16 15:16:42 1995  Kim Knuttila  <krk@cygnus.com>
2549
2550         * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2551         (coff_ppc_relocate_section): Handle TOCDEFN attribute
2552         (coff_ppc_relocate_section): Correct REL24 handling
2553         (ppc_process_before_allocation): Correct TOCDEFN handling
2554
2555         * peicode.h (dir_names): Added name descriptions
2556
2557 Thu Nov 16 03:38:03 1995  Ken Raeburn  <raeburn@cygnus.com>
2558
2559         * VERSION: Updated to cygnus-2.6.
2560
2561 Wed Nov 15 19:30:07 1995  Ken Raeburn  <raeburn@cygnus.com>
2562
2563         * targets.c (m68k4knetbsd_vec): Declare.
2564
2565 Wed Nov 15 18:05:52 1995  Ian Lance Taylor  <ian@cygnus.com>
2566
2567         * targets.c (bfd_target): Change type of second argument to
2568         _bfd_print_private_bfd_data from void * to PTR.
2569         * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2570         using PTR rather than void *.
2571         * bfd-in2, libbfd.h: Rebuild.
2572         * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2573         to PTR.
2574         * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2575         _bfd_generic_bfd_print_private_bfd_data rather than casting
2576         bfd_true.
2577
2578 Wed Nov 15 04:09:14 1995  Ken Raeburn  <raeburn@cygnus.com>
2579
2580         * Makefile.in (.dep1): Fix stupid typo in last change.  Remove any
2581         "DO NOT DELETE" lines or blank lines that mkdep writes on some
2582         systems.
2583         (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2584         BFD64_BACKENDS_CFILES): New variables.
2585         (CFILES): Use them.
2586         
2587 Tue Nov 14 11:52:23 1995  Ian Lance Taylor  <ian@cygnus.com>
2588
2589         * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2590         not at the file position of the first section.
2591         * coffcode.h (coff_compute_section_file_positions): Avoid using
2592         unportable #elif.
2593         (coff_write_object_contents): When generating a PPC PE executable
2594         with no symbols, round up the file size to a COFF_PAGE_SIZE
2595         boundary.
2596         * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2597         don't write out a string table.
2598
2599         * elf.c (bfd_section_from_shdr): When using a different section
2600         header, pass the new one to _bfd_elf_make_section_from_shdr.
2601         (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2602         (elf_map_symbols): Add section VMA to symbol value when comparing
2603         against 0.
2604         (_bfd_elf_compute_section_file_positions): Only build symbol table
2605         if there are some symbols.  Set file offset of symtab and strtab
2606         sections.
2607         (assign_file_positions_except_relocs): Remove dosyms parameter.
2608         Change all callers.  Never set file offset of symtab and strtab
2609         sections.
2610         (_bfd_elf_copy_private_section_data): New function.
2611         (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2612         (_bfd_elf_copy_private_symbol_data): New function.
2613         (swap_out_syms): Check for special mapping of st_shndx created by
2614         copy_private_symbol_data.
2615         * elfxx-target.h: Use new copy routines.
2616         * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2617         (_bfd_elf_copy_private_section_data): Declare.
2618
2619         * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2620
2621         * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
2622         C_NT_WEAK.
2623
2624         * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
2625         _bfd_dummy_target, matching the recent change to archive
2626         recognition.
2627
2628 Mon Nov 13 13:24:38 1995  Ian Lance Taylor  <ian@cygnus.com>
2629
2630         * libbfd.c (bfd_get_file_window): Use casts to avoid doing
2631         arithmetic on PTR types.
2632
2633         * aout-target.h (MY(callback)): Set the lma of the sections.
2634
2635         * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
2636         symbol into a reloc against the section.
2637
2638 Mon Nov 13 07:31:35 1995  Kim Knuttila  <krk@cygnus.com>
2639
2640         * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
2641         glue for the relocs: IMGLUE and IFGLUE.
2642         (record_toc): new function - tracks toc contents
2643         (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
2644         (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
2645         (ppc_coff_rtype2howto): removed invalid IMGLUE hack
2646         (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
2647         (ppc_record_toc_entry): Removed a debug define (duh)
2648
2649         * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
2650         (pe_print_idata): New function - formats the idata section data
2651         (pe_print_pdata): New function - formats the pdata section data
2652         (pe_print_private_bfd_data): calls to above
2653
2654 Sun Nov 12 12:23:24 1995  Stan Shebs  <shebs@andros.cygnus.com>
2655
2656         * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
2657         * coff-rs6000.c (rs6000coff_vec): Add conditional defines
2658         TARGET_SYM and TARGET_NAME for vector and BFD name.
2659         * coff-pmac.c (pmac_xcoff_vec): Remove.
2660         (TARGET_SYM, TARGET_NAME): Define.
2661         * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
2662         machine to 0, not all PowerMacs are 601s.
2663
2664 Fri Nov 10 12:10:14 1995  Ian Lance Taylor  <ian@cygnus.com>
2665
2666         * elfcode.h (elf_object_p): Read in any program headers.
2667         * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
2668         based on the program headers, if any.
2669         (elf_fake_sections): Set sh_addr from the vma, not the lma.
2670         (map_program_segments): Set p_paddr of program headers based on
2671         the lma.
2672
2673 Thu Nov  9 13:01:31 1995  Ian Lance Taylor  <ian@cygnus.com>
2674
2675         * archive.c (bfd_generic_archive_p): Preserve tdata in case of
2676         failure.
2677
2678         * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
2679         trying to do a relocateable link with a non-a.out object file.
2680
2681         * archive.c (bfd_generic_archive_p): Check the first object file
2682         in an archive even if target_defaulted is set.  If the object file
2683         has the wrong xvec, reject it.
2684
2685         * aoutx.h (NAME(aout,set_section_contents)): If a section can not
2686         be represented, report the name via _bfd_error_handler.
2687         (translate_to_native_sym_flags): Likewise.
2688         * elf32-mips.c (mips_elf_final_link): Likewise.
2689         * oasys.c (oasys_write_sections): Likewise.
2690
2691         * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
2692         which checks for STYP_OVRFLO sections.
2693         (coff_compute_section_file_positions): If RS6000COFF_C, handle
2694         reloc and lineno count overflows.
2695         (coff_write_object_contents): Call coff_count_linenumbers before
2696         coff_compute_section_file_positions.  If RS6000COFF_C, handle
2697         reloc and lineno count overflows.
2698         * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
2699         relocs before dealing with .pad sections.  Count overflow section
2700         headers when handling .pad sections.
2701
2702         * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
2703         if RS6000COFF_C.
2704
2705         * xcofflink.c (XCOFF_DESCRIPTOR): Define.
2706         (struct xcoff_link_hash_table): Add descriptor_section and
2707         special_sections fields.
2708         (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
2709         (xcoff_link_add_symbols): Set linkage section alignment.  Create
2710         descriptor section.  Check for magic symbol names (_text, etc.),
2711         and record them in special_sections if found.  Set
2712         XCOFF_DESCRIPTOR flag for a function descriptor, and set its
2713         descriptor field to point back to the function code symbol.
2714         (xcoff_sweep): Always mark the special descriptor_section.
2715         (bfd_xcoff_export_symbol): Check whether the symbol might be a
2716         function descriptor, and mark it if it is.
2717         (bfd_xcoff_size_dynamic_sections): Add new special_sections
2718         parameter, and fill it in.  Allocate space for the descriptor
2719         section.
2720         (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
2721         global linkage code.  If an undefined function descriptor is
2722         exported, arrange to define it.  Warn about any other undefined
2723         exported symbol.
2724         (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
2725         (xcoff_write_global_symbol): Create a function descriptor when
2726         necessary.
2727         * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2728         * bfd-in2.h: Rebuild.
2729
2730 Thu Nov  9 08:40:23 1995  Kim Knuttila  <krk@cygnus.com>
2731
2732         * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
2733         (ppc_coff_link_hash_table): new types for hashing
2734         (ppc_coff_link_hash_newfunc): hash entry constructor
2735         (ppc_coff_link_hash_table_init): hash table initializer
2736         (ppc_coff_link_hash_table_create): hash table constructor
2737         (ppc_record_toc_entry): changed references to hash table
2738         (coff_ppc_relocate_section): changed references to hash table
2739
2740         * libcoff-in.h (coff_link_hash_entry): removed toc_offset
2741         * libcoff.h: Rebuild
2742
2743         * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
2744         (coff_link_add_symbols): removed toc_offset init
2745
2746 Thu Nov  9 04:00:38 1995  Ken Raeburn  <raeburn@cygnus.com>
2747
2748         * Makefile.in (.dep1): Make sure the file mkdep is to write exists
2749         first.
2750
2751         * configure.in: Added new option --with[out]-mmap.  Set USE_MMAP
2752         if it is given and mmep is available.
2753         * acconfig.h: Undef USE_MMAP.
2754         * configure, config.in: Regenerated.
2755         * aoutx.h: If USE_MMAP is not defined, do all symbol and string
2756         table handling the old way.
2757         (aout_get_external_symbols): Don't complain if last byte of string
2758         table is nonzero.
2759         * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
2760         (bfd_free_window) [! USE_MMAP]: Don't define.
2761         (bfd_get_file_window,
2762         _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
2763
2764 Wed Nov  8 20:03:44 1995  Eric Freudenthal <freudenthal@nyu.edu>
2765
2766         * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
2767         0xffff0000.
2768
2769 Wed Nov  8 11:31:11 1995  Ian Lance Taylor  <ian@cygnus.com>
2770
2771         * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
2772         compatible with AMD generated COFF files.  Try to support both AMD
2773         and GNU formats simultaneously.
2774         (coff_a29k_relocate_section): Likewise.
2775
2776         * libbfd.c (bfd_get_file_window): Change writable parameter from
2777         int to boolean; update all callers.  Pass MAP_SHARED if not
2778         writable--it's required on Solaris.  Cast fprintf argument to
2779         avoid warning.
2780         * bfd-in.h (bfd_get_file_window): Update declaration.
2781         * bfd-in2.h: Rebuild.
2782         * aoutx.h: Update calls to bfd_get_file_window.
2783
2784         * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
2785         Change all uses.
2786         (xcoff_swap_ldhdr_in): New static function.
2787         (xcoff_swap_ldsym_in): New static function.
2788         (xcoff_find_reloc): Handle the case of a single reloc correctly.
2789         (xcoff_link_add_symbols): If we just created a descriptor, pass it
2790         to _bfd_generic_link_add_one_symbol, to save a hash lookup.
2791         Handle XTY_ER/XMC_XO symbols correctly.
2792         (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
2793         rather than normal symbol table.
2794         (bfd_xcoff_import_symbol): It's not an error if the symbol is
2795         already defined with the same absolute value.
2796         (xcoff_mark): When considering called symbols, check whether the
2797         descriptor is from a dynamic object, rather than the symbol
2798         itself.
2799         (xcoff_build_ldsyms): Likewise.
2800
2801         * libbfd.c (bfd_get_file_window): Change return type to boolean.
2802         Cast realloc and malloc return values.  If malloc or realloc fail,
2803         set bfd_error_no_memory.
2804         * bfd-in.h (bfd_get_file_window): Change type to boolean.
2805         * bfd-in2.h: Rebuild.
2806
2807 Tue Nov  7 11:53:48 1995  Kim Knuttila  <krk@cygnus.com>
2808
2809         * coff-ppc.c (ppc_record_toc_entry): new function.
2810         (in_reloc_p): changed return value.
2811         (coff_ppc_relocate_section): much rework.
2812         (ppc_allocate_toc_section): new function.
2813         (ppc_process_before_allocation): new function.
2814         (ppc_coff_swap_sym_in_hook): new function.
2815
2816         * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
2817         (coff_link_add_symbols): initialize toc_offset.
2818
2819         * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
2820         (coff_swap_aouthdr_out): Added more sections to the data
2821         dictionary for the pe file header. Also changed linker version
2822         number on the ppc side.
2823         (dir_names): small improvements to the dictionary printing.
2824         (pe_mkobject_hook): save the file level flags.
2825
2826         * libcoff-in.h (coff_link_hash_entry): added toc_offset field
2827         (pe_tdata): added real_flags field
2828         (coff_tdata): added local_toc_sym_map and access macro
2829
2830         * libcoff.h (coff_link_hash_entry): added toc_offset field
2831         (pe_tdata): added real_flags field
2832         (coff_tdata): added local_toc_sym_map and access macro
2833
2834         * coffcode.h (coff_set_alignment_hook): added hook for PE.
2835         (coff_mkobject): init for local_toc_sym_map
2836         (coff_write_object_contents): set the internal_a.magic to
2837         IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
2838         ppc compilers use.
2839
2840 Tue Nov  7 13:48:58 1995  Ian Lance Taylor  <ian@cygnus.com>
2841
2842         * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
2843         entries until both the line number address and the function name
2844         address are too large.
2845
2846         * configure.in: Call AC_CHECK_PROG to find and cache AR.
2847         * configure: Rebuilt.
2848
2849         * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
2850         is defined in the environment.
2851
2852 Tue Nov  7 10:57:24 1995  Jeffrey A Law  (law@cygnus.com)
2853
2854         * som.c (som_get_section_contents_in_window): Define to use
2855         generic version.
2856
2857 Mon Nov  6 17:13:15 1995  Harry Dolan  <dolan@ssd.intel.com>
2858
2859         * coff-i860.c: New file, based on coff-i386.c.
2860         * cpu-i860.c: New file, based on cpu-i386.c.
2861         * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
2862         * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
2863         targets, using i860coff_vec.
2864         * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
2865         trad-core.o and hosts/i860mach3.h.
2866         (i860coff_vec): Use coff-i860.o and cofflink.o.
2867         * configure: Rebuild.
2868         * Makefile.in: Rebuild dependencies.
2869         (ALL_MACHINES): Add cpu-i860.o.
2870         (BFD32_BACKENDS): Add coff-i860.o.
2871         (CFILES): Add cpu-i860.c and coff-i860.c.
2872         * targets.c (i860coff_vec): Declare.
2873         (bfd_target_vector): Add &i860coff_vec. 
2874         * archures.c (bfd_i860_arch): Declare.
2875         (bfd_archures_list): Add &bfd_i860_arch.
2876         * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
2877         (coff_set_flags): Handle bfd_arch_i860.
2878         (coff_write_object_contents): Handle I860 a.out magic number.
2879
2880 Mon Nov  6 14:34:07 1995  Ian Lance Taylor  <ian@cygnus.com>
2881
2882         * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
2883         the created .tc section to 2.
2884         (xcoff_mark): Don't keep a .loader reloc for a call to an
2885         undefined symbol when creating a shared library.
2886         (xcoff_build_ldsyms): When creating a shared library, generate
2887         global linkage code for a call to an undefined symbol.
2888
2889 Sun Nov  5 21:44:13 1995  Ken Raeburn  <raeburn@cygnus.com>
2890
2891         * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
2892         BFD32_BACKENDS, BFD64_BACKENDS.
2893         (.dep1): Put mkdep output in a separate file.
2894         Rebuilt dependencies.
2895
2896         * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
2897         value.
2898
2899         Permit use of mmap when available:
2900
2901         * configure.in: Check for mmap, madvise, mprotect.
2902         * config.in, configure: Regenerated.
2903
2904         * libbfd.c (struct _bfd_window_internal): Define type.
2905         (bfd_init_window, bfd_free_window, bfd_get_file_window): New
2906         functions.
2907         (ok_to_map): New static variable for debugging.
2908         (_bfd_generic_get_section_contents_in_window): New function.
2909         * bfd-in.h (bfd_window_internal): Declare type.
2910         (bfd_window): Define type.
2911         (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
2912         * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
2913         Declare.
2914
2915         * libaout.h (struct aoutdata): Add two window fields.
2916         (obj_aout_sym_window, obj_aout_string_window): New macros.
2917         * aoutx.h (some_aout_object_p): Initialize windows.
2918         (aout_get_external_symbols): Get symbol data and strings in
2919         windows instead of explicitly allocated buffers.
2920         (slurp_symbol_table): Free window instead of memory.
2921         (bfd_free_cached_info): Release windows instead of freeing storage
2922         directly.
2923         (aout_link_free_symbols): Ditto.
2924
2925         * targets.c (bfd_target): Add new field for
2926         get_section_contents_in_window.
2927         (BFD_JUMP_TABLE_GENERIC): Updated.
2928         * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
2929         coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
2930         libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
2931         macros for get_section_contents_in_window field.
2932
2933 Sat Nov  4 12:23:26 1995  Fred Fish  <fnf@cygnus.com>
2934
2935         * core.c: Renamed to corefile.c
2936         * makefile.dos (OBJS): Change core.o to corefile.o
2937         * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
2938         
2939 start-sanitize-gm
2940 Sat Nov  4 10:16:54 1995  Stu Grossman  (grossman@cygnus.com)
2941
2942         * config.bfd (mips*-*-magic*):  Add bfd_elf32_bigmips_vec to
2943         targ_selvecs to allow debugging under Irix-5 native.
2944
2945 end-sanitize-gm
2946 Fri Nov  3 15:54:59 1995  Ian Lance Taylor  <ian@cygnus.com>
2947
2948         * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
2949         to o.  Clobber and restore the list of new csects around the call
2950         to _bfd_generic_link_add_one_symbol, in case it wants to report a
2951         linker error and the linker wants to read the symbol table.  Reset
2952         the line number count of a real section even if it has no relocs.
2953         (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
2954
2955         * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
2956         is too small.
2957
2958 Thu Nov  2 23:16:39 1995  Ian Lance Taylor  <ian@cygnus.com>
2959
2960         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
2961         an undefined symbol in a shared link.
2962
2963         * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
2964         oldtype from bfd_link_order_type to bfd_link_hash_type.  From
2965         phdm@info.ucl.ac.be (Philippe De Muyter).
2966
2967 Wed Nov  1 14:26:02 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  <manfred@lts.sel.alcatel.de>
2968
2969         * coff-m88k.c (rtype2howto): New static function.
2970         (RTYPE2HOWTO): Use it rather than a macro definition.
2971
2972         * coffcode.h (coff_write_object_contents): set internal_a.magic
2973         to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
2974
2975         * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
2976         define TRAD_HEADER to new file hosts/delta68.h.
2977         m88*-motorola-sysv*, however, does use ptrace-core.o.
2978         * hosts/delta68.h: New file.
2979
2980         * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
2981         bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
2982
2983 Wed Nov  1 13:51:54 1995  Ken Raeburn  <raeburn@cygnus.com>
2984
2985         * i386linux.c (MY(vec)): Declare before use.
2986
2987 Wed Nov  1 11:45:07 1995  Ian Lance Taylor  <ian@cygnus.com>
2988
2989         * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
2990         Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
2991
2992         * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2993         BFD is not of the right type.
2994         (bfd_elf_get_needed_list): Likewise.
2995         * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2996         * sunos.c (bfd_sunos_get_needed_list): Likewise.
2997         * xcofflink.c (XCOFF_XVECP): Define.
2998         (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
2999         of the right type.
3000         (bfd_xcoff_import_symbol): Likewise.
3001         (bfd_xcoff_export_symbol): Likewise.
3002         (bfd_xcoff_link_count_reloc): Likewise.
3003         (bfd_xcoff_record_link_assignment): Likewise.
3004         (bfd_xcoff_size_dynamic_sections): Likewise.
3005
3006         * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
3007         table index against the number of symbols for a base relative
3008         reloc.
3009
3010         * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
3011         static function.
3012         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
3013         full_aouthdr flag here...
3014         (_bfd_xcoff_bfd_final_link): ...not here.
3015
3016 Tue Oct 31 12:52:02 1995  Fred Fish  <fnf@cygnus.com>
3017
3018         * libelf.h:  Rename to elf-bfd.h to avoid conflict with
3019         systems that have a system <libelf.h>.
3020         * Makefile.in: Globally replace libelf.h with elf-bfd.h.
3021         * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
3022         elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
3023         elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
3024         elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
3025         elfxx-target.h: Include elf-bfd.h rather than libelf.h.
3026         * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
3027
3028 Tue Oct 31 15:30:07 1995  David Mosberger-Tang  <davidm@azstarnet.com>
3029
3030         * ecoff.c (ecoff_set_symbol_info): Add new parameter weak.  If
3031         set, set BSF_WEAK in symbol.  Change all callers.
3032         (ecoff_get_extr): Set weakext based on BSF_WEAK.
3033         (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
3034         _bfd_generic_link_add_one_symbol.
3035         (ecoff_indirect_link_order): Check that the section tdata relocs
3036         are not NULL before using them.
3037
3038         * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
3039         define TRAD_HEADER as hosts/alphalinux.h.
3040         * configure: Rebuild.
3041         * hosts/alphalinux.h: New file.
3042         * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
3043         not int.
3044
3045 Tue Oct 31 12:34:11 1995  Ian Lance Taylor  <ian@cygnus.com>
3046
3047         * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
3048         C_ECOMM storage classes.
3049
3050         * xcofflink.c (xcoff_mark_symbol): New static function, broken out
3051         of xcoff_mark.
3052         (xcoff_mark): Call xcoff_mark_symbol.
3053         (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
3054         (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
3055         doing it by hand.
3056         (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
3057
3058 Mon Oct 30 14:53:48 1995  Ian Lance Taylor  <ian@cygnus.com>
3059
3060         * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
3061         field.
3062         (xcoff_find_reloc): New static function.
3063         (xcoff_link_add_symbols): Use it.
3064         (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
3065         (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL.  Don't
3066         relocate the value of C_DECL.
3067
3068         * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
3069
3070 Sat Oct 28 01:25:34 1995  steve chamberlain  <sac@slash.cygnus.com>
3071
3072         * cofflink.c (_bfd_coff_generic_relocate_section): Make
3073         callback decide what goes in .relocs.
3074         * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
3075         * peicode.h (pe_mkobject_hook): Only copy aouthdr if
3076         there is one.
3077
3078 Sat Oct 28 01:51:02 1995  Ian Lance Taylor  <ian@cygnus.com>
3079
3080         * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
3081         absolute section.
3082
3083 Fri Oct 27 18:14:39 1995  Ian Lance Taylor  <ian@cygnus.com>
3084
3085         * xcofflink.c: More improvements, mostly to fix handling of
3086         constructors and a few other special cases.
3087         * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3088         zero, reverting yesterday's change.
3089         * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3090         (bfd_xcoff_link_count_reloc): Declare.
3091         (bfd_xcoff_record_link_assignment): Declare.
3092         * bfd-in2.h: Rebuild.
3093
3094 Fri Oct 27 14:42:15 1995  Niklas Hallqvist  <niklas@appli.se>
3095
3096         * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
3097         aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3098         i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3099         i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3100         ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3101         Change PAGE_SIZE to TARGET_PAGE_SIZE.
3102
3103         * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3104         format.
3105
3106         * netbsd.h: Double ditto (incl. m68k4k support).  NetBSD's text
3107         segments includes the a.out header.  See to that the magic number
3108         *always* is big-endian.
3109
3110         * config.bfd: Add m68*-hp*-netbsd* case.  Cross-pollinate m68k and
3111         m68k4k NetBSD configurations.
3112
3113         * configure.in, configure: Separate i386 & mips NetBSD
3114         configurations from other BSD ones.  Don't assume DEC is the only
3115         thing NetBSD/mips run on.  Add {m68k,ns32k,sparc}-*-netbsd*
3116         configurations.  Add support for m68k4k NetBSD object format.
3117
3118         * libaout.h: Added M_68K4K_NETBSD magic.
3119
3120         * m68k4knetbsd.c: New file.
3121         
3122         * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3123
3124         * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3125         <machine/endian.h>.
3126
3127         * hosts/mipsnbsd.h: New file.
3128         
3129 start-sanitize-gm
3130 Fri Oct 27 09:41:51 1995  Stu Grossman  (grossman@cygnus.com)
3131
3132         * config.bfd:  Add config stuff for mips*-*-magic* to set
3133         targ_defvec to ecoff_big_vec.
3134
3135 end-sanitize-gm
3136 Thu Oct 26 14:16:47 1995  Ian Lance Taylor  <ian@cygnus.com>
3137
3138         * xcofflink.c: Numerous changes to get closer to a working XCOFF
3139         linker.
3140         * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3141         toc_section, and entry_section fields.
3142         (struct xcoff_section_tdata): Remove ldrel_count field.
3143         * libcoff.h: Rebuild.
3144         * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3145         fields.
3146         (coff_compute_section_file_positions): If RS6000COFF_C, generate
3147         full a.out header if full_aouthdr is set in xcoff_data.
3148         (coff_write_object_contents): Likewise.  Set o_snentry and o_sntoc
3149         based on sections stored in xcoff_data.
3150         * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3151         fields.
3152         (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3153         (rs6000coff_vec): Set symbol_leading_char to '.'.
3154         * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3155         value stored in ret rather than returning a pointer value.
3156         
3157 Wed Oct 25 23:10:39 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3158
3159         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3160         format for now.
3161
3162 Wed Oct 25 16:19:27 1995  Jeffrey A Law  (law@cygnus.com)
3163
3164         * som.c (som_slurp_string_table): Allocate the strings with malloc
3165         since they're free'd by free_cached_info.
3166         (som_slurp_symbol_table): Similarly for the symbol table.
3167
3168 Wed Oct 25 14:59:22 1995  Per Bothner  <bothner@kalessin.cygnus.com>
3169
3170         * Makefile.in (diststuff):  Don't make headers.
3171
3172 Wed Oct 25 11:32:54 1995  Ian Lance Taylor  <ian@cygnus.com>
3173
3174         * Makefile.in: Rebuild dependencies.
3175
3176         * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3177         output_bfd is not SunOS.
3178         (bfd_sunos_size_dynamic_sections): Likewise.  Don't scan relocs of
3179         non-SunOS input files.
3180
3181         * xcofflink.c: Extensive changes to support linking shared objects
3182         and generating a .loader section.
3183         * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3184         (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3185         last_symndx, and ldrel_count fields.
3186         * libcoff.h: Rebuild.
3187         * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3188         * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3189         is set.
3190         * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3191         (bfd_xcoff_export_symbol): Declare.
3192         (bfd_xcoff_size_dynamic_sections): Declare.
3193         * bfd-in2.h: Rebuild.
3194
3195 Tue Oct 24 17:44:20 1995  Stan Shebs  <shebs@andros.cygnus.com>
3196
3197         * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3198         * configure: Rebuild.
3199         * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3200         * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3201         contents.
3202         (pmac_xcoff_vec): Update to use new xcoff support.
3203         * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3204         (xcoff_write_armap): Declare buf as unsigned char.
3205         * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3206
3207         * mpw-make.sed: Generalize subdir_do edit.
3208         
3209 Tue Oct 24 10:25:01 1995  Jeffrey A Law  (law@cygnus.com)
3210
3211         * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3212         correctly.  Don't initialize asect->vma.
3213
3214 Fri Oct 20 13:23:48 1995  Ken Raeburn  <raeburn@cygnus.com>
3215
3216         * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3217         something a little less than the page size.
3218
3219 Thu Oct 19 13:06:09 1995  Ian Lance Taylor  <ian@cygnus.com>
3220
3221         * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3222
3223 Wed Oct 18 16:20:08 1995  steve chamberlain  <sac@slash.cygnus.com>
3224
3225         * coff-i386.c (coff_i386_reloc_type_lookup): New.
3226         * coffcode.h (coff_write_object_contents): If .bss is before
3227         .data us that as data_start.
3228         * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3229         calc correct.
3230         * peicode.h (add_data_entry): Use _cooked_size of data directory.
3231         (coff_swap_outhdr_out): Hardwire in version number.
3232         
3233 Wed Oct 18 16:50:54 1995  Ken Raeburn  <raeburn@cygnus.com>
3234
3235         * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3236         major and minor to *_vno, since the former are also macros in
3237         SunOS header files.  Cast result of bfd_alloc to appropriate
3238         type.
3239
3240         * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3241         before assigning to sec_data.
3242
3243 Wed Oct 18 13:25:17 1995  Ian Lance Taylor  <ian@cygnus.com>
3244
3245         * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3246         now relative to the section, not absolute.
3247         * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3248         get the file name when there is a N_SO directory name.  When
3249         handling stabs, remember that section->vma was added to the
3250         offset.
3251
3252 Tue Oct 17 18:24:54 1995  Ian Lance Taylor  <ian@cygnus.com>
3253
3254         * sunos.c (struct sunos_link_hash_table): Add needed field.
3255         (sunos_link_hash_table_create): Call bfd_release, not free.
3256         (sunos_link_hash_table_create): Initialize needed field.
3257         (sunos_add_dynamic_symbols): Record needed objects.
3258         (bfd_sunos_get_needed_list): New function.
3259         * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3260         * bfd-in2.h: Rebuild.
3261
3262 Mon Oct 16 14:43:59 1995  steve chamberlain  <sac@slash.cygnus.com>
3263
3264         * libcoff-in.h (pe_data_type.in_reloc_p): New.
3265
3266 Mon Oct 16 10:52:50 1995  Ian Lance Taylor  <ian@cygnus.com>
3267
3268         * bfd-in.h (struct bfd_link_needed_list): Rename from
3269         bfd_elf_link_needed_list.
3270         * bfd-in2.h: Rebuild.
3271         * elf.c, elflink.h, libelf.h: Corresponding changes.
3272
3273         Add start at AIX linker support; no shared libraries yet.
3274         * xcofflink.c: New file.
3275         * configure.in (rs600coff_vec): Use xcofflink.o.
3276         * configure: Rebuild.
3277         * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3278         fields.
3279         (struct xcoff_section_tdata): Define.
3280         (xcoff_section_data): Define macro.
3281         (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3282         (_bfd_xcoff_bfd_link_add_symbols): Declare.
3283         (_bfd_xcoff_bfd_final_link): Declare.
3284         (_bfd_ppc_xcoff_relocate_section): Declare.
3285         * libcoff.h: Rebuild.
3286         * coff-rs6000.c: Clean up a bit.
3287         (xcoff_mkobject): Default modtype to 1L, not RE.  Initialize
3288         cputype, csects, and debug_indices.
3289         (xcoff_copy_private_bfd_data): Copy cputype.
3290         (xcoff_howto_table): Rename from rs6000coff_howto_table.
3291         (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3292         (xcoff_reloc_type_lookup): Rename from
3293         rs6000coff_reloc_type_lookup.
3294         (coff_relocate_section): Define.
3295         (_bfd_xcoff_sizeof_headers): Define.
3296         (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3297         (_bfd_xcoff_bfd_relax_section): Define.
3298         (_bfd_xcoff_bfd_link_split_section): Define.
3299         (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3300         coff.
3301         * coffcode.h (coff_compute_section_file_positions): If AIX,
3302         increment sofar by SMALL_AOUTSZ if not executable.
3303         (coff_write_object_contents): If AIX, always output an a.out
3304         header; if not executable, header size of SMALL_AOUTSZ.
3305         * hash.c (struct bfd_strtab_hash): Add xcoff field.
3306         (_bfd_stringtab_init): Initialize xcoff field.
3307         (_bfd_xcoff_stringtab_init): New function.
3308         (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3309         (_bfd_stringtab_emit): In XCOFF mode, write out length.
3310         * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3311         * libbfd.h: Rebuild.
3312         * Makefile.in: Rebuild dependencies.
3313         (BFD32_BACKENDS): Add xcofflink.o.
3314         (CFILES): Add xcofflink.c.
3315
3316         * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3317         SEC_NO_FLAGS, for .acommon section.  From Peter Schauer
3318         <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3319
3320 Sat Oct 14 21:36:02 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3321
3322         * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3323
3324 Fri Oct 13 17:48:43 1995  Ken Raeburn  <raeburn@cygnus.com>
3325
3326         * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3327         * config.in: Regenerated.
3328
3329         * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3330         (_bfd_chunksize): New variable.
3331         (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3332         for obstack chunk size.
3333         * configure.in: Check for getpagesize.
3334         * configure: Regenerated.
3335
3336         Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3337
3338         * trad-core.c (rawptr): Make it a local variable of
3339         ptrace_unix_core_file_p.
3340
3341 Fri Oct 13 11:22:01 1995  steve chamberlain  <sac@slash.cygnus.com>
3342
3343         * coff-arm.c (in_reloc_p): New.
3344         * coff-i386.c (in_reloc_p): New.
3345         * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3346         (coff_write_object_contents): Only set has_reloc_section
3347         if PE_IMAGE.
3348         * cofflink.c (_bfd_coff_generic_relocate_section): Call
3349         in_reloc_p to decide if reloc should be emitted.
3350         * libcoff.h (pe_data_type.in_reloc_p): New.
3351         * peicode.h (pe_mkobject): Initialize in_reloc_p.
3352
3353 Wed Oct 11 00:49:29 1995  Ian Lance Taylor  <ian@cygnus.com>
3354
3355         * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3356         (_bfd_coff_read_internal_relocs): Likewise.
3357         * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3358         (_bfd_coff_read_internal_relocs): Likewise.
3359
3360         * elflink.h (elf_link_add_object_symbols): Correct conditions
3361         under which type and size change warnings are issued.
3362
3363 Tue Oct 10 18:32:46 1995  Ian Lance Taylor  <ian@cygnus.com>
3364
3365         * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3366         a symbol which is not in a real section.
3367         (coff_write_native_symbol): Corresponding change.
3368
3369         * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3370         coff_link_hash_newfunc and make non-static.
3371         (_bfd_coff_link_hash_table_init): New function, broken out of
3372         _bfd_coff_link_hash_table_create.
3373         (_bfd_coff_link_hash_table_create): Use it.
3374         (process_embedded_commands): Make static.
3375         * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3376         (_bfd_coff_link_hash_table_init): Declare.
3377         * libcoff.h: Rebuild.
3378
3379         * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3380         field in XCOFF tdata.
3381         (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3382         U802ROMAGIC, for clarity.  Try to set arch and machine correctly
3383         based on cputype stored in a.out header, or in n_type of initial
3384         .file symbol.
3385         (coff_write_object_contents): Set cputype correctly in a.out
3386         header.
3387         (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3388         warnings.
3389         * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3390         (coff_swap_aouthdr_out): Swap out cputype field.  Don't clear
3391         old resv1 field.
3392         * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3393         * libcoff.h: Rebuild.
3394
3395         * cpu-rs6000.c (rs6000_compatible): New static function.
3396         (bfd_rs6000_arch): Use it.
3397         * cpu-powerpc.c (powerpc_compatible): New static function.
3398         (arch_info_struct): Define various flavours of PowerPC.
3399         (bfd_powerpc_arch): Use powerpc_compatible.  Point at
3400         arch_info_struct.
3401
3402 Tue Oct 10 10:50:46 1995  Fred Fish  <fnf@cygnus.com>
3403
3404         * Makefile.in (FLAGS_TO_PASS):  Remove BISON.
3405
3406 Tue Oct 10 01:28:29 1995  Ian Lance Taylor  <ian@cygnus.com>
3407
3408         * elflink.h (elf_link_add_object_symbols): Don't warn about
3409         changing the size or type if the old definition was weak.
3410
3411 Mon Oct  9 11:24:08 1995  Ian Lance Taylor  <ian@cygnus.com>
3412
3413         * coffcode.h (combined_entry_type): Add fix_line field.
3414         (coff_slurp_line_table): Warn if we try to set the lineno field of
3415         a symbol twice.
3416         (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3417         C_EINCL by setting fix_line.  Fix C_BSTAT symbol value.
3418         * coffgen.c (coff_mangle_symbols): Handle fix_line.
3419         (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3420         absolute section.
3421         (coff_print_symbol): Print fix_value symbols in a useful fashion.
3422         * libcoff.h: Rebuild.
3423
3424         * libcoff-in.h (struct xcoff_tdata): Define.
3425         (xcoff_data): Define.
3426         * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3427         * bfd-in2.h, libcoff.h: Rebuild.
3428         * coff-rs6000.c (xcoff_mkobject): New static function.
3429         (coff_mkobject): Define.
3430         (xcoff_copy_private_bfd_data): New static function.
3431         (coff_bfd_copy_private_bfd_data): Define.
3432         (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3433         signed to bitfield.
3434         (rs6000coff_vec): Add DYNAMIC to object_flags.
3435         * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3436         .loader sections specially.
3437         (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3438         section alignment from the XCOFF tdata information.
3439         (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3440         F_SHROBJ, and copy the extra a.out header information into the
3441         XCOFF tdata structure.
3442         (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3443         F_DYNLOAD and the extra a.out header information.
3444         (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3445         C_HIDEXT symbol with attached csect information.
3446         * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3447         in the o_maxdata field.
3448         (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3449         * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3450         end if BSF_NOT_AT_END is set.
3451
3452         * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3453         _bfd_read_ar_hdr_fn.
3454         * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3455         * bfd-in2.h, libbfd.h: Rebuild.
3456         * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3457         return value.
3458         (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3459         (bfd_slurp_bsd_armap_f2): Likewise.
3460         (_bfd_slurp_extended_name_table): Likewise.
3461
3462 Fri Oct  6 16:18:35 1995  Ken Raeburn  <raeburn@cygnus.com>
3463
3464         Mon Sep 25 22:49:32 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3465
3466         * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3467         when the symbol table is empty.
3468
3469         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3470         space for section symbols, since we don't output them either.
3471         (elf_m68k_adjust_dynindx): Removed.
3472
3473         * ptrace-core.c (rawptr): Make it a local variable of
3474         ptrace_unix_core_file_p.
3475
3476 Fri Oct  6 12:24:47 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3477
3478         * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3479         NULL.
3480
3481         * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3482         Mac object file formats.
3483
3484 Fri Oct  6 12:04:02 1995  Ian Lance Taylor  <ian@cygnus.com>
3485
3486         * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3487         auxent if there isn't one.
3488         (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3489         rather than FILNMLEN as the maximum name length.
3490
3491         * coffcode.h (bfd_coff_backend_data): Add new field
3492         _bfd_coff_print_aux.
3493         (bfd_coff_print_aux): New static function.
3494         (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3495         scnlen field of an XTY_LD csect aux entry.
3496         (coff_print_aux): New static function.
3497         (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3498         in coff_pointerize_aux_hook.
3499         (bfd_coff_std_swap_table): Initialize new field.
3500         * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3501         * libcoff.h: Rebuild.
3502         * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3503         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3504
3505         * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3506         if there are symbols, for native AIX ld compatibility.
3507
3508         * coffcode.h (bfd_coff_backend_data): Add new field
3509         _bfd_coff_pointerize_aux_hook.
3510         (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3511         or I960, and as 0 otherwise.
3512         (bfd_coff_std_swap_table): Initialize new field.
3513         * libcoff.h: Rebuild.
3514         * coffgen.c (coff_pointerize_aux): Change parameters  to take
3515         symbol pointer instead of type and class, and to take aux index.
3516         Call _bfd_coff_pointerize_aux_hook if it is defined.
3517         (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3518         * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3519         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3520
3521         * coff-rs6000.c: Add full support for AIX archives.  Rewrite old
3522         read-only/host-only support.
3523
3524         * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3525         BSF_LOCAL.
3526         (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3527         RS6000COFF_C.
3528
3529         * targets.c (bfd_target): Add _bfd_read_ar_hdr field.  Modify
3530         BFD_JUMP_TABLE_ARCHIVE accordingly.
3531         * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3532         (_bfd_compute_and_write_armap): Declare.
3533         (_bfd_generic_read_ar_hdr): Declare.
3534         (_bfd_read_ar_hdr): Define.
3535         (_bfd_noarchive_read_ar_hdr): Define.
3536         (_bfd_archive_bsd_read_ar_hdr): Define.
3537         (_bfd_archive_coff_read_ar_hdr): Define.
3538         * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3539         _bfd_read_ar_hdr instead.
3540         (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3541         (_bfd_compute_and_write_armap): Rename from
3542         compute_and_write_armap.  Make non-static.  Change all callers.
3543         * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3544         than _bfd_snarf_ar_hdr.
3545         * aout-target.h (MY_read_ar_hdr): Define if not defined.
3546         * ieee.c (ieee_read_ar_hdr): Define.
3547         * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3548         * oasys.c (oasys_read_ar_hdr): Define.
3549         * som.c (som_read_ar_hdr): Define.
3550         * bfd-in2.h, libbfd.h: Rebuild.
3551
3552 Thu Oct  5 14:04:07 1995  steve chamberlain  <sac@slash.cygnus.com>
3553
3554         * peicode.c (coff_swap_filehdr_in): If symptr is
3555         zero, there aren't any symbols, even if nsyms is set.
3556
3557 Thu Oct  5 11:45:02 1995  Ian Lance Taylor  <ian@cygnus.com>
3558
3559         * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3560         field.
3561         * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3562         sections, and set styp correctly for them: .got, .hash, .dynamic,
3563         .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3564         (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3565         types.
3566         (ecoff_sort_hdrs): New static function.
3567         (ecoff_compute_section_file_positions): Return boolean, not void.
3568         Sort the sections by VMA before looking through them.  Put the
3569         first non SEC_ALLOC section on a new page.  Put every SEC_ALLOC
3570         section on an appropriate boundary within the page.
3571         (ecoff_compute_reloc_file_positions): Check return value of
3572         ecoff_compute_section_file_positions.
3573         (_bfd_ecoff_set_section_contents): Likewise.
3574         (_bfd_ecoff_write_object_contents): Check for various Alpha
3575         section types when incrementing text_size and data_size.  Call
3576         adjust_headers backend function if it exists.
3577         * coff-alpha.c (alpha_adjust_headers): New static function.
3578         (alpha_ecoff_backend_data): Initialize adjust_headers field.
3579         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3580
3581         * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3582
3583 Wed Oct  4 18:15:02 1995  Jeff Law  (law@hurl.cygnus.com)
3584
3585         * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3586         of ALTERNATE_AIX_CORE_FORMAT.
3587         * configure.in (aix4): No longer need CORE_FLAGS.
3588         * configure: Updated.
3589
3590 Wed Oct  4 15:36:36 1995  Ken Raeburn  <raeburn@cygnus.com>
3591
3592         NS32k changes from Ian Dall:
3593         * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3594         macros.
3595         (aout_link_input_section_std, aout_link_input_section_ext,
3596         aout_link_reloc_link_order): Call them instead of _bfd_*
3597         versions.
3598         * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3599         to zero.
3600         (backend_data): Use it instead of hardcoded zero.
3601
3602         * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3603         (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3604
3605         * ns32knetbsd.c: Include bfd.h.
3606         (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3607         (MY_bfd_reloc_type_lookup): Declare function too.
3608         * pc532-mach.c (set_sizes): Don't declare.
3609         (MY_text_includes_header, MY_exec_header_not_counted): Define.
3610         (backend_data, MY_backend_data): Don't define.
3611
3612         * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3613         ns32k-*-lites* like ns32k-*-netbsd*.
3614
3615         * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3616         compile on lites.
3617
3618 Wed Oct  4 14:15:52 1995  Ian Lance Taylor  <ian@cygnus.com>
3619
3620         * coffcode.h (coff_write_object_contents): Restore setting
3621         f_timdat to 0, deleted on August 22.
3622
3623 Tue Oct  3 16:28:32 1995  steve chamberlain  <sac@slash.cygnus.com>
3624
3625         * coffcode.h (coff_bfd_copy_private_symbol_data,
3626         coff_bfd_copy_private_section_data,
3627         coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
3628         * peicode.h (coff_bfd_copy_private_bfd_data): New
3629         (pe_bfd_copy_private_bfd_data): New.
3630         (coff_swap_scnhdr_in): Swap bss size into the right place.
3631         (pe_print_private_bfd_data): Add some newlines.
3632
3633 Tue Oct  3 11:53:04 1995  Jeff Law  (law@hurl.cygnus.com)
3634
3635         * som.c (setup_sections): Don't die if a space has no subspaces.
3636
3637 Mon Oct  2 14:08:55 1995  Ian Lance Taylor  <ian@cygnus.com>
3638
3639         * elflink.h (elf_link_add_object_symbols): Don't let a weak
3640         dynamic symbol override a common symbol.  Don't change the size or
3641         type if they have been set and the new symbol is not a definition.
3642         Warn if the size or type changes.
3643
3644 Sun Oct  1 01:34:41 1995  Jeff Law  (law@hurl.cygnus.com)
3645
3646         * som.c (som_begin_writing): Don't write the symbol table or
3647         symbol  strings.
3648         (som_finish_writing): Write them here.  Place them after the
3649         subspace data, but before the relocs.
3650
3651 Fri Sep 29 11:01:55 1995  Ian Lance Taylor  <ian@cygnus.com>
3652
3653         * sunos.c (sunos_add_one_symbol): Just pass false, not
3654         info->shared_library, to sunos_create_dynamic_sections.
3655         (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
3656         section.
3657         (sunos_check_dynamic_reloc): Remove .text section assertion.
3658
3659 Thu Sep 28 18:48:47 1995  Stan Shebs  <shebs@andros.cygnus.com>
3660
3661         * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
3662         * configure, configure.in: Add pmac_xcoff_vec case.
3663         * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
3664         * coff-pmac.c: New file, PowerMac XCOFF support.
3665         * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
3666         * targets.c (pmac_xcoff_vec): Declare.
3667
3668         * mpw-config.in: Various changes to be compatible with the
3669         autoconf-based configury.
3670         * mpw-make.sed: New file, sed commands to translate Unix
3671         makefile into MPW syntax.
3672         * mpw-make.in: Remove.
3673         * hosts/mpw.h: Remove.
3674         * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
3675         true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
3676
3677 Thu Sep 28 17:06:23 1995  steve chamberlain  <sac@slash.cygnus.com>
3678
3679         * binary.c (binary_get_symtab): Return an empty string on error.
3680         * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
3681
3682 Thu Sep 28 15:30:44 1995  Kim Knuttila  <krk@nellie>
3683
3684         * coff-ppc.c: Reformatted according to gnu conventions
3685                       Removed irrelevant "if 0" code
3686
3687 Thu Sep 28 11:19:53 1995  Ian Lance Taylor  <ian@cygnus.com>
3688
3689         * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
3690         symbols rather than as indirect symbols.
3691         (MY(slurp_symbol_table)): Don't do anything special about
3692         secondary symbols.
3693
3694         * coffcode.h (coff_new_section_hook): Make sure that the alignment
3695         of .ctors and .dtors sections is no larger than 2.
3696
3697         * sunos.c (sunos_add_one_symbol): Don't change
3698         bfd_link_hash_common to bfd_link_hash_new, since it may be on the
3699         undef list.
3700         (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
3701         dynamic symbols when creating a shared library.
3702         (sunos_scan_ext_relocs): Handle relocs correctly when creating a
3703         shared library.
3704         (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
3705         written even if it is not defined in a regular object.
3706         (sunos_write_dynamic_symbol): Use plt_offset for the address of
3707         the jump table reloc.  Add an assertion.  Use RELOC_JMP_SLOT
3708         rather than the constant 22.
3709         (sunos_check_dynamic_reloc): Handle creating a shared library.
3710         (sunos_finish_dynamic_link): Set the first entry in the GOT to
3711         zero when creating a shared library.
3712         * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
3713         write it out at the start of the symbol table.
3714
3715         * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
3716
3717 Thu Sep 28 00:58:05 1995  Doug Evans  <dje@deneb.cygnus.com>
3718
3719         * config.bfd: Add arm-*-coff.
3720         * configure.in, configure: Add armcoff_{little,big}_vec.
3721         * targets.c (armcoff_{little,big}_vec): Declare.
3722         (bfd_target_vector): Add armcoff_{little,big}_vec.
3723         * coff-arm.c (armcoff_{little,big}_vec): Always define.
3724
3725 Wed Sep 27 10:37:14 1995  Ian Lance Taylor  <ian@cygnus.com>
3726
3727         * targets.c (bfd_find_target): Remove debugging code.
3728
3729 Wed Sep 27 07:23:39 1995  Kim Knuttila  <krk@nellie>
3730
3731         * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE 
3732         support on powerpc.
3733         * Makefile.in: added *-ppc files
3734         * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
3735         allow pe based .o's to be shared with other tools on ppc/NT
3736         * config.bfd: added powerpc[le]-[pe|winnt] config support
3737         * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec 
3738         * peicode.h: Added more section flags for PE on ppc
3739                      Added coff_swap_filehdr_out to allow peicode.h to be
3740                      used for non-image PE files on ppc.
3741                      Check for image, or not, before copying pe_opthdr
3742         * targets.c: Added new bfd's
3743         * targets.c: Removed two inactive bfds that shouldn't have made it this
3744                      far.
3745
3746 Tue Sep 26 14:06:41 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3747
3748         * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
3749         explicit values to initialize all relocs.  Change all users.
3750         (ppc_elf_brtaken_inner): New function to handle branch predicition
3751         relocs.
3752         (ppc_elf_brtaken_reloc): Ditto.
3753         (ppc_elf_howto_raw): Use new functions.  Make sure all unsupported
3754         relocs use ppc_elf_unsupported_reloc.
3755         (ppc_elf_merge_private_bfd_data): Keep track of whether an error
3756         needs to be reported.
3757         (ppc_elf_relocate_section): Support branch prediction relocs.
3758
3759 Tue Sep 26 12:48:05 1995  Ian Lance Taylor  <ian@cygnus.com>
3760
3761         * bfd.c (bfd_assert): Remove \n from string passed to
3762         _bfd_error_handler.
3763
3764         * coff-i386.c: (TWO_DATA_SECS): Don't define.
3765         * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
3766         (bfd_coff_make_section_hook): Don't define.
3767         (coff_make_section_hook): Remove.
3768         (sec_to_styp_flags): Remove TWO_DATA_SECS case.
3769         (styp_to_sec_flags): Likewise.
3770         (coff_write_object_contents): Likewise.
3771         (bfd_coff_std_swap_table): Don't initialize make_section_hook
3772         field.
3773         * libcoff.h: Rebuild.
3774         * coffgen.c (make_a_section_from_file): Just call
3775         bfd_make_section_anyway, not bfd_make_section or
3776         bfd_coff_make_section_hook.
3777         * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
3778         * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
3779         * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
3780         make_section_hook field.
3781         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3782
3783         * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
3784         pointers into value field for warning and indirect symbols; just
3785         leave the value field alone.
3786         * linker.c (generic_link_add_symbol_list): Use next symbol for
3787         warning and indirect symbols, rather than looking in symbol value.
3788         * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
3789         parameter.  Change all callers.  Remove support for indirect
3790         symbols; it didn't work anyhow.
3791         (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
3792         * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
3793         * bfd-in2.h: Rebuild.
3794
3795 Mon Sep 25 16:04:09 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3796
3797         * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
3798         go back to telling the tools this reloc operates on 32 bits.
3799
3800 Mon Sep 25 11:48:02 1995  Ian Lance Taylor  <ian@cygnus.com>
3801
3802         * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
3803         rather than a direct fprintf.
3804         * archive.c (_bfd_write_archive_contents): Likewise.
3805         * coffcode.h (coff_slurp_symbol_table): Likewise.
3806         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
3807         (ppc_elf_unsupported_reloc): Likewise.
3808         (ppc_elf_relocate_section): Likewise.
3809         * i386linux.c (linux_tally_symbols): Likewise.
3810         (linux_finish_dynamic_link): Likewise.
3811         * osf-core.c (osf_core_core_file_p): Likewise.
3812         * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
3813         * som.c (som_sizeof_headers): Likewise.
3814         * srec.c (srec_bad_byte): Likewise.
3815         * bfd.c (bfd_assert): Likewise.  Also change file to be const.
3816         * libbfd-in.h (bfd_assert): Declare first parameter const.
3817         * libbfd.h: Rebuild.
3818         * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
3819         bfd_reloc_overflow is enough.
3820         * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
3821         * coff-h8500.c (rtype2howto): Likewise.
3822         * coff-z8k.c (rtype2howto): Likewise.
3823         * coffcode.h (dummy_reloc16_extra_cases): Likewise.
3824         * elf.c (_bfd_elf_get_lineno): Likewise.
3825         (_bfd_elf_no_info_to_howto): Likewise.
3826         (_bfd_elf_no_info_to_howto_rel): Likewise.
3827         * hp300hpux.c (convert_sym_type): Likewise.
3828         (MY(swap_std_reloc_in)): Likewise.
3829         * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
3830
3831         * libaout.h (struct aoutdata): Add line_buf field.
3832         * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
3833         and filename_buffer.  Instead, use a malloc buffer stored in the
3834         new line_buf field.  Remove length restrictions.
3835
3836         * coffgen.c (string_size): Remove static variable.
3837         (debug_string_size, debug_string_section): Likewise.
3838         (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
3839         and debug_string_size_p parameters.  Use them instead of the
3840         global variables.  Change all callers.
3841         (coff_write_symbol): Likewise.
3842         (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
3843         (coff_write_symbols): Add local variables to replace removed
3844         global variables.
3845
3846         * libcoff-in.h (struct coff_section_tdata): Add offset, i,
3847         function, and line_base fields.
3848         * libcoff.h: Rebuild.
3849         * coffgen.c (coff_find_nearest_line): Use section tdata to cache
3850         information, rather than using static variables.
3851
3852         * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
3853         file.  From Peter DeWolf <pld@amt.tay1.dec.com>.
3854
3855         * init.c (initialized): Remove static variable.
3856         (bfd_init): Don't bother setting initialized.
3857         (bfd_check_init): Remove.
3858         * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
3859         * libbfd.h: Rebuild.
3860
3861 Sat Sep 23 01:22:23 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
3862
3863         * rs6000-core.c (rs6000coff_core_p):  Don't check the core file
3864         size for full core dumps. Copy core file header to private data.
3865         (rs6000coff_core_file_failing_command,
3866         rs6000coff_core_file_failing_signal):  New functions to extract
3867         the file name and terminating signal from the core file.
3868         * coff-rs6000.c:  Use them.
3869
3870 Fri Sep 22 17:44:47 1995  Ian Lance Taylor  <ian@cygnus.com>
3871
3872         Change arch info to be const, initialized at compile time.
3873         * archures.c: Reindent many functions.  Change CONST to const.
3874         (bfd_arch_info_type): Make arch_name const.  Remove disassemble;
3875         nothing set it anyhow.  Make next const.
3876         (bfd_arch_info_list): Remove.
3877         (bfd_archures_list): Rename from archures_init_table.  Change from
3878         a table of function pointers to a table of bfd_arch_info_type
3879         structure addresses.
3880         (bfd_scan_arch): Rewrite accordingly.  Return a const pointer.
3881         (bfd_lookup_arch): Likewise.
3882         (bfd_set_arch_info): Rewrite accordingly.  Change argument to be a
3883         const pointer.
3884         (bfd_default_arch_struct): Make const.
3885         (bfd_arch_init, bfd_arch_linkin): Remove.
3886         (bfd_get_arch_info): Return a const pointer.
3887         * init.c (bfd_init): Don't call bfd_arch_init.
3888         * bfd.c (struct _bfd): Make arch_info const.
3889         * bfd-in2.h: Rebuild.
3890         * libbfd.h: Rebuild.
3891         * configure.in: Put & before everything in $selarchs.
3892         * configure: Rebuild.
3893         * cpu-*.c: Change bfd_*_arch from a function which calls
3894         bfd_arch_linkin to a const structure.
3895         * ieee.c (ieee_object_p): Make arch const.
3896
3897 Fri Sep 22 16:23:18 1995  Michael Meissner  <meissner@tiktok.cygnus.com>
3898
3899         * reloc.c (bfd_reloc_code_type): Add relocations to support all of
3900         PowerPC V.4.
3901         * bfd-in2.h: Regenerate.
3902         * libbfd.h: Regenerate.
3903
3904         * elf32-ppc.c (reloc_type): Update names to match current draft.
3905         (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
3906         relative.  Update names to current V.4 draft.
3907         (ppc_elf_reloc_type_lookup): Add support for more relocations.
3908         (ppc_elf_relocate_section): Rename relocations to match draft.
3909
3910 Thu Sep 21 21:53:18 1995  Michael Meissner  <meissner@cygnus.com>
3911
3912         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
3913         compiled with -mrelocatable-lib to be linked with either normal
3914         modules or -mrelocatable modules.
3915
3916 Wed Sep 20 12:03:26 1995  Ian Lance Taylor  <ian@cygnus.com>
3917
3918         * coffcode.h (coff_write_object_contents): Clear the vstamp field
3919         in the a.out header.
3920
3921         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
3922         a reloc against a local symbol, even if it's not a section.
3923
3924 Tue Sep 19 17:02:26 1995  Ian Lance Taylor  <ian@cygnus.com>
3925
3926         * targets.c (bfd_target): Remove unused align_power_min field.
3927         * bfd-in2.h: Rebuild.
3928         * All backends: Remove initialization of align_power_min.
3929
3930 Tue Sep 19 14:02:21 1995  steve chamberlain  <sac@slash.cygnus.com>
3931
3932         * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
3933
3934 Mon Sep 18 14:35:01 1995  Arne H. Juul  <arnej@pvv.unit.no>
3935
3936         * config.bfd (mips-dec-netbsd*): New target.
3937         * configure.host (mips-dec-netbsd*): New host.
3938         * configure.in (mips-dec-netbsd*): New native.
3939         * configure: Rebuild.
3940
3941 Fri Sep 15 10:24:36 1995  Ian Lance Taylor  <ian@cygnus.com>
3942
3943         Make the COFF backend linker merge common types:
3944         * cofflink.c (struct coff_debug_merge_element): Define.
3945         (struct coff_debug_merge_type): Define.
3946         (struct coff_debug_merge_hash_entry): Define.
3947         (struct coff_debug_merge_hash_table): Define.
3948         (coff_debug_merge_hash_table_init): Define.
3949         (coff_debug_merge_hash_table_free): Define.
3950         (coff_debug_merge_hash_lookup): Define.
3951         (struct coff_final_link_info): Add debug_merge field.
3952         (coff_debug_merge_hash_newfunc): New static function.
3953         (_bfd_coff_final_link): Allocate and free debug_merge table.
3954         (coff_link_input_bfd): Merge identical enum, struct and union
3955         types.
3956
3957 Thu Sep 14 14:53:58 1995  Ian Lance Taylor  <ian@cygnus.com>
3958
3959         Convert i960 COFF to use COFF backend linker.
3960         * coff-i960.c (coff_i960_relocate): Use a coff_section_data
3961         structure to store the symbol being used.
3962         (coff_i960_start_final_link): New static function.
3963         (coff_i960_relocate_section): New static function.
3964         (coff_i960_adjust_symndx): New static function.
3965         (coff_start_final_link): Define.
3966         (coff_relocate_section): Define.
3967         (coff_adjust_symndx): Define.
3968         * coffcode.h (bfd_coff_backend_data): Add new callback function
3969         _bfd_coff_start_final_link.
3970         (bfd_coff_start_final_link): Define.
3971         (coff_start_final_link): Define if not defined.
3972         (bfd_coff_std_swap_table): Add coff_start_final_link.
3973         * cofflink.c (_bfd_coff_internal_syment_name): Make globally
3974         visible.
3975         (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
3976         function callback is not NULL.
3977         * libcoff-in.h (struct coff_section_tdata): Add tdata field.
3978         (_bfd_coff_internal_syment_name): Declare.
3979         * libcoff.h: Rebuild.
3980         * configure.in (icoff_big_vec): Add cofflink.o.
3981         (icoff_little_vec): Likewise.
3982         * configure: Rebuild.
3983
3984 Wed Sep 13 17:38:23 1995  Fred Fish  <fnf@rtl.cygnus.com>
3985
3986         * Makefile.in (clean-info): Remove extraneous tab from line
3987         following action.
3988
3989 Wed Sep 13 13:27:53 1995  Ian Lance Taylor  <ian@cygnus.com>
3990
3991         * cofflink.c (coff_link_input_bfd): Fail if a section with no
3992         contents has relocs.
3993
3994 Thu Sep 12 12:45:34 1995  steve chamberlain  <sac@slash.cygnus.com>
3995
3996         * coffcode.h (coff_compute_section_file_positions): Keep the
3997         raw size safe. 
3998         (coff_write_object_contents): Remember if it's a relocatable
3999         file.
4000         * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
4001         * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
4002         if relocatable file. Swap out saved raw size.
4003
4004 Tue Sep 12 12:14:33 1995  Ian Lance Taylor  <ian@cygnus.com>
4005
4006         * Makefile.in (do_maintainer_clean): Rename from do_realclean.
4007         (maintainer-clean): Rename from realclean, passing
4008         maintainer-clean down to subdirectories, but leave realclean as a
4009         synonym.
4010
4011         * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
4012         warning callback.
4013
4014         * dep-in.sed: Remove config.h from generated dependencies.
4015
4016         * sunos.c (sunos_slurp_dynamic_symtab): New static function,
4017         broken out of sunos_canonicalize_dynamic_symtab.
4018         (sunos_canonicalize_dynamic_symtab): Call new function
4019         sunos_slurp_dynamic_symtab.
4020         (sunos_add_dynamic_symbols): Add three new parameters.  Return the
4021         dynamic symbol table to the caller.
4022         * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
4023         callback to override the symbols being read.
4024         * libaout.h (struct aout_backend_data): Add three new parameters
4025         to add_dynamic_symbols callback.
4026
4027         Extensive minor changes to avoid various gcc warnings.  Also:
4028         * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
4029         * archures.c (bfd_arch_info_type): Change mach field from long to
4030         unsigned long.
4031         (bfd_lookup_arch): Change machine parameter from long to unsigned
4032         long.
4033
4034 Mon Sep 11 10:55:47 1995  Ian Lance Taylor  <ian@cygnus.com>
4035
4036         * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
4037         a symbol with a non-zero plt_offset.
4038
4039 Fri Sep  8 11:47:24 1995  Ian Lance Taylor  <ian@cygnus.com>
4040
4041         * elfcode.h (align_file_position): Remove; not used.
4042
4043         * configure.in: Only check for <sys/procfs.h> on a native system,
4044         and make sure it defines prstatus_t.
4045         * configure: Rebuild.
4046
4047 Thu Sep  7 12:48:01 1995  Ian Lance Taylor  <ian@cygnus.com>
4048
4049         * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
4050
4051         * config.in: Rename from config.h.in.
4052         * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
4053         Check for config.h:config.in when creating stamp-h.
4054         * configure: Rebuild.
4055         * Makefile.in (stamp-h): Depend upon config.in rather than
4056         config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
4057         calling config.status.
4058
4059         * Makefile.in (do_distclean): Remove config.h and stamp-h.
4060         (Makefile): Just rebuild Makefile.
4061         (config.h, stamp-h): New targets.
4062         * configure.in: Create stamp-h when rebuilding config.h.
4063         * configure: Rebuild.
4064
4065 Wed Sep  6 15:00:33 1995  Ian Lance Taylor  <ian@cygnus.com>
4066
4067         * configure.in: Call AC_CONFIG_HEADER.  Substitute
4068         HOST_64BIT_LONG.  Check that various header files exist.  Check
4069         that fcntl exists.  Call BFD_BINARY_FOPEN.  Check whether malloc
4070         and/or free need to be declared.  Don't make a link to sysdep.h.
4071         Define TRAD_HEADER for various hosts.
4072         * configure: Rebuild.
4073         * configure.host: Don't set my_host.  Add definitions taken from
4074         host header files for various entries.  Remove entries which now
4075         do nothing.
4076         * acconfig.h: New file.
4077         * config.h.in: New file, built by autoheader.
4078         * sysdep.h: New file.
4079         * Makefile.in (do_distclean): Don't remove sysdep.h.
4080         (RECONFIG): Remove.
4081         (LOCAL_H_DEPS): New variable.
4082         ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
4083         $(RECONFIG).
4084         ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
4085         ($(OPTIONAL_BACKENDS)): Likewise.
4086         (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4087         looking through sysdep.h.
4088         * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4089         (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4090         (fprintf_vma, sprintf_vma): Likewise.
4091         (int64_type, uint64_type): Don't define.
4092         * bfd-in2.h: Rebuild.
4093         * archures.c, bfd.c, srec.c: Include <ctype.h>.
4094         * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4095         * lynx-core.c: Include stuff from old hosts/lynx.h.
4096         * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4097         rather than NO_FCNTL.
4098         * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4099         rather than NATIVE_HPPAHPUX_COMPILER.
4100         * trad-core.c: Don't include <errno.h>.  Include TRAD_HEADER if it
4101         is defined.
4102         * hosts/*.h: Remove all header files which merely include,
4103         declare, and define things.  Leave header files which define
4104         information needed by trad-core.c.
4105
4106         * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4107         (BFD_CC_FOR_BUILD): Define.
4108         * configure.in: Use BFD_CC_FOR_BUILD.
4109         * configure: Rebuild.
4110
4111 Tue Sep  5 19:35:28 1995  Ian Lance Taylor  <ian@cygnus.com>
4112
4113         * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4114         * configure: Rebuild.
4115
4116         * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4117         a global symbol.
4118
4119 Tue Sep  5 12:48:26 1995  Jason Molenda   (crash@phydeaux.cygnus.com)
4120
4121         * config.bfd: i386pe_ve -> i386pe_vec.
4122
4123 Mon Sep  4 14:02:43 1995  Ian Lance Taylor  <ian@cygnus.com>
4124
4125         * configure.host: Incorporate host Makefile fragments by setting
4126         shell variables.
4127         * configure.in: Call AC_PROG_CC.  Substitute CFLAGS, HDEFINES and
4128         AR.  Call AC_PROG_INSTALL.  Substitute CC_FOR_BUILD, choosing a
4129         value based on whether the code is being compiled by a cross
4130         compiler.  Don't substitute host_makefile_frag or frags.
4131         * aclocal.m4: New file to define local AC_PROG_CC.
4132         * configure: Rebuild.
4133         * Makefile.in (INSTALL): Set to @INSTALL@.
4134         (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4135         (INSTALL_DATA): Set to @INSTALL_DATA@.
4136         (AR): Set to @AR@.
4137         (CC): Define as @CC@.
4138         (CFLAGS): Set to @CFLAGS@.
4139         (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4140         (@host_makefile_frag@): Remove.
4141         (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@.  Move $(CFLAGS)
4142         after other options.
4143         (config.status): Remove dependency upon @frags@.
4144         * config/*.mh, config/README: Remove.
4145
4146         * config.bfd: Rewrite to incorporate the contents of the Makefile
4147         fragments by setting shell variables, rather than merely returning
4148         the name of a Makefile fragment.
4149         * configure.in: Use shell variables set by config.bfd rather than
4150         looking at the target Makefile fragment files.  Don't substitute
4151         target_makefile_frag.  Do substitute TDEFINES.
4152         * configure: Rebuild.
4153         * Makefile.in (@target_makefile_frag@): Remove.
4154         (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4155         * config/*.mt: Remove.
4156
4157 Mon Sep  4 03:13:28 1995  Ken Raeburn  <raeburn@cygnus.com>
4158
4159         * configure.in: Put changequote lines around "i[345]86" patterns
4160         section of core file support.
4161
4162 Sun Sep  3 11:31:58 1995  Jeff Law  (law@snake.cs.utah.edu)
4163
4164         * som.c (som_bfd_print_private_bfd_data): Define to use the
4165         generic version.
4166
4167 Fri Sep  1 17:08:40 1995  steve chamberlain  <sac@slash.cygnus.com>
4168
4169         * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4170         entry, text_start and data_start.
4171
4172 Fri Sep  1 18:06:28 1995  Ian Lance Taylor  <ian@cygnus.com>
4173
4174         * Makefile.in (OFILES): Remove $(TDEPFILES).
4175         * config/apollo.mt (TDEPFILES): Remove.
4176         * config/README: Update.
4177
4178         * configure.in: For a native configuration, set COREFILE and
4179         COREFLAG based on the canonical host name.
4180         * configure: Rebuild.
4181         * Makefile.in: Rebuild dependencies.
4182         (ALL_CFLAGS): Add @COREFLAG@.
4183         (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4184         * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4185         support routines.  Check LYNX_CORE rather than HOST_LYNX.
4186         * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4187         * i386lynx.c: Likewise.
4188         * m68klynx.c: Likewise.
4189         * sparclynx.c: Likewise.
4190         * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4191         * *-core.c: Comment changes.
4192         * config/decstation.mh (HDEPFILES): Remove.
4193         (HDEFINES): Remove -DTRAD_CORE.
4194         * config/irix3.mh (RANLIB): Remove.
4195         * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4196         (HDEFINES): Remove -DIRIX_CORE.
4197         * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4198         (HDEFINES): Remove -DTRAD_CORE.
4199         * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4200         * config/ultra3.mh (RANLIB): Remove.
4201         * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4202         * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4203         * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4204         * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4205         * config/hppahpux.mh, config/hppaosf.mh: Remove.
4206         * config/i386aix.mh, config/i386bsd.mh: Remove.
4207         * config/i386linux.mh, config/i386mach3.mh: Remove.
4208         * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4209         * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4210         * config/mipsmach3.mh, config/news-mips.mh: Remove.
4211         * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4212         * config/rs600.mh, config/rs6000lynx.mh: Remove.
4213         * config/solaris2.mh, config/stratus.mh: Remove.
4214         * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4215         * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4216
4217 Fri Sep  1 15:18:50 1995  Kazumoto Kojima  <kkojima@info.kanagawa-u.ac.jp>
4218
4219         * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4220         DT_FINI entry if the appropriate symbol is not in the hash table.
4221
4222         * libelf.h (struct elf_backend_data): Add create_program_headers
4223         and want_hdr_in_seg fields.
4224         * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4225         defined.
4226         (elf_backend_create_program_headers): Likewise.
4227         (elfNN_bed): Initialize create_program_headers and
4228         want_hdr_in_seg.
4229         * elf.c (get_program_header_size): Call create_program_headers
4230         backend routine.
4231         (map_program_segments): Check want_hdr_in_seg backend field.  Call
4232         create_program_headers backend routine.
4233
4234         * elf.c (assign_file_positions_except_relocs): Align non allocated
4235         sections when creating an executable.
4236
4237         * elfcode.h (elf_swap_phdr_in): Make non static.
4238         (elf_swap_phdr_out): Make non static.
4239         * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4240         (bfd_elf32_swap_phdr_out): Declare.
4241         (bfd_elf64_swap_phdr_in): Declare.
4242         (bfd_elf64_swap_phdr_out): Declare.
4243
4244         * ecofflink.c (ecoff_collect_shuffle): New static function.
4245         (_bfd_ecoff_get_accumulated_pdr): New function.
4246         (_bfd_ecoff_get_accumulated_sym): New function.
4247         (_bfd_ecoff_get_accumulated_ss): New function.
4248         * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4249         (_bfd_ecoff_get_accumulated_sym): Declare.
4250         (_bfd_ecoff_get_accumulated_ss): Declare.
4251         * libbfd.h: Rebuild.
4252
4253 Fri Sep  1 13:20:25 1995  Ian Lance Taylor  <ian@cygnus.com>
4254
4255         * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4256
4257         * elflink.h (elf_link_add_object_symbols): Handle indirect and
4258         warning symbols.  If any section is named .gnu.warning.XXX, treat
4259         the contents as a warning to be issued if the symbol XXX is
4260         referenced.
4261         (elf_link_output_extsym): For an indirect or warning symbol, just
4262         output the symbol it points to.
4263
4264         * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4265         if bfd_hash_allocate fails, since it will already be set.
4266         (generic_link_hash_newfunc): Likewise.
4267         (archive_hash_newfunc): Likewise.
4268         (hash_entry_bfd): New static function.
4269         (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4270         callback.  Allocate a new warning using the hash table newfunc.
4271         Use bfd_hash_replace to update the entry in the hash table, rather
4272         than assuming we can copy the fields with structure assignment.
4273
4274         * hash.c (bfd_hash_replace): New function.
4275         * bfd-in.h (bfd_hash_replace): Declare.
4276         * bfd-in2.h: Rebuild.
4277
4278 Fri Sep  1 08:12:50 1995  James G. Smith  <jsmith@beauty.cygnus.com>
4279
4280         * config.bfd: Add mips*vr4300-*-elf* target.
4281         * config/mipsbvr4300.mt: Added.
4282
4283 See file ChangeLog.2
4284
4285 \f
4286 Local Variables:
4287 mode: indented-text
4288 left-margin: 8
4289 fill-column: 74
4290 version-control: never
4291 End: