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