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