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