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