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