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