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