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