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