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