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