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