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