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