* ldmisc.c (vfinfo): case 'I': If the file is not in an archive,
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
e7f9ba4f
ILT
1Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
4 output_bfd is not NULL.
5
34c4d647
DE
6Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
7
8 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
9 of bfd_alloc (fixes fix_line not being initialized).
10 Delete zeroing of fix_{value,tag,end,scnlen} fields.
11
4e054247
JL
12Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
13
57289b5c
JL
14 * coffcode.h: Allow specific backends to override the
15 bfd_link_add_symbols routine.
16
4e054247
JL
17 * coff-h8300.c: Include genlink.h.
18 (howto_table): Add R_MEM_INDIRECT.
19 (rtype2howto): Support R_MEM_INDIRECT.
20 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
21 for now.
22
a10d3dec
ILT
23Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
24
25 * coff-alpha.c (alpha_relocate_section): Use
26 info->callbacks_warning, rather than _bfd_error_handler, for
27 "multiple gp" warning.
28
ea2488ad
ILT
29Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
30
8881b321
ILT
31 * linker.c (bfd_wrapped_link_hash_lookup): New function.
32 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
33 table string. Use bfd_wrapped_link_hash_lookup.
34 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
35 table string.
36 * aoutx.h (aout_link_write_symbols): Use the name from the hash
37 table, if any, when writing out symbols.
38 (aout_link_input_section_std): Use the name from the hash table,
39 if any, when reporting undefined symbols.
40 (aout_link_input_section_ext): Likewise.
41 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
42 * bout.c (get_value): Likewise.
43 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
44 * ecoff.c (ecoff_reloc_link_order): Likewise.
45 * elflink.h (elf_link_add_object_symbols): Likewise.
46 (elf_reloc_link_order): Likewise.
47 * linker.c (_bfd_generic_link_output_symbols): Likewise.
48 (_bfd_generic_reloc_link_order): Likewise.
49 (default_indirect_link_order): Likewise.
50 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
51 * sunos.c (sunos_add_one_symbol): Likewise.
52 * xcofflink.c (xcoff_link_add_symbols): Likewise.
53 (bfd_xcoff_link_count_reloc): Likewise.
54 (xcoff_reloc_link_order): Likewise.
55
56 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
57 into -1 for intern->rss.
58
ea2488ad
ILT
59 * configure: Rebuild with autoconf 2.8.
60
c189fdfb
ILT
61Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
62
63 * stab-syms.c (__define_stab_duplicate): Define.
64 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
65 switch.
66 * bfd-in.h (bfd_get_stab_name): Declare.
67 * bfd-in2.h: Rebuild.
68 * Makefile.in: Rebuild dependencies.
69 (BFD_LIBS): Add stab-syms.o.
70 (BFD_LIBS_CFILES): Add stab-syms.c.
71 (BFD32_BACKENDS): Remove stab-syms.o.
72 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
73 * configure.in: Don't list stab-syms.o in bfd_backends.
74 * configure: Rebuild.
75 * libaout.h (aout_stab_name): Don't declare.
76 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
77 not aout_stab_name.
78
79Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
80
81 * elf.c (assign_file_positions_for_segments): Adjust file offset
82 for section alignment even if SEC_LOAD is not set.
83
c5bde1ef
ILT
84Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
85
8f218e05
ILT
86 * configure.in: Don't set SHLIB or SHLINK to an empty string,
87 since they appear as targets in Makefile.in.
88 * configure: Rebuild.
89
c5bde1ef
ILT
90 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
91 don't fiddle with a symbol which is not defined anywhere.
92
cb84f028
ILT
93Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
94
4e59f523
ILT
95 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
96 though they are defined in a shared library.
97 (xcoff_build_ldsyms): Likewise.
98
ea2504d5
ILT
99 * coffgen.c (coff_find_nearest_line): Don't look at the line
100 numbers for the section if section->lineno is NULL.
101
cb84f028
ILT
102 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
103 message rather than calling BFD_ASSERT.
104 * elfcode.h (write_relocs): Check return value of
105 _bfd_elf_symbol_from_bfd_symbol.
106
6e036cf7
MM
107Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
108
109 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
110 for .sbss section.
111
d08435de
JL
112Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
113
114 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
115 and R_HPPA_NLRSEL.
116 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
117 hppa_reloc_field_selector_type_alt.
118 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
119 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
120 selectors.
121 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
122
09609415
ILT
123Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
124
125 * elf.c (assign_file_positions_for_segments): Adjust the segment
126 memory size for the alignment of a SEC_ALLOC section, not just a
127 SEC_LOAD section.
128
55626bf0
ILT
129Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
130
131 * m68klinux.c: New file.
132 * hosts/m68klinux.h: New file.
133 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
134 * configure.in (m68*-*-linux*): New native host.
135 (m68klinux_vec): New vector.
136 * configure: Rebuild.
137 * targets.c (m68klinux_vec): Declare.
138 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
139 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
140 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
141 declaration from bfd_linux_size_dynamic_sections.
142 (bfd_m68klinux_size_dynamic_sections): Declare.
143 * bfd-in2.h: Rebuild.
144 * Makefile.in: Rebuild dependencies.
145 (BFD32_BACKENDS): Add m68klinux.o.
146 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
147
6c7b3090
JL
148Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
149
150 * libhppa.h (pa_arch): Add pa20.
151 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
152 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
153 (hppa_field_adjust): Handle e_nsel.
154 * som.c: Provide default definitions for many new relocs found only
155 in hpux10 include files.
156 (som_fixup_formats): Add several new relocs from hpux10.
157 (som_hppa_howto_table): Add hpux10 relocs.
158 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
159
14fd4616
SS
160Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
161
162 * mpw-make.sed: Edit out recent shared library support, and
163 rules to rebuild .h files using doc/chew.
164
3d9f042c
ILT
165Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
166
167 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
168 size even of sections with no contents.
169
bdec6228
ILT
170Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
171
88358469
ILT
172 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
173 starting with '$' the way we skip names starting with '.'. When
174 updating x_endndx, don't be fooled by an index which has been
175 merged.
176
bdec6228
ILT
177 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
178 struct/union/enum type with no elements.
179
053ae1d7
ILT
180Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
181
15f4406c
ILT
182 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
183
c8435133
ILT
184 * archive.c (bfd_generic_archive_p): If the first file in the
185 archive can not be recognized as an object, don't assume that this
186 is the wrong format.
187
053ae1d7
ILT
188 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
189 format is not bfd_object.
190 (bfd_elf_get_dt_soname): Likewise.
191
ea74d979
ILT
192Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
193
194 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
195 reloc.
196
871a3f3b
C
197Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
198
199 * bfd.c (tdata): Add netbsd_core_data.
200 * bfd-in2.h: Regenerated.
201
202Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
203
fe6fc35f
ILT
204 * sunos.c (SUNOS_CONSTRUCTOR): Define.
205 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
206 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
207 appropriate.
208
871a3f3b
C
209 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
210 to get the symbol index, matching 14 Jul 95 change.
211
d3785301
FF
212Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
213
214 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
215 Remove duplicate definition of gp.
216
60a49e7f
ILT
217Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
218
81bdcecf
ILT
219 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
220 assume that we can set the GP value and then get the same value,
221 since it won't be true if the output file is neither ELF nor
222 ECOFF.
223 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
224 _bfd_get_gp_value here.
225 (mips_gprel_reloc): Don't assume we can set and get the GP value.
226 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
227 mips_elf_final_gp.
228 (mips_elf_lo16_reloc): Likewise.
229 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
230 Don't require that the BFD be ELF.
231 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
232 (mips_elf_gprel32_reloc): Likewise.
233 (mips_elf_relocate_section): Don't assume we can set and get the
234 GP value.
235 (mips_elf_finish_dynamic_symbol): Don't bother to use
236 _bfd_get_gp_value here.
237
238 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
239 Don't change epdr between malloc and free. Be careful not to free
240 NULL pointers. Zero out the first RPDR.
241
7b61165a
ILT
242 * configure.host: On Linux, only pass -rpath option if $(libdir)
243 is neither /lib nor /usr/lib. From Alan Modra
244 <alan@mullet.Levels.UniSA.Edu.Au>.
245
60a49e7f
ILT
246 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
247 dt_name.
248 (elf_dt_name): Rename from elf_dt_needed_name.
249 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
250 elf_dt_needed_name.
251 (bfd_elf_get_dt_soname): New function.
252 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
253 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
254 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
255 * bfd-in2.h: Rebuild.
256
b268e261
DE
257Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
258
259 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
260 _bfd_sparc_elf_reloc_type_lookup.
261 (bfd_elf32_bfd_reloc_type_lookup): Update.
262 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
263 (sparc64_elf_howto_table): Define.
264 (sparc_reloc_map): Define.
265 (sparc64_elf_reloc_type_lookup): New function.
266 (sparc_elf_wdisp16_reloc): New function.
267 (elf_info_to_howto): Use sparc64_elf_howto_table.
268 (sparc64_elf_relocate_section): Likewise.
269 (bfd_elf64_bfd_reloc_type_lookup): Update.
270
9e2ef098
ILT
271Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
272
273 * configure.host: Check for 'do not mix' from native linker before
274 trying to use -rpath.
275
4c70373f
ILT
276Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
277
cba3f8a9
ILT
278 * bfd.c (_bfd_get_gp_value): New function.
279 (_bfd_set_gp_value): New function.
280 * libbfd-in.h (_bfd_get_gp_value): Declare.
281 (_bfd_set_gp_value): Declare.
282 * libbfd.h: Rebuild.
283 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
284 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
285 directly to the fields in the tdata information.
286 (alpha_relocate_section): Likewise.
287 * coff-mips.c (mips_adjust_reloc_in): Likewise.
288 (mips_gprel_reloc): Likewise.
289 (mips_relocate_section): Likewise.
290 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
291 (mips_elf_lo16_reloc): Likewise.
292 (mips_elf_final_gp): Likewise.
293 (mips_elf_gprel16_reloc): Likewise.
294 (mips_elf_gprel32_reloc): Likewise.
295 (mips_elf_relocate_section): Likewise.
296 (mips_elf_finish_dynamic_symbol): Likewise.
297
4c70373f
ILT
298 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
299
a0a2dd54
ILT
300Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
301
f54c7482 302 * configure.in: Call AC_PROG_CC before configure.host.
65eed095
ILT
303 * configure: Rebuild.
304 * configure.host: Don't set information which autoconf should
305 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
65eed095 306
14293419
ILT
307 * configure.host: Remove go32 and win32 host information, since it
308 should no longer be needed.
309
edf3fe48
ILT
310 * elf.c (map_sections_to_segments): If we have a .dynamic section,
311 then start a new segment rather than put a writable section in a
312 readonly segment.
313
b5e4f369
ILT
314 * configure.host: Set RPATH_ENVVAR.
315
f2e33e27
ILT
316 * Makefile.in: Rebuild dependencies.
317
a0a2dd54
ILT
318 * elflink.c (_bfd_elf_create_linker_section): Remove unused
319 zero_section variable.
320
52c6bc4d
ILT
321Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
322
323 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
324 ($(srcdir)/libbfd.h): Rename from libbfd.h.
325 ($(srcdir)/libcoff.h): Rename from libcoff.h.
326
c9e5279f
ILT
327Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
328
cb50baea
ILT
329 * ieee.c (ieee_write_expression): Only use an R variable for a
330 local symbol. Don't output a zero offset. Handle a zero address.
331 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
332 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
333 PCREL_OFFSET.
334 (parse_expression): Don't try to handle multiple occurrences of a
335 P variable. Handle I variables differently from X variables. Fix
336 the order of minus expressions.
337 (ieee_slurp_external_symbols): Generate an I variable for an NN
338 record. Fix handling of ATI and ATX records.
339 (ieee_slurp_sections): Only set minimal section attributes.
340 Adjust them later, based on the section contents.
341 (ieee_object_p): Read in the file until just after the ME record.
342 Call ieee_slurp_section_data to set the section flags.
343 (do_one): Add iterations parameter. Only repeat the first load
344 item. Set the section and file reloc flags.
345 (ieee_slurp_section_data): Set section flags. Pass iterations to
346 do_one.
347 (ieee_canonicalize_reloc): Handle I variables.
348 (do_with_relocs): Only emit relocation size when necessary.
349 Increase MAXRUN to 127. Change ov to be assigned, and take
350 src_mask and pcrel_offset into account.
351 (ieee_write_data_part): Skip sections that are not loaded.
352 (ieee_write_external_part): Don't output optional last entry of WX
353 records.
354 (ieee_write_me_part): Make setting of me_record neater.
355 (ieee_generic_stat_arch_elt): Get the size of an archive element.
356
c9e5279f
ILT
357 * syms.c (stt): Add entries for zerovars, vars, and code.
358
359 * elfcode.h (validate_reloc): New static function.
360 (write_relocs): Call validate_reloc for non ELF relocs.
361
362 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
363 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
364 (TARGET_LITTLE_SYM): Likewise.
365
366 * config.bfd (m68*-*-psos*): New target.
367
d9d65be6
ILT
368Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
369
370 * i386msdos.c: Remove some #if 0 code.
371 (msdos_write_object_contents): Don't include empty sections in the
372 size computation, regardless of their address.
373
374Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
375
376 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
377 is NULL, ie, the -r switch is used.
378
db5970c7
ILT
379Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
380
e9f03cd4
ILT
381 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
382 (BFD_RELOC_MIPS_GOT_LO16): Define.
b7384d22 383 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
e9f03cd4
ILT
384 * bfd-in2.h, libbfd.h: Rebuild.
385 * elf32-mips.c (mips_reloc_map): Map new relocs.
386
fe7c066a
ILT
387 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
388
1ab628e4
ILT
389 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
390 $(SHLINK).
391
db5970c7
ILT
392 * ieee.c (get_symbol): Set the section to bfd_abs_section.
393 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
394 simple number for the section address, rather than an expression.
395 Limit the number of bytes between relocs to MAXRUN.
396 (ieee_write_me_part): Set me_record to the file offset after the
397 start address.
398 (ieee_write_processor): New static function.
399 (ieee_write_object_contents): Use ieee_write_processor.
400
318b7c18
ILT
401Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
402
db5970c7
ILT
403 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
404
405 * coff-aux.c: Change include of aux.h to aux-coff.h.
318b7c18 406
56b64690
ILT
407Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
408
409 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
410 relocation put the addend both in the reloc entry and the data.
411 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
412 GOT offset value.
413
414 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
415 a R_68K_PCxx reloc against a defined global symbol directly.
416 (elf_m68k_check_relocs): Don't count such a reloc.
417
418 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
419 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
420 symbol for now, otherwise always record the symbol as dynamic.
421 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
422 is not referenced by a dynamic object, and we are not making a
423 shared object, then don't make a PLT entry. If we do make a PLT
424 entry, make sure the symbol has been recorded as dynamic.
425
5d649ca8
ILT
426Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
427
428 * configure.host: When making a shared library, set HLDFLAGS to
429 pass an appropriate -rpath option. Use the make variable SONAME
430 as the shared library soname, rather than computing it here. On
431 SunOS, build stamp-tshlink in place of $(SHLINK).
432 * Makefile.in (SONAME): New variable.
433 ($(SHLINK)): Make a link to the transformed name, as well.
434 (stamp-tshlink): New target.
435 (install): Skip stamp-tshlink during install.
436
8cc98cd5
MM
437Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
438
56b64690
ILT
439 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
440 linker sections have been set up yet.
441
8cc98cd5
MM
442 * elf.c (make_mapping): Add an additional argument to suppress
443 making the first section include the program headers.
444 (map_sections_to_segments): If the user used -Ttext such that the
445 program headers are on a different page, do not set the flags
446 saying that this section includes the program headers.
447
fe16107d
C
448Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
449
450 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
451 don't define TRAD_HEADER.
452 * configure: Rebuild.
453
454 * netbsd-core.c: New file, support for NetBSD core files.
455 * hosts/*nbsd.h: Removed.
456
f1783016
DE
457Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
458
459 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
460 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
461 * libbfd.h, bfd-in2.h: Regenerated.
462 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
463 bfd_elf32_bfd_reloc_type_lookup.
464 (reloc_type{,_names}): Deleted.
465 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
466 Add sparc64 relocs.
467 (sparc_reloc_map): Add sparc64 relocs.
468 (sparc_elf_notsupported_reloc): New static function.
469 (sparc_elf_wdisp16_reloc): New static function.
470 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
471 (elf32_sparc_relocate_section): Likewise.
472 (bfd_elf32_bfd_reloc_type_lookup): Define.
473 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
474 (reloc_type{,_names}): Deleted.
475 (elf_sparc_howto_table): Deleted.
476 (sparc_reloc_map): Deleted.
477 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
478 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
479
48fd00b6
ILT
480Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
481
2300e217
ILT
482 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
483 *-*-hpux* host.
484
48fd00b6
ILT
485 * Makefile.in (program_transform_name): New variable.
486 (install): Transform library name before installing it.
487
8adca582
ILT
488Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
489
cbe75cb6
ILT
490 * archures.c (bfd_mach_i960_hx): Define.
491 * bfd-in2.h: Rebuild.
492 * cpu-i960.c (scan_960_mach): Accept machine "hx".
493 (MATRIX): Expand entries for HX.
494 (arch_info_struct): Add i960:hx entry.
495 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
496 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
497 (coff_set_flags): Handle bfd_mach_i960_hx.
498
44f795f7
ILT
499 Support for building as a shared library, based on patches from
500 Alan Modra <alan@spri.levels.unisa.edu.au>:
501 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
502 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
503 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
504 * configure: Rebuild.
505 * configure.host: If --enable-shared, adjust shared library stuff
506 based on the host. If the host is SunOS, and the linker supports
507 -rpath, set HLDFLAGS to use it.
508 * Makefile.in (ALLLIBS): New variable.
509 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
510 (COMMON_SHLIB, SHLINK): New variables.
511 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
512 (STAGESTUFF): Remove variable.
513 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
514 $(TARGETLIB).
515 (stamp-ofiles): New target, like old ofiles target, but build
516 using a temporary file and move-if-change, and touch stamp-ofiles
517 when done.
518 (ofiles): Just depend upon stamp-ofiles.
519 (stamp-piclist, piclist): New targets.
520 ($(SHLIB), $(SHLINK)): New targets.
521 (targets.o, archures.o): Build twice if PICFLAG is set.
522 (do_mostlyclean): Remove pic/*.o.
523 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
524 stamp-piclist.
525 (do_distclean): Remove pic and stamp-picdir.
526 (install): Install shared libraries.
527 ($(OFILES)): Depend upon stamp-picdir.
528 (stamp-picdir): New target.
529
cb62d2bc
ILT
530 * libcoff-in.h: Add comment reminding people that libcoff.h is a
531 generated file.
532 * libcoff.h: Rebuild.
533
8adca582
ILT
534 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
535 flavour of a section with no owner.
536
537 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
538 ELF_LINK_NON_ELF flag.
539 (mips_elf_create_got_section): Likewise.
540
541 * elf.c: Revert last change, since it breaks dynamic linking.
542 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
543 field.
544 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
545 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
546 (elfNN_bed): Don't initialize want_hdr_in_seg field.
547
548Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
549
550 * elf.c (assign_file_positions_for_segments): If the backend does
551 not want the elf header or the program headers in the address
552 space, do not include them in the calculations.
553
554 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
555 function to determine if we need additional program headers.
556 (ppc_elf_modify_segment_map): Define as a NOP function for now.
557 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
558
0f09ddd4
ILT
559Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
560
561 * coffcode.h: Move today's libcoff.h change into coffcode.h.
562
b48f10ba
FF
563Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
564
0f09ddd4
ILT
565 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
566 back into one line. Some compilers (sunos 4.1.3 for example)
567 won't accept args split across more than one line.
b48f10ba 568
50761d3b
SC
569Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
570
571 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
572 * configure: Regenerate.
573
9dce8260
JL
574Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
575
576 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
577 try to do arithmetic on a void *, cast it to a unsigned char * first.
578
6c55897c
ILT
579Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
580
869b7d80
ILT
581 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
582 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
583 ELF_LINK_NON_ELF.
584 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
585 flag for a newly defined symbol.
586 (NAME(bfd_elf,record_link_assignment)): Likewise.
587 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
588 set the DEF or REF_REGULAR flags correctly.
589
6f6956c6
ILT
590 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
591 (libbfd.h, libcoff.h): Corresponding change.
592
6c55897c
ILT
593 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
594 a PLT32 reloc as dynamic.
595 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
596 is not referenced by a dynamic object, and we are not making a
597 shared object, then don't make a PLT entry. If we do make a PLT
598 entry, make sure the symbol has been recorded as dynamic.
599
b06136f2
SC
600Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
601
602 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
603 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
604 (powerpcle-*-cygwin32): New.
605 * peicode.h (add_data_entry): Get address from vma.
606
5c867ecd
MM
607Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
608
609 * elflink.c (_bfd_elf_create_linker_section): If the symbol
610 attached to the section has already been created as an undefined
611 symbol, treat it as if it hasn't been created yet.
612
28c16b55
ILT
613Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
614
615 * elflink.h (elf_bfd_final_link): Don't output initial dummy
616 symbol or section symbols if stripping all symbols and this is not
617 a relocateable link. Don't output the symbol string table if
618 there are no symbols.
619 (elf_link_flush_output_syms): Don't do anything if there are no
620 symbols to flush.
621
d19df9b5
ILT
622Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
623
624 * coff-aux.c: New file.
625 * hosts/m68kaux.h: New file.
626 * config.bfd (m68*-apple-aux*): New target.
627 * configure.in (m68*-apple-aux*): New native host.
628 (m68kaux_coff_vec): New vector.
629 * configure: Rebuild.
630 * targets.c (m68kaux_coff_vec): Declare.
631 * coffcode.h (bfd_coff_backend_data): Add field
632 _bfd_coff_link_add_one_symbol.
633 (bfd_coff_link_add_one_symbol): Define.
634 (compare_arelent_ptr): New static function if TARG_AUX.
635 (coff_write_relocs): If TARG_AUX, sort the relocs.
636 (coff_write_object_contents): Set A/UX aouthdr magic number.
637 (coff_link_add_one_symbol): Define if not defined.
638 (bfd_coff_std_swap_table): Initialize new field.
639 * libcoff.h: Rebuild.
640 * cofflink.c (coff_link_add_symbols): Call
641 bfd_coff_link_add_one_symbol rather than
642 _bfd_generic_link_add_one_symbol.
643 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
644 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
645 * coff-mips.c (mips_ecoff_backend_data): Likewise.
646 * Makefile.in: Rebuild dependencies.
647 (BFD32_BACKENDS): Add coff-aux.o.
648 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
649
a796aafd
ILT
650Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
651
652 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
653 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
654
a8763553
ILT
655Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
656
66761e59
ILT
657 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
658 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
659 (maintainer-clean): Warn about deleting special files.
660 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
661
cf5138e3
ILT
662 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
663 warning symbols correctly.
664 * elf32-i386.c (elf_i386_relocate_section): Likewise.
665 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
666 * elf32-mips.c (mips_elf_relocate_section): Likewise.
667 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
668 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
669 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
670
a8763553
ILT
671 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
672 warnings.
673
bdd2e7f1
KK
674Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
675
676 * libcoff-in.h: aligned newly exported names with bfd naming
677 conventions. Removed an erroneous define of POWERPC_LE_PE.
678 * libcoff.h: Rebuild.
679 * cofflink.c, coff-ppc.c: the above function name changes
680
d2bb6c79
ILT
681Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
682
eb5bc1f3
ILT
683 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
684 * ecoff.c (struct extsym_info): Define.
685 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
686 to ecoff_link_write_external.
687 (ecoff_link_write_external): Accept a struct extsym_info pointer.
688 Strip symbols when appropriate.
689
052b35d2
ILT
690 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
691 * syms.c (BSF_OBJECT): Define.
692 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
693 * bfd-in2.h: Rebuild.
694 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
695 STT_OBJECT symbol.
696 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
697 is set.
698
53787b23
ILT
699 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
700 copying relocs into a shared object, treat a defined global symbol
701 as a local symbol.
702 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
703 * elf32-mips.c (mips_elf_relocate_section): Likewise.
704 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
705
d2bb6c79
ILT
706 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
707 real defined symbol, not to a weak defined symbol.
708
13d1a4dd
KK
709Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
710
711 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
712 and made a few static functions externs.
713
714 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
715 POWERPC_LE_PE hack in cofflink.
716
717 * libcoff-in.h: promoted the following from cofflink.c to allow
718 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
719 coff_debug_merge_element, struct coff_debug_merge_type,
720 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
721 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
722 coff_debug_merge_hash_lookup, coff_link_section_info,
723 coff_final_link_info, coff_debug_merge_hash_newfunc,
724 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
725
726 * libcoff.h: re-gen'd
727
86aac8ea
ILT
728Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
729
730 * syms.c: Include "bfdlink.h".
731 (struct stab_find_info): Define.
732 (_bfd_stab_section_find_nearest_line): New function.
733 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
734 * libbfd.h: Rebuild.
735 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
736 * elf.c (_bfd_elf_find_nearest_line): Try calling
737 _bfd_stab_section_find_nearest_line before searching the ELF
738 symbol table. Find the closest STT_FUNC symbol, not the last one.
739 * libcoff-in.h (coff_data_type): Add line_info field.
bdd2e7f1 740 * libcoff.h: Rebuild.
86aac8ea
ILT
741 * coffgen.c (coff_find_nearest_line): Try calling
742 _bfd_stab_section_find_nearest_line before searching the COFF
743 symbol table.
744 * Makefile.in: Rebuild dependencies.
745
746Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
747
748 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
749 4 bytes, so we get the correct value when updating the register
750 field in little endian mode.
751
43d36aad
ILT
752Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
753
f0a97077
ILT
754 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
755 entry_section fields. Add sntoc and snentry fields.
756 * libcoff.h: Rebuild.
757 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
758 not toc_section and entry_section (the COFF file does not have any
759 sections at this point).
760 (coff_write_object_contents): Set o_snentry and o_sntoc from
761 snentry and sntoc rather than entry_section and toc_section.
762 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
763 snentry, not toc_section and entry_section.
764 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
765 entry_section from hentry.
766 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
ea2504d5 767 set snenty.
f0a97077
ILT
768 (xcoff_link_input_bfd): Set sntoc, not toc_section.
769 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
770 than using toc_section directly.
771
9b4598d0
ILT
772 * archures.c: Add missing `.' in enum bfd_architecture.
773 * bfd-in2.h: Rebuild.
774
43d36aad
ILT
775 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
776 Robert Lipe <robertl@arnet.com>.
777
eb82bc60
MM
778Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
779
780 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
781 to sections we allocate. Use bfd_zalloc to allocate initialial
782 sections, not bfd_alloc.
783 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
784 SDA{,2}I16 relocations.
785 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
786 whether to put something in .sbss or not.
787 (ppc_elf_relocate_section): Add support for more relocations. Add
c1e65e24
MM
788 in sec->output_offset where appropriate. Make error messages
789 include the symbol name.
eb82bc60
MM
790
791 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
792 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
793 doesn't get redefined messages if -shared.
794
795 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
796 section if the rel_section field has been set up.
797
9d621c7d
MM
798Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
799
800 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
801 relocations.
802
75c9ddc9
DE
803Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
804
805 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
806 of flags, only flags used are controlled by mach number. Bump up
807 output file mach number to highest of input file mach numbers.
808 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
809 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
810
72c513bc
DE
811 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
812 bfd_elf64_sparc_vec support.
813
3cbe19d2
MM
814Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
815
816 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
817 the embedded bit is set on some objects and not on others. Just
818 or it together.
d8fd85ad
MM
819 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
820 relocations.
3cbe19d2 821
5eb83ede
ILT
822Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
823
4a3d3b42
ILT
824 * coffcode.h (coff_new_section_hook): Don't try to align the
825 .stabstr section.
826
5eb83ede
ILT
827 * coffcode.h (coff_set_section_contents): Fix the handling of the
828 .lib section to work even if the entire section contents are
829 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
830 Robert Lipe <robertl@arnet.com>.
831
05f927dd
MM
832Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
833
834 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
835 memory here for contents.
836
837 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
838 _SDA2_BASE_ by 32768.
839 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
840 started using. Allocate contents for .sdata and .sdata2 sections
841 also.
842 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
843 rather than _name.
844 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
845 size _SDA{,2}_BASE_.
846 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
847 done.
848
5bc513b4
DE
849Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
850
5a5bac64
DE
851 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
852
5bc513b4 853 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5bc513b4 854 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5bc513b4 855 (bfd_mach_sparc_v9a): Define.
049f3d4c 856 (bfd_mach_sparc_v9_p): Define.
5bc513b4
DE
857 * bfd-in2.h: Regenerated.
858 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
859 bfd_mach_sparc_v9.
d3366d23 860 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5bc513b4
DE
861 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
862 to bfd_elf32_sparc_vec.
863 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5bc513b4 864 Add v8plus{,a} support.
5bc513b4 865 Add v9a support.
768b8ade 866 (sparc_compatible): New function.
5bc513b4 867 * elf32-sparc.h: #include "elf/sparc.h".
75c9ddc9 868 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5bc513b4 869 elf32_sparc_final_write_processing): New functions.
75c9ddc9 870 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5bc513b4 871 elf_backend_final_write_processing): Define.
5bc513b4 872
3b3753b8
MM
873Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
874
875 * elf-bfd.h (struct elf_link_hash_entry): Add
876 linker_section_pointer field.
877 (enum elf_linker_section_enum): Enumeration for new way of
878 creating linker dynamic sections and symbols.
879 (elf_linker_section{,_pointers}): New structures for creating
880 dynamic sections and symbols.
881 (elf_obj_tdata): Add linker_section_pointers and linker_section
882 fields.
883 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
884 (_bfd_elf_create_linker_section): New declarations.
885 (_bfd_elf_find_pointer_linker_section): Ditto.
886 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
887 (_bfd_elf_make_linker_section_rela): Ditto.
888
889 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
890
891 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
892 (ppc_elf_create_linker_section): New function to create the
893 sections .got, .sdata, and .sdata2.
894 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
895 needed.
896 (ppc_elf_check_relocs): Support more of the eabi relocations.
897 (ppc_elf_relocate_section): Ditto.
898 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
899 if the .sdata{,2} + .sbss{,2} section size is > 32k.
900
901 * elflink.h (elf_create_pointer_linker_section): New function to
902 create initialized pointers in dynamic linker sections.
903 (elf_finish_pointer_linker_section): Actually intialize the
904 pointers created above.
905
906 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
907 macros to provide both 32 and 64 bit versions of
908 elf_create_pointer_linker_section.
909 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
910 provide both 32 and 64 bit versions of
911 elf_finish_pointer_linker_section.
912
913 * elflink.c (_bfd_elf_create_linker_section): New function to
914 create a linker section.
915 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
916 given address in the linker pointer offsets created for a given
917 symbol.
918 (_bfd_elf_make_linker_section_rela): Make a RELA section
919 corresponding to the generated linker section.
920
6b3eb07e
DE
921Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
922
923 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
924
e7894f6b
KK
925Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
926
927 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
928 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
929 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
930 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
931 toc entry in an objdump) for now.
932 (ppc_do_last, ppc_get_last): New function - needed to save processing
933 the toc owner to the end.
934 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
935 toc owner last.
936
937 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
938 toc owner from being done till last. Must define POWERPC_LE_PC
939 to enable it.
940
941 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
942
943 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
944 to INFO.
945 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
946 SizeOfImage for PowerPC. Ignore the size of the .junk section.
947
80b99ca0
ILT
948Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
949
950 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
951
df96df4c
ILT
952Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
953
954 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
955 back to first.
956 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
957
d49ddb85
ILT
958Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
959
960 * elf.c (assign_file_positions_for_segments): Don't increment file
961 offset for a segment which contains no loadable sections.
962
4500a112
MM
963Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
964
965 * reloc.c: Add new PowerPC relocations.
966 * {bfd-in2,libbfd}.h: Regenerate.
967
968 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
969 (ppc_elf_reloc_type_lookup): Lookup new relocations.
970
252239f8
ILT
971Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
972
20ab764e
ILT
973 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
974 entries.
975
0a4ffa2d
ILT
976 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
977 info->shared.
978
45ca3195
ILT
979 * coffgen.c (coff_find_nearest_line): Don't try to cache
980 information in sections that are not owned by a BFD. From Richard
981 Henderson <richard@atheist.tamu.edu>.
982
252239f8
ILT
983 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
984 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
985 * elflink.h (elf_link_output_extsym): Remove special check for
986 _rld_new_interface.
987
988 * ecoffswap.h: Add prototypes for static functions.
989
bd2d10c0
MM
990Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
991
992 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
993 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
994 references.
995 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
996 to satisfy a TOC16 relocation. Rewrite unsupported relocation
997 support. Begin support for R_PPC_SDA{2,}REL.
998
1c3a295b
MM
999Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1000
1001 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
1002 create the .got and .got.neg sections.
1003 (ppc_elf_size_dynamic_sections): Call it.
1004 (ppc_elf_check_relocs): Call it.
1005 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
1006 (ppc_elf_check_relocs): Add error messages for relocations we
1007 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
1008 relocation.
1009
57081126
MM
1010Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1011
1012 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
1013 section flags for V.4 and eabi.
1014
3c38b3df
ILT
1015Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
1016
14899eb7
ILT
1017 * elf.c (assign_file_positions_for_segments): If a segment
1018 contains no sections, don't mark it as readable.
1019
98bb57ad
ILT
1020 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
1021 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
1022
02fcd126
ILT
1023 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
1024 dynamic section, if there is one.
1025 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
1026 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
1027 (bfd_elf64_swap_dyn_in): Likewise.
1028 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
1029 PTR.
1030 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
1031
3c38b3df
ILT
1032 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
1033 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
1034 <pirker@eiunix.tuwien.ac.at>.
1035
83f4323e
MM
1036Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1037
1038 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
1039 PowerPC V.4 and eabi.
1040 * bfd-in2.h: Regenerate.
1041 * libfd.h: Regenerate.
1042
1043 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
1044
1045 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
1046 section type and SHF_EXCLUDE section flag, turning them into the
1047 appropriate bfd section flag.
1048
a0271667
ILT
1049Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
1050
c9746fb6
ILT
1051 * xcofflink.c (xcoff_link_add_symbols): Create the special
1052 sections if we see a DYNAMIC object, in case that is the only
1053 XCOFF input object we see.
1054
5b3b9ff6
ILT
1055 * elf32-mips.c: Extensive changes for a start at dynamic linking
1056 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
1057
1058 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
1059 (struct elf_backend_data): Remove
1060 elf_backend_create_program_headers field. Add
1061 elf_backend_additional_program_headers and
1062 elf_backend_modify_segment_map fields.
1063 * elfxx-target.h (elf_backend_type_change_ok): Define if not
1064 defined.
1065 (elf_backend_additional_program_headers): Likewise.
1066 (elf_backend_modify_segment_map): Likewise.
1067 (elf_backend_create_program_headers): Don't define.
1068 (elfNN_bed): Change to account for field changes.
1069 * elf.c (assign_file_positions_for_segments): Call new
1070 modify_segment_map backend function. Don't call old
1071 create_program_headers backend function.
1072 (get_program_header_size): Call additional_program_headers rather
1073 than create_program_headers.
1074 * elflink.h (elf_link_add_object_symbols): Initialize
1075 type_change_ok from new backend field.
1076 (elf_link_output_extsym): Don't warn if _rld_new_interface is
1077 defined.
1078 (elf_reloc_link_order): Treat a reloc against a defined symbol as
1079 a reloc against the appropriate section.
1080
761f377f
ILT
1081 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
1082 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
1083 (elf_flags_init): Rename from elf_ppc_flags_init.
1084 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
1085 elf_ppc_flags_init.
1086 (ppc_elf_copy_private_bfd_data): Likewise.
1087 (ppc_elf_merge_private_bfd_data): Likewise.
1088
a0271667
ILT
1089 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
1090 relocation entries.
1091
64d5f5d0
ILT
1092Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
1093
1094 * coff-alpha.c (alpha_relocate_section): During final link, allow
1095 output .lita section to be bigger than 64k by adjusting gp value
1096 on a per-input section basis.
1097 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
1098 field.
1099 (struct ecoff_section_tdata): Add gp field.
1100
c40d9c77
ILT
1101Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
1102
64d5f5d0
ILT
1103 Handle Alpha ECOFF changes in OSF/1 3.2.
1104 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
1105 field.
1106 * coff-alpha.c: Include "aout/ar.h".
1107 (alpha_ecoff_get_relocated_section_contents): Don't require an
1108 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
1109 3.2 doesn't generate one.
1110 (alpha_relocate_section): Likewise.
1111 (alpha_ecoff_slurp_armap): Define.
1112 (alpha_ecoff_slurp_extended_name_table): Define.
1113 (alpha_ecoff_construct_extended_name_table): Define.
1114 (alpha_ecoff_truncate_arname): Define.
1115 (alpha_ecoff_write_armap): Define.
1116 (alpha_ecoff_generic_stat_arch_elt): Define.
1117 (alpha_ecoff_update_armap_timestamp): Define.
1118 (ARFZMAG): Define.
1119 (alpha_ecoff_read_ar_hdr): New static function.
1120 (alpha_ecoff_get_elt_at_filepos): New static function.
1121 (alpha_ecoff_openr_next_archived_file): New static function.
1122 (alpha_ecoff_get_elt_at_index): New static function.
1123 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
1124 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
1125 _bfd_ecoff to alpha_ecoff.
1126 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
1127 field from backend structure, rather than always calling
1128 _bfd_get_elt_at_filepos.
1129 * coff-mips.c (mips_ecoff_backend_data): Initialize
1130 get_elt_at_filepos field.
1131 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
1132 from _bfd_generic_read_ar_hdr with minor changes.
1133 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
1134 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
1135 * libbfd.h: Rebuild.
1136
1137 * bfd-in.h (BFD_IN_MEMORY): Define.
1138 * libbfd-in.h (struct bfd_in_memory): Define.
1139 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
1140 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
1141 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
1142 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
1143 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
1144 (bfd_get_size): Handle BFD_IN_MEMORY flag.
1145 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
1146 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
1147 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
1148 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
1149 iostream.
1150 (bfd_openstreamr): Likewise.
1151 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
1152 BFD_IN_MEMORY is not set.
1153 * riscix.c (riscix_some_aout_object_p): Likewise.
1154 * bfd-in2.h, libbfd.h: Rebuild.
1155
1156 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
1157 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
1158 (bfd_get_elt_at_index): Define.
1159 * archive.c (_bfd_generic_get_elt_at_index): Rename from
1160 bfd_get_elt_at_index. Change index parameter from int to
1161 symindex.
1162 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
1163 (_bfd_noarchive_get_elt_at_index): Define.
1164 (_bfd_archive_bsd_get_elt_at_index): Define.
1165 (_bfd_archive_coff_get_elt_at_index): Define.
1166 * bfd-in2.h, libbfd.h: Rebuild.
1167 * aout-target.h (MY_get_elt_at_index): Define if not defined.
1168 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
1169 * ieee.c (ieee_get_elt_at_index): Define.
1170 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
1171 * oasys.c (oasys_get_elt_at_index): Define.
1172 * som.c (som_get_elt_at_index): Define.
1173
c40d9c77
ILT
1174 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
1175 numbers to the .text section.
1176
efa77952
ILT
1177Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
1178
1179 * ieee.c (ieee_write_debug_part): Change return type to boolean.
1180 If there is a SEC_DEBUGGING section, get the contents of the debug
1181 information part from it.
1182 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
1183 section in memory.
1184 (ieee_write_object_contents): Check ieee_write_debug_part return.
1185
767f22d5
FF
1186Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
1187
1188 * config.bfd (i[345]86-*-freebsd*): Add target.
1189 * configure.in (i386freebsd_vec): Add vec.
1190 * configure: Regenerate.
1191 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
1192 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
1193 Rebuild dependencies..
1194 * freebsd.h: New file.
1195 * i386freebsd.c: New file.
1196 * targets.c (i386freebsd_vec): Declare.
1197 (bfd_target_vector): Add i386freebsd_vec.
1198 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1199 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
1200
f8254a3c
ILT
1201Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
1202
1203 * ieee.c (ieee_slurp_debug): New static function.
1204 (ieee_object_p): Call it.
1205 (ieee_slurp_section_data): Skip debugging sections.
1206 (ieee_get_reloc_upper_bound): Likewise.
1207 (ieee_get_section_contents): Likewise.
1208 (ieee_canonicalize_reloc): Likewise.
1209 (ieee_write_section_part): Likewise.
1210 (ieee_write_debug_part): Likewise.
1211 (ieee_write_data_part): Likewise.
1212 (init_for_output): Likewise.
1213
07a159db
MM
1214Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
1215
1216 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
1217 work.
1218 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
1219 relocs, since ppc_elf_relocate_section handles the linker case.
1220 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
1221 used.
1222 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
1223 ppc_elf_relocate_section since that is now the only caller.
1224 (ppc_elf_relocate_section): Ditto.
1225
d812945a
ILT
1226Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
1227
1228 * coffcode.h (coff_write_object_contents): If we don't know the
1229 section of the entry point for an XCOFF executable, always set the
1230 entry address to -1.
1231
3a56d0b4
MM
1232Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1233
1234 * elf.c (bfd_section_from_shdr): Add support for note sections.
1235
c4406e50
ILT
1236Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
1237
d812945a
ILT
1238 * bfd-in.h (struct _symbol_info): Add stab_type field.
1239 * bfd-in2.h: Rebuild.
1240 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
1241
c4406e50
ILT
1242 * elf32-ppc.c: Remove trailing newline from calls to
1243 _bfd_error_handler.
1244 (ppc_elf_merge_private_bfd_data): Only warn about endianness
1245 difference if target endianness is known.
1246
08556813
MM
1247Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1248
1249 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
1250 old style TOC16 references without using R_PPC_GOT.
1251 (ppc_reloc_type): Ditto.
1252 (ppc_elf_reloc_type_lookup): Add support for TOC16.
1253 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
1254 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
1255 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
1256 (ppc_elf_check_relocs): New function for GOT/PLT support that is
1257 work in progress.
1258 (ppc_elf_adjust_dynamic_symbol): Ditto.
1259 (ppc_elf_adjust_dynindx): Ditto.
1260 (ppc_elf_size_dynamic_sections): Ditto.
1261 (ppc_elf_finish_dynamic_symbol): Ditto.
1262 (ppc_elf_finish_dynamic_sections): Ditto.
1263 (ELF_DYNAMIC_INTERPRETER): Define.
1264
86587dd4
KR
1265Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
1266
1267 * elf.c (copy_private_bfd_data): When attaching sections to
1268 segments ignore sections that won't be allocated. Patch from
1269 Andreas Schwab.
1270
bf7f243f
KR
1271Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
1272
1273 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
1274 anything else.
1275
d9518e2e
ILT
1276Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
1277
1278 * coff-i960.c (CALC_ADDEND): Define.
1279 (coff_i960_relocate_section): Add the input section VMA to the
1280 addend for PC relative relocs.
1281
1282Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
1283
1284 * peicode.h (pe_print_pdata): Must test the entire entry for zero
1285 to correctly terminate.
1286
010a405a
ILT
1287Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
1288
dc092b6b
ILT
1289 * targets.c (enum bfd_endian): Define.
1290 (bfd_target): Rename byteorder_big_p to byteorder, and change it
1291 from boolean to enum bfd_endian. Change header_byteorder_big_p
1292 correspondingly.
1293 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
1294 (bfd_header_big_endian, bfd_header_little_endian): New macros.
1295 * bfd-in2.h: Rebuild.
1296 * All targets: Change initialization of byteorder and
1297 header_byteorder to use enum bfd_endian values rather than
1298 booleans.
1299 * All files: Change all references to byteorder_big_p and
1300 header_byteorder_big_p to use new bfd_*_endian macros.
1301
010a405a
ILT
1302 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
1303 s_vaddr.
1304 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
1305 vma.
1306 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
1307
fcb43906
SC
1308Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
1309
1310 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
1311
0d709d31
ILT
1312Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
1313
14578105
ILT
1314 * ieee.c: Lots of minor cleanups. Make many functions return
1315 errors rather than calling abort. Also:
1316 (ieee_write_twobyte): Remove; change callers to call existing
1317 ieee_write_2bytes function.
1318 (ieee_write_expression): Don't output the section twice when
1319 outputting a local symbol. Don't emit an extraneous zero if there
1320 is only one term.
1321 (ieee_slurp_sections): Set the lma as well as the vma.
1322 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
1323
0d709d31
ILT
1324 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
1325 a recognized one or bfd_arch_unknown.
1326 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
1327 to succeed.
1328 (ihex_get_symtab): Likewise.
1329
14dc2f77
ILT
1330Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
1331
1332 * aoutx.h: Include <ctype.h>.
1333 (struct aout_link_includes_table): Define.
1334 (struct aout_link_includes_totals): Define.
1335 (struct aout_link_includes_entry): Define.
1336 (aout_link_includes_lookup): Define macro.
1337 (struct aout_final_link_info): Add includes field.
1338 (aout_link_includes_newfunc): New static function.
1339 (NAME(aout,final_link)): Initialize includes hash table.
1340 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
1341
480ccad5
SS
1342Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
1343
1344 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
1345
3920d9c9
KK
1346Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
1347
1348 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
1349
207345f2
KK
1350Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
1351
1352 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
1353 (pe_print_private_bfd_data): call pe_print_reloc.
1354 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
1355 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
1356 up some debugging as well.
1357
273c019e
ILT
1358Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
1359
1360 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
1361 <rfg@monkeys.com>.
1362
010d9f2d
ILT
1363Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
1364
1365 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
1366 when setting sections to NULL.
1367
4a4a66bd
ILT
1368Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
1369
1370 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
1371 field.
1372 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
1373 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
1374 for all symbols.
1375 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
1376 * bfd-in2.h: Rebuild.
1377
545bf026
KK
1378Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
1379
1380 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
1381
1f4ae0d6
ILT
1382Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
1383
55cac920
ILT
1384 * ihex.c (ihex_scan): Handle record types 4 and 5.
1385 (ihex_object_p): Permit types 4 and 5.
1386 (ihex_set_section_contents): Remove check for out of range
1387 addresses.
1388 (ihex_write_object_contents): Generate types 4 and 5.
1389
1f4ae0d6
ILT
1390 * elflink.h (elf_link_output_extsym): Just ignore warning and
1391 indirect references to symbols which don't really exist.
1392
53d45489
KK
1393Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
1394
1395 * peicode.h (pe_print_idata): Minor format fixes
1396 (pe_print_edata): New function. Under private printing, this formats
1397 the edata section of a PE file.
1398 (pe_print_private_bfd_data): Added call to pe_print_edata.
1399
361e8876
DE
1400Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
1401
1402 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
1403 index, don't call stoi.
1404
58142f10
ILT
1405Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
1406
ffd15489
ILT
1407 * srec.c (srec_scan): Set lma as well as vma.
1408
1409 * ihex.c: New file; support for Intel Hex format.
1410 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
1411 (ihex_vec): Declare.
1412 (bfd_target_vector): Always include ihex_vec.
1413 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
1414 * Makefile.in: Rebuild dependencies.
1415 (BFD_LIBS): Add ihex.o
1416 (BFD_LIBS_CFILES): Add ihex.c.
1417 * bfd-in2.h: Rebuild.
1418
ae0a6bea
ILT
1419 * elf.c (assign_file_positions_for_segments): Sort the sections in
1420 each segment.
1421 (get_program_header_size): Return the right size if segment_map is
1422 not NULL.
1423 (copy_private_bfd_data): Don't bother to sort the sections.
1424
1425 * bfd.c (bfd_record_phdr): New function.
1426 * bfd-in.h (bfd_record_phdr): Declare.
1427 * bfd_in2.h: Rebuild.
1428
ce0ee4bf
ILT
1429 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
1430 BFD_ASSERT.
1431
58142f10
ILT
1432 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
1433 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
1434 bfd_size_type.
1435 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
1436 (bfd_zmalloc): Change declaration.
1437 * libbfd.h: Rebuild.
1438 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
1439 and realloc. Don't set bfd_error_no_memory if they fail.
1440
59066248
KK
1441Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
1442
1443 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
1444 uses as well. Added a new howto to deal with TOCREL16 relocs that
1445 are TOCDEFN as well.
1446 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
1447 to handle RVA relocs from dlltool.
1448 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
1449 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
1450 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
1451
1452 * coffcode.h (coff_set_alignment_hook): check idata$X sections
1453 to get the right section alignment.
1454
6933148a
ILT
1455Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
1456
1457 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
1458 p_paddr if p_paddr is zero.
1459 (make_mapping): Set includes_filehdr and includes_phdrs for first
1460 PT_LOAD segment.
1461 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
1462 segment.
1463 (assign_file_positions_for_segments): Handle includes_filehdr and
1464 includes_phdrs. Remove special handling of PT_PHDR and first
1465 PT_LOAD segments.
1466 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
1467 when appropriate. Remove special handling of PT_PHDR segment.
1468 Use a more complex condition for when a section is included in a
1469 segment to handle Solaris linker oddities.
1470
f62fed1c
ILT
1471Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
1472
1473 * coff-m88k.c (howto_table): Reformatted for easier reading;
1474 special_function now points to new function m88k_special_reloc.
1475 (howto_hvrt16): Function previously used for handling HVRT16 relocs
1476 removed.
1477 (rtype2howto): Do not add reloc's r_offset to the addend, this will
1478 be done correctly by m88k_special_reloc.
1479 (reloc_processing): New function to be used by RELOC_PROCESSING.
1480 (RELOC_PROCESSING): Define to call reloc_processing.
1481
64ecde46
ILT
1482Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
1483
b00c57ec
ILT
1484 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
1485 (pe_print_pdata): Likewise.
1486
a9713b91
ILT
1487 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
1488 obstack_alloc fails.
1489 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
1490 fails.
1491 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
1492 * Many files: don't set bfd_error_no_memory if one of the above
1493 routines fails.
1494
3dbf33ee
ILT
1495 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
1496 if p_paddr_valid is set.
1497 (copy_private_bfd_data): New static function.
1498 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
1499
44ef8897
ILT
1500 * elf.c (assign_file_positions_for_segments): Fix case where extra
1501 program headers were allocated.
1502
27fb8f29
ILT
1503 * elf.c (_bfd_elf_print_private_bfd_data): New function.
1504 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
1505 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
1506 _bfd_elf_print_private_bfd_data.
1507
64ecde46
ILT
1508 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
1509 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
1510 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
1511 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
1512 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
1513 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
1514 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
1515
fd0198f0
ILT
1516Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
1517
1518 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
1519 * elf.c (make_mapping): New static function.
1520 (map_sections_to_segments): New static function.
1521 (elf_sort_sections): New static function.
1522 (assign_file_positions_for_segments): New static function.
1523 (map_program_segments): Remove.
1524 (get_program_header_size): Remove sorted_hdrs, count, and
1525 maxpagesize parameters. Simplify.
1526 (assign_file_positions_except_relocs): When generating an
1527 executable, use assign_file_positions_for_segments.
1528 (elf_sort_hdrs): Remove.
1529 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
1530 to get_program_header_size.
1531
3b3f7625
ILT
1532Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
1533
1ff0461b
ILT
1534 * hp300hpux.c (MY(callback)): Set lma as well as vma.
1535
80c8485c
ILT
1536 * configure, config.in: Regenerate with autoconf 2.7.
1537
3b3f7625
ILT
1538 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
1539 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
1540
fa63d1ef
ILT
1541Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
1542
a877f591
ILT
1543 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
1544 (ecoff_sec_to_styp_flags): Likewise.
1545 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
1546 (ecoff_set_symbol_info): Handle scRConst.
1547 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
1548 (ecoff_compute_section_file_positions): Handle .rconst section.
1549 (_bfd_ecoff_write_object_contents): Likewise.
1550 (ecoff_link_check_archive_element): Handle scRConst.
1551 (ecoff_link_add_externals): Likewise.
1552 (ecoff_link_write_external): Handle .rconst section.
1553 (ecoff_reloc_link_order): Likewise.
1554 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
1555 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
1556 section.
1557 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
1558
fa63d1ef
ILT
1559 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
1560 DEF_DYNAMIC flag is set.
1561
25bada65
KR
1562Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
1563
1564 * host-aout.c: If TRAD_HEADER is defined, include it.
1565
7938b4cb
ILT
1566Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
1567
85e493f0
ILT
1568 * aclocal.m4 (AC_PROG_CC): Remove local definition.
1569 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
1570 (BFD_NEED_DECLARATION): New function.
1571 * configure.in: Use BFD_NEED_DECLARATION.
bd77213b
ILT
1572 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
1573 * configure, config.in: Rebuild with autoconf 2.6.
85e493f0 1574
83dcdc61
ILT
1575 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
1576 special_sections before returning when called with a non XCOFF
1577 BFD.
1578
7938b4cb
ILT
1579 * coffgen.c (coff_renumber_symbols): Sort common symbols with
1580 global symbols.
1581
1582 * coffcode.h (coff_compute_section_file_positions): Only pad the
1583 previous section to force file alignment when creating an
1584 executable.
1585
b5403ad7
ILT
1586Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
1587
a418e05d
ILT
1588 * coffcode.h (coff_compute_section_file_positions): If
1589 RS6000COFF_C, set up the .debug section.
1590
b5403ad7
ILT
1591 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
1592 if it is not large enough to accomodate the entire TOC area with
1593 signed 16 bit offsets.
1594 (xcoff_write_global_symbol): Handle negative TOC offsets in global
1595 linkage code.
1596 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
1597 TOC anchor to use the TOC value used in the output file.
1598
90a7abbc
ILT
1599Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
1600
1601 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
1602 (_bfd_coff_read_string_table): Likewise.
1603
177b1932
DE
1604Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
1605
1606 * pe-arm.c: Fix typos.
1607 * coff-arm.c: Likewise.
1608
1609Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
1610
1611 * coff-ppc.c (list_ele): Added "cat"egory member.
1612 (record_toc): New category parameter (priv or pub).
1613 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
1614 (ppc_process_before_allocation): Removed embrionic data-in-toc from
1615 the mainline. It addes extra toc cells in error.
1616 (ppc_coff_swap_sym_in_hook): Added some documentation.
1617 (dump_toc): Can now diagnose "virtual toc" chicanery.
1618
e34314c4
ILT
1619Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
1620
1621 * elf-bfd.h (struct elf_link_hash_table): Change type of
1622 dynsymcount and bucketcount fields from size_t to bfd_size_type.
1623
73a68447
ILT
1624Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
1625
535e9e29
ILT
1626 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
1627 pointerize C_LEAFSTAT or C_LEAFEXT entries.
1628
73a68447
ILT
1629 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
1630 DT_INIT and DT_FINI entries if the _init or _fini symbol is
1631 defined or mentioned in a regular file.
1632
cd2b2402
KK
1633Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
1634
1635 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
1636 (coff_ppc_relocate_section): Handle TOCDEFN attribute
1637 (coff_ppc_relocate_section): Correct REL24 handling
1638 (ppc_process_before_allocation): Correct TOCDEFN handling
1639
1640 * peicode.h (dir_names): Added name descriptions
1641
b218076e
KR
1642Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
1643
1644 * VERSION: Updated to cygnus-2.6.
1645
1646Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
1647
1648 * targets.c (m68k4knetbsd_vec): Declare.
1649
e9f30616
ILT
1650Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
1651
1652 * targets.c (bfd_target): Change type of second argument to
1653 _bfd_print_private_bfd_data from void * to PTR.
1654 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
1655 using PTR rather than void *.
1656 * bfd-in2, libbfd.h: Rebuild.
1657 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
1658 to PTR.
1659 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
1660 _bfd_generic_bfd_print_private_bfd_data rather than casting
1661 bfd_true.
1662
ae75c4a4
KR
1663Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
1664
1665 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
1666 "DO NOT DELETE" lines or blank lines that mkdep writes on some
1667 systems.
1668 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
1669 BFD64_BACKENDS_CFILES): New variables.
1670 (CFILES): Use them.
1671
bebcd3db
ILT
1672Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
1673
4b71e164
ILT
1674 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
1675 not at the file position of the first section.
1676 * coffcode.h (coff_compute_section_file_positions): Avoid using
1677 unportable #elif.
1678 (coff_write_object_contents): When generating a PPC PE executable
1679 with no symbols, round up the file size to a COFF_PAGE_SIZE
1680 boundary.
1681 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
1682 don't write out a string table.
1683
631b10f4
ILT
1684 * elf.c (bfd_section_from_shdr): When using a different section
1685 header, pass the new one to _bfd_elf_make_section_from_shdr.
1686 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
1687 (elf_map_symbols): Add section VMA to symbol value when comparing
1688 against 0.
1689 (_bfd_elf_compute_section_file_positions): Only build symbol table
1690 if there are some symbols. Set file offset of symtab and strtab
1691 sections.
1692 (assign_file_positions_except_relocs): Remove dosyms parameter.
1693 Change all callers. Never set file offset of symtab and strtab
1694 sections.
1695 (_bfd_elf_copy_private_section_data): New function.
1696 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
1697 (_bfd_elf_copy_private_symbol_data): New function.
1698 (swap_out_syms): Check for special mapping of st_shndx created by
1699 copy_private_symbol_data.
1700 * elfxx-target.h: Use new copy routines.
1701 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
1702 (_bfd_elf_copy_private_section_data): Declare.
1703
1704 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
1705
1706 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
1707 C_NT_WEAK.
1708
bebcd3db
ILT
1709 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
1710 _bfd_dummy_target, matching the recent change to archive
1711 recognition.
1712
7ad4ba81
ILT
1713Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
1714
afa67334
ILT
1715 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
1716 arithmetic on PTR types.
1717
f2bd8915
ILT
1718 * aout-target.h (MY(callback)): Set the lma of the sections.
1719
7ad4ba81
ILT
1720 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
1721 symbol into a reloc against the section.
1722
93b6a3f8
KK
1723Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
1724
1725 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
1726 glue for the relocs: IMGLUE and IFGLUE.
1727 (record_toc): new function - tracks toc contents
1728 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
1729 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
1730 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
1731 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
125d37c4 1732 (ppc_record_toc_entry): Removed a debug define (duh)
93b6a3f8
KK
1733
1734 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
1735 (pe_print_idata): New function - formats the idata section data
1736 (pe_print_pdata): New function - formats the pdata section data
1737 (pe_print_private_bfd_data): calls to above
1738
c769947b
SS
1739Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
1740
1741 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
1742 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
1743 TARGET_SYM and TARGET_NAME for vector and BFD name.
1744 * coff-pmac.c (pmac_xcoff_vec): Remove.
1745 (TARGET_SYM, TARGET_NAME): Define.
1746 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
1747 machine to 0, not all PowerMacs are 601s.
1748
1749Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
1750
1751 * elfcode.h (elf_object_p): Read in any program headers.
1752 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
1753 based on the program headers, if any.
1754 (elf_fake_sections): Set sh_addr from the vma, not the lma.
1755 (map_program_segments): Set p_paddr of program headers based on
1756 the lma.
1757
ee174815
ILT
1758Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
1759
839087b7
ILT
1760 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
1761 failure.
1762
922530a6
ILT
1763 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
1764 trying to do a relocateable link with a non-a.out object file.
1765
1766 * archive.c (bfd_generic_archive_p): Check the first object file
1767 in an archive even if target_defaulted is set. If the object file
1768 has the wrong xvec, reject it.
1769
a1774c51
ILT
1770 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
1771 be represented, report the name via _bfd_error_handler.
1772 (translate_to_native_sym_flags): Likewise.
1773 * elf32-mips.c (mips_elf_final_link): Likewise.
1774 * oasys.c (oasys_write_sections): Likewise.
1775
4a378b13
ILT
1776 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
1777 which checks for STYP_OVRFLO sections.
1778 (coff_compute_section_file_positions): If RS6000COFF_C, handle
1779 reloc and lineno count overflows.
1780 (coff_write_object_contents): Call coff_count_linenumbers before
1781 coff_compute_section_file_positions. If RS6000COFF_C, handle
1782 reloc and lineno count overflows.
1783 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
1784 relocs before dealing with .pad sections. Count overflow section
1785 headers when handling .pad sections.
1786
7906bf87
ILT
1787 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
1788 if RS6000COFF_C.
1789
ee174815
ILT
1790 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
1791 (struct xcoff_link_hash_table): Add descriptor_section and
1792 special_sections fields.
1793 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
1794 (xcoff_link_add_symbols): Set linkage section alignment. Create
1795 descriptor section. Check for magic symbol names (_text, etc.),
1796 and record them in special_sections if found. Set
1797 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
1798 descriptor field to point back to the function code symbol.
1799 (xcoff_sweep): Always mark the special descriptor_section.
1800 (bfd_xcoff_export_symbol): Check whether the symbol might be a
1801 function descriptor, and mark it if it is.
1802 (bfd_xcoff_size_dynamic_sections): Add new special_sections
1803 parameter, and fill it in. Allocate space for the descriptor
1804 section.
1805 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
1806 global linkage code. If an undefined function descriptor is
1807 exported, arrange to define it. Warn about any other undefined
1808 exported symbol.
1809 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
1810 (xcoff_write_global_symbol): Create a function descriptor when
1811 necessary.
1812 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
1813 * bfd-in2.h: Rebuild.
1814
0e829f18
KK
1815Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
1816
1817 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
1818 (ppc_coff_link_hash_table): new types for hashing
1819 (ppc_coff_link_hash_newfunc): hash entry constructor
1820 (ppc_coff_link_hash_table_init): hash table initializer
1821 (ppc_coff_link_hash_table_create): hash table constructor
1822 (ppc_record_toc_entry): changed references to hash table
1823 (coff_ppc_relocate_section): changed references to hash table
1824
1825 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
1826 * libcoff.h: Rebuild
1827
1828 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
1829 (coff_link_add_symbols): removed toc_offset init
1830
7ac84736
KR
1831Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
1832
b27cc4bc
KR
1833 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
1834 first.
1835
7ac84736
KR
1836 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
1837 if it is given and mmep is available.
1838 * acconfig.h: Undef USE_MMAP.
1839 * configure, config.in: Regenerated.
1840 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
1841 table handling the old way.
1842 (aout_get_external_symbols): Don't complain if last byte of string
1843 table is nonzero.
1844 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
1845 (bfd_free_window) [! USE_MMAP]: Don't define.
1846 (bfd_get_file_window,
1847 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
1848
1b3b0c03
ILT
1849Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
1850
1851 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
1852 0xffff0000.
1853
092abcdf
ILT
1854Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
1855
33698029
ILT
1856 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
1857 compatible with AMD generated COFF files. Try to support both AMD
1858 and GNU formats simultaneously.
1859 (coff_a29k_relocate_section): Likewise.
1860
0bb8ff19
ILT
1861 * libbfd.c (bfd_get_file_window): Change writable parameter from
1862 int to boolean; update all callers. Pass MAP_SHARED if not
1863 writable--it's required on Solaris. Cast fprintf argument to
1864 avoid warning.
1865 * bfd-in.h (bfd_get_file_window): Update declaration.
1866 * bfd-in2.h: Rebuild.
1867 * aoutx.h: Update calls to bfd_get_file_window.
1868
0634a431
ILT
1869 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
1870 Change all uses.
1871 (xcoff_swap_ldhdr_in): New static function.
1872 (xcoff_swap_ldsym_in): New static function.
7812bf9c 1873 (xcoff_find_reloc): Handle the case of a single reloc correctly.
0634a431
ILT
1874 (xcoff_link_add_symbols): If we just created a descriptor, pass it
1875 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
417acf22 1876 Handle XTY_ER/XMC_XO symbols correctly.
0634a431
ILT
1877 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
1878 rather than normal symbol table.
417acf22
ILT
1879 (bfd_xcoff_import_symbol): It's not an error if the symbol is
1880 already defined with the same absolute value.
0634a431
ILT
1881 (xcoff_mark): When considering called symbols, check whether the
1882 descriptor is from a dynamic object, rather than the symbol
1883 itself.
1884 (xcoff_build_ldsyms): Likewise.
1885
092abcdf
ILT
1886 * libbfd.c (bfd_get_file_window): Change return type to boolean.
1887 Cast realloc and malloc return values. If malloc or realloc fail,
1888 set bfd_error_no_memory.
1889 * bfd-in.h (bfd_get_file_window): Change type to boolean.
1890 * bfd-in2.h: Rebuild.
1891
d6f41a7d
KK
1892Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
1893
1894 * coff-ppc.c (ppc_record_toc_entry): new function.
1895 (in_reloc_p): changed return value.
1896 (coff_ppc_relocate_section): much rework.
1897 (ppc_allocate_toc_section): new function.
1898 (ppc_process_before_allocation): new function.
1899 (ppc_coff_swap_sym_in_hook): new function.
1900
1901 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
1902 (coff_link_add_symbols): initialize toc_offset.
1903
1904 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
1905 (coff_swap_aouthdr_out): Added more sections to the data
1906 dictionary for the pe file header. Also changed linker version
1907 number on the ppc side.
1908 (dir_names): small improvements to the dictionary printing.
1909 (pe_mkobject_hook): save the file level flags.
1910
1911 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
1912 (pe_tdata): added real_flags field
1913 (coff_tdata): added local_toc_sym_map and access macro
1914
1915 * libcoff.h (coff_link_hash_entry): added toc_offset field
1916 (pe_tdata): added real_flags field
1917 (coff_tdata): added local_toc_sym_map and access macro
1918
1919 * coffcode.h (coff_set_alignment_hook): added hook for PE.
1920 (coff_mkobject): init for local_toc_sym_map
1921 (coff_write_object_contents): set the internal_a.magic to
1922 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
1923 ppc compilers use.
1924
6bc200f2
ILT
1925Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
1926
c0971298
ILT
1927 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
1928 entries until both the line number address and the function name
1929 address are too large.
1930
6a468850
ILT
1931 * configure.in: Call AC_CHECK_PROG to find and cache AR.
1932 * configure: Rebuilt.
1933
6bc200f2
ILT
1934 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
1935 is defined in the environment.
1936
c44bf94c
JL
1937Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
1938
1939 * som.c (som_get_section_contents_in_window): Define to use
1940 generic version.
1941
cf587de8
ILT
1942Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
1943
1944 * coff-i860.c: New file, based on coff-i386.c.
1945 * cpu-i860.c: New file, based on cpu-i386.c.
1946 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
1947 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
1948 targets, using i860coff_vec.
1949 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
1950 trad-core.o and hosts/i860mach3.h.
1951 (i860coff_vec): Use coff-i860.o and cofflink.o.
1952 * configure: Rebuild.
1953 * Makefile.in: Rebuild dependencies.
1954 (ALL_MACHINES): Add cpu-i860.o.
1955 (BFD32_BACKENDS): Add coff-i860.o.
1956 (CFILES): Add cpu-i860.c and coff-i860.c.
1957 * targets.c (i860coff_vec): Declare.
1958 (bfd_target_vector): Add &i860coff_vec.
1959 * archures.c (bfd_i860_arch): Declare.
1960 (bfd_archures_list): Add &bfd_i860_arch.
1961 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
1962 (coff_set_flags): Handle bfd_arch_i860.
1963 (coff_write_object_contents): Handle I860 a.out magic number.
1964
83c23fca
ILT
1965Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
1966
1967 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
1968 the created .tc section to 2.
1969 (xcoff_mark): Don't keep a .loader reloc for a call to an
1970 undefined symbol when creating a shared library.
1971 (xcoff_build_ldsyms): When creating a shared library, generate
1972 global linkage code for a call to an undefined symbol.
1973
5d9eb9c3
KR
1974Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
1975
1976 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
1977 BFD32_BACKENDS, BFD64_BACKENDS.
1978 (.dep1): Put mkdep output in a separate file.
1979 Rebuilt dependencies.
1980
ffacb892
KR
1981 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
1982 value.
1983
4fe6d901
KR
1984 Permit use of mmap when available:
1985
1986 * configure.in: Check for mmap, madvise, mprotect.
1987 * config.in, configure: Regenerated.
1988
1989 * libbfd.c (struct _bfd_window_internal): Define type.
1990 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
1991 functions.
1992 (ok_to_map): New static variable for debugging.
1993 (_bfd_generic_get_section_contents_in_window): New function.
1994 * bfd-in.h (bfd_window_internal): Declare type.
1995 (bfd_window): Define type.
1996 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
1997 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
1998 Declare.
1999
2000 * libaout.h (struct aoutdata): Add two window fields.
2001 (obj_aout_sym_window, obj_aout_string_window): New macros.
2002 * aoutx.h (some_aout_object_p): Initialize windows.
2003 (aout_get_external_symbols): Get symbol data and strings in
2004 windows instead of explicitly allocated buffers.
2005 (slurp_symbol_table): Free window instead of memory.
2006 (bfd_free_cached_info): Release windows instead of freeing storage
2007 directly.
2008 (aout_link_free_symbols): Ditto.
2009
2010 * targets.c (bfd_target): Add new field for
2011 get_section_contents_in_window.
2012 (BFD_JUMP_TABLE_GENERIC): Updated.
2013 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
2014 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
2015 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
2016 macros for get_section_contents_in_window field.
2017
d9e771e3
FF
2018Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
2019
2020 * core.c: Renamed to corefile.c
2021 * makefile.dos (OBJS): Change core.o to corefile.o
2022 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
2023
bf917766
SG
2024start-sanitize-gm
2025Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
2026
2027 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
2028 targ_selvecs to allow debugging under Irix-5 native.
2029
2030end-sanitize-gm
583db7a8
ILT
2031Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
2032
2033 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
2034 to o. Clobber and restore the list of new csects around the call
2035 to _bfd_generic_link_add_one_symbol, in case it wants to report a
2036 linker error and the linker wants to read the symbol table. Reset
2037 the line number count of a real section even if it has no relocs.
2038 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
2039
2040 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
2041 is too small.
2042
68aed7db
ILT
2043Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
2044
18a9609c
ILT
2045 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
2046 an undefined symbol in a shared link.
2047
68aed7db
ILT
2048 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
2049 oldtype from bfd_link_order_type to bfd_link_hash_type. From
2050 phdm@info.ucl.ac.be (Philippe De Muyter).
2051
7f82c7e1
ILT
2052Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
2053
2054 * coff-m88k.c (rtype2howto): New static function.
2055 (RTYPE2HOWTO): Use it rather than a macro definition.
2056
2057 * coffcode.h (coff_write_object_contents): set internal_a.magic
2058 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
2059
4c8b9746 2060 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
7f82c7e1
ILT
2061 define TRAD_HEADER to new file hosts/delta68.h.
2062 m88*-motorola-sysv*, however, does use ptrace-core.o.
2063 * hosts/delta68.h: New file.
2064
2065 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
2066 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
2067
619c7730
KR
2068Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
2069
2070 * i386linux.c (MY(vec)): Declare before use.
2071
73246ff8
ILT
2072Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
2073
e8d6d5d0
ILT
2074 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
2075 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
2076
b2193cc5
ILT
2077 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2078 BFD is not of the right type.
2079 (bfd_elf_get_needed_list): Likewise.
2080 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2081 * sunos.c (bfd_sunos_get_needed_list): Likewise.
2082 * xcofflink.c (XCOFF_XVECP): Define.
2083 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
2084 of the right type.
2085 (bfd_xcoff_import_symbol): Likewise.
2086 (bfd_xcoff_export_symbol): Likewise.
2087 (bfd_xcoff_link_count_reloc): Likewise.
2088 (bfd_xcoff_record_link_assignment): Likewise.
2089 (bfd_xcoff_size_dynamic_sections): Likewise.
2090
baabeb74
ILT
2091 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
2092 table index against the number of symbols for a base relative
2093 reloc.
2094
73246ff8
ILT
2095 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
2096 static function.
2097 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
2098 full_aouthdr flag here...
2099 (_bfd_xcoff_bfd_final_link): ...not here.
2100
6ab826bd
FF
2101Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
2102
2103 * libelf.h: Rename to elf-bfd.h to avoid conflict with
2104 systems that have a system <libelf.h>.
2105 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
2106 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
2107 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
2108 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
2109 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
2110 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
2111 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
2112
999cc186
ILT
2113Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
2114
0652d579
ILT
2115 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
2116 set, set BSF_WEAK in symbol. Change all callers.
2117 (ecoff_get_extr): Set weakext based on BSF_WEAK.
2118 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
2119 _bfd_generic_link_add_one_symbol.
2120 (ecoff_indirect_link_order): Check that the section tdata relocs
2121 are not NULL before using them.
2122
999cc186
ILT
2123 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
2124 define TRAD_HEADER as hosts/alphalinux.h.
2125 * configure: Rebuild.
2126 * hosts/alphalinux.h: New file.
2127 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
2128 not int.
2129
e6080520
ILT
2130Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
2131
2bd0aeb9
ILT
2132 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
2133 C_ECOMM storage classes.
2134
e6080520
ILT
2135 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
2136 of xcoff_mark.
2137 (xcoff_mark): Call xcoff_mark_symbol.
2138 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
2139 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
2140 doing it by hand.
2141 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
2142
5fe14a9f
ILT
2143Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
2144
f630a0a4
ILT
2145 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
2146 field.
2147 (xcoff_find_reloc): New static function.
2148 (xcoff_link_add_symbols): Use it.
2149 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
2150 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
2151 relocate the value of C_DECL.
2152
5fe14a9f
ILT
2153 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
2154
dff77ed7
SC
2155Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
2156
2157 * cofflink.c (_bfd_coff_generic_relocate_section): Make
2158 callback decide what goes in .relocs.
2159 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
2160 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
2161 there is one.
2162
697a8fe8
ILT
2163Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
2164
2165 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
2166 absolute section.
2167
2d7de17d
ILT
2168Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
2169
2170 * xcofflink.c: More improvements, mostly to fix handling of
2171 constructors and a few other special cases.
2172 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
2173 zero, reverting yesterday's change.
2174 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
2175 (bfd_xcoff_link_count_reloc): Declare.
2176 (bfd_xcoff_record_link_assignment): Declare.
2177 * bfd-in2.h: Rebuild.
2178
f552f751
NH
2179Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
2180
2181 * PORTING, aout-arm.c, aout-encap.c, aout-rce.c, aout-target.h,
2182 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
2183 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
2184 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
2185 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
2186 Change PAGE_SIZE to TARGET_PAGE_SIZE.
2187
2188 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
2189 format.
2190
2191 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
2192 segments includes the a.out header. See to that the magic number
2193 *always* is big-endian.
2194
2195 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
2196 m68k4k NetBSD configurations.
2197
2198 * configure.in, configure: Separate i386 & mips NetBSD
2199 configurations from other BSD ones. Don't assume DEC is the only
2200 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
2201 configurations. Add support for m68k4k NetBSD object format.
2202
2203 * libaout.h: Added M_68K4K_NETBSD magic.
6fd1f40d
NH
2204
2205 * m68k4knetbsd.c: New file.
f552f751
NH
2206
2207 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
2208
2209 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
2210 <machine/endian.h>.
2211
6fd1f40d
NH
2212 * hosts/mipsnbsd.h: New file.
2213
d6d44ef9
SG
2214start-sanitize-gm
2215Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
2216
2217 * config.bfd: Add config stuff for mips*-*-magic* to set
2218 targ_defvec to ecoff_big_vec.
2219
2220end-sanitize-gm
867d923d
ILT
2221Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
2222
2223 * xcofflink.c: Numerous changes to get closer to a working XCOFF
2224 linker.
2225 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
2226 toc_section, and entry_section fields.
2227 (struct xcoff_section_tdata): Remove ldrel_count field.
2228 * libcoff.h: Rebuild.
2229 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
2230 fields.
2231 (coff_compute_section_file_positions): If RS6000COFF_C, generate
2232 full a.out header if full_aouthdr is set in xcoff_data.
2233 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
2234 based on sections stored in xcoff_data.
2235 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
2236 fields.
aad2c618
ILT
2237 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
2238 (rs6000coff_vec): Set symbol_leading_char to '.'.
867d923d
ILT
2239 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
2240 value stored in ret rather than returning a pointer value.
2241
6bd9ffdb
MM
2242Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2243
2244 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
2245 format for now.
2246
9d14250f
JL
2247Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
2248
2249 * som.c (som_slurp_string_table): Allocate the strings with malloc
2250 since they're free'd by free_cached_info.
2251 (som_slurp_symbol_table): Similarly for the symbol table.
2252
a2bd0529
PB
2253Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
2254
2255 * Makefile.in (diststuff): Don't make headers.
2256
28a0c103
ILT
2257Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
2258
356cd465
ILT
2259 * Makefile.in: Rebuild dependencies.
2260
1edd3a7b
ILT
2261 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
2262 output_bfd is not SunOS.
2263 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
2264 non-SunOS input files.
2265
28a0c103
ILT
2266 * xcofflink.c: Extensive changes to support linking shared objects
2267 and generating a .loader section.
2268 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
b73322d9
ILT
2269 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
2270 last_symndx, and ldrel_count fields.
28a0c103
ILT
2271 * libcoff.h: Rebuild.
2272 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
2273 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
2274 is set.
2275 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
2276 (bfd_xcoff_export_symbol): Declare.
2277 (bfd_xcoff_size_dynamic_sections): Declare.
2278 * bfd-in2.h: Rebuild.
2279
aadf04f7
SS
2280Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
2281
2282 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
2283 * configure: Rebuild.
2284 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
2285 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
2286 contents.
2287 (pmac_xcoff_vec): Update to use new xcoff support.
2288 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
2289 (xcoff_write_armap): Declare buf as unsigned char.
2290 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
2291
2292 * mpw-make.sed: Generalize subdir_do edit.
2293
ddf4639b
JL
2294Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
2295
2296 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
2297 correctly. Don't initialize asect->vma.
2298
e7bedf65
KR
2299Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
2300
2301 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
2302 something a little less than the page size.
2303
2304Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
2305
2306 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
2307
3a70e298
SC
2308Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
2309
2310 * coff-i386.c (coff_i386_reloc_type_lookup): New.
2311 * coffcode.h (coff_write_object_contents): If .bss is before
2312 .data us that as data_start.
2313 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
2314 calc correct.
2315 * peicode.h (add_data_entry): Use _cooked_size of data directory.
2316 (coff_swap_outhdr_out): Hardwire in version number.
2317
5a2846e3
KR
2318Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
2319
3c3a5268
KR
2320 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
2321 major and minor to *_vno, since the former are also macros in
2322 SunOS header files. Cast result of bfd_alloc to appropriate
2323 type.
2324
5a2846e3
KR
2325 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
2326 before assigning to sec_data.
2327
0f6c885e
ILT
2328Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
2329
2330 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
2331 now relative to the section, not absolute.
2332 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
2333 get the file name when there is a N_SO directory name. When
2334 handling stabs, remember that section->vma was added to the
2335 offset.
2336
11fa6636
ILT
2337Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
2338
2339 * sunos.c (struct sunos_link_hash_table): Add needed field.
2340 (sunos_link_hash_table_create): Call bfd_release, not free.
2341 (sunos_link_hash_table_create): Initialize needed field.
2342 (sunos_add_dynamic_symbols): Record needed objects.
2343 (bfd_sunos_get_needed_list): New function.
2344 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
2345 * bfd-in2.h: Rebuild.
2346
c974e19e
SC
2347Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
2348
2349 * libcoff-in.h (pe_data_type.in_reloc_p): New.
2350
22a35f0b
ILT
2351Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
2352
54406786
ILT
2353 * bfd-in.h (struct bfd_link_needed_list): Rename from
2354 bfd_elf_link_needed_list.
2355 * bfd-in2.h: Rebuild.
2356 * elf.c, elflink.h, libelf.h: Corresponding changes.
2357
dd984644
ILT
2358 Add start at AIX linker support; no shared libraries yet.
2359 * xcofflink.c: New file.
2360 * configure.in (rs600coff_vec): Use xcofflink.o.
2361 * configure: Rebuild.
2362 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
2363 fields.
2364 (struct xcoff_section_tdata): Define.
2365 (xcoff_section_data): Define macro.
2366 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
2367 (_bfd_xcoff_bfd_link_add_symbols): Declare.
2368 (_bfd_xcoff_bfd_final_link): Declare.
2369 (_bfd_ppc_xcoff_relocate_section): Declare.
2370 * libcoff.h: Rebuild.
2371 * coff-rs6000.c: Clean up a bit.
2372 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
2373 cputype, csects, and debug_indices.
2374 (xcoff_copy_private_bfd_data): Copy cputype.
2375 (xcoff_howto_table): Rename from rs6000coff_howto_table.
2376 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
2377 (xcoff_reloc_type_lookup): Rename from
2378 rs6000coff_reloc_type_lookup.
2379 (coff_relocate_section): Define.
2380 (_bfd_xcoff_sizeof_headers): Define.
2381 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
2382 (_bfd_xcoff_bfd_relax_section): Define.
2383 (_bfd_xcoff_bfd_link_split_section): Define.
2384 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
2385 coff.
2386 * coffcode.h (coff_compute_section_file_positions): If AIX,
2387 increment sofar by SMALL_AOUTSZ if not executable.
2388 (coff_write_object_contents): If AIX, always output an a.out
2389 header; if not executable, header size of SMALL_AOUTSZ.
2390 * hash.c (struct bfd_strtab_hash): Add xcoff field.
2391 (_bfd_stringtab_init): Initialize xcoff field.
2392 (_bfd_xcoff_stringtab_init): New function.
2393 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
2394 (_bfd_stringtab_emit): In XCOFF mode, write out length.
2395 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
2396 * libbfd.h: Rebuild.
2397 * Makefile.in: Rebuild dependencies.
2398 (BFD32_BACKENDS): Add xcofflink.o.
2399 (CFILES): Add xcofflink.c.
2400
22a35f0b
ILT
2401 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
2402 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
2403 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
2404
fb417a21
MM
2405Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2406
2407 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
2408
2409Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
2410
2411 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
2412 * config.in: Regenerated.
2413
2414 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
2415 (_bfd_chunksize): New variable.
2416 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
2417 for obstack chunk size.
2418 * configure.in: Check for getpagesize.
2419 * configure: Regenerated.
2420
2421 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2422
2423 * trad-core.c (rawptr): Make it a local variable of
2424 ptrace_unix_core_file_p.
2425
b1e46369
SC
2426Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
2427
2428 * coff-arm.c (in_reloc_p): New.
2429 * coff-i386.c (in_reloc_p): New.
2430 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
2431 (coff_write_object_contents): Only set has_reloc_section
2432 if PE_IMAGE.
2433 * cofflink.c (_bfd_coff_generic_relocate_section): Call
2434 in_reloc_p to decide if reloc should be emitted.
2435 * libcoff.h (pe_data_type.in_reloc_p): New.
2436 * peicode.h (pe_mkobject): Initialize in_reloc_p.
2437
ee9f09cd
ILT
2438Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
2439
b1e46369
SC
2440 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
2441 (_bfd_coff_read_internal_relocs): Likewise.
2442 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
2443 (_bfd_coff_read_internal_relocs): Likewise.
2444
ee9f09cd
ILT
2445 * elflink.h (elf_link_add_object_symbols): Correct conditions
2446 under which type and size change warnings are issued.
2447
78b31b6b
ILT
2448Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
2449
2450 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
2451 a symbol which is not in a real section.
2452 (coff_write_native_symbol): Corresponding change.
2453
2454 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
2455 coff_link_hash_newfunc and make non-static.
2456 (_bfd_coff_link_hash_table_init): New function, broken out of
2457 _bfd_coff_link_hash_table_create.
2458 (_bfd_coff_link_hash_table_create): Use it.
2459 (process_embedded_commands): Make static.
2460 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
2461 (_bfd_coff_link_hash_table_init): Declare.
2462 * libcoff.h: Rebuild.
2463
2464 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
2465 field in XCOFF tdata.
2466 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
2467 U802ROMAGIC, for clarity. Try to set arch and machine correctly
2468 based on cputype stored in a.out header, or in n_type of initial
2469 .file symbol.
2470 (coff_write_object_contents): Set cputype correctly in a.out
2471 header.
2472 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
2473 warnings.
2474 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
2475 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
2476 old resv1 field.
2477 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
2478 * libcoff.h: Rebuild.
2479
2480 * cpu-rs6000.c (rs6000_compatible): New static function.
2481 (bfd_rs6000_arch): Use it.
2482 * cpu-powerpc.c (powerpc_compatible): New static function.
2483 (arch_info_struct): Define various flavours of PowerPC.
2484 (bfd_powerpc_arch): Use powerpc_compatible. Point at
2485 arch_info_struct.
2486
9dd7e56f
FF
2487Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
2488
78b31b6b 2489 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
9dd7e56f 2490
8235c112
ILT
2491Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
2492
2493 * elflink.h (elf_link_add_object_symbols): Don't warn about
2494 changing the size or type if the old definition was weak.
2495
0322af0d
ILT
2496Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
2497
49488f2b
ILT
2498 * coffcode.h (combined_entry_type): Add fix_line field.
2499 (coff_slurp_line_table): Warn if we try to set the lineno field of
2500 a symbol twice.
2501 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
2502 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
2503 * coffgen.c (coff_mangle_symbols): Handle fix_line.
2504 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
2505 absolute section.
2506 (coff_print_symbol): Print fix_value symbols in a useful fashion.
2507 * libcoff.h: Rebuild.
2508
5f710a3a
ILT
2509 * libcoff-in.h (struct xcoff_tdata): Define.
2510 (xcoff_data): Define.
2511 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
2512 * bfd-in2.h, libcoff.h: Rebuild.
2513 * coff-rs6000.c (xcoff_mkobject): New static function.
2514 (coff_mkobject): Define.
2515 (xcoff_copy_private_bfd_data): New static function.
2516 (coff_bfd_copy_private_bfd_data): Define.
2517 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
2518 signed to bitfield.
2519 (rs6000coff_vec): Add DYNAMIC to object_flags.
2520 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
2521 .loader sections specially.
2522 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
2523 section alignment from the XCOFF tdata information.
2524 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
2525 F_SHROBJ, and copy the extra a.out header information into the
2526 XCOFF tdata structure.
2527 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
2528 F_DYNLOAD and the extra a.out header information.
2529 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
2530 C_HIDEXT symbol with attached csect information.
2531 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
2532 in the o_maxdata field.
2533 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
2534 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
2535 end if BSF_NOT_AT_END is set.
3f2c5b2d 2536
0322af0d
ILT
2537 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
2538 _bfd_read_ar_hdr_fn.
2539 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
2540 * bfd-in2.h, libbfd.h: Rebuild.
2541 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
2542 return value.
2543 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
2544 (bfd_slurp_bsd_armap_f2): Likewise.
2545 (_bfd_slurp_extended_name_table): Likewise.
2546
3266eaff
KR
2547Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
2548
2549 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2550
2551 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
2552 when the symbol table is empty.
2553
2554 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
2555 space for section symbols, since we don't output them either.
2556 (elf_m68k_adjust_dynindx): Removed.
2557
2558 * ptrace-core.c (rawptr): Make it a local variable of
2559 ptrace_unix_core_file_p.
3266eaff 2560
249479fa
MM
2561Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2562
45b5d2f0
MM
2563 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
2564 NULL.
2565
249479fa
MM
2566 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
2567 Mac object file formats.
2568
c53fac12
ILT
2569Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
2570
4372f33f
ILT
2571 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
2572 auxent if there isn't one.
2573 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
2574 rather than FILNMLEN as the maximum name length.
2575
0fc9ada9
ILT
2576 * coffcode.h (bfd_coff_backend_data): Add new field
2577 _bfd_coff_print_aux.
2578 (bfd_coff_print_aux): New static function.
2579 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
2580 scnlen field of an XTY_LD csect aux entry.
2581 (coff_print_aux): New static function.
2582 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
2583 in coff_pointerize_aux_hook.
2584 (bfd_coff_std_swap_table): Initialize new field.
2585 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
2586 * libcoff.h: Rebuild.
2587 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2588 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2589
7860fe38
ILT
2590 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
2591 if there are symbols, for native AIX ld compatibility.
2592
c80cc833
ILT
2593 * coffcode.h (bfd_coff_backend_data): Add new field
2594 _bfd_coff_pointerize_aux_hook.
2595 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
2596 or I960, and as 0 otherwise.
2597 (bfd_coff_std_swap_table): Initialize new field.
2598 * libcoff.h: Rebuild.
2599 * coffgen.c (coff_pointerize_aux): Change parameters to take
2600 symbol pointer instead of type and class, and to take aux index.
2601 Call _bfd_coff_pointerize_aux_hook if it is defined.
2602 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
2603 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
2604 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2605
c53fac12
ILT
2606 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
2607 read-only/host-only support.
2608
2609 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
2610 BSF_LOCAL.
d11e6b52
ILT
2611 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
2612 RS6000COFF_C.
c53fac12
ILT
2613
2614 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
2615 BFD_JUMP_TABLE_ARCHIVE accordingly.
2616 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
2617 (_bfd_compute_and_write_armap): Declare.
2618 (_bfd_generic_read_ar_hdr): Declare.
2619 (_bfd_read_ar_hdr): Define.
2620 (_bfd_noarchive_read_ar_hdr): Define.
2621 (_bfd_archive_bsd_read_ar_hdr): Define.
2622 (_bfd_archive_coff_read_ar_hdr): Define.
2623 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
2624 _bfd_read_ar_hdr instead.
2625 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
2626 (_bfd_compute_and_write_armap): Rename from
2627 compute_and_write_armap. Make non-static. Change all callers.
2628 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
2629 than _bfd_snarf_ar_hdr.
2630 * aout-target.h (MY_read_ar_hdr): Define if not defined.
2631 * ieee.c (ieee_read_ar_hdr): Define.
2632 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
2633 * oasys.c (oasys_read_ar_hdr): Define.
2634 * som.c (som_read_ar_hdr): Define.
2635 * bfd-in2.h, libbfd.h: Rebuild.
2636
f8e47484
SC
2637Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
2638
2639 * peicode.c (coff_swap_filehdr_in): If symptr is
2640 zero, there aren't any symbols, even if nsyms is set.
2641
2b874a2d
ILT
2642Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
2643
aca73687
ILT
2644 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
2645 field.
2646 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
2647 sections, and set styp correctly for them: .got, .hash, .dynamic,
2648 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
2649 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
2650 types.
2651 (ecoff_sort_hdrs): New static function.
2652 (ecoff_compute_section_file_positions): Return boolean, not void.
2653 Sort the sections by VMA before looking through them. Put the
2654 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
2655 section on an appropriate boundary within the page.
2656 (ecoff_compute_reloc_file_positions): Check return value of
2657 ecoff_compute_section_file_positions.
2658 (_bfd_ecoff_set_section_contents): Likewise.
2659 (_bfd_ecoff_write_object_contents): Check for various Alpha
2660 section types when incrementing text_size and data_size. Call
2661 adjust_headers backend function if it exists.
2662 * coff-alpha.c (alpha_adjust_headers): New static function.
2663 (alpha_ecoff_backend_data): Initialize adjust_headers field.
2664 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2665
2b874a2d
ILT
2666 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
2667
c780e5db
JL
2668Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
2669
2670 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
2671 of ALTERNATE_AIX_CORE_FORMAT.
2672 * configure.in (aix4): No longer need CORE_FLAGS.
2673 * configure: Updated.
2674
2a01c351
KR
2675Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
2676
2677 NS32k changes from Ian Dall:
2678 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
2679 macros.
2680 (aout_link_input_section_std, aout_link_input_section_ext,
2681 aout_link_reloc_link_order): Call them instead of _bfd_*
2682 versions.
2683 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
2684 to zero.
2685 (backend_data): Use it instead of hardcoded zero.
2686
2687 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
2688 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
2689
2690 * ns32knetbsd.c: Include bfd.h.
2691 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
2692 (MY_bfd_reloc_type_lookup): Declare function too.
2693 * pc532-mach.c (set_sizes): Don't declare.
2694 (MY_text_includes_header, MY_exec_header_not_counted): Define.
2695 (backend_data, MY_backend_data): Don't define.
2696
2697 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
2698 ns32k-*-lites* like ns32k-*-netbsd*.
2699
2700 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
2701 compile on lites.
2702
5944d75b
ILT
2703Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
2704
2705 * coffcode.h (coff_write_object_contents): Restore setting
2706 f_timdat to 0, deleted on August 22.
2707
db344f82
SC
2708Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
2709
2710 * coffcode.h (coff_bfd_copy_private_symbol_data,
2711 coff_bfd_copy_private_section_data,
2712 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
2713 * peicode.h (coff_bfd_copy_private_bfd_data): New
2714 (pe_bfd_copy_private_bfd_data): New.
2715 (coff_swap_scnhdr_in): Swap bss size into the right place.
2716 (pe_print_private_bfd_data): Add some newlines.
5944d75b 2717
c780e5db 2718Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
97f1feda
JL
2719
2720 * som.c (setup_sections): Don't die if a space has no subspaces.
2721
3d7c42c9
ILT
2722Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
2723
2724 * elflink.h (elf_link_add_object_symbols): Don't let a weak
2725 dynamic symbol override a common symbol. Don't change the size or
2726 type if they have been set and the new symbol is not a definition.
2727 Warn if the size or type changes.
2728
c780e5db 2729Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
709af562
JL
2730
2731 * som.c (som_begin_writing): Don't write the symbol table or
2732 symbol strings.
2733 (som_finish_writing): Write them here. Place them after the
2734 subspace data, but before the relocs.
2735
2736Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
2737
2738 * sunos.c (sunos_add_one_symbol): Just pass false, not
2739 info->shared_library, to sunos_create_dynamic_sections.
2740 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
2741 section.
2742 (sunos_check_dynamic_reloc): Remove .text section assertion.
2743
7009e451
SS
2744Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
2745
2746 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
2747 * configure, configure.in: Add pmac_xcoff_vec case.
2748 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
2749 * coff-pmac.c: New file, PowerMac XCOFF support.
2750 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
2751 * targets.c (pmac_xcoff_vec): Declare.
2752
2753 * mpw-config.in: Various changes to be compatible with the
2754 autoconf-based configury.
2755 * mpw-make.sed: New file, sed commands to translate Unix
2756 makefile into MPW syntax.
2757 * mpw-make.in: Remove.
2758 * hosts/mpw.h: Remove.
2759 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
2760 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
2761
b91537be
SC
2762Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
2763
2764 * binary.c (binary_get_symtab): Return an empty string on error.
2765 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
2766
30360a6f
KK
2767Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
2768
2769 * coff-ppc.c: Reformatted according to gnu conventions
2770 Removed irrelevant "if 0" code
2771
20d1e233
ILT
2772Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
2773
69fd4fdd
ILT
2774 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
2775 symbols rather than as indirect symbols.
2776 (MY(slurp_symbol_table)): Don't do anything special about
2777 secondary symbols.
2778
46b5a892
ILT
2779 * coffcode.h (coff_new_section_hook): Make sure that the alignment
2780 of .ctors and .dtors sections is no larger than 2.
2781
9db59230
ILT
2782 * sunos.c (sunos_add_one_symbol): Don't change
2783 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
2784 undef list.
2785 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
2786 dynamic symbols when creating a shared library.
2787 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
2788 shared library.
2789 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
2790 written even if it is not defined in a regular object.
2791 (sunos_write_dynamic_symbol): Use plt_offset for the address of
2792 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
2793 rather than the constant 22.
2794 (sunos_check_dynamic_reloc): Handle creating a shared library.
2795 (sunos_finish_dynamic_link): Set the first entry in the GOT to
2796 zero when creating a shared library.
2797 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
2798 write it out at the start of the symbol table.
2799
20d1e233
ILT
2800 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
2801
a11e10fe
DE
2802Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
2803
2804 * config.bfd: Add arm-*-coff.
2805 * configure.in, configure: Add armcoff_{little,big}_vec.
2806 * targets.c (armcoff_{little,big}_vec): Declare.
2807 (bfd_target_vector): Add armcoff_{little,big}_vec.
2808 * coff-arm.c (armcoff_{little,big}_vec): Always define.
2809
99062cfc
ILT
2810Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
2811
2812 * targets.c (bfd_find_target): Remove debugging code.
2813
deacbe0f
KK
2814Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
2815
2816 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
2817 support on powerpc.
2818 * Makefile.in: added *-ppc files
2819 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
2820 allow pe based .o's to be shared with other tools on ppc/NT
2821 * config.bfd: added powerpc[le]-[pe|winnt] config support
2822 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
2823 * peicode.h: Added more section flags for PE on ppc
2824 Added coff_swap_filehdr_out to allow peicode.h to be
2825 used for non-image PE files on ppc.
2826 Check for image, or not, before copying pe_opthdr
2827 * targets.c: Added new bfd's
30360a6f
KK
2828 * targets.c: Removed two inactive bfds that shouldn't have made it this
2829 far.
deacbe0f 2830
d22b02e0
MM
2831Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2832
2833 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
2834 explicit values to initialize all relocs. Change all users.
2835 (ppc_elf_brtaken_inner): New function to handle branch predicition
2836 relocs.
2837 (ppc_elf_brtaken_reloc): Ditto.
2838 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
2839 relocs use ppc_elf_unsupported_reloc.
2840 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
2841 needs to be reported.
2842 (ppc_elf_relocate_section): Support branch prediction relocs.
2843
fcf490c0
ILT
2844Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
2845
e6cb7b41
ILT
2846 * bfd.c (bfd_assert): Remove \n from string passed to
2847 _bfd_error_handler.
2848
1af85fbb
ILT
2849 * coff-i386.c: (TWO_DATA_SECS): Don't define.
2850 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
2851 (bfd_coff_make_section_hook): Don't define.
2852 (coff_make_section_hook): Remove.
2853 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
2854 (styp_to_sec_flags): Likewise.
2855 (coff_write_object_contents): Likewise.
2856 (bfd_coff_std_swap_table): Don't initialize make_section_hook
2857 field.
2858 * libcoff.h: Rebuild.
2859 * coffgen.c (make_a_section_from_file): Just call
2860 bfd_make_section_anyway, not bfd_make_section or
2861 bfd_coff_make_section_hook.
2862 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
2863 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
2864 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
2865 make_section_hook field.
2866 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2867
fcf490c0
ILT
2868 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
2869 pointers into value field for warning and indirect symbols; just
2870 leave the value field alone.
2871 * linker.c (generic_link_add_symbol_list): Use next symbol for
2872 warning and indirect symbols, rather than looking in symbol value.
2873 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
2874 parameter. Change all callers. Remove support for indirect
2875 symbols; it didn't work anyhow.
2876 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
2877 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
2878 * bfd-in2.h: Rebuild.
2879
cc47d19a
MM
2880Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2881
2882 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
2883 go back to telling the tools this reloc operates on 32 bits.
2884
81449d47
ILT
2885Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
2886
7a7fbffb
ILT
2887 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
2888 rather than a direct fprintf.
2889 * archive.c (_bfd_write_archive_contents): Likewise.
2890 * coffcode.h (coff_slurp_symbol_table): Likewise.
2891 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
2892 (ppc_elf_unsupported_reloc): Likewise.
2893 (ppc_elf_relocate_section): Likewise.
2894 * i386linux.c (linux_tally_symbols): Likewise.
2895 (linux_finish_dynamic_link): Likewise.
2896 * osf-core.c (osf_core_core_file_p): Likewise.
2897 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
2898 * som.c (som_sizeof_headers): Likewise.
2899 * srec.c (srec_bad_byte): Likewise.
2900 * bfd.c (bfd_assert): Likewise. Also change file to be const.
2901 * libbfd-in.h (bfd_assert): Declare first parameter const.
2902 * libbfd.h: Rebuild.
2903 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
2904 bfd_reloc_overflow is enough.
2905 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
2906 * coff-h8500.c (rtype2howto): Likewise.
2907 * coff-z8k.c (rtype2howto): Likewise.
2908 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
2909 * elf.c (_bfd_elf_get_lineno): Likewise.
2910 (_bfd_elf_no_info_to_howto): Likewise.
2911 (_bfd_elf_no_info_to_howto_rel): Likewise.
2912 * hp300hpux.c (convert_sym_type): Likewise.
2913 (MY(swap_std_reloc_in)): Likewise.
2914 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
2915
f1c6dd5d
ILT
2916 * libaout.h (struct aoutdata): Add line_buf field.
2917 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
2918 and filename_buffer. Instead, use a malloc buffer stored in the
2919 new line_buf field. Remove length restrictions.
2920
f0500a41
ILT
2921 * coffgen.c (string_size): Remove static variable.
2922 (debug_string_size, debug_string_section): Likewise.
2923 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
2924 and debug_string_size_p parameters. Use them instead of the
2925 global variables. Change all callers.
2926 (coff_write_symbol): Likewise.
2927 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
2928 (coff_write_symbols): Add local variables to replace removed
2929 global variables.
2930
25b5a53d
ILT
2931 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
2932 function, and line_base fields.
2933 * libcoff.h: Rebuild.
2934 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
2935 information, rather than using static variables.
2936
641ac26a
ILT
2937 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
2938 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
2939
81449d47
ILT
2940 * init.c (initialized): Remove static variable.
2941 (bfd_init): Don't bother setting initialized.
2942 (bfd_check_init): Remove.
2943 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
2944 * libbfd.h: Rebuild.
2945
138b9b81
PS
2946Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2947
2948 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
2949 size for full core dumps. Copy core file header to private data.
2950 (rs6000coff_core_file_failing_command,
2951 rs6000coff_core_file_failing_signal): New functions to extract
2952 the file name and terminating signal from the core file.
2953 * coff-rs6000.c: Use them.
2954
2ffbb79a
ILT
2955Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
2956
2957 Change arch info to be const, initialized at compile time.
2958 * archures.c: Reindent many functions. Change CONST to const.
2959 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
2960 nothing set it anyhow. Make next const.
2961 (bfd_arch_info_list): Remove.
2962 (bfd_archures_list): Rename from archures_init_table. Change from
2963 a table of function pointers to a table of bfd_arch_info_type
2964 structure addresses.
2965 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
2966 (bfd_lookup_arch): Likewise.
2967 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
2968 const pointer.
2969 (bfd_default_arch_struct): Make const.
2970 (bfd_arch_init, bfd_arch_linkin): Remove.
2971 (bfd_get_arch_info): Return a const pointer.
2972 * init.c (bfd_init): Don't call bfd_arch_init.
2973 * bfd.c (struct _bfd): Make arch_info const.
2974 * bfd-in2.h: Rebuild.
2975 * libbfd.h: Rebuild.
2976 * configure.in: Put & before everything in $selarchs.
2977 * configure: Rebuild.
2978 * cpu-*.c: Change bfd_*_arch from a function which calls
2979 bfd_arch_linkin to a const structure.
2980 * ieee.c (ieee_object_p): Make arch const.
2981
02f85cda
MM
2982Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
2983
2984 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
2985 PowerPC V.4.
2986 * bfd-in2.h: Regenerate.
2987 * libbfd.h: Regenerate.
2988
2989 * elf32-ppc.c (reloc_type): Update names to match current draft.
2990 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
2991 relative. Update names to current V.4 draft.
2992 (ppc_elf_reloc_type_lookup): Add support for more relocations.
2993 (ppc_elf_relocate_section): Rename relocations to match draft.
2994
dd82c578
MM
2995Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
2996
2997 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
2998 compiled with -mrelocatable-lib to be linked with either normal
2999 modules or -mrelocatable modules.
3000
f69e888e
ILT
3001Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
3002
e18c4e8f
ILT
3003 * coffcode.h (coff_write_object_contents): Clear the vstamp field
3004 in the a.out header.
3005
f69e888e
ILT
3006 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
3007 a reloc against a local symbol, even if it's not a section.
3008
a5655244
ILT
3009Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
3010
3011 * targets.c (bfd_target): Remove unused align_power_min field.
3012 * bfd-in2.h: Rebuild.
3013 * All backends: Remove initialization of align_power_min.
3014
500d7394
SC
3015Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
3016
3017 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
500d7394 3018
049df0a8
ILT
3019Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
3020
3021 * config.bfd (mips-dec-netbsd*): New target.
3022 * configure.host (mips-dec-netbsd*): New host.
3023 * configure.in (mips-dec-netbsd*): New native.
3024 * configure: Rebuild.
3025
1862bbd8
ILT
3026Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
3027
3028 Make the COFF backend linker merge common types:
3029 * cofflink.c (struct coff_debug_merge_element): Define.
3030 (struct coff_debug_merge_type): Define.
3031 (struct coff_debug_merge_hash_entry): Define.
3032 (struct coff_debug_merge_hash_table): Define.
3033 (coff_debug_merge_hash_table_init): Define.
3034 (coff_debug_merge_hash_table_free): Define.
3035 (coff_debug_merge_hash_lookup): Define.
3036 (struct coff_final_link_info): Add debug_merge field.
3037 (coff_debug_merge_hash_newfunc): New static function.
3038 (_bfd_coff_final_link): Allocate and free debug_merge table.
3039 (coff_link_input_bfd): Merge identical enum, struct and union
3040 types.
3041
a208a70f
ILT
3042Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
3043
3044 Convert i960 COFF to use COFF backend linker.
3045 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
3046 structure to store the symbol being used.
3047 (coff_i960_start_final_link): New static function.
3048 (coff_i960_relocate_section): New static function.
3049 (coff_i960_adjust_symndx): New static function.
3050 (coff_start_final_link): Define.
3051 (coff_relocate_section): Define.
3052 (coff_adjust_symndx): Define.
3053 * coffcode.h (bfd_coff_backend_data): Add new callback function
3054 _bfd_coff_start_final_link.
3055 (bfd_coff_start_final_link): Define.
3056 (coff_start_final_link): Define if not defined.
3057 (bfd_coff_std_swap_table): Add coff_start_final_link.
3058 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
3059 visible.
3060 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
3061 function callback is not NULL.
3062 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
3063 (_bfd_coff_internal_syment_name): Declare.
3064 * libcoff.h: Rebuild.
3065 * configure.in (icoff_big_vec): Add cofflink.o.
3066 (icoff_little_vec): Likewise.
3067 * configure: Rebuild.
3068
f0abedbe
FF
3069Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
3070
3071 * Makefile.in (clean-info): Remove extraneous tab from line
3072 following action.
3073
aa4b3dc5
ILT
3074Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
3075
3076 * cofflink.c (coff_link_input_bfd): Fail if a section with no
3077 contents has relocs.
3078
4ca63811 3079Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
beee31b1
SC
3080
3081 * coffcode.h (coff_compute_section_file_positions): Keep the
3082 raw size safe.
3083 (coff_write_object_contents): Remember if it's a relocatable
3084 file.
3085 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
3086 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
3087 if relocatable file. Swap out saved raw size.
3088
ae115e51
ILT
3089Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
3090
9521bac3
ILT
3091 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
3092 (maintainer-clean): Rename from realclean, passing
3093 maintainer-clean down to subdirectories, but leave realclean as a
3094 synonym.
3095
4ca63811
ILT
3096 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
3097 warning callback.
3098
5aa4c3ff
ILT
3099 * dep-in.sed: Remove config.h from generated dependencies.
3100
396aaeb2
ILT
3101 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
3102 broken out of sunos_canonicalize_dynamic_symtab.
3103 (sunos_canonicalize_dynamic_symtab): Call new function
3104 sunos_slurp_dynamic_symtab.
3105 (sunos_add_dynamic_symbols): Add three new parameters. Return the
3106 dynamic symbol table to the caller.
3107 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
3108 callback to override the symbols being read.
3109 * libaout.h (struct aout_backend_data): Add three new parameters
3110 to add_dynamic_symbols callback.
3111
ae115e51
ILT
3112 Extensive minor changes to avoid various gcc warnings. Also:
3113 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
3114 * archures.c (bfd_arch_info_type): Change mach field from long to
3115 unsigned long.
3116 (bfd_lookup_arch): Change machine parameter from long to unsigned
3117 long.
3118
b088e4b2
ILT
3119Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
3120
3121 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
3122 a symbol with a non-zero plt_offset.
3123
1dff7902
ILT
3124Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
3125
2b71e1e4
ILT
3126 * elfcode.h (align_file_position): Remove; not used.
3127
1dff7902
ILT
3128 * configure.in: Only check for <sys/procfs.h> on a native system,
3129 and make sure it defines prstatus_t.
3130 * configure: Rebuild.
3131
870015b1
ILT
3132Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
3133
535c89f0
ILT
3134 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
3135
936b870c
ILT
3136 * config.in: Rename from config.h.in.
3137 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
a7873a6c 3138 Check for config.h:config.in when creating stamp-h.
936b870c 3139 * configure: Rebuild.
a7873a6c
ILT
3140 * Makefile.in (stamp-h): Depend upon config.in rather than
3141 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
3142 calling config.status.
936b870c 3143
870015b1
ILT
3144 * Makefile.in (do_distclean): Remove config.h and stamp-h.
3145 (Makefile): Just rebuild Makefile.
3146 (config.h, stamp-h): New targets.
3147 * configure.in: Create stamp-h when rebuilding config.h.
3148 * configure: Rebuild.
3149
b7577823
ILT
3150Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
3151
3152 * configure.in: Call AC_CONFIG_HEADER. Substitute
3153 HOST_64BIT_LONG. Check that various header files exist. Check
3154 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
3155 and/or free need to be declared. Don't make a link to sysdep.h.
3156 Define TRAD_HEADER for various hosts.
3157 * configure: Rebuild.
3158 * configure.host: Don't set my_host. Add definitions taken from
3159 host header files for various entries. Remove entries which now
3160 do nothing.
3161 * acconfig.h: New file.
3162 * config.h.in: New file, built by autoheader.
3163 * sysdep.h: New file.
3164 * Makefile.in (do_distclean): Don't remove sysdep.h.
3165 (RECONFIG): Remove.
3166 (LOCAL_H_DEPS): New variable.
3167 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
3168 $(RECONFIG).
3169 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
3170 ($(OPTIONAL_BACKENDS)): Likewise.
3171 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
3172 looking through sysdep.h.
3173 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
3174 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
3175 (fprintf_vma, sprintf_vma): Likewise.
3176 (int64_type, uint64_type): Don't define.
3177 * bfd-in2.h: Rebuild.
3178 * archures.c, bfd.c, srec.c: Include <ctype.h>.
3179 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
3180 * lynx-core.c: Include stuff from old hosts/lynx.h.
3181 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
3182 rather than NO_FCNTL.
3183 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
3184 rather than NATIVE_HPPAHPUX_COMPILER.
3185 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
3186 is defined.
3187 * hosts/*.h: Remove all header files which merely include,
3188 declare, and define things. Leave header files which define
3189 information needed by trad-core.c.
3190
3191 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
3192 (BFD_CC_FOR_BUILD): Define.
3193 * configure.in: Use BFD_CC_FOR_BUILD.
3194 * configure: Rebuild.
3195
7a93ebdd
ILT
3196Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
3197
4c2e4d0e
ILT
3198 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
3199 * configure: Rebuild.
3200
7a93ebdd
ILT
3201 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
3202 a global symbol.
3203
866bb9e5
JM
3204Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
3205
3206 * config.bfd: i386pe_ve -> i386pe_vec.
3207
2b79a104
ILT
3208Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
3209
f515fb2f
ILT
3210 * configure.host: Incorporate host Makefile fragments by setting
3211 shell variables.
3212 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
3213 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
3214 value based on whether the code is being compiled by a cross
3215 compiler. Don't substitute host_makefile_frag or frags.
3216 * aclocal.m4: New file to define local AC_PROG_CC.
3217 * configure: Rebuild.
3218 * Makefile.in (INSTALL): Set to @INSTALL@.
3219 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
3220 (INSTALL_DATA): Set to @INSTALL_DATA@.
3221 (AR): Set to @AR@.
3222 (CC): Define as @CC@.
3223 (CFLAGS): Set to @CFLAGS@.
3224 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
3225 (@host_makefile_frag@): Remove.
3226 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
3227 after other options.
3228 (config.status): Remove dependency upon @frags@.
3229 * config/*.mh, config/README: Remove.
3230
2b79a104
ILT
3231 * config.bfd: Rewrite to incorporate the contents of the Makefile
3232 fragments by setting shell variables, rather than merely returning
3233 the name of a Makefile fragment.
3234 * configure.in: Use shell variables set by config.bfd rather than
3235 looking at the target Makefile fragment files. Don't substitute
3236 target_makefile_frag. Do substitute TDEFINES.
3237 * configure: Rebuild.
3238 * Makefile.in (@target_makefile_frag@): Remove.
3239 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
3240 * config/*.mt: Remove.
3241
2cb159a5
KR
3242Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
3243
3244 * configure.in: Put changequote lines around "i[345]86" patterns
3245 section of core file support.
3246
ef07871c
JL
3247Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
3248
3249 * som.c (som_bfd_print_private_bfd_data): Define to use the
3250 generic version.
3251
1613e075
SC
3252Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
3253
3254 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
3255 entry, text_start and data_start.
3256
a52a3ce8
ILT
3257Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
3258
a21227ef
ILT
3259 * Makefile.in (OFILES): Remove $(TDEPFILES).
3260 * config/apollo.mt (TDEPFILES): Remove.
3261 * config/README: Update.
3262
a52a3ce8
ILT
3263 * configure.in: For a native configuration, set COREFILE and
3264 COREFLAG based on the canonical host name.
3265 * configure: Rebuild.
3266 * Makefile.in: Rebuild dependencies.
3267 (ALL_CFLAGS): Add @COREFLAG@.
3268 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
3269 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
3270 support routines. Check LYNX_CORE rather than HOST_LYNX.
3271 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
3272 * i386lynx.c: Likewise.
3273 * m68klynx.c: Likewise.
3274 * sparclynx.c: Likewise.
3275 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
3276 * *-core.c: Comment changes.
3277 * config/decstation.mh (HDEPFILES): Remove.
3278 (HDEFINES): Remove -DTRAD_CORE.
3279 * config/irix3.mh (RANLIB): Remove.
3280 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
3281 (HDEFINES): Remove -DIRIX_CORE.
3282 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
3283 (HDEFINES): Remove -DTRAD_CORE.
3284 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
3285 * config/ultra3.mh (RANLIB): Remove.
3286 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
3287 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
3288 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
3289 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
3290 * config/hppahpux.mh, config/hppaosf.mh: Remove.
3291 * config/i386aix.mh, config/i386bsd.mh: Remove.
3292 * config/i386linux.mh, config/i386mach3.mh: Remove.
3293 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
3294 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
3295 * config/mipsmach3.mh, config/news-mips.mh: Remove.
3296 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
3297 * config/rs600.mh, config/rs6000lynx.mh: Remove.
3298 * config/solaris2.mh, config/stratus.mh: Remove.
3299 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
3300 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
3301
d6f672b8
ILT
3302Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
3303
3304 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
3305 DT_FINI entry if the appropriate symbol is not in the hash table.
3306
3307 * libelf.h (struct elf_backend_data): Add create_program_headers
3308 and want_hdr_in_seg fields.
3309 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
3310 defined.
3311 (elf_backend_create_program_headers): Likewise.
3312 (elfNN_bed): Initialize create_program_headers and
3313 want_hdr_in_seg.
3314 * elf.c (get_program_header_size): Call create_program_headers
3315 backend routine.
3316 (map_program_segments): Check want_hdr_in_seg backend field. Call
3317 create_program_headers backend routine.
3318
3319 * elf.c (assign_file_positions_except_relocs): Align non allocated
3320 sections when creating an executable.
3321
3322 * elfcode.h (elf_swap_phdr_in): Make non static.
3323 (elf_swap_phdr_out): Make non static.
3324 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
3325 (bfd_elf32_swap_phdr_out): Declare.
3326 (bfd_elf64_swap_phdr_in): Declare.
3327 (bfd_elf64_swap_phdr_out): Declare.
3328
3329 * ecofflink.c (ecoff_collect_shuffle): New static function.
3330 (_bfd_ecoff_get_accumulated_pdr): New function.
3331 (_bfd_ecoff_get_accumulated_sym): New function.
3332 (_bfd_ecoff_get_accumulated_ss): New function.
3333 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
3334 (_bfd_ecoff_get_accumulated_sym): Declare.
3335 (_bfd_ecoff_get_accumulated_ss): Declare.
3336 * libbfd.h: Rebuild.
3337
0cb70568
ILT
3338Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
3339
d6f672b8
ILT
3340 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
3341
0cb70568
ILT
3342 * elflink.h (elf_link_add_object_symbols): Handle indirect and
3343 warning symbols. If any section is named .gnu.warning.XXX, treat
3344 the contents as a warning to be issued if the symbol XXX is
3345 referenced.
3346 (elf_link_output_extsym): For an indirect or warning symbol, just
3347 output the symbol it points to.
3348
3349 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
3350 if bfd_hash_allocate fails, since it will already be set.
3351 (generic_link_hash_newfunc): Likewise.
3352 (archive_hash_newfunc): Likewise.
3353 (hash_entry_bfd): New static function.
3354 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
3355 callback. Allocate a new warning using the hash table newfunc.
3356 Use bfd_hash_replace to update the entry in the hash table, rather
3357 than assuming we can copy the fields with structure assignment.
3358
3359 * hash.c (bfd_hash_replace): New function.
3360 * bfd-in.h (bfd_hash_replace): Declare.
3361 * bfd-in2.h: Rebuild.
3362
f14db880
JSC
3363Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
3364
3365 * config.bfd: Add mips*vr4300-*-elf* target.
3366 * config/mipsbvr4300.mt: Added.
3367
1613e075 3368See file ChangeLog.2
e6d739eb 3369
41126f15
JK
3370\f
3371Local Variables:
3372mode: indented-text
3373left-margin: 8
6ec3bb6a
ILT
3374fill-column: 74
3375version-control: never
3376End:
This page took 0.332546 seconds and 4 git commands to generate.