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