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