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