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