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