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