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