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