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