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