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