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