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