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