* elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
4 elf_info_to_howto.
5 (elf_info_to_howto): Define.
6 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
7 elf_info_to_howto.
8 (elf_info_to_howto): Define.
9 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
10 elf_info_to_howto.
11 (elf_info_to_howto): Define.
12
13 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
14 R_MOV16B[12], to match change in coff/internal.h.
15
16 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
17
18 * elf64-mips.c: Extensive additions to provide better support for
19 writing files and for gas.
20 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
21 of mips_elf_object_p.
22 (mips_elf32_object_p): Rename from mips_elf_object_p; call
23 _bfd_mips_elf_object_p.
24 (_bfd_mips_elf_final_write_processing): Rename from
25 mips_elf_final_write_processing and make globally visible.
26 (_bfd_mips_elf_fake_sections): Rename from
27 mips_elf_fake_sections and make globally visible.
28 (_bfd_mips_elf_section_from_bfd_section): Rename from
29 mips_elf_section_from_bfd_section and make globally visible.
30 (_bfd_mips_elf_section_processing): New function, broken out of
31 mips_elf_section_processing.
32 (mips_elf32_section_processing): Rename from
33 mips_elf_section_processing; call
34 _bfd_mips_elf_section_processing.
35 (_bfd_mips_elf_symbol_processing): Rename from
36 mips_elf_symbol_processing and make globally visible.
37 (_bfd_mips_elf_read_ecoff_info): Rename from
38 mips_elf_read_ecoff_info and make globally visible.
39 (mips_elf32_ecoff_debug_swap): Rename from
40 mips_elf_ecoff_debug_swap.
41 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
42 struct symbol_cache_entry.
43 (_bfd_elf_validate_reloc): New function, moved in from
44 elfcode.h:validate_reloc.
45 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
46 to _bfd_elf_validate_reloc. Change all callers.
47 * elf-bfd.h (bfd_section_from_shdr): Declare.
48 (_bfd_elf_symbol_from_bfd_symbol): Declare.
49 (_bfd_elf_validate_reloc): Declare.
50 (_bfd_mips_elf_object_p): Declare.
51 (_bfd_mips_elf_fake_sections): Declare.
52 (_bfd_mips_elf_section_from_bfd_section): Declare.
53 (_bfd_mips_elf_section_processing): Declare.
54 (_bfd_mips_elf_symbol_processing): Declare.
55 (_bfd_mips_elf_read_ecoff_info): Declare.
56 (_bfd_mips_elf_final_write_processing): Declare.
57 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
58 if already defined.
59
60 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
61 (mips_elf_final_write_processing): Likewise.
62
63 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
64
65 64-bit MIPS ELF ABI objdump support:
66 * elf64-mips.c: New file.
67 * Makefile.in: Rebuild dependencies.
68 (BFD64_BACKENDS): Add elf64-mips.o.
69 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
70 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
71 bfd_elf64_littlemips_vec to targ_selvecs.
72 (mips*-*-elf*): Likewise.
73 * confingure.in: Add bfd_elf64_bigmips_vec and
74 bfd_elf64_littlemips_vec to vector switch.
75 * configure: Rebuild.
76 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
77 broken out of mips_elf_section_from_shdr.
78 (mips_elf32_section_from_shdr): Rename from
79 mips_elf_section_from_shdr. Call new function.
80 (elf_backend_section_from_shdr): Update name of renamed function.
81 * elf-bfd.h (struct elf_size_info): Change second parameter of
82 write_out_phdrs to be const. Likewise for second parameter of
83 swap_symbol_out.
84 (struct bfd_elf_section_data): Add rel_hdr2 field.
85 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
86 (bfd_elf32_swap_symbol_out): Likewise.
87 (bfd_elf32_swap_reloc_in): Likewise.
88 (bfd_elf32_swap_reloc_out): Likewise.
89 (bfd_elf32_swap_reloca_in): Likewise.
90 (bfd_elf32_swap_reloca_out): Likewise.
91 (bfd_elf32_swap_phdr_in): Likewise.
92 (bfd_elf32_swap_phdr_out): Likewise.
93 (bfd_elf32_swap_dyn_in): Likewise.
94 (bfd_elf32_swap_dyn_out): Likewise.
95 (bfd_elf32_slurp_symbol_table): Declare.
96 (bfd_elf32_write_shdrs_and_ehdr): Declare.
97 (bfd_elf32_write_out_phdrs): Declare.
98 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
99 (bfd_elf64_swap_symbol_out): Likewise.
100 (bfd_elf64_swap_reloc_in): Likewise.
101 (bfd_elf64_swap_reloc_out): Likewise.
102 (bfd_elf64_swap_reloca_in): Likewise.
103 (bfd_elf64_swap_reloca_out): Likewise.
104 (bfd_elf64_swap_phdr_in): Likewise.
105 (bfd_elf64_swap_phdr_out): Likewise.
106 (bfd_elf64_swap_dyn_in): Likewise.
107 (bfd_elf64_swap_dyn_out): Likewise.
108 (bfd_elf64_slurp_symbol_table): Declare.
109 (bfd_elf64_write_shdrs_and_ehdr): Declare.
110 (bfd_elf64_write_out_phdrs): Declare.
111 (_bfd_mips_elf_section_from_shdr): Declare.
112 * elf.c (bfd_section_from_shdr): Remove assertion requiring
113 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
114 section for the section, add the new one to rel_hdr2. Increment
115 reloc_count rather than setting it.
116 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
117 Remove static declaration.
118 (elf_write_shdrs_and_ehdr): Define name as macro.
119 (elf_write_out_phdrs): Likewise.
120 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
121 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
122 (elf_swap_symbol_in): Change second parameter to be const.
123 (elf_swap_symbol_out): Likewise.
124 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
125 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
126 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
127 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
128 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
129 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
130 parameter to be const. Make non-static.
131 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
132 Make non-static.
133 (elf_slurp_symbol_table): Make non-static.
134 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
135 * elfxx-target.h (elf_info_to_howto): Define if not defined.
136 (elf_backend_size_info): Likewise.
137 (elfNN_bed): Use elf_backend_size_info.
138 * targets.c (bfd_elf64_bigmips_vec): Declare.
139 (bfd_elf64_littlemips_vec): Declare.
140 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
141 bfd_elf64_littlemips_vec if BFD64 is defined.
142
143 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
144
145 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
146
147 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
148 zeroes, in alignment holes.
149
150 * configure: Rebuild with autoconf 2.10.
151
152 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
153 potential leading underscore in the allocated buffer.
154
155 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
156
157 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
158 symbols into .sbss if this is a relocatable link.
159
160 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
161
162 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
163 undefined symbols when creating a shared library.
164
165 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
166
167 * coff-sh.c: Add a bunch of new code and static const arrays to
168 support aligning loads and stores on four byte memory boundaries.
169 Also:
170 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
171 R_SH_LABEL.
172 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
173 call sh_align_loads.
174 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
175 as unused.
176
177 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
178
179 * cache.c (bfd_open_file): Unlink the file before opening it for
180 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
181
182 * opncls.c (bfd_fdopenr): Set opened_once.
183
184 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
185
186 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
187 freeing it.
188
189 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
190 the code unconditionally.
191
192 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
193
194 * libcoff-in.h (struct pei_section_tdata): Define structure.
195 (pei_section_data): Define macro.
196 * libcoff.h: Rebuild.
197 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
198 store s_paddr field in pei_section_data.
199 (coff_compute_section_file_positions): Use pei_section_data rather
200 than _cooked_size, and don't overwrite an existing value.
201 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
202 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
203 * peicode.h (coff_bfd_copy_private_section_data): Define if
204 COFF_IMAGE_WITH_PE.
205 (pe_bfd_copy_private_section_data): New static function if
206 COFF_IMAGE_WITH_PE.
207
208 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
209
210 * srec.c (srec_set_arch_mach): Write as a function rather than a
211 macro definition.
212
213 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
214 no map, just check each member in turn to see whether it is
215 required.
216
217 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
218
219 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
220 table. Call BFD_ASSERT to validate header size, instead of
221 calling fatal.
222 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
223 name.
224
225 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
226
227 * ppcboot.c: New target for looking at PPCbug boot records.
228
229 * config{ure.in,.bfd}: Add support for ppcboot target.
230 * targets.c: Ditto.
231 * configure: Regenerate.
232
233 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
234
235 * coff-h8300.c (howto_table): Update names to match recent
236 changes to include/coff/internal.h. Fix minor errors in the
237 existing relocs. Add R_MOVL1 and R_MOVL2.
238 (rtype2howto): Similarly.
239 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
240 existing relaxing code and peform more relaxing.
241 (h8300_reloc16_extra_cases): Likewise.
242
243 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
244
245 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
246 symbols correctly.
247
248 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
249
250 * elfcode.h (elf_object_p): Reject generic ELF target if
251 e_machine matches an alternate machine code in a specific backend.
252
253 * netbsd-core.c (netbsd_core_vec): Remove initializer for
254 obsolete align_power_min field.
255
256 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
257
258 * coff-h8300.c (reloc_howto_type): Add howto entry for
259 R_PCRWORD_B.
260 (rtype2howto): Handle R_PCRWORD_B.
261 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
262 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
263 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
264 branch (R_PCWORD_B).
265
266 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
267
268 * aoutx.h (translate_from_native_sym_flags): Set the section for
269 BSF_CONSTRUCTOR symbols.
270
271 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
272 last_bf_index.
273
274 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
275
276 * coffcode.h (coff_write_object_contents): In comdat section lookup,
277 stop looking when section is found.
278
279 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
280
281 * coffcode.h (STRING_SIZE_SIZE): Define.
282 (styp_to_sec_flags): Handle long symbol names when looking for the
283 section symbol.
284 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
285 (bfd_coff_long_section_names): Define.
286 (coff_write_object_contents): Handle long section names.
287 (bfd_coff_std_swap_table): Initialize new field.
288 * libcoff.h: Rebuild.
289 * coffgen.c (make_a_section_from_file): Handle long section
290 names.
291 (coff_write_symbols): Handle long section names.
292 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
293 * coff-mips.c (mips_ecoff_backend_data): Likewise.
294 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
295 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
296 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
297 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
298 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
299 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
300
301 * bout.c (b_out_callback): Set lma of sections.
302 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
303 parameter to output_bfd. Used input_bfd instead of output_bfd in
304 several places.
305
306 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
307
308 * aoutx.h (translate_from_native_sym_flags): Don't create
309 SEC_CONSTRUCTOR sections.
310 * ecoff.c (ecoff_set_symbol_info): Likewise.
311
312 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
313 From Don Bowman <bowman@waterloo.hp.com>.
314
315 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
316
317 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
318 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
319
320 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
321
322 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
323 mips_32_relocs field.
324 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
325 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
326 relocs against a global symbol which is not defined in a regular
327 file.
328 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
329 against a global symbol, increment mips_32_relocs.
330 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
331 the symbol is not defined in a regular file, make room in the
332 .rel.dyn section.
333
334 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
335
336 * ecoff.c (ecoff_compute_section_file_positions): Track the real
337 file position and the virtual file position separately. Set
338 filepos information bsaed on the real file position.
339 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
340 Jan 23 change to coffcode.h.
341
342 * som.c (som_slurp_symbol_table): Set the symbol count to the
343 number of BFD symbols created.
344
345 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
346
347 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
348 output file if linking shared objects. Loop to check all relocs,
349 rather than returning false on first error.
350
351 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
352
353 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
354 (ppc_elf_additional_program_headers): If .interp section, bump #
355 of program headers by 1.
356 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
357 (ppc_elf_size_dynamic_sections): Add support for .plt section.
358 (ppc_elf_check_relocs): Print out filename in debug code. Enable
359 PLT support.
360 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
361 debug output.
362 (ppc_elf_relocate_section): If the output section isn't defined,
363 don't abort, just give an error message.
364
365 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
366 being created is .sdata or .sdata2, don't make the symbol dynamic.
367
368 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
369
370 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
371 members of an archive for dynamic objects with no symbols, and
372 pass them directly to check_archive_element.
373 (xcoff_link_check_ar_symbols): Pass dynamic objects to
374 xcoff_link_check_dynamic_ar_symbols.
375 (xcoff_link_check_dynamic_ar_symbols): New static function.
376
377 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
378 from _bfd_nodynamic to _bfd_xcoff.
379 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
380 Declare.
381 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
382 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
383 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
384 * libcoff.h: Rebuild.
385 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
386 (xcoff_get_section_contents): New static function.
387 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
388 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
389 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
390 (xcoff_dynamic_reloc): New static variable.
391 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
392 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
393
394 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
395
396 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
397 if reloc_entry->addend is not 0.
398 (CALC_ADDEND): Just set the addend to reloc.r_offset.
399
400 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
401
402 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
403 R_SPARC_GLOB_JMP.
404 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
405 Add entries for R_SPARC_[56].
406 (sparc_reloc_map): Add entries for R_SPARC_[56].
407
408 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
409
410 Optimize linking of stabs in sections as used in ELF and COFF.
411 * stabs.c: New file.
412 * libbfd-in.h (_bfd_link_section_stabs): Declare.
413 (_bfd_write_section_stabs): Declare.
414 (_bfd_write_stab_strings): Declare.
415 * libbfd.h: Rebuild.
416 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
417 (struct coff_link_hash_table): Add stab_info field.
418 * libcoff.h: Rebuild.
419 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
420 stab_info field.
421 (coff_link_add_symbols): Call _bfd_link_section_stabs if
422 appropriate.
423 (_bfd_coff_final_link): Write out stab strings hash table.
424 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
425 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
426 hash table.
427 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
428 (struct bfd_elf_section_data): Add stab_info field.
429 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
430 field.
431 * elflink.h (elf_link_add_object_symbols): If appropriate, call
432 _bfd_link_section_stabs.
433 (elf_bfd_final_link): Write out stab strings hash table.
434 (elf_link_input_bfd): Handle optimized stabs sections.
435 * reloc.c (_bfd_final_link_relocate): Check address against
436 _raw_size rather than _cooked_size.
437 * Makefile.in: Rebuild dependencies.
438 (BFD_LIBS): Add stabs.o
439 (BFD_LIBS_CFILES): Add stabs.c.
440
441 * VERSION: Increment for bfdlink.h change.
442
443 * coffgen.c (coff_renumber_symbols): Correct handling of
444 BSF_NOT_AT_END common symbols.
445
446 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
447
448 * coff-ppc.c (record_toc): Add cast to avoid warning.
449 (ppc_allocate_toc_section): Likewise.
450 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
451 (ppc_coff_reloc_type_lookup): Remove unreached code.
452 * coffcode.h (coff_write_object_contents): Don't take the address
453 of an array.
454 * peicode.h (pe_print_idata): Add casts to avoid warning.
455 (pe_print_edata): Likewise.
456 (pe_print_reloc): Remove ANSI C string concatenation.
457
458 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
459
460 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
461 and last_bf fields.
462 * libcoff.h: Rebuild.
463 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
464 symbols.
465 (coff_swap_aux_out): Likewise.
466 * peicode.h (coff_swap_aux_in): Likewise.
467 (coff_swap_aux_out): Likewise.
468 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
469 symbols.
470 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
471 field.
472 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
473 Fix up .bf endndx link fields.
474 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
475 field.
476 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
477 symbols.
478
479 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
480
481 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
482 on Solaris PowerPC systems doesn't get confused.
483
484 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
485 #ifdef PPC.
486
487 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
488 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
489 update did_reg and did_reg2.
490
491 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
492
493 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
494
495 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
496 callback routines, pass h->root.string rather than name, in case
497 copy is true and name is transient.
498
499 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
500
501 * elfcore.h: Add support for core files with multiple threads.
502 (Primarily for Solaris.)
503
504 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
505
506 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
507 section->orelocation is NULL.
508
509 * coffgen.c (bfd_coff_get_syment): New function.
510 (bfd_coff_get_auxent): New function.
511 * bfd-in.h (bfd_coff_get_syment): Declare.
512 (bfd_coff_get_auxent): Declare.
513 * bfd-in2.h: Rebuild.
514
515 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
516
517 * elf32-mips.c (struct mips_hi16): Define.
518 (mips_hi16_addr, mips_hi16_addend): Remove.
519 (mips_hi16_list): New static variable.
520 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
521 (mips_elf_lo16_reloc): Process mips_hi16_list.
522 (mips_elf_relocate_section): Permit an arbitrary number of HI16
523 relocs before the associated LO16 reloc.
524
525 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
526
527 * versados.c (versados_scan): Check bfd_alloc return value.
528 (versados_object_p): Check all bfd_read return values. Require
529 that lang field be less than 10, to avoid confusion with Intel Hex
530 files.
531
532 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
533 aren't any symbols.
534 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
535 not 0, for an absolute symbol.
536 (NAME(aout,swap_ext_reloc_out)): Likewise.
537
538 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
539 (ihex_write_object_contents): For a large start address, output
540 the full 32 bit address in record type 5.
541
542 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
543 to int to avoid promotion problems in prototype.
544
545 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
546
547 * configure.host: Use ${srcdir} when looking for picfrag.
548
549 * configure.host: Switch on ${libdir}, not $(libdir). From
550 alan@spri.levels.unisa.edu.au (Alan Modra).
551
552 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
553 entry point, not just for DYNAMIC objects.
554 * sunos.c (sunos_add_dynamic_symbols): Always call
555 sunos_create_dynamic_sections. If called with a non DYNAMIC
556 object, don't do anything else.
557 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
558
559 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
560
561 * configure.in: Permit --enable-shared to specify a list of
562 directories.
563 * configure: Rebuild.
564
565 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
566 host when configuring with --enable-shard.
567
568 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
569
570 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
571 <jdp@polstra.com>.
572
573 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
574 to avoid crashing in bfd_hash_replace.
575
576 * sysdep.h: Use #ifdef, not #if.
577
578 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
579
580 * config.in: Rebuild.
581
582 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
583
584 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
585 (AC_CHECK_HEADERS): Check for sys/time.h
586 (AC_HEADER_TIME): Add macro.
587 * configure: Rebuild.
588 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
589 to control what combination of <time> and <sys/time.h>
590 get included.
591
592 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
593
594 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
595 (aout_32_sunos4_write_object_contents): Likewise.
596 * aoutx.h (NAME(aout,machine_type)): Handle
597 bfd_mach_sparc_{sparclet,sparclite}.
598 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
599 (bfd_mach_sparc_v9_p): Update.
600 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
601 * libaout.h (enum machine_type): Add M_SPARCLET.
602 * sunos.c (MACHTYPE_OK): Define.
603 * bfd-in2.h: Regenerated.
604
605 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
606
607 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
608 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
609 * elflink.c (_bfd_elf_create_got_section): Store the
610 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
611 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
612 global offset table goes over 0x1000, set the value of
613 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
614 (elf32_sparc_relocate_section): Subtract the offset of
615 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
616
617 * elfcode.h: Don't include <string.h>.
618
619 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
620
621 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
622 generic_link_hash_newfunc. All references changed.
623 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
624 moved here from libbfd-in.h.
625 * libbfd-in.h: Corresponding changes.
626 * libbfd.h: Regenerated.
627
628 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
629
630 * aoutx.h (aout_link_input_section_std): When reporting an
631 overflow error, use the name of the symbol in the hash table if
632 available.
633 (aout_link_input_section_ext): Likewise.
634
635 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
636 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
637
638 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
639
640 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
641 * coffcode.h (coff_compute_section_file_positions): Likewise.
642 (coff_write_object_contents): Likewise.
643
644 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
645
646 * section.c (SEC_LINK_ONCE): Define.
647 (SEC_LINK_DUPLICATES): Define.
648 (SEC_LINK_DUPLICATES_DISCARD): Define.
649 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
650 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
651 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
652 * bfd-in2.h: Rebuild.
653 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
654 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
655 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
656 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
657 SEC_LINK_ONCE, and look through the symbol table for the setting
658 for SEC_LINK_DUPLICATES.
659 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
660 set for a section, find the section symbol in the symbol table,
661 and set the aux entry based on SEC_LINK_DUPLICATES.
662 * coffgen.c (coff_print_symbol): Add a space before "checksum".
663 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
664 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
665 * coff-i386.c (i386coff_vec): Likewise.
666 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
667
668 * VERSION: Bump to 2.6.1.
669 * Makefile.in (stamp-h): Depend upon VERSION.
670
671 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
672
673 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
674 * libbfd.h: Rebuilt.
675 * linker.c (generic_link_hash_newfunc): No longer static.
676 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
677 to override.
678 * coff-h8300.c: Add two derived hash tables and their associated
679 funtions and #defines for use by the h8300 linker.
680 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
681 the function vector as needed. Place the address of the function
682 vector entry in the location specified by the R_MEM_INDIRECT reloc.
683 Rewrite the vectors section contents as necessary.
684 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
685 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
686 (coff_bfd_link_hash_table_create): Likewise.
687
688 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
689
690 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
691 __attribute__ ((__unused__)) so that -Wall doesn't warn about
692 them.
693 (hppa_rebuild_insn): Pass pointer to correct type to
694 low_sign_unext and dis_assemble_21.
695
696 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
697
698 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
699 Stick with sparc-*-{sysv4*,solaris2*}.
700
701 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
702
703 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
704 (coff_swap_aux_out): Swap out extra PE x_scn fields.
705 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
706 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
707 fields is non-zero, print them.
708
709 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
710 ifdef. Remove unused variables.
711 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
712 variables.
713 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
714 (get_symbol_value): Ifdef out.
715 (pe_ppc_reloc): Ifdef out. Remove unused variables.
716 (coff_ppc_relocate_section): Remove unused variables. Make
717 fprintf strings and argument types correspond. Put before_addr in
718 DEBUG_RELOC ifdef.
719 (dump_toc): Make fprintf strings and argument types correspond.
720 (ppc_process_before_allocation): Remove unused variables. Always
721 return a value.
722 (ppc_reflo_reloc): Ifdef out.
723 (ppc_addr32nb_reloc): Ifdef out.
724 (ppc_coff_rtype2howto): Make fprintf strings and argument types
725 correspond.
726 (coff_ppc_rtype_to_howto): Likewise.
727 (ppc_coff_swap_sym_in_hook): Remove unused variables.
728
729 * peicode.h (pe_print_idata): Move otherwise unused variables into
730 the #ifdef where they are used. Always return a value.
731 (pe_print_edata): Make fprintf strings and argument types
732 correspond. Always return a value.
733 (pe_print_pdata): Removed unused variable addr_value. Always
734 return a value.
735 (pe_print_reloc): Remove unused variable onaline. Make fprintf
736 strings and argument types correspond. Always return a value.
737
738 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
739 (ppc_elf_finish_dynamic_symbol): Move definition of unused
740 variable rela inside #if 0 section where it is used.
741
742 * ns32k.h: New file.
743 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
744 functions to start with _bfd_.
745 * aout-ns32k.c: Include ns32k.h. Change references to renamed
746 functions in cpu-ns32k.h.
747 * Makefile.in: Rebuild dependencies.
748 (HFILES): Add ns32k.h.
749
750 * section.c (struct sec): Add linker_mark field. Change
751 user_set_vma and reloc_done to be single bit fields.
752 (STD_SECTION): Update accordingly.
753 * bfd-in2.h: Rebuild.
754 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
755 link.
756 (aout_link_input_bfd): Don't link unmarked sections.
757 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
758 link.
759 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
760 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
761 the link.
762 * elflink.h (elf_bfd_final_link): Mark sections included in the
763 link.
764 (elf_link_input_bfd): Don't link unmarked sections.
765 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
766 in the link.
767 (xcoff_link_input_bfd): Don't link unmarked sections.
768
769 * coffswap.h (coff_swap_scnhdr_out): Include section name in
770 overflow error messages.
771
772 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
773
774 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
775 is not set, print "BFD: " before the error message.
776
777 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
778 Miles Bader <miles@gnu.ai.mit.edu>.
779 * configure: Rebuild.
780
781 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
782
783 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
784 symbols.
785
786 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
787 m68k-aout, m68k-coff, and m68k-elf targets.
788
789 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
790
791 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
792 (ieee_generic_stat_arch_elt): Restructured to prevent
793 ieee_object_p from being called repeatedly.
794
795 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
796
797 * coffcode.h (coff_write_object_contents): Allocate
798 buffers large enough for any FILEHDR or AOUTHDR.
799
800 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
801
802 * ecofflink.c (lookup_line): New static function, renamed and
803 slighly changed from old _bfd_ecoff_locate_line.
804 (_bfd_ecoff_locate_line): Cache line number information. Use
805 lookup_line for actual lookup.
806
807 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
808
809 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
810 multiple of 20 bytes.
811
812 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
813
814 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
815 allocate ecoff_find_line, and don't initialize by hand.
816 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
817 mips_elf_find_line, and don't call memset.
818
819 * coffcode.h (coff_compute_section_file_positions): If not
820 producing a final executable, don't consider sofar when aligning
821 the section to the correct size.
822
823 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
824
825 * coffcode.h (coff_add_missing_symbols): Ifdef out.
826 (coff_write_object_contents): Don't call coff_add_missing_symbols.
827 * coffgen.c (coff_section_symbol): Ifdef out.
828
829 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
830
831 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
832 output_bfd is not NULL.
833
834 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
835
836 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
837 of bfd_alloc (fixes fix_line not being initialized).
838 Delete zeroing of fix_{value,tag,end,scnlen} fields.
839
840 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
841
842 * coffcode.h: Allow specific backends to override the
843 bfd_link_add_symbols routine.
844
845 * coff-h8300.c: Include genlink.h.
846 (howto_table): Add R_MEM_INDIRECT.
847 (rtype2howto): Support R_MEM_INDIRECT.
848 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
849 for now.
850
851 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
852
853 * coff-alpha.c (alpha_relocate_section): Use
854 info->callbacks_warning, rather than _bfd_error_handler, for
855 "multiple gp" warning.
856
857 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
858
859 * linker.c (bfd_wrapped_link_hash_lookup): New function.
860 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
861 table string. Use bfd_wrapped_link_hash_lookup.
862 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
863 table string.
864 * aoutx.h (aout_link_write_symbols): Use the name from the hash
865 table, if any, when writing out symbols.
866 (aout_link_input_section_std): Use the name from the hash table,
867 if any, when reporting undefined symbols.
868 (aout_link_input_section_ext): Likewise.
869 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
870 * bout.c (get_value): Likewise.
871 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
872 * ecoff.c (ecoff_reloc_link_order): Likewise.
873 * elflink.h (elf_link_add_object_symbols): Likewise.
874 (elf_reloc_link_order): Likewise.
875 * linker.c (_bfd_generic_link_output_symbols): Likewise.
876 (_bfd_generic_reloc_link_order): Likewise.
877 (default_indirect_link_order): Likewise.
878 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
879 * sunos.c (sunos_add_one_symbol): Likewise.
880 * xcofflink.c (xcoff_link_add_symbols): Likewise.
881 (bfd_xcoff_link_count_reloc): Likewise.
882 (xcoff_reloc_link_order): Likewise.
883
884 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
885 into -1 for intern->rss.
886
887 * configure: Rebuild with autoconf 2.8.
888
889 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
890
891 * stab-syms.c (__define_stab_duplicate): Define.
892 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
893 switch.
894 * bfd-in.h (bfd_get_stab_name): Declare.
895 * bfd-in2.h: Rebuild.
896 * Makefile.in: Rebuild dependencies.
897 (BFD_LIBS): Add stab-syms.o.
898 (BFD_LIBS_CFILES): Add stab-syms.c.
899 (BFD32_BACKENDS): Remove stab-syms.o.
900 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
901 * configure.in: Don't list stab-syms.o in bfd_backends.
902 * configure: Rebuild.
903 * libaout.h (aout_stab_name): Don't declare.
904 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
905 not aout_stab_name.
906
907 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
908
909 * elf.c (assign_file_positions_for_segments): Adjust file offset
910 for section alignment even if SEC_LOAD is not set.
911
912 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
913
914 * configure.in: Don't set SHLIB or SHLINK to an empty string,
915 since they appear as targets in Makefile.in.
916 * configure: Rebuild.
917
918 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
919 don't fiddle with a symbol which is not defined anywhere.
920
921 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
922
923 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
924 though they are defined in a shared library.
925 (xcoff_build_ldsyms): Likewise.
926
927 * coffgen.c (coff_find_nearest_line): Don't look at the line
928 numbers for the section if section->lineno is NULL.
929
930 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
931 message rather than calling BFD_ASSERT.
932 * elfcode.h (write_relocs): Check return value of
933 _bfd_elf_symbol_from_bfd_symbol.
934
935 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
936
937 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
938 for .sbss section.
939
940 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
941
942 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
943 and R_HPPA_NLRSEL.
944 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
945 hppa_reloc_field_selector_type_alt.
946 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
947 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
948 selectors.
949 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
950
951 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
952
953 * elf.c (assign_file_positions_for_segments): Adjust the segment
954 memory size for the alignment of a SEC_ALLOC section, not just a
955 SEC_LOAD section.
956
957 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
958
959 * m68klinux.c: New file.
960 * hosts/m68klinux.h: New file.
961 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
962 * configure.in (m68*-*-linux*): New native host.
963 (m68klinux_vec): New vector.
964 * configure: Rebuild.
965 * targets.c (m68klinux_vec): Declare.
966 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
967 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
968 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
969 declaration from bfd_linux_size_dynamic_sections.
970 (bfd_m68klinux_size_dynamic_sections): Declare.
971 * bfd-in2.h: Rebuild.
972 * Makefile.in: Rebuild dependencies.
973 (BFD32_BACKENDS): Add m68klinux.o.
974 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
975
976 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
977
978 * libhppa.h (pa_arch): Add pa20.
979 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
980 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
981 (hppa_field_adjust): Handle e_nsel.
982 * som.c: Provide default definitions for many new relocs found only
983 in hpux10 include files.
984 (som_fixup_formats): Add several new relocs from hpux10.
985 (som_hppa_howto_table): Add hpux10 relocs.
986 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
987
988 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
989
990 * mpw-make.sed: Edit out recent shared library support, and
991 rules to rebuild .h files using doc/chew.
992
993 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
994
995 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
996 size even of sections with no contents.
997
998 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
999
1000 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
1001 starting with '$' the way we skip names starting with '.'. When
1002 updating x_endndx, don't be fooled by an index which has been
1003 merged.
1004
1005 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
1006 struct/union/enum type with no elements.
1007
1008 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
1009
1010 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
1011
1012 * archive.c (bfd_generic_archive_p): If the first file in the
1013 archive can not be recognized as an object, don't assume that this
1014 is the wrong format.
1015
1016 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
1017 format is not bfd_object.
1018 (bfd_elf_get_dt_soname): Likewise.
1019
1020 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
1021
1022 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
1023 reloc.
1024
1025 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1026
1027 * bfd.c (tdata): Add netbsd_core_data.
1028 * bfd-in2.h: Regenerated.
1029
1030 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
1031
1032 * sunos.c (SUNOS_CONSTRUCTOR): Define.
1033 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
1034 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
1035 appropriate.
1036
1037 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
1038 to get the symbol index, matching 14 Jul 95 change.
1039
1040 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
1041
1042 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1043 Remove duplicate definition of gp.
1044
1045 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
1046
1047 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
1048 assume that we can set the GP value and then get the same value,
1049 since it won't be true if the output file is neither ELF nor
1050 ECOFF.
1051 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
1052 _bfd_get_gp_value here.
1053 (mips_gprel_reloc): Don't assume we can set and get the GP value.
1054 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
1055 mips_elf_final_gp.
1056 (mips_elf_lo16_reloc): Likewise.
1057 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
1058 Don't require that the BFD be ELF.
1059 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
1060 (mips_elf_gprel32_reloc): Likewise.
1061 (mips_elf_relocate_section): Don't assume we can set and get the
1062 GP value.
1063 (mips_elf_finish_dynamic_symbol): Don't bother to use
1064 _bfd_get_gp_value here.
1065
1066 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
1067 Don't change epdr between malloc and free. Be careful not to free
1068 NULL pointers. Zero out the first RPDR.
1069
1070 * configure.host: On Linux, only pass -rpath option if $(libdir)
1071 is neither /lib nor /usr/lib. From Alan Modra
1072 <alan@mullet.Levels.UniSA.Edu.Au>.
1073
1074 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
1075 dt_name.
1076 (elf_dt_name): Rename from elf_dt_needed_name.
1077 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
1078 elf_dt_needed_name.
1079 (bfd_elf_get_dt_soname): New function.
1080 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
1081 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
1082 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
1083 * bfd-in2.h: Rebuild.
1084
1085 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
1086
1087 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
1088 _bfd_sparc_elf_reloc_type_lookup.
1089 (bfd_elf32_bfd_reloc_type_lookup): Update.
1090 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
1091 (sparc64_elf_howto_table): Define.
1092 (sparc_reloc_map): Define.
1093 (sparc64_elf_reloc_type_lookup): New function.
1094 (sparc_elf_wdisp16_reloc): New function.
1095 (elf_info_to_howto): Use sparc64_elf_howto_table.
1096 (sparc64_elf_relocate_section): Likewise.
1097 (bfd_elf64_bfd_reloc_type_lookup): Update.
1098
1099 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
1100
1101 * configure.host: Check for 'do not mix' from native linker before
1102 trying to use -rpath.
1103
1104 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1105
1106 * bfd.c (_bfd_get_gp_value): New function.
1107 (_bfd_set_gp_value): New function.
1108 * libbfd-in.h (_bfd_get_gp_value): Declare.
1109 (_bfd_set_gp_value): Declare.
1110 * libbfd.h: Rebuild.
1111 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
1112 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
1113 directly to the fields in the tdata information.
1114 (alpha_relocate_section): Likewise.
1115 * coff-mips.c (mips_adjust_reloc_in): Likewise.
1116 (mips_gprel_reloc): Likewise.
1117 (mips_relocate_section): Likewise.
1118 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
1119 (mips_elf_lo16_reloc): Likewise.
1120 (mips_elf_final_gp): Likewise.
1121 (mips_elf_gprel16_reloc): Likewise.
1122 (mips_elf_gprel32_reloc): Likewise.
1123 (mips_elf_relocate_section): Likewise.
1124 (mips_elf_finish_dynamic_symbol): Likewise.
1125
1126 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
1127
1128 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
1129
1130 * configure.in: Call AC_PROG_CC before configure.host.
1131 * configure: Rebuild.
1132 * configure.host: Don't set information which autoconf should
1133 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
1134
1135 * configure.host: Remove go32 and win32 host information, since it
1136 should no longer be needed.
1137
1138 * elf.c (map_sections_to_segments): If we have a .dynamic section,
1139 then start a new segment rather than put a writable section in a
1140 readonly segment.
1141
1142 * configure.host: Set RPATH_ENVVAR.
1143
1144 * Makefile.in: Rebuild dependencies.
1145
1146 * elflink.c (_bfd_elf_create_linker_section): Remove unused
1147 zero_section variable.
1148
1149 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
1150
1151 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
1152 ($(srcdir)/libbfd.h): Rename from libbfd.h.
1153 ($(srcdir)/libcoff.h): Rename from libcoff.h.
1154
1155 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
1156
1157 * ieee.c (ieee_write_expression): Only use an R variable for a
1158 local symbol. Don't output a zero offset. Handle a zero address.
1159 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
1160 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
1161 PCREL_OFFSET.
1162 (parse_expression): Don't try to handle multiple occurrences of a
1163 P variable. Handle I variables differently from X variables. Fix
1164 the order of minus expressions.
1165 (ieee_slurp_external_symbols): Generate an I variable for an NN
1166 record. Fix handling of ATI and ATX records.
1167 (ieee_slurp_sections): Only set minimal section attributes.
1168 Adjust them later, based on the section contents.
1169 (ieee_object_p): Read in the file until just after the ME record.
1170 Call ieee_slurp_section_data to set the section flags.
1171 (do_one): Add iterations parameter. Only repeat the first load
1172 item. Set the section and file reloc flags.
1173 (ieee_slurp_section_data): Set section flags. Pass iterations to
1174 do_one.
1175 (ieee_canonicalize_reloc): Handle I variables.
1176 (do_with_relocs): Only emit relocation size when necessary.
1177 Increase MAXRUN to 127. Change ov to be assigned, and take
1178 src_mask and pcrel_offset into account.
1179 (ieee_write_data_part): Skip sections that are not loaded.
1180 (ieee_write_external_part): Don't output optional last entry of WX
1181 records.
1182 (ieee_write_me_part): Make setting of me_record neater.
1183 (ieee_generic_stat_arch_elt): Get the size of an archive element.
1184
1185 * syms.c (stt): Add entries for zerovars, vars, and code.
1186
1187 * elfcode.h (validate_reloc): New static function.
1188 (write_relocs): Call validate_reloc for non ELF relocs.
1189
1190 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
1191 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
1192 (TARGET_LITTLE_SYM): Likewise.
1193
1194 * config.bfd (m68*-*-psos*): New target.
1195
1196 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
1197
1198 * i386msdos.c: Remove some #if 0 code.
1199 (msdos_write_object_contents): Don't include empty sections in the
1200 size computation, regardless of their address.
1201
1202 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1203
1204 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
1205 is NULL, ie, the -r switch is used.
1206
1207 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
1208
1209 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
1210 (BFD_RELOC_MIPS_GOT_LO16): Define.
1211 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
1212 * bfd-in2.h, libbfd.h: Rebuild.
1213 * elf32-mips.c (mips_reloc_map): Map new relocs.
1214
1215 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
1216
1217 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
1218 $(SHLINK).
1219
1220 * ieee.c (get_symbol): Set the section to bfd_abs_section.
1221 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
1222 simple number for the section address, rather than an expression.
1223 Limit the number of bytes between relocs to MAXRUN.
1224 (ieee_write_me_part): Set me_record to the file offset after the
1225 start address.
1226 (ieee_write_processor): New static function.
1227 (ieee_write_object_contents): Use ieee_write_processor.
1228
1229 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
1230
1231 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
1232
1233 * coff-aux.c: Change include of aux.h to aux-coff.h.
1234
1235 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1236
1237 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
1238 relocation put the addend both in the reloc entry and the data.
1239 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
1240 GOT offset value.
1241
1242 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
1243 a R_68K_PCxx reloc against a defined global symbol directly.
1244 (elf_m68k_check_relocs): Don't count such a reloc.
1245
1246 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
1247 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
1248 symbol for now, otherwise always record the symbol as dynamic.
1249 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
1250 is not referenced by a dynamic object, and we are not making a
1251 shared object, then don't make a PLT entry. If we do make a PLT
1252 entry, make sure the symbol has been recorded as dynamic.
1253
1254 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
1255
1256 * configure.host: When making a shared library, set HLDFLAGS to
1257 pass an appropriate -rpath option. Use the make variable SONAME
1258 as the shared library soname, rather than computing it here. On
1259 SunOS, build stamp-tshlink in place of $(SHLINK).
1260 * Makefile.in (SONAME): New variable.
1261 ($(SHLINK)): Make a link to the transformed name, as well.
1262 (stamp-tshlink): New target.
1263 (install): Skip stamp-tshlink during install.
1264
1265 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1266
1267 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
1268 linker sections have been set up yet.
1269
1270 * elf.c (make_mapping): Add an additional argument to suppress
1271 making the first section include the program headers.
1272 (map_sections_to_segments): If the user used -Ttext such that the
1273 program headers are on a different page, do not set the flags
1274 saying that this section includes the program headers.
1275
1276 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
1277
1278 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
1279 don't define TRAD_HEADER.
1280 * configure: Rebuild.
1281
1282 * netbsd-core.c: New file, support for NetBSD core files.
1283 * hosts/*nbsd.h: Removed.
1284
1285 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
1286
1287 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
1288 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
1289 * libbfd.h, bfd-in2.h: Regenerated.
1290 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
1291 bfd_elf32_bfd_reloc_type_lookup.
1292 (reloc_type{,_names}): Deleted.
1293 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1294 Add sparc64 relocs.
1295 (sparc_reloc_map): Add sparc64 relocs.
1296 (sparc_elf_notsupported_reloc): New static function.
1297 (sparc_elf_wdisp16_reloc): New static function.
1298 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
1299 (elf32_sparc_relocate_section): Likewise.
1300 (bfd_elf32_bfd_reloc_type_lookup): Define.
1301 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
1302 (reloc_type{,_names}): Deleted.
1303 (elf_sparc_howto_table): Deleted.
1304 (sparc_reloc_map): Deleted.
1305 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
1306 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
1307
1308 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
1309
1310 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
1311 *-*-hpux* host.
1312
1313 * Makefile.in (program_transform_name): New variable.
1314 (install): Transform library name before installing it.
1315
1316 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
1317
1318 * archures.c (bfd_mach_i960_hx): Define.
1319 * bfd-in2.h: Rebuild.
1320 * cpu-i960.c (scan_960_mach): Accept machine "hx".
1321 (MATRIX): Expand entries for HX.
1322 (arch_info_struct): Add i960:hx entry.
1323 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
1324 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
1325 (coff_set_flags): Handle bfd_mach_i960_hx.
1326
1327 Support for building as a shared library, based on patches from
1328 Alan Modra <alan@spri.levels.unisa.edu.au>:
1329 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
1330 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
1331 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
1332 * configure: Rebuild.
1333 * configure.host: If --enable-shared, adjust shared library stuff
1334 based on the host. If the host is SunOS, and the linker supports
1335 -rpath, set HLDFLAGS to use it.
1336 * Makefile.in (ALLLIBS): New variable.
1337 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
1338 (COMMON_SHLIB, SHLINK): New variables.
1339 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
1340 (STAGESTUFF): Remove variable.
1341 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
1342 $(TARGETLIB).
1343 (stamp-ofiles): New target, like old ofiles target, but build
1344 using a temporary file and move-if-change, and touch stamp-ofiles
1345 when done.
1346 (ofiles): Just depend upon stamp-ofiles.
1347 (stamp-piclist, piclist): New targets.
1348 ($(SHLIB), $(SHLINK)): New targets.
1349 (targets.o, archures.o): Build twice if PICFLAG is set.
1350 (do_mostlyclean): Remove pic/*.o.
1351 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
1352 stamp-piclist.
1353 (do_distclean): Remove pic and stamp-picdir.
1354 (install): Install shared libraries.
1355 ($(OFILES)): Depend upon stamp-picdir.
1356 (stamp-picdir): New target.
1357
1358 * libcoff-in.h: Add comment reminding people that libcoff.h is a
1359 generated file.
1360 * libcoff.h: Rebuild.
1361
1362 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
1363 flavour of a section with no owner.
1364
1365 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
1366 ELF_LINK_NON_ELF flag.
1367 (mips_elf_create_got_section): Likewise.
1368
1369 * elf.c: Revert last change, since it breaks dynamic linking.
1370 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
1371 field.
1372 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
1373 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
1374 (elfNN_bed): Don't initialize want_hdr_in_seg field.
1375
1376 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1377
1378 * elf.c (assign_file_positions_for_segments): If the backend does
1379 not want the elf header or the program headers in the address
1380 space, do not include them in the calculations.
1381
1382 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
1383 function to determine if we need additional program headers.
1384 (ppc_elf_modify_segment_map): Define as a NOP function for now.
1385 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
1386
1387 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
1388
1389 * coffcode.h: Move today's libcoff.h change into coffcode.h.
1390
1391 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
1392
1393 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
1394 back into one line. Some compilers (sunos 4.1.3 for example)
1395 won't accept args split across more than one line.
1396
1397 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
1398
1399 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
1400 * configure: Regenerate.
1401
1402 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
1403
1404 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
1405 try to do arithmetic on a void *, cast it to a unsigned char * first.
1406
1407 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
1408
1409 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
1410 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
1411 ELF_LINK_NON_ELF.
1412 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
1413 flag for a newly defined symbol.
1414 (NAME(bfd_elf,record_link_assignment)): Likewise.
1415 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
1416 set the DEF or REF_REGULAR flags correctly.
1417
1418 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
1419 (libbfd.h, libcoff.h): Corresponding change.
1420
1421 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
1422 a PLT32 reloc as dynamic.
1423 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
1424 is not referenced by a dynamic object, and we are not making a
1425 shared object, then don't make a PLT entry. If we do make a PLT
1426 entry, make sure the symbol has been recorded as dynamic.
1427
1428 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
1429
1430 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
1431 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
1432 (powerpcle-*-cygwin32): New.
1433 * peicode.h (add_data_entry): Get address from vma.
1434
1435 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1436
1437 * elflink.c (_bfd_elf_create_linker_section): If the symbol
1438 attached to the section has already been created as an undefined
1439 symbol, treat it as if it hasn't been created yet.
1440
1441 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
1442
1443 * elflink.h (elf_bfd_final_link): Don't output initial dummy
1444 symbol or section symbols if stripping all symbols and this is not
1445 a relocateable link. Don't output the symbol string table if
1446 there are no symbols.
1447 (elf_link_flush_output_syms): Don't do anything if there are no
1448 symbols to flush.
1449
1450 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
1451
1452 * coff-aux.c: New file.
1453 * hosts/m68kaux.h: New file.
1454 * config.bfd (m68*-apple-aux*): New target.
1455 * configure.in (m68*-apple-aux*): New native host.
1456 (m68kaux_coff_vec): New vector.
1457 * configure: Rebuild.
1458 * targets.c (m68kaux_coff_vec): Declare.
1459 * coffcode.h (bfd_coff_backend_data): Add field
1460 _bfd_coff_link_add_one_symbol.
1461 (bfd_coff_link_add_one_symbol): Define.
1462 (compare_arelent_ptr): New static function if TARG_AUX.
1463 (coff_write_relocs): If TARG_AUX, sort the relocs.
1464 (coff_write_object_contents): Set A/UX aouthdr magic number.
1465 (coff_link_add_one_symbol): Define if not defined.
1466 (bfd_coff_std_swap_table): Initialize new field.
1467 * libcoff.h: Rebuild.
1468 * cofflink.c (coff_link_add_symbols): Call
1469 bfd_coff_link_add_one_symbol rather than
1470 _bfd_generic_link_add_one_symbol.
1471 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
1472 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1473 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1474 * Makefile.in: Rebuild dependencies.
1475 (BFD32_BACKENDS): Add coff-aux.o.
1476 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
1477
1478 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
1479
1480 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
1481 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
1482
1483 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
1484
1485 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
1486 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
1487 (maintainer-clean): Warn about deleting special files.
1488 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
1489
1490 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
1491 warning symbols correctly.
1492 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1493 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1494 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1495 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1496 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1497 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1498
1499 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
1500 warnings.
1501
1502 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
1503
1504 * libcoff-in.h: aligned newly exported names with bfd naming
1505 conventions. Removed an erroneous define of POWERPC_LE_PE.
1506 * libcoff.h: Rebuild.
1507 * cofflink.c, coff-ppc.c: the above function name changes
1508
1509 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
1510
1511 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
1512 * ecoff.c (struct extsym_info): Define.
1513 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
1514 to ecoff_link_write_external.
1515 (ecoff_link_write_external): Accept a struct extsym_info pointer.
1516 Strip symbols when appropriate.
1517
1518 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
1519 * syms.c (BSF_OBJECT): Define.
1520 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
1521 * bfd-in2.h: Rebuild.
1522 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
1523 STT_OBJECT symbol.
1524 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
1525 is set.
1526
1527 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
1528 copying relocs into a shared object, treat a defined global symbol
1529 as a local symbol.
1530 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1531 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1532 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1533
1534 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
1535 real defined symbol, not to a weak defined symbol.
1536
1537 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
1538
1539 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
1540 and made a few static functions externs.
1541
1542 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
1543 POWERPC_LE_PE hack in cofflink.
1544
1545 * libcoff-in.h: promoted the following from cofflink.c to allow
1546 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
1547 coff_debug_merge_element, struct coff_debug_merge_type,
1548 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
1549 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
1550 coff_debug_merge_hash_lookup, coff_link_section_info,
1551 coff_final_link_info, coff_debug_merge_hash_newfunc,
1552 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
1553
1554 * libcoff.h: re-gen'd
1555
1556 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
1557
1558 * syms.c: Include "bfdlink.h".
1559 (struct stab_find_info): Define.
1560 (_bfd_stab_section_find_nearest_line): New function.
1561 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
1562 * libbfd.h: Rebuild.
1563 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
1564 * elf.c (_bfd_elf_find_nearest_line): Try calling
1565 _bfd_stab_section_find_nearest_line before searching the ELF
1566 symbol table. Find the closest STT_FUNC symbol, not the last one.
1567 * libcoff-in.h (coff_data_type): Add line_info field.
1568 * libcoff.h: Rebuild.
1569 * coffgen.c (coff_find_nearest_line): Try calling
1570 _bfd_stab_section_find_nearest_line before searching the COFF
1571 symbol table.
1572 * Makefile.in: Rebuild dependencies.
1573
1574 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1575
1576 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
1577 4 bytes, so we get the correct value when updating the register
1578 field in little endian mode.
1579
1580 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
1581
1582 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
1583 entry_section fields. Add sntoc and snentry fields.
1584 * libcoff.h: Rebuild.
1585 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
1586 not toc_section and entry_section (the COFF file does not have any
1587 sections at this point).
1588 (coff_write_object_contents): Set o_snentry and o_sntoc from
1589 snentry and sntoc rather than entry_section and toc_section.
1590 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
1591 snentry, not toc_section and entry_section.
1592 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
1593 entry_section from hentry.
1594 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
1595 set snenty.
1596 (xcoff_link_input_bfd): Set sntoc, not toc_section.
1597 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
1598 than using toc_section directly.
1599
1600 * archures.c: Add missing `.' in enum bfd_architecture.
1601 * bfd-in2.h: Rebuild.
1602
1603 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
1604 Robert Lipe <robertl@arnet.com>.
1605
1606 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1607
1608 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
1609 to sections we allocate. Use bfd_zalloc to allocate initialial
1610 sections, not bfd_alloc.
1611 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
1612 SDA{,2}I16 relocations.
1613 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
1614 whether to put something in .sbss or not.
1615 (ppc_elf_relocate_section): Add support for more relocations. Add
1616 in sec->output_offset where appropriate. Make error messages
1617 include the symbol name.
1618
1619 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
1620 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
1621 doesn't get redefined messages if -shared.
1622
1623 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
1624 section if the rel_section field has been set up.
1625
1626 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1627
1628 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
1629 relocations.
1630
1631 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
1632
1633 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
1634 of flags, only flags used are controlled by mach number. Bump up
1635 output file mach number to highest of input file mach numbers.
1636 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
1637 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
1638
1639 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
1640 bfd_elf64_sparc_vec support.
1641
1642 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1643
1644 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
1645 the embedded bit is set on some objects and not on others. Just
1646 or it together.
1647 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
1648 relocations.
1649
1650 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
1651
1652 * coffcode.h (coff_new_section_hook): Don't try to align the
1653 .stabstr section.
1654
1655 * coffcode.h (coff_set_section_contents): Fix the handling of the
1656 .lib section to work even if the entire section contents are
1657 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
1658 Robert Lipe <robertl@arnet.com>.
1659
1660 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1661
1662 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
1663 memory here for contents.
1664
1665 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
1666 _SDA2_BASE_ by 32768.
1667 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
1668 started using. Allocate contents for .sdata and .sdata2 sections
1669 also.
1670 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
1671 rather than _name.
1672 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
1673 size _SDA{,2}_BASE_.
1674 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
1675 done.
1676
1677 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
1678
1679 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
1680
1681 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
1682 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
1683 (bfd_mach_sparc_v9a): Define.
1684 (bfd_mach_sparc_v9_p): Define.
1685 * bfd-in2.h: Regenerated.
1686 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
1687 bfd_mach_sparc_v9.
1688 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
1689 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
1690 to bfd_elf32_sparc_vec.
1691 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
1692 Add v8plus{,a} support.
1693 Add v9a support.
1694 (sparc_compatible): New function.
1695 * elf32-sparc.h: #include "elf/sparc.h".
1696 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
1697 elf32_sparc_final_write_processing): New functions.
1698 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
1699 elf_backend_final_write_processing): Define.
1700
1701 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1702
1703 * elf-bfd.h (struct elf_link_hash_entry): Add
1704 linker_section_pointer field.
1705 (enum elf_linker_section_enum): Enumeration for new way of
1706 creating linker dynamic sections and symbols.
1707 (elf_linker_section{,_pointers}): New structures for creating
1708 dynamic sections and symbols.
1709 (elf_obj_tdata): Add linker_section_pointers and linker_section
1710 fields.
1711 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
1712 (_bfd_elf_create_linker_section): New declarations.
1713 (_bfd_elf_find_pointer_linker_section): Ditto.
1714 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
1715 (_bfd_elf_make_linker_section_rela): Ditto.
1716
1717 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
1718
1719 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
1720 (ppc_elf_create_linker_section): New function to create the
1721 sections .got, .sdata, and .sdata2.
1722 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
1723 needed.
1724 (ppc_elf_check_relocs): Support more of the eabi relocations.
1725 (ppc_elf_relocate_section): Ditto.
1726 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
1727 if the .sdata{,2} + .sbss{,2} section size is > 32k.
1728
1729 * elflink.h (elf_create_pointer_linker_section): New function to
1730 create initialized pointers in dynamic linker sections.
1731 (elf_finish_pointer_linker_section): Actually intialize the
1732 pointers created above.
1733
1734 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
1735 macros to provide both 32 and 64 bit versions of
1736 elf_create_pointer_linker_section.
1737 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
1738 provide both 32 and 64 bit versions of
1739 elf_finish_pointer_linker_section.
1740
1741 * elflink.c (_bfd_elf_create_linker_section): New function to
1742 create a linker section.
1743 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
1744 given address in the linker pointer offsets created for a given
1745 symbol.
1746 (_bfd_elf_make_linker_section_rela): Make a RELA section
1747 corresponding to the generated linker section.
1748
1749 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
1750
1751 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
1752
1753 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
1754
1755 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
1756 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
1757 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
1758 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
1759 toc entry in an objdump) for now.
1760 (ppc_do_last, ppc_get_last): New function - needed to save processing
1761 the toc owner to the end.
1762 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
1763 toc owner last.
1764
1765 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
1766 toc owner from being done till last. Must define POWERPC_LE_PC
1767 to enable it.
1768
1769 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
1770
1771 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
1772 to INFO.
1773 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
1774 SizeOfImage for PowerPC. Ignore the size of the .junk section.
1775
1776 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
1777
1778 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
1779
1780 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
1781
1782 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
1783 back to first.
1784 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
1785
1786 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
1787
1788 * elf.c (assign_file_positions_for_segments): Don't increment file
1789 offset for a segment which contains no loadable sections.
1790
1791 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1792
1793 * reloc.c: Add new PowerPC relocations.
1794 * {bfd-in2,libbfd}.h: Regenerate.
1795
1796 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
1797 (ppc_elf_reloc_type_lookup): Lookup new relocations.
1798
1799 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
1800
1801 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
1802 entries.
1803
1804 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
1805 info->shared.
1806
1807 * coffgen.c (coff_find_nearest_line): Don't try to cache
1808 information in sections that are not owned by a BFD. From Richard
1809 Henderson <richard@atheist.tamu.edu>.
1810
1811 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
1812 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1813 * elflink.h (elf_link_output_extsym): Remove special check for
1814 _rld_new_interface.
1815
1816 * ecoffswap.h: Add prototypes for static functions.
1817
1818 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1819
1820 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
1821 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
1822 references.
1823 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
1824 to satisfy a TOC16 relocation. Rewrite unsupported relocation
1825 support. Begin support for R_PPC_SDA{2,}REL.
1826
1827 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1828
1829 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
1830 create the .got and .got.neg sections.
1831 (ppc_elf_size_dynamic_sections): Call it.
1832 (ppc_elf_check_relocs): Call it.
1833 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
1834 (ppc_elf_check_relocs): Add error messages for relocations we
1835 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
1836 relocation.
1837
1838 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1839
1840 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
1841 section flags for V.4 and eabi.
1842
1843 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
1844
1845 * elf.c (assign_file_positions_for_segments): If a segment
1846 contains no sections, don't mark it as readable.
1847
1848 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
1849 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
1850
1851 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
1852 dynamic section, if there is one.
1853 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
1854 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
1855 (bfd_elf64_swap_dyn_in): Likewise.
1856 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
1857 PTR.
1858 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1859
1860 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
1861 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
1862 <pirker@eiunix.tuwien.ac.at>.
1863
1864 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1865
1866 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
1867 PowerPC V.4 and eabi.
1868 * bfd-in2.h: Regenerate.
1869 * libfd.h: Regenerate.
1870
1871 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
1872
1873 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
1874 section type and SHF_EXCLUDE section flag, turning them into the
1875 appropriate bfd section flag.
1876
1877 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
1878
1879 * xcofflink.c (xcoff_link_add_symbols): Create the special
1880 sections if we see a DYNAMIC object, in case that is the only
1881 XCOFF input object we see.
1882
1883 * elf32-mips.c: Extensive changes for a start at dynamic linking
1884 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1885
1886 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
1887 (struct elf_backend_data): Remove
1888 elf_backend_create_program_headers field. Add
1889 elf_backend_additional_program_headers and
1890 elf_backend_modify_segment_map fields.
1891 * elfxx-target.h (elf_backend_type_change_ok): Define if not
1892 defined.
1893 (elf_backend_additional_program_headers): Likewise.
1894 (elf_backend_modify_segment_map): Likewise.
1895 (elf_backend_create_program_headers): Don't define.
1896 (elfNN_bed): Change to account for field changes.
1897 * elf.c (assign_file_positions_for_segments): Call new
1898 modify_segment_map backend function. Don't call old
1899 create_program_headers backend function.
1900 (get_program_header_size): Call additional_program_headers rather
1901 than create_program_headers.
1902 * elflink.h (elf_link_add_object_symbols): Initialize
1903 type_change_ok from new backend field.
1904 (elf_link_output_extsym): Don't warn if _rld_new_interface is
1905 defined.
1906 (elf_reloc_link_order): Treat a reloc against a defined symbol as
1907 a reloc against the appropriate section.
1908
1909 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
1910 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
1911 (elf_flags_init): Rename from elf_ppc_flags_init.
1912 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
1913 elf_ppc_flags_init.
1914 (ppc_elf_copy_private_bfd_data): Likewise.
1915 (ppc_elf_merge_private_bfd_data): Likewise.
1916
1917 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
1918 relocation entries.
1919
1920 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
1921
1922 * coff-alpha.c (alpha_relocate_section): During final link, allow
1923 output .lita section to be bigger than 64k by adjusting gp value
1924 on a per-input section basis.
1925 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
1926 field.
1927 (struct ecoff_section_tdata): Add gp field.
1928
1929 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
1930
1931 Handle Alpha ECOFF changes in OSF/1 3.2.
1932 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
1933 field.
1934 * coff-alpha.c: Include "aout/ar.h".
1935 (alpha_ecoff_get_relocated_section_contents): Don't require an
1936 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
1937 3.2 doesn't generate one.
1938 (alpha_relocate_section): Likewise.
1939 (alpha_ecoff_slurp_armap): Define.
1940 (alpha_ecoff_slurp_extended_name_table): Define.
1941 (alpha_ecoff_construct_extended_name_table): Define.
1942 (alpha_ecoff_truncate_arname): Define.
1943 (alpha_ecoff_write_armap): Define.
1944 (alpha_ecoff_generic_stat_arch_elt): Define.
1945 (alpha_ecoff_update_armap_timestamp): Define.
1946 (ARFZMAG): Define.
1947 (alpha_ecoff_read_ar_hdr): New static function.
1948 (alpha_ecoff_get_elt_at_filepos): New static function.
1949 (alpha_ecoff_openr_next_archived_file): New static function.
1950 (alpha_ecoff_get_elt_at_index): New static function.
1951 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
1952 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
1953 _bfd_ecoff to alpha_ecoff.
1954 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
1955 field from backend structure, rather than always calling
1956 _bfd_get_elt_at_filepos.
1957 * coff-mips.c (mips_ecoff_backend_data): Initialize
1958 get_elt_at_filepos field.
1959 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
1960 from _bfd_generic_read_ar_hdr with minor changes.
1961 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
1962 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
1963 * libbfd.h: Rebuild.
1964
1965 * bfd-in.h (BFD_IN_MEMORY): Define.
1966 * libbfd-in.h (struct bfd_in_memory): Define.
1967 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
1968 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
1969 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
1970 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
1971 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
1972 (bfd_get_size): Handle BFD_IN_MEMORY flag.
1973 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
1974 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
1975 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
1976 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
1977 iostream.
1978 (bfd_openstreamr): Likewise.
1979 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
1980 BFD_IN_MEMORY is not set.
1981 * riscix.c (riscix_some_aout_object_p): Likewise.
1982 * bfd-in2.h, libbfd.h: Rebuild.
1983
1984 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
1985 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
1986 (bfd_get_elt_at_index): Define.
1987 * archive.c (_bfd_generic_get_elt_at_index): Rename from
1988 bfd_get_elt_at_index. Change index parameter from int to
1989 symindex.
1990 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
1991 (_bfd_noarchive_get_elt_at_index): Define.
1992 (_bfd_archive_bsd_get_elt_at_index): Define.
1993 (_bfd_archive_coff_get_elt_at_index): Define.
1994 * bfd-in2.h, libbfd.h: Rebuild.
1995 * aout-target.h (MY_get_elt_at_index): Define if not defined.
1996 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
1997 * ieee.c (ieee_get_elt_at_index): Define.
1998 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
1999 * oasys.c (oasys_get_elt_at_index): Define.
2000 * som.c (som_get_elt_at_index): Define.
2001
2002 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
2003 numbers to the .text section.
2004
2005 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
2006
2007 * ieee.c (ieee_write_debug_part): Change return type to boolean.
2008 If there is a SEC_DEBUGGING section, get the contents of the debug
2009 information part from it.
2010 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
2011 section in memory.
2012 (ieee_write_object_contents): Check ieee_write_debug_part return.
2013
2014 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
2015
2016 * config.bfd (i[345]86-*-freebsd*): Add target.
2017 * configure.in (i386freebsd_vec): Add vec.
2018 * configure: Regenerate.
2019 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
2020 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
2021 Rebuild dependencies..
2022 * freebsd.h: New file.
2023 * i386freebsd.c: New file.
2024 * targets.c (i386freebsd_vec): Declare.
2025 (bfd_target_vector): Add i386freebsd_vec.
2026 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2027 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
2028
2029 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
2030
2031 * ieee.c (ieee_slurp_debug): New static function.
2032 (ieee_object_p): Call it.
2033 (ieee_slurp_section_data): Skip debugging sections.
2034 (ieee_get_reloc_upper_bound): Likewise.
2035 (ieee_get_section_contents): Likewise.
2036 (ieee_canonicalize_reloc): Likewise.
2037 (ieee_write_section_part): Likewise.
2038 (ieee_write_debug_part): Likewise.
2039 (ieee_write_data_part): Likewise.
2040 (init_for_output): Likewise.
2041
2042 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
2043
2044 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
2045 work.
2046 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
2047 relocs, since ppc_elf_relocate_section handles the linker case.
2048 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
2049 used.
2050 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
2051 ppc_elf_relocate_section since that is now the only caller.
2052 (ppc_elf_relocate_section): Ditto.
2053
2054 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
2055
2056 * coffcode.h (coff_write_object_contents): If we don't know the
2057 section of the entry point for an XCOFF executable, always set the
2058 entry address to -1.
2059
2060 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2061
2062 * elf.c (bfd_section_from_shdr): Add support for note sections.
2063
2064 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2065
2066 * bfd-in.h (struct _symbol_info): Add stab_type field.
2067 * bfd-in2.h: Rebuild.
2068 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
2069
2070 * elf32-ppc.c: Remove trailing newline from calls to
2071 _bfd_error_handler.
2072 (ppc_elf_merge_private_bfd_data): Only warn about endianness
2073 difference if target endianness is known.
2074
2075 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2076
2077 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
2078 old style TOC16 references without using R_PPC_GOT.
2079 (ppc_reloc_type): Ditto.
2080 (ppc_elf_reloc_type_lookup): Add support for TOC16.
2081 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
2082 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
2083 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
2084 (ppc_elf_check_relocs): New function for GOT/PLT support that is
2085 work in progress.
2086 (ppc_elf_adjust_dynamic_symbol): Ditto.
2087 (ppc_elf_adjust_dynindx): Ditto.
2088 (ppc_elf_size_dynamic_sections): Ditto.
2089 (ppc_elf_finish_dynamic_symbol): Ditto.
2090 (ppc_elf_finish_dynamic_sections): Ditto.
2091 (ELF_DYNAMIC_INTERPRETER): Define.
2092
2093 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
2094
2095 * elf.c (copy_private_bfd_data): When attaching sections to
2096 segments ignore sections that won't be allocated. Patch from
2097 Andreas Schwab.
2098
2099 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
2100
2101 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
2102 anything else.
2103
2104 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
2105
2106 * coff-i960.c (CALC_ADDEND): Define.
2107 (coff_i960_relocate_section): Add the input section VMA to the
2108 addend for PC relative relocs.
2109
2110 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
2111
2112 * peicode.h (pe_print_pdata): Must test the entire entry for zero
2113 to correctly terminate.
2114
2115 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
2116
2117 * targets.c (enum bfd_endian): Define.
2118 (bfd_target): Rename byteorder_big_p to byteorder, and change it
2119 from boolean to enum bfd_endian. Change header_byteorder_big_p
2120 correspondingly.
2121 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
2122 (bfd_header_big_endian, bfd_header_little_endian): New macros.
2123 * bfd-in2.h: Rebuild.
2124 * All targets: Change initialization of byteorder and
2125 header_byteorder to use enum bfd_endian values rather than
2126 booleans.
2127 * All files: Change all references to byteorder_big_p and
2128 header_byteorder_big_p to use new bfd_*_endian macros.
2129
2130 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
2131 s_vaddr.
2132 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
2133 vma.
2134 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2135
2136 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
2137
2138 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
2139
2140 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
2141
2142 * ieee.c: Lots of minor cleanups. Make many functions return
2143 errors rather than calling abort. Also:
2144 (ieee_write_twobyte): Remove; change callers to call existing
2145 ieee_write_2bytes function.
2146 (ieee_write_expression): Don't output the section twice when
2147 outputting a local symbol. Don't emit an extraneous zero if there
2148 is only one term.
2149 (ieee_slurp_sections): Set the lma as well as the vma.
2150 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
2151
2152 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
2153 a recognized one or bfd_arch_unknown.
2154 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
2155 to succeed.
2156 (ihex_get_symtab): Likewise.
2157
2158 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
2159
2160 * aoutx.h: Include <ctype.h>.
2161 (struct aout_link_includes_table): Define.
2162 (struct aout_link_includes_totals): Define.
2163 (struct aout_link_includes_entry): Define.
2164 (aout_link_includes_lookup): Define macro.
2165 (struct aout_final_link_info): Add includes field.
2166 (aout_link_includes_newfunc): New static function.
2167 (NAME(aout,final_link)): Initialize includes hash table.
2168 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
2169
2170 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
2171
2172 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
2173
2174 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
2175
2176 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
2177
2178 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
2179
2180 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
2181 (pe_print_private_bfd_data): call pe_print_reloc.
2182 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
2183 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
2184 up some debugging as well.
2185
2186 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
2187
2188 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
2189 <rfg@monkeys.com>.
2190
2191 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
2192
2193 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
2194 when setting sections to NULL.
2195
2196 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
2197
2198 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
2199 field.
2200 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
2201 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
2202 for all symbols.
2203 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2204 * bfd-in2.h: Rebuild.
2205
2206 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
2207
2208 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
2209
2210 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
2211
2212 * ihex.c (ihex_scan): Handle record types 4 and 5.
2213 (ihex_object_p): Permit types 4 and 5.
2214 (ihex_set_section_contents): Remove check for out of range
2215 addresses.
2216 (ihex_write_object_contents): Generate types 4 and 5.
2217
2218 * elflink.h (elf_link_output_extsym): Just ignore warning and
2219 indirect references to symbols which don't really exist.
2220
2221 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
2222
2223 * peicode.h (pe_print_idata): Minor format fixes
2224 (pe_print_edata): New function. Under private printing, this formats
2225 the edata section of a PE file.
2226 (pe_print_private_bfd_data): Added call to pe_print_edata.
2227
2228 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2229
2230 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
2231 index, don't call stoi.
2232
2233 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
2234
2235 * srec.c (srec_scan): Set lma as well as vma.
2236
2237 * ihex.c: New file; support for Intel Hex format.
2238 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
2239 (ihex_vec): Declare.
2240 (bfd_target_vector): Always include ihex_vec.
2241 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
2242 * Makefile.in: Rebuild dependencies.
2243 (BFD_LIBS): Add ihex.o
2244 (BFD_LIBS_CFILES): Add ihex.c.
2245 * bfd-in2.h: Rebuild.
2246
2247 * elf.c (assign_file_positions_for_segments): Sort the sections in
2248 each segment.
2249 (get_program_header_size): Return the right size if segment_map is
2250 not NULL.
2251 (copy_private_bfd_data): Don't bother to sort the sections.
2252
2253 * bfd.c (bfd_record_phdr): New function.
2254 * bfd-in.h (bfd_record_phdr): Declare.
2255 * bfd_in2.h: Rebuild.
2256
2257 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
2258 BFD_ASSERT.
2259
2260 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
2261 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
2262 bfd_size_type.
2263 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
2264 (bfd_zmalloc): Change declaration.
2265 * libbfd.h: Rebuild.
2266 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
2267 and realloc. Don't set bfd_error_no_memory if they fail.
2268
2269 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
2270
2271 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
2272 uses as well. Added a new howto to deal with TOCREL16 relocs that
2273 are TOCDEFN as well.
2274 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
2275 to handle RVA relocs from dlltool.
2276 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
2277 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
2278 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
2279
2280 * coffcode.h (coff_set_alignment_hook): check idata$X sections
2281 to get the right section alignment.
2282
2283 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
2284
2285 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2286 p_paddr if p_paddr is zero.
2287 (make_mapping): Set includes_filehdr and includes_phdrs for first
2288 PT_LOAD segment.
2289 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
2290 segment.
2291 (assign_file_positions_for_segments): Handle includes_filehdr and
2292 includes_phdrs. Remove special handling of PT_PHDR and first
2293 PT_LOAD segments.
2294 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
2295 when appropriate. Remove special handling of PT_PHDR segment.
2296 Use a more complex condition for when a section is included in a
2297 segment to handle Solaris linker oddities.
2298
2299 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2300
2301 * coff-m88k.c (howto_table): Reformatted for easier reading;
2302 special_function now points to new function m88k_special_reloc.
2303 (howto_hvrt16): Function previously used for handling HVRT16 relocs
2304 removed.
2305 (rtype2howto): Do not add reloc's r_offset to the addend, this will
2306 be done correctly by m88k_special_reloc.
2307 (reloc_processing): New function to be used by RELOC_PROCESSING.
2308 (RELOC_PROCESSING): Define to call reloc_processing.
2309
2310 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
2311
2312 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
2313 (pe_print_pdata): Likewise.
2314
2315 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
2316 obstack_alloc fails.
2317 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
2318 fails.
2319 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
2320 * Many files: don't set bfd_error_no_memory if one of the above
2321 routines fails.
2322
2323 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
2324 if p_paddr_valid is set.
2325 (copy_private_bfd_data): New static function.
2326 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
2327
2328 * elf.c (assign_file_positions_for_segments): Fix case where extra
2329 program headers were allocated.
2330
2331 * elf.c (_bfd_elf_print_private_bfd_data): New function.
2332 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
2333 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
2334 _bfd_elf_print_private_bfd_data.
2335
2336 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
2337 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
2338 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
2339 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
2340 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
2341 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
2342 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
2343
2344 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
2345
2346 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
2347 * elf.c (make_mapping): New static function.
2348 (map_sections_to_segments): New static function.
2349 (elf_sort_sections): New static function.
2350 (assign_file_positions_for_segments): New static function.
2351 (map_program_segments): Remove.
2352 (get_program_header_size): Remove sorted_hdrs, count, and
2353 maxpagesize parameters. Simplify.
2354 (assign_file_positions_except_relocs): When generating an
2355 executable, use assign_file_positions_for_segments.
2356 (elf_sort_hdrs): Remove.
2357 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
2358 to get_program_header_size.
2359
2360 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
2361
2362 * hp300hpux.c (MY(callback)): Set lma as well as vma.
2363
2364 * configure, config.in: Regenerate with autoconf 2.7.
2365
2366 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
2367 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
2368
2369 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
2370
2371 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
2372 (ecoff_sec_to_styp_flags): Likewise.
2373 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
2374 (ecoff_set_symbol_info): Handle scRConst.
2375 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
2376 (ecoff_compute_section_file_positions): Handle .rconst section.
2377 (_bfd_ecoff_write_object_contents): Likewise.
2378 (ecoff_link_check_archive_element): Handle scRConst.
2379 (ecoff_link_add_externals): Likewise.
2380 (ecoff_link_write_external): Handle .rconst section.
2381 (ecoff_reloc_link_order): Likewise.
2382 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
2383 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
2384 section.
2385 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
2386
2387 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
2388 DEF_DYNAMIC flag is set.
2389
2390 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
2391
2392 * host-aout.c: If TRAD_HEADER is defined, include it.
2393
2394 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
2395
2396 * aclocal.m4 (AC_PROG_CC): Remove local definition.
2397 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
2398 (BFD_NEED_DECLARATION): New function.
2399 * configure.in: Use BFD_NEED_DECLARATION.
2400 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
2401 * configure, config.in: Rebuild with autoconf 2.6.
2402
2403 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
2404 special_sections before returning when called with a non XCOFF
2405 BFD.
2406
2407 * coffgen.c (coff_renumber_symbols): Sort common symbols with
2408 global symbols.
2409
2410 * coffcode.h (coff_compute_section_file_positions): Only pad the
2411 previous section to force file alignment when creating an
2412 executable.
2413
2414 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
2415
2416 * coffcode.h (coff_compute_section_file_positions): If
2417 RS6000COFF_C, set up the .debug section.
2418
2419 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
2420 if it is not large enough to accomodate the entire TOC area with
2421 signed 16 bit offsets.
2422 (xcoff_write_global_symbol): Handle negative TOC offsets in global
2423 linkage code.
2424 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
2425 TOC anchor to use the TOC value used in the output file.
2426
2427 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
2428
2429 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
2430 (_bfd_coff_read_string_table): Likewise.
2431
2432 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
2433
2434 * pe-arm.c: Fix typos.
2435 * coff-arm.c: Likewise.
2436
2437 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
2438
2439 * coff-ppc.c (list_ele): Added "cat"egory member.
2440 (record_toc): New category parameter (priv or pub).
2441 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
2442 (ppc_process_before_allocation): Removed embrionic data-in-toc from
2443 the mainline. It addes extra toc cells in error.
2444 (ppc_coff_swap_sym_in_hook): Added some documentation.
2445 (dump_toc): Can now diagnose "virtual toc" chicanery.
2446
2447 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
2448
2449 * elf-bfd.h (struct elf_link_hash_table): Change type of
2450 dynsymcount and bucketcount fields from size_t to bfd_size_type.
2451
2452 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
2453
2454 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
2455 pointerize C_LEAFSTAT or C_LEAFEXT entries.
2456
2457 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
2458 DT_INIT and DT_FINI entries if the _init or _fini symbol is
2459 defined or mentioned in a regular file.
2460
2461 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
2462
2463 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
2464 (coff_ppc_relocate_section): Handle TOCDEFN attribute
2465 (coff_ppc_relocate_section): Correct REL24 handling
2466 (ppc_process_before_allocation): Correct TOCDEFN handling
2467
2468 * peicode.h (dir_names): Added name descriptions
2469
2470 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
2471
2472 * VERSION: Updated to cygnus-2.6.
2473
2474 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
2475
2476 * targets.c (m68k4knetbsd_vec): Declare.
2477
2478 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
2479
2480 * targets.c (bfd_target): Change type of second argument to
2481 _bfd_print_private_bfd_data from void * to PTR.
2482 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
2483 using PTR rather than void *.
2484 * bfd-in2, libbfd.h: Rebuild.
2485 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
2486 to PTR.
2487 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
2488 _bfd_generic_bfd_print_private_bfd_data rather than casting
2489 bfd_true.
2490
2491 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
2492
2493 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
2494 "DO NOT DELETE" lines or blank lines that mkdep writes on some
2495 systems.
2496 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
2497 BFD64_BACKENDS_CFILES): New variables.
2498 (CFILES): Use them.
2499
2500 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
2501
2502 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
2503 not at the file position of the first section.
2504 * coffcode.h (coff_compute_section_file_positions): Avoid using
2505 unportable #elif.
2506 (coff_write_object_contents): When generating a PPC PE executable
2507 with no symbols, round up the file size to a COFF_PAGE_SIZE
2508 boundary.
2509 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
2510 don't write out a string table.
2511
2512 * elf.c (bfd_section_from_shdr): When using a different section
2513 header, pass the new one to _bfd_elf_make_section_from_shdr.
2514 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
2515 (elf_map_symbols): Add section VMA to symbol value when comparing
2516 against 0.
2517 (_bfd_elf_compute_section_file_positions): Only build symbol table
2518 if there are some symbols. Set file offset of symtab and strtab
2519 sections.
2520 (assign_file_positions_except_relocs): Remove dosyms parameter.
2521 Change all callers. Never set file offset of symtab and strtab
2522 sections.
2523 (_bfd_elf_copy_private_section_data): New function.
2524 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
2525 (_bfd_elf_copy_private_symbol_data): New function.
2526 (swap_out_syms): Check for special mapping of st_shndx created by
2527 copy_private_symbol_data.
2528 * elfxx-target.h: Use new copy routines.
2529 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
2530 (_bfd_elf_copy_private_section_data): Declare.
2531
2532 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
2533
2534 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
2535 C_NT_WEAK.
2536
2537 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
2538 _bfd_dummy_target, matching the recent change to archive
2539 recognition.
2540
2541 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
2542
2543 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
2544 arithmetic on PTR types.
2545
2546 * aout-target.h (MY(callback)): Set the lma of the sections.
2547
2548 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
2549 symbol into a reloc against the section.
2550
2551 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
2552
2553 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
2554 glue for the relocs: IMGLUE and IFGLUE.
2555 (record_toc): new function - tracks toc contents
2556 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
2557 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
2558 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
2559 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
2560 (ppc_record_toc_entry): Removed a debug define (duh)
2561
2562 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
2563 (pe_print_idata): New function - formats the idata section data
2564 (pe_print_pdata): New function - formats the pdata section data
2565 (pe_print_private_bfd_data): calls to above
2566
2567 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
2568
2569 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
2570 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
2571 TARGET_SYM and TARGET_NAME for vector and BFD name.
2572 * coff-pmac.c (pmac_xcoff_vec): Remove.
2573 (TARGET_SYM, TARGET_NAME): Define.
2574 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
2575 machine to 0, not all PowerMacs are 601s.
2576
2577 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
2578
2579 * elfcode.h (elf_object_p): Read in any program headers.
2580 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
2581 based on the program headers, if any.
2582 (elf_fake_sections): Set sh_addr from the vma, not the lma.
2583 (map_program_segments): Set p_paddr of program headers based on
2584 the lma.
2585
2586 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
2587
2588 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
2589 failure.
2590
2591 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
2592 trying to do a relocateable link with a non-a.out object file.
2593
2594 * archive.c (bfd_generic_archive_p): Check the first object file
2595 in an archive even if target_defaulted is set. If the object file
2596 has the wrong xvec, reject it.
2597
2598 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
2599 be represented, report the name via _bfd_error_handler.
2600 (translate_to_native_sym_flags): Likewise.
2601 * elf32-mips.c (mips_elf_final_link): Likewise.
2602 * oasys.c (oasys_write_sections): Likewise.
2603
2604 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
2605 which checks for STYP_OVRFLO sections.
2606 (coff_compute_section_file_positions): If RS6000COFF_C, handle
2607 reloc and lineno count overflows.
2608 (coff_write_object_contents): Call coff_count_linenumbers before
2609 coff_compute_section_file_positions. If RS6000COFF_C, handle
2610 reloc and lineno count overflows.
2611 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
2612 relocs before dealing with .pad sections. Count overflow section
2613 headers when handling .pad sections.
2614
2615 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
2616 if RS6000COFF_C.
2617
2618 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
2619 (struct xcoff_link_hash_table): Add descriptor_section and
2620 special_sections fields.
2621 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
2622 (xcoff_link_add_symbols): Set linkage section alignment. Create
2623 descriptor section. Check for magic symbol names (_text, etc.),
2624 and record them in special_sections if found. Set
2625 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
2626 descriptor field to point back to the function code symbol.
2627 (xcoff_sweep): Always mark the special descriptor_section.
2628 (bfd_xcoff_export_symbol): Check whether the symbol might be a
2629 function descriptor, and mark it if it is.
2630 (bfd_xcoff_size_dynamic_sections): Add new special_sections
2631 parameter, and fill it in. Allocate space for the descriptor
2632 section.
2633 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
2634 global linkage code. If an undefined function descriptor is
2635 exported, arrange to define it. Warn about any other undefined
2636 exported symbol.
2637 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
2638 (xcoff_write_global_symbol): Create a function descriptor when
2639 necessary.
2640 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
2641 * bfd-in2.h: Rebuild.
2642
2643 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
2644
2645 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
2646 (ppc_coff_link_hash_table): new types for hashing
2647 (ppc_coff_link_hash_newfunc): hash entry constructor
2648 (ppc_coff_link_hash_table_init): hash table initializer
2649 (ppc_coff_link_hash_table_create): hash table constructor
2650 (ppc_record_toc_entry): changed references to hash table
2651 (coff_ppc_relocate_section): changed references to hash table
2652
2653 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
2654 * libcoff.h: Rebuild
2655
2656 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
2657 (coff_link_add_symbols): removed toc_offset init
2658
2659 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
2660
2661 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
2662 first.
2663
2664 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
2665 if it is given and mmep is available.
2666 * acconfig.h: Undef USE_MMAP.
2667 * configure, config.in: Regenerated.
2668 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
2669 table handling the old way.
2670 (aout_get_external_symbols): Don't complain if last byte of string
2671 table is nonzero.
2672 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
2673 (bfd_free_window) [! USE_MMAP]: Don't define.
2674 (bfd_get_file_window,
2675 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
2676
2677 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
2678
2679 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
2680 0xffff0000.
2681
2682 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
2683
2684 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
2685 compatible with AMD generated COFF files. Try to support both AMD
2686 and GNU formats simultaneously.
2687 (coff_a29k_relocate_section): Likewise.
2688
2689 * libbfd.c (bfd_get_file_window): Change writable parameter from
2690 int to boolean; update all callers. Pass MAP_SHARED if not
2691 writable--it's required on Solaris. Cast fprintf argument to
2692 avoid warning.
2693 * bfd-in.h (bfd_get_file_window): Update declaration.
2694 * bfd-in2.h: Rebuild.
2695 * aoutx.h: Update calls to bfd_get_file_window.
2696
2697 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
2698 Change all uses.
2699 (xcoff_swap_ldhdr_in): New static function.
2700 (xcoff_swap_ldsym_in): New static function.
2701 (xcoff_find_reloc): Handle the case of a single reloc correctly.
2702 (xcoff_link_add_symbols): If we just created a descriptor, pass it
2703 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
2704 Handle XTY_ER/XMC_XO symbols correctly.
2705 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
2706 rather than normal symbol table.
2707 (bfd_xcoff_import_symbol): It's not an error if the symbol is
2708 already defined with the same absolute value.
2709 (xcoff_mark): When considering called symbols, check whether the
2710 descriptor is from a dynamic object, rather than the symbol
2711 itself.
2712 (xcoff_build_ldsyms): Likewise.
2713
2714 * libbfd.c (bfd_get_file_window): Change return type to boolean.
2715 Cast realloc and malloc return values. If malloc or realloc fail,
2716 set bfd_error_no_memory.
2717 * bfd-in.h (bfd_get_file_window): Change type to boolean.
2718 * bfd-in2.h: Rebuild.
2719
2720 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
2721
2722 * coff-ppc.c (ppc_record_toc_entry): new function.
2723 (in_reloc_p): changed return value.
2724 (coff_ppc_relocate_section): much rework.
2725 (ppc_allocate_toc_section): new function.
2726 (ppc_process_before_allocation): new function.
2727 (ppc_coff_swap_sym_in_hook): new function.
2728
2729 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
2730 (coff_link_add_symbols): initialize toc_offset.
2731
2732 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
2733 (coff_swap_aouthdr_out): Added more sections to the data
2734 dictionary for the pe file header. Also changed linker version
2735 number on the ppc side.
2736 (dir_names): small improvements to the dictionary printing.
2737 (pe_mkobject_hook): save the file level flags.
2738
2739 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
2740 (pe_tdata): added real_flags field
2741 (coff_tdata): added local_toc_sym_map and access macro
2742
2743 * libcoff.h (coff_link_hash_entry): added toc_offset field
2744 (pe_tdata): added real_flags field
2745 (coff_tdata): added local_toc_sym_map and access macro
2746
2747 * coffcode.h (coff_set_alignment_hook): added hook for PE.
2748 (coff_mkobject): init for local_toc_sym_map
2749 (coff_write_object_contents): set the internal_a.magic to
2750 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
2751 ppc compilers use.
2752
2753 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
2754
2755 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
2756 entries until both the line number address and the function name
2757 address are too large.
2758
2759 * configure.in: Call AC_CHECK_PROG to find and cache AR.
2760 * configure: Rebuilt.
2761
2762 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
2763 is defined in the environment.
2764
2765 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
2766
2767 * som.c (som_get_section_contents_in_window): Define to use
2768 generic version.
2769
2770 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
2771
2772 * coff-i860.c: New file, based on coff-i386.c.
2773 * cpu-i860.c: New file, based on cpu-i386.c.
2774 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
2775 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
2776 targets, using i860coff_vec.
2777 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
2778 trad-core.o and hosts/i860mach3.h.
2779 (i860coff_vec): Use coff-i860.o and cofflink.o.
2780 * configure: Rebuild.
2781 * Makefile.in: Rebuild dependencies.
2782 (ALL_MACHINES): Add cpu-i860.o.
2783 (BFD32_BACKENDS): Add coff-i860.o.
2784 (CFILES): Add cpu-i860.c and coff-i860.c.
2785 * targets.c (i860coff_vec): Declare.
2786 (bfd_target_vector): Add &i860coff_vec.
2787 * archures.c (bfd_i860_arch): Declare.
2788 (bfd_archures_list): Add &bfd_i860_arch.
2789 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
2790 (coff_set_flags): Handle bfd_arch_i860.
2791 (coff_write_object_contents): Handle I860 a.out magic number.
2792
2793 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
2794
2795 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
2796 the created .tc section to 2.
2797 (xcoff_mark): Don't keep a .loader reloc for a call to an
2798 undefined symbol when creating a shared library.
2799 (xcoff_build_ldsyms): When creating a shared library, generate
2800 global linkage code for a call to an undefined symbol.
2801
2802 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
2803
2804 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
2805 BFD32_BACKENDS, BFD64_BACKENDS.
2806 (.dep1): Put mkdep output in a separate file.
2807 Rebuilt dependencies.
2808
2809 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
2810 value.
2811
2812 Permit use of mmap when available:
2813
2814 * configure.in: Check for mmap, madvise, mprotect.
2815 * config.in, configure: Regenerated.
2816
2817 * libbfd.c (struct _bfd_window_internal): Define type.
2818 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
2819 functions.
2820 (ok_to_map): New static variable for debugging.
2821 (_bfd_generic_get_section_contents_in_window): New function.
2822 * bfd-in.h (bfd_window_internal): Declare type.
2823 (bfd_window): Define type.
2824 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
2825 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
2826 Declare.
2827
2828 * libaout.h (struct aoutdata): Add two window fields.
2829 (obj_aout_sym_window, obj_aout_string_window): New macros.
2830 * aoutx.h (some_aout_object_p): Initialize windows.
2831 (aout_get_external_symbols): Get symbol data and strings in
2832 windows instead of explicitly allocated buffers.
2833 (slurp_symbol_table): Free window instead of memory.
2834 (bfd_free_cached_info): Release windows instead of freeing storage
2835 directly.
2836 (aout_link_free_symbols): Ditto.
2837
2838 * targets.c (bfd_target): Add new field for
2839 get_section_contents_in_window.
2840 (BFD_JUMP_TABLE_GENERIC): Updated.
2841 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
2842 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
2843 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
2844 macros for get_section_contents_in_window field.
2845
2846 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
2847
2848 * core.c: Renamed to corefile.c
2849 * makefile.dos (OBJS): Change core.o to corefile.o
2850 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
2851
2852 start-sanitize-gm
2853 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
2854
2855 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
2856 targ_selvecs to allow debugging under Irix-5 native.
2857
2858 end-sanitize-gm
2859 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
2860
2861 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
2862 to o. Clobber and restore the list of new csects around the call
2863 to _bfd_generic_link_add_one_symbol, in case it wants to report a
2864 linker error and the linker wants to read the symbol table. Reset
2865 the line number count of a real section even if it has no relocs.
2866 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
2867
2868 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
2869 is too small.
2870
2871 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
2872
2873 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
2874 an undefined symbol in a shared link.
2875
2876 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
2877 oldtype from bfd_link_order_type to bfd_link_hash_type. From
2878 phdm@info.ucl.ac.be (Philippe De Muyter).
2879
2880 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2881
2882 * coff-m88k.c (rtype2howto): New static function.
2883 (RTYPE2HOWTO): Use it rather than a macro definition.
2884
2885 * coffcode.h (coff_write_object_contents): set internal_a.magic
2886 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
2887
2888 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
2889 define TRAD_HEADER to new file hosts/delta68.h.
2890 m88*-motorola-sysv*, however, does use ptrace-core.o.
2891 * hosts/delta68.h: New file.
2892
2893 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
2894 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
2895
2896 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
2897
2898 * i386linux.c (MY(vec)): Declare before use.
2899
2900 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
2901
2902 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
2903 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
2904
2905 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2906 BFD is not of the right type.
2907 (bfd_elf_get_needed_list): Likewise.
2908 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2909 * sunos.c (bfd_sunos_get_needed_list): Likewise.
2910 * xcofflink.c (XCOFF_XVECP): Define.
2911 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
2912 of the right type.
2913 (bfd_xcoff_import_symbol): Likewise.
2914 (bfd_xcoff_export_symbol): Likewise.
2915 (bfd_xcoff_link_count_reloc): Likewise.
2916 (bfd_xcoff_record_link_assignment): Likewise.
2917 (bfd_xcoff_size_dynamic_sections): Likewise.
2918
2919 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
2920 table index against the number of symbols for a base relative
2921 reloc.
2922
2923 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
2924 static function.
2925 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
2926 full_aouthdr flag here...
2927 (_bfd_xcoff_bfd_final_link): ...not here.
2928
2929 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
2930
2931 * libelf.h: Rename to elf-bfd.h to avoid conflict with
2932 systems that have a system <libelf.h>.
2933 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
2934 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
2935 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
2936 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
2937 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
2938 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
2939 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
2940
2941 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
2942
2943 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
2944 set, set BSF_WEAK in symbol. Change all callers.
2945 (ecoff_get_extr): Set weakext based on BSF_WEAK.
2946 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
2947 _bfd_generic_link_add_one_symbol.
2948 (ecoff_indirect_link_order): Check that the section tdata relocs
2949 are not NULL before using them.
2950
2951 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
2952 define TRAD_HEADER as hosts/alphalinux.h.
2953 * configure: Rebuild.
2954 * hosts/alphalinux.h: New file.
2955 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
2956 not int.
2957
2958 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
2959
2960 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
2961 C_ECOMM storage classes.
2962
2963 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
2964 of xcoff_mark.
2965 (xcoff_mark): Call xcoff_mark_symbol.
2966 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
2967 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
2968 doing it by hand.
2969 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
2970
2971 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
2972
2973 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
2974 field.
2975 (xcoff_find_reloc): New static function.
2976 (xcoff_link_add_symbols): Use it.
2977 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
2978 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
2979 relocate the value of C_DECL.
2980
2981 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
2982
2983 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
2984
2985 * cofflink.c (_bfd_coff_generic_relocate_section): Make
2986 callback decide what goes in .relocs.
2987 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
2988 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
2989 there is one.
2990
2991 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
2992
2993 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
2994 absolute section.
2995
2996 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
2997
2998 * xcofflink.c: More improvements, mostly to fix handling of
2999 constructors and a few other special cases.
3000 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
3001 zero, reverting yesterday's change.
3002 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
3003 (bfd_xcoff_link_count_reloc): Declare.
3004 (bfd_xcoff_record_link_assignment): Declare.
3005 * bfd-in2.h: Rebuild.
3006
3007 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
3008
3009 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
3010 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
3011 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
3012 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
3013 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
3014 Change PAGE_SIZE to TARGET_PAGE_SIZE.
3015
3016 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
3017 format.
3018
3019 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
3020 segments includes the a.out header. See to that the magic number
3021 *always* is big-endian.
3022
3023 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
3024 m68k4k NetBSD configurations.
3025
3026 * configure.in, configure: Separate i386 & mips NetBSD
3027 configurations from other BSD ones. Don't assume DEC is the only
3028 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
3029 configurations. Add support for m68k4k NetBSD object format.
3030
3031 * libaout.h: Added M_68K4K_NETBSD magic.
3032
3033 * m68k4knetbsd.c: New file.
3034
3035 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
3036
3037 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
3038 <machine/endian.h>.
3039
3040 * hosts/mipsnbsd.h: New file.
3041
3042 start-sanitize-gm
3043 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
3044
3045 * config.bfd: Add config stuff for mips*-*-magic* to set
3046 targ_defvec to ecoff_big_vec.
3047
3048 end-sanitize-gm
3049 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
3050
3051 * xcofflink.c: Numerous changes to get closer to a working XCOFF
3052 linker.
3053 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
3054 toc_section, and entry_section fields.
3055 (struct xcoff_section_tdata): Remove ldrel_count field.
3056 * libcoff.h: Rebuild.
3057 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
3058 fields.
3059 (coff_compute_section_file_positions): If RS6000COFF_C, generate
3060 full a.out header if full_aouthdr is set in xcoff_data.
3061 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
3062 based on sections stored in xcoff_data.
3063 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
3064 fields.
3065 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
3066 (rs6000coff_vec): Set symbol_leading_char to '.'.
3067 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
3068 value stored in ret rather than returning a pointer value.
3069
3070 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3071
3072 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
3073 format for now.
3074
3075 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
3076
3077 * som.c (som_slurp_string_table): Allocate the strings with malloc
3078 since they're free'd by free_cached_info.
3079 (som_slurp_symbol_table): Similarly for the symbol table.
3080
3081 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
3082
3083 * Makefile.in (diststuff): Don't make headers.
3084
3085 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
3086
3087 * Makefile.in: Rebuild dependencies.
3088
3089 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
3090 output_bfd is not SunOS.
3091 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
3092 non-SunOS input files.
3093
3094 * xcofflink.c: Extensive changes to support linking shared objects
3095 and generating a .loader section.
3096 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
3097 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
3098 last_symndx, and ldrel_count fields.
3099 * libcoff.h: Rebuild.
3100 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
3101 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
3102 is set.
3103 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
3104 (bfd_xcoff_export_symbol): Declare.
3105 (bfd_xcoff_size_dynamic_sections): Declare.
3106 * bfd-in2.h: Rebuild.
3107
3108 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
3109
3110 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
3111 * configure: Rebuild.
3112 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
3113 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
3114 contents.
3115 (pmac_xcoff_vec): Update to use new xcoff support.
3116 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
3117 (xcoff_write_armap): Declare buf as unsigned char.
3118 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
3119
3120 * mpw-make.sed: Generalize subdir_do edit.
3121
3122 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
3123
3124 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
3125 correctly. Don't initialize asect->vma.
3126
3127 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
3128
3129 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
3130 something a little less than the page size.
3131
3132 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
3133
3134 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
3135
3136 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
3137
3138 * coff-i386.c (coff_i386_reloc_type_lookup): New.
3139 * coffcode.h (coff_write_object_contents): If .bss is before
3140 .data us that as data_start.
3141 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
3142 calc correct.
3143 * peicode.h (add_data_entry): Use _cooked_size of data directory.
3144 (coff_swap_outhdr_out): Hardwire in version number.
3145
3146 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
3147
3148 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
3149 major and minor to *_vno, since the former are also macros in
3150 SunOS header files. Cast result of bfd_alloc to appropriate
3151 type.
3152
3153 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
3154 before assigning to sec_data.
3155
3156 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
3157
3158 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
3159 now relative to the section, not absolute.
3160 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
3161 get the file name when there is a N_SO directory name. When
3162 handling stabs, remember that section->vma was added to the
3163 offset.
3164
3165 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
3166
3167 * sunos.c (struct sunos_link_hash_table): Add needed field.
3168 (sunos_link_hash_table_create): Call bfd_release, not free.
3169 (sunos_link_hash_table_create): Initialize needed field.
3170 (sunos_add_dynamic_symbols): Record needed objects.
3171 (bfd_sunos_get_needed_list): New function.
3172 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
3173 * bfd-in2.h: Rebuild.
3174
3175 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
3176
3177 * libcoff-in.h (pe_data_type.in_reloc_p): New.
3178
3179 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
3180
3181 * bfd-in.h (struct bfd_link_needed_list): Rename from
3182 bfd_elf_link_needed_list.
3183 * bfd-in2.h: Rebuild.
3184 * elf.c, elflink.h, libelf.h: Corresponding changes.
3185
3186 Add start at AIX linker support; no shared libraries yet.
3187 * xcofflink.c: New file.
3188 * configure.in (rs600coff_vec): Use xcofflink.o.
3189 * configure: Rebuild.
3190 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
3191 fields.
3192 (struct xcoff_section_tdata): Define.
3193 (xcoff_section_data): Define macro.
3194 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
3195 (_bfd_xcoff_bfd_link_add_symbols): Declare.
3196 (_bfd_xcoff_bfd_final_link): Declare.
3197 (_bfd_ppc_xcoff_relocate_section): Declare.
3198 * libcoff.h: Rebuild.
3199 * coff-rs6000.c: Clean up a bit.
3200 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
3201 cputype, csects, and debug_indices.
3202 (xcoff_copy_private_bfd_data): Copy cputype.
3203 (xcoff_howto_table): Rename from rs6000coff_howto_table.
3204 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
3205 (xcoff_reloc_type_lookup): Rename from
3206 rs6000coff_reloc_type_lookup.
3207 (coff_relocate_section): Define.
3208 (_bfd_xcoff_sizeof_headers): Define.
3209 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
3210 (_bfd_xcoff_bfd_relax_section): Define.
3211 (_bfd_xcoff_bfd_link_split_section): Define.
3212 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
3213 coff.
3214 * coffcode.h (coff_compute_section_file_positions): If AIX,
3215 increment sofar by SMALL_AOUTSZ if not executable.
3216 (coff_write_object_contents): If AIX, always output an a.out
3217 header; if not executable, header size of SMALL_AOUTSZ.
3218 * hash.c (struct bfd_strtab_hash): Add xcoff field.
3219 (_bfd_stringtab_init): Initialize xcoff field.
3220 (_bfd_xcoff_stringtab_init): New function.
3221 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
3222 (_bfd_stringtab_emit): In XCOFF mode, write out length.
3223 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
3224 * libbfd.h: Rebuild.
3225 * Makefile.in: Rebuild dependencies.
3226 (BFD32_BACKENDS): Add xcofflink.o.
3227 (CFILES): Add xcofflink.c.
3228
3229 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
3230 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
3231 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
3232
3233 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3234
3235 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
3236
3237 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
3238
3239 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
3240 * config.in: Regenerated.
3241
3242 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
3243 (_bfd_chunksize): New variable.
3244 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
3245 for obstack chunk size.
3246 * configure.in: Check for getpagesize.
3247 * configure: Regenerated.
3248
3249 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3250
3251 * trad-core.c (rawptr): Make it a local variable of
3252 ptrace_unix_core_file_p.
3253
3254 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
3255
3256 * coff-arm.c (in_reloc_p): New.
3257 * coff-i386.c (in_reloc_p): New.
3258 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
3259 (coff_write_object_contents): Only set has_reloc_section
3260 if PE_IMAGE.
3261 * cofflink.c (_bfd_coff_generic_relocate_section): Call
3262 in_reloc_p to decide if reloc should be emitted.
3263 * libcoff.h (pe_data_type.in_reloc_p): New.
3264 * peicode.h (pe_mkobject): Initialize in_reloc_p.
3265
3266 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
3267
3268 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
3269 (_bfd_coff_read_internal_relocs): Likewise.
3270 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
3271 (_bfd_coff_read_internal_relocs): Likewise.
3272
3273 * elflink.h (elf_link_add_object_symbols): Correct conditions
3274 under which type and size change warnings are issued.
3275
3276 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
3277
3278 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
3279 a symbol which is not in a real section.
3280 (coff_write_native_symbol): Corresponding change.
3281
3282 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
3283 coff_link_hash_newfunc and make non-static.
3284 (_bfd_coff_link_hash_table_init): New function, broken out of
3285 _bfd_coff_link_hash_table_create.
3286 (_bfd_coff_link_hash_table_create): Use it.
3287 (process_embedded_commands): Make static.
3288 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
3289 (_bfd_coff_link_hash_table_init): Declare.
3290 * libcoff.h: Rebuild.
3291
3292 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
3293 field in XCOFF tdata.
3294 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
3295 U802ROMAGIC, for clarity. Try to set arch and machine correctly
3296 based on cputype stored in a.out header, or in n_type of initial
3297 .file symbol.
3298 (coff_write_object_contents): Set cputype correctly in a.out
3299 header.
3300 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
3301 warnings.
3302 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
3303 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
3304 old resv1 field.
3305 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
3306 * libcoff.h: Rebuild.
3307
3308 * cpu-rs6000.c (rs6000_compatible): New static function.
3309 (bfd_rs6000_arch): Use it.
3310 * cpu-powerpc.c (powerpc_compatible): New static function.
3311 (arch_info_struct): Define various flavours of PowerPC.
3312 (bfd_powerpc_arch): Use powerpc_compatible. Point at
3313 arch_info_struct.
3314
3315 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
3316
3317 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
3318
3319 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
3320
3321 * elflink.h (elf_link_add_object_symbols): Don't warn about
3322 changing the size or type if the old definition was weak.
3323
3324 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
3325
3326 * coffcode.h (combined_entry_type): Add fix_line field.
3327 (coff_slurp_line_table): Warn if we try to set the lineno field of
3328 a symbol twice.
3329 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
3330 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
3331 * coffgen.c (coff_mangle_symbols): Handle fix_line.
3332 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
3333 absolute section.
3334 (coff_print_symbol): Print fix_value symbols in a useful fashion.
3335 * libcoff.h: Rebuild.
3336
3337 * libcoff-in.h (struct xcoff_tdata): Define.
3338 (xcoff_data): Define.
3339 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
3340 * bfd-in2.h, libcoff.h: Rebuild.
3341 * coff-rs6000.c (xcoff_mkobject): New static function.
3342 (coff_mkobject): Define.
3343 (xcoff_copy_private_bfd_data): New static function.
3344 (coff_bfd_copy_private_bfd_data): Define.
3345 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
3346 signed to bitfield.
3347 (rs6000coff_vec): Add DYNAMIC to object_flags.
3348 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
3349 .loader sections specially.
3350 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
3351 section alignment from the XCOFF tdata information.
3352 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
3353 F_SHROBJ, and copy the extra a.out header information into the
3354 XCOFF tdata structure.
3355 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
3356 F_DYNLOAD and the extra a.out header information.
3357 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
3358 C_HIDEXT symbol with attached csect information.
3359 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
3360 in the o_maxdata field.
3361 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
3362 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
3363 end if BSF_NOT_AT_END is set.
3364
3365 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
3366 _bfd_read_ar_hdr_fn.
3367 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
3368 * bfd-in2.h, libbfd.h: Rebuild.
3369 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
3370 return value.
3371 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
3372 (bfd_slurp_bsd_armap_f2): Likewise.
3373 (_bfd_slurp_extended_name_table): Likewise.
3374
3375 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
3376
3377 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
3378
3379 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
3380 when the symbol table is empty.
3381
3382 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
3383 space for section symbols, since we don't output them either.
3384 (elf_m68k_adjust_dynindx): Removed.
3385
3386 * ptrace-core.c (rawptr): Make it a local variable of
3387 ptrace_unix_core_file_p.
3388
3389 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3390
3391 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
3392 NULL.
3393
3394 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
3395 Mac object file formats.
3396
3397 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
3398
3399 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
3400 auxent if there isn't one.
3401 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
3402 rather than FILNMLEN as the maximum name length.
3403
3404 * coffcode.h (bfd_coff_backend_data): Add new field
3405 _bfd_coff_print_aux.
3406 (bfd_coff_print_aux): New static function.
3407 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
3408 scnlen field of an XTY_LD csect aux entry.
3409 (coff_print_aux): New static function.
3410 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
3411 in coff_pointerize_aux_hook.
3412 (bfd_coff_std_swap_table): Initialize new field.
3413 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
3414 * libcoff.h: Rebuild.
3415 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
3416 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3417
3418 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
3419 if there are symbols, for native AIX ld compatibility.
3420
3421 * coffcode.h (bfd_coff_backend_data): Add new field
3422 _bfd_coff_pointerize_aux_hook.
3423 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
3424 or I960, and as 0 otherwise.
3425 (bfd_coff_std_swap_table): Initialize new field.
3426 * libcoff.h: Rebuild.
3427 * coffgen.c (coff_pointerize_aux): Change parameters to take
3428 symbol pointer instead of type and class, and to take aux index.
3429 Call _bfd_coff_pointerize_aux_hook if it is defined.
3430 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
3431 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
3432 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3433
3434 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
3435 read-only/host-only support.
3436
3437 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
3438 BSF_LOCAL.
3439 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
3440 RS6000COFF_C.
3441
3442 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
3443 BFD_JUMP_TABLE_ARCHIVE accordingly.
3444 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
3445 (_bfd_compute_and_write_armap): Declare.
3446 (_bfd_generic_read_ar_hdr): Declare.
3447 (_bfd_read_ar_hdr): Define.
3448 (_bfd_noarchive_read_ar_hdr): Define.
3449 (_bfd_archive_bsd_read_ar_hdr): Define.
3450 (_bfd_archive_coff_read_ar_hdr): Define.
3451 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
3452 _bfd_read_ar_hdr instead.
3453 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
3454 (_bfd_compute_and_write_armap): Rename from
3455 compute_and_write_armap. Make non-static. Change all callers.
3456 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
3457 than _bfd_snarf_ar_hdr.
3458 * aout-target.h (MY_read_ar_hdr): Define if not defined.
3459 * ieee.c (ieee_read_ar_hdr): Define.
3460 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
3461 * oasys.c (oasys_read_ar_hdr): Define.
3462 * som.c (som_read_ar_hdr): Define.
3463 * bfd-in2.h, libbfd.h: Rebuild.
3464
3465 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
3466
3467 * peicode.c (coff_swap_filehdr_in): If symptr is
3468 zero, there aren't any symbols, even if nsyms is set.
3469
3470 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
3471
3472 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
3473 field.
3474 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
3475 sections, and set styp correctly for them: .got, .hash, .dynamic,
3476 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
3477 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
3478 types.
3479 (ecoff_sort_hdrs): New static function.
3480 (ecoff_compute_section_file_positions): Return boolean, not void.
3481 Sort the sections by VMA before looking through them. Put the
3482 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
3483 section on an appropriate boundary within the page.
3484 (ecoff_compute_reloc_file_positions): Check return value of
3485 ecoff_compute_section_file_positions.
3486 (_bfd_ecoff_set_section_contents): Likewise.
3487 (_bfd_ecoff_write_object_contents): Check for various Alpha
3488 section types when incrementing text_size and data_size. Call
3489 adjust_headers backend function if it exists.
3490 * coff-alpha.c (alpha_adjust_headers): New static function.
3491 (alpha_ecoff_backend_data): Initialize adjust_headers field.
3492 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3493
3494 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
3495
3496 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
3497
3498 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
3499 of ALTERNATE_AIX_CORE_FORMAT.
3500 * configure.in (aix4): No longer need CORE_FLAGS.
3501 * configure: Updated.
3502
3503 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
3504
3505 NS32k changes from Ian Dall:
3506 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
3507 macros.
3508 (aout_link_input_section_std, aout_link_input_section_ext,
3509 aout_link_reloc_link_order): Call them instead of _bfd_*
3510 versions.
3511 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
3512 to zero.
3513 (backend_data): Use it instead of hardcoded zero.
3514
3515 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
3516 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
3517
3518 * ns32knetbsd.c: Include bfd.h.
3519 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
3520 (MY_bfd_reloc_type_lookup): Declare function too.
3521 * pc532-mach.c (set_sizes): Don't declare.
3522 (MY_text_includes_header, MY_exec_header_not_counted): Define.
3523 (backend_data, MY_backend_data): Don't define.
3524
3525 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
3526 ns32k-*-lites* like ns32k-*-netbsd*.
3527
3528 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
3529 compile on lites.
3530
3531 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
3532
3533 * coffcode.h (coff_write_object_contents): Restore setting
3534 f_timdat to 0, deleted on August 22.
3535
3536 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
3537
3538 * coffcode.h (coff_bfd_copy_private_symbol_data,
3539 coff_bfd_copy_private_section_data,
3540 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
3541 * peicode.h (coff_bfd_copy_private_bfd_data): New
3542 (pe_bfd_copy_private_bfd_data): New.
3543 (coff_swap_scnhdr_in): Swap bss size into the right place.
3544 (pe_print_private_bfd_data): Add some newlines.
3545
3546 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
3547
3548 * som.c (setup_sections): Don't die if a space has no subspaces.
3549
3550 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
3551
3552 * elflink.h (elf_link_add_object_symbols): Don't let a weak
3553 dynamic symbol override a common symbol. Don't change the size or
3554 type if they have been set and the new symbol is not a definition.
3555 Warn if the size or type changes.
3556
3557 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
3558
3559 * som.c (som_begin_writing): Don't write the symbol table or
3560 symbol strings.
3561 (som_finish_writing): Write them here. Place them after the
3562 subspace data, but before the relocs.
3563
3564 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
3565
3566 * sunos.c (sunos_add_one_symbol): Just pass false, not
3567 info->shared_library, to sunos_create_dynamic_sections.
3568 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
3569 section.
3570 (sunos_check_dynamic_reloc): Remove .text section assertion.
3571
3572 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
3573
3574 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
3575 * configure, configure.in: Add pmac_xcoff_vec case.
3576 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
3577 * coff-pmac.c: New file, PowerMac XCOFF support.
3578 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
3579 * targets.c (pmac_xcoff_vec): Declare.
3580
3581 * mpw-config.in: Various changes to be compatible with the
3582 autoconf-based configury.
3583 * mpw-make.sed: New file, sed commands to translate Unix
3584 makefile into MPW syntax.
3585 * mpw-make.in: Remove.
3586 * hosts/mpw.h: Remove.
3587 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
3588 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
3589
3590 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
3591
3592 * binary.c (binary_get_symtab): Return an empty string on error.
3593 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
3594
3595 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
3596
3597 * coff-ppc.c: Reformatted according to gnu conventions
3598 Removed irrelevant "if 0" code
3599
3600 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
3601
3602 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
3603 symbols rather than as indirect symbols.
3604 (MY(slurp_symbol_table)): Don't do anything special about
3605 secondary symbols.
3606
3607 * coffcode.h (coff_new_section_hook): Make sure that the alignment
3608 of .ctors and .dtors sections is no larger than 2.
3609
3610 * sunos.c (sunos_add_one_symbol): Don't change
3611 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
3612 undef list.
3613 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
3614 dynamic symbols when creating a shared library.
3615 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
3616 shared library.
3617 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
3618 written even if it is not defined in a regular object.
3619 (sunos_write_dynamic_symbol): Use plt_offset for the address of
3620 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
3621 rather than the constant 22.
3622 (sunos_check_dynamic_reloc): Handle creating a shared library.
3623 (sunos_finish_dynamic_link): Set the first entry in the GOT to
3624 zero when creating a shared library.
3625 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
3626 write it out at the start of the symbol table.
3627
3628 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
3629
3630 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
3631
3632 * config.bfd: Add arm-*-coff.
3633 * configure.in, configure: Add armcoff_{little,big}_vec.
3634 * targets.c (armcoff_{little,big}_vec): Declare.
3635 (bfd_target_vector): Add armcoff_{little,big}_vec.
3636 * coff-arm.c (armcoff_{little,big}_vec): Always define.
3637
3638 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
3639
3640 * targets.c (bfd_find_target): Remove debugging code.
3641
3642 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
3643
3644 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
3645 support on powerpc.
3646 * Makefile.in: added *-ppc files
3647 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
3648 allow pe based .o's to be shared with other tools on ppc/NT
3649 * config.bfd: added powerpc[le]-[pe|winnt] config support
3650 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
3651 * peicode.h: Added more section flags for PE on ppc
3652 Added coff_swap_filehdr_out to allow peicode.h to be
3653 used for non-image PE files on ppc.
3654 Check for image, or not, before copying pe_opthdr
3655 * targets.c: Added new bfd's
3656 * targets.c: Removed two inactive bfds that shouldn't have made it this
3657 far.
3658
3659 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3660
3661 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
3662 explicit values to initialize all relocs. Change all users.
3663 (ppc_elf_brtaken_inner): New function to handle branch predicition
3664 relocs.
3665 (ppc_elf_brtaken_reloc): Ditto.
3666 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
3667 relocs use ppc_elf_unsupported_reloc.
3668 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
3669 needs to be reported.
3670 (ppc_elf_relocate_section): Support branch prediction relocs.
3671
3672 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
3673
3674 * bfd.c (bfd_assert): Remove \n from string passed to
3675 _bfd_error_handler.
3676
3677 * coff-i386.c: (TWO_DATA_SECS): Don't define.
3678 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
3679 (bfd_coff_make_section_hook): Don't define.
3680 (coff_make_section_hook): Remove.
3681 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
3682 (styp_to_sec_flags): Likewise.
3683 (coff_write_object_contents): Likewise.
3684 (bfd_coff_std_swap_table): Don't initialize make_section_hook
3685 field.
3686 * libcoff.h: Rebuild.
3687 * coffgen.c (make_a_section_from_file): Just call
3688 bfd_make_section_anyway, not bfd_make_section or
3689 bfd_coff_make_section_hook.
3690 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
3691 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
3692 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
3693 make_section_hook field.
3694 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3695
3696 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
3697 pointers into value field for warning and indirect symbols; just
3698 leave the value field alone.
3699 * linker.c (generic_link_add_symbol_list): Use next symbol for
3700 warning and indirect symbols, rather than looking in symbol value.
3701 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
3702 parameter. Change all callers. Remove support for indirect
3703 symbols; it didn't work anyhow.
3704 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
3705 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
3706 * bfd-in2.h: Rebuild.
3707
3708 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3709
3710 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
3711 go back to telling the tools this reloc operates on 32 bits.
3712
3713 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
3714
3715 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
3716 rather than a direct fprintf.
3717 * archive.c (_bfd_write_archive_contents): Likewise.
3718 * coffcode.h (coff_slurp_symbol_table): Likewise.
3719 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
3720 (ppc_elf_unsupported_reloc): Likewise.
3721 (ppc_elf_relocate_section): Likewise.
3722 * i386linux.c (linux_tally_symbols): Likewise.
3723 (linux_finish_dynamic_link): Likewise.
3724 * osf-core.c (osf_core_core_file_p): Likewise.
3725 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
3726 * som.c (som_sizeof_headers): Likewise.
3727 * srec.c (srec_bad_byte): Likewise.
3728 * bfd.c (bfd_assert): Likewise. Also change file to be const.
3729 * libbfd-in.h (bfd_assert): Declare first parameter const.
3730 * libbfd.h: Rebuild.
3731 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
3732 bfd_reloc_overflow is enough.
3733 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
3734 * coff-h8500.c (rtype2howto): Likewise.
3735 * coff-z8k.c (rtype2howto): Likewise.
3736 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
3737 * elf.c (_bfd_elf_get_lineno): Likewise.
3738 (_bfd_elf_no_info_to_howto): Likewise.
3739 (_bfd_elf_no_info_to_howto_rel): Likewise.
3740 * hp300hpux.c (convert_sym_type): Likewise.
3741 (MY(swap_std_reloc_in)): Likewise.
3742 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
3743
3744 * libaout.h (struct aoutdata): Add line_buf field.
3745 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
3746 and filename_buffer. Instead, use a malloc buffer stored in the
3747 new line_buf field. Remove length restrictions.
3748
3749 * coffgen.c (string_size): Remove static variable.
3750 (debug_string_size, debug_string_section): Likewise.
3751 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
3752 and debug_string_size_p parameters. Use them instead of the
3753 global variables. Change all callers.
3754 (coff_write_symbol): Likewise.
3755 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
3756 (coff_write_symbols): Add local variables to replace removed
3757 global variables.
3758
3759 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
3760 function, and line_base fields.
3761 * libcoff.h: Rebuild.
3762 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
3763 information, rather than using static variables.
3764
3765 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
3766 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
3767
3768 * init.c (initialized): Remove static variable.
3769 (bfd_init): Don't bother setting initialized.
3770 (bfd_check_init): Remove.
3771 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
3772 * libbfd.h: Rebuild.
3773
3774 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3775
3776 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
3777 size for full core dumps. Copy core file header to private data.
3778 (rs6000coff_core_file_failing_command,
3779 rs6000coff_core_file_failing_signal): New functions to extract
3780 the file name and terminating signal from the core file.
3781 * coff-rs6000.c: Use them.
3782
3783 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
3784
3785 Change arch info to be const, initialized at compile time.
3786 * archures.c: Reindent many functions. Change CONST to const.
3787 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
3788 nothing set it anyhow. Make next const.
3789 (bfd_arch_info_list): Remove.
3790 (bfd_archures_list): Rename from archures_init_table. Change from
3791 a table of function pointers to a table of bfd_arch_info_type
3792 structure addresses.
3793 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
3794 (bfd_lookup_arch): Likewise.
3795 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
3796 const pointer.
3797 (bfd_default_arch_struct): Make const.
3798 (bfd_arch_init, bfd_arch_linkin): Remove.
3799 (bfd_get_arch_info): Return a const pointer.
3800 * init.c (bfd_init): Don't call bfd_arch_init.
3801 * bfd.c (struct _bfd): Make arch_info const.
3802 * bfd-in2.h: Rebuild.
3803 * libbfd.h: Rebuild.
3804 * configure.in: Put & before everything in $selarchs.
3805 * configure: Rebuild.
3806 * cpu-*.c: Change bfd_*_arch from a function which calls
3807 bfd_arch_linkin to a const structure.
3808 * ieee.c (ieee_object_p): Make arch const.
3809
3810 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3811
3812 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
3813 PowerPC V.4.
3814 * bfd-in2.h: Regenerate.
3815 * libbfd.h: Regenerate.
3816
3817 * elf32-ppc.c (reloc_type): Update names to match current draft.
3818 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
3819 relative. Update names to current V.4 draft.
3820 (ppc_elf_reloc_type_lookup): Add support for more relocations.
3821 (ppc_elf_relocate_section): Rename relocations to match draft.
3822
3823 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
3824
3825 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
3826 compiled with -mrelocatable-lib to be linked with either normal
3827 modules or -mrelocatable modules.
3828
3829 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
3830
3831 * coffcode.h (coff_write_object_contents): Clear the vstamp field
3832 in the a.out header.
3833
3834 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
3835 a reloc against a local symbol, even if it's not a section.
3836
3837 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
3838
3839 * targets.c (bfd_target): Remove unused align_power_min field.
3840 * bfd-in2.h: Rebuild.
3841 * All backends: Remove initialization of align_power_min.
3842
3843 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
3844
3845 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
3846
3847 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
3848
3849 * config.bfd (mips-dec-netbsd*): New target.
3850 * configure.host (mips-dec-netbsd*): New host.
3851 * configure.in (mips-dec-netbsd*): New native.
3852 * configure: Rebuild.
3853
3854 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
3855
3856 Make the COFF backend linker merge common types:
3857 * cofflink.c (struct coff_debug_merge_element): Define.
3858 (struct coff_debug_merge_type): Define.
3859 (struct coff_debug_merge_hash_entry): Define.
3860 (struct coff_debug_merge_hash_table): Define.
3861 (coff_debug_merge_hash_table_init): Define.
3862 (coff_debug_merge_hash_table_free): Define.
3863 (coff_debug_merge_hash_lookup): Define.
3864 (struct coff_final_link_info): Add debug_merge field.
3865 (coff_debug_merge_hash_newfunc): New static function.
3866 (_bfd_coff_final_link): Allocate and free debug_merge table.
3867 (coff_link_input_bfd): Merge identical enum, struct and union
3868 types.
3869
3870 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
3871
3872 Convert i960 COFF to use COFF backend linker.
3873 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
3874 structure to store the symbol being used.
3875 (coff_i960_start_final_link): New static function.
3876 (coff_i960_relocate_section): New static function.
3877 (coff_i960_adjust_symndx): New static function.
3878 (coff_start_final_link): Define.
3879 (coff_relocate_section): Define.
3880 (coff_adjust_symndx): Define.
3881 * coffcode.h (bfd_coff_backend_data): Add new callback function
3882 _bfd_coff_start_final_link.
3883 (bfd_coff_start_final_link): Define.
3884 (coff_start_final_link): Define if not defined.
3885 (bfd_coff_std_swap_table): Add coff_start_final_link.
3886 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
3887 visible.
3888 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
3889 function callback is not NULL.
3890 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
3891 (_bfd_coff_internal_syment_name): Declare.
3892 * libcoff.h: Rebuild.
3893 * configure.in (icoff_big_vec): Add cofflink.o.
3894 (icoff_little_vec): Likewise.
3895 * configure: Rebuild.
3896
3897 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
3898
3899 * Makefile.in (clean-info): Remove extraneous tab from line
3900 following action.
3901
3902 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
3903
3904 * cofflink.c (coff_link_input_bfd): Fail if a section with no
3905 contents has relocs.
3906
3907 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
3908
3909 * coffcode.h (coff_compute_section_file_positions): Keep the
3910 raw size safe.
3911 (coff_write_object_contents): Remember if it's a relocatable
3912 file.
3913 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
3914 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
3915 if relocatable file. Swap out saved raw size.
3916
3917 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
3918
3919 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
3920 (maintainer-clean): Rename from realclean, passing
3921 maintainer-clean down to subdirectories, but leave realclean as a
3922 synonym.
3923
3924 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
3925 warning callback.
3926
3927 * dep-in.sed: Remove config.h from generated dependencies.
3928
3929 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
3930 broken out of sunos_canonicalize_dynamic_symtab.
3931 (sunos_canonicalize_dynamic_symtab): Call new function
3932 sunos_slurp_dynamic_symtab.
3933 (sunos_add_dynamic_symbols): Add three new parameters. Return the
3934 dynamic symbol table to the caller.
3935 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
3936 callback to override the symbols being read.
3937 * libaout.h (struct aout_backend_data): Add three new parameters
3938 to add_dynamic_symbols callback.
3939
3940 Extensive minor changes to avoid various gcc warnings. Also:
3941 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
3942 * archures.c (bfd_arch_info_type): Change mach field from long to
3943 unsigned long.
3944 (bfd_lookup_arch): Change machine parameter from long to unsigned
3945 long.
3946
3947 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
3948
3949 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
3950 a symbol with a non-zero plt_offset.
3951
3952 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
3953
3954 * elfcode.h (align_file_position): Remove; not used.
3955
3956 * configure.in: Only check for <sys/procfs.h> on a native system,
3957 and make sure it defines prstatus_t.
3958 * configure: Rebuild.
3959
3960 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
3961
3962 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
3963
3964 * config.in: Rename from config.h.in.
3965 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
3966 Check for config.h:config.in when creating stamp-h.
3967 * configure: Rebuild.
3968 * Makefile.in (stamp-h): Depend upon config.in rather than
3969 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
3970 calling config.status.
3971
3972 * Makefile.in (do_distclean): Remove config.h and stamp-h.
3973 (Makefile): Just rebuild Makefile.
3974 (config.h, stamp-h): New targets.
3975 * configure.in: Create stamp-h when rebuilding config.h.
3976 * configure: Rebuild.
3977
3978 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
3979
3980 * configure.in: Call AC_CONFIG_HEADER. Substitute
3981 HOST_64BIT_LONG. Check that various header files exist. Check
3982 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
3983 and/or free need to be declared. Don't make a link to sysdep.h.
3984 Define TRAD_HEADER for various hosts.
3985 * configure: Rebuild.
3986 * configure.host: Don't set my_host. Add definitions taken from
3987 host header files for various entries. Remove entries which now
3988 do nothing.
3989 * acconfig.h: New file.
3990 * config.h.in: New file, built by autoheader.
3991 * sysdep.h: New file.
3992 * Makefile.in (do_distclean): Don't remove sysdep.h.
3993 (RECONFIG): Remove.
3994 (LOCAL_H_DEPS): New variable.
3995 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
3996 $(RECONFIG).
3997 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
3998 ($(OPTIONAL_BACKENDS)): Likewise.
3999 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
4000 looking through sysdep.h.
4001 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
4002 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
4003 (fprintf_vma, sprintf_vma): Likewise.
4004 (int64_type, uint64_type): Don't define.
4005 * bfd-in2.h: Rebuild.
4006 * archures.c, bfd.c, srec.c: Include <ctype.h>.
4007 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
4008 * lynx-core.c: Include stuff from old hosts/lynx.h.
4009 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
4010 rather than NO_FCNTL.
4011 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
4012 rather than NATIVE_HPPAHPUX_COMPILER.
4013 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
4014 is defined.
4015 * hosts/*.h: Remove all header files which merely include,
4016 declare, and define things. Leave header files which define
4017 information needed by trad-core.c.
4018
4019 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
4020 (BFD_CC_FOR_BUILD): Define.
4021 * configure.in: Use BFD_CC_FOR_BUILD.
4022 * configure: Rebuild.
4023
4024 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
4025
4026 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
4027 * configure: Rebuild.
4028
4029 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
4030 a global symbol.
4031
4032 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
4033
4034 * config.bfd: i386pe_ve -> i386pe_vec.
4035
4036 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
4037
4038 * configure.host: Incorporate host Makefile fragments by setting
4039 shell variables.
4040 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
4041 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
4042 value based on whether the code is being compiled by a cross
4043 compiler. Don't substitute host_makefile_frag or frags.
4044 * aclocal.m4: New file to define local AC_PROG_CC.
4045 * configure: Rebuild.
4046 * Makefile.in (INSTALL): Set to @INSTALL@.
4047 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
4048 (INSTALL_DATA): Set to @INSTALL_DATA@.
4049 (AR): Set to @AR@.
4050 (CC): Define as @CC@.
4051 (CFLAGS): Set to @CFLAGS@.
4052 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
4053 (@host_makefile_frag@): Remove.
4054 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
4055 after other options.
4056 (config.status): Remove dependency upon @frags@.
4057 * config/*.mh, config/README: Remove.
4058
4059 * config.bfd: Rewrite to incorporate the contents of the Makefile
4060 fragments by setting shell variables, rather than merely returning
4061 the name of a Makefile fragment.
4062 * configure.in: Use shell variables set by config.bfd rather than
4063 looking at the target Makefile fragment files. Don't substitute
4064 target_makefile_frag. Do substitute TDEFINES.
4065 * configure: Rebuild.
4066 * Makefile.in (@target_makefile_frag@): Remove.
4067 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
4068 * config/*.mt: Remove.
4069
4070 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
4071
4072 * configure.in: Put changequote lines around "i[345]86" patterns
4073 section of core file support.
4074
4075 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
4076
4077 * som.c (som_bfd_print_private_bfd_data): Define to use the
4078 generic version.
4079
4080 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
4081
4082 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
4083 entry, text_start and data_start.
4084
4085 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
4086
4087 * Makefile.in (OFILES): Remove $(TDEPFILES).
4088 * config/apollo.mt (TDEPFILES): Remove.
4089 * config/README: Update.
4090
4091 * configure.in: For a native configuration, set COREFILE and
4092 COREFLAG based on the canonical host name.
4093 * configure: Rebuild.
4094 * Makefile.in: Rebuild dependencies.
4095 (ALL_CFLAGS): Add @COREFLAG@.
4096 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
4097 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
4098 support routines. Check LYNX_CORE rather than HOST_LYNX.
4099 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
4100 * i386lynx.c: Likewise.
4101 * m68klynx.c: Likewise.
4102 * sparclynx.c: Likewise.
4103 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
4104 * *-core.c: Comment changes.
4105 * config/decstation.mh (HDEPFILES): Remove.
4106 (HDEFINES): Remove -DTRAD_CORE.
4107 * config/irix3.mh (RANLIB): Remove.
4108 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
4109 (HDEFINES): Remove -DIRIX_CORE.
4110 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
4111 (HDEFINES): Remove -DTRAD_CORE.
4112 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
4113 * config/ultra3.mh (RANLIB): Remove.
4114 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
4115 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
4116 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
4117 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
4118 * config/hppahpux.mh, config/hppaosf.mh: Remove.
4119 * config/i386aix.mh, config/i386bsd.mh: Remove.
4120 * config/i386linux.mh, config/i386mach3.mh: Remove.
4121 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
4122 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
4123 * config/mipsmach3.mh, config/news-mips.mh: Remove.
4124 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
4125 * config/rs600.mh, config/rs6000lynx.mh: Remove.
4126 * config/solaris2.mh, config/stratus.mh: Remove.
4127 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
4128 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
4129
4130 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
4131
4132 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
4133 DT_FINI entry if the appropriate symbol is not in the hash table.
4134
4135 * libelf.h (struct elf_backend_data): Add create_program_headers
4136 and want_hdr_in_seg fields.
4137 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
4138 defined.
4139 (elf_backend_create_program_headers): Likewise.
4140 (elfNN_bed): Initialize create_program_headers and
4141 want_hdr_in_seg.
4142 * elf.c (get_program_header_size): Call create_program_headers
4143 backend routine.
4144 (map_program_segments): Check want_hdr_in_seg backend field. Call
4145 create_program_headers backend routine.
4146
4147 * elf.c (assign_file_positions_except_relocs): Align non allocated
4148 sections when creating an executable.
4149
4150 * elfcode.h (elf_swap_phdr_in): Make non static.
4151 (elf_swap_phdr_out): Make non static.
4152 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
4153 (bfd_elf32_swap_phdr_out): Declare.
4154 (bfd_elf64_swap_phdr_in): Declare.
4155 (bfd_elf64_swap_phdr_out): Declare.
4156
4157 * ecofflink.c (ecoff_collect_shuffle): New static function.
4158 (_bfd_ecoff_get_accumulated_pdr): New function.
4159 (_bfd_ecoff_get_accumulated_sym): New function.
4160 (_bfd_ecoff_get_accumulated_ss): New function.
4161 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
4162 (_bfd_ecoff_get_accumulated_sym): Declare.
4163 (_bfd_ecoff_get_accumulated_ss): Declare.
4164 * libbfd.h: Rebuild.
4165
4166 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
4167
4168 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
4169
4170 * elflink.h (elf_link_add_object_symbols): Handle indirect and
4171 warning symbols. If any section is named .gnu.warning.XXX, treat
4172 the contents as a warning to be issued if the symbol XXX is
4173 referenced.
4174 (elf_link_output_extsym): For an indirect or warning symbol, just
4175 output the symbol it points to.
4176
4177 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
4178 if bfd_hash_allocate fails, since it will already be set.
4179 (generic_link_hash_newfunc): Likewise.
4180 (archive_hash_newfunc): Likewise.
4181 (hash_entry_bfd): New static function.
4182 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
4183 callback. Allocate a new warning using the hash table newfunc.
4184 Use bfd_hash_replace to update the entry in the hash table, rather
4185 than assuming we can copy the fields with structure assignment.
4186
4187 * hash.c (bfd_hash_replace): New function.
4188 * bfd-in.h (bfd_hash_replace): Declare.
4189 * bfd-in2.h: Rebuild.
4190
4191 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
4192
4193 * config.bfd: Add mips*vr4300-*-elf* target.
4194 * config/mipsbvr4300.mt: Added.
4195
4196 See file ChangeLog.2
4197
4198 \f
4199 Local Variables:
4200 mode: indented-text
4201 left-margin: 8
4202 fill-column: 74
4203 version-control: never
4204 End:
This page took 0.137812 seconds and 5 git commands to generate.