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