Reloc fixes for PowerPC PE
[binutils-gdb.git] / bfd / ChangeLog
1 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2
3 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
4 (coff_ppc_relocate_section): Handle TOCDEFN attribute
5 (coff_ppc_relocate_section): Correct REL24 handling
6 (ppc_process_before_allocation): Correct TOCDEFN handling
7
8 * peicode.h (dir_names): Added name descriptions
9
10 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
11
12 * VERSION: Updated to cygnus-2.6.
13
14 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
15
16 * targets.c (m68k4knetbsd_vec): Declare.
17
18 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
19
20 * targets.c (bfd_target): Change type of second argument to
21 _bfd_print_private_bfd_data from void * to PTR.
22 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
23 using PTR rather than void *.
24 * bfd-in2, libbfd.h: Rebuild.
25 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
26 to PTR.
27 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
28 _bfd_generic_bfd_print_private_bfd_data rather than casting
29 bfd_true.
30
31 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
32
33 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
34 "DO NOT DELETE" lines or blank lines that mkdep writes on some
35 systems.
36 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
37 BFD64_BACKENDS_CFILES): New variables.
38 (CFILES): Use them.
39
40 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
41
42 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
43 not at the file position of the first section.
44 * coffcode.h (coff_compute_section_file_positions): Avoid using
45 unportable #elif.
46 (coff_write_object_contents): When generating a PPC PE executable
47 with no symbols, round up the file size to a COFF_PAGE_SIZE
48 boundary.
49 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
50 don't write out a string table.
51
52 * elf.c (bfd_section_from_shdr): When using a different section
53 header, pass the new one to _bfd_elf_make_section_from_shdr.
54 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
55 (elf_map_symbols): Add section VMA to symbol value when comparing
56 against 0.
57 (_bfd_elf_compute_section_file_positions): Only build symbol table
58 if there are some symbols. Set file offset of symtab and strtab
59 sections.
60 (assign_file_positions_except_relocs): Remove dosyms parameter.
61 Change all callers. Never set file offset of symtab and strtab
62 sections.
63 (_bfd_elf_copy_private_section_data): New function.
64 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
65 (_bfd_elf_copy_private_symbol_data): New function.
66 (swap_out_syms): Check for special mapping of st_shndx created by
67 copy_private_symbol_data.
68 * elfxx-target.h: Use new copy routines.
69 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
70 (_bfd_elf_copy_private_section_data): Declare.
71
72 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
73
74 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
75 C_NT_WEAK.
76
77 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
78 _bfd_dummy_target, matching the recent change to archive
79 recognition.
80
81 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
82
83 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
84 arithmetic on PTR types.
85
86 * aout-target.h (MY(callback)): Set the lma of the sections.
87
88 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
89 symbol into a reloc against the section.
90
91 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
92
93 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
94 glue for the relocs: IMGLUE and IFGLUE.
95 (record_toc): new function - tracks toc contents
96 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
97 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
98 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
99 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
100 (ppc_record_toc_entry): Removed a debug define (duh)
101
102 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
103 (pe_print_idata): New function - formats the idata section data
104 (pe_print_pdata): New function - formats the pdata section data
105 (pe_print_private_bfd_data): calls to above
106
107 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
108
109 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
110 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
111 TARGET_SYM and TARGET_NAME for vector and BFD name.
112 * coff-pmac.c (pmac_xcoff_vec): Remove.
113 (TARGET_SYM, TARGET_NAME): Define.
114 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
115 machine to 0, not all PowerMacs are 601s.
116
117 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
118
119 * elfcode.h (elf_object_p): Read in any program headers.
120 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
121 based on the program headers, if any.
122 (elf_fake_sections): Set sh_addr from the vma, not the lma.
123 (map_program_segments): Set p_paddr of program headers based on
124 the lma.
125
126 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
127
128 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
129 failure.
130
131 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
132 trying to do a relocateable link with a non-a.out object file.
133
134 * archive.c (bfd_generic_archive_p): Check the first object file
135 in an archive even if target_defaulted is set. If the object file
136 has the wrong xvec, reject it.
137
138 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
139 be represented, report the name via _bfd_error_handler.
140 (translate_to_native_sym_flags): Likewise.
141 * elf32-mips.c (mips_elf_final_link): Likewise.
142 * oasys.c (oasys_write_sections): Likewise.
143
144 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
145 which checks for STYP_OVRFLO sections.
146 (coff_compute_section_file_positions): If RS6000COFF_C, handle
147 reloc and lineno count overflows.
148 (coff_write_object_contents): Call coff_count_linenumbers before
149 coff_compute_section_file_positions. If RS6000COFF_C, handle
150 reloc and lineno count overflows.
151 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
152 relocs before dealing with .pad sections. Count overflow section
153 headers when handling .pad sections.
154
155 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
156 if RS6000COFF_C.
157
158 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
159 (struct xcoff_link_hash_table): Add descriptor_section and
160 special_sections fields.
161 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
162 (xcoff_link_add_symbols): Set linkage section alignment. Create
163 descriptor section. Check for magic symbol names (_text, etc.),
164 and record them in special_sections if found. Set
165 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
166 descriptor field to point back to the function code symbol.
167 (xcoff_sweep): Always mark the special descriptor_section.
168 (bfd_xcoff_export_symbol): Check whether the symbol might be a
169 function descriptor, and mark it if it is.
170 (bfd_xcoff_size_dynamic_sections): Add new special_sections
171 parameter, and fill it in. Allocate space for the descriptor
172 section.
173 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
174 global linkage code. If an undefined function descriptor is
175 exported, arrange to define it. Warn about any other undefined
176 exported symbol.
177 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
178 (xcoff_write_global_symbol): Create a function descriptor when
179 necessary.
180 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
181 * bfd-in2.h: Rebuild.
182
183 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
184
185 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
186 (ppc_coff_link_hash_table): new types for hashing
187 (ppc_coff_link_hash_newfunc): hash entry constructor
188 (ppc_coff_link_hash_table_init): hash table initializer
189 (ppc_coff_link_hash_table_create): hash table constructor
190 (ppc_record_toc_entry): changed references to hash table
191 (coff_ppc_relocate_section): changed references to hash table
192
193 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
194 * libcoff.h: Rebuild
195
196 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
197 (coff_link_add_symbols): removed toc_offset init
198
199 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
200
201 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
202 first.
203
204 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
205 if it is given and mmep is available.
206 * acconfig.h: Undef USE_MMAP.
207 * configure, config.in: Regenerated.
208 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
209 table handling the old way.
210 (aout_get_external_symbols): Don't complain if last byte of string
211 table is nonzero.
212 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
213 (bfd_free_window) [! USE_MMAP]: Don't define.
214 (bfd_get_file_window,
215 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
216
217 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
218
219 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
220 0xffff0000.
221
222 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
223
224 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
225 compatible with AMD generated COFF files. Try to support both AMD
226 and GNU formats simultaneously.
227 (coff_a29k_relocate_section): Likewise.
228
229 * libbfd.c (bfd_get_file_window): Change writable parameter from
230 int to boolean; update all callers. Pass MAP_SHARED if not
231 writable--it's required on Solaris. Cast fprintf argument to
232 avoid warning.
233 * bfd-in.h (bfd_get_file_window): Update declaration.
234 * bfd-in2.h: Rebuild.
235 * aoutx.h: Update calls to bfd_get_file_window.
236
237 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
238 Change all uses.
239 (xcoff_swap_ldhdr_in): New static function.
240 (xcoff_swap_ldsym_in): New static function.
241 (xcoff_find_reloc): Handle the case of a single reloc correctly.
242 (xcoff_link_add_symbols): If we just created a descriptor, pass it
243 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
244 Handle XTY_ER/XMC_XO symbols correctly.
245 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
246 rather than normal symbol table.
247 (bfd_xcoff_import_symbol): It's not an error if the symbol is
248 already defined with the same absolute value.
249 (xcoff_mark): When considering called symbols, check whether the
250 descriptor is from a dynamic object, rather than the symbol
251 itself.
252 (xcoff_build_ldsyms): Likewise.
253
254 * libbfd.c (bfd_get_file_window): Change return type to boolean.
255 Cast realloc and malloc return values. If malloc or realloc fail,
256 set bfd_error_no_memory.
257 * bfd-in.h (bfd_get_file_window): Change type to boolean.
258 * bfd-in2.h: Rebuild.
259
260 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
261
262 * coff-ppc.c (ppc_record_toc_entry): new function.
263 (in_reloc_p): changed return value.
264 (coff_ppc_relocate_section): much rework.
265 (ppc_allocate_toc_section): new function.
266 (ppc_process_before_allocation): new function.
267 (ppc_coff_swap_sym_in_hook): new function.
268
269 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
270 (coff_link_add_symbols): initialize toc_offset.
271
272 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
273 (coff_swap_aouthdr_out): Added more sections to the data
274 dictionary for the pe file header. Also changed linker version
275 number on the ppc side.
276 (dir_names): small improvements to the dictionary printing.
277 (pe_mkobject_hook): save the file level flags.
278
279 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
280 (pe_tdata): added real_flags field
281 (coff_tdata): added local_toc_sym_map and access macro
282
283 * libcoff.h (coff_link_hash_entry): added toc_offset field
284 (pe_tdata): added real_flags field
285 (coff_tdata): added local_toc_sym_map and access macro
286
287 * coffcode.h (coff_set_alignment_hook): added hook for PE.
288 (coff_mkobject): init for local_toc_sym_map
289 (coff_write_object_contents): set the internal_a.magic to
290 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
291 ppc compilers use.
292
293 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
294
295 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
296 entries until both the line number address and the function name
297 address are too large.
298
299 * configure.in: Call AC_CHECK_PROG to find and cache AR.
300 * configure: Rebuilt.
301
302 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
303 is defined in the environment.
304
305 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
306
307 * som.c (som_get_section_contents_in_window): Define to use
308 generic version.
309
310 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
311
312 * coff-i860.c: New file, based on coff-i386.c.
313 * cpu-i860.c: New file, based on cpu-i386.c.
314 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
315 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
316 targets, using i860coff_vec.
317 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
318 trad-core.o and hosts/i860mach3.h.
319 (i860coff_vec): Use coff-i860.o and cofflink.o.
320 * configure: Rebuild.
321 * Makefile.in: Rebuild dependencies.
322 (ALL_MACHINES): Add cpu-i860.o.
323 (BFD32_BACKENDS): Add coff-i860.o.
324 (CFILES): Add cpu-i860.c and coff-i860.c.
325 * targets.c (i860coff_vec): Declare.
326 (bfd_target_vector): Add &i860coff_vec.
327 * archures.c (bfd_i860_arch): Declare.
328 (bfd_archures_list): Add &bfd_i860_arch.
329 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
330 (coff_set_flags): Handle bfd_arch_i860.
331 (coff_write_object_contents): Handle I860 a.out magic number.
332
333 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
334
335 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
336 the created .tc section to 2.
337 (xcoff_mark): Don't keep a .loader reloc for a call to an
338 undefined symbol when creating a shared library.
339 (xcoff_build_ldsyms): When creating a shared library, generate
340 global linkage code for a call to an undefined symbol.
341
342 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
343
344 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
345 BFD32_BACKENDS, BFD64_BACKENDS.
346 (.dep1): Put mkdep output in a separate file.
347 Rebuilt dependencies.
348
349 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
350 value.
351
352 Permit use of mmap when available:
353
354 * configure.in: Check for mmap, madvise, mprotect.
355 * config.in, configure: Regenerated.
356
357 * libbfd.c (struct _bfd_window_internal): Define type.
358 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
359 functions.
360 (ok_to_map): New static variable for debugging.
361 (_bfd_generic_get_section_contents_in_window): New function.
362 * bfd-in.h (bfd_window_internal): Declare type.
363 (bfd_window): Define type.
364 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
365 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
366 Declare.
367
368 * libaout.h (struct aoutdata): Add two window fields.
369 (obj_aout_sym_window, obj_aout_string_window): New macros.
370 * aoutx.h (some_aout_object_p): Initialize windows.
371 (aout_get_external_symbols): Get symbol data and strings in
372 windows instead of explicitly allocated buffers.
373 (slurp_symbol_table): Free window instead of memory.
374 (bfd_free_cached_info): Release windows instead of freeing storage
375 directly.
376 (aout_link_free_symbols): Ditto.
377
378 * targets.c (bfd_target): Add new field for
379 get_section_contents_in_window.
380 (BFD_JUMP_TABLE_GENERIC): Updated.
381 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
382 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
383 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
384 macros for get_section_contents_in_window field.
385
386 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
387
388 * core.c: Renamed to corefile.c
389 * makefile.dos (OBJS): Change core.o to corefile.o
390 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
391
392 start-sanitize-gm
393 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
394
395 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
396 targ_selvecs to allow debugging under Irix-5 native.
397
398 end-sanitize-gm
399 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
400
401 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
402 to o. Clobber and restore the list of new csects around the call
403 to _bfd_generic_link_add_one_symbol, in case it wants to report a
404 linker error and the linker wants to read the symbol table. Reset
405 the line number count of a real section even if it has no relocs.
406 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
407
408 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
409 is too small.
410
411 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
412
413 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
414 an undefined symbol in a shared link.
415
416 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
417 oldtype from bfd_link_order_type to bfd_link_hash_type. From
418 phdm@info.ucl.ac.be (Philippe De Muyter).
419
420 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
421
422 * coff-m88k.c (rtype2howto): New static function.
423 (RTYPE2HOWTO): Use it rather than a macro definition.
424
425 * coffcode.h (coff_write_object_contents): set internal_a.magic
426 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
427
428 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
429 define TRAD_HEADER to new file hosts/delta68.h.
430 m88*-motorola-sysv*, however, does use ptrace-core.o.
431 * hosts/delta68.h: New file.
432
433 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
434 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
435
436 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
437
438 * i386linux.c (MY(vec)): Declare before use.
439
440 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
441
442 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
443 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
444
445 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
446 BFD is not of the right type.
447 (bfd_elf_get_needed_list): Likewise.
448 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
449 * sunos.c (bfd_sunos_get_needed_list): Likewise.
450 * xcofflink.c (XCOFF_XVECP): Define.
451 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
452 of the right type.
453 (bfd_xcoff_import_symbol): Likewise.
454 (bfd_xcoff_export_symbol): Likewise.
455 (bfd_xcoff_link_count_reloc): Likewise.
456 (bfd_xcoff_record_link_assignment): Likewise.
457 (bfd_xcoff_size_dynamic_sections): Likewise.
458
459 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
460 table index against the number of symbols for a base relative
461 reloc.
462
463 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
464 static function.
465 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
466 full_aouthdr flag here...
467 (_bfd_xcoff_bfd_final_link): ...not here.
468
469 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
470
471 * libelf.h: Rename to elf-bfd.h to avoid conflict with
472 systems that have a system <libelf.h>.
473 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
474 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
475 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
476 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
477 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
478 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
479 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
480
481 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
482
483 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
484 set, set BSF_WEAK in symbol. Change all callers.
485 (ecoff_get_extr): Set weakext based on BSF_WEAK.
486 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
487 _bfd_generic_link_add_one_symbol.
488 (ecoff_indirect_link_order): Check that the section tdata relocs
489 are not NULL before using them.
490
491 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
492 define TRAD_HEADER as hosts/alphalinux.h.
493 * configure: Rebuild.
494 * hosts/alphalinux.h: New file.
495 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
496 not int.
497
498 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
499
500 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
501 C_ECOMM storage classes.
502
503 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
504 of xcoff_mark.
505 (xcoff_mark): Call xcoff_mark_symbol.
506 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
507 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
508 doing it by hand.
509 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
510
511 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
512
513 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
514 field.
515 (xcoff_find_reloc): New static function.
516 (xcoff_link_add_symbols): Use it.
517 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
518 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
519 relocate the value of C_DECL.
520
521 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
522
523 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
524
525 * cofflink.c (_bfd_coff_generic_relocate_section): Make
526 callback decide what goes in .relocs.
527 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
528 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
529 there is one.
530
531 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
532
533 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
534 absolute section.
535
536 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
537
538 * xcofflink.c: More improvements, mostly to fix handling of
539 constructors and a few other special cases.
540 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
541 zero, reverting yesterday's change.
542 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
543 (bfd_xcoff_link_count_reloc): Declare.
544 (bfd_xcoff_record_link_assignment): Declare.
545 * bfd-in2.h: Rebuild.
546
547 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
548
549 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
550 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
551 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
552 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
553 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
554 Change PAGE_SIZE to TARGET_PAGE_SIZE.
555
556 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
557 format.
558
559 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
560 segments includes the a.out header. See to that the magic number
561 *always* is big-endian.
562
563 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
564 m68k4k NetBSD configurations.
565
566 * configure.in, configure: Separate i386 & mips NetBSD
567 configurations from other BSD ones. Don't assume DEC is the only
568 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
569 configurations. Add support for m68k4k NetBSD object format.
570
571 * libaout.h: Added M_68K4K_NETBSD magic.
572
573 * m68k4knetbsd.c: New file.
574
575 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
576
577 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
578 <machine/endian.h>.
579
580 * hosts/mipsnbsd.h: New file.
581
582 start-sanitize-gm
583 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
584
585 * config.bfd: Add config stuff for mips*-*-magic* to set
586 targ_defvec to ecoff_big_vec.
587
588 end-sanitize-gm
589 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
590
591 * xcofflink.c: Numerous changes to get closer to a working XCOFF
592 linker.
593 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
594 toc_section, and entry_section fields.
595 (struct xcoff_section_tdata): Remove ldrel_count field.
596 * libcoff.h: Rebuild.
597 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
598 fields.
599 (coff_compute_section_file_positions): If RS6000COFF_C, generate
600 full a.out header if full_aouthdr is set in xcoff_data.
601 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
602 based on sections stored in xcoff_data.
603 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
604 fields.
605 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
606 (rs6000coff_vec): Set symbol_leading_char to '.'.
607 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
608 value stored in ret rather than returning a pointer value.
609
610 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
611
612 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
613 format for now.
614
615 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
616
617 * som.c (som_slurp_string_table): Allocate the strings with malloc
618 since they're free'd by free_cached_info.
619 (som_slurp_symbol_table): Similarly for the symbol table.
620
621 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
622
623 * Makefile.in (diststuff): Don't make headers.
624
625 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
626
627 * Makefile.in: Rebuild dependencies.
628
629 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
630 output_bfd is not SunOS.
631 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
632 non-SunOS input files.
633
634 * xcofflink.c: Extensive changes to support linking shared objects
635 and generating a .loader section.
636 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
637 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
638 last_symndx, and ldrel_count fields.
639 * libcoff.h: Rebuild.
640 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
641 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
642 is set.
643 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
644 (bfd_xcoff_export_symbol): Declare.
645 (bfd_xcoff_size_dynamic_sections): Declare.
646 * bfd-in2.h: Rebuild.
647
648 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
649
650 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
651 * configure: Rebuild.
652 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
653 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
654 contents.
655 (pmac_xcoff_vec): Update to use new xcoff support.
656 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
657 (xcoff_write_armap): Declare buf as unsigned char.
658 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
659
660 * mpw-make.sed: Generalize subdir_do edit.
661
662 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
663
664 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
665 correctly. Don't initialize asect->vma.
666
667 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
668
669 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
670 something a little less than the page size.
671
672 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
673
674 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
675
676 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
677
678 * coff-i386.c (coff_i386_reloc_type_lookup): New.
679 * coffcode.h (coff_write_object_contents): If .bss is before
680 .data us that as data_start.
681 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
682 calc correct.
683 * peicode.h (add_data_entry): Use _cooked_size of data directory.
684 (coff_swap_outhdr_out): Hardwire in version number.
685
686 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
687
688 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
689 major and minor to *_vno, since the former are also macros in
690 SunOS header files. Cast result of bfd_alloc to appropriate
691 type.
692
693 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
694 before assigning to sec_data.
695
696 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
697
698 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
699 now relative to the section, not absolute.
700 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
701 get the file name when there is a N_SO directory name. When
702 handling stabs, remember that section->vma was added to the
703 offset.
704
705 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
706
707 * sunos.c (struct sunos_link_hash_table): Add needed field.
708 (sunos_link_hash_table_create): Call bfd_release, not free.
709 (sunos_link_hash_table_create): Initialize needed field.
710 (sunos_add_dynamic_symbols): Record needed objects.
711 (bfd_sunos_get_needed_list): New function.
712 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
713 * bfd-in2.h: Rebuild.
714
715 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
716
717 * libcoff-in.h (pe_data_type.in_reloc_p): New.
718
719 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
720
721 * bfd-in.h (struct bfd_link_needed_list): Rename from
722 bfd_elf_link_needed_list.
723 * bfd-in2.h: Rebuild.
724 * elf.c, elflink.h, libelf.h: Corresponding changes.
725
726 Add start at AIX linker support; no shared libraries yet.
727 * xcofflink.c: New file.
728 * configure.in (rs600coff_vec): Use xcofflink.o.
729 * configure: Rebuild.
730 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
731 fields.
732 (struct xcoff_section_tdata): Define.
733 (xcoff_section_data): Define macro.
734 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
735 (_bfd_xcoff_bfd_link_add_symbols): Declare.
736 (_bfd_xcoff_bfd_final_link): Declare.
737 (_bfd_ppc_xcoff_relocate_section): Declare.
738 * libcoff.h: Rebuild.
739 * coff-rs6000.c: Clean up a bit.
740 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
741 cputype, csects, and debug_indices.
742 (xcoff_copy_private_bfd_data): Copy cputype.
743 (xcoff_howto_table): Rename from rs6000coff_howto_table.
744 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
745 (xcoff_reloc_type_lookup): Rename from
746 rs6000coff_reloc_type_lookup.
747 (coff_relocate_section): Define.
748 (_bfd_xcoff_sizeof_headers): Define.
749 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
750 (_bfd_xcoff_bfd_relax_section): Define.
751 (_bfd_xcoff_bfd_link_split_section): Define.
752 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
753 coff.
754 * coffcode.h (coff_compute_section_file_positions): If AIX,
755 increment sofar by SMALL_AOUTSZ if not executable.
756 (coff_write_object_contents): If AIX, always output an a.out
757 header; if not executable, header size of SMALL_AOUTSZ.
758 * hash.c (struct bfd_strtab_hash): Add xcoff field.
759 (_bfd_stringtab_init): Initialize xcoff field.
760 (_bfd_xcoff_stringtab_init): New function.
761 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
762 (_bfd_stringtab_emit): In XCOFF mode, write out length.
763 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
764 * libbfd.h: Rebuild.
765 * Makefile.in: Rebuild dependencies.
766 (BFD32_BACKENDS): Add xcofflink.o.
767 (CFILES): Add xcofflink.c.
768
769 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
770 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
771 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
772
773 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
774
775 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
776
777 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
778
779 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
780 * config.in: Regenerated.
781
782 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
783 (_bfd_chunksize): New variable.
784 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
785 for obstack chunk size.
786 * configure.in: Check for getpagesize.
787 * configure: Regenerated.
788
789 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
790
791 * trad-core.c (rawptr): Make it a local variable of
792 ptrace_unix_core_file_p.
793
794 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
795
796 * coff-arm.c (in_reloc_p): New.
797 * coff-i386.c (in_reloc_p): New.
798 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
799 (coff_write_object_contents): Only set has_reloc_section
800 if PE_IMAGE.
801 * cofflink.c (_bfd_coff_generic_relocate_section): Call
802 in_reloc_p to decide if reloc should be emitted.
803 * libcoff.h (pe_data_type.in_reloc_p): New.
804 * peicode.h (pe_mkobject): Initialize in_reloc_p.
805
806 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
807
808 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
809 (_bfd_coff_read_internal_relocs): Likewise.
810 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
811 (_bfd_coff_read_internal_relocs): Likewise.
812
813 * elflink.h (elf_link_add_object_symbols): Correct conditions
814 under which type and size change warnings are issued.
815
816 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
817
818 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
819 a symbol which is not in a real section.
820 (coff_write_native_symbol): Corresponding change.
821
822 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
823 coff_link_hash_newfunc and make non-static.
824 (_bfd_coff_link_hash_table_init): New function, broken out of
825 _bfd_coff_link_hash_table_create.
826 (_bfd_coff_link_hash_table_create): Use it.
827 (process_embedded_commands): Make static.
828 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
829 (_bfd_coff_link_hash_table_init): Declare.
830 * libcoff.h: Rebuild.
831
832 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
833 field in XCOFF tdata.
834 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
835 U802ROMAGIC, for clarity. Try to set arch and machine correctly
836 based on cputype stored in a.out header, or in n_type of initial
837 .file symbol.
838 (coff_write_object_contents): Set cputype correctly in a.out
839 header.
840 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
841 warnings.
842 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
843 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
844 old resv1 field.
845 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
846 * libcoff.h: Rebuild.
847
848 * cpu-rs6000.c (rs6000_compatible): New static function.
849 (bfd_rs6000_arch): Use it.
850 * cpu-powerpc.c (powerpc_compatible): New static function.
851 (arch_info_struct): Define various flavours of PowerPC.
852 (bfd_powerpc_arch): Use powerpc_compatible. Point at
853 arch_info_struct.
854
855 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
856
857 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
858
859 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
860
861 * elflink.h (elf_link_add_object_symbols): Don't warn about
862 changing the size or type if the old definition was weak.
863
864 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
865
866 * coffcode.h (combined_entry_type): Add fix_line field.
867 (coff_slurp_line_table): Warn if we try to set the lineno field of
868 a symbol twice.
869 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
870 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
871 * coffgen.c (coff_mangle_symbols): Handle fix_line.
872 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
873 absolute section.
874 (coff_print_symbol): Print fix_value symbols in a useful fashion.
875 * libcoff.h: Rebuild.
876
877 * libcoff-in.h (struct xcoff_tdata): Define.
878 (xcoff_data): Define.
879 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
880 * bfd-in2.h, libcoff.h: Rebuild.
881 * coff-rs6000.c (xcoff_mkobject): New static function.
882 (coff_mkobject): Define.
883 (xcoff_copy_private_bfd_data): New static function.
884 (coff_bfd_copy_private_bfd_data): Define.
885 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
886 signed to bitfield.
887 (rs6000coff_vec): Add DYNAMIC to object_flags.
888 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
889 .loader sections specially.
890 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
891 section alignment from the XCOFF tdata information.
892 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
893 F_SHROBJ, and copy the extra a.out header information into the
894 XCOFF tdata structure.
895 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
896 F_DYNLOAD and the extra a.out header information.
897 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
898 C_HIDEXT symbol with attached csect information.
899 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
900 in the o_maxdata field.
901 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
902 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
903 end if BSF_NOT_AT_END is set.
904
905 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
906 _bfd_read_ar_hdr_fn.
907 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
908 * bfd-in2.h, libbfd.h: Rebuild.
909 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
910 return value.
911 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
912 (bfd_slurp_bsd_armap_f2): Likewise.
913 (_bfd_slurp_extended_name_table): Likewise.
914
915 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
916
917 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
918
919 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
920 when the symbol table is empty.
921
922 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
923 space for section symbols, since we don't output them either.
924 (elf_m68k_adjust_dynindx): Removed.
925
926 * ptrace-core.c (rawptr): Make it a local variable of
927 ptrace_unix_core_file_p.
928
929 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
930
931 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
932 NULL.
933
934 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
935 Mac object file formats.
936
937 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
938
939 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
940 auxent if there isn't one.
941 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
942 rather than FILNMLEN as the maximum name length.
943
944 * coffcode.h (bfd_coff_backend_data): Add new field
945 _bfd_coff_print_aux.
946 (bfd_coff_print_aux): New static function.
947 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
948 scnlen field of an XTY_LD csect aux entry.
949 (coff_print_aux): New static function.
950 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
951 in coff_pointerize_aux_hook.
952 (bfd_coff_std_swap_table): Initialize new field.
953 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
954 * libcoff.h: Rebuild.
955 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
956 * coff-mips.c (mips_ecoff_backend_data): Likewise.
957
958 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
959 if there are symbols, for native AIX ld compatibility.
960
961 * coffcode.h (bfd_coff_backend_data): Add new field
962 _bfd_coff_pointerize_aux_hook.
963 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
964 or I960, and as 0 otherwise.
965 (bfd_coff_std_swap_table): Initialize new field.
966 * libcoff.h: Rebuild.
967 * coffgen.c (coff_pointerize_aux): Change parameters to take
968 symbol pointer instead of type and class, and to take aux index.
969 Call _bfd_coff_pointerize_aux_hook if it is defined.
970 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
971 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
972 * coff-mips.c (mips_ecoff_backend_data): Likewise.
973
974 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
975 read-only/host-only support.
976
977 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
978 BSF_LOCAL.
979 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
980 RS6000COFF_C.
981
982 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
983 BFD_JUMP_TABLE_ARCHIVE accordingly.
984 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
985 (_bfd_compute_and_write_armap): Declare.
986 (_bfd_generic_read_ar_hdr): Declare.
987 (_bfd_read_ar_hdr): Define.
988 (_bfd_noarchive_read_ar_hdr): Define.
989 (_bfd_archive_bsd_read_ar_hdr): Define.
990 (_bfd_archive_coff_read_ar_hdr): Define.
991 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
992 _bfd_read_ar_hdr instead.
993 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
994 (_bfd_compute_and_write_armap): Rename from
995 compute_and_write_armap. Make non-static. Change all callers.
996 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
997 than _bfd_snarf_ar_hdr.
998 * aout-target.h (MY_read_ar_hdr): Define if not defined.
999 * ieee.c (ieee_read_ar_hdr): Define.
1000 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
1001 * oasys.c (oasys_read_ar_hdr): Define.
1002 * som.c (som_read_ar_hdr): Define.
1003 * bfd-in2.h, libbfd.h: Rebuild.
1004
1005 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
1006
1007 * peicode.c (coff_swap_filehdr_in): If symptr is
1008 zero, there aren't any symbols, even if nsyms is set.
1009
1010 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
1011
1012 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
1013 field.
1014 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
1015 sections, and set styp correctly for them: .got, .hash, .dynamic,
1016 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
1017 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
1018 types.
1019 (ecoff_sort_hdrs): New static function.
1020 (ecoff_compute_section_file_positions): Return boolean, not void.
1021 Sort the sections by VMA before looking through them. Put the
1022 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
1023 section on an appropriate boundary within the page.
1024 (ecoff_compute_reloc_file_positions): Check return value of
1025 ecoff_compute_section_file_positions.
1026 (_bfd_ecoff_set_section_contents): Likewise.
1027 (_bfd_ecoff_write_object_contents): Check for various Alpha
1028 section types when incrementing text_size and data_size. Call
1029 adjust_headers backend function if it exists.
1030 * coff-alpha.c (alpha_adjust_headers): New static function.
1031 (alpha_ecoff_backend_data): Initialize adjust_headers field.
1032 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1033
1034 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
1035
1036 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
1037
1038 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
1039 of ALTERNATE_AIX_CORE_FORMAT.
1040 * configure.in (aix4): No longer need CORE_FLAGS.
1041 * configure: Updated.
1042
1043 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
1044
1045 NS32k changes from Ian Dall:
1046 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
1047 macros.
1048 (aout_link_input_section_std, aout_link_input_section_ext,
1049 aout_link_reloc_link_order): Call them instead of _bfd_*
1050 versions.
1051 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
1052 to zero.
1053 (backend_data): Use it instead of hardcoded zero.
1054
1055 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
1056 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
1057
1058 * ns32knetbsd.c: Include bfd.h.
1059 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
1060 (MY_bfd_reloc_type_lookup): Declare function too.
1061 * pc532-mach.c (set_sizes): Don't declare.
1062 (MY_text_includes_header, MY_exec_header_not_counted): Define.
1063 (backend_data, MY_backend_data): Don't define.
1064
1065 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
1066 ns32k-*-lites* like ns32k-*-netbsd*.
1067
1068 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
1069 compile on lites.
1070
1071 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
1072
1073 * coffcode.h (coff_write_object_contents): Restore setting
1074 f_timdat to 0, deleted on August 22.
1075
1076 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
1077
1078 * coffcode.h (coff_bfd_copy_private_symbol_data,
1079 coff_bfd_copy_private_section_data,
1080 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
1081 * peicode.h (coff_bfd_copy_private_bfd_data): New
1082 (pe_bfd_copy_private_bfd_data): New.
1083 (coff_swap_scnhdr_in): Swap bss size into the right place.
1084 (pe_print_private_bfd_data): Add some newlines.
1085
1086 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
1087
1088 * som.c (setup_sections): Don't die if a space has no subspaces.
1089
1090 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
1091
1092 * elflink.h (elf_link_add_object_symbols): Don't let a weak
1093 dynamic symbol override a common symbol. Don't change the size or
1094 type if they have been set and the new symbol is not a definition.
1095 Warn if the size or type changes.
1096
1097 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
1098
1099 * som.c (som_begin_writing): Don't write the symbol table or
1100 symbol strings.
1101 (som_finish_writing): Write them here. Place them after the
1102 subspace data, but before the relocs.
1103
1104 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
1105
1106 * sunos.c (sunos_add_one_symbol): Just pass false, not
1107 info->shared_library, to sunos_create_dynamic_sections.
1108 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
1109 section.
1110 (sunos_check_dynamic_reloc): Remove .text section assertion.
1111
1112 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
1113
1114 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
1115 * configure, configure.in: Add pmac_xcoff_vec case.
1116 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
1117 * coff-pmac.c: New file, PowerMac XCOFF support.
1118 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
1119 * targets.c (pmac_xcoff_vec): Declare.
1120
1121 * mpw-config.in: Various changes to be compatible with the
1122 autoconf-based configury.
1123 * mpw-make.sed: New file, sed commands to translate Unix
1124 makefile into MPW syntax.
1125 * mpw-make.in: Remove.
1126 * hosts/mpw.h: Remove.
1127 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
1128 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
1129
1130 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
1131
1132 * binary.c (binary_get_symtab): Return an empty string on error.
1133 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
1134
1135 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
1136
1137 * coff-ppc.c: Reformatted according to gnu conventions
1138 Removed irrelevant "if 0" code
1139
1140 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
1141
1142 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
1143 symbols rather than as indirect symbols.
1144 (MY(slurp_symbol_table)): Don't do anything special about
1145 secondary symbols.
1146
1147 * coffcode.h (coff_new_section_hook): Make sure that the alignment
1148 of .ctors and .dtors sections is no larger than 2.
1149
1150 * sunos.c (sunos_add_one_symbol): Don't change
1151 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
1152 undef list.
1153 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
1154 dynamic symbols when creating a shared library.
1155 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
1156 shared library.
1157 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
1158 written even if it is not defined in a regular object.
1159 (sunos_write_dynamic_symbol): Use plt_offset for the address of
1160 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
1161 rather than the constant 22.
1162 (sunos_check_dynamic_reloc): Handle creating a shared library.
1163 (sunos_finish_dynamic_link): Set the first entry in the GOT to
1164 zero when creating a shared library.
1165 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
1166 write it out at the start of the symbol table.
1167
1168 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
1169
1170 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
1171
1172 * config.bfd: Add arm-*-coff.
1173 * configure.in, configure: Add armcoff_{little,big}_vec.
1174 * targets.c (armcoff_{little,big}_vec): Declare.
1175 (bfd_target_vector): Add armcoff_{little,big}_vec.
1176 * coff-arm.c (armcoff_{little,big}_vec): Always define.
1177
1178 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
1179
1180 * targets.c (bfd_find_target): Remove debugging code.
1181
1182 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
1183
1184 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
1185 support on powerpc.
1186 * Makefile.in: added *-ppc files
1187 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
1188 allow pe based .o's to be shared with other tools on ppc/NT
1189 * config.bfd: added powerpc[le]-[pe|winnt] config support
1190 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
1191 * peicode.h: Added more section flags for PE on ppc
1192 Added coff_swap_filehdr_out to allow peicode.h to be
1193 used for non-image PE files on ppc.
1194 Check for image, or not, before copying pe_opthdr
1195 * targets.c: Added new bfd's
1196 * targets.c: Removed two inactive bfds that shouldn't have made it this
1197 far.
1198
1199 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1200
1201 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
1202 explicit values to initialize all relocs. Change all users.
1203 (ppc_elf_brtaken_inner): New function to handle branch predicition
1204 relocs.
1205 (ppc_elf_brtaken_reloc): Ditto.
1206 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
1207 relocs use ppc_elf_unsupported_reloc.
1208 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
1209 needs to be reported.
1210 (ppc_elf_relocate_section): Support branch prediction relocs.
1211
1212 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
1213
1214 * bfd.c (bfd_assert): Remove \n from string passed to
1215 _bfd_error_handler.
1216
1217 * coff-i386.c: (TWO_DATA_SECS): Don't define.
1218 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
1219 (bfd_coff_make_section_hook): Don't define.
1220 (coff_make_section_hook): Remove.
1221 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
1222 (styp_to_sec_flags): Likewise.
1223 (coff_write_object_contents): Likewise.
1224 (bfd_coff_std_swap_table): Don't initialize make_section_hook
1225 field.
1226 * libcoff.h: Rebuild.
1227 * coffgen.c (make_a_section_from_file): Just call
1228 bfd_make_section_anyway, not bfd_make_section or
1229 bfd_coff_make_section_hook.
1230 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
1231 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
1232 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
1233 make_section_hook field.
1234 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1235
1236 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
1237 pointers into value field for warning and indirect symbols; just
1238 leave the value field alone.
1239 * linker.c (generic_link_add_symbol_list): Use next symbol for
1240 warning and indirect symbols, rather than looking in symbol value.
1241 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
1242 parameter. Change all callers. Remove support for indirect
1243 symbols; it didn't work anyhow.
1244 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
1245 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
1246 * bfd-in2.h: Rebuild.
1247
1248 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1249
1250 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
1251 go back to telling the tools this reloc operates on 32 bits.
1252
1253 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
1254
1255 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
1256 rather than a direct fprintf.
1257 * archive.c (_bfd_write_archive_contents): Likewise.
1258 * coffcode.h (coff_slurp_symbol_table): Likewise.
1259 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
1260 (ppc_elf_unsupported_reloc): Likewise.
1261 (ppc_elf_relocate_section): Likewise.
1262 * i386linux.c (linux_tally_symbols): Likewise.
1263 (linux_finish_dynamic_link): Likewise.
1264 * osf-core.c (osf_core_core_file_p): Likewise.
1265 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
1266 * som.c (som_sizeof_headers): Likewise.
1267 * srec.c (srec_bad_byte): Likewise.
1268 * bfd.c (bfd_assert): Likewise. Also change file to be const.
1269 * libbfd-in.h (bfd_assert): Declare first parameter const.
1270 * libbfd.h: Rebuild.
1271 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
1272 bfd_reloc_overflow is enough.
1273 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
1274 * coff-h8500.c (rtype2howto): Likewise.
1275 * coff-z8k.c (rtype2howto): Likewise.
1276 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
1277 * elf.c (_bfd_elf_get_lineno): Likewise.
1278 (_bfd_elf_no_info_to_howto): Likewise.
1279 (_bfd_elf_no_info_to_howto_rel): Likewise.
1280 * hp300hpux.c (convert_sym_type): Likewise.
1281 (MY(swap_std_reloc_in)): Likewise.
1282 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
1283
1284 * libaout.h (struct aoutdata): Add line_buf field.
1285 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
1286 and filename_buffer. Instead, use a malloc buffer stored in the
1287 new line_buf field. Remove length restrictions.
1288
1289 * coffgen.c (string_size): Remove static variable.
1290 (debug_string_size, debug_string_section): Likewise.
1291 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
1292 and debug_string_size_p parameters. Use them instead of the
1293 global variables. Change all callers.
1294 (coff_write_symbol): Likewise.
1295 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
1296 (coff_write_symbols): Add local variables to replace removed
1297 global variables.
1298
1299 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
1300 function, and line_base fields.
1301 * libcoff.h: Rebuild.
1302 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
1303 information, rather than using static variables.
1304
1305 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
1306 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
1307
1308 * init.c (initialized): Remove static variable.
1309 (bfd_init): Don't bother setting initialized.
1310 (bfd_check_init): Remove.
1311 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
1312 * libbfd.h: Rebuild.
1313
1314 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1315
1316 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
1317 size for full core dumps. Copy core file header to private data.
1318 (rs6000coff_core_file_failing_command,
1319 rs6000coff_core_file_failing_signal): New functions to extract
1320 the file name and terminating signal from the core file.
1321 * coff-rs6000.c: Use them.
1322
1323 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
1324
1325 Change arch info to be const, initialized at compile time.
1326 * archures.c: Reindent many functions. Change CONST to const.
1327 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
1328 nothing set it anyhow. Make next const.
1329 (bfd_arch_info_list): Remove.
1330 (bfd_archures_list): Rename from archures_init_table. Change from
1331 a table of function pointers to a table of bfd_arch_info_type
1332 structure addresses.
1333 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
1334 (bfd_lookup_arch): Likewise.
1335 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
1336 const pointer.
1337 (bfd_default_arch_struct): Make const.
1338 (bfd_arch_init, bfd_arch_linkin): Remove.
1339 (bfd_get_arch_info): Return a const pointer.
1340 * init.c (bfd_init): Don't call bfd_arch_init.
1341 * bfd.c (struct _bfd): Make arch_info const.
1342 * bfd-in2.h: Rebuild.
1343 * libbfd.h: Rebuild.
1344 * configure.in: Put & before everything in $selarchs.
1345 * configure: Rebuild.
1346 * cpu-*.c: Change bfd_*_arch from a function which calls
1347 bfd_arch_linkin to a const structure.
1348 * ieee.c (ieee_object_p): Make arch const.
1349
1350 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1351
1352 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
1353 PowerPC V.4.
1354 * bfd-in2.h: Regenerate.
1355 * libbfd.h: Regenerate.
1356
1357 * elf32-ppc.c (reloc_type): Update names to match current draft.
1358 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
1359 relative. Update names to current V.4 draft.
1360 (ppc_elf_reloc_type_lookup): Add support for more relocations.
1361 (ppc_elf_relocate_section): Rename relocations to match draft.
1362
1363 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
1364
1365 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
1366 compiled with -mrelocatable-lib to be linked with either normal
1367 modules or -mrelocatable modules.
1368
1369 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
1370
1371 * coffcode.h (coff_write_object_contents): Clear the vstamp field
1372 in the a.out header.
1373
1374 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
1375 a reloc against a local symbol, even if it's not a section.
1376
1377 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
1378
1379 * targets.c (bfd_target): Remove unused align_power_min field.
1380 * bfd-in2.h: Rebuild.
1381 * All backends: Remove initialization of align_power_min.
1382
1383 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
1384
1385 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
1386
1387 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
1388
1389 * config.bfd (mips-dec-netbsd*): New target.
1390 * configure.host (mips-dec-netbsd*): New host.
1391 * configure.in (mips-dec-netbsd*): New native.
1392 * configure: Rebuild.
1393
1394 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
1395
1396 Make the COFF backend linker merge common types:
1397 * cofflink.c (struct coff_debug_merge_element): Define.
1398 (struct coff_debug_merge_type): Define.
1399 (struct coff_debug_merge_hash_entry): Define.
1400 (struct coff_debug_merge_hash_table): Define.
1401 (coff_debug_merge_hash_table_init): Define.
1402 (coff_debug_merge_hash_table_free): Define.
1403 (coff_debug_merge_hash_lookup): Define.
1404 (struct coff_final_link_info): Add debug_merge field.
1405 (coff_debug_merge_hash_newfunc): New static function.
1406 (_bfd_coff_final_link): Allocate and free debug_merge table.
1407 (coff_link_input_bfd): Merge identical enum, struct and union
1408 types.
1409
1410 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
1411
1412 Convert i960 COFF to use COFF backend linker.
1413 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
1414 structure to store the symbol being used.
1415 (coff_i960_start_final_link): New static function.
1416 (coff_i960_relocate_section): New static function.
1417 (coff_i960_adjust_symndx): New static function.
1418 (coff_start_final_link): Define.
1419 (coff_relocate_section): Define.
1420 (coff_adjust_symndx): Define.
1421 * coffcode.h (bfd_coff_backend_data): Add new callback function
1422 _bfd_coff_start_final_link.
1423 (bfd_coff_start_final_link): Define.
1424 (coff_start_final_link): Define if not defined.
1425 (bfd_coff_std_swap_table): Add coff_start_final_link.
1426 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
1427 visible.
1428 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
1429 function callback is not NULL.
1430 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
1431 (_bfd_coff_internal_syment_name): Declare.
1432 * libcoff.h: Rebuild.
1433 * configure.in (icoff_big_vec): Add cofflink.o.
1434 (icoff_little_vec): Likewise.
1435 * configure: Rebuild.
1436
1437 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
1438
1439 * Makefile.in (clean-info): Remove extraneous tab from line
1440 following action.
1441
1442 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
1443
1444 * cofflink.c (coff_link_input_bfd): Fail if a section with no
1445 contents has relocs.
1446
1447 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
1448
1449 * coffcode.h (coff_compute_section_file_positions): Keep the
1450 raw size safe.
1451 (coff_write_object_contents): Remember if it's a relocatable
1452 file.
1453 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
1454 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
1455 if relocatable file. Swap out saved raw size.
1456
1457 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
1458
1459 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
1460 (maintainer-clean): Rename from realclean, passing
1461 maintainer-clean down to subdirectories, but leave realclean as a
1462 synonym.
1463
1464 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
1465 warning callback.
1466
1467 * dep-in.sed: Remove config.h from generated dependencies.
1468
1469 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
1470 broken out of sunos_canonicalize_dynamic_symtab.
1471 (sunos_canonicalize_dynamic_symtab): Call new function
1472 sunos_slurp_dynamic_symtab.
1473 (sunos_add_dynamic_symbols): Add three new parameters. Return the
1474 dynamic symbol table to the caller.
1475 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
1476 callback to override the symbols being read.
1477 * libaout.h (struct aout_backend_data): Add three new parameters
1478 to add_dynamic_symbols callback.
1479
1480 Extensive minor changes to avoid various gcc warnings. Also:
1481 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
1482 * archures.c (bfd_arch_info_type): Change mach field from long to
1483 unsigned long.
1484 (bfd_lookup_arch): Change machine parameter from long to unsigned
1485 long.
1486
1487 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
1488
1489 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
1490 a symbol with a non-zero plt_offset.
1491
1492 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
1493
1494 * elfcode.h (align_file_position): Remove; not used.
1495
1496 * configure.in: Only check for <sys/procfs.h> on a native system,
1497 and make sure it defines prstatus_t.
1498 * configure: Rebuild.
1499
1500 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
1501
1502 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
1503
1504 * config.in: Rename from config.h.in.
1505 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
1506 Check for config.h:config.in when creating stamp-h.
1507 * configure: Rebuild.
1508 * Makefile.in (stamp-h): Depend upon config.in rather than
1509 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
1510 calling config.status.
1511
1512 * Makefile.in (do_distclean): Remove config.h and stamp-h.
1513 (Makefile): Just rebuild Makefile.
1514 (config.h, stamp-h): New targets.
1515 * configure.in: Create stamp-h when rebuilding config.h.
1516 * configure: Rebuild.
1517
1518 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
1519
1520 * configure.in: Call AC_CONFIG_HEADER. Substitute
1521 HOST_64BIT_LONG. Check that various header files exist. Check
1522 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
1523 and/or free need to be declared. Don't make a link to sysdep.h.
1524 Define TRAD_HEADER for various hosts.
1525 * configure: Rebuild.
1526 * configure.host: Don't set my_host. Add definitions taken from
1527 host header files for various entries. Remove entries which now
1528 do nothing.
1529 * acconfig.h: New file.
1530 * config.h.in: New file, built by autoheader.
1531 * sysdep.h: New file.
1532 * Makefile.in (do_distclean): Don't remove sysdep.h.
1533 (RECONFIG): Remove.
1534 (LOCAL_H_DEPS): New variable.
1535 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
1536 $(RECONFIG).
1537 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
1538 ($(OPTIONAL_BACKENDS)): Likewise.
1539 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
1540 looking through sysdep.h.
1541 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
1542 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
1543 (fprintf_vma, sprintf_vma): Likewise.
1544 (int64_type, uint64_type): Don't define.
1545 * bfd-in2.h: Rebuild.
1546 * archures.c, bfd.c, srec.c: Include <ctype.h>.
1547 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
1548 * lynx-core.c: Include stuff from old hosts/lynx.h.
1549 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
1550 rather than NO_FCNTL.
1551 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
1552 rather than NATIVE_HPPAHPUX_COMPILER.
1553 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
1554 is defined.
1555 * hosts/*.h: Remove all header files which merely include,
1556 declare, and define things. Leave header files which define
1557 information needed by trad-core.c.
1558
1559 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
1560 (BFD_CC_FOR_BUILD): Define.
1561 * configure.in: Use BFD_CC_FOR_BUILD.
1562 * configure: Rebuild.
1563
1564 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
1565
1566 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
1567 * configure: Rebuild.
1568
1569 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
1570 a global symbol.
1571
1572 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
1573
1574 * config.bfd: i386pe_ve -> i386pe_vec.
1575
1576 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
1577
1578 * configure.host: Incorporate host Makefile fragments by setting
1579 shell variables.
1580 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
1581 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
1582 value based on whether the code is being compiled by a cross
1583 compiler. Don't substitute host_makefile_frag or frags.
1584 * aclocal.m4: New file to define local AC_PROG_CC.
1585 * configure: Rebuild.
1586 * Makefile.in (INSTALL): Set to @INSTALL@.
1587 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
1588 (INSTALL_DATA): Set to @INSTALL_DATA@.
1589 (AR): Set to @AR@.
1590 (CC): Define as @CC@.
1591 (CFLAGS): Set to @CFLAGS@.
1592 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
1593 (@host_makefile_frag@): Remove.
1594 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
1595 after other options.
1596 (config.status): Remove dependency upon @frags@.
1597 * config/*.mh, config/README: Remove.
1598
1599 * config.bfd: Rewrite to incorporate the contents of the Makefile
1600 fragments by setting shell variables, rather than merely returning
1601 the name of a Makefile fragment.
1602 * configure.in: Use shell variables set by config.bfd rather than
1603 looking at the target Makefile fragment files. Don't substitute
1604 target_makefile_frag. Do substitute TDEFINES.
1605 * configure: Rebuild.
1606 * Makefile.in (@target_makefile_frag@): Remove.
1607 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
1608 * config/*.mt: Remove.
1609
1610 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
1611
1612 * configure.in: Put changequote lines around "i[345]86" patterns
1613 section of core file support.
1614
1615 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
1616
1617 * som.c (som_bfd_print_private_bfd_data): Define to use the
1618 generic version.
1619
1620 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
1621
1622 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
1623 entry, text_start and data_start.
1624
1625 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
1626
1627 * Makefile.in (OFILES): Remove $(TDEPFILES).
1628 * config/apollo.mt (TDEPFILES): Remove.
1629 * config/README: Update.
1630
1631 * configure.in: For a native configuration, set COREFILE and
1632 COREFLAG based on the canonical host name.
1633 * configure: Rebuild.
1634 * Makefile.in: Rebuild dependencies.
1635 (ALL_CFLAGS): Add @COREFLAG@.
1636 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
1637 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
1638 support routines. Check LYNX_CORE rather than HOST_LYNX.
1639 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
1640 * i386lynx.c: Likewise.
1641 * m68klynx.c: Likewise.
1642 * sparclynx.c: Likewise.
1643 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
1644 * *-core.c: Comment changes.
1645 * config/decstation.mh (HDEPFILES): Remove.
1646 (HDEFINES): Remove -DTRAD_CORE.
1647 * config/irix3.mh (RANLIB): Remove.
1648 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
1649 (HDEFINES): Remove -DIRIX_CORE.
1650 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
1651 (HDEFINES): Remove -DTRAD_CORE.
1652 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
1653 * config/ultra3.mh (RANLIB): Remove.
1654 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
1655 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
1656 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
1657 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
1658 * config/hppahpux.mh, config/hppaosf.mh: Remove.
1659 * config/i386aix.mh, config/i386bsd.mh: Remove.
1660 * config/i386linux.mh, config/i386mach3.mh: Remove.
1661 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
1662 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
1663 * config/mipsmach3.mh, config/news-mips.mh: Remove.
1664 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
1665 * config/rs600.mh, config/rs6000lynx.mh: Remove.
1666 * config/solaris2.mh, config/stratus.mh: Remove.
1667 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
1668 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
1669
1670 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
1671
1672 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
1673 DT_FINI entry if the appropriate symbol is not in the hash table.
1674
1675 * libelf.h (struct elf_backend_data): Add create_program_headers
1676 and want_hdr_in_seg fields.
1677 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
1678 defined.
1679 (elf_backend_create_program_headers): Likewise.
1680 (elfNN_bed): Initialize create_program_headers and
1681 want_hdr_in_seg.
1682 * elf.c (get_program_header_size): Call create_program_headers
1683 backend routine.
1684 (map_program_segments): Check want_hdr_in_seg backend field. Call
1685 create_program_headers backend routine.
1686
1687 * elf.c (assign_file_positions_except_relocs): Align non allocated
1688 sections when creating an executable.
1689
1690 * elfcode.h (elf_swap_phdr_in): Make non static.
1691 (elf_swap_phdr_out): Make non static.
1692 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
1693 (bfd_elf32_swap_phdr_out): Declare.
1694 (bfd_elf64_swap_phdr_in): Declare.
1695 (bfd_elf64_swap_phdr_out): Declare.
1696
1697 * ecofflink.c (ecoff_collect_shuffle): New static function.
1698 (_bfd_ecoff_get_accumulated_pdr): New function.
1699 (_bfd_ecoff_get_accumulated_sym): New function.
1700 (_bfd_ecoff_get_accumulated_ss): New function.
1701 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
1702 (_bfd_ecoff_get_accumulated_sym): Declare.
1703 (_bfd_ecoff_get_accumulated_ss): Declare.
1704 * libbfd.h: Rebuild.
1705
1706 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
1707
1708 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
1709
1710 * elflink.h (elf_link_add_object_symbols): Handle indirect and
1711 warning symbols. If any section is named .gnu.warning.XXX, treat
1712 the contents as a warning to be issued if the symbol XXX is
1713 referenced.
1714 (elf_link_output_extsym): For an indirect or warning symbol, just
1715 output the symbol it points to.
1716
1717 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
1718 if bfd_hash_allocate fails, since it will already be set.
1719 (generic_link_hash_newfunc): Likewise.
1720 (archive_hash_newfunc): Likewise.
1721 (hash_entry_bfd): New static function.
1722 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
1723 callback. Allocate a new warning using the hash table newfunc.
1724 Use bfd_hash_replace to update the entry in the hash table, rather
1725 than assuming we can copy the fields with structure assignment.
1726
1727 * hash.c (bfd_hash_replace): New function.
1728 * bfd-in.h (bfd_hash_replace): Declare.
1729 * bfd-in2.h: Rebuild.
1730
1731 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
1732
1733 * config.bfd: Add mips*vr4300-*-elf* target.
1734 * config/mipsbvr4300.mt: Added.
1735
1736 See file ChangeLog.2
1737
1738 \f
1739 Local Variables:
1740 mode: indented-text
1741 left-margin: 8
1742 fill-column: 74
1743 version-control: never
1744 End: