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