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