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