d8ae120f6d30948d15c5e3b883f7854d8dca65ec
[binutils-gdb.git] / bfd / ChangeLog
1 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2
3 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
4 the embedded bit is set on some objects and not on others. Just
5 or it together.
6
7 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
8
9 * coffcode.h (coff_set_section_contents): Fix the handling of the
10 .lib section to work even if the entire section contents are
11 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
12 Robert Lipe <robertl@arnet.com>.
13
14 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
15
16 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
17 memory here for contents.
18
19 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
20 _SDA2_BASE_ by 32768.
21 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
22 started using. Allocate contents for .sdata and .sdata2 sections
23 also.
24 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
25 rather than _name.
26 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
27 size _SDA{,2}_BASE_.
28 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
29 done.
30
31 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
32
33 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
34
35 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
36 start-sanitize-v8plus
37 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
38 end-sanitize-v8plus
39 (bfd_mach_sparc_v9a): Define.
40 (bfd_mach_sparc_v9_p): Define.
41 * bfd-in2.h: Regenerated.
42 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
43 bfd_mach_sparc_v9.
44 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
45 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
46 to bfd_elf32_sparc_vec.
47 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
48 start-sanitize-v8plus
49 Add v8plus{,a} support.
50 end-sanitize-v8plus
51 Add v9a support.
52 start-sanitize-v8plus
53 (sparc_compatible): New function.
54 * elf32-sparc.h: #include "elf/sparc.h".
55 (elf32_sparc_set_private_flags, elf32_sparc_copy_private_bfd_data,
56 elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
57 elf32_sparc_final_write_processing): New functions.
58 (bfd_elf32_bfd_set_private_flags, bfd_elf32_bfd_copy_private_bfd_data,
59 bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
60 elf_backend_final_write_processing): Define.
61 end-sanitize-v8plus
62
63 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
64
65 * elf-bfd.h (struct elf_link_hash_entry): Add
66 linker_section_pointer field.
67 (enum elf_linker_section_enum): Enumeration for new way of
68 creating linker dynamic sections and symbols.
69 (elf_linker_section{,_pointers}): New structures for creating
70 dynamic sections and symbols.
71 (elf_obj_tdata): Add linker_section_pointers and linker_section
72 fields.
73 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
74 (_bfd_elf_create_linker_section): New declarations.
75 (_bfd_elf_find_pointer_linker_section): Ditto.
76 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
77 (_bfd_elf_make_linker_section_rela): Ditto.
78
79 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
80
81 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
82 (ppc_elf_create_linker_section): New function to create the
83 sections .got, .sdata, and .sdata2.
84 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
85 needed.
86 (ppc_elf_check_relocs): Support more of the eabi relocations.
87 (ppc_elf_relocate_section): Ditto.
88 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
89 if the .sdata{,2} + .sbss{,2} section size is > 32k.
90
91 * elflink.h (elf_create_pointer_linker_section): New function to
92 create initialized pointers in dynamic linker sections.
93 (elf_finish_pointer_linker_section): Actually intialize the
94 pointers created above.
95
96 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
97 macros to provide both 32 and 64 bit versions of
98 elf_create_pointer_linker_section.
99 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
100 provide both 32 and 64 bit versions of
101 elf_finish_pointer_linker_section.
102
103 * elflink.c (_bfd_elf_create_linker_section): New function to
104 create a linker section.
105 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
106 given address in the linker pointer offsets created for a given
107 symbol.
108 (_bfd_elf_make_linker_section_rela): Make a RELA section
109 corresponding to the generated linker section.
110
111 start-sanitize-v8plus
112 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
113
114 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
115 end-sanitize-v8plus
116
117 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
118
119 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
120 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
121 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
122 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
123 toc entry in an objdump) for now.
124 (ppc_do_last, ppc_get_last): New function - needed to save processing
125 the toc owner to the end.
126 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
127 toc owner last.
128
129 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
130 toc owner from being done till last. Must define POWERPC_LE_PC
131 to enable it.
132
133 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
134
135 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
136 to INFO.
137 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
138 SizeOfImage for PowerPC. Ignore the size of the .junk section.
139
140 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
141
142 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
143
144 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
145
146 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
147 back to first.
148 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
149
150 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
151
152 * elf.c (assign_file_positions_for_segments): Don't increment file
153 offset for a segment which contains no loadable sections.
154
155 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
156
157 * reloc.c: Add new PowerPC relocations.
158 * {bfd-in2,libbfd}.h: Regenerate.
159
160 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
161 (ppc_elf_reloc_type_lookup): Lookup new relocations.
162
163 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
164
165 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
166 entries.
167
168 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
169 info->shared.
170
171 * coffgen.c (coff_find_nearest_line): Don't try to cache
172 information in sections that are not owned by a BFD. From Richard
173 Henderson <richard@atheist.tamu.edu>.
174
175 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
176 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
177 * elflink.h (elf_link_output_extsym): Remove special check for
178 _rld_new_interface.
179
180 * ecoffswap.h: Add prototypes for static functions.
181
182 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
183
184 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
185 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
186 references.
187 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
188 to satisfy a TOC16 relocation. Rewrite unsupported relocation
189 support. Begin support for R_PPC_SDA{2,}REL.
190
191 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
192
193 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
194 create the .got and .got.neg sections.
195 (ppc_elf_size_dynamic_sections): Call it.
196 (ppc_elf_check_relocs): Call it.
197 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
198 (ppc_elf_check_relocs): Add error messages for relocations we
199 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
200 relocation.
201
202 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
203
204 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
205 section flags for V.4 and eabi.
206
207 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
208
209 * elf.c (assign_file_positions_for_segments): If a segment
210 contains no sections, don't mark it as readable.
211
212 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
213 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
214
215 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
216 dynamic section, if there is one.
217 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
218 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
219 (bfd_elf64_swap_dyn_in): Likewise.
220 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
221 PTR.
222 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
223
224 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
225 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
226 <pirker@eiunix.tuwien.ac.at>.
227
228 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
229
230 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
231 PowerPC V.4 and eabi.
232 * bfd-in2.h: Regenerate.
233 * libfd.h: Regenerate.
234
235 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
236
237 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
238 section type and SHF_EXCLUDE section flag, turning them into the
239 appropriate bfd section flag.
240
241 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
242
243 * xcofflink.c (xcoff_link_add_symbols): Create the special
244 sections if we see a DYNAMIC object, in case that is the only
245 XCOFF input object we see.
246
247 * elf32-mips.c: Extensive changes for a start at dynamic linking
248 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
249
250 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
251 (struct elf_backend_data): Remove
252 elf_backend_create_program_headers field. Add
253 elf_backend_additional_program_headers and
254 elf_backend_modify_segment_map fields.
255 * elfxx-target.h (elf_backend_type_change_ok): Define if not
256 defined.
257 (elf_backend_additional_program_headers): Likewise.
258 (elf_backend_modify_segment_map): Likewise.
259 (elf_backend_create_program_headers): Don't define.
260 (elfNN_bed): Change to account for field changes.
261 * elf.c (assign_file_positions_for_segments): Call new
262 modify_segment_map backend function. Don't call old
263 create_program_headers backend function.
264 (get_program_header_size): Call additional_program_headers rather
265 than create_program_headers.
266 * elflink.h (elf_link_add_object_symbols): Initialize
267 type_change_ok from new backend field.
268 (elf_link_output_extsym): Don't warn if _rld_new_interface is
269 defined.
270 (elf_reloc_link_order): Treat a reloc against a defined symbol as
271 a reloc against the appropriate section.
272
273 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
274 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
275 (elf_flags_init): Rename from elf_ppc_flags_init.
276 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
277 elf_ppc_flags_init.
278 (ppc_elf_copy_private_bfd_data): Likewise.
279 (ppc_elf_merge_private_bfd_data): Likewise.
280
281 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
282 relocation entries.
283
284 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
285
286 * coff-alpha.c (alpha_relocate_section): During final link, allow
287 output .lita section to be bigger than 64k by adjusting gp value
288 on a per-input section basis.
289 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
290 field.
291 (struct ecoff_section_tdata): Add gp field.
292
293 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
294
295 Handle Alpha ECOFF changes in OSF/1 3.2.
296 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
297 field.
298 * coff-alpha.c: Include "aout/ar.h".
299 (alpha_ecoff_get_relocated_section_contents): Don't require an
300 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
301 3.2 doesn't generate one.
302 (alpha_relocate_section): Likewise.
303 (alpha_ecoff_slurp_armap): Define.
304 (alpha_ecoff_slurp_extended_name_table): Define.
305 (alpha_ecoff_construct_extended_name_table): Define.
306 (alpha_ecoff_truncate_arname): Define.
307 (alpha_ecoff_write_armap): Define.
308 (alpha_ecoff_generic_stat_arch_elt): Define.
309 (alpha_ecoff_update_armap_timestamp): Define.
310 (ARFZMAG): Define.
311 (alpha_ecoff_read_ar_hdr): New static function.
312 (alpha_ecoff_get_elt_at_filepos): New static function.
313 (alpha_ecoff_openr_next_archived_file): New static function.
314 (alpha_ecoff_get_elt_at_index): New static function.
315 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
316 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
317 _bfd_ecoff to alpha_ecoff.
318 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
319 field from backend structure, rather than always calling
320 _bfd_get_elt_at_filepos.
321 * coff-mips.c (mips_ecoff_backend_data): Initialize
322 get_elt_at_filepos field.
323 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
324 from _bfd_generic_read_ar_hdr with minor changes.
325 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
326 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
327 * libbfd.h: Rebuild.
328
329 * bfd-in.h (BFD_IN_MEMORY): Define.
330 * libbfd-in.h (struct bfd_in_memory): Define.
331 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
332 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
333 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
334 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
335 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
336 (bfd_get_size): Handle BFD_IN_MEMORY flag.
337 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
338 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
339 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
340 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
341 iostream.
342 (bfd_openstreamr): Likewise.
343 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
344 BFD_IN_MEMORY is not set.
345 * riscix.c (riscix_some_aout_object_p): Likewise.
346 * bfd-in2.h, libbfd.h: Rebuild.
347
348 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
349 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
350 (bfd_get_elt_at_index): Define.
351 * archive.c (_bfd_generic_get_elt_at_index): Rename from
352 bfd_get_elt_at_index. Change index parameter from int to
353 symindex.
354 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
355 (_bfd_noarchive_get_elt_at_index): Define.
356 (_bfd_archive_bsd_get_elt_at_index): Define.
357 (_bfd_archive_coff_get_elt_at_index): Define.
358 * bfd-in2.h, libbfd.h: Rebuild.
359 * aout-target.h (MY_get_elt_at_index): Define if not defined.
360 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
361 * ieee.c (ieee_get_elt_at_index): Define.
362 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
363 * oasys.c (oasys_get_elt_at_index): Define.
364 * som.c (som_get_elt_at_index): Define.
365
366 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
367 numbers to the .text section.
368
369 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
370
371 * ieee.c (ieee_write_debug_part): Change return type to boolean.
372 If there is a SEC_DEBUGGING section, get the contents of the debug
373 information part from it.
374 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
375 section in memory.
376 (ieee_write_object_contents): Check ieee_write_debug_part return.
377
378 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
379
380 * config.bfd (i[345]86-*-freebsd*): Add target.
381 * configure.in (i386freebsd_vec): Add vec.
382 * configure: Regenerate.
383 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
384 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
385 Rebuild dependencies..
386 * freebsd.h: New file.
387 * i386freebsd.c: New file.
388 * targets.c (i386freebsd_vec): Declare.
389 (bfd_target_vector): Add i386freebsd_vec.
390 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
391 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
392
393 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
394
395 * ieee.c (ieee_slurp_debug): New static function.
396 (ieee_object_p): Call it.
397 (ieee_slurp_section_data): Skip debugging sections.
398 (ieee_get_reloc_upper_bound): Likewise.
399 (ieee_get_section_contents): Likewise.
400 (ieee_canonicalize_reloc): Likewise.
401 (ieee_write_section_part): Likewise.
402 (ieee_write_debug_part): Likewise.
403 (ieee_write_data_part): Likewise.
404 (init_for_output): Likewise.
405
406 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
407
408 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
409 work.
410 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
411 relocs, since ppc_elf_relocate_section handles the linker case.
412 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
413 used.
414 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
415 ppc_elf_relocate_section since that is now the only caller.
416 (ppc_elf_relocate_section): Ditto.
417
418 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
419
420 * coffcode.h (coff_write_object_contents): If we don't know the
421 section of the entry point for an XCOFF executable, always set the
422 entry address to -1.
423
424 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
425
426 * elf.c (bfd_section_from_shdr): Add support for note sections.
427
428 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
429
430 * bfd-in.h (struct _symbol_info): Add stab_type field.
431 * bfd-in2.h: Rebuild.
432 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
433
434 * elf32-ppc.c: Remove trailing newline from calls to
435 _bfd_error_handler.
436 (ppc_elf_merge_private_bfd_data): Only warn about endianness
437 difference if target endianness is known.
438
439 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
440
441 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
442 old style TOC16 references without using R_PPC_GOT.
443 (ppc_reloc_type): Ditto.
444 (ppc_elf_reloc_type_lookup): Add support for TOC16.
445 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
446 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
447 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
448 (ppc_elf_check_relocs): New function for GOT/PLT support that is
449 work in progress.
450 (ppc_elf_adjust_dynamic_symbol): Ditto.
451 (ppc_elf_adjust_dynindx): Ditto.
452 (ppc_elf_size_dynamic_sections): Ditto.
453 (ppc_elf_finish_dynamic_symbol): Ditto.
454 (ppc_elf_finish_dynamic_sections): Ditto.
455 (ELF_DYNAMIC_INTERPRETER): Define.
456
457 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
458
459 * elf.c (copy_private_bfd_data): When attaching sections to
460 segments ignore sections that won't be allocated. Patch from
461 Andreas Schwab.
462
463 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
464
465 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
466 anything else.
467
468 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
469
470 * coff-i960.c (CALC_ADDEND): Define.
471 (coff_i960_relocate_section): Add the input section VMA to the
472 addend for PC relative relocs.
473
474 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
475
476 * peicode.h (pe_print_pdata): Must test the entire entry for zero
477 to correctly terminate.
478
479 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
480
481 * targets.c (enum bfd_endian): Define.
482 (bfd_target): Rename byteorder_big_p to byteorder, and change it
483 from boolean to enum bfd_endian. Change header_byteorder_big_p
484 correspondingly.
485 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
486 (bfd_header_big_endian, bfd_header_little_endian): New macros.
487 * bfd-in2.h: Rebuild.
488 * All targets: Change initialization of byteorder and
489 header_byteorder to use enum bfd_endian values rather than
490 booleans.
491 * All files: Change all references to byteorder_big_p and
492 header_byteorder_big_p to use new bfd_*_endian macros.
493
494 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
495 s_vaddr.
496 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
497 vma.
498 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
499
500 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
501
502 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
503
504 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
505
506 * ieee.c: Lots of minor cleanups. Make many functions return
507 errors rather than calling abort. Also:
508 (ieee_write_twobyte): Remove; change callers to call existing
509 ieee_write_2bytes function.
510 (ieee_write_expression): Don't output the section twice when
511 outputting a local symbol. Don't emit an extraneous zero if there
512 is only one term.
513 (ieee_slurp_sections): Set the lma as well as the vma.
514 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
515
516 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
517 a recognized one or bfd_arch_unknown.
518 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
519 to succeed.
520 (ihex_get_symtab): Likewise.
521
522 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
523
524 * aoutx.h: Include <ctype.h>.
525 (struct aout_link_includes_table): Define.
526 (struct aout_link_includes_totals): Define.
527 (struct aout_link_includes_entry): Define.
528 (aout_link_includes_lookup): Define macro.
529 (struct aout_final_link_info): Add includes field.
530 (aout_link_includes_newfunc): New static function.
531 (NAME(aout,final_link)): Initialize includes hash table.
532 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
533
534 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
535
536 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
537
538 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
539
540 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
541
542 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
543
544 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
545 (pe_print_private_bfd_data): call pe_print_reloc.
546 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
547 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
548 up some debugging as well.
549
550 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
551
552 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
553 <rfg@monkeys.com>.
554
555 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
556
557 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
558 when setting sections to NULL.
559
560 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
561
562 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
563 field.
564 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
565 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
566 for all symbols.
567 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
568 * bfd-in2.h: Rebuild.
569
570 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
571
572 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
573
574 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
575
576 * ihex.c (ihex_scan): Handle record types 4 and 5.
577 (ihex_object_p): Permit types 4 and 5.
578 (ihex_set_section_contents): Remove check for out of range
579 addresses.
580 (ihex_write_object_contents): Generate types 4 and 5.
581
582 * elflink.h (elf_link_output_extsym): Just ignore warning and
583 indirect references to symbols which don't really exist.
584
585 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
586
587 * peicode.h (pe_print_idata): Minor format fixes
588 (pe_print_edata): New function. Under private printing, this formats
589 the edata section of a PE file.
590 (pe_print_private_bfd_data): Added call to pe_print_edata.
591
592 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
593
594 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
595 index, don't call stoi.
596
597 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
598
599 * srec.c (srec_scan): Set lma as well as vma.
600
601 * ihex.c: New file; support for Intel Hex format.
602 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
603 (ihex_vec): Declare.
604 (bfd_target_vector): Always include ihex_vec.
605 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
606 * Makefile.in: Rebuild dependencies.
607 (BFD_LIBS): Add ihex.o
608 (BFD_LIBS_CFILES): Add ihex.c.
609 * bfd-in2.h: Rebuild.
610
611 * elf.c (assign_file_positions_for_segments): Sort the sections in
612 each segment.
613 (get_program_header_size): Return the right size if segment_map is
614 not NULL.
615 (copy_private_bfd_data): Don't bother to sort the sections.
616
617 * bfd.c (bfd_record_phdr): New function.
618 * bfd-in.h (bfd_record_phdr): Declare.
619 * bfd_in2.h: Rebuild.
620
621 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
622 BFD_ASSERT.
623
624 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
625 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
626 bfd_size_type.
627 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
628 (bfd_zmalloc): Change declaration.
629 * libbfd.h: Rebuild.
630 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
631 and realloc. Don't set bfd_error_no_memory if they fail.
632
633 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
634
635 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
636 uses as well. Added a new howto to deal with TOCREL16 relocs that
637 are TOCDEFN as well.
638 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
639 to handle RVA relocs from dlltool.
640 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
641 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
642 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
643
644 * coffcode.h (coff_set_alignment_hook): check idata$X sections
645 to get the right section alignment.
646
647 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
648
649 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
650 p_paddr if p_paddr is zero.
651 (make_mapping): Set includes_filehdr and includes_phdrs for first
652 PT_LOAD segment.
653 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
654 segment.
655 (assign_file_positions_for_segments): Handle includes_filehdr and
656 includes_phdrs. Remove special handling of PT_PHDR and first
657 PT_LOAD segments.
658 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
659 when appropriate. Remove special handling of PT_PHDR segment.
660 Use a more complex condition for when a section is included in a
661 segment to handle Solaris linker oddities.
662
663 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
664
665 * coff-m88k.c (howto_table): Reformatted for easier reading;
666 special_function now points to new function m88k_special_reloc.
667 (howto_hvrt16): Function previously used for handling HVRT16 relocs
668 removed.
669 (rtype2howto): Do not add reloc's r_offset to the addend, this will
670 be done correctly by m88k_special_reloc.
671 (reloc_processing): New function to be used by RELOC_PROCESSING.
672 (RELOC_PROCESSING): Define to call reloc_processing.
673
674 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
675
676 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
677 (pe_print_pdata): Likewise.
678
679 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
680 obstack_alloc fails.
681 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
682 fails.
683 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
684 * Many files: don't set bfd_error_no_memory if one of the above
685 routines fails.
686
687 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
688 if p_paddr_valid is set.
689 (copy_private_bfd_data): New static function.
690 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
691
692 * elf.c (assign_file_positions_for_segments): Fix case where extra
693 program headers were allocated.
694
695 * elf.c (_bfd_elf_print_private_bfd_data): New function.
696 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
697 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
698 _bfd_elf_print_private_bfd_data.
699
700 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
701 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
702 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
703 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
704 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
705 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
706 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
707
708 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
709
710 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
711 * elf.c (make_mapping): New static function.
712 (map_sections_to_segments): New static function.
713 (elf_sort_sections): New static function.
714 (assign_file_positions_for_segments): New static function.
715 (map_program_segments): Remove.
716 (get_program_header_size): Remove sorted_hdrs, count, and
717 maxpagesize parameters. Simplify.
718 (assign_file_positions_except_relocs): When generating an
719 executable, use assign_file_positions_for_segments.
720 (elf_sort_hdrs): Remove.
721 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
722 to get_program_header_size.
723
724 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
725
726 * hp300hpux.c (MY(callback)): Set lma as well as vma.
727
728 * configure, config.in: Regenerate with autoconf 2.7.
729
730 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
731 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
732
733 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
734
735 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
736 (ecoff_sec_to_styp_flags): Likewise.
737 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
738 (ecoff_set_symbol_info): Handle scRConst.
739 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
740 (ecoff_compute_section_file_positions): Handle .rconst section.
741 (_bfd_ecoff_write_object_contents): Likewise.
742 (ecoff_link_check_archive_element): Handle scRConst.
743 (ecoff_link_add_externals): Likewise.
744 (ecoff_link_write_external): Handle .rconst section.
745 (ecoff_reloc_link_order): Likewise.
746 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
747 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
748 section.
749 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
750
751 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
752 DEF_DYNAMIC flag is set.
753
754 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
755
756 * host-aout.c: If TRAD_HEADER is defined, include it.
757
758 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
759
760 * aclocal.m4 (AC_PROG_CC): Remove local definition.
761 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
762 (BFD_NEED_DECLARATION): New function.
763 * configure.in: Use BFD_NEED_DECLARATION.
764 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
765 * configure, config.in: Rebuild with autoconf 2.6.
766
767 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
768 special_sections before returning when called with a non XCOFF
769 BFD.
770
771 * coffgen.c (coff_renumber_symbols): Sort common symbols with
772 global symbols.
773
774 * coffcode.h (coff_compute_section_file_positions): Only pad the
775 previous section to force file alignment when creating an
776 executable.
777
778 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
779
780 * coffcode.h (coff_compute_section_file_positions): If
781 RS6000COFF_C, set up the .debug section.
782
783 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
784 if it is not large enough to accomodate the entire TOC area with
785 signed 16 bit offsets.
786 (xcoff_write_global_symbol): Handle negative TOC offsets in global
787 linkage code.
788 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
789 TOC anchor to use the TOC value used in the output file.
790
791 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
792
793 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
794 (_bfd_coff_read_string_table): Likewise.
795
796 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
797
798 * pe-arm.c: Fix typos.
799 * coff-arm.c: Likewise.
800
801 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
802
803 * coff-ppc.c (list_ele): Added "cat"egory member.
804 (record_toc): New category parameter (priv or pub).
805 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
806 (ppc_process_before_allocation): Removed embrionic data-in-toc from
807 the mainline. It addes extra toc cells in error.
808 (ppc_coff_swap_sym_in_hook): Added some documentation.
809 (dump_toc): Can now diagnose "virtual toc" chicanery.
810
811 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
812
813 * elf-bfd.h (struct elf_link_hash_table): Change type of
814 dynsymcount and bucketcount fields from size_t to bfd_size_type.
815
816 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
817
818 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
819 pointerize C_LEAFSTAT or C_LEAFEXT entries.
820
821 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
822 DT_INIT and DT_FINI entries if the _init or _fini symbol is
823 defined or mentioned in a regular file.
824
825 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
826
827 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
828 (coff_ppc_relocate_section): Handle TOCDEFN attribute
829 (coff_ppc_relocate_section): Correct REL24 handling
830 (ppc_process_before_allocation): Correct TOCDEFN handling
831
832 * peicode.h (dir_names): Added name descriptions
833
834 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
835
836 * VERSION: Updated to cygnus-2.6.
837
838 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
839
840 * targets.c (m68k4knetbsd_vec): Declare.
841
842 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
843
844 * targets.c (bfd_target): Change type of second argument to
845 _bfd_print_private_bfd_data from void * to PTR.
846 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
847 using PTR rather than void *.
848 * bfd-in2, libbfd.h: Rebuild.
849 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
850 to PTR.
851 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
852 _bfd_generic_bfd_print_private_bfd_data rather than casting
853 bfd_true.
854
855 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
856
857 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
858 "DO NOT DELETE" lines or blank lines that mkdep writes on some
859 systems.
860 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
861 BFD64_BACKENDS_CFILES): New variables.
862 (CFILES): Use them.
863
864 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
865
866 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
867 not at the file position of the first section.
868 * coffcode.h (coff_compute_section_file_positions): Avoid using
869 unportable #elif.
870 (coff_write_object_contents): When generating a PPC PE executable
871 with no symbols, round up the file size to a COFF_PAGE_SIZE
872 boundary.
873 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
874 don't write out a string table.
875
876 * elf.c (bfd_section_from_shdr): When using a different section
877 header, pass the new one to _bfd_elf_make_section_from_shdr.
878 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
879 (elf_map_symbols): Add section VMA to symbol value when comparing
880 against 0.
881 (_bfd_elf_compute_section_file_positions): Only build symbol table
882 if there are some symbols. Set file offset of symtab and strtab
883 sections.
884 (assign_file_positions_except_relocs): Remove dosyms parameter.
885 Change all callers. Never set file offset of symtab and strtab
886 sections.
887 (_bfd_elf_copy_private_section_data): New function.
888 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
889 (_bfd_elf_copy_private_symbol_data): New function.
890 (swap_out_syms): Check for special mapping of st_shndx created by
891 copy_private_symbol_data.
892 * elfxx-target.h: Use new copy routines.
893 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
894 (_bfd_elf_copy_private_section_data): Declare.
895
896 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
897
898 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
899 C_NT_WEAK.
900
901 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
902 _bfd_dummy_target, matching the recent change to archive
903 recognition.
904
905 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
906
907 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
908 arithmetic on PTR types.
909
910 * aout-target.h (MY(callback)): Set the lma of the sections.
911
912 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
913 symbol into a reloc against the section.
914
915 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
916
917 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
918 glue for the relocs: IMGLUE and IFGLUE.
919 (record_toc): new function - tracks toc contents
920 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
921 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
922 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
923 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
924 (ppc_record_toc_entry): Removed a debug define (duh)
925
926 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
927 (pe_print_idata): New function - formats the idata section data
928 (pe_print_pdata): New function - formats the pdata section data
929 (pe_print_private_bfd_data): calls to above
930
931 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
932
933 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
934 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
935 TARGET_SYM and TARGET_NAME for vector and BFD name.
936 * coff-pmac.c (pmac_xcoff_vec): Remove.
937 (TARGET_SYM, TARGET_NAME): Define.
938 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
939 machine to 0, not all PowerMacs are 601s.
940
941 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
942
943 * elfcode.h (elf_object_p): Read in any program headers.
944 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
945 based on the program headers, if any.
946 (elf_fake_sections): Set sh_addr from the vma, not the lma.
947 (map_program_segments): Set p_paddr of program headers based on
948 the lma.
949
950 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
951
952 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
953 failure.
954
955 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
956 trying to do a relocateable link with a non-a.out object file.
957
958 * archive.c (bfd_generic_archive_p): Check the first object file
959 in an archive even if target_defaulted is set. If the object file
960 has the wrong xvec, reject it.
961
962 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
963 be represented, report the name via _bfd_error_handler.
964 (translate_to_native_sym_flags): Likewise.
965 * elf32-mips.c (mips_elf_final_link): Likewise.
966 * oasys.c (oasys_write_sections): Likewise.
967
968 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
969 which checks for STYP_OVRFLO sections.
970 (coff_compute_section_file_positions): If RS6000COFF_C, handle
971 reloc and lineno count overflows.
972 (coff_write_object_contents): Call coff_count_linenumbers before
973 coff_compute_section_file_positions. If RS6000COFF_C, handle
974 reloc and lineno count overflows.
975 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
976 relocs before dealing with .pad sections. Count overflow section
977 headers when handling .pad sections.
978
979 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
980 if RS6000COFF_C.
981
982 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
983 (struct xcoff_link_hash_table): Add descriptor_section and
984 special_sections fields.
985 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
986 (xcoff_link_add_symbols): Set linkage section alignment. Create
987 descriptor section. Check for magic symbol names (_text, etc.),
988 and record them in special_sections if found. Set
989 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
990 descriptor field to point back to the function code symbol.
991 (xcoff_sweep): Always mark the special descriptor_section.
992 (bfd_xcoff_export_symbol): Check whether the symbol might be a
993 function descriptor, and mark it if it is.
994 (bfd_xcoff_size_dynamic_sections): Add new special_sections
995 parameter, and fill it in. Allocate space for the descriptor
996 section.
997 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
998 global linkage code. If an undefined function descriptor is
999 exported, arrange to define it. Warn about any other undefined
1000 exported symbol.
1001 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
1002 (xcoff_write_global_symbol): Create a function descriptor when
1003 necessary.
1004 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
1005 * bfd-in2.h: Rebuild.
1006
1007 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
1008
1009 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
1010 (ppc_coff_link_hash_table): new types for hashing
1011 (ppc_coff_link_hash_newfunc): hash entry constructor
1012 (ppc_coff_link_hash_table_init): hash table initializer
1013 (ppc_coff_link_hash_table_create): hash table constructor
1014 (ppc_record_toc_entry): changed references to hash table
1015 (coff_ppc_relocate_section): changed references to hash table
1016
1017 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
1018 * libcoff.h: Rebuild
1019
1020 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
1021 (coff_link_add_symbols): removed toc_offset init
1022
1023 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
1024
1025 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
1026 first.
1027
1028 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
1029 if it is given and mmep is available.
1030 * acconfig.h: Undef USE_MMAP.
1031 * configure, config.in: Regenerated.
1032 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
1033 table handling the old way.
1034 (aout_get_external_symbols): Don't complain if last byte of string
1035 table is nonzero.
1036 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
1037 (bfd_free_window) [! USE_MMAP]: Don't define.
1038 (bfd_get_file_window,
1039 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
1040
1041 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
1042
1043 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
1044 0xffff0000.
1045
1046 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
1047
1048 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
1049 compatible with AMD generated COFF files. Try to support both AMD
1050 and GNU formats simultaneously.
1051 (coff_a29k_relocate_section): Likewise.
1052
1053 * libbfd.c (bfd_get_file_window): Change writable parameter from
1054 int to boolean; update all callers. Pass MAP_SHARED if not
1055 writable--it's required on Solaris. Cast fprintf argument to
1056 avoid warning.
1057 * bfd-in.h (bfd_get_file_window): Update declaration.
1058 * bfd-in2.h: Rebuild.
1059 * aoutx.h: Update calls to bfd_get_file_window.
1060
1061 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
1062 Change all uses.
1063 (xcoff_swap_ldhdr_in): New static function.
1064 (xcoff_swap_ldsym_in): New static function.
1065 (xcoff_find_reloc): Handle the case of a single reloc correctly.
1066 (xcoff_link_add_symbols): If we just created a descriptor, pass it
1067 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
1068 Handle XTY_ER/XMC_XO symbols correctly.
1069 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
1070 rather than normal symbol table.
1071 (bfd_xcoff_import_symbol): It's not an error if the symbol is
1072 already defined with the same absolute value.
1073 (xcoff_mark): When considering called symbols, check whether the
1074 descriptor is from a dynamic object, rather than the symbol
1075 itself.
1076 (xcoff_build_ldsyms): Likewise.
1077
1078 * libbfd.c (bfd_get_file_window): Change return type to boolean.
1079 Cast realloc and malloc return values. If malloc or realloc fail,
1080 set bfd_error_no_memory.
1081 * bfd-in.h (bfd_get_file_window): Change type to boolean.
1082 * bfd-in2.h: Rebuild.
1083
1084 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
1085
1086 * coff-ppc.c (ppc_record_toc_entry): new function.
1087 (in_reloc_p): changed return value.
1088 (coff_ppc_relocate_section): much rework.
1089 (ppc_allocate_toc_section): new function.
1090 (ppc_process_before_allocation): new function.
1091 (ppc_coff_swap_sym_in_hook): new function.
1092
1093 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
1094 (coff_link_add_symbols): initialize toc_offset.
1095
1096 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
1097 (coff_swap_aouthdr_out): Added more sections to the data
1098 dictionary for the pe file header. Also changed linker version
1099 number on the ppc side.
1100 (dir_names): small improvements to the dictionary printing.
1101 (pe_mkobject_hook): save the file level flags.
1102
1103 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
1104 (pe_tdata): added real_flags field
1105 (coff_tdata): added local_toc_sym_map and access macro
1106
1107 * libcoff.h (coff_link_hash_entry): added toc_offset field
1108 (pe_tdata): added real_flags field
1109 (coff_tdata): added local_toc_sym_map and access macro
1110
1111 * coffcode.h (coff_set_alignment_hook): added hook for PE.
1112 (coff_mkobject): init for local_toc_sym_map
1113 (coff_write_object_contents): set the internal_a.magic to
1114 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
1115 ppc compilers use.
1116
1117 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
1118
1119 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
1120 entries until both the line number address and the function name
1121 address are too large.
1122
1123 * configure.in: Call AC_CHECK_PROG to find and cache AR.
1124 * configure: Rebuilt.
1125
1126 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
1127 is defined in the environment.
1128
1129 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
1130
1131 * som.c (som_get_section_contents_in_window): Define to use
1132 generic version.
1133
1134 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
1135
1136 * coff-i860.c: New file, based on coff-i386.c.
1137 * cpu-i860.c: New file, based on cpu-i386.c.
1138 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
1139 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
1140 targets, using i860coff_vec.
1141 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
1142 trad-core.o and hosts/i860mach3.h.
1143 (i860coff_vec): Use coff-i860.o and cofflink.o.
1144 * configure: Rebuild.
1145 * Makefile.in: Rebuild dependencies.
1146 (ALL_MACHINES): Add cpu-i860.o.
1147 (BFD32_BACKENDS): Add coff-i860.o.
1148 (CFILES): Add cpu-i860.c and coff-i860.c.
1149 * targets.c (i860coff_vec): Declare.
1150 (bfd_target_vector): Add &i860coff_vec.
1151 * archures.c (bfd_i860_arch): Declare.
1152 (bfd_archures_list): Add &bfd_i860_arch.
1153 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
1154 (coff_set_flags): Handle bfd_arch_i860.
1155 (coff_write_object_contents): Handle I860 a.out magic number.
1156
1157 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
1158
1159 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
1160 the created .tc section to 2.
1161 (xcoff_mark): Don't keep a .loader reloc for a call to an
1162 undefined symbol when creating a shared library.
1163 (xcoff_build_ldsyms): When creating a shared library, generate
1164 global linkage code for a call to an undefined symbol.
1165
1166 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
1167
1168 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
1169 BFD32_BACKENDS, BFD64_BACKENDS.
1170 (.dep1): Put mkdep output in a separate file.
1171 Rebuilt dependencies.
1172
1173 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
1174 value.
1175
1176 Permit use of mmap when available:
1177
1178 * configure.in: Check for mmap, madvise, mprotect.
1179 * config.in, configure: Regenerated.
1180
1181 * libbfd.c (struct _bfd_window_internal): Define type.
1182 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
1183 functions.
1184 (ok_to_map): New static variable for debugging.
1185 (_bfd_generic_get_section_contents_in_window): New function.
1186 * bfd-in.h (bfd_window_internal): Declare type.
1187 (bfd_window): Define type.
1188 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
1189 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
1190 Declare.
1191
1192 * libaout.h (struct aoutdata): Add two window fields.
1193 (obj_aout_sym_window, obj_aout_string_window): New macros.
1194 * aoutx.h (some_aout_object_p): Initialize windows.
1195 (aout_get_external_symbols): Get symbol data and strings in
1196 windows instead of explicitly allocated buffers.
1197 (slurp_symbol_table): Free window instead of memory.
1198 (bfd_free_cached_info): Release windows instead of freeing storage
1199 directly.
1200 (aout_link_free_symbols): Ditto.
1201
1202 * targets.c (bfd_target): Add new field for
1203 get_section_contents_in_window.
1204 (BFD_JUMP_TABLE_GENERIC): Updated.
1205 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
1206 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
1207 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
1208 macros for get_section_contents_in_window field.
1209
1210 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
1211
1212 * core.c: Renamed to corefile.c
1213 * makefile.dos (OBJS): Change core.o to corefile.o
1214 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
1215
1216 start-sanitize-gm
1217 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
1218
1219 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
1220 targ_selvecs to allow debugging under Irix-5 native.
1221
1222 end-sanitize-gm
1223 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
1224
1225 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
1226 to o. Clobber and restore the list of new csects around the call
1227 to _bfd_generic_link_add_one_symbol, in case it wants to report a
1228 linker error and the linker wants to read the symbol table. Reset
1229 the line number count of a real section even if it has no relocs.
1230 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
1231
1232 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
1233 is too small.
1234
1235 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
1236
1237 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
1238 an undefined symbol in a shared link.
1239
1240 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
1241 oldtype from bfd_link_order_type to bfd_link_hash_type. From
1242 phdm@info.ucl.ac.be (Philippe De Muyter).
1243
1244 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
1245
1246 * coff-m88k.c (rtype2howto): New static function.
1247 (RTYPE2HOWTO): Use it rather than a macro definition.
1248
1249 * coffcode.h (coff_write_object_contents): set internal_a.magic
1250 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
1251
1252 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
1253 define TRAD_HEADER to new file hosts/delta68.h.
1254 m88*-motorola-sysv*, however, does use ptrace-core.o.
1255 * hosts/delta68.h: New file.
1256
1257 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
1258 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
1259
1260 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
1261
1262 * i386linux.c (MY(vec)): Declare before use.
1263
1264 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
1265
1266 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
1267 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
1268
1269 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1270 BFD is not of the right type.
1271 (bfd_elf_get_needed_list): Likewise.
1272 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
1273 * sunos.c (bfd_sunos_get_needed_list): Likewise.
1274 * xcofflink.c (XCOFF_XVECP): Define.
1275 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
1276 of the right type.
1277 (bfd_xcoff_import_symbol): Likewise.
1278 (bfd_xcoff_export_symbol): Likewise.
1279 (bfd_xcoff_link_count_reloc): Likewise.
1280 (bfd_xcoff_record_link_assignment): Likewise.
1281 (bfd_xcoff_size_dynamic_sections): Likewise.
1282
1283 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
1284 table index against the number of symbols for a base relative
1285 reloc.
1286
1287 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
1288 static function.
1289 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
1290 full_aouthdr flag here...
1291 (_bfd_xcoff_bfd_final_link): ...not here.
1292
1293 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
1294
1295 * libelf.h: Rename to elf-bfd.h to avoid conflict with
1296 systems that have a system <libelf.h>.
1297 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
1298 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
1299 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
1300 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
1301 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
1302 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
1303 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
1304
1305 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
1306
1307 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
1308 set, set BSF_WEAK in symbol. Change all callers.
1309 (ecoff_get_extr): Set weakext based on BSF_WEAK.
1310 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
1311 _bfd_generic_link_add_one_symbol.
1312 (ecoff_indirect_link_order): Check that the section tdata relocs
1313 are not NULL before using them.
1314
1315 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
1316 define TRAD_HEADER as hosts/alphalinux.h.
1317 * configure: Rebuild.
1318 * hosts/alphalinux.h: New file.
1319 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
1320 not int.
1321
1322 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
1323
1324 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
1325 C_ECOMM storage classes.
1326
1327 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
1328 of xcoff_mark.
1329 (xcoff_mark): Call xcoff_mark_symbol.
1330 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
1331 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
1332 doing it by hand.
1333 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
1334
1335 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
1336
1337 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
1338 field.
1339 (xcoff_find_reloc): New static function.
1340 (xcoff_link_add_symbols): Use it.
1341 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
1342 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
1343 relocate the value of C_DECL.
1344
1345 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
1346
1347 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
1348
1349 * cofflink.c (_bfd_coff_generic_relocate_section): Make
1350 callback decide what goes in .relocs.
1351 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
1352 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
1353 there is one.
1354
1355 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
1356
1357 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
1358 absolute section.
1359
1360 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
1361
1362 * xcofflink.c: More improvements, mostly to fix handling of
1363 constructors and a few other special cases.
1364 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
1365 zero, reverting yesterday's change.
1366 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
1367 (bfd_xcoff_link_count_reloc): Declare.
1368 (bfd_xcoff_record_link_assignment): Declare.
1369 * bfd-in2.h: Rebuild.
1370
1371 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
1372
1373 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
1374 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
1375 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
1376 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
1377 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
1378 Change PAGE_SIZE to TARGET_PAGE_SIZE.
1379
1380 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
1381 format.
1382
1383 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
1384 segments includes the a.out header. See to that the magic number
1385 *always* is big-endian.
1386
1387 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
1388 m68k4k NetBSD configurations.
1389
1390 * configure.in, configure: Separate i386 & mips NetBSD
1391 configurations from other BSD ones. Don't assume DEC is the only
1392 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
1393 configurations. Add support for m68k4k NetBSD object format.
1394
1395 * libaout.h: Added M_68K4K_NETBSD magic.
1396
1397 * m68k4knetbsd.c: New file.
1398
1399 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
1400
1401 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
1402 <machine/endian.h>.
1403
1404 * hosts/mipsnbsd.h: New file.
1405
1406 start-sanitize-gm
1407 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
1408
1409 * config.bfd: Add config stuff for mips*-*-magic* to set
1410 targ_defvec to ecoff_big_vec.
1411
1412 end-sanitize-gm
1413 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
1414
1415 * xcofflink.c: Numerous changes to get closer to a working XCOFF
1416 linker.
1417 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
1418 toc_section, and entry_section fields.
1419 (struct xcoff_section_tdata): Remove ldrel_count field.
1420 * libcoff.h: Rebuild.
1421 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
1422 fields.
1423 (coff_compute_section_file_positions): If RS6000COFF_C, generate
1424 full a.out header if full_aouthdr is set in xcoff_data.
1425 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
1426 based on sections stored in xcoff_data.
1427 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
1428 fields.
1429 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
1430 (rs6000coff_vec): Set symbol_leading_char to '.'.
1431 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
1432 value stored in ret rather than returning a pointer value.
1433
1434 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1435
1436 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
1437 format for now.
1438
1439 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
1440
1441 * som.c (som_slurp_string_table): Allocate the strings with malloc
1442 since they're free'd by free_cached_info.
1443 (som_slurp_symbol_table): Similarly for the symbol table.
1444
1445 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
1446
1447 * Makefile.in (diststuff): Don't make headers.
1448
1449 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
1450
1451 * Makefile.in: Rebuild dependencies.
1452
1453 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
1454 output_bfd is not SunOS.
1455 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
1456 non-SunOS input files.
1457
1458 * xcofflink.c: Extensive changes to support linking shared objects
1459 and generating a .loader section.
1460 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
1461 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
1462 last_symndx, and ldrel_count fields.
1463 * libcoff.h: Rebuild.
1464 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
1465 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
1466 is set.
1467 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
1468 (bfd_xcoff_export_symbol): Declare.
1469 (bfd_xcoff_size_dynamic_sections): Declare.
1470 * bfd-in2.h: Rebuild.
1471
1472 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
1473
1474 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
1475 * configure: Rebuild.
1476 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
1477 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
1478 contents.
1479 (pmac_xcoff_vec): Update to use new xcoff support.
1480 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
1481 (xcoff_write_armap): Declare buf as unsigned char.
1482 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
1483
1484 * mpw-make.sed: Generalize subdir_do edit.
1485
1486 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
1487
1488 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
1489 correctly. Don't initialize asect->vma.
1490
1491 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
1492
1493 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
1494 something a little less than the page size.
1495
1496 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
1497
1498 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
1499
1500 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
1501
1502 * coff-i386.c (coff_i386_reloc_type_lookup): New.
1503 * coffcode.h (coff_write_object_contents): If .bss is before
1504 .data us that as data_start.
1505 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
1506 calc correct.
1507 * peicode.h (add_data_entry): Use _cooked_size of data directory.
1508 (coff_swap_outhdr_out): Hardwire in version number.
1509
1510 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
1511
1512 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
1513 major and minor to *_vno, since the former are also macros in
1514 SunOS header files. Cast result of bfd_alloc to appropriate
1515 type.
1516
1517 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
1518 before assigning to sec_data.
1519
1520 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
1521
1522 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
1523 now relative to the section, not absolute.
1524 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
1525 get the file name when there is a N_SO directory name. When
1526 handling stabs, remember that section->vma was added to the
1527 offset.
1528
1529 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
1530
1531 * sunos.c (struct sunos_link_hash_table): Add needed field.
1532 (sunos_link_hash_table_create): Call bfd_release, not free.
1533 (sunos_link_hash_table_create): Initialize needed field.
1534 (sunos_add_dynamic_symbols): Record needed objects.
1535 (bfd_sunos_get_needed_list): New function.
1536 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
1537 * bfd-in2.h: Rebuild.
1538
1539 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
1540
1541 * libcoff-in.h (pe_data_type.in_reloc_p): New.
1542
1543 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
1544
1545 * bfd-in.h (struct bfd_link_needed_list): Rename from
1546 bfd_elf_link_needed_list.
1547 * bfd-in2.h: Rebuild.
1548 * elf.c, elflink.h, libelf.h: Corresponding changes.
1549
1550 Add start at AIX linker support; no shared libraries yet.
1551 * xcofflink.c: New file.
1552 * configure.in (rs600coff_vec): Use xcofflink.o.
1553 * configure: Rebuild.
1554 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
1555 fields.
1556 (struct xcoff_section_tdata): Define.
1557 (xcoff_section_data): Define macro.
1558 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
1559 (_bfd_xcoff_bfd_link_add_symbols): Declare.
1560 (_bfd_xcoff_bfd_final_link): Declare.
1561 (_bfd_ppc_xcoff_relocate_section): Declare.
1562 * libcoff.h: Rebuild.
1563 * coff-rs6000.c: Clean up a bit.
1564 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
1565 cputype, csects, and debug_indices.
1566 (xcoff_copy_private_bfd_data): Copy cputype.
1567 (xcoff_howto_table): Rename from rs6000coff_howto_table.
1568 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
1569 (xcoff_reloc_type_lookup): Rename from
1570 rs6000coff_reloc_type_lookup.
1571 (coff_relocate_section): Define.
1572 (_bfd_xcoff_sizeof_headers): Define.
1573 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
1574 (_bfd_xcoff_bfd_relax_section): Define.
1575 (_bfd_xcoff_bfd_link_split_section): Define.
1576 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
1577 coff.
1578 * coffcode.h (coff_compute_section_file_positions): If AIX,
1579 increment sofar by SMALL_AOUTSZ if not executable.
1580 (coff_write_object_contents): If AIX, always output an a.out
1581 header; if not executable, header size of SMALL_AOUTSZ.
1582 * hash.c (struct bfd_strtab_hash): Add xcoff field.
1583 (_bfd_stringtab_init): Initialize xcoff field.
1584 (_bfd_xcoff_stringtab_init): New function.
1585 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
1586 (_bfd_stringtab_emit): In XCOFF mode, write out length.
1587 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
1588 * libbfd.h: Rebuild.
1589 * Makefile.in: Rebuild dependencies.
1590 (BFD32_BACKENDS): Add xcofflink.o.
1591 (CFILES): Add xcofflink.c.
1592
1593 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
1594 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
1595 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
1596
1597 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1598
1599 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
1600
1601 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
1602
1603 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
1604 * config.in: Regenerated.
1605
1606 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
1607 (_bfd_chunksize): New variable.
1608 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
1609 for obstack chunk size.
1610 * configure.in: Check for getpagesize.
1611 * configure: Regenerated.
1612
1613 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1614
1615 * trad-core.c (rawptr): Make it a local variable of
1616 ptrace_unix_core_file_p.
1617
1618 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
1619
1620 * coff-arm.c (in_reloc_p): New.
1621 * coff-i386.c (in_reloc_p): New.
1622 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
1623 (coff_write_object_contents): Only set has_reloc_section
1624 if PE_IMAGE.
1625 * cofflink.c (_bfd_coff_generic_relocate_section): Call
1626 in_reloc_p to decide if reloc should be emitted.
1627 * libcoff.h (pe_data_type.in_reloc_p): New.
1628 * peicode.h (pe_mkobject): Initialize in_reloc_p.
1629
1630 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
1631
1632 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
1633 (_bfd_coff_read_internal_relocs): Likewise.
1634 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
1635 (_bfd_coff_read_internal_relocs): Likewise.
1636
1637 * elflink.h (elf_link_add_object_symbols): Correct conditions
1638 under which type and size change warnings are issued.
1639
1640 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
1641
1642 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
1643 a symbol which is not in a real section.
1644 (coff_write_native_symbol): Corresponding change.
1645
1646 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
1647 coff_link_hash_newfunc and make non-static.
1648 (_bfd_coff_link_hash_table_init): New function, broken out of
1649 _bfd_coff_link_hash_table_create.
1650 (_bfd_coff_link_hash_table_create): Use it.
1651 (process_embedded_commands): Make static.
1652 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
1653 (_bfd_coff_link_hash_table_init): Declare.
1654 * libcoff.h: Rebuild.
1655
1656 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
1657 field in XCOFF tdata.
1658 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
1659 U802ROMAGIC, for clarity. Try to set arch and machine correctly
1660 based on cputype stored in a.out header, or in n_type of initial
1661 .file symbol.
1662 (coff_write_object_contents): Set cputype correctly in a.out
1663 header.
1664 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
1665 warnings.
1666 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
1667 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
1668 old resv1 field.
1669 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
1670 * libcoff.h: Rebuild.
1671
1672 * cpu-rs6000.c (rs6000_compatible): New static function.
1673 (bfd_rs6000_arch): Use it.
1674 * cpu-powerpc.c (powerpc_compatible): New static function.
1675 (arch_info_struct): Define various flavours of PowerPC.
1676 (bfd_powerpc_arch): Use powerpc_compatible. Point at
1677 arch_info_struct.
1678
1679 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
1680
1681 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
1682
1683 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
1684
1685 * elflink.h (elf_link_add_object_symbols): Don't warn about
1686 changing the size or type if the old definition was weak.
1687
1688 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
1689
1690 * coffcode.h (combined_entry_type): Add fix_line field.
1691 (coff_slurp_line_table): Warn if we try to set the lineno field of
1692 a symbol twice.
1693 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
1694 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
1695 * coffgen.c (coff_mangle_symbols): Handle fix_line.
1696 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
1697 absolute section.
1698 (coff_print_symbol): Print fix_value symbols in a useful fashion.
1699 * libcoff.h: Rebuild.
1700
1701 * libcoff-in.h (struct xcoff_tdata): Define.
1702 (xcoff_data): Define.
1703 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
1704 * bfd-in2.h, libcoff.h: Rebuild.
1705 * coff-rs6000.c (xcoff_mkobject): New static function.
1706 (coff_mkobject): Define.
1707 (xcoff_copy_private_bfd_data): New static function.
1708 (coff_bfd_copy_private_bfd_data): Define.
1709 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
1710 signed to bitfield.
1711 (rs6000coff_vec): Add DYNAMIC to object_flags.
1712 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
1713 .loader sections specially.
1714 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
1715 section alignment from the XCOFF tdata information.
1716 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
1717 F_SHROBJ, and copy the extra a.out header information into the
1718 XCOFF tdata structure.
1719 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
1720 F_DYNLOAD and the extra a.out header information.
1721 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
1722 C_HIDEXT symbol with attached csect information.
1723 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
1724 in the o_maxdata field.
1725 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
1726 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
1727 end if BSF_NOT_AT_END is set.
1728
1729 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
1730 _bfd_read_ar_hdr_fn.
1731 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
1732 * bfd-in2.h, libbfd.h: Rebuild.
1733 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
1734 return value.
1735 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
1736 (bfd_slurp_bsd_armap_f2): Likewise.
1737 (_bfd_slurp_extended_name_table): Likewise.
1738
1739 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
1740
1741 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1742
1743 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
1744 when the symbol table is empty.
1745
1746 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
1747 space for section symbols, since we don't output them either.
1748 (elf_m68k_adjust_dynindx): Removed.
1749
1750 * ptrace-core.c (rawptr): Make it a local variable of
1751 ptrace_unix_core_file_p.
1752
1753 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1754
1755 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
1756 NULL.
1757
1758 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
1759 Mac object file formats.
1760
1761 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
1762
1763 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
1764 auxent if there isn't one.
1765 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
1766 rather than FILNMLEN as the maximum name length.
1767
1768 * coffcode.h (bfd_coff_backend_data): Add new field
1769 _bfd_coff_print_aux.
1770 (bfd_coff_print_aux): New static function.
1771 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
1772 scnlen field of an XTY_LD csect aux entry.
1773 (coff_print_aux): New static function.
1774 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
1775 in coff_pointerize_aux_hook.
1776 (bfd_coff_std_swap_table): Initialize new field.
1777 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
1778 * libcoff.h: Rebuild.
1779 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1780 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1781
1782 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
1783 if there are symbols, for native AIX ld compatibility.
1784
1785 * coffcode.h (bfd_coff_backend_data): Add new field
1786 _bfd_coff_pointerize_aux_hook.
1787 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
1788 or I960, and as 0 otherwise.
1789 (bfd_coff_std_swap_table): Initialize new field.
1790 * libcoff.h: Rebuild.
1791 * coffgen.c (coff_pointerize_aux): Change parameters to take
1792 symbol pointer instead of type and class, and to take aux index.
1793 Call _bfd_coff_pointerize_aux_hook if it is defined.
1794 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
1795 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
1796 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1797
1798 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
1799 read-only/host-only support.
1800
1801 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
1802 BSF_LOCAL.
1803 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
1804 RS6000COFF_C.
1805
1806 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
1807 BFD_JUMP_TABLE_ARCHIVE accordingly.
1808 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
1809 (_bfd_compute_and_write_armap): Declare.
1810 (_bfd_generic_read_ar_hdr): Declare.
1811 (_bfd_read_ar_hdr): Define.
1812 (_bfd_noarchive_read_ar_hdr): Define.
1813 (_bfd_archive_bsd_read_ar_hdr): Define.
1814 (_bfd_archive_coff_read_ar_hdr): Define.
1815 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
1816 _bfd_read_ar_hdr instead.
1817 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
1818 (_bfd_compute_and_write_armap): Rename from
1819 compute_and_write_armap. Make non-static. Change all callers.
1820 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
1821 than _bfd_snarf_ar_hdr.
1822 * aout-target.h (MY_read_ar_hdr): Define if not defined.
1823 * ieee.c (ieee_read_ar_hdr): Define.
1824 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
1825 * oasys.c (oasys_read_ar_hdr): Define.
1826 * som.c (som_read_ar_hdr): Define.
1827 * bfd-in2.h, libbfd.h: Rebuild.
1828
1829 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
1830
1831 * peicode.c (coff_swap_filehdr_in): If symptr is
1832 zero, there aren't any symbols, even if nsyms is set.
1833
1834 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
1835
1836 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
1837 field.
1838 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
1839 sections, and set styp correctly for them: .got, .hash, .dynamic,
1840 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
1841 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
1842 types.
1843 (ecoff_sort_hdrs): New static function.
1844 (ecoff_compute_section_file_positions): Return boolean, not void.
1845 Sort the sections by VMA before looking through them. Put the
1846 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
1847 section on an appropriate boundary within the page.
1848 (ecoff_compute_reloc_file_positions): Check return value of
1849 ecoff_compute_section_file_positions.
1850 (_bfd_ecoff_set_section_contents): Likewise.
1851 (_bfd_ecoff_write_object_contents): Check for various Alpha
1852 section types when incrementing text_size and data_size. Call
1853 adjust_headers backend function if it exists.
1854 * coff-alpha.c (alpha_adjust_headers): New static function.
1855 (alpha_ecoff_backend_data): Initialize adjust_headers field.
1856 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1857
1858 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
1859
1860 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
1861
1862 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
1863 of ALTERNATE_AIX_CORE_FORMAT.
1864 * configure.in (aix4): No longer need CORE_FLAGS.
1865 * configure: Updated.
1866
1867 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
1868
1869 NS32k changes from Ian Dall:
1870 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
1871 macros.
1872 (aout_link_input_section_std, aout_link_input_section_ext,
1873 aout_link_reloc_link_order): Call them instead of _bfd_*
1874 versions.
1875 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
1876 to zero.
1877 (backend_data): Use it instead of hardcoded zero.
1878
1879 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
1880 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
1881
1882 * ns32knetbsd.c: Include bfd.h.
1883 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
1884 (MY_bfd_reloc_type_lookup): Declare function too.
1885 * pc532-mach.c (set_sizes): Don't declare.
1886 (MY_text_includes_header, MY_exec_header_not_counted): Define.
1887 (backend_data, MY_backend_data): Don't define.
1888
1889 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
1890 ns32k-*-lites* like ns32k-*-netbsd*.
1891
1892 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
1893 compile on lites.
1894
1895 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
1896
1897 * coffcode.h (coff_write_object_contents): Restore setting
1898 f_timdat to 0, deleted on August 22.
1899
1900 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
1901
1902 * coffcode.h (coff_bfd_copy_private_symbol_data,
1903 coff_bfd_copy_private_section_data,
1904 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
1905 * peicode.h (coff_bfd_copy_private_bfd_data): New
1906 (pe_bfd_copy_private_bfd_data): New.
1907 (coff_swap_scnhdr_in): Swap bss size into the right place.
1908 (pe_print_private_bfd_data): Add some newlines.
1909
1910 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
1911
1912 * som.c (setup_sections): Don't die if a space has no subspaces.
1913
1914 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
1915
1916 * elflink.h (elf_link_add_object_symbols): Don't let a weak
1917 dynamic symbol override a common symbol. Don't change the size or
1918 type if they have been set and the new symbol is not a definition.
1919 Warn if the size or type changes.
1920
1921 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
1922
1923 * som.c (som_begin_writing): Don't write the symbol table or
1924 symbol strings.
1925 (som_finish_writing): Write them here. Place them after the
1926 subspace data, but before the relocs.
1927
1928 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
1929
1930 * sunos.c (sunos_add_one_symbol): Just pass false, not
1931 info->shared_library, to sunos_create_dynamic_sections.
1932 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
1933 section.
1934 (sunos_check_dynamic_reloc): Remove .text section assertion.
1935
1936 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
1937
1938 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
1939 * configure, configure.in: Add pmac_xcoff_vec case.
1940 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
1941 * coff-pmac.c: New file, PowerMac XCOFF support.
1942 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
1943 * targets.c (pmac_xcoff_vec): Declare.
1944
1945 * mpw-config.in: Various changes to be compatible with the
1946 autoconf-based configury.
1947 * mpw-make.sed: New file, sed commands to translate Unix
1948 makefile into MPW syntax.
1949 * mpw-make.in: Remove.
1950 * hosts/mpw.h: Remove.
1951 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
1952 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
1953
1954 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
1955
1956 * binary.c (binary_get_symtab): Return an empty string on error.
1957 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
1958
1959 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
1960
1961 * coff-ppc.c: Reformatted according to gnu conventions
1962 Removed irrelevant "if 0" code
1963
1964 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
1965
1966 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
1967 symbols rather than as indirect symbols.
1968 (MY(slurp_symbol_table)): Don't do anything special about
1969 secondary symbols.
1970
1971 * coffcode.h (coff_new_section_hook): Make sure that the alignment
1972 of .ctors and .dtors sections is no larger than 2.
1973
1974 * sunos.c (sunos_add_one_symbol): Don't change
1975 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
1976 undef list.
1977 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
1978 dynamic symbols when creating a shared library.
1979 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
1980 shared library.
1981 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
1982 written even if it is not defined in a regular object.
1983 (sunos_write_dynamic_symbol): Use plt_offset for the address of
1984 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
1985 rather than the constant 22.
1986 (sunos_check_dynamic_reloc): Handle creating a shared library.
1987 (sunos_finish_dynamic_link): Set the first entry in the GOT to
1988 zero when creating a shared library.
1989 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
1990 write it out at the start of the symbol table.
1991
1992 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
1993
1994 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
1995
1996 * config.bfd: Add arm-*-coff.
1997 * configure.in, configure: Add armcoff_{little,big}_vec.
1998 * targets.c (armcoff_{little,big}_vec): Declare.
1999 (bfd_target_vector): Add armcoff_{little,big}_vec.
2000 * coff-arm.c (armcoff_{little,big}_vec): Always define.
2001
2002 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
2003
2004 * targets.c (bfd_find_target): Remove debugging code.
2005
2006 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
2007
2008 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
2009 support on powerpc.
2010 * Makefile.in: added *-ppc files
2011 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
2012 allow pe based .o's to be shared with other tools on ppc/NT
2013 * config.bfd: added powerpc[le]-[pe|winnt] config support
2014 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
2015 * peicode.h: Added more section flags for PE on ppc
2016 Added coff_swap_filehdr_out to allow peicode.h to be
2017 used for non-image PE files on ppc.
2018 Check for image, or not, before copying pe_opthdr
2019 * targets.c: Added new bfd's
2020 * targets.c: Removed two inactive bfds that shouldn't have made it this
2021 far.
2022
2023 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2024
2025 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
2026 explicit values to initialize all relocs. Change all users.
2027 (ppc_elf_brtaken_inner): New function to handle branch predicition
2028 relocs.
2029 (ppc_elf_brtaken_reloc): Ditto.
2030 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
2031 relocs use ppc_elf_unsupported_reloc.
2032 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
2033 needs to be reported.
2034 (ppc_elf_relocate_section): Support branch prediction relocs.
2035
2036 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
2037
2038 * bfd.c (bfd_assert): Remove \n from string passed to
2039 _bfd_error_handler.
2040
2041 * coff-i386.c: (TWO_DATA_SECS): Don't define.
2042 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
2043 (bfd_coff_make_section_hook): Don't define.
2044 (coff_make_section_hook): Remove.
2045 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
2046 (styp_to_sec_flags): Likewise.
2047 (coff_write_object_contents): Likewise.
2048 (bfd_coff_std_swap_table): Don't initialize make_section_hook
2049 field.
2050 * libcoff.h: Rebuild.
2051 * coffgen.c (make_a_section_from_file): Just call
2052 bfd_make_section_anyway, not bfd_make_section or
2053 bfd_coff_make_section_hook.
2054 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
2055 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
2056 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
2057 make_section_hook field.
2058 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2059
2060 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
2061 pointers into value field for warning and indirect symbols; just
2062 leave the value field alone.
2063 * linker.c (generic_link_add_symbol_list): Use next symbol for
2064 warning and indirect symbols, rather than looking in symbol value.
2065 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
2066 parameter. Change all callers. Remove support for indirect
2067 symbols; it didn't work anyhow.
2068 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
2069 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
2070 * bfd-in2.h: Rebuild.
2071
2072 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2073
2074 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
2075 go back to telling the tools this reloc operates on 32 bits.
2076
2077 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
2078
2079 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
2080 rather than a direct fprintf.
2081 * archive.c (_bfd_write_archive_contents): Likewise.
2082 * coffcode.h (coff_slurp_symbol_table): Likewise.
2083 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
2084 (ppc_elf_unsupported_reloc): Likewise.
2085 (ppc_elf_relocate_section): Likewise.
2086 * i386linux.c (linux_tally_symbols): Likewise.
2087 (linux_finish_dynamic_link): Likewise.
2088 * osf-core.c (osf_core_core_file_p): Likewise.
2089 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
2090 * som.c (som_sizeof_headers): Likewise.
2091 * srec.c (srec_bad_byte): Likewise.
2092 * bfd.c (bfd_assert): Likewise. Also change file to be const.
2093 * libbfd-in.h (bfd_assert): Declare first parameter const.
2094 * libbfd.h: Rebuild.
2095 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
2096 bfd_reloc_overflow is enough.
2097 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
2098 * coff-h8500.c (rtype2howto): Likewise.
2099 * coff-z8k.c (rtype2howto): Likewise.
2100 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
2101 * elf.c (_bfd_elf_get_lineno): Likewise.
2102 (_bfd_elf_no_info_to_howto): Likewise.
2103 (_bfd_elf_no_info_to_howto_rel): Likewise.
2104 * hp300hpux.c (convert_sym_type): Likewise.
2105 (MY(swap_std_reloc_in)): Likewise.
2106 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
2107
2108 * libaout.h (struct aoutdata): Add line_buf field.
2109 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
2110 and filename_buffer. Instead, use a malloc buffer stored in the
2111 new line_buf field. Remove length restrictions.
2112
2113 * coffgen.c (string_size): Remove static variable.
2114 (debug_string_size, debug_string_section): Likewise.
2115 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
2116 and debug_string_size_p parameters. Use them instead of the
2117 global variables. Change all callers.
2118 (coff_write_symbol): Likewise.
2119 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
2120 (coff_write_symbols): Add local variables to replace removed
2121 global variables.
2122
2123 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
2124 function, and line_base fields.
2125 * libcoff.h: Rebuild.
2126 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
2127 information, rather than using static variables.
2128
2129 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
2130 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
2131
2132 * init.c (initialized): Remove static variable.
2133 (bfd_init): Don't bother setting initialized.
2134 (bfd_check_init): Remove.
2135 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
2136 * libbfd.h: Rebuild.
2137
2138 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2139
2140 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
2141 size for full core dumps. Copy core file header to private data.
2142 (rs6000coff_core_file_failing_command,
2143 rs6000coff_core_file_failing_signal): New functions to extract
2144 the file name and terminating signal from the core file.
2145 * coff-rs6000.c: Use them.
2146
2147 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
2148
2149 Change arch info to be const, initialized at compile time.
2150 * archures.c: Reindent many functions. Change CONST to const.
2151 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
2152 nothing set it anyhow. Make next const.
2153 (bfd_arch_info_list): Remove.
2154 (bfd_archures_list): Rename from archures_init_table. Change from
2155 a table of function pointers to a table of bfd_arch_info_type
2156 structure addresses.
2157 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
2158 (bfd_lookup_arch): Likewise.
2159 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
2160 const pointer.
2161 (bfd_default_arch_struct): Make const.
2162 (bfd_arch_init, bfd_arch_linkin): Remove.
2163 (bfd_get_arch_info): Return a const pointer.
2164 * init.c (bfd_init): Don't call bfd_arch_init.
2165 * bfd.c (struct _bfd): Make arch_info const.
2166 * bfd-in2.h: Rebuild.
2167 * libbfd.h: Rebuild.
2168 * configure.in: Put & before everything in $selarchs.
2169 * configure: Rebuild.
2170 * cpu-*.c: Change bfd_*_arch from a function which calls
2171 bfd_arch_linkin to a const structure.
2172 * ieee.c (ieee_object_p): Make arch const.
2173
2174 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2175
2176 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
2177 PowerPC V.4.
2178 * bfd-in2.h: Regenerate.
2179 * libbfd.h: Regenerate.
2180
2181 * elf32-ppc.c (reloc_type): Update names to match current draft.
2182 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
2183 relative. Update names to current V.4 draft.
2184 (ppc_elf_reloc_type_lookup): Add support for more relocations.
2185 (ppc_elf_relocate_section): Rename relocations to match draft.
2186
2187 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
2188
2189 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
2190 compiled with -mrelocatable-lib to be linked with either normal
2191 modules or -mrelocatable modules.
2192
2193 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
2194
2195 * coffcode.h (coff_write_object_contents): Clear the vstamp field
2196 in the a.out header.
2197
2198 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
2199 a reloc against a local symbol, even if it's not a section.
2200
2201 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
2202
2203 * targets.c (bfd_target): Remove unused align_power_min field.
2204 * bfd-in2.h: Rebuild.
2205 * All backends: Remove initialization of align_power_min.
2206
2207 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
2208
2209 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
2210
2211 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
2212
2213 * config.bfd (mips-dec-netbsd*): New target.
2214 * configure.host (mips-dec-netbsd*): New host.
2215 * configure.in (mips-dec-netbsd*): New native.
2216 * configure: Rebuild.
2217
2218 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
2219
2220 Make the COFF backend linker merge common types:
2221 * cofflink.c (struct coff_debug_merge_element): Define.
2222 (struct coff_debug_merge_type): Define.
2223 (struct coff_debug_merge_hash_entry): Define.
2224 (struct coff_debug_merge_hash_table): Define.
2225 (coff_debug_merge_hash_table_init): Define.
2226 (coff_debug_merge_hash_table_free): Define.
2227 (coff_debug_merge_hash_lookup): Define.
2228 (struct coff_final_link_info): Add debug_merge field.
2229 (coff_debug_merge_hash_newfunc): New static function.
2230 (_bfd_coff_final_link): Allocate and free debug_merge table.
2231 (coff_link_input_bfd): Merge identical enum, struct and union
2232 types.
2233
2234 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
2235
2236 Convert i960 COFF to use COFF backend linker.
2237 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
2238 structure to store the symbol being used.
2239 (coff_i960_start_final_link): New static function.
2240 (coff_i960_relocate_section): New static function.
2241 (coff_i960_adjust_symndx): New static function.
2242 (coff_start_final_link): Define.
2243 (coff_relocate_section): Define.
2244 (coff_adjust_symndx): Define.
2245 * coffcode.h (bfd_coff_backend_data): Add new callback function
2246 _bfd_coff_start_final_link.
2247 (bfd_coff_start_final_link): Define.
2248 (coff_start_final_link): Define if not defined.
2249 (bfd_coff_std_swap_table): Add coff_start_final_link.
2250 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
2251 visible.
2252 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
2253 function callback is not NULL.
2254 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
2255 (_bfd_coff_internal_syment_name): Declare.
2256 * libcoff.h: Rebuild.
2257 * configure.in (icoff_big_vec): Add cofflink.o.
2258 (icoff_little_vec): Likewise.
2259 * configure: Rebuild.
2260
2261 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
2262
2263 * Makefile.in (clean-info): Remove extraneous tab from line
2264 following action.
2265
2266 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
2267
2268 * cofflink.c (coff_link_input_bfd): Fail if a section with no
2269 contents has relocs.
2270
2271 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
2272
2273 * coffcode.h (coff_compute_section_file_positions): Keep the
2274 raw size safe.
2275 (coff_write_object_contents): Remember if it's a relocatable
2276 file.
2277 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
2278 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
2279 if relocatable file. Swap out saved raw size.
2280
2281 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
2282
2283 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
2284 (maintainer-clean): Rename from realclean, passing
2285 maintainer-clean down to subdirectories, but leave realclean as a
2286 synonym.
2287
2288 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
2289 warning callback.
2290
2291 * dep-in.sed: Remove config.h from generated dependencies.
2292
2293 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
2294 broken out of sunos_canonicalize_dynamic_symtab.
2295 (sunos_canonicalize_dynamic_symtab): Call new function
2296 sunos_slurp_dynamic_symtab.
2297 (sunos_add_dynamic_symbols): Add three new parameters. Return the
2298 dynamic symbol table to the caller.
2299 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
2300 callback to override the symbols being read.
2301 * libaout.h (struct aout_backend_data): Add three new parameters
2302 to add_dynamic_symbols callback.
2303
2304 Extensive minor changes to avoid various gcc warnings. Also:
2305 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
2306 * archures.c (bfd_arch_info_type): Change mach field from long to
2307 unsigned long.
2308 (bfd_lookup_arch): Change machine parameter from long to unsigned
2309 long.
2310
2311 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
2312
2313 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
2314 a symbol with a non-zero plt_offset.
2315
2316 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
2317
2318 * elfcode.h (align_file_position): Remove; not used.
2319
2320 * configure.in: Only check for <sys/procfs.h> on a native system,
2321 and make sure it defines prstatus_t.
2322 * configure: Rebuild.
2323
2324 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
2325
2326 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
2327
2328 * config.in: Rename from config.h.in.
2329 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
2330 Check for config.h:config.in when creating stamp-h.
2331 * configure: Rebuild.
2332 * Makefile.in (stamp-h): Depend upon config.in rather than
2333 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
2334 calling config.status.
2335
2336 * Makefile.in (do_distclean): Remove config.h and stamp-h.
2337 (Makefile): Just rebuild Makefile.
2338 (config.h, stamp-h): New targets.
2339 * configure.in: Create stamp-h when rebuilding config.h.
2340 * configure: Rebuild.
2341
2342 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
2343
2344 * configure.in: Call AC_CONFIG_HEADER. Substitute
2345 HOST_64BIT_LONG. Check that various header files exist. Check
2346 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
2347 and/or free need to be declared. Don't make a link to sysdep.h.
2348 Define TRAD_HEADER for various hosts.
2349 * configure: Rebuild.
2350 * configure.host: Don't set my_host. Add definitions taken from
2351 host header files for various entries. Remove entries which now
2352 do nothing.
2353 * acconfig.h: New file.
2354 * config.h.in: New file, built by autoheader.
2355 * sysdep.h: New file.
2356 * Makefile.in (do_distclean): Don't remove sysdep.h.
2357 (RECONFIG): Remove.
2358 (LOCAL_H_DEPS): New variable.
2359 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
2360 $(RECONFIG).
2361 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
2362 ($(OPTIONAL_BACKENDS)): Likewise.
2363 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
2364 looking through sysdep.h.
2365 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
2366 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
2367 (fprintf_vma, sprintf_vma): Likewise.
2368 (int64_type, uint64_type): Don't define.
2369 * bfd-in2.h: Rebuild.
2370 * archures.c, bfd.c, srec.c: Include <ctype.h>.
2371 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
2372 * lynx-core.c: Include stuff from old hosts/lynx.h.
2373 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
2374 rather than NO_FCNTL.
2375 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
2376 rather than NATIVE_HPPAHPUX_COMPILER.
2377 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
2378 is defined.
2379 * hosts/*.h: Remove all header files which merely include,
2380 declare, and define things. Leave header files which define
2381 information needed by trad-core.c.
2382
2383 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
2384 (BFD_CC_FOR_BUILD): Define.
2385 * configure.in: Use BFD_CC_FOR_BUILD.
2386 * configure: Rebuild.
2387
2388 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
2389
2390 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
2391 * configure: Rebuild.
2392
2393 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
2394 a global symbol.
2395
2396 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
2397
2398 * config.bfd: i386pe_ve -> i386pe_vec.
2399
2400 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
2401
2402 * configure.host: Incorporate host Makefile fragments by setting
2403 shell variables.
2404 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
2405 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
2406 value based on whether the code is being compiled by a cross
2407 compiler. Don't substitute host_makefile_frag or frags.
2408 * aclocal.m4: New file to define local AC_PROG_CC.
2409 * configure: Rebuild.
2410 * Makefile.in (INSTALL): Set to @INSTALL@.
2411 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
2412 (INSTALL_DATA): Set to @INSTALL_DATA@.
2413 (AR): Set to @AR@.
2414 (CC): Define as @CC@.
2415 (CFLAGS): Set to @CFLAGS@.
2416 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
2417 (@host_makefile_frag@): Remove.
2418 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
2419 after other options.
2420 (config.status): Remove dependency upon @frags@.
2421 * config/*.mh, config/README: Remove.
2422
2423 * config.bfd: Rewrite to incorporate the contents of the Makefile
2424 fragments by setting shell variables, rather than merely returning
2425 the name of a Makefile fragment.
2426 * configure.in: Use shell variables set by config.bfd rather than
2427 looking at the target Makefile fragment files. Don't substitute
2428 target_makefile_frag. Do substitute TDEFINES.
2429 * configure: Rebuild.
2430 * Makefile.in (@target_makefile_frag@): Remove.
2431 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
2432 * config/*.mt: Remove.
2433
2434 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
2435
2436 * configure.in: Put changequote lines around "i[345]86" patterns
2437 section of core file support.
2438
2439 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
2440
2441 * som.c (som_bfd_print_private_bfd_data): Define to use the
2442 generic version.
2443
2444 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
2445
2446 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
2447 entry, text_start and data_start.
2448
2449 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
2450
2451 * Makefile.in (OFILES): Remove $(TDEPFILES).
2452 * config/apollo.mt (TDEPFILES): Remove.
2453 * config/README: Update.
2454
2455 * configure.in: For a native configuration, set COREFILE and
2456 COREFLAG based on the canonical host name.
2457 * configure: Rebuild.
2458 * Makefile.in: Rebuild dependencies.
2459 (ALL_CFLAGS): Add @COREFLAG@.
2460 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
2461 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
2462 support routines. Check LYNX_CORE rather than HOST_LYNX.
2463 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
2464 * i386lynx.c: Likewise.
2465 * m68klynx.c: Likewise.
2466 * sparclynx.c: Likewise.
2467 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
2468 * *-core.c: Comment changes.
2469 * config/decstation.mh (HDEPFILES): Remove.
2470 (HDEFINES): Remove -DTRAD_CORE.
2471 * config/irix3.mh (RANLIB): Remove.
2472 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
2473 (HDEFINES): Remove -DIRIX_CORE.
2474 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
2475 (HDEFINES): Remove -DTRAD_CORE.
2476 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
2477 * config/ultra3.mh (RANLIB): Remove.
2478 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
2479 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
2480 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
2481 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
2482 * config/hppahpux.mh, config/hppaosf.mh: Remove.
2483 * config/i386aix.mh, config/i386bsd.mh: Remove.
2484 * config/i386linux.mh, config/i386mach3.mh: Remove.
2485 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
2486 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
2487 * config/mipsmach3.mh, config/news-mips.mh: Remove.
2488 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
2489 * config/rs600.mh, config/rs6000lynx.mh: Remove.
2490 * config/solaris2.mh, config/stratus.mh: Remove.
2491 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
2492 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
2493
2494 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
2495
2496 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
2497 DT_FINI entry if the appropriate symbol is not in the hash table.
2498
2499 * libelf.h (struct elf_backend_data): Add create_program_headers
2500 and want_hdr_in_seg fields.
2501 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
2502 defined.
2503 (elf_backend_create_program_headers): Likewise.
2504 (elfNN_bed): Initialize create_program_headers and
2505 want_hdr_in_seg.
2506 * elf.c (get_program_header_size): Call create_program_headers
2507 backend routine.
2508 (map_program_segments): Check want_hdr_in_seg backend field. Call
2509 create_program_headers backend routine.
2510
2511 * elf.c (assign_file_positions_except_relocs): Align non allocated
2512 sections when creating an executable.
2513
2514 * elfcode.h (elf_swap_phdr_in): Make non static.
2515 (elf_swap_phdr_out): Make non static.
2516 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
2517 (bfd_elf32_swap_phdr_out): Declare.
2518 (bfd_elf64_swap_phdr_in): Declare.
2519 (bfd_elf64_swap_phdr_out): Declare.
2520
2521 * ecofflink.c (ecoff_collect_shuffle): New static function.
2522 (_bfd_ecoff_get_accumulated_pdr): New function.
2523 (_bfd_ecoff_get_accumulated_sym): New function.
2524 (_bfd_ecoff_get_accumulated_ss): New function.
2525 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
2526 (_bfd_ecoff_get_accumulated_sym): Declare.
2527 (_bfd_ecoff_get_accumulated_ss): Declare.
2528 * libbfd.h: Rebuild.
2529
2530 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
2531
2532 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
2533
2534 * elflink.h (elf_link_add_object_symbols): Handle indirect and
2535 warning symbols. If any section is named .gnu.warning.XXX, treat
2536 the contents as a warning to be issued if the symbol XXX is
2537 referenced.
2538 (elf_link_output_extsym): For an indirect or warning symbol, just
2539 output the symbol it points to.
2540
2541 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
2542 if bfd_hash_allocate fails, since it will already be set.
2543 (generic_link_hash_newfunc): Likewise.
2544 (archive_hash_newfunc): Likewise.
2545 (hash_entry_bfd): New static function.
2546 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
2547 callback. Allocate a new warning using the hash table newfunc.
2548 Use bfd_hash_replace to update the entry in the hash table, rather
2549 than assuming we can copy the fields with structure assignment.
2550
2551 * hash.c (bfd_hash_replace): New function.
2552 * bfd-in.h (bfd_hash_replace): Declare.
2553 * bfd-in2.h: Rebuild.
2554
2555 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
2556
2557 * config.bfd: Add mips*vr4300-*-elf* target.
2558 * config/mipsbvr4300.mt: Added.
2559
2560 See file ChangeLog.2
2561
2562 \f
2563 Local Variables:
2564 mode: indented-text
2565 left-margin: 8
2566 fill-column: 74
2567 version-control: never
2568 End: