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