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